no, i said player events not actionsfor example i want to make ~50 items not moveable i have to add every one in actions.xml?
like: <action itemid="2500" script="notmoveable.lua"/> x50 for every item?
for example i want to make ~50 items not moveable i have to add every one in actions.xml?player events
function PlayernMoveItem
something like if item:getId() == xxxx then return false end
no, i said player events not actionsfor example i want to make ~50 items not moveable i have to add every one in actions.xml?
like: <action itemid="2500" script="notmoveable.lua"/> x50 for every item?
Ok, and can i implement it to GitHub - TwistedScorpio/OTHire: OpenTibia Server for Tibia 7.72 in some similar way?no, i said player events not actions
just make an array with item ids and use isInArray(array, item:getId()) then return false
you said tfs 1.2, not othireOk, and can i implement it to GitHub - TwistedScorpio/OTHire: OpenTibia Server for Tibia 7.72 in some similar way?
--function Player:onMoveItem(item, count, fromPosition, toPosition, fromCylinder, toCylinder)
-- if hasEventCallback(EVENT_CALLBACK_ONMOVEITEM) then
-- return EventCallback(EVENT_CALLBACK_ONMOVEITEM, self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)
-- end
-- return true
--end
function Player:onMoveItem(item, count, fromPosition, toPosition, fromCylinder, toCylinder)
if item.actionid == 9502 then
self:sendCancelMessage('You cannot move this object.')
return false
end
return true
end