Sir Richard
New Member
Hey there!
This code is supposed to teleport items moved to a certain teleport and then be moved back, it is working just fine, except for one thing:
Stacked items get teleported nowhere/disappear.
What should I change in order to get all items (stackable or non stackable) being teleported to the correct destination?
This code is supposed to teleport items moved to a certain teleport and then be moved back, it is working just fine, except for one thing:
Stacked items get teleported nowhere/disappear.
What should I change in order to get all items (stackable or non stackable) being teleported to the correct destination?
Code:
function onAddItem(moveitem, tileitem, position)
local setting = ItemTeleports[tileitem.actionid]
if not setting then
return true
end
moveitem:moveTo(setting.destination)
setting.destination:sendMagicEffect(setting.effect)
return true
end