FANDOM


Cast any elemental Black Magic spell, Barspell, or Enspell from one macro page!

Uses gearswap's self_command() function. I got the idea from Wren's key-triggered mechanisms in her luas. I wrote this mainly to eliminate stress from having to press up or down to switch pages for my spell macros. The page-switching has caused me to cast the wrong tier of spell on multiple occasions, so this should compress most of my macros to a single page and make life easier.

All you need to do is make six macros for the elements,

/console gs c m

where m is either "Fire", "Water", "Thunder", "Stone", "Aero", or "Blizzard", and 4 (if you're lazy) macros for tiers,

/console gs c m

where m is either "I", "II", "III", or "IV". (Don't include the quotation marks!) The code below happens to have tiers for -ga spells, Enspells and Barspells too.

What does it do?

We have 20 slots per macro page, 10 in each line.

Ctrl: [1][2][3][4][5][6][7][8][9][0]

Alt: [1][2][3][4][5][6][7][8][9][0]

Assuming I put Stone through Thunder in Ctrl slots 1-6, and four tier triggers in Ctrl slots 7-0, a sequence of nukes would proceed like this:

press Tier IV trigger, then "Fire"
Whitechaser casts Fire IV.
press "Aero"
Whitechaser casts Aero IV.
press Tier III trigger, then "Fire"
Whitechaser casts Fire III.
press "Blizzard"
Whitechaser casts Blizzard III.
Now by itself it doesn't seem like much, and that's true - this is only meant to compress macro pages. But it can save a few precious seconds to let you press an appropriate tier trigger then cast a spell or spells that your low MP will agree with in critical situations when you'd normally be fumbling through pages of spells.

Syntax

If you already have self_command() in your lua, just add the following code under it as an else-if structure.

function self_command(m)
    if m == "Fire" or m == "Water" or m == "Thunder" or m == "Stone" or m == "Aero" or m == "Blizzard" or m == "Light" or m == "Dark" or m == "Sleep" or m == "Poison" or m == "Paralyze" or m == "Blind" or m == "Silence" then
        if tier == "Enf" then
            if m == "Fire" then
                m = "Burn"
            elseif m == "Water" then
                m = "Drown"
            elseif m == "Thunder" then
                m = "Shock"
            elseif m == "Stone" then
                m = "Rasp"
            elseif m == "Aero" then
                m = "Choke"
            elseif m == "Blizzard" then
                m = "Frost"
            end
            tiernum = "I"
        end
        if tier == "Helix" then
            if m == "Fire" then
                m = "Pyrohelix"
            elseif m == "Water" then
                m = "Hydrohelix"
            elseif m == "Thunder" then
                m = "Ionohelix"
            elseif m == "Stone" then
                m = "Geohelix"
            elseif m == "Aero" then
                m = "Anemohelix"
            elseif m == "Blizzard" then
                m = "Cryohelix"
            elseif m == "Light" then
                m = "Luminohelix"
            elseif m == "Dark" then
                m = "Noctohelix"
            end
            tiernum = "I"
        end
        if tier == "gaI" or tier == "gaII" or tier == "gaIII" then
            if m == "Fire" then
                m = "Firaga"
            elseif m == "Water" then
                m = "Waterga"
            elseif m == "Thunder" then
                m = "Thundaga"
            elseif m == "Stone" then
                m = "Stonega"
            elseif m == "Aero" then
                m = "Aeroga"
            elseif m == "Blizzard" then
                m = "Blizzaga"
            end
            if tier == "gaI" then
                tiernum = "I"
            elseif tier == "gaII" then
                tiernum = "II"
            elseif tier == "gaIII" then
                tiernum = "III"
            end
        end
        if tier == "AM" or tier == "AMII" then
            if m == "Fire" then
                m = "Flare"
            elseif m == "Water" then
                m = "Flood"
            elseif m == "Thunder" then
                m = "Burst"
            elseif m == "Stone" then
                m = "Quake"
            elseif m == "Aero" then
                m = "Tornado"
            elseif m == "Blizzard" then
                m = "Freeze"
            end
            if tier == "AM" then
                tiernum = "I"
            elseif tier == "AMII" then
                tiernum = "II"
            end
        end
        if tier == "I" or tier == "II" or tier == "III" or tier == "IV" then
            tiernum = tier
        end
        if tier == "Bar" then
            if player.sub_job_id == 3 then
                if m == "Fire" then
                    m = "Fira"
                elseif m == "Water" then
                    m = "Watera"
                elseif m == "Thunder" then
                    m = "Thundra"
                elseif m == "Stone" then
                    m = "Stonra"
                elseif m == "Aero" then
                    m = "Aera"
                elseif m == "Blizzard" then
                    m = "Blizzara"
                end
            end
            send_command('input /ma "Bar' .. m .. '" <me>')
        elseif tier == "Barstat" then
            if player.sub_job_id == 3 then
                if m == "Sleep" then
                    m = "Sleepra"
                elseif m == "Poison" then
                    m = "Poisonra"
                elseif m == "Paralyze" then
                    m = "Paralyzra"
                elseif m == "Blind" then
                    m = "Blindra"
                elseif m == "Silence" then
                    m = "Silencera"
                end
            end
            send_command('input /ma "Bar' .. m .. '" <me>')
        elseif tier == "Naspell" then
            if m == "Poison" then
                m = "Poiso"
            elseif m == "Paralyze" then
                m = "Paraly"
            elseif m == "Blind" then
                m = "Blind"
            elseif m == "Silence" then
                m = "Sile"
            end
            send_command('input /ma "' .. m .. 'na" <stpc>')
        elseif tier == "En" then
            send_command('input /ma "En' .. m .. '" <me>')
        elseif tiernum == "I" then
            send_command('input /ma "' .. m .. '" <t>')
        elseif tiernum == "II" or tiernum == "III" or tiernum == "IV" then
            send_command('input /ma "' .. m .. ' ' .. tiernum .. '" <t>')
        end
    elseif m == "I" or m == "II" or m == "III" or m == "IV" or m == "gaI" or m == "gaII" or m == "gaIII" or m == "Bar" or m == "En" or m == "Enf" or m == "AM" or m == "AMII" or m == "Helix" or m == "Barstat" or m == "Naspell" then
        tier = m
    end
end

Remember to initialize the variable "tier" and "tiernum" by including these at the end/beginning:

tier = "IV"
tiernum = "IV"

Tested, works fine.

Upper/lower line should consume 6 spaces for elements, and either 4 spaces for the tiers, or 4 spaces for whatever spells or abilities you like to have on hand (I might use those for job abilities like Elemental Seal and Manafont, weaponskills or ranged attacks or ninjutsu.) Other line will be free if you already put the tiers on the upper line (I like having Stun, Drain, and Aspir there, as well as sleep spells and my toggle for the hp down set).

Will tweak occasionally. Hope this helps.