Grouping/Botting Beastlord

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

Moderator: MacroQuest Developers

theduck
orc pawn
orc pawn
Posts: 26
Joined: Mon Dec 15, 2003 4:24 am

Grouping/Botting Beastlord

Post by theduck » Mon Dec 15, 2003 4:32 am

My first submission, but definately not my first macro. Hopefully, people will find this as useful as I have, and even make some suggestions for improvement. I have a 65 Beastlord that I almost always 2 box since I took over that account when a friend gave it to me. As such, I can't always pay attention as I sometimes 2-4 box in groups farming or whatever.

This macro will only work if the beastlord is in the group (by design, if you want to change it, that's fine, if you want to post it, that's fine too, but please make a separate thread for it if you want to change the fundamentals of what this was designed to do).

He will keep you buffed (more or less...), he will keep you hasted (more or less...) and he will summon a pet and melee.

This, like every other macro has various bits and pieces copied from other scripts and adapted to suit the nature of this macro. A big thanks goes out to those who've helped make this possible.

Now, the macro:

Code: Select all

| Auto Beastlord Script
| Shamelessly modified from the autorogue script... 
|
| Version 1.00   04/DEC/2003 
| 
| Usage: /macro autorogue <Tank Name> <FOLLOW/STAY> {Leaving second param blank will use STAY mode}
| 


#Event Enraged "has become ENRAGED" 
#Event Offrage "is no longer enraged" 
#Event Slainby "You have been slain by" 
#Event Slowed "loses their fighting edge"
#Event Ferocity "as you descend into ferocity"
#Event Dominion "An aura of spiritual command envelops you"
#Event Vigor "You feel imbued with spiritual vigor"
#Event HasteSelf "You feel much faster."
#Event HasteOther "feels much faster."
#Event HastePet "growls with the ferocity of Sha."
#Event Outofmana "Insufficient Mana to cast this spell!"
#Event OutofRange "Your target is out of range, get closer!"
#Event SlowResist "Your target resisted the Sha`s Revenge spell."
#Event WontHold "Your spell did not take hold."
#Event Immune "immune to changes in it's attack"

#include routines.mac 
#turbo @turboamount 

Sub main 

| ----- Trigger Declares --------------------- 
/Declare assisthealth    global 
/Declare turboamount     global 
/Declare engagedistance  global 
/Declare spellstatus     global
/Declare maxslowattempts global
/Declare followmode      global | 1 = True, 0 = False

| ----- Trigger Values ----------------------- 

/Varset assisthealth     95   | Wait until mob is below this health trigger. 
/Varset turboamount     380   | Turbo Amount, Change at your own risk. 
/Varset engagedistance  150   | How close mob must be to engage 
/Varset maxslowattempts   3   | How many times you will attempt to slow before giving up for this mob.
/varset followmode        0   | Default to off

| ----- Variables ---------------------------- 
/declare targetname      global 
/Declare targetid        global 
/Declare tankname        global 
/Declare attacktarget    global 
/Declare tempvar         global | Simple tempvar 
/Declare behindtarget    global | 1 = True, 0 = False 
/Declare targetenrage    global | 1 = True, 0 = False 
/Declare slowattempts    global

   /echo "Auto Beastlord Script Running" 
   /varset tankname @Param0 
   /echo "@tankname is assist tank." 
   /varset tempvar 0 
   /if @Param1=="FOLLOW" {
      /varset followmode 1
      /echo FOLLOW mode enabled
   } else /echo FOLLOW mode disabled
   /goto :Wait 
   /goto :Attack 
/return 

:Wait 
   /if "$gm"=="TRUE" {
      /sit
      /camp
      /return
   }
   /if n $group(count)==1 {
      /sit
      /camp
      /return
   }

   /if n $char(buff,"Spiritual Dominion")==0  /call CastSD
   /if n $char(buff,"Spiritual Vigor")==0 {
      /if n $char(buff,"Brell's Stalwart Shield")==0 /call CastSV
   }
   /if n $char(pet)==0 /call SummonPet
   /if n $char(buff,"Celerity")==0 {
      /if n $char(buff,"Speed of Vallon")==0 {
         /if n $char(buff,"Vallon's Quickening")==0 {
            /call HasteSelf
            /call HasteTank
            /call HastePet
         }
      }
   }

:Follow
   /if n @followmode==1 {
      /target @tankname
      /if n "$target(distance)">=25 {
         /if n "$target(distance)"<=150 {
            /face fast
            /sendkey down up
            /delay 10
            /sendkey up up
         } else {
            /gsay %t is too far away for me to follow. | Don't remove this...you WILL train yourself...eventually.
            /delay 500
         }
      }
      /if n "$target(distance)">=100 /goto :Follow
   }
   
:Assist
   /assist @tankname 
   /delay 5 
   /if "$target()"=="FALSE" { 
      /target @tankname 
      /if "$target()"=="FALSE" { 
      | If the person you've set this marco to assist isn't in the zone for whatever reason...camp.
         /sit
         /camp
         /return
      }
      /goto :Wait 
   } 
   /if "$target(type)"!="NPC" { 
      /target @tankname
      /goto :Wait 
   } 
   /if n @tempvar!="$target(hp,pct)" /echo $target(name,clean) targeted at $target(hp,pct)% at distance $target(distance). 
   /varset tempvar "$target(hp,pct)" 
   /face 

   /if n "$target(hp,pct)"<=@assisthealth /if n "$target(distance)<@engagedistance" /if n "$target(pet)==0" /goto :DoubleCheck 
   /Attack off 
   /DoEvents 
/goto :Wait 

:DoubleCheck 
   /delay 10 
   /if n "$target(hp,pct)"<=@assisthealth /if n "$target(distance)<@engagedistance" /if n "$target(pet)==0" /goto :Attack 
/goto :Wait 

:Attack 
   /echo Fighting $target(name,clean). It is a level $target(level) $target(race). 
   /varset targetname $target(name) 
   /varset targetid $target(id) 
   /varset attacktarget 1 
   /varset behindtarget 0 
   /varset targetenrage 0 
   /face 
   /pet attack
   /call CastSlow
   /sendkey down up 
   /if n @attacktarget==1 /attack on 
:AttackLoop 
   /assist @tankname 

   /if "$target()"=="FALSE" /goto :AttackEnd 
   /if "$target(id)"!="@targetid" /goto :AttackEnd 

   /if n @targetenrage==1 /varset attacktarget @behindtarget 
   /if n @attacktarget==1 /if n $target(distance)<18 /doability kick 
   /if n @attacktarget==1 /Attack on 
   /if n @attacktarget==0 /Attack off 

   /face fast 
   /if n $target(distance)>18 /sendkey down up      |If target is farther then 18 move forward 
   /if n $target(distance)<8  /sendkey down down    |If target is closer then 8 move back 
   /if n $target(distance)<13 /sendkey up up        |If target is closer then 10 stop moving forward 
   /if n $target(distance)>10 /sendkey up down      |If target is farther then 9 stop moving back 

   /face fast 
   /doevents 
   /if n $target(distance)<18 /if n $target(distance)>8  /goto :rotate 
/goto :AttackLoop 

:rotate 
  | ----- Clockwise Rotate Check ----- 
   /if n $target(heading)>=180 /if n $calc($target(heading)-180)<=$char(heading) /if n $char(heading)<$calc($target(heading)-22.5) /goto :bsclock 
   /if n $target(heading)>=180 /if n $char(heading)<=180 /if n $calc($char(heading)-22.5)>$calc($target(heading)-360) /goto :bscounter 
   /if n $target(heading)<=180 /if n $char(heading)<$calc($target(heading)-22.5) /goto :bsclock 
  | ----- Counter Clockwise Rotate Check ----- 
   /if n $char(heading)>=180 /if n $calc($char(heading)-180)<=$target(heading) /if $char(heading)>$calc($target(heading)+22.5) /goto :bscounter 
   /if n $char(heading)>=180 /if n $target(heading)<=180 /if n $calc($char(heading)-157.5)<$calc($target(heading)+180) /goto :bsclock 
   /if n $char(heading)<=180 /if n $target(heading)<=180 /if n $char(heading)>$calc($target(heading)+25) /goto :bscounter 
   /varset behindtarget 1 
/goto :AttackLoop 

:AttackEnd 
   /echo "@targetname has died" 
   /sendkey up up 
   /sendkey up down 
   /sendkey up ctrl 
   /varset attacktarget 0 
   /varset tempvar 0 
   /attack off 
   /echo "Waiting for @tankname to select a new target..." 
   /delay 10 
/goto :Wait 

:bsclock 
   /sendkey down ctrl 
   /sendkey down right 
   /sendkey down up 
   /sendkey up up 
   /sendkey down down 
   /sendkey up down 
   /sendkey up right 
   /sendkey up ctrl 
   /press down 
   /press ctrl 
   /face 
   /varset behindtarget 0 
/goto :AttackLoop 

:bscounter 
   /sendkey down ctrl 
   /sendkey down left 
   /sendkey down up 
   /sendkey up up 
   /sendkey down down 
   /sendkey up down 
   /sendkey up left 
   /sendkey up ctrl 
   /press down 
   /press ctrl 
   /face 
   /varset behindtarget 0 
/goto :AttackLoop 

| ----- Events called by /DoEvents ----- 

Sub Event_Enraged 
   /if n @behindtarget==0 /varset attacktarget 0 
   /varset targetenrage 1 
   /attack off 
   /pet back off
/return 

Sub Event_Offrage 
   /varset targetenrage 0 
   /varset attacktarget 1 
   /attack on 
   /pet attack
/return 

Sub Event_Slainby 
   /endmacro 
/return 

Sub Event_Slowed
   /varset spellstatus 1
   /gsay %t Slowed
/return

Sub Event_Immune
   /varset spellstatus 1
   /gsay %t is immune to slow
/return

Sub Event_Ferocity
   /varset spellstatus 1
/return

Sub Event_Dominion
   /varset spellstatus 1
/return

Sub Event_Vigor
   /varset spellstatus 1
/return

Sub Event_HasteSelf
   /varset spellstatus 1
/return

Sub Event_HasteOther
   /varset spellstatus 1
/return

Sub Event_HastePet
   /varset spellstatus 1
/return

Sub Event_SlowResist
   /varadd slowattempts 1
/return

Sub Event_Outofmana
   /varset spellstatus 1 |If I'm oom, I want to just melee this round and try to buff after this mob is dead.
/return

Sub Event_OutofRange
   /gsay %t is out of range...get closer.
   /delay 500
/return

Sub Event_WontHold
   /varset spellstatus 1
/return

Sub CastSD
   /varset spellstatus 0
   /if n $char(gem,"Spiritual Dominion")==0 /memspell 1 "Spiritual Dominion"
   /gsay SD inc, gather."
   /delay 10
   /target myself
:CastingSD
   /cast "Spiritual Dominion"
   /delay 10
   /doevents
   /if n @spellstatus==0 /goto :CastingSD
/return

Sub CastSV
   /varset spellstatus 0
   /if n $char(gem,"Spiritual Vigor")==0 /memspell 2 "Spiritual Vigor"
   /gsay SV inc, gather."
   /delay 10
   /target myself
:CastingSV
   /cast "Spiritual Vigor"
   /delay 10
   /doevents
   /if n @spellstatus==0 /goto :CastingSV
/return

Sub HasteSelf
   /varset spellstatus 0
   /if n $char(gem,"Celerity")==0 {
      /if "$equip(chest,name)"!="Tunic of the Khati Sha" /memspell 3 "Celerity"
   }
   /delay 10
   /target myself
:HastingSelf
   /if "$equip(chest,name)"=="Tunic of the Khati Sha" {
      /cast item "Tunic of the Khati Sha"
   } else /cast "Celerity"
   /delay 10
   /doevents
   /if n @spellstatus==0 /goto :HastingSelf
/return

Sub HasteTank
   /varset spellstatus 0
   /if n $char(gem,"Celerity")==0 {
      /if "$equip(chest,name)"!="Tunic of the Khati Sha" /memspell 3 "Celerity"
   }
   /target @tankname
   /delay 5
   /gsay Haste inc on %t, get close.
   /delay 20
:HastingTank
   /if "$equip(chest,name)"=="Tunic of the Khati Sha" {
      /cast item "Tunic of the Khati Sha"
   } else /cast "Celerity"
   /delay 10
   /doevents
   /if n @spellstatus==0 /goto :HastingTank
/return

Sub HastePet
   /varset spellstatus 0
   /if n $char(gem,"Celerity")==0 {
      /if "$equip(chest,name)"!="Tunic of the Khati Sha" /memspell 3 "Celerity"
   }
   /delay 10
   /target pet
:HastingPet
   /if "$equip(legs,name)"=="Leggings of the Khati Sha" {
      /cast item "Leggings of the Khati Sha" }
   } else /if "$equip(chest,name)"=="Tunic of the Khati Sha" {
      /cast item "Tunic of the Khati Sha" }
   } else /cast "Celerity"
   /delay 10
   /doevents
   /if n @spellstatus==0 /goto :HastingPet
/return

Sub SummonPet
   /varset spellstatus 0
   /if n $char(gem,"Spirit of Sorsha")==0 /memspell 4 "Spirit of Sorsha"
   /delay 10
:SummoningPet
   /cast "Spirit of Sorsha"
   /delay 10
   /if n $char(pet)==0 /goto :SummoningPet
/return

Sub CastSlow
   /varset spellstatus  0
   /varset slowattempts 0
   /if n $char(gem,"Sha`s Revenge")==0 /memspell 5 "Sha's Revenge"
   /delay 10
:CastingSlow
   /if n @slowattempts>=@maxslowattempts {
      /gsay Unable to slow %t after 3 tries.
      /varset spellstatus 1
      /return }
   /cast "Sha`s Revenge"
   /delay 10
   /doevents
   /if n @spellstatus==0 /goto :CastingSlow
/return
*QUACK*

theduck
orc pawn
orc pawn
Posts: 26
Joined: Mon Dec 15, 2003 4:24 am

Post by theduck » Mon Dec 15, 2003 4:39 am

Known issues (12/15/03) (Things I know about, and plan to fix)

Currently only hastes himself, the tank, and his pet.
Will not haste pet if he's already hasted himself.
Will continually summon a pet if invisible.
Will not rebuff party members who died until his own buffs wear off.
Will not buff new party members until his own buffs wear off.
Does not currently make use of /disc if available and taking significant damage.
Does not make use of frenzy of spirit (just learned about this to be honest...) I'm a bst newb
Script basially just dies if you get the "cannot see your target" message when trying to slow.

Last but not least:

Does not flirt with female party members. (High priority...makes it too obvious I'm scripting...)
*QUACK*

Goofmester1
a hill giant
a hill giant
Posts: 241
Joined: Thu Nov 06, 2003 4:26 am

Post by Goofmester1 » Mon Dec 15, 2003 5:36 am

This includes a routines.mac What is there? or did I just overlook it's code above.

theduck
orc pawn
orc pawn
Posts: 26
Joined: Mon Dec 15, 2003 4:24 am

Post by theduck » Mon Dec 15, 2003 11:23 am

routines.mac is included in the macros folder of MQ2 and is used by several macros on the site. I have no clue if this will work with regular MQ as I don't use it.
*QUACK*