I loved that one, but sadly I suck with this coding and coversion stuff (I'm a hardware/network guy, not a programmer
If anyone is really good with conversion, feel free to fix it, you would make one bards wrists very happy.
Moderator: MacroQuest Developers
Don't have a bard so I don't know if it will work but here is a conversion.Cazz wrote:http://macroquest2.com/phpBB2/viewtopic.php?t=2856
I loved that one, but sadly I suck with this coding and coversion stuff (I'm a hardware/network guy, not a programmer :( )
If anyone is really good with conversion, feel free to fix it, you would make one bards wrists very happy.
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
/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"
:Mainloop
/call SetExp
/doevents
/call Combatcheck
/if @Combatstatus=="1" /call RangeSub
/if @Combatstatus=="1" /call Checkbehind
/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 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 


Ending Macro [] pairing ran into another sub-routine
Twist.mac @319 (twist)
@ current song =="songhour" (
twist.mac @87 (main): /call twist
cleared the following: Timer Vars Arrays
the macro has ended
Must be a typo somewhere in the song four call, I'll try to look for it.
changed to/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=="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
}
