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,768
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 10-29-14, 04:12 PM  
Opladin
A Murloc Raider
 
Opladin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 5
File comments: 7
Uploads: 3
Confusion

Edit: If I include Templar's Verdict it will not load. Without Templar's Verdict it works correctly. Divine Storm does work correctly though, so the issue is specific to Templar's Verdict.
Last edited by Opladin : 10-29-14 at 04:22 PM.
Report comment to moderator  
Reply With Quote
Unread 10-29-14, 04:55 PM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

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

Originally Posted by Opladin
Edit: If I include Templar's Verdict it will not load. Without Templar's Verdict it works correctly. Divine Storm does work correctly though, so the issue is specific to Templar's Verdict.
You can't put an apostrophe in a string surrounded by single quotes because it thinks that's the end of the string.

Either use double quotes like "/cast Templar's Verdict" or surround it with brackets like [[/cast Templar's Verdict]].
Report comment to moderator  
Reply With Quote
Unread 10-29-14, 09:12 PM  
mask430081
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Hi semlar, thank you for providing this addon to us.
I'm a player at China, I'd like to know that is your addon support Chinese spell?
Last edited by mask430081 : 10-29-14 at 09:12 PM.
Report comment to moderator  
Reply With Quote
Unread 10-29-14, 09:22 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 mask430081
Hi semlar, thank you for providing this addon to us.
I'm a player at China, I'd like to know that is your addon support Chinese spell?
I don't know, but I can't think of any reason why it wouldn't work.

You might need to make sure the Sequences.lua file uses utf-8 encoding when you edit it to support the spell names.
Last edited by semlar : 10-29-14 at 09:22 PM.
Report comment to moderator  
Reply With Quote
Unread 10-30-14, 08:23 AM  
Opladin
A Murloc Raider
 
Opladin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 5
File comments: 7
Uploads: 3
Efficiency

So, the addon is fantastic (thank you very much), but the only downside of it in comparison to the old macro system is that from what I can tell (unless I'm doing something wrong) all it does is cycle Ability 1, then Ability 2, then Ability 3. It's not using the highest priority ability first every time. For it to be as efficient as possible it should always choose the first ability, then second, then third.. etc. I don't know if that's possible for you to write it like that or not, but it would increase the dps output if it was able to use a priority vs cycling.
Report comment to moderator  
Reply With Quote
Unread 10-30-14, 10:53 AM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

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

Originally Posted by Opladin
all it does is cycle Ability 1, then Ability 2, then Ability 3. It's not using the highest priority ability first every time. For it to be as efficient as possible it should always choose the first ability, then second, then third.. etc.
Maybe you can explain this a little better, but if you want the addon to pick what you should cast next that's not possible.

Blizzard does not want the game to make choices for you.

You could reset the sequence or change what step it's on by hitting another button, or based on a macro condition, but that's about it.
Report comment to moderator  
Reply With Quote
Unread 10-30-14, 11:48 AM  
Opladin
A Murloc Raider
 
Opladin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 5
File comments: 7
Uploads: 3
I'm not asking it to pick what should be cast, but ideally the best way for this addon to work would be having it prioritize rather than cycle. For instance.. we choose which abilities..

1. Ability A
2. Ability B.
3. Ability C.

In the current system it goes A > B > C then repeats. Ideally what you want it to do is use A > if A isn't aviable B > If A and B aren't available C and on down the line. I don't know if it can be programmed like that or not, but that would make it way more efficient.
Report comment to moderator  
Reply With Quote
Unread 10-30-14, 11:59 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 Opladin
Ideally what you want it to do is use A > if A isn't aviable B > If A and B aren't available C and on down the line. I don't know if it can be programmed like that or not, but that would make it way more efficient.
It can't be written to choose what to cast next. Picking the first spell that's not on cooldown is a choice.

There is no way to get usability or cooldown information into the restricted environment, and there is no access to any time functions.
Report comment to moderator  
Reply With Quote
Unread 10-30-14, 12:52 PM  
Dohram
A Defias Bandit

Forum posts: 3
File comments: 50
Uploads: 0
Originally Posted by semlar
Originally Posted by Opladin
Ideally what you want it to do is use A > if A isn't aviable B > If A and B aren't available C and on down the line. I don't know if it can be programmed like that or not, but that would make it way more efficient.
It can't be written to choose what to cast next. Picking the first spell that's not on cooldown is a choice.

There is no way to get usability or cooldown information into the restricted environment, and there is no access to any time functions.
what he is saying is have can you have it go in sequential order not just sequence ie

if we have ability 1 through 6 set up right now it goes 1 2 3 4 5 6 1 2 3 4 5 6 where as we would rather have it go 1 12 123 1234 12345 123456 so it tires to fire off the highest ranked ability first and if it cant then the 2nd and so forth.
Last edited by Dohram : 10-30-14 at 12:54 PM.
Report comment to moderator  
Reply With Quote
Unread 10-30-14, 12:59 PM  
Opladin
A Murloc Raider
 
Opladin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 5
File comments: 7
Uploads: 3
Originally Posted by Dohram
Originally Posted by semlar
Originally Posted by Opladin
Ideally what you want it to do is use A > if A isn't aviable B > If A and B aren't available C and on down the line. I don't know if it can be programmed like that or not, but that would make it way more efficient.
It can't be written to choose what to cast next. Picking the first spell that's not on cooldown is a choice.

There is no way to get usability or cooldown information into the restricted environment, and there is no access to any time functions.
what he is saying is have can you have it go in sequential order not just sequence ie

if we have ability 1 through 6 set up right now it goes 1 2 3 4 5 6 1 2 3 4 5 6 where as we would rather have it go 1 12 123 1234 12345 123456 so it tires to fire off the highest ranked ability first and if it cant then the 2nd and so forth.
Yes, that would actually be more efficient. It would user the higher ranked abilities more commonly than the lower ranked abilities.
Report comment to moderator  
Reply With Quote
Unread 10-30-14, 01:14 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 Opladin
Yes, that would actually be more efficient. It would user the higher ranked abilities more commonly than the lower ranked abilities.
Couldn't you just put the spells in that order in the sequence?
Report comment to moderator  
Reply With Quote
Unread 10-30-14, 01:27 PM  
Dohram
A Defias Bandit

Forum posts: 3
File comments: 50
Uploads: 0
Originally Posted by semlar
Originally Posted by Opladin
Yes, that would actually be more efficient. It would user the higher ranked abilities more commonly than the lower ranked abilities.
Couldn't you just put the spells in that order in the sequence?

yes but there is no difference in doing that then putting the spells on our keys 1-6 and just going 123456 , defeats the purpose of priority , say for a paladin single target you want to fire off crusaders strike as much as possible so you put it at 1 , with the current way it will fire it off once and move on to next spells , vs trying to fire it off every single time and when it cant then it moves on.

I see what you are saying put the spells
/cast 1
/cast 1
/cast 2
/cast 1
/cast 2
/cast 3 etc.. yes you could but that's not very fun if you decided to change up the order. Are you saying your addon cannot do this? or you don't know how or want to make it able to do this? Maybe some of us can help.
Last edited by Dohram : 10-30-14 at 01:31 PM.
Report comment to moderator  
Reply With Quote
Unread 10-30-14, 01:46 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 Dohram
Are you saying your addon cannot do this? or you don't know how or want to make it able to do this? Maybe some of us can help.
It could be rewritten to support modifying the step order, but it doesn't currently do this.

I'd have to think about how best to allow more customized step functions, but for now you're going to have to write out the entire sequence if you want it to start over at 1 every time.

Just to reiterate, there is no way to determine whether a spell is on cooldown inside the restricted environment, so you would still have to click through each spell in the sequence.
Last edited by semlar : 10-30-14 at 01:49 PM.
Report comment to moderator  
Reply With Quote
Unread 10-30-14, 07:09 PM  
Inemity
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
I can't get this thing to work at all. And when it does (no idea how I got it to show up in my macro) it starts casting my hearthstone.
Report comment to moderator  
Reply With Quote
Unread 10-30-14, 10:49 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 Inemity
I can't get this thing to work at all. And when it does (no idea how I got it to show up in my macro) it starts casting my hearthstone.
I've rewritten the example file to be more comprehensible. Please read the comments in the file.

If you still can't understand how to use it, explain what part you're stuck on.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: