Gearswap Support Thread

言語: JP EN DE FR
2010-06-21
New Items
users online
フォーラム » Windower » Support » Gearswap Support Thread
Gearswap Support Thread
First Page 2 3 ... 171 172 173 ... 181 182 183
 Sylph.Skinner
Offline
サーバ: Sylph
Game: FFXI
Posts: 254
By Sylph.Skinner 2022-10-21 15:20:37  
Hi all. Have just started playing again and getting used to Gearswap.

I'm looking for a lua or the logic that performs the following:

1. Detects if a party member casts Phalanx (on me, or another party member)
2. Equips Phalanx set

Thanks in advance!
 Carbuncle.Yiazmaat
Offline
サーバ: Carbuncle
Game: FFXI
user: Rudra
Posts: 164
By Carbuncle.Yiazmaat 2022-10-21 16:38:40  
Bismarck.Radec said: »
Carbuncle.Yiazmaat said: »
Is there a command to block automaton midcast gear swap on selindrile lua when you have a mage maton on and dont want to have your gear swapping while he nuke/enfeeble/cure ? Sometimes i have to delete the midcast gear when i dont and then reupdate them when i want them. Trying to see if i could just Block these through à command or something

Selindrile does support castingmode on pet actions, you should be able to do something like this, and toggle castingmode normally with 'gs c cycle castingmode'.
Code
state.CastingMode:options('Normal','NoPetCasting')
...
sets.midcast.Pet['Enfeebling Magic'] = <normal gear>
sets.midcast.Pet['Enfeebling Magic'].NoPetCasting = {} --No Swaps
...Repeat for any pet casting sets you've defined...


This is working great thanks.

Also im not sure if someone ever had the maton autoswap to enmity gear before Strobe/ Flashbulb. The sets.midcast.PetEnmityGear never works
 Asura.Bippin
Offline
サーバ: Asura
Game: FFXI
user: Gunit
Posts: 1075
By Asura.Bippin 2022-10-21 18:38:32  
Carbuncle.Yiazmaat said: »
Also im not sure if someone ever had the maton autoswap to enmity gear before Strobe/ Flashbulb. The sets.midcast.PetEnmityGear never works
Assuming you are using the current repo do you have state.PetEnmityGear set to true?
 Carbuncle.Yiazmaat
Offline
サーバ: Carbuncle
Game: FFXI
user: Rudra
Posts: 164
By Carbuncle.Yiazmaat 2022-10-21 19:23:00  
Asura.Bippin said: »
Carbuncle.Yiazmaat said: »
Also im not sure if someone ever had the maton autoswap to enmity gear before Strobe/ Flashbulb. The sets.midcast.PetEnmityGear never works
Assuming you are using the current repo do you have state.PetEnmityGear set to true?

It is set on true on the PUP.lua
Offline
Posts: 215
By zigzagzig 2022-10-22 09:05:06  
How do you implement detections of shadows and stop Blink cast ?

on this : ( tried also to add all state of shadows , but no success ) ( i mean 1 to 4 shadows up )

The detection of blink and stop Casting Shadows works , but not the opposite ....

function job_precast(spell, action, spellMap, eventArgs)
if spell.skill == "Ninjutsu" and not spell.interrupted then
do_ninja_tool_checks(spell, spellMap, eventArgs)
end
if spellMap == 'Utsusemi' and not spell.interrupted then
if buffactive['Copy Image (3)'] or buffactive['Copy Image (4+)'] then
cancel_spell()
send_command('gs c update')
add_to_chat(123, '**!! '..spell.english..' Canceled: [3+ IMAGES] !!**')
eventArgs.handled = true
return
elseif buffactive['Copy Image'] or buffactive['Copy Image (2)'] then
send_command('cancel 66; cancel 444; cancel Copy Image; cancel Copy Image (2)')
end
if spellMap == 'Utsusemi' and buffactive['Blink'] then
cancel_spell()
send_command('gs c update')
add_to_chat(123, '**!! '..spell.english..' Canceled: Blink is UP **')
eventArgs.handled = true
return
end
if spellMap == 'Blink' and buffactive['Copy Image (3)'] or buffactive['Copy Image (4+)'] then
cancel_spell()
send_command('gs c update')
add_to_chat(123, '**!! '..spell.english..' Canceled: Shadows UP **')
eventArgs.handled = true
return
end
end
end

Help will be much Appreciate , thanks.
Offline
Posts: 393
By drakefs 2022-10-22 11:53:57  
zigzagzig said: »
How do you implement detections of shadows and stop Blink cast ?

If not using a mote based lua, just add to your respective precast, midcast and aftercast functions. Remember to initialize ShadowType somewhere that only runs once as well:
Code
function job_setup()
    ShadowType = 'None'
end

function job_precast(spell, action, spellMap, eventArgs)
    if spell.name == 'Utsusemi: Ichi' and ShadowType == 'Ni' and (buffactive['Copy Image (3)'] or buffactive['Copy Image (4+)']) then
        cancel_spell()
    elseif spell.name == 'Utsusemi: Ni' and ShadowType == 'San' and buffactive['Copy Image (4+)'] then
        cancel_spell()
    end
end

function job_midcast(spell, action, spellMap, eventArgs)
    if spell.name == 'Utsusemi: Ichi' and (ShadowType == 'Ni' or ShadowType == 'San') and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then
        send_command('cancel copy image')
        send_command('cancel copy image (2)')
    elseif spell.name == 'Utsusemi: Ni' and ShadowType == 'San' and (buffactive['Copy Image'] or buffactive['Copy Image (2)'] or buffactive['Copy Image (3)']) then
        send_command('cancel copy image')
        send_command('cancel copy image (2)')
        send_command('cancel copy image (3)')
    end
end

function job_aftercast(spell, action, spellMap, eventArgs)
    if spell.name == 'Utsusemi: San' and spell.interrupted == false then
        ShadowType = 'San'
    elseif spell.name == 'Utsusemi: Ni' and spell.interrupted == false then
        ShadowType = 'Ni'
    elseif spell.name == 'Utsusemi: Ichi' and spell.interrupted == false then
        ShadowType = 'Ichi'
    end
end
Offline
Posts: 215
By zigzagzig 2022-10-22 12:55:03  
Thank's but it is not what i am targeting:

Yes i use Mote based sorry didn't precise it.

What i want is Stop blink cast if any shadow up.

Stop shadow cast if Blink is up.
Offline
Posts: 393
By drakefs 2022-10-22 13:55:29  
The precast does that. Sopping casting of shadows if 1 shadow is up is a bit dangerous but if you really want to:
Code
function job_precast(spell, action, spellMap, eventArgs)
    if (spell.name == 'Utsusemi: Ichi' or spell.name == 'Utsusemi: Ni' spell.name == 'Utsusemi: San') and (buffactive['Copy Image'] or buffactive['Copy Image (2)'] or buffactive['Copy Image (3)'] or buffactive['Copy Image (4+)']) then
        cancel_spell()
    end
end
Offline
Posts: 215
By zigzagzig 2022-10-22 15:18:28  
ty again but nope, sorry.

What i want is Stop casting Blink if any shadow up.

Stop casting shadow if Blink is up.

The Check Shadows buff works fine....

function job_precast(spell, action, spellMap, eventArgs)
if spell.skill == "Ninjutsu" and not spell.interrupted then
do_ninja_tool_checks(spell, spellMap, eventArgs)
end
if spellMap == 'Utsusemi' and not spell.interrupted then
if buffactive['Copy Image (3)'] or buffactive['Copy Image (4+)'] then
cancel_spell()
send_command('gs c update')
add_to_chat(123, '**!! '..spell.english..' Canceled: [3+ IMAGES] !!**')
eventArgs.handled = true
return
elseif buffactive['Copy Image'] or buffactive['Copy Image (2)'] then
send_command('cancel 66; cancel 444; cancel Copy Image; cancel Copy Image (2)')
end
Offline
Posts: 393
By drakefs 2022-10-22 17:12:27  
Sorry I totally blanked on the fact you where talking about the spell Blink.

try
Code
spell.name == 'Blink'

instead of
Code
spellMap == 'Blink'
 Phoenix.Uzugami
Offline
サーバ: Phoenix
Game: FFXI
user: SSJAV
By Phoenix.Uzugami 2022-10-22 17:44:27  
So trying to mess with my sam lua and add a movement check (to automatically change to danzo feet when I'm moving, and normal idle feet when I'm not) that I have in my cor lua, aaand that seems to have busted not only that function but a few of them? Can't get the movement part to work

but now the other functions have stopped working as well :T

AM3 timer/Doom notification/cancel WS if out of range, ability timers, etc, stopped working and I have no idea why. D:
Offline
Posts: 215
By zigzagzig 2022-10-22 19:00:43  
now working:

Cancel Shadow cast and gearswap if trying to overcast on 3/4 shadows
Cancel Blink cast and gearswap if Shadow(s) Up
Cancel Shadow cast and gearswap if Blink is up

( the fix was order, and Spell.english i guess, thank's )


function job_precast(spell, action, spellMap, eventArgs)
if spell.skill == "Ninjutsu" and not spell.interrupted then
do_ninja_tool_checks(spell, spellMap, eventArgs)
end
if spellMap == 'Utsusemi' and not spell.interrupted then
if buffactive['Blink'] then
cancel_spell()
send_command('gs c update')
add_to_chat(123, '**!! '..spell.english..' Canceled: Blink is UP **')
eventArgs.handled = true
end
end
if spell.english == "Blink" then
if buffactive['Copy Image'] or buffactive['Copy Image (2)'] or buffactive['Copy Image (3)'] or buffactive['Copy Image (4+)'] then
cancel_spell()
send_command('gs c update')
add_to_chat(123, '**!! '..spell.english..' Canceled: Shadows UP **')
eventArgs.handled = true
end
end
if spellMap == 'Utsusemi' then
if buffactive['Copy Image (3)'] or buffactive['Copy Image (4+)'] then
cancel_spell()
send_command('gs c update')
add_to_chat(123, '**!! '..spell.english..' Canceled: [3+ IMAGES] !!**')
eventArgs.handled = true
return
elseif buffactive['Copy Image'] or buffactive['Copy Image (2)'] then
send_command('cancel 66; cancel 444; cancel Copy Image; cancel Copy Image (2)')
end
end
end
 Carbuncle.Nynja
Offline
サーバ: Carbuncle
Game: FFXI
user: NynJa
Posts: 2339
By Carbuncle.Nynja 2022-10-22 22:20:20  
I'm trying to adjust DRK GS, based on Motes, so idle set uses Lugra for body/head instead of my standard idle set when under a certain mp percentage, but I cant figure out what I'm missing. I ripped the code from the Fucho latent refresh code, which I'm 99% sure works.

relevant code only:
function init_gear_sets()
sets.idle = {all the gimp gear}
sets.latent_refresh = {head="",body="Lugra Cloak +1"}
end

function customize_idle_set(idleSet)
if player.mpp < 51 then
set_combine(sets.idle, sets.latent_refresh)
end
return idleSet
end


Did I miss copying some other piece of code thats necessary? I've tried other slots to test the code and it still fails (ie: sets.latent_refresh = {waist="Flume Belt"}), so I dont believe its how I set the head/body for cloak.
 Bismarck.Radec
Offline
サーバ: Bismarck
Game: FFXI
user: Radec
Posts: 131
By Bismarck.Radec 2022-10-22 23:14:45  
2nd half is a little off. Try:
Code
function customize_idle_set(idleSet)
	if player.mpp < 51 then
		idleSet = set_combine(idleSet, sets.latent_refresh)
	end
	
	return idleSet
end
 Carbuncle.Nynja
Offline
サーバ: Carbuncle
Game: FFXI
user: NynJa
Posts: 2339
By Carbuncle.Nynja 2022-10-23 02:03:08  
yup, that works. I have to check my other mage lua's now where I took that code from and make sure they arent broken like that either.

Thank you
 Bahamut.Galakar
Offline
サーバ: Bahamut
Game: FFXI
user: Galakar
Posts: 174
By Bahamut.Galakar 2022-10-24 02:03:49  
I'm having a weird issue that I do not understand how to fix. The below code works but in a reverse way. When I have an avatar on, it equips my DT set, and when I do not have him, it changes me to Avatar set.
Code
function aftercast(spell)
    if pet_midaction() then
        return
    elseif pet.isvalid then
        equip(sets.idle.avatar)
    else
        equip(sets.idle.DT)
    end
end


Fixing it is easy (reverse code), but I would like to understand where I've made a mistake.
 Bahamut.Galakar
Offline
サーバ: Bahamut
Game: FFXI
user: Galakar
Posts: 174
By Bahamut.Galakar 2022-10-24 13:26:12  
Took me some reading and testing, but found the resolve. For anyone having the same problem in the future, this is what helped me:
Code
function aftercast(spell)
	if pet_midaction() then
		return
	end
	if pet.isvalid == true then
		equip(sets.idle.avatar)
	else
		equip(sets.idle.DT)
	end
end

function pet_change(pet,gain)
	if gain then
		equip(sets.idle.avatar)
	else
		equip(sets.idle.DT)
	end
end
Offline
Posts: 2
By trippytaru 2022-10-25 07:18:09  
Hello friends if this has been answered some where else please point-aru in the right direction.

I have simply adjusted a default mote SCH lua with my gears and have it loaded no errors and I can see gear changing in equipviewer

however my duration for Enhancing is not right if I use normal equipsets and do a long regen V it is 13 min.

when I use the same gear sets in gearswap my duration is only 6 min. I'm not quite sure what's going wrong I can see the proper gear swapping but maybe its changing to fast?

any help would be much appreciated.
Code
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job.  Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------

--[[
        Custom 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
--]]



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


    info.low_nukes = S{"Stone", "Water", "Aero", "Fire", "Blizzard", "Thunder"}
    info.mid_nukes = S{"Stone II", "Water II", "Aero II", "Fire II", "Blizzard II", "Thunder II",
                       "Stone III", "Water III", "Aero III", "Fire III", "Blizzard III", "Thunder III",
                       "Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV",}
    info.high_nukes = S{"Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"}

    gear.macc_hagondes = {name="Hagondes Cuffs", augments={'Phys. dmg. taken -3%','Mag. Acc.+29'}}

    send_command('bind ^` input /ma Stun <t>')

    select_default_macro_book()
end

function user_unload()
    send_command('unbind ^`')
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['Tabula Rasa'] = {legs="Pedagogy Pants +3"}


    -- Fast cast sets for spells

    sets.precast.FC = {
    main={ name="Musa", augments={'Path: C',}},
    sub="Enki Strap",
    ammo="Staunch Tathlum",
    head={ name="Telchine Cap", augments={'Enh. Mag. eff. dur. +10',}},
    body={ name="Peda. Gown +3", augments={'Enhances "Enlightenment" effect',}},
    hands="Arbatel Bracers +1",
    legs={ name="Telchine Braconi", augments={'Enh. Mag. eff. dur. +10',}},
    feet={ name="Telchine Pigaches", augments={'Enh. Mag. eff. dur. +10',}},
    neck="Yngvi Choker",
    waist="Embla Sash",
    left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','Latent effect: "Refresh"+1',}},
    right_ear="Malignance Earring",
    left_ring="Stikini Ring +1",
    right_ring="Stikini Ring +1",
    back={ name="Bookworm's Cape", augments={'INT+1','MND+4','"Regen" potency+10',}},
}

    sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {
    main={ name="Musa", augments={'Path: C',}},
    sub="Enki Strap",
    ammo="Staunch Tathlum",
    head={ name="Telchine Cap", augments={'Enh. Mag. eff. dur. +10',}},
    body={ name="Peda. Gown +3", augments={'Enhances "Enlightenment" effect',}},
    hands="Arbatel Bracers +1",
    legs={ name="Telchine Braconi", augments={'Enh. Mag. eff. dur. +10',}},
    feet={ name="Telchine Pigaches", augments={'Enh. Mag. eff. dur. +10',}},
    neck="Yngvi Choker",
    waist="Embla Sash",
    left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','Latent effect: "Refresh"+1',}},
    right_ear="Malignance Earring",
    left_ring="Stikini Ring +1",
    right_ring="Stikini Ring +1",
    back={ name="Bookworm's Cape", augments={'INT+1','MND+4','"Regen" potency+10',}},
})

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

    sets.precast.FC.Cure = set_combine(sets.precast.FC, {body="Heka's Kalasiris",back="Pahtli Cape"})

    sets.precast.FC.Curaga = sets.precast.FC.Cure

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


    -- Midcast Sets

    sets.midcast.FastRecast = {
    main={ name="Musa", augments={'Path: C',}},
    sub="Enki Strap",
    ammo="Staunch Tathlum",
    head={ name="Telchine Cap", augments={'Enh. Mag. eff. dur. +10',}},
    body={ name="Peda. Gown +3", augments={'Enhances "Enlightenment" effect',}},
    hands="Arbatel Bracers +1",
    legs={ name="Telchine Braconi", augments={'Enh. Mag. eff. dur. +10',}},
    feet={ name="Telchine Pigaches", augments={'Enh. Mag. eff. dur. +10',}},
    neck="Yngvi Choker",
    waist="Embla Sash",
    left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','Latent effect: "Refresh"+1',}},
    right_ear="Malignance Earring",
    left_ring="Stikini Ring +1",
    right_ring="Stikini Ring +1",
    back={ name="Bookworm's Cape", augments={'INT+1','MND+4','"Regen" potency+10',}},
}

    sets.midcast.Cure = {
    main={ name="Musa", augments={'Path: C',}},
    sub="Enki Strap",
    ammo="Staunch Tathlum",
    head={ name="Vanya Hood", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
    body="Agwu's Robe",
    hands={ name="Peda. Bracers +3", augments={'Enh. "Tranquility" and "Equanimity"',}},
    legs="Agwu's Slops",
    feet={ name="Vanya Clogs", augments={'"Cure" potency +5%','"Cure" spellcasting time -15%','"Conserve MP"+6',}},
    neck="Yngvi Choker",
    waist="Embla Sash",
    left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','Latent effect: "Refresh"+1',}},
    right_ear="Malignance Earring",
    left_ring="Janniston Ring",
    right_ring="Stikini Ring +1",
    back="Oretan. Cape +1",
}

    sets.midcast.CureWithLightWeather = {
    main={ name="Musa", augments={'Path: C',}},
    sub="Enki Strap",
    ammo="Staunch Tathlum",
    head={ name="Vanya Hood", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
    body="Agwu's Robe",
    hands={ name="Peda. Bracers +3", augments={'Enh. "Tranquility" and "Equanimity"',}},
    legs="Agwu's Slops",
    feet={ name="Vanya Clogs", augments={'"Cure" potency +5%','"Cure" spellcasting time -15%','"Conserve MP"+6',}},
    neck="Yngvi Choker",
    waist="Embla Sash",
    left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','Latent effect: "Refresh"+1',}},
    right_ear="Malignance Earring",
    left_ring="Janniston Ring",
    right_ring="Stikini Ring +1",
    back="Oretan. Cape +1",
}

    sets.midcast.Curaga = sets.midcast.Cure

    sets.midcast.Regen = {
    main={ name="Musa", augments={'Path: C',}},
    sub="Enki Strap",
    ammo="Staunch Tathlum",
    head="Arbatel Bonnet +1",
    body={ name="Telchine Chas.", augments={'Enh. Mag. eff. dur. +10',}},
    hands="Arbatel Bracers +1",
    legs={ name="Telchine Braconi", augments={'Enh. Mag. eff. dur. +10',}},
    feet={ name="Telchine Pigaches", augments={'Enh. Mag. eff. dur. +10',}},
    neck="Yngvi Choker",
    waist="Embla Sash",
    left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','Latent effect: "Refresh"+1',}},
    right_ear="Malignance Earring",
    left_ring="Stikini Ring +1",
    right_ring="Stikini Ring +1",
    back={ name="Bookworm's Cape", augments={'INT+1','MND+4','"Regen" potency+10',}},
}

    sets.midcast.Cursna = {
    main={ name="Musa", augments={'Path: C',}},
    sub="Enki Strap",
    ammo="Staunch Tathlum",
    head={ name="Vanya Hood", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
    body="Agwu's Robe",
    hands={ name="Peda. Bracers +3", augments={'Enh. "Tranquility" and "Equanimity"',}},
    legs="Agwu's Slops",
    feet={ name="Vanya Clogs", augments={'"Cure" potency +5%','"Cure" spellcasting time -15%','"Conserve MP"+6',}},
    neck="Yngvi Choker",
    waist="Embla Sash",
    left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','Latent effect: "Refresh"+1',}},
    right_ear="Malignance Earring",
    left_ring="Janniston Ring",
    right_ring="Stikini Ring +1",
    back="Oretan. Cape +1",
}

    sets.midcast['Enhancing Magic'] = {
    main={ name="Musa", augments={'Path: C',}},
    sub="Enki Strap",
    ammo="Staunch Tathlum",
    head={ name="Telchine Cap", augments={'Enh. Mag. eff. dur. +10',}},
    body={ name="Peda. Gown +3", augments={'Enhances "Enlightenment" effect',}},
    hands="Arbatel Bracers +1",
    legs={ name="Telchine Braconi", augments={'Enh. Mag. eff. dur. +10',}},
    feet={ name="Telchine Pigaches", augments={'Enh. Mag. eff. dur. +10',}},
    neck="Yngvi Choker",
    waist="Embla Sash",
    left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','Latent effect: "Refresh"+1',}},
    right_ear="Malignance Earring",
    left_ring="Stikini Ring +1",
    right_ring="Stikini Ring +1",
    back={ name="Bookworm's Cape", augments={'INT+1','MND+4','"Regen" potency+10',}},
}

    sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {waist="Siegel Sash"})

    sets.midcast.Storm = set_combine(sets.midcast['Enhancing Magic'], {feet="Pedagogy Loafers +3"})

    sets.midcast.Protect = {ring1="Sheltered Ring"}
    sets.midcast.Protectra = sets.midcast.Protect

    sets.midcast.Shell = {ring1="Sheltered Ring"}
    sets.midcast.Shellra = sets.midcast.Shell


    -- Custom spell classes
    sets.midcast.MndEnfeebles = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Sturm's Report",
        head="Nahtirah Hat",neck="Weike Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
        body="Manasa Chasuble",hands="Yaoyotl Gloves",ring1="Aquasoul Ring",ring2="Sangoma Ring",
        back="Refraction Cape",waist="Demonry Sash",legs="Bokwus Slops",feet="Bokwus Boots"}

    sets.midcast.IntEnfeebles = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Sturm's Report",
        head="Nahtirah Hat",neck="Weike Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
        body="Manasa Chasuble",hands="Yaoyotl Gloves",ring1="Icesoul Ring",ring2="Sangoma Ring",
        back="Refraction Cape",waist="Demonry Sash",legs="Bokwus Slops",feet="Bokwus Boots"}

    sets.midcast.ElementalEnfeeble = sets.midcast.IntEnfeebles

    sets.midcast['Dark Magic'] = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Incantor Stone",
        head="Nahtirah Hat",neck="Aesir Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
        body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
        back="Refraction Cape",waist="Goading Belt",legs="Bokwus Slops",feet="Bokwus Boots"}

    sets.midcast.Kaustra = {main="Lehbrailg +2",sub="Wizzan Grip",ammo="Witchstone",
        head="Hagondes Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Friomisi Earring",
        body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Icesoul Ring",ring2="Strendu Ring",
        back="Toro Cape",waist="Cognition Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}

    sets.midcast.Drain = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Incantor Stone",
        head="Nahtirah Hat",neck="Aesir Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
        body="Vanir Cotehardie",hands="Gendewitha Gages",ring1="Excelsis Ring",ring2="Sangoma Ring",
        back="Refraction Cape",waist="Goading Belt",legs="Pedagogy Pants",feet="Academic's Loafers"}

    sets.midcast.Aspir = sets.midcast.Drain

    sets.midcast.Stun = {main="Apamajas II",sub="Mephitis Grip",ammo="Incantor Stone",
        head="Nahtirah Hat",neck="Aesir Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
        body="Vanir Cotehardie",hands="Gendewitha Gages",ring1="Prolix Ring",ring2="Sangoma Ring",
        back="Refraction Cape",waist="Witful Belt",legs="Pedagogy Pants",feet="Academic's Loafers"}

    sets.midcast.Stun.Resistant = set_combine(sets.midcast.Stun, {main="Lehbrailg +2"})


    -- Elemental Magic sets are default for handling low-tier nukes.
    sets.midcast['Elemental Magic'] = {main="Lehbrailg +2",sub="Zuuxowu Grip",ammo="Dosis Tathlum",
        head="Hagondes Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Friomisi Earring",
        body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Icesoul Ring",ring2="Acumen Ring",
        back="Toro Cape",waist=gear.ElementalObi,legs="Hagondes Pants",feet="Hagondes Sabots"}

    sets.midcast['Elemental Magic'].Resistant = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Dosis Tathlum",
        head="Hagondes Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Friomisi Earring",
        body="Vanir Cotehardie",hands=gear.macc_hagondes,ring1="Icesoul Ring",ring2="Acumen Ring",
        back="Toro Cape",waist=gear.ElementalObi,legs="Hagondes Pants",feet="Bokwus Boots"}

    -- Custom refinements for certain nuke tiers
    sets.midcast['Elemental Magic'].HighTierNuke = set_combine(sets.midcast['Elemental Magic'], {sub="Wizzan Grip"})

    sets.midcast['Elemental Magic'].HighTierNuke.Resistant = set_combine(sets.midcast['Elemental Magic'].Resistant, {sub="Wizzan Grip"})

    sets.midcast.Impact = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Dosis Tathlum",
        head=empty,neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
        body="Twilight Cloak",hands=gear.macc_hagondes,ring1="Icesoul Ring",ring2="Sangoma Ring",
        back="Toro Cape",waist="Demonry Sash",legs="Hagondes Pants",feet="Bokwus Boots"}


    -- Sets to return to when not performing an action.

    -- Resting sets
    sets.resting = {main="Chatoyant Staff",sub="Mephitis Grip",
        head="Nefer Khat +1",neck="Wiglen Gorget",
        body="Heka's Kalasiris",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
        waist="Austerity Belt",legs="Nares Trews",feet="Serpentes Sabots"}


    -- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)

    sets.idle.Town = {
    main="Malignance Pole",
    sub="Enki Strap",
    ammo="Staunch Tathlum",
    head="Nyame Helm",
    body="Agwu's Robe",
    hands="Nyame Gauntlets",
    legs="Nyame Flanchard",
    feet="Nyame Sollerets",
    neck="Yngvi Choker",
    waist="Embla Sash",
    left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','Latent effect: "Refresh"+1',}},
    right_ear="Infused Earring",
    left_ring="Stikini Ring +1",
    right_ring="Stikini Ring +1",
    back="Kumbira Cape",
}

    sets.idle.Field = {
    main="Malignance Pole",
    sub="Enki Strap",
    ammo="Staunch Tathlum",
    head="Nyame Helm",
    body="Agwu's Robe",
    hands="Nyame Gauntlets",
    legs="Nyame Flanchard",
    feet="Nyame Sollerets",
    neck="Yngvi Choker",
    waist="Embla Sash",
    left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','Latent effect: "Refresh"+1',}},
    right_ear="Infused Earring",
    left_ring="Stikini Ring +1",
    right_ring="Stikini Ring +1",
    back="Kumbira Cape",
}

    sets.idle.Field.PDT = {
    main="Malignance Pole",
    sub="Enki Strap",
    ammo="Staunch Tathlum",
    head="Nyame Helm",
    body="Agwu's Robe",
    hands="Nyame Gauntlets",
    legs="Nyame Flanchard",
    feet="Nyame Sollerets",
    neck="Yngvi Choker",
    waist="Embla Sash",
    left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','Latent effect: "Refresh"+1',}},
    right_ear="Infused Earring",
    left_ring="Stikini Ring +1",
    right_ring="Stikini Ring +1",
    back="Kumbira Cape",
}

    sets.idle.Field.Stun = {
    main="Malignance Pole",
    sub="Enki Strap",
    ammo="Staunch Tathlum",
    head="Nyame Helm",
    body="Agwu's Robe",
    hands="Nyame Gauntlets",
    legs="Nyame Flanchard",
    feet="Nyame Sollerets",
    neck="Yngvi Choker",
    waist="Embla Sash",
    left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','Latent effect: "Refresh"+1',}},
    right_ear="Infused Earring",
    left_ring="Stikini Ring +1",
    right_ring="Stikini Ring +1",
    back="Kumbira Cape",
}

    sets.idle.Weak = {
    main="Malignance Pole",
    sub="Enki Strap",
    ammo="Staunch Tathlum",
    head="Nyame Helm",
    body="Agwu's Robe",
    hands="Nyame Gauntlets",
    legs="Nyame Flanchard",
    feet="Nyame Sollerets",
    neck="Yngvi Choker",
    waist="Embla Sash",
    left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','Latent effect: "Refresh"+1',}},
    right_ear="Infused Earring",
    left_ring="Stikini Ring +1",
    right_ring="Stikini Ring +1",
    back="Kumbira Cape",
}

    -- Defense sets

    sets.defense.PDT = {
    main="Malignance Pole",
    sub="Enki Strap",
    ammo="Staunch Tathlum",
    head="Nyame Helm",
    body="Agwu's Robe",
    hands="Nyame Gauntlets",
    legs="Nyame Flanchard",
    feet="Nyame Sollerets",
    neck="Yngvi Choker",
    waist="Embla Sash",
    left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','Latent effect: "Refresh"+1',}},
    right_ear="Infused Earring",
    left_ring="Stikini Ring +1",
    right_ring="Stikini Ring +1",
    back="Kumbira Cape",
}

    sets.defense.MDT = {
    main="Malignance Pole",
    sub="Enki Strap",
    ammo="Staunch Tathlum",
    head="Nyame Helm",
    body="Agwu's Robe",
    hands="Nyame Gauntlets",
    legs="Nyame Flanchard",
    feet="Nyame Sollerets",
    neck="Yngvi Choker",
    waist="Embla Sash",
    left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','Latent effect: "Refresh"+1',}},
    right_ear="Infused Earring",
    left_ring="Stikini Ring +1",
    right_ring="Stikini Ring +1",
    back="Kumbira Cape",
}

    sets.Kiting = {feet="Herald's Gaiters"}

    sets.latent_refresh = {
    main="Malignance Pole",
    sub="Enki Strap",
    ammo="Staunch Tathlum",
    head="Nyame Helm",
    body="Agwu's Robe",
    hands="Nyame Gauntlets",
    legs="Nyame Flanchard",
    feet="Nyame Sollerets",
    neck="Yngvi Choker",
    waist="Embla Sash",
    left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','Latent effect: "Refresh"+1',}},
    right_ear="Infused Earring",
    left_ring="Stikini Ring +1",
    right_ring="Stikini Ring +1",
    back="Kumbira Cape",
}

    -- 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 = {
        head="Zelus Tiara",
        body="Vanir Cotehardie",hands="Bokwus Gloves",ring1="Rajas Ring",
        waist="Goading Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}



    -- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
    sets.buff['Ebullience'] = {head="Savant's Bonnet +2"}
    sets.buff['Rapture'] = {head="Savant's Bonnet +2"}
    sets.buff['Perpetuance'] = {
    main={ name="Musa", augments={'Path: C',}},
    sub="Enki Strap",
    ammo="Staunch Tathlum",
    head={ name="Telchine Cap", augments={'Enh. Mag. eff. dur. +10',}},
    body={ name="Peda. Gown +3", augments={'Enhances "Enlightenment" effect',}},
    hands="Arbatel Bracers +1",
    legs={ name="Telchine Braconi", augments={'Enh. Mag. eff. dur. +10',}},
    feet={ name="Telchine Pigaches", augments={'Enh. Mag. eff. dur. +10',}},
    neck="Yngvi Choker",
    waist="Embla Sash",
    left_ear={ name="Moonshade Earring", augments={'Mag. Acc.+4','Latent effect: "Refresh"+1',}},
    right_ear="Malignance Earring",
    left_ring="Stikini Ring +1",
    right_ring="Stikini Ring +1",
    back={ name="Bookworm's Cape", augments={'INT+1','MND+4','"Regen" potency+10',}},
}
    sets.buff['Immanence'] = {hands="Savant's Bracers +2"}
    sets.buff['Penury'] = {legs="Savant's Pants +2"}
    sets.buff['Parsimony'] = {legs="Savant's Pants +2"}
    sets.buff['Celerity'] = {feet="Pedagogy Loafers +3"}
    sets.buff['Alacrity'] = {feet="Pedagogy Loafers +3"}

    sets.buff['Klimaform'] = {feet="Savant's Loafers +2"}

    sets.buff.FullSublimation = {head="Academic's Mortarboard",ear1="Savant's Earring",body="Pedagogy Gown +3"}
    sets.buff.PDTSublimation = {head="Academic's Mortarboard",ear1="Savant's Earring"}

    --sets.buff['Sandstorm'] = {feet="Desert Boots"}
end

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

-- Run after the general midcast() is done.
function job_post_midcast(spell, action, spellMap, eventArgs)
    if spell.action_type == 'Magic' then
        apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
    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
end

-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
    if stateField == 'Offense Mode' then
        if newValue == 'Normal' then
            disable('main','sub','range')
        else
            enable('main','sub','range')
        end
    end
end

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

-- 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' then
                return 'CureWithLightWeather'
            end
        elseif spell.skill == 'Enfeebling Magic' then
            if spell.type == 'WhiteMagic' then
                return 'MndEnfeebles'
            else
                return 'IntEnfeebles'
            end
        elseif spell.skill == 'Elemental Magic' then
            if info.low_nukes:contains(spell.english) then
                return 'LowTierNuke'
            elseif info.mid_nukes:contains(spell.english) then
                return 'MidTierNuke'
            elseif info.high_nukes:contains(spell.english) then
                return 'HighTierNuke'
            end
        end
    end
end

function customize_idle_set(idleSet)
    if state.Buff['Sublimation: Activated'] then
        if state.IdleMode.value == 'Normal' then
            idleSet = set_combine(idleSet, sets.buff.FullSublimation)
        elseif state.IdleMode.value == 'PDT' then
            idleSet = set_combine(idleSet, sets.buff.PDTSublimation)
        end
    end

    if player.mpp < 51 then
        idleSet = set_combine(idleSet, sets.latent_refresh)
    end

    return idleSet
end

-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
    if cmdParams[1] == 'user' and not (buffactive['light arts']      or buffactive['dark arts'] or
                       buffactive['addendum: white'] or buffactive['addendum: black']) then
        if state.IdleMode.value == 'Stun' then
            send_command('@input /ja "Dark Arts" <me>')
        else
            send_command('@input /ja "Light Arts" <me>')
        end
    end

    update_active_strategems()
    update_sublimation()
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)
    display_current_caster_state()
    eventArgs.handled = true
