A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.
Moderator: MacroQuest Developers
-
3x
- orc pawn

- Posts: 20
- Joined: Sun Jan 25, 2004 12:54 am
Post
by 3x » Sun Jan 25, 2004 1:02 am
Can someone get this macro working in the 2004 release of mq? This twist macro was by far the best i've used due to it being lag efficient, i was getting the least song drops with this script then any other script i've tried on these boards...
The problem is in the new version of MQ it just starts playing song one and then doesnt end macro or anything, but does not twist... just leaves the first song playing.
Would be awesome if this was fixed... Thanks in advanced :)
ml2517 wrote:Here is a version of twist.mac that has a dynamic buffer that should allow it to auto-tune based on lag. This requires an INI file to be saved in your macros directory as well. The INI has some song information that lets me know if the song icon is a shortbuff or not.
Code: Select all
| - twist.mac -
|
| Modified from Colonel's Macro
|
| Modified to current form 12/11/2003
|
| Combat Twist Order ------------+
| NonCombat Twist Order -----+ |
| | |
| Usage: v v
| /macro twist.mac ### ###
| # represents the spell gem number you'd like to sing
|
| Example:
| /macro twist.mac 4567 123456
|
#turbo 30
| INIFILENAME is the name of the INI file that has the song shortbuff information
#define INIFILENAME songinfo.ini
Sub Main(Param0)
/if $defined(Param0)==FALSE /endmacro
|
| Variable Declarations
|
/declare CombatCurSong global
/declare NonCombatCurSong global
/declare NNonCombatSongs global
/declare NCombatSongs global
/declare NonCombatSongList global
/declare CombatSongList global
/declare TwistI global
/declare TwistJ global
/declare DynamicBuffer global
/declare NonCombatSongArray array
/declare CombatSongArray array
/declare ArrSong array
|
| Timer Declarations
|
/declare SingTime timer
/varset CombatCurSong 1
/varset NonCombatCurSong 1
/varset NNonCombatSongs $strlen(@Param0)
/varset NCombatSongs $strlen(@Param1)
/varset NonCombatSongList @Param0
/varset CombatSongList @Param1
/varset DynamicBuffer 5
/for TwistI 1 to @NNonCombatSongs
/varcalc TwistJ $int(@TwistI-1)
/varset NonCombatSongArray(@TwistI) $mid(@TwistJ,1,@NonCombatSongList)
/next TwistI
/for TwistI 1 to @NCombatSongs
/varcalc TwistJ $int(@TwistI-1)
/varset CombatSongArray(@TwistI) $mid(@TwistJ,1,@CombatSongList)
/next TwistI
/call INICompare
:Loop
/if "$char(state)"!="SIT" {
/if "$combat"=="TRUE" /call CombatSing @CombatSongArray(@CombatCurSong)
/if "$combat"!="TRUE" /call NonCombatSing @NonCombatSongArray(@NonCombatCurSong)
}
/if $char(state)=="DUCK" /press d
/if $char(state)=="SIT" /stand
/goto :Loop
/return
Sub CombatSing
/declare Buffer local
:CombatSing1
/varset SingTime 3s
/varset Buffer 0
| /echo Song: @Param0 Type: @ArrSong(@Param0)
/cast @Param0
:CombatSing2
/delay 1
/if "$char(casting)"=="TRUE" /goto :CombatSing2
/if n @SingTime>0 /goto :CombatSing1
/if n @ArrSong(@Param0)!=1 {
/delay @DynamicBuffer
/stopsong
} else {
:CombatSing3
/varadd Buffer 1
/delay 1
/if n @Buffer>8 {
/stopsong
/goto :CombatSing1
}
/if n $char(song,$char(song,"$char(gem,@Param0)"),duration)<2 /goto :CombatSing3
/varset DynamicBuffer @Buffer
/stopsong
}
| /echo Dynamic Buffer: @DynamicBuffer
/varadd CombatCurSong 1
/if n @CombatCurSong>@NCombatSongs /varset CombatCurSong 1
/return
Sub NonCombatSing
/declare Buffer local
:NonCombatSing1
/varset SingTime 3s
/varset Buffer 0
| /echo Song: @Param0 Type: @ArrSong(@Param0)
/cast @Param0
:NonCombatSing2
/delay 1
/if "$char(casting)"=="TRUE" /goto :NonCombatSing2
/if n @SingTime>0 /goto :NonCombatSing1
/if n @ArrSong(@Param0)!=1 {
/delay @DynamicBuffer
/stopsong
} else {
:NonCombatSing3
/varadd Buffer 1
/delay 1
/if n @Buffer>8 {
/stopsong
/goto :NonCombatSing1
}
/if n $char(song,$char(song,"$char(gem,@Param0)"),duration)<2 /goto :NonCombatSing3
/varset DynamicBuffer @Buffer
/stopsong
}
| /echo Dynamic Buffer: @DynamicBuffer
/varadd NonCombatCurSong 1
/if n @NonCombatCurSong>@NNonCombatSongs /varset NonCombatCurSong 1
/return
Sub INICompare
/declare A local
/for A 1 to 8
/varset ArrSong(@A) "$ini(INIFILENAME,"Songs",$Spell("$char(gem,@A)",id))"
/if n @ArrSong(@A)<0 /if n @ArrSong(@A)>2 /varset ArrSong(@A) 0
/next A
/return
Save this INI as songinfo.ini in your macros directory as well:
Code: Select all
[Songs]
718=0
727=1
2603=1
1196=1
1197=0
706=0
1748=0
701=1
3682=0
3681=0
2606=1
704=0
1747=0
3371=0
4112=1
1759=1
1448=1
1287=1
723=1
745=1
1761=0
700=1
703=0
3372=1
2609=1
708=1
1452=1
741=0
1764=0
742=0
730=0
736=0
1100=0
3369=0
3030=0
3364=0
2607=1
710=1
2936=0
4085=1
4086=1
4087=1
707=0
4210=0
709=1
3375=0
7=1
722=1
1762=1
749=1
734=1
2604=1
1749=0
724=0
728=1
1751=0
705=0
3376=0
737=1
720=1
721=1
735=1
2601=1
702=1
1760=1
739=1
1449=1
3365=0
1752=1
1763=1
748=1
1451=0
713=1
714=1
716=1
3368=1
715=1
712=1
2608=1
711=1
3066=0
3362=1
4083=1
4084=1
3366=0
717=0
2605=2
1758=0
746=0
738=0
4395=0
1750=0
719=0
1450=1
3361=0
868=0
750=0
1765=1
725=0
1754=0
1755=0
1756=0
2602=1
1753=0
726=0
729=0
3567=0
3367=0
743=0
744=0
3373=0
3566=0
3363=0
3370=0
747=1
1757=1
740=1
2610=1
3374=1
3651=1
Last edited by
3x on Sun Jan 25, 2004 1:12 am, edited 1 time in total.
-
ml2517
- a grimling bloodguard

- Posts: 1216
- Joined: Wed Nov 12, 2003 1:12 am
Post
by ml2517 » Sun Jan 25, 2004 1:05 am
I can take a look at it. I'm betting it was broken by the $char(casting) change. Can't promise anything until they add $char(bardcasting) in though.
-
3x
- orc pawn

- Posts: 20
- Joined: Sun Jan 25, 2004 12:54 am
Post
by 3x » Sun Jan 25, 2004 1:11 am
Great, im eager to see what you come up with :)
-
ml2517
- a grimling bloodguard

- Posts: 1216
- Joined: Wed Nov 12, 2003 1:12 am
Post
by ml2517 » Sun Jan 25, 2004 4:15 am
Ok here ya go. I've removed the need for the INI file since there have been new commands added in game. This should bring you back to the same functionality you had before.
Songs which produce a shortbuff or buff icon will wait until the buff is updated before going to the next song (unless you reach 3.8 seconds then it will retry the song).
The script uses the time it took to play these buff icon producing songs and uses it to dynamically update a delay for how long the song took to cast. This dynamic delay is only used for beneficial songs that don't produce a buff in your shortbuff/buff slots and all other detrimental songs.
I had to switch the $combat from TRUE's to FALSE because its currently reversed. Change this back when it gets fixed in MQ2.
See below.
Last edited by
ml2517 on Tue Apr 20, 2004 10:01 pm, edited 1 time in total.
-
3x
- orc pawn

- Posts: 20
- Joined: Sun Jan 25, 2004 12:54 am
Post
by 3x » Sun Jan 25, 2004 5:08 am
Works perfect thanks!
Just some info, the first set of numbers is for combat now, and the second set for non combat... isn't a big deal, thought you would just like to know.
-
ml2517
- a grimling bloodguard

- Posts: 1216
- Joined: Wed Nov 12, 2003 1:12 am
Post
by ml2517 » Sun Jan 25, 2004 5:11 am
It really depends on what source of MQ2 you are currently on. Just change the $combat instances from FALSE to TRUE or vice versa to fix it so its in the right order. Once everyone is on the latest MQ2 and it has the $combat result reporting correctly then both should be set to TRUE.
-
zman9278
- decaying skeleton

- Posts: 1
- Joined: Fri Feb 06, 2004 6:15 pm
Post
by zman9278 » Fri Feb 06, 2004 6:18 pm
I really like this macro But i was trying to figure out how to modify it so when it runs it checks if singing mod clickie is active something like this:
Code: Select all
/if n $char(buff,"Resonance")==0
{
/cast item "Voice of the Serpent"
/delay 4s
}
I am total newb at macros but would like this macro to cast that item if buff is down.
-
ml2517
- a grimling bloodguard

- Posts: 1216
- Joined: Wed Nov 12, 2003 1:12 am
Post
by ml2517 » Fri Feb 06, 2004 7:06 pm
Try putting this right before the /goto :Loop line.
Code: Select all
/if n $char(buff,"Resonance")<1 {
/cast item "Voice of the Serpent"
/delay 4s
}
-
GeoffreyF67
- a lesser mummy

- Posts: 70
- Joined: Tue Nov 04, 2003 6:07 pm
Post
by GeoffreyF67 » Fri Feb 20, 2004 7:29 pm
If you have a song like largo's abonant binding in your twist and you don't have a target the macro gets caught in a nasty loop and stops casting...
It would be better if it just went to the next song in the list and came back to that one in the next time around...
G-Man
-
Mutter
- a ghoul

- Posts: 105
- Joined: Sat Nov 16, 2002 1:09 pm
Post
by Mutter » Sat Feb 21, 2004 9:08 pm
I didnt write the code i posted in, I just modified it to work! It can only twist 3 songs at a time, IE 3 combat 3 non-combat. Easily changed, I can do the work if it is really bothering you...
OH! You MUST specify all the songs. IE if you only want to twist 1 and 2, then just /mac twist 121 456 (the 456 was just a sample)
-
mrjoshuanc
- orc pawn

- Posts: 14
- Joined: Tue Mar 16, 2004 10:29 pm
Post
by mrjoshuanc » Wed Mar 31, 2004 6:54 pm
As of the latest build, now receiving the following output when running this script:
Variable name already defined: CombatCurSong
Variable name already defined: NonCombatCurSong
Variable name already defined: NNonCombatSongs
Variable name already defined: NCombatSongs
Variable name already defined: NonCombatSongList
Variable name already defined: CombatSongList
Variable name already defined: TwistI
Variable name already defined: TwistJ
Variable name already defined: DynamicBuffer
-
Elric
- Cheese Whore

- Posts: 466
- Joined: Sun Nov 23, 2003 12:31 am
- Location: Tampa, Fl
-
Contact:
Post
by Elric » Wed Mar 31, 2004 8:17 pm
..... /zapvars
This is getting old, real fast.
-
utrero
- orc pawn

- Posts: 28
- Joined: Tue Apr 20, 2004 11:30 am
Post
by utrero » Tue Apr 20, 2004 12:58 pm
you do not seem to have this spell memorized
this is the only message that i have when start the macro..over and over....
i have all my spells memed but when i start :
/mac twist 1234 1234
this is the only result

what im losing?
all help welcome :) thx
-
ml2517
- a grimling bloodguard

- Posts: 1216
- Joined: Wed Nov 12, 2003 1:12 am
Post
by ml2517 » Tue Apr 20, 2004 8:40 pm
Untested for the moment, but I converted this and fixed up the parenthesis.
See below.
Last edited by
ml2517 on Tue Apr 20, 2004 10:01 pm, edited 1 time in total.
-
utrero
- orc pawn

- Posts: 28
- Joined: Tue Apr 20, 2004 11:30 am
Post
by utrero » Tue Apr 20, 2004 9:12 pm
no more you dont hace this spell memed.. biw he loop begins good but in a few iterations they usually get stucked in one song forever. have maked a read at code and i cant find problem but im soo blind in programing

hope this help..tested for 30 minuts