Rwynoha
New Member
- Joined
- Jan 20, 2015
- Messages
- 14
- Reaction score
- 0
i've edit this script to add special level for it and its working fine but i got small issue and its when i use this scroll on low level like 40 its says You can't use the teleport scroll if you pz locked but i'm already not pz i need it to say sorry you don't have enough level ,sorry but i'm still learning 
sorry for my English
sorry for my English
Code:
local newpos = {x=1000, y=1000, z=7}
function onUse(cid, item, frompos, item2, topos)
local inFight = hasCondition(cid, CONDITION_INFIGHT)
local delay = 76000 -- random storage
if not inFight and getPlayerStorageValue(cid, delay) <= os.time() and getPlayerLevel(cid) >= 50 then
doSendMagicEffect(getPlayerPosition(cid), 65)
doTeleportThing(cid,newpos)
doCreatureSay(cid, "TELEPORTED!!" , TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, delay, os.time() + 60)
elseif getPlayerStorageValue(cid, delay) >= os.time() then
doPlayerSendCancel(cid, "You are exhausted. You can only use once per minute!")
else
doPlayerSendCancel(cid, "You can't use the teleport scroll if you are PZ LOCKED!!")
end
return true
end