SHARE
TWEET

Untitled

a guest Sep 19th, 2019 95 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local newpos = {x=2001, y=2030, z=7}
  2. function onUse(cid, item, frompos, item2, topos)
  3. if isInRange(getPlayerPosition(cid), {x = 461, y = 2457, z = 2}, {x = 582, y = 2585, z = 7}) then
  4. return doPlayerSendCancel(cid, "You can't use the teleport scroll here.")
  5. end
  6. if getCreatureCondition(cid, CONDITION_INFIGHT) == FALSE then
  7. doTeleportThing(cid,newpos)
  8. doPlayerSendTextMessage(cid,20,"TELEPORTED!")
  9. doSendMagicEffect(getPlayerPosition(cid), 10)
  10. else
  11. doPlayerSendTextMessage(cid,25,"You can't use the teleport scroll if you have pz.")
  12. end
  13. return true
  14. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top