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

Development::Bots Forum for bots.

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 03-05-2008, 03:43 AM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

Not sure if anything is being done about a merge into the main base code, although I don't recommend it at this time.

I've made it easier to patch in by surrounding the bot code in blocks of #ifdef EQBOTS and I have been making fixes to things that were causing crashes and added extra helpful text when using #bot commands.

I'm still at build 1090 with this code because I have come across an issue with upgrading the database that I'm relying on another person to fix for me since I'm more of a c++ guy than a database guy. What happens is, during an upgrade of the database you generally run drop_system.sql which deletes the npc_types table where all the bots are, so you lose all your bots. It wouldn't be so tough to backup the bots and then source them back in but there's a problem with that part.

It is likely that the new database will at some point add new npc's and these new npc's could have the same ID as one or more of the bots. The bot ID is also referenced in the botowners and botinventory tables so in this case, the bot would need to be merged into the npc_types table with a new id and the botowners and botinventory tables updated to reflect this.

Not a huge problem and this other guy is working on a vbscript or some tool like that to solve this, so I'll be moving to more recent builds soon.

I have been posting updated binaries and source in my link above, the latest version is dated feb 29th.
  #2  
Old 03-05-2008, 05:20 AM
number6
Sarnak
 
Join Date: Sep 2006
Posts: 62
Default

Thanks Congdar. I'll grab your source and have a play soon

Paul.
  #3  
Old 03-10-2008, 06:59 AM
Aramid
Discordant
 
Join Date: May 2006
Posts: 356
Default

Quote:
Originally Posted by Congdar View Post
I've made it easier to patch in by surrounding the bot code in blocks of #ifdef EQBOTS and I have been making fixes to things that were causing crashes and added extra helpful text when using #bot commands.
Where do you #def EQBOTS so they will be available when compiling in Linux (Debian 4) or is there something else that needs to be done?
__________________
Random Segments of Code....
  #4  
Old 03-10-2008, 07:08 AM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

Not sure for linux compiles, sorry. In Visual Studio you add EQBOTS to the preprocessor settings. Not sure if it's necessary but I add it to the zone, world and emusharemem components.
  #5  
Old 03-10-2008, 10:05 AM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

Quote:
Originally Posted by Aramid View Post
Where do you #def EQBOTS so they will be available when compiling in Linux (Debian 4) or is there something else that needs to be done?
To define a symbol for the pre-processor you need to add -D<symbol> to the compiler command line. e.g.:

Code:
#include <stdio.h>

int main() {

#ifdef EQBOTS
        printf("EQBOTS defined\n");
#endif

}

entwisd@rama ~ $ g++ test.cpp
entwisd@rama ~ $ ./a.out
entwisd@rama ~ $ g++ -DEQBOTS test.cpp
entwisd@rama ~ $ ./a.out
EQBOTS defined
entwisd@rama ~ $
I've not tried this bots code, but I would guess adding -DEQBOTS to the first DFLAGS line in zone/makefile should be all that is required, i.e. change

Code:
DFLAGS=-DEQDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DSPELL_EFFECT_SPAM -DFIELD_ITEMS -DCOMBINED -DAPP_OPCODE_SIZE=2 -Di386
to

Code:
DFLAGS=-DEQDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DSPELL_EFFECT_SPAM -DFIELD_ITEMS -DCOMBINED -DAPP_OPCODE_SIZE=2 -Di386 -DEQBOTS
then do a make clean; make
  #6  
Old 03-10-2008, 11:15 AM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

You also need to add the 3 bot files to the makefile to compile. so in zone/makefile.common

Code:
../common/guild_base.o guild_mgr.o
becomes:

Code:
../common/guild_base.o guild_mgr.o botRaids.o botAI.o petAI.o
  #7  
Old 03-10-2008, 11:45 AM
Aramid
Discordant
 
Join Date: May 2006
Posts: 356
Default

Thanks Derision and Cavedude, that was what was needed. It compiled and appears to be working fine.
__________________
Random Segments of Code....
  #8  
Old 03-12-2008, 02:37 AM
cubber
Discordant
 
Join Date: Apr 2006
Posts: 374
Default

If I am running the latest PEQ database from CVS is there a need to drop the npc_spells_entries table and replace it with the one from the link in the readme? I noticed that the bot tables are already put in and isbot is added to npc_types by default in PEQ.
  #9  
Old 03-12-2008, 03:02 AM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

I wouldn't, that sql file is pretty old and missing much of what is in the current table.
Closed Thread

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 04:52 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