welcome to the best macro i have ever made
it took a long time to track down how to setup the step function, so let’s focus on that first

``````
StepFunction = [[
stepa = "1234564321"

limit = string.len(stepa) or 1
if stepc == nil then
stepc = 1
end
if stepc >= limit then
stepc = 1
else
stepc = stepc + 1
end
step = tonumber(strsub (stepa, stepc, stepc))
]],

``````

wow that is a thing of beauty ant it, so what does it do you might ask well it allows the user complete control over there macro OMGOSH NO WAI!!! i hear you say to yourself, don’t talk to yourself its creepy

How Stepa Works

``````
Sequences['demo'] = {
StepFunction = [[
stepa = "111123"
PreMacro
1	'/cast [nochanneling] Mind Spike',
2	'/cast Mind Blast',
PostMacro = [[
/startattack
/script UIErrorsFrame:Hide();
/console Sound_EnableSFX 1
]],
}

``````

in the above macro stepa has a number chain or “string” of 111123 which means it will call the 1st line “Mind Spike” in you macro 4 times in a row then try and cast the 2nd “Mind Blast” and 3rd line “Shadow Word: Death” before looping back to start the sequence over
this can be any “string” of single digit “123456789” numbers it dose not matter how long, As long as there are no 0’s and the macro has a line to call
“if you call to cast line 4 but only have 3 spells it will not work”

``````
Sequences['example'] = {
StepFunction = [[
stepa = "12345678932789468127653986459218364521987634912745129345"

``````

now on to the macro

Talents are 3 1 3 3 3 1 1
Glyphs are Mind Spike

``````
StepFunction = [[
stepa = "1234564321"

limit = string.len(stepa) or 1
if stepc == nil then
stepc = 1
end
if stepc >= limit then
stepc = 1
else
stepc = stepc + 1
end
step = tonumber(strsub (stepa, stepc, stepc))
]],
PreMacro = [[
/console Sound_EnableSFX 0
]],
'/cast Mind Blast',
'/cast [nochanneling] Mind Spike',
'/cast [target=player, nochanneling]Power Word: Shield',
PostMacro = [[
/startattack
/script UIErrorsFrame:Hide();
/console Sound_EnableSFX 1
]],
}

``````

how is it spamable
well that’s a trickier statement i can click 5 times a second so i just do multiples of 5 in the “string”, i have 10 digits in my string which makes sure i am hitting the same part of the macro once every 2 seconds which is the timer on mind spike

with this secound macro silly

``````
StepFunction = [[
stepa = "1"

limit = string.len(stepa) or 1
if stepc == nil then
stepc = 1
end
if stepc >= limit then
stepc = 1
else
stepc = stepc + 1
end
step = tonumber(strsub (stepa, stepc, stepc))
]],
PreMacro = [[
/console Sound_EnableSFX 0
]],
'/castsequence [nochanneling] reset=combat Shadow Word: Pain, Vampiric Touch, Devouring Plague, Mind Flay, Mind Flay',
PostMacro = [[
/startattack
/script UIErrorsFrame:Hide();
/console Sound_EnableSFX 1
]],
}

``````

Shadow Word: Pain and Vampiric Touch were thrown in for some dotweaving, because why not its extra dps in the likely 8 seconds that you will not be casting mind spike