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

Poi labyrint..

Teddy

SweStream.se
Joined
Oct 2, 2008
Messages
3,797
Reaction score
10
Location
Sweden 172
Hello i need a script that make some titels like tps .. i have made an labyrint and i wanna have tp back titels
 
Ok, Ill give you little help.
LUA:
function onStepIn(cid, item, pos)
ppos = getPlayerPosition(cid)

local t = {
[2500] = {{x=EDIT, y=EDIT, z=EDIT}},
[2501] = {{x=EDIT, y=EDIT, z=EDIT}},
}

local v = t[item.uid]
      if v then
         doTeleportThing(cid,v[1])
         doSendMagicEffect(ppos, CONST_ME_TELEPORT)
      end
return true
end

So,
[2500] = {{x=EDIT, y=EDIT, z=EDIT}},
If you put UID 2500 in a floor, it will tp you to position you want.
To add more floors just add like this:
LUA:
function onStepIn(cid, item, pos)
ppos = getPlayerPosition(cid)

local t = {
[2500] = {{x=EDIT, y=EDIT, z=EDIT}},
[2501] = {{x=EDIT, y=EDIT, z=EDIT}},
[2502] = {{x=EDIT, y=EDIT, z=EDIT}}
}

local v = t[item.uid]
      if v then
         doTeleportThing(cid,v[1])
         doSendMagicEffect(ppos, CONST_ME_TELEPORT)
      end
return true
end

Hope I helped!
Oh! And remember this hoes in movements and you must add this at movements.xml depending on how many UIDS you add:
XML:
<movevent type="StepIn" uniqueid="2500-2502" event="script" value="xxxxx.lua"/>
 
Last edited:
Code:
[20:25:46.173] [Error - MoveEvents Interface]
[20:25:46.173] data/movements/scripts/tpback.lua:onStepIn
[20:25:46.173] Description:
[20:25:46.173] attempt to index a nil value
[20:25:46.173] stack traceback:
[20:25:46.173]  [C]: in function 'doTeleportThing'
[20:25:46.173]  data/movements/scripts/tpback.lua:12: in function <data/movement
s/scripts/tpback.lua:1>
Error..
 
Back
Top