Jump to content
Toggle menu
  • 17.3K articles
  • 8.2K files
  • 5 users
  • 280.7K edits
WoW Classic Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

API GetTrainerServiceSkillReq

From WoW Classic Wiki

Returns the name of the skill required, and the amount needed in that skill.

 skillName, skillAmt = GetTrainerServiceSkillReq(index);

Arguments

index
the number of the selection in the trainer window

Example

 local selection = GetTrainerSelectionIndex();
 
 local skillName, skillAmt = GetTrainerServiceSkillReq(selection);
 DEFAULT_CHAT_FRAME:AddMessage('Skill Line Required: ' .. skillName);
 DEFAULT_CHAT_FRAME:AddMessage('Skill Amount Required: ' .. skillAmt);

If you had the Alchemist trainer window open and Weak Troll's Blood Potion selected, the return on the chat window would be Alchemy and 15.

--Dragonflyy

--- Template:WoW API