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

Development::Bots Forum for bots.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-29-2010, 06:36 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,449
Default

I believe the bot lists are hardcoded (?!) to use certain spell list IDs in the 700's. Correct me if i'm wrong though, I haven't touched that code in forever.

It should be in latest PEQ as Bot Enchanter Spell List for example, under npc_spells.

You should be able to add more to the hardcoded lists and they will pick it up. Bots are only coded to know what to do on certain spelltypes though. You'll have to code any custom spelltypes into bots. Their logic is similar, though a bit advanced to NPC Spell logic, and it should be fairly easy to port some stuff into the bot AI logic that isn't present from NPC AI logic.

Also, I didn't bother putting a debugger on them but there's a ton of bot crashes still. I would advise you don't use them unless you are an advanced developer who can fix the bots. Either that or if you are feeling brave, make them a friend class of client.
Reply With Quote
  #2  
Old 08-29-2010, 06:42 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,449
Default

It also seems like a lot of the mezzing spells are hardcoded, I assume the same for Enduring Breath spells, etc.

Take this example code for mezzing an NPC:

Code:
bool Bot::MesmerizeTarget(Mob* target) {
	bool Result = false;

	if(target) {
		int mezid = 0;
		int mezlevel = GetLevel();

		if(mezlevel >= 69) {
			mezid = 5520;
		}
		else if(mezlevel == 68) {
			mezid = 8035;
		}
		else if(mezlevel == 67) {
			mezid = 5503;
		}
		else if(mezlevel >= 64) {
			mezid = 3358;
		}
		else if(mezlevel == 63) {
			mezid = 3354;
		}
		else if(mezlevel >= 61) {
			mezid = 3341;
		}
		else if(mezlevel == 60) {
			mezid = 2120;
		}
		else if(mezlevel == 59) {
			mezid = 1692;
		}
		else if(mezlevel >= 54) {
			mezid = 1691;
		}
		else if(mezlevel >= 47) {
			mezid = 190;
		}
		else if(mezlevel >= 30) {
			mezid = 188;
		}
		else if(mezlevel >= 13) {
			mezid = 187;
		}
		else if(mezlevel >= 2) {
			mezid = 292;
		}
		if(mezid > 0) {
			int32 DontRootMeBeforeTime = 0;
			CastSpell(mezid, target->GetID(), 1, -1, -1, &DontRootMeBeforeTime);
			target->SetDontRootMeBefore(DontRootMeBeforeTime);
			Result = true;
		}
	}

	return Result;
}
So yeah, it is level-dependant and somewhat hardcoded as I thought. The spell lists only apply to the AI logic, not a bot command.

What it seems like is that you are going to have to either: Check the spell array on zone bootup, load the bots' spells into memory that is the best spell for them for each level, then just reference the memory every time you cast a spell.

Or: Change the hardcoded spells. Not as flexible but it works.
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 03:08 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