Guest User

Untitled

a guest
Aug 15th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.28 KB | None | 0 0
  1. local teleportto = {x=1003,y=1000,z=7}
  2. local basin = {x=1001,y=999,z=7}
  3. local storage = 8987
  4.  
  5. function countDown(number, pos, effect, msgonend, effectonend)
  6.   local n = number
  7.        for i = 1, number do
  8.            addEvent(doSendAnimatedText,i* 1000, pos, n > 1 and n.."" or msgonend .."", n < 6 and TEXTCOLOR_WHITE or TEXTCOLOR_RED)
  9.            addEvent(doSendMagicEffect,i* 1000, pos, n > 1 and 13 or 12 )
  10.               n = n -1
  11.        end
  12.       n = number
  13. return true
  14. end
  15.  
  16. function onUse(cid, item, fromPosition, itemEx, toPosition)
  17.  
  18. if exhaustion.get(cid, storage) then
  19.         return doPlayerSendCancel(cid,"You can't do this.")
  20.     end
  21.    
  22. if doPlayerRemoveItem(cid, 2160, 1) then
  23.     local basinold = getTileItemById(basin, 1485)
  24.     local freezetime = 5
  25.         doTransformItem(item.uid, 1484)
  26.      doCreatureSetNoMove(cid, 1)
  27.      exhaustion.set(cid, storage, 900)
  28.      addEvent(doTeleportThing, 5*1000, cid, teleportto)
  29.      addEvent(doCreatureSetNoMove, 5*1000, cid, 0)
  30.      addEvent(doCreatureSay, 4*1000, cid, "THE BOSS WANT TO MEET YOU RIGHT NOW!", TALKTYPE_ORANGE_1)
  31.      addEvent(doTransformItem, 5*1000, item.uid, 1485)
  32.      countDown(freezetime , toPosition, 0, "melted", 5)
  33.     else
  34.     doPlayerSendCancel(cid,"You need to step in the right position.")
  35.     end
  36.     return true
  37. end
Add Comment
Please, Sign In to add comment