silveralol
Advanced OT User
- Joined
- Mar 16, 2010
- Messages
- 1,480
- Solutions
- 9
- Reaction score
- 211
Hi, I need some support with it, well, I want to make possible move only gold to some container, then I use some script onMoveItem...
the behavior at this moment:
1 - if I'm with the container opened as a normal backpack and try move others items I get the message "you can only put....."
2 - if I try move an item to the container closed, just move to the item(container), the item out of the array will be moved to inside of the container :S
seems that the toPosition is diferent in both cases
then I make a VERY GOOD IMAGE (I'M THE KING OF THE PAINT )
now is more easy to understand I guess.
Code:
if toPosition.x == CONTAINER_POSITION then
local containerId = toPosition.y - 64
local container = self:getContainerById(containerId)
if not container then
return true
end
local itemId = container:getId()
if itemId == containerID then
if not isInArray({2148, 2152, 2160}, item.itemid) then
self:sendTextMessage(MESSAGE_STATUS_SMALL, 'You can only put money in the pounch.')
return false
end
end
1 - if I'm with the container opened as a normal backpack and try move others items I get the message "you can only put....."
2 - if I try move an item to the container closed, just move to the item(container), the item out of the array will be moved to inside of the container :S
seems that the toPosition is diferent in both cases
then I make a VERY GOOD IMAGE (I'M THE KING OF THE PAINT )
now is more easy to understand I guess.
Last edited: