Bard Twist + Attack + Move Behind + Boastful Bellow

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

Moderator: MacroQuest Developers

Cazz

Bard Twist + Attack + Move Behind + Boastful Bellow

Post by Cazz » Thu Oct 16, 2003 11:58 am

I have recieved a TON of help on this, in conversion, editing, and additions, in reality I need to go back and credit all the help.... But anyways...
This is great, allows one to bot a bard with ease. It tiwsts 5 songs, automatically uses the boastful bellow AA skill, and will auto attack and movebehind if you want... I love it.

Code: Select all

| twist_adv.mac 
| Advanced bard twisting and fighting macro. This macro holds up to 
| 5 songs in a twist (more than 3 will not be sustainable), and has 
| target auto-following, and activatable move-behind script. 
| Syntax 
| p0 (move behind script - if disabled, everything but 
|       the move-behind will be operational. 
| p1 (cast delay - allows custization of the delays for casting, incase 
|       your computer is lagging. 32 works for most circumstances 
| p2-6 Song #1-5 
| This script is a combination of Grimjack's excelent fighting and 
| movebehind code, customized, and a bard song twisting macro 
| -ThatOtherGuy 
#Turbo 150 
#Event Enraged "has become ENRAGED" 
#Event Offrage "is no longer enraged" 
#Event exp "You gain party experience" 
#Event rexp "You gained raid experience" 
#Event aaon "Auto attack is on" 
#Event aaoff "Auto attack is off" 
#Event MissedNote "You miss a note, bringing your song to a close!" 

Sub Main 
/declare MobShouldFace global 
/declare autoon global 
/declare RangeMin global 
/declare RangeMax global 
/declare FastRange global 
/declare RaidYes global 
/declare expset global 
/declare expvar1 global 
/declare expvar2 global 
/declare expgain global 
/declare aaexpvar1 global 
/declare aaexpvar2 global 
/declare aaexpgain global 
/declare currentsong global 
/declare song1 global 
/declare song2 global 
/declare song3 global 
/declare song4 global 
/declare song5 global 
/declare dly global 
/declare timer timer 
/declare Combatstatus global 
/declare CastTimer timer 
/declare EnrageVar global 
/declare bellowtimer timer 
/if $defined(Param3)==FALSE { 
   /echo usage (movebehind 1|0) (song cast delay) (song1) (song2) (song3) (song4) (song5) 
   /return 
} 
/if $defined(Param2)==FALSE { 
   /echo usage (movebehind 1|0) (song cast delay) (song1) (song2) (song3) (song4) (song5) 
   /return 
} 
/if $defined(Param1)==FALSE { 
   /echo usage (movebehind 1|0) (song cast delay) (song1) (song2) (song3) (song4) (song5) 
   /return 
} 
/varset RaidYes @Param0 
/varset RangeMin 5 
/varset RangeMax 15 
/varset FastRange 20 
/varset Combatstatus 0 
/varset EnrageVar 0 
/varset expset 0 
/varset autoon 0 
/varset timer 0 
/varset song1 @Param2 
/if $defined(Param3)==TRUE /varset song2 @Param3 
/if $defined(Param4)==TRUE /varset song3 @Param4 
/if $defined(Param5)==TRUE /varset song4 @Param5 
/if $defined(Param6)==TRUE /varset song5 @Param6 
/echo song 1 @song1 
/echo song 2 @song2 
/echo song 3 @song3 
/echo song 4 @song4 
/echo song 5 @song5 
/varset dly "@Param1" 
/varset currentsong "songone" 
/varset bellowtimer 0
   :Mainloop 
      /call SetExp 
      /doevents 
      /call Combatcheck 
      /if @Combatstatus=="1" /call RangeSub 
      /if @Combatstatus=="1" /call Checkbehind 
/if @Combatstatus=="1" { 
    /if n @bellowtimer<=0  /call bellowsub 
    } 
      /call twist 
      /doevents 
   /goto :Mainloop 
/return 

Sub Checkbehind 
/if n $distance($calc($target(y)-$cos($target(heading))*10),$calc($target(x)-$sin($target(heading))*10))>8 { 
   /if @RaidYes=="1" { 
      /if @Combatstatus=="1" /call movebehind 
   } 
} 
/return 

Sub SetExp 
/if @expset=="0" { 
   /varset expvar1 $char(exp) 
   /varset aaexpvar1 $char(aa,exp) 
   /varset expset 1 
   /return 
} 
/return 

Sub Combatcheck 
/if @autoon=="0" /return 
/if $target()=="FALSE" { 
   /varset Combatstatus 0 
   /attack off 
   /varset autoon 0 
} 
/if @EnrageVar=="1" { 
   /if $target()=="TRUE" { 
   /return 
   } else { 
   /varset EnrageVar 0 
   /varset Combatstatus 0 
   } 
} 
/if $target()=="FALSE" { 
   /varset Combatstatus 0 
   /if $combat=="TRUE" { 
      /attack off 
   } 
   /return 
} 
   /if $target()=="TRUE" { 
      /if @autoon=="1" { 
         /varset Combatstatus 1 
         /return 
      } 
   } else { 
      /varset Combatstatus 0 
   } 
/return 

Sub Rangesub 
   /face fast nopredict 
   /if n $target(distance)>=@FastRange /call Fastmove 
   /if n $target(distance)>@RangeMax { 
      /press up 
   } 
   /if n $target(distance)<@RangeMin { 
      /press down 
   } 
/return 

Sub Event_Enraged 
   /if $target()=="TRUE" { 
      /varset EnrageVar 1 
      /attack off 
   } 
/return 

Sub bellowsub 
       /alt activate 199 
       /varset bellowtimer 186 
/return

Sub Fastmove 
   :fastmoveloop 
   /if $target()=="FALSE" { 
      /varset Combatstatus 0 
      /sendkey up up 
      /if $combat=="TRUE" { 
         /attack off 
         /return 
         } 
         } 
         /face fast nopredict 
         /if n $target(distance)>@FastRange { 
         /sendkey down up 
         /attack off 
         } 
         /if n $target(distance)<=@FastRange { 
         /if @Combatstatus=="1" { 
         /if @EnrageVar=="0" { 
         /attack on 
         } 
      } 
      /sendkey up up 
      /return 
   } 
   /goto :fastmoveloop 
/return 

Sub Event_Offrage 
   /if $target()=="TRUE" { 
      /varset EnrageVar 0 
      /attack 
   } 
} 
/return 

Sub Event_aaon 
/varset autoon 1 
/return 

Sub Event_aaoff 
/varset autoon 0 
/varset Combatstatus 0 
/return 
| -------------------------------- 

Sub movebehind 
   /if $target()==FALSE { 
      /attack off 
      /sendkey up up 
      /return 
   } 
   /varcalc MobShouldFace $char(heading) 
   /varcalc MobShouldFace @MobShouldFace%360 
   /if $target(heading)<=$calc(@MobShouldFace+80) /if $target(heading)>=$calc(@MobShouldFace-80) /return 
   /sendkey down up 
   :gotopointloop 
      /if $combat=="TRUE" { 
      } 
      /if $target()==FALSE { 
         /sendkey up up 
         /return 
      } 
      /face fast loc $calc($target(y)-$cos($target(heading))*20),$calc($target(x)-$sin($target(heading))*20) 
      /if n $distance($calc($target(y)-$cos($target(heading))*20),$calc($target(x)-$sin($target(heading))*20))>3 /goto :gotopointloop 
      /sendkey up up 
      /face fast nopredict 
/return 

|---------------------- 

Sub Event_exp 
   /delay 1s 
   /varset expvar2 $char(exp) 
   /varset aaexpvar2 $char(aa,exp) 
   /varcalc expgain @expvar2-@expvar1 
   | AA calcs 
   /varcalc aaexpgain @aaexpvar2-@aaexpvar1 
   /varset expset 0 
   /varset autoon 0 
   /varset Combatstatus 0 

   /echo EXP - Gain: @expgain% Total: $char(exp)% 
   /echo AAEXP - Gain: @aaexpgain% Total: $char(aa,exp)% 
/return 

Sub Event_rexp 
   /delay 1s 
   /varset expvar2 $char(exp) 
   /varset aaexpvar2 $char(aa,exp) 
   /varcalc expgain @expvar2-@expvar1 
   | AA calcs 
   /varcalc aaexpgain @aaexpvar2-@aaexpvar1 
   /varset expset 0 
   /varset autoon 0 
   /varset Combatstatus 0 

   /echo EXP - Gain: @expgain% Total: $char(exp)% 
   /echo AAEXP - Gain: @aaexpgain% Total: $char(aa,exp)% 
/return 

|------------------------------------------------- 

Sub twist 
/if @currentsong=="songone" { 
   /if n @timer=="0" { 
      /stop 
      /delay 3 
      /cast @song1 
      /doevents 
      /varset timer "@dly" 
      /echo timer = @timer and dly = @dly 
      /if @song2!="" { 
         /varset currentsong "songtwo" 
      } 
      /if @song2=="" { 
         /varset currentsong "songone" 
      } 
   } else { 
      /return 
   } 
}   /return 

/if @currentsong=="songtwo" { 
   /if n @timer=="0" { 
      /stop 
      /delay 3 
      /cast @song2 
      /doevents 
      /varset timer "@dly" 
      /if @song3!="" { 
         /varset currentsong "songthree" 
      } 
      /if @song3=="" { 
         /varset currentsong "songone" 
      } 
   } else { 
      /return 
   } 
   /return 
} 

/if @currentsong=="songthree" { 
   /if n @timer=="0" { 
      /stop 
      /delay 3 
      /cast @song3 
      /doevents 
      /varset timer "@dly" 
      /if @song4!="" { 
         /varset currentsong "songfour" 
      } 
      /if @song4=="" { 
         /varset currentsong "songone" 
      } 
   } else { 
      /return 
   } 
   /return 
} 

/if @currentsong=="songfour" { 
   /if n @timer=="0" { 
      /stop 
      /delay 3 
      /cast @song4 
      /doevents 
      /varset timer "@dly" 
      /if @song5!="" { 
         /varset currentsong "songfive" 
      } 
      /if @song5=="" { 
         /varset currentsong "songone" 
      } 
   } else { 
      /return 
   } 
   /return 
}

/if @currentsong=="songfive" { 
   /if n @timer=="0" { 
      /stop 
      /delay 3 
      /cast @song5 
      /doevents 
      /varset timer "@dly" 
      /varset currentsong "songone" 
   } else { 
      /return 
   } 
   /return 
} 
/return 

Sub Event_MissedNote 
/if @currentsong=="songone" { 
   /cast @song1 
   /delay 3 
   /varset timer "@dly" 
} 
/if @currentsong=="songtwo" { 
   /cast @song2 
   /delay 3 
   /varset timer "@dly" 
} 
/if @currentsong=="songthree" { 
   /cast @song3 
   /delay 3 
   /varset timer "@dly" 
} 
/if @currentsong=="songfour" { 
   /cast @song4 
   /delay 3 
   /varset timer "@dly" 
} 
/if @currentsong=="songfive" { 
   /cast @song5 
   /delay 3 
   /varset timer "@dly" 
} 
/doevents 
/return 

If you have any questions feel free to ask.... I might wanna try to add a selos timer next, or perhaps Primal weapon switching... but its solid as is.

Guest

Post by Guest » Thu Oct 16, 2003 5:09 pm

Question:

How does this work if you are in a group? Does it move behind the mob you target?


Is there a way to assist MT the move behind that particular mob?

Good job BTW

rzmonk76
a hill giant
a hill giant
Posts: 165
Joined: Sat Jan 31, 2004 1:37 pm
Contact:

Post by rzmonk76 » Fri Feb 06, 2004 8:20 pm

this is what i use allthough its a lil bugged

twisting component is nice, it doesnt stickonmob well. if you hit attack while facing away from the mob it will actualy hurl you away from the mob. the facing the mob part is just hella screwy. wish it had some downtime songs too.

rzmonk76
a hill giant
a hill giant
Posts: 165
Joined: Sat Jan 31, 2004 1:37 pm
Contact:

fix

Post by rzmonk76 » Tue Feb 10, 2004 1:28 pm

i belive removing all instances of predict and making sure there is a /face fast near that line should fix it for the most part.