function onStepIn(cid, item, pos)
local thais = {x=32784, y=31178, z=9}
local carlin = {x=32783, y=31173, z=10}
local venore = {x=32778, y=31171, z=14}
if item.actionid == 9105 then
doTeleportThing(cid,carlin)
doSendMagicEffect(getCreaturePosition(cid),17)
else
[COLOR="Red"] if item.actionid == 9106 then
if isPlayer(cid) then
doTeleportThing(cid,thais)
doSendMagicEffect(getCreaturePosition(cid),17)
end[/COLOR]
else
if item.actionid == 24061 then
doTeleportThing(cid,venore)
doSendMagicEffect(getCreaturePosition(cid),48)
end
return 1
end
end
end
local t = {
[9105] = {x=32783, y=31173, z=10},
[9106] = {x=32784, y=31178, z=9},
[24061] = {x=32778, y=31171, z=14},
}
function onStepIn(cid, item, position, fromPosition)
return doSendMagicEffect(position, CONST_ME_MORTAREA) and doTeleportThing(cid, isPlayer(cid) == TRUE and t[item.actionid] or fromPosition) and doSendMagicEffect(getThingPos(cid), CONST_ME_MORTARE)
end
Code:local t = { [9105] = {x=32783, y=31173, z=10}, [9106] = {x=32784, y=31178, z=9}, [24061] = {x=32778, y=31171, z=14}, } function onStepIn(cid, item, position, fromPosition) return doSendMagicEffect(position, CONST_ME_MORTAREA) and doTeleportThing(cid, isPlayer(cid) == TRUE and t[item.actionid] or fromPosition) and doSendMagicEffect(getThingPos(cid), CONST_ME_MORTARE) end
CONST_ME_MORTARE
CONST_ME_MORTAREA
function onStepIn(cid, item, position, fromPosition, toPosition)
local pos = {
{x = 32784, y = 31178, z = 9}, -- Thais
{x = 32783, y = 31173, z = 10}, -- Carlin
{x = 32778, y = 31171, z = 14} -- Venore
}
if not isPlayer(cid) then
return false
end
if item.actionid == 9105 then
doTeleportThing(cid, pos[2])
elseif item.actionid == 9106 then
doTeleportThing(cid, pos[1])
elseif item.actionid == 24061 then
doTeleportThing(cid, pos[3])
end
return doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
end
local t = {
[9105] = {x=32783, y=31173, z=10},
[9106] = {x=32784, y=31178, z=9},
[24061] = {x=32778, y=31171, z=14},
}
function onStepIn(cid, item, position, fromPosition)
return doSendMagicEffect(position, CONST_ME_MORTAREA) and doTeleportThing(cid, isPlayer(cid) == TRUE and t[item.actionid] or fromPosition) and doSendMagicEffect(getThingPos(cid), CONST_ME_MORTAREA)
end
function onStepIn(cid, item, position, fromPosition, toPosition)
local cfg = {
[1001] = {{x=32783, y=31173, z=10}, CONST_ME_TELEPORT},
[1002] = {{x=32784, y=31178, z=9}, CONST_ME_TELEPORT},
[1003] = {{x=32778, y=31171, z=14}, CONST_ME_TELEPORT}
}
local v = cfg[item.actionid]
return isPlayer(cid) and doTeleportThing(cid, v[1], true) and doSendMagicEffect(getThingPos(cid), v[2])
end
No errors in console but it doesn't work. I stepin on teleport and nothing..