Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement