Gearswap Support Thread

Language: JP EN DE FR
2010-09-08
New Items
users online
Forum » Windower » Support » Gearswap Support Thread
Gearswap Support Thread
First Page 2 3 ... 174 175 176 ... 182 183 184
 Cerberus.Shadowmeld
Offline
Server: Cerberus
Game: FFXI
Posts: 1786
By Cerberus.Shadowmeld 2023-01-31 10:50:29
Link | Quote | Reply
 
Asura.Sechs said: »
That's exactly what I was lookin for. Thanks Shadow!

My only concern is about precast/midcast.
Given how item usage is not instant like JA but it takes like 1-2 seconds, maybe I should put that logic into my midcast function and not precast? Since I don't need to swap gear before the item usage command is sent to the server, but I need to make sure those specific sets are equipped while the item usage action is being performed.

Anybody experienced anything in this regard?

I’ve always had better luck just doing it on precast for faster items
Offline
Posts: 464
By drakefs 2023-02-01 11:01:22
Link | Quote | Reply
 
quelthos said: »
in reference to attached thread

https://www.ffxiah.com/forum/topic/47673/gearswap-custom-commands-for-nuking/

What libs file do I need or edit to make the below nuking command/macro work?

/console gs c nuke #

The logic for those commands are in the globals.lua found at https://github.com/nazarielle/GearSwap/blob/master/Tilanna-Globals.lua You can either add the relevant code to your globals.lua or add it directly to your job.lua.

I also use nuke commands in my RDM.lua with logic to downgrade the spell a tier the spell is on cooldown.
Offline
Posts: 464
By drakefs 2023-02-01 11:14:36
Link | Quote | Reply
 
Asura.Sechs said: »
My only concern is about precast/midcast.

Cerberus.Shadowmeld said: »
I’ve always had better luck just doing it on precast for faster items

Put it in both precast and midcast. This will make sure it is equipped in time and for the duration of the item use.

Asura.Sechs said: »
I'm tryin to equip a holy-water enhancing set when using Holy Waters, then go back to my set once the action is complete.

I see, most luas do this by checking for the doom (de)buff, which has the added benefit of working when others cast cursna on the character. Though I understand why this could be dangerous.

Asura.Sechs said: »
What is the windower discord?

https://discord.gg/Yqw4fs5q
[+]
Offline
Posts: 40
By quelthos 2023-02-04 21:05:36
Link | Quote | Reply
 
figured out how to combine helixes and storms with the element toggle, posting the whole lua here for anyone that needs

I know some will disagree but for lot of people this means only 3 macro buttons needed for nukes/helixes/storms. Saves tons of space

-single element toggle that
1. toggles nuke elements
2. toggles helix elements
3. toggles storm elements
Built in T5-T1 nukes auto downgrade

-Casting macro
/console gs c nuke 5
/console gs c helix
/console gs c storm
Code
-- Original: Motenten / Modified: Arislan

-------------------------------------------------------------------------------------------------------------------
--  Keybinds
-------------------------------------------------------------------------------------------------------------------

--  Modes:      [ F10 ]             Emergency -PDT Mode
--              [ ALT+F10 ]         Toggle Kiting Mode
--              [ F11 ]             Emergency -MDT Mode
--              [ CTRL+F11 ]        Cycle Casting Modes
--              [ F12 ]             Update Current Gear / Report Current Status
--              [ CTRL+F12 ]        Cycle Idle Modes
--              [ ALT+F12 ]         Cancel Emergency -PDT/-MDT Mode
--              [ ALT+` ]           Toggle Magic Burst Mode
--              [ WIN+C ]           Toggle Capacity Points Mode
--              [ WIN+H ]           Cycle Helix Mode
--              [ WIN+R ]           Cycle Regen Mode
--              [ WIN+S ]           Toggle Storm Surge
--
--  Abilities:  [ CTRL+` ]          Immanence
--              [ CTRL+- ]          Light Arts/Addendum: White
--              [ CTRL+= ]          Dark Arts/Addendum: Black
--              [ CTRL+[ ]          Rapture/Ebullience
--              [ CTRL+] ]          Altruism/Focalization
--              [ CTRL+; ]          Celerity/Alacrity
--              [ ALT+[ ]           Accesion/Manifestation
--              [ ALT+] ]           Perpetuance
--              [ ALT+; ]           Penury/Parsimony
--
--  Weapons:    [ CTRL+W ]          Toggles Weapon Lock
--
--  WS:         [ CTRL+Numpad0 ]    Myrkr
--
--
--              (Global-Binds.lua contains additional non-job-related keybinds)


-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job.  Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------

--              Addendum Commands:
--              Shorthand versions for each strategem type that uses the version appropriate for
--              the current Arts.
--                                          Light Arts                    Dark Arts
--                                          ----------                  ---------
--                gs c scholar light          Light Arts/Addendum
--              gs c scholar dark                                       Dark Arts/Addendum
--              gs c scholar cost           Penury                      Parsimony
--              gs c scholar speed          Celerity                    Alacrity
--              gs c scholar aoe            Accession                   Manifestation
--              gs c scholar power          Rapture                     Ebullience
--              gs c scholar duration       Perpetuance
--              gs c scholar accuracy       Altruism                    Focalization
--              gs c scholar enmity         Tranquility                 Equanimity
--              gs c scholar skillchain                                 Immanence
--              gs c scholar addendum       Addendum: White             Addendum: Black


-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job.  Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------

-- Initialization function for this job file.
function get_sets()
    mote_include_version = 2

    -- Load and initialize the include file.
    include('Mote-Include.lua')
end

-- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
function job_setup()
    info.addendumNukes = S{"Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV",
        "Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"}

    state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
    state.HelixMode = M{['description']='Helix Mode', 'Potency', 'Duration'}
    state.RegenMode = M{['description']='Regen Mode', 'Duration', 'Potency'}
    -- state.CP = M(false, "Capacity Points Mode")

    update_active_strategems()

    no_swap_gear = S{"Warp Ring", "Dim. Ring (Dem)", "Dim. Ring (Holla)", "Dim. Ring (Mea)",
              "Trizek Ring", "Echad Ring", "Facility Ring", "Capacity Ring"}

	nukes = {}
    nukes.t1 = {['Stone']="Stone",      ['Water']="Water",      ['Aero']="Aero",     ['Fire']="Fire",    ['Blizzard']="Blizzard",     ['Thunder']="Thunder", ['Dark']="Blizzard", ['Light']="Thunder"}
    nukes.t2 = {['Stone']="Stone II",   ['Water']="Water II",   ['Aero']="Aero II",  ['Fire']="Fire II", ['Blizzard']="Blizzard II",  ['Thunder']="Thunder II", ['Dark']="Blizzard II", ['Light']="Thunder II"}
    nukes.t3 = {['Stone']="Stone III",  ['Water']="Water III",  ['Aero']="Aero III", ['Fire']="Fire III",['Blizzard']="Blizzard III", ['Thunder']="Thunder III", ['Dark']="Blizzard III", ['Light']="Thunder III"}
    nukes.t4 = {['Stone']="Stone IV",   ['Water']="Water IV",   ['Aero']="Aero IV",  ['Fire']="Fire IV", ['Blizzard']="Blizzard IV",  ['Thunder']="Thunder IV", ['Dark']="Blizzard IV", ['Light']="Thunder IV"}
    nukes.t5 = {['Stone']="Stone V",    ['Water']="Water V",    ['Aero']="Aero V",   ['Fire']="Fire V",  ['Blizzard']="Blizzard V",   ['Thunder']="Thunder V", ['Dark']="Blizzard V", ['Light']="Thunder V"}

    helix = {['Stone']="Geohelix II",['Water']="Hydrohelix II",['Aero']="Anemohelix II",['Fire']="Pyrohelix II",['Blizzard']="Cryohelix II",['Thunder']="Ionohelix II", ['Dark']="Noctohelix II", ['Light']="Luminohelix II"}

    storm = {['Stone']="Sandstorm II",['Water']="Rainstorm II",['Aero']="Windstorm II",['Fire']="Firestorm II",['Blizzard']="Hailstorm II",['Thunder']="Thunderstorm II", ['Dark']="Voidstorm II", ['Light']="Aurorastorm II"}
    
	state.NukeElement = M{['description'] = 'Nuke Element'}
    state.NukeTier = M{['description'] = 'Nuke Tier'}


end

-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------

-- Setup vars that are user-dependent.  Can override this function in a sidecar file.
function user_setup()
    state.OffenseMode:options('Normal')
    state.CastingMode:options('Normal', 'Resistant')
    state.IdleMode:options('Normal')
    state.WeaponSet = M{['description']='Weapon Set', 'Daybreak'}
    state.WeaponLock = M(false, 'Weapon Lock')
    state.MagicBurst = M(false, 'Magic Burst')
    state.StormSurge = M(false, 'Stormsurge')

	state.NukeElement:options('Fire', 'Blizzard', 'Aero', 'Thunder', 'Water', 'Light', 'Dark', 'Stone')
    state.NukeTier:options('t1', 't2', 't3', 't4', 't5')
    state.NukeTier:set('t5')
	send_command('bind pageup gs c cycle NukeElement')
    send_command('bind pagedown gs c cycleback NukeElement')
    send_command('bind !pageup gs c cycle NukeTier')
    send_command('bind !pagedown gs c cycleback NukeTier')
	
	
    -- Additional local binds
    --include('Global-Binds.lua') -- OK to remove this line
    --include('Global-GEO-Binds.lua') -- OK to remove this line
    send_command('bind @` input /ja Immanence <me>')
    send_command('bind ^` gs c toggle MagicBurst')
    --send_command('bind !` gs c toggle MagicBurst')
    --send_command('bind ^- gs c scholar light')
    --send_command('bind ^= gs c scholar dark')
    --send_command('bind ^[ gs c scholar power')
    --send_command('bind ^] gs c scholar accuracy')
    --send_command('bind ^; gs c scholar speed')
    --send_command('bind !w input /ma "Aspir II" <t>')
    --send_command('bind !o input /ma "Regen V" <stpc>')
    --send_command('bind ![ gs c scholar aoe')
    --send_command('bind !] gs c scholar duration')
    --send_command('bind !; gs c scholar cost')
    --send_command('bind @c gs c toggle CP')
    --send_command('bind @h gs c cycle HelixMode')
    --send_command('bind @r gs c cycle RegenMode')
    --send_command('bind @s gs c toggle StormSurge')
    send_command('bind @w gs c toggle WeaponLock')

    --send_command('bind ^numpad0 input /Myrkr')

    --include('Global-Binds.lua')

    state.Auto_Kite = M(false, 'Auto_Kite')
    moving = false
end

-- Called when this job file is unloaded (eg: job change)
function user_unload()
    send_command('unbind pageup')
    send_command('unbind pagedown')
    send_command('unbind !pageup')
    send_command('unbind !pagedown')
    send_command('unbind @`')
    send_command('unbind ^`')
    send_command('unbind !`')
    send_command('unbind ^-')
    send_command('unbind ^=')
    send_command('unbind ^[')
    send_command('unbind ^]')
    send_command('unbind ^;')
    send_command('unbind !w')
    send_command('unbind !o')
    send_command('unbind ![')
    send_command('unbind !]')
    send_command('unbind !;')
    send_command('unbind ^,')
    send_command('unbind !.')
    send_command('unbind @c')
    send_command('unbind @h')
    send_command('unbind @g')
    send_command('unbind @s')
    send_command('unbind @w')
    send_command('unbind ^numpad0')

    send_command('unbind #`')
    send_command('unbind #1')
    send_command('unbind #2')
    send_command('unbind #3')
    send_command('unbind #4')
    send_command('unbind #5')
    send_command('unbind #6')
    send_command('unbind #7')
    send_command('unbind #8')
    send_command('unbind #9')
    send_command('unbind #0')
end



-- Define sets and vars used by this job file.
function init_gear_sets()

    ------------------------------------------------------------------------------------------------
    ---------------------------------------- Precast Sets ------------------------------------------
    ------------------------------------------------------------------------------------------------

    -- Precast sets to enhance JAs
    sets.precast.JA['Tabula Rasa'] = {legs="Pedagogy Pants"}
    sets.precast.JA['Enlightenment'] = {body="Peda. Gown +3"}
    sets.precast.JA['Sublimation'] = {
        --head="Acad. Mortar. +3",
        --body="Acad. Gown +3",
        waist="Embla Sash",
        }

    -- Fast cast sets for spells
    sets.precast.FC = {
    --    /RDM --15
		main="Mpaca's Staff",
		sub="Khonsu",
        ammo="Sapience Orb", --2
        head="Amalric Coif +1", --11
        body="Merlinic Jubbah", --13
        hands="Gende. Gages +1", --9
        legs="Agwu's Slops", --8
        feet="Regal Pumps +1", --8
        neck="Baetyl Pendant", --5
        ear1="Malignance Earring", --4
        ear2="Loquacious Earring", --2
        ring1="Kishar Ring", --4
        ring2="Weather. Ring", --5/(3)
        back="Fi Follet Cape +1", --10
        waist="Embla Sash", --5
        }

    sets.precast.FC.Grimoire = {head="Peda. M.Board +3", feet="Acad. Loafers +3"}
    sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
    sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {})

    sets.precast.FC.Cure = set_combine(sets.precast.FC, {
        feet="Kaykaus Boots +1", --7
        ear1="Mendi. Earring", --5
        ring1="Lebeche Ring", --(2)
        })

    sets.precast.FC.Curaga = sets.precast.FC.Cure
    sets.precast.FC.Impact = set_combine(sets.precast.FC, {head=empty, body="Twilight Cloak"})
    sets.precast.FC.Dispelga = set_combine(sets.precast.FC, {main="Daybreak", sub="Ammurapi Shield"})
    --sets.precast.Storm = set_combine(sets.precast.FC, {ring2={name="Stikini Ring +1", bag="wardrobe3"},})


    ------------------------------------------------------------------------------------------------
    ------------------------------------- Weapon Skill Sets ----------------------------------------
    ------------------------------------------------------------------------------------------------

    sets.precast.WS = {
        ammo="Oshasha's Treatise",
		head="Nyame Helm",
		body="Nyame Mail",
		hands="Nyame Gauntlets",
		legs="Nyame Flanchard",
		feet="Nyame Sollerets",
		neck="Rep. Plat. Medal",
        ear1="Moonshade Earring",
        ear2="Ishvara Earring",
        ring1="Epaminondas's Ring",
        ring2="Metamor. Ring +1",
        back="Mecisto. Mantle",
        waist="Grunfeld Rope",
        }
		
	sets.precast.WS['Cataclysm'] = {
    ammo="Pemphredo Tathlum",
    head="Pixie Hairpin +1",
    body="Nyame Mail",
    hands="Nyame Gauntlets",
    legs="Nyame Flanchard",
    feet="Nyame Sollerets",
    neck="Sibyl Scarf",
    waist="Orpheus's Sash",
    left_ear="Moonshade Earring",
    right_ear="Regal Earring",
    ring1="Epaminondas's Ring",
    ring2="Archon Ring",
    back="Izdubar Mantle",
	}
	
    sets.precast.WS['Omniscience'] = set_combine(sets.precast.WS, {
        ammo="Ghastly Tathlum +1",
        head="Pixie Hairpin +1",
        body="Peda. Gown +3",
        legs="Peda. Pants +3",
        feet="Merlinic Crackows",
        ear1="Malignance Earring",
        ear2="Regal Earring",
        ring2="Archon Ring",
        back=gear.SCH_MAB_Cape,
        waist="Sacro Cord",
        })


    sets.precast.WS['Myrkr'] = {
        ammo="Ghastly Tathlum +1",
        head="Pixie Hairpin +1",
        body="Amalric Doublet +1",
        hands="Kaykaus Cuffs +1",
        legs="Amalric Slops +1",
        feet="Kaykaus Boots +1",
        neck="Orunmila's Torque",
        ear1="Loquacious Earring",
        ear2="Etiolation Earring",
        ring1={name="Fenrir Ring +1", bag="wardrobe3"},
        ring2="Metamor. Ring +1",
        back="Fi Follet Cape +1",
        waist="Shinjutsu-no-Obi +1",
        } -- Max MP


    ------------------------------------------------------------------------------------------------
    ---------------------------------------- Midcast Sets ------------------------------------------
    ------------------------------------------------------------------------------------------------

    sets.midcast.FastRecast = sets.precast.FC

    sets.midcast.Cure = {
		--main="Musa",
		--sub="Khonsu",
    main="Daybreak", --30
    sub="Sors Shield",
    head="Kaykaus Mitra +1",
    body="Kaykaus Bliaut +1",
    hands="Kaykaus Cuffs +1",
    legs="Kaykaus Tights +1",
    feet="Kaykaus Boots +1",
    neck="Incanter's Torque",
    waist="Luminary Sash",
    left_ear="Mendi. Earring",
    right_ear="Meili Earring",
    ring1={name="Stikini Ring +1", bag="wardrobe2"},
    right_ring="Sirona's Ring",
	back="Solemnity Cape",
        }

    sets.midcast.CureWeather = set_combine(sets.midcast.Cure, {
        --main="Chatoyant Staff", --10
        --sub="Khonsu", --0/(-5)
        waist="Hachirin-no-Obi",
        })

    sets.midcast.Curaga = set_combine(sets.midcast.Cure, {
        ring2="Metamor. Ring +1",
        })

    sets.midcast.StatusRemoval = {
		ear1="Magnetic Earring",
		ring1="Mephitas's Ring +1",
        back="Solemnity Cape",
        }

    sets.midcast.Cursna = set_combine(sets.midcast.StatusRemoval, {
		main="Gada",
		head={ name="Vanya Hood", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
  		hands={ name="Vanya Cuffs", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
		feet={ name="Vanya Clogs", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
		neck="Malison Medallion", 
        ear2="Meili Earring",
        ring1="Haoma's Ring",
        ring2="Menelaus's Ring",
        })

    sets.midcast['Enhancing Magic'] = {
		--main="Musa",
		main="Gada",
        sub="Ammurapi Shield",
		--head="Befouled Crown",
		head={ name="Telchine Cap", augments={'Enh. Mag. eff. dur. +10',}},
		body={ name="Telchine Chas.", augments={'Enh. Mag. eff. dur. +9',}},
        hands={ name="Telchine Gloves", augments={'Enh. Mag. eff. dur. +9',}},
		legs={ name="Telchine Braconi", augments={'Enh. Mag. eff. dur. +10',}},
        feet={ name="Telchine Pigaches", augments={'Enh. Mag. eff. dur. +9',}},
        neck="Incanter's Torque",
		left_ear="Andoaa Earring",
		right_ear="Mimir Earring",
        ring1={name="Stikini Ring +1", bag="wardrobe2"},
        ring2={name="Stikini Ring +1", bag="wardrobe3"},
        back="Fi Follet Cape +1",
        waist="Embla Sash",
        }

    sets.midcast.EnhancingDuration = set_combine(sets.midcast['Enhancing Magic'], {
		ear1="Magnetic Earring",
		ring1="Mephitas's Ring +1",
        back="Solemnity Cape",
        })

    sets.midcast.Regen = set_combine(sets.midcast.EnhancingDuration, {
		main="Bolelabunga",
        --main="Musa",
        --sub="Khonsu",
		--head={ name="Telchine Cap", augments={'"Regen" potency+3',}},
		--body={ name="Telchine Chas.", augments={'"Regen" potency+3',}},
		--hands={ name="Telchine Gloves", augments={'"Regen" potency+3',}},
		--legs={ name="Telchine Braconi", augments={'"Regen" potency+3',}},
		--feet={ name="Telchine Pigaches", augments={'"Regen" potency+3',}},
        back="Lugh's Cape",
        })

    sets.midcast.RegenDuration = set_combine(sets.midcast.EnhancingDuration, {
		main="Bolelabunga",
        })

    sets.midcast.Haste = sets.midcast.EnhancingDuration

    sets.midcast.Refresh = set_combine(sets.midcast.EnhancingDuration, {
        head="Amalric Coif +1",
        waist="Gishdubar Sash",
        --back="Grapevine Cape",
        })

    sets.midcast.Stoneskin = set_combine(sets.midcast.EnhancingDuration, {
        neck="Nodens Gorget",
        waist="Siegel Sash",
        })

    sets.midcast.Aquaveil = set_combine(sets.midcast.EnhancingDuration, {
        --main="Vadose Rod",
        sub="Ammurapi Shield",
        head="Amalric Coif +1",
        hands="Regal Cuffs",
        ear2="Magnetic Earring",
        waist="Emphatikos Rope",
        })

    sets.midcast.Storm = sets.midcast.EnhancingDuration

    sets.midcast.Stormsurge = set_combine(sets.midcast.Storm, {feet="Peda. Loafers +3"})

    sets.midcast.Protect = set_combine(sets.midcast.EnhancingDuration, {ring2="Sheltered Ring"})
    sets.midcast.Protectra = sets.midcast.Protect
    sets.midcast.Shell = sets.midcast.Protect
    sets.midcast.Shellra = sets.midcast.Shell

    -- Custom spell classes
    sets.midcast.MndEnfeebles = {
        main="Daybreak",
        sub="Ammurapi Shield",
        ammo="Pemphredo Tathlum",
        head=empty;
        body="Cohort Cloak +1",
        hands="Kaykaus Cuffs +1",
        legs="Arbatel Pants +3",
        feet="Skaoi Boots",
        neck="Incanter's Torque",
        ear1="Malignance Earring",
        ear2="Regal Earring",
        ring1={name="Stikini Ring +1", bag="wardrobe2"},
        ring2={name="Stikini Ring +1", bag="wardrobe3"},
        back="Aurist's Cape +1",
        waist="Acuity Belt +1",
        }

    sets.midcast.IntEnfeebles = set_combine(sets.midcast.MndEnfeebles, {
        })

    sets.midcast.ElementalEnfeeble = sets.midcast.IntEnfeebles
    sets.midcast.Dispelga = set_combine(sets.midcast.IntEnfeebles, {main="Daybreak", sub="Ammurapi Shield"})

    -- Elemental Magic
    sets.midcast['Elemental Magic'] = {
        main="Bunzi's Rod", 
        sub="Ammurapi Shield",
        ammo="Pemphredo Tathlum",
        head="Arbatel Bonnet +3",
        body="Arbatel Gown +3",
        hands="Arbatel Bracers +3",
        legs="Arbatel Pants +3",
        feet="Arbatel Loafers +3",
        neck="Argute Stole +2",
        ear1="Malignance Earring",
        ear2="Regal Earring",
        ring1="Freke Ring",
        ring2="Metamor. Ring +1",
		back={ name="Lugh's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Mag.Atk.Bns."+10','Damage taken-5%',}},
        waist="Acuity Belt +1",
        }

    sets.midcast['Elemental Magic'].Resistant = set_combine(sets.midcast['Elemental Magic'], {
        waist="Acuity Belt +1",
		back="Aurist's Cape +1",
        })

    sets.midcast.Impact = set_combine(sets.midcast['Elemental Magic'].Resistant, {
        head=empty,
		body="Twilight Cloak",
        })

    sets.midcast.Helix = set_combine(sets.midcast['Elemental Magic'], {
        })

    sets.midcast.DarkHelix = set_combine(sets.midcast.Helix, {
        head="Pixie Hairpin +1",
        ring1="Archon Ring",
        })

    sets.midcast.LightHelix = set_combine(sets.midcast.Helix, {
        main="Daybreak",
        sub="Ammurapi Shield",
        ring1="Weather. Ring"
        })
		
		sets.magic_burst = {
		--bunzi rod / jse neck --20
		--head="Agwu's Cap",
		--body="Agwu's Robe", 
        --hands="Agwu's Gages",
        --legs="Agwu's Slops",
		--feet="Agwu's Pigaches",
		head="Peda. M.Board +3",        
        body="Arbatel Gown +3",
        hands="Arbatel Bracers +3", --15
        legs="Arbatel Pants +3",
        feet="Arbatel Loafers +3",
        ring1="Mujin Band", 
		ring2="Locus Ring", --5
        }
		sets.magic_burst.Resistant	= set_combine(sets.magic_burst, {
        waist="Acuity Belt +1",
		back="Aurist's Cape +1",
		})
		
    sets.midcast['Elemental Magic'].Seidr = set_combine(sets.midcast['Elemental Magic'], {
        })


    sets.midcast['Dark Magic'] = set_combine(sets.midcast.MndEnfeebles, {
        main="Rubicundity",
        sub="Ammurapi Shield",
        ammo="Pemphredo Tathlum",
        --head="Acad. Mortar. +3",
        --body="Acad. Gown +3",
        --hands="Acad. Bracers +3",
        --legs="Peda. Pants +3",
        --feet="Acad. Loafers +3",
        --neck="Argute Stole +2",
        --ear1="Malignance Earring",
		neck="Erra Pendant",
        ear2="Mani Earring",
		ring1={name="Stikini Ring +1", bag="wardrobe2"},
		ring2={name="Stikini Ring +1", bag="wardrobe3"},
        back="Aurist's Cape +1",
        waist="Acuity Belt +1",
        })

    sets.midcast.Kaustra = set_combine(sets.midcast.DarkHelix, {
        --main="Akademos", --10
        --sub="Enki Strap",
        --ammo="Ghastly Tathlum +1",
        --head="Pixie Hairpin +1",
        --body=gear.Merl_MB_body, --10
        --hands="Amalric Gages +1", --(5)
        --legs="Mallquis Trews +2", --6
        --feet="Merlinic Crackows", --11
        --neck="Argute Stole +2", --10
        --ear1="Malignance Earring",
        --ear2="Regal Earring",
        --ring1="Freke Ring",
        --ring2="Archon Ring",
        --back="Aurist's Cape +1",
        --waist="Acuity Belt +1",
        })

    sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {
        main="Rubicundity",
        head="Pixie Hairpin +1",
		neck="Erra Pendant",
        ring1="Evanescence Ring",
        ring2="Archon Ring",
        waist="Fucho-no-obi",
		feet="Agwu's Pigaches",
        })

    sets.midcast.Aspir = sets.midcast.Drain

    sets.midcast.Stun = set_combine(sets.midcast['Dark Magic'], {
        })


    ------------------------------------------------------------------------------------------------
    ----------------------------------------- Idle Sets --------------------------------------------
    ------------------------------------------------------------------------------------------------

    sets.idle = {
        main="Mpaca's Staff",
        sub="Khonsu",
        ammo="Homiliary",
        head="Nyame Helm",
		body="Arbatel Gown +3",
		hands="Nyame Gauntlets",
		legs="Agwu's Slops",
		feet="Nyame Sollerets",
        neck="Elite Royal Collar",
        ear1="Etiolation Earring",
        ear2="Lugalbanda Earring",
		ring1={name="Stikini Ring +1", bag="wardrobe2"},
		ring2={name="Stikini Ring +1", bag="wardrobe3"},
		back={ name="Lugh's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Mag.Atk.Bns."+10','Damage taken-5%',}},
		waist="Fucho-no-Obi",
        }

    sets.idle.Town = set_combine(sets.idle, {
        })

    sets.resting = set_combine(sets.idle, {
        })

    ------------------------------------------------------------------------------------------------
    ---------------------------------------- Defense Sets ------------------------------------------
    ------------------------------------------------------------------------------------------------

    sets.defense.PDT = sets.idle.DT
    sets.defense.MDT = sets.idle.DT
    sets.Kiting = {feet="Herald's Gaiters"}
    sets.latent_refresh = {waist="Fucho-no-obi"}

    ------------------------------------------------------------------------------------------------
    ---------------------------------------- Engaged Sets ------------------------------------------
    ------------------------------------------------------------------------------------------------

    sets.engaged = {
		--ammo="",
        head="Nyame Helm",
		body="Nyame Mail",
		hands="Nyame Gauntlets",
		legs="Jhakri Slops +2",
		feet="Nyame Sollerets",
        neck="Combatant's Torque",
        ear1="Cessance Earring",
        ear2="Telos Earring",
		left_ring={name="Chirich Ring +1", bag="wardrobe2"},
		right_ring={name="Chirich Ring +1", bag="wardrobe3"},
        back="Mecisto. Mantle",
        waist="Grunfeld Rope",
        }

    ------------------------------------------------------------------------------------------------
    ---------------------------------------- Special Sets ------------------------------------------
    ------------------------------------------------------------------------------------------------

    sets.buff['Ebullience'] = {head="Arbatel Bonnet +3"}
    sets.buff['Rapture'] = {head="Arbatel Bonnet +3"}
    sets.buff['Perpetuance'] = {hands="Arbatel Bracers +3"}
    sets.buff['Immanence'] = {hands="Arbatel Bracers +3", "Lugh's Cape"}
    sets.buff['Penury'] = {legs="Arbatel Pants +3"}
    sets.buff['Parsimony'] = {legs="Arbatel Pants +3"}
    sets.buff['Celerity'] = {feet="Peda. Loafers +3"}
    sets.buff['Alacrity'] = {feet="Peda. Loafers +3"}
    sets.buff['Klimaform'] = {feet="Arbatel Loafers +3"}
    --sets.buff['Altruism'] = {feet="Peda. M.Board +3"}
    --sets.buff['Focalization'] = {feet="Peda. M.Board +3"}

    sets.buff.FullSublimation = {
       --head="Acad. Mortar. +3", --4
       --body="Peda. Gown +3", --5
       --ear1="Savant's Earring", --1
       waist="Embla Sash", --5
       }

    sets.buff.Doom = {
        neck="Nicander's Necklace", --20
        ring1={name="Eshmun's Ring", bag="wardrobe3"}, --20
        ring2={name="Eshmun's Ring", bag="wardrobe4"}, --20
        waist="Gishdubar Sash", --10
        }

    sets.LightArts = {legs="Acad. Pants +3", feet="Acad. Loafers +3"}
    sets.DarkArts = {body="Acad. Gown +3", feet="Acad. Loafers +3"}
	sets.daybreak = {main="Daybreak"}
    sets.Obi = {waist="Hachirin-no-Obi"}
    sets.Bookworm = {back="Bookworm's Cape"}
    -- sets.CP = {back="Mecisto. Mantle"}

end

-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------


function job_post_precast(spell, action, spellMap, eventArgs)
	local spell_recasts = windower.ffxi.get_spell_recasts()
    local element = state.NukeElement.value
	if spell.name:match(nukes.t1[element]) and spell_recasts[spell.recast_id] > 0 then
        cancel_spell()
        downgradenuke(spell)
        add_to_chat(8, '****** ['..spell.name..' CANCELED - Spell on Cooldown, Downgrading spell] ******')
        return
    end
    if (spell.type == "WhiteMagic" and (buffactive["Light Arts"] or buffactive["Addendum: White"])) or
        (spell.type == "BlackMagic" and (buffactive["Dark Arts"] or buffactive["Addendum: Black"])) then
        equip(sets.precast.FC.Grimoire)
    elseif spell.name == 'Impact' then
        equip(sets.precast.FC.Impact)
    end	
end

function downgradenuke(spell)

    local element = state.NukeElement.value

    if spell.name:match(nukes.t1[element]) then   
        if spell.name == nukes.t5[element] then
            newspell = nukes.t4[element]
        elseif spell.name == nukes.t4[element] then
            newspell = nukes.t3[element]
        elseif spell.name == nukes.t3[element] then
            newspell = nukes.t2[element]
        elseif spell.name == nukes.t2[element] then
            newspell = nukes.t1[element]
        end
        send_command('@input /ma "'..newspell..'" <t>')
    end
end

function job_self_command(cmdParams, eventArgs)
    if cmdParams[1]:lower() == 'scholar' then
        handle_strategems(cmdParams)
        eventArgs.handled = true
    elseif cmdParams[1]:lower() == 'nuke' then
        handle_nuking(cmdParams)
        eventArgs.handled = true
    elseif cmdParams[1]:lower() == 'helix' then
        handle_nuking(cmdParams)
        eventArgs.handled = true
    end
    if cmdParams[1]:lower() == 'storm' then
        handle_storm(cmdParams)
        eventArgs.handled = true
	end
end

function handle_nuking(cmdParams)
	if cmdParams[1] == "nuke" then
    send_command('@input /ma "'..nukes[state.NukeTier.value][state.NukeElement.value]..'" <t>')
	elseif cmdParams[1] == "helix" then
    send_command('@input /ma "'..helix[state.NukeElement.value]..'" <t>')
	end
end

function handle_storm(cmdParams, spell, action, spellMap, eventArgs)
	if cmdParams[1] == "storm" then
    send_command('@input /ma "'..storm[state.NukeElement.value]..'" <t>')
	end
end

-- Run after the general midcast() is done.
function job_post_midcast(spell, action, spellMap, eventArgs)
    if spell.skill == 'Elemental Magic' then
        if spellMap == "Helix" then
            equip(sets.midcast['Elemental Magic'])
            if spell.english:startswith('Lumino') then
                equip(sets.midcast.LightHelix)
            elseif spell.english:startswith('Nocto') then
                equip(sets.midcast.DarkHelix)
            else
                equip(sets.midcast.Helix)
            end
            if state.HelixMode.value == 'Duration' then
                equip(sets.Bookworm)
            end
        end
        if buffactive['Klimaform'] and spell.element == world.weather_element then
            equip(sets.buff['Klimaform'])
        end
    end
    if spell.action_type == 'Magic' then
        apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
    end
    if spell.skill == 'Enfeebling Magic' then
        if spell.type == "WhiteMagic" and (buffactive["Light Arts"] or buffactive["Addendum: White"]) then
            equip(sets.LightArts)
        elseif spell.type == "BlackMagic" and (buffactive["Dark Arts"] or buffactive["Addendum: Black"]) then
            equip(sets.DarkArts)
        end
    end
	if spell.english == "Impact" then
            equip(sets.midcast.Impact)
	end
    if spell.skill == 'Elemental Magic' and spell.english ~= 'Impact'then
        if state.MagicBurst.value and state.CastingMode.value ~= 'Resistant' then
			equip(sets.magic_burst)
		elseif state.MagicBurst.value and state.CastingMode.value == 'Resistant' then
			equip(sets.magic_burst.Resistant)
		end	
		if spell.skill == 'Elemental Magic' or spell.english == "Kaustra" then
			if (spell.element == world.weather_element and (get_weather_intensity() == 2 and spell.element ~= elements.weak_to[world.day_element])) and spellMap ~= 'Helix' then
				equip(sets.Obi)
        -- Target distance under 1.7 yalms.
			elseif spell.target.distance < (1.7 + spell.target.model_size) then
				equip({waist="Orpheus's Sash"})
        -- Matching day and weather.
			elseif (spell.element == world.day_element and spell.element == world.weather_element) and spellMap ~= 'Helix' then
				equip(sets.Obi)
        -- Target distance under 8 yalms.
			elseif spell.target.distance < (8 + spell.target.model_size) then
				equip({waist="Orpheus's Sash"})
        -- Match day or weather.
			elseif (spell.element == world.day_element or spell.element == world.weather_element) and spellMap ~= 'Helix' then
				equip(sets.Obi)
			end
		end 
    end
		
    if spell.skill == 'Enhancing Magic' then
        if classes.NoSkillSpells:contains(spell.english) then
            equip(sets.midcast.EnhancingDuration)
            if spellMap == 'Refresh' then
                equip(sets.midcast.Refresh)
            end
        end
        if spellMap == "Regen" and state.RegenMode.value == 'Duration' then
            equip(sets.midcast.RegenDuration)
        end
        if state.Buff.Perpetuance then
            equip(sets.buff['Perpetuance'])
        end
        if spellMap == "Storm" and state.StormSurge.value then
            equip (sets.midcast.Stormsurge)
        end
    end
end

function check_weaponset()
    equip(sets[state.WeaponSet.current])
end


function job_aftercast(spell, action, spellMap, eventArgs)
    if not spell.interrupted then
        if spell.english == "Sleep II" then
            send_command('@timers c "Sleep II ['..spell.target.name..']" 90 down spells/00259.png')
        elseif spell.english == "Sleep" or spell.english == "Sleepga" then -- Sleep & Sleepga Countdown --
            send_command('@timers c "Sleep ['..spell.target.name..']" 60 down spells/00253.png')
        elseif spell.english == "Break" then
            send_command('@timers c "Break ['..spell.target.name..']" 30 down spells/00255.png')
        end
    end
    if player.status ~= 'Engaged' and state.WeaponLock.value == false then
        check_weaponset()
    end
    if player.status == 'Engaged' and state.WeaponLock.value == false then
        check_weaponset()
    end	
end


-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------

-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
    if buff == "Sublimation: Activated" then
        handle_equipping_gear(player.status)
    end

    if buff == "doom" then
        if gain then
            equip(sets.buff.Doom)
            send_command('@input /p Doomed.')
             disable('ring1','ring2','waist')
        else
            enable('ring1','ring2','waist')
            handle_equipping_gear(player.status)
        end
    end

end

-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
    if state.WeaponLock.value == true then
        disable('main','sub')
    else
        enable('main','sub')
    end
end

-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------

function job_handle_equipping_gear(playerStatus, eventArgs)
    check_rings()
    check_moving()
end

-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
    handle_equipping_gear(player.status)
    update_active_strategems()
    update_sublimation()
end

-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
    if spell.action_type == 'Magic' then
        if default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
            if (world.weather_element == 'Light' or world.day_element == 'Light') then
                return 'CureWeather'
            end
        elseif spell.skill == 'Enfeebling Magic' then
            if spell.type == 'WhiteMagic' then
                return 'MndEnfeebles'
            else
                return 'IntEnfeebles'
            end
        end
    end
end

function customize_idle_set(idleSet)
    if state.Buff['Sublimation: Activated'] then
        idleSet = set_combine(idleSet, sets.buff.FullSublimation)
    end
    if player.mpp < 51 then
        idleSet = set_combine(idleSet, sets.latent_refresh)
    end
    -- if state.CP.current == 'on' then
    --     equip(sets.CP)
    --     disable('back')
    -- else
    --     enable('back')
    -- end
    if state.Auto_Kite.value == true then
       idleSet = set_combine(idleSet, sets.Kiting)
    end

    return idleSet
end

-- Function to display the current relevant user state when doing an update.
-- Return true if display was handled, and you don't want the default info shown.
function display_current_job_state(eventArgs)

    local c_msg = state.CastingMode.value

    local h_msg = state.HelixMode.value

    local r_msg = state.RegenMode.value

    local d_msg = 'None'
    if state.DefenseMode.value ~= 'None' then
        d_msg = state.DefenseMode.value .. state[state.DefenseMode.value .. 'DefenseMode'].value
    end

    local i_msg = state.IdleMode.value

    local msg = ''
    if state.MagicBurst.value then
        msg = ' Burst: On |'
    end
    if state.Kiting.value then
        msg = msg .. ' Kiting: On |'
    end

    add_to_chat(060, '| Magic: ' ..string.char(31,001)..c_msg.. string.char(31,002)..  ' |'
        ..string.char(31,060).. ' Helix: ' ..string.char(31,001)..h_msg.. string.char(31,002)..  ' |'
        ..string.char(31,060).. ' Regen: ' ..string.char(31,001)..r_msg.. string.char(31,002)..  ' |'
        ..string.char(31,004).. ' Defense: ' ..string.char(31,001)..d_msg.. string.char(31,002)..  ' |'
        ..string.char(31,008).. ' Idle: ' ..string.char(31,001)..i_msg.. string.char(31,002)..  ' |'
        ..string.char(31,002)..msg)

    eventArgs.handled = true
end

-- Reset the state vars tracking strategems.
function update_active_strategems()
    state.Buff['Ebullience'] = buffactive['Ebullience'] or false
    state.Buff['Rapture'] = buffactive['Rapture'] or false
    state.Buff['Perpetuance'] = buffactive['Perpetuance'] or false
    state.Buff['Immanence'] = buffactive['Immanence'] or false
    state.Buff['Penury'] = buffactive['Penury'] or false
    state.Buff['Parsimony'] = buffactive['Parsimony'] or false
    state.Buff['Celerity'] = buffactive['Celerity'] or false
    state.Buff['Alacrity'] = buffactive['Alacrity'] or false
    state.Buff['Klimaform'] = buffactive['Klimaform'] or false
    --state.Buff['Altruism'] = buffactive['Altruism'] or false
    --state.Buff['Focalization'] = buffactive['Focalization'] or false
end

function update_sublimation()
    state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
end

-- Equip sets appropriate to the active buffs, relative to the spell being cast.
function apply_grimoire_bonuses(spell, action, spellMap)
    if state.Buff.Perpetuance and spell.type =='WhiteMagic' and spell.skill == 'Enhancing Magic' then
        equip(sets.buff['Perpetuance'])
    end
    if state.Buff.Rapture and (spellMap == 'Cure' or spellMap == 'Curaga') then
        equip(sets.buff['Rapture'])
    end
    if spell.skill == 'Elemental Magic' and spellMap ~= 'ElementalEnfeeble' then
        if state.Buff.Ebullience and spell.english ~= 'Impact' then
            equip(sets.buff['Ebullience'])
        end
        if state.Buff.Immanence then
            equip(sets.buff['Immanence'])
        end
        if state.Buff.Klimaform and spell.element == world.weather_element then
            equip(sets.buff['Klimaform'])
        end
    end

    if state.Buff.Penury then equip(sets.buff['Penury']) end
    if state.Buff.Parsimony then equip(sets.buff['Parsimony']) end
    if state.Buff.Celerity then equip(sets.buff['Celerity']) end
    if state.Buff.Alacrity then equip(sets.buff['Alacrity']) end
end


-- General handling of strategems in an Arts-agnostic way.
-- Format: gs c scholar <strategem>
function handle_strategems(cmdParams)
    -- cmdParams[1] == 'scholar'
    -- cmdParams[2] == strategem to use

    if not cmdParams[2] then
        add_to_chat(123,'Error: No strategem command given.')
        return
    end
    local strategem = cmdParams[2]:lower()

    if strategem == 'light' then
        if buffactive['light arts'] then
            send_command('input /ja "Addendum: White" <me>')
        elseif buffactive['addendum: white'] then
            add_to_chat(122,'Error: Addendum: White is already active.')
        else
            send_command('input /ja "Light Arts" <me>')
        end
    elseif strategem == 'dark' then
        if buffactive['dark arts'] then
            send_command('input /ja "Addendum: Black" <me>')
        elseif buffactive['addendum: black'] then
            add_to_chat(122,'Error: Addendum: Black is already active.')
        else
            send_command('input /ja "Dark Arts" <me>')
        end
    elseif buffactive['light arts'] or buffactive['addendum: white'] then
        if strategem == 'cost' then
            send_command('input /ja Penury <me>')
        elseif strategem == 'speed' then
            send_command('input /ja Celerity <me>')
        elseif strategem == 'aoe' then
            send_command('input /ja Accession <me>')
        elseif strategem == 'power' then
            send_command('input /ja Rapture <me>')
        elseif strategem == 'duration' then
            send_command('input /ja Perpetuance <me>')
        elseif strategem == 'accuracy' then
            send_command('input /ja Altruism <me>')
        elseif strategem == 'enmity' then
            send_command('input /ja Tranquility <me>')
        elseif strategem == 'skillchain' then
            add_to_chat(122,'Error: Light Arts does not have a skillchain strategem.')
        elseif strategem == 'addendum' then
            send_command('input /ja "Addendum: White" <me>')
        else
            add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
        end
    elseif buffactive['dark arts']  or buffactive['addendum: black'] then
        if strategem == 'cost' then
            send_command('input /ja Parsimony <me>')
        elseif strategem == 'speed' then
            send_command('input /ja Alacrity <me>')
        elseif strategem == 'aoe' then
            send_command('input /ja Manifestation <me>')
        elseif strategem == 'power' then
            send_command('input /ja Ebullience <me>')
        elseif strategem == 'duration' then
            add_to_chat(122,'Error: Dark Arts does not have a duration strategem.')
        elseif strategem == 'accuracy' then
            send_command('input /ja Focalization <me>')
        elseif strategem == 'enmity' then
            send_command('input /ja Equanimity <me>')
        elseif strategem == 'skillchain' then
            send_command('input /ja Immanence <me>')
        elseif strategem == 'addendum' then
            send_command('input /ja "Addendum: Black" <me>')
        else
            add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
        end
    else
        add_to_chat(123,'No arts has been activated yet.')
    end
end


-- Gets the current number of available strategems based on the recast remaining
-- and the level of the sch.
function get_current_strategem_count()
    -- returns recast in seconds.
    local allRecasts = windower.ffxi.get_ability_recasts()
    local stratsRecast = allRecasts[231]

    local maxStrategems = (player.main_job_level + 10) / 20

    local fullRechargeTime = 4*60

    local currentCharges = math.floor(maxStrategems - maxStrategems * stratsRecast / fullRechargeTime)

    return currentCharges
end

function check_moving()
    if state.DefenseMode.value == 'None'  and state.Kiting.value == false then
        if state.Auto_Kite.value == false and moving then
            state.Auto_Kite:set(true)
        elseif state.Auto_Kite.value == true and moving == false then
            state.Auto_Kite:set(false)
        end
    end
end

function check_rings()
    rings = S{"Warp Ring", "Dim. Ring (Dem)", "Dim. Ring (Holla)", "Dim. Ring (Mea)",
              "Trizek Ring", "Echad Ring", "Facility Ring", "Capacity Ring"}

    if rings:contains(player.equipment.left_ring) then
        disable("left_ring")
    else
        enable("left_ring")
    end

    if rings:contains(player.equipment.right_ring) then
        disable("right_ring")
    else
        enable("right_ring")
    end
end

windower.register_event('zone change',
    function()
        if no_swap_gear:contains(player.equipment.left_ring) then
            enable("ring1")
            equip(sets.idle)
        end
        if no_swap_gear:contains(player.equipment.right_ring) then
            enable("ring2")
            equip(sets.idle)
        end
        if no_swap_gear:contains(player.equipment.waist) then
            enable("waist")
            equip(sets.idle)
        end
    end
)



send_command('input /macro set 3;input /macro book 21')
    send_command('@wait 5; input /lockstyleset 60')
 Phoenix.Evolved
Offline
Server: Phoenix
Game: FFXI
user: Special1
Posts: 67
By Phoenix.Evolved 2023-02-06 20:51:08
Link | Quote | Reply
 
I would like some help with my summoner LUA.

I've written a basic one just for myself and aeonics. This will just switch between idle sets, melee sets, and then when I use Volt Strike, Predator Claws, and Flaming Crush.

What's happening is 2 things: for predator claws, I am wearing a warp ring and Apogee Pumps +1 for my idle set. I sent in Garuda, I then cast Predator Claws, it executes my 'pet_midcast.Physical' section but never equips any different gear. (My convoker's pigaches +2 and my 2nd verar ring.)

What also looks weird is that it equips my idle set on the EXACT same second in the logs. I know it's fast, but is it possible it's never equipping because it equips the aftercast idle set too quickly?

-Pat
Code
function get_sets()

	sets.idle = {} 					-- Leave this empty.
	sets.melee = {}					-- Leave this empty
	sets.rangedtp = {}				-- Leave this empty
	sets.ws = {}					-- Leave this empty
	sets.ja = {}					-- Leave this empty
    sets.pet = {}					-- Leave this empty
    sets.pet_midcast = {}			-- Leave this empty
	sets.precast = {}               -- leave this empty    
	sets.midcast = {}               -- leave this empty    
	sets.aftercast = {}             -- leave this empty
	
	sets.idle.normal = {
        main={ name="Gridarvor", augments={'Pet: Accuracy+70','Pet: Attack+70','Pet: "Dbl. Atk."+15',}},
        sub="Elan Strap +1",
        ammo="Sancus Sachet +1",
        head={ name="Apogee Crown +1", augments={'MP+80','Pet: Attack+35','Blood Pact Dmg.+8',}},
        body="Con. Doublet +1",
        hands={ name="Merlinic Dastanas", augments={'Pet: Attack+18 Pet: Rng.Atk.+18','Blood Pact Dmg.+9','Pet: STR+4','Pet: Mag. Acc.+1','Pet: "Mag.Atk.Bns."+5',}},
        legs={ name="Apogee Slacks +1", augments={'Pet: STR+20','Blood Pact Dmg.+14','Pet: "Dbl. Atk."+4',}},
        feet="Apogee Pumps +1",
        neck={ name="Smn. Collar +1", augments={'Path: A',}},
        waist="Incarnation Sash",
        left_ear="Gelos Earring",
        right_ear="Lugalbanda Earring",
        left_ring="Varar Ring +1",
        right_ring="Warp Ring +1",
        back={ name="Campestres's Cape", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Eva.+20 /Mag. Eva.+20','Pet: Accuracy+5 Pet: Rng. Acc.+5','Pet: "Regen"+10',}},
		
}

	sets.melee.normal = {
        main={ name="Gridarvor", augments={'Pet: Accuracy+70','Pet: Attack+70','Pet: "Dbl. Atk."+15',}},
        sub="Elan Strap +1",
        ammo="Sancus Sachet +1",
        head={ name="Apogee Crown +1", augments={'MP+80','Pet: Attack+35','Blood Pact Dmg.+8',}},
        body="Con. Doublet +1",
        hands={ name="Merlinic Dastanas", augments={'Pet: Attack+18 Pet: Rng.Atk.+18','Blood Pact Dmg.+9','Pet: STR+4','Pet: Mag. Acc.+1','Pet: "Mag.Atk.Bns."+5',}},
        legs={ name="Apogee Slacks +1", augments={'Pet: STR+20','Blood Pact Dmg.+14','Pet: "Dbl. Atk."+4',}},
        feet="Con. Pigaches +2",
        neck={ name="Smn. Collar +1", augments={'Path: A',}},
        waist="Incarnation Sash",
        left_ear="Gelos Earring",
        right_ear="Lugalbanda Earring",
        left_ring="Varar Ring +1",
        right_ring="Varar Ring +1",
        back={ name="Campestres's Cape", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Eva.+20 /Mag. Eva.+20','Pet: Accuracy+5 Pet: Rng. Acc.+5','Pet: "Regen"+10',}},
    	
}

----------------------
-- Pet Midcast Sets --
----------------------

    sets.pet_midcast.Physical = {
        main={ name="Gridarvor", augments={'Pet: Accuracy+70','Pet: Attack+70','Pet: "Dbl. Atk."+15',}},
        sub="Elan Strap +1",
        ammo="Sancus Sachet +1",
        head={ name="Apogee Crown +1", augments={'MP+80','Pet: Attack+35','Blood Pact Dmg.+8',}},
        body="Con. Doublet +3",
        hands={ name="Merlinic Dastanas", augments={'Pet: Attack+18 Pet: Rng.Atk.+18','Blood Pact Dmg.+9','Pet: STR+4','Pet: Mag. Acc.+1','Pet: "Mag.Atk.Bns."+5',}},
        legs={ name="Apogee Slacks +1", augments={'Pet: STR+20','Blood Pact Dmg.+14','Pet: "Dbl. Atk."+4',}},
        feet="Con. Pigaches +2",
        neck={ name="Smn. Collar +1", augments={'Path: A',}},
        waist="Incarnation Sash",
        left_ear="Gelos Earring",
        right_ear="Lugalbanda Earring",
        left_ring="Varar Ring +1",
        right_ring="Varar Ring +1",
        back={ name="Campestres's Cape", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Eva.+20 /Mag. Eva.+20','Pet: Accuracy+5 Pet: Rng. Acc.+5','Pet: "Regen"+10',}},

}

-- prio: BP damage, pet mab, pet macc
    sets.pet_midcast.Magical = {
        main={ name="Espiritus", augments={'Enmity-6','Pet: "Mag.Atk.Bns."+30','Pet: Damage taken -4%',}},
        sub="Elan Strap +1",
        ammo="Sancus Sachet +1",
        head={ name="Apogee Crown +1", augments={'MP+80','Pet: Attack+35','Blood Pact Dmg.+8',}},
        body="Con. Doublet +3",
        hands={ name="Merlinic Dastanas", augments={'Pet: Attack+18 Pet: Rng.Atk.+18','Blood Pact Dmg.+9','Pet: STR+4','Pet: Mag. Acc.+1','Pet: "Mag.Atk.Bns."+5',}},
        legs={ name="Apogee Slacks +1", augments={'Pet: STR+20','Blood Pact Dmg.+14','Pet: "Dbl. Atk."+4',}},
        feet="Apogee Pumps +1",
        neck={ name="Smn. Collar +1", augments={'Path: A',}},
        waist="Regal Belt",
        left_ear="Gelos Earring",
        right_ear="Lugalbanda Earring",
        left_ring="Varar Ring +1",
        right_ring="Varar Ring +1",
        back={ name="Campestres's Cape", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Eva.+20 /Mag. Eva.+20','Pet: Accuracy+5 Pet: Rng. Acc.+5','Pet: "Regen"+10',}},
    
}

-- prio: bp damage, pet att, pet mab, balance with accuracy
--sets.pet_midcast.Hybrid = {
  --  main="Keraunos",
   -- sub="Elan Strap +1",
   -- ammo="Sancus Sachet +1",
   -- head="Glyphic Horn +3",
   -- neck="Adad Amulet",
   -- ear1="Domes. Earring",
   -- ear2="Kyrene's Earring",
   -- body="Con. Doublet +1",
   -- hands="Apogee Mitts +1",
   -- ring1="Varar Ring +1",
   -- ring2="Varar Ring +1",
   -- back=Cape_PhysicalBP,
   -- waist="Klouskap Sash",
   -- legs="Apogee Slacks +1",
   -- feet="Apogee Pumps +1"
--}

    
function precast(spell)
    if spell.english == "Flaming Crush" then
        equip(sets.pet_midcast.Magical)
        add_to_chat(158,'     >>>>> pet_midcast.Magical <<<<<     ')
    elseif spell.english == "Volt Strike" then
        equip(sets.pet_midcast.Physical)    
        add_to_chat(158,'     >>>>> pet_midcast.Physical <<<<<     ')
    elseif spell.english == "Predator Claws" then
        equip(sets.pet_midcast.Physical)
        add_to_chat(158,'     >>>>> pet_midcast.Physical <<<<<     ')
    end
end

function midcast(spell)
	--if spell.english == "Leaden Salute" then
      --  equip(sets.ws.leadensalute)
	--elseif spell.english == "Corsair's Roll" then
    --    equip(sets.ja.phantomroll)
	--elseif spell.english == "Fighter's Roll" then
    --    equip(sets.ja.phantomroll)	
	--//end
end

function aftercast(spell)
    send_command('wait 5')
	--idle()
    equip(sets.idle.normal) 
		add_to_chat(158,'>>>>> Funct After Idle Set wait 5<<<<<')

end

function idle()

   if player.status=='Engaged' then
        equip(sets.melee.normal) 
		add_to_chat(158,'     >>>>> Engaged Melee Set <<<<<     ')
   else
        equip(sets.idle.normal) 
		add_to_chat(158,'     >>>>> Idle Set <<<<<     ')
   end

end
 
function status_change(new,old)
    if new == 'Engaged' then
      equip(sets.melee.normal)
		add_to_chat(158,'     >>>>> Melee TP Set <<<<<     ')
   else
      equip(sets.idle.normal)
	  add_to_chat(158,'     >>>>> Idle Set <<<<<     ')
  end
end

 Fenrir.Positron
Offline
Server: Fenrir
Game: FFXI
user: Positron
Posts: 181
By Fenrir.Positron 2023-02-07 04:13:23
Link | Quote | Reply
 
Yes I believe that will equip the idle set too quickly, since the equip() command is not going through the Windower console buffer, so it's not subject to that 5 second wait. On SMN, I specifically check if the ability used was a Blood Pact and block the aftercast from equipping my idle set if it was, then equip it in pet_aftercast. The code looks like this:
Code
function aftercast(spell)
	if spell.type ~= "BloodPactRage" and spell.type ~= "BloodPactWard" then
		if player.status == "Idle" then
			equip(sets.idle)
		elseif player.status == "Engaged" then
			equip(sets.tp)
		end
	end
end

function pet_aftercast(spell)
	if player.status == "Idle" then
		equip(sets.idle)
	elseif player.status == "Engaged" then
		equip(sets.tp)
	end
end
 Phoenix.Evolved
Offline
Server: Phoenix
Game: FFXI
user: Special1
Posts: 67
By Phoenix.Evolved 2023-02-07 10:41:27
Link | Quote | Reply
 
Okay I'll try that. I also read that summoner doesn't use a precast? Just the midcast?
[+]
 Fenrir.Positron
Offline
Server: Fenrir
Game: FFXI
user: Positron
Posts: 181
By Fenrir.Positron 2023-02-07 15:02:18
Link | Quote | Reply
 
Precast is used for BP delay, but pet_midcast is used for everything else I can think of, including Blood Pact damage and (sadly) Blood Boon.
 Phoenix.Evolved
Offline
Server: Phoenix
Game: FFXI
user: Special1
Posts: 67
By Phoenix.Evolved 2023-02-08 11:52:03
Link | Quote | Reply
 
Fenrir.Positron said: »
Precast is used for BP delay, but pet_midcast is used for everything else I can think of, including Blood Pact damage and (sadly) Blood Boon.

So I just have Precast and Aftercast. And my precast is:
Code
function precast(spell)
    if spell.english == "Flaming Crush" then
        equip(sets.pet_midcast.Magical)
        add_to_chat(158,'     >>>>> pet_midcast.Magical <<<<<     ')
    elseif spell.english == "Volt Strike" then
        equip(sets.pet_midcast.Physical)    
        add_to_chat(158,'     >>>>> pet_midcast.Physical <<<<<     ')
    elseif spell.english == "Predator Claws" then
        equip(sets.pet_midcast.Physical)
        add_to_chat(158,'     >>>>> pet_midcast.Physical <<<<<     ')
    end
end


I guess I'm not understanding if I use the syntax of just "midcast(spell)" or "pet_midcast(spell)"? Then have the spells/abilities I want to equip certain sets to?
 Fenrir.Positron
Offline
Server: Fenrir
Game: FFXI
user: Positron
Posts: 181
By Fenrir.Positron 2023-02-08 15:10:27
Link | Quote | Reply
 
Phoenix.Evolved said: »
I guess I'm not understanding if I use the syntax of just "midcast(spell)" or "pet_midcast(spell)"? Then have the spells/abilities I want to equip certain sets to?

midcast() will only affect spells that you cast directly. The gear that you want to affect Blood Pacts should be equipped in the pet_midcast() function. Here's what mine looks like:

Code
function pet_midcast(spell)
	if spell.type == "BloodPactRage" then
		equip(sets.petmidcast.bp)
		if spell.english:contains("Perfect Defense") then
			equip(sets.summoning)
		end
	elseif spell.type == "BloodPactWard" then
		equip(sets.summoning)
	end
end
Offline
Posts: 8
By Answald 2023-02-25 20:29:19
Link | Quote | Reply
 
Hi

Could someone help me with my GEO lua

I want to show a message when the luopan is on, and especially when the luopan is gone

Tried this code ,but didn't work
Code
function status_change(new, old)
    local set_equip = nil
    
    if pet.name then
        windower.add_to_chat(204,'hello luopan')
    else
        windower.add_to_chat(204,'luopan gone')
    end
    
    if set_equip then
        equip(set_equip)
    end
end
Offline
Posts: 464
By drakefs 2023-02-26 00:13:51
Link | Quote | Reply
 
Answald said: »
I want to show a message when the luopan is on, and especially when the luopan is gone

Not sure that GS has a function that triggers on pet gain/loss. I would suggest trying asking on the Windower's discord GS support chat.
Offline
Posts: 218
By zigzagzig 2023-02-26 01:43:01
Link | Quote | Reply
 
function job_pet_change(petparam, gain)
if gain then
add_to_chat(200,'===== Luopan is ON =====')
end
if not gain then
add_to_chat(200,'===== Luopan vanished =====')
end
end
[+]
Offline
Posts: 8
By Answald 2023-02-26 02:16:18
Link | Quote | Reply
 
Quote:
zigzagzig said: »
function job_pet_change(petparam, gain)
if gain then
add_to_chat(200,'===== Luopan is ON =====')
end
if not gain then
add_to_chat(200,'===== Luopan vanished =====')
end
end

thanks zigzagzig
it worked using a Mote-lua,but I don't use Mote ver. for GEO.
how do I change it to work on not-Mote ver lua?
Offline
Posts: 8
By Answald 2023-02-26 03:11:36
Link | Quote | Reply
 
Answald said: »
Quote:
zigzagzig said: »
function job_pet_change(petparam, gain)
if gain then
add_to_chat(200,'===== Luopan is ON =====')
end
if not gain then
add_to_chat(200,'===== Luopan vanished =====')
end
end

thanks zigzagzig
it worked using a Mote-lua,but I don't use Mote ver. for GEO.
how do I change it to work on not-Mote ver lua?

I worked it out myself!! tnaks a lot though :)
Code
function pet_change(pet,gain)
    if gain then
        add_to_chat(200,'===== Luopan is ON =====')
    end
    
    if not gain then
        add_to_chat(200,'===== Luopan vanished =====')
    end
end
Offline
Posts: 218
By zigzagzig 2023-02-26 10:28:15
Link | Quote | Reply
 
for no Mote:

function pet_change(pet, gain)
if pet.isvalid then
add_to_chat(200,'===== Luopan is ON =====')
else
add_to_chat(200,'===== Luopan vanished =====')
end
end

not sure 100% let us know if worked
Offline
Posts: 8
By Answald 2023-03-09 20:51:58
Link | Quote | Reply
 
Hi all!

I quite like this code below,it prevents me from wasting TPs
but the problem is, as a SAM I need to use Namas Arrow to do skill chains, but this code cancels all range weapon WS,too.

How should I change the code so it won't cancel all the rangeWS?

Code
function job_precast(spell, action, spellMap, eventArgs)
    if spell.type == 'WeaponSkill' and player.target.distance > (3.4 + player.target.model_size) then  
        add_to_chat(123, spell.name..' Canceled: []')
        eventArgs.cancel = true        
        return
    end
end
Offline
Posts: 464
By drakefs 2023-03-10 10:44:31
Link | Quote | Reply
 
try
Code
function job_precast(spell, action, spellMap, eventArgs)
    if (spell.type == 'WeaponSkill' and not spell.action_type == 'Ranged Attack') and player.target.distance > (3.4 + player.target.model_size) then  
        add_to_chat(123, spell.name..' Canceled: []')
        eventArgs.cancel = true        
        return
    end
end
Offline
Posts: 8
By Answald 2023-03-11 00:02:07
Link | Quote | Reply
 
thx, drakefs
but,,,it didn't work
does it work on yours?
Offline
Posts: 464
By drakefs 2023-03-11 08:04:58
Link | Quote | Reply
 
Apparently
Code
not
is not working like I thought it did. I tested it a few ways and it just broke the function. This does work:
Code
function job_precast(spell, action, spellMap, eventArgs)
    if spell.type == 'WeaponSkill' and player.target.distance > (3.4 + player.target.model_size) then
        if spell.skill == 'Marksmanship' or spell.skill == 'Archery' then
            eventArgs.cancel = false
            return
        else
            add_to_chat(123, spell.name..' Canceled: []')
            eventArgs.cancel = true
            return
        end
    end
end

Also, apparently
Code
spell.action_type == 'Ranged Attack'

specifically applies to only the ranged attacked (/ra) and nothing else. Which is why I ended up using
Code
spell.skill
Offline
Posts: 8
By Answald 2023-03-12 08:25:09
Link | Quote | Reply
 
YES !! It works!!

drakefs ,thank you for your excellent work!!
 Bahamut.Noscrying
Online
Server: Bahamut
Game: FFXI
user: NoScrying
Posts: 65
By Bahamut.Noscrying 2023-03-14 05:15:29
Link | Quote | Reply
 
How would I go around making a Gearswap engaged mode with 2 modes?

For jobs where I want to use a specific weapon for it's easy, like MNK or DRK.
Code
function idle()
if player.status=='Engaged' then
    equip(sets.melee[Melee_Set_Names[Melee_Index]])
        if player.equipment.main == "Apocalypse" then
            equip(equip(sets.Apoc[Apoc_Set_Names[Apoc_Index]]))
        end
    end
if player.status =='Idle' then
    equip(sets.run.Regen) 
        if player.mpp <= 50 then
            equip(sets.run.Refresh)
        end
    end
end

or
Code
function idle()
if player.status =='Engaged' then
    equip(sets.melee[Melee_Set_Names[Melee_Index]])
        if buffactive['Footwork']then
            equip(sets.ja.footwork)
        end 
    end
if player.status=='Engaged' and player.equipment.main == 'Jolt Counter' then
    equip(sets.counter.Stance)
end
if player.status =='Idle' then
    equip(sets.idle.normal) 
end
end

But for RUN I want to have a DD mode and a DT mode, but I can't use buffs or weapons as an argument as I use the same in both.

I initially tried something where I use,
Code
if player.status =='Engaged' and player.equipment.ammo=="Staunch Tathlum" then,

but as I switch my ammo for WS it doesn't hold through. I imagine something like
Code
if player if player.status =='Engaged' and DT_Index = DT_Index +1 then

would work, but I don't know how to set it up that way.

It's currently setup as:
Code
function idle()
if player.status=='Engaged'  then
    equip(sets.melee[Melee_Set_Names[Melee_Index]])
        if buffactive['Battuta'] then
            equip(sets.melee.Inquartata)
        end
    end
-- if player.status=="Engaged" and player.equipment.ammo == "Staunch Tathlum" then
    -- equip(sets.DT[DT_Set_Names[DT_Index]])
        -- if buffactive['Battuta'] then
            -- equip(sets.melee.Inquartata)
        -- end
    -- end  
if player.status =='Idle' then
    equip(sets.idle.normal)
end
end


I don't use Mote or any other premade GS.
Offline
Posts: 464
By drakefs 2023-03-14 12:08:28
Link | Quote | Reply
 
How are you setting DT index? This may be usable if you have a DT_Index that is 0 (as in no DT). Then you would be able to check for a not 0 DT_Index
Code
if player.status =='Engaged' and DT_Index > 0 then


You could also just create a variable just for toggling DT mode.

One thing I really like about motes based LUAs is the the Modes.lua.

Using
Code
include(Modes.lua)

enables one to use modes.lua without the rest of motes. This how I make use of cycle-able/toggle-able state tracking.

I would make a variable to track my DT status:
Code
state.TankTime = M(False, 'HITME')

next to toggle the variable:
Code
send_command('bind ^q gs c toggle TankTime')

and then use this logic check for DT mode:
Code
if player.status =='Engaged' and state.TankTime.value then


EDIT: forgot to change toggle WeaponMode to TankTime
[+]
 Bahamut.Noscrying
Online
Server: Bahamut
Game: FFXI
user: NoScrying
Posts: 65
By Bahamut.Noscrying 2023-03-14 14:25:26
Link | Quote | Reply
 
I'll see if I can get the state to work, seems the most feasible right now.

Otherwise my Lua looks like this atm.

Edit: Can't get it to work :(
Edit2: Could I assign Indexes# to specific sets?
Thinking, dump all 4 sets into 1 Index.
Divide TP sets into Index 1-2 and the DT sets into 3-4
then assign toggle keys to Index 1-2 and another to 3-4

Edit3: I got it to work, by butchering Spicyryans RUN lua and adding parts to my own.
My old Keybindings work, along with a mode switch for TP and DT as well as my own Pre/Mid/Ja/WS. :D
[+]
 Asura.Lunafreya
Offline
Server: Asura
Game: FFXI
user: Lunafreya
Posts: 732
By Asura.Lunafreya 2023-03-16 10:57:15
Link | Quote | Reply
 
I am having a problem in my SCH lua, and it's funny because most of the time I do have this problem but every now and again it will work properly while casting...


My fast cast set has mpaca's staff/clerisy strap and my midcast will be something like bunzi/ammurapi.

When I cast a spell, and I can't figure out if this is going into my fast cast set or coming out of it, I get the message "You must have a two handed weapon equipped in the main slot in order to equip a grip."

Do I just need to put my shield/grip at the bottom of each of the respective sets or something?

Code
    sets.precast.FC = {
		main="Mpaca's Staff",
		sub="Clerisy Strap",
		ammo="Incantor Stone",
		head={ name="Merlinic Hood", augments={'Mag. Acc.+21 "Mag.Atk.Bns."+21','Magic burst dmg.+11%','INT+5','Mag. Acc.+13','"Mag.Atk.Bns."+10',}},
		body="Pinga Tunic",
		hands={ name="Chironic Gloves", augments={'Mag. Acc.+30','"Fast Cast"+6','MND+1',}},
		legs="Volte Brais",
		feet={ name="Merlinic Crackows", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic burst dmg.+11%',}},
		neck="Voltsurge Torque",
		waist="Embla Sash",
		left_ear="Malignance Earring",
		right_ear="Loquac. Earring",
		left_ring="Kishar Ring",
		right_ring="Rahab Ring",
		back={ name="Lugh's Cape", augments={'"Fast Cast"+10',}},
        }



    sets.midcast['Elemental Magic'] = {
		main="Bunzi's Rod",
		sub="Ammurapi Shield",
		ammo="Pemphredo Tathlum",
		head="Arbatel Bonnet +2",
		body="Amalric Doublet +1",
		hands={ name="Amalric Gages +1", augments={'INT+12','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
		legs="Agwu's Slops",
		feet="Arbatel Loafers +2",
		neck="Argute Stole +1",
		waist="Hachirin-no-Obi",
		left_ear="Malignance Earring",
		right_ear="Regal Earring",
		left_ring="Freke Ring",
		right_ring="Metamorph Ring +1",
		back={ name="Lugh's Cape", augments={'INT+20', 'Mag. Acc+20 /Mag. Dmg.+20','"Mag.Atk.Bns."+10',}},
        }

 Leviathan.Boposhopo
Offline
Server: Leviathan
Game: FFXI
user: Boposhopo
Posts: 229
By Leviathan.Boposhopo 2023-03-16 11:10:10
Link | Quote | Reply
 
You can use priority to make sure the staff equips first. Higher Priority equips first, this is what I have in my lua and works just fine.
Code
{main={ name= "Mpaca's Staff", priority=2},
sub={ name="Enki Strap", priority=1},
[+]
 Asura.Sehbeh
Offline
Server: Asura
Game: FFXI
user: Sehbeh
Posts: 12
By Asura.Sehbeh 2023-03-26 20:05:27
Link | Quote | Reply
 
Any ideas on this issue? Just started happening tonight when I logged on.

GS loads just fine, no errors on lua, GS will swap to engaged set when engaged but wont swap to WS set to WS, wont swap to precast, midcast or idle sets at all on any job. Will swap to idle from engaged to disengaged.

I can manually type to swap into a set and it will swap into that set. Like I typed //gs equip sets.precast.FC and it will put on my FC set.

I have tried: Zoning, changing jobs, changing subs, relogging, rebooting, editing the lua and reloading.
First Page 2 3 ... 174 175 176 ... 182 183 184
Log in to post.