• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved teleport script (actions)

Na Amigo

The crazy girl
Joined
Jun 5, 2017
Messages
254
Solutions
3
Reaction score
18
Location
Egypt
i'v this script if you at pz you can't use it
here is the script and the error below
Code:
function onUse(cid, item, frompos, item2, topos)
temple = {x=602,y=533,z=7}
pos = getPlayerPosition(cid)

if getPlayerConditionTicks(cid, 1024) > 0 then
doPlayerSay(cid, "You Cant Use This Item In Fight.", 16)
else
doTeleportThing(cid, temple)
end
return true
end
here is the error
Code:
[13:1:08.533] [Error - Action Interface]
[13:1:08.533] data/actions/scripts/Arch TP.lua:onUse
[13:1:08.533] Description:
[13:1:08.533] data/actions/scripts/Arch TP.lua:5: attempt to call global 'getPlayerConditionTicks' (a nil value)
[13:1:08.533] stack traceback:
[13:1:08.533]   data/actions/scripts/Arch TP.lua:5: in function <data/actions/scripts/Arch TP.lua:1>
 
Solution
------------------ SOLVED ---------------
I made this with my own and it worked fine
Lua:
local temple = {x=602,y=533,z=7}
local pos = getPlayerPosition(cid)
function onUse(cid, item, frompos, item2, topos)
         if getCreatureCondition(cid, CONDITION_INFIGHT) then
             doPlayerSendCancel(cid, "You can't use this when you're in a fight.")
             doSendMagicEffect(pos, CONST_ME_POFF)
             return true
         end
doTeleportThing(cid, temple)
doSendMagicEffect(temple, 35)
return true
end
------------------ SOLVED ---------------
I made this with my own and it worked fine
Lua:
local temple = {x=602,y=533,z=7}
local pos = getPlayerPosition(cid)
function onUse(cid, item, frompos, item2, topos)
         if getCreatureCondition(cid, CONDITION_INFIGHT) then
             doPlayerSendCancel(cid, "You can't use this when you're in a fight.")
             doSendMagicEffect(pos, CONST_ME_POFF)
             return true
         end
doTeleportThing(cid, temple)
doSendMagicEffect(temple, 35)
return true
end
 
Solution
Back
Top