Fandom

WoWWiki

API SetCurrentTitle

104,633pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

WoW API < SetCurrentTitle

Changes your character's displayed title.

SetCurrentTitle(titleId);

Arguments Edit

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 Edit

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 Edit

  • The last indexed value (currently 143) returns nil and removes the player's name completely (not available to players).
  • GetTitleName can be used to find the name associated with the TitleId.

Also on Fandom

Random Wiki