genbot.mac Bot for any class.

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

GLoBB

Oversight?

Post by GLoBB » Mon Oct 20, 2003 2:28 am

Me agian =)

Noticed you had "forgot" or elft out to set and heal class for bard. might be why i dont get the autoheal to work, =)

PS, gave my cleric a tell /t cleric fight, and it crashed the macro. wanted him to help melee but didnt work.

GLoBB

Tried your new code

Post by GLoBB » Mon Oct 20, 2003 3:20 am

Updated al the files, and when i try to start the genbot.mac, i get following error

Ending macro: Bad variable in /var function
bothealer.inc@76 (CheckGrpHealth): /varset BreakOut 0
genbot.mac@58 (Main): /call CheckGrpHealth

Have no idea what it means, just figured since noone posted about it, id do it so you guys who know what it means can fix it .

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Re: Oversight?

Post by grimjack » Mon Oct 20, 2003 3:27 am

GLoBB wrote:Me agian =)

Noticed you had "forgot" or elft out to set and heal class for bard. might be why i dont get the autoheal to work, =)

PS, gave my cleric a tell /t cleric fight, and it crashed the macro. wanted him to help melee but didnt work.
When posting problems please include the Version and date on the files you are using. I do a lot of updates and I can't help without knowing what versions you have. Also please post any error output that you get.

I had forgot the bard. It's in the caster heal section now.

There is no fight command, so I don't see how it could have crashed the macro.

There is an attack command and as far as I know there is no problems with it at the moment.
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Re: Tried your new code

Post by grimjack » Mon Oct 20, 2003 3:31 am

GLoBB wrote:Updated al the files, and when i try to start the genbot.mac, i get following error

Ending macro: Bad variable in /var function
bothealer.inc@76 (CheckGrpHealth): /varset BreakOut 0
genbot.mac@58 (Main): /call CheckGrpHealth

Have no idea what it means, just figured since noone posted about it, id do it so you guys who know what it means can fix it .
It looks to me like you forgot to update botcore.inc. That is where BreakOut is defined.
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

GLoBB

Thanks

Post by GLoBB » Mon Oct 20, 2003 3:12 pm

Yupp, still had 6.5 of botcore. like i said, i know how to ctrl-c/ctrl-v but thats about it =)

Thanks for a great macro Grim

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Mon Oct 20, 2003 6:16 pm

Updated bothealer.inc
v7.1 now

It had another bug with healing groupmembers. I think it's fixed now.
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

Guest

Post by Guest » Tue Oct 21, 2003 1:21 pm

Great work, simply amazing!

Two very small workarounds. When you do sn me on a beastlord it targets whatevers closer since our pets have the same name(ie tiger & tiger's warder), healbot targets fine just not sn. Also /tell bot sn swift like the wind me, always assisted master and targeted mob. kinda like their is too many words so it ignores the me on the end. I looked at it, but im just not enough of a programer yet to figure it out.

Thanks and Gooday!

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Wed Oct 22, 2003 3:05 am

Anonymous wrote:Great work, simply amazing!

Two very small workarounds. When you do sn me on a beastlord it targets whatevers closer since our pets have the same name(ie tiger & tiger's warder), healbot targets fine just not sn. Also /tell bot sn swift like the wind me, always assisted master and targeted mob. kinda like their is too many words so it ignores the me on the end. I looked at it, but im just not enough of a programer yet to figure it out.

Thanks and Gooday!
sn does not take a target as an argument. It's a generic command that is really only for use if you didn't make a command for the spell you need. Since spell names are not a set length everything after sn is read in as the spell name.

Thanks
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

blakbelt
a lesser mummy
a lesser mummy
Posts: 70
Joined: Wed Aug 27, 2003 12:40 pm
Location: Scotland UK

Post by blakbelt » Wed Oct 22, 2003 3:37 am

THe first line of your Do-sn code is /assist @MasterName making it sometimes impossible to /target someone and then sn a spell to them.
Blakbelt

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Wed Oct 22, 2003 4:43 am

blakbelt wrote:THe first line of your Do-sn code is /assist @MasterName making it sometimes impossible to /target someone and then sn a spell to them.
The sn command is not supposed to be advanced. It's a generic command. It's designed to cast a spell by name on whoever the master has targeted. I only use it for spells that I didn't make a specific command for. If you want something more advanced that can be cast on something that the master doesn't have targeted, you need to make your own command for it. Here is an example from my personal.inc for my wizard.

Code: Select all

Sub Do-ice
   /if $defined(Param1)==FALSE {
      /assist @MasterName
   } else /if $defined(Param2)==FALSE {
        /if "@Param1"=="me" {
           /target @MasterName
        } else /if "@Param1"=="yourself" {
           /press F1
        } else /if "@Param1"=="$char(name)" {
           /press F1
        } else /target "@Param1"
   } else /if $defined(Param3)==FALSE {
      /target "@Param1 @Param2"
   } else /if $defined(Param4)==FALSE {
      /target "@Param1 @Param2 @Param3"
   } else /target "@Param1 @Param2 @Param3 @Param4"
   /delay 5
   /tell @MasterName Draught of Ice on %t.
   /call SpellSub "Draught of Ice"
   /if "@SitAfterCast"=="1" /sit on
/return
Thanks
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

blakbelt
a lesser mummy
a lesser mummy
Posts: 70
Joined: Wed Aug 27, 2003 12:40 pm
Location: Scotland UK

Post by blakbelt » Wed Oct 22, 2003 6:35 am

Nothing more advanced just gonna remove the /assist part so that i can use a hotkey like

/target blahblah
/pause 15
/tell bot sn Virtue

etc
Blakbelt

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Wed Oct 22, 2003 7:59 am

blakbelt wrote:Nothing more advanced just gonna remove the /assist part so that i can use a hotkey like

/target blahblah
/pause 15
/tell bot sn Virtue

etc
Why remove the assist?

With assist you /target blablah
You tell bot sn Virtue
The bot assist's off of you and targets blablah
Bot casts Virtue.

I guess if you play with attack on assist that could be a problem but I don't recomend runinng a bot with attack on assist. I really don't recomend playing in general with attack on assist.

Thanks
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

blakbelt
a lesser mummy
a lesser mummy
Posts: 70
Joined: Wed Aug 27, 2003 12:40 pm
Location: Scotland UK

Post by blakbelt » Wed Oct 22, 2003 8:31 am

If i am in the middle of a fight as a monk (being main tank) taking my timne to target someone that asks me for a buff and then hitting SN will probably lose me aggro... So i use hotkeys one is assist, i type target blahblah in and another hotkey for the sn message
Blakbelt

chickenisgoot
a ghoul
a ghoul
Posts: 84
Joined: Tue Oct 07, 2003 10:52 am

Weird double casting issue

Post by chickenisgoot » Wed Oct 22, 2003 9:01 am

I get a crazy bug sometimes where the following code
Sub Do-ch
/if "$char(class)"!="Cleric" /return

/if $defined(Param1)==FALSE {
/assist @MasterName
/delay 3
} else /if $defined(Param2)==FALSE {
/if "@Param1"=="me" /target @MasterName
/if "@Param1"!="me" /target "@Param1"
/if "@Param1"=="@BotName" /press f1
} else /if $defined(Param3)==FALSE {
/target "@Param1 @Param2"
} else /if $defined(Param4)==FALSE {
/target "@Param1 @Param2 @Param3"
} else /target "@Param1 @Param2 @Param3 @Param4"

/call SpellSub "Complete Healing"
/return
or
Sub Do-slow
/if "$char(class)"!="Shaman" /return

/if $defined(Param1)==FALSE {
/assist @MasterName
/delay 3
} else /if $defined(Param2)==FALSE {
/if "@Param1"=="me" /target @MasterName
/if "@Param1"!="me" /target "@Param1"
/if "@Param1"=="@BotName" /press f1
} else /if $defined(Param3)==FALSE {
/target "@Param1 @Param2"
} else /if $defined(Param4)==FALSE {
/target "@Param1 @Param2 @Param3"
} else /target "@Param1 @Param2 @Param3 @Param4"

/call SpellSub "Turgur's Insects"
/return
will recast the spell right after it has been cast once. My cleric will sometimes try to ch me twice (Most of the time I have run out of range to pull again and I get the out of range error) or my shaman will slow the mob twice in a row.

Any ideas?

I am using version 7.1 of the genbot.

LordGiddion
a snow griffon
a snow griffon
Posts: 352
Joined: Sat Sep 13, 2003 6:12 pm
Contact:

Movement enhancments

Post by LordGiddion » Wed Oct 22, 2003 12:01 pm

Add obsticle detection to MoveToAnchor cause the bit sometimes gets stuck heading "Home"

Code: Select all

Sub MoveToAnchor 
   /varset countdown 0 
   /varset MyXLoc $char(x) 
   /varset MyYLoc $char(y)
   :AnchorMoveLoop 
   /if @IsAnchored==0 { 
      /sendkey up up 
      /return 
   } 
   /doevents 
   /if n @Combatstatus==1 { 
      /sendkey up up 
      /return 
   } 
   /if "$char(state)"=="SIT" /stand 
   /face loc @AnchorX,@AnchorY 
   /if n $distance(@AnchorX,@AnchorY)>11 /sendkey down up 
   /if n $distance(@AnchorX,@AnchorY)<=11 { 
      /sendkey up up 
      /return 
   } 
   /if n @countdown>=3 { 
      /call Detectobst 
      /varset countdown 0 
   } 
   /varadd countdown 1
   /goto :AnchorMoveLoop 
/return 
and added the same logic to Fastmove when chasing mobs, but the check only happens when the mob is out of range - otherwise the bot would be running stupid circles arround the mob.

Code: Select all

|Fastmove 
|Called by Rangesub for when mob is more than /press distance away. 
|Usage: /call Fastmove 
Sub Fastmove 
   /varset countdown 0 
   /varset MyXLoc $char(x) 
   /varset MyYLoc $char(y)  
   :fastmoveloop 
   /doevents 
   /if $target()=="FALSE" { 
      /varset Combatstatus 0 
      /sendkey up up 
      /if $combat=="TRUE" { 
         /attack off 
         /return 
      } 
   } 
   /face fast look nopredict 
   /if n $target(distance,nopredict)>@FastRange { 
      /sendkey down up 
   } 
   /if n $target(distance,nopredict)<=@FastRange { 
         /if @Combatstatus=="1" { 
            /if @EnrageVar=="0" { 
            } 
         } 
      /sendkey up up 
      /return 
   } 
   /if n @countdown>=3 { 
      /call Detectobst 
      /varset countdown 0 
   } 
   /if n $target(distance,nopredict)=>$calc(@FastRange*3) /varadd countdown 1
   /goto :fastmoveloop 
/return 
and last peice of movement logic (GrimJack is checking to see how this effect rogues and GoBehind) Bot more aggressivly closes with fleeing mobs stop the bot from having to follow the mob half way across the zone.
Grim: I moved the Calculation for mob facing after the bot /face works a but cleaner.

Code: Select all

Sub Rangesub
   /declare mobface local 
   /face fast look nopredict 
   /varset mobface $char(heading)
   /varadd mobface 180
   /varcalc mobface @mobface%360
   /if $target(state)!=DEAD {
      /if (n $target(heading)>$calc(@mobface+10) || n $target(heading)<$calc(@mobface-10)) {
         /call Fastmove
         /return
      }
   }  
   /if n $target(distance,nopredict)>=@FastRange /call Fastmove 
   /if n $target(distance,nopredict)>@RangeMax { 
      /press up 
   } 
   /if n $target(distance,nopredict)<@RangeMin { 
      /press down 
   } 
/return