Ad blocker interference detected!
Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers
Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.
→ WoW API
Returns the name of the skill required, and the amount needed in that skill. Index is the selection index obtained by GetTrainerSelectionIndex().
skillName, skillLevel, hasReq = GetTrainerServiceSkillReq(index)
- the number of the selection in the trainer window
- The name of the skill.
- The required level needed for the skill.
- 1 or nil. Seems to be 1 for skills that you cannot learn, nil for skills you have learned already.
local selection = GetTrainerSelectionIndex() local skillName, skillAmt = GetTrainerServiceSkillReq(selection) DEFAULT_CHAT_FRAME:AddMessage('Skill Name: ' .. skillName) DEFAULT_CHAT_FRAME:AddMessage('Skill Amount Required: ' .. skillLevel)
If you had an engineering trainer open, with a skill you knew already the output would be:
Skill Name: Engineering Skill Amount Required: 375