Open main menu
Home
Random
Log in
Settings
About AddOn Studio
Disclaimers
AddOn Studio
Search
Editing
WoW:API SetCurrentTitle
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{protectedhwapi|3.3}} {{wowapi}} Changes your character's displayed title. SetCurrentTitle(titleId); == Arguments == ; titleId : Number - ID of the title you want to set. The identifiers are global and therefore do not depend on which titles you have learned. Invalid or unlearned values clear your title. See [[TitleId]] for a list. == Example == SetCurrentTitle(43); This sets the title "Elder" if your character had earned the title, otherwise it removes any active title. /run local t={}; for titles=1,GetNumTitles()-1,1 do if IsTitleKnown(titles)==1 then table.insert(t,titles) end; end; local x=random(#t); print("Using title: "..GetTitleName(t[x])); SetCurrentTitle(t[x]) This macro will iterate over the list of titles, grab the ones the user has, then choose a random one from that list. == Details == * The last indexed value (currently 143) returns nil and removes the player's name completely (not available to players). * [[API GetTitleName|GetTitleName]] can be used to find the name associated with the [[TitleId]].
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Ambox
(
edit
)
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Protectedhwapi
(
edit
)
Template:Tocright
(
edit
)
Template:Wowapi
(
edit
)
Close
Loading editor…