Danger II
tibiara.com
The teleporter part works well.
I can push items into a teleporter and they get moved to the target position but it seems like thats the only part that works now.
I cannot pick up items, but push them on ground..
I can push items into a teleporter and they get moved to the target position but it seems like thats the only part that works now.
I cannot pick up items, but push them on ground..
Code:
function Player:onMoveItem(item, count, fromPosition, toPosition)
local newPos, effect
if Tile(toPosition):getItemById(1387) then
for k, v in pairs(teleportersConfig) do
if (toPosition == v.teleporterPos) then
teleporterPos = v.teleporterPos
newPos = v.teleportTo
effect = v.effect
end
end
teleporterPos:sendMagicEffect(effect)
item:moveTo(newPos)
newPos:sendMagicEffect(effect)
end
return true
end