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

Development::Bots Forum for bots.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 08-13-2011, 04:58 AM
Criimson
Hill Giant
 
Join Date: Sep 2006
Posts: 172
Default

Here is an update. Yea yea. I can't help myself.

Anyway...
I added a code to check if there is a target cause that was causing a crash and I also made it where the chanter will stop casting and cast AoE mez because if you are telling the chanter to cast this spell then you want it now or people will probably die.

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)&&(!target == NULL)) {
			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...");
				if(mezzer->IsCasting()){
					mezzer->InterruptSpell();
				}
				mezzer->CastSpell(307, target->GetID(), 1, -1, -1);
			}
			else if ((c->GetLevel() >= 52) && (c->GetLevel() <= 64)) {
				mezzer->Say("Casting Fascination...");
				if(mezzer->IsCasting()){
					mezzer->InterruptSpell();
				}
				mezzer->CastSpell(1690, target->GetID(), 1, -1, -1);
			}
			else if ((c->GetLevel() >= 65) && (c->GetLevel() <= 68)) { 
				mezzer->Say("Casting Bliss of the Nihil...");
				if(mezzer->IsCasting()){
					mezzer->InterruptSpell();
				}
				mezzer->CastSpell(4878, target->GetID(), 1, -1, -1);
			}
			else if ((c->GetLevel() >= 69) && (c->GetLevel() <= 70)) { 
				mezzer->Say("Casting Wake of Felicity...");
				if(mezzer->IsCasting()){
					mezzer->InterruptSpell();
				}
				mezzer->CastSpell(5511, target->GetID(), 1, -1, -1);
			}
		}
		return;
	}
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 10:43 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