Smart Healing (ALL Vocations, ALL Spells, ALL Potions and much more)
Boring to set Spells and Potions in your Scripts?
Just Create a Persistent with action below and ENABLE!
Feel free to change any value.
Here we go!
--Smart Healing by Borges
--Knight Spells and Potions Configuration
local UturaGranK = true -- Use Utura Gran? set true or false
local UturaK = false -- Use Utura? set true or false
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 = "exura vita" -- 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 UturaGranP = true -- Use Utura Gran? set true or false
local UturaP = false -- Use Utura? set true or false
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
if not $strenghtened and $vocation == 'knight' and $hppc <= 95 then
if UturaGranK then
cast("utura gran")
elseif UturaK then
cast("utura")
end
end
if not $strenghtened and $vocation == 'paladin' and $hppc <= 95 then
if UturaGranP then
cast("utura gran")
elseif UturaP then
cast("utura")
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 $paralyzed 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 $paralyzed 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 $paralyzed then
cast("exura")
end
end
11-07-2014, 03:39 AM
Sajean
Good code, ^^.
11-11-2014, 11:21 PM
osiris ra
@borges maybe you should add pausewalking(1000) when is using potions, because if the char is running can't use the potion and the char can't walk fine.
look the picture is what appears to me when I put it , some solution
are you online in tibia?
you put user options and persistent?
01-15-2015, 01:42 PM
Borges
Code:
Update 1.0.4
Changed UserOption
Added Ant Paralyze
01-15-2015, 09:18 PM
strahowski
What's the "smart" part of this? Looks like a regular and unessecarily heavy action to me.
01-15-2015, 11:04 PM
Heronas
Quote:
Originally Posted by strahowski
What's the "smart" part of this? Looks like a regular and unessecarily heavy action to me.
Strahowski has a point there, I would sort them on vocation first and then put them in larger if statements, like that you won't have to iterature through all the statements that are virtually the same.
And about the paralyzed part, don't do that. Just make a single paralyse condition with 'exura infir' and put it lower than your heal statements.
That way it will never interfere if hp is low but will heal paralyse with a cheap spell if you hp if above exura hppc.
01-16-2015, 12:56 PM
Borges
Quote:
Originally Posted by strahowski
What's the "smart" part of this? Looks like a regular and unessecarily heavy action to me.
1º you don't need set spells for each vocation, action do this.
2º you don't need set mana trainer
3º you don't need add other action for food eater
4º ant paralize is based in your life, f.e: wont try to cast exura with 10% HP, will cast exura vita
5º cast spell and potions more fast than usual.
6º just put action in persistent and enable
01-16-2015, 03:10 PM
strahowski
That's NOT smart. This is just a set of if statements, smart healing would take damage taken in last 1 (maybe 2) seconds and base healing on that, i'd say.
01-18-2015, 07:29 PM
Heronas
Quote:
Originally Posted by strahowski
That's NOT smart. This is just a set of if statements, smart healing would take damage taken in last 1 (maybe 2) seconds and base healing on that, i'd say.
If you want that, just set it to auto(1000), chances are you might be dead though.
Even if you would enhance that to start healing at 500 damage for example (near death or w/e) it would still be easy to do and there would be no good purpose in my opinion.
Still I think this should be done with for loops to decrease script length, however it might actually run faster with general if statements, never tested.
01-22-2015, 04:33 PM
Ayrton Sales
Doesn't use smp on a paladin > 80
01-22-2015, 05:15 PM
Borges
Quote:
Originally Posted by Ayrton Sales
Doesn't use smp on a paladin > 80
Thanks for report, script updated...
01-22-2015, 06:58 PM
Connor
Quote:
Originally Posted by strahowski
That's NOT smart. This is just a set of if statements, smart healing would take damage taken in last 1 (maybe 2) seconds and base healing on that, i'd say.
True, this isn't smart at all
01-23-2015, 09:04 AM
Heronas
Quote:
Originally Posted by Connor
True, this isn't smart at all
While I agree on this, what would you consider smart healing?
Healing based on damage bursts?
Changing heal percentages based on monsters around you?
More randomised healing to be less bot like (and more prone to dying)?
Define smart.
I think he did a good job on this, it uses pretty much every healing method available, but it's not really easy to setup, unless his standard settings somehow work for you.
Admittedly, I wouldn't code this with a billion if statements, because it makes the script extremely long, but it's not a bad way to do it.
01-23-2015, 11:18 AM
lfpg
Hello friends first hope that they excuse me "Rookie" for already a week I went back to play tibia from 8.6 and I am putting me a day with this bot, this time entoy trying to put the smart healing of borges and sincerely not is that work me, the only thing I did was to load the persistent waiting for it work but I see that I need to put something and well that is why I appeal to you to aid. Sorry for my bad English is not my native language
01-23-2015, 11:36 AM
Borges
Quote:
Originally Posted by lfpg
Hello friends first hope that they excuse me "Rookie" for already a week I went back to play tibia from 8.6 and I am putting me a day with this bot, this time entoy trying to put the smart healing of borges and sincerely not is that work me, the only thing I did was to load the persistent waiting for it work but I see that I need to put something and well that is why I appeal to you to aid. Sorry for my bad English is not my native language
Just add this persistent and enable, I think this configuration is fine for all vocations, but if you want change some % of healing ofc you can.
--[[Smart Healing by Borges version 1.0.5]]--
--[[Healing Spells]]--
local ExuraGranIco = 35 -- Percentage to Cast Exura Gran Ico
local ExuraGranSan = 35 -- Percentage to Cast Exura Gran San
local ExuraSan = 50 -- Percentage to Cast Exura San
local ExuraVita = 50 -- Percentage to Cast Exura Vita
local ExuraGran = 70 -- Percentage to Cast Exura Gran
local Exura = 90 -- Percentage to Cast Exura
local ExuraIco = 90 -- Percentage to Cast Exura Ico
local UturaGran = 95 -- Percentage to Cast Utura Gran
local Utura = 95 -- Percentage to Cast Utura
local train1 = 97 -- Percentage to Cast Mana Trainer
local train = 'Utani Hur' -- Spell for Mana Trainer
--[[Health Potions]]--
local GSP = 30 -- Percentage to use Great Spirit Potion
local UHP = 30 -- Percentage to use Ultimate Health Potion
local GHP = 30 -- Percentage to use Great Health Potion
local SHP = 30 -- Percentage to use Strong Health Potion
local HP = 30 -- Percentage to use Health Potion
local SmallHP = 30 -- Percentage to use Small Health Potion
--[[Mana Potions]]--
local MaxGMP = 70 -- Percentage to use Great Mana Potion without monsters on screen
local MaxSMP = 70 -- Percentage to use Strong Mana Potion without monsters on screen
local MaxMP = 70 -- Percentage to use Mana Potion without monsters on screen
local MinGMP = 30 -- Percentage to use Great Mana Potion with monsters on screen
local MinSMP = 30 -- Percentage to use Strong Mana Potion with monsters on screen
local MinMP = 30 -- Percentage to use Mana Potion with monsters on screen
--[[DO NOT CHANGE BELOW]]--
auto(1)
if $hppc <= UHP and $vocation == 'knight' and itemcount('Ultimate Health Potion') >= 1 and $level >= 130 then
pausewalking(500)
useoncreature('Ultimate Health Potion',$self)
pausewalking(0)
wait(200,500)
end
if $hppc <= GSP and $vocation == 'paladin' and itemcount('Great Spirit Potion') >= 1 and $level >= 80 then
pausewalking(500)
useoncreature('Great Spirit Potion',$self)
pausewalking(0)
wait(200,500)
end
if $hppc <= GHP and $vocation == 'knight' and itemcount('Great Health Potion') >= 1 and $level >= 80 then
pausewalking(500)
useoncreature('Great Health Potion',$self)
pausewalking(0)
wait(200,500)
end
if $hppc <= SHP and ($vocation == 'knight' or $vocation == 'paladin') and itemcount('Strong Health Potion') >= 1 and $level >= 50 then
pausewalking(500)
useoncreature('Strong Health Potion',$self)
pausewalking(0)
wait(200,500)
end
if $hppc <= HP and itemcount('Health Potion') >= 1 then
pausewalking(500)
useoncreature('Health Potion',$self)
pausewalking(0)
wait(200,500)
end
if $hppc <= SmallHP and itemcount('Small Health Potion') >= 1 then
pausewalking(500)
useoncreature('Small Health Potion',$self)
pausewalking(0)
wait(200,500)
end
if $mppc <= MinGMP and ($vocation == 'druid' or $vocation == 'sorcerer') and itemcount('Great Mana Potion') >= 1 and $level >= 80 and maround() ~= 0 then
pausewalking(500)
useoncreature('Great Mana Potion',$self)
pausewalking(0)
wait(200,500)
elseif $mppc <= MaxGMP and ($vocation == 'druid' or $vocation == 'sorcerer') and itemcount('Great Mana Potion') >= 1 and $level >= 80 and maround() == 0 then
pausewalking(500)
useoncreature('Great Mana Potion',$self)
pausewalking(0)
wait(200,500)
end
if $mppc <= MinSMP and ($vocation == 'Druid' or $vocation == 'Sorcerer' or $vocation == 'Paladin') and itemcount('Strong Mana Potion') >= 1 and $level >= 50 and maround() ~= 0 then
pausewalking(500)
useoncreature('Strong Mana Potion',$self)
pausewalking(0)
wait(200,500)
elseif $mppc <= MaxSMP and ($vocation == 'Druid' or $vocation == 'Sorcerer' or $vocation == 'Paladin') and itemcount('Strong Mana Potion') >= 1 and $level >= 50 and maround() == 0 then
pausewalking(500)
useoncreature('Strong Mana Potion',$self)
pausewalking(0)
wait(200,500)
end
if $mppc <= MinMP and itemcount('Mana Potion') >= 1 and maround() ~= 0 then
pausewalking(500)
useoncreature('Mana Potion',$self)
pausewalking(0)
wait(200,500)
elseif $mppc <= MaxMP and itemcount('Mana Potion') >= 1 and maround() == 0 then
pausewalking(500)
useoncreature('Mana Potion',$self)
pausewalking(0)
wait(200,500)
end
if $hppc <= UturaGran then
if ($vocation == 'knight' or $vocation == 'paladin') and cooldown('utura gran') == 0 and $mp >= 165 and $level >= 100 and cancast('Utura Gran') then
cast('utura gran')
wait(200,500)
end
end
if $hppc <= Utura then
if ($vocation == 'knight' or $vocation == 'paladin') and cooldown('utura') == 0 and $mp >= 75 and $level >= 50 and cancast('utura') then
cast('utura')
wait(200,500)
end
end
if $hppc <= ExuraGranSan then
if ($vocation == 'paladin') and cooldown('exura gran san') == 0 and $mp >= 210 and $level >= 60 and cancast('exura gran san') then
cast('exura gran san')
wait(200,500)
end
end
if $hppc <= ExuraGranIco then
if ($vocation == 'knight') and cooldown ('exura gran ico') and $mp >= 200 and $level >= 80 and cancast('exura gran ico') then
cast('exura gran ico')
wait(200,500)
end
end
if $hppc <= ExuraVita then
if ($vocation == 'sorcerer' or $vocation == 'druid') and cooldown('exura vita') == 0 and $mp >= 160 and $level >= 30 and cancast('exura vita') then
cast('exura vita')
wait(200,500)
end
end
if $hppc <= ExuraSan then
if ($vocation == 'paladin') and cooldown('exura san') == 0 and $mp >= 160 and $level >= 35 and cancast('exura san') then
cast('exura san')
wait(200,500)
end
end
if $hppc <= ExuraGran then
if ($vocation == 'sorcerer' or $vocation == 'druid' or $vocation == 'paladin') and cooldown('exura gran') == 0 and $mp >= 70 and $level >= 20 and cancast('exura gran')then
cast('exura gran')
wait(200,500)
end
end
if $hppc <= Exura then
if ($vocation == 'sorcerer' or $vocation == 'druid' or $vocation == 'paladin') and cooldown('exura') == 0 and $mp >= 20 and $level >= 8 and cancast('exura')then
cast('exura')
wait(200,500)
end
end
if $hppc <= ExuraIco then
if $vocation == 'knight' and cooldown('exura ico') == 0 and $mp >= 40 and $level >= 8 then
cast('exura ico')
wait(200,500)
end
end
eatfoodfull()
if $mppc >= train1 and cooldown(train) == 0 then
cast(train)
wait(200,500)
end
if $hppc <= ExuraGranSan and $paralyzed then
if ($vocation == 'paladin') and cooldown('exura gran san') == 0 and $mp >= 210 and $level >= 60 and cancast('exura gran san') then
cast('exura gran san')
wait(200,500)
end
end
if $hppc <= ExuraGranIco and $paralyzed then
if ($vocation == 'knight') and cooldown ('exura gran ico') and $mp >= 200 and $level >= 80 and cancast('exura gran ico') then
cast('exura gran ico')
wait(200,500)
end
end
if $hppc <= ExuraVita and $paralyzed then
if ($vocation == 'sorcerer' or $vocation == 'druid') and cooldown('exura vita') == 0 and $mp >= 160 and $level >= 30 and cancast('exura vita') then
cast('exura vita')
wait(200,500)
end
end
if $hppc <= ExuraSan and $paralyzed then
if ($vocation == 'paladin') and cooldown('exura san') == 0 and $mp >= 160 and $level >= 35 and cancast('exura san') then
cast('exura san')
wait(200,500)
end
end
if $hppc <= ExuraGran and $paralyzed then
if ($vocation == 'sorcerer' or $vocation == 'druid' or $vocation == 'paladin') and cooldown('exura gran') == 0 and $mp >= 70 and $level >= 20 and cancast('exura gran')then
cast('exura gran')
wait(200,500)
end
end
if $hppc <= Exura and $paralyzed then
if ($vocation == 'sorcerer' or $vocation == 'druid' or $vocation == 'paladin') and cooldown('exura') == 0 and $mp >= 20 and $level >= 8 and cancast('exura')then
cast('exura')
wait(200,500)
end
end
if $hppc <= ExuraIco and $paralyzed then
if $vocation == 'knight' and cooldown('exura ico') == 0 and $mp >= 40 and $level >= 8 then
cast('exura ico')
wait(200,500)
end
end
01-23-2015, 11:45 AM
lfpg
friend thanks for replying, I get this error
Persistent error in script heal:
** ["if $ HPPC <= UHP and $ vocation == 'knight' and ..."]: heal: 71: 'then' expected near '50'
01-23-2015, 11:58 AM
Borges
Quote:
Originally Posted by lfpg
friend thanks for replying, I get this error
Persistent error in script heal:
** ["if $ HPPC <= UHP and $ vocation == 'knight' and ..."]: heal: 71: 'then' expected near '50'
Thanks for report, Fixed...
Copy Again and Sorry.
01-23-2015, 01:25 PM
Connor
Quote:
Originally Posted by Heronas
While I agree on this, what would you consider smart healing?
Healing based on damage bursts?
Changing heal percentages based on monsters around you?
More randomised healing to be less bot like (and more prone to dying)?
Define smart.
I think he did a good job on this, it uses pretty much every healing method available, but it's not really easy to setup, unless his standard settings somehow work for you.
Admittedly, I wouldn't code this with a billion if statements, because it makes the script extremely long, but it's not a bad way to do it.
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)
01-23-2015, 06:40 PM
Heronas
Quote:
Originally Posted by Connor
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:
-- 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.
01-23-2015, 10:49 PM
lfpg
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
01-24-2015, 01:58 AM
Borges
Quote:
Originally Posted by lfpg
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
Spell Healing, Potions Healling, Mana Trainer, Food Eater and Ant Paralyze
01-24-2015, 10:49 AM
Connor
Quote:
Originally Posted by Heronas
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:
-- 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.
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
01-31-2015, 06:10 PM
lolotrolo
@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 !
01-31-2015, 06:18 PM
Borges
Quote:
Originally Posted by lolotrolo
@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 !
already fixed this in version 1.0.5...
please copy action again at first post...
Thanks for report and cool hear that you like it ;)
02-26-2015, 11:56 AM
hiltonstyle
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
02-26-2015, 03:18 PM
Borges
Quote:
Originally Posted by hiltonstyle
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
02-26-2015, 09:52 PM
hiltonstyle
Excellent brother! works perfectly , thank you very much well-deserved reputation +1 !
02-26-2015, 10:36 PM
Borges
Quote:
Originally Posted by hiltonstyle
Excellent brother! works perfectly , thank you very much well-deserved reputation +1 !
Thanks dude
Script Updated
Code:
little problem with ant paralyze
03-16-2015, 10:22 PM
mickysz
Good :D
Thanks bro
04-06-2015, 06:24 PM
Cmterio
Wow, woks perfectly here. ;)
But missing one thing, Utura, and Utura Gran.
04-06-2015, 07:24 PM
Borges
Quote:
Originally Posted by Cmterio
Wow, woks perfectly here. ;)
But missing one thing, Utura, and Utura Gran.
Script Updated... can you test for me?
04-06-2015, 09:25 PM
Jspence
great work bro
04-07-2015, 12:17 AM
Borges
Quote:
Originally Posted by Jspence
great work bro
Thanks Dude!
04-18-2015, 06:42 PM
dayday
it keeps telling me there a error in the code idk what to do this is my first time using this bot
05-11-2015, 08:08 PM
Jesseh
Great script!
I need only a little help on setting 2 additional features on this.
1. How to use a "between 70-85% hp" like bot core healing?
2. I don't want to cast the correct spell every time. Example: If I have 80% of health as a paladin, I want to have, let's say, 75% of chance of casting "exura gran" and 25% of chance of casting "exura san". Maybe it's something that CIP will never check for, maybe too much worrying, but, if it isn't very hard to code, why not? =)
Thanks!
02-09-2016, 03:43 PM
Voltzin
@Borges
Sorry to bother you with an old thread. But for some players, using potions while keeping distance can screw the things. I mean, i saw that you have pausewalking before using potions on a mage. Lets imagine that I'm a hl mage hunting in hardcore mode. I can not move until i have more than 70% of mana. I think that you could add some range and a check for monsters. Something like, if no monsters in the screen, use potion until 80%. If have monsters in the screen, only use potion if mana goes below something like 30~40%. This way the bot can keep the distance, killing the monsters without using potions, and using potions when there is no danger.