PDA

View Full Version : Bots in Rev1008


Annihilator
10-14-2009, 04:51 PM
Is there a trick to getting bots to compile with Rev1008? Sorry I'm a newbie at this. The only searches I found were to add bots.o and botRaid.o in makefile.common and add -DBOTS to makefile flag but when I compiled it said it couldn't find bots.o for zone and stopped.

pfyon
10-14-2009, 07:02 PM
According to my makefile, it's bot.o (not bots.o).

Annihilator
10-14-2009, 11:40 PM
That was a typeo. All I see in the /zone directory is bot.cpp bot.h botRaids.cpp botRaids.h and botStructs.h nowhere do I see bot.o or botRaid.o. I am using the build from 10/07/09. I read somewhere about a new bot system and was wondering if the compile was different than the previous or if I even needed to modify it anymore.

pfyon
10-15-2009, 12:07 AM
I don't think you need to change the makefiles anymore to enable bots (well, maybe in zone/makefile to add -DBOTS).

The .o files will be created during the compiling process.

Here's my zone/makefile:
HCC=$(shell ccache -V 2>/dev/null)
ifneq (,$(findstring version,$(HCC)))
CC=ccache gcc
else
CC=gcc
endif

OUT=-o
LINKOUT=-o
NOLINK=-c
LINKER=gcc
MYSQL_FLAGS=$(shell mysql_config --cflags)
MYSQL_LIB=$(shell mysql_config --libs)
DFLAGS=-DEQDEBUG=5 -DCATCH_CRASH -DNO_PIDLOG -DSHAREMEM -DFIELD_ITEMS -DCOMBINED -DAPP_OPCODE_SIZE=2 -Di386 -DBOTS
#try commenting out the following three lines to disable embedded perl
PERL_FLAGS=$(shell perl -MExtUtils::Embed -e ccopts)
PERL_LIB=$(shell perl -MExtUtils::Embed -e ldopts)
DFLAGS+=-DEMBPERL -DEMBPERL_PLUGIN -DHAS_UNION_SEMUN -DBOTS
WFLAGS=-fpermissive -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wno-deprecated -Wcomment -Wcast-align
COPTS=$(WFLAGS) -O3 -g -march=i686 -pthread -pipe -D_GNU_SOURCE -DINVERSEXY -DFX -DZONE $(DFLAGS) $(MYSQL_FLAGS) $(PERL_FLAGS)
LINKOPTS=$(COPTS) -rdynamic -L. -lstdc++ -ldl $(MYSQL_LIB) $(PERL_LIB)

all: zone

include .depend

include makefile.common

.depend depend:
for f in $(SF); \
do \
i=`echo $$f | sed -e 's#.obj/#../common/#g' -e 's/\.o/.cpp/g' `; \
gcc -MM $(COPTS) $$i | sed "s#^[^ ]*:#$$f:#g"; \
done >.depend

wine:
$(MAKE) -f makefile.wine

and zone/makefile.common:

APP=zone
#the non-perl zone can still compile and link all the perl objects
#because they are all #ifdef'd out anyways..
SF= .obj/EQPacket.o .obj/EQStream.o .obj/EQStreamFactory.o .obj/CRC16.o \
../common/timer.o ../common/packet_dump.o ../common/packet_functions.o \
../common/unix.o ../common/packet_dump_file.o ../common/Mutex.o ../common/MiscFunctions.o \
zone.o entity.o mob.o client.o client_process.o npc.o net.o spawn2.o attack.o hate_list.o \
../common/serverinfo.o ../common/moremath.o worldserver.o spells.o spawngroup.o loottables.o \
faction.o Map.o watermap.o PlayerCorpse.o petitions.o MobAI.o Object.o ../common/eqtime.o \
groups.o ../common/classes.o ../common/races.o ../common/TCPConnection.o forage.o \
../common/crc32.o ../common/guilds.o ../common/md5.o ../common/dbcore.o \
../common/dbasync.o zonedbasync.o parser.o embperl.o embparser.o \
../common/EMuShareMem.o ../common/EQEMuError.o ../common/ptimer.o \
.obj/debug.o .obj/database.o .obj/Item.o .obj/misc.o tribute.o \
doors.o command.o beacon.o embxs.o AA.o trap.o client_packet.o \
bonuses.o trading.o spdat.o spell_effects.o aggro.o guild.o \
inventory.o client_mods.o tradeskills.o waypoints.o pets.o zone_profile.o \
effects.o perl_client.o perl_entity.o perl_mob.o perl_questitem.o perl_npc.o \
perl_PlayerCorpse.o perl_groups.o perl_raids.o questmgr.o client_logs.o perlparser.o \
../common/rdtsc.o ../common/extprofile.o horse.o exp.o pathing.o \
fearpath.o special_attacks.o ../common/timeoutmgr.o ../common/Condition.o \
.obj/opcodemgr.o .obj/emu_opcodes.o ../common/SharedLibrary.o zoning.o \
titles.o perlpacket.o perl_perlpacket.o zonedb.o ../common/shareddb.o \
../common/logsys.o .obj/rulesys.o ../common/logsys_eqemu.o \
../common/EQEmuConfig.o ZoneConfig.o ../common/XMLParser.o ../common/tinyxml/tinystr.o \
../common/tinyxml/tinyxml.o ../common/tinyxml/tinyxmlerror.o ../common/tinyxml/tinyxmlparser.o \
../common/EQStreamProxy.o ../common/patches/patches.o \
../common/patches/Client62.o ../common/patches/Titanium.o \
../common/patches/Anniversary.o ../common/patches/SoF.o \
../common/StructStrategy.o ../common/EQStreamProxy.o \
../common/EQStreamIdent.o ../common/patches/Live.o \
zone_logsys.o ../common/BasePacket.o ../common/worldconn.o \
../common/EmuTCPConnection.o ../common/EmuTCPServer.o ../common/TCPServer.o \
../common/guild_base.o botRaids.o bot.o \
guild_mgr.o tasks.o raids.o perl_hateentry.o


all: $(APP)


$(APP): $(SF)
$(LINKER) $(LINKOUT)$@ $^ $(LINKOPTS)

clean:
rm -f $(SF) $(APP)

%.o: %.cpp
$(CC) $(NOLINK) $(COPTS) $< $(OUT)$@

.obj/%.o: ../common/%.cpp ../common/%.h
mkdir -p .obj
$(CC) $(COPTS) $(NOLINK) $< $(OUT)$@