Sorry. Was a noob mistake, and it took me like 15 minutes to find it. lmfaoi got this error in console now
Lua Script Error: [MoveEvents Interface]
data/movements/scripts/poh/enterpoi.luanStepIn
LuaScriptInterface::luaDoTeleportThing(). Can not teleport thing.
local config = {
book_id = 1976,
tile_in = {x = 32793, y = 32330, z = 10}
}
function onStepIn(cid, item, position, fromPosition)
-- teleport out
if config.tile_in.x ~= position.x or config.tile_in.y ~= position.y or config.tile_in.z ~= position.z then
doTeleportThing(cid, {x = position.x, y = position.y + 3, z = position.z})...
function onStepIn(cid, item, pos)
local BOOK_ID = 1970
local ACTION_ID = 10201 -- Actionid of the tile that teleport you if you have the Holy Tible
if (item.actionid == ACTION_ID) then
if (getPlayerItemCount(cid, BOOK_ID) ~= 1) then
doTeleportThing(cid, {x=32806, y=32359, z=10})
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
else
doTeleportThing(cid, {x=32791, y=32327, z=10})
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
end
end
return TRUE
end
function onStepIn(cid, item, pos)
local BOOK_ID = 1976
local ACTION_ID = 10201 -- Actionid of the tile that teleport you if you have the Holy Tible
if (item.actionid == ACTION_ID) then
if (getPlayerItemCount(cid, BOOK_ID) ~= 1) then
doTeleportThing(cid, {x=32793, y=32330, z=10})
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
else
doTeleportThing(cid, {x=32793, y=32328, z=10})
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
end
end
return TRUE
end
Lua:function onStepIn(cid, item, pos) local BOOK_ID = 1970 local ACTION_ID = 10201 -- Actionid of the tile that teleport you if you have the Holy Tible if (item.actionid == ACTION_ID) then if (getPlayerItemCount(cid, BOOK_ID) ~= 1) then doTeleportThing(cid, {x=32806, y=32359, z=10}) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) else doTeleportThing(cid, {x=32791, y=32327, z=10}) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) end end return TRUE end
this script is working for enter... but i can't out now ;s
i put tha same actionid in 2 tiles, for enter and out?
Imgur: The most awesome images on the Internet
Lua:function onStepIn(cid, item, pos) local BOOK_ID = 1976 local ACTION_ID = 10201 -- Actionid of the tile that teleport you if you have the Holy Tible if (item.actionid == ACTION_ID) then if (getPlayerItemCount(cid, BOOK_ID) ~= 1) then doTeleportThing(cid, {x=32793, y=32330, z=10}) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) else doTeleportThing(cid, {x=32793, y=32328, z=10}) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT) end end return TRUE end
<movevent event="StepIn" actionid="10201" script="script_name.lua"/>
local config = {
book_id = 1976,
tile_in = {x = 32793, y = 32330, z = 10}
}
function onStepIn(cid, item, position, fromPosition)
-- teleport out
if config.tile_in.x ~= position.x and config.tile_in.y ~= position.y and config.tile_in.z ~= position.z then
doTeleportThing(cid, {position.x, position.y + 3, position.z})
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
return true
end
-- refuse entry
if getPlayerItemCount(cid, config.book_id) < 1 then
doTeleportThing(cid, fromPosition)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
return true
end
-- teleport in
doTeleportThing(cid, {config.tile_in.x, config.tile_in.y - 3, config.tile_in.z})
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
return true
end
Sorry. Was a noob mistake, and it took me like 15 minutes to find it. lmfaoi got this error in console now
Lua Script Error: [MoveEvents Interface]
data/movements/scripts/poh/enterpoi.luanStepIn
LuaScriptInterface::luaDoTeleportThing(). Can not teleport thing.
local config = {
book_id = 1976,
tile_in = {x = 32793, y = 32330, z = 10}
}
function onStepIn(cid, item, position, fromPosition)
-- teleport out
if config.tile_in.x ~= position.x or config.tile_in.y ~= position.y or config.tile_in.z ~= position.z then
doTeleportThing(cid, {x = position.x, y = position.y + 3, z = position.z})
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
return true
end
-- refuse entry
if getPlayerItemCount(cid, config.book_id) < 1 then
doTeleportThing(cid, fromPosition)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
return true
end
-- teleport in
doTeleportThing(cid, {x = config.tile_in.x, y = config.tile_in.y - 3, z = config.tile_in.z})
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
return true
end
local config = {
book_id = 1976,
tile_in = {x = 32793, y = 32330, z = 10}
}
function onStepIn(cid, item, position, fromPosition)
local new_position = {x = 0, y = 0, z = 0}
if config.tile_in.x ~= position.x or config.tile_in.y ~= position.y or config.tile_in.z ~= position.z then
new_position = {x = position.x, y = position.y + 3, z = position.z}
elseif getPlayerItemCount(cid, config.book_id) < 1 then
new_position = fromPosition
else
new_position = {x = position.x, y = position.y - 3, z = position.z}
end
doTeleportThing(cid, new_position)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_TELEPORT)
return true
end