end

-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------

-- Called for direct player commands.
function job_self_command(cmdParams, eventArgs)
    if cmdParams[1]:lower() == 'scholar' then
        handle_strategems(cmdParams)
        eventArgs.handled = true
    end
end

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

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


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

Offline
Posts: 393
By drakefs 2022-10-25 11:12:53  
trippytaru said: »
when I use the same gear sets in gearswap my duration is only 6 min.

Turn on debug mode (//gs debugmode). What set is it equipping for midcast?
 Leviathan.Boposhopo
Offline
サーバ: Leviathan
Game: FFXI
user: Boposhopo
Posts: 229
By Leviathan.Boposhopo 2022-10-25 12:24:38  
While maybe not the entire reason, on line 494 only put your Arbatel Bracers +1 in there. Putting an entire set means if you use perpetuance it doesn't matter what else you cast that whole set is overwriting w/e you equip. Specifically in this case your Telchine Body that has Regen duration + on the body naturally.
Offline
Posts: 2
By trippytaru 2022-10-25 16:42:34  
precast
sets.precast.FC{"Enhancing Magic"}
midcast
sets.midcast.Regen
aftercast
sets.idle.Town

I also adjusted per boposhopo on line 494 still ended up with the same 6 min duration

I was using the example with regen but my haste pro and shell are all not getting the proper duration not sure if that helps find the issue.
 Carbuncle.Nynja
Offline
サーバ: Carbuncle
Game: FFXI
user: NynJa
Posts: 2339
By Carbuncle.Nynja 2022-10-25 23:43:27  
I'm presuming that the //gs debugmode would report it equipping your perpetuance set, and its not showing up there.

nvm, just tried on my sch, and it doesnt show up for me in debug, despite it actually equipping arbatel hands.

Your sets.midcast.Regen and sets.buff['Perpetuance'] are different on these two slots:
sets.midcast.Regen = {
head="Arbatel Bonnet +1",
body={ name="Telchine Chas.", augments={'Enh. Mag. eff. dur. +10',}},

sets.buff['Perpetuance'] = {
head={ name="Telchine Cap", augments={'Enh. Mag. eff. dur. +10',}},
body={ name="Peda. Gown +3", augments={'Enhances "Enlightenment" effect',}},

If you look at the actual equip screen (not via equipviewer) and cast a perp-regen, which set of head/body armor are you using?
 Carbuncle.Samuraiking
Offline
サーバ: Carbuncle
Game: FFXI
user: bossgalka
Posts: 108
By Carbuncle.Samuraiking 2022-10-26 02:49:48  
Having trouble with the new Empy+3 armor. It's not automatically swapping in my new mnk pants at all, despite it being correct syntax, and when I try to manually put the pants on, Gearswap freaks out and spams the same error code 10 times per second:

Gearswap: Lua runtime error: gearswap/equip_processing.lua:246: attempt to index field '?' (a nil value)

The code in question in the equip_processing lua is:
Code
function to_names_set(equipment)
    local equip_package = {}
    
    for ind,cur_item in pairs(equipment) do
        local name = 'empty'
        if type(cur_item) == 'table' and cur_item.slot ~= empty then
            if items[to_bag_api(res.bags[cur_item.bag_id].english)][cur_item.slot].id == 0 then return {} end
            -- refresh_player() can run after equip packets arrive but before the item array is fully loaded,
            -- which results in the id still being the initialization value.
            name = res.items[items[to_bag_api(res.bags[cur_item.bag_id].english)][cur_item.slot].id][language]
        end
        
        if tonumber(ind) and ind >= 0 and ind <= 15 and math.floor(ind) == ind then
            equip_package[toslotname(ind)] = name
        else
            equip_package[tostring(ind)] = name
        end
    end

    return equip_package
end


For content, they are Bhikku Hose +3 and in my Wardrobe4. They were previously working as Bhikku Hose +2 in the same wardrobe with no issues. I tried updating my selindriles lib files since those were updated 20 days ago by Headtat. Unfotunately, this is a base gearswap file, not a lib one, so it didn't help. There's also, not to my knowledge, an update for the base Gearswap addon either.
 Bismarck.Xurion
Offline
サーバ: Bismarck
Game: FFXI
user: Xurion
Posts: 693
By Bismarck.Xurion 2022-10-26 06:21:44  
Sounds like you have other logic that is repeating elsewhere. Can you upload your whole file?
 Bismarck.Radec
Offline
サーバ: Bismarck
Game: FFXI
user: Radec
Posts: 131
By Bismarck.Radec 2022-10-26 09:51:22  
Carbuncle.Samuraiking said: »
Having trouble with the new Empy+3 armor. It's not automatically swapping in my new mnk pants at all, despite it being correct syntax, and when I try to manually put the pants on, Gearswap freaks out and spams the same error code 10 times per second:

Gearswap: Lua runtime error: gearswap/equip_processing.lua:246: attempt to index field '?' (a nil value)

The code in question in the equip_processing lua is:
Code
...


For content, they are Bhikku Hose +3 and in my Wardrobe4. They were previously working as Bhikku Hose +2 in the same wardrobe with no issues. I tried updating my selindriles lib files since those were updated 20 days ago by Headtat. Unfotunately, this is a base gearswap file, not a lib one, so it didn't help. There's also, not to my knowledge, an update for the base Gearswap addon either.

Do you have any other +3 armor that is working?
This could be a resources issue. Check if Bhikku Hose +3 are present in Windower/res/items.lua - should be on line 19347
[23622] = {id=23622,en="Bhikku Hose +3",...

If they're missing, replace the file from https://github.com/Windower/Resources
 Carbuncle.Samuraiking
Offline
サーバ: Carbuncle
Game: FFXI
user: bossgalka
Posts: 108
By Carbuncle.Samuraiking 2022-10-26 12:50:11  
Bismarck.Xurion said: »
Sounds like you have other logic that is repeating elsewhere. Can you upload your whole file?

Sure. As per the other post by Radec, it's likely an ID issue in items.lua though. I think that error is just the one telling me why I am getting it.

Bismarck.Radec said: »
Carbuncle.Samuraiking said: »
Having trouble with the new Empy+3 armor. It's not automatically swapping in my new mnk pants at all, despite it being correct syntax, and when I try to manually put the pants on, Gearswap freaks out and spams the same error code 10 times per second:

Gearswap: Lua runtime error: gearswap/equip_processing.lua:246: attempt to index field '?' (a nil value)

The code in question in the equip_processing lua is:
Code
...


For content, they are Bhikku Hose +3 and in my Wardrobe4. They were previously working as Bhikku Hose +2 in the same wardrobe with no issues. I tried updating my selindriles lib files since those were updated 20 days ago by Headtat. Unfotunately, this is a base gearswap file, not a lib one, so it didn't help. There's also, not to my knowledge, an update for the base Gearswap addon either.

Do you have any other +3 armor that is working?
This could be a resources issue. Check if Bhikku Hose +3 are present in Windower/res/items.lua - should be on line 19347
[23622] = {id=23622,en="Bhikku Hose +3",...

If they're missing, replace the file from https://github.com/Windower/Resources

Legs are the only piece I made, still need more points for the next piece, so I can't check other ones.

It does seem my items.lua is outdated and doesn't have ANY Empy+3 IDs in them at all. The resource you linked is the exact same file I had already and both it and mine are missing +3 as they are one month+ old.

My items.lua file
Offline
Posts: 393
By drakefs 2022-10-26 15:14:39  
Carbuncle.Samuraiking said: »
It does seem my items.lua is outdated and doesn't have ANY Empy+3 IDs in them at all. The resource you linked is the exact same file I had already and both it and mine are missing +3 as they are one month+ old.

Delete windower\res, windower\updates and windower\addons\libs and then, if open, close all instances of the game and windower and restart windower.
[+]
 Carbuncle.Yiazmaat
Offline
サーバ: Carbuncle
Game: FFXI
user: Rudra
Posts: 164
By Carbuncle.Yiazmaat 2022-10-26 16:03:45  
I finally found the mistake that didnt make the autoswap for pet enmity gear for strobe and flash. But know i got an other issue, which is that it wont swap before or even midaction unless i move my char or take an action like 5 sec before the JA is ready. I tried to modify the recast from the original which are 38 and 23 to 45 and 30, but it didnt change anything. Anyone know if it could be possible to force the swap like 2 sec before strobe and flash ? I know that it can recognize strobe and flashbulb attachements.
Code
-- Var to track the current pet mode.
    state.PetMode = M{['description']='Pet Mode', 'None','Melee','Ranged','HybridRanged','Tank','LightTank','Magic','Heal','Nuke'}

	state.AutoManeuvers = M{['description']='Auto Maneuver List', 'Default','Melee','Ranged','HybridRanged','Tank','LightTank','Magic','Heal','Nuke'}
	state.AutoPuppetMode = M(false, 'Auto Puppet Mode')
	state.AutoRepairMode = M(true, 'Auto Repair Mode')
	state.AutoDeployMode = M(true, 'Auto Deploy Mode')
	state.AutoPetMode 	 = M(true, 'Auto Pet Mode')
	state.PetWSGear		 = M(true, 'Pet WS Gear')
	state.PetEnmityGear	 = M(true, 'Pet Enmity Gear')

    autows = "Victory Smite"
	autofood = 'Akamochi'
	lastpettp = 0
	deactivatehpp = 100
	repairhpp = 45
	PupFlashReady = 0
	PupVokeReady = 0
	PupFlashRecast = 38
	PupVokeRecast = 23

	update_pet_mode()
	update_melee_groups()
	init_job_states({"Capacity","AutoPuppetMode","PetWSGear","AutoRepairMode","AutoRuneMode","AutoTrustMode","AutoWSMode","AutoShadowMode","AutoFoodMode","AutoStunMode","AutoDefenseMode",},{"AutoBuffMode","AutoSambaMode","Weapons","OffenseMode","WeaponskillMode","IdleMode","Passive","RuneElement","TreasureMode",})
end

Code
function job_pet_midcast(spell, spellMap, eventArgs)
--[[ Not working due to delay, preserving in case it does in the future.
    if petWeaponskills:contains(spell.english) then
        classes.CustomClass = "Weaponskill"
		if sets.midcast.Pet.WeaponSkill[spell] then
			equip(sets.midcast.Pet.WeaponSkill[spell.english])
		else
			equip(sets.midcast.Pet.WeaponSkill)
		end
    end
]]
end

windower.raw_register_event('action', function(act)
	if pet.isvalid and pet.id == act.actor_id then
		if act.category == 11 then
			if act.param == 1945 then
				PupVokeReady = os.clock() +	PupVokeRecast
			elseif act.param == 1947 then
				PupFlashReady = os.clock() + PupFlashRecast
			end
			send_command('gs c forceequip')
		end
	end
end)

Code
function job_customize_idle_set(idleSet)
	if pet.isvalid and pet.status == 'Engaged' then
		local now = os.clock()
		if state.PetWSGear.value and sets.midcast.Pet and pet.tp and pet.tp > 999 then
			if sets.midcast.Pet.PetWSGear and sets.midcast.Pet.PetWSGear[state.PetMode.value] then
				idleSet = set_combine(idleSet, sets.midcast.Pet.PetWSGear[state.PetMode.value])
			elseif sets.midcast.Pet.PetWSGear then
				idleSet = set_combine(idleSet, sets.midcast.Pet.PetWSGear)
			end
		elseif state.PetEnmityGear.value and sets.midcast.Pet.PetEnmityGear and ((PupFlashReady < now and buffactive['Light Maneuver']) or (PupVokeReady < now and buffactive['Fire Maneuver'])) then
			idleSet = set_combine(idleSet, sets.midcast.Pet.PetEnmityGear)
		elseif sets.idle.Pet.Engaged[state.PetMode.value] then
			idleSet = set_combine(idleSet, sets.idle.Pet.Engaged[state.PetMode.value])
		else
			idleSet = set_combine(idleSet, sets.idle.Pet.Engaged)
		end

		if buffactive['Overdrive'] and sets.buff.Overdrive then
			idleSet = set_combine(idleSet, sets.buff.Overdrive)
		end
	elseif  data.jobs.mage_jobs:contains(player.sub_job) then
		if player.mpp < 51 and (state.IdleMode.value == 'Normal' or state.IdleMode.value:contains('Sphere')) then
			if sets.latent_refresh then
				idleSet = set_combine(idleSet, sets.latent_refresh)
			end
		end
	end
	return idleSet
end

Code
function job_customize_melee_set(meleeSet)
	if pet.isvalid and pet.status == 'Engaged' and sets.midcast.Pet then
		local now = os.clock()
		if state.PetWSGear.value and pet.tp and pet.tp > 999 and player.tp < 999 and sets.midcast.Pet and sets.midcast.Pet.PetWSGear then
			if sets.midcast.Pet.PetWSGear[state.PetMode.value] then
				meleeSet = set_combine(meleeSet, sets.midcast.Pet.PetWSGear[state.PetMode.value])
			else
				meleeSet = set_combine(meleeSet, sets.midcast.Pet.PetWSGear)
			end
		elseif state.PetEnmityGear.value and sets.midcast.Pet.PetEnmityGear and ((PupFlashReady < now and buffactive['Light Maneuver']) or (PupVokeReady < now and buffactive['Fire Maneuver'])) then
			meleeSet = set_combine(meleeSet, sets.midcast.Pet.PetEnmityGear)
		end
	end
	
    return meleeSet
end
 Carbuncle.Samuraiking
Offline
サーバ: Carbuncle
Game: FFXI
user: bossgalka
Posts: 108
By Carbuncle.Samuraiking 2022-10-26 20:01:21  
drakefs said: »
Carbuncle.Samuraiking said: »
It does seem my items.lua is outdated and doesn't have ANY Empy+3 IDs in them at all. The resource you linked is the exact same file I had already and both it and mine are missing +3 as they are one month+ old.

Delete windower\res, windower\updates and windower\addons\libs and then, if open, close all instances of the game and windower and restart windower.

Thank you, this fixed everything, including additional issues I didn't even post about. My warp ring function and rng/cor ammo from REMA function were f_cked as well and I was gonna post about them later, but deleting and redownloading all the files fixed it all.

I didn't delete the windower/addons/libs folder though in case it had custom settings I wanted to keep, but didn't actually check to see if that was the case or not, but either way it's fixed and I appreciate it.
 Bismarck.Arakuine
Offline
サーバ: Bismarck
Game: FFXI
user: Alaan
Posts: 4
By Bismarck.Arakuine 2022-10-26 20:21:14  
Hi, I just started using the Geomancer Gearswap.lua files, and it works insofar as I don't get any errors or anything and it runs. But I've started entering my gear pieces, and testing as I go, and I've found that my Main, Sub, Ammo and Ranged slots won't change when I execute different functions. Whether I change Idle modes, or cast a spell, most of my other gear will change over, but those 4 slots will not. I've double checked by having showswaps=true and they definitely arent changing over. I usually use Selindrile's stuff and I've never experienced this before.

Any advice is appreciated.
First Page 2 3 ... 171 172 173 ... 181 182 183
Log in to post.