Download
(3Kb)
Download
Updated: 10-26-08 01:23 AM
Pictures
File Info
Updated:10-26-08 01:23 AM
Created:unknown
Downloads:137,544
Favorites:75
MD5:

MacroSequence  Popular! (More than 5000 hits)

Version: 1.5
by: Cogwheel [More]

********** IMPORTANT ***********
If you are upgrading from a previous version, you must not overwrite Sequences.lua or you will wipe out any sequences you've created. I suggest extracting only MacroSequence.lua from the zip file or copying Sequences.lua out of the MacroSequence folder and then copying it back once you've installed the new version.

The next major version will add a GUI and will no longer use Sequences.lua to store the macros you create. However, it will be able to import anything in your Sequences.lua.
*******************************

Have you ever wanted to sequence arbitrary macro commands instead of just spells and items? Now's your chance! MacroSequence reproduces most of /castsequence's functionality but instead of individual spells or items, each element in the sequence can be an entire macro. There are only two missing behaviors of /castsequence: reset on target change (impossible to do with current state headers) and holding position if an action fails (something many people don't like about /castsequence anyway).

In addition to its sequencing, the macros can be of unlimited length. This makes MacroSequence a contender as an extended macro addon.

To create sequences, you need to edit a table in Sequences.lua, though I've tried to make this very simple. Here is the documentation comment at the beginning of that file:

Code:
Each entry in this table defines a single macro sequence akin to the
/castsequence command. Take the following macro, for example:

  /castsequence reset=alt/10 Immolate, Corruption, Curse of Agony

This can be represented as follows:

  WarlockStarter = {
    reset = {
      alt = true,
      seconds = 10
    },
    
    "/cast Immolate",
    "/cast Corruption",
    "/cast Curse of Agony"
  },

The easiest way to trigger a sequence is to /click it in a macro. The button's
name is the same as the sequence (so be sure to choose a unique name). For the
example above, the /click macro would be:

  /click WarlockStarter

Alternatively, you can set a key binding to the button with a one-time command
like:

  /run SetBindingClick("CTRL-5", "WarlockStarter") SaveBindings(GetCurrentBindingSet())

The first time you click the button, it will run the first command in the
sequence. Each subsequent click will advance to the next one until it reaches
the end, in which case it will reset to the beginning. Like the /castsequence
command, the sequence will also reset if you die.
  
The reset entry is optional, but every sequence must have a list of macros. Each
item in the list can be an entire macro of unlimited size (meaning this addon
can also be used for extended macros). Use Lua's long string syntax to make
editing easier (be sure to align it with the left column or they will not be
seen as slash commands):

  MageSequence = {
    [[
/say Hello
/wave
    ]],
    
    [[
/use Talisman of Ephemeral Power
/cast Arcane Power
/cast Presence of Mind
/cast Pyroblast
    ]]
  }

Alternatively, you can use one-line strings with \n to separate the lines.

The reset entry can contain any combination of the following items:

alt - boolean
  Reset the sequence when you run it while holding alt.
ctrl - boolean
  Reset the sequence when you run it while holding ctrl.
shift - boolean
  Reset the sequence when you run it while holding shift.
combat - boolean
  Reset the sequence when you enter or leave combat.
seconds - number
  If specified, the sequence will reset after the given amount of time. If the
  sequence is advanced before the time is up, the timer will be restarted. A
  time of 0 is the same as not specifying a time.
cycle - number
  Instead of returning to the beginning when you click past the end, you can use
  cycle to repeat some number of macros at the end of the sequence. For example,
  if you have 6 macros and a cycle of 3, it will use them in the order 1, 2, 3,
  4, 5, 6, 4, 5, 6, 4... Any other reset condition (including the implied death
  reset) will return the sequence to 1.

v1.5
- Updated for 3.0

v1.1
- Added cycle feature

v1.0.1
- The "sequence has no macros" error message now correctly shows the name of the sequence with no macros

v1.0
- Initial Release
Post A Reply Comment Options
Unread 12-02-07, 01:06 PM  
wendol
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 16
Uploads: 1
hey cogs nice work!
Last edited by wendol : 12-02-07 at 02:25 PM.
Report comment to moderator  
Reply With Quote
Unread 12-02-07, 04:29 PM  
Nevcairiel
Premium Member
Premium Member
AddOn Author - Click to view AddOns

Forum posts: 63
File comments: 105
Uploads: 5
Excellent Addon. Finally something to fix the issues with /castsequence
Report comment to moderator  
Reply With Quote
Unread 12-02-07, 06:56 PM  
Cogwheel
Sans Poisson
 
Cogwheel's Avatar
AddOn Author - Click to view AddOns

Forum posts: 237
File comments: 137
Uploads: 12
Glad you guys like it

I encourage anyone who finds this addon useful to post examples of sequences they use. Sometimes a bit of prompting will help people come up with new ideas.
Report comment to moderator  
Reply With Quote
Unread 12-16-07, 08:45 PM  
tecu
An Aku'mai Servant
AddOn Author - Click to view AddOns

Forum posts: 30
File comments: 23
Uploads: 1
Pet Follow/Stay toggle.

This is pretty much the only reason I downloaded this addon (despite its awesome potential):
Code:
	WarlockPetFollowStayToggle = {
		reset = {},
		"/petfollow\n/run MikSBT.DisplayMessage(\"**   PET FOLLOW   **\")",
		"/petstay\n/run MikSBT.DisplayMessage(\"**   PET STAY   **\")",
	},
I don't really have others because I don't really do sequences in macros.
Report comment to moderator  
Reply With Quote
Unread 12-18-07, 12:09 AM  
Staxx
A Kobold Labourer

Forum posts: 1
File comments: 5
Uploads: 0
Cogs you rock - I have been looking all over for something like this! MacroSequence has made my AutoTrinket macro a reality (Not to mention firing off all my ability cooldowns)- not stopping on a failure, teamed up with /click access, I can now automatically fire off any unused trinkets/abilites without it getting stuck on one...... within a second or so of coming off cooldown! Im posting my Sequence.lua along with my macro in the spirit! Thanks!!!


Code:
MacroSequence = {}

MacroSequence.sequences = {

 TrinketMe = {
    [[
/run SetCVar("Sound_EnableSFX","0") 
/script UIErrorsFrame:Hide()
/cast Ogre Mauler's Badge
/stopcasting
/script UIErrorsFrame:Clear()
/script UIErrorsFrame:Show()
/run SetCVar("Sound_EnableSFX","1")
    ]],
    
    [[
/run SetCVar("Sound_EnableSFX","0") 
/script UIErrorsFrame:Hide()
/cast Bladefist's Breadth
/stopcasting
/script UIErrorsFrame:Clear()
/script UIErrorsFrame:Show()
/run SetCVar("Sound_EnableSFX","1")
    ]]
  }  

  ,
  
 ActionMe = {
    [[
/run SetCVar("Sound_EnableSFX","0") 
/script UIErrorsFrame:Hide()
/cast Bestial Wrath
/script UIErrorsFrame:Clear()
/script UIErrorsFrame:Show()
/run SetCVar("Sound_EnableSFX","1")
    ]],
    
    [[
/run SetCVar("Sound_EnableSFX","0") 
/script UIErrorsFrame:Hide()
/cast Rapid Fire
/script UIErrorsFrame:Clear()
/script UIErrorsFrame:Show()
/run SetCVar("Sound_EnableSFX","1")
    ]]
  }  
  
 
}
And my hunter macro that does it all

Code:
/cast [nocombat] Auto Shot
/click TrinketMe
/click ActionMe
/castsequence reset=15/target/combat Steady Shot, Arcane Shot,Steady Shot,Steady Shot
Always fires an unused trinket or ability within 1 to 2 clicks - Woot! You rock Cogs!
Last edited by Staxx : 12-18-07 at 12:13 AM.
Report comment to moderator  
Reply With Quote
Unread 12-18-07, 02:00 AM  
Cogwheel
Sans Poisson
 
Cogwheel's Avatar
AddOn Author - Click to view AddOns

Forum posts: 237
File comments: 137
Uploads: 12
Originally posted by Staxx
Code:
/run SetCVar("Sound_EnableSFX","0") 
/script UIErrorsFrame:Hide()
/cast Ogre Mauler's Badge
/stopcasting
/script UIErrorsFrame:Clear()
/script UIErrorsFrame:Show()
/run SetCVar("Sound_EnableSFX","1")
FYI: you don't need :Show or :Hide when you :Clear
Report comment to moderator  
Reply With Quote
Unread 12-20-07, 08:03 PM  
Azareus
A Deviate Faerie Dragon

Forum posts: 12
File comments: 6
Uploads: 0
WOW

OMG

One word: AWESOME!

Now I just have to understand in deep how to do what I want to do

Thx again for this!
Report comment to moderator  
Reply With Quote
Unread 12-20-07, 08:04 PM  
Cogwheel
Sans Poisson
 
Cogwheel's Avatar
AddOn Author - Click to view AddOns

Forum posts: 237
File comments: 137
Uploads: 12
Progress Update

I thought I'd let everyone know the GUI is coming along nicely. Here are a couple images to give you an idea of what's to come:

http://eternalblue.dnsalias.net/Mockup.png - This is the design draft I created in Inkscape

http://eternalblue.dnsalias.net/MacroSequence.jpg - This is the most current screenshot of the UI. I'll update this periodically.
Report comment to moderator  
Reply With Quote
Unread 12-20-07, 08:21 PM  
Azareus
A Deviate Faerie Dragon

Forum posts: 12
File comments: 6
Uploads: 0
Re: Progress Update

Originally posted by Cogwheel
I thought I'd let everyone know the GUI is coming along nicely. Here are a couple images
/drool

Can't wait for it

One question; in the code Staxx posted earlier:

Code:
TrinketMe = {
    [[
/run SetCVar("Sound_EnableSFX","0") 
/script UIErrorsFrame:Hide()
/cast Ogre Mauler's Badge
/stopcasting
/script UIErrorsFrame:Clear()
/script UIErrorsFrame:Show()
/run SetCVar("Sound_EnableSFX","1")
    ]],
    
    [[
/run SetCVar("Sound_EnableSFX","0") 
/script UIErrorsFrame:Hide()
/cast Bladefist's Breadth
/stopcasting
/script UIErrorsFrame:Clear()
/script UIErrorsFrame:Show()
/run SetCVar("Sound_EnableSFX","1")
    ]]
  }
are the TWO sections in the [[ ]] brackets considered as ONE macro or two? Or, in other words: if I put TWO /cast with two trinkets in there, does the single macro stop on a successful cast (it happens with normal macros IIRC) or, regardless of what happens to the first /cast, the second goes on?

I ask this because it seems that my MacroSequence not always "uses" the two trinkets and/or the Rapid Fire ability. That is, I am not able to "burn" all of my no-GCD abilites...

But, of course, maybe I'm just dumb
Report comment to moderator  
Reply With Quote
Unread 12-20-07, 08:58 PM  
Cogwheel
Sans Poisson
 
Cogwheel's Avatar
AddOn Author - Click to view AddOns

Forum posts: 237
File comments: 137
Uploads: 12
Re: Re: Progress Update

Originally posted by Azareus
I ask this because it seems that my MacroSequence not always "uses" the two trinkets and/or the Rapid Fire ability. That is, I am not able to "burn" all of my no-GCD abilites...
If you're moving at the time you run the macro (regardless of whether the macro is in MacroSequence or the default UI) it can cause some of the abilities to fail.

To answer your question directly, yes they are two separate macros in the sequence
Last edited by Cogwheel : 12-20-07 at 08:58 PM.
Report comment to moderator  
Reply With Quote
Unread 01-11-08, 11:37 AM  
skivey
A Kobold Labourer

Forum posts: 1
File comments: 3
Uploads: 0
How do i use this?

this looks fantastic but being a little noobish where do I create the macro

eg. file path or folder to make the macro code. I put the folder into my addons folder is this correct even ?

I need a little help on this if someone would take the time that be great


thanks
Report comment to moderator  
Reply With Quote
Unread 01-11-08, 11:40 AM  
Cogwheel
Sans Poisson
 
Cogwheel's Avatar
AddOn Author - Click to view AddOns

Forum posts: 237
File comments: 137
Uploads: 12
Re: How do i use this?

Once you've got the addon installed, open up Sequences.lua with your favorite text editor (you can use Notepad, but I highly recommend getting a "real" text editor like SciTE or Notepad++). Then add entries to the table as described in the file's comments. Give it a go and post back if you have any issues (be sure to post what you tried )

Edit: I'm painfully close to finishing the GUI. Unfortunately, I can't devote any substantial amount of time to it until at least next week. Be sure to check back for updates (or just add it to your favorites).
Last edited by Cogwheel : 01-11-08 at 11:41 AM.
Report comment to moderator  
Reply With Quote
Unread 01-11-08, 12:03 PM  
Cogwheel
Sans Poisson
 
Cogwheel's Avatar
AddOn Author - Click to view AddOns

Forum posts: 237
File comments: 137
Uploads: 12
Re: using this ?

Sequences.lua is a file inside the MacroSequence folder (Interface\AddOns\MacroSequence). It has documentation explaining how to edit it (same as the quoted part above).
Report comment to moderator  
Reply With Quote
Unread 01-11-08, 03:45 PM  
skivey
A Kobold Labourer

Forum posts: 1
File comments: 3
Uploads: 0
first attempt

above the green high lighted area after MacroSquence = {} My macros look like this

Tanking = {
"/cast Sunder Armor",
"/cast SheildSlam",
"/cast Devastate",
"/cast Devastate",
"/cast Devastate",
"/cast Sunder Armor",
"/cast Revenge"
}

ShotRot = {

"/cast Auto Shot",
"/cast Steady Shot",
"/castrandom [target=pettarget, exists] Kill Command"

}

WarlockAff = {

"/cast Unstable Affliction",
"/cast Corruption",
"/cast Curse of Agony",
"/cast Immolate",
"/cast Drain Life",
"/cast Drain Life"

}

getting errors when I try /click Tanking when in game

[2008/01/11 16:47:03-67-x4]: Interface\FrameXML\ChatFrame.lua:1359: attempt to call method 'IsObjectType' (a nil value):
Interface\FrameXML\ChatFrame.lua:3068: in function `ChatEdit_ParseText':
Interface\FrameXML\ChatFrame.lua:2802: in function `ChatEdit_SendText':
Interface\FrameXML\ChatFrame.lua:2040: in function <Interface\FrameXML\ChatFrame.lua:2033>:
<in C code>: in function `RunMacroText'
Interface\FrameXML\SecureTemplates.lua:308: in function `SecureActionButton_OnClick':
<string>:"*:OnClick":1: in function <[string "*:OnClick"]:1>
(tail call): ?:
<in C code>: in function `securecall'
Interface\FrameXML\SecureStateHeader.lua:1003: in function <Interface\FrameXML\SecureStateHeader.lua:984>:
Last edited by skivey : 01-11-08 at 03:48 PM.
Report comment to moderator  
Reply With Quote
Unread 01-11-08, 05:56 PM  
Cogwheel
Sans Poisson
 
Cogwheel's Avatar
AddOn Author - Click to view AddOns

Forum posts: 237
File comments: 137
Uploads: 12
Re: first attempt

Originally posted by skivey
above the green high lighted area after MacroSquence = {}
They should go inside of the { } from the line:

Code:
MacroSequence.sequences = {
You will also need a comma after each sequence. Without any of the comments (green highlighted stuff) your file should look like this:

Code:
MacroSequence = {}
MacroSequence.sequences = {
  Tanking = {
    "/cast Sunder Armor",
    "/cast SheildSlam",
    "/cast Devastate",
    "/cast Devastate",
    "/cast Devastate",
    "/cast Sunder Armor",
    "/cast Revenge"
  },

  ShotRot = {
    "/cast Auto Shot",
    "/cast Steady Shot",
    "/castrandom [target=pettarget, exists] Kill Command"
  },

  WarlockAff = {
    "/cast Unstable Affliction",
    "/cast Corruption",
    "/cast Curse of Agony",
    "/cast Immolate",
    "/cast Drain Life",
    "/cast Drain Life"
  },
}
As for your ShotRot sequence, I'm not quite sure it's going to do exactly what you want. As mentioned, MacroSequence can't stop at a step if a spell fails the way castsequence does. This means you will always switch between auto shot, steady shot, and kill command every time you click it. You should also add an exclamation mark to the auto shot spell to make sure it doesn't toggle off if it's already active.

If you're ok with that behavior, then you may also want to look at Kill Command. First off, doing /castrandom with a single spell is no different than doing /cast with the same spell. However, i'm not sure you actually want it as a separate command... If I understand correctly you want every click of the sequence to attempt it. This is where MacroSequence really starts to shine, imo... Since KC is not on the global cooldown, you can just add it to the top of each macro in the sequence.

Assuming i'm comprehending, you'll want it to look like this:

Code:
  ShotRot = {
    [[
/cast Kill Command
/cast !Auto Shot
    ]],
    [[
/cast Kill Command
/cast Steady Shot
    ]]
  }
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump:

Support AddOn Development!

You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.