Advertisement
Guest User

Untitled

a guest
May 19th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. function onUse(cid, item, fromPosition, itemEx, toPosition)
  2. if toPosition.x == 65535 or toPosition.x == 0 then
  3. return true
  4. end
  5.  
  6. local used = function(splash)
  7. doChangeTypeItem(item.uid, item.type - 1)
  8. if splash then
  9. doDecayItem(doCreateItem(2025, 7, toPosition))
  10. end
  11. return true, fromPosition.x == 65535
  12. end
  13.  
  14. if getTopCreature(toPosition).uid ~= cid then
  15. return used(true)
  16. end
  17.  
  18. doPlayerAddMana(cid, math.random(80,120))
  19. doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE)
  20. doPlayerSay(cid, "Aaaah...", TALKTYPE_SAY)
  21. return used(false)
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement