View Single Post
  #10  
Old 05-03-2012, 12:33 PM
louis1016
Hill Giant
 
Join Date: Dec 2009
Posts: 157
Default

There were no checks for regular heals in the bot hasaggro heal code, I just had to modify the existing code to what I wanted which was this:

Code:
// Evaluate the situation
					if((IsEngaged()) && ((botClass == CLERIC) || (botClass == DRUID) || (botClass == SHAMAN) || (botClass == PALADIN))) {
						if(tar->GetTarget() && tar->GetTarget()->GetHateTop() && tar->GetTarget()->GetHateTop() == tar) {
							hasAggro = true;
						}

						if(hpr < 35) {
							botSpell = GetBestBotSpellForFastHeal(this);
						}
						else if(hpr >= 40 && hpr < 55 && (tar->GetArchetype() != ARCHETYPE_CASTER)) {
							if(GetNumberNeedingHealedInGroup(60, false) >= 3)
								botSpell = GetBestBotSpellForGroupHeal(this);

							if(botSpell.SpellId == 0)
								botSpell = GetBestBotSpellForPercentageHeal(this);
						}
						else if(hpr >= 35 && hpr < 75 && (tar->GetArchetype() == ARCHETYPE_CASTER)) {
							if(GetNumberNeedingHealedInGroup(60, false) >= 3)
								botSpell = GetBestBotSpellForGroupHeal(this);

							if(botSpell.SpellId == 0)
								botSpell = GetBestBotSpellForRegularSingleTargetHeal(this);
						}




						else if(hpr >= 40 && hpr < 55 && (tar->GetArchetype() != ARCHETYPE_CASTER)) {
							if(GetNumberNeedingHealedInGroup(80, false) >= 3)
								botSpell = GetBestBotSpellForGroupHealOverTime(this);

							if(hasAggro)
								botSpell = GetBestBotSpellForPercentageHeal(this);
						}
						else {
							if(!tar->FindType(SE_HealOverTime))
								botSpell = GetBestBotSpellForHealOverTime(this);
						}
					}
Than I realized that no matter what, bots were bealing healed up to a minimum 95% that wasnt reflected in what I modified. This was due to the hp checks at the beginning of the heal code looking to see if anyone was below 95% or if the bot owner has below 95%. This was overwriting all of my values so I changed that to my values that I wanted as well.

Besides the archetypes that i added checks for I also added checks here to reflect the change in clerics behavior as he hits level 39 and gets cheal. (39 on my server I dont remember if thats the stock peq CHeal level). I need to change the target checks for levels to a botlevel check instead to account for different level bots in our group if we ever get there. (just noticed after posting)


Code:
if(hpr < 75 && (tar->GetArchetype() == ARCHETYPE_CASTER) || (hpr < 55 && (tar->GetArchetype() != ARCHETYPE_CASTER) && (tar->GetLevel() >= 39)) || (hpr < 75 && (tar->GetArchetype() != ARCHETYPE_CASTER) && (tar->GetLevel() < 39)) || (botClass == BARD)) {
					if(tar->GetClass() == NECROMANCER) {
						// Give necromancers a chance to go lifetap something or cleric can spend too much mana on a necro
						if(hpr >= 40) {
							break;
						}
					}
The result is my cleric CHeals only when melees and hybrids are below 55%, casts regular heals on casters when they are below 75. Working pretty smoothly so far.


I also did modifications to the hpr levels in the check for heals out of combat. Just had to add some archetype checks and modify the existing hpr values.
Reply With Quote