Gearswap Support Thread

Eorzea Time
 
 
 
Language: JP EN FR DE
users online
Forum » Windower » Support » Gearswap Support Thread
Gearswap Support Thread
First Page 2 3 ... 178 179 180 ... 183 184 185
Offline
By Dodik 2023-08-07 11:12:50
Link | Quote | Reply
 
Selindrile's luas use the folder per character approach. Much cleaner.
Offline
Posts: 464
By drakefs 2023-08-07 15:37:31
Link | Quote | Reply
 
Thats not specific to Selindrile luas. GS, by default, loads data\<characterName>\<job>.lua, data\<chatacterName_job>.lua or data\<job>.lua (in that order).

I too, prefer character folders.
[+]
 Phoenix.Darwinion
Offline
Server: Phoenix
Game: FFXI
user: DBrown67
Posts: 37
By Phoenix.Darwinion 2023-08-24 05:37:17
Link | Quote | Reply
 
How would I go about writing code to equip Sroda ring if there are trusts in the party, but equip something different if no trusts?

In not even sure if this is possible.
Offline
Posts: 464
By drakefs 2023-08-24 12:31:14
Link | Quote | Reply
 
in a motes based lua:
Code
    function user_setup()
        trustList = S{'Apururu','Qultada','etc'}
    end

    function customize_melee_set(meleeSet)
        if (windower.ffxi.get_party().p5 and trustList:contains(windower.ffxi.get_party().p5.name)) or
        (windower.ffxi.get_party().p4 and trustList:contains(windower.ffxi.get_party().p4.name)) or
        (windower.ffxi.get_party().p3 and trustList:contains(windower.ffxi.get_party().p3.name)) or
        (windower.ffxi.get_party().p2 and trustList:contains(windower.ffxi.get_party().p2.name)) or
        (windower.ffxi.get_party().p1 and trustList:contains(windower.ffxi.get_party().p1.name)) then
            meleeSet = set_combine(meleeSet, {right_ring = "Sroda Ring"})
        end
        return meleeSet
    end


Note, this will not work for WS, you will need to modify the equipSet at the end of the precast (use job_post_precast()).


in a non-motes based lua, same code but you will need to define the trustList elsewhere and use the if logic at the end of your precast and aftercast for physical WS and TP sets:
Code
    function get_sets()
        trustList = S{'Apururu','Qultada','etc'}
    end

    function aftercast()
        if-then-stuff()...
        if (windower.ffxi.get_party().p5 and trustList:contains(windower.ffxi.get_party().p5.name)) or
        (windower.ffxi.get_party().p4 and trustList:contains(windower.ffxi.get_party().p4.name)) or
        (windower.ffxi.get_party().p3 and trustList:contains(windower.ffxi.get_party().p3.name)) or
        (windower.ffxi.get_party().p2 and trustList:contains(windower.ffxi.get_party().p2.name)) or
        (windower.ffxi.get_party().p1 and trustList:contains(windower.ffxi.get_party().p1.name)) then
            equip(right_ring = "Sroda Ring")
    end


You can also try asking in the windower discord if there is a an easier way to determine if a trust is in your party.

EDIT: added a check to see if party member exist to suppress errors.
Offline
Posts: 69
By AegParm 2023-08-28 11:33:57
Link | Quote | Reply
 
Using Sel's BRD lua--whenever I use //warp from the Myhome lua, gearswap takes the warp ring off after 1 or 2 seconds and the warp doesn't happen. I see Myhome disables the ring slot slot, but Sel's gs seems to override it. Anyway to make Sel's gs and Myhome play nicely together?
Offline
Posts: 464
By drakefs 2023-08-28 11:45:53
Link | Quote | Reply
 
I believe this is more of a motes issue (somehow ignoring disabled slots). You need to find out what is overriding it before you can attempt to fix it.

Generally the offenders are
Code
function customize_idle_set(idleSet)


and
Code
function customize_melee_set(meleeSet)


When you find the code causing the issue, you just need to make sure that you have logic in place to equip the ring along with whatever else it is trying to equip.
 Cerberus.Shadowmeld
Offline
Server: Cerberus
Game: FFXI
Posts: 1809
By Cerberus.Shadowmeld 2023-08-28 12:23:12
Link | Quote | Reply
 
Sel’s luas have built in functionality for all the teleport/warp items already. You shouldn’t need myhome or smeagol or anthing
[+]
 Bismarck.Serpentarius
Offline
Server: Bismarck
Game: FFXI
Posts: 4
By Bismarck.Serpentarius 2023-08-28 13:02:44
Link | Quote | Reply
 
For some reason my idle states aren't updating gear, but only on certain job luas. I use the same lua template for all of my jobs. Ive cross referenced my working luas with those that don't and can't seem to pinpoint the discrepancy.

I have two issues:

sets.idle.Regen will not properly update the idleset when toggled.

Auto Kite doesn't work properly. I can toggle kiting mode on, but the logic for 'check moving' isn't working (and has never worked).

Also, if anyone has any tips on how I can clean up this lua with potentially redundant or unneeded rules/etc that'd be cool too!

Thanks
 Asura.Sechs
Offline
Server: Asura
Game: FFXI
user: Akumasama
Posts: 10134
By Asura.Sechs 2023-08-28 13:58:34
Link | Quote | Reply
 
Where do you check for being dead or alive? In Status_change I guess?
Can anybody provide an example of a code that checks for your character being dead or alive?

Thanks!
Offline
Posts: 69
By AegParm 2023-08-28 18:37:36
Link | Quote | Reply
 
Thank you everyone!

Cerberus.Shadowmeld said: »
Sel’s luas have built in functionality for all the teleport/warp items already. You shouldn’t need myhome or smeagol or anthing

This was ultimately the easiest solve. Have included a line to unload myhome when swapping to this gearswap.
Offline
Posts: 464
By drakefs 2023-08-28 18:59:27
Link | Quote | Reply
 
First, you only need the
Code
include('Mote-Include.lua')

the others are loaded through that lua.


Code
if state.DefenseMode.value == 'None'  and state.Kiting.value == false then

runs only if Kiting is turned off, should probably checking to be true. EDIT: Looking further at this, Auto-Kite should changing while kiting is off and kiting should be an override to keep movement speed gear equipped 100% of the time.


Code
sets.idle.Regen

I didn't see where this set is defined.




As for Sechs' question:

Asura.Sechs said: »
Where do you check for being dead or alive? In Status_change I guess?

One of the status changes that trigger said function is indeed
Code
dead


also
Code
player.status

returns dead while dead.
[+]
 Bismarck.Serpentarius
Offline
Server: Bismarck
Game: FFXI
Posts: 4
By Bismarck.Serpentarius 2023-08-28 19:05:23
Link | Quote | Reply
 
Whoops, uploaded the wrong lua! The idleset issue persists in the afforementioned thf lua with relation to sets.idle.Evasion. This is the other lua that's having issues with sets.idle.Regen:
Code
[spoiler]--Includes
function get_sets()
    mote_include_version = 2
    include('Mote-Include.lua')
	include('Mote-Utility.lua')
	include('Mote-Mappings.lua')
	include('Mote-SelfCommands.lua')
	include('Mote-Globals.lua')
end
--Job Setup (states, definitions etc)
function job_setup()
    state.IgnoreTargetting = M(false, 'Ignore Targetting')
	
    no_swap_gear = S{"Warp Ring", "Dim. Ring (Dem)", "Dim. Ring (Holla)", "Dim. Ring (Mea)",
              "Trizek Ring", "Echad Ring", "Facility Ring", "Capacity Ring"}

    -- For th_action_check():
    -- JA IDs for actions that always have TH: Provoke, Animated Flourish
    info.default_ja_ids = S{35, 204}
    -- Unblinkable JA IDs for actions that always have TH: Quick/Box/Stutter Step, Desperate/Violent Flourish
    info.default_u_ja_ids = S{201, 202, 203, 205, 207}
    lockstyleset = 4
end
--User stuff (more states, keybindings, gear definitions)
function user_setup()
	state.OffenseMode:options('Normal', 'LowAcc', 'MidAcc', 'HighAcc', 'STP')
    state.HybridMode:options('Normal', 'DT', 'SubtleBlow')
    state.WeaponskillMode:options('Normal', 'PDL')
    state.IdleMode:options('Normal', 'Regen')
    state.WeaponSet = M{['description']='Normal', 'Liberator', 'Anguta', 'Zantetsuken', 'Naegling', 'Lycurgos', 'Trial'}
    state.CP = M(false, "Capacity Points Mode")
	state.RP = M(false, "Reinforcement Points Mode")	
    state.WeaponLock = M(false, 'Weapon Lock')
    state.TreasureHunter = M(false, "TreasureHunter")	

	send_command('bind %c gs c toggle CP')
	send_command('bind %t gs c toggle RP')	
    send_command('bind %e gs c cycleback WeaponSet')
    send_command('bind %r gs c cycle WeaponSet')
    send_command('bind %w gs c toggle WeaponLock')
	
	send_command('bind f10 gs c cycle OffenseMode')
	send_command('bind f11 gs c cycle CastingMode')
	send_command('bind f12 gs c cycle HybridMode')
	
	send_command('bind %delete gs c set DefenseMode Physical')
	send_command('bind ^delete gs c cycle PhysicalDefenseMode')
	
	send_command('bind %end gs c set DefenseMode Magical')
	send_command('bind ^end gs c reset DefenseMode')
	
	send_command('bind pageup gs c update user')
	send_command('bind pagedown gs c cycle IdleMode')
	send_command('bind ^pagedown gs c toggle Kiting')

	send_command('bind %q gs c toggle TreasureHunter')	
	send_command('bind ^numlock gs c cycle WeaponskillMode')
	send_command('bind ^numlock gs c cycle WeaponskillMode')
    send_command('bind ^numpad0 input /ws "Torcleaver" <t>')
	send_command('bind ^numpad1 input /ws "Insurgency" <t>')
	send_command('bind ^numpad2 input /ws "Entropy" <t>')
    send_command('bind ^numpad3 input /ws "Crossreaper" <t>')
	send_command('bind ^numpad4 input /ws "Armor Break" <t>')
	send_command('bind ^numpad6 input /ws "Quietus" <t>')	
    --send_command('bind ^numpad6 input /ws "" <t>')
	--send_command('bind ^numpad7 input /ws "" <t>')
	--send_command('bind ^numpad8 input /ws "" <t>'))
    --send_command('bind ^numpad9 input /ws "" <t>')

    --send_command('bind %t gs c cycle treasuremode')	

    state.Auto_Kite = M(false, 'Auto_Kite')
    Haste = 0
    DW_needed = 0
    DW = false
    moving = false
    update_combat_form()
end
--Unbinds keybindings on jobchange
function user_unload()
    send_command ('unbind %`')
	
    send_command('unbind %c')
	send_command('unbind %q')
	
	send_command('unbind ^numlock')
    send_command('unbind ^numpad1')
	send_command('unbind ^numpad2')
	--send_command('unbind ^numpad7')
	--send_command('unbind ^numpad8')
	--send_command('unbind ^numpad9')
	
    --send_command('unbind %t')	

end
--Sets
function init_gear_sets()

    ------------------------------------------------------------------------------------------------
    ---------------------------------------- Precast Sets ------------------------------------------
    ------------------------------------------------------------------------------------------------
	
    sets.precast.FC = {
		ammo="Sapience Orb",--2
		head="Carmine Mask +1",--14
		body="Sacro Breastplate",--10
		hands="Leyline Gloves",--8
		legs={ name="Odyssean Cuisses", augments={'"Fast Cast"+6','STR+10','Accuracy+5',}},--6
		feet={ name="Odyssean Greaves", augments={'Mag. Acc.+10','"Fast Cast"+4','INT+10',}},--9	
		neck="Voltsurge Torque",--4	
		waist="Resolute Belt",		
		left_ear="Malignance Earring",--4
		right_ear="Loquac. Earring",--2
		left_ring="Prolix Ring",--2
		right_ring="Kishar Ring",--4
		back={ name="Ankou's Mantle", augments={'"Fast Cast"+10',}},
		}

    sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {})

	sets.precast.LastResort = {back="Ankou's Mantle"}
	
    ------------------------------------------------------------------------------------------------
    ------------------------------------- Weapon Skill Sets ----------------------------------------
    ------------------------------------------------------------------------------------------------
	
    sets.precast.WS = {
		ammo="Knobkierrie",
		head="Hjarrandi Helm",
		neck="Fotia Gorget",
		left_ear="Moonshade Earring",		
		right_ear="Heathen's Earring",
		body="Hjarrandi Breastplate",		
		hands="Nyame Gauntlets",		
		left_ring="Karieyh Ring",
		right_ring="Regal Ring",
		waist="Fotia Belt",
		legs="Ig. Flanchard +3",
		feet="Heath. Sollerets +2",
		back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},		
		}

    sets.precast.WS.PDL = set_combine(sets.precast.WS, {})
	
    sets.precast.WS['Torcleaver'] = {
		ammo="Knobkierrie",
		head="Nyame Helm",
		body="Nyame Mail",
		hands="Nyame Gauntlets",
		legs="Nyame Flanchard",
		feet="Heath. Sollerets +2",
		neck="Fotia Gorget",
		waist="Sailfi Belt +1",
		left_ear="Heathen's Earring",
		right_ear="Moonshade Earring",
		right_ring="Regal Ring",
		left_ring="Niqmaddu Ring",
		back={ name="Ankou's Mantle", augments={'VIT+20','Accuracy+20 Attack+20','VIT+10','Weapon skill damage +10%',}},
		}	
    sets.precast.WS.PDL = set_combine(sets.precast.WS['Torcleaver'], {})
	
	sets.precast.WS['Entropy'] = {
		ammo="Knobkierrie",
		head="Heath. Bur. +3",
		neck="Fotia Gorget",
		left_ear="Moonshade Earring",		
		right_ear="Heathen's Earring",	
		--right_ear="Moonshade Earring",
		body="Dagon Breastplate",		
		hands="Nyame Gauntlets",		
		left_ring="Karieyh Ring",
		right_ring="Regal Ring",
		waist="Fotia Belt",
		legs="Ig. Flanchard +3",
		feet="Heath. Sollerets +2",
		back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},		
		}
    sets.precast.WS['Entropy'].PDL = set_combine(sets.precast.WS['Entropy'], {})	
	
	sets.precast.WS['Quietus'] = {
		ammo="Knobkierrie",
		head="Heath. Bur. +3",
		neck="Fotia Gorget",
		left_ear="Moonshade Earring",		
		right_ear="Heathen's Earring",
		body="Dagon Breastplate",		
		hands="Nyame Gauntlets",		
		left_ring="Karieyh Ring",
		right_ring="Regal Ring",
		waist="Fotia Belt",
		legs="Ig. Flanchard +3",
		feet="Heath. Sollerets +2",
		back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},		
		}
    sets.precast.WS['Quietus'].PDL = set_combine(sets.precast.WS['Quietus'], {})		
	
	sets.precast.WS['Insurgency'] = {
		ammo="Knobkierrie",
		head="Heath. Bur. +3",
		neck="Caro Necklace",
		left_ear="Moonshade Earring",		
		right_ear="Heathen's Earring",
		body="Nyame Mail",		
		hands="Sakpata's Gauntlets",		
		left_ring="Niqmaddu Ring",
		right_ring="Regal Ring",
		waist="Sailfi Belt +1",
		legs="Ig. Flanchard +3",
		feet="Heath. Sollerets +2",
		back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},		
		}
    sets.precast.WS['Insurgency'].PDL = set_combine(sets.precast.WS['Insurgency'], {})		

	sets.precast.WS['Cross Reaper'] = {
		ammo="Knobkierrie",
		head="Heath. Bur. +3",
		neck="Caro Necklace",
		left_ear="Moonshade Earring",		
		right_ear="Heathen's Earring",	
		body="Nyame Mail",		
		hands="Nyame Gauntlets",		
		left_ring="Karieyh Ring",
		right_ring="Niqmaddu Ring",
		waist="Sailfi Belt +1",
		legs="Nyame Flanchard",
		feet="Heath. Sollerets +2",
		back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},		
		}	
    sets.precast.WS['Cross Reaper'].PDL = set_combine(sets.precast.WS['Cross Reaper'], {})		
	
	sets.precast.WS['Savage Blade'] = set_combine(sets.precast.WS, {
		waist="Sailfi Belt +1",		
		})
    sets.precast.WS['Savage Blade'].PDL = set_combine(sets.precast.WS['Savage Blade'], {})

    sets.precast.WS['Swift Blade'] = set_combine(sets.precast.WS['Savage Blade'], {})

    sets.precast.WS['Swift Blade'].PDL = set_combine(sets.precast.WS['Swift Blade'], {})

    sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS['Savage Blade'], {})

    sets.precast.WS['Requiescat'].PDL = set_combine(sets.precast.WS['Requiescat'], {})

	sets.precast.WS['Sanguine Blade'] = {}	
	
	sets.precast.WS['Armor Break'] = {
		ammo="Knobkierrie",
		head="Nyame Helm",
		body="Nyame Mail",
		hands="Nyame Gauntlets",
		legs="Nyame Flanchard",
		feet="Nyame Sollerets",
		neck="Erra Pendant",
		waist="Eschan Stone",
		left_ear="Gwati Earring",
		right_ear="Thrud Earring",
		--right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
		left_ring="Evanescence Ring",
		right_ring="Stikini Ring",
		back={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Dbl.Atk."+10','Damage taken-5%',}},		
		}	
	
    ------------------------------------------------------------------------------------------------
    ---------------------------------------- Midcast Sets ------------------------------------------
    ------------------------------------------------------------------------------------------------

    sets.midcast.FastRecast = sets.precast.FC

    sets.midcast.SpellInterrupt = {
		ammo="Staunch Tathlum",
		head="Nyame Helm",
		body="Nyame Mail",
		hands="Nyame Gauntlets",
		legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
		feet="Nyame Sollerets",
		neck="Loricate Torque +1",
		waist="Resolute Belt",
		left_ear="Loquac. Earring",
		right_ear="Eabani Earring",
		left_ring="Shadow Ring",
		right_ring="Defending Ring",
		back="Mubvum. Mantle",
		}

    sets.midcast.Utsusemi = sets.midcast.SpellInterrupt

	sets.midcast.BlackMagic = {
		ammo="Pemphredo Tathlum",
		head={ name="Nyame Helm", augments={'Path: B',}},
		body={ name="Nyame Mail", augments={'Path: B',}},
		hands="Fallen's Finger Gauntlets +3",
		legs={ name="Nyame Flanchard", augments={'Path: B',}},
		feet="Heath. Sollerets +2",
		neck="Baetyl Pendant",
		waist="Orpheus's Sash",
		left_ear="Friomisi Earring",
		right_ear="Malignance Earring",
		left_ring="Locus Ring",
		right_ring={ name="Metamor. Ring +1", augments={'Path: A',}},	
		}
	
	sets.midcast.DarkMagic = set_combine(sets.midcast.SpellInterrupt, {
		ammo="Pemphredo Tathlum",
		head="Ignominy Burgeonet +3",
		body="Nyame Mail",
		hands="Fallen's Finger Gauntlets +3",	
		legs="Heath. Flanchard +3",		
		feet="Ratri Sollerets",
		neck="Erra Pendant",
		waist="Casso Sash",
		left_ear="Mani Earring",	
		right_ear="Dark Earring",
		left_ring="Stikini Ring",
		right_ring="Evanescence Ring",
		back="Merciful Cape",
		})
		--body="Carmine Scale Mail +1",	
	

	
	--Enhanced absorb, dark magic, macc
	sets.midcast.Absorb = set_combine(sets.midcast.DarkMagic, {
		ammo="Pemphredo Tathlum",
		head="Ignominy Burgeonet +3",
		--body="Carmine Scale Mail +1",			
		body="Nyame Mail",
		hands="Pavor Gauntlets",
		legs="Heath. Flanchard +3",	
		feet="Ratri Sollerets",
		neck="Erra Pendant",
		waist="Casso Sash",
		left_ear="Mani Earring",			
		left_ear="Malignance Earring",
		right_ear="Dark Earring",
		left_ring="Stikini Ring",
		right_ring="Evanescence Ring",
		back="Chuparrosa Mantle",--dur, pot
		})		

	

	
	--Enhanced drain, dark magic, macc
	sets.midcast.Drain = set_combine(sets.midcast.SpellInterrupt, {
		ammo="Pemphredo Tathlum",
		head="Nyame Helm",
		bodu="Nyame Mail",
		--body="Carmine Scale Mail +1",
		hands="Fallen's Finger Gauntlets +3",
		legs="Heath. Flanchard +3",
		feet="Heathen's Sollerets +2",
		--feet="Heathen's Sollerets +3",		
	    neck="Erra Pendant",
		waist="Orpheus's Sash",
		left_ear="Malignance Earring",		
		right_ear="Hirudinea Earring",
		left_ring="Archon Ring",
		right_ring="Evanescence Ring",	
		back="Niht Mantle",	
		})
	
	--Purely HP+
	sets.midcast.Spikes = set_combine(sets.midcast.SpellInterrupt, {
		head="Hjarrandi Helm",
		body="Hjarrandi Breast.",
		hands="Regal Cpt. Gloves",
		legs="Sakpata's Cuisses",
		feet="Sakpata's Leggings",
		neck="Sanctity Necklace",
		waist="Eschan Stone",
		left_ear="Tuisto Earring",
		right_ear="Eabani Earring",
		left_ring="Moonlight Ring",
		right_ring="Moonlight Ring",
		back="Reiki Cloak",
		})
    ------------------------------------------------------------------------------------------------
    ----------------------------------------- Idle Sets --------------------------------------------
    ------------------------------------------------------------------------------------------------

    sets.resting = {}

    sets.idle = {
		ammo="Staunch Tathlum",
		head="Hjarrandi Helm",
		body="Sacro Breastplate",
		hands="Sakpata's Gauntlets",
		legs="Sakpata's Cuisses",
		feet="Sakpata's Leggings",
		neck="Loricate Torque +1",
		waist="Asklepian Belt",
		left_ear="Tuisto Earring",
		right_ear="Eabani Earring",
		left_ring="Moonlight Ring",
		right_ring="Moonlight Ring",
		back="Reiki Cloak",
		}

    sets.idle.Regen = set_combine(sets.idle, {
		head="Crepuscular Helm",
		body="Sacro Breastplate",
		legs="Volte Brayettes",
		neck="Bathy Choker +1",
		left_ear="Infused Earring",
		left_ring="Sheltered Ring",		
		})

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


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

    sets.defense.PDT = sets.idle.DT

    sets.defense.MDT = {}

    sets.Kiting = {body="Sakpata's Breastplate", legs="Carmine Cuisses +1", neck="Loricate Torque +1",}


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

	sets.engaged = {
		ammo="Coiste Bodhar",
		head="Flam. Zucchetto +2",
		body="Sakpata's Breastplate",
		hands="Sakpata's Gauntlets",
		legs="Ig. Flanchard +3",
		feet="Flam. Gambieras +2",
		neck="Abyssal Beads +2",
		waist="Sailfi Belt +1",
		left_ear="Schere Earring",
		right_ear="Brutal Earring",
		left_ring="Hetairoi Ring",
		right_ring="Niqmaddu Ring",
		back={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Dbl.Atk."+10','Damage taken-5%',}},		
		}

	sets.engaged.AM3 = {
		ammo={ name="Coiste Bodhar", augments={'Path: A',}},
		head="Flam. Zucchetto +2",
		body={ name="Valorous Mail", augments={'"Store TP"+8','DEX+7','Accuracy+14',}},
		hands={ name="Sakpata's Gauntlets", augments={'Path: A',}},
		legs={ name="Odyssean Cuisses", augments={'"Store TP"+7','DEX+2','Accuracy+15',}},
		feet={ name="Valorous Greaves", augments={'Attack+5','"Store TP"+6','VIT+5','Accuracy+3',}},
		neck={ name="Abyssal Beads +2", augments={'Path: A',}},
		waist={ name="Sailfi Belt +1", augments={'Path: A',}},
		left_ear="Crepuscular Earring",
		right_ear="Telos Earring",
		left_ring="Moonlight Ring",
		right_ring="Moonlight Ring",
		back={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Store TP"+10','Damage taken-5%',}},
		}
		
	sets.engaged.Aftermath = set_combine(sets.engaged, {
		
		})	

    sets.engaged.LowAcc = set_combine(sets.engaged, {})

    sets.engaged.MidAcc = set_combine(sets.engaged.LowAcc, {})

    sets.engaged.HighAcc = set_combine(sets.engaged.MidAcc, {})

    sets.engaged.STP = set_combine(sets.engaged, {})

    sets.engaged.DW = {}

    sets.engaged.DW.LowAcc = set_combine(sets.engaged.DW, {})

    sets.engaged.DW.MidAcc = set_combine(sets.engaged.DW.LowAcc, {})

    sets.engaged.DW.HighAcc = set_combine(sets.engaged.DW.MidAcc, {})

    sets.engaged.DW.STP = set_combine(sets.engaged.DW, {})

    ------------------------------------------------------------------------------------------------
    ---------------------------------------- Hybrid Sets -------------------------------------------
    ------------------------------------------------------------------------------------------------

    sets.engaged.Hybrid = set_combine(sets.engaged, {
		ammo="Staunch Tathlum",
		head="Hjarrandi Helm",
		hands="Sakpata's Gauntlets",
		legs="Sakpata's Cuisses",
		feet="Sakpata's Leggings",
		neck="Loricate Torque +1",
		right_ring="Defending Ring",
		})
		
	sets.engaged.SubtleBlow = {
		ammo="Seething Bomblet +1",
		head="Sakpata's Helm",
		body="Dagon Breastplate",
		hands="Sakpata's Gauntlets",
		legs="Sakpata's Cuisses",
		feet="Sakpata's Leggings",
		neck="Bathy Choker +1",
		waist="Ioskeha Belt +1",
		left_ear="Digni. Earring",
		right_ear="Telos Earring",
		left_ring="Rajas Ring",
		right_ring="Niqmaddu Ring",
		back={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Dbl.Atk."+10','Damage taken-5%',}},		
		--Need Chirich
		}

    sets.engaged.DT = set_combine(sets.engaged, sets.engaged.Hybrid)
    sets.engaged.LowAcc.DT = set_combine(sets.engaged.LowAcc, sets.engaged.Hybrid)
    sets.engaged.MidAcc.DT = set_combine(sets.engaged.MidAcc, sets.engaged.Hybrid)
    sets.engaged.HighAcc.DT = set_combine(sets.engaged.HighAcc, sets.engaged.Hybrid)
    sets.engaged.STP.DT = set_combine(sets.engaged.STP, sets.engaged.Hybrid)

    sets.engaged.DW.DT = set_combine(sets.engaged.DW, sets.engaged.Hybrid)
    sets.engaged.DW.LowAcc.DT = set_combine(sets.engaged.DW.LowAcc, sets.engaged.Hybrid)
    sets.engaged.DW.MidAcc.DT = set_combine(sets.engaged.DW.MidAcc, sets.engaged.Hybrid)
    sets.engaged.DW.HighAcc.DT = set_combine(sets.engaged.DW.HighAcc, sets.engaged.Hybrid)
    sets.engaged.DW.STP.DT = set_combine(sets.engaged.DW.STP, sets.engaged.Hybrid)


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

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

	sets.Liberator = {main="Liberator", sub="Utu Grip"}
	sets.Lycurgos = {main="Lycurgos", sub="Utu Grip"}
	sets.Zantetsuken = {main="Zantetsuken X", sub="Utu Grip"}
	sets.Naegling = {main="Naegling", sub="Blurred Shield"}
	sets.Anguta = {main="Anguta", sub="Utu Grip"}
	sets.Trial = {main="Albion", sub="Utu Grip"}
	--sets.Trial = {main="Death Sickle", sub="Utu Grip"}	
	
    sets.Obi = {waist="Hachirin-no-Obi"}
    sets.CP = {back="Mecistopins Mantle"}
	sets.RP = {neck="Abyssal Beads +2"}
    sets.TreasureHunter = {body="Volte Jupon", hands="Volte Bracers", waist="Chaac Belt"}
end

-----------------------------------
--Casting (spells, JAs, etc) 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 spellMap == 'Utsusemi' then
        if buffactive['Copy Image (3)'] or buffactive['Copy Image (4+)'] then
            cancel_spell()
            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
	
	if spell.english == 'Last Resort' then
		equip(sets.precast.LastResort)
	end	
	
end

-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_aftercast(spell, action, spellMap, eventArgs)
    if player.status ~= 'Engaged' and state.WeaponLock.value == false then
        check_weaponset()
    end
end	

function job_post_midcast(spell, action, spellMap, eventArgs)
	if spell.skill == 'Dark Magic' then
		if spell.english:contains('Absorb') then
			equip(sets.midcast.Absorb)
		elseif spell.english:contains('Drain') then
			equip(sets.midcast.Drain)
		elseif spell.english:contains('Spikes') then
			equip(sets.midcast.Spikes)
		else
			equip(sets.midcast.DarkMagic)
		end
	end
	if spell.skill == 'Black Magic' then
		equip(sets.midcast.BlackMagic)
	end	
	if spell.english:contains('Utsusemi') then
		equip(sets.midcast.Utsusemi)
	end	
end	

-----------------------------------
--Buff changes
-----------------------------------

function job_buff_change(buff,gain)
    if buff == "doom" then
        if gain then
            equip(sets.buff.Doom)
            --send_command('@input /p ♪ Doomed ♪.')
            disable('neck','ring1','ring2','waist')
        else
            enable('neck','ring1','ring2','waist')
            handle_equipping_gear(player.status)
        end
    end
	
    if buff:startswith('Aftermath') and player.equipment.main == 'Liberator' then
            classes.CustomMeleeGroups:clear()

            if (buff == "Aftermath: Lv.3" and gain) or buffactive['Aftermath: Lv.3'] then
                classes.CustomMeleeGroups:append('AM3')
            end
    end	
end

-- Called by the 'update' self-command, for common needs.
-- Set eventArgs.handled to true if we don't want automatic equipping of gear.
function job_handle_equipping_gear(playerStatus, eventArgs)
    check_gear()
    update_combat_form()
    check_moving()
end

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

function update_combat_form()
    if DW == true then
        state.CombatForm:set('DW')
    elseif DW == false then
        state.CombatForm:reset()
    end
end

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

-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
    check_weaponset()
	
    if state.TreasureHunter.current == 'on' then
		equip(sets.TreasureHunter)
		disable('body', 'hands', 'waist')
	else
		enable('body', 'hands', 'waist')
	end		
	
    return meleeSet
end

-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
	if state.CP.current == 'on' then
		equip(sets.CP)
        disable('back')
    else
        enable('back')
    end
    if state.RP.current == 'on' then
		equip(sets.RP)
		disable('neck')
	else
		enable('neck')
	end			
    if state.TreasureHunter.current == 'on' or 'off' then
		enable('body', 'hands', 'waist')
	end			
    if state.Auto_Kite.value == true then
       idleSet = set_combine(idleSet, sets.Kiting)
    end
    return idleSet
end

-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
    local cf_msg = ''
    if state.CombatForm.has_value then
        cf_msg = ' (' ..state.CombatForm.value.. ')'
    end

    local m_msg = state.OffenseMode.value
    if state.HybridMode.value ~= 'Normal' then
        m_msg = m_msg .. '/' ..state.HybridMode.value
    end

    local ws_msg = state.WeaponskillMode.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.Kiting.value then
        msg = msg .. ' Kiting: On |'
    end

    add_to_chat(002, '| ' ..string.char(31,210).. 'Melee' ..cf_msg.. ': ' ..string.char(31,001)..m_msg.. string.char(31,002)..  ' |'
        ..string.char(31,207).. ' WS: ' ..string.char(31,001)..ws_msg.. string.char(31,002)..  ' |'
        ..string.char(31,060).. ' QD' ..qd_msg.. ': '  ..string.char(31,001)..e_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 gearinfo(cmdParams, eventArgs)
    if cmdParams[1] == 'gearinfo' then
        if type(tonumber(cmdParams[2])) == 'number' then
            if tonumber(cmdParams[2]) ~= DW_needed then
            DW_needed = tonumber(cmdParams[2])
            DW = true
            end
        elseif type(cmdParams[2]) == 'string' then
            if cmdParams[2] == 'false' then
                DW_needed = 0
                DW = false
            end
        end
        if type(tonumber(cmdParams[3])) == 'number' then
            if tonumber(cmdParams[3]) ~= Haste then
                Haste = tonumber(cmdParams[3])
            end
        end
        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
    if no_swap_gear:contains(player.equipment.waist) then
        disable("waist")
    else
        enable("waist")
    end
end

function job_state_change(stateField, newValue, oldValue)
    if state.WeaponLock.value == true then
        disable('main')
    else
        enable('main')
		enable('sub')
    end

    check_weaponset()
end

windower.register_event('zone change',
    function()
        if no_swap_gear:contains(player.equipment.left_ring) then
            enable("ring1")
            equip(sets.idle)
        end
        if no_swap_gear:contains(player.equipment.right_ring) then
            enable("ring2")
            equip(sets.idle)
        end
        if no_swap_gear:contains(player.equipment.waist) then
            enable("waist")
            equip(sets.idle)
        end
	end)	
	
function select_default_macro_book()
    set_macro_page(1, 2)
end	
	
function set_lockstyle()
    send_command('wait 2; input /lockstyleset ' .. lockstyleset)
end		[/spoiler]
By Asura.Aragan 2023-08-28 19:35:29
Link | Quote | Reply
 
U need add this code u miss it in
function customize_idle_set(idleSet)
Code
if state.IdleMode.current == 'Regen' then
        idleSet = set_combine(idleSet, sets.idle.Regen)
    end

Offline
Posts: 464
By drakefs 2023-08-28 20:52:49
Link | Quote | Reply
 
Asura.Aragan said: »
U need add this code u miss it in
function customize_idle_set(idleSet)
Code
if state.IdleMode.current == 'Regen' then
        idleSet = set_combine(idleSet, sets.idle.Regen)
    end


A motes based lua should not need to do that.
Offline
Posts: 464
By drakefs 2023-08-28 22:46:11
Link | Quote | Reply
 
Bismarck.Serpentarius said: »
The idleset issue persists in the afforementioned thf lua with relation to sets.idle.Evasion. This is the other lua that's having issues with sets.idle.Regen:

I cleaned up the includes and commented out a msg line (referencing QD, which wast not in the lua elsewhere). However, the lua is wroking as expected. sets.idle.Regen is equipping when I set Idle mode to Regen, for me. Make sure you are not in a town when testing (becuase sets.idle.Town will override every idle set).
 Bismarck.Serpentarius
Offline
Server: Bismarck
Game: FFXI
Posts: 4
By Bismarck.Serpentarius 2023-08-29 08:09:45
Link | Quote | Reply
 
Thanks! sets.idle.Town was the culprit - didn't even consider that A) it would override other idlesets and B) I was testing these in town. Hah.

I'm still having issues with autokite though. I tried editing out the manual override for sets.Kiting.value to see if I could proc the moving check but the lua isn't picking up that I'm moving OR simply isn't procing the swap while moving.
Offline
Posts: 464
By drakefs 2023-08-29 10:30:57
Link | Quote | Reply
 
Bismarck.Serpentarius said: »
I'm still having issues with autokite though

Auto Kite requires Gearinfo. Gearinfo sends commands to GS to updates the state of
Code
moving

that is being used for logic to set auto_kite
Code
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

does indeed work but without gearinfo running, moving is always false.
 Bismarck.Serpentarius
Offline
Server: Bismarck
Game: FFXI
Posts: 4
By Bismarck.Serpentarius 2023-08-29 13:24:34
Link | Quote | Reply
 
Ive tried with gearinfo running and not running. When I inherited a second character, the autokite function was working initially for that character but has since stopped working.

I also tried using a fresh version of Arislan's Nin lua and still couldnt get it to function. Do I just need to find an updated version of gearinfo or something?
Offline
Posts: 464
By drakefs 2023-08-29 13:44:34
Link | Quote | Reply
 
I do not use gearinfo, so no clue what is required to make that work correctly but this is how I tested where the function was stopping
Code
function check_moving()
    add_to_chat(123, 'Check Movement')
    if state.Kiting.value then
        add_to_chat(121, 'Kite True')
    else
        add_to_chat(121, 'Kite False')
    end

    if state.Auto_Kite.value then
        add_to_chat(122, 'A-Kite True')
    else
        add_to_chat(122, 'A-Kite False')
    end

    if moving then
        add_to_chat(120, 'Moving')
    else
        add_to_chat(120, 'Not Moving')
    end

    if state.DefenseMode.value == 'None' and state.Kiting.value == false then
        if not state.Auto_Kite.value and moving then
            state.Auto_Kite:set(true)
            add_to_chat(123, 'Auto-Kite on')
        elseif state.Auto_Kite.value == true and moving == false then
            state.Auto_Kite:set(false)
            add_to_chat(123, 'Auto-Kite off')
        end
    end
end
 Asura.Sechs
Offline
Server: Asura
Game: FFXI
user: Akumasama
Posts: 10134
By Asura.Sechs 2023-08-29 17:17:27
Link | Quote | Reply
 
drakefs said: »
As for Sechs' question:

Asura.Sechs said: »
Where do you check for being dead or alive? In Status_change I guess?

One of the status changes that trigger said function is indeed
Code
dead


also
Code
player.status

returns dead while dead.
After trying this out a few times and seeing how it wasn't working, I had a flash in my mind, remembering I actually discussed this already in this thread some time ago.

And it seems I wasn't entirely wrong


Basically Gearswap filters out some statuses, among which Dead and Engaged-Dead. If the "new" in the Status_Change function happens to be one of those, it won't be processed by the function.

I wonder why Byrth felt the need to make Gearswap.lua like that.
There has to be a reason, like Dead or Engaged-Dead producing some errors or bad behaviours and so he decided to filter them out?
Offline
Posts: 464
By drakefs 2023-08-29 18:08:01
Link | Quote | Reply
 
Interesting, I would suggest asking Byrth or asking in the windower discord. If ya get an answer, let me know.
 Asura.Sechs
Offline
Server: Asura
Game: FFXI
user: Akumasama
Posts: 10134
By Asura.Sechs 2023-08-30 14:23:19
Link | Quote | Reply
 
drakefs said: »
Interesting, I would suggest asking Byrth or asking in the windower discord. If ya get an answer, let me know.
I think the reason is probably for the player's safety.
Without such a "protection", Gearswap could in theory swap your gear when you're dead, which normally can't happen, and it could be suspicious and make you get reported or... I dunno, I think that might be the reason.
 Fenrir.Jinxs
Offline
Server: Fenrir
Game: FFXI
user: Jinxs
Posts: 541
By Fenrir.Jinxs 2023-08-30 14:28:10
Link | Quote | Reply
 
There was a discussion recently about a unm in pashow. It gives you both a costume and an amnesia effect you can with enough magic evasion avoid the amnesia.
When I tried to ws which apparently you should not be able to I hard crashed my game.
Apparently you are not supposed to be able to ws in costume and maybe even change gear.
 Asura.Sechs
Offline
Server: Asura
Game: FFXI
user: Akumasama
Posts: 10134
By Asura.Sechs 2023-09-08 13:28:45
Link | Quote | Reply
 
Not properly a direct Gearswap question, but hoping to find help in here.

So I recently found out that if you use a set_combine with a set that's defined after the one you're currently creating, Gearswap won't give you an error and the Lua will be correctly loaded, but the set won't be really combined.

Example:
Code
set.example = set_combine(set.test, {stuff})
...
...
set.test = {stuff2}


Basically set.example will only have "stuff" inside, and the content of the combined set (stuff2) will be ignored.
Hopefully I explained the issue!


Now, my real problem is another.
Basically I know that in my luas I have AT LEAST one example like this and I want to fix it, but... I have no bloody clue in which Lua it could be and I'm lazy and don't wanna read all of them from line 0 to the end.
Can anybody think of a system where I could "find" this thing in all of my luas?
 Cerberus.Shadowmeld
Offline
Server: Cerberus
Game: FFXI
Posts: 1809
By Cerberus.Shadowmeld 2023-09-08 14:52:00
Link | Quote | Reply
 
you've defined set.test somewhere or it would have given you a null error. it would just use as a base, whatever was in set.test where it was originally defined, and then later update the set.test to whatever stuff2 is.

The easiest fix is to move the set.test = {stuff2} above the other declaration. I don't know how to help you how to find where this is happening.
 Carbuncle.Maletaru
Offline
Server: Carbuncle
Game: FFXI
user: maletaru
Posts: 2676
By Carbuncle.Maletaru 2023-09-08 15:18:21
Link | Quote | Reply
 
If you're looking for a specific string in all your lua files, open up Powershell, navigate (cd) to the directory where your files are contained, and run this:
Get-ChildItem -Recurse | Select-String "TEXTYOUWANTTOFIND" -List | Select Path
[+]
 Asura.Sechs
Offline
Server: Asura
Game: FFXI
user: Akumasama
Posts: 10134
By Asura.Sechs 2023-09-08 15:33:57
Link | Quote | Reply
 
Cerberus.Shadowmeld said: »
you've defined set.test somewhere or it would have given you a null error. it would just use as a base, whatever was in set.test where it was originally defined, and then later update the set.test to whatever stuff2 is.

The easiest fix is to move the set.test = {stuff2} above the other declaration. I don't know how to help you how to find where this is happening.
No man, that's what I thought but appearently it doesn't work like this.
I've had my BLU lua set like that for the longest time, and I noticed only today that the first set was considering only the stuff within {} and completely ignoring the items inside the set I combined it to, only because this set was defined after.

Once I moved the first set after the second, everything started working perfectly.

But either way I wasn't getting a syntax error while loading the Lua, the set simply wasn't working and I wasn't aware of it, this means that for a long time I had that specific set crippled and I didn't know.
 Asura.Sechs
Offline
Server: Asura
Game: FFXI
user: Akumasama
Posts: 10134
By Asura.Sechs 2023-09-10 08:18:37
Link | Quote | Reply
 
Cerberus.Shadowmeld said: »
spell.action_type == 'Item' and spell.english == "Holy Water" then
    -- Do the thing joolee!
  end
Tried this and it's not working.

Where is the resource file for action_types? I couldn't find it. I can only see the res file for Job Abilities, for Spells and for Items.
But the Items file res has a different formats, its data has "category", "flags" and "type" but how do I check for all this stuff?
I don't think spell.something like in your if is gonna work.


I also tried to remove the "and spell.english == "Holy Water" to focus on the main condition and tested for spell.action spell.prefix , spell.category, spell.id
Filling the various fields with the correct data retrieved from the items.lua table.
None of this seems to be working, the "if" never succeeds the check.
 Asura.Sechs
Offline
Server: Asura
Game: FFXI
user: Akumasama
Posts: 10134
By Asura.Sechs 2023-09-10 08:37:50
Link | Quote | Reply
 
Ok so I think I found the issue... the code DOES work if you use the item from a command (like /item "Holy Water" <me>) but it does NOT work if you use it from the menu.

Uhmmm there must be a reason for that.
First Page 2 3 ... 178 179 180 ... 183 184 185