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 Code: Select all
|
| - chant.mac -
| Hacked together by Insanitywiz to support 4 chants, 49 Selo's,
| Angstlich Assonance, and Bellow from DKAA's chantkite mac.
|
| chant <dot1> <dot2> <dot3> <dot4> <selo> <loc x> <loc y> <radius> <angstlich>
| run around in a cirle while twisting selos and two DOT chants. If x,
| y, and radius are not supplied, use the current position and a radius
| of 80.
|
| If X and Y and radius are not supplied Angstlich can not be used.
| This is a work in progress to fine tune it as I have time.
|
|
#event MissedNote "You miss a note, bringing your song to a close!"
#event NeedTarget "You must first select a target for this spell!"
#event Slow "You slow down"
#event Exp "You gain "
#event Stun "You are unstunned"
#event Tell "tells you"
#event slow "you slow down"
#event Recovered "You haven't recovered yet..."
#event Notsee "You cannot see"
| this needs to be on now -- parameter parsing takes too long
#turbo
Sub Main(p0,p1,p2,p3,p4,p5,p6,p7,p8)
/declare cirx global
/declare ciry global
/declare cirr global
| array of songs
/declare a array
| number of songs
/declare nsongs global
| current song 1-5
/declare cursong global
/declare exper global
/declare aaexp global
/declare selo global
/declare songtimer timer
/declare selotimer timer
/declare angstimer timer
/declare puretonetimer timer
/declare bellowtimer timer
/declare mytarg global
/if $defined(p0)==false {
/echo usage: chant.mac <DOT> <DOT> <DOT> <DOT> <selo> <loc x> <loc y> <radius> <angst>
/return
}
| check if the location was passed in...
/if $defined(p6)==false {
/varset cirx $char(y)
/varset ciry $char(x)
/varset cirr 80
} else {
/varset cirx @p5
/varset ciry @p6
/varset cirr @p7
}
/varset nsongs 4
/varset a(1) @p0 | First song
/echo Song 1: $char(gem,@p0)
/if $defined(p1)!=false {
/varset a(2) @p1
/echo Song 2: $char(gem,@p1)
}
/if $defined(p2)!=false {
/varset a(3) @p2
/echo Song 3: $char(gem,@p2)
}
/if $defined(p3)!=false {
/varset a(4) @p3
/echo Song 4: $char(gem,@p3)
}
|Selos
/if $defined(p4)!=false {
/varset a(5) @p4
/echo Song 5: $char(gem,@p4)
}
|Angstlich Assonance (Only use if the X Y and radius was set)
/if $defined(p5)!=false {
/varset a(5) @p4
/echo Song 6: $char(gem,@p8)
}
| always incremented before starting a new
| song. songs start at 1 so we can make
| cursong = 0 to restart the list
/varset cursong 1
/varset exper $char(exp)%
/varset aaexp $char(aa,exp)%
/varset songtimer 0
/varset bellowtimer 32
/varset selotimer 64
/varset angstimer 32
/varset puretonetimer 120
:seloloop
/varset selo true
/stopsong
/varset songtimer 64
/delay 1
/cast @p4
/delay 1
/varset selotimer 1500
/varset selo false
/call circ @cirx @ciry @cirr
/doevents
/goto :loop
:angstloop
/stopsong
/varset songtimer 32
/cast @p8
/delay 1
/varset angstimer 600
/call circ @cirx @ciry @cirr
/doevents
/goto :loop
:bellowloop
/alt activate 199
/varset bellowtimer 180
/call circ @cirx @ciry @cirr
/doevents
/goto :loop
:pureloop
/disc puretone
/varset puretonetimer 43200
/call circ @cirx @ciry @cirr
/doevents
/goto :loop
:Loop
/if n @selotimer<=0 /goto :seloloop
/if n @angstimer<=0 /goto :angstloop
/if n @bellowtimer<=0 /goto :bellowloop
/if n @puretonetimer<=0 /goto :pureloop
/if n @songtimer<=0 {
/stopsong
/varset songtimer 32
/varadd cursong 1
/if n @cursong>@nsongs /varset cursong 1
| /echo starting song @a(@cursong)
/cast @a(@cursong)
/delay 1
/delay 1
/if "$target()"=="true" /varset mytarg $target(name,clean)
}
/doevents
/call circ @cirx @ciry @cirr
/doevents
/goto :Loop
/return
Sub circ
/if n $distance(@cirx,@ciry)<(@cirr/2){
/face heading $calc($heading(@cirx,@ciry)+180)
} else {
/face heading $calc($heading(@cirx,@ciry)+$calc(90*$calc(@cirr/$distance(@cirx,@ciry))))
}
/return
Sub Event_Stun
/press down numlock
/return
Sub Event_MissedNote
| restart song
/if @selo!=true {
/delay 1
/cast 8
}else /delay 1
/varcalc cursong @cursong-1
/varset songtimer 5
/call circ $xloc $yloc $radius
/doevents
/return
Sub Event_Recovered
| restart song
/if @selo!=true {
/delay 1
/cast 8
}else /varcalc cursong @cursong-1
/varset songtimer 5
/call circ $xloc $yloc $radius
/doevents
/return
Sub Event_Notsee
/varset songtimer 5
/varcalc cursong @cursong-1
/call circ $xloc $yloc $radius
/doevents
/return
Sub Event_NeedTarget
| get target
/tar npc
/call circ @cirx @ciry @cirr
/doevents
/return
Sub Event_Tell
/beep
/delay 1
/call circ $xloc $yloc $radius
/doevents
/return
Sub Event_Exp
/varset aaexp $calc($char(aa,exp)-@aaexp)
/varset exper $calc($char(exp)-@exper)
/echo Running time $calc($running/60) minutes
/echo @exper% regular exp @aaexp% AA exp
/varset exper $char(exp)
/varset aaexp $char(aa,exp)
/tar npc
/call circ @cirx @ciry @cirr
/doevents
/return
That has the Boastful Bellow timer I want, can't seem to get it to work right.... I tried this
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 puretonetimer timer
/declare bellowtimer timer
/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 bellowtimer 32
/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
[b]|----------------------
:bellowloop
/alt activate 199
/varset bellowtimer 180
/doevents
/goto :loop
:pureloop
/disc puretone
/varset puretonetimer 43200
/doevents
/goto :loop
:Loop
/if n @bellowtimer<=0 /goto :bellowloop
/if n @puretonetimer<=0 /goto :pureloop
/if n @songtimer<=0 {
/stopsong
/varset songtimer 32
/varadd cursong 1
/if n @cursong>@nsongs /varset cursong 1
| /echo starting song @a(@cursong)
/cast @a(@cursong)
/delay 1
/delay 1
/if "$target()"=="true" /varset mytarg $target(name,clean)
}
/doevents
/goto :Loop
/return
|---------------------[/b]
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 