Question about Macro Logic/Order?
#showtooltip
/cast [mod:shift,@arena1];[mod:ctrl,@arena2];[mod:alt,@arena3]Cyclone;[harm]Solar Wrath;Lifebloom /cast [mod:ctrlshift,@focus]Cyclone Hello all, I've wondered about this for quite some time now... Can anybody tell me by looking at this macro, if there is anything wrong with it, or what would cause some parts of it to work, and other parts to not work / be ignored? I tried using the [mod:shift,@arena1] to cyclone an Arena1 target, but it wasn't working, while everything else in the macro does. Earlier I had the various [mod]'s in the macro in a different order and it was working, but I can't remember the order, or understand the logic behind it. It seems to me that certain [mod:shift] or [mod:ctrl] or [mod:alt] or [mod:ctrlshift] etc. etc. needs to go in a certain order in the macro. For example, like if a [mod:alt] is in the macro before a [mod:shift] then the [mod:shift] gets ignored? (This example may not be 100% accurate, but I've experienced something exactly like this before). Before I've had to experiment with which [mod] goes first until eventually it worked. Is there some sort of logic these macros use, where certain things MUST go in a certain order? I had to put the [mod:ctrlshift, @focus] part of my macro at the end on its own new line, separate from the first part, otherwise the macro would ignore the @focus portion of it. Sorry it's a bit verbose, and hopefully what I said made sense... But any help or enlightenment would be EXTREMELY appreciated, so that I can know once and for all the method behind the madness of WoW's Macro Logic... Thank you in advance! |
#showtooltip
/cast [mod:shift,@arena1];[mod:ctrl,@arena2];[mod:alt,@arena3]Cyclone;[harm]Solar Wrath;Lifebloom /cast [mod:ctrlshift,@focus]Cyclone I'm not aware of any order of importance in this example but I could be wrong. What I see is as follows, while pressing the button: if you press shift while targeting arena1 ( I assume this is the unit id) then it will cast Cyclone if you press ctrl while targeting arena2 it will cast Cyclone if you press alt while targetting arena3 it will cast Cyclone Otherwise if you are targetting an enemy it will cast Solar Wrath to harm them Or if you are targetting a friend it will cast Lifebloom However, because you have put ';' after each mod test it may terminate that test and move straight to the [harm] test. I believe it then waits for the global cooldown before validating the next line which While pressing ctrl and shift and you have an active focus it will cast Cyclone on them. However, it may skip over the second line due to time constraints on the first line's functionality The following may work ( untested ) so that all tests are made before deciding if Cyclone needs to be cast, and if not then react on the harm test options. /cast [mod:shift,@arena1],[mod:ctrl,@arena2],[mod:alt,@arena3],[mod:ctrlshift,@focus] Cyclone; [harm]Solar Wrath;Lifebloom |
The commas between brackets are wrong. You can also put it all on one line.
Code:
#showtooltip This is the same macro with no semicolons: Code:
#showtooltip |
thanks, I wasn't 100% sure of the commas, but didn't think the semi colons would cast the spell expected. I'm not on top of the macro conditionals yet, its one of the things holding back writing my own UI :)
Although come to think of it, maybe I should have looked at some of my macros from my ICC healing times. :) |
Quote:
I tried out the macro you suggested, and it worked with the exception of the [mod:shift,@focus] portion. It got ignored. HOWEVER, once I put the @focus portion of the macro at the end of the macro, on its own new line, now the macro, as a whole, works! So this is what the finished product looks like: #showtooltip /use [mod:shift,@arena1],[mod:ctrl,@arena2],[mod:alt,@arena3]Cyclone;[harm]Solar Wrath;Lifebloom /use [mod:ctrlshift,@focus]Cyclone |
Ok, I know at least some if not all the people who replied here are far more knowledgeable Lua coders than myself (and in other languages too, I'm sure) , but regarding WoW macros, there were some inaccuracies in their readings of the OP's macro (possibly due to some confusion with Lua conventions?)
Breaking it down:
That being said, here is what Xancepants' original macro was doing: * Code:
/cast [mod:shift,@arena1];[mod:ctrl,@arena2];[mod:alt,@arena3]Cyclone * Code:
[harm]Solar Wrath;Lifebloom * Code:
/cast [mod:ctrlshift,@focus]Cyclone This should work as intended: Code:
#showtooltip |
Thanks aallkkaa,
Most of it was unknown to me ( despite having parrot fashioned macros rofl ) so I have learnt alot :) |
I KNEW IT! I would tinker around with macro's for years until I eventually got it to work, and through much trial & error, was suspecting that a [mod:ctrlshift] MUST go before any other [conditional] with a singular [mod:] in it. Have definitely learned quite a bit this past week, and @Aallkkaa, you have cleared up the logic behind WoW macro's that I have long, looooong wondered about. Wish I would have asked much sooner. Thank you!
Also huge shout-outs to Xrystal, Kanegasi , and very much to Ammako. You guys are super helpful, and invaluable assets to the WoW community with your coding knowledge. Thank you all! |
The ctrlshift should work without an error. For example, I use this macro for the general professions:
#showtooltip /cast [mod:shiftctrl]Cooking;[mod:shiftalt]Archaeology;[mod:shift]First Aid;[mod:ctrl]Cooking Fire;[mod:alt]Survey;Fishing And for an example of the "/" representing OR, here is: #showtooltip Regrowth /stopcasting /cast [nomodifier:ctrl/shift,@mouseover,nodead,help][nomodifier:ctrl/shift,help,nodead][modifier:shift,help,nodead,@focus][modifier:ctrl,@player] Regrowth which basically says cast Regrowth on one of four units: mouseover, target, focus or self. if no control and no shift are pressed do mouseover or target (if no mouseover), or if shift is pressed do focus, or if ctrl is pressed do self. |
Quote:
And I'm glad I helped others too. |
All times are GMT -6. The time now is 09:35 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI