Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onUse(cid, item, fromPosition, itemEx, toPosition)
- if toPosition.x == 65535 or toPosition.x == 0 then
- return true
- end
- local used = function(splash)
- doChangeTypeItem(item.uid, item.type - 1)
- if splash then
- doDecayItem(doCreateItem(2025, 7, toPosition))
- end
- return true, fromPosition.x == 65535
- end
- if getTopCreature(toPosition).uid ~= cid then
- return used(true)
- end
- doPlayerAddMana(cid, math.random(80,120))
- doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE)
- doPlayerSay(cid, "Aaaah...", TALKTYPE_SAY)
- return used(false)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement