• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Macro on a timer (1 Viewer)

BadPuss

Member
Joined
Aug 7, 2005
RedCents
I am looking to run a macro, which then reruns itself after say, 2 hours.
This was suggested:

sub main
:MainLoop

< all the other code and such is here >

/call restart
/goto :MainLoop
/return

Sub restart
/declare restart_time int local ${Math.Calc[${Math.Rand[60]}+120]}
/delay ${restart_time}m
/return


But it does nothing...
Any suggestions?
 
If I was having trouble with this routine, I'd add something like:
Rich (BB code):
Sub restart
  /declare restart_time int local ${Math.Calc[${Math.Rand[60]}+120]} 
  /echo > Restarting in ${restart_time} minutes...
  /delay ${restart_time}m 
/return
If you don't get the echo, you know you're not reaching the routine. If you do get the echo, it should delay that many minutes.
 
Rerun, as in keep running till the time frame ends, then restart itself?

Or do you mean to pause all activity for that time frame then continue?

Assuming you just want to issue the /macro <whatever> after a specified time frame I would look into the "/timed" command. It keeps track of the time even if the parent macro ends and executes after the time has been met.

/timed <timeframe> /endmac (clears the stack)
/timed <timeframe+a second or two> /macro <whatever> (fresh restart)
 
Rich (BB code):
Sub main
/declare restartallover timer outer 120m

:mainloop
..... lots of cool things you want to do for 2 hours or whatever time above timer is set to.....
/if (!${restartallover}) /mac macroname
/goto :mainloop
 
Macro on a timer

Users who are viewing this thread

Back
Top