Can I do a /call by hand while a macro is running?

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

merkzu
a ghoul
a ghoul
Posts: 99
Joined: Wed May 14, 2003 2:08 pm

Can I do a /call by hand while a macro is running?

Post by merkzu » Fri Jun 13, 2003 1:24 pm

I'm working on a buff tracking macro that keeps an array of what buffs I cast on whom. Id like to add a sub that takes a name as an argument and lists all the buffs I currently have on the person and how much duration is left. Am I right to assume that while the macro is running, If i type /call CheckBuffs Joeschmoe, it will stop what its doing, run the CheckBuffs sub, and then return to the spot it was at? Or is it not possible to call a sub by hand like that?

User avatar
Imperfect
Macro Author
Macro Author
Posts: 319
Joined: Fri Jun 14, 2002 1:52 am

Post by Imperfect » Fri Jun 13, 2003 5:38 pm

Try it. I think it would probably work. However you could write a simple little script and test it.

Code: Select all


Sub Main
      :Loop
       /echo In the main loop
       /delay 10
       /goto :Loop
/return

Sub Blah
       /echo this is the blah loop and your /call blah while this was running worked.
       /endmacro
/return
Kind of crude but, it would be a way to test it.
Last edited by Imperfect on Sat Jun 14, 2003 12:38 am, edited 1 time in total.

compuboy
a ghoul
a ghoul
Posts: 108
Joined: Thu Apr 24, 2003 8:19 am
Location: Good Question, if anyone finds out, let me know

Post by compuboy » Fri Jun 13, 2003 6:15 pm

could test that way, but how would you get it to return to what it was doing, just /call the right sub?
ya know, i cant think of anything profound to say here, so....

GO DEVS

merkzu
a ghoul
a ghoul
Posts: 99
Joined: Wed May 14, 2003 2:08 pm

Post by merkzu » Fri Jun 13, 2003 6:35 pm

Ill give it a shot when I get home.

compuboy:

When you start running that macro it will spam "In the main loop" over and over. While its doin that type /call Blah and it should say "this is the blah loop and your /call blah while this was running worked." If things go well, it will then go back to spamming "In the main loop".

If ya try it let me know how it works out as I wont be home for another 4 hours or so. Work sucks =(

merkzu
a ghoul
a ghoul
Posts: 99
Joined: Wed May 14, 2003 2:08 pm

Post by merkzu » Fri Jun 13, 2003 10:12 pm

This works.. Kinda strange though. When I /call the sub by hand I get "Cannot parse Sub ShowBuffs", but then it works anyways.

User avatar
Imperfect
Macro Author
Macro Author
Posts: 319
Joined: Fri Jun 14, 2002 1:52 am

Post by Imperfect » Sat Jun 14, 2003 12:37 am

I thought it would work. Wasn't sure though ;)

Compuboy:

Any call you make should return to the line that it came from them move on. Hence the reason it is a call. Of course I put an /endmacro in there because it would be too tough to see if it worked if you continued to get spammed forever.

kagonis
a hill giant
a hill giant
Posts: 228
Joined: Sat May 24, 2003 8:48 pm

Post by kagonis » Sat Jun 14, 2003 4:33 am

I would suggest that you something like the following, to make sure your Check Buff sub routine only gets called in the right place, in your loop, like:
While macro is running simply do a "/varset doCheck AnythingButNULLGoesHere".

Note, haven't tested it, not sure if it's even possible to use a defined variabled from a macro, directly in EQ.

Code: Select all

#define doCheck v88
Sub Main
	/varset doCheck "NULL"
	:Loop
		/echo Here we do some stuff that must be done before chkBuff can be called properly
		/delay 10
		/if "$doCheck"!="NULL" {
			/call chkBuff
			/varset doCheck "NULL"
		}
		/echo Doing stuff that must be done after chkBuff, or allways for that matter
		/goto :Loop
/return

Sub chkBuff
	/echo Doing chkBuff.
/return