local oldPos = {x = 221, y = 436, z = 7} -- where to step to be teleported
local newPos = {x = 195, y = 433, z = 7} -- position where the player will be teleported
function onStepIn(cid, item, pos)
if isPlayer(cid) == TRUE then
doSendMagicEffect(oldPos, CONST_ME_POFF)
doTeleportThing(cid, newPos, TRUE)
doSendMagicEffect(newPos, CONST_ME_TELEPORT)
doRemoveItem(getItem.uid)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The teleport isn't activated.")
doSendMagicEffect(oldPos, CONST_ME_POFF)
end
end
return TRUE
end
<movevent event="StepIn" uniqueid="xxxx" script="tortoise.lua" />
local positions = {
[actionid] = {x=195, y=433, z=7},
[actionid2] = {x=174, y=284, z=7},
}
function onStepIn(cid, item, oldPos)
if isPlayer(cid) == TRUE then
local newPos = positions[item.actionid]
if newPos then
doSendMagicEffect(oldPos, CONST_ME_POFF)
doTeleportThing(cid, newPos, TRUE)
doSendMagicEffect(newPos, CONST_ME_TELEPORT)
end
end
return TRUE
end
[8908] = {x=195, y=433, z=7},
doRemoveItem(getItem.uid)
Didnt work