Gearswap Support Thread

Eorzea Time
 
 
 
Language: JP EN FR DE
Version 3.1
New Items
users online
Forum » Windower » Support » Gearswap Support Thread
Gearswap Support Thread
First Page 2 3 ... 162 163
 Asura.Kurdtray
Offline
Server: Asura
Game: FFXI
user: Kurdtray
Posts: 14
By Asura.Kurdtray 2021-06-08 19:09:39
Link | Quote | Reply
 
My blm lua doesn't recognize Death as a dark element magic spell and won't equip obi when i have weather effects up. It works fine on other spells, just not with death.
 Bismarck.Xurion
Offline
Server: Bismarck
Game: FFXI
user: Xurion
Posts: 536
By Bismarck.Xurion 2021-06-09 06:17:55
Link | Quote | Reply
 
Asura.Kurdtray said: »
My blm lua doesn't recognize Death as a dark element magic spell and won't equip obi when i have weather effects up. It works fine on other spells, just not with death.
It'll be something to do with the spell to element mapping. You'll need to post your Gearswap file.
 Asura.Kronikx
Offline
Server: Asura
Game: FFXI
Posts: 17
By Asura.Kronikx 2021-06-09 09:29:53
Link | Quote | Reply
 
Garretts said: »
How hard/complex would it be to create a rule in gear swap to provide some sort of functionality to alleviate duplicate earrings and rings? Occasionally on WHM or BLU or other various jobs, equipping duplicate rings/earrings (Mache, Chirich, Stikini, etc.) will hang up and leave me in the wrong piece.

(Using Selindrile's LUA's, if that matters)

This is by no means a major problem, mainly because as far as I can tell, It always equips what I need when I'm doing an action, but only gaff's when returning to Idle/Auto-attack engaged.

I thought of some sort of variable that it could flag if both ring1+ring2 (or left_ring+right_ring) had the same equipment piece, and then assign one of the rings/earrings directly to a slot, maybe with Item ID? Possibly detect the duplicate reference, scan your inventory for said items, and then assign individual item ID's directly to said slots.

I searched this thread, and the internet in general with : 'ffxi duplicate equip gearswap' in the search engine, but mostly i saw comments regarding priority swaps, which i understand, but I've tried that, and I don't think it works


I also use Selindrile's gearswap and have never had an issue duplicates swapping in or out.

If the gear is augmented you can define exactly which to use by the augments.

as an example. in "function user_setup()" list the gear.
Ambu_STP_Cape = {name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','"Store TP"+10',}}
Ambu_WSD_Cape = {name="Rosmerta's Cape", augments={'STR+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}}
--Ambu_Crit_Cape = {name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Critical hit rate +10',}}

then in the sets, you put the nickname you gave the piece instead of the game name.

back = Ambu_STP_Cape with no quotes
 Carbuncle.Ared
Offline
Server: Carbuncle
Game: FFXI
user: dracoth
Posts: 15
By Carbuncle.Ared 2021-06-09 11:49:56
Link | Quote | Reply
 
Asura.Kronikx said: »
Garretts said: »
How hard/complex would it be to create a rule in gear swap to provide some sort of functionality to alleviate duplicate earrings and rings? Occasionally on WHM or BLU or other various jobs, equipping duplicate rings/earrings (Mache, Chirich, Stikini, etc.) will hang up and leave me in the wrong piece.

(Using Selindrile's LUA's, if that matters)

This is by no means a major problem, mainly because as far as I can tell, It always equips what I need when I'm doing an action, but only gaff's when returning to Idle/Auto-attack engaged.

I thought of some sort of variable that it could flag if both ring1+ring2 (or left_ring+right_ring) had the same equipment piece, and then assign one of the rings/earrings directly to a slot, maybe with Item ID? Possibly detect the duplicate reference, scan your inventory for said items, and then assign individual item ID's directly to said slots.

I searched this thread, and the internet in general with : 'ffxi duplicate equip gearswap' in the search engine, but mostly i saw comments regarding priority swaps, which i understand, but I've tried that, and I don't think it works


I also use Selindrile's gearswap and have never had an issue duplicates swapping in or out.

If the gear is augmented you can define exactly which to use by the augments.

as an example. in "function user_setup()" list the gear.
Ambu_STP_Cape = {name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','"Store TP"+10',}}
Ambu_WSD_Cape = {name="Rosmerta's Cape", augments={'STR+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}}
--Ambu_Crit_Cape = {name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Critical hit rate +10',}}

then in the sets, you put the nickname you gave the piece instead of the game name.

back = Ambu_STP_Cape with no quotes

I've seen this issue a few times, both on my machine and on a friend's. The way I solved it was by separating ring1 and ring2. I've never had it fail when they're on opposite ends of the equipment block. Not saying it can't, but it does seem more reliable than putting them next to each other (even though it severely triggers me when I look at them...)
 Asura.Kurdtray
Offline
Server: Asura
Game: FFXI
user: Kurdtray
Posts: 14
By Asura.Kurdtray 2021-06-09 15:21:06
Link | Quote | Reply
 
I figured it had something to do with my mappings, but I had no idea how to get it too work. I tried a few things but they failed so I returned it to normal. I'll include both my lua and my mappings on here.


Here's my blm lua.
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+D ]           Toggle Death Casting Mode Toggle
--              [ WIN+C ]           Toggle Capacity Points Mode
--
--  Spells:     [ CTRL+` ]          Stun
--              [ ALT+P ]           Shock Spikes
--
--  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.
-------------------------------------------------------------------------------------------------------------------

-- 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()

    -- state.CP = M(false, "Capacity Points Mode")

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

    degrade_array = {
        ['Aspirs'] = {'Aspir','Aspir II','Aspir III'}
        }

    lockstyleset = 25

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.CastingMode:options('Normal', 'Resistant', 'Spaekona')
    state.IdleMode:options('Normal', 'DT')

    state.WeaponLock = M(false, 'Weapon Lock')
    state.MagicBurst = M(false, 'Magic Burst')
    state.DeathMode = M(false, 'Death Mode')
    state.CP = M(false, "Capacity Points Mode")

    lowTierNukes = S{'Stone', 'Water', 'Aero', 'Fire', 'Blizzard', 'Thunder'}

    -- Additional local binds
    --include('Global-Binds.lua') -- OK to remove this line
    --include('Global-GEO-Binds.lua') -- OK to remove this line

	send_command('lua l equipviewer')
	send_command('input //equipviewer pos 1000 555')

    send_command('lua l gearinfo')
	
    send_command('bind ^` input /ma Stun <t>')
    send_command('bind !` gs c toggle MagicBurst')
    send_command('bind !w input /ma "Aspir III" <t>')
    send_command('bind !p input /ma "Shock Spikes" <me>')
    send_command('bind @d gs c toggle DeathMode')
    -- send_command('bind @c gs c toggle CP')
    send_command('bind @w gs c toggle WeaponLock')
    send_command('bind ^numpad0 input /Myrkr')

    select_default_macro_book()
    set_lockstyle()

    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 ^`')
    send_command('unbind !`')
    send_command('unbind !w')
    send_command('unbind !p')
    send_command('unbind ^,')
    send_command('unbind !.')
    send_command('unbind @d')
    -- send_command('unbind @c')
    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')

    send_command('lua u gearinfo')
end


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

    ---- Precast Sets ----

    -- Precast sets to enhance JAs
    sets.precast.JA['Mana Wall'] = {
		ammo="Staunch Tathlum",  --2/2
		head="Nyame Helm", --7/7
		body="Nyame Mail", --9/9
		hands="Nyame Gauntlets",  -- 7/7
		legs="Nyame Flanchard",  -- 8/8
        feet="Wicce Sabots +1",
		ring1="Defending Ring",  --10/10
		neck="Loricate Torque +1",  -- 6/6
        back=gear.BLM_Death_Cape,
        }

    sets.precast.JA.Manafont = {body="Arch. Coat +1"}

    -- Fast cast sets for spells
    sets.precast.FC = {
    --    /RDM --15
        ammo="Sapience Orb", --2
        head="Amalric Coif", --11
        body=gear.Merl_FC_body, --13
        hands="Merlinic Dastanas", --6
        --legs="Volte Brais", --8
		legs="Psycloth Lappas", --7
        --feet="Volte Gaiters", --6
        neck="Orunmila's Torque", --5
        ear1="Malignance Earring", --4
        --ear2="Enchntr. Earring +1", --2
		ear2="Loquacious Earring", --2
        ring1="Kishar Ring", --4
        --ring2="Weather. Ring +1", --5
		ring2="Prolix Ring", --2
        back=gear.BLM_FC_Cape, --10
        waist="Embla Sash",  --5
        }

    sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {
        waist="Siegel Sash",
        back="Perimede Cape",
        })

    sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {})

    sets.precast.FC.Cure = set_combine(sets.precast.FC, {
        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", waist="Shinjutsu-no-Obi +1"})
    sets.precast.FC.Dispelga = set_combine(sets.precast.FC, {main="Daybreak", sub="Ammurapi Shield", waist="Shinjutsu-no-Obi +1"})
    sets.precast.Storm = set_combine(sets.precast.FC, {ring2={name="Stikini Ring", bag="wardrobe4"},})

    sets.precast.FC.DeathMode = {
		--main=gear.Grioavolr_MB, --5
        sub="Niobid Strap",
        ammo="Ghastly Tathlum +1",
		--ammo="Psilomene",
        head="Amalric Coif", --11
		body=gear.Merl_FC_body, --13
        --body="Zendik Robe",
        hands="Merlinic Dastanas", --6
		--hands="Helios Gloves",  aug with duskdim MP+ and leafdim FC+
        --legs="Volte Brais", --8
		legs="Psycloth Lappas", --7
		feet="Volte Boots",
        --feet="Volte Gaiters", --6
        neck="Orunmila's Torque", --5
        ear1="Etiolation Earring", --1
        ear2="Loquacious Earring", --2
        ring1="Mephitas's Ring +1",
		ring2="Prolix Ring",
		--ring2="Rahab Ring",
		back=gear.BLM_FC_Cape, --10
        --back="Bane Cape", --4
        waist="Embla Sash",
		--waist=Channeler's Stone",
        }

    sets.precast.FC.Impact.DeathMode = set_combine(sets.precast.FC.DeathMode, {head=empty, body="Twilight Cloak", waist="Shinjutsu-no-Obi +1"})

    -- Weaponskill sets

    -- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS = {
        --ammo="Floestone",
        head="Jhakri Coronal +2",
        body="Jhakri Robe +2",
        hands="Jhakri Cuffs +2",
        legs=gear.Telchine_ENH_legs,
        feet="Jhakri Pigaches +2",
        neck="Fotia Gorget",
        ear1="Moonshade Earring",
        ear2="Telos Earring",
        ring1="Epaminondas's Ring",
        ring2="Shukuyu Ring",
        back="Relucent Cape",
        waist="Fotia Belt",
        }

    -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.

    sets.precast.WS['Vidohunir'] = {
        ammo="Ghastly Tathlum +1",
        head="Pixie Hairpin +1",
        body="Amalric Doublet +1",
        hands="Amalric Gages +1",
        legs="Merlinic Shalwar",
        feet="Merlinic Crackows",
        neck="Baetyl Pendant",
        ear1="Malignance Earring",
        ear2="Moonshade Earring",
        ring1="Epaminondas's Ring",
        ring2="Archon Ring",
        back=gear.BLM_MAB_Cape,
        waist="Acuity Belt +1",
        } -- INT

    sets.precast.WS['Myrkr'] = {
        ammo="Ghastly Tathlum +1",
        head="Pixie Hairpin +1",
        body="Nyame Mail",
        hands="Nyame Gauntlets",
        legs="Amalric Slops +1",
        feet="Nyame Sollerets",
        neck="Orunmila's Torque",
        ear1="Etiolation Earring",
        ear2="Loquacious Earring",
        ring1="Mephitas's Ring +1",
        ring2="Mephitas's Ring",
        back="Bane Cape",
        waist="Shinjutsu-no-Obi +1",
        } -- Max MP


    ---- Midcast Sets ----

    sets.midcast.FastRecast = sets.precast.FC

    sets.midcast.Cure = {
        main="Daybreak", --30
        sub="Sors Shield", --3/(-5)
        ammo="Esper Stone +1", --0/(-5)
        body="Vanya Robe",
        hands=gear.Telchine_ENH_hands, --10
        feet="Medium's Sabots", --12
        neck="Nodens Gorget", --5
        ear1="Mendi. Earring", --5
        ear2="Roundel Earring", --5
        ring1="Lebeche Ring", --3/(-5)
        ring2="Haoma's Ring",
        back="Oretan. Cape +1", --6
        waist="Bishop's Sash",
        }

    sets.midcast.Curaga = set_combine(sets.midcast.Cure, {
        neck="Nuna Gorget +1",
        ring1={name="Stikini Ring", bag="wardrobe3"},
        ring2="Metamor. Ring +1",
        waist="Luminary Sash",
        })

    sets.midcast.Cursna = set_combine(sets.midcast.Cure, {
        main=gear.Gada_ENH,
        sub="Genmei Shield",
        head="Vanya Hood",
        body="Vanya Robe",
        hands="Hieros Mittens",
        feet="Vanya Clogs",
        neck="Debilis Medallion",
        ear1="Beatific Earring",
        ear2="Meili Earring",
        ring1="Menelaus's Ring",
        ring2="Haoma's Ring",
        })

    sets.midcast['Enhancing Magic'] = {
        main=gear.Gada_ENH,
        sub="Ammurapi Shield",
        head=gear.Telchine_ENH_head,
        body=gear.Telchine_ENH_body,
        hands=gear.Telchine_ENH_hands,
        legs=gear.Telchine_ENH_legs,
        feet=gear.Telchine_ENH_feet,
        neck="Incanter's Torque",
        ear1="Mimir Earring",
        ear2="Andoaa Earring",
        ring1={name="Stikini Ring", bag="wardrobe3"},
        ring2={name="Stikini Ring", bag="wardrobe4"},
        back="Fi Follet Cape +1",
        waist="Olympus Sash",
        }

    sets.midcast.EnhancingDuration = {
        main=gear.Gada_ENH,
        sub="Ammurapi Shield",
        head=gear.Telchine_ENH_head,
        body=gear.Telchine_ENH_body,
        hands=gear.Telchine_ENH_hands,
        legs=gear.Telchine_ENH_legs,
        feet=gear.Telchine_ENH_feet,
        waist="Embla Sash",
        }

    sets.midcast.Regen = set_combine(sets.midcast.EnhancingDuration, {
        main="Bolelabunga",
        sub="Ammurapi Shield",
        head=gear.Telchine_ENH_head,
        body=gear.Telchine_ENH_body,
        hands=gear.Telchine_ENH_hands,
        legs=gear.Telchine_ENH_legs,
        feet=gear.Telchine_ENH_feet,
        })

    sets.midcast.Refresh = set_combine(sets.midcast.EnhancingDuration, {
        head="Amalric Coif",
        --feet="Inspirited Boots",
        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",
        ammo="Staunch Tathlum +1",
        head="Amalric Coif",
        hands="Regal Cuffs",
        ear1="Halasz Earring",
        ring1="Freke Ring",
        ring2="Evanescence Ring",
        waist="Emphatikos Rope",
        })

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

    sets.midcast.MndEnfeebles = {
        main="Maxentius",
        sub="Ammurapi Shield",
        ammo="Pemphredo Tathlum",
        head=empty;
        body="Cohort Cloak +1",
        hands="Regal Cuffs",
        legs="Ea Slops +1",
        feet="Skaoi Boots",
        neck="Erra Pendant",
        ear1="Malignance Earring",
        ear2="Vor Earring",
        ring1={name="Stikini Ring", bag="wardrobe3"},
        ring2={name="Stikini Ring", bag="wardrobe4"},
        back="Aurist's Cape +1",
        waist="Luminary Sash",
        } -- MND/Magic accuracy

    sets.midcast.IntEnfeebles = set_combine(sets.midcast.MndEnfeebles, {
        main="Maxentius",
        sub="Ammurapi Shield",
        waist="Acuity Belt +1",
        }) -- INT/Magic accuracy

    sets.midcast.ElementalEnfeeble = sets.midcast.IntEnfeebles
    sets.midcast.Dispelga = set_combine(sets.midcast.IntEnfeebles, {main="Daybreak", sub="Ammurapi Shield", waist="Shinjutsu-no-Obi +1"})

    sets.midcast['Dark Magic'] = {
        main="Rubicundity",
        sub="Ammurapi Shield",
        ammo="Pemphredo Tathlum",
        --head="Ea Hat +1",
		head="Merlinic Hood",
		--body="Ea. Houppe +1",
        body="Jhakri Robe +2",
        --hands="Raetic Bangles +1",
        hands="Jhakri Cuffs +2",
        --legs="Ea Slops +1",
        legs="Jhakri Slops +2",
        feet="Merlinic Crackows",
        neck="Erra Pendant",
        ear1="Malignance Earring",
        ear2="Mani Earring",
        ring1={name="Stikini Ring", bag="wardrobe3"},
        ring2={name="Stikini Ring", bag="wardrobe4"},
        back=gear.BLM_MAB_Cape,
        --waist="Acuity Belt +1",
        waist="Luminary Sash",
        }

    sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {
        head="Pixie Hairpin +1",
        feet="Merlinic Crackows",
        ear1="Hirudinea Earring",
        ring1="Evanescence Ring",
        ring2="Archon Ring",
        waist="Fucho-no-obi",
        })

    sets.midcast.Aspir = sets.midcast.Drain

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

    sets.midcast.Death = {
        main=gear.Grioavolr_MB, --5
        sub="Niobid Strap",
        ammo="Ghastly Tathlum +1",
		--ammo="Psilomene",
        head="Pixie Hairpin +1",
        body="Amalric Doublet +1",
		hands="Amalric Gages +1",
        legs="Amalric Slops +1",
        feet="Amalric Nails +1",
        neck="Mizu. Kubikazari", --10
        ear1="Barkarole Earring",
        ear2="Regal Earring",
		--ear2="Static Earring",
        ring1="Mephitas's Ring +1",
        ring2="Archon Ring",
        back=gear.BLM_Death_Cape, --5
        --waist="Sacro Cord",
        waist="Yamabuki-no-Obi",
        }

    sets.midcast.Death.Resistant = set_combine(sets.midcast.Death, {
        main=gear.Grioavolr_MB,
        sub="Enki Strap",
        head="Amalric Coif",
        waist="Acuity Belt +1",
        })

    -- Elemental Magic sets

    sets.midcast['Elemental Magic'] = {
        main=gear.Lathi_MAB,
        sub="Enki Strap",
        ammo="Ghastly Tathlum +1",
        head="Merlinic Hood",
        body="Amalric Doublet +1",
        hands="Amalric Gages +1",
        legs="Amalric Slops +1",
        feet="Amalric Nails +1",
        --neck="Baetyl Pendant",
		neck="Sanctity Necklace",
        ear1="Malignance Earring",
        ear2="Regal Earring",
        ring1="Freke Ring",
        --ring2="Metamor. Ring +1",
		ring2={name="Shiva Ring +1", bag="wardrobe4"},
        back=gear.BLM_MAB_Cape,
        --waist="Refoccilation Stone",
		waist="Yamabuki-no-Obi",
        }

    sets.midcast['Elemental Magic'].DeathMode = set_combine(sets.midcast['Elemental Magic'], {
        main=gear.Grioavolr_MB,
        sub="Enki Strap",
        ammo="Ghastly Tathlum +1",
        legs="Amalric Slops +1",
        feet="Merlinic Crackows",
        back=gear.BLM_Death_Cape,
        })

    sets.midcast['Elemental Magic'].Resistant = set_combine(sets.midcast['Elemental Magic'], {
        sub="Kaja Grip",
        ammo="Pemphredo Tathlum",
        legs="Merlinic Shalwar",
        neck="Sanctity Necklace",
        waist="Sacro Cord",
        })

    sets.midcast['Elemental Magic'].Spaekona = set_combine(sets.midcast['Elemental Magic'], {
        sub="Kaja Grip",
        ammo="Pemphredo Tathlum",
        body="Spaekona's Coat +2",
        legs="Merlinic Shalwar",
        feet="Merlinic Crackows",
        neck="Erra Pendant",
        })

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

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

    -- Initializes trusts at iLvl 119
    sets.midcast.Trust = sets.precast.FC

    sets.resting = {
        main="Chatoyant Staff",
        waist="Shinjutsu-no-Obi +1",
        }

    -- Idle sets

    sets.idle = {
        main="Lathi",
        sub="Alber Strap",
        ammo="Ghastly Tathlum +1",
        head="Befouled Crown",
		body="Amalric Doublet +1",
        --body="Jhakri Robe +2",
        hands="Nyame Gauntlets",
        --legs="Volte Brais",
        legs="Assid. Pants +1",
        --feet="Volte Gaiters",
		feet="Nyame Sollerets",
        neck="Bathy Choker +1",
        ear1="Etiolation Earring",
        ear2="Regal Earring",
        ring1={name="Stikini Ring", bag="wardrobe3"},
        ring2={name="Stikini Ring", bag="wardrobe4"},
        back="Moonbeam Cape",
        waist="Carrier's Sash",
        }

    sets.idle.DT = set_combine(sets.idle, {
        main="Daybreak",
        sub="Genmei Shield", --10/0
        ammo="Staunch Tathlum +1", --3/3
        head="Volte Cap",
        body="Mallquis Saio +2", --8/8
        hands="Raetic Bangles +1",
        feet="Volte Gaiters",
        neck="Loricate Torque +1", --6/6
        ear1="Sanare Earring",
        ear2="Lugalbanda Earring",
        ring1="Gelatinous Ring +1", --7/(-1)
        ring2="Defending Ring", --10/10
        back="Moonlight Cape", --6/6
        waist="Carrier's Sash",
        })

    sets.idle.ManaWall = {
        feet="Wicce Sabots +1",
        back=gear.BLM_Death_Cape,
        }

    sets.idle.DeathMode = {
        main=gear.Lathi_MAB,
		sub="Niobid Strap",
        --sub="Elder's Grip +1",
        ammo="Ghastly Tathlum +1",
		--ammo="Psilomene",
        head="Amalric Coif",
        body="Amalric Doublet +1",
        hands="Amalric Gages +1",
        legs="Amalric Slops +1",
        feet="Amalric Nails +1",
        neck="Loricate Torque +1",
        ear1="Etiolation Earring",
        ear2="Barkarole Earring",
        ring1="Defending Ring",
        ring2="Mephitas's Ring +1",
        back=gear.BLM_Death_Cape,
		--back="Bane Cape",
        waist="Shinjutsu-no-Obi +1",
		--waist="Slipor Sash",
        }

    sets.idle.Town = set_combine(sets.idle, {
        main=gear.Grioavolr_MB,
        sub="Kaja Grip",
        head="Ea Hat +1",
        body="Ea Houppelande +1",
        legs="Ea Slops +1",
        feet="Volte Gaiters",
        neck="Incanter's Torque",
        ear1="Malignance Earring",
        ear2="Regal Earring",
        ring1="Freke Ring",
        --ring2="Metamor. Ring +1",
        back=gear.BLM_MAB_Cape,
        waist="Acuity Belt +1",
        })

    -- 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"}
    sets.latent_dt = {ear2="Sorcerer's Earring"}

    sets.magic_burst = {
        sub="Kaja Grip",
        head="Ea Hat", --6/(6)
        body="Ea Houppelande", --8/(8)
        hands="Amalric Gages +1", --(6)
        --legs="Ea Slops", --7/(7)
        neck="Mizu. Kubikazari", --10
		--neck="Sorcerer's Stole +1", --8
        ring2="Mujin Band", --(5)
        back=gear.BLM_MAB_Cape, --5
		--waist="Sacro Cord",
        }

    sets.magic_burst.Resistant = {
        feet="Merlinic Crackows", --11
        neck="Sanctity Necklace",
        }

    -- Engaged sets

    -- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
    -- sets if more refined versions aren't defined.
    -- If you create a set with both offense and defense modes, the offense mode should be first.
    -- EG: sets.engaged.Dagger.Accuracy.Evasion

    -- Normal melee group

    sets.engaged = {
        main="Maxentius",
        sub="Ammurapi Shield",
        head="Blistering Sallet +1",
        body="Jhakri Robe +2",
        hands="Gazu Bracelet +1",
        legs=gear.Telchine_ENH_legs,
        feet="Battlecast Gaiters",
        neck="Combatant's Torque",
        ear1="Cessance Earring",
        ear2="Telos Earring",
        ring1="Hetairoi Ring",
        ring2={name="Chirich Ring +1", bag="wardrobe4"},
        back="Relucent Cape",
        }

    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.DarkAffinity = {head="Pixie Hairpin +1",ring2="Archon Ring"}
    sets.Obi = {waist="Hachirin-no-Obi"}
    -- sets.CP = {back="Mecisto. Mantle"}

end

-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
    if spell.action_type == 'Magic' and state.DeathMode.value then
        eventArgs.handled = true
        equip(sets.precast.FC.DeathMode)
        if spell.english == "Impact" then
            equip(sets.precast.FC.Impact.DeathMode)
        end
    end
    if spell.name:startswith('Aspir') then
        refine_various_spells(spell, action, spellMap, eventArgs)
    end
    if buffactive['Mana Wall'] then
        equip(sets.precast.JA['Mana Wall'])
    end
end

function job_post_precast(spell, action, spellMap, eventArgs)
    if spell.name == 'Impact' then
        equip(sets.precast.FC.Impact)
    end
end

-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)
    if spell.action_type == 'Magic' and state.DeathMode.value then
        eventArgs.handled = true
        if spell.skill == 'Elemental Magic' then
            equip(sets.midcast['Elemental Magic'].DeathMode)
        else
            if state.CastingMode.value == "Resistant" then
                equip(sets.midcast.Death.Resistant)
            else
                equip(sets.midcast.Death)
            end
        end
    end

    if buffactive['Mana Wall'] then
        equip(sets.precast.JA['Mana Wall'])
    end
end

function job_post_midcast(spell, action, spellMap, eventArgs)
    if spell.skill == 'Enhancing Magic' and classes.NoSkillSpells:contains(spell.english) and not state.DeathMode.value then
        equip(sets.midcast.EnhancingDuration)
        if spellMap == 'Refresh' then
            equip(sets.midcast.Refresh)
        end
    end
    if spell.skill == 'Elemental Magic' and spell.english == "Comet" then
        equip(sets.DarkAffinity)
    end
    if spell.skill == 'Elemental Magic' then
        if state.MagicBurst.value and spell.english ~= 'Death' then
            --if state.CastingMode.value == "Resistant" then
                --equip(sets.magic_burst.Resistant)
            --else
                equip(sets.magic_burst)
            --end
            if spell.english == "Impact" then
                equip(sets.midcast.Impact)
            end
        end
        if (spell.element == world.day_element or spell.element == world.weather_element) then
            equip(sets.Obi)
        end
    end
    if buffactive['Mana Wall'] then
        equip(sets.precast.JA['Mana Wall'])
    end
end

function job_aftercast(spell, action, spellMap, eventArgs)
    if not spell.interrupted then
        if spell.english == "Sleep II" or spell.english == "Sleepga 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" or spell.english == "Breakga" then
            send_command('@timers c "Break ['..spell.target.name..']" 30 down spells/00255.png')
        end
    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)
    -- Unlock armor when Mana Wall buff is lost.
    if buff== "Mana Wall" then
        if gain then
            --send_command('gs enable all')
            equip(sets.precast.JA['Mana Wall'])
            --send_command('gs disable all')
        else
            --send_command('gs enable all')
            handle_equipping_gear(player.status)
        end
    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

-- latent DT set auto equip on HP% change
    windower.register_event('hpp change', function(new, old)
        if new<=25 then
            equip(sets.latent_dt)
        end
    end)


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

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

function job_update(cmdParams, eventArgs)
    handle_equipping_gear(player.status)
end

-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
    if spell.action_type == 'Magic' then
        if spell.skill == "Enfeebling Magic" then
            if spell.type == "WhiteMagic" then
                return "MndEnfeebles"
            else
                return "IntEnfeebles"
            end
        end
    end
end

-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
    if state.DeathMode.value then
        idleSet = sets.idle.DeathMode
    end
    if player.mpp < 51 then
        idleSet = set_combine(idleSet, sets.latent_refresh)
    end
    if player.hpp <= 25 then
        idleSet = set_combine(idleSet, sets.latent_dt)
    end
    -- if state.CP.current == 'on' then
    --     equip(sets.CP)
    --     disable('back')
    -- else
    --     enable('back')
    -- end
    if buffactive['Mana Wall'] then
        idleSet = set_combine(idleSet, sets.precast.JA['Mana Wall'])
    end
    if state.Auto_Kite.value == true then
       idleSet = set_combine(idleSet, sets.Kiting)
    end

    return idleSet
end

-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
    if buffactive['Mana Wall'] then
        meleeSet = set_combine(meleeSet, sets.precast.JA['Mana Wall'])
    end

    return meleeSet
end

function customize_defense_set(defenseSet)
    if buffactive['Mana Wall'] then
        defenseSet = set_combine(defenseSet, sets.precast.JA['Mana Wall'])
    end

    return defenseSet
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 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.DeathMode.value then
        msg = msg .. ' Death: 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,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

function refine_various_spells(spell, action, spellMap, eventArgs)
    local aspirs = S{'Aspir','Aspir II','Aspir III'}

    local newSpell = spell.english
    local spell_recasts = windower.ffxi.get_spell_recasts()
    local cancelling = 'All '..spell.english..' are on cooldown. Cancelling.'

    local spell_index

    if spell_recasts[spell.recast_id] > 0 then
        if aspirs:contains(spell.name) then
            spell_index = table.find(degrade_array['Aspirs'],spell.name)
            if spell_index > 1 then
                newSpell = degrade_array['Aspirs'][spell_index - 1]
                send_command('@input /ma '..newSpell..' '..tostring(spell.target.raw))
                eventArgs.cancel = true
            end
        end
    end
end


-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------

function job_self_command(cmdParams, eventArgs)
    gearinfo(cmdParams, eventArgs)
end

function gearinfo(cmdParams, eventArgs)
    if cmdParams[1] == 'gearinfo' then
        if type(cmdParams[4]) == 'string' then
            if cmdParams[4] == 'true' then
                moving = true
            elseif cmdParams[4] == 'false' then
                moving = false
            end
        end
        if not midaction() then
            job_update()
        end
    end
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_gear()
    if no_swap_gear:contains(player.equipment.left_ring) then
        disable("ring1")
    else
        enable("ring1")
    end
    if no_swap_gear:contains(player.equipment.right_ring) then
        disable("ring2")
    else
        enable("ring2")
    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
    end
)

-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
    set_macro_page(1, 20)
end

function set_lockstyle()
    send_command('wait 2; input /lockstyleset ' .. lockstyleset)
end


And here's my mappings lua
Code
-------------------------------------------------------------------------------------------------------------------
-- Mappings, lists and sets to describe game relationships that aren't easily determinable otherwise.
-------------------------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------------------------
-- Elemental mappings for element relationships and certain types of spells and gear.
-------------------------------------------------------------------------------------------------------------------

-- Basic elements
elements = {}

elements.list = S{'Light','Dark','Fire','Ice','Wind','Earth','Lightning','Water'}

elements.weak_to = {['Light']='Dark', ['Dark']='Light', ['Fire']='Ice', ['Ice']='Wind', ['Wind']='Earth', ['Earth']='Lightning',
        ['Lightning']='Water', ['Water']='Fire'}

elements.strong_to = {['Light']='Dark', ['Dark']='Light', ['Fire']='Water', ['Ice']='Fire', ['Wind']='Ice', ['Earth']='Wind',
        ['Lightning']='Earth', ['Water']='Lightning'}

storms = S{"Aurorastorm", "Voidstorm", "Firestorm", "Sandstorm", "Rainstorm", "Windstorm", "Hailstorm", "Thunderstorm",
		"Aurorastorm II", "Voidstorm II", "Firestorm II", "Sandstorm II", "Rainstorm II", "Windstorm II", "Hailstorm II", "Thunderstorm II"}

elements.storm_of = {['Light']="Aurorastorm", ['Dark']="Voidstorm", ['Fire']="Firestorm", ['Earth']="Sandstorm",
        ['Water']="Rainstorm", ['Wind']="Windstorm", ['Ice']="Hailstorm", ['Lightning']="Thunderstorm",['Light']="Aurorastorm II",
		['Dark']="Voidstorm II", ['Fire']="Firestorm II", ['Earth']="Sandstorm II", ['Water']="Rainstorm II", ['Wind']="Windstorm II",
		['Ice']="Hailstorm II", ['Lightning']="Thunderstorm II"}

spirits = S{"LightSpirit", "DarkSpirit", "FireSpirit", "EarthSpirit", "WaterSpirit", "AirSpirit", "IceSpirit", "ThunderSpirit"}
elements.spirit_of = {['Light']="Light Spirit", ['Dark']="Dark Spirit", ['Fire']="Fire Spirit", ['Earth']="Earth Spirit",
        ['Water']="Water Spirit", ['Wind']="Air Spirit", ['Ice']="Ice Spirit", ['Lightning']="Thunder Spirit"}

runes = S{'Lux', 'Tenebrae', 'Ignis', 'Gelus', 'Flabra', 'Tellus', 'Sulpor', 'Unda'}
elements.rune_of = {['Light']='Lux', ['Dark']='Tenebrae', ['Fire']='Ignis', ['Ice']='Gelus', ['Wind']='Flabra',
     ['Earth']='Tellus', ['Lightning']='Sulpor', ['Water']='Unda'}

elements.obi_of = {['Light']='Hachirin-no-obi', ['Dark']='Hachirin-no-obi', ['Fire']='Hachirin-no-obi', ['Ice']='Hachirin-no-obi', ['Wind']='Hachirin-no-obi',
     ['Earth']='Hachirin-no-obi', ['Lightning']='Hachirin-no-obi', ['Water']='Hachirin-no-obi'}
 
elements.gorget_of = {['Light']='Fotia Gorget', ['Dark']='Fotia Gorget', ['Fire']='Fotia Gorget', ['Ice']='Fotia Gorget',
    ['Wind']='Fotia Gorget', ['Earth']='Fotia Gorget', ['Lightning']='Fotia Gorget', ['Water']='Fotia Gorget'}
 
elements.belt_of = {['Light']='Fotia Belt', ['Dark']='Fotia Belt', ['Fire']='Fotia Belt', ['Ice']='Fotia Belt',
    ['Wind']='Fotia Belt', ['Earth']='Fotia Belt', ['Lightning']='Fotia Belt', ['Water']='Fotia Belt'}

elements.fastcast_staff_of = {['Light']='Arka I', ['Dark']='Xsaeta I', ['Fire']='Atar I', ['Ice']='Vourukasha I',
    ['Wind']='Vayuvata I', ['Earth']='Vishrava I', ['Lightning']='Apamajas I', ['Water']='Haoma I', ['Thunder']='Apamajas I'}

elements.recast_staff_of = {['Light']='Arka II', ['Dark']='Xsaeta II', ['Fire']='Atar II', ['Ice']='Vourukasha II',
    ['Wind']='Vayuvata II', ['Earth']='Vishrava II', ['Lightning']='Apamajas II', ['Water']='Haoma II', ['Thunder']='Apamajas II'}

elements.perpetuance_staff_of = {['Light']='Arka III', ['Dark']='Xsaeta III', ['Fire']='Atar III', ['Ice']='Vourukasha III',
    ['Wind']='Vayuvata III', ['Earth']='Vishrava III', ['Lightning']='Apamajas III', ['Water']='Haoma III', ['Thunder']='Apamajas III'}


-- Elements for skillchain names
skillchain_elements = {}
skillchain_elements.Light = S{'Light','Fire','Wind','Lightning'}
skillchain_elements.Darkness = S{'Dark','Ice','Earth','Water'}
skillchain_elements.Fusion = S{'Light','Fire'}
skillchain_elements.Fragmentation = S{'Wind','Lightning'}
skillchain_elements.Distortion = S{'Ice','Water'}
skillchain_elements.Gravitation = S{'Dark','Earth'}
skillchain_elements.Transfixion = S{'Light'}
skillchain_elements.Compression = S{'Dark'}
skillchain_elements.Liquification = S{'Fire'}
skillchain_elements.Induration = S{'Ice'}
skillchain_elements.Detonation = S{'Wind'}
skillchain_elements.Scission = S{'Earth'}
skillchain_elements.Impaction = S{'Lightning'}
skillchain_elements.Reverberation = S{'Water'}


-------------------------------------------------------------------------------------------------------------------
-- Mappings for weaponskills
-------------------------------------------------------------------------------------------------------------------

-- REM weapons and their corresponding weaponskills
data = {}
data.weaponskills = {}
data.weaponskills.relic = {
    ["Spharai"] = "Final Heaven",
    ["Mandau"] = "Mercy Stroke",
    ["Excalibur"] = "Knights of Round",
    ["Ragnarok"] = "Scourge",
    ["Guttler"] = "Onslaught",
    ["Bravura"] = "Metatron Torment",
    ["Apocalypse"] = "Catastrophe",
    ["Gungnir"] = "Gierskogul",
    ["Kikoku"] = "Blade: Metsu",
    ["Amanomurakumo"] = "Tachi: Kaiten",
    ["Mjollnir"] = "Randgrith",
    ["Claustrum"] = "Gates of Tartarus",
    ["Annihilator"] = "Coronach",
    ["Yoichinoyumi"] = "Namas Arrow"}
data.weaponskills.mythic = {
    ["Conqueror"] = "King's Justice",
    ["Glanzfaust"] = "Ascetic's Fury",
    ["Yagrush"] = "Mystic Boon",
    ["Laevateinn"] = "Vidohunir",
    ["Murgleis"] = "Death Blossom",
    ["Vajra"] = "Mandalic Stab",
    ["Burtgang"] = "Atonement",
    ["Liberator"] = "Insurgency",
    ["Aymur"] = "Primal Rend",
    ["Carnwenhan"] = "Mordant Rime",
    ["Gastraphetes"] = "Trueflight",
    ["Kogarasumaru"] = "Tachi: Rana",
    ["Nagi"] = "Blade: Kamu",
    ["Ryunohige"] = "Drakesbane",
    ["Nirvana"] = "Garland of Bliss",
    ["Tizona"] = "Expiacion",
    ["Death Penalty"] = "Leaden Salute",
    ["Kenkonken"] = "Stringing Pummel",
    ["Terpsichore"] = "Pyrrhic Kleos",
    ["Tupsimati"] = "Omniscience",
    ["Idris"] = "Exudation",
    ["Epeolatry"] = "Dimidiation"}
data.weaponskills.empyrean = {
    ["Verethragna"] = "Victory Smite",
    ["Twashtar"] = "Rudra's Storm",
    ["Almace"] = "Chant du Cygne",
    ["Caladbolg"] = "Torcleaver",
    ["Farsha"] = "Cloudsplitter",
    ["Ukonvasara"] = "Ukko's Fury",
    ["Redemption"] = "Quietus",
    ["Rhongomiant"] = "Camlann's Torment",
    ["Kannagi"] = "Blade: Hi",
    ["Masamune"] = "Tachi: Fudo",
    ["Gambanteinn"] = "Dagann",
    ["Hvergelmir"] = "Myrkr",
    ["Gandiva"] = "Jishnu's Radiance",
    ["Armageddon"] = "Wildfire"}

-- Weaponskills that can be used at range.
data.weaponskills.ranged = S{"Flaming Arrow", "Piercing Arrow", "Dulling Arrow", "Sidewinder", "Arching Arrow",
    "Empyreal Arrow", "Refulgent Arrow", "Apex Arrow", "Namas Arrow", "Jishnu's Radiance",
    "Hot Shot", "Split Shot", "Sniper Shot", "Slug Shot", "Heavy Shot", "Detonator", "Last Stand",
    "Coronach", "Trueflight", "Leaden Salute", "Wildfire",
    "Myrkr"}

ranged_weaponskills = data.weaponskills.ranged

-------------------------------------------------------------------------------------------------------------------
-- Spell mappings allow defining a general category or description that each of sets of related
-- spells all fall under.
-------------------------------------------------------------------------------------------------------------------

spell_maps = {
    ['Cure']='Cure',['Cure II']='Cure',['Cure III']='Cure',['Cure IV']='Cure',['Cure V']='Cure',['Cure VI']='Cure',
    ['Full Cure']='Cure',
    ['Cura']='Curaga',['Cura II']='Curaga',['Cura III']='Curaga',
    ['Curaga']='Curaga',['Curaga II']='Curaga',['Curaga III']='Curaga',['Curaga IV']='Curaga',['Curaga V']='Curaga',
    -- Status Removal doesn't include Esuna or Sacrifice, since they work differently than the rest
    ['Poisona']='StatusRemoval',['Paralyna']='StatusRemoval',['Silena']='StatusRemoval',['Blindna']='StatusRemoval',['Cursna']='StatusRemoval',
    ['Stona']='StatusRemoval',['Viruna']='StatusRemoval',['Erase']='StatusRemoval',
    ['Barfire']='BarElement',['Barstone']='BarElement',['Barwater']='BarElement',['Baraero']='BarElement',['Barblizzard']='BarElement',['Barthunder']='BarElement',
    ['Barfira']='BarElement',['Barstonra']='BarElement',['Barwatera']='BarElement',['Baraera']='BarElement',['Barblizzara']='BarElement',['Barthundra']='BarElement',
    ['Raise']='Raise',['Raise II']='Raise',['Raise III']='Raise',['Arise']='Raise',
    ['Reraise']='Reraise',['Reraise II']='Reraise',['Reraise III']='Reraise',['Reraise IV']='Reraise',
    ['Protect']='Protect',['Protect II']='Protect',['Protect III']='Protect',['Protect IV']='Protect',['Protect V']='Protect',
    ['Shell']='Shell',['Shell II']='Shell',['Shell III']='Shell',['Shell IV']='Shell',['Shell V']='Shell',
    ['Protectra']='Protectra',['Protectra II']='Protectra',['Protectra III']='Protectra',['Protectra IV']='Protectra',['Protectra V']='Protectra',
    ['Shellra']='Shellra',['Shellra II']='Shellra',['Shellra III']='Shellra',['Shellra IV']='Shellra',['Shellra V']='Shellra',
    ['Regen']='Regen',['Regen II']='Regen',['Regen III']='Regen',['Regen IV']='Regen',['Regen V']='Regen',
    ['Refresh']='Refresh',['Refresh II']='Refresh',['Refresh III']='Refresh',
    ['Teleport-Holla']='Teleport',['Teleport-Dem']='Teleport',['Teleport-Mea']='Teleport',['Teleport-Altep']='Teleport',['Teleport-Yhoat']='Teleport',
    ['Teleport-Vahzl']='Teleport',['Recall-Pashh']='Teleport',['Recall-Meriph']='Teleport',['Recall-Jugner']='Teleport',
    ['Valor Minuet']='Minuet',['Valor Minuet II']='Minuet',['Valor Minuet III']='Minuet',['Valor Minuet IV']='Minuet',['Valor Minuet V']='Minuet',
    ["Knight's Minne"]='Minne',["Knight's Minne II"]='Minne',["Knight's Minne III"]='Minne',["Knight's Minne IV"]='Minne',["Knight's Minne V"]='Minne',
    ['Advancing March']='March',['Victory March']='March',
    ['Sword Madrigal']='Madrigal',['Blade Madrigal']='Madrigal',
    ["Hunter's Prelude"]='Prelude',["Archer's Prelude"]='Prelude',
    ['Sheepfoe Mambo']='Mambo',['Dragonfoe Mambo']='Mambo',
    ['Raptor Mazurka']='Mazurka',['Chocobo Mazurka']='Mazurka',
    ['Sinewy Etude']='Etude',['Dextrous Etude']='Etude',['Vivacious Etude']='Etude',['Quick Etude']='Etude',['Learned Etude']='Etude',['Spirited Etude']='Etude',['Enchanting Etude']='Etude',
    ['Herculean Etude']='Etude',['Uncanny Etude']='Etude',['Vital Etude']='Etude',['Swift Etude']='Etude',['Sage Etude']='Etude',['Logical Etude']='Etude',['Bewitching Etude']='Etude',
    ["Mage's Ballad"]='Ballad',["Mage's Ballad II"]='Ballad',["Mage's Ballad III"]='Ballad',
    ["Army's Paeon"]='Paeon',["Army's Paeon II"]='Paeon',["Army's Paeon III"]='Paeon',["Army's Paeon IV"]='Paeon',["Army's Paeon V"]='Paeon',["Army's Paeon VI"]='Paeon',
    ['Fire Carol']='Carol',['Ice Carol']='Carol',['Wind Carol']='Carol',['Earth Carol']='Carol',['Lightning Carol']='Carol',['Water Carol']='Carol',['Light Carol']='Carol',['Dark Carol']='Carol',
    ['Fire Carol II']='Carol',['Ice Carol II']='Carol',['Wind Carol II']='Carol',['Earth Carol II']='Carol',['Lightning Carol II']='Carol',['Water Carol II']='Carol',['Light Carol II']='Carol',['Dark Carol II']='Carol',
    ['Foe Lullaby']='Lullaby',['Foe Lullaby II']='Lullaby',['Horde Lullaby']='Lullaby',['Horde Lullaby II']='Lullaby',
    ['Fire Threnody']='Threnody',['Ice Threnody']='Threnody',['Wind Threnody']='Threnody',['Earth Threnody']='Threnody',['Lightning Threnody']='Threnody',['Water Threnody']='Threnody',['Light Threnody']='Threnody',['Dark Threnody']='Threnody',
    ['Fire Threnody II']='Threnody',['Ice Threnody II']='Threnody',['Wind Threnody II']='Threnody',['Earth Threnody II']='Threnody',['Lightning Threnody II']='Threnody',['Water Threnody II']='Threnody',['Light Threnody II']='Threnody',['Dark Threnody II']='Threnody',
    ['Battlefield Elegy']='Elegy',['Carnage Elegy']='Elegy',
    ['Foe Requiem']='Requiem',['Foe Requiem II']='Requiem',['Foe Requiem III']='Requiem',['Foe Requiem IV']='Requiem',['Foe Requiem V']='Requiem',['Foe Requiem VI']='Requiem',['Foe Requiem VII']='Requiem',
    ['Utsusemi: Ichi']='Utsusemi',['Utsusemi: Ni']='Utsusemi',['Utsusemi: San']='Utsusemi',
    ['Katon: Ichi'] = 'ElementalNinjutsu',['Suiton: Ichi'] = 'ElementalNinjutsu',['Raiton: Ichi'] = 'ElementalNinjutsu',
    ['Doton: Ichi'] = 'ElementalNinjutsu',['Huton: Ichi'] = 'ElementalNinjutsu',['Hyoton: Ichi'] = 'ElementalNinjutsu',
    ['Katon: Ni'] = 'ElementalNinjutsu',['Suiton: Ni'] = 'ElementalNinjutsu',['Raiton: Ni'] = 'ElementalNinjutsu',
    ['Doton: Ni'] = 'ElementalNinjutsu',['Huton: Ni'] = 'ElementalNinjutsu',['Hyoton: Ni'] = 'ElementalNinjutsu',
    ['Katon: San'] = 'ElementalNinjutsu',['Suiton: San'] = 'ElementalNinjutsu',['Raiton: San'] = 'ElementalNinjutsu',
    ['Doton: San'] = 'ElementalNinjutsu',['Huton: San'] = 'ElementalNinjutsu',['Hyoton: San'] = 'ElementalNinjutsu',
    ['Kurayami: Ichi'] = 'EnfeeblingNinjutsu',['Kurayami: Ni'] = 'EnfeeblingNinjutsu',['Hojo: Ichi'] = 'EnfeeblingNinjutsu',
    ['Hojo: Ni'] = 'EnfeeblingNinjutsu',['Dokumori: Ichi'] = 'EnfeeblingNinjutsu',['Jubaku: Ichi'] = 'EnfeeblingNinjutsu',
    ['Aisha: Ichi'] = 'EnfeeblingNinjutsu',['Yurin: Ichi'] = 'EnfeeblingNinjutsu',
    ['Tonko: Ichi'] = 'EnhancingNinjutsu',['Tonko: Ni'] = 'EnhancingNinjutsu', ['Monomi: Ichi'] = 'EnhancingNinjutsu',
    ['Myoshu: Ichi'] = 'EnhancingNinjutsu',['Migawari: Ichi'] = 'Migawari',['Gekka: Ichi'] = 'EnhancingNinjutsu',
    ['Yain: Ichi'] = 'EnhancingNinjutsu',['Kakka: Ichi'] = 'EnhancingNinjutsu',
    ['Banish']='Banish',['Banish II']='Banish',['Banish III']='Banish',['Banishga']='Banish',['Banishga II']='Banish',
    ['Holy']='Holy',['Holy II']='Holy',['Drain']='Drain',['Drain II']='Drain',['Drain III']='Drain',['Aspir']='Aspir',['Aspir II']='Aspir',['Aspir III']='Aspir',
    ['Absorb-Str']='Absorb',['Absorb-Dex']='Absorb',['Absorb-Vit']='Absorb',['Absorb-Agi']='Absorb',['Absorb-Int']='Absorb',['Absorb-Mnd']='Absorb',['Absorb-Chr']='Absorb',
    ['Absorb-Acc']='Absorb',['Absorb-TP']='Absorb',['Absorb-Attri']='Absorb',
    ['Enlight']='Enlight',['Enlight II']='Enlight',['Endark']='Endark',['Endark II']='Endark',
    ['Burn']='ElementalEnfeeble',['Frost']='ElementalEnfeeble',['Choke']='ElementalEnfeeble',['Rasp']='ElementalEnfeeble',['Shock']='ElementalEnfeeble',['Drown']='ElementalEnfeeble',
    ['Pyrohelix']='Helix',['Cryohelix']='Helix',['Anemohelix']='Helix',['Geohelix']='Helix',['Ionohelix']='Helix',['Hydrohelix']='Helix',['Luminohelix']='Helix',['Noctohelix']='Helix',
    ['Pyrohelix II']='Helix',['Cryohelix II']='Helix',['Anemohelix II']='Helix',['Geohelix II']='Helix',['Ionohelix II']='Helix',['Hydrohelix II']='Helix',['Luminohelix II']='Helix',['Noctohelix II']='Helix',
    ['Firestorm']='Storm',['Hailstorm']='Storm',['Windstorm']='Storm',['Sandstorm']='Storm',['Thunderstorm']='Storm',['Rainstorm']='Storm',['Aurorastorm']='Storm',['Voidstorm']='Storm',
    ['Firestorm II']='Storm',['Hailstorm II']='Storm',['Windstorm II']='Storm',['Sandstorm II']='Storm',['Thunderstorm II']='Storm',['Rainstorm II']='Storm',['Aurorastorm II']='Storm',['Voidstorm II']='Storm',
    ['Fire Maneuver']='Maneuver',['Ice Maneuver']='Maneuver',['Wind Maneuver']='Maneuver',['Earth Maneuver']='Maneuver',['Thunder Maneuver']='Maneuver',
    ['Water Maneuver']='Maneuver',['Light Maneuver']='Maneuver',['Dark Maneuver']='Maneuver',
    ['Fira']='GeoElem',['Blizzara']='GeoElem',['Aerora']='GeoElem',['Stonera']='GeoElem',['Thundara']='GeoElem',['Watera']='GeoElem',
    ['Fira II']='GeoElem',['Blizzara II']='GeoElem',['Aerora II']='GeoElem',['Stonera II']='GeoElem',['Thundara II']='GeoElem',['Watera II']='GeoElem',
    ['Fira III']='GeoElem',['Blizzara III']='GeoElem',['Aerora III']='GeoElem',['Stonera III']='GeoElem',['Thundara III']='GeoElem',['Watera III']='GeoElem',
}

no_skill_spells_list = S{
        'Haste', 'Haste II', 'Refresh', 'Refresh II', 'Refresh III', 'Protect', 'Protect II', 'Protect III', 'Protect IV', 'Protect V',
        'Protectra', 'Protectra II', 'Protectra III', 'Protectra IV', 'Protectra V', 'Shell', 'Shell II', 'Shell III', 'Shell IV',
        'Shell V', 'Shellra', 'Shellra II', 'Shellra III', 'Shellra IV', 'Shellra V', 'Raise', 'Raise II', 'Raise III', 'Arise',
        'Reraise', 'Reraise II', 'Reraise III', 'Reraise IV', 'Sneak', 'Invisible', 'Deodorize'}


-------------------------------------------------------------------------------------------------------------------
-- Tables to specify general area groupings.  Creates the 'areas' table to be referenced in job files.
-- Zone names provided by world.area/world.zone are currently in all-caps, so defining the same way here.
-------------------------------------------------------------------------------------------------------------------

areas = {}

-- City areas for town gear and behavior.
areas.Cities = S{
    "Ru'Lude Gardens",
    "Upper Jeuno",
    "Lower Jeuno",
    "Port Jeuno",
    "Port Windurst",
    "Windurst Waters",
    "Windurst Woods",
    "Windurst Walls",
    "Heavens Tower",
    "Port San d'Oria",
    "Northern San d'Oria",
    "Southern San d'Oria",
    "Port Bastok",
    "Bastok Markets",
    "Bastok Mines",
    "Metalworks",
    "Aht Urhgan Whitegate",
    "Tavnazian Safehold",
    "Nashmau",
    "Selbina",
    "Mhaura",
    "Norg",
    "Eastern Adoulin",
    "Western Adoulin",
    "Kazham",
    "Rabao",
    "Chocobo Circuit",
}
-- Adoulin areas, where Ionis will grant special stat bonuses.
areas.Adoulin = S{
    "Yahse Hunting Grounds",
    "Ceizak Battlegrounds",
    "Foret de Hennetiel",
    "Morimar Basalt Fields",
    "Yorcia Weald",
    "Yorcia Weald [U]",
    "Cirdas Caverns",
    "Cirdas Caverns [U]",
    "Marjami Ravine",
    "Kamihr Drifts",
    "Sih Gates",
    "Moh Gates",
    "Dho Gates",
    "Woh Gates",
    "Rala Waterways",
    "Rala Waterways [U]",
    "Outer Ra'Kaznar",
    "Outer Ra'Kaznar [U]"
}


-------------------------------------------------------------------------------------------------------------------
-- Lists of certain NPCs. (Not up to date)
-------------------------------------------------------------------------------------------------------------------

npcs = {}
npcs.Trust = S{'Ajido-Marujido','Aldo','Ayame','Cherukiki','Curilla','D.Shantotto','Elivira','Excenmille',
        'Fablinix','FerreousCoffin','Gadalar','Gessho','Ingrid','IronEater','Joachim','Klara','Kupipi',
        'LehkoHabhoka','LhuMhakaracca','Lion','Luzaf','Maat','MihliAliapoh','Mnejing','Moogle','Mumor',
        'NajaSalaheem','Najelith','Naji','NanaaMihgo','Nashmeira','Noillurie','Ovjang','Prishe','Rainemard',
        'RomaaMihgo','Sakura','Shantotto','StarSibyl','Tenzen','Trion','UkaTotlihn','Ulmia','Valaineral',
        'Volker','Zazarg','Zeid'}

 Bahamut.Kelg
Offline
Server: Bahamut
Game: FFXI
user: Kelg
Posts: 51
By Bahamut.Kelg 2021-06-15 11:40:01
Link | Quote | Reply
 
What am I doing wrong with this cycle command?
Code
send_command('bind ^numpad9 gs c cycle QHeal')
Code
state.QHeal = M{['description']='Quick Heal', 'Magic Fruit', 'Restoral', 'White Wind'}
Code
function job_self_command(cmdParams, eventArgs)
    if cmdParams[1]:lower() == 'tankmode' then
		if state.TankMode == false then
			state.TankMode = true
			equip(sets.Tank)
			add_to_chat(123, 'Locking Tank Gear')
            disable('back', 'ear1', 'ear2', 'ring2')
            send_command('gs c update user')            
		else
			state.TankMode = false
			add_to_chat(158, 'Unlocking Tank Gear')	
            enable('back', 'ear1', 'ear2', 'ring2')                        
			send_command('gs c update user')			
		end
	end
	if state.QHeal.value == 'White Wind' then
      send_command('bind ^numpad6 input /ma "Magic Fruit" <st>')   
    elseif state.QHeal.value == 'Magic Fruit' then
      send_command('bind ^numpad6 input /ma "Restoral" <me>') 
    elseif state.QHeal.value == 'Restoral' then
      send_command('bind ^numpad6 input /ma "White Wind" <me>')
   end 
end


I'm trying to create a quick heal button that can cycle between 3 spells. It kind of works, since I can cycle between heal types, but it seems to reset to the first option sometimes without any input. Any idea why?
Offline
Posts: 252
By Brynach 2021-06-19 17:24:08
Link | Quote | Reply
 
Not sure what the issue is here. I just copied the raw code for Arislan's NIN lua, and at loading get this error:

>GearSwap: Lua runtime error: gearswap/flow.lua:350:
>GearSwap has detected an error in the user function self_command:
>... Files .../gearswap/data/NIN.lua:911: attempt to call global 'handle_equipping_gear' (a nil value)

This is the section of the flow.lua, bold is line 350:

function user_pcall(str,...)
if user_env then
if type(user_env[str]) == 'function' then
bool,err = pcall(user_env[str],...)
if not bool then error('\nGearSwap has detected an error in the user function '..str..':\n'..err) end
elseif user_env[str] then
msg.addon_msg(123,windower.to_shift_jis(tostring(str))..'() exists but is not a function')
end
end
end

And this is the section in the lua I just copied (no changes yet), bolded is line 911

function job_update(cmdParams, eventArgs)
handle_equipping_gear(player.status)
th_update(cmdParams, eventArgs)
end
 Asura.Cambion
Offline
Server: Asura
Game: FFXI
user: Cambion
Posts: 392
By Asura.Cambion 2021-06-19 21:02:12
Link | Quote | Reply
 
Brynach said: »
Not sure what the issue is here. I just copied the raw code for Arislan's NIN lua, and at loading get this error:

>GearSwap: Lua runtime error: gearswap/flow.lua:350:
>GearSwap has detected an error in the user function self_command:
>... Files .../gearswap/data/NIN.lua:911: attempt to call global 'handle_equipping_gear' (a nil value)

This is the section of the flow.lua, bold is line 350:

function user_pcall(str,...)
if user_env then
if type(user_env[str]) == 'function' then
bool,err = pcall(user_env[str],...)
if not bool then error('\nGearSwap has detected an error in the user function '..str..':\n'..err) end
elseif user_env[str] then
msg.addon_msg(123,windower.to_shift_jis(tostring(str))..'() exists but is not a function')
end
end
end

And this is the section in the lua I just copied (no changes yet), bolded is line 911

function job_update(cmdParams, eventArgs)
handle_equipping_gear(player.status)
th_update(cmdParams, eventArgs)
end


Unfortunately this error is not line specific, the lines it's referencing won't help.

However, what it means, is that something in your lua, is referencing something else, that doesn't exist.

For example, I can create this issue when I have a set like this:
sets.midcast.Flash.Enmity = sets.Enmity

but when the lua doesn't have an existing:
sets.midcast.Flash

Other than sharing your lua and me going line by line, that's the best I can do for you. I just ran into this today actually.
Whatever you were playing with, is referencing something else that doesn't exist.
Offline
Posts: 179
By Subadai 2021-06-19 21:13:14
Link | Quote | Reply
 
handle_equipping_gear() is part of Mote's libs. Make sure you have include('Mote-Include.lua') in your get_sets() function.
Offline
Posts: 252
By Brynach 2021-06-19 21:37:59
Link | Quote | Reply
 
Yeah, this is the link to Arislan's github page for the NIN lua. I just copied the code and saved it locally. I havent made any changes, just loaded it. I think it may have an error somewhere.

Arislan NIN lua

I think this is the one that works with gearinfo to autoswap gear based on haste levels. I did have gearinfo loaded and running.

Ive found one from another source that will load, and I dont have an issue with any others.
 Asura.Cambion
Offline
Server: Asura
Game: FFXI
user: Cambion
Posts: 392
By Asura.Cambion 2021-06-19 22:06:16
Link | Quote | Reply
 
Brynach said: »
Yeah, this is the link to Arislan's github page for the NIN lua. I just copied the code and saved it locally. I havent made any changes, just loaded it. I think it may have an error somewhere.

Arislan NIN lua

I think this is the one that works with gearinfo to autoswap gear based on haste levels. I did have gearinfo loaded and running.

Ive found one from another source that will load, and I dont have an issue with any others.

All of Arislan's are based on Gearinfo. (I use Arislan as my original base, however modified it is at this point)
I highly recommend both Arislan's luas, and GearInfo for handling haste.
Offline
Posts: 252
By Brynach 2021-06-19 22:12:59
Link | Quote | Reply
 
Yeah, it looks like what I would like to use. I just dont know what is causing this error with his NIN lua.
Offline
Posts: 252
By Brynach 2021-06-19 22:23:20
Link | Quote | Reply
 
Ok, so I set the UGS in GearInfo to false, and the error stopped spamming.
When I set it to true, the errors came back.
 Asura.Msmissy
Offline
Server: Asura
Game: FFXI
user: msmissy
Posts: 40
By Asura.Msmissy 2021-06-20 08:58:41
Link | Quote | Reply
 
To get around the flow error I had to have someone send me that file, delete mine(iirc it is in the gs folder, but I’m not at my pc atm) and replace it with theirs. Seems that it got corrupted somehow.

I’m not saying this is the only way to fix it, just how I was able to fix it. And yeah, I use arislans luas as well because selidrel’s (sp.) make my head explode.
 Asura.Hitome
Offline
Server: Asura
Game: FFXI
Posts: 59
By Asura.Hitome 2021-06-25 21:13:34
Link | Quote | Reply
 
Hello. I occasionally get the following error when loading GearSwap:
Code
GearSwap: Lua runtime error: gearswap/helper_functions.lua:1083: attempt to perform arithmetic on field 'mp' (a nil value)


Does anyone have an idea why this happens? I went to look at the helper function and it looks like this on the referenced line:
Code
        rline.mpaftercast = player.mp - rline.mp_cost


This line is contained within this function:
Code
function spell_complete(rline)
    -- Hardcoded adjustments
    if rline and rline.skill == 40 and buffactive.Pianissimo and rline.cast_time == 8 then
        -- Pianissimo halves song casting time for buffs
        rline.cast_time = 4
        rline.targets.Party = true
    end
    if rline and rline.skill == 44 and buffactive.Entrust and string.find(rline.en,"Indi") then
        -- Entrust allows Indi- spells to be cast on party members
        rline.targets.Party = true
    end
    
    if rline == nil then
        return {tpaftercast = player.tp, mpaftercast = player.mp, mppaftercast = player.mpp}
    end
    if not rline.mp_cost or rline.mp_cost == -1 then rline.mp_cost = 0 end
    if not rline.tp_cost and rline.type == 'WeaponSkill' then
        rline.tp_cost = player.tp
    elseif not rline.tp_cost or rline.tp_cost == -1 then
        rline.tp_cost = 0
    end
    
    if rline.skill and tonumber(rline.skill) then
        rline.skill = res.skills[rline.skill][language]
    end
    
    if rline.element and tonumber(rline.element) then
        rline.element = res.elements[rline.element][language]
    end
    
    if rline.tp_cost == 0 then rline.tpaftercast = player.tp else
    rline.tpaftercast = player.tp - rline.tp_cost end
    
    if rline.mp_cost == 0 then
        rline.mpaftercast = player.mp
        rline.mppaftercast = player.mpp
    else
        rline.mpaftercast = player.mp - rline.mp_cost
        rline.mppaftercast = (player.mp - rline.mp_cost)/player.max_mp
    end
    
    return rline
end


Usually to fix this I have to shutdown and relaunch.
 Asura.Chiaia
VIP
Offline
Server: Asura
Game: FFXI
user: Demmis
Posts: 1406
By Asura.Chiaia 2021-06-25 23:21:01
Link | Quote | Reply
 
If you get this error use a JA then do //lua u gearswap. Then //lua l gearswap and you should be good to go. Iirc reload doesn't work.

The problem has already been fixed on dev.
[+]
 Asura.Hitome
Offline
Server: Asura
Game: FFXI
Posts: 59
By Asura.Hitome 2021-06-25 23:34:42
Link | Quote | Reply
 
Thank you very much. I'll give it a try next time it happens.
Offline
Posts: 3
By yangs00128 2021-06-27 11:27:29
Link | Quote | Reply
 
Hello I am using selindile Gs with rng helper.

I run into a weird situation that I set my auto ws to Leaden salute with tp 1250.

When I mele it works fine without problem.

However if I open up rnghelper and set same autows setting.
It will auto ra till 3000 tp to get am3
(I think this part is normal)
However after that if tp goes up to 1250, the Gs halts.
I have to do a range attack to start the Gs again.
It will shoot out leaden salute right the way and keep ra till next 1250 tp. And everything halts again.

Anyone can help me with this?
 Asura.Bladework
Offline
Server: Asura
Game: FFXI
user: Bladework
Posts: 16
By Asura.Bladework 2021-06-27 14:53:37
Link | Quote | Reply
 
Hello you code wizards.

Need a line for like some kind of true/false or something for when I'm engaged on Bard to disable main and sub slots. Then to reenable them. Maybe this is basic and easy and I'm just missing the mark.

I have no problems modifying ***normally but I'm not sure I've seen something like this except for Spicy's code which allows midcast swaps that I dont want.

Also which part of the file would this go in?

function user setup----maybe?

Thank you.
 Asura.Cambion
Offline
Server: Asura
Game: FFXI
user: Cambion
Posts: 392
By Asura.Cambion 2021-06-27 15:02:13
Link | Quote | Reply
 
Asura.Bladework said: »
Hello you code wizards.

Need a line for like some kind of true/false or something for when I'm engaged on Bard to disable main and sub slots. Then to reenable them. Maybe this is basic and easy and I'm just missing the mark.

I have no problems modifying ***normally but I'm not sure I've seen something like this except for Spicy's code which allows midcast swaps that I dont want.

Also which part of the file would this go in?

function user setup----maybe?

Thank you.

I don't know how smart people do it, but this is how I do it for PLD:


Edited to add more specifics for where each line goes:
Code
function job_setup()
	state.Weapon = M(false, "Weapon Lock")
end
Code
function user_setup()
	send_command('bind @w gs c toggle Weapon') --Windowkey'W'
end

Applies it for idle situations:
Code
function customize_idle_set(idleSet)
	if state.Weapon.current == 'on' then
		disable('Main')
		disable('Sub')
	else
		enable('Main')
		enable('Sub')		
	end	

    return idleSet
end


Same thing for engaged situations:
Code
function customize_melee_set(meleeSet)
	if state.Weapon.current == 'on' then
		disable('Main')
		disable('Sub')
	else
		enable('Main')
		enable('Sub')		
	end	

    return meleeSet
end	
 Asura.Kurdtray
Offline
Server: Asura
Game: FFXI
user: Kurdtray
Posts: 14
By Asura.Kurdtray 2021-07-03 22:43:09
Link | Quote | Reply
 
Still need help getting death to equip obi during weather/darksday.
Offline
Posts: 46
By kaiju9 2021-07-12 14:43:22
Link | Quote | Reply
 
Logged in for the first time in about a year today. Sitting there on RUN, and any action I try to take (spell/JA), I get an exception:

Code
GearSwap: Lua runtime error: gearswap/flow.lua:350:
GearSwap has detected an error in the user function precast:
...86)Windower4/addons/gearswap/libs/mote-utility.lua:592: attempt to call method 'any' (a nil value)


My Mote-Utility.lua seems to match the latest on GitHub. Here is the function it's referring to:

Code
function has_any_buff_of(buff_set)
    return buff_set:any(
        -- Returns true if any buff from buff set that is sent to this function returns true:
        function (b) return buffactive[b] end
    )
end


I logged buff_set and it's a table with 8 entries -- Charm, Mute, Omerta, etc.

Any recommendations?
Offline
Posts: 3
By arniester2 2021-07-14 06:04:13
Link | Quote | Reply
 
Is anyone able to explain why gearswap modifies the require() function available to user scripts? It appears to swap it out with `include_user` in the user_env which (perhaps deliberately) does not store entries in the loaded package table. This is causing modules required in the user space to be evaluated more than once, which is particularly undesirable if they have state that's intended to be shared as a singleton (like a store).
 Valefor.Tsukii
Offline
Server: Valefor
Game: FFXI
user: Tsuki
Posts: 10
By Valefor.Tsukii 2021-07-22 05:28:43
Link | Quote | Reply
 
Asura.Kurdtray said: »
Still need help getting death to equip obi during weather/darksday.

this should work
Code
if spell.action_type == 'Magic' then
    if spell.english == 'Death' then
        if world.weather_element == 'Dark' or world.day_element == 'Dark' then
			equip ({waist="Hachirin-no-Obi"})
	    end
	end
end


just put it somewhere in your midcast functions :)
 Asura.Kurdtray
Offline
Server: Asura
Game: FFXI
user: Kurdtray
Posts: 14
By Asura.Kurdtray 2021-07-25 23:06:20
Link | Quote | Reply
 
Yes, this worked beautifully, thanks.
[+]
 Valefor.Tsukii
Offline
Server: Valefor
Game: FFXI
user: Tsuki
Posts: 10
By Valefor.Tsukii 2021-07-28 03:52:31
Link | Quote | Reply
 
Asura.Kurdtray said: »
Yes, this worked beautifully, thanks.
glad to help~ :)
Online
Posts: 86
By zigzagzig 2021-08-03 23:54:28
Link | Quote | Reply
 
windower.register_event('gain buff', function(buff_id)
local buff_name = res.buffs[buff_id].name
if buff_name == 'stun' then equip(sets.defense.DT)
windower.add_to_chat(50,'DT [ SET EQUIPED ]')
elseif buff_name == 'terror' then equip(sets.defense.DT)
windower.add_to_chat(50,'DT [ SET EQUIPED ]')
elseif buff_name == 'paralysis' then equip(sets.defense.DT)
windower.add_to_chat(50,'DT [ SET EQUIPED ]')
send_command('@wait 1.0;input /p <=== Paralyzed please Para !')
elseif buff_name == 'silence' then
send_command('@wait 1.0;input /p <=== Silenced please Silena !')
elseif buff_name == 'petrification' then equip(sets.defense.DT)
windower.add_to_chat(50,'DT [ SET EQUIPED ]')
send_command('@wait 1.0;input /p <=== Petrification, please Stona !')
elseif buff_name == 'sleep' and player.status == 'Engaged' then equip(sets.WakeSleep)
windower.add_to_chat(50,'>>>> WAKE UP <<<<')
elseif buff_name == 'sleep' and player.status == 'Idle' then
send_command('@wait 1.0;input /p <=== zzZzz Asleep zzZzz , please Cure me!')
elseif buff_name == 'doom' then equip(sets.defense.DT)
send_command('@wait 1.0;input /p <=== DOOMED , please Cursna !')
elseif buff_name == 'charm' then
send_command('@wait 1.0;input /p <=== Charmed <== Can NOT be Sleep !')
end
end)


windower.register_event('lose buff', function(buff_id)
local buff_name = res.buffs[buff_id].name
if buff_name == 'doom' then
send_command('@wait 1.0;input /p <=== Doom removed, Thank you !')
elseif buff_name == 'petrification' then
send_command('@wait 1.0;input /p <=== is no longer Petrify Thank you !')
elseif buff_name == 'sleep' then
send_command('@wait 1.0;input /p <=== is no longer Asleep !')
elseif buff_name == 'silence' then
send_command('@wait 1.0;input /p <=== is no longer Silenced !')
elseif buff_name == 'paralysis' then
send_command('@wait 1.0;input /p <=== is no longer Paralyzed !')
elseif buff_name == 'doom' then
send_command('@wait 1.0;input /p <=== is no longer Doomed !')
end
end)

ps: the can't be sleep is on a job using Neck (when engaged) to wakeup , can be changed ....

ET BOOM !!
First Page 2 3 ... 162 163