Feature Request: /mqpause #

A forum for feature requests/discussions and user submitted patches that improve MQ2

Moderator: MacroQuest Developers

jdestefx
a lesser mummy
a lesser mummy
Posts: 55
Joined: Fri Jun 21, 2013 6:13 pm

Feature Request: /mqpause #

Post by jdestefx » Thu Jul 20, 2017 4:59 pm

In addition to an on/off parameter, have it recognized a deci-second param.

ie. /mqpause 20

JudgeD
a snow griffon
a snow griffon
Posts: 354
Joined: Sat Aug 18, 2012 8:07 pm

Re: Feature Request: /mqpause #

Post by JudgeD » Thu Jul 20, 2017 7:05 pm

It's called /delay

jdestefx
a lesser mummy
a lesser mummy
Posts: 55
Joined: Fri Jun 21, 2013 6:13 pm

Re: Feature Request: /mqpause #

Post by jdestefx » Fri Jul 21, 2017 11:47 am

That's different. I don't want a serial pause. I want to freeze a macro while I issue other commands briefly.

User avatar
MacQ
Macro Author
Macro Author
Posts: 674
Joined: Sat Apr 02, 2005 2:39 pm

Re: Feature Request: /mqpause #

Post by MacQ » Fri Jul 21, 2017 5:40 pm

I realize this is not as clean as your suggestion of adding a timer value to /mqpause ##, but until/if that feature is added, you could probably accomplish something similar by setting up an #Event in your macro.

You might trigger the #Event with some command like a tell, a say, or even a command from EQBC which would cause a pause (loop) until another #Event breaks that loop. While macro is in the loop, you could execute the commands you want to execute (I assume you are not wanting to start another macro), then issue a different command (an #Event trigger), intercepted by an #Event, to break the loop.

I have macros that loop until certain events transpire, a bit different that I am suggesting, but my point is that I routinely execute commands while that macro is running so the basic concept is doable.

Just make sure you don't create a loop that will "drain" your CPU.

Chatwiththisname
a lesser mummy
a lesser mummy
Posts: 51
Joined: Sat Oct 16, 2004 8:09 pm
Location: Texas

Re: Feature Request: /mqpause #

Post by Chatwiththisname » Wed Jul 26, 2017 3:48 pm

jdestefx wrote:That's different. I don't want a serial pause. I want to freeze a macro while I issue other commands briefly.
closest thing to that is /timed I believe

http://macroquest2.com/wiki/index.php/Timed

you could /multiline ; /timed 10 /mqp off ; /mqp on

or something like that I suppose?

dewey2461
Contributing Member
Contributing Member
Posts: 1759
Joined: Sun Apr 17, 2005 1:53 am

Re: Feature Request: /mqpause #

Post by dewey2461 » Wed Jul 26, 2017 9:58 pm

Add the /mqpause # command do your macro.



Your main macro probably has something like :

Code: Select all

| Do some setup stuff here
:MainLoop
   |    Do stuff all the time
   |    Do some more stuff 
/goto :MainLoop
Add a subroutine that you bind to the /mqpause command which sets a variable mPause which can be either:

0 = Running normal ( OFF )
TimeStamp = Paused until current time > TimeStamp
MAX_INT = Paused - no timer

and in your main loop you call a subroutine that :

Code: Select all

:LoopPaused
    /if ( ${mPause} == 0) /return
    /if ( ${mPause} <  "Current Time" )  /return
 /goto :LoopPause
( I forget which TLO has the current time , think it is ${MacroQuest.XXX} ... )