Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local t = {
- storage = 41902
- }
- function onUse(cid, item, fromPosition, itemEx, toPosition)
- if not isKnight(cid) then
- doPlayerSendCancel(cid, 'Sorry, you cannot use this object.')
- return false
- end
- if getPlayerStorageValue(cid, t.storage) > 0 then
- doPlayerSendCancel(cid, 'You cannot use this during the event.')
- return false
- end
- local maxHealth = getCreatureMaxHealth(cid)
- local formula = ((maxHealth / 100) * math.random(30, 50))
- doCreatureAddHealth(cid, formula)
- doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC)
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement