Go to Page... |
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: | 278,382 |
Favorites: | 125 |
MD5: |
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.
local _, Sequences = ... -- Don't touch this ---- -- 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. -- Every entry in the Sequences table defines a single sequence of macros which behave similarly to /castsequence. -- Sequence names must be unique and contain no more than 16 characters. -- 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. ---- ---- -- Here's a large demonstration sequence documenting the format: Sequences["GnomeExample1"] = { -- StepFunction optionally defines how the step is incremented when pressing the button. -- This example increments the step in the following order: 1 12 123 1234 etc. until it reaches the end and starts over -- DO NOT DEFINE A STEP FUNCTION UNLESS YOU THINK YOU KNOW WHAT YOU'RE DOING StepFunction = [[ limit = limit or 1 if step == limit then limit = limit % #macros + 1 step = 1 else step = step % #macros + 1 end ]], -- PreMacro is optional macro text that you want executed before every single button press. -- This is if you want to add something like /startattack or /stopcasting before all of the macros in the sequence. PreMacro = [[ /run print("-- PreMacro Script --") /startattack ]], -- PostMacro is optional macro text that you want executed after every single button press. -- I don't know what you would need this for, but it's here anyway. PostMacro = [[ /run print("-- PostMacro Script --") ]], -- 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 SpellName3 ]], } ---- -- Here is a short example which is what most sequences will look like Sequences["GnomeExample2"] = { -- 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 SpellName3 ]], }
Comment Options |
TheRealFuzzynavel |
View Public Profile |
Send a private message to TheRealFuzzynavel |
Find More Posts by TheRealFuzzynavel |
Add TheRealFuzzynavel to Your Buddy List |
bobthe |
View Public Profile |
Send a private message to bobthe |
Find More Posts by bobthe |
Add bobthe to Your Buddy List |
semlar |
View Public Profile |
Send a private message to semlar |
Find More Posts by semlar |
Add semlar to Your Buddy List |
12-24-14, 11:51 AM | ||
|
Re: Re: Re: Custom Sequences - e.g.
Either the core will need to be updated to support completely arbitrary orders, or you'll always need to put the first macro you want executed as the first item in the list. |
|
|
semlar |
View Public Profile |
Send a private message to semlar |
Find More Posts by semlar |
Add semlar to Your Buddy List |
12-24-14, 10:17 AM | |||
A Kobold Labourer
Forum posts: 0
File comments: 6
Uploads: 0
|
Thanks for clarifying! |
||
|
Najtwish |
View Public Profile |
Send a private message to Najtwish |
Find More Posts by Najtwish |
Add Najtwish to Your Buddy List |
12-24-14, 10:07 AM | ||
A Kobold Labourer
Forum posts: 0
File comments: 3
Uploads: 0
|
Code:
Sequences["Macroname"] = { <stuff> } or... Sequences["RetA"] = { <stuff> } Sequences["RetB"] = { <stuff> } etc. Please understand, these are just intuitive guesses since I have no real insight into the code to which you are referring. Given that you are suggesting that there is only subtle (small change) differences, I would venture that the real truth is in the mind of the author of the macros in question. Keep in mind, macro authors can name a macro/sequence anything (within the formatting constraints)... I've seen e.g.
Let me know if I win a prize for guessing.
__________________
Use only Official Star Trek condoms : To boldly go where no man has gone before. |
|
|
starcub |
View Public Profile |
Send a private message to starcub |
Find More Posts by starcub |
Add starcub to Your Buddy List |
12-24-14, 08:36 AM | |
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. |
|
Najtwish |
View Public Profile |
Send a private message to Najtwish |
Find More Posts by Najtwish |
Add Najtwish to Your Buddy List |
12-24-14, 06:16 AM | |||
A Kobold Labourer
Forum posts: 0
File comments: 3
Uploads: 0
|
Re: Re: Custom Sequences - e.g.
So I tried: Code:
newstep = newstep and (newstep % #order + 1) or 2 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. |
||
|
starcub |
View Public Profile |
Send a private message to starcub |
Find More Posts by starcub |
Add starcub to Your Buddy List |
12-23-14, 11:18 PM | ||
|
Re: Custom Sequences - e.g.
I haven't tested it but you can probably do something like this for your step function.. Lua Code:
Last edited by semlar : 12-23-14 at 11:26 PM.
|
|
|
semlar |
View Public Profile |
Send a private message to semlar |
Find More Posts by semlar |
Add semlar to Your Buddy List |
12-23-14, 05:41 PM | ||
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) 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:
__________________
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.
|
|
|
starcub |
View Public Profile |
Send a private message to starcub |
Find More Posts by starcub |
Add starcub to Your Buddy List |
12-23-14, 03:21 PM | |
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
|
|
styie |
View Public Profile |
Send a private message to styie |
Find More Posts by styie |
Add styie to Your Buddy List |
12-21-14, 03:25 PM | ||
A Kobold Labourer
Forum posts: 0
File comments: 2
Uploads: 0
|
Re: Re: reset=??
'/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. |
|
|
Netsyphen |
View Public Profile |
Send a private message to Netsyphen |
Find More Posts by Netsyphen |
Add Netsyphen to Your Buddy List |
12-21-14, 10:19 AM | ||
|
|
|
|
semlar |
View Public Profile |
Send a private message to semlar |
Find More Posts by semlar |
Add semlar to Your Buddy List |
12-21-14, 09:51 AM | |
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:
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) |
|
jnyX2 |
View Public Profile |
Send a private message to jnyX2 |
Find More Posts by jnyX2 |
Add jnyX2 to Your Buddy List |
12-20-14, 10:00 PM | ||
A Kobold Labourer
Forum posts: 0
File comments: 2
Uploads: 0
|
Re: Showtooltip issue
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.
|
|
|
sorakie |
View Public Profile |
Send a private message to sorakie |
Find More Posts by sorakie |
Add sorakie to Your Buddy List |