Not sure if this is possible but.. custom commands in macro

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

Lajiskin
decaying skeleton
decaying skeleton
Posts: 6
Joined: Thu Oct 09, 2003 4:09 pm

Not sure if this is possible but.. custom commands in macro

Post by Lajiskin » Wed Oct 15, 2003 9:34 am

What I am looking to do, is write a macro that I would almost always have running with my bard that would enable several other commands.
Aka, /switch drum or /switch weapons
/twist <however i want to set up song params>
and such, I know that I could use an individual macro for each of these, but switching quickly between macros I'm using has become quite cumbersome due to the several second delay in returning keys after a macro quits. This can be quite disasterous in some cases.

I know it is most likely impossible to enable within a macro various / commands, but some kind of syntax that I would be able to hotkey would be ideal. I suppose I could hack it along and make it join a private channel, outputting certain text there that the chat_event thing could pick up, but there HAS to be a prettier way...

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Wed Oct 15, 2003 10:10 am

You can switch macros on the fly without having to worry about the delay. That only happens when you issue a /endmacro command, either as the last line of a macro or as an End hotkey.

I use two macros:

hotkey 1: /macro bardmelee 1 2 3
hotkey 2: /macro twist 4 5 6

Upon hitting hotkey 2 the first macro (hotkey 1) immediately aborts and the second one runs, without the /endmacro delay.

I DO get a delay in the start of the next song. That is due to the twist timer not being carried over from one macro to the next, which currently isn't possible (well, at least I haven't figured out how to do it.)

One possibility I haven't attempted yet. With /mqpause chat set to "on", a macro will pause while you type in the chat window. It might be possible to leverage that into allowing you to issue a /call command to a subroutine inside a running macro.

So, you would have one macro with a number of subroutines running, and type /call (or have it hotkeyed) to force the macro to use one of the subs.

Code: Select all

sub Main
:WaitForSub
/delay 1s
/goto :WaitForSub
/endmacro

sub One
  some twisty code
/return

sub Two
  some more bard dancing code
/return
In theory, issuing a /call One routine would break out of the main loop, execute sub One, and then return to the main loop when the sub was finished.

Again, I'm conjecturing, I haven't really tried this.
MQ2: Think of it as Evolution in action.

insanitywiz
a hill giant
a hill giant
Posts: 250
Joined: Mon Jul 08, 2002 7:50 am

Post by insanitywiz » Wed Oct 15, 2003 10:22 am

Mckorr wrote:I DO get a delay in the start of the next song. That is due to the twist timer not being carried over from one macro to the next, which currently isn't possible (well, at least I haven't figured out how to do it.)
I don't know if you are seamlessly trying to switch song lineups, but I have my macro's both stopsong and set the song delay when I run them, this causes it to abort a song it was casting as I switched, but immediately switch to and start casting the new lineup with no delay.

Mckorr
Developer
Developer
Posts: 2326
Joined: Fri Oct 18, 2002 1:16 pm
Location: Texas

Post by Mckorr » Wed Oct 15, 2003 10:42 am

Good idea. I just wrote/converted those macros two days ago, so I'm still fine tuning them.
MQ2: Think of it as Evolution in action.

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

Post by drax » Fri Oct 17, 2003 5:11 pm

Try this instead of trying to run 2 different macros for combat / non combat...this macro switched based on if you have attack turned on.

http://macroquest2.com/phpBB2/viewtopic.php?t=3434