Hello,
I need: when equipping "x" sword for example with actionid "9191" obtain
I Have this: in event / script / Player function PlayernMoveItem(item, count, fromPosition, toPosition, fromCylinder, toCylinder)
The problem is:
when I move item to the floor and there is something the storage is changed, and the sword is still equipped
PD: Sry my english.
I need: when equipping "x" sword for example with actionid "9191" obtain
Code:
self: setStorageValue (8345, 1)
I Have this: in event / script / Player function PlayernMoveItem(item, count, fromPosition, toPosition, fromCylinder, toCylinder)
Code:
if item:getActionId() == 9191 and self:getStorageValue(8345) == -1 then
if toPosition.y == 6 then
self:setStorageValue(8345, 1)
return true
end
end
if item:getActionId() == 9191 and self:getStorageValue(8345) == 1 then
if toPosition.x ~= CONTAINER_POSITION or toPosition.y == CONST_SLOT_BACKPACK then
self:setStorageValue(8345, -1)
return true
end
end
The problem is:
when I move item to the floor and there is something the storage is changed, and the sword is still equipped
PD: Sry my english.
Last edited: