Lava Titan
Developer
Hi, based on other script, I'm creating this one to avoid players moving some items and I'm having some issues like:
1. If you throw an item that's not on the list and it's not stackable on the tile you also can't move that item..
2. If the item is on the list but it's stackable you can still move it..
1. If you throw an item that's not on the list and it's not stackable on the tile you also can't move that item..
2. If the item is on the list but it's stackable you can still move it..
Lua:
local list = {1964, 2160} -- list of items that can't be moved
function onRemoveItem(moveitem, tileitem, position, cid)
for k, v in ipairs(list) do
if getTileItemById(position, v) then
doTeleportThing(moveitem.uid, position)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
doPlayerSendCancel(cid, "You can't move this item.")
else
doTeleportThing(moveitem.uid, getCreaturePosition(cid)) -- teleports items that are not on the list to player pos
end
end
return true
end