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

Development::Bots Forum for bots.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-12-2011, 07:18 PM
Criimson
Hill Giant
 
Join Date: Sep 2006
Posts: 172
Default BoT Custom Code

Wasn't really sure which forum to post this, but it is bot code so put it here.

I don't really have much free time atm which is why I haven't been posting. However, my son and I have been messing around in the game and something that has been bugging the hell out of me is raids with many adds. The chanter bot's current AI is spotty IMO so I threw this code together as a band-aid until I can get in there and get dirty. Thought I'd post it, though, as it is handy to have anyway and thought someone might want to use it.

It adds the #bot aoemez command

Code:
// AoE Mez
	if(!strcasecmp(sep->arg[1], "aoemez")) {
		Mob *mezzer = NULL;
		Mob *target = c->GetTarget();
		bool hasmezzer = false;
		if(c->IsGrouped())
		{
			Group *g = c->GetGroup();
			if(g) {
				for(int i=0; i<MAX_GROUP_MEMBERS; i++)
				{
					if(g->members[i] && g->members[i]->IsBot() && (g->members[i]->GetClass() == ENCHANTER))
					{
						hasmezzer = true;
						mezzer = g->members[i];
					}
				}
				if(!hasmezzer) {
					c->Message(15, "You must have an Enchanter in your group.");
				}
			}
		}
		if(hasmezzer) {
			if      (c->GetLevel() <= 15) {
				mezzer->Say("I need to be level 16 or higher for this...");
			}
			else if ((c->GetLevel() >= 16) && (c->GetLevel() <= 51)) {
				mezzer->Say("Casting Mesmerization...");
				mezzer->CastSpell(307, target->GetID(), 1, -1, -1);
			}
			else if ((c->GetLevel() >= 52) && (c->GetLevel() <= 64)) {
				mezzer->Say("Casting Fascination...");
				mezzer->CastSpell(1690, target->GetID(), 1, -1, -1);
			}
			else if ((c->GetLevel() >= 65) && (c->GetLevel() <= 68)) { 
				mezzer->Say("Casting Bliss of the Nihil...");
				mezzer->CastSpell(4878, target->GetID(), 1, -1, -1);
			}
			else if ((c->GetLevel() >= 69) && (c->GetLevel() <= 70)) { 
				mezzer->Say("Casting Wake of Felicity...");
				mezzer->CastSpell(5511, target->GetID(), 1, -1, -1);
			}
		}
		return;
	}
Edit:

be careful with this code
there are no checks in it. unsure how it will work if cast on players or in an area with friendly npcs.
Reply With Quote
 

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