Quantcast
Download
(4 Kb)
Download
Updated: 02-24-15 06:56 AM
Pictures
File Info
Compatibility:
The Adventure Continues (6.1)
Warlords of Draenor (6.0.3)
Updated:02-24-15 06:56 AM
Created:10-29-14 03:51 AM
Downloads:219,588
Favorites:137
MD5:

GnomeSequencer  Popular! (More than 5000 hits)

Version: r5
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!

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)


Archived Files (4)
File Name
Version
Size
Author
Date
r4
4kB
semlar
01-25-15 08:20 PM
r3
3kB
semlar
10-31-14 01:52 AM
r2
3kB
semlar
10-30-14 10:29 PM
r1
3kB
semlar
10-29-14 03:51 AM


Post A Reply Comment Options
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-29-14, 09:22 PM  
semlar
A Molten Giant
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 998
File comments: 180
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-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, 04:55 PM  
semlar
A Molten Giant
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 998
File comments: 180
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, 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
Post A Reply



Category Jump: