Anonymous

Module:Items: Difference between revisions

From Melvor Idle
added ability to get whether an item hasCombatStats with p.getItemStat
(Amend indentation)
(added ability to get whether an item hasCombatStats with p.getItemStat)
Line 136: Line 136:
elseif StatName == 'slayerBonusXP' then
elseif StatName == 'slayerBonusXP' then
return p._getItemModifier(item, 'increasedSkillXP', 'Slayer', false)
return p._getItemModifier(item, 'increasedSkillXP', 'Slayer', false)
elseif StatName == 'hasCombatStats' then
return tostring(p.hasCombatStats(item))
end
end
if result == nil and ZeroIfNil then result = 0 end
if result == nil and ZeroIfNil then result = 0 end