Posted: Wed Dec 07, 2005 10:23 am
This is untested..
Since there's only 9 gems you can only pass up to 9 songs (1-9) ;)
You can put in the parameter "forage" if you want it to autoforage. I don't know how this will affect twisting since I don't have a bard. It doesn't matter what order the parameters come in, it will twist the songs in the order they come in, forage and popup parameters are just for it to see wheter to use those functions or not.
/mac Twister 1 2 3 4 5 forage
/mac Twister 1 forage 2 3 popup 4
etc. should all work
Since there's only 9 gems you can only pass up to 9 songs (1-9) ;)
You can put in the parameter "forage" if you want it to autoforage. I don't know how this will affect twisting since I don't have a bard. It doesn't matter what order the parameters come in, it will twist the songs in the order they come in, forage and popup parameters are just for it to see wheter to use those functions or not.
/mac Twister 1 2 3 4 5 forage
/mac Twister 1 forage 2 3 popup 4
etc. should all work
Code: Select all
| Twister.mac by brianMan
| Modified version of Twist.mac by Virtuoso65
| Version 1.0.1
|
| Changes:
| 1.0.0
| -
| Initial release
|
| 1.0.1
| -
| Changed the AbilityReady check from within the forage sub, to where it checks
| if it should forage at all. Suggested by fearless :)
#Event Loading "#*#LOADING, PLEASE WAIT...#*#"
#Event Recover "#*#You miss a note, bringing your song to a close!#*#"
#Event Recover "#*#You haven't recovered yet...#*#"
Sub Main
/declare Songs int local ${Macro.Params}
/declare SongNumber int local 0
/declare CurrentSong int outer 0
/declare Timeout timer outer 0
/declare Gems[9] int local 0
/declare i int local 0
/declare Forage bool local FALSE
/declare Popup bool local FALSE
/if (!${Defined[Param0]}) /call Syntax
/for i 0 to ${Macro.Params}
/if (${Defined[Param${i}]}) {
/if (${Param${i}.Lower.Equal[forage]}) {
/varcalc Songs ${Songs}-1
/if (${Songs} < 1) /call Syntax
/varset Forage TRUE
/echo Foraging whenever able to..
}
/if (${Param${i}.Lower.Equal[popup]}) {
/varcalc Songs ${Songs}-1
/if (${Songs} < 1) /call Syntax
/varset Popup TRUE
/echo Popup song as it is twisted..
}
/if (${Param${i}} >= 1 && ${Param${i}} <= 9) {
/varcalc SongNumber ${SongNumber}+1
/varset Gems[${SongNumber}] ${Param${i}}
/echo Song ${SongNumber}: ${Me.Gem[${Param${i}}]}
}
}
/next i
/varset CurrentSong 0
/varset Timeout 1
/if (${Songs} < 2) /goto :NoTwist
:Twist
/if ((${Forage}) && (${Me.AbilityReady[Forage]})) /call Forage
/if (${Timeout} <= 0) {
/stopsong
/delay 2
/varset Timeout 32
/varcalc CurrentSong ${CurrentSong}+1
/if (${CurrentSong} > ${Songs}) /varset CurrentSong 1
/if (${Popup}) /popup Song ${CurrentSong}: ${Me.Gem[${Gems[${CurrentSong}]}]}
/cast ${Gems[${CurrentSong}]}
}
/doevents
/goto :Twist
:NoTwist
/if ((${Forage}) && (${Me.AbilityReady[Forage]})) /call Forage
/if (!${Bool[${Me.Casting}]}) {
/stopsong
/delay 1
/cast ${Gems[1]}
/doevents
/delay 3
}
/goto :NoTwist
/return
Sub Syntax
/echo Syntax: /mac ${Macro.Name} <1-9> [1-9|forage|popup]..
/echo Example: /mac ${Macro.Name} 1 4 3 6
/echo - Twist songs in gem 1, 4, 3 and 6
/echo Example: /mac ${Macro.Name} 1 4 forage 2 8 6
/echo - Twist songs 1, 4, 2, 8 and 6. Also forage whenever available.
/echo Example: /mac ${Macro.Name} 1 4 forage 2 8 popup 6
/echo - Twist songs 1, 4, 2, 8 and 6, showing a popup at every song. Also forage whenever available.
/echo At least one song must be specified.
/endmacro
/return
Sub Forage
/doability forage
/delay 1
/if (${Cursor.ID}) /autoinv
/return
Sub Event_Loading
/endmacro
/return
Sub Event_Recover
/varcalc CurrentSong ${CurrentSong}-1
/varset Timeout 1
/return