WoW API: GetTrainerServiceSkillReq

From AddOn Studio
Revision as of 18:11, 6 January 2007 by WoWWiki>Hobinbot (upgraded deprecated template)
Jump to navigation Jump to search

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.

--Dragonflyy