Genbot v13.2.1 [Updated 07/23/2004] Defend, Guard, Protect!

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

frabtik
a ghoul
a ghoul
Posts: 114
Joined: Sat Feb 21, 2004 10:07 am

Post by frabtik » Wed Jul 21, 2004 10:35 pm

IRC code is incorrect yes, I posted awhile back on it. Should be as you noted in first post, these lines in botcore.

Code: Select all

   } else /if (${ChatIn.Equal[IRC]}) { 
      /i say ${ChatText}
Also noticed some what appeared to be melee type lag and was still on old version without these newer features but haven't been boxing enough recently to check it out yet.

Gerald
decaying skeleton
decaying skeleton
Posts: 3
Joined: Fri Apr 30, 2004 10:15 pm

Post by Gerald » Wed Jul 21, 2004 10:51 pm

In botcore.inc

Code: Select all

Sub Do-invite(string TargetName)
   /if (!${Defined[Param0]}) {
      /call Assist "${MasterName}"
   } else /if (${TargetName.Equal[me]}) {
should be

Code: Select all

Sub Do-invite(string TargetName)
   /if (!${Defined[TargetName]}) {
      /call Assist "${MasterName}"
   } else /if (${TargetName.Equal[me]}) {
Since "Param0" is never defined as you named the param TargetName.

I control my bots out of zone often so it annoyed me that "sn" had been changed to choke if it couldn't assist you for a target. So I changed the top of AssignCastTarget it to use it's current target if assist fails:

Code: Select all

Sub AssignCastTarget(string ACTarget)
   /declare oldTarget string local
   /varset oldTarget ${Target.ID}
   /if (!${Defined[ACTarget]} || !${ACTarget.Length} || ${ACTarget.Equal[0]}) {
      /if (${CastStep}==1 || ${Me.Casting.ID}) {
         /return assist-
      } else {
         /call Assist ${MasterName}
         /if (${Target.ID}) {
            /return id ${Target.ID}
         } else /if (${oldTarget}) {
            /return id ${oldTarget}
         } else {
            /call ChatOut 4 "Unable to /assist you to find a target to cast on."
            /return 0
Then I realized I don't want it to ever assist me at all if it already has a target when I do an "sn" so I changed my copy to

Code: Select all

Sub AssignCastTarget(string ACTarget)
   /if (${Target.ID}) {
     /return id ${Target.ID}
   }
   /if (!${Defined[ACTarget]} || !${ACTarget.Length} || ${ACTarget.Equal[0]}) {
      /if (${CastStep}==1 || ${Me.Casting.ID}) {
         /return assist-
      } else {
         /call Assist ${MasterName}
         /if (${Target.ID}) {
            /return id ${Target.ID}
         } else {
            /call ChatOut 4 "Unable to /assist you to find a target to cast on."
            /return 0
but that's more of a design decision.

I also noticed that if you tell your bot to "reload" it gives about 20 pages of errors, so I assume that's not working right. :)

User avatar
OnyxSys
a ghoul
a ghoul
Posts: 133
Joined: Sun Dec 21, 2003 9:58 pm
Contact:

Post by OnyxSys » Thu Jul 22, 2004 4:31 am

Not sure why, but with the last 2 versions i haven't been able to get the /autoheal 1 toggle to work, when i type 1 (being ON) it still gives me the OFF return text something like "tell me who you want healed.." its late i forget atm what it actually says.. am i doing something wrong?

Caladine
a hill giant
a hill giant
Posts: 164
Joined: Fri Feb 13, 2004 9:29 pm

Post by Caladine » Thu Jul 22, 2004 9:01 am

I seem too recall all the toggles failing in one way or another. I'll have to try this again when I get home from work.

EDIT:
Memory better I hope... I seem to recall that it always set them OFF no matter what.

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Thu Jul 22, 2004 10:36 am

Just wanted to post and say that I tried autobehind last night with just a single box and was still running into the same issue. It seemed to be slightly less frequent, so maybe it was lag related, or maybe I just got lucky.

Defend is quite spiffy though I must add. Being able to define events for defend is quite awesome.

I'm still leery about using Guard, since it appears to break mezzes; maybe I'll use it on my tank bot this weekend for kicks.

One thing I noticed while running my debuff routine though... I have it set up to do sn Hand of Ro, followed by sn Ro's Illumination, followed by sn Ensnare. For some reason, when I fire the macro it clears my target and reacquires it three times before it starts casting. Any idea why?

Also, when the heal prioritization kicks in, it completely forgets the spell it was casting if it was resisted. For example, while running my debuff routine, heal prioritization takes over after Ro's Illumination gets resisted and heals one of the groupmembers, then picks up at Ensnare.

Also, the cast on resist fix you posted for the last version is what I use, since Ro's Illumination tends to get resisted a lot. But, when I run into a Snare Immune mob, it tries to cast ensnare on it until I tell it to stop or the mob is dead. Is there any way to adjust the CastResist event to check for immunity before trying to recast?

I know I give more questions than answers, let me know if I'm badgering you. I'm just doing what I can to help make Genbot work as well as possible.
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]

legion
orc pawn
orc pawn
Posts: 17
Joined: Tue Jan 06, 2004 10:30 am

Post by legion » Thu Jul 22, 2004 2:09 pm

When doing a reload the following is reported : /varset failed, variable 'Commands' not found.
Botcore.inc @171. this is:

Code: Select all

Sub AddCommand(string CmdSect,string CmdPhrase,string CmdRoutine) 
   /varset Commands[1,${TopCommand}] ${CmdPhrase} 
   /varset Commands[2,${TopCommand}] ${CmdRoutine}
Commands var is not declared.

Also when there is something in my toon's pointer it keeps trying to mem a spell but it gets the report you can't open spell book with hands full and just keeps trying. Is there a way to check if something in hands and auto inv it if this happens or do the check whenever it tries to mem a spell? Will have a look myself but not dabbled in MQ2 since it changed from params.

User avatar
Cr4zyb4rd
Plugins Czar
Posts: 1449
Joined: Tue Jul 20, 2004 11:46 am

Post by Cr4zyb4rd » Thu Jul 22, 2004 2:56 pm

/if (${Cursor.ID}) /autoinv

edit: doh

dark_matter
orc pawn
orc pawn
Posts: 22
Joined: Tue Jul 20, 2004 4:11 pm

Post by dark_matter » Thu Jul 22, 2004 6:05 pm

Thanks for all your work on GenBot Vexix, it's awesome! Now... noob question inc...

I'm botting a shaman, I'd like to have him give me feedback on successful debuffs, most importantly slows. I often miss the "A mob yawns." messages in my spell spam window.

So, I haven't had success getting this to work yet, but here's my latest attempt.

First, define the event...

Code: Select all

#event Slowed  "#*# yawns."
Then define the sub...

Code: Select all

Sub Event_Slowed
   /if (${CastStep}) { 
	  /call ChatOut 3 ${MasterName} "${Target.CleanName} has been SLOWED."
      /varset CastStep 6 
      /varset CastLastResult CAST_Successful 
	  }
/return
This was failing with the event as "Your target yawns." I believe the #*# is a wildcard, right?

Any help would be appreciated, thanks!

Vexix
Genbot Janitor
Posts: 245
Joined: Sat Apr 17, 2004 10:10 am

Post by Vexix » Thu Jul 22, 2004 9:40 pm

Wow, guys. Great feedback and comments!

I'm at work now, so I can't give a detailed response. ;) Just know that I am reading and working out how to resolve the issues you've mentioned. Keep 'em coming! When you notice something that seems off about genbot, give a description of what happened vs. what you expected, and I'll work on making it right!

--Vexix

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Thu Jul 22, 2004 10:57 pm

OK, so like Cr4zyb4rd and I got together tonight and did some testing on the casting errors with resists and immunities and we managed to stumble throguh and fix it(actually he did most of the work, I was just the test dummy).

We cahnged around the first couple lines in Cast Step 6 to look like this:

Code: Select all

:gCast-6 
   | Making sure we weren't lied to, and mob was actually immune 
   /if (${CastLastResult.Equal[CAST_Resisted]}) { 
      /varset CastStep 0 
      /return 
   } 
   /if (${CastLastResult.Equal[CAST_StillCasting]}) /varset CastLastResult CAST_Successful 
   /if (${CastInfo.Arg[1,-].Equal[b]} && ${CastInfo.Arg[2,-].NotEqual[s]}) { 
      /call BuffResult ${CastType} "${CastName}" "${CastTarget}" ${CastInfo.Arg[2,-]} 
   } 
   /if (${CastOldTargetID}) /squelch /target id ${CastOldTargetID} radius ${MaxTargetRange} 
   /if (${DebugList.Find[spell]}) /echo CastLastResult ${CastLastResult} 
   /if (${RememSpells} && ${SpellNeedToRemem}) { 
      /memspellset ${DefaultSpellSet} 
      /call ChatOut 6 "Re-memorizing original spells." 
      /varcalc CastStep ${CastStep}+1 
      /return 
   } 
   /call ListDelbyName CastQueue "${CastType};${CastName};${CastTarget};${CastInfo}" | 
   /varset CastStep 0 
   /if (${SitAfterCast}) /varset SitTimer ${DelayBeforeSit} 
   /return 
   | Wait until spells are rememmed to continue 
Now, the bot will cancel the resisted spell the first time it gets an immune message, and it will continue to cast on resists until one lands.

I'd really like to get the ducking out of heals working next, I'll try to bug cr4zyb4rd into screwing with it tomorrow with me.
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]

frabtik
a ghoul
a ghoul
Posts: 114
Joined: Sat Feb 21, 2004 10:07 am

Post by frabtik » Fri Jul 23, 2004 12:18 am

Moveto me, causes bot to take off running like mad man. Tried fixing etc some tonight but no luck so far. Boxing a war I had very little issues and ran pretty smooth.

Had some time to test the aggro code I been working on also, think the bugs are all out of it now, works very well if anyone wants it.

Code: Select all

|Be nice to see if you have ToT or Raid ToT skill.
|This assumes you do since I never group without it.
	/if (${DoTaunt} && ${Me.AbilityReady[Taunt]}) { 
		/if (${Group}>2) {
			/if (${Me.TargetOfTarget.ID}!=${Me.ID}) {
				/if (${Target.Distance}<20) { 
   	   		/call ChatOut 5 ${MasterName} "Taunting ${Target.CleanName}.
   	   		/doability "Taunt" 
	   		} 
	   	}			
		} else {
			/declare TempCalc int local
			/declare HeadingMax int local
			/declare HeadingMin int local
			/varset TempCalc ${Math.Calc[${Me.Heading.Degrees}+180]}
			/if (${TempCalc}>360) /varset TempCalc ${Math.Calc[${TempCalc}-360]}
			/varset HeadingMax ${Math.Calc[${TempCalc}+10]}
			/varset HeadingMin ${Math.Calc[${TempCalc}-10]}
			/if ((${Target.Heading.Degrees}>${HeadingMax})||(${Target.Heading.Degrees}<${HeadingMin})) {
	   		/if (${Target.Distance3D}<20) { 
   	   		/call ChatOut 5 ${MasterName} "Taunting ${Target.CleanName}.
   	   		/doability "Taunt" 
	   		} 
			}
		}
	}
Hope to get to test out some the new features soon.

iusemq2
decaying skeleton
decaying skeleton
Posts: 8
Joined: Wed Jul 14, 2004 2:19 am

Post by iusemq2 » Fri Jul 23, 2004 6:26 am

i have a interesting problem.. sorta .. i use genbot to run my cleric and when i give the commandd autohean on i get this error ..
/varset failed, variable IsHealer' not found
followed by a bunch of code and stuff .. i put ishealer in the ini file and she heals .. just strange to get that error

legion
orc pawn
orc pawn
Posts: 17
Joined: Tue Jan 06, 2004 10:30 am

Post by legion » Fri Jul 23, 2004 6:47 am

I was just curois if it is possible to use the buff spellname on target to keep the mob debuff or mezzed or rooted etc? Tried it last night and didn't seem to work too well. Is there some other way I can cast a debuff or anything similar and the bots will track it and re-do when fades?

Also any ideas on the reload thing? Thanks for helps

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Fri Jul 23, 2004 7:12 am

iusemq2 wrote:i have a interesting problem.. sorta .. i use genbot to run my cleric and when i give the commandd autohean on i get this error ..
/varset failed, variable IsHealer' not found
followed by a bunch of code and stuff .. i put ishealer in the ini file and she heals .. just strange to get that error
Did you edit the ini for the character in question so that DoHeals=1?
It says that you must on the first page in red if you want a toon to run the healing portion of the routines.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

Vexix
Genbot Janitor
Posts: 245
Joined: Sat Apr 17, 2004 10:10 am

Post by Vexix » Fri Jul 23, 2004 9:14 am

Ok! Lemme catch up on the posts:

Sj,

Don't be fooled by the fact that you can enter "snt gate on the pope" and it doesn't give you an error. In the Cast subroutine, it checks the type of spell, and if it is a self only spell, it will ignore whatever you typed after the "on" bit. If you already had that person targeted, fine, but otherwise it won't target them to cast. You can tell when genbot has recognized a self or my group only spell by by the fact that it says, "Casting Gate" instead of "Casting Gate on the pope".

I'm not sure what is causing your issues with the dobuff toggle. In game it's currently the "dobuff" command, which can toggle buffing off and on. I've used it a few times, and seems to work fine. Try it, and see if you can give me an idea of when it works for you and when it doesn't.

Esc working to stop running but "stop" command not working is also a puzzle to me. Here is the code for the Esc key:

Code: Select all

Sub Event_EscKey
   /call Do-stop
/return
All it does is call the stop routine. Can you play around with it some more and let me know any special circumstances?

Ascii,

Damn. Good catch. Dunno how I missed that "Lengh" typo all this time. That might be the cause of some of the errors with running above.

I also found another issue with the MoveTo sub -- namely a /face without the requisite locs after it. Fixed in the 13.2.1 release. Please give it a try and let me know how it works. moveto me is still dead. I'll fix it in the next release.

Frabtik. Thanks for the confirmation on /i say bit. Changed in this release. Oh, and "moveto me" is still broken. Will be fixed in the next release.

Gerald -- Right on the invite stuff. As for your recoding on "sn", actually, the default for snt if done without an "on" clause is to cast on your current target.

Reload command is dead, dead. I'm not working on it since I have other stuff that is higher priority right now. If someone figures out how to bring it back, lemme know, otherwise it's gonna sit at the end of the queue for a bit.

"autoheal" is a retired command. Does nothing. Use "doheal" toggle or "doheals=1" in the .ini instead. It will be removed in the next release.

Caladine -- toggles are working as far as I can see. Lemme know what command is acting weird.

A_Druid -- I know of no method for genbot to realize which mobs are mezzed and which are not. If anyone can think of a method to recognize this, I'd love to hear it.

Good point about recasting on immune mobs. I'll fix that in my next patch as well. I'm thrilled to see someone actually get into my Cast code and make something new work. ;) I was afraid I got a bit to clever with my coding for anyone else to want to take the time to parse through it.

Here's some different code to try: See if it handles the forgetting after heals:

Code: Select all

Sub Event_CastResist
   /if (${CastStep}) {
      /if (${CastLastResult.Equal[CAST_StillCasting]}) {
         /varset CastStep 1
         /varset CastLastResult CAST_Resisted
         /call ChatOut 3 "${Target.CleanName} resisted ${CastType} ${CastName}."
      }
   }
/return
Dark Matter -- Try #event Slowed "#*#yawns." without the space before "yawns". There's a bug in MQ2 events.

Legion -- Nothing in the code to maintain a debuff yet. Will probably be adding it soon.

Thanks for all the comments and code!

--Vexix