Genbot v13.3.2 [Updated 08/08/2004] Slim trim code rewrite!

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

Moderator: MacroQuest Developers

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 Aug 19, 2004 11:02 am

That's basically my reason for using IRC; I just feel it's safer. Even if you use your toon's name in IRC SOE can't get into a passworded channel in an IRC server. My guild regularly uses an IRC channel to chat outside of EQ anyway; so its not like just using IRC is automatically MQ related.

I'm not sure how actively SOE monitors their chat channels and group/gu/wtfever for keywords; but I'd rather err on the side of caution.
[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]

don'tdoit
a lesser mummy
a lesser mummy
Posts: 43
Joined: Tue Dec 31, 2002 12:24 pm

Post by don'tdoit » Thu Aug 19, 2004 12:03 pm

plus you can easily run your own local irc server and have them all use that. that's what i do, and it's most secure. course, i'm not using the irc for chatting with others, etc. just for bot control.

El
a ghoul
a ghoul
Posts: 108
Joined: Mon Dec 29, 2003 12:34 pm

Post by El » Fri Aug 20, 2004 12:08 pm

Vexix, genbot is getting big enough that I'm wondering if it makes sense to have it all in a zip file to download, rather than posting code to copy and paste?

Frank25
a ghoul
a ghoul
Posts: 136
Joined: Thu Aug 12, 2004 6:38 am

Post by Frank25 » Fri Aug 20, 2004 4:38 pm

I've been trying to setup my warriorbot to "guard" my cleric + chanter in a mob rich environment so i can get some exp while being afk.

The problem is when i do the "guard" toggle command it tells me right away "i will defend this area" and within 2 secs "i will NOT defend this area" and basically...not guard

Is there a "bug" in the program i'm missing. I dont get any error messages. I've tried to edit the sub Toggle-Guard but i dont think i'm "smartz" enough to figure it out heh.

Also, when i use genbot macro with 2 or more masters the warbot will ONLY protect an engage targets that attack (or face really) the FIRST named master.
Even setting the protectlist to all my bots does nothing.

Any ideas/hints/tips/flames?

ascii38
a grimling bloodguard
a grimling bloodguard
Posts: 506
Joined: Sat Jul 17, 2004 8:06 pm

Post by ascii38 » Fri Aug 20, 2004 9:16 pm

I don't think the protectlist stuff is implemented yet. I think the guard code only does the master (and probably only the first master, as you found).

I don't use the guard functionality, so I can't comment on the guard function turning on and then immediately turning off, but I wonder if it's related to the double heals that some people are seeing. Something might be getting stuck in a queue somewhere.

greggor
orc pawn
orc pawn
Posts: 28
Joined: Tue Jun 17, 2003 2:30 pm

Post by greggor » Sat Aug 21, 2004 12:15 am

I'm trying to make an automatic debuff/nuke command for my chanter...
here is what I have so far...

killing=assist|/sit off|petattack|snt "howl of tashan"|snt "forlorn deeds"|chainnuke



basically I have trouble with the chain nuke tends to go first tthen it sometimes bothers to tash or forlorn deeds, is there a sub that I can use that actually finishes casting the spell instead of just putting it on the quere? optimally I'd like each command to be completed before the next command starts.

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 » Sat Aug 21, 2004 12:13 pm

I had the same problem firing events like that with my chanter too. the way I ended up doing it was by only firing the 2 debuffs and waiting for them to land; then giving the order to chainnuke.

Also, if you're using EQPlaynice of MQ2FPS and 2 boxing on the same comp; I found my bot response times suck major ass unless I have my bg rendering set to 1. I currently run with fg set to an fps:render of 10:1 and my bg set to 5:1 on a comp with 512 RAM and my bots seem to behave somewhat decently.
[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]

ascii38
a grimling bloodguard
a grimling bloodguard
Posts: 506
Joined: Sat Jul 17, 2004 8:06 pm

Post by ascii38 » Sat Aug 21, 2004 3:44 pm

greggor wrote:basically I have trouble with the chain nuke tends to go first tthen it sometimes bothers to tash or forlorn deeds, is there a sub that I can use that actually finishes casting the spell instead of just putting it on the quere? optimally I'd like each command to be completed before the next command starts.
That's due to the way that chiannuke works. It uses /cast directly rather than putting the nuke spells in the usual cast queue. It should be possible to change it to use the normal casting routines, but they you would probably want to put some kind of flag in routines like the buff maintenance or Canni/Yaulp routines to tell them not to operate while chainnuke is going (or you might not).

greggor
orc pawn
orc pawn
Posts: 28
Joined: Tue Jun 17, 2003 2:30 pm

Post by greggor » Sat Aug 21, 2004 4:35 pm

How bout a stop if killed toggle? that will auto stop the spell you are casting if target dies... :)


also how bout making it so that when it relays tells it che3cks if the tell is from your pet and doesn't relay that tell :)

ascii38
a grimling bloodguard
a grimling bloodguard
Posts: 506
Joined: Sat Jul 17, 2004 8:06 pm

Post by ascii38 » Sat Aug 21, 2004 9:51 pm

greggor wrote:How bout a stop if killed toggle? that will auto stop the spell you are casting if target dies... :)
It does this already for normal spells. It doesn't do it for a spell cast by chainnuke because it doesn't use the normal genbot casting routine to cast a spell in chainnuke. Modifying chainnuke to use the normal spell casting routines would take care of this issue as well as the others already mentioned..
greggor wrote:also how bout making it so that when it relays tells it che3cks if the tell is from your pet and doesn't relay that tell :)
Try changing line 1063 of botcore.inc to

Code: Select all

      /if (${Spawn[${ChatSender}].Master.ID} == ${Me.ID}) /return
I'm not sure what the functionality of the old /if that was here was supposed to be (it wouldn't relay a tell if the sender was located within 100 units) but it didn't seem to work.

ascii38
a grimling bloodguard
a grimling bloodguard
Posts: 506
Joined: Sat Jul 17, 2004 8:06 pm

Post by ascii38 » Sun Aug 22, 2004 1:54 pm

The original /if was to stop tells from vendors from being relayed. So, change line 1063 in botcore.inc from:

Code: Select all

      /if (${Spawn[npc ${ChatSender} radius 100].ID}) /return
to:

Code: Select all

      /if (${Spawn[npc ${ChatSender} radius 100].ID} || ${Spawn[${ChatSender}].Master.ID}==${Me.ID}) /return
This should stop tells from your pet from being relayed and also leave the original functionality to stop vendor tells from being relayed in place.

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

Post by OnyxSys » Mon Aug 23, 2004 3:38 am

I cant get the bot to cast shaman heal spell for some reason "Tnarg's Mending" or even "Kragg's Mending" anyone know why when i put "settankheal tnarg's mending" it says cant find spell..

3djoker
a hill giant
a hill giant
Posts: 167
Joined: Thu Jun 24, 2004 11:19 pm

Post by 3djoker » Mon Aug 23, 2004 6:17 am

this is a shot in the dark but i believe i read somewhere that last patch sony changed some minor things on spell names....... mainly this....

using ` instead of ' i would try that and see if it works. i can't remember who posted about it or where. i just remember reading bout it.

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

Post by frabtik » Mon Aug 23, 2004 9:33 am

Seems I got a double post, deleted this one.
Last edited by frabtik on Mon Aug 23, 2004 10:18 am, edited 1 time in total.

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

Post by frabtik » Mon Aug 23, 2004 9:33 am

I have not noticed the spell name changes, pretty sure that info is incorrect for shaman heals but the post is mostly valid. Probly is your spelling, Daluda's Mending is definately not using the grave symbol ( ` ) instead of ( ' ). Tnarg`s Mending has always been spelled with the grave symbol according to my dated ini files and I think that is how it is now and how it always has been. Anyway in response to couple things, yes Vexix a lot of the changes I have been making in my versions are getting fewer and fewer as you integrate and fix them. Yes I am still running the old code so won't be able to check yet if that stuff was dealt with or not, last time I compared it had not been. A quick glance at the newest posted code shows the same problems with enrage that I posted a fix for several pages back, for tagged mobs. Adding a $ does not change what I showed at all, the code I posted has the $ in it etc. The problem is it matched too exact and will not fire if the mob name has a # sign attached. This effects gate also of course.

Previous posted code is here, not sure if this the best way but it does fix the issue. Doesn't fix the enrage code but does fire the event as it should.

Code: Select all

#event Enraged         "#*#|${Spawn[id ${CombatTargetID}].CleanName.Right[${Math.Calc[${Spawn[id ${CombatTargetID}].CleanName.Length}-1]}]}| has become ENRAGED#*#" 

Code: Select all

#event Offrage         "#*#|${Spawn[id ${CombatTargetID}].CleanName.Right[${Math.Calc[${Spawn[id ${CombatTargetID}].CleanName.Length}-1]}]}| is no longer enraged#*#" 
The actual enrage code has not been changed either so it pretty much has to be broke still too. I haven't had a lot of time to test it though still. The biggest thing I see right off is storing the mobid of the enrage target and then in next line storing a 1 in same var. While this is not what is causing me to die it does prevent getting back on the mob in the offrage code. Maybe you can explain something I am missing but I just can't make sense of why it would do that.

Problem though is it doesn't turn off attack which it seems it should so currently I am putting in extra /attack off in the erage event for now, I am assuming it is lag or too much time between when the event fires and when the actual /attack off statement is given. But hard to test easily since it gets you dead so quickly when it doesn't work. But will post when I do get it working right.

Code: Select all

Sub Event_Enraged 
   /if (${Target.ID}) { 
      /if (${CombatTargetID}) { 
         /varset EnrageVar ${Target.ID} 
         /varset CombatTargetID 0 
      } 
      /varset EnrageVar 1 
   } 
/return 
Code the way I am testing it now.

Code: Select all

Sub Event_Enraged 
	/botsay Testing enrage etc.
   /if (${Target.ID}) { 
      /if (${CombatTargetID}) /varset EnrageVar ${Target.ID} 
   	/attack off
   	/varset CombatTargetID 0 
   } 
/return 

Setting the EnrageVar to 1 of course sets the target back incorrectly in the Offrage code and causes the bot to at best case just do nothing and worst case aggro something it shouldn't or run off etc looking for the mob to aggro. Thankfully there have been more checks added to help make this less deadly like the MaxTargetRange and CampRadius etc. which are working much better than when they were first added.

Code: Select all

Sub Event_Offrage 
   /if (${Target.ID}) { 
      /if (${EnrageVar}) { 
         /varset CombatTargetID ${EnrageVar} 
         /varset EnrageVar 0 
      } 
      /varset EnrageVar 0 
   } 
/return 
Bug in assist code. Always assists the master.

Code: Select all

Sub Assist(string sAssistName) 
   /squelch /target clear 
   /if (${DebugList.Find[core]}) /echo /assist ${sAssistName} 
   /assist ${MasterName} 
   /delay 2s ${Target.ID} 
   /if (!${Target.ID}) /call ChatOut 3 "Unable to /assist ${sAssistName}." 
/return 
Changed to.

Code: Select all

Sub Assist(string sAssistName) 
   /squelch /target clear 
   /if (${DebugList.Find[core]}) /echo /assist ${sAssistName} 
   /assist ${sAssistName} 
   /delay 2s ${Target.ID} 
   /if (!${Target.ID}) /call ChatOut 3 "Unable to /assist ${sAssistName}." 
/return 
Attack code doesn't really attack, think this was mentioned, I just have it commented out for now but pretty sure this is how it used to work and def works better this way if you are driving the bot. Don't like the fact that I gotta have a target for this to work though but will fix sometime. Like to just call that attack command and give a name but easy to work around in my hotkey so it works for now.

Code: Select all

Sub Command-attack 
   /call StandardTarget "${CommandParam}" 
   /if (!${Target.Type.Equal[NPC]} && !${Target.Master.Type.Equal[NPC]}) { 
      /varset CombatTargetID 0 
      /return 
   } 
   /varset CombatTargetID ${Target.ID} 
   /if (!${Me.Standing}) /stand 
   /call ChatOut 5 "Attacking ${Target.CleanName}." 
/return 
Changed to.

Code: Select all

Sub Command-attack 
|  /call StandardTarget "${CommandParam}" 
   /if (!${Target.Type.Equal[NPC]} && !${Target.Master.Type.Equal[NPC]}) { 
      /varset CombatTargetID 0 
      /return 
   } 
   /varset CombatTargetID ${Target.ID} 
   /if (!${Me.Standing}) /stand 
   /call ChatOut 5 "Attacking ${Target.CleanName}." 
/return 

And to finish off since you asked what I am modding, lastly is the taunt code, I have posted code for this several times which makes a night and day difference for a warrior class. The incite code mostly just doesn't cut it, popping your incite disc every 30 seconds is a great way to be sure you have no endurance when you need it. I have since added this to the taunt code and it is very effective this way. I put it inside the taunt code so it is easier to turn on off, meaning taunt must be on to use incite but I can turn off incite and still use taunt. Taunting a mob everytime the button is up is about as useless and only makes it more likely taunt will be down when you need it. Taunting only when you lose aggro is 100% more effective and using this same line of thought with insight makes it more useful and prevents the endurance drain currently in place. Most wars I know had incite completely off because of this.

Code: Select all

|Be nice to see if you have HoTT or Raid HoTT 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 (${DoIncite} && ${InCiteTimer}<=0) { 
			      /squelch /face fast 
			      /disc incite 
			      /varset InCiteTimer 30s 
			   }    
				/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})) && ${Target.PctHPs}>15) {
			   /if (${DoIncite} && ${InCiteTimer}<=0) { 
      			/squelch /face fast 
      			/disc incite 
      			/varset InCiteTimer 31s 
   			}    
	   		/if (${Target.Distance3D}<20) { 
   	   		/call ChatOut 5 ${MasterName} "Taunting ${Target.CleanName}.
   	   		/doability "Taunt" 
	   		} 
			}
		}
	}
So when a new version comes out I like to test and be sure there won't be any surprises of course and I have several fixes I use and I will not use without the improved aggro code.
Anyway but not complaining about new and better, I understand how it all works and love the new features. I was just explaining why sometimes I can't or don't just jump to a new version. It really sucks when you get your whole group killed cause the tank trains them or something dumb cause I didn't test the new one works how it should etc. And if the old one works and doesn't add anything I need, sometimes updating gets done slow, more fun to play eq than debug genbot etc when you have a version that works fine.

Anyway hopefully I will get to look at newer one soon but mostly the problems I have look the same and I am in no rush to move my fixes into a newer version.

Some the other stuff is just minor, commands to keep bot from attacking faction mobs etc in GoD. Thanks for all the hardwork though, doing a great job here. Hope that a bit easier to read understand, I tried.