Joriku
Working in the mines, need something?
This took me a few hours to get right, thanks to Zibizu that helped me out with a few details inside such as type("equip") and deEquip. Saved me an extra hour.
Also: thanks to Relke for the buff gif
So this script works as following gif's down below describes:
Active & non-active
Also: This requires you to change the effect or add in an custom effect.
Also: thanks to Relke for the buff gif
So this script works as following gif's down below describes:
Active & non-active
Also: This requires you to change the effect or add in an custom effect.
Lua:
local moveevent = MoveEvent()
local moveevent1 = MoveEvent()
local pos = getPlayerPosition(cid)
local effectItem = 7697
function moveevent.onEquip(player, item, slot, isCheck)
for _, player in ipairs(Game.getPlayers()) do
local ring = player:getSlotItem(CONST_SLOT_RING)
if ring and ring:getId() == effectItem then
player:getPosition():sendMagicEffect(234) -- sends effect 234
end
end
return true
end
function moveevent1.onDeEquip(player, item, slot, isCheck)
player:getPosition():sendMagicEffect(235) -- sends effect 235
return true
end
moveevent:type("equip")
moveevent:id(effectItem)
moveevent:register()
moveevent1:type("deEquip")
moveevent1:id(effectItem)
moveevent1:register()