Gearswap Support Thread

Langues: JP EN DE FR
users online
Forum » Windower » Support » Gearswap Support Thread
Gearswap Support Thread
First Page 2 3 ... 172 173 174 ... 180 181 182
 Carbuncle.Samuraiking
Offline
Serveur: Carbuncle
Game: FFXI
user: bossgalka
Posts: 83
By Carbuncle.Samuraiking 2022-10-26 20:36:30
Link | Citer | R
 
Bismarck.Arakuine said: »
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.

You probably have weapon sets on. At the top of the lua, it will say
Code
state.Weapons:options('WeaponSetName1','WeaponSetName2','WeaponSetName3','WeaponSetName4')


If you scroll down in the lua, usually closer to the bottom, you will see the same named sets actually defined with weapons/ranged/ammo slots in them and you can change them to whatever you want.

You can cycle them with F7 to change between them in-game, but they will stay locked on to whatever set you use. You can, alternatively, add a 'None' option in there to cycle to. I personally put it as the first option so that it always starts with it when I change to the job, so the top should look like this if you just add None to the first slot:
Code
state.Weapons:options('None','WeaponSetName1','WeaponSetName2','WeaponSetName3','WeaponSetName4')
 Bismarck.Arakuine
Offline
Serveur: Bismarck
Game: FFXI
user: Alaan
Posts: 4
By Bismarck.Arakuine 2022-10-27 08:36:55
Link | Citer | R
 
Thanks for your reply, I just went through both the libs file and the general geo.lua and neither define weapons, or state.

While I'm competent at editing existing code for working with these luas I have no idea on how to add things like the above. Would it be as simple as adding that line into the name_geo.lua file? or is it more complicated than that?
 Bismarck.Radec
Offline
Serveur: Bismarck
Game: FFXI
user: Radec
Posts: 129
By Bismarck.Radec 2022-10-27 09:03:00
Link | Citer | R
 
That file uses a variable "meleeing" to lock main/sub/ranged. Default bind of F12 in Geo.lua, line 93, will turn this on/off
Code
windower.send_command('bind f12 gs c toggle melee')				-- F12 Toggle Melee mode on / off and locking of weapons


Alternatively, the default is set in GEO_Lib.lua, line 419:
Code
meleeing = M(true)
Change "true" to "false" and weapons would start unlocked.
 Bismarck.Arakuine
Offline
Serveur: Bismarck
Game: FFXI
user: Alaan
Posts: 4
By Bismarck.Arakuine 2022-10-27 09:22:44
Link | Citer | R
 
I did try alternating the Meleeing state but didnt' see any changes, however I will try changing the default state to false. Thank you.

EDIT: That was it, thank you, everything works!
Offline
Posts: 373
By drakefs 2022-10-27 11:26:14
Link | Citer | R
 
Carbuncle.Samuraiking said: »
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.

Well the files in libs should not have custom settings or be customized. They can and will be overwritten when an update occurs to files in the libs directory.
[+]
 
Offline
Posts:
By 2022-10-30 02:04:43
 Undelete | Edit  | Link | Citer | R
 
Post deleted by User.
 
Offline
Posts:
By 2022-10-30 02:30:35
 Undelete | Edit  | Link | Citer | R
 
Post deleted by User.
 
Offline
Posts:
By 2022-10-30 02:50:17
 Undelete | Edit  | Link | Citer | R
 
Post deleted by User.
 Bismarck.Radec
Offline
Serveur: Bismarck
Game: FFXI
user: Radec
Posts: 129
By Bismarck.Radec 2022-10-30 03:09:24
Link | Citer | R
 
Quoting is wrong around "Dbl Attack"+4 on line 13. Probably '"Dbl. Atk"+4', but check with //gs export to be sure.
 
Offline
Posts:
By 2022-10-30 03:21:22
 Undelete | Edit  | Link | Citer | R
 
Post deleted by User.
 
Offline
Posts:
By 2022-10-30 03:21:22
 Undelete | Edit  | Link | Citer | R
 
Post deleted by User.
 
Offline
Posts:
By 2022-10-30 03:56:32
 Undelete | Edit  | Link | Citer | R
 
Post deleted by User.
 Carbuncle.Yiazmaat
Offline
Serveur: Carbuncle
Game: FFXI
user: Rudra
Posts: 164
By Carbuncle.Yiazmaat 2022-11-06 05:19:35
Link | Citer | R
 
I noticed yesterday that my selindrile lua doesnt recognize Acrontica and Gleti's knife as offhand, it always act as if im single wielding and doesnt swap to ws sets. Any idea on how to fix this ?

Edit: i get sel-utility 2275: attempt to index field (?) (A nil value)
Also noticed that it send this error for rudra and aeolian when i offhand gleti or acrontica, got the same error on cor when offhand gleti on all sword and dagger ws's

Edit 2: tried to update the res folder but nothing changed
 Bismarck.Radec
Offline
Serveur: Bismarck
Game: FFXI
user: Radec
Posts: 129
By Bismarck.Radec 2022-11-06 08:26:31
Link | Citer | R
 
That really sounds like resources files out of date. Do you see Gleti's Knife in Windower/res/items.lua? It should be on line 18286, and Acrontica on 18287.

If it's not there, remove the res folder and relaunch windower. Auto-updates should replace the files from there.
 Carbuncle.Yiazmaat
Offline
Serveur: Carbuncle
Game: FFXI
user: Rudra
Posts: 164
By Carbuncle.Yiazmaat 2022-11-06 09:32:11
Link | Citer | R
 
I updated them and they're on the file but i keep getting the error.
I didnt see the luncher update anything when i reopened windower tho

Edit : what i find is strange is that i only get the error while using rudra or aeolian and nlt the others dagger ws's while equiping acrontica or gleti
 Carbuncle.Yiazmaat
Offline
Serveur: Carbuncle
Game: FFXI
user: Rudra
Posts: 164
By Carbuncle.Yiazmaat 2022-11-07 09:07:16
Link | Citer | R
 
Bismarck.Radec said: »
That really sounds like resources files out of date. Do you see Gleti's Knife in Windower/res/items.lua? It should be on line 18286, and Acrontica on 18287.

If it's not there, remove the res folder and relaunch windower. Auto-updates should replace the files from there.

Yup i retried today, i removed the res folder once again, even the update one, got the items in the item lua but still not working.

Edit: i tried to main hand acron and.offhand gleti, got sel utility 2286 error. Then i tried to main hand sakpata's fists on pup and no issue, tried to main hand and offhand sakpata's sword on blu and no issue.
 Carbuncle.Yiazmaat
Offline
Serveur: Carbuncle
Game: FFXI
user: Rudra
Posts: 164
By Carbuncle.Yiazmaat 2022-11-07 10:48:47
Link | Citer | R
 
OK i found the problem. It was that both dagger were in the wardrobe 5, removed them from 5 to inventory and it worked. But it still doesnt explain why i had no error while using evisceraton, shark bites, etc while the dagger were in the wardrobe 5
 
Offline
Posts:
By 2022-11-11 04:41:29
 Undelete | Edit  | Link | Citer | R
 
Post deleted by User.
 Asura.Sechs
Offline
Serveur: Asura
Game: FFXI
user: Akumasama
Posts: 9876
By Asura.Sechs 2022-11-17 07:07:51
Link | Citer | R
 
what difference is there between the variables "spell.type" and "spell.action_type"?
I can't find this "action_type" anywhere in the variables xls file or in the windower res files.
Offline
Posts: 373
By drakefs 2022-11-17 08:25:14
Link | Citer | R
 
Asura.Sechs said: »
what difference is there between the variables "spell.type" and "spell.action_type"?

Not sure but
Code
spell.action_type
seems to be a very general cast of the type. Options I have seen used are
Code
Ranged_Attack
Magic
Ability
[+]
 Asura.Sechs
Offline
Serveur: Asura
Game: FFXI
user: Akumasama
Posts: 9876
By Asura.Sechs 2022-11-17 08:29:42
Link | Citer | R
 
Wonder why it's not mentioned in the XLS with all the different variable options.
Thanks drakefs!
Offline
Posts: 40
By quelthos 2022-11-21 00:23:04
Link | Citer | R
 
GS would not equip TP/engaged set after WS is used, instead sits in WS set. Any help would be appreciated, thanks!
Code
function get_sets()
    mote_include_version = 2

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


-- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
function job_setup()
    state.Buff.Barrage = buffactive.Barrage or false
    state.Buff.Camouflage = buffactive.Camouflage or false
    state.Buff['Unlimited Shot'] = buffactive['Unlimited Shot'] or false
    state.Buff['Velocity Shot'] = buffactive['Velocity Shot'] or false
    state.Buff['Double Shot'] = buffactive['Double Shot'] or false

    -- Whether a warning has been given for low ammo
    state.warned = M(false)

    elemental_ws = S{'Aeolian Edge', 'Trueflight', 'Wildfire'}
    no_swap_gear = S{"Warp Ring", "Dim. Ring (Dem)", "Dim. Ring (Holla)", "Dim. Ring (Mea)",
              "Trizek Ring", "Echad Ring", "Facility Ring", "Capacity Ring",
              "Era. Bul. Pouch", "Dev. Bul. Pouch", "Chr. Bul. Pouch", "Quelling B. Quiver",
              "Yoichi's Quiver", "Artemis's Quiver", "Chrono Quiver"}

    lockstyleset = 1
end

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

-- Setup vars that are user-dependent.  Can override this function in a sidecar file.
function user_setup()
    state.OffenseMode:options('Normal')
    state.HybridMode:options('Normal')
    state.RangedMode:options('Normal', 'Critical')
    state.WeaponskillMode:options('Normal')
    state.IdleMode:options('Normal')

    state.WeaponSet = M{['description']='Weapon Set', 'cp'}
    -- state.CP = M(false, "Capacity Points Mode")
	state.WeaponLock = M(false, 'Weapon Lock')


    DefaultAmmo = {['Yoichinoyumi'] = "Chrono Arrow",
                   ['Gandiva'] = "Chrono Arrow",
                   ['Fail-Not'] = "Chrono Arrow",
                   ['Annihilator'] = "Chrono Bullet",
                   ['Armageddon'] = "Chrono Bullet",
                   ['Gastraphetes'] = "Quelling Bolt",
                   ['Fomalhaut'] = "Chrono Bullet",
                   }

    AccAmmo = {    ['Yoichinoyumi'] = "Yoichi's Arrow",
                   ['Gandiva'] = "Yoichi's Arrow",
                   ['Fail-Not'] = "Yoichi's Arrow",
                   ['Annihilator'] = "Eradicating Bullet",
                   ['Armageddon'] = "Eradicating Bullet",
                   ['Gastraphetes'] = "Quelling Bolt",
                   ['Fomalhaut'] = "Devastating Bullet",
                   }

    WSAmmo = {     ['Yoichinoyumi'] = "Chrono Arrow",
                   ['Gandiva'] = "Chrono Arrow",
                   ['Fail-Not'] = "Chrono Arrow",
                   ['Annihilator'] = "Chrono Bullet",
                   ['Armageddon'] = "Chrono Bullet",
                   ['Gastraphetes'] = "Quelling Bolt",
                   ['Fomalhaut'] = "Chrono Bullet",
                   }

    MagicAmmo = {  ['Yoichinoyumi'] = "Chrono Arrow",
                   ['Gandiva'] = "Chrono Arrow",
                   ['Fail-Not'] = "Chrono Arrow",
                   ['Annihilator'] = "Devastating Bullet",
                   ['Armageddon'] = "Devastating Bullet",
                   ['Gastraphetes'] = "Quelling Bolt",
                   ['Fomalhaut'] = "Devastating Bullet",
                   }


    send_command('bind @e gs c cycleback WeaponSet')
    send_command('bind @r gs c cycle WeaponSet')
	send_command('bind @w gs c toggle WeaponLock')

    --state.Auto_Kite = M(false, 'Auto_Kite')
    --Haste = 0
    --DW_needed = 0
    --DW = false
    --moving = false
    update_combat_form()
    --determine_haste_group()
end


-- Called when this job file is unloaded (eg: job change)
function user_unload()
    send_command('unbind f9')
    send_command('unbind ^f9')
    send_command('unbind ^`')
    send_command('unbind !`')
    send_command('unbind @`')
    send_command('unbind ^,')
    send_command('unbind @f')
    -- send_command('unbind @c')
    send_command('unbind @e')
    send_command('unbind @r')
    send_command('unbind @w')
    send_command('unbind ^numlock')
    send_command('unbind ^numpad/')
    send_command('unbind ^numpad*')
    send_command('unbind ^numpad-')
    send_command('unbind ^numpad7')
    send_command('unbind ^numpad8')
    send_command('unbind ^numpad4')
    send_command('unbind ^numpad6')
    send_command('unbind ^numpad2')
    send_command('unbind ^numpad3')
    send_command('unbind numpad0')

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


-- Set up all gear sets.
function init_gear_sets()

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

    -- Precast sets to enhance JAs
    sets.precast.JA['Eagle Eye Shot'] = {legs="Arc. Braccae +3"}
    sets.precast.JA['Bounty Shot'] = {hands="Amini Glove. +1"}
    sets.precast.JA['Camouflage'] = {body="Orion Jerkin +3"}
    sets.precast.JA['Scavenge'] = {feet="Orion Socks +3"}
    sets.precast.JA['Shadowbind'] = {hands="Orion Bracers +3"}
    sets.precast.JA['Sharpshot'] = {legs="Orion Braccae +3"}


    -- Fast cast sets for spells

    sets.precast.Waltz = {
        body="Passion Jacket",
        ring1="Asklepian Ring",
        waist="Gishdubar Sash",
        }

    sets.precast.Waltz['Healing Waltz'] = {}

    sets.precast.FC = {
    head="Carmine Mask +1",
    body={ name="Taeon Tabard", augments={'"Fast Cast"+4','Phalanx +3',}},
    hands={ name="Leyline Gloves", augments={'Accuracy+2','Mag. Acc.+5','"Mag.Atk.Bns."+4',}},
    legs={ name="Herculean Trousers", augments={'Mag. Acc.+13','"Fast Cast"+4','INT+9','"Mag.Atk.Bns."+4',}},
    feet="Carmine Greaves +1",
    neck="Baetyl Pendant",
    waist="Flume Belt",
    left_ear="Loquac. Earring",
    right_ear="Etiolation Earring",
    right_ring="Kishar Ring",
    left_ring="Weather. Ring",
        }

    sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {
        body="Passion Jacket",
        ring2="Lebeche Ring",
        })


    -- (10% Snapshot, 5% Rapid from Merits)
    sets.precast.RA = {
        head=gear.Taeon_RA_head, --10/0
        body="Amini Caban +1",
        hands="Carmine Fin. Ga. +1", --8/11
        --legs="Orion Braccae +3", --15/0
		legs="Adhemar Kecks +1",
        feet="Meg. Jam. +2", --10/0
        neck="Scout's Gorget +2", --4/0
        back=gear.RNG_SNP_Cape, --10/0
		ring1="Crepuscular Ring",
        waist="Yemaya Belt", --0/5
        } --60/11

    sets.precast.RA.Flurry1 = set_combine(sets.precast.RA, {
        head="Orion Beret +3", --0/18
        legs=gear.Adhemar_D_legs, --10/13
        }) --45/42

    sets.precast.RA.Flurry2 = set_combine(sets.precast.RA.Flurry1, {
        feet="Arcadian Socks +3", --0/10
        waist="Yemaya Belt", --0/5
        }) --32/57

    --[[
    sets.precast.RA.Gastra = {
        head="Orion Beret +3", --15/0
        }

    sets.precast.RA.Gastra.Flurry1 = set_combine(sets.precast.RA.Gastra, {
        feet="Arcadian Socks +3", --0/10
        })

    sets.precast.RA.Gastra.Flurry2 = set_combine(sets.precast.RA.Gastra.Flurry1, {
        legs="Pursuer's Pants", --0/19
        })
    ]]--


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

    sets.precast.WS = {
	head="Nyame Helm",
    body="Nyame Mail",
    hands="Nyame Gauntlets",
	legs="Nyame Flanchard",		
    feet="Nyame Sollerets",
	neck="Rep. Plat. Medal",
    waist={ name="Sailfi Belt +1", augments={'Path: A',}},
    left_ear="Ishvara Earring",
	right_ear="Moonshade Earring",
    left_ring="Epaminondas's Ring",
    right_ring="Rufescent Ring",
    back="",
        }

    sets.precast.WS.Acc = set_combine(sets.precast.WS, {
        feet="Arcadian Socks +3",
        ear1="Beyla Earring",
        waist="K. Kachina Belt +1",
        })

    sets.precast.WS.Enmity = set_combine(sets.precast.WS, {
        hands="Arc. Bracers +3",
        feet="Arcadian Socks +3",
        ear1="Beyla Earring",
        })

    sets.precast.WS['Apex Arrow'] = sets.precast.WS

    sets.precast.WS['Apex Arrow'].Acc = set_combine(sets.precast.WS['Apex Arrow'], {
        feet="Orion Socks +3",
        ear1="Beyla Earring",
        waist="K. Kachina Belt +1",
        })

    sets.precast.WS['Apex Arrow'].Enmity = set_combine(sets.precast.WS['Apex Arrow'], {
        hands="Arc. Bracers +3",
        feet="Arcadian Socks +3",
        ear1="Beyla Earring",
        })

    sets.precast.WS['Jishnu\'s Radiance'] = set_combine(sets.precast.WS, {
        head="Mummu Bonnet +2",
        body="Abnoba Kaftan",
        hands="Mummu Wrists +2",
        feet="Thereoid Greaves",
        ear1="Sherida Earring",
        ring1="Begrudging Ring",
        ring2="Mummu Ring",
        })

    sets.precast.WS['Jishnu\'s Radiance'].Acc = set_combine(sets.precast.WS['Jishnu\'s Radiance'], {
        legs="Mummu Kecks +2",
        feet="Arcadian Socks +3",
        neck="Iskur Gorget",
        ear1="Beyla Earring",
        ear2="Telos Earring",
        ring1="Regal Ring",
        ring2="Hajduk Ring +1",
        waist="K. Kachina Belt +1",
        })

    sets.precast.WS['Jishnu\'s Radiance'].Enmity = set_combine(sets.precast.WS['Jishnu\'s Radiance'], {
        hands="Arc. Bracers +3",
        feet="Arcadian Socks +3",
        ear1="Beyla Earring",
        })

    sets.precast.WS["Last Stand"] = set_combine(sets.precast.WS, {
		neck="Fotia Gorget",
		waist="Fotia Belt",
		right_ring="Dingir Ring",
		back="",
        })

    sets.precast.WS['Last Stand'].Acc = set_combine(sets.precast.WS['Last Stand'], {
        })

    sets.precast.WS['Last Stand'].Enmity = set_combine(sets.precast.WS['Last Stand'], {
        })

    sets.precast.WS["Coronach"] = set_combine(sets.precast.WS['Last Stand'], {
        neck="Scout's Gorget +2",
        ear1="Sherida Earring",
        ear2="Mache Earring +1",
        })

    sets.precast.WS["Coronach"].Acc = set_combine(sets.precast.WS['Coronach'], {
        ear1="Beyla Earring",
        ear2="Telos Earring",
        })

    sets.precast.WS["Coronach"].Enmity = set_combine(sets.precast.WS['Coronach'], {
        ear1="Beyla Earring",
        })

    sets.precast.WS["Trueflight"] = {
        head="Orion Beret +3",
        body="Carm. Sc. Mail +1",
        hands="Carmine Fin. Ga. +1",
        legs=gear.Herc_WSD_legs,
        feet=gear.Herc_WSD_feet,
        neck="Scout's Gorget +2",
        ear1="Moonshade Earring",
        ear2="Friomisi Earring",
        ring1="Weather. Ring +1",
        ring2="Epaminondas's Ring",
        back=gear.RNG_WS1_Cape,
        waist="Eschan Stone",
        }

    sets.precast.WS["Wildfire"] = set_combine(sets.precast.WS["Trueflight"], {
        ring1="Regal Ring",
        waist="Skrymir Cord +1",
        })

    sets.precast.WS['Evisceration'] = {
        head=gear.Adhemar_B_head,
        body="Abnoba Kaftan",
        hands="Mummu Wrists +2",
        legs="Zoar Subligar +1",
        neck="Fotia Gorget",
        ear2="Mache Earring +1",
        ring1="Begrudging Ring",
        ring2="Mummu Ring",
        back=gear.RNG_TP_Cape,
        waist="Fotia Belt",
        }

    sets.precast.WS['Evisceration'].Acc = set_combine(sets.precast.WS['Evisceration'], {
        head="Dampening Tam",
        body=gear.Adhemar_B_body,
        legs=gear.Herc_WS_legs,
        ring1="Regal Ring",
        })

    sets.precast.WS['Rampage'] = set_combine(sets.precast.WS['Evisceration'], {feet=gear.Herc_TA_feet})
    sets.precast.WS['Rampage'].Acc = sets.precast.WS['Evisceration'].Acc


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

    -- Fast recast for spells

    sets.midcast.FastRecast = sets.precast.FC

    sets.midcast.SpellInterrupt = {
        body=gear.Taeon_Phalanx_body, --10
        hands="Rawhide Gloves", --15
        legs="Carmine Cuisses +1", --20
        feet=gear.Taeon_Phalanx_feet, --10
        neck="Loricate Torque +1", --5
        ear1="Halasz Earring", --5
        ear2="Magnetic Earring", --8
        ring2="Evanescence Ring", --5
        waist="Rumination Sash", --10
        }

    sets.midcast.Utsusemi = sets.midcast.SpellInterrupt

    -- Ranged sets

    sets.midcast.RA = {
        --head="Arcadian Beret +3",
    head="Malignance Chapeau",
    body="Malignance Tabard",
    hands="Malignance Gloves",
    legs="Malignance Tights",
    feet="Malignance Boots",
    neck="Iskur Gorget",
    waist="Yemaya Belt", 
    left_ear="Telos Earring",
    right_ear="Enervating Earring",
    left_ring="Ilabrat Ring",
    right_ring="Dingir Ring",
        back=gear.RNG_RA_Cape,
        }

    sets.midcast.RA.Acc = set_combine(sets.midcast.RA, {
        feet="Orion Socks +3",
        ear1="Beyla Earring",
        ring2="Hajduk Ring +1",
        })

    sets.midcast.RA.HighAcc = set_combine(sets.midcast.RA.Acc, {
        head="Orion Beret +3",
        body="Orion Jerkin +3",
        hands="Orion Bracers +3",
        waist="K. Kachina Belt +1",
        })

    sets.midcast.RA.Critical = set_combine(sets.midcast.RA, {
        head="Meghanada Visor +2",
        body="Mummu Jacket +2",
        hands="Kobo Kote",
        legs="Mummu Kecks +2",
        feet="Osh. Leggings +1",
        ring1="Begrudging Ring",
        ring2="Mummu Ring",
        waist="K. Kachina Belt +1",
        })

    sets.midcast.RA.STP = set_combine(sets.midcast.RA, {
        neck="Iskur Gorget",
        ear1="Dedition Earring",
        ring1={name="Chirich Ring +1", bag="wardrobe3"},
        ring2={name="Chirich Ring +1", bag="wardrobe4"},
        })

    sets.DoubleShot = set_combine(sets.midcast.RA, {
        head="Arcadian Beret +3",
        body="Arc. Jerkin +3",
        hands="Oshosi Gloves +1", -- 5
        legs="Osh. Trousers +1", --7
        feet="Osh. Leggings +1", --4
        }) --25

    sets.DoubleShot.Critical = set_combine(sets.midcast.RA, {
        head="Meghanada Visor +2",
        waist="K. Kachina Belt +1",
        })

    sets.TrueShot = set_combine(sets.midcast.RA, {
        body="Nisroch Jerkin",
        legs="Osh. Trousers +1",
        })


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

    sets.resting = {}

    -- Idle sets
    sets.idle = {
        head="Malignance Chapeau",
        body="Malignance Tabard",
        hands="Malignance Gloves",
        legs="Malignance Tights",
        feet="Malignance Boots",
        --neck="Scout's Gorget +2",
    neck="Elite Royal Collar",
    waist="Flume Belt",
    left_ear={ name="Odnowa Earring +1", augments={'Path: A',}},
    right_ear="Etiolation Earring",
    left_ring={name="Chirich Ring +1", bag="wardrobe2"},
    right_ring={name="Chirich Ring +1", bag="wardrobe3"},
        back="Reiki Cloak",
        }

    sets.idle.DT = set_combine(sets.idle, {
        head="Malignance Chapeau", --6/6
        body="Malignance Tabard", --9/9
        hands="Malignance Gloves", --5/5
        legs="Malignance Tights", --7/7
        feet="Malignance Boots", --4/4
        neck="Warder's Charm +1",
        ring1="Purity Ring", --0/4
        ring2="Defending Ring", --10/10
        back="Moonlight Cape", --6/6
        })

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


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

    sets.defense.PDT = sets.idle.DT
    sets.defense.MDT = sets.idle.DT

    sets.Kiting = {feet="Orion Socks +3"}


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

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

    sets.engaged = {
    head="Malignance Chapeau",
    body="Malignance Tabard",
    hands="Malignance Gloves",
    legs="Malignance Tights",
    feet="Malignance Boots",
	--neck="Comm. Charm +2",
    neck="Iskur Gorget",
    waist="Kentarch Belt +1",
    left_ear="Telos Earring",
    right_ear="Cessance Earring",
        ring1={name="Chirich Ring +1", bag="wardrobe2"},
        ring2={name="Chirich Ring +1", bag="wardrobe3"},
        back=gear.RNG_TP_Cape,
        }

    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, {
        })

    -- * DNC Subjob DW Trait: +15%
    -- * NIN Subjob DW Trait: +25%

    -- No Magic Haste (74% DW to cap)
    sets.engaged.DW = {
    waist="Reiki Yotai",
    right_ear="Eabani Earring",
        } -- 52%

    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, {
        })

    -- 15% Magic Haste (67% DW to cap)
    sets.engaged.DW.LowHaste = {
        } -- 42%

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

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

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

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

    -- 30% Magic Haste (56% DW to cap)
    sets.engaged.DW.MidHaste = {
      } -- 31%

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

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

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

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

    -- 35% Magic Haste (51% DW to cap)
    sets.engaged.DW.HighHaste = {
      } -- 27%

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

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

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

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

    -- 45% Magic Haste (36% DW to cap)
    sets.engaged.DW.MaxHaste = {
        } -- 11%

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

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

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

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

    sets.engaged.DW.MaxHastePlus = set_combine(sets.engaged.DW.MaxHaste, {back=gear.RNG_DW_Cape})
    sets.engaged.DW.LowAcc.MaxHastePlus = set_combine(sets.engaged.DW.LowAcc.MaxHaste, {back=gear.RNG_DW_Cape})
    sets.engaged.DW.MidAcc.MaxHastePlus = set_combine(sets.engaged.DW.MidAcc.MaxHaste, {back=gear.RNG_DW_Cape})
    sets.engaged.DW.HighAcc.MaxHastePlus = set_combine(sets.engaged.DW.HighAcc.MaxHaste, {back=gear.RNG_DW_Cape})
    sets.engaged.DW.STP.MaxHastePlus = set_combine(sets.engaged.DW.STP.MaxHaste, {back=gear.RNG_DW_Cape})


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

    sets.engaged.Hybrid = {
        ring2="Defending Ring", --10/10
        }

    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)

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

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

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

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

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


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

    sets.buff.Barrage = {hands="Orion Bracers +3"}
    sets.buff['Velocity Shot'] = set_combine(sets.midcast.RA, {body="Amini Caban +1", back=gear.RNG_TP_Cape})
    sets.buff.Camouflage = {body="Orion Jerkin +3"}

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

    sets.FullTP = {ear1="Crematio Earring"}
    sets.Obi = {waist="Hachirin-no-Obi"}
    --sets.Reive = {neck="Ygnas's Resolve +1"}
    -- sets.CP = {back="Mecisto. Mantle"}

	sets.cp={main="Kustawi +1", sub="Ternion Dagger +1", ranged="Fomalhaut"}
    sets.Annihilator = {main="Perun +1", sub="Blurred Knife +1", ranged="Annihilator"}
    sets.Fomalhaut = {main="Perun +1", sub="Blurred Knife +1", ranged="Fomalhaut"}
    sets.Armageddon = {main="Perun +1", sub="Malevolence", ranged="Armageddon"}
    --sets.Gastraphetes = {main="Malevolence", sub="Malevolence", ranged="Gastraphetes"}

    sets.DefaultShield = {sub="Nusku Shield"}

end

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

-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
    if spell.action_type == 'Ranged Attack' then
        state.CombatWeapon:set(player.equipment.range)
    end
    -- Check that proper ammo is available if we're using ranged attacks or similar.
    if spell.action_type == 'Ranged Attack' or (spell.type == 'WeaponSkill' and (spell.skill == 'Marksmanship' or spell.skill == 'Archery')) then
        check_ammo(spell, action, spellMap, eventArgs)
    end
    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
end

function job_post_precast(spell, action, spellMap, eventArgs)
    if spell.action_type == 'Ranged Attack' then
        if spell.action_type == 'Ranged Attack' then
            if player.equipment.ranged == "Gastraphetes" then
                if flurry == 2 then
                    equip(sets.precast.RA.Gastra.Flurry2)
                elseif flurry == 1 then
                    equip(sets.precast.RA.Gastra.Flurry1)
                else
                    equip(sets.precast.RA.Gastra)
                end
            else
                if flurry == 2 then
                    equip(sets.precast.RA.Flurry2)
                elseif flurry == 1 then
                    equip(sets.precast.RA.Flurry1)
                else
                    equip(sets.precast.RA)
                end
            end
            if player.equipment.main == "Perun +1" then
                equip({waist="Yemaya Belt"})
            end
        end
      elseif spell.type == 'WeaponSkill' then
        -- Replace TP-bonus gear if not needed.
        if spell.english == 'Trueflight' or spell.english == 'Aeolian Edge' and player.tp > 2900 then
            equip(sets.FullTP)
        end
        -- Equip obi if weather/day matches for WS.
        if elemental_ws:contains(spell.name) then
            -- Matching double weather (w/o day conflict).
            if spell.element == world.weather_element and (get_weather_intensity() == 2 and spell.element ~= elements.weak_to[world.day_element]) then
                equip({waist="Hachirin-no-Obi"})
            -- Target distance under 1.7 yalms.
            elseif spell.target.distance < (1.7 + spell.target.model_size) then
                equip({waist="Orpheus's Sash"})
            -- Matching day and weather.
            elseif spell.element == world.day_element and spell.element == world.weather_element then
                equip({waist="Hachirin-no-Obi"})
            -- Target distance under 8 yalms.
            elseif spell.target.distance < (8 + spell.target.model_size) then
                equip({waist="Orpheus's Sash"})
            -- Match day or weather.
            elseif spell.element == world.day_element or spell.element == world.weather_element then
                equip({waist="Hachirin-no-Obi"})
            end
        end
    end
end

-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_post_midcast(spell, action, spellMap, eventArgs)
    if spell.action_type == 'Ranged Attack' then
        if buffactive['Double Shot'] then
            equip(sets.DoubleShot)
            if buffactive['Aftermath: Lv.3'] and player.equipment.ranged == "Armageddon" then
                equip(sets.DoubleShotCritical)
                if (spell.target.distance < (7 + spell.target.model_size)) and (spell.target.distance > (5 + spell.target.model_size)) then
                    equip(sets.TrueShot)
                end
            end
        elseif buffactive['Aftermath: Lv.3'] and player.equipment.ranged == "Armageddon" then
            equip(sets.midcast.RA.Critical)
            if (spell.target.distance < (7 + spell.target.model_size)) and (spell.target.distance > (5 + spell.target.model_size)) then
                equip(sets.TrueShot)
            end
        end
        if state.Buff.Barrage then
            equip(sets.buff.Barrage)
        end
--        if state.Buff['Velocity Shot'] and state.RangedMode.value == 'STP' then
--            equip(sets.buff['Velocity Shot'])
--        end
    end
end


function job_aftercast(spell, action, spellMap, eventArgs)
    if spell.english == "Shadowbind" then
        send_command('@timers c "Shadowbind ['..spell.target.name..']" 42 down abilities/00122.png')
    end
    if player.status ~= 'Engaged' and state.WeaponLock.value == false then
        check_weaponset()
    end
    if player.status == 'Engaged' and state.WeaponLock.value == false then
        check_weaponset()
    end
end

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

-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff,gain)
-- If we gain or lose any flurry buffs, adjust gear.
    if S{'flurry'}:contains(buff:lower()) then
        if not gain then
            flurry = nil
            add_to_chat(122, "Flurry status cleared.")
        end
        if not midaction() then
            handle_equipping_gear(player.status)
        end
    end

    if buff == "Camouflage" then
        if gain then
            equip(sets.buff.Camouflage)
            disable('body')
        else
            enable('body')
            handle_equipping_gear(player.status)
        end
    end

--    if buffactive['Reive Mark'] then
--        if gain then
--            equip(sets.Reive)
--            disable('neck')
--        else
--            enable('neck')
--        end
--    end

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

end

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

    check_weaponset()
end

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

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

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

function update_combat_form()
    if player.sub_job == 'NIN' and state.WeaponSet.value ~= "Fomalhaut_R" then
		state.CombatForm:set('DW')
	else
        state.CombatForm:reset()
	end
end

-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
    --if buffactive['Aftermath: Lv.3'] and player.equipment.main == "Carnwenhan" then
        --meleeSet = set_combine(meleeSet, sets.engaged.Aftermath)
    --end

    check_weaponset()
	update_combat_form()
    return meleeSet
end

function get_custom_wsmode(spell, action, spellMap)
    local wsmode
    if (spell.skill == 'Marksmanship' or spell.skill == 'Archery') then
        if state.RangedMode.value == 'Acc' or state.RangedMode.value == 'HighAcc' then
            wsmode = 'Acc'
            add_to_chat(1, 'WS Mode Auto Acc')
        end
    elseif (spell.skill ~= 'Marksmanship' and spell.skill ~= 'Archery') then
        if state.OffenseMode.value == 'Acc' or state.OffenseMode.value == 'HighAcc' then
            wsmode = 'Acc'
        end
    end

    return wsmode
end

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

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

--Read incoming packet to differentiate between Haste/Flurry I and II
windower.register_event('action',
    function(act)
        --check if you are a target of spell
        local actionTargets = act.targets
        playerId = windower.ffxi.get_player().id
        isTarget = false
        for _, target in ipairs(actionTargets) do
            if playerId == target.id then
                isTarget = true
            end
        end
        if isTarget == true then
            if act.category == 4 then
                local param = act.param
                if param == 845 and flurry ~= 2 then
                    --add_to_chat(122, 'Flurry Status: Flurry I')
                    flurry = 1
                elseif param == 846 then
                    --add_to_chat(122, 'Flurry Status: Flurry II')
                    flurry = 2
              end
            end
        end
    end)


-- Check for proper ammo when shooting or weaponskilling
function check_ammo(spell, action, spellMap, eventArgs)
    if spell.action_type == 'Ranged Attack' then
        if player.equipment.ammo == 'empty' or player.equipment.ammo ~= DefaultAmmo[player.equipment.range] then
            if DefaultAmmo[player.equipment.range] then
                if player.inventory[DefaultAmmo[player.equipment.range]] then
                    --add_to_chat(3,"Using Default Ammo")
                    equip({ammo=DefaultAmmo[player.equipment.range]})
                else
                    add_to_chat(3,"Default ammo unavailable.  Leaving empty.")
                end
            else
                add_to_chat(3,"Unable to determine default ammo for current weapon.  Leaving empty.")
            end
        end
    elseif spell.type == 'WeaponSkill' then
        -- magical weaponskills
        if elemental_ws:contains(spell.english) then
            if player.inventory[MagicAmmo[player.equipment.range]] then
                equip({ammo=MagicAmmo[player.equipment.range]})
            else
                add_to_chat(3,"Magic ammo unavailable.  Using default ammo.")
                equip({ammo=DefaultAmmo[player.equipment.range]})
            end
        --physical weaponskills
        else
            if state.RangedMode.value == 'Acc' then
                if player.inventory[AccAmmo[player.equipment.range]] then
                    equip({ammo=AccAmmo[player.equipment.range]})
                else
                    add_to_chat(3,"Acc ammo unavailable.  Using default ammo.")
                    equip({ammo=DefaultAmmo[player.equipment.range]})
                end
            else
                if player.inventory[WSAmmo[player.equipment.range]] then
                    equip({ammo=WSAmmo[player.equipment.range]})
                else
                    add_to_chat(3,"WS ammo unavailable.  Using default ammo.")
                    equip({ammo=DefaultAmmo[player.equipment.range]})
                end
            end
        end
    end
    if player.equipment.ammo ~= 'empty' and player.inventory[player.equipment.ammo].count < 15 then
        add_to_chat(39,"*** Ammo '"..player.inventory[player.equipment.ammo].shortname.."' running low! *** ("..player.inventory[player.equipment.ammo].count..")")
    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 check_weaponset()
    equip(sets[state.WeaponSet.current])
    if player.sub_job ~= 'NIN' and player.sub_job ~= 'DNC' then
       equip(sets.DefaultShield)
    end
end

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

send_command('input /macro set 3;input /macro book 22')
    send_command('@wait 5; input /lockstyleset 60')
Offline
Posts: 373
By drakefs 2022-11-21 01:59:17
Link | Citer | R
 
Does hitting F12 equip the correct set?

You can also check which set is being equipped at each step by using
Code
//gs debugmode
Which set is being equipped in the aftercast after using a WS?
Offline
Posts: 40
By quelthos 2022-11-21 23:55:47
Link | Citer | R
 
drakefs said: »
Does hitting F12 equip the correct set?

You can also check which set is being equipped at each step by using
Code
//gs debugmode
Which set is being equipped in the aftercast after using a WS?

no set is being equipped in aftercast, it only changes the earring to Eabani Earring, i have that function for 'DW', but the sets.engaged isn't being equipped, not sure why
Offline
Posts: 40
By quelthos 2022-11-21 23:57:59
Link | Citer | R
 
quelthos said: »
drakefs said: »
Does hitting F12 equip the correct set?

You can also check which set is being equipped at each step by using
Code
//gs debugmode
Which set is being equipped in the aftercast after using a WS?

no set is being equipped in aftercast, it only changes the earring to Eabani Earring, i have that function for 'DW', but the sets.engaged isn't being equipped, not sure why

Correction, the sets.engaged isn't being equipped while engaged, even before WSing, i didn't notice this because i had chirich ring +1s in idle set as well
Offline
Posts: 40
By quelthos 2022-11-22 00:02:39
Link | Citer | R
 
ok i feel stupid now,
sets.engaged.DW didn't have set_combine(sets.engaged, {
after it. all fix now
Offline
Posts: 40
By quelthos 2022-11-24 01:54:16
Link | Citer | R
 
trying to equip COR empy legs +3 only when I have Gleti's Knife in offhand, since it has 2% haste, without it i won't be gear haste capped with empy legs +3

Anyone know why below not working? sets.engaged.melee has empy legs +3
Code
function customize_melee_set(meleeSet)
	if player.equipment.sub == 'Gleti\'s Knife' then
		meleeSet = (sets.engaged.melee)
	end
    return meleeSet
end


I also tried putting logic under combat form but i already have my Dual Wield logic in there, and it was messing it up.
Code
function update_combat_form()
    if player.sub_job == 'NIN' and state.WeaponSet.value ~= "Fomalhaut_R" then
		state.CombatForm:set('DW')
	else
        state.CombatForm:reset()
	end
end
Offline
Posts: 373
By drakefs 2022-11-24 04:21:39
Link | Citer | R
 
try
Code
meleeSet = set_combine(meleeSet, {legs="Chas. Culottes +3"})


I would also check to make sure that
Code
if player.equipment.sub == 'Gleti\'s Knife' then


is actually able to check as true. Generally I would do this with
Code
function customize_melee_set(meleeSet)
    if player.equipment.sub == 'Gleti\'s Knife' then
        add_to_chat(123, 'True')
        meleeSet = (sets.engaged.melee)
    end
    return meleeSet
end


If it is not try
Code
if player.equipment.sub == "Gleti's Knife" then
Offline
Posts: 40
By quelthos 2022-11-24 06:01:58
Link | Citer | R
 
drakefs said: »
function customize_melee_set(meleeSet)
    if player.equipment.sub == 'Gleti\'s Knife' then
        add_to_chat(123, 'True')
        meleeSet = (sets.engaged.melee)
    end
    return meleeSet
end

tried everything still not working
First Page 2 3 ... 172 173 174 ... 180 181 182
Log in to post.