Barebones Summoner Gearswap

Language: JP EN DE FR
New Items
2023-11-19
users online
Forum » FFXI » Jobs » Summoner » Barebones Summoner Gearswap
Barebones Summoner Gearswap
First Page 2 3 4 5
Offline
By Aeyela 2015-10-05 04:09:05
Link | Quote | Reply
 
Your pact function is a child of the toggle function, which means Windower is not executing the commands because your macro is missing 'toggle'. Adding toggle won't work, either, as the syntax of the command will break. You need to move the pact function so that it is not a child of the toggle one.

So basically, move all of this part:

From where it is, and put it after the toggle function, like so:
Offline
Posts: 761
By Elizabet 2015-10-05 04:29:34
Link | Quote | Reply
 
^ This, Aeyela is correct. It's like that in my own lua as well, just made a mistake in my copy pasta >.<;
Edited the post on previous page to erase the mistake from memory! You all never saw it!!
[+]
 Hades.Ramorakomo
Offline
Server: Hades
Game: FFXI
Posts: 11
By Hades.Ramorakomo 2015-10-05 05:54:02
Link | Quote | Reply
 
Still not working :(((((((((((((((
Code
--[[
     Put: /console gs c pact [PactType] as your macro
      
        PactType can be one of:
            cure
            curaga
            buffOffense
            buffDefense
            buffSpecial
            debuff1
            debuff2
            sleep
            nuke2
            nuke4
            bp70
            bp75 (merits and lvl 75-80 pacts)
            bp99
            astralflow
--]]
    pacts = {}
    pacts.cure = {['Carbuncle']='Healing Ruby'}
    pacts.curaga = {['Carbuncle']='Healing Ruby II', ['Garuda']='Whispering Wind', ['Leviathan']='Spring Water'}
    pacts.buffoffense = {['Carbuncle']='Glittering Ruby', ['Ifrit']='Crimson Howl', ['Garuda']='Hastega II', ['Ramuh']='Rolling Thunder',
        ['Fenrir']='Ecliptic Growl', ['Shiva']='Crystal Blessing'}
    pacts.buffdefense = {['Carbuncle']='Shining Ruby', ['Shiva']='Frost Armor', ['Garuda']='Aerial Armor', ['Titan']='Earthen Ward',
        ['Ramuh']='Lightning Armor', ['Fenrir']='Ecliptic Howl', ['Diabolos']='Noctoshield', ['Cait Sith']='Reraise II'}
    pacts.buffspecial = {['Ifrit']=' <staff_and_grip Howl', ['Garuda']='Fleet Wind', ['Titan']='Earthen Armor', ['Diabolos']='Dream Shroud',
        ['Carbuncle']='Soothing Ruby', ['Fenrir']='Heavenward Howl', ['Cait Sith']='Raise II'}
    pacts.debuff1 = {['Shiva']='Diamond Storm', ['Ramuh']='Shock Squall', ['Leviathan']='Tidal Roar', ['Fenrir']='Lunar Cry',
        ['Diabolos']='Pavor Nocturnus', ['Cait Sith']='Eerie Eye'}
    pacts.debuff2 = {['Shiva']='Sleepga', ['Leviathan']='Slowga', ['Fenrir']='Lunar Roar', ['Diabolos']='Somnolence', ['Ramuh']='Thunderspark'}
    pacts.sleep = {['Shiva']='Sleepga', ['Diabolos']='Nightmare', ['Cait Sith']='Mewing Lullaby'}
    pacts.nuke2 = {['Ifrit']='Fire II', ['Shiva']='Blizzard II', ['Garuda']='Aero II', ['Titan']='Stone II',
        ['Ramuh']='Thunder II', ['Leviathan']='Water II'}
    pacts.nuke4 = {['Ifrit']='Fire IV', ['Shiva']='Blizzard IV', ['Garuda']='Aero IV', ['Titan']='Stone IV',
        ['Ramuh']='Thunder IV', ['Leviathan']='Water IV'}
    pacts.bp70 = {['Ifrit']='Flaming Crush', ['Shiva']='Rush', ['Garuda']='Predator Claws', ['Titan']='Mountain Buster',
        ['Ramuh']='Chaotic Strike', ['Leviathan']='Spinning Dive', ['Carbuncle']='Meteorite', ['Fenrir']='Eclipse Bite',
        ['Diabolos']='Nether Blast',['Cait Sith']='Regal Gash'}
    pacts.bp75 = {['Ifrit']='Meteor Strike', ['Shiva']='Heavenly Strike', ['Garuda']='Wind Blade', ['Titan']='Geocrush',
        ['Ramuh']='Thunderstorm', ['Leviathan']='Grand Fall', ['Carbuncle']='Holy Mist', ['Fenrir']='Lunar Bay',
        ['Diabolos']='Night Terror', ['Cait Sith']='Level ? Holy'}
    pacts.bp99 = {['Ifrit']='Conflag Strike', ['Ramuh']='Volt Strike', ['Titan']='Crag Throw', ['Fenrir']='Impact', ['Diabolos']='Blindside'}
    pacts.astralflow = {['Ifrit']='Inferno', ['Shiva']='Diamond Dust', ['Garuda']='Aerial Blast', ['Titan']='Earthen Fury',
        ['Ramuh']='Judgment Bolt', ['Leviathan']='Tidal Wave', ['Carbuncle']='Searing Light', ['Fenrir']='Howling Moon',
        ['Diabolos']='Ruinous Omen', ['Cait Sith']="Altana's Favor"}
include('global.lua') -- Just a collection of functions that I use in all my GearSwaps. See below (after this code block)
set_macros(2,3) -- Sheet, Book
 
function get_sets()
 
    -- My formatting is very easy to follow. All sets that pertain to my character doing things are under 'me'.
    -- All sets that are equipped to faciliate my avatar's behaviour or abilities are under 'avatar', eg, Perpetuation, Blood Pacts, etc
     
    sets.me = {}
    sets.avatar = {}

	-- AUGMENTED GEAR
        prep_feet = {name="Helios boots", augments={'"Avatar perpetuation cost" -4','Blood Pact Dmg.+7','Pet: Attack+22 Pet: Rng.Atk.+22',}}
	attack_feet = {name="Helios boots", augments={'Pet: Crit. hit rate +4%','Blood Pact Dmg.+6','Pet: "Mag.Atk.Bns."+22',}}
   
    -- Your idle set when you DON'T have an avatar out
    sets.me.idle = {
        main="Keraunos",
        sub="Vox Grip",
        ranged="",
        ammo="Seraphicaller",
        head="Glyphic horn +1",
        neck="Twilight torque",
        lear="handler's earring",
        rear="handler's earring +1",
        body="Shomonjijoe +1",
        hands="Serpentes cuffs",
        lring="shadow ring",
        rring="Warp ring",
        back="Convoyance cape",
        waist="Cimmerian sash",
        legs="Assiduity pants +1",
        feet="serpentes sabots"
    }
     
    -- Your MP Recovered Whilst Resting Set
    sets.me.resting = { 
       main="Keraunos",
        sub="Vox Grip",
        ranged="",
        ammo="Seraphicaller",
        head="Glyphic horn +1",
        neck="Twilight torque",
        lear="handler's earring",
        rear="handler's earring +1",
        body="Shomonjijoe +1",
        hands="Serpentes cuffs",
        lring="shadow ring",
        rring="Warp ring",
        back="Convoyance cape",
        waist="Cimmerian sash",
        legs="Assiduity pants +1",
        feet="serpentes sabots"
    }
     
    -----------------------
    -- Perpetuation Related
    -----------------------
     
    -- Avatar's Out --  
    -- This is the base for all perpetuation scenarios, as seen below
    sets.avatar.perp = {
        main="Keraunos",
        sub="Vox Grip",
        ranged="",
        ammo="Seraphicaller",
        head="Beckoner's horn +1",
        neck="caller's pendant",
        lear="handler's earring",
        rear="handler's earring +1",
        body="Shomonjijoe +1",
        hands="Glyphic bracers +1",
        lring="Thurandaut ring",
        rring="Evoker's ring",
        back="Convoyance cape",
        waist="Cimmerian sash",
        legs="Assiduity pants +1",
        feet=prep_feet
    }
 
    -- The following sets base off of perpetuation, so you can consider them idle sets.
    -- Set the relevant gear, bearing in mind it will overwrite the perpetuation item for that slot!
     
    -- When we want our avatar to stay alive
    sets.avatar.tank = set_combine(sets.avatar.perp,{
        main="",
        sub="",
        ranged="",
        ammo="",
        head="",
        neck="",
        lear="",
        rear="",
        body="",
        hands="",
        lring="",
        rring="",
        back="",
        waist="",
        legs="",
        feet=""
    })
     
    -- When we want our avatar to shred
    sets.avatar.melee = set_combine(sets.avatar.perp,{
        main="",
        sub="",
        ranged="",
        ammo="",
        head="",
        neck="",
        lear="",
        rear="",
        body="",
        hands="",
        lring="",
        rring="",
        back="",
        waist="",
        legs="",
        feet=""
    })
     
    -- When we want our avatar to hit
    sets.avatar.acc = set_combine(sets.avatar.perp,{
        main="",
        sub="",
        ranged="",
        ammo="",
        head="",
        neck="",
        lear="",
        rear="",
        body="",
        hands="",
        lring="",
        rring="",
        back="",
        waist="",
        legs="",
        feet=""
    })
     
    -- When Avatar's Favori s active
    sets.avatar.favor = set_combine(sets.avatar.perp,{
        main="",
        sub="",
        ranged="",
        ammo="",
        head="",
        neck="",
        lear="",
        rear="",
        body="",
        hands="",
        lring="",
        rring="",
        back="",
        waist="",
        legs="",
        feet=""
    })
     
    ----------------------------
    -- Summoning Skill Related
    -- Including all blood pacts
    ----------------------------
     
    -- + Summoning Magic. This is a base set for max skill and blood pacts and we'll overwrite later as and when we need to
    sets.avatar.skill = {
        main="",
        sub="vox grip",
        ranged="",
        ammo="Seraphicaller",
        head="",
        neck="caller's pendant",
        lear="",
        rear="",
        body="",
        hands="glyphic bracer's +1",
        lring="",
        rring="Evoker's ring",
        back="Convoyance cape",
        waist="Cimmerian sash",
        legs="",
        feet=""
    }
     
    -------------------------
    -- Individual Blood Pacts
    -------------------------
     
    -- Physical damage
    sets.avatar.atk = set_combine(sets.avatar.skill,{
        main="Espiritus",
        sub="Vox Grip",
        ranged="",
        ammo="Seraphicaller",
        head="Helios band",
        neck="caller's pendant",
        lear="gelos earring",
        rear="handler's earring +1",
        body="Convoker's doublet +1",
        hands="helios gloves",
        lring="thurandaut ring",
        rring="Evoker's ring",
        back="conveyance cape",
        waist="Cimmerian sash",
        legs="Helios spats",
        feet=attack_feet
    })
     
    -- Magic Attack
    sets.avatar.mab = set_combine(sets.avatar.skill,{
        main="Espiritus",
        sub="Vox Grip",
        ranged="",
        ammo="Seraphicaller",
        head="Helios band",
        neck="caller's pendant",
        lear="gelos earring",
        rear="handler's earring +1",
        body="Convoker's doublet +1",
        hands="helios gloves",
        lring="thurandaut ring",
        rring="Evoker's ring",
        back="conveyance cape",
        waist="Cimmerian sash",
        legs="Helios spats",
        feet=attack_feet
    })
 
    -- Hybrid
    sets.avatar.hybrid = set_combine(sets.avatar.skill,{
        main="Espiritus",
        sub="Vox Grip",
        ranged="",
        ammo="Seraphicaller",
        head="Helios band",
        neck="caller's pendant",
        lear="gelos earring",
        rear="handler's earring +1",
        body="Convoker's doublet +1",
        hands="helios gloves",
        lring="thurandaut ring",
        rring="Evoker's ring",
        back="conveyance cape",
        waist="Cimmerian sash",
        legs="Helios spats",
        feet=attack_feet
    })
     
    -- Other
    sets.avatar.other = set_combine(sets.avatar.skill,{
        main="",
        sub="",
        ranged="",
        ammo="",
        head="",
        neck="",
        lear="",
        rear="",
        body="",
        hands="",
        lring="",
        rring="",
        back="",
        waist="",
        legs="",
        feet=""
    })
     
    -- Combat Related Sets
     
    -- Melee
    -- The melee set combines with perpetuation, because we don't want to be losing all our MP whilst we swing our Staff
    -- Anything you equip here will overwrite the perpetuation/refresh in that slot.
    sets.me.melee = set_combine(sets.avatar.perp,{
        main="",
        sub="",
        ranged="",
        ammo="",
        head="",
        neck="",
        lear="",
        rear="",
        body="",
        hands="",
        lring="",
        rring="",
        back="",
        waist="",
        legs="",
        feet=""
    })
     
    -- Shattersoul. Weapon Skills do not work off perpetuation as it only stays equipped for a moment
    sets.me["Shattersoul"] = {
        main="",
        sub="",
        ranged="",
        ammo="",
        head="",
        neck="",
        lear="",
        rear="",
        body="",
        hands="",
        lring="",
        rring="",
        back="",
        waist="",
        legs="",
        feet=""
    }
    sets.me["Garland of Bliss"] = {
        main="",
        sub="",
        ranged="",
        ammo="",
        head="",
        neck="",
        lear="",
        rear="",
        body="",
        hands="",
        lring="",
        rring="",
        back="",
        waist="",
        legs="",
        feet=""
    }
     
    -- Feel free to add new weapon skills, make sure you spell it the same as in game. These are the only two I ever use though
 
    ---------------
    -- Casting Sets
    ---------------
     
    sets.precast = {}
    sets.midcast = {}
    sets.aftercast = {}
     
    ----------
    -- Precast
    ----------
     
    -- Generic Casting Set that all others take off of. Here you should add all your fast cast  
    sets.precast.casting = {
        main="",
        sub="",
        ranged="",
        ammo="",
        head="",
        neck="",
        lear="",
        rear="",
        body="",
        hands="",
        lring="",
        rring="",
        back="",
        waist="",
        legs="",
        feet=""
    }   
     
    -- Summoning Magic Cast time - gear
    sets.precast.summoning = set_combine(sets.precast.casting,{
        main="",
        sub="",
        ranged="",
        ammo="",
        head="",
        neck="",
        lear="",
        rear="",
        body="",
        hands="",
        lring="",
        rring="",
        back="",
        waist="",
        legs="",
        feet=""
    })
     
    -- Enhancing Magic, eg. Siegal Sash, etc
    sets.precast.enhancing = set_combine(sets.precast.casting,{
        main="",
        sub="",
        ranged="",
        ammo="",
        head="",
        neck="",
        lear="",
        rear="",
        body="",
        hands="",
        lring="",
        rring="",
        back="",
        waist="",
        legs="",
        feet=""
    })
 
    -- Stoneskin casting time -, works off of enhancing -
    sets.precast.stoneskin = set_combine(sets.precast.enhancing,{
        main="",
        sub="",
        ranged="",
        ammo="",
        head="",
        neck="",
        lear="",
        rear="",
        body="",
        hands="",
        lring="",
        rring="",
        back="",
        waist="",
        legs="",
        feet=""
    })
     
    -- Curing Precast, Cure Spell Casting time -
    sets.precast.cure = set_combine(sets.precast.casting,{
        main="",
        sub="",
        ranged="",
        ammo="",
        head="",
        neck="",
        lear="",
        rear="",
        body="",
        hands="",
        lring="",
        rring="",
        back="",
        waist="",
        legs="",
        feet=""
    })
     
    ---------------------
    -- Ability Precasting
    ---------------------
     
    -- Blood Pact Ability Delay
    sets.precast.bp = {
        main="Espirtus",
        sub="",
        ranged="",
        ammo="Seraphicaller",
        head="Glyphic horn +1",
        neck="",
        lear="Caller's earring",
        rear="",
        body="Glyphic doublet +1",
        hands="Glyphic bracers +1",
        lring="",
        rring="",
        back="Conveyance cape",
        waist="",
        legs="",
        feet="Glyphic pigaches +1"
    }
     
    -- Mana Cede
    sets.precast["Mana Cede"] = {
        main="",
        sub="",
        ranged="",
        ammo="",
        head="",
        neck="",
        lear="",
        rear="",
        body="",
        hands="",
        lring="",
        rring="",
        back="",
        waist="",
        legs="",
        feet=""
    }
     
    -- Astral Flow  
    sets.precast["Astral Flow"] = {
        main="",
        sub="",
        ranged="",
        ammo="",
        head="",
        neck="",
        lear="",
        rear="",
        body="",
        hands="",
        lring="",
        rring="",
        back="",
        waist="",
        legs="",
        feet=""
    }
     
    -- Elemental Siphon, eg, Tatsumaki Thingies, Esper Stone, etc
    sets.precast.siphon = set_combine(sets.avatar.skill,{
        main="",
        sub="",
        ranged="",
        ammo="",
        head="",
        neck="",
        lear="",
        rear="",
        body="",
        hands="",
        lring="",
        rring="",
        back="",
        waist="",
        legs="",
        feet=""
    })
     
    ----------
    -- Midcast
    ----------
     
    -- We handle the damage and etc. in Pet Midcast later
     
    -- Whatever you want to equip mid-cast as a catch all for all spells, and we'll overwrite later for individual spells
    sets.midcast.casting = {
        main="Espiritus",
        sub="Vox Grip",
        ranged="",
        ammo="Seraphicaller",
        head="Helios band",
        neck="caller's pendant",
        lear="gelos earring",
        rear="handler's earring +1",
        body="Convoker's doublet +1",
        hands="helios gloves",
        lring="thurandaut ring",
        rring="Evoker's ring",
        back="conveyance cape",
        waist="Cimmerian sash",
        legs="Helios spats",
        feet=attack_feet
    }
     
    -- Enhancing
    sets.midcast.enhancing = set_combine(sets.midcast.casting,{
        main="",
        sub="",
        ranged="",
        ammo="",
        head="",
        neck="",
        lear="",
        rear="",
        body="",
        hands="",
        lring="",
        rring="",
        back="",
        waist="",
        legs="",
        feet=""
    })
     
    -- Stoneskin
    sets.midcast.stoneskin = set_combine(sets.midcast.enhancing,{
        main="",
        sub="",
        ranged="",
        ammo="",
        head="",
        neck="",
        lear="",
        rear="",
        body="",
        hands="",
        lring="",
        rring="",
        back="",
        waist="",
        legs="",
        feet=""
    })
     
    -- Cure Potency
    sets.midcast.cure = set_combine(sets.midcast.casting,{
        main="",
        sub="",
        ranged="",
        ammo="",
        head="",
        neck="",
        lear="",
        rear="",
        body="",
        hands="",
        lring="",
        rring="",
        back="",
        waist="",
        legs="",
        feet=""
    })
     
    ------------
    -- Aftercast
    ------------
     
    -- I don't use aftercast sets, as we handle what to equip later depending on conditions using a function, eg, do we have an avatar out?
 
end
 
function precast(spell)
 
    -- Don't swap if we're in the middle of something or our pet's doing something
    -- Stops macro spam from interfering with an action GS is already handling
    if midaction() or pet_midaction() then
        return
    end
     
    -- If we're doing a blood pact, equip our delay set IF Apogee or Astral Conduit are not active
    if (spell.type == 'BloodPactRage' or spell.type == 'BloodPactWard') and not (buffactive['Astral Conduit'] or buffactive['Apogee']) then
     
        equip(sets.precast.bp)
         
    elseif spell.type == 'SummonerPact' then
     
        -- This chunk of code handles Elemental Siphon. It will look at the current day and weather and cancel the spell to summon
        -- the right elemental. Your elemental siphon macro should summon a Dark Spirit to trigger this check
         
        -- These use the included lists in global.lua to determine the right spirit to summon
             
        if spell.name == 'Dark Spirit' then
            if world.weather_element == 'Dark' then
             
                -- Dark Weather is active, lets the spell go ahead and equips summoning precast
                equip(sets.precast.summoning)
                 
            elseif world.weather_element ~= 'None' and spirit_conflict[world.day_element] ~= world.weather_element then
             
                -- It's not dark weather but there is some weather up, cancels dark and summons the right spirit
                cancel_spell()
                send_command('input /ma "%s" <me>':format(spirit_element[world.weather_element]))
                equip(sets.precast.summoning)
                 
            elseif world.day_element == 'Dark' then
             
                -- It's darksday so allow the dark spirit to go ahead and equip summoning
                equip(sets.precast.summoning)
                 
            else
             
                -- There is no weather up and it's not darksday, so summon the current day's spirit
                cancel_spell()              
                send_command('input /ma "%s" <me>':format(spirit_element[world.day_element]))
                equip(sets.precast.summoning)
                 
            end
        else
         
            -- We're not summoning Dark Spirit, so we don't want to Siphon, which means we're summoning an avatar
            equip(sets.precast.summoning)
             
        end
         
    -- Moving on to other types of magic
    elseif spell.type == 'WhiteMagic' or spell.type == 'BlackMagic' then
     
        -- Stoneskin Precast
        if spell.name == 'Stoneskin' then
         
            windower.ffxi.cancel_buff(37)--[[Cancels stoneskin, not delayed incase you get a Quick Cast]]
            equip(sets.precast.stoneskin)
             
        -- Cure Precast
        elseif spell.name:match('Cure') or spell.name:match('Cura') then
         
            equip(sets.precast.cure)
             
        -- Enhancing Magic
        elseif spell.skill == 'Enhancing Magic' then
         
            equip(sets.precast.enhancing)
             
            if spell.name == 'Sneak' then
                windower.ffxi.cancel_buff(71)--[[Cancels Sneak]]
            end
        else
         
            -- For everything else we go with max fastcast
            equip(sets.precast.casting)
             
        end
         
    -- Summoner Abilities
    -- We use a catch all here, if the set exists for an ability, use it
    -- This way we don't need to write a load of different code for different abilities, just make a set
     
    elseif sets.precast[spell.name] then
        equip(sets.precast[spell.name])
    end
     
end
 
function midcast(spell)
 
    -- If our pet is doing something, prevents us swapping equipment too early
    if pet_midaction() then
        return
    end
     
    -- No need to annotate all this, it's fairly logical. Just equips the relevant sets for the relevant magic
    if spell.type == 'WhiteMagic' or spell.type == 'BlackMagic' then
        if spell.name == 'Stoneskin' then
            equip(sets.midcast.stoneskin)
        elseif spell.name:match('Cure') or spell.name:match('Cura') then
            equip(sets.midcast.cure)
        elseif spell.skill == 'Enhancing Magic' then
            equip(sets.midcast.enhancing)
            if spell.name:match('Protect') or spell.name:match('Shell') then
                equip({rring="Sheltered Ring"})
            end
        else
            equip(sets.midcast.casting)
        end
    elseif spell.name == 'Elemental Siphon' then
     
        -- Siphon Set
        equip(sets.midcast.siphon)
         
        -- Checks if pet matches weather
        if pet.element == world.weather_element then
            equip(sets.midcast.siphon,{main="Chatoyant Staff"--[[Take advantage of the weather boost]]})
        end
         
    -- And our catch all, if a set exists for this spell use it
    elseif sets.midcast[spell.name] then
        equip(sets.midcast[spell.name])
         
    -- Remember those WS Sets we defined? :)
    elseif sets.me[spell.name] then
        equip(sets.me[spell.name])
    end
end
 
function aftercast(spell)
 
    -- If our pet's doing something, Stop!
    if pet_midaction() then
        return
    end 
     
    -- If not a blood pact or summon
    if spell and (not spell.type or not string.find(spell.type,'BloodPact') and not AvatarList:contains(spell.name) or spell.interrupted) then
     
        -- Then initiate idle function to check which set should be equipped
        idle(pet)
         
    end
end
 
function pet_midcast(spell)
 
    -- Our pet is doing something
    if (spell.type == 'BloodPactRage' or spell.type == 'BloodPactWard') then
     
        -- We're going to check the lists in global.lua for matches and equip the relevant sets
         
        if bp_physical:contains(spell.name) then
         
            equip(sets.avatar.atk)
             
        elseif bp_hybrid:contains(spell.name) then
         
            equip(sets.avatar.hybrid)
            if pet.name == 'Ifrit' then
                equip({rring="Fervor Ring"})--[[Change rring to lring if you put Evoker's on your right hand]]
            end
             
        elseif bp_magical:contains(spell.name) then
         
            equip(sets.avatar.mab)
            if pet.name == 'Ifrit' then
                equip({rring="Fervor Ring"})--[[Change rring to lring if you put Evoker's on your right hand]]
            end
 
        elseif bp_debuff:contains(spell.name) then
         
            equip(sets.avatar.macc)
             
        elseif bp_buff:contains(spell.name) then
         
            equip(sets.avatar.buff)
             
        elseif bp_other:contains(spell.name) then
         
            equip(sets.avatar.other)
             
        elseif spell.name == 'Perfect Defense' then
         
            equip(sets.avatar.skill)
             
        else
         
            equip(sets.avatar.skill)
             
        end
    end 
end
 
function pet_aftercast(spell)
     
    -- Pet aftercast is simply a check for whether Conduit and Apogee are up, and then a call to our aftercast function
    -- We have a variable called autobp that we set to true or false with commands to auto repeat BPs for us
    if (buffactive['Apogee'] or buffactive['Astral Conduit']) and autobp then
        send_command('input /pet "%s" <t>':format(spell.name))
        return
    end
     
    idle(pet)
     
end
 
function idle(pet)
 
    -- This function is called after every action, and handles which set to equip depending on what we're doing
    -- We check if we're meleeing because we don't want to idle in melee gear when we're only engaged for trusts
     
    if favor and pet.isvalid then
     
        -- Avatar's favor takes priority!
        equip(sets.me.favor)
         
    elseif meleeing and player.status=='Engaged' then
     
        -- We're both engaged and meleeing
        equip(sets.me.melee)
         
    elseif pet.isvalid then
         
        -- We have a pet out but we're not meleeing, set the right idle set
        equip(sets.avatar[mode])
 
    else
     
        -- We're not meleeing and we have no pet out
        equip(sets.me.idle)
         
    end
end
 
function status_change(new,old)
    if new == 'Engaged' then
     
        -- If we engage check our meleeing status
        idle(pet)
         
    elseif new=='Resting' then
     
        -- We're resting
        equip(sets.me.resting)
    end
end
 
function pet_change(pet,gain)
 
    -- When we summon or release an avatar
    idle(pet)
 
end
 
 
function self_command(command)
  
    local commandArgs = command
      
    -- This command takes //gs c avatar mode, where mode is what you want, eg, tank, acc, melee, etc
    if #commandArgs:split(' ') >= 2 then
        commandArgs = T(commandArgs:split(' '))
        if commandArgs[1] == 'avatar' then
            if commandArgs[2] then
                mode = tostring(commandArgs[2])
                equip(sets.avatar[mode])
                windower.add_to_chat(8,'----- Avatar set to '..mode..' mode! -----')
            end
        elseif commandArgs[1] == 'toggle' then
            if commandArgs[2] == 'auto' then
              
                -- //gs c toggle auto will toggle auto blood pacts on and off. Auto blood pact will make your GS repeat BPs under Apogee or Conduit
                -- And by repeat I mean repeat. If Conduit is up, it will SPAM the BP until Conduit is down
                if autobp then
                    autobp = false
                    windower.add_to_chat(8,'----- Auto BP mode Disabled -----')
                else
                    autobp = true
                    windower.add_to_chat(8,'----- Auto BP mode Enabled -----')
                end
            elseif commandArgs[2] == 'melee' then
              
                -- //gs c toggle melee will toggle melee mode on and off.
                -- This basically locks the slots that will cause you to lose TP if changing them,
                -- As well as equip your melee set if you're engaged
  
                if exping then
                    exping = false
                    enable('back')
                    windower.add_to_chat(8,'----- Cape Unlocked, WILL LOSE EXP -----')
                    idle(pet)
                else
                    exping=true
                    disable('back')
                    windower.add_to_chat(8,'----- Cape Locked, WILL NOT LOSE EXP -----')
                    idle(pet)
                end
                  
            elseif commandArgs[2] == 'favor' then
                      
                -- //gs c toggle favor will toggle Favor mode on and off.
                -- It won't automatically toggle, as some people like having favor active without the gear swaps for maximum effectiveness
                -- You need to toggle prioritisation yourself
                if favor then
                    favor = false
                    windower.add_to_chat(8,"----- Avatar's Favor Mode OFF -----")
                else
                    favor = true
                    windower.add_to_chat(8,"----- Avatar's Favor Mode ON -----")
                end
            end
        end
        -- Handles executing blood pacts in a generic, avatar-agnostic way.
        -- //gs c pact [pacttype]
        elseif commandArgs[1]:lower() == 'pact' then
            if not pet.isvalid then
                    windower.add_to_chat(122,'No avatar currently available. Returning to default macro set.')
                    set_macros(1,2)
                return
            end
           
            if not commandArgs[2] then
                windower.add_to_chat(123,'No pact type given.')
                return
            end
           
            local pact = commandArgs[2]:lower()
           
            if not pacts[pact] then
                windower.add_to_chat(123,'Unknown pact type: '..tostring(pact))
                return
            end
           
            if pacts[pact][pet.name] then
                if pact == 'astralflow' and not buffactive['astral flow'] then
                    windower.add_to_chat(122,'Cannot use Astral Flow pacts at this time.')
                    return
                end
           
                -- Leave out target; let Shortcuts auto-determine it.
                send_command('@input /pet "'..pacts[pact][pet.name]..'"')
            else
                windower.add_to_chat(122,pet.name..' does not have a pact of type ['..pact..'].')
            end    
        end
    end
 
-- Required variables and their initial value
meleeing = false
autobp = false
favor = false
mode = "perp"
Offline
By Aeyela 2015-10-05 06:10:01
Link | Quote | Reply
 
See this bit on lines 989 - 992?
Code
        end
        -- Handles executing blood pacts in a generic, avatar-agnostic way.
        -- //gs c pact [pacttype]
        elseif commandArgs[1]:lower() == 'pact' then


You need to remove the first line: end.
 Hades.Ramorakomo
Offline
Server: Hades
Game: FFXI
Posts: 11
By Hades.Ramorakomo 2015-10-05 06:51:34
Link | Quote | Reply
 
I love you! If I could give you a hug I would...
Offline
Posts: 761
By Elizabet 2015-10-05 07:00:03
Link | Quote | Reply
 
Now that I am home... Here's my whole setup, based on Aeyela's for reference:

Features:
All the nifty things in the OP.
Includes all the bug fixes found in the thread previously.
Keybind and support for cycling through avatar modes with 1 key.
Keybind for toggling autoBP
Keybind for toggling melee weapon lock
Avatar-agnostic Blood Pacts handling. (need the shortcuts add-on)

https://github.com/Tunaliz/Liz_Gearswaps
[+]
 
Offline
Posts:
By 2015-10-07 07:47:39
 Undelete | Edit  | Link | Quote | Reply
 
Post deleted by User.
Offline
By Aeyela 2015-10-07 08:00:53
Link | Quote | Reply
 
Are you using showswaps to check what's being swapped in and out? If you're just watching your equipment you won't see it equip any precasts.

You're using an ENF reference in your precast but there's no ENF in my original post. If this is something you've added yourself make sure you're not copying something from another file that requires an include.
 
Offline
Posts:
By 2015-10-07 08:03:29
 Undelete | Edit  | Link | Quote | Reply
 
Post deleted by User.
Offline
By Aeyela 2015-10-07 08:05:07
Link | Quote | Reply
 
Jdove said: »
no but if I rest and type a spell out like /ma "reraise" it will equip midcast and not precast I also tested the casting time and recast with the lua on and off and it was the same also sorry bout that long post I didn't know how to hide it


Put gs showswaps into the console and cast a few spells and see if your log tells you precast is being equipped. You won't notice it being equipped watching equipment for any spells.
 
Offline
Posts:
By 2015-10-07 08:06:15
 Undelete | Edit  | Link | Quote | Reply
 
Post deleted by User.
 
Offline
Posts:
By 2015-10-09 00:13:29
 Undelete | Edit  | Link | Quote | Reply
 
Post deleted by User.
 Bismarck.Mithriditus
Offline
Server: Bismarck
Game: FFXI
Posts: 1
By Bismarck.Mithriditus 2015-10-09 19:33:02
Link | Quote | Reply
 
Aeyela,

Thank you so much for this. I have been working to use Gearswap for the last few weeks to no avail. The lua most use was a bit overwhelming as I do not write code. Even not knowing the code I was able to understand your blank and explanations in your lua blank. I input my gear and presto! I am a gearswap user.

I LOVE playing Summoner. I have been playing FFXI off and on due to RL since day 3 of NA launch and only started playing SMN in last few months. But it was a bit intimidating everyone running around end game, done with missions, having large LS to group up and do gear farming. This is the first thing to make me feel like ***is getting accomplished. Now that this is done I can begin to farm Job Points and better equipment! THANKS!!!
Offline
Posts: 512
By Zubis 2015-10-09 21:06:05
Link | Quote | Reply
 
Aeyela, Elizabet, I recommend you put your file on Github so you can easily update it and people can see when it updates.
Offline
Posts: 761
By Elizabet 2015-10-09 22:58:08
Link | Quote | Reply
 
Zubis said: »
Aeyela, Elizabet, I recommend you put your file on Github so you can easily update it and people can see when it updates.

https://github.com/Tunaliz/Liz_Gearswaps

Done.

Also fixed a few bugs:

* Properly returning to idle set after resting
* midcast casting sets correctly working.
* Siphon set now correctly working
Offline
Posts: 117
By Cleric 2015-10-14 09:09:35
Link | Quote | Reply
 

This gearswap's siphon build doesn't work. I haven't checked yet, but in the lower part of the lua, it equips sets.midcast.siphon, and in the upper part, the gearset is sets.precast.siphon.

Also, when going from resting to non-resting, equipment doesn't change
Offline
By Aeyela 2015-10-14 09:15:06
Link | Quote | Reply
 
Cleric said: »
This gearswap's siphon build doesn't work. I haven't checked yet, but in the lower part of the lua, it equips sets.midcast.siphon, and in the upper part, the gearset is sets.precast.siphon.

Good spot. That was fixed when somebody initially pointed out, must've re-copied from an older copy with a later change. Fixed.

Cleric said: »
Also, when going from resting to non-resting, equipment doesn't change

That's because there's nothing in status change to change equipment. An oversight on my part as I don't rest very often, if at all, on Summoner. You can add this easily enough by changing the status change function to this:
Code
function status_change(new,old)
    if new == 'Engaged' then
	
		-- If we engage check our meleeing status
		idle(pet)
		
	elseif new=='Resting' then
	
		-- We're resting
        equip(sets.me.resting)
	else
		idle(pet)
	end

end


I've updated the OP with those changes, cheers.
 Siren.Noxzema
Offline
Server: Siren
Game: FFXI
user: Noxzema
Posts: 228
By Siren.Noxzema 2015-10-14 22:54:38
Link | Quote | Reply
 
Here's a couple more functions (can't remember where I got em, was on one of my older smn luas, so credit where it's due)

Looks at the moon %, and tells you the effects of affected wards

Under your idle(pet) line in function pet_aftercast (spell)

Then this one is smaller, and will equip your Sacrifice Torque whenever you get slept:

Also one more thing, personally I like having 2 Favor sets, one with 512 + Beck. Horn with pet PDT/Refresh/Perp etc gear, and one with 575 + horn.
This makes a new avatar mode for the 512 set, then the actual Favor toggle puts on my max Favor set.

So I made a new set with sets.avatar.favor.max, and changed the function to
Code
    if favor then
     
        -- Avatar's favor takes priority!
        equip(sets.avatar.favor.max)

and added
Code
			   mode = 'favor'
			   savedMode = 'favor'
			elseif savedMode == 'favor' then
between the elseif savedMode == 'acc' then, and mode = 'perp'.
[+]
 Siren.Noxzema
Offline
Server: Siren
Game: FFXI
user: Noxzema
Posts: 228
By Siren.Noxzema 2015-10-18 11:47:00
Link | Quote | Reply
 
I just downloaded the Github version, and I noticed you have
Code
pacts.buffspecial = {['Ifrit']=' <staff_and_grip Howl',

I haven't done any testing yet, so maybe it still works for some reason, it just caught my eye.
Offline
Posts: 761
By Elizabet 2015-10-18 13:33:23
Link | Quote | Reply
 
Yeah, that's supposed to be inferno howl. Gonna fix that! Fortunately, it'll only make the gs function return nothing for buff special for ifrit (which should be inferno howl)

Thanks!

EdiT: Github updated.
 Bahamut.Seekerstar
Offline
Server: Bahamut
Game: FFXI
Posts: 879
By Bahamut.Seekerstar 2015-10-18 13:36:53
Link | Quote | Reply
 
Does anyone know what I'd have to do in order to add custom timers to this?

Also,that sacrifice torque one is gold.
 Ragnarok.Bepe
Offline
Server: Ragnarok
Game: FFXI
Posts: 201
By Ragnarok.Bepe 2015-10-20 16:51:08
Link | Quote | Reply
 
Took me a little bit to figure out what was going on, but your set_combine are not working correctly. At least on the version i copied and pasted from the git. You can brute force it by putting the full gear set in each method that as set_combine which is what i ended up doing. Something must be slightly off with the syntax because it is not merging the 2 sets used as arguements and only using the set that is type in said method. If you want to test this, turn on gs showswaps and take everything out of sets.precast.stoneskin and sets.precast.enhancing. Now put an item in sets.precast.enhancing and cast stoneskin, the item will not swap. Now if you move said item to sets.precast.stoneskin it will swap. However sets.precast.stoneskin combines with set.precast.enhancing so it should swap either way. Is anyone else having said error?
 Quetzalcoatl.Frodnon
Offline
Server: Quetzalcoatl
Game: FFXI
Posts: 31
By Quetzalcoatl.Frodnon 2015-10-20 18:41:44
Link | Quote | Reply
 
About the only thing I'd add at this point is a way to block Sacrifice torque if you're weakened or below a threshold of HP. Already more than once I've killed myself because i was weakened and putting on apogee puts me at 1 HP and sac torque immediately kills me.
 Ragnarok.Orlind
Offline
Server: Ragnarok
Game: FFXI
user: Orlind
Posts: 303
By Ragnarok.Orlind 2015-10-20 18:53:21
Link | Quote | Reply
 
Ignore me if I'm out of line but can we still call the resulting lua a "barebones" file anymore? =D

I mean besides the fact that spaces are being left for people to easily add their gear...
 Siren.Noxzema
Offline
Server: Siren
Game: FFXI
user: Noxzema
Posts: 228
By Siren.Noxzema 2015-10-20 20:45:32
Link | Quote | Reply
 
Quetzalcoatl.Frodnon said: »
About the only thing I'd add at this point is a way to block Sacrifice torque if you're weakened or below a threshold of HP. Already more than once I've killed myself because i was weakened and putting on apogee puts me at 1 HP and sac torque immediately kills me.

Didn't even think about being back to 1 HP weakness again lol, not 100% sure but I think this would work? Not sure what would be the easiest way to test it, prob Diorama/Ballista?
Code
function job_buff_change(buff, gain)
    if state.Buff[buff] ~= nil then
        handle_equipping_gear(player.status)
    elseif storms:contains(buff) then
        handle_equipping_gear(player.status)
    end
    if buff == 'sleep' and player.hp > 250 and pet.isvalid then
        if gain then
            equip({neck="Sacrifice Torque"})
            disable('neck')
        else
            enable('neck')
            handle_equipping_gear(player.status)
        end
    end
end
Offline
Posts: 761
By Elizabet 2015-10-21 05:00:09
Link | Quote | Reply
 
Ragnarok.Bepe said: »
Took me a little bit to figure out what was going on, but your set_combine are not working correctly. At least on the version i copied and pasted from the git. You can brute force it by putting the full gear set in each method that as set_combine which is what i ended up doing. Something must be slightly off with the syntax because it is not merging the 2 sets used as arguements and only using the set that is type in said method. If you want to test this, turn on gs showswaps and take everything out of sets.precast.stoneskin and sets.precast.enhancing. Now put an item in sets.precast.enhancing and cast stoneskin, the item will not swap. Now if you move said item to sets.precast.stoneskin it will swap. However sets.precast.stoneskin combines with set.precast.enhancing so it should swap either way. Is anyone else having said error?

When you type in chat this: //gs equip sets.precast.stoneskin

Do you end up with the correct set? I'm not getting your error, mine combines correctly.

Did you forget a ")" after the set? The syntax is :
Code
yourset2 = set_combine(yourset1,{your gear})
 Ragnarok.Bepe
Offline
Server: Ragnarok
Game: FFXI
Posts: 201
By Ragnarok.Bepe 2015-10-21 18:48:10
Link | Quote | Reply
 
Nothing appears if the items are in the combined set and not the original set actually being called from the SMN.lua file. I'm pretty sure the syntax is right as I was looking at that thoroughly since i thought that might be the error. Perhaps I need to include a ilbrary for set_combine to work? I won't be on the game tonight so I can't do //gs equip.
 Sylph.Mozhat
Offline
Server: Sylph
Game: FFXI
user: Mozhat
Posts: 58
By Sylph.Mozhat 2015-10-23 10:19:29
Link | Quote | Reply
 
Siren.Noxzema said: »
Quetzalcoatl.Frodnon said: »
About the only thing I'd add at this point is a way to block Sacrifice torque if you're weakened or below a threshold of HP. Already more than once I've killed myself because i was weakened and putting on apogee puts me at 1 HP and sac torque immediately kills me.

Didn't even think about being back to 1 HP weakness again lol, not 100% sure but I think this would work? Not sure what would be the easiest way to test it, prob Diorama/Ballista?
Code
function job_buff_change(buff, gain)
    if state.Buff[buff] ~= nil then
        handle_equipping_gear(player.status)
    elseif storms:contains(buff) then
        handle_equipping_gear(player.status)
    end
    if buff == 'sleep' and player.hp > 250 and pet.isvalid then
        if gain then
            equip({neck="Sacrifice Torque"})
            disable('neck')
        else
            enable('neck')
            handle_equipping_gear(player.status)
        end
    end
end
Where would you put this at on the lua script?
There is no function job_buff_change(buff, gain) on SMN_Lua.

I for one love this command. So many times it has helped me to wake up and heal who ever needs it.

I'm still using Kinematics lua atm. Checking all options out.
 Siren.Noxzema
Offline
Server: Siren
Game: FFXI
user: Noxzema
Posts: 228
By Siren.Noxzema 2015-10-23 18:32:27
Link | Quote | Reply
 
I'm not sure if it matters too much, but I have it right before the function self_command(command) line.

Edit: Actually now I'm not 100% sure that it's working, and I can't reserve the Isle until 10 PST because of the official matches that no one does... I'll test as soon as I can, unless someone beats me to it.

Edit #2: Well it does work, guess something happened earlier to take priority that made me think otherwise. But I found out that the "player.hp > 200" doesn't...
 Asura.Keja
Offline
Server: Asura
Game: FFXI
user: Cleric
Posts: 50
By Asura.Keja 2015-11-02 22:57:53
Link | Quote | Reply
 
Hello,

Question for you all! Is there a way to check avatar's TP before firing off a BP? The reason why I ask is... Enticer's Pants vs Apogee Pants path A for magical BPs.. I've found that, since I've fully merited Shiva's BP, she's typically at/over TP bonus cap and I'm still BPing in Enticer's, where Apogee A would surely do more damage.

Also, what would the snippet be for Asteria Mitts +1 on Carbuncle's blood pacts?
Log in to post.