A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.
Moderator: MacroQuest Developers
-
Losingteam
- a lesser mummy

- Posts: 75
- Joined: Wed May 21, 2003 8:52 pm
- Location: Chicago,Illinois
Post
by Losingteam » Mon Oct 13, 2003 3:36 pm
If anyone happens to want to get this macro functional again, by updating it to the new standards, that would be sweet. It was fully functional under the old MQ style, but this new one screws it up. Thanks in advance for any effeort that may be put into it
Code: Select all
| Twist2.mac Flexible bard song twister using timers by BrainDozer.
|
| 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!"
#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
-
theafkxper
- a hill giant

- Posts: 207
- Joined: Sun Sep 08, 2002 6:41 pm
Post
by theafkxper » Mon Oct 13, 2003 4:07 pm
Didnt try it myself, but i think this will work, unless i missed something...
and if it dosent, i took some of hte legwork out of it anyway =)
Untested code inc:
Code: Select all
| Twist2.mac Flexible bard song twister using timers by BrainDozer.
| Attempted blind fixing by theafkxper
|
| 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!"
/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 91 global
/declare 90 global
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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 90 0 | v90,v91 max song index lengths
/varset 91 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 @9@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(@9@l0+1))
/next l1 | Debug: it thinks it's a float-forcing
/next l0
/varset 90 $int($calc(@90-1)) | over increment fix
/varset 91 $int($calc(@91-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
[/list]
DKAA: edit to remove smilies
-
Lajiskin
- decaying skeleton

- Posts: 6
- Joined: Thu Oct 09, 2003 4:09 pm
Post
by Lajiskin » Tue Oct 14, 2003 10:28 am
Wasn't working for me, tried to run it with 0 1256 and got:
Ending Macro: Bad variable in /var function
twist2.mac@68 (initVars): /varset 90 0 | v90, v91 max song index lengths
twist2.mac@36 (Main): /call initVars @p0 @p1
Tried a couple other number combos and got the same error. Hopefully is an easy thing to fix, but I am still new to coding in this and not familiar with the new system.
But just a heads up that it needs some work.
-Lajiskin
-
Guest
Post
by Guest » Tue Oct 14, 2003 4:56 pm
It has to do with the paramets but im having trouble fixing it. If i get it then ill post it but im still trying to learn the ins and outs of the "new" way to do this macro buisness. It's right in front of me ill get it sooner or later.
-
drax
- orc pawn

- Posts: 12
- Joined: Wed Oct 15, 2003 12:02 am
Post
by drax » Wed Oct 15, 2003 12:12 am
Try this...
Had to deal with variable declares
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
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
#turbo 10
#event MissedNote "You miss a note, bringing your song to a close!"
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Sub Main
/zapvars
/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 n @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 35 | 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
Messed with the variable timer, and added a little turbo to give it a boost...seems to work now...at least for me
Last edited by
drax on Tue Nov 18, 2003 10:27 pm, edited 1 time in total.
-
ThatOtherGuy
- a lesser mummy

- Posts: 41
- Joined: Tue Aug 05, 2003 6:12 pm
Post
by ThatOtherGuy » Wed Oct 29, 2003 7:26 am
Bump. Still doesn't work, and this would be a GREAT twisting macro for me and I'm sure others

I've tried to figure out whats wrong, but have had no luck. Atm it twists the non attack songs fine but never swaps over to the attack songs.
-
Guest
Post
by Guest » Wed Oct 29, 2003 9:35 am
Here is the one I wrote at work the other day, have not tried it yet, but worst case should be some syntax errors
Code: Select all
| Version 1.0
#event MissedNote "You miss a note, bringing your song to a close!"
Sub Main
/declare song global
/declare NCSongs array
/declare NCSongsCount global
/declare CSongs array
/declare CSongsCount global
/declare i local
/varset NCSongsCount $strlen(@Param0)-1
/for i 0 to NCSongsCount
/varset NCSongs(@i) $mid(@i,1,@Param0)
/next i
/if $defined(@Param1)==TRUE {
/varset CSongsCount $strlen(@Param1)-1
/for i 0 to CSongsCount
/varset CSongs(@i) $mid(@i,1,@Param1)
/next i
} else {
/varset CSongsCount -1
}
:Loop
/doevents
/if $combat==TRUE {
/call twistCombat
} else {
/call twistNonCombat
}
/goto :Loop
/return
Sub twistCombat
/declare i local
:CTwist
/for i 0 to CSongsCount
/if $combat==FALSE /return
/varset song @CSongs(@i)
/stopsong
/cast song
/next i
/goto :CTwist
/return
Sub twistNonCombat
/declare i local
:NCTwist
/for i 0 to NCSongsCount
/if $combat==TRUE /return
/varset song @NCSongs(@i)
/stopsong
/cast song
/next i
/goto :NCTwist
/return
Event MissedNote
/cast @song
/return
-
Guest
Post
by Guest » Thu Nov 06, 2003 10:27 pm
anyone tested this yet?
-
drax
- orc pawn

- Posts: 12
- Joined: Wed Oct 15, 2003 12:02 am
Post
by drax » Tue Nov 18, 2003 10:28 pm
Fixed my code above. look for the post by me. Messed with the variable timer, and added a little turbo to give it a boost...seems to work now...at least for me
-
Wolfpit_64
- decaying skeleton

- Posts: 8
- Joined: Sun Nov 30, 2003 11:52 pm
Post
by Wolfpit_64 » Wed Dec 03, 2003 11:49 pm
I keep getting a weird problem where when I melee with this on, i get no songs to give me an effect. Also when I'm not meleeing, when a mob gets to like 5% and i get too close to them it starts playing my healing song (song slot 1).
-
Undies
- a ghoul

- Posts: 94
- Joined: Mon Oct 20, 2003 9:12 pm
Post
by Undies » Thu Dec 04, 2003 12:32 am
Drax... how many songs can you continually twist with this macro?
Do you think it is as good as manual twisting in this regard? I tried it a few weeks ago (before the turbo addition) and could only manage 2 continuous songs. I am certainly no bard expert but would hope for at least 3? As I hydra 2 accounts on the one machine I wonder if that has anything to do with it, or also if the routine could possibly be rewritten a little more efficiently? (I have not looked into it yet). Also it would be nice to autoswap instruments for whatever song is being used. I'll get around to doing all this eventually but my bard is pretty low priority ATM.
Guest... I am not about to try any macro the author does not debug first... 90% of the work is in the debugging. Most here would probably feel the same way.
-
Wolfpit_64
- decaying skeleton

- Posts: 8
- Joined: Sun Nov 30, 2003 11:52 pm
Post
by Wolfpit_64 » Thu Dec 04, 2003 9:38 pm
if you can fix the part that prevents songs from finishing when u melee and the part that makes it execute the wrong song when a mob is below 5% then i'll worship you... other than those bugs, it twists 4 songs fine.
-
some-eq-player
- a lesser mummy

- Posts: 70
- Joined: Tue Dec 09, 2003 12:37 pm
Post
by some-eq-player » Thu Dec 11, 2003 10:25 am
if you play around with the song playing time value and the turbo .. you can get it to do 5 ... but of course as in manual twisting if you miss a note there go 3 songs that drop ... i use singing time of 31 with turbo of 10, i found it to be the most stable, as faster turbo results in "you havmt recoverd yet" in lagg situations.
-
some-eq-player
- a lesser mummy

- Posts: 70
- Joined: Tue Dec 09, 2003 12:37 pm
Post
by some-eq-player » Thu Dec 11, 2003 10:03 pm
ohh .. and .. guest .. your script doesnt work ... says i dont seem to have that song memmed over and over
-
drax
- orc pawn

- Posts: 12
- Joined: Wed Oct 15, 2003 12:02 am
Post
by drax » Fri Dec 12, 2003 1:42 pm
Undies wrote:Drax... how many songs can you continually twist with this macro?
Do you think it is as good as manual twisting in this regard? I tried it a few weeks ago (before the turbo addition) and could only manage 2 continuous songs. I am certainly no bard expert but would hope for at least 3?
As the code stands, I can twist 3 songs even with minor lag.
Undies wrote: As I hydra 2 accounts on the one machine I wonder if that has anything to do with it, or also if the routine could possibly be rewritten a little more efficiently? (I have not looked into it yet).
anything can be done more efficently, the question is time and ability, of which i am currently short on both.
Undies wrote: Also it would be nice to autoswap instruments for whatever song is being used. I'll get around to doing all this eventually but my bard is pretty low priority ATM.
This is something that I have thought about adding, but may be difficult. Time will tell.
and as some-eq-player said, if you play around with the song delay, you may be able to get more out of it, depending on your lag...me i am happy with 3 and no wrist aches at the end of the night :)