WoW API: GetTrainerServiceSkillReq
← WoW API < GetTrainerServiceSkillReq
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.