Teddy
SweStream.se
Hello i need a script that make some titels like tps .. i have made an labyrint and i wanna have tp back titels
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
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
<movevent type="StepIn" uniqueid="2500-2502" event="script" value="xxxxx.lua"/>
[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>