Quantcast
Download
(4 Kb)
Download
Updated: 04-17-17 07:03 PM
Pictures
File Info
Compatibility:
Tomb of Sargeras (7.2.0)
Updated:04-17-17 07:03 PM
Created:10-29-14 03:51 AM
Downloads:229,360
Favorites:138
MD5:
7.2.0

GnomeSequencer  Popular! (More than 5000 hits)

Version: 7.2.0.3
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)


Archived Files (9)
File Name
Version
Size
Author
Date
7.2.0.2
4kB
semlar
04-17-17 06:47 PM
7.2.0.3
4kB
semlar
04-17-17 06:45 PM
7.2.0.2
4kB
semlar
04-17-17 12:10 PM
7.2.0.1
4kB
semlar
04-10-17 09:54 PM
r5
4kB
semlar
02-24-15 06:56 AM
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-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, 10:49 AM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1005
File comments: 184
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, 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, 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, 07:34 AM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1005
File comments: 184
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, 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-30-14, 10:49 PM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1005
File comments: 184
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
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, 01:46 PM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1005
File comments: 184
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, 01:27 PM  
Dohram
A Defias Bandit

Forum posts: 3
File comments: 47
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:14 PM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1005
File comments: 184
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, 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, 12:52 PM  
Dohram
A Defias Bandit

Forum posts: 3
File comments: 47
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, 11:59 AM  
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view AddOns

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



Category Jump: