zxzxzx
New Member
- Joined
- Mar 12, 2011
- Messages
- 334
- Reaction score
- 3
Hello I have problem with teleport scroll script... :<
My script
local newpos = {x=1000, y=1000, z=7}
local time = 1--in second
function onUse(cid, item, frompos, item2, topos)
local inFight = hasCondition(cid, CONDITION_INFIGHT)
if exhaustion.check(cid, 1605) then
return doPlayerSendCancel(cid, "Please Wait "..exhaustion.get(cid,1605)..".") and doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
end
if not inFight then
doSendMagicEffect(getPlayerPosition(cid), 2)
doTeleportThing(cid,newpos)
doCreatureSay(cid, "TELEPORTED!!" ,25)
exhaustion.set(cid, 1605, time)
else
doPlayerSendTextMessage(cid,25,"You can't use the teleport scroll if you are PZ LOCKED!!")
end
return true
end
I have error
lua 4 attempt to call global 'has condition' (a ni value)
Can anybody fix it for me??? :<
Thanks for help and rep+
My script
local newpos = {x=1000, y=1000, z=7}
local time = 1--in second
function onUse(cid, item, frompos, item2, topos)
local inFight = hasCondition(cid, CONDITION_INFIGHT)
if exhaustion.check(cid, 1605) then
return doPlayerSendCancel(cid, "Please Wait "..exhaustion.get(cid,1605)..".") and doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
end
if not inFight then
doSendMagicEffect(getPlayerPosition(cid), 2)
doTeleportThing(cid,newpos)
doCreatureSay(cid, "TELEPORTED!!" ,25)
exhaustion.set(cid, 1605, time)
else
doPlayerSendTextMessage(cid,25,"You can't use the teleport scroll if you are PZ LOCKED!!")
end
return true
end
I have error
lua 4 attempt to call global 'has condition' (a ni value)
Can anybody fix it for me??? :<
Thanks for help and rep+