Can GSE reset itself on timer?

So i’m an Enhance Shaman and want a very simple macro of Elemental Blast and then Lightning Bolt x2-3. Basically I want the single button to do EB when it is off cd and LB when it is on cd.

Using a normal sequence GSE merely advances on button press which means that if I don’t press Lightning Bolt twice in the 12 second cd of EB then i’ll have to remember that it is still on LB. Or if i’m not at 5 stack Maelstrom and go for a hard cast and get kicked or fake, it still advances forward. PvE vs PvP too, where sometimes in PvP i’ll probably use stacks for healing while in PvE the cycle would probably be normal.

I’ve tried castsequence, but of course its reset timer restarts when you hit the button again, so that doesn’t really help when trying to have it reset back to EB only when it is available.

GSE has a section for keybinding sequence resets and also a toggle to reset on dropping combat, so I know it is possible for it to reset itself on conditions, what I want to know is is there a way to have it reset on an internal timer that doesn’t restart like a normal castsequence does?

No, it can’t. Where it runs within the combat sandbox it has no access to time directly. The only way it can measure time is based on counting “clicks”. If your clicks are irregular it cant tell that there is a difference in the gap.

As you mentioned castsequence lines have a reset=x where X is a number of seconds but that only works if you DONT press the button.

You can however add a manual reset by setting up a key combination in GSE’s options that if you hit that combo it will reset the macro.

a trivial question, but something simpler and clearer than writing line 1 and running line 1 and stop is not really feasible timoty?
I know that it is difficult to set addons and only professionals can create such an addon, but knowing that castsequence for example is not how to write, but it is random, it seems to me not precise. I want to explain better if I can make myself understood but you have to excuse me I am not American English and I do not speak your language use of simultaneous translators so please excuse me in advance ok.
practical example:
castsequence spell, spell, spell addon executes line as it is written without keystrokes or how many times you have to press it, i.e. line executes line at stop pressure.
line 1--------> press 1 time
line 2 --------> pressure 2 times etcc etcc?
wouldn’t it be simpler or it’s just not feasible in such a thing?
because as you said castsequence is malfunctioning and it doesn’t really execute that goose you write but it’s random.

Translated with DeepL Translate: The world's most accurate translator (free version)

Bummer. I presume that this timer execution function is something locked across the board for all addons? Or could I use another addon like Weakauras or something to track the keypress and execute the reset command after a timer?

So frustrating. All I want is a simple “if on cooldown” condition to cut down my keybinds. I have 52 active keybinds. SL is removing two but adding four. I’m already near my limit and if I have to manually press a keybound reset button then I may as well just have that button be the bind for Elemental Blast itself.

Is KeyRelease bugged? I tried to do some combination of KeyPress/KeyRelease/Pre/PostMacro to make it work. Some combinations I’ve tried give me “Invalid step assigned” text box errors, but when I put anything into KeyRelease when there is anything in Press it stalls out and ignores anything in Release. If I have ActionButtonUseKeyDown enabled or disabled it still uses Press on both press and release. If I put the command in only one area then it works however the UseKeyDown dictates and not where the KeyPress/KeyRelease command is.
Putting a spell in each Press and Release doesn’t work despite letting the press spell go off, holding the button for seconds after and then releasing. Isn’t that the whole point of those boxes?
Is there any combination of KeyPress/Release/Pre/PostMacro that can get this to work for me? Having the sequence cycle through normally is untenable for me because it moves on to the next in the sequence regardless of if the spell actually executed. So if i’m spamming the button while in the global it will still cycle through and that just doesn’t work for me. It removes the entire point of taking the EB talent if half the time my macro will have me cast LB instead.

1 Like

There are two types of mods. Those that run inside the Combat sandbox - they can act but they are blind. They can’t see the time or procs or buffs or cooldowns or if a spell was cast or not. GSE is in this space.

The other type of mods are outside the sandbox. They can see everything and they can tell you everything. They just can’t act on anything. WeakAuras is one of these mods.

WeakAuras can tell you something but it can’t do something. GSE can do something but it can’t be told what to doz. once combat starts it is purely blind.

As to the other part. It sounds like You have a ton of confusion about how keypress, keyrelease, pre and PostMacro work. I broke this down just recently here: Improve addon gse - #7 by TimothyLuke

There is a stack and you need to take into account both how the stacks works and how GCD abilities lock the stack.

Keypress is items that are prepended to your sequence line and KeyRelease are postpended. There can still be only 1 GCD ability in that stack. If you have GCd abilities in KeyRelease they are never going to be executed if there is a GCD ability in the stack before hand. A GCD ability on cool down blocks the stack for everything below it.

What you are trying to achieve is totally achievable with GSE. You just need rethink your approach and work the limitations of what macros are allowed to do.

What you are trying to achieve is totally achievable with GSE. You just need rethink your approach and work the limitations of what macros are allowed to do.

Or you could tell me how. How can I rethink the approach when I clearly don’t understand the capabilities of the addon.

You say it is achievable but in the link above breaking down how KeyPress and Release function it states 1 button press 1 execution. So for whatever reason pressing a button, holding it for a couple seconds, and releasing doesn’t count as 2 functions which is what KeyPress and KeyRelease imply. And if it can only have 1 GCD in the stack then what I want can never work because attempting Elemental Blast and failing because it is on CD is never then moving on to Lightning Bolt without another keypress even if no actual GCD is used. I can’t have it cycle on press i need it to cycle on execution, because if i’m hitting the button while under GCD from another ability then it cycles and then will use the second spell when the normal GCD finishes in the button mashing.

If it is achievable then illuminate me please.

You are going to need multiple key presses and assume that some lines will fail. The whole point is that GSE will move to the next line irrespective of success or failure. KeyPress and KeyRelease are prepended and postpended to every line of your PreMacro, Sequence and PostMacro. You need to use this to your advantage.

I didn’t set the rules Blizzard did. You can only have One GCd ability on a press. You may however have an unlimited number of non GCD abilities each press. Eg you may have a burst cooldown that you want to go off as soon as it’s available. It’s not on the GcD so you put it in KP or KR. You have another ability that is on the gcd but want it to go off as soon as it’s on cooldown so you put it in the sequence on a line by itself and spam the macro. When it’s available and your macro get to that line and you are not in gcd it will execute, it not it will just move onto the next line. Or you may want to put in an override so that when you hold shift and fire your macro it casts a particular spell. You may want to give it a greater priority so you change the step function to Priority instead of Sequential. This changes how the sequence is actually attempted to be executed. You put some pauses in to wait for things to complete.

GSE gives you the tools to work around those rules but it takes trial and error and patience and thinking differently. Look at other macros from your class for ideas of how other people have solved the problem you face. Run the /gse debug command to help walk through your macro line by line to see why a particular line is succeeding for failing.

1 Like

i think the best approach for him / her its to [nochanneling] the crap every ability BUT the lava burst.

Something like this could work ( sequential ):

/cast Lava Burst
/cast [nochanneling] Lightning Bolt
X [nochanneling]
X [nochanneling]
X [nochanneling]

Try it in same macro, or to a separate one

Cheers

Ok so I wanted to update here that I more or less found my solution even if it isn’t perfect. Nothing was working for me through GSE and so I shelved that and moved on. I looked through google results for other things that could be related and some other functions as well for another thing I wanted to do and eventually stumbled upon a wow forums post about keydown and keyup. A guy wanted to do thunderclap on down and revenge on up or something, and was directed to another post that someone had done something similar. That post had a bit of code that was an addon that pretty much did what the guy wanted and so I just swapped out spells, binding, and class for the following:

local key = “Q”
if select(2,UnitClass(“player”))==“SHAMAN” then
local button = CreateFrame(“Button”,“EBonDown”,nil,“SecureActionButtonTemplate”)
button:RegisterForClicks(“AnyDown”,“AnyUp”)
button:SetAttribute(“type”,“macro”)
SecureHandlerWrapScript(button,“OnClick”,button,[[
if down then
self:SetAttribute(“macrotext”,"/cast elemental blast")
else
self:SetAttribute(“macrotext”,"/cast lightning bolt")
end
]])
button:RegisterEvent(“PLAYER_LOGIN”)
button:SetScript(“OnEvent”,function(self,event,…)
SetOverrideBindingClick(self,true,key,“EBonDown”)
end)
end

Dropped that into a lua file, made a toc file, loaded it up and it worked perfectly. Pressing the key down and holding it down casted Elemental Blast and still holding the key down I waited for the global to be over and let go and it cast Lightning Bolt. 1 key press recognized both keydown and keyup. Why can’t GSE do the same? I’d love to be able to do what this simple bit of code achieves in GSE because the ability to add pauses and such would very likely solve the last problem it has, which is casting LB if the keypress down is during a global.

Anyways, hope this helps anyone that needed 1 button 2 spells.

@Whirlwind
Isn’t that a form of botting? Cause I know one action=one keypress is only allowed.

Let me know how you go dragging that button to an action bar and what happend hen you release it inside the GCD window.

@Deezyl_Fizzlepop
I’m by no means an expert as I don’t know the coding language for writing addons and such myself but i’m under the impression that no it would not fall under botting because it is not only still a manual keypress that in no way automates targeting, but it still technically is one action for one keypress. You still have to wait for the global to pass for letting go of the button to do the second cast, it doesn’t queue anything up to automatically cast. In that respect because you’re “stuck” holding the button if you wanted to cast both spells successively it behaves the same as having the different spells bound to separate keys, it is only merely functionally different in the amount of keys actually bound. Much like a shift/alt/ctrl modifier, you can look at this as essentially a keydown/keyup modifier.

@TimothyLuke
You don’t. The key designated in the code of the addon overwrites everything ingame. So even if my bartender has that bound to slot, pressing that key doesn’t “light up” that slot’s icon like a nornal keypress without it would. I’m not an addon writer, I don’t know the language, so I don’t know how it works like an override, but it does. So you’d manually edit the lua for the spells, button name, class, and keybind. I imagine you can cut and paste it for multiple different keybinds but I didn’t try because I only needed the functionality for this one specific thing.

What happens when you press and/or release in the GCD window is that nothing happens. This is why it isn’t 100% perfect for me, as if i’m spam hitting the bound button and the GCD from another ability is present when the keydown is hit then Elemental Blast won’t cast, but if the GCD is finished when the release for keyup happens then the Lightning Bolt will cast. The same thing for if you press the key down & up triggering in the GCD before it is over, nothing happens at least on an outward level. I’m not an addon writer so I don’t know whats happening under the hood, but no errors get thrown up other than the normal “can’t cast this” that happens when you normally try to do something in a gcd.

Big no no

Also the same as x2 sequential macro, u still need to wait the GCD + the abilitiy / ies itself.

But you got my attention maybe we can get something of this.

Cheers.

Except it isn’t the same as a sequential macro, because in GSE every spam of the keybind progresses the sequence. So if i’m in combat waiting for the 5 stack Maelstrom Weapon and doing other abilities and then the 5 stack comes up at a good burst opportunity and I slam my Elemental Blast button trying to get it off as soon as possible, I don’t know where in the sequence it’ll end up after the cast if i’m still hitting the key as it goes off.

On top of that, if I don’t slam it, but get a normal EB cast off without conflicting with GCDs then the next keypress is Lightning Bolt. GSE can’t reset itself on timers and I can’t rely on a cast sequence macro because sometimes I WILL want to cast that LB before EB’s timer is up and a cast sequence’s timer funciton restarts its countdown on each press. But PvP is unpredictable and so maybe i’ll need that next use for a heal. In which case i’ll have to remember that LB is the next one in queue. I don’t have to remember with this, it becomes muscle memory. When you don’t have to stop and think about an action, it becomes that much smoother.

As for a big nono for override, I don’t see what the problem is. I know the bind and it isn’t something i’d change. You can change addons ingame now with just a reload so if I wanted to change it I could. It may not be for the lowest common denominator player, but as I said I didn’t write the thing nor am I an addon maker. Someone could probably make an ingame ui associated with adding the spells and changing binds and then adding the bind labels somewhere. Or maybe integrate it into GSE if that is possible, since as I mentioned before when I tried the keypress and keyrelease functions in it they wouldn’t execute like this code does. Then you get the best of both worlds.