GSE3 -if/Then Blocks coming next few days

In the next few days a new block type is being added to GSE3 - an If/Then/Else block.

This is a container block like loops but provides some if capabilities. This is possible with just a variable which is fine for one or two abilities but not great to manipulate blocks. This has the same API limitations in that it’s not dynamic and can only be tested in combat but it would allow for things like “I’m in the maw please do this instead of what I normally do”.

To use this you would create a variable that returns a true or false value. Then it’s add blocks which could be other loops, repeats, actions for the true or false part states.

4 Likes

If this is what I am imaging it’s going to be really great!
like “if I’m in arena do this else do that” or “if I have pvp talent x then 1 else 2”

Yes. Similar to loops you set a series of blocks as true and a series as false and create a variable that return true or false as the switch

1 Like

1 Like

This is in the current build. Now YOu need to create a variable first that only returns true or false. An example is located at GSE3.0 Block Specification · TimothyLuke/GnomeSequencer-Enhanced Wiki · GitHub

1 Like

Is there anywhere some documentation where i can get all the parameters that i can call inside the boolean variable?

Points to the previous post. It has an example.

You can use anything from WoW’s API that is non situational. Ie anything not related to your health , a proc, your mobs health, your mana etc. The WoW API doc lives here: wow-ui-source/AddOns/Blizzard_APIDocumentation at live · Gethe/wow-ui-source · GitHub

Thank you, TimothyLuke, for making this amazing tool for our favorite game! <3

I recently found an older post where you shown us how we can use the pause feature to cast a spell if a spell becomes instant cast. I’m trying to set that up in GSE3, but have not been very successful as I am not sure if it should be in blocks, loop, repeater?

But then I ran across this post… is it possible to make it into an ‘IF’?

{
[1] = { – True Actions
[1] = {
[1] = “/cast Demonbolt”,
[“Type”] = “Action”
},
[2] = { – False Actions
[1] = {
[1] = “/cast [nochanneling:Demonbolt] Shadow Bolt”,
[“Type”] = “Action”
},
[“Variable”] = “DemonboltVar”,
[“Type”] = “If”
}

If so, how would that be written into a variable?

    [1] = { -- True Actions
        [1] = {
            [1] = "/cast [nochanneling:Demonbolt] Shadow Bolt",
            ["Type"] = "Action"
        },
        [2] = {
            ["MS"] = 1700,
            ["Type"] = "Pause"
        },
        [3] = {
            [1] = "/cast Demonbolt",
            ["Type"] = "Action"
        },
        [4] = {
            ["MS"] = 100,
            ["Type"] = "Pause"
        },

Something like?
function()
local shadow_cast_time = action.shadow_bolt.cast_time
local demon_cast_time = action.demonbolt.cast_time
if demon_cast_time < shadow_cast_time
return true
else
return false
end

Thanks again!

Your missing one very important thing. Variables can only be evaluated when you are out of combat. If/then are for things like am I this race or do I have this talent. They can’t be used for things like what is my current cast time as it will always evaluate your out of
Combat cast time and then use that.

Full documentation on IF blocks is located at https://github.com/TimothyLuke/GSE-Advanced-Macro-Compiler/wiki/GSE3.0-Block-Specification#if

The thing to consider is that GSE is a Macro Compiler.
The output of GSE is a macro based on the template that you are editing. Once combat starts that macro is set in stone until combat finishes and its execution is not in any way dynamic.

For things like your instant cast you have to follow the technique from the old post and update it to use a mix of pauses and action blocks, you have to preempt the proc.

ahh ok, thank you so much for responding!