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,769
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-31-14, 04:10 AM  
JohnCrichton
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
Originally Posted by semlar
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.
if i have more than 2 macros in the sequences.lua file wow will freeze/not respond. if i remove the third macro the game will load again. fix is needed. would be a great addon if i didn't have to edit the file constantly because of it making me end task on wow
Report comment to moderator  
Reply With Quote
Unread 10-31-14, 07:34 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 JohnCrichton
if i have more than 2 macros in the sequences.lua file wow will freeze/not respond. if i remove the third macro the game will load again. fix is needed.
I already fixed this last night, it just hasn't been approved yet.

It should be ready for download now, there was an issue with how it was handling rewriting the macros that was causing it to loop.
Last edited by semlar : 10-31-14 at 08:12 AM.
Report comment to moderator  
Reply With Quote
Unread 10-31-14, 09:34 AM  
Inemity
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Originally Posted by semlar
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.
Makes way more sense now. Appreciate the work you've done on this addon.
Report comment to moderator  
Reply With Quote
Unread 10-31-14, 10:22 AM  
sebrouss
A Kobold Labourer

Forum posts: 0
File comments: 3
Uploads: 0
Hi

I'm french and i use french client.

Your script don't accept letter with accent
exemple :
/cast Peste dévorante
don't work.
Do you have a solution ?

thx
Report comment to moderator  
Reply With Quote
Unread 10-31-14, 10:49 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 sebrouss
Hi

I'm french and i use french client.

Your script don't accept letter with accent
exemple :
/cast Peste dévorante
don't work.
Do you have a solution ?

thx
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 : 10-31-14 at 11:01 AM.
Report comment to moderator  
Reply With Quote
Unread 10-31-14, 11:40 AM  
sebrouss
A Kobold Labourer

Forum posts: 0
File comments: 3
Uploads: 0
thx, i will try it.
Report comment to moderator  
Reply With Quote
Unread 10-31-14, 12:17 PM  
sebrouss
A Kobold Labourer

Forum posts: 0
File comments: 3
Uploads: 0
it's ok with UTF-8 encoding !
Thx a lot.

Good job.
Report comment to moderator  
Reply With Quote
Unread 10-31-14, 02:48 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 sebrouss
it's ok with UTF-8 encoding !
Thx a lot.

Good job.
Yes, thank you so much for the work you've put in this. Thank you for the support on the macro thread also!
Report comment to moderator  
Reply With Quote
Unread 11-01-14, 08:24 AM  
mask430081
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
It's ok with Chinese character. Thx, you help a lot!
Report comment to moderator  
Reply With Quote
Unread 11-01-14, 06:41 PM  
mrdamm
A Kobold Labourer
 
mrdamm's Avatar

Forum posts: 1
File comments: 7
Uploads: 0
Thumbs up Pre and Post Macros

Hi. First off, congrats for the excellent work.

I have a question about Pre and Post Macros. The ideia behind Pre and Post macros are great, because you could use /target mouseover on Pre to select a target on mouse over no matter which ability are being chosen on the moment. That's great.

But, is there a way to put more than one command on those? I mean, there are some situations when that's desirable, like when you want to fire your opener abilities (those that doesn't trigger the GCD) or trinket cooldowns all together on every single click instead of firing it one by one on the macro rotation. If there's a way right now, may you put an example here, please? Because every time I tried to do that it just say that command in the chat.

Cheers!
Report comment to moderator  
Reply With Quote
Unread 11-01-14, 06:44 PM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1060
File comments: 187
Uploads: 25
Re: Pre and Post Macros

Originally Posted by mrdamm
If there's a way right now, may you put an example here, please? Because every time I tried to do that it just say that command in the chat.
Make sure you don't have any spaces in front of your slash commands or it will just output as text.
Report comment to moderator  
Reply With Quote
Unread 11-01-14, 06:56 PM  
mrdamm
A Kobold Labourer
 
mrdamm's Avatar

Forum posts: 1
File comments: 7
Uploads: 0
Re: Re: Pre and Post Macros

Originally Posted by semlar
Originally Posted by mrdamm
If there's a way right now, may you put an example here, please? Because every time I tried to do that it just say that command in the chat.
Make sure you don't have any spaces in front of your slash commands or it will just output as text.
Tried to use it like on this one. What's wrong with it?

Lua Code:
  1. Sequences["PRIEST_SINGLE"] = {
  2.         PreMacro = [[
  3.         /target mouseover
  4.         ]],
  5.     '/cast Palavra de Poder: Escudo',
  6.     '/cast Chacra: Serenidade',
  7.     '/cast Palavra Sagrada: Serenidade',
  8.     '/cast Cura',
  9.     '/cast Prece da Recomposição',
  10.     '/cast Círculo de Cura',
  11.     '/cast [@targettarget] Palavra de Poder: Consolo',
  12.     '/cast Renovar',
  13.         PostMacro = [[
  14.         /use [combat]13
  15.         /use [combat]14
  16.         ]],
  17. }
Report comment to moderator  
Reply With Quote
Unread 11-01-14, 07:01 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: Pre and Post Macros

Originally Posted by mrdamm
Tried to use it like on this one. What's wrong with it?

Lua Code:
  1. Sequences["PRIEST_SINGLE"] = {
  2.         PreMacro = [[
  3.         /target mouseover
  4.         ]],
  5.     '/cast Palavra de Poder: Escudo',
  6.     '/cast Chacra: Serenidade',
  7.     '/cast Palavra Sagrada: Serenidade',
  8.     '/cast Cura',
  9.     '/cast Prece da Recomposição',
  10.     '/cast Círculo de Cura',
  11.     '/cast [@targettarget] Palavra de Poder: Consolo',
  12.     '/cast Renovar',
  13.         PostMacro = [[
  14.         /use [combat]13
  15.         /use [combat]14
  16.         ]],
  17. }
Everything in between the brackets gets sent to the chat, you can't indent the text because it's sending the tabs/spaces that are in front of the slash commands.

Try writing it like this..
Lua Code:
  1. Sequences["PRIEST_SINGLE"] = {
  2.     PreMacro = [[
  3. /target mouseover
  4.     ]],
  5.     '/cast Palavra de Poder: Escudo',
  6.     '/cast Chacra: Serenidade',
  7.     '/cast Palavra Sagrada: Serenidade',
  8.     '/cast Cura',
  9.     '/cast Prece da Recomposição',
  10.     '/cast Círculo de Cura',
  11.     '/cast [@targettarget] Palavra de Poder: Consolo',
  12.     '/cast Renovar',
  13.     PostMacro = [[
  14. /use [combat]13
  15. /use [combat]14
  16.     ]],
  17. }
Report comment to moderator  
Reply With Quote
Unread 11-01-14, 08:09 PM  
mrdamm
A Kobold Labourer
 
mrdamm's Avatar

Forum posts: 1
File comments: 7
Uploads: 0
Thumbs up Re: Re: Re: Re: Pre and Post Macros

Cool. Worked. Thanks semlar
Report comment to moderator  
Reply With Quote
Unread 11-04-14, 03:41 AM  
dafino
A Kobold Labourer

Forum posts: 0
File comments: 3
Uploads: 0
Hi, I'm using the following sequence file and neither of the AoE macros are firing. When I try to use them the single target macros fire instead. Any idea where I went wrong? Other than that everything is working great. Thank you for this great addon.

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

Sequences['Marks'] = {
    PreMacro = [[
/targetenemy [noharm][dead]
    ]],
    '/cast A Murder of Crows',
    '/cast Chimaera Shot',
    '/cast Kill Shot',
    '/cast Glaive Toss',
    '/cast Aimed Shot',
    '/cast Steady Shot',
    '/cast Rapid Fire',
    PostMacro = [[
/startattack
/petattack [@target,harm][]
    ]],
}


Sequences['Marks AoE'] = {
    PreMacro = [[
/targetenemy [noharm][dead]
    ]],
    '/cast A Murder of Crows',
    '/cast Chimaera Shot',
    '/cast Kill Shot',
    '/cast Glaive Toss',
    '/cast Multi Shot',
    '/cast Steady Shot',
    '/cast Rapid Fire',
    PostMacro = [[
/startattack
/petattack [@target,harm][]
    ]],
}


Sequences['Fury'] = {
    PreMacro = [[
/targetenemy [noharm][dead]
    ]],
    '/cast Raging Blow',
    '/cast Storm Bolt',
    '/cast Bloodbath',
    '/cast Berserker Rage',
    '/cast Bloodthirst',
    '/cast Wild Strike',
    PostMacro = [[
/startattack
    ]],	
}


Sequences['Fury AoE'] = {
    PreMacro = [[
/targetenemy [noharm][dead]
    ]],
    '/cast Raging Blow',
    '/cast Whirlwind',
    '/cast Bloodbath',
    '/cast Berserker Rage',
    '/cast Bloodthirst',
    '/cast Wild Strike',
    PostMacro = [[
/startattack
    ]],	
}
Last edited by dafino : 11-04-14 at 03:42 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: