Module:Items: Difference between revisions

Bolding category names from getOtherItemBoxText
(Added option to getItemStat for getting whether an item is needed for 100% Item Completion)
(Bolding category names from getOtherItemBoxText)
Line 214: Line 214:
   --For equipment, show the slot they go in
   --For equipment, show the slot they go in
   if item.equipmentSlot ~= nil then
   if item.equipmentSlot ~= nil then
     result = result..'\r\n|-\r\n|Equipment Slot: '..p.getEquipmentSlotName(item.equipmentSlot)
     result = result.."\r\n|-\r\n|'''Equipment Slot:''' "..p.getEquipmentSlotName(item.equipmentSlot)
   end
   end
   --For weapons with a special attack, show the details
   --For weapons with a special attack, show the details
   if item.hasSpecialAttack then
   if item.hasSpecialAttack then
     local spAtt = p.getSpecialAttackByID(item.specialAttackID)
     local spAtt = p.getSpecialAttackByID(item.specialAttackID)
     result = result..'\r\n|-\r\n|Special Attack:'
     result = result.."\r\n|-\r\n|'''Special Attack:'''"
     result = result..'\r\n* '..spAtt.chance..'% chance for '..spAtt.name..':'
     result = result..'\r\n* '..spAtt.chance..'% chance for '..spAtt.name..':'
     result = result..'\r\n** '..spAtt.description
     result = result..'\r\n** '..spAtt.description
Line 225: Line 225:
   --For potions, show the number of charges
   --For potions, show the number of charges
   if item.potionCharges ~= nil then
   if item.potionCharges ~= nil then
     result = result..'\r\n|-\r\n|Charges: '..item.potionCharges
     result = result.."\r\n|-\r\n|'''Charges:''' "..item.potionCharges
   end
   end
   --For food, show how much it heals for
   --For food, show how much it heals for
   if item.healsFor ~= nil then
   if item.healsFor ~= nil then
     result = result..'\r\n|-\r\n|Heals for: '..Icons.Icon({"Hitpoints", type="skill", notext="true"})..' '..(item.healsFor * 10)
     result = result.."\r\n|-\r\n|'''Heals for:''' "..Icons.Icon({"Hitpoints", type="skill", notext="true"})..' '..(item.healsFor * 10)
   end
   end
   --For Prayer Points, show how many you get
   --For Prayer Points, show how many you get
   if item.prayerPoints ~= nil then
   if item.prayerPoints ~= nil then
     result = result..'\r\n|-\r\n|'..Icons.Icon({'Prayer', type='skill'})..' Points: '..item.prayerPoints
     result = result.."\r\n|-\r\n|'''"..Icons.Icon({'Prayer', type='skill'}).." Points:''' "..item.prayerPoints
   end
   end
   return result
   return result