Just a general all purpose healer, works on every vocation and uses every spell, most of the potions (excluded spirit potions, could add them if desired).
Also fills up mana after kills and cures conditions (possible to toggle)
-- Healer
init start
-- Local Script Version: 1.0.1
-- Made by Heronas
-- Healing spells and potions
local strongHeal = 40
local mediumHeal = 65
local smallHeal = 90
local healPercent = {strongHeal, mediumHeal, smallHeal}
local healGroup = {
{'exura sio', 'exura vita', 'exura gran san', 'exura gran ico', 'ultimate health potion', 'great health potion'},
{'exura gran', 'exura san', 'strong health potion', 'health potion'},
{'exura', 'exura ico'},
}
-- Mana potions
local manaPercent = 80 -- After killing monsters
local lowManaPercent = 20 -- While killing monsters
local manaHeal = {'great mana potion', 'strong mana potion', 'mana potion'}
-- Conditions
local useConditionHeal = true -- set to true to cure conditions
local conditionHeal = {
{spell = 'exura infir'}, -- Paralyzed
{spell = 'exura infir ico'}, -- Paralyzed knights
{spell = 'exana pox', healDamage = 8}, -- Poisoned
{spell = 'exana flam', healDamage = 8}, -- Burning
{spell = 'exana vis', healDamage = 20}, -- Electrified
{spell = 'exana kor', healDamage = 8}, -- Bleeding
}
init end
auto(50)
for i,j in pairs(healPercent) do
if $hppc < j then
for _,k in pairs(healGroup[i]) do
if cancastspell(k) then
if k == healFriend then
cast(k .. ' "' .. $self.name)
elseif spellinfo(k).itemID ~= 0 and itemcount(k) ~= 0 then
pausewalking(500)
useoncreature(k, $self)
else
cast(k)
end
wait(300, 500)
break
end
end
end
end
if useConditionHeal then
status = {$paralyzed, $paralyzed, $poisoned, $burning, $electrified, $cursed, $bleeding}
statusDamage = {0, 0, $poisondmg, $firedmg, $energydmg, $deathdmg, $bleedingdmg}
for i,_ in pairs(conditionHeal) do
local condition = conditionHeal[i]
if status[i] and (condition.healDamage == nil or statusDamage[i] >= condition.healDamage) and cancastspell(condition.spell) then
cast(condition.spell)
wait(300, 500)
break
end
end
end
if $mppc < manaPercent and $attacked.id == 0 or $mppc < lowManaPercent then
for _,i in pairs(manaHeal) do
if itemcount(i) ~= 0 and cancastspell(i) then
pausewalking(500)
useoncreature(i, $self)
wait(300, 500)
break
end
end
end
Fills up mana to X percent after all monsters are killed or if your mana drops below Y percent.
If you need some specific healing conditions feel free to ask.
Code:Version: 1.0.1 - Complete rewrite, added exura sio on self for druids Version: 1.0.0 - First release