My Bot included binaries
Hello everyone
I play on a solo server and love bots, so have been kind of tweaking them with tons of help from the emu community. As I was playing today in Upper Guk and having a blast it dawned on me that others might enjoy the changes that are kind of an offshoot of the standard binaries. So if anyone is interested in having me email them my compiled binaries feel free to shoot me a PM with your email and I'll send them to you. I understand that not everyone compiles their own binaries and with all the help I've gotten I love to help a little too. What is different: SQL - One minor sql change. Added the enchanter bot spells that allow it to automatically mez adds (only have up to level 60 atm will add more soon - I level super slowly) Bot changes - Added pfyons archetype code as well as his code to have cleric not DD till oom - slightly modified to have the cleric only use DDs if over 75% mana Modified that code to have chanters stop using DDs at 50% mana Modified healing AI so that hybrids (ie Beasts, Rangers and Pallys) only cast heals when someone is below 20% health Enchanters will automez adds (removed the !addMob spam when no adds are present) Altered pacify code so only one group member casts pacify and priority is given to the enchanter Added #bot setfollowdistance command in case it bothers you that bots are stacked (still have to redo command after you zone for now) Umm think thats all for now :) Anyway, if anyone is interested I'll get it to you asap. Criimson EDIT: oh yea I compile using the svn so for everything to run smoothly you have to have your PEQ db updated to the lastest release EDIT EDIT: Sorry tired :) And the bianries are for windows servers - if someone wants em for linux (I assume you can compile) I can send the sources |
Here are the diff files for those of you that requested them.
<bot.h> Code:
295d294 Code:
10079d10078 Code:
256,278d255 <mob.h> Code:
55,66d54 Code:
675,721d674 Code:
INSERT INTO `npc_spells_entries` (`id`, `npc_spells_id`, `spellid`, `type`, `minlevel`, `maxlevel`) VALUES (8145, 705, 190, 2048, 47, 55); Criimson EDIT: AoE mezzes arent going to be inluded until I add some code to check for number to be mezzed at some point. Say 3+ and chanter will aoe mez, but for now the bot is pretty damn fast once it starts mezzing. The only tweak is that it tends to tash the MT before it starts mezzing...will work on that soon. |
Had to update Bot.cpp
I always run a chanter and cleric and didnt notice that clerics weren't pacifying. Added a more proper check for chanter in the group. Use this diff instead of the one above. Code:
10079d10078 Next I will be working on: Character's pets breaking mez - bot pets work properly, but personal pets just hit the first thing that hits you. That is like early live (in fact when EQ was released I played a necro and i remember if I died my pet would go ape shit on the group. Was funny looking back, but they had to change it quickly because people got mad when they got wiped by a dead necros pet), but was changed at some point so pets stopped breaking mez. Personal pet trying to keep attacking a dead MoB that has a dot on player. |
This is really awesome of you to post these, but how do I add these to my code? I can do it manually but I just dont know what lines 10457,10481d10455 for example means.
|
those looks nice. but I have no idea how to apply those diff to the original. Not a programming expert. I tried but it's a bit confusing for me to try to merge those in.
|
We're all learning here. I couldn't even make a diff patch yesterday.
I found how to do it. Basically download <Diff Patch Program> Then to make my life easier I copied the trunk files: bot.h mob.h bot.cpp botspellsai.cpp mob.cpp into a directory on C: (I named mine "e" for simplicity). Then I have each section of code (the patch files) saved to that directory. Each named to correspond to the file it is patching. For instance, the bot.h patch I named bot_h. Once all are in the same directory, I hit the windows start button, typed CMD in the search area to run the command line program for windows. Next type: cd C:\Program Files (x86)\GnuWin32\bin Then for each file to be patched type: sdiff <patch file> <file to patch> Example: sdiff c:\e\bot_h c:\e\bot.h And let it run. Then copy the patched files back to the directory \zone wherever you have your source code. I use 2 source directories. One for the trunk that I update and one that I tinker in. Hope this helps. Criimson EDIT: As to what the numbers mean: they are the line numbers that are being altered. They are handy for patching the file by hand. For instance, when I patched in pfyons code the trunk was already ahead of when he posted the code. In VC what you do to patch in the file by hand is look at those numbers and hit CTRL-G. This will pop up a window and allow you to enter the line number you want to jump to. Then look for the code section that you are going to alter. It most likely won't be in the exact place, but it should be close. |
I think tortoise svn has the ability to create and apply diffs.
If you're using linux, you can also use the 'diff' and 'patch' programs. |
yes tortoise does and works fine, but it is not obvious in the menu until you go looking for it.
|
So I noticed when I hit level 13 (I have exp set to 0.1 on my server) that my chanter stopped mezzing. Looking into it.
Run this SQL UPDATE `npc_spells_entries` SET `priority`=1 WHERE `priority`=0 AND `npc_spells_id`=705; This seems to fix it, but it just brings up that chanter spells need better prioritizing in the code. That is where I am going to work while I await hearing from the PEQ team. Criimson |
hmm well I do a copy and paste of the patch files to a blank text file. Not sure what to save it as. because when I did, the command:
sdiff c:\e\bot_h c:\e\bot.h It tells me there's no such files or directory. so I tried saving as diff file. and tried again using this way. sdiff c:\e\bot_h.diff c:\e\bot.h I didn't get any error but it doesnt seems to apply the patch. I open it up and there was no changes. |
updating the entire npc_spells_entries table like this is not a good idea since bots are not the only ones using this table and the priority field. Something closer to WHERE priority=0 AND npc_spells_id>700 AND npc_spells_id<713;
|
Yea I tried to edit it, but the timer on this forum disallowed it.
Here are some small updates. Tightening the DB side. UPDATE `npc_spells_entries` SET `priority`=1 WHERE `priority`=0 AND 'npc_spells_id' = 705; UPDATE `npc_spells_entries` SET `priority`=8 WHERE `priority`=7 AND 'npc_spells_id' = 705; UPDATE `npc_spells_entries` SET `priority`=7 WHERE `priority`=6 AND 'npc_spells_id' = 705; UPDATE `npc_spells_entries` SET `priority`=6 WHERE `priority`=5 AND 'npc_spells_id' = 705; UPDATE `npc_spells_entries` SET `priority`=5 WHERE `priority`=4 AND 'npc_spells_id' = 705; UPDATE `npc_spells_entries` SET `priority`=4 WHERE `priority`=3 AND 'npc_spells_id' = 705; UPDATE `npc_spells_entries` SET `priority`=3 WHERE `priority`=2 AND 'npc_spells_id' = 705; UPDATE `npc_spells_entries` SET `priority`=2 WHERE `priority`=1 AND TYPE != 2048 AND 'npc_spells_id' = 705; UPDATE `npc_spells_entries` SET `maxlevel`=12 WHERE `id`=8146 LIMIT 1; UPDATE `npc_spells_entries` SET `maxlevel`=29 WHERE `id`=8147 LIMIT 1; UPDATE `npc_spells_entries` SET `maxlevel`=51 WHERE `id`=8148 LIMIT 1; UPDATE `npc_spells_entries` SET `maxlevel`=53 WHERE `id`=8149 LIMIT 1; UPDATE `npc_spells_entries` SET `maxlevel`=58 WHERE `id`=8150 LIMIT 1; UPDATE `npc_spells_entries` SET `maxlevel`=59 WHERE `id`=8151 LIMIT 1; UPDATE `npc_spells_entries` SET `maxlevel`=60 WHERE `id`=8152 LIMIT 1; UPDATE `npc_spells_entries` SET `maxlevel`=62 WHERE `id`=8153 LIMIT 1; UPDATE `npc_spells_entries` SET `maxlevel`=63 WHERE `id`=8154 LIMIT 1; UPDATE `npc_spells_entries` SET `maxlevel`=66 WHERE `id`=8155 LIMIT 1; UPDATE `npc_spells_entries` SET `maxlevel`=67 WHERE `id`=8156 LIMIT 1; UPDATE `npc_spells_entries` SET `maxlevel`=68 WHERE `id`=8157 LIMIT 1; Unsure why but it seems debuffs are still given priority which is weird. Created a level 65 team (sk/cleric/and chanter) and the chanter only starts mezzing once it throws all of its debuffs. Rune line also can get priority sometimes it seems (at least at lower levels). When I type #bot debug spells it shows the spell priority listing and they all seem fine, but the weird part is: the only place I see a call to the spell priority column from the code is in that one debug statement. Probably missing it somewhere though. If anyone has any ideas let me know EDIT: In the code: Code:
else if(botClass == ENCHANTER) { |
Quote:
|
You might try making a unified diff which is very easy to apply using tortoise or patch. Another benefit is that it will include some context lines for people trying to apply the changes manually.
|
Quote:
I'll try that. Never made one before and just googled how. Criimson EDIT: Here is the tortoise diff Code:
Index: bot.cpp |
All times are GMT -4. The time now is 08:51 PM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.