hello, can someone help me put exhausted the ssa and might ring?
I already tested in /data/events/scripts/player.lua and it doesn't work
I already tested in /data/events/scripts/player.lua and it doesn't work
Lua:
-- SSA exhaust
local exhaust = { }
if toPosition.x == CONTAINER_POSITION and toPosition.y == CONST_SLOT_NECKLACE
and item:getId() == ITEM_STONE_SKIN_AMULET then
local pid = self:getId()
if exhaust[pid] then
self:sendCancelMessage(RETURNVALUE_YOUAREEXHAUSTED)
return false
else
exhaust[pid] = true
addEvent(function() exhaust[pid] = false end, 2000, pid)
return true
end
end