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,783
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 12-18-14, 10:09 AM  
Deathmeister
A Kobold Labourer

Forum posts: 0
File comments: 6
Uploads: 0
Stumped

Message: Interface\AddOns\GnomeSequencer\Sequences.lua:1: unexpected symbol near '/' Everything was working great and now... nothing...
Report comment to moderator  
Reply With Quote
Unread 12-18-14, 12:21 PM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

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

Originally Posted by Deathmeister
Message: Interface\AddOns\GnomeSequencer\Sequences.lua:1: unexpected symbol near '/' Everything was working great and now... nothing...
You have a forward slash somewhere on the first line of your sequences file which doesn't belong there, I can't tell you anything more specific without seeing it.
Report comment to moderator  
Reply With Quote
Unread 12-18-14, 01:11 PM  
Deathmeister
A Kobold Labourer

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

Originally Posted by semlar
Originally Posted by Deathmeister
Message: Interface\AddOns\GnomeSequencer\Sequences.lua:1: unexpected symbol near '/' Everything was working great and now... nothing...
You have a forward slash somewhere on the first line of your sequences file which doesn't belong there, I can't tell you anything more specific without seeing it.
Wow... thank you for the quick response. I did have a /, removed it but macro still didn't fire. So when in doubt, start over. Fixed with new install and sequences.

That aside.. your addon is amazing... thank you!!!
Report comment to moderator  
Reply With Quote
Unread 12-18-14, 02:40 PM  
Zarwiin
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Re: i don't understand anything

Originally Posted by Zarwiin
hi, im sorry i don't understand anything, i tried, really, i copy pasted some macro that i found, i don't even have an error message, just nothing this is what i want :

Sequences['Ret'] = {
PreMacro = [[
/targetenemy [noharm][dead]
]],
'/cast Jugement',
'/cast Frappe du croisé',
'/cast Exorcisme',
'/cast !Couroux vengeur',
'/cast !Comdamnation à mort',
"/cast Verdict du templier" ,
'/cast Marteau du couroux',
PostMacro = [[
/use [combat]13
/use [combat]14
]],
}


and

Sequences['Unholy'] = {
PreMacro = [[
/targetenemy [noharm][dead]
]],
'/cast !Voile mortel',
'/use [combat]13',
'/use [combat]14',
'/cast Poussée de fièvre',
'/cast Frappe de peste',
'/cast [combat]Furoncle sanglant',
'/cast Frappe purulente',
'/cast Sombre transformation',
'/cast Parasite de peste',
'/cast Frappe purulente',
'/cast Voile mortel',
'/cast Faucheur d'âme',
'/cast [combat] Invocation d'une gargouille',
'/cast Frappe purulente',
'/cast !Voile mortel',
}
these two macro actually don't work, there is no link between the game and my notepad i think, please help :'( ( sorry for my bad english im french xd )
i don't understand anything, i tried to remove macr toolkit and turn off all my addons, i downloaded notepad++ and wrote the macro on it, for many people this macro works :

Sequences["wwmonk"] = {
PreMacro = [[
/targetenemy [noharm][dead]
]],
"/cast !Fists of Fury",
'/cast [nochanneling] Rushing Jade Wind',
'/cast [nochanneling] chi wave',
"/cast [nochanneling] !rising sun kick",
'/cast [nochanneling] jab',
'/cast [nochanneling] jab',
'/cast [nochanneling] blackout kick',
'/cast [nochanneling] jab',
'/cast [nochanneling] Expel Harm',
'/cast [nochanneling] jab',
'/cast [nochanneling] tiger palm',
'/cast [nochanneling] [combat]Energizing Brew',
PostMacro = [[
/cast !touch of death
]],
}

but this still not work, nothing happen, not even an error, just nothing :'( pls help me :'(
Report comment to moderator  
Reply With Quote
Unread 12-19-14, 08:29 AM  
sinning30
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Language issues

Heyo! I’ve went through the comments and noticed several issues with languages other than English.

It’s mostly about the skill names. It's writings differ in German, Russian, French… So, I’d like to know if GS works with skill names in other languages, or is it possible to write a skill ID instead.

If someone has solved the broblem, a reply will be greatly appreciated.
Report comment to moderator  
Reply With Quote
Unread 12-19-14, 10:13 AM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1060
File comments: 187
Uploads: 25
Re: Language issues

Originally Posted by sinning30
Heyo! I’ve went through the comments and noticed several issues with languages other than English.

It’s mostly about the skill names. It's writings differ in German, Russian, French… So, I’d like to know if GS works with skill names in other languages, or is it possible to write a skill ID instead.

If someone has solved the broblem, a reply will be greatly appreciated.
I've answered this multiple times, but yes you can use any language as long as your text editor supports it.

Originally Posted by semlar
Make sure the file is being edited using UTF-8 encoding in your text editor, you may have to use a different editor like notepad++ if yours can't do it.

If you can't get that to work, try entering the spell name using this format..
Lua Code:
  1. ([[
  2. /run print("Executing macro 1!")
  3. /cast %s
  4. ]]):format(GetSpellInfo(2944)),
It should replace %s in the string with the name of the spell, just change 2944 to the spell id (if you don't know the spell id you can type /dump GetSpellInfo(spellName) in-game and it will be the 7th value).

For multiple spells you would do it like this..
Lua Code:
  1. ([[
  2. /run print("Executing macro 1!")
  3. /cast %s
  4. /cast %s
  5. ]]):format(GetSpellInfo(spellID1), GetSpellInfo(spellID2)),
One more thing, IF your macro text contains percentage signs for some reason (like /whisper %t) and you use "format" on it, you need to change them to "%%" (eg. /whisper %%t) because % is a special character and has to be escaped using another %.
Last edited by semlar : 12-19-14 at 10:17 AM.
Report comment to moderator  
Reply With Quote
Unread 12-20-14, 10:00 PM  
sorakie
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Re: Showtooltip issue

Originally Posted by Turok13
Hi

Firstly, thanks for the awesome addon!!

I have a small problem with #showtooltip though, I want it to only display Mutilate as tooltip and not cycle through all the spells, here's my macro:

Sequences['AssCPB'] = {
PreMacro = [[
#showtooltip Mutilate
/startattack
/targetlastenemy [target=target,noexists]
/cast [target=targettarget,help,exists] Tricks of the Trade
]],
[[/cast Mutilate]],
[[/cast Dispatch]],
PostMacro = [[
/use [combat]13
/use [combat]14
/script UIErrorsFrame:Clear()
]],
}

Macro runs 100% but for some reason it doesn't want to show #showtooltip Mutilate it still scrolls through the spells.

Any ideas how to fix this?
No idea if you can fix dat but Im putting the macro in a hidden bar -> Put a sample spell in ur main bar.

Tsk if you like to see the number/keys of ur keybind, just name ur macro with the key.
Last edited by sorakie : 12-20-14 at 10:06 PM.
Report comment to moderator  
Reply With Quote
Unread 12-21-14, 09:51 AM  
jnyX2
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Hey Guys, i'm new to GnomeS and i can't get it working properly.

trying to use this seq for my hunter:

Lua Code:
  1. ---Hunter---
  2. ---Marksman---
  3. ---By Smokenz---
  4.  
  5. Sequences['MarksST'] = {
  6. StepFunction = [[
  7.         limit = limit or 1
  8.         if step == limit then
  9.             limit = limit % #macros + 1
  10.             step = 1
  11.         else
  12.             step = step % #macros + 1
  13.         end
  14.     ]],
  15. PreMacro = [[
  16. /console Sound_EnableSFX 0
  17. /targetenemy [noharm][dead]
  18. /cast [@focus,help][help][@pet,exists] Misdirection
  19. /cast [combat] Rapid Fire
  20. /cast Berserking(Racial)
  21. /cast Furious Howl
  22. ]],
  23.     '/cast Kill Shot',
  24.     '/cast Chimaera Shot'
  25.     '/cast A Murder of Crows',
  26.     '/cast Glaive Toss',
  27.     '/use Mecha-Blast Rocket',
  28.     '/cast Aimed Shot',
  29.     '/cast Aimed Shot',
  30.     '/cast Aimed Shot',
  31.     '/cast Focusing Shot',
  32. PostMacro = [[
  33. /startattack
  34. /petattack
  35. /cast Intimidation
  36. /use [combat]13
  37. /use [combat]14
  38. /script UIErrorsFrame:Clear()
  39. /console Sound_EnableSFX 1
  40. ]],
  41. }
  42.  
  43. Sequences['MarksAOE'] = {
  44. StepFunction = [[
  45.         limit = limit or 1
  46.         if step == limit then
  47.             limit = limit % #macros + 1
  48.             step = 1
  49.         else
  50.             step = step % #macros + 1
  51.         end
  52.     ]],
  53. PreMacro = [[
  54. /console Sound_EnableSFX 0
  55. /targetenemy [noharm][dead]
  56. /cast [@focus,help][help][@pet,exists] Misdirection
  57. /cast [combat] Rapid Fire
  58. /cast Berserking(Racial)
  59. /cast Furious Howl
  60. ]],
  61.     '/cast Kill Shot',
  62.     '/cast Chimaera Shot'
  63.     '/cast A Murder of Crows',
  64.     '/cast Glaive Toss',
  65.     '/cast Multi-Shot',
  66.     '/cast Multi-Shot',
  67.     '/cast Focusing Shot',
  68. PostMacro = [[
  69. /startattack
  70. /petattack
  71. /cast Intimidation
  72. /use [combat]13
  73. /use [combat]14
  74. /script UIErrorsFrame:Clear()
  75. /console Sound_EnableSFX 1
  76. ]],
  77. }

I'm getting this Error:

Code:
Date: 2014-12-21 16:20:03
ID: 1
Error occured in: Global
Count: 1
Message: ..\AddOns\GnomeSequencer\Sequences.lua line 41:
   attempt to index global 'Sequences' (a nil value)
Debug:
   GnomeSequencer\Sequences.lua:41: in main chunk
Locals:
(*temporary) = nil
(*temporary) = <table> {
 1 = "/cast Kill Shot"
 2 = "/cast Chimaera Shot"
 3 = "/cast A Murder of Crows"
 4 = "/cast Glaive Toss"
 5 = "/use Mecha-Blast Rocket"
 6 = "/cast Aimed Shot"
 7 = "/cast Aimed Shot"
 8 = "/cast Aimed Shot"
 9 = "/cast Focusing Shot"
 PostMacro = "/startattack
/petattack
/cast Intimidation
/use [combat]13
/use [combat]14
/script UIErrorsFrame:Clear()
/console Sound_EnableSFX 1
"
 PreMacro = "/console Sound_EnableSFX 0
/targetenemy [noharm][dead]
/cast [@focus,help][help][@pet,exists] Misdirection
/cast [combat] Rapid Fire
/cast Berserking(Racial)
/cast Furious Howl
"
 StepFunction = "		limit = limit or 1
		if step == limit then
			limit = limit % #macros + 1
			step = 1
		else
			step = step % #macros + 1
		end
	"
}
(*temporary) = "/cast Kill Shot"
(*temporary) = "/cast Chimaera Shot"
(*temporary) = "/cast A Murder of Crows"
(*temporary) = "/cast Glaive Toss"
(*temporary) = "/use Mecha-Blast Rocket"
(*temporary) = "/cast Aimed Shot"
(*temporary) = "/cast Aimed Shot"
(*temporary) = "/cast Aimed Shot"
(*temporary) = "/cast Focusing Shot"
(*temporary) = "attempt to index global 'Sequences' (a nil value)"

AddOns:
  Swatter, v5.0.0 (<%codename%>)
  AddOnSkins, v3.11
  AtlasLoot, vv8.00.00beta5
  Babylonian, v5.1.DEV.332(/embedded)
  Configator, v5.1.DEV.376(/embedded)
  DBMCore, v
  DBMDefaultSkin, v
  DBMStatusBarTimers, v
  ElvUI, v7.69
  ElvUICustomTweaks, v1.08
  ElvUIEnhancedNameplateAuras, v1.21
  ElvUIEverySecondCounts, v1.13
  ElvUIVisualAuraTimers, v1.44
  Gatherer, v5.0.0
  GnomeSequencer, vr3
  BlizRuntimeLib_enUS v6.0.3.60000 <none>
  (ck=1b7)
Can someone help me with my problem?
Report comment to moderator  
Reply With Quote
Unread 12-21-14, 10:19 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 jnyX2
Hey Guys, i'm new to GnomeS and i can't get it working properly.
Looks like you took the first line out of the file that says "Don't touch this", you can copy it from the main page of the addon.
Report comment to moderator  
Reply With Quote
Unread 12-21-14, 03:25 PM  
Netsyphen
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Re: Re: reset=??

Originally Posted by semlar
There is currently no point in ever using /castsequence inside a macro created with this addon because it will never get past the first spell, it essentially creates a new /castsequence macro every time it gets to that item in the sequence so it will act like that's the first time you're pressing it.
I use /castsequence to time other spells that have a short cooldown but long duration. ie

'/castsequence Sacred Shield, judgment, judgment, judgment, judgment',

This allows SS to only be cast every 4 judgment casts, so it does have an awesome purpose if used correctly, and works great. reset has no use at all though.
Report comment to moderator  
Reply With Quote
Unread 12-23-14, 03:21 PM  
styie
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
what is the limit on maros Sequences.lua

Sequences.lua only 3 macros, at least i can only create 3
Report comment to moderator  
Reply With Quote
Unread 12-23-14, 05:41 PM  
starcub
A Kobold Labourer

Forum posts: 0
File comments: 3
Uploads: 0
Custom Sequences - e.g.

Concept: People have requested the ability to customize the sequence of macros. This step function performs to that specification.
Benefits: 1) Reduce redundant macro entries; 2) enhanced granularity
Constraint: The restricted execution environment does not permit the creation or use of arrays.
Code:
Sequences["GnomeExample3"] = { 
	StepFunction = [[
		stepa = "12213142111"

		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))
	]],

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

	-- Macro 4
	[[
/run print("Executing macro 4!")
/cast SpellName4
	]],
}
Code:
stepa  -  string containing steps in the sequence to be executed
"12213142111" - is the actual sequence to be executed
limit - is the rotation length or the total number of steps in the sequence
stepc - is the step counter (used to dereference the step in the string)
CAUTION: Results will be unpredictable if you enter any characters NOT 1 thru 9

Note on Comments: It is safe to delete the comments (lines beginning with '--')

Note on 'SpellName*': I believe it is intuitive; however, I will be explicit -- SpellName* is not a variable.
YOU must actually replace the word (e.g. SpellName1, SpellName2, etc) with YOUR actual spell or talent.

When I then bind this to a key and press it repeatedly it produces:
Executing macro 1!
Executing macro 2!
Executing macro 2!
Executing macro 1!
Executing macro 3!
Executing macro 1!
Executing macro 4!
Executing macro 2!
Executing macro 1!
Executing macro 1!
Executing macro 1!
...
and then it repeats
edit1 - removed a copy/paste dingleberry in the last "else" clause - ( step = stepa[stepc] ) - line is not in my final draft and I received an in-game nudge to "fix'it" - so I did.
__________________
Use only Official Star Trek condoms : To boldly go where no man has gone before.
Last edited by starcub : 12-23-14 at 10:39 PM.
Report comment to moderator  
Reply With Quote
Unread 12-23-14, 11:18 PM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1060
File comments: 187
Uploads: 25
Re: Custom Sequences - e.g.

Originally Posted by starcub
Concept: People have requested the ability to customize the sequence of macros. This step function performs to that specification.
Benefits: 1) Reduce redundant macro entries; 2) enhanced granularity
Constraint: The restricted execution environment does not permit the creation or use of arrays.
You can make arrays in the RE, you just have to use "newtable(1, 2, 3)" where you would normally use brackets "{1, 2, 3}".

I haven't tested it but you can probably do something like this for your step function..
Lua Code:
  1. order = newtable(1, 2, 2, 1, 3, 1, 4, 2, 1, 1, 1)
  2. newstep = newstep and (newstep % #order + 1) or 1
  3. step = order[newstep]
Last edited by semlar : 12-23-14 at 11:26 PM.
Report comment to moderator  
Reply With Quote
Unread 12-24-14, 06:16 AM  
starcub
A Kobold Labourer

Forum posts: 0
File comments: 3
Uploads: 0
Re: Re: Custom Sequences - e.g.

Originally Posted by semlar
You can make arrays in the RE, you just have to use "newtable(1, 2, 3)" where you would normally use brackets "{1, 2, 3}".
Thanks. That is a badly needed learning for me.

Originally Posted by semlar
I haven't tested it but you can probably do something like this for your step function..
Lua Code:
  1. order = newtable(1, 2, 2, 1, 3, 1, 4, 2, 1, 1, 1)
  2. newstep = newstep and (newstep % #order + 1) or 1
  3. step = order[newstep]
I did run this up and I consistently ran into an issue where it would begin firing 1,1,2,2... (an extra 1 at the beginning). I trapped almost every line and variable with prints and it was the oddest thing... it seemed to lag by one iteration -- but only at genesis.

So I tried:
Code:
newstep = newstep and (newstep % #order + 1) or 2
and it then began rotating as desired. (1,2,2,...). I fail to see the logic in setting the initial value to 2 from nil; however, I trust (from the results) that there is simply something I'm overlooking.

I like the more elegant (and concise) approach. Thank you again for the uplift.

I'm perfectly happy with the stopping and starting the rotation in the middle; however, I suspect some may find such behavior undesirable. I thought to hook a reset to UnitAffectingCombat("player"), but my needs are satisfied at this juncture... so, I'll yield to the disaffected hive mind for the next evolution.
__________________
Use only Official Star Trek condoms : To boldly go where no man has gone before.
Report comment to moderator  
Reply With Quote
Unread 12-24-14, 08:36 AM  
Najtwish
A Kobold Labourer

Forum posts: 0
File comments: 6
Uploads: 0
Hi, could anyone explain the difference in the following macros:

RetA
RetB
RetS
RetSB
RetAB?

I've been trying to figure out from the spells but i can only see a small change in spells and not really connecting it how it corrosponds with the macro name.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: