help with twisting

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

tac8358

help with twisting

Post by tac8358 » Wed Oct 15, 2003 9:08 pm

I am interested in running this twist just not sure on how to set it up. Very new to this just looking for a rough ideal on how i would set my songs up and where would i put casting delays in at and what not . Willing to learn got all the free time in the world atm being layyed off. Thanx



Code: Select all

| Twist2.mac  Flexible bard song twister using timers by BrainDozer. 
| Updated by Drax. 
| 
|   Syntax:  /macro Twist2.mac [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 Twist2.mac 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 Twist2.mac 0 123      | Twists on attack only 
|                     /macro Twist2.mac 12345 0    | non-attack twisting only 
|                     /macro Twist2.mac 12345      | same as above 
|                     /macro Twist2.mac 9804 11    | twists 84 and 1 
| 
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 
#event MissedNote "You miss a note, bringing your song to a close!" 
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 
Sub Main 
/declare CSong  global   | keeps track of current song number 1-max 
/declare CSongf global   | break and play song toggle (break=0 play=1) 
/declare attack global   | debug: @combat glitch work-around 
/declare CSongt timer    | break and play song timer 
/declare attackct timer  | debug: @combat glitch work-around check timer 
/declare v90 global 
/declare v91 global 
/declare l0 global 
/declare l1 global 
/declare l2 global 
/declare l3 global 
/declare a array2 
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 
  /stopsong 
  /call initVars @Param0 @Param1 
  :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 @v9@attack!=-1 /if $char(state)==STAND /call TwistSong @attack 
     /doevents 
  /goto :Mainloop 
/return 
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| 
Sub TwistSong 
   /if @CSong>@v9@Param0 /varset CSong 0               | Restart twist when end of list 
   /if (@CSongf==0 && @CSongt==0) /call TS2 @Param0    | 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(@Param0,@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 @Param1=="" /varset Param1 "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(@Param@l0)-1)) | l2 hold 
        /varset l2 $mid(@l1,1,@Param@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

drax
orc pawn
orc pawn
Posts: 12
Joined: Wed Oct 15, 2003 12:02 am

Post by drax » Fri Oct 17, 2003 4:59 pm

This macro actually tells you what you need to know...

Syntax: /macro Twist2.mac [block 1] [block 2]
Parameter block 1 indicates non-combat songs
Parameter block 2 indicates combat songs
Example: /macro Twist2.mac 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.

Code: Select all

/varset CSongt 40 | adjustable play delay 
is where you would adjust the delay.

Just a couple of thoughts...Please put all code references in
code bracktes...easier to read, and also, opt to turn off smilies.

tac8357

thanx that verifyed alot of things

Post by tac8357 » Fri Oct 17, 2003 5:10 pm

So just remeber the songs i needs to use into the corressponding gem slots callled out in the script? Or do i need to call the names of the songs out on the script? or both

theafkxper
a hill giant
a hill giant
Posts: 207
Joined: Sun Sep 08, 2002 6:41 pm

Post by theafkxper » Fri Oct 17, 2003 10:31 pm

just tell it what spell gems the songs are in.

for example, if you had
1) Selos
2) SOme chant
3) Slow
4) Regen Song
5) haste
6) damage shield
7) resist song
8) resist song2


and you wanted it to play Haste, damage shield, and the 2 resist songs while fighting, but regen and selos when not fighting, you would do:

Code: Select all

/mac Twist2 41 5678
and the macro will take it from there


/afk