finish beta gifts and finish very import mistake done with the chests without distinguesting

This commit is contained in:
ErikasKontenis
2019-12-30 22:40:18 +02:00
parent 5ca5393b63
commit f0cb5b3f84
6 changed files with 28 additions and 23 deletions

View File

@@ -0,0 +1,11 @@
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if player:getStorageValue(17572) ~= 1 and player:getLevel() <= 7 then
player:setStorageValue(17572, 1)
player:addHealth(-math.random(player:getHealth()-20, player:getHealth()-1))
item:getPosition():sendMagicEffect(CONST_ME_HITBYFIRE)
player:say('OUCH!', TALKTYPE_MONSTER_SAY)
player:addExperience(4200 - player:getExperience())
end
return true
end