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

Teleport Tile

zednem

New Member
Joined
Nov 15, 2008
Messages
108
Reaction score
0
I am trying to do a script which when the player walk in certain tile he is teleported, but is not working =/
What could be?

PHP:
function onStepIn(cid, item, pos)

teleport = {x=1211, y=1233, z=7}
teleport1 = {x =1212, y =1215, z=7}
if isPlayer(cid) == 1 and item.actionid == 5820 then
doSendMagicEffect(teleport,10)
doTeleportThing(cid,teleport)
elseif isPlayer(cid) == 1 and item.actionid == 5821 then
doSendMagicEffect(teleport,10)
doTeleportThing(cid,teleport1)
end
end
 
Fle, that will not work, don't use that one.

Code:
<movevent event="StepIn" item="12711" script="rookbugponte.lua"/>
Code:
local positions =
{
    place = {x=100, y=100, z=7} -- New position.
}
function onStepIn(cid, item, fromPos, item2, toPos)
    if getTileItemById(12711) then -- Unique ID of the Tile.
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've been teleported!")
        doTeleportThing(cid, positions.place)
    end
    return TRUE
end
I tried to make the code but it still did not work ..
 
Code:
<movevent event="StepIn" item="12711" script="rookbugponte.lua"/>
Code:
local positions =
{
    place = {x=100, y=100, z=7} -- New position.
}
function onStepIn(cid, item, fromPos, item2, toPos)
    if getTileItemById(12711) then -- Unique ID of the Tile.
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've been teleported!")
        doTeleportThing(cid, positions.place)
    end
    return TRUE
end
I tried to make the code but it still did not work ..
lol its a 2009 topic.... what source code u are using?
 
TFS 0.4
change 999 to action ID that u will put in map editor
Code:
local pos = {x=100, y=100, z=7}

function onStepIn(cid, item, fromPos, item2, toPos)
    if item.actionid == 999 then
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've been teleported!")
        doTeleportThing(cid, pos)
    end
    return TRUE
end
 
Code:
local pos = {x=100, y=100, z=7}

function onStepIn(cid, item, fromPos, item2, toPos)
    if item.actionid == 999 then
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've been teleported!")
        doTeleportThing(cid, pos)
    end
    return TRUE
end
The problem is that I can not use actionid ..
with actionid I got it, but only in this script can I only use by tile ID
=/
 
Back
Top