I once did a healer which I considered my self smart, it was only for mages though since I don't see how other healers can be smart.
It healed you depending on the option you chose high/normal, where normal was the formula for how much a spell heals you and high was double that value.
I used tibia wikia formulas:
Light Healing
Max healing: (lvl*0.2)+(mlvl*1.795)+11
Min healing: (lvl*0.2)+(mlvl*1.4)+8
The list of what was in it is quite long, but just to give you an idea
It had all the self healing spells in it (light, intense, ultimate) based on formulas and depending on if you set high/low.
Then it also had an inbuild friend list which it healed if capable (checked if you can cast heal friend, if your mppc, hppc is high enough, if not it would mas res if friend in range)
Sadly I don't have this anymore since I deleted everything last time I quit Tibia. I'm considering writing it once again though, when I bot my mages high up enough (1-2 more months)
Why would you need to wait until you bot your mages high enough? Coding stuff like this is easy with a level 30 (has all spells).
You will have a problem on low level mages though, since you will encounter dangerous situations if you rely on those healing conditions.
And if I may add to that, if you rewrite that, use these:
-- Minimum healing
minHealExura == spellinfo('exura').mindmg
-- Average healing
avgHealExura == spellinfo('exura').avgdmg
-- Maximum healing
maxHealExura == spellinfo('exura').maxdmg
Calculates the minimum and maximum healing for a spell based on your character stats.
This could also work for EKs and RPs naturally, even combined with potions (check whether you could better use a healing pot or exura ico based on money spent for example).
The healer you're suggesting shouldn't take more than half an hour to code to be honest.
If you do code it, be sure to add healing all conditions etcetera as well, ain't too hard with a for loop.
If a number of people would be interested in this I could reproduce it for you, but I would seriously consider adding more conditions to prevent low level characters from dying.
Thank you very much for responding borges I did not expect to give close attention to the post, I have a question the Persistent is only to heal? Since it does not give me any error but I won't fill the wells with the strong, I go back and repeat sorry my bad English... use translator
The idea for this type of healer is for high level mages hunting and at war, also didnt know about the .min/maxdmg
Also I'm not a programmer, I only had a basic course of c++ in college. I just do it from time to time for fun, so it might take me more than 30 mins to get it going
@borges
Strong mana potion does not work for druid >= 50 level. I did not change anything, btw I have been using ur such a great scrypt for some days but under lvl 50 ( I meant mana potions only).
Using that SMART healer makes waste k/h lower and exp k/h higher and its much more safe than normal , big difference with drinking mana potions !
bro apology healing is excellent but there is a problem with strong mana potion because not used, the gmp and mp if smp but not used
I rewrite the code... can you test for me?
--Smart Healing by Borges
--Knight Spells and Potions Configuration
local ExuraGranIcoK = 40 -- Percentage to use Exura Gran Ico
local ExuraIcoK = 80 -- Percentage to use Exura Ico
local ManaTrainK = 95 -- Percentage to Mana Train
local ManaTrainSpellK = "utani hur" -- Spell to Mana Train
local UltimateHealthPotionk = 30 -- Percentage to use Ultimate Health Potion
local GreatHealthPotionk = 30 -- Percentage to use Great Health Potion
local StrongHealthPotionk = 30 -- Percentage to use Strong Health Potion
local HealthPotionk = 30 -- Percentage to use Health Potion
local ManaPotionK = 70 -- Percentage to use Mana Potion
--Mage Spells and Potions Configuration
local ExuraVitaM = 40 -- Percentage to use Exura Vita
local ExuraGranM = 70 -- Percentage to use Exura Gran
local ExuraM = 90 -- Percentage to use Exura
local ManaTrainM = 95 -- Percentage to Mana Train
local ManaTrainSpellM = "utani gran hur" -- Spell to Mana Train
local GreatManaPotionM = 70 -- Percentage to use Great Mana Potion
local StrongManaPotionM = 70 -- Percentage to use Strong Mana Potion
local ManaPotionM = 70 -- Percentage to use Mana Potion
--Paladin Spells and Potions Configuration
local ExuraGranSanP = 30 -- Percentage to use Exura Gran San
local ExuraSanP = 50 -- Percentage to use Exura San
local ExuraGranP = 70 -- Percentage to use Exura Gran
local ExuraP = 90 -- Percentage to use Exura
local ManaTrainP = 95 -- Percentage to use Mana Train
local ManaTrainSpellP = "utani hur" -- Spell to Mana Train
local GreatSpiritPotionP = 30 -- Percentage to use Great Spirit Potion
local StrongHealthPotionP = 30 -- Percentage to use Strong Health Potion
local HealthPotionP = 30 -- Percentage to use Health Potion
local StrongManaPotionP = 70 -- Percentage to use Strong Mana Potion
local ManaPotionP = 70 -- Percentage to use Mana Potion
---------------------DO NOT EDIT BELOW---------------------
auto(200,500)
--Spells
if $vocation == "knight" then
if $hppc <= ExuraGranIcoK and cancast("exura gran ico") then
cast("exura gran ico")
elseif $hppc <= ExuraIcoK and cancast("exura ico") then
cast("exura ico")
end
elseif $vocation == "druid" or $vocation == "sorcerer" then
if $hppc <= ExuraVitaM and cancast("exura vita") then
cast("exura vita")
elseif $hppc <= ExuraGranM and cancast("exura gran") then
cast("exura gran")
elseif $hppc <= ExuraM and cancast("exura") then
cast("exura")
end
elseif $vocation == "paladin" then
if $hppc <= ExuraGranSanP and cancast("exura gran san") then
cast("exura gran san")
elseif $hppc <= ExuraSanP and cancast("exura san") then
cast("exura san")
elseif $hppc <= ExuraGranP and cancast("exura gran") then
cast("exura gran")
elseif $hppc <= ExuraP and cancast("exura") then
cast("exura")
end
end
--Potions
if $vocation == "knight" then
if $hppc <= UltimateHealthPotionk and $level >= 130 and itemcount("ultimate health potion") >= 1 then
pausewalking(200,500)
useoncreature("ultimate health potion",$self)
elseif $hppc <= GreatHealthPotionk and $level >= 80 and itemcount("great health potion") >= 1 then
pausewalking(200,500)
useoncreature("great health potion",$self)
elseif $hppc <= StrongHealthPotionk and $level >= 50 and itemcount("strong health potion") >= 1 then
pausewalking(200,500)
useoncreature("strong health potion",$self)
elseif $hppc <= HealthPotionk and itemcount("health potion") >= 1 then
pausewalking(200,500)
useoncreature("health potion",$self)
elseif $mppc <= ManaPotionK and itemcount("mana potion") >= 1 then
pausewalking(200,500)
useoncreature("mana potion",$self)
end
elseif $vocation == "druid" or $vocation == "sorcerer" then
if $mppc <= GreatManaPotionM and $level >= 80 and itemcount("great mana potion") >= 1 then
pausewalking(200,500)
useoncreature("great mana potion",$self)
elseif $mppc <= StrongManaPotionM and $level >= 50 and itemcount("strong mana potion") >= 1 then
pausewalking(200,500)
useoncreature("strong mana potion",$self)
elseif $mppc <= ManaPotionM and itemcount("mana potion") >= 1 then
pausewalking(200,500)
useoncreature("mana potion",$self)
end
elseif $vocation == "paladin"then
if $hppc <= GreatSpiritPotionP and $level >= 80 and itemcount("great spirit potion") >= 1 then
pausewalking(200,500)
useoncreature("great spirit potion",$self)
elseif $hppc <= StrongHealthPotionP and $level >= 50 and itemcount("strong health potion") >= 1 then
pausewalking(200,500)
useoncreature("strong health potion",$self)
elseif $hppc <= HealthPotionP and itemcount("health potion") >= 1 then
pausewalking(200,500)
useoncreature("health potion",$self)
elseif $mppc <= StrongManaPotionP and $level >= 50 and itemcount("strong mana potion") >= 1 then
pausewalking(200,500)
useoncreature("strong mana potion",$self)
elseif $mppc <= ManaPotionP and itemcount("mana potion") >= 1 then
pausewalking(200,500)
useoncreature("mana potion",$self)
end
end
--Mana Trainer
if $vocation == "knight" then
if $mppc >= ManaTrainK and cancast(ManaTrainSpellK) then
cast(ManaTrainSpellK)
end
elseif ($vocation == "druid" or $vocation == "sorcerer") then
if $mppc >= ManaTrainM and cancast(ManaTrainSpellM) then
cast(ManaTrainSpellM)
end
elseif $vocation == "paladin" then
if $mppc >= ManaTrainP and cancast(ManaTrainSpellP) then
cast(ManaTrainSpellP)
end
end
--Food Eater
eatfoodfull()
--Paralyze
if $vocation == "knight" then
if $hppc <= ExuraGranIcoK and $paralyzed and cancast("exura gran ico") then
cast("exura gran ico")
elseif $hppc <= ExuraIcoK and $paralyzed and cancast("exura ico") then
cast("exura ico")
end
elseif ($vocation == "druid" or $vocation == "sorcerer") then
if $hppc <= ExuraVitaM and $paralyzed and cancast("exura vita") then
cast("exura vita")
elseif $hppc <= ExuraGranM and $paralyzed and cancast("exura gran") then
cast("exura gran")
elseif $hppc <= ExuraM and $paralyzed and cancast("exura") then
cast("exura")
end
elseif $vocation == "paladin" then
if $hppc <= ExuraGranSanP and $paralyzed and cancast("exura gran san") then
cast("exura gran san")
elseif $hppc <= ExuraSanP and $paralyzed and cancast("exura san") then
cast("exura san")
elseif $hppc <= ExuraGranP and $paralyzed and cancast("exura gran") then
cast("exura gran")
elseif $hppc <= ExuraP and $paralyzed and cancast("exura") then
cast("exura")
end
end