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

Development::Bots Forum for bots.

Reply
 
Thread Tools Display Modes
  #1  
Old 10-14-2012, 09:29 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default Custom bot commands

I'm not sure if anyone would be interested in using any of these commands, but they've had pretty good reception on my server, Pelican's Solo Server. Basically, they just help improve caster bots by interrupting their current spell and forcing them to cast a spell type of your choosing. To use them, just copy and paste them into bot.cpp. I am almost certain that all of these could be optimized, but they seem to work pretty well in their current form.

Bot Heal - Forces a cleric, shaman, druid, paladin, ranger, or beastlord to heal you

Code:
// Heal
	if ((!strcasecmp(sep->arg[1], "heal")) && (c->IsGrouped())) {
		Mob *Healer;
		int32 HealerClass = 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:
							Healer = g->members[i];
							HealerClass = CLERIC;
							break;
						case DRUID:
							if (HealerClass != CLERIC){
								Healer = g->members[i];
								HealerClass = DRUID;
							}
							break;
						case SHAMAN:
							if (HealerClass == 0){
								Healer = g->members[i];
								HealerClass = SHAMAN;
							}
							break;
						case PALADIN:
							if (HealerClass == 0){
								Healer = g->members[i];
								HealerClass = PALADIN;
							}
							break;
						case RANGER:
							if (HealerClass == 0){
								Healer = g->members[i];
								HealerClass = RANGER;
							}
							break;
						case BEASTLORD:
							if (HealerClass == 0){
								Healer = g->members[i];
								HealerClass = BEASTLORD;
							}
							break;
						default:
							break;
					}
				}
			}
			switch(HealerClass) {

					case CLERIC:
						Healer->InterruptSpell();

					if      ((c->GetLevel() >= 1) && (c->GetLevel() <= 4)) {
						Healer->Say("Casting Minor Healing...");
						Healer->CastSpell(200, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 4) && (c->GetLevel() <= 9)) {
						Healer->Say("Casting Light Healing...");
						Healer->CastSpell(17, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 10) && (c->GetLevel() <= 19)) {
						Healer->Say("Casting Healing...");
						Healer->CastSpell(12, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 20) && (c->GetLevel() <= 29)) {
						Healer->Say("Casting Greater Healing...");
						Healer->CastSpell(15, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 30) && (c->GetLevel() <= 38)) {
						Healer->Say("Casting Superior Healing...");
						Healer->CastSpell(9, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 39) && (c->GetLevel() <= 255)) {
						Healer->Say("Casting Complete Healing...");
						Healer->CastSpell(13, c->GetID(), 1, -1, -1);
					}
					break;

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

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

					case PALADIN:
						Healer->InterruptSpell();
					if      ((c->GetLevel() >= 1) && (c->GetLevel() <= 5)) {
						Healer->Say("Casting Salve...");
						Healer->CastSpell(5011, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 6) && (c->GetLevel() <= 11)) {
						Healer->Say("Casting Minor Healing...");
						Healer->CastSpell(200, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 12) && (c->GetLevel() <= 26)) {
						Healer->Say("Casting Light Healing...");
						Healer->CastSpell(17, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 27) && (c->GetLevel() <= 35)) {
						Healer->Say("Casting Healing...");
						Healer->CastSpell(12, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 36) && (c->GetLevel() <= 56)) {
						Healer->Say("Casting Greater Healing...");
						Healer->CastSpell(15, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 57) && (c->GetLevel() <= 60)) {
						Healer->Say("Casting Superior Healing...");
						Healer->CastSpell(9, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 61) && (c->GetLevel() <= 70)) {
						Healer->Say("Casting Touch of Nife...");
						Healer->CastSpell(3429, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 71) && (c->GetLevel() <= 255)) {
						Healer->Say("Casting Sacred Touch...");
						Healer->CastSpell(8560, c->GetID(), 1, -1, -1);
					}
					break;

				case RANGER:
					Healer->InterruptSpell();
					if      ((c->GetLevel() >= 1) && (c->GetLevel() <= 7)) {
						Healer->Say("Casting Salve...");
						Healer->CastSpell(5011, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 8) && (c->GetLevel() <= 20)) {
						Healer->Say("Casting Minor Healing...");
						Healer->CastSpell(200, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 21) && (c->GetLevel() <= 37)) {
						Healer->Say("Casting Light Healing...");
						Healer->CastSpell(17, c->GetID(), 1, -1, -1);
					}

					else if      ((c->GetLevel() >= 38) && (c->GetLevel() <= 56)) {
						Healer->Say("Casting Healing...");
						Healer->CastSpell(12, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 57) && (c->GetLevel() <= 61)) {
						Healer->Say("Casting Greater Healing...");
						Healer->CastSpell(15, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 62) && (c->GetLevel() <= 64)) {
						Healer->Say("Casting Chloroblast...");
						Healer->CastSpell(11290, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 65) && (c->GetLevel() <= 66)) {
						Healer->Say("Casting Sylvan Light...");
						Healer->CastSpell(4896, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 67) && (c->GetLevel() <= 255)) {
						Healer->Say("Casting Sylvan Water...");
						Healer->CastSpell(5304, c->GetID(), 1, -1, -1);
					}
					break;

				case BEASTLORD:
					Healer->InterruptSpell();
					if      ((c->GetLevel() >= 1) && (c->GetLevel() <= 5)) {
						Healer->Say("Casting Salve...");
						Healer->CastSpell(5011, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 6) && (c->GetLevel() <= 19)) {
						Healer->Say("Casting Minor Healing...");
						Healer->CastSpell(200, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 20) && (c->GetLevel() <= 35)) {
						Healer->Say("Casting Light Healing...");
						Healer->CastSpell(17, c->GetID(), 1, -1, -1);
					}

					else if      ((c->GetLevel() >= 36) && (c->GetLevel() <= 56)) {
						Healer->Say("Casting Healing...");
						Healer->CastSpell(12, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 57) && (c->GetLevel() <= 61)) {
						Healer->Say("Casting Greater Healing...");
						Healer->CastSpell(15, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 62) && (c->GetLevel() <= 64)) {
						Healer->Say("Casting Chloroblast...");
						Healer->CastSpell(11290, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 65) && (c->GetLevel() <= 66)) {
						Healer->Say("Casting Trushkar's Mending...");
						Healer->CastSpell(4875, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 67) && (c->GetLevel() <= 255)) {
						Healer->Say("Casting Muada's Mending...");
						Healer->CastSpell(5528, c->GetID(), 1, -1, -1);
					}
					break;


				default:
					c->Message(15, "You must have a Cleric, Paladin, Druid, Shaman, Ranger,  or Beastlord in your group.");
					break;
			}
		}
	}

Bot grphl - Forces cleric bot to heal your group

Code:
	// grphl
	if ((!strcasecmp(sep->arg[1], "grphl")) && (c->IsGrouped())) {
		Mob *Grphler;
		int32 GrphlerClass = 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:
							Grphler = g->members[i];
							GrphlerClass = CLERIC;
							break;
						default:
							break;
					}
				}
			}
			
			switch(GrphlerClass) {
        		case CLERIC:
					Grphler->InterruptSpell();
					if      ((c->GetLevel() >= 30) && (c->GetLevel() <= 44)) {
						Grphler->Say("Casting Word of Health...");
						Grphler->CastSpell(135, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 45) && (c->GetLevel() <= 51)) {
						Grphler->Say("Casting Word of Healing...");
						Grphler->CastSpell(136, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 52) && (c->GetLevel() <= 56)) {
						Grphler->Say("Casting Word of Vigor...");
						Grphler->CastSpell(1520, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 57) && (c->GetLevel() <= 59)) {
						Grphler->Say("Casting Word of Restoration...");
						Grphler->CastSpell(1521, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 60) && (c->GetLevel() <= 63)) {
						Grphler->Say("Casting Word of Redemption...");
						Grphler->CastSpell(1523, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 64) && (c->GetLevel() <= 68)) {
						Grphler->Say("Casting Word of Replenishment...");
						Grphler->CastSpell(3471, c->GetID(), 1, -1, -1);
					}
					else if      ((c->GetLevel() >= 69) && (c->GetLevel() <= 255)) {
						Grphler->Say("Casting Word of Vivification...");
						Grphler->CastSpell(5270, c->GetID(), 1, -1, -1);
					}
					break;

				default:
					c->Message(15, "You must have a Cleric in your group.");
					break;
			}
		}
	}

Bot nuke - forces wizard, magician, druid, or shaman to nuke your target

Code:
//Nuke
	if(!strcasecmp(sep->arg[1], "nuke"))
	{
		Mob *target = c->GetTarget();
		if(target == NULL || target->IsClient() || target->IsBot() || (target->IsPet() && target->GetOwner()->IsBot()))
		{
			c->Message(15, "You must select a monster");
			return;
		}
		int32 DBtype = c->GetTarget()->GetBodyType();
		Mob *Nuker;
		int32 NukerClass = 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 WIZARD:
							Nuker = g->members[i];
							NukerClass = WIZARD;
							break;
						case MAGICIAN:
							if(NukerClass != WIZARD){
								Nuker = g->members[i];
								NukerClass = MAGICIAN;
							}
                                                        break;
						case DRUID:
							if (NukerClass == 0){
								Nuker = g->members[i];
								NukerClass = DRUID;
							}
							break;
						case SHAMAN:
							if (NukerClass == 0){
								Nuker = g->members[i];
								NukerClass = SHAMAN;
							}
							break;
						default:
							break;
					}
				}
			}
			switch(NukerClass) {
				case WIZARD:
					Nuker->InterruptSpell();
					if	((c->GetLevel() >= 1) && (c->GetLevel() <= 4)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(372, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 5) && (c->GetLevel() <= 9)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(477, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 10) && (c->GetLevel() <= 14)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(383, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 15) && (c->GetLevel() <= 16)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(657, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 17) && (c->GetLevel() <= 25)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(22, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 26) && (c->GetLevel() <= 42)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(465, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 43) && (c->GetLevel() <= 59)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(659, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 60) && (c->GetLevel() <= 62)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(1426, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 63) && (c->GetLevel() <= 64)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(3335, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 65) && (c->GetLevel() <= 69)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(4981, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 70) && (c->GetLevel() <= 255)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(8043, target->GetID(), 1, -1, -1);
					}
					break;

				case MAGICIAN:
					Nuker->InterruptSpell();
					if	((c->GetLevel() >= 1) && (c->GetLevel() <= 4)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(93, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 5) && (c->GetLevel() <= 14)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(322, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 15) && (c->GetLevel() <= 17)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(334, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 18) && (c->GetLevel() <= 30)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(68, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 31) && (c->GetLevel() <= 32)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(120, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 33) && (c->GetLevel() <= 40)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(69, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 41) && (c->GetLevel() <= 46)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(114, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 47) && (c->GetLevel() <= 51)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(70, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 52) && (c->GetLevel() <= 56)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(1660, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 57) && (c->GetLevel() <= 62)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(1663, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 63) && (c->GetLevel() <= 65)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(3321, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 66) && (c->GetLevel() <= 255)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(5474, target->GetID(), 1, -1, -1);
					}
					break;

				case DRUID:
					Nuker->InterruptSpell();
					if	((c->GetLevel() >= 1) && (c->GetLevel() <= 2)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(93, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 3) && (c->GetLevel() <= 7)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(92, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 8) && (c->GetLevel() <= 15)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(91, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 16) && (c->GetLevel() <= 27)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(419, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 28) && (c->GetLevel() <= 37)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(217, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 38) && (c->GetLevel() <= 42)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(57, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 43) && (c->GetLevel() <= 47)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(1740, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 48) && (c->GetLevel() <= 53)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(671, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 54) && (c->GetLevel() <= 58)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(1603, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 59) && (c->GetLevel() <= 64)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(1607, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 65) && (c->GetLevel() <= 68)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(4884, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 69) && (c->GetLevel() <= 255)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(5361, target->GetID(), 1, -1, -1);
					}
					break;

				case SHAMAN:
					Nuker->InterruptSpell();
					if	((c->GetLevel() >= 1) && (c->GetLevel() <= 3)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(93, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 4) && (c->GetLevel() <= 13)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(275, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 14) && (c->GetLevel() <= 22)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(282, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 23) && (c->GetLevel() <= 32)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(508, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 33) && (c->GetLevel() <= 41)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(509, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 42) && (c->GetLevel() <= 46)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(1429, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 47) && (c->GetLevel() <= 53)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(3573, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 54) && (c->GetLevel() <= 255)) {
						Nuker->Say("Nuking %s \n", target->GetCleanName(), sep->arg[2]);
						Nuker->CastSpell(3574, target->GetID(), 1, -1, -1);
					}
					break;


				default:
					c->Message(15, "You must have a Wizard, Magician, Shaman, or Druid in your group.");
					break;
			}
		}
	}
Bot malo - Forces mage, shaman, or enchanter to cast resist debuff on target

Code:
//Malo
	if(!strcasecmp(sep->arg[1], "malo"))
	{
		Mob *target = c->GetTarget();
		if(target == NULL || target->IsClient() || target->IsBot() || (target->IsPet() && target->GetOwner()->IsBot()))
		{
			c->Message(15, "You must select a monster");
			return;
		}
		int32 DBtype = c->GetTarget()->GetBodyType();
		Mob *Debuffer;
		int32 DebufferClass = 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 SHAMAN:
							Debuffer = g->members[i];
							DebufferClass = SHAMAN;
							break;
						case MAGICIAN:
							if(DebufferClass != SHAMAN){
								Debuffer = g->members[i];
								DebufferClass = MAGICIAN;
							}
                                                        break;
						case ENCHANTER:
							if (DebufferClass == 0){
								Debuffer = g->members[i];
								DebufferClass = ENCHANTER;
							}
							break;
						default:
							break;
					}
				}
			}
			switch(DebufferClass) {
				case SHAMAN:
					Debuffer->InterruptSpell();
					if	((c->GetLevel() >= 18) && (c->GetLevel() <= 31)) {
						Debuffer->Say("Casting Malaise on %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(110, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 32) && (c->GetLevel() <= 47)) {
						Debuffer->Say("Casting Malaisement on %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(111, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 48) && (c->GetLevel() <= 56)) {
						Debuffer->Say("Casting Malosi on %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(112, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 57) && (c->GetLevel() <= 59)) {
						Debuffer->Say("Casting Malosini on %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(1577, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 60) && (c->GetLevel() <= 62)) {
						Debuffer->Say("Casting Malo on %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(1578, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 63) && (c->GetLevel() <= 64)) {
						Debuffer->Say("Casting Malosinia on %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(3387, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 65) && (c->GetLevel() <= 71)) {
						Debuffer->Say("Casting Malos on %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(3395, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 72) && (c->GetLevel() <= 74)) {
						Debuffer->Say("Casting Malosinise on %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(8520, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 75) && (c->GetLevel() <= 76)) {
						Debuffer->Say("Casting Malis on %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(8541, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 77) && (c->GetLevel() <= 255)) {
						Debuffer->Say("Casting Malosinatia on %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(14659, target->GetID(), 1, -1, -1);
					}
					break;

				case MAGICIAN:
					Debuffer->InterruptSpell();
					if	((c->GetLevel() >= 22) && (c->GetLevel() <= 43)) {
						Debuffer->Say("Casting Malaise on %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(110, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 44) && (c->GetLevel() <= 50)) {
						Debuffer->Say("Casting Malaisement on %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(111, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 51) && (c->GetLevel() <= 57)) {
						Debuffer->Say("Casting Malosi %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(112, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 58) && (c->GetLevel() <= 59)) {
						Debuffer->Say("Casting Malosini %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(1577, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 60) && (c->GetLevel() <= 62)) {
						Debuffer->Say("Casting Mala on %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(1772, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 63) && (c->GetLevel() <= 70)) {
						Debuffer->Say("Casting Malosinia on %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(3387, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 71) && (c->GetLevel() <= 75)) {
						Debuffer->Say("Casting Malosinise on %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(8520, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 76) && (c->GetLevel() <= 255)) {
						Debuffer->Say("Casting Malosinatia on %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(14659, target->GetID(), 1, -1, -1);
					}
					break;

				case ENCHANTER:
					Debuffer->InterruptSpell();
					if	((c->GetLevel() >= 2) && (c->GetLevel() <= 17)) {
						Debuffer->Say("asting Tashan on %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(676, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 18) && (c->GetLevel() <= 40)) {
						Debuffer->Say("Casting Tashani on %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(677, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 41) && (c->GetLevel() <= 56)) {
						Debuffer->Say("Casting Tashania on %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(678, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 57) && (c->GetLevel() <= 60)) {
						Debuffer->Say("Casting Tashanian on %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(1702, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 61) && (c->GetLevel() <= 71)) {
						Debuffer->Say("Casting Howl of Tashan on %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(3342, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 72) && (c->GetLevel() <= 255)) {
						Debuffer->Say("Casting Echo of Tashan on %s \n", target->GetCleanName(), sep->arg[2]);
						Debuffer->CastSpell(8663, target->GetID(), 1, -1, -1);
					}
					
				default:
					c->Message(15, "You must have a Shaman, Magician, or Enchanter in your group.");
					break;
			}
		}
	}
Bot slow - Forces shaman, beastlord, or enchanter bot to slow your target

Code:
//Slow
if(!strcasecmp(sep->arg[1], "slow"))
	{
		Mob *target = c->GetTarget();
		if(target == NULL || target->IsClient() || target->IsBot() || (target->IsPet() && target->GetOwner()->IsBot()))
		{
			c->Message(15, "You must select a monster");
			return;
		}
		int32 DBtype = c->GetTarget()->GetBodyType();
		Mob *Slower;
		int32 SlowerClass = 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 SHAMAN:
							Slower = g->members[i];
							SlowerClass = SHAMAN;
							break;
						case ENCHANTER:
							if(SlowerClass != SHAMAN){
								Slower = g->members[i];
								SlowerClass = ENCHANTER;
							}
                                                        break;
						case BEASTLORD:
							if (SlowerClass == 0){
								Slower = g->members[i];
								SlowerClass = BEASTLORD;
							}
							break;

						default:
							break;
					}
				}
			}
			switch(SlowerClass) {
				case SHAMAN:
					Slower->InterruptSpell();
					if	((c->GetLevel() >= 5) && (c->GetLevel() <= 12)) {
						Slower->Say("Casting Drowsy on %s \n", target->GetCleanName(), sep->arg[2]);
						Slower->CastSpell(270, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 13) && (c->GetLevel() <= 26)) {
						Slower->Say("Casting Walking Sleep on %s \n", target->GetCleanName(), sep->arg[2]);
						Slower->CastSpell(505, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 27) && (c->GetLevel() <= 37)) {
						Slower->Say("Casting Tagar's Insects on %s \n", target->GetCleanName(), sep->arg[2]);
						Slower->CastSpell(506, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 38) && (c->GetLevel() <= 50)) {
						Slower->Say("Casting Togor's Insects on %s \n", target->GetCleanName(), sep->arg[2]);
						Slower->CastSpell(507, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 51) && (c->GetLevel() <= 255)) {
						Slower->Say("Casting Turgur's Insects on %s \n", target->GetCleanName(), sep->arg[2]);
						Slower->CastSpell(1588, target->GetID(), 1, -1, -1);
					}

					break;

				case ENCHANTER:
					Slower->InterruptSpell();
					if	((c->GetLevel() >= 9) && (c->GetLevel() <= 22)) {
						Slower->Say("Casting Languid Pace on %s \n", target->GetCleanName(), sep->arg[2]);
						Slower->CastSpell(302, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 23) && (c->GetLevel() <= 40)) {
						Slower->Say("Casting Tepid Deeds on %s \n", target->GetCleanName(), sep->arg[2]);
						Slower->CastSpell(185, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 41) && (c->GetLevel() <= 56)) {
						Slower->Say("Casting Shiftless Deeds on %s \n", target->GetCleanName(), sep->arg[2]);
						Slower->CastSpell(186, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 57) && (c->GetLevel() <= 255)) {
						Slower->Say("Casting Forlorn Deeds on %s \n", target->GetCleanName(), sep->arg[2]);
						Slower->CastSpell(1712, target->GetID(), 1, -1, -1);
					}
					break;

				case BEASTLORD:
					Slower->InterruptSpell();
					if	((c->GetLevel() >= 20) && (c->GetLevel() <= 49)) {
						Slower->Say("Casting Drowsy on %s \n", target->GetCleanName(), sep->arg[2]);
						Slower->CastSpell(270, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 50) && (c->GetLevel() <= 59)) {
						Slower->Say("Casting Sha's Lethargy on %s \n", target->GetCleanName(), sep->arg[2]);
						Slower->CastSpell(2634, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 60) && (c->GetLevel() <= 64)) {
						Slower->Say("Casting Sha's Advantage on %s \n", target->GetCleanName(), sep->arg[2]);
						Slower->CastSpell(2942, target->GetID(), 1, -1, -1);
					}
					else if ((c->GetLevel() >= 65) && (c->GetLevel() <= 255)) {
						Slower->Say("Casting Sha's Revenge %s \n", target->GetCleanName(), sep->arg[2]);
						Slower->CastSpell(3462, target->GetID(), 1, -1, -1);
					}
					break;


				default:
					c->Message(15, "You must have a Shaman, Enchanter, or Beastlord in your group.");
					break;
			}
		}
	}
As I said, I am sure these could be improved by someone with more C++ knowledge than me, but they at least work and can be easily adjusted to cast spells of your choosing.
Reply With Quote
  #2  
Old 10-25-2012, 11:38 PM
Trackye
Sarnak
 
Join Date: Feb 2008
Posts: 87
Default

Would be nice to see a command to make a shaman enchanter or such NOT slow a mob.. Aggro issues are crazy with bots that repeatedly attempt to slow a mob that is unslowable or high con to them.
Reply With Quote
  #3  
Old 11-24-2012, 09:18 AM
Julesx
Sarnak
 
Join Date: Sep 2008
Location: winston
Posts: 35
Default

How would i go about implementing those commands?
Reply With Quote
  #4  
Old 11-24-2012, 09:33 AM
Julesx
Sarnak
 
Join Date: Sep 2008
Location: winston
Posts: 35
Default

I've copy/pasted them in but didnt show up in game so i'm assuming theres something i'm missing lol
Reply With Quote
  #5  
Old 11-24-2012, 03:18 PM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

Check bot.cpp for Bot::ProcessBotCommands. You will need to add the text for them there. The actual code to handle the command is in if you copied and pasted the above code. You should be able to use the actual command now, it just doesn't show the text, correct?
Reply With Quote
  #6  
Old 11-24-2012, 05:41 PM
Julesx
Sarnak
 
Join Date: Sep 2008
Location: winston
Posts: 35
Default

commands are there in bot.cpp do i need to recompile after editing them? Just to make sure the bot.cpp is in my source folder correct or is there another one somewhere i need to edit?
Reply With Quote
  #7  
Old 11-24-2012, 05:52 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

Any time you change a .h or .cpp file you must recompile.
Reply With Quote
  #8  
Old 11-24-2012, 06:03 PM
Julesx
Sarnak
 
Join Date: Sep 2008
Location: winston
Posts: 35
Default

Do i lose custom changes if i recompile though?
Reply With Quote
  #9  
Old 11-24-2012, 06:56 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

Presumably you are changing the same source code that included those custom changes...

You'd have to be more specific about what you're worried about losing.
Reply With Quote
  #10  
Old 11-24-2012, 07:32 PM
Julesx
Sarnak
 
Join Date: Sep 2008
Location: winston
Posts: 35
Default

I've tried to recompile server but when i clean and then do a new build my zone.exe is failing 5 succeced 1 failed the zone. Any way to correct that?
Reply With Quote
  #11  
Old 11-24-2012, 07:55 PM
lerxst2112
Demi-God
 
Join Date: Aug 2010
Posts: 1,742
Default

Perhaps if we knew what the error was.
Reply With Quote
  #12  
Old 01-02-2013, 05:26 PM
SavageFlame
Fire Beetle
 
Join Date: Feb 2012
Location: The USA
Posts: 19
Default

I've noticed that #bot grphl doesn't seem to check the range before healing. For example I can guard my cleric at the entrance of any zone and use the command #bot grphl and it will heal my group anywhere in the zone. Is this meant to happen or?
Reply With Quote
  #13  
Old 01-12-2013, 09:25 AM
SavageFlame
Fire Beetle
 
Join Date: Feb 2012
Location: The USA
Posts: 19
Default

Bump.

Anyone know?
Reply With Quote
  #14  
Old 01-12-2013, 10:01 AM
c0ncrete's Avatar
c0ncrete
Dragon
 
Join Date: Dec 2009
Posts: 719
Default

all instances of

Code:
Grphler->CastSpell(XXXX, c->GetID(), 1, -1, -1);
should probably read

Code:
Grphler->CastSpell(XXXX, Grphler->GetID(), 1, -1, -1);
so that the center of the area of effect is the bot casting the spell instead of the client issuing the command.

Last edited by c0ncrete; 01-12-2013 at 10:05 AM.. Reason: clarification
Reply With Quote
  #15  
Old 01-13-2013, 10:58 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

I changed that, and it did not seem to make a difference.
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 05:46 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3