Twistdown.mac - Bard grouping macro

Macro depository for macros written before the user variable changes that broke all of them.

Moderator: MacroQuest Developers

Animus
decaying skeleton
decaying skeleton
Posts: 5
Joined: Sat Jan 11, 2003 6:46 pm

Twistdown.mac - Bard grouping macro

Post by Animus » Sat Jul 12, 2003 11:23 am

Alright, this code is prob based on other code from the site. blah blah blah, we're all programmers here.

What it does is take 6 arguments, it twists the first three songs when autoattack is on, and the second 3 when autoattack is off. Usually I just set it up with my melee songs in first three and mana song for all three downtime twists (since twisting mana song gives added benefit).

Note. Make sure to /end if you need to do any crowd control, etc. This is mainly for a mindless xp grind or raid where nothing is happening that needs your uber bard powers (enchanter/shammy in group) and you don't feel like twisting for 7 hours. Also, tweak the delays to suit your system, if that's not self evident.

Code: Select all

| - Twistdown.mac - 
| twists the song #'s passed through params.  Accepts up to 6 songs and then twists 4/5/6th when attack is off


#event MissedNote "You miss a note, bringing your song to a close!" 

Sub Main 
   /stopsong 
   /delay 3 

/if "$combat"=="TRUE" /goto :Sing
/if "$combat"=="FALSE" /goto :down

   :Sing 

| Song 1 

/if "$combat"=="FALSE" /goto :down

   /varset v0 $p0 
   /cast $p0 
   /delay 4 
   /doevents 
   /delay 30 
   /stop 
   /delay 3 

| Song 2 

/if "$combat"=="FALSE" /goto :down

   /if "$p1"=="" /goto :Sing 
   /varset v0 $p1 
   /cast $p1 
   /delay 4 
   /doevents 
   /delay 30 
   /stop 
   /delay 3 

| Song 3 

/if "$combat"=="FALSE" /goto :down

   /if "$p2"=="" /goto :Sing 
   /varset v0 $p2 
   /cast $p2 
   /delay 4 
   /doevents 
   /delay 30 
   /stop 
   /delay 3 


   /goto :Sing 

:down
| Song 1 

/if "$combat"=="TRUE" /goto :Sing

   /varset v0 $p3 
   /cast $p3 
   /delay 4 
   /doevents 
   /delay 30 
   /stop 
   /delay 3 

| Song 2 

/if "$combat"=="TRUE" /goto :Sing

   /if "$p4"=="" /goto :down
   /varset v0 $p4 
   /cast $p4 
   /delay 4 
   /doevents 
   /delay 30 
   /stop 
   /delay 3 

| Song 3 

/if "$combat"=="TRUE" /goto :Sing

   /if "$p5"=="" /goto :down
   /varset v0 $p5 
   /cast $p5 
   /delay 4 
   /doevents 
   /delay 30 
   /stop 
   /delay 3 


   /goto :down

/return 

Sub Event_MissedNote 
   /cast $v0 
   /delay 4 
   /doevents 
/return 

Tuna
a lesser mummy
a lesser mummy
Posts: 68
Joined: Mon Jul 21, 2003 4:10 pm

Post by Tuna » Wed Jul 23, 2003 4:37 pm

Thanks :D

Zxeses
a ghoul
a ghoul
Posts: 103
Joined: Tue Jan 07, 2003 4:17 pm

--

Post by Zxeses » Wed Jul 23, 2003 5:46 pm

Great bard song idea Ani, but some of the repetition could be done away with, while at the same time make it more flexable. Try this:


Code: Select all

| Boogie_Nights.mac
|
| Start this script with:  /macro boogie_nights <1-8> <1-8> <1-8> <1-8> <1-8> <1-8>
|  where the param  1-8 is any castable bard song in song slots 1 thru 8
|
| You may choose to skip twisting by placing a zero in place of a song or songs
| for example: /macro boogie_nights 1 0 0 2 0 0
|  would play only 1 song during combat and 1 song in non-combat.

#event MissedNote "You miss a note, bringing your song to a close!"
#define StartOver v1
#define CombatSongOne v2
#define CombatSongTwo v3
#define CombatSongThree v4
#define ChillSongOne v5
#define ChillSongTwo v6
#define ChillSongThree v7

Sub Main
  /varset CombatSongOne $p0
  /varset CombatSongTwo $p1
  /varset CombatSongThree $p2
  /varset ChillSongOne $p3
  /varset ChillSongTwo $p4
  /varset ChillSongThree $p5
   :Sing
      /if $combat==TRUE  /call TwistSongs $CombatSongOne $CombatSongTwo $CombatSongThree
      /if $combat==FALSE /call TwistSongs $ChillSongOne  $ChillSongTwo  $ChillSongThree
   /goto :Sing
/return

Sub TwistSongs
   /if n $p0!=0 /call PlaySong $p0
   /if n $p1!=0 /call PlaySong $p1
   /if n $p2!=0 /call PlaySong $p2
/return

Sub PlaySong
:PlaySongTop
   /varset StartOver 0
   /stopsong
   /delay 1
   /cast $p0
   /delay 4
   /doevents
   /if n $StartOver==1 /goto :PlaySongTop
   /delay 3s
   /delay 4
/return

Sub Event_MissedNote
   /varset StartOver 1
/return


-Zx

BrainDozer
a lesser mummy
a lesser mummy
Posts: 45
Joined: Sun Aug 03, 2003 2:10 pm

boogier.mac

Post by BrainDozer » Sun Aug 03, 2003 2:43 pm

Howdy! New poster here, and I thought I'd share my version of this macro.

It makes use of flags and timers instead of delays, so it can be added to other macros with a little work.

Code: Select all

| boogier.mac  Flexible bard song twister using timers by BrainDozer. 
| 
|   Syntax:  /macro boogier [block 1] [block 2] 
| 
|     Parameter block 1 indicates non-combat songs
|     Parameter block 2 indicates combat songs
| 
|   Choose any combination of songs in any sequance to twist for each mode.
|
|     Example:  /macro boogier 256 1234234 
|
|   This would repeat songs 2, 5 and 6 durring non-combat and songs 1, 2, 3
|   and 4 in the above sequence while in combat.  In this instance, song 1
|   is only twisted 1 for 7, which comes in handy for long duration songs
|   like amplification.
|
|     Other Examples: /macro boogier 0 123      | Twists on attack only
|                     /macro boogier 12345 0    | non-attack twisting only 
|                     /macro boogier 12345      | same as above
|                     /macro boogier 9804 11    | twists 84 and 1
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
#event MissedNote "You miss a note, bringing your song to a close!" 
#define CSong  v1   | keeps track of current song number 1-max
#define CSongf v2   | break and play song toggle (break=0 play=1)
#define attack v4   | debug: $combat glitch work-around
#define CSongt t1   | break and play song timer
#define attackct t2 | debug: $combat glitch work-around check timer
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sub Main 
  /stopsong
  /call initVars $p0 $p1
  :Mainloop
     /if $attackct==0 /if $combat==TRUE /if $attack==0 /call AttackOn
     /if $attackct==0 /if $combat==FALSE /if $attack==1 /call AttackOff
     /if $attackct==0 /varset attackct 10     | adjustable attack check delay
                                                           | Debug: work-around
     /if n $v9$attack!=-1 /if $char(state)==STAND /call TwistSong $attack 
     /doevents
  /goto :Mainloop
/return 
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sub TwistSong 
   /if $CSong>$v9$p0 /varset CSong 0               | Restart twist when end of list
   /if ($CSongf==0 && $CSongt==0) /call TS2 $p0    | Start next song in list
   /if ($CSongf==1 && $CSongt==0) /call TS3        | Stop song and advance index
/return 
                         | Debug: conditionals wern't playing nice with brackets
Sub TS2
   /cast $a($p0,$CSong)
   /varset CSongf 1
   /varset CSongt 40                     | adjustable play delay
/return

Sub TS3
   /stopsong
   /varset CSong $int($calc($CSong+1))   | Debug: Force integer
   /varset CSongf 0
   /varset CSongt 1                      | adjustable break delay
/return
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sub initVars
  /if $p1=="" /varset p1 "0" 
  /varset v90 0                                  | v90,v91 max song index lengths
  /varset v91 0                                  | l0 combat mode index
  /for l0 0 to 1                                 | l1 parameter index 
      /for l1 0 to $int($calc($strlen($p$l0)-1)) | l2 hold
        /varset l2 $mid($l1,1,$p$l0)
	/varset l3 $v9$l0              | Debug: array didn't like the fancy stuff
        /if ($l2>=1 && $l2<=8) /varset a($l0,$l3) $l2  | Debug: Bracket trouble
	/if ($l2>=1 && $l2<=8) /varset v9$l0 $int($calc($v9$l0+1))
     /next l1                            | Debug: it thinks it's a float-forcing 
  /next l0  
  /varset v90 $int($calc($v90-1))   | over increment fix
  /varset v91 $int($calc($v91-1))   |
  /varset CSong 0
  /varset CSongt 0
  /varset CSongf 0
  /if $combat==TRUE /varset attack 1    | debug: inital combat values
  /if $combat==FALSE /varset attack 0   |
/return
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sub AttackOn
   /stopsong
   /varset attack 1
   /varset CSong 0               | reset sequence
   /varset CSongt 0              | attack mode twist start delay
   /varset CSongf 0              | force play mode
/return

Sub AttackOff
   /stopsong
   /varset attack 0
   /varset CSong 0               | reset sequence
   /varset CSongt 0              | attack off mode twist start delay
   /varset CSongf 0              | force play mode
/return
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sub Event_MissedNote
   /varset CSongt 0              | missed note try again delay
   /varset CSongf 0              | switch back to play mode
/return