init start
local ring = 'sword ring' --ring name
local conditionhp = false -- true or false, equip ring if is bellow *hp* percent
local hp = 50 --*hp* percent
local conditionwpt = true --true or false, equip ring in only one *waypointsection*
local wptsec = 'Hunt' --*wptsection* name
local conditionmp = false -- true or false, equip ring if is bellow *mana* percent
local mp = 30 --*mana* percent
init end
----DON'T EDIT BELLOW-----
auto(200)
if conditionhp then
if conditionwpt then
if conditionmp then
if $hppc < hp and $wptsection == wptsec and $mppc < mp and itemcount(ring) > 0 then
keyevent(clientitemhotkey(ring, "equip"))
elseif ($hppc > hp or $wptsection ~= wptsec or $mppc > mp) and $finger.id ~= 0 then
keyevent(clientitemhotkey($finger.id, "equip"))
end
elseif $hppc < hp and $wptsection == wptsec and itemcount(ring) > 0 then
keyevent(clientitemhotkey(ring, "equip"))
elseif ($hppc > hp or $wptsection ~= wptsec) and $finger.id ~= 0 then
keyevent(clientitemhotkey($finger.id, "equip"))
end
elseif $hppc < hp and itemcount(ring) > 0 then
keyevent(clientitemhotkey(ring, "equip"))
elseif $hppc > hp and $finger.id ~= 0 then
keyevent(clientitemhotkey($finger.id, "equip"))
end
elseif conditionwpt then
if conditionmp then
if $mppc < mp and $wptsection == wptsec and itemcount(ring) > 0 then
keyevent(clientitemhotkey(ring, "equip"))
elseif ($mppc > mp or $wptsection ~= wptsec) and $finger.id ~= 0 then
keyevent(clientitemhotkey($finger.id, "equip"))
end
elseif $wptsection == wptsec and itemcount(ring) > 0 then
keyevent(clientitemhotkey(ring, "equip"))
elseif $wptsection ~= wptsec and $finger.id ~= 0 then
keyevent(clientitemhotkey($finger.id, "equip"))
end
elseif conditionmp then
if $mppc < mp and itemcount(ring) > 0 then
keyevent(clientitemhotkey(ring, "equip"))
elseif $mppc > mp and $finger.id ~= 0 then
keyevent(clientitemhotkey($finger.id, "equip"))
end
end
You need to set 2 hotkeys in tibia client:
1- ring => equip
2- equiped ring => equip (just set another hotkey to ring when it is equiped for unequip it)
enjoy and SORRY for bad english