Returns information about a reagent in a trade skill recipe
See also Tradeskill functions.
Signature:
reagentName,
reagentTexture,
reagentCount,
playerReagentCount
=
GetTradeSkillReagentInfo(skillIndex,
reagentIndex)
Arguments:
skillIndex
- Index of a recipe in the trade skill list (between 1 andGetNumTradeSkills()
) (number
)reagentIndex
- Index of a reagent in the recipe (between 1 andGetTradeSkillNumReagents()
) (number
)
Returns:
reagentName
- Name of the reagent (string
)reagentTexture
- Path to an icon texture for the reagent (string
)reagentCount
- Quantity of the reagent required to perform the recipe (number
)playerReagentCount
- Quantity of the reagent in the player's possession (number
)
Examples:
-- Prints the reagent(s) required for the first trade skill recipe listed local skillIndex = GetFirstTradeSkill() local name = GetTradeSkillInfo(skillIndex) print(format("%s takes the following reagent(s):", name)) for reagentIndex = 1, GetTradeSkillNumReagents(skillIndex) do local reagentName, _, reagentCount = GetTradeSkillReagentInfo(skillIndex, reagentIndex) print(format(" %dx %s", reagentCount, reagentName)) end