• 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!

TP Stone Proplem

amr shalapy

Banned User
Joined
Aug 28, 2014
Messages
122
Reaction score
8
Hello when i use the teleport stone i got this error and it's not working
and here is my action id code and script thanks..
Code:
<action itemid="5892" script="tp stone.lua"/>

Code:
Lua Script Error: [Action Interface]
data/actions/scripts/tp stone.lua:onUse

data/actions/scripts/tp stine.lua:5: attempt to call global "getPlayerConditionTricks' <a nil value>

my script:-
Code:
function onUse(cid, item, frompos, item2, topos)
temple = {x=6166,y=6048,z=7}
pos = getPlayerPosition(cid)

if getPlayerConditionTicks(cid, 1024) > 0 then
doPlayerSay(cid, "Sorry, cant do that with fight.", 16)
else
doTeleportThing(cid, temple)
doSendMagicEffect(temple, 35)
end
end
 
Code:
tp stine.lua:5

Code:
script="tp stone.lua"/>

whats the script inside the "tp stine.lua" file?
Code:
function onUse(cid, item, frompos, item2, topos)
temple = {x=6166,y=6048,z=7}
pos = getPlayerPosition(cid)
if getPlayerConditionTicks(cid, 1024) > 0 then
doPlayerSay(cid, "Sorry, cant do that with fight.", 16)
else
doTeleportThing(cid, temple)
doSendMagicEffect(temple, 35)
end
end
 
Code:
local temple = {x=6166,y=6048,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
 
Code:
when i runing my server i got this error
[code]Lua Script Error : [Action Interface]
data/actions/scripts/tp rune.lua

InternalGetPlayerInfo<>.Player not found. info = 7
and when i use the teleport i found the same error like first :(
end[/code]
 
Lua:
local temple = {x=6166,y=6048,z=7}

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(getPlayerPosition(cid), CONST_ME_POFF)
        return true
    end
doSendMagicEffect(pos,35)
doTeleportThing(cid,temple)
return true
end

try that? very similar if not the same to what heba put lmao
 
Lua:
local temple = {x=6166,y=6048,z=7}

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(getPlayerPosition(cid), CONST_ME_POFF)
        return true
    end
doSendMagicEffect(pos,35)
doTeleportThing(cid,temple)
return true
end

try that? very similar if not the same to what heba put lmao

well, i've tried and got this error -_-
Code:
Lua Script Error: [Action Interface]
data/actions/scripts/tp stone.lua:onUse
data/actions/scripts/tp stone.lua:5: attempt to call global 'getCreatureCondition' <a nil value>
 
Try this

function onUse(cid, item, frompos, item2, topos)
tp = {x=1,y=1,z=1}
if getPlayerConditionTicks(cid, 1024) > 0 then
doPlayerSendTextMessage(cid, 24, "You can't use the teleport scroll if you have pz.")
else
doTeleportThing(cid, tp)
doSendMagicEffect(tp, 10)
doPlayerSendTextMessage(cid, 18, "Teleported!.")
end
end
 
Back
Top