Module:Items: Difference between revisions

From Melvor Idle
mNo edit summary
(wheeee deliberately compensating for the fact that Melee Accuracy Potion's name inexplicably has two spaces)
Line 96: Line 96:
   result = result..'\r\n!Potion!!Tier!!Charges!!Effect'
   result = result..'\r\n!Potion!!Tier!!Charges!!Effect'


  local tier1potion = p.getItem(potionName..' I')
   for i, tier in pairs(tiers) do
   for i, tier in pairs(tiers) do
     local tierName = potionName..' '..tier
     local tierName = potionName..' '..tier
     local potion = p.getItem(tierName)
     local potion = p.getItemByID(tier1potion.id + i - 1)
     if potion == nil then
     if potion == nil then
       mw.log("Failed to get tier "..tier)
       mw.log("Failed to get tier "..tier)