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

Development::Bots Forum for bots.

Reply
 
Thread Tools Display Modes
  #1  
Old 11-30-2012, 12:08 AM
CruelCahal
Fire Beetle
 
Join Date: Sep 2011
Posts: 26
Default Healer Bots hate necros

Why wont any healer bots heal necro players past ~40%-45% hps?
No matter which stance you set your bots to, they will only heal your necro chars if their health falls below ~45% and then, they just ignore you. If your necro char is no longer taking damage in battle or if battle is already over, you will be left to heal yourself by whatever means you can try to come up with.
Only using "#bot healrotation start" repeatedly with your necro char set as the target will make healer bots heal your char beyond 47% health. OF course, you have to create a new rotation every time you zone, which is annoying.

Other spells, such as buffs, as cast on your necro chars without any problem, only getting heals is the issue.
Reply With Quote
  #2  
Old 11-30-2012, 12:22 AM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

necros have tap spells to heal themselves and the bot spellcasting ai is coded to take that into account so as to not waste mana, especially since necros also have mana conversion spells that could possibly keep them below 100% health consistently.
Reply With Quote
  #3  
Old 11-30-2012, 12:36 AM
WkimWes
Sarnak
 
Join Date: Dec 2009
Posts: 42
Default

Wear regen equipment.
Reply With Quote
  #4  
Old 11-30-2012, 02:20 AM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

You could try compiling with this
Code:
// Target Heal
	if ((!strcasecmp(sep->arg[1], "targheal")) && (c->IsGrouped())) {
		Mob *target = c->GetTarget();
		if(target == NULL)
		{
			c->Message(15, "You must select a target");
			return;
		}
		int32 DBtype = c->GetTarget()->GetBodyType();
		Mob *TargHealer;
		int32 TargHealerClass = 0;
		Group *g = c->GetGroup();
		if(g) {
			for(int i=0; i<MAX_GROUP_MEMBERS; i++){
				if(g->members[i] && g->members[i]->IsBot()) {
					switch(g->members[i]->GetClass()) {
						case CLERIC:
							TargHealer = g->members[i];
							TargHealerClass = CLERIC;
							break;
						case DRUID:
							if (TargHealerClass != CLERIC){
								TargHealer = g->members[i];
								TargHealerClass = DRUID;
							}
							break;
						case SHAMAN:
							if (TargHealerClass == 0){
								TargHealer = g->members[i];
								TargHealerClass = SHAMAN;
							}
							break;
						case PALADIN:
							if (TargHealerClass == 0){
								TargHealer = g->members[i];
								TargHealerClass = PALADIN;
							}
							break;
						case RANGER:
							if (TargHealerClass == 0){
								TargHealer = g->members[i];
								TargHealerClass = RANGER;
							}
							break;
						case BEASTLORD:
							if (TargHealerClass == 0){
								TargHealer = g->members[i];
								TargHealerClass = BEASTLORD;
							}
							break;
						default:
							break;
					}
				}
			}
			switch(TargHealerClass) {

					case CLERIC:
						TargHealer->InterruptSpell();

					if      ((c->GetLevel() >= 1) && (c->GetLevel() <= 4)) {
						TargHealer->Say("Casting Minor Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(200, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 4) && (c->GetLevel() <= 9)) {
						TargHealer->Say("Casting Light Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(17, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 10) && (c->GetLevel() <= 19)) {
						TargHealer->Say("Casting Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(12, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 20) && (c->GetLevel() <= 29)) {
						TargHealer->Say("Casting Greater Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(15, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 30) && (c->GetLevel() <= 38)) {
						TargHealer->Say("Casting Superior Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(9, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 39) && (c->GetLevel() <= 255)) {
						TargHealer->Say("Casting Complete Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(13, target->GetID(), 1, -1, -1);
					}
					break;

				case DRUID:
					TargHealer->InterruptSpell();
					if      ((c->GetLevel() >= 1) && (c->GetLevel() <= 8)) {
						TargHealer->Say("Casting Minor Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(200, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 9) && (c->GetLevel() <= 18)) {
						TargHealer->Say("Casting Light Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(17, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 19) && (c->GetLevel() <= 28)) {
						TargHealer->Say("Casting Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(12, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 29) && (c->GetLevel() <= 43)) {
						TargHealer->Say("Casting Greater Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(15, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 44) && (c->GetLevel() <= 50)) {
						TargHealer->Say("Casting Healing Water on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(3834, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 51) && (c->GetLevel() <= 54)) {
						TargHealer->Say("Casting Superior Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(9, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 55) && (c->GetLevel() <= 59)) {
						TargHealer->Say("Casting Chloroblast on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(1290, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 60) && (c->GetLevel() <= 62)) {
						TargHealer->Say("Casting Nature's Touch on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(1291, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 63) && (c->GetLevel() <= 65)) {
						TargHealer->Say("Casting Nature's Infusion on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(3443, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 66) && (c->GetLevel() <= 67)) {
						TargHealer->Say("Casting Sylvan Infusion on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(4883, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 68) && (c->GetLevel() <= 69)) {
						TargHealer->Say("Casting Chlorotrope on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(5355, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 70) && (c->GetLevel() <= 255)) {
						TargHealer->Say("Casting Ancient: Chlorobon on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(6141, target->GetID(), 1, -1, -1);
					}
					break;

				case SHAMAN:
					TargHealer->InterruptSpell();
					if      ((c->GetLevel() >= 1) && (c->GetLevel() <= 8)) {
						TargHealer->Say("Casting Minor Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(200, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 9) && (c->GetLevel() <= 18)) {
						TargHealer->Say("Casting Light Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(17, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 19) && (c->GetLevel() <= 28)) {
						TargHealer->Say("Casting Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(12, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 29) && (c->GetLevel() <= 50)) {
						TargHealer->Say("Casting Greater Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(15, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 51) && (c->GetLevel() <= 54)) {
						TargHealer->Say("Casting Superior Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(9, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 55) && (c->GetLevel() <= 61)) {
						TargHealer->Say("Casting Chloroblast on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(1290, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 62) && (c->GetLevel() <= 64)) {
						TargHealer->Say("Casting Tnarg's Mending on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(3233, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 65) && (c->GetLevel() <= 67)) {
						TargHealer->Say("Casting Daluda's Mending on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(4901, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 68) && (c->GetLevel() <= 69)) {
						TargHealer->Say("Casting Yoppa's Mending on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(5395, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 70) && (c->GetLevel() <= 255)) {
						TargHealer->Say("Casting Ancient: Wilslik's Mending on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(6142, target->GetID(), 1, -1, -1);
					}
					break;

					case PALADIN:
						TargHealer->InterruptSpell();
					if      ((c->GetLevel() >= 1) && (c->GetLevel() <= 5)) {
						TargHealer->Say("Casting Salve on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(5011, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 6) && (c->GetLevel() <= 11)) {
						TargHealer->Say("Casting Minor Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(200, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 12) && (c->GetLevel() <= 26)) {
						TargHealer->Say("Casting Light Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(17, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 27) && (c->GetLevel() <= 35)) {
						TargHealer->Say("Casting Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(12, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 36) && (c->GetLevel() <= 56)) {
						TargHealer->Say("Casting Greater Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(15, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 57) && (c->GetLevel() <= 60)) {
						TargHealer->Say("Casting Superior Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(9, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 61) && (c->GetLevel() <= 70)) {
						TargHealer->Say("Casting Touch of Nife on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(3429, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 71) && (c->GetLevel() <= 255)) {
						TargHealer->Say("Casting Sacred Touch on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(8560, target->GetID(), 1, -1, -1);
					}
					break;

				case RANGER:
					TargHealer->InterruptSpell();
					if      ((c->GetLevel() >= 1) && (c->GetLevel() <= 7)) {
						TargHealer->Say("Casting Salve on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(5011, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 8) && (c->GetLevel() <= 20)) {
						TargHealer->Say("Casting Minor Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(200, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 21) && (c->GetLevel() <= 37)) {
						TargHealer->Say("Casting Light Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(17, target->GetID(), 1, -1, -1);
					}

					else if      ((c->GetLevel() >= 38) && (c->GetLevel() <= 56)) {
						TargHealer->Say("Casting Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(12, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 57) && (c->GetLevel() <= 61)) {
						TargHealer->Say("Casting Greater Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(15, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 62) && (c->GetLevel() <= 64)) {
						TargHealer->Say("Casting Chloroblast on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(11290, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 65) && (c->GetLevel() <= 66)) {
						TargHealer->Say("Casting Sylvan Light on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(4896, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 67) && (c->GetLevel() <= 255)) {
						TargHealer->Say("Casting Sylvan Water on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(5304, target->GetID(), 1, -1, -1);
					}
					break;

				case BEASTLORD:
					TargHealer->InterruptSpell();
					if      ((c->GetLevel() >= 1) && (c->GetLevel() <= 5)) {
						TargHealer->Say("Casting Salve on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(5011, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 6) && (c->GetLevel() <= 19)) {
						TargHealer->Say("Casting Minor Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(200, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 20) && (c->GetLevel() <= 35)) {
						TargHealer->Say("Casting Light Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(17, target->GetID(), 1, -1, -1);
					}

					else if      ((c->GetLevel() >= 36) && (c->GetLevel() <= 56)) {
						TargHealer->Say("Casting Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(12, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 57) && (c->GetLevel() <= 61)) {
						TargHealer->Say("Casting Greater Healing on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(15, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 62) && (c->GetLevel() <= 64)) {
						TargHealer->Say("Casting Chloroblast on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(11290, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 65) && (c->GetLevel() <= 66)) {
						TargHealer->Say("Casting Trushkar's Mending on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(4875, target->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 67) && (c->GetLevel() <= 255)) {
						TargHealer->Say("Casting Muada's Mending on %s \n", target->GetCleanName(), sep->arg[2]);
						TargHealer->CastSpell(5528, target->GetID(), 1, -1, -1);
					}
					break;


				default:
					c->Message(15, "You must have a Cleric, Paladin, Druid, Shaman, Ranger,  or Beastlord in your group.");
					break;
			}
		}
	}
Then you can just do #bot targheal and it'll heal your target.
Reply With Quote
  #5  
Old 11-30-2012, 06:59 AM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

i'd suggest breaking out of the loop as soon as TargHealerClass == CLERIC, since that is what you're ultimately looking for. maybe add an option for specifying the bot (and maybe target) by name, so the group can more easily micro-manage targeted heals.

also, as it stands, what's to stop a necro from using the command in a panic and interrupting a cleric bot in the middle of a CHeal intended for the group's main tank (intentionally or not), since there are no checks for bot ownership or the type of spell currently being cast or the target? the code appears to assume that the person using the command knows what the bot is doing and the rest of the party doesn't mind them having the ability to override their bot's decision-making process. whoever hits the command last gets to direct the heal.

what about checking to see if the target to be healed can actually be healed by the bot?

note: you've defined DBtype and given it a value, but never used it.
Reply With Quote
  #6  
Old 11-30-2012, 11:51 AM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

All of the custom bot commands I have created and put into my server like this one are actually just modifications of commands that already existed in the source. I don't know very much about C++, so I am sure there a lots of ways the commands can be improved haha. It works, but I guess it is more useful on my server where it is designed for solo play, so you don't really have to worry about other group member.
Reply With Quote
Reply


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 12:55 PM.


 

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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3