Genbot v13.3.2 [Updated 08/08/2004] Slim trim code rewrite!
Posted: Thu Aug 05, 2004 10:50 am
Current File Versions:
Genbot.mac 13.3.0
BotCommon.inc 13.3.0
BotMain.inc 13.3.0
BotCore.inc 13.3.0
BotCombat.inc 13.3.2
BotSpell.inc 13.3.1
BotHealer.inc 13.3.1
GenbotDoc.txt 13.3.0
advpath.inc 1.31
advpath2.inc 1.31
Advpath files can be found here: http://macroquest2.com/phpBB2/viewtopic.php?t=8655
Changelog 2004-08-08
Fixed protect/defend crash error when NeverKill value is unchanged from default in the .ini file.
Changelog 2004-08-07
Fixed the canni spell call.
Fixed an error with NeverKill, that might have enabled you to attack something on your NeverKill list. Eek!
Added stopifhealed toggle. Default is on. This checks if the mob you are casting heal on has already been healed over 5% above their normal heal point as set in you .ini file. If so, it aborts the heal.
Added stopforheals toggle. Default is off. This checks if you are casting a non-heal spell, and have a heal spell waiting in the queue. If so, it aborts your non-heal spell, so you can get the heal off first.
Both of these last toggles are untested, since I'm not really in those situations, with only one healer. Try them out, and let me know how it goes!
Intro to 13.3.0
With version 13.3.x, I've finished the rewrite of the basic LoadSetting, AddCommand, and AddToggle subs. Thanks to Nosaj969 for help working through these changes.
This version also has updated documentation, which was long overdue. Take a look, and let me know if anything doesn't match up. Thanks to Daeas for giving me a new template for the helpfile. He's also given me doco for the .ini file, which I still need to go over to update for 13.3.0 format.
Changelog 2004-08-05
Gosh where to start?
I've changed the layout of the files that compose genbot to make it more friendly to separate macros for different characters and different tasks. The former botpersonal.inc file has been split into the genbot.mac file and the botcommon.inc file. genbot.mac now can be customized and renamed to suit your individual characters or even customized for individual tasks on the same character. Botcommon.inc is where all the routines you want to be available to all characters should reside.
AddCommand has been changed to AddCommands, and you no longer need to specify the section, or the sub name, since the sectionname is automatically defined by what Init- section it's in, and the sub name is always Command-commandname. You can add multiple commands with one /call AddCommands line now.
LoadSetting has similarly had the Section name part removed.
AddToggle now enables you to add a .ini setting as part of the AddToggle command. See genbot.mac for more details on how it works. Any toggle which is initialized in the .ini now uses the same name in the .ini as the command. Also, you can use on, off, yes, no, true, false, 1, and 0 in the .ini file just like you can in game for setting toggles.
All arrays except the ones in bothealer have been removed. Bot command response may be slightly faster.
There have been a lot of changes to the .ini files. They have been changed to a default value of bot_BotName.ini. I recommend you recreate your .ini files to get rid of old values that no longer have a purpose.
Removed "reportbuffs". Use "bufflist" command instead.
The warrior taunt disc is no longer assumed to be incite, but is now read from the .ini file.
Autobehind should work now.
Improved moveto to be less sensitive to obstacles, also to /face target for smoother moveto.
Added default value detection to chain nuke and chain stun. If default value hasn't been changed, chainnuke or chainstun commands will be ignored.
Follow no longer automatically targets what it is following.
Added in name verification without checknames, i.e. /g BotName command will work even if checknames is set to false.
Fixed enrage and gate events. There was a missing $ in the event definitions.
Added ascii38's canni AA code and CanniUntilPctHPsLessThan .ini value.
Put in ascii38's better CheckYaulp code.
Fixed casting while at vendor. Bot will no longer try to cast spells if it is browsing a store.
Stop firing of Protect shortcut upon healing by another PC.
Fixed some other stuff I can't remember to add here.
Known issues:
reload command don't work.
Pets of NPCs are tricky to code for. Some commands such as guard will ignore them.
Heal messages from the .ini file don't work.
Multiple genbot initiated heals can exist in the spell queue, so repeated heals may be cast on one char.
If you have your hands full and try to memorize a spell, genbot will loop.
If using Windows XP or 2000, genbot performs much better if Performance Options are set to Background Services. Programs setting can cause slow responses, especially with more than one char on a PC.
Future plans:
Next major release will be a rework of bothealer.inc.
I'm also planning to work a bit on advpath to see if I can stop it from doing the cha-cha in laggy environments.
For other future plans, see the poll: http://macroquest2.com/phpBB2/viewtopic.php?t=8191
Ways you can help:
Bug reports! In this release, I have resolved all major bugs I am aware of, aside from healing issues that will be fixed when I revise that code. Lemme know if genbot is doing anything that doesn't seem right!
I have a lot of plans for genbot, but my programming time is limited, and I kinda like to play with my own bots from time to time as well. Here are some tasks that will make genbot even better, and are in search of sponsors:
Maintain the genbot doc to keep it up to date. Mistole has sent me a genbotdoc.txt including the .ini file, which I am updating for the next release.
Create a scheme for organizing the genbot responses to commands throught the ChatOut subroutine. Genbots responses and response priority levels are pretty random right now, depending on who wrote 'em and their mood that day.
Create a Do-equip routine. Parameters should be either "item_name" or "slot item_name". If slot is named, then routine will attempt to equip that item in that slot, and place other item where ever the first item came from. Bonus points if you can make it handle 2HB and 2HS weapons, as well as putting items in bags into inventory slots. If a slot name isn't given, routine should find what slot the item can be equipped in, and equip it for you. Examples of working code that does something similar are available here: and here:
Give me a PM if you're interest in any of these tasks!
Enjoy the new code, and let me know where it's not working as planned!
--Vexix
P.S. Go here for more of the changelog on the previous version:
http://macroquest2.com/phpBB2/viewtopic.php?t=8383
Genbot.mac 13.3.0
BotCommon.inc 13.3.0
BotMain.inc 13.3.0
BotCore.inc 13.3.0
BotCombat.inc 13.3.2
BotSpell.inc 13.3.1
BotHealer.inc 13.3.1
GenbotDoc.txt 13.3.0
advpath.inc 1.31
advpath2.inc 1.31
Advpath files can be found here: http://macroquest2.com/phpBB2/viewtopic.php?t=8655
Changelog 2004-08-08
Fixed protect/defend crash error when NeverKill value is unchanged from default in the .ini file.
Changelog 2004-08-07
Fixed the canni spell call.
Fixed an error with NeverKill, that might have enabled you to attack something on your NeverKill list. Eek!
Added stopifhealed toggle. Default is on. This checks if the mob you are casting heal on has already been healed over 5% above their normal heal point as set in you .ini file. If so, it aborts the heal.
Added stopforheals toggle. Default is off. This checks if you are casting a non-heal spell, and have a heal spell waiting in the queue. If so, it aborts your non-heal spell, so you can get the heal off first.
Both of these last toggles are untested, since I'm not really in those situations, with only one healer. Try them out, and let me know how it goes!
Intro to 13.3.0
With version 13.3.x, I've finished the rewrite of the basic LoadSetting, AddCommand, and AddToggle subs. Thanks to Nosaj969 for help working through these changes.
This version also has updated documentation, which was long overdue. Take a look, and let me know if anything doesn't match up. Thanks to Daeas for giving me a new template for the helpfile. He's also given me doco for the .ini file, which I still need to go over to update for 13.3.0 format.
Changelog 2004-08-05
Gosh where to start?
I've changed the layout of the files that compose genbot to make it more friendly to separate macros for different characters and different tasks. The former botpersonal.inc file has been split into the genbot.mac file and the botcommon.inc file. genbot.mac now can be customized and renamed to suit your individual characters or even customized for individual tasks on the same character. Botcommon.inc is where all the routines you want to be available to all characters should reside.
AddCommand has been changed to AddCommands, and you no longer need to specify the section, or the sub name, since the sectionname is automatically defined by what Init- section it's in, and the sub name is always Command-commandname. You can add multiple commands with one /call AddCommands line now.
LoadSetting has similarly had the Section name part removed.
AddToggle now enables you to add a .ini setting as part of the AddToggle command. See genbot.mac for more details on how it works. Any toggle which is initialized in the .ini now uses the same name in the .ini as the command. Also, you can use on, off, yes, no, true, false, 1, and 0 in the .ini file just like you can in game for setting toggles.
All arrays except the ones in bothealer have been removed. Bot command response may be slightly faster.
There have been a lot of changes to the .ini files. They have been changed to a default value of bot_BotName.ini. I recommend you recreate your .ini files to get rid of old values that no longer have a purpose.
Removed "reportbuffs". Use "bufflist" command instead.
The warrior taunt disc is no longer assumed to be incite, but is now read from the .ini file.
Autobehind should work now.
Improved moveto to be less sensitive to obstacles, also to /face target for smoother moveto.
Added default value detection to chain nuke and chain stun. If default value hasn't been changed, chainnuke or chainstun commands will be ignored.
Follow no longer automatically targets what it is following.
Added in name verification without checknames, i.e. /g BotName command will work even if checknames is set to false.
Fixed enrage and gate events. There was a missing $ in the event definitions.
Added ascii38's canni AA code and CanniUntilPctHPsLessThan .ini value.
Put in ascii38's better CheckYaulp code.
Fixed casting while at vendor. Bot will no longer try to cast spells if it is browsing a store.
Stop firing of Protect shortcut upon healing by another PC.
Fixed some other stuff I can't remember to add here.
Known issues:
reload command don't work.
Pets of NPCs are tricky to code for. Some commands such as guard will ignore them.
Heal messages from the .ini file don't work.
Multiple genbot initiated heals can exist in the spell queue, so repeated heals may be cast on one char.
If you have your hands full and try to memorize a spell, genbot will loop.
If using Windows XP or 2000, genbot performs much better if Performance Options are set to Background Services. Programs setting can cause slow responses, especially with more than one char on a PC.
Future plans:
Next major release will be a rework of bothealer.inc.
I'm also planning to work a bit on advpath to see if I can stop it from doing the cha-cha in laggy environments.
For other future plans, see the poll: http://macroquest2.com/phpBB2/viewtopic.php?t=8191
Ways you can help:
Bug reports! In this release, I have resolved all major bugs I am aware of, aside from healing issues that will be fixed when I revise that code. Lemme know if genbot is doing anything that doesn't seem right!
I have a lot of plans for genbot, but my programming time is limited, and I kinda like to play with my own bots from time to time as well. Here are some tasks that will make genbot even better, and are in search of sponsors:
Maintain the genbot doc to keep it up to date. Mistole has sent me a genbotdoc.txt including the .ini file, which I am updating for the next release.
Create a scheme for organizing the genbot responses to commands throught the ChatOut subroutine. Genbots responses and response priority levels are pretty random right now, depending on who wrote 'em and their mood that day.
Create a Do-equip routine. Parameters should be either "item_name" or "slot item_name". If slot is named, then routine will attempt to equip that item in that slot, and place other item where ever the first item came from. Bonus points if you can make it handle 2HB and 2HS weapons, as well as putting items in bags into inventory slots. If a slot name isn't given, routine should find what slot the item can be equipped in, and equip it for you. Examples of working code that does something similar are available here: and here:
Give me a PM if you're interest in any of these tasks!
Enjoy the new code, and let me know where it's not working as planned!
--Vexix
P.S. Go here for more of the changelog on the previous version:
http://macroquest2.com/phpBB2/viewtopic.php?t=8383