Hokku
Member
Im trying to implement exhaustion to put on some items like rings and amulets, tried Red's scripts and this one:
seems no ones working, im using TFS 1.1! someone?
Code:
local SSAdelay = 2 -- seconds
function Player:onMoveItem(item, count, fromPosition, toPosition)
local tile = toPosition:getTile()
if tile then
local thing = tile:getItemByType(ITEM_TYPE_TELEPORT)
if thing ~= nil then
self:sendCancelMessage("Sorry, not possible.")
self:getPosition():sendMagicEffect(CONST_ME_POFF)
return false
end
end
if item:getId() == 2197 then
if toPosition.y == CONST_SLOT_NECKLACE then
if os.time() > self:getStorageValue(500000) then
self:setStorageValue(500000, os.time() + SSAdelay)
else
self:sendCancelMessage("Sorry, not possible.")
return false
end
end
end
if isInArray({1714, 1715, 1716, 1717, 1738, 1740, 1741, 1747, 1748, 1749}, item.itemid) and item.actionid > 0 then
self:sendCancelMessage('You cannot move this object.')
self:getPosition():sendMagicEffect(CONST_ME_POFF)
return false
end
return true
end
seems no ones working, im using TFS 1.1! someone?