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,777
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 03-28-15, 12:57 PM  
Nidanone
A Kobold Labourer

Forum posts: 0
File comments: 3
Uploads: 0
Double quotes

FYI in case this helps anyone else, when I tried using this for the first time it wasn't working at all (clicking the button I dragged from my Macros did nothing. I replaced all the single-quotes to double-quotes in the sequences file and did a /reload ui , and then it started working.
Report comment to moderator  
Reply With Quote
Unread 03-19-15, 07:45 PM  
Reeper
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
I am having some issues on some macro when i click the macro my whole Game Lags and after the lag the macro aint working from 80 fps when i click the macro it drops to 4fps

this are the only Macros that lags me out but the rest are doing well

Macro for my MM Hunter

Code:
Sequences['Mark'] = { 
PreMacro = [[
/targetenemy [noharm][dead]
/use [nopet,nomod]call pet 5;[@pet,dead]Revive Pet
/revivepet
/petattack [@target,harm]
/petautocastoff [group] Growl
/petautocaston [nogroup] Growl
/cast [combat] Rapid Fire
/console Sound_EnableSFX 0
]],
	'/castsequence [@focus,exists][@pet,exists] reset=30 Misdirection',
	'/cast !Kill Shot',
	'/cast Chimaera Shot',
	'/cast A Murder of Crows',
	'/cast Kill Shot',
	'/cast Barrage',
	'/cast Aimed Shot',
	'/castsequence [nochanneling]reset=5 Steady Shot,Steady Shot,Steady Shot',
PostMacro = [[
/startattack
/petattack
/use [combat]13
/use [combat]14
/cast Chimaera Shot
/script UIErrorsFrame:Clear()
/console Sound_EnableSFX 1
]],
}

Sequences['MarkAoE'] = { 
PreMacro = [[
/targetenemy [noharm][dead]
/use [nopet,nomod]call pet 5;[@pet,dead]Revive Pet
/petattack [@target,harm]
/petautocastoff [group] Growl
/petautocaston [nogroup] Growl
/cast [combat] Rapid Fire
/console Sound_EnableSFX 0
]],
	'/castsequence [@focus,exists][@pet,exists] reset=30 Misdirection',
	'/cast !Kill Shot',
	'/cast Chimaera Shot',
	'/cast A Murder of Crows',
	'/cast Kill Shot',
	'/cast Multi-Shot',
	'/cast Barrage',
	'/castsequence [nochanneling]reset=5 Steady Shot,Steady Shot,Steady Shot',
PostMacro = [[
/startattack
/petattack
/use [combat]13
/use [combat]14
/cast Chimaera Shot
/script UIErrorsFrame:Clear()
/console Sound_EnableSFX 1
]],
}
And this MAcro for my Unholy DK

Code:
Sequences["Unholy"] = {
StepFunction = [[
        limit = limit or 1
        if step == limit then
            limit = limit % #macros + 1
            step = 1
        else
            step = step % #macros + 1
        end
    ]],
PreMacro = [[
/targetenemy [noharm][dead]
    ]],
	'/castsequence reset=target Plague Strike,Plague Leech',
	'/cast Scourge Strike',
	'/cast Festering Strike',
	'/cast Death Coil',
	'/cast [nopet] Raise Dead; Dark Transformation',
	'/cast [combat] Summon Gargoyle',
PostMacro = [[
/petattack
/startattack
/use [combat]13
/use [combat]14
    ]],
}
Sequences["UnholyExe"] = {
StepFunction = [[
        limit = limit or 1
        if step == limit then
            limit = limit % #macros + 1
            step = 1
        else
            step = step % #macros + 1
        end
    ]],
PreMacro = [[
/targetenemy [noharm][dead]
    ]],
	'/castsequence reset=target Plague Strike,Plague Leech',
	'/cast Soul Reaper',
	'/cast Scourge Strike',
	'/cast Festering Strike',
	'/cast Death Coil',
	'/cast [nopet] Raise Dead; Dark Transformation',
	'/cast [combat] Summon Gargoyle',
PostMacro = [[
/petattack
/startattack
/use [combat]13
/use [combat]14
    ]],
}
Report comment to moderator  
Reply With Quote
Unread 03-08-15, 09:17 PM  
Flarin
A Frostmaul Preserver
 
Flarin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 290
File comments: 212
Uploads: 1
Hi - I am trying to understand the in's and out's of this and I am hoping for some clarification.

I would like to fully understand using /castsequence with gnomesequencer. Do all of the options such as [combat], reset=target, reset=45 etc work?


Also - what is the expected result of the following (shortened - please no one copy this, I am just posting to clarify I am using the step function):

Code:
StepFunction = [[
    limit = limit or 1
    if step == limit then
        limit = limit % #macros + 1
        step = 1
    else
        step = step % #macros + 1
    end
]],

[[--macro 1
/castsequence spell1, spell2
]],
[[
--macro2
/castsequence spell3, spell4
]],
[[
--macro3
/cast spell 5
]],


Should I expect:
Code:
(macro 1)spell1


(macro 1)spell2
(macro 2)spell3


(macro 1)spell1
(macro 2)spell4
(macro 3)spell5

and then repeat?
__________________

"I will crush and destroy and...ooo...shiny..."

[SIGPIC][/SIGPIC]
Last edited by Flarin : 03-08-15 at 09:19 PM.
Report comment to moderator  
Reply With Quote
Unread 03-07-15, 08:54 AM  
Dwindlin
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Issues.

Hello:

Have loved this add-on, was working completely fine until I downloaded most recent update. Now I cannot get Shield of the Righteous or Final Verdict to fire from Post Macro (previously they were working and Divine Protection/trinkets continue to work). Curious if anyone else has run into something similar and has a fix, or if anyone has any ideas.

Thanks!
Report comment to moderator  
Reply With Quote
Unread 03-01-15, 09:14 AM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1060
File comments: 187
Uploads: 25
Originally Posted by Nivza
stupid baby question probably, but I've never run into the problem before. I have upwards of 10-13 sequences running without a hitch, they keep me playing WoW (my vision is frying to much to do more than a one button typa thing anymore) so I decided to go find one for a new toon. It won't let me enter any more sequences I get Interface\AddOns\GnomeSequencer\Sequences.lua:167: unexpected symbol near '?'

doesn't matter which sequence I'm trying to add either. I thought maybe it was the last one that worked that I put in, so I stuck one of the new sequences higher up the list, nope it's the new ones. no clue what's going on does this sound familiar to anyone?
Post the contents of your sequences file.

Although if I had to guess, you probably copied something off of lazymacros, which replaces normal quote symbols with invalid characters if it's not inside of a code block.

In other words, you can't copy anything off of that website if the text doesn't have a black background and expect it to work without replacing every single quotation mark with the one on your keyboard.
Last edited by semlar : 03-01-15 at 09:21 AM.
Report comment to moderator  
Reply With Quote
Unread 02-28-15, 09:14 PM  
Nivza
A Kobold Labourer

Forum posts: 0
File comments: 8
Uploads: 0
stupid baby question probably, but I've never run into the problem before. I have upwards of 10-13 sequences running without a hitch, they keep me playing WoW (my vision is frying to much to do more than a one button typa thing anymore) so I decided to go find one for a new toon. It won't let me enter any more sequences I get Interface\AddOns\GnomeSequencer\Sequences.lua:167: unexpected symbol near '?'

doesn't matter which sequence I'm trying to add either. I thought maybe it was the last one that worked that I put in, so I stuck one of the new sequences higher up the list, nope it's the new ones. no clue what's going on does this sound familiar to anyone?
Report comment to moderator  
Reply With Quote
Unread 02-26-15, 02:25 PM  
Treesy
A Kobold Labourer

Forum posts: 0
File comments: 4
Uploads: 0
Re: Re: Still having issue

Originally Posted by semlar
Originally Posted by Treesy
I am still having the same issue, I have uninstalled and re-installed the add on and I still get the same error in chat at log in saying "Failed to load Sequences.lua or contains no macros, create the file from ExampleSequences.lua and restart the game."

It is like the add on does not recognize that I have changed the ExampleSequences.lua file to Sequences.lua and/or its does not recognize that I have macros saved in the file.

Is there something else I need to install? Here is the paste bin of my files that are installed.

http://www.privatepaste.com/350839ec1b

files that are in my world of warcraft > interface > addons> GnomeSequencer folder are:
Core / errorhandler / GnomeSequencer.toc / Sequences.lua
It's possible you have file extensions hidden and the actual file name is Sequences.lua.lua, in which case you should remove the ".lua" from the sequences file.

If you see the ExampleSequences file without an extension, then when you rename it you should not add the .lua extension because you have file extensions hidden in windows and it's not showing you the
complete file name.
By some miraculous way I managed to fix the issue I was having by using three different Sequences files. The add on liked one of them. Thanks for responding to my posts Semlar, most appreciated.
Report comment to moderator  
Reply With Quote
Unread 02-25-15, 04:08 PM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1060
File comments: 187
Uploads: 25
Re: Still having issue

Originally Posted by Treesy
I am still having the same issue, I have uninstalled and re-installed the add on and I still get the same error in chat at log in saying "Failed to load Sequences.lua or contains no macros, create the file from ExampleSequences.lua and restart the game."

It is like the add on does not recognize that I have changed the ExampleSequences.lua file to Sequences.lua and/or its does not recognize that I have macros saved in the file.

Is there something else I need to install? Here is the paste bin of my files that are installed.

http://www.privatepaste.com/350839ec1b

files that are in my world of warcraft > interface > addons> GnomeSequencer folder are:
Core / errorhandler / GnomeSequencer.toc / Sequences.lua
It's possible you have file extensions hidden and the actual file name is Sequences.lua.lua, in which case you should remove the ".lua" from the sequences file.

If you see the ExampleSequences file without an extension, then when you rename it you should not add the .lua extension because you have file extensions hidden in windows and it's not showing you the complete file name.
Report comment to moderator  
Reply With Quote
Unread 02-25-15, 03:59 PM  
Treesy
A Kobold Labourer

Forum posts: 0
File comments: 4
Uploads: 0
Still having issue

I am still having the same issue, I have uninstalled and re-installed the add on and I still get the same error in chat at log in saying "Failed to load Sequences.lua or contains no macros, create the file from ExampleSequences.lua and restart the game."

It is like the add on does not recognize that I have changed the ExampleSequences.lua file to Sequences.lua and/or its does not recognize that I have macros saved in the file.

Is there something else I need to install? Here is the paste bin of my files that are installed.

http://www.privatepaste.com/350839ec1b

files that are in my world of warcraft > interface > addons> GnomeSequencer folder are:
Core / errorhandler / GnomeSequencer.toc / Sequences.lua
Last edited by Treesy : 02-25-15 at 04:00 PM.
Report comment to moderator  
Reply With Quote
Unread 02-25-15, 01:54 PM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1060
File comments: 187
Uploads: 25
Re: Not sure...

Originally Posted by jackiekaye89
Not sure if y'all saw my questions earlier, but I'm still having troubles figuring out how to create the macro I want, basically I'd like it to cast one spell once, and then repeat the second spell until the target is dead or changed, for example, casting a taunt once to pull the target, and then casting a main attack repeatedly until the target is dead. Is this possible or no?
It would be possible, but the addon doesn't currently support doing that.

I'm not even really sure how I would allow that to be written if I did add support for it.
Report comment to moderator  
Reply With Quote
Unread 02-25-15, 01:36 PM  
jackiekaye89
A Kobold Labourer

Forum posts: 0
File comments: 4
Uploads: 0
Not sure...

Not sure if y'all saw my questions earlier, but I'm still having troubles figuring out how to create the macro I want, basically I'd like it to cast one spell once, and then repeat the second spell until the target is dead or changed, for example, casting a taunt once to pull the target, and then casting a main attack repeatedly until the target is dead. Is this possible or no?
Report comment to moderator  
Reply With Quote
Unread 02-25-15, 01:11 PM  
woodgray
A Kobold Labourer

Forum posts: 0
File comments: 6
Uploads: 0
Re: Re: Lag

Originally Posted by semlar
Originally Posted by woodgray
I updated to patch 6.1. After the update Some of my sequences are producing extreme lag.
Listed below is a snapshot of my seq* file. The first 3 are fine both before and now. The last two produce the lag. They did not prior to the wow update.
Forgive the structure. Its not my strong point.
If you are lagging when you have more than 3 sequences, it's possible that you're running another addon that edits macros and it is going into an infinite loop, even though that really shouldn't be happening.

You can try removing the contents of the UpdateIcon function in Core.lua and see if that stops it from happening, if it does you should let me know so I can come up with a better solution.

In Core.lua change
Lua Code:
  1. local function UpdateIcon(self)
  2.     local step = self:GetAttribute('step') or 1
  3.     local button = self:GetName()
  4.     local macro, foundSpell, notSpell = Sequences[button][step], false, ''
  5.     for cmd, etc in gmatch(macro or '', '/(%w+)%s+([^\n]+)') do
  6.         if CastCmds[strlower(cmd)] then
  7.             local spell, target = SecureCmdOptionParse(etc)
  8.             if spell then
  9.                 if GetSpellInfo(spell) then
  10.                     SetMacroSpell(button, spell, target)
  11.                     foundSpell = true
  12.                     break
  13.                 elseif notSpell == '' then
  14.                     notSpell = spell
  15.                 end
  16.             end
  17.         end
  18.     end
  19.     if not foundSpell then SetMacroItem(button, notSpell) end
  20. end
to
Lua Code:
  1. local function UpdateIcon(self)
  2. end
I eliminated macro toolkit seems to have fixed it
Report comment to moderator  
Reply With Quote
Unread 02-25-15, 01:09 PM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1060
File comments: 187
Uploads: 25
Re: Re: Re: Re: Re: R5 not working

Originally Posted by K0DiNE
That's exactly what I did. Thank god I hadn't emptied my recycle bin. Feel like such an idiot..
Glad to hear you figured it out!

In the future, you can just extract the contents of the zip file to the existing GnomeSequencer directory, rather than replacing the whole folder.

The reason it contains an ExampleSequences file that you have to rename is so that it won't overwrite your existing Sequences.lua file when updating the addon.
Report comment to moderator  
Reply With Quote
Unread 02-25-15, 01:00 PM  
K0DiNE
A Kobold Labourer
 
K0DiNE's Avatar

Forum posts: 0
File comments: 19
Uploads: 0
Re: Re: Re: Re: R5 not working

Originally Posted by semlar
Originally Posted by K0DiNE
I have exactly the same problem. I haven't touched the sequences file for a while now and everything worked perfectly before the update.
I don't know what to tell you, the addon still works.

You say you haven't changed anything, but you updated the addon so it's possible you overwrote the directory that contained your previous sequences file.

If there's no syntax error in the chat when you log in then it most likely can't find the Sequences.lua file rather than there being something wrong with its contents.
That's exactly what I did. Thank god I hadn't emptied my recycle bin. Feel like such an idiot..
Report comment to moderator  
Reply With Quote
Unread 02-25-15, 12:34 PM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1060
File comments: 187
Uploads: 25
Re: Lag

Originally Posted by woodgray
I updated to patch 6.1. After the update Some of my sequences are producing extreme lag.
Listed below is a snapshot of my seq* file. The first 3 are fine both before and now. The last two produce the lag. They did not prior to the wow update.
Forgive the structure. Its not my strong point.
If you are lagging when you have more than 3 sequences, it's possible that you're running another addon that edits macros and it is going into an infinite loop, even though that really shouldn't be happening.

You can try removing the contents of the UpdateIcon function in Core.lua and see if that stops it from happening, if it does you should let me know so I can come up with a better solution.

In Core.lua change
Lua Code:
  1. local function UpdateIcon(self)
  2.     local step = self:GetAttribute('step') or 1
  3.     local button = self:GetName()
  4.     local macro, foundSpell, notSpell = Sequences[button][step], false, ''
  5.     for cmd, etc in gmatch(macro or '', '/(%w+)%s+([^\n]+)') do
  6.         if CastCmds[strlower(cmd)] then
  7.             local spell, target = SecureCmdOptionParse(etc)
  8.             if spell then
  9.                 if GetSpellInfo(spell) then
  10.                     SetMacroSpell(button, spell, target)
  11.                     foundSpell = true
  12.                     break
  13.                 elseif notSpell == '' then
  14.                     notSpell = spell
  15.                 end
  16.             end
  17.         end
  18.     end
  19.     if not foundSpell then SetMacroItem(button, notSpell) end
  20. end
to
Lua Code:
  1. local function UpdateIcon(self)
  2. end
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: