GSE: Sequences, Variables, Macros

GSE: Sequences, Variables, Macros

6M Downloads

Parse macro conditional for modifiers and skip that line if the modifier doesn't apply

Furyswipesvg opened this issue · 6 comments

commented

Example for sequence:

/cast [nomod] firestorm
/cast [nomod] facebop
/cast [mod:alt] ubersmash

If user is holding alt down this sequence will execute ubersmash in one click.
If user is not holding alt down, this sequence will execute firestorm on click 1, facebop on click 2, and firestorm on click 3

commented
commented

What you can do instead is

cast [mod:alt] ubersmash; firestorm
cast [mod:alt] ubersmash; facebop

commented

Or even better put

cast [mod:alt] ubersmash

In KeyPress and put

/cast firestorm
/cast facebop

in the normal part of the macro.

commented

IsAltKeyDown()? IsControlKeyDown()? Not allowed in insecure code?

commented

I use IsAltKeyDown() in combat--it's not protected. I use it for follow.

	--This is meant to be in your alt-4 macro, and gets everyone to follow and assist the focus (meant to be your current window toon)
	if FSMB_game == "shadow" or FSMB_game=="classic" then
		if not IsAltKeyDown() and not IsControlKeyDown() and not IsShiftKeyDown() then
			FollowUnit(unitname(FSMB_raidleader))
		end
	elseif not IAmFocus() and FSMB_raidleader and IsAltKeyDown() then
		FollowUnit(unitname(FSMB_raidleader))
	end
end
commented

But the way GSE is currently architected it only knows about the current line when you click. It doesn’t know that 4 clicks later there is an alt line. And calling that code in the act area of GSE gets an interface action blocked errors. I use it in other places within GSE after the macro line has been executed.