Looking for input

I have been tweaking a macro for the last couple days(see older post “Lazy Peon”. The result is a single button will perform the following functions.
Set Target/Focus
If target is an enemy and targeting me, fire off a defensive(if tank i have set to taunt if targeting a party member).
If focus is a dead non-friendly target use loot-a-range
Auto Mount swimming/flying/land(waterwalking) mount based on environment
Mark my target with a skull if solo, my vengeance has it set to party and is leader… helps alot
After all of that then it runs through the GSE sequence.

The code was done through many iterations of trial and error, so if anyone with experience could look at what I made and clean/improve it I would be grateful. I also hope this gives everyone else some ideas.

This macro is using a lot of /click commands to get some logic to work.

For larger Image

deupeaals(LqmmvshdvltvEMcnnH01GITjr9nOsJdPCof06Kq9oOI7juPbQQQCqjKfQs5Hcv1eLGUOqfBuvv1ivvLtQawPqHxku0mfk5MQQStj5NivXqLalvOkpLOPcLUksv1wvGolsv6TsXDLs7LQ)QsyWeoSslwI4XcMSuDzkBwLQpRQmAfDAv8AjsZMu3wsTBWVfnCKCCvIwoephsthLRdvTDHsDEKkRhPQSFe7ChRxXD5p69I)kAq6j(xuuHdwuv8JtHE1ZX6Y)mnL(aL6sxID1gWqDjFKZFpUllcpBMiU8gYPgLLG5YFlGF1damdj2gWoj43CzH29fVM5vCx(Bdi5Ggc6jbuhRxXDSEf3Lrclkd1UeVbbJiAUNi1fFvb500ukidZfatFGpfKDB7QqwxYYuq2TT3se8H0UYhvebV87fDehIObYPPPuqgMlaM(aFki722Bjconm83Ox9CzKWIYqTlXBqWiIgiNMMsbzyUay6d8PGSBBxfY6swwlrWPrl6WHkIGx(9IoIdr0a500ukidZfatFGpfKDB7TebNgg(BehIObYPPPuqgMlaM(aFki722Bjconm83Oxn6YiHfLHAxI3GGrenqonnLcYWCbW0h4tbz32UkK1LSSwIGx(H7WOkIGx(9IoIdr0a500ukidZfatFGpfKDB7TebNgg(BehIObYPPPuqgMlaM(aFki722Bjconm83Oxf1LrclkJiAGCAAkfKH5cGPpWNcYUT9wIGx(H7WOEfgxgjSOmIObYPPPuqgMlaM(aFki722BjcE53l6Oxv2LrclkJiAGCAAkfKH5cGPpWNcYUT9wIGtdd)n6sSihOuJX9BUmwzsfRt9H5smUmMgDXZ02IAowVI7YiHfLren)JsV0ziQ7jsDXxvHSUKLPGSoXdmR3se8H8OpCDMlJPrxbigkQJ1R4UmsqFcLseXrhB6FGlUTiLVHNXsG7mxwqIY(TbK0X6mxkzg1)Xdb2jbxwaYjrom6Czbi2VnGKowVI7YiHfLrenqonnLcYWCbW0h4tbz32UcY6epWSElr8WqB47QZCjwKduQXE(nN5mxkPSWaf6vyWfxxoqibx6Y)mnLlJ3sFgcriPdwkuJiwgrG5Ankjgn3tK6IV2seXLiQsK6vte3tKAsmAUNi1fZBjI4se)m2wNiuZe9G6mN5oUsage Information
Razer Synapse at 50ms
[form:0] = Normal form
[form:1] = Metamorphosis

This macro contains 1 macro version. This Sequence was exported from GSE 2.3.09.

Macro Version 1

Step Function: Priority

Pre Macro: Immolation Aura

KeyPress: Contains various utility functions.

Main Sequence: Blade Dance, Demon’s Bite, Eye Beam, Throw Glaive, Chaos Strike

KeyRelease: Metamorphosis

These below are SEPERATE macros from GSE, copy these and place on an actionbar you are not using. You will not be clicking them, GSE will.

This first one and is what GSE clicks on the KeyPress step (/click ElvUI_Bar6Button1) You will needto change the actionbar locations to wherever you place your macros. Use the command /fstack to view the button names while hovering over them. fstack will be confusing but if you are using elvui they should be ElvUI_Bar#Button# with the # corresponding to the action bar and individual button on that bar. These bars do not have to be visible for the clicks to work. For clarity I put my button names, but yours will be different.

ElvUI_Bar6Button1

/tar [@mouseover,exists,nodead]
/click [nodead]ElvUI_Bar6Button2
/focus [@mouseover,exists][@target,exists]
/click [@focus,dead,nohelp][nocombat]ElvUI_Bar6Button3
/click [noparty,combat]ElvUI_Bar6Button6
/focus [@target,dead]
/targetenemy [dead][noexists]

ElvUI_Bar6Button2

/click [nodead,nohelp,combat]ElvUI_Bar6Button4
/startattack [nostealth,nohelp]

ElvUI_Bar6Button3

#show Loot-A-Rang
/click [@focus,nohelp,dead]ElvUI_Bar6Button8;[@focus,nodead,nocombat,nomounted,outdoors,nochanneling][@focus,noexists,nocombat,nomounted,outdoors,nochanneling][@focus,noharm,nocombat,nomounted,outdoors,nochanneling]ElvUI_Bar6Button7

ElvUI_Bar6Button4

/run if ( UnitIsUnit("targettarget", "player") ) then 
/click [combat,nochanneling] ElvUI_Bar6Button5 end

ElvUI_Bar6Button6
/run if UnitExists("target") and GetRaidTargetIndex("target")~=8 then SetRaidTarget("target",8) end

ElvUI_Bar6Button7

#showtooltip
/clearfocus [@focus,dead]
/use [nomounted,swimming]Riding Turtle;[nomounted,flyable]Obsidian Nightwing;[nomounted]Crimson Water Strider

So why am I setting them up this way? While it is a cluster right now I will eventually get around to building out some clear logic. What I have now is not complete and just organic growth based on what I wanted.

I do believe button 4 is not running the way I want and just fires off the defensive.

ElvUI_Bar6Button4

1
2
/run if ( UnitIsUnit("targettarget", "player") ) then
/click [combat,nochanneling] ElvUI_Bar6Button5 end

Hello,
It looks nice when i import it but could you explain how to use the elvui commands/buttons idk what it is.
It would be useful to a lot of us.
Thanks

First, your elv_ui bar does not need to be visible for the macro to work. The commands are just macros that I placed on a actionbar so I can run the /click command. I then CHAIN the click commands based on conditions to get the desired effect.

You can see what the button’s name is by useing /fstack and hovering your mouse over. I recommend making a macro and adding it to a hotkey.

https://imgur.com/a/QhzkFmK

Im sorry even though you took the time to explain i still don’t understand what/how to do.
I’ll leave the testing to the pros
Thanks anyway.

Sorry I am not explaining it very well. What makes my attempt at automating decisions through the macro is the use of the /click button function. What this gives you is something more like a decision tree instead of the valid/not valid arguments. A “button” is any spell/macro on your action bar.
Example:
/click [nocombat,nomount,nochanneling,outdoors] ElvUI_Bar1Button1

This would click the first button on your main action bar. If you had a mount at that spot it would fire off the mount action. The cool thing about this is you can put the above click in your GSE at your keyrelease and if your are standing still the moment combat ends you will mount up. You can string another macro at that button that will decide which mount to pick based on swimming/flying/land. Hope this helps explain the clicking function and why it is cool.