Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Item.setRandomCrit(self)
- self:setAbility(ITEM_ABILITY_CRITICALHITCHANCE, math.random(1, 100))
- self:setAbility(ITEM_ABILITY_CRITICALHITAMOUNT, math.random(1, 100))
- end
- local item = player:getSlotItem(CONST_SLOT_LEFT)
- item:setRandomCrit() -- rolls a random crit chance + damage modifier
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement