Lore archive · Warcraft Wiki, 2023 dump
API GetTrainerServiceSkillReq
Last wiki revision 2022-07-21
Returns the name of the required skill and the amount needed in that skill.
skillName, skillLevel, hasReq = GetTrainerServiceSkillReq(index)
- index
- the number of the selection in the trainer window
- skillName:The name of the skill.
- skillLevel:The required level needed for the skill.
- hasReq: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
Source
https://warcraft.wiki.gg/wiki/API_GetTrainerServiceSkillReq · retrieved 2023-11-13 · CC BY-SA 4.0
Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.
This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.