New Macro type coming - Internal Loop.

I have had a few users ask for the ability to iterate through an internal loop within a macro. How I envisage this to work:

Create the ability to define macros that have an internal loop.

Sequences['x'] = {
SpecID = x,
Author = "a",
helpTxt = "stuff",
InternalLoopStart=N,
InternalLoopIterations=N,
InternalLoopFinish = N,
PreMacro = [[]],
Step1,
Step2,
Step3,
Step4,
Step5,
Step6,
PostMacro = [[]],
}

Use Case 1: Startup run once
Set InternalLoopStart =3
Outcome:
Step1
Step2
Step3-6 will follow stepfunction
then reset back to Step1

Use Case 2: Startup then iterations
Set InternalLoopStart =3
Set InternalLoopIterations =20
Outcome
Same as Use Case 1 but it resets after 20 iterations of steps 3-6

Use Case 2: Startup then iterations the closeout
InternalLoopStart =3
InternalLoopIterations =20
InternalLoopFinish = 5
Outcome
Step1
Step2
Steps3-5 run 20 times based on StepFunction
Step6
then reset back to Step1

I just had a question of is this auto play. No its still one press one action but instead of a sequential 1 2 3 4 for example its 1 2 3 2 3 2 3 2 3 2 3 2 3 … 4

Ok this is in for alpha 1 of 1.4.4

Here is an example macro. Note You can use StaticPriority or Normal step functions. The actions of those will apply to within the loop. IE it will sequentially play through the lines before and after loopstart and loopstop. In order to use internal loops for custom stepfunctions you will need to handle loopstart, loopstop, loopiter and looplimit.

Sequences['DB_Ret2'] = {
author="Huldrych@Dath'Remar",
specID=70,
helpTxt = "Talents: 11132211",
loopstart=2,
loopstop=5,
looplimit=5,
icon='INV_MISC_QUESTIONMARK',
lang="enUS",
PreMacro=[[
/targetenemy [noharm][dead]
/cast Avenging Wrath
/cast Shield of Vengeance
]],
"/cast [talent:5/1] Justicar's Vengeance; [talent:5/2]Eye for an Eye",
"/cast Templar's Verdict",
"/cast Judgment",
"/cast Blade of Justice",
"/cast Wake of Ashes",
"/cast Crusader Strike",
PostMacro=[[
]],
}

Limitation of this alpha is that StepFunction=GSStaticPriority is not quite working as intended. that will be in the next Alpha

NOTE: THIS MACRO IN A REAL WORLD SETTING WILL BE CRAP! IT IS A WORKING EXAMPLE OF THE MACRO TYPE AND NOT AN OPTIMISED MACRO.

That is pretty cool Tim, I believe I understand what this will do.

I know it will work for very long fights as long your target never goes away far from range in the encounter or it can mess up cooldowns in the sequence since is not firing off until the loop is done. But I am trying to figure out in my head how it would work on multiple targets or if a target dies and go for the next one if it would lock up.

Also the first argument makes me think if is possible to add a section called cooldowns or allow postmacro to behave like the inner sequences where you throw all of them there and also cycle 1,2,3,4 in the post macro. Maybe postmacro already does this but I did not realize it?

The main use case I was working on was a hunter wanted to do 4 things on pull then loop his normal macro. Pre and Post Macro dont do what they were described as doing. They are better named Key Down, Key Up.

I was the guy that asked you to do this in the youtube video you posted. I have not implemented in a macro yet. However from what I read, this is exactly what I wanted. I will make a macro soon and upload to the Forums. Thank you so very much!

Was this ever implemented and/or will this be added to the gui?