Genbot.mac 13.2.0
BotCore.inc 13.2.1
BotCombat.inc 13.2.1
BotSpell.inc 13.2.1
BotHealer.inc 13.2.0
BotShortCut.inc 13.2.0
Personal.inc 13.1.0
GenbotDoc.txt 12.38
I'm in the middle of doing a major rewrite of the format of AddCommand and Toggles in genbot, with help from Nosaj969. In the meantime, I've already finished the Guard, Protect, and Defend code as well as finally consolidating the six moveto routines into one to make movement much easier to manage.
This release is dedicated to Averad, who got me my gmail account.
Changelog 2004-07-23
Fixed some issues with the new moveto subroutines.
Increased the default check radius for Protect and Defend from 20 to 50. You may want to change this in your .ini.
Increased the range of angles for which Protect will fire. Now will fire 1 in 36 times instead of 1 in 120. Definitely not to be used in town.
Changed /irc to /i say.
Changed /assist command to attack.
Changelog 2004-07-19
New commands:
defend - toggle - Will cause the bot to attack back if attacked, and fire off the EventDefend shortcut from the .ini, which you can program to include /discs or dots or whatever. For the more faint of heart, another possibility is
EventDefend=/botsay You kill NameS. I'm outa here!|snt gate
The beagg toggle is now replaced by Defend.
guard - toggle - Will cause the bot to defend an area, and attack all NPCs that enter it. (Pets are fine, however.) Radius of guard area is set in the .ini file under GuardRadius. Not that setting guard automatically sets the bot anchor, and lifting the anchor will turn off guard.
Guard will fire the EventGuard shortcut.
protect - toggle - Will cause the bot to watch the closest NPC to it's master, with the radius set in the .ini file, to see if it is look at is master. If it is, then the bot will attack, and fire off shortcut "EventProtect". Use with caution! The "is looking at" check is pretty sensitive, and only accepts results within +-1 degree, which means it only has a false positive 1 in 120 times. Nonetheless, if you hail a pc, many of them will face you, which your bot will interpret as an attack and rush to your defense. Genbot is not responsible for your bot killing your quest NPC.
Protect will fire the EventProtect shortcut.
In the future, I'll implement ProtectList, so your bot can watch more than just it's most recent master.
For shortcuts for the three above attack toggles, NameS will be the name of the mob that triggered it, and "snt spell" without "on xxx" will automatically cast on the mob that triggered it, unless it's dead.
Added stop command functionality to the Esc key. Handy if you're watching from the bot screen, and see that the bot is about to murder a quest npc.
Fixed shortcuts NameS only taking the first word of any text passed to it.
Fixed heal prioritization bug that was stopping heals from jumping to the head of the cast queue.
Fixed a melee bug with "Cannot see target" immediately after a spell sending bot into an infinite loop.
Stopped NPC tell relay spam when shopping. If you get a tell from the nearest NPC to you, it will be ignored.
Changed "healing" and "buffing" toggles to "doheal" and "dobuff". The term "healing" is often used in healing messages, which was sending the bot into infinite loops.
Really fixed MasterName and /gb command confusion. Some other commands other than assist also relied on MasterName being the name of the real PC master instead of becoming "botname" after /gb commands, so I recoded it so that MasterName is never equal to the bot's name. Tells will still become /echos if the last command was sent locally, but the bot never forgets who the real master is.
Started consolidating toggle code to allow calling additional subs to allow for non-standard toggles. For instance guard has a dependency on the anchor being set.
Added pets of NPCs in as viable combat targets. Pets of NPCs are tricky to code for. Some commands such as guard will ignore them.
Added "/assist off" command to botcore initialization. Genbot uses /assist for many things, such as "heal", for which attacking the target is inappropriate.
Fixed genbot movement routines to allow interrupts when hitting an object or traveling a long distance. No more turning off genbot just to stop it from walking into walls. "stop" command or Esc key should do the trick now.
I know many of you are wondering just what the heck "RangeMax, RangeMin, FastMin, and FastRange" are in the .ini file. Well, I'm afraid now you will never know. I have replaced all 4 of them with one MeleeRange .ini setting, which controls how close you stand to the mob when doing melee.
Known issues:
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.
Task and spell overlap is not handled well. Requesting tasks in the middle of spells may not 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 release will be an internal coding and streamlining of the commands. Im unifying most of the toggle commands and their .ini entries, as well as simplifying the AddCommand and AddToggle subs.
Release after that one will be a rework of bothealer.inc.
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.
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!
Questions:
Does anyone use "behind" and "getbehind" commands? They seem kinda useless to me, since I would tend to control whether the bot attacks from behind with the "autobehind" toggle, and not on a fight to fight basis. Unless someone likes them, they may disappear in the next genbot release.
Does ${String[ABCDE].Find[bcd]}==2 for all compilers of MQ2? It works on mine, but I've had others who had caps/lower-caps issues, and I was wondering if on some other compilers Find might be case sensitive.
Is ${Spawn[]} within a radius of specified loc working now? What's the format?
I'm considering changing most toggles to a "doxxxx" format, like "doheals" instead of just "xxxx" to prevent misunderstanding. What do you think? Good idea?
Which is the correct format for IRC? "/irc ${ChatText}" or "/i say ${ChatText}"? Mackster has mentioned it is the later, but I think I remember someone else saying that it was fine as is. I don't use this, so I have no idea. Should this be changed?
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?p=55811

