Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local newpos = {x=2001, y=2030, z=7}
- function onUse(cid, item, frompos, item2, topos)
- if isInRange(getPlayerPosition(cid), {x = 461, y = 2457, z = 2}, {x = 582, y = 2585, z = 7}) then
- return doPlayerSendCancel(cid, "You can't use the teleport scroll here.")
- end
- if getCreatureCondition(cid, CONDITION_INFIGHT) == FALSE then
- doTeleportThing(cid,newpos)
- doPlayerSendTextMessage(cid,20,"TELEPORTED!")
- doSendMagicEffect(getPlayerPosition(cid), 10)
- else
- doPlayerSendTextMessage(cid,25,"You can't use the teleport scroll if you have pz.")
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement