Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bots

Development::Bots Forum for bots.

Reply
 
Thread Tools Display Modes
  #1  
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
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:51 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3