WoW:API SetCurrentTitle: Difference between revisions

Grammar
(random title marco)
(Grammar)
Line 13: Line 13:
  SetCurrentTitle(43);
  SetCurrentTitle(43);


This would set the title "Chef" if your character had earned the title, otherwise it removes any active title.
This sets the title "Chef" if your character had earned the title, otherwise it removes any active title.


  /script i=0 while (IsTitleKnown(i)==0) do i=random(GetNumTitles()) end SetCurrentTitle(i)
  /script i=0 while (IsTitleKnown(i)==0) do i=random(GetNumTitles()) end SetCurrentTitle(i)
Line 20: Line 20:


== Details ==
== Details ==
*The last indexed value (currently 137) returns nil and removes the player's name completely (not available to players).
*The last indexed value (currently 143) returns nil and removes the player's name completely (not available to players).
*Title index -1 will clear titles from the player's name. (Option "None" from the Character frame's title dropdown menu.)  
*Title index -1 will clear titles from the player's name. (Option "None" from the Character frame's title dropdown menu.)  
*[[API GetTitleName|GetTitleName]] can be used to find the name associated with the [[TitleId]].
*[[API GetTitleName|GetTitleName]] can be used to find the name associated with the [[TitleId]].
Anonymous user