T
Tibia Demon
Guest
How can I make an item with actionID unpickupable to both slot and container?
return false
on event player:onMoveItem
(data/events/player.lua) when item:getActionId() == yourActionId
Additionally, make sure the player can't trade the item with another player.Working I only had to move it under the function.
I had it in bottom of the function.
if I remember correctly, it was patched already, though testing that won't hurtAdditionally, make sure the player can't trade the item with another player.
and if the item has a 'use with' option, make sure that the player can't 'use with' something in the distance, that forces the player to walk over to the item, have the server pick it up into their inventory, then walk to whatever distant location to attempt to use the item.
ah nice. xPif I remember correctly, it was patched already, though testing that won't hurt
Additionally, make sure the player can't trade the item with another player.
and if the item has a 'use with' option, make sure that the player can't 'use with' something in the distance, that forces the player to walk over to the item, have the server pick it up into their inventory, then walk to whatever distant location to attempt to use the item.
I had to add it to Playerif I remember correctly, it was patched already, though testing that won't hurt
function Player:onTradeRequest(target, item)
if item:getActionId() == BLOCK_ITEM_WITH_ACTION then
self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
return false
end
Its to block items with specified aid.What this commits supposed to do? If its to avoid trading items with actionID then it doesn't work
Because I can trade items that has actionID without any restrictions unless I added this to player.lua
LUA:function Player:onTradeRequest(target, item) if item:getActionId() == BLOCK_ITEM_WITH_ACTION then self:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE) return false end
What this commits supposed to do?