function Player:onMoveItem(item, count, fromPosition, toPosition)
if blockTeleportTrashing and toPosition.x ~= CONTAINER_POSITION then
local thing = Tile(toPosition):getItemByType(ITEM_TYPE_TELEPORT)
if thing then
self:sendCancelMessage('Sorry, not possible.')
self:getPosition():sendMagicEffect(CONST_ME_POFF)
return false
end
end
if isInArray({1714, 1715, 1716, 1717, 1738, 1740, 1741, 1747, 1748, 1749}, item.itemid) and item.actionid > 0 or item.actionid == 5640 then
self:sendCancelMessage('You cannot move this object.')
return false
elseif item.itemid == 7466 then
self:sendCancelMessage('You cannot move this object.')
return false
end
-- This is my line to make items unmovable.
if item.actionId == 42099 then
self:sendCancelMessage('You cannot move this object.')
return false
end
if fromPosition.x == CONTAINER_POSITION and toPosition.x == CONTAINER_POSITION
and item.itemid == 8710 and self:getItemCount(8710) == 2 and self:getStorageValue(Storage.RookgaardTutorialIsland.cockroachLegsMsgStorage) ~= 1 then
self:sendTextMessage(MESSAGE_INFO_DESCR, 'Well done, you have enough cockroach legs! You should head back to Santiago with them. Climb the ladder to the north to exit.')
self:setStorageValue(Storage.RookgaardTutorialIsland.cockroachLegsMsgStorage, 1)
self:setStorageValue(Storage.RookgaardTutorialIsland.SantiagoNpcGreetStorage, 6)
end
return true
end