Download
(4Kb)
Download
Updated: 08-31-17 04:23 AM
Pictures
File Info
Compatibility:
Shadows of Argus (7.3.0)
Tomb of Sargeras (7.2.0)
Updated:08-31-17 04:23 AM
Created:10-29-14 03:51 AM
Downloads:277,952
Favorites:125
MD5:

GnomeSequencer  Popular! (More than 5000 hits)

Version: 7.3.0.1
by: semlar [More]

This is a small addon that allows you create a sequence of macros to be executed at the push of a button.

Like a /castsequence macro, it cycles through a series of commands when the button is pushed. However, unlike castsequence, it uses macro text for the commands instead of spells, and it advances every time the button is pushed instead of stopping when it can't cast something.

This means if a spell is on cooldown and you push the button it will continue to the next item in the list with each press until it reaches the end and starts over.

When you first install the addon you will need to rename "ExampleSequences.lua" to "Sequences.lua" and open the file in a text editor to add your own sequences.

The Sequences file contains a couple examples to get you started with writing your own sequences, I'll post its entirety here.

Lua Code:
  1. local _, Sequences = ... -- Don't touch this
  2.  
  3. ----
  4. -- Rename this file to Sequences.lua before you get started, it uses a different file name so as not to overwrite your existing file with a future update.
  5. -- Every entry in the Sequences table defines a single sequence of macros which behave similarly to /castsequence.
  6. -- Sequence names must be unique and contain no more than 16 characters.
  7. -- To use a macro sequence, create a blank macro in-game with the same name you picked for the sequence here and it will overwrite it.
  8. ----
  9.  
  10. ----
  11. -- Here's a large demonstration sequence documenting the format:
  12. Sequences["GnomeExample1"] = {
  13.     -- StepFunction optionally defines how the step is incremented when pressing the button.
  14.     -- This example increments the step in the following order: 1 12 123 1234 etc. until it reaches the end and starts over
  15.     -- DO NOT DEFINE A STEP FUNCTION UNLESS YOU THINK YOU KNOW WHAT YOU'RE DOING
  16.     StepFunction = [[
  17.         limit = limit or 1
  18.         if step == limit then
  19.             limit = limit % #macros + 1
  20.             step = 1
  21.         else
  22.             step = step % #macros + 1
  23.         end
  24.     ]],
  25.    
  26.     -- PreMacro is optional macro text that you want executed before every single button press.
  27.     -- This is if you want to add something like /startattack or /stopcasting before all of the macros in the sequence.
  28.     PreMacro = [[
  29. /run print("-- PreMacro Script --")
  30. /startattack   
  31.     ]],
  32.    
  33.     -- PostMacro is optional macro text that you want executed after every single button press.
  34.     -- I don't know what you would need this for, but it's here anyway.
  35.     PostMacro = [[
  36. /run print("-- PostMacro Script --")
  37.     ]],
  38.    
  39.     -- Macro 1
  40.     [[
  41. /run print("Executing macro 1!")
  42. /cast SpellName1
  43.     ]],
  44.    
  45.     -- Macro 2
  46.     [[
  47. /run print("Executing macro 2!")
  48. /cast SpellName2
  49.     ]],
  50.    
  51.     -- Macro 3
  52.     [[
  53. /run print("Executing macro 3!")
  54. /cast SpellName3
  55.     ]],
  56. }
  57.  
  58. ----
  59. -- Here is a short example which is what most sequences will look like
  60. Sequences["GnomeExample2"] = {
  61.     -- Macro 1
  62.     [[
  63. /run print("Executing macro 1!")
  64. /cast SpellName1
  65.     ]],
  66.    
  67.     -- Macro 2
  68.     [[
  69. /run print("Executing macro 2!")
  70. /cast SpellName2
  71.     ]],
  72.    
  73.     -- Macro 3
  74.     [[
  75. /run print("Executing macro 3!")
  76. /cast SpellName3
  77.     ]],
  78. }



If you like one of my addons, feel free to support the cause!

7.2.0.3 - Attempt to avoid a potential infinite loop caused by changing the macro icon
7.2.0.2 - Attempt to set macro icon more aggressively
7.2.0.1 - Fix for icons clearing when zoning (it's unclear what's causing this)
r5 - toc bump for 6.1
r4 - Added a custom error handler and changed how macros are edited to improve support with other macro addons.
r3 - Resolved a minor infinite loop involving UnregisterEvent('UPDATE_MACROS') not taking effect until the next frame.
r2 - Added custom step functionality, pre and post macro text, and made the sequences file (hopefully) easier to understand and edit.
Optional Files (0)


Post A Reply Comment Options
Unread 01-07-15, 03:34 PM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1060
File comments: 187
Uploads: 25
Re: Logic Based Step

Originally Posted by Bajawah
What do you guys think of this concept?

I just ran into it on the WowLazyMacro forum.

Have not had a chance to try making something like this yet, but it -looks- like it would work to some degree at least.

FYI - In his post he is asking for help on syntax and the like, so the code below is broken!

http://wowlazymacros.com/forums/topi...step-sequence/
That's not going to work, those api functions aren't accessible from the secure environment to keep people from doing exactly this.
Report comment to moderator  
Reply With Quote
Unread 01-07-15, 02:01 PM  
Bajawah
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Logic Based Step

What do you guys think of this concept?

I just ran into it on the WowLazyMacro forum.

Have not had a chance to try making something like this yet, but it -looks- like it would work to some degree at least.

FYI - In his post he is asking for help on syntax and the like, so the code below is broken!

http://wowlazymacros.com/forums/topi...step-sequence/

Code:
-- Prot Gladiator
Sequences["GLADIATOR"] = {	
StepFunction = [[
	if UnitMana("player") > 50 then
		step = 7
	else
	usable, nomana = IsUsableSpell("Shield Slam");
	if  usable then
		step =1
	 else
	 usable, nomana = IsUsableSpell("Revenge");
	 if usable then
		step = 2 
	 else
	  usable, nomana = IsUsableSpell("Victory Rush");
	 if usable then
		step = 3
	else
	usable, nomana = IsUsableSpell("Storm Bolt");
	if usable then
		step = 4
	else
	usable, nomana = IsUsableSpell("Execute");
	if usable then
		step = 5
	else 
		step = 6
	end
]],
PreMacro = [[
/targetenemy [noharm][dead]
/cast [combat] Berserker Rage
/cast [combat] Shield Block
/cast [combat] Bloodbath
]],
'/cast Shield Slam',

*...snip...*
Report comment to moderator  
Reply With Quote
Unread 01-07-15, 05:05 AM  
Caellian
A Frostmaul Preserver
 
Caellian's Avatar

Forum posts: 281
File comments: 252
Uploads: 5
Re: Re: Re: GS stopped working

Originally Posted by Zultanjin
Originally Posted by semlar
Originally Posted by Zultanjin
Sequences[‘Test'] = {
‘/cast Steady Shot’,
‘/cast Steady Shot',
‘/cast Steady Shot’,
}
You can't use slanted quotes anywhere in the file, they are not valid lua.
Sorry Semlar, but I'm not the smartest guy with coding.
I tried that test one but it never worked.
However, the two Sequences MarksST and MarksAOE were copied from WoW Lazy Macros, and although I made some changes, like I said, both were working and suddenly they stopped.
If they are wrong, please help me on how to proceed.

I really liked your addon. Thanks.
You are using slanted quotes ‘...’ when you should be using normal quote "..." or '...'
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
Report comment to moderator  
Reply With Quote
Unread 01-06-15, 03:33 PM  
Zultanjin
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Re: Re: GS stopped working

Originally Posted by semlar
Originally Posted by Zultanjin
Sequences[‘Test'] = {
‘/cast Steady Shot’,
‘/cast Steady Shot',
‘/cast Steady Shot’,
}
You can't use slanted quotes anywhere in the file, they are not valid lua.
Sorry Semlar, but I'm not the smartest guy with coding.
I tried that test one but it never worked.
However, the two Sequences MarksST and MarksAOE were copied from WoW Lazy Macros, and although I made some changes, like I said, both were working and suddenly they stopped.
If they are wrong, please help me on how to proceed.

I really liked your addon. Thanks.
Report comment to moderator  
Reply With Quote
Unread 01-04-15, 11:17 PM  
FaolanKing
A Kobold Labourer
 
FaolanKing's Avatar

Forum posts: 0
File comments: 19
Uploads: 0
Re: Re: GS Not working

Originally Posted by semlar
Originally Posted by FaolanKing
I'm also getting nothing from GS. Seems that blizzard made a change that affects this add-on. Can this be repaired? I really like using it. Thanks
If that's your entire file then you removed the first line that says not to touch it.
No my file starts like this:

local _, Sequences = ... -- Don't touch this

----
-- Rename this file to Sequences.lua before you get started, it uses a different file name so as not to overwrite your existing file with a future update.
-- Every entry in the Sequences table defines a single sequence of macros which behave similarly to /castsequence.
-- Sequence names must be unique and contain no more than 16 characters.
-- To use a macro sequence, create a blank macro in-game with the same name you picked for the sequence here and it will overwrite it.
----

----
-- Here's a large demonstration sequence documenting the format:
Sequences["GnomeExample1"] = {
-- StepFunction optionally defines how the step is incremented when pressing the button.
-- This example increments the step in the following order: 1 12 123 1234 etc. until it reaches the end and starts over
-- DO NOT DEFINE A STEP FUNCTION UNLESS YOU THINK YOU KNOW WHAT YOU'RE DOING
StepFunction = [[
limit = limit or 1
if step == limit then
limit = limit % #macros + 1
step = 1
else
step = step % #macros + 1
end
]],

-- PreMacro is optional macro text that you want executed before every single button press.
-- This is if you want to add something like /startattack or /stopcasting before all of the macros in the sequence.
PreMacro = [[
/run print("-- PreMacro Script --")
/startattack
]],

-- PostMacro is optional macro text that you want executed after every single button press.
-- I don't know what you would need this for, but it's here anyway.
PostMacro = [[
/run print("-- PostMacro Script --")
]],

-- Macro 1
[[
/run print("Executing macro 1!")
/cast SpellName1
]],

-- Macro 2
[[
/run print("Executing macro 2!")
/cast SpellName2
]],
***EDITED***
So I out every single sequence and just added two back to the sequence.lui file and it is working again.
I added this sequence in last night before I went to bed. Could this be it? SEE BELOW:

Sequences['FrostDPS'] = {
StepFunction = [[
order = newtable(1, 5, 6, 7, 1, 2, 1, 1, 1, 1, 1, 2, 2, 4, 3, 3, 3)

newstep = (newstep and (newstep % #order + 1)) or 2
step = order[newstep]
]],

PreMacro = [[
/targetenemy [noharm][dead]
/cast [nopet] summon water elemental
/petattack [@target,harm]
]],
PostMacro = [[
/startattack
/use [combat,nochanneling]13
/use [combat,nochanneling]14
]],
-- Macro 1 - Main Single Target Sequence For Frostmage
[[
/castsequence reset=combat/target frostbolt, Frostbolt, Frostbolt, Ice lance, Ice Lance, Ice Lance, Frostfire Bolt',
]],
-- Macro 2 - Frostbolt
[[
/cast Frostbolt
]],
-- Macro 3 - Ice Lance
[[
/cast Ice Lance
]],
-- Macro 4 - Frostfire Bolt
[[
/cast Frostfire Bolt
]],
-- Macro 5 - Ice Barrier
[[
/cast !Ice Barrier
]],
-- Macro 6 - Icy Veins
[[
/cast !Icy Veins
]],
-- Macro 7 - Deep Freeze
[[
/cast Deep Freeze
]],
}
__________________

Last edited by FaolanKing : 01-05-15 at 01:01 AM.
Report comment to moderator  
Reply With Quote
Unread 01-04-15, 06:40 PM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1060
File comments: 187
Uploads: 25
Originally Posted by Caellian
Is there any way to make it run through the whole sequence at step 4 (Blah 4, Blah5, Blah6) before going back to step 1 ?
No, the addon can't track what step in the castsequence you're on, assuming castsequence remembers its place.

You could take the spells out of your /castsequence and just put them at the end of the sequence list and write the step function in a way that would iterate over those last 3 items every time it gets to that part.
Report comment to moderator  
Reply With Quote
Unread 01-04-15, 06:33 PM  
Caellian
A Frostmaul Preserver
 
Caellian's Avatar

Forum posts: 281
File comments: 252
Uploads: 5
Semlar, i have a question about the step function.

Let's say we have this:

Code:
Sequences["Name"] = {

-- Step 1
	[[
/cast Blah1
	]],

-- Step 2
	[[
/cast Blah2
	]],

-- Step 3
	[[
/cast Blah3
	]],

-- Step 4
	[[
/castsequence Blah4, Blah5, Blah6
	]],

}
Without the step function, it will run through steps 1, 2, 3, 4 (cast the first spell) then go back to step 1.

With the step function, it will run through steps 1, 1, 2, 1, 2, 3, 1, 2, 3, 4 (cast the first spell) then go back to step 1.

Is there any way to make it run through the whole sequence at step 4 (Blah 4, Blah5, Blah6) before going back to step 1 ?
__________________
if (sizeof(workload) > sizeof(brain_capacity)) { die('System Overload'); }
Report comment to moderator  
Reply With Quote
Unread 01-04-15, 04:21 PM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1060
File comments: 187
Uploads: 25
Re: GS Not working

Originally Posted by FaolanKing
I'm also getting nothing from GS. Seems that blizzard made a change that affects this add-on. Can this be repaired? I really like using it. Thanks
If that's your entire file then you removed the first line that says not to touch it.
Report comment to moderator  
Reply With Quote
Unread 01-04-15, 04:00 PM  
FaolanKing
A Kobold Labourer
 
FaolanKing's Avatar

Forum posts: 0
File comments: 19
Uploads: 0
Exclamation GS Not working

I'm also getting nothing from GS. Seems that blizzard made a change that affects this add-on. Can this be repaired? I really like using it. Thanks

***Example code***
Code:
Sequences['AMBlast'] = { 
PreMacro = [[
/targetenemy [noharm][dead]
]],
		'/castsequence [nochanneling] reset=target/12 Arcane Blast, Arcane Blast, Arcane Blast, Arcane Blast, Supernova, Arcane Barrage, Arcane Blast, Arcane Blast, Arcane Blast, Arcane Barrage',
		'/cast [combat,nochanneling] Arcane Missiles',
		'/castsequence [combat,nochanneling] reset=combat/12 Presence of Mind, Arcane Power, Presence of Mind',
PostMacro = [[
/startattack
/use [combat]13
/use [combat]14
/use Crystal of Insanity
]],
}
__________________

Report comment to moderator  
Reply With Quote
Unread 01-04-15, 02:24 PM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1060
File comments: 187
Uploads: 25
Re: GS stopped working

Originally Posted by Zultanjin
Sequences[‘Test'] = {
‘/cast Steady Shot’,
‘/cast Steady Shot',
‘/cast Steady Shot’,
}
You can't use slanted quotes anywhere in the file, they are not valid lua.
Report comment to moderator  
Reply With Quote
Unread 01-04-15, 07:15 AM  
Zultanjin
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
GS stopped working

Hello,

Up until last morning my GS was working perfectly, but last night I could not get it to work. I keep getting the error message whenever I login or reloadUI:

"Failed to load Sequences.lua or contains no macros, create the file from ExampleSequences.lua and restart the game."

Not even a Test Macro I created this morning loads in the game.

Here is my Sequences.lua:

local _, Sequences = ... -- Don't touch this

Sequences[‘Test'] = {
‘/cast Steady Shot’,
‘/cast Steady Shot',
‘/cast Steady Shot’,
}

Sequences[“MarksST”] = {
StepFunction = [[
limit = limit or 1
if step == limit then
limit = limit % #macros + 1
step = 1
else
step = step % #macros + 1
end
]],
PreMacro = [[
/console Sound_EnableSFX 0
/targetenemy [noharm][dead]
/cast [@focus,help][help][@pet,exists] Misdirection
/cast [combat] Rapid Fire
/cast Berserking(Racial)
/cast Roar of Courage
]],
‘/cast Kill Shot’,
‘/cast Chimaera Shot’,
‘/cast A Murder of Crows’,
‘/cast Glaive Toss’,
‘/cast Steady Shot’,
‘/cast Aimed Shot’,
‘/cast Aimed Shot’,
‘/cast Steady Shot’,
PostMacro = [[
/startattack
/petattack
/use [combat]13
/use [combat]14
/script UIErrorsFrame:Clear()
/console Sound_EnableSFX 1
]],
}

Sequences[“MarksAOE”] = {
StepFunction = [[
limit = limit or 1
if step == limit then
limit = limit % #macros + 1
step = 1
else
step = step % #macros + 1
end
]],
PreMacro = [[
/console Sound_EnableSFX 0
/targetenemy [noharm][dead]
/cast [@focus,help][help][@pet,exists] Misdirection
/cast [combat] Rapid Fire
/cast Berserking(Racial)
/cast Roar of Courage
]],
'/cast Kill Shot’,
'/cast Chimaera Shot’,
'/cast A Murder of Crows',
'/cast Glaive Toss’,
'/cast Steady Shot',
'/cast Multi-Shot',
'/cast Multi-Shot',
'/cast Steady Shot',
PostMacro = [[
/startattack
/petattack
/use [combat]13
/use [combat]14
/script UIErrorsFrame:Clear()
/console Sound_EnableSFX 1
]],
}
Report comment to moderator  
Reply With Quote
Unread 01-03-15, 03:03 PM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1060
File comments: 187
Uploads: 25
Re: How to edit code?

Originally Posted by Jdcranke07
Hey Boss,

I've done some work with Java before, so I'm not completely illiterate with coding. But, when I go to edit just the name(s) of the macro or delete any of the printed text, the entire code dies and WoW won't make the connection. Although, I have used your stock code provided and when I setup a macro called "GnomeExample1" or "GnomeExample2" it at least prints the text.

All I did was change the "GnomeExample2" to "WarTank" and made a new blank macro in-game called "WarTank". Nothing happened. No printed text or anything. What's up? What am I missing?
Did you save the file and /reload the game? Make sure you didn't delete the quotes or anything.
Report comment to moderator  
Reply With Quote
Unread 01-03-15, 02:50 PM  
Jdcranke07
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Exclamation How to edit code?

Hey Boss,

I've done some work with Java before, so I'm not completely illiterate with coding. But, when I go to edit just the name(s) of the macro or delete any of the printed text, the entire code dies and WoW won't make the connection. Although, I have used your stock code provided and when I setup a macro called "GnomeExample1" or "GnomeExample2" it at least prints the text.

All I did was change the "GnomeExample2" to "WarTank" and made a new blank macro in-game called "WarTank". Nothing happened. No printed text or anything. What's up? What am I missing?
Report comment to moderator  
Reply With Quote
Unread 01-01-15, 07:14 AM  
Vaylory
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Done

Thank you
Report comment to moderator  
Reply With Quote
Unread 12-31-14, 05:21 PM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1060
File comments: 187
Uploads: 25
Re: Failed to load Sequences.lua

Originally Posted by Vaylory
Hello all,

Today I get this message:

GnomeSequencer: Failed to load Sequences.lua or contains no macros, create the file from ExampleSequences.lua and restart the game.

thats my Sequences.lua Please help whats wrong. I didnt no whats happend. Thank you so much.
Replace the fancy slanted quotes with normal straight quotes ' or ", the ones you have aren't valid.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: