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

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Fri Aug 06, 2004 7:12 pm

Started to play with this today. I am botting a high level shammy and using it to PL a lowbie toon. Right now I dont seem to be able to get autoheal to work I have to ask for a heal when required. Also the buff timers are a little off, I assume this is do to items effecting the buff time and genbot is not getting the correct value.

Ill have a closer look tomorrow and see if i can find out whats going on.
Fippy

This is my girl. But Rizwank had her first :-)
[img]http://www.btinternet.com/~artanor/images/fairy_bounce09.gif[/img]

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

Post by ascii38 » Fri Aug 06, 2004 8:44 pm

To fix Cannibalize spell, change the following in Sub CheckCann

Code: Select all

      /if (${Me.PctMana}<95 && ${Me.PctHPs}>=${CanniLimit} && ${CannTimer}<=0 && !${CastQueue.Length}) {
         /call ExecCommand ${CanniSpell}
         /varset CannTimer 1
      }
to

Code: Select all

      /if (${Me.PctMana}<95 && ${Me.PctHPs}>=${CanniLimit} && ${CannTimer}<=0 && !${CastQueue.Length}) {
         /call AddCast "${CanniSpell}" ${Me.Name} buff
         /varset CannTimer 1
      }
The change is on line 726 in that file.

I also put my Quiescence check back in there on my version, so it can be copied out of the 13.2 thread if anyone else wants their Shaman to auto-Q.

As an aside, if you don't have over (about) 2410 max HP, you will never cast Canni5. It would not then be possible, even at full hit points, to loose the 1924HP and not be below 20% of max. I watched my Shaman while Canni IV was disabled and as soon as he had enough hit points he Canni5'd, which brought him to exactly 20%. I think I *might* have managed to do the math right. :lol:

zigzags
decaying skeleton
decaying skeleton
Posts: 8
Joined: Sat Jul 10, 2004 3:23 pm

Post by zigzags » Fri Aug 06, 2004 10:14 pm

Fippy wrote:Started to play with this today. I am botting a high level shammy and using it to PL a lowbie toon. Right now I dont seem to be able to get autoheal to work I have to ask for a heal when required. Also the buff timers are a little off, I assume this is do to items effecting the buff time and genbot is not getting the correct value.

Ill have a closer look tomorrow and see if i can find out whats going on.
If you are ungrouped you have to issue the watchtarget command.

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

Post by Vexix » Sat Aug 07, 2004 12:07 am

ascii38 got it. If you're not talking about the AA ability, but rather the spell cannibalize, then /call ExecCommand ${CanniSpell} should be /call AddCast "${CanniSpell}" ${Me.Name} buff . I was thinking of changing it so that you could put shortcuts or other commands in there, but it doesn't really seem to have a point, so nevermind. Change it back and canni should work ok.

Note for the /alt ability Cannabalize, ascii's changes add some conditions to casting, that make sure you won't get low-hp frenzy. If you don't have more hps than he requires, it won't fire for you.

Mackster -- Pet backoff can be added. I'll put in on my list.

The recast bit is also doable, but it's a few additions down the road. I've been thinking a bit about the ChainCast subs (ChainNuke & ChainStun), and I'm going to remake those subs into a .ini chain of spells you specify, which will automatically cast in a loop for you, and refresh spells before they wear out. This will enable you to snare and recast, lock down mobs with mez, and other cool stuff.

In the meantime, if you look back at Genbot 13.2.x, Cr4zyb4rd and myself both put up some code changes that will change the default action to recast for you. Take a look at them.

Fippy - Make sure you have the new .ini file set up for heals correctly. It's now called bot_BotName.ini instead of genbot_BotName.ini. I had similar problems until I realized I hadn't entered in any of my heal spells yet.

--Vexix

mackster
a ghoul
a ghoul
Posts: 95
Joined: Mon Sep 09, 2002 3:02 pm

Post by mackster » Sat Aug 07, 2004 12:34 am

Thanks Vexix. This macro fucking rules. :cool:

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

Post by Vexix » Sat Aug 07, 2004 1:47 am

By the way, if anyone out there knows the MQ2 code well, please take a look at my request to implement Math.Direction[y,x:y,x] and Spawn.Direction[y,x]. http://macroquest2.com/phpBB2/viewtopic.php?p=61866

I put down the MQ2 code to do it, but if someone could look into the MQ2 C++ code and write down how to implement it in the MQ2 C++ code, the devs will be more likely to put it into the base build.

I've been playing with some hunter macs lately, and I have some ideas to solve the granddaddy issue of pulling in open spaces -- how to path around the aggro mobs you don't want to pull and pull the mob you do want.

Once I finish that, the next step will be to teach genbot to remember everywhere it hits an fixed obstacle, and route around them in the future. For instance, everytime it hit a tree, it would log the loc of the tree, and avoid it every times it comes near in the future.

From there we create genbot-maps, that represent all of the walls as immovable objects, and then genbot figures out how to find it's way through mazes without any master guidance or pre-recorded pathing.

:twisted: Ok. That may be a loooooong ways off. ;)

--Vexix

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

Post by Vexix » Sat Aug 07, 2004 9:40 am

I just put in some test versions of stopifhealed and stopforheals toggles, to control if you abort heals if target is already healed, or if you abort other spells like nukes in favor of heals, respectively.

Lemme know if they work.

--Vexix

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Sat Aug 07, 2004 11:45 am

Vexix wrote:
I've been playing with some hunter macs lately, and I have some ideas to solve the granddaddy issue of pulling in open spaces -- how to path around the aggro mobs you don't want to pull and pull the mob you do want.

Once I finish that, the next step will be to teach genbot to remember everywhere it hits an fixed obstacle, and route around them in the future. For instance, everytime it hit a tree, it would log the loc of the tree, and avoid it every times it comes near in the future.

From there we create genbot-maps, that represent all of the walls as immovable objects, and then genbot figures out how to find it's way through mazes without any master guidance or pre-recorded pathing.

:twisted: Ok. That may be a loooooong ways off. ;)

--Vexix
Pathing around areas I put in my hunter.mac scripts about 2 years ago (prolly still in the old macros section of the forum). It was a real simple array defining a set locs with a radius to avoid them by. It worked ok until you got to 10 or more locs to avoid then it started to lag bigtime. I think it might be a better solution to create a mesh of valid locs for each zone and then use an implementation of the A* algorithm to find a path for you. A better solution would be if somebody could find the function eq uses for collision detection and hook into that so you could do some premptive checking around the front of your character. I did get this working ok using the LineOfSight function but that only works in some zones (old zones have a lot of see through terrain) unfortunatley I lost the code in a reformat and since it didnt do what I wanted so I never bothered to re-code it.
Fippy

This is my girl. But Rizwank had her first :-)
[img]http://www.btinternet.com/~artanor/images/fairy_bounce09.gif[/img]

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 07, 2004 7:27 pm

Botted a warrior with it today and it did quite spiffy. I was doing all the pulling and everything manually, but once I started attacking genbot did a better job at keeping aggro for me than I can do manually.

I'll play around with the new healer code tonight, I hope it works as well as it looksl ike it will.
[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]

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

Post by Vexix » Sat Aug 07, 2004 9:19 pm

Fippy,

Can you track down the code where you implemented that before? I took a bit of a look, but with 400 posts, I hope you can find it faster than I can. ;)

I do think that the speed of calculation and data storage will be key for the full blown maze avoidance part. I don't think line of sight will be that helpful, since often I'm going over hills. For the aggro mob avoidance, this should be ok, since we can use NearestSpawn to just check the closest mobs. Working with a whole zone worth of unmovable objects will be quite another matter. I working on ways that we could store the data such that retrieving the objects within 200 ft would be quick and light. Store lines of data as binary: 00001110000000100000, and use AND bit operation to find the ones near me? Store each bit as an independant variable, ala Coord-100-neg200 boolean?

If we could get the search fast enough, we could even use the eq-tools maps. That'd be amazing. :twisted:

Ah well. That's a ways off. For now I'm working on applying grease to genbot, so it slides around obstacles using strafe. ;)

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

OK, ran into errors when using protect and defend. Here's what I'm getting returned when the macro terminates:

Code: Select all

Failed to parse /if condition '()', non-numeric encountered
botcore.inc@135 (CoreMain):/if (${Macro.Return}) {
botmain.inc@70 (Main): /call CoreMain
Only get it if I turn protect/defend on, haven't played around to see which is triggering it, since I was in a hurry to fix it and I just turned both off. I didn't have any problems with the new heal interrupts or the meleeing though. I just had to manually sic my druid on mobs once they got to camp instead of have him pop up and attack automagically.
[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]

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

Post by Vexix » Sun Aug 08, 2004 12:20 am

A_druid,

Change:
Sub CheckNeverKill(int CheckID)
/declare GenFor int local
/if (!${Defined[CheckID]}) /declare CheckID int local ${CombatTargetID}
/if (${NeverKill.Equal[${NeverKill-DefaultValue}]}) /return
/for GenFor 1 to ${Math.Calc[${NeverKill.Count[|]}+1]}
/if (${Spawn[${CheckID}].CleanName.Find[${NeverKill.Arg[${GenFor},|]}]}) {
/if (${CombatTargetID}==${CheckID}) /varset CombatTargetID 0
/return 0
}
/next GenFor
/return 1
To:
Sub CheckNeverKill(int CheckID)
/declare GenFor int local
/if (!${Defined[CheckID]}) /declare CheckID int local ${CombatTargetID}
/if (${NeverKill.Equal[${NeverKill-DefaultValue}]}) /return 1
/for GenFor 1 to ${Math.Calc[${NeverKill.Count[|]}+1]}
/if (${Spawn[${CheckID}].CleanName.Find[${NeverKill.Arg[${GenFor},|]}]}) {
/if (${CombatTargetID}==${CheckID}) /varset CombatTargetID 0
/return 0
}
/next GenFor
/return 1

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

Post by Vexix » Sun Aug 08, 2004 1:46 am

Welp, I just updated advpath.inc (http://macroquest2.com/phpBB2/viewtopic.php?t=8655) to fix some of the stuttering and cha-cha-cha issues in laggy environments. ml2517 was kind enough to give me permission to post my updates, so I guess now I'm officially Janitor of advpath.inc too!

My Janitorial duties are growing! Soon, I will be JANITOR OF THE WORLD!!! MUAHAHAHAAhahah. . . wait. . . Do I really want that job. . .?

--Vexix

mackster
a ghoul
a ghoul
Posts: 95
Joined: Mon Sep 09, 2002 3:02 pm

Post by mackster » Sun Aug 08, 2004 2:29 am

Vexix wrote:My Janitorial duties are growing! Soon, I will be JANITOR OF THE WORLD!!! MUAHAHAHAAhahah. . . wait. . . Do I really want that job. . .?

--Vexix
My bathroom needs to be cleaned! :lol:

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

Post by Vexix » Sun Aug 08, 2004 3:26 am

Hmm. . . Wait on those plans of World Janitoring. Something not working in the code I posted. Working it out now. :)