WoW:API SetCurrentTitle: Difference between revisions
Jump to navigation
Jump to search
(random title marco) |
|||
Line 14: | Line 14: | ||
This would set the title "Chef" if your character had earned the title, otherwise it removes any active title. | This would set 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) | |||
This will set a random title. (Warning: quick'n'dirty: may hang WoW if no title available. May cause lag if only few titles are available.) | |||
== Details == | == Details == |
Revision as of 19:21, 13 November 2009
One line summary description of function.
Arguments
- Number - Index of the title you want to set.
Returns
nil
Example
SetCurrentTitle(43);
This would set 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)
This will set a random title. (Warning: quick'n'dirty: may hang WoW if no title available. May cause lag if only few titles are available.)
Details
- The last indexed value (currently 137) 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.)
- GetTitleName can be used to find the name associated with the TitleId.