Gearswap Support Thread

言語: JP EN DE FR
2010-06-21
New Items
users online
フォーラム » Windower » Support » Gearswap Support Thread
Gearswap Support Thread
First Page 2 3 ... 154 155 156 ... 183 184 185
Offline
Posts: 113
By Heck 2019-11-19 13:45:57  
Hmm, tried that but still no change. Would I need to add a function in to make it swap if on that mode? Something like
Code
    if state.WeaponskillMode == 'MagAcc' then
	    equip(sets.precast.WS.magic.Acc)
		end


I just wouldn't know which type of function it would go under
 Cerberus.Shadowmeld
Offline
サーバ: Cerberus
Game: FFXI
Posts: 1809
By Cerberus.Shadowmeld 2019-11-19 15:49:07  
Your Jinpu set is based on the sets.precast.WS.magic set. It doesn't have an Acc set. If you define a set sets.precast.WS.magic.Acc or a sets.precast.WS['Tachi: Jinpu'].Acc set it should work.

If your mode is MagAcc, then the set that you need to add would be .MagAcc. You shouldn't have to add any functionality for it to work. Only the set.

Edit:
Make sure you add it after this set...
Code
sets.precast.WS.magic = {
	    ammo="Knobkierrie",
		head={ name="Valorous Mask", augments={'"Mag.Atk.Bns."+4','Mag. Acc.+24','Weapon skill damage +9%',}},
		body={ name="Found. Breastplate", augments={'Accuracy+15','Mag. Acc.+15','Attack+15','"Mag.Atk.Bns."+15',}},
		hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
		legs="Wakido Haidate +3",
		feet={ name="Valorous Greaves", augments={'"Snapshot"+4','"Mag.Atk.Bns."+27','"Fast Cast"+1','Accuracy+8 Attack+8','Mag. Acc.+20 "Mag.Atk.Bns."+20',}},
		--neck="Sanctity Necklace",
		neck="Fotia Gorget",
		--waist="Eschan Stone",
		waist="Fotia Belt",
		left_ear="Hermetic Earring",
		right_ear="Crematio Earring",
		left_ring="Etana Ring",
		right_ring="Weather. Ring",
		--back="Argocham. Mantle",
		back={ name="Smertrios's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},
	}


And before this set:
Code
sets.precast.WS["Tachi: Jinpu"] = sets.precast.WS.magic


That should be all you need to do.
 Asura.Kurdtray
Offline
サーバ: Asura
Game: FFXI
user: Kurdtray
Posts: 22
By Asura.Kurdtray 2019-12-06 10:32:54  
Okay I know I'm going to receive some flack for this but I need help.

I've been trying to research gearswap, and I've followed all the standard advice but I have a problem.

My ninja lua won't load the correct midcast set for my enfeebling or enhancing spells. When using debugmode it shows that there is no setting for the spells I've set so it goes into a fastrecast set instead. I got the lua i use is arslan's and I can post it if need be. Please help me understand gearswap a little better.

Thanks
 Bismarck.Xurion
Offline
サーバ: Bismarck
Game: FFXI
user: Xurion
Posts: 694
By Bismarck.Xurion 2019-12-06 17:29:57  
Asura.Kurdtray said: »
Okay I know I'm going to receive some flack for this but I need help.

I've been trying to research gearswap, and I've followed all the standard advice but I have a problem.

My ninja lua won't load the correct midcast set for my enfeebling or enhancing spells. When using debugmode it shows that there is no setting for the spells I've set so it goes into a fastrecast set instead. I got the lua i use is arslan's and I can post it if need be. Please help me understand gearswap a little better.

Thanks
Yeah, post it. I can never keep track of all these named Gearswap templates and Google returns nothing for the majority of them.

I'd be puzzled if you received flak for posting for support on a support forum about the topic the support is for.
 Asura.Kurdtray
Offline
サーバ: Asura
Game: FFXI
user: Kurdtray
Posts: 22
By Asura.Kurdtray 2019-12-06 18:33:07  
Hope I'm doing this right, but here is the problem lua.
Code
-- Original: Motenten / Modified: Arislan
-- Haste/DW Detection Requires Gearinfo Addon

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

--  Modes:      [ F9 ]              Cycle Offense Modes
--              [ CTRL+F9 ]         Cycle Hybrid Modes
--              [ WIN+F9 ]          Cycle Weapon Skill Modes
--              [ F10 ]             Emergency -PDT Mode
--              [ ALT+F10 ]         Toggle Kiting Mode
--              [ F11 ]             Emergency -MDT Mode
--              [ CTRL+F11 ]        Cycle Casting Modes
--              [ F12 ]             Update Current Gear / Report Current Status
--              [ CTRL+F12 ]        Cycle Idle Modes
--              [ ALT+F12 ]         Cancel Emergency -PDT/-MDT Mode
--              [ CTRL+` ]          Toggle Treasure Hunter Mode
--              [ ALT+` ]           Toggle Magic Burst Mode
--              [ WIN+C ]           Toggle Capacity Points Mode
--
--  Abilities:  [ CTRL+- ]          Yonin
--              [ CTRL+= ]          Innin
--              [ CTRL+Numpad/ ]    Berserk
--              [ CTRL+Numpad* ]    Warcry
--              [ CTRL+Numpad- ]    Aggressor
--
--  Spells:     [ WIN+, ]           Utsusemi: Ichi
--              [ WIN+. ]           Utsusemi: Ni
--              [ WIN+/ ]           Utsusemi: San
--              [ ALT+, ]           Monomi: Ichi
--              [ ALT+. ]           Tonko: Ni
--
--  WS:         [ CTRL+Numpad7 ]    Blade: Kamu
--              [ CTRL+Numpad8 ]    Blade: Shun
--              [ CTRL+Numpad4 ]    Blade: Ten
--              [ CTRL+Numpad6 ]    Blade: Hi
--              [ CTRL+Numpad1 ]    Blade: Yu
--
--
--              (Global-Binds.lua contains additional non-job-related keybinds)


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

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

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


-- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
function job_setup()
    state.Buff.Migawari = buffactive.migawari or false
    state.Buff.Doom = buffactive.doom or false
    state.Buff.Yonin = buffactive.Yonin or false
    state.Buff.Innin = buffactive.Innin or false
    state.Buff.Futae = buffactive.Futae or false

    include('Mote-TreasureHunter')

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

    lugra_ws = S{'Blade: Kamu', 'Blade: Shun', 'Blade: Ten'}

    lockstyleset = 14
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('STP', 'Normal', 'LowAcc', 'MidAcc', 'HighAcc')
    state.HybridMode:options('Normal', 'DT')
    state.WeaponskillMode:options('Normal', 'Acc')
    state.CastingMode:options('Normal', 'Resistant')
    state.IdleMode:options('Normal', 'DT')
    state.PhysicalDefenseMode:options('PDT', 'Evasion')

    state.MagicBurst = M(false, 'Magic Burst')
    state.CP = M(false, "Capacity Points Mode")

    state.Night = M(false, "Dusk to Dawn")
    options.ninja_tool_warning_limit = 10



    send_command('bind ^` gs c cycle treasuremode')
    send_command('bind !` gs c toggle MagicBurst')
    send_command('bind ^- input /ja "Yonin" <me>')
    send_command('bind ^= input /ja "Innin" <me>')
    send_command('bind ^, input /nin "Monomi: Ichi" <me>')
    send_command('bind ^. input /ma "Tonko: Ni" <me>')
    send_command('bind @/ input /ma "Utsusemi: San" <me>')

    send_command('bind @c gs c toggle CP')

    send_command('bind ^numlock input /ja "Innin" <me>')
    send_command('bind !numlock input /ja "Yonin" <me>')

    if player.sub_job == 'WAR' then
        send_command('bind ^numpad/ input /ja "Berserk" <me>')
        send_command('bind !numpad/ input /ja "Defender" <me>')
        send_command('bind ^numpad* input /ja "Warcry" <me>')
        send_command('bind ^numpad- input /ja "Aggressor" <me>')
    end

    send_command('bind ^numpad7 input /ws "Blade: Kamu" <t>')
    send_command('bind ^numpad8 input /ws "Blade: Shun" <t>')
    send_command('bind ^numpad4 input /ws "Blade: Ten" <t>')
    send_command('bind ^numpad6 input /ws "Blade: Hi" <t>')
    send_command('bind ^numpad1 input /ws "Blade: Yu" <t>')
    send_command('bind ^numpad2 input /ws "Blade: Chi" <t>')

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

    select_movement_feet()
    select_default_macro_book()
    set_lockstyle()

    Haste = 0
    DW_needed = 0
    DW = false
    moving = false
    update_combat_form()
    determine_haste_group()
end

function user_unload()
    send_command('unbind ^`')
    send_command('unbind !`')
    send_command('unbind ^-')
    send_command('unbind ^=')
    send_command('unbind @/')
    send_command('unbind @c')
    send_command('unbind @t')
    send_command('unbind ^numlock')
    send_command('unbind !numlock')
    send_command('unbind ^numpad/')
    send_command('unbind !numpad/')
    send_command('unbind ^numpad*')
    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 ^numpad1')
    send_command('unbind ^numpad2')

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


end

-- Define sets and vars used by this job file.
function init_gear_sets()
    --------------------------------------
	-- Start defining the sets
    --------------------------------------
	gear.Herc_WS_head = {name="Herculean Helm"}
	gear.Herc_WS_body = {name="Herculean Vest"}
	gear.Herc_DT_hands = {}
	gear.Herc_WS_hands = {}
	gear.Herc_WS_legs = {}
	gear.Herc_MAB_legs = {}
	gear.Herc_STP_feet = {}
	gear.Herc_WS_feet = {}
	gear.Herc_TA_feet = {}
    gear.Herc_MAB_feet = {}
    
	gear.NIN_FC_Cape = {name="Andartia's Mantle", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+5','"Fast Cast"+10','Mag. Evasion+15',}}
    gear.NIN_TP_Cape = {name="Andartia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Attack+10','"Dbl.Atk."+10','"Regen"+5',}}
    gear.NIN_WS1_Cape = {}
	gear.NIN_MAB_Cape = {name="Andartia's Mantle", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+5','"Mag.Atk.Bns."+10','Spell interruption rate down-10%',}}
   
   --------------------------------------
    -- Precast sets
    --------------------------------------

    -- Enmity set
    sets.Enmity = {
        ammo="Sapience Orb", --2
        body="Emet Harness +1", --10
        hands="Kurys Gloves", --9
        feet="Ahosi Leggings", --7
        neck="Unmoving Collar +1", --10
        ear1="Cryptic Earring", --4
        ear2="Trux Earring", --5
        ring1="Supershear Ring", --5
        ring2="Eihwaz Ring", --5
        waist="Kasiri Belt", --3
        }

    sets.precast.JA['Provoke'] = sets.Enmity
--  sets.precast.JA['Mijin Gakure'] = {legs="Mochi. Hakama +1"}
    sets.precast.JA['Futae'] = {hands="Hattori Tekko +1"}
    sets.precast.JA['Sange'] = {body="Mochi. Chainmail +1"}

    sets.precast.Waltz = {
        ammo="Yamarang",
        body="Passion Jacket",
        legs="Dashing Subligar",
        neck="Phalaina Locket",
        ring1="Asklepian Ring",
        waist="Gishdubar Sash",
        }

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

    -- Fast cast sets for spells

    sets.precast.FC = {
        ammo="Sapience Orb", --2
        head="Herculean Helm", --7
        body="Taeon Tabard", --8
        hands="Leyline Gloves", --8
        legs="Taeon Tights", --5 but atm 4
        feet="Taeon Boots", --2
        neck="Orunmila's Torque", --5
        ear1="Loquacious Earring", --2
        ear2="Enchntr. Earring +1", --2
        ring1="Kishar Ring", --4
        ring2="Prolix Ring", --2
		back=gear.NIN_FC_Cape, --10
        }

    sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {body="Mochizuki Chainmail +3", neck="Magoraga Beads",}
		)

    sets.precast.RA = {
        head=gear.Taeon_RA_head, --10/0
        body=gear.Taeon_RA_body, --10/0
        legs=gear.Adhemar_C_legs, --10/0
        }

    -- Weaponskill sets
    -- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS = {
        range="Seeth. Bomblet +1",
        head="Hachiya Hatsuburi +2",
        body="Herculean Vest",
        hands="Adhemar Wristbands +1",
        legs="Mochizuki Hakama +3",
        feet=gear.Herc_TA_feet,
        neck="Fotia Gorget",
        ear1="Moonshade Earring",
        ear2="Ishvara Earring",
        ring1="Regal Ring",
        ring2="Karieyh Ring",
        back=gear.NIN_WS1_Cape,
        waist="Fotia Belt",
        } -- default set

    sets.precast.WS.Acc = set_combine(sets.precast.WS, {
        legs=gear.Herc_WS_legs,
        feet=gear.Herc_STP_feet,
        ear2="Telos Earring",
        ring2="Ramuh Ring +1",
        })

    sets.precast.WS['Blade: Hi'] = set_combine(sets.precast.WS, {
        ammo="Yetshila +1",
        head="Adhemar Bonnet +1",
        hands="Mummu Wrists +2",
        feet="Mummu Gamash. +2",
        ring2="Mummu Ring",
        back=gear.NIN_WS1_Cape,
        })

    sets.precast.WS['Blade: Ten'] = set_combine(sets.precast.WS, {
        neck="Caro Necklace",
        waist="Grunfeld Rope",
        back=gear.NIN_WS1_Cape,
        })

    sets.precast.WS['Blade: Ten'].Acc = set_combine(sets.precast.WS['Blade: Ten'], {
        body=gear.Herc_WS_body,
		ear2="Telos Earring",
        })

    sets.precast.WS['Blade: Shun'] = set_combine(sets.precast.WS, {
        ammo="Jukukik Feather",
        head="Adhemar Bonnet +1",
        body="Adhemar Jacket +1",
        ear2="Mache Earring +1",
        ring2="Ilabrat Ring",
        back=gear.NIN_TP_Cape,
        })

    sets.precast.WS['Blade: Kamu'] = set_combine(sets.precast.WS, {
        ring2="Ilabrat Ring",
        })

    sets.precast.WS['Blade: Yu'] = set_combine(sets.precast.WS, {
        ammo="Pemphredo Tathlum",
        head="Hachiya Hatsuburi +2",
        body="Samnuha Coat",
        hands="Leyline Gloves",
        legs=gear.Herc_MAB_legs,
        feet=gear.Herc_MAB_feet,
        neck="Baetyl Pendant",
        ear1="Moonshade Earring",
        ear2="Friomisi Earring",
        ring1="Dingir Ring",
        back=gear.NIN_MAB_Cape,
        waist="Eschan Stone",
        })

    sets.LugraLeft = {ear1="Lugra Earring"}
    sets.LugraRight = {ear2="Lugra Earring +1"}
    sets.WSDayBonus = {head="Gavialis Helm"}

    --------------------------------------
    -- Midcast sets
    --------------------------------------

    sets.midcast.FastRecast = sets.precast.FC

    sets.midcast.SpellInterrupt = {
        ammo="Impatiens", --10
        ring1="Evanescence Ring", --5
        }

    -- Specific spells
    sets.midcast.Utsusemi = set_combine(sets.midcast.SpellInterrupt, {feet="Hattori Kyahan +1", back=gear.NIN_FC_Cape,})

    sets.midcast.ElementalNinjutsu = {
        ammo="Pemphredo Tathlum",
        head="Mochi. Hatsuburi +3",
        body="Samnuha Coat",
        hands="Leyline Gloves",
        legs="Herculean Trousers",
        feet="Hachiya Kyahan +3",
        neck="Baetyl Pendant",
        ear1="Crematio Earring",
        ear2="Friomisi Earring",
        ring1="Shiva Ring +1",
        ring2="Shiva Ring +1",
        back=gear.NIN_MAB_Cape,
        waist="Eschan Stone",
        }

    sets.midcast.ElementalNinjutsu.Resistant = set_combine(sets.midcast.Ninjutsu, {
        neck="Sanctity Necklace",
        ring1={name="Stikini Ring", bag="wardrobe3"},
        ring2={name="Stikini Ring", bag="wardrobe4"},
        ear1="Hermetic Earring",
        })

    sets.midcast.EnfeeblingNinjutsu = {
        ammo="Yamarang",
        head="Hachiya Hatsuburi +2",
        body="Mummu Jacket +2",
        hands="Mummu Wrists +2",
        legs="Mummu Kecks +1",
        feet="Hachiya Kyahan +1",
        neck="Sanctity Necklace",
        ear1="Hermetic Earring",
        ear2="Digni. Earring",
        ring1={name="Stikini Ring", bag="wardrobe3"},
        ring2={name="Stikini Ring", bag="wardrobe4"},
        back=gear.NIN_MAB_Cape,
        waist="Eschan Stone",
        }

    sets.midcast.EnhancingNinjutsu = {
        head="Hachiya Hatsuburi +2",
        feet="Mochi. Kyahan +1",
        neck="Incanter's Torque",
        ear1="Stealth Earring",
        ring1={name="Stikini Ring", bag="wardrobe3"},
        ring2={name="Stikini Ring", bag="wardrobe4"},
        back="Astute Cape",
        waist="Cimmerian Sash",
        }

    sets.midcast.RA = {
        head="Mummu Bonnet +2",
        body="Mummu Jacket +2",
        hands="Adhemar Wristbands +1",
        legs=gear.Adhemar_C_legs,
        feet="Mummu Gamash. +2",
        neck="Iskur Gorget",
        ear1="Enervating Earring",
        ear2="Telos Earring",
        ring1="Dingir Ring",
        ring2="Hajduk Ring +1",
        back=gear.NIN_TP_Cape,
        waist="Yemaya Belt",
        }

    --------------------------------------
    -- Idle/resting/defense/etc sets
    --------------------------------------

    -- Resting sets
--    sets.resting = {}

    -- Idle sets
    sets.idle = {
		feet="Danzo Sune-Ate",
		}

    sets.idle.DT = set_combine(sets.idle, {
        ammo="Staunch Tathlum", --3/3
        body="Emet Harness +1", --7/7
        hands=gear.Herc_DT_hands, --7/5
        legs="Mummu Kecks +2", --5/5
        neck="Loricate Torque +1", --6/6
        ear1="Genmei Earring", --2/0
        ring2="Defending Ring", --10/10
        back="Moonlight Cape", --6/6
        waist="Flume Belt +1", --4/0
        })

    sets.idle.Town = set_combine(sets.idle, {
        head="Adhemar Bonnet +1",
        body="Adhemar Jacket +1",
        hands="Adhemar Wristbands +1",
        neck="Combatant's Torque",
        ear1="Cessance Earring",
        ear2="Telos Earring",
        back=gear.NIN_TP_Cape,
        waist="Windbuffet Belt +1",
        })

    sets.idle.Weak = sets.idle.DT

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

    sets.Kiting = {feet="Danzo sune-ate"}

    sets.DayMovement = {feet="Danzo sune-ate"}
    sets.NightMovement = {feet="Hachiya Kyahan +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

    -- * NIN Native DW Trait: 35% DW

    -- No Magic Haste (74% DW to cap)
    sets.engaged = {
        ammo="Seki Shuriken",
        head="Adhemar Bonnet +1",
        body="Adhemar Jacket +1", --7
        hands="Adhemar Wristbands +1", --5
        legs="Samnuha Tights",
        feet="Hizamaru Sune-Ate +2", --8
        neck="Erudit. Necklace",
        ear1="Eabani Earring", --4
        ear2="Suppanomimi", --5
        ring1="Hetairoi Ring",
        ring2="Epona's Ring",
        back=gear.NIN_TP_Cape,
        waist="Reiki Yotai", --7
        } -- 35%

    sets.engaged.LowAcc = set_combine(sets.engaged, {
        head="Dampening Tam",
        neck="Combatant's Torque",
        })

    sets.engaged.MidAcc = set_combine(sets.engaged.LowAcc, {
        ring2="Ilabrat Ring",
        ring1={name="Chirich Ring +1", bag="wardrobe3"},
        waist="Kentarch Belt +1",
        })

    sets.engaged.HighAcc = set_combine(sets.engaged.MidAcc, {
        legs=gear.Herc_WS_legs,
        feet=gear.Herc_STP_feet,
        ear1="Cessance Earring",
        ear2="Telos Earring",
        ring1="Regal Ring",
        ring2="Ramuh Ring +1",
        waist="Olseni Belt",
        })

    sets.engaged.STP = set_combine(sets.engaged, {
        ring1={name="Chirich Ring +1", bag="wardrobe3"},
        ring2={name="Chirich Ring +1", bag="wardrobe4"},
        })

    -- 15% Magic Haste (67% DW to cap)
    sets.engaged.LowHaste = {
        ammo="Seki Shuriken",
        head="Adhemar Bonnet +1",
        body="Adhemar Jacket +1", --6
        hands="Floral Gauntlets", --5
        legs="Samnuha Tights",
        feet="Hizamaru Sune-Ate +2", --8
        neck="Erudit. Necklace",
        ear1="Eabani Earring", --4
        ear2="Suppanomimi", --5
        ring1="Hetairoi Ring",
        ring2="Epona's Ring",
        back=gear.NIN_TP_Cape,
        waist="Reiki Yotai", --7
      } -- 35%

    sets.engaged.LowAcc.LowHaste = set_combine(sets.engaged.LowHaste, {
        head="Dampening Tam",
        neck="Combatant's Torque",
        })

    sets.engaged.MidAcc.LowHaste = set_combine(sets.engaged.LowAcc.LowHaste, {
        feet=gear.Herc_TA_feet,
        ring1={name="Chirich Ring +1", bag="wardrobe3"},
        ring2="Ilabrat Ring",
        waist="Kentarch Belt +1",
        })

    sets.engaged.HighAcc.LowHaste = set_combine(sets.engaged.LowAcc.LowHaste, {
        legs=gear.Herc_WS_legs,
        feet=gear.Herc_STP_feet,
        ear1="Cessance Earring",
        ear2="Telos Earring",
        ring1="Regal Ring",
        ring2="Ramuh Ring +1",
        waist="Olseni Belt",
        })

    sets.engaged.STP.LowHaste = set_combine(sets.engaged.LowHaste, {
        ring1={name="Chirich Ring +1", bag="wardrobe3"},
        ring2={name="Chirich Ring +1", bag="wardrobe4"},
        })

    -- 30% Magic Haste (56% DW to cap)
    sets.engaged.MidHaste = {
        ammo="Seki Shuriken",
        head="Adhemar Bonnet +1",
        body="Adhemar Jacket +1", --6
        hands="Adhemar Wristbands +1",
        legs="Samnuha Tights",
        feet=gear.Herc_TA_feet,
        neck="Erudit. Necklace",
        ear1="Eabani Earring", --4
        ear2="Suppanomimi", --5
        ring1="Hetairoi Ring",
        ring2="Epona's Ring",
        back=gear.NIN_TP_Cape,
        waist="Reiki Yotai", --7
        } -- 22%

    sets.engaged.LowAcc.MidHaste = set_combine(sets.engaged.MidHaste, {
        head="Dampening Tam",
        neck="Combatant's Torque",
        })

    sets.engaged.MidAcc.MidHaste = set_combine(sets.engaged.LowAcc.MidHaste, {
        feet=gear.Herc_TA_feet,
        ear1="Cessance Earring",
        ring1={name="Chirich Ring +1", bag="wardrobe3"},
        ring2="Ilabrat Ring",
        waist="Kentarch Belt +1",
        })

    sets.engaged.HighAcc.MidHaste = set_combine(sets.engaged.MidHaste.MidAcc, {
        legs=gear.Herc_WS_legs,
        feet=gear.Herc_STP_feet,
        ear2="Telos Earring",
        ring1="Regal Ring",
        ring2="Ramuh Ring +1",
        waist="Olseni Belt",
        })

    sets.engaged.STP.MidHaste = set_combine(sets.engaged.MidHaste, {
        ring1={name="Chirich Ring +1", bag="wardrobe3"},
        ring2={name="Chirich Ring +1", bag="wardrobe4"},
        })

    -- 35% Magic Haste (51% DW to cap)
    sets.engaged.HighHaste = {
        ammo="Seki Shuriken",
        head="Adhemar Bonnet +1",
        body="Adhemar Jacket +1", --6
        hands="Adhemar Wristbands +1",
        legs="Samnuha Tights",
        feet=gear.Herc_TA_feet,
        neck="Erudit. Necklace",
        ear1="Eabani Earring", --4
        ear2="Suppanomimi", --5
        ring1="Hetairoi Ring",
        ring2="Epona's Ring",
        back=gear.NIN_TP_Cape,
        waist="Windbuffet Belt +1",
        } -- 15% Gear

    sets.engaged.LowAcc.HighHaste = set_combine(sets.engaged.HighHaste, {
        head="Dampening Tam",
        neck="Combatant's Torque",
        waist="Kentarch Belt +1",
        })

    sets.engaged.MidAcc.HighHaste = set_combine(sets.engaged.LowAcc.HighHaste, {
        ear1="Cessance Earring",
        ring1={name="Chirich Ring +1", bag="wardrobe3"},
        ring2="Ilabrat Ring",
        })

    sets.engaged.HighAcc.HighHaste = set_combine(sets.engaged.MidAcc.HighHaste, {
        legs=gear.Herc_WS_legs,
        feet=gear.Herc_STP_feet,
        ear2="Telos Earring",
        ring1="Regal Ring",
        ring2="Ramuh Ring +1",
        waist="Olseni Belt",
        })

    sets.engaged.STP.HighHaste = set_combine(sets.engaged.HighHaste, {
        ring1={name="Chirich Ring +1", bag="wardrobe3"},
        ring2={name="Chirich Ring +1", bag="wardrobe4"},
        waist="Kentarch Belt +1",
        })

    -- 45% Magic Haste (36% DW to cap)
    sets.engaged.MaxHaste = {
        ammo="Seki Shuriken",
        head="Adhemar Bonnet +1",
        body="Adhemar Jacket +1",
        hands="Adhemar Wristbands +1",
        legs="Samnuha Tights",
        feet=gear.Herc_TA_feet,
        neck="Erudit. Necklace",
        ear1="Cessance Earring",
        ear2="Brutal Earring",
        ring1="Hetairoi Ring",
        ring2="Epona's Ring",
        back=gear.NIN_TP_Cape,
        waist="Windbuffet Belt +1",
        } -- 0%

    sets.engaged.LowAcc.MaxHaste = set_combine(sets.engaged.MaxHaste, {
        head="Dampening Tam",
        neck="Combatant's Torque",
        waist="Kentarch Belt +1",
        })

    sets.engaged.MidAcc.MaxHaste = set_combine(sets.engaged.LowAcc.MaxHaste, {
        ear1="Cessance Earring",
        ring1={name="Chirich Ring +1", bag="wardrobe3"},
        ring2="Ilabrat Ring",
        })

    sets.engaged.HighAcc.MaxHaste = set_combine(sets.engaged.MidAcc.MaxHaste, {
        legs=gear.Herc_WS_legs,
        feet=gear.Herc_STP_feet,
        ear2="Telos Earring",
        ring1="Regal Ring",
        ring2="Ramuh Ring +1",
        waist="Olseni Belt",
        })

    sets.engaged.STP.MaxHaste = set_combine(sets.engaged.MaxHaste, {
        body="Ashera Harness",
        neck="Iskur Gorget",
        ear1="Dedition Earring",
        ear2="Telos Earring",
        ring1={name="Chirich Ring +1", bag="wardrobe3"},
        ring2={name="Chirich Ring +1", bag="wardrobe4"},
        waist="Kentarch Belt +1",
        })

    sets.engaged.Hybrid = {
        head="Adhemar Bonnet +1", --4/0
        body="Ashera Harness", --7/7
        neck="Loricate Torque +1", --6/6
        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.DT.LowHaste = set_combine(sets.engaged.LowHaste, sets.engaged.Hybrid)
    sets.engaged.LowAcc.DT.LowHaste = set_combine(sets.engaged.LowAcc.LowHaste, sets.engaged.Hybrid)
    sets.engaged.MidAcc.DT.LowHaste = set_combine(sets.engaged.MidAcc.LowHaste, sets.engaged.Hybrid)
    sets.engaged.HighAcc.DT.LowHaste = set_combine(sets.engaged.HighAcc.LowHaste, sets.engaged.Hybrid)
    sets.engaged.STP.DT.LowHaste = set_combine(sets.engaged.STP.LowHaste, sets.engaged.Hybrid)

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

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

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

    --------------------------------------
    -- Custom buff sets
    --------------------------------------

    sets.magic_burst = {
        feet="Hachiya Kyahan +3",
        ring1="Locus Ring",
        ring2="Mujin Band", --(5)
        }

--    sets.buff.Migawari = {body="Iga Ningi +2"}

    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.buff.Yonin = {}
--    sets.buff.Innin = {}

    sets.CP = {back="Mecisto. Mantle"}
    sets.TreasureHunter = {head="Volte Cap", hands=gear.Herc_TH_hands, waist="Chaac Belt"}
    --sets.Reive = {neck="Ygnas's Resolve +1"}

end

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

function job_precast(spell, action, spellMap, eventArgs)
    if spell.skill == "Ninjutsu" then
        do_ninja_tool_checks(spell, 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.type == 'WeaponSkill' then
        if lugra_ws:contains(spell.english) and state.Night.value == true then
                equip(sets.LugraRight)
            if spell.english == 'Blade: Kamu' then
                equip(sets.LugraLeft)
            end
        end
        if spell.english == 'Blade: Yu' and (world.weather_element == 'Water' or world.day_element == 'Water') then
            equip(sets.Obi)
        end
    end
end

-- Run after the general midcast() is done.
-- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
function job_post_midcast(spell, action, spellMap, eventArgs)
    if default_spell_map == 'ElementalNinjutsu' then
        if state.MagicBurst.value then
            equip(sets.magic_burst)
        end
        if (spell.element == world.day_element or spell.element == world.weather_element) then
            equip(sets.Obi)
        end
        if state.Buff.Futae then
            equip(sets.precast.JA['Futae'])
            add_to_chat(120, 'Futae GO!')
        end
    end
    if spell.type == 'WeaponSkill' then
        if state.Buff.Futae then
            add_to_chat(120, 'Futae GO!')
        end
    end
    if state.Buff.Doom then
        equip(sets.buff.Doom)
    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 not spell.interrupted and spell.english == "Migawari: Ichi" then
        state.Buff.Migawari = true
    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 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_status_change(new_status, old_status)
    if new_status == 'Idle' then
        select_movement_feet()
    end
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)
    update_combat_form()
    determine_haste_group()
end

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

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

-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
    if state.Buff.Migawari then
       idleSet = set_combine(idleSet, sets.buff.Migawari)
    end
    if state.CP.current == 'on' then
        equip(sets.CP)
        disable('back')
    else
        enable('back')
    end

    idleSet = set_combine(idleSet, select_movement_feet())

    return idleSet
end


-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
    if state.Buff.Migawari then
        meleeSet = set_combine(meleeSet, sets.buff.Migawari)
    end
    if state.TreasureMode.value == 'Fulltime' then
        meleeSet = set_combine(meleeSet, sets.TreasureHunter)
    end

    return meleeSet
end


-- Function to display the current relevant user state when doing an update.
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 c_msg = state.CastingMode.value

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

    local i_msg = state.IdleMode.value

    local msg = ''
    if state.TreasureMode.value == 'Tag' then
        msg = msg .. ' TH: Tag |'
    end
    if state.MagicBurst.value then
        msg = ' Burst: On |'
    end
    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).. ' Magic: ' ..string.char(31,001)..c_msg.. string.char(31,002)..  ' |'
        ..string.char(31,004).. ' Defense: ' ..string.char(31,001)..d_msg.. string.char(31,002)..  ' |'
        ..string.char(31,008).. ' Idle: ' ..string.char(31,001)..i_msg.. string.char(31,002)..  ' |'
        ..string.char(31,002)..msg)

    eventArgs.handled = true
end

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

function determine_haste_group()
    classes.CustomMeleeGroups:clear()
    if DW == true then
        if DW_needed <= 1 then
            classes.CustomMeleeGroups:append('MaxHaste')
        elseif DW_needed > 1 and DW_needed <= 16 then
            classes.CustomMeleeGroups:append('HighHaste')
        elseif DW_needed > 16 and DW_needed <= 21 then
            classes.CustomMeleeGroups:append('MidHaste')
        elseif DW_needed > 21 and DW_needed <= 34 then
            classes.CustomMeleeGroups:append('LowHaste')
        elseif DW_needed > 34 then
            classes.CustomMeleeGroups:append('')
        end
    end
end

function job_self_command(cmdParams, eventArgs)
    gearinfo(cmdParams, eventArgs)
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 select_movement_feet()
    if world.time >= (17*60) or world.time <= (7*60) then
        state.Night:set()
        return sets.NightMovement
    else
        state.Night:reset()
        return sets.DayMovement
    end
end

-- Determine whether we have sufficient tools for the spell being attempted.
function do_ninja_tool_checks(spell, spellMap, eventArgs)
    local ninja_tool_name
    local ninja_tool_min_count = 1

    -- Only checks for universal tools and shihei
    if spell.skill == "Ninjutsu" then
        if spellMap == 'Utsusemi' then
            ninja_tool_name = "Shihei"
        elseif spellMap == 'ElementalNinjutsu' then
            ninja_tool_name = "Inoshishinofuda"
        elseif spellMap == 'EnfeeblingNinjutsu' then
            ninja_tool_name = "Chonofuda"
        elseif spellMap == 'EnhancingNinjutsu' then
            ninja_tool_name = "Shikanofuda"
        else
            return
        end
    end

    local available_ninja_tools = player.inventory[ninja_tool_name] or player.wardrobe[ninja_tool_name]

    -- If no tools are available, end.
    if not available_ninja_tools then
        if spell.skill == "Ninjutsu" then
            return
        end
    end

    -- Low ninja tools warning.
    if spell.skill == "Ninjutsu" and state.warned.value == false
        and available_ninja_tools.count > 1 and available_ninja_tools.count <= options.ninja_tool_warning_limit then
        local msg = '*****  LOW TOOLS WARNING: '..ninja_tool_name..' *****'
        --local border = string.repeat("*", #msg)
        local border = ""
        for i = 1, #msg do
            border = border .. "*"
        end

        add_to_chat(104, border)
        add_to_chat(104, msg)
        add_to_chat(104, border)

        state.warned:set()
    elseif available_ninja_tools.count > options.ninja_tool_warning_limit and state.warned then
        state.warned:reset()
    end
end

-- Check for various actions that we've specified in user code as being used with TH gear.
-- This will only ever be called if TreasureMode is not 'None'.
-- Category and Param are as specified in the action event packet.
function th_action_check(category, param)
    if category == 2 or -- any ranged attack
        --category == 4 or -- any magic action
        (category == 3 and param == 30) or -- Aeolian Edge
        (category == 6 and info.default_ja_ids:contains(param)) or -- Provoke, Animated Flourish
        (category == 14 and info.default_u_ja_ids:contains(param)) -- Quick/Box/Stutter Step, Desperate/Violent Flourish
        then return true
    end
end

windower.register_event('zone change', 
    function()
        send_command('gi ugs true')
    end
)

-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
    -- Default macro set/book
    if player.sub_job == 'DNC' then
        set_macro_page(2, 10)
    elseif player.sub_job == 'THF' then
        set_macro_page(3, 10)
    else
        set_macro_page(1, 10)
    end
end

function set_lockstyle()
    send_command('wait 2; input /lockstyleset ' .. lockstyleset)
end
 Shiva.Arislan
Offline
サーバ: Shiva
Game: FFXI
user: Arislan
Posts: 1052
By Shiva.Arislan 2019-12-06 23:21:58  
Asura.Kurdtray said: »
My ninja lua won't load the correct midcast set for my enfeebling or enhancing spells. When using debugmode it shows that there is no setting for the spells I've set so it goes into a fastrecast set instead. I got the lua i use is arslan's and I can post it if need be. Please help me understand gearswap a little better.

The lua is calling for 'EnfeeblingNinjutsu' and 'EnhancingNinjutsu' spell maps, but you probably don't have them defined.

Replace what you have in gearswap/libs folder with this file:
https://github.com/ArislanShiva/luas/blob/master/Mote-Mappings.lua
 Asura.Kurdtray
Offline
サーバ: Asura
Game: FFXI
user: Kurdtray
Posts: 22
By Asura.Kurdtray 2019-12-07 10:23:03  
That did the trick, thank you.
 Phoenix.Mikumaru
Offline
サーバ: Phoenix
Game: FFXI
user: Mikumaru
Posts: 382
By Phoenix.Mikumaru 2019-12-12 07:59:04  
When swapping between kiting or engaged and sets.precast.FC.SIRD I'm losing about 300 HP when these sets have less than 40HP difference. I've tried keeping High HP items in the same slots with no success and tired to determine exactly what is going on but it's a total mystery. Kiting/Engaged HP is 2944 , SIRD HP is 2906. When casting say Cure on myself, HP goes to 2618 or 2616 (Auto-regen makes it had to nail down but I presume the lowest @2616)then when swapping back into Kite/Engaged it goes to this number again.
It hasn't been problematic yet and being able to perpetually cure myself for 280+ HP is super nice for hate, being unable to effectively top off my HP can be dangerous in some situations. Appreciate any help or insights.
Code
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job.  Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------

-- Initialization function for this job file.
function get_sets()
    mote_include_version = 2
    
    -- Load and initialize the include file.
    include('Mote-Include.lua')
	include('Debuffz.lua')
end


-- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
function job_setup()

end

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

-- Setup vars that are user-dependent.  Can override this function in a sidecar file.
function user_setup()
    state.OffenseMode:options('None', 'Normal')
   
  send_command('input /macro book 2;wait .1;input /macro set 4')

    


   
end

-- Called when this job file is unloaded (eg: job change)
function user_unload()
    send_command('unbind ^`')
	send_command('unbind !`')
    send_command('unbind numpad1')
	send_command('unbind ^b')
	send_command('unbind ^n')
	send_command('unbind numpad9')

end


-- Define sets and vars used by this job file.
function init_gear_sets()
    --------------------------------------
    -- Start defining the sets
    --------------------------------------
    
    ---- Precast Sets ----
    
    -- Precast sets to enhance JAs
   

    sets.precast.JA['Rampart'] = sets.engaged
    sets.precast.JA['Provoke'] = sets.precast.FC.Enmity
    sets.precast.JA['Palisade'] = sets.precast.FC.Enmity
	sets.precast.JA['Sentinel'] = sets.precast.FC.Enmity

--66% Fast Cast
	sets.precast.FC = {
    ammo="Sapience Orb",
    head={ name="Carmine Mask", augments={'Accuracy+15','Mag. Acc.+10','"Fast Cast"+3',}},
    body="Rev. Surcoat +3",
    hands={ name="Odyssean Gauntlets", augments={'"Mag.Atk.Bns."+14','"Fast Cast"+4','CHR+7','Mag. Acc.+5',}},
    legs={ name="Odyssean Cuisses", augments={'Mag. Acc.+15','"Fast Cast"+5','CHR+7','"Mag.Atk.Bns."+1',}},
    feet={ name="Odyssean Greaves", augments={'Mag. Acc.+4 "Mag.Atk.Bns."+4','"Fast Cast"+6','Mag. Acc.+4',}},
    neck="Voltsurge Torque",
    waist="Creed Baudrier",
    left_ear="Odnowa Earring +1",
    right_ear="Odnowa Earring",
    left_ring="Moonbeam Ring",
    right_ring="Kishar Ring",
    back={ name="Rudianos's Mantle", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Fast Cast+10','Spell interruption rate down-10%',}},	
	}

    sets.precast.FC.SIRD  = {
	ammo="Staunch Tathlum",
    head={ name="Souv. Schaller +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
    body="Rev. Surcoat +3",
    hands={ name="Souv. Handsch. +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
    legs={ name="Founder's Hose", augments={'MND+3','Mag. Acc.+3','Attack+7','Breath dmg. taken -1%',}},
    feet={ name="Odyssean Greaves", augments={'Attack+1','Enmity+6','VIT+9','Accuracy+6',}},
    neck="Moonbeam Necklace",
    waist="Creed Baudrier",
    left_ear="Odnowa Earring +1",
    right_ear="Halasz Earring",
    left_ring="Moonbeam Ring",
    right_ring="Evanescence Ring",
    back={ name="Rudianos's Mantle", augments={'HP+60','Eva.+20 /Mag. Eva.+20','"Fast Cast"+10','Spell interruption rate down-10%',}},
	}

	sets.precast.FC.Enmity = {
    ammo="Sapience Orb",
    head={ name="Souv. Schaller +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
    body="Rev. Surcoat +3",
    hands={ name="Souv. Handsch. +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
    legs={ name="Souv. Diechlings +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
    feet={ name="Odyssean Greaves", augments={'Attack+1','Enmity+6','VIT+9','Accuracy+6',}},
    neck="Moonbeam Necklace",
    waist="Creed Baudrier",
    left_ear="Odnowa Earring +1",
    right_ear="Friomisi Earring",
    left_ring="Hercules' Ring",
    right_ring="Apeile Ring",
    back={ name="Rudianos's Mantle", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Enmity+10','Damage taken-5%',}},
}

	sets.precast.FC['Geist Wall'] =  set_combine(sets.precast.FC.SIRD , {feet={ name="Odyssean Greaves", augments={'Mag. Acc.+4 "Mag.Atk.Bns."+4','"Fast Cast"+6','Mag. Acc.+4',}}})
	sets.precast.FC['Healing Breeze'] = sets.precast.FC.SIRD
	sets.precast.FC['Stinking Gas'] = sets.precast.FC.SIRD
    sets.precast.FC['Cocoon'] =  sets.precast.FC.SIRD
    -- Weaponskill sets
    -- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS = {
	ammo="Ginsen",
    head={ name="Valorous Mask", augments={'Accuracy+15 Attack+15','Weapon skill damage +4%','STR+13','Accuracy+15',}},
    body="Nzingha Cuirass",
    hands={ name="Odyssean Gauntlets", augments={'Accuracy+28','Weapon skill damage +4%','DEX+4','Attack+11',}},
    legs={ name="Valor. Hose", augments={'Accuracy+23','Weapon skill damage +3%','STR+8','Attack+15',}},
    feet="Sulev. Leggings +2",
    neck="Fotia Gorget",
    waist="Fotia Belt",
    left_ear="Ishvara Earring",
    right_ear="Telos Earring",
    left_ring="Regal Ring",
    right_ring="Petrov Ring",
    back="Vespid Mantle",
	    }

    -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
    sets.precast.WS['Atonement'] = {
	ammo="Sapience Orb",
    head={ name="Souv. Schaller +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
    body="Rev. Surcoat +3",
    hands={ name="Souv. Handsch. +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
    legs={ name="Cab. Breeches +3", augments={'Enhances "Invincible" effect',}},
    feet={ name="Odyssean Greaves", augments={'Attack+1','Enmity+6','VIT+9','Accuracy+6',}},
    neck="Moonbeam Necklace",
    waist="Creed Baudrier",
    left_ear="Odnowa Earring +1",
    right_ear="Odnowa Earring",
    left_ring="Moonbeam Ring",
    right_ring="Petrov Ring",
    back={ name="Rudianos's Mantle", augments={'HP+60','Eva.+20 /Mag. Eva.+20','"Fast Cast"+10','Spell interruption rate down-10%',}},
	
	}
    
    
    ---- Midcast Sets ----

    sets.midcast.FastRecast = sets.precast.FC
	sets.midcast['Reprisal'] = {
	ammo="Sapience Orb",
    head={ name="Carmine Mask", augments={'Accuracy+15','Mag. Acc.+10','"Fast Cast"+3',}},
    body="Rev. Surcoat +3",
    hands={ name="Souv. Handsch. +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
    legs={ name="Souv. Diechlings +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
    feet={ name="Odyssean Greaves", augments={'Mag. Acc.+4 "Mag.Atk.Bns."+4','"Fast Cast"+6','Mag. Acc.+4',}},
    neck="Voltsurge Torque",
    waist="Creed Baudrier",
    left_ear="Odnowa Earring +1",
    right_ear="Loquac. Earring",
    right_ring="Kishar Ring",
    left_ring="Moonbeam Ring",
    back={ name="Rudianos's Mantle", augments={'HP+60','Eva.+20 /Mag. Eva.+20','"Fast Cast"+10','Spell interruption rate down-10%',}},
	}
	--47% Cure Potency
    sets.midcast.Cure = {
    ammo="Sapience Orb",
    head={ name="Carmine Mask", augments={'Accuracy+15','Mag. Acc.+10','"Fast Cast"+3',}},
    body={ name="Jumalik Mail", augments={'HP+50','Attack+15','Enmity+9','"Refresh"+2',}},
    hands="Macabre Gaunt. +1",
    legs={ name="Odyssean Cuisses", augments={'Mag. Acc.+15','"Fast Cast"+5','CHR+7','"Mag.Atk.Bns."+1',}},
    feet={ name="Odyssean Greaves", augments={'Attack+1','Enmity+6','VIT+9','Accuracy+6',}},
    neck="Phalaina Locket",
    waist="Creed Baudrier",
    left_ear="Mendi. Earring",
    right_ear="Nourish. Earring",
    left_ring="Kishar Ring",
    right_ring="Rahab Ring",
    back={ name="Rudianos's Mantle", augments={'HP+60','Eva.+20 /Mag. Eva.+20','"Fast Cast"+10','Spell interruption rate down-10%',}},
}	
	sets.midcast.Cure.Self = sets.precast.FC.SIRD
	sets.midcast['Blue Magic'] = sets.precast.FC
    sets.midcast['Enhancing Magic'] = sets.precast.FC
	

   
    
	
	sets.midcast.Impact = set_combine(sets.midcast['Elemental Magic'], {head=empty,body="Twilight Cloak"})
--Current Stats on Enfeebling MND+288 MACC+366 swapping in Chironic head gives 4 mnd but loses 17 macc
    

    
    -- Sets to return to when not performing an action.
    
    -- Resting sets
    sets.resting = {    
     head={ name="Jumalik Helm", augments={'MND+10','"Mag.Atk.Bns."+15','Magic burst dmg.+10%','"Refresh"+1',}},
    body="Chozor. Coselete",
	 neck="Coatl Gorget",
	 left_ring="Woltaris Ring",
		}
    

    -- Idle sets
    
    -- Normal refresh idle set

	
    sets.idle = {
	ammo="Homiliary",
    head={ name="Jumalik Helm", augments={'MND+10','"Mag.Atk.Bns."+15','Magic burst dmg.+10%','"Refresh"+1',}},
    body="Chozor. Coselete",
    hands={ name="Souv. Handsch. +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
    legs={ name="Cab. Breeches +3", augments={'Enhances "Invincible" effect',}},
    feet="Rev. Leggings +3",
    neck="Coatl Gorget",
    waist="Creed Baudrier",
    left_ear="Odnowa Earring +1",
    right_ear="Ethereal Earring",
    left_ring="Moonbeam Ring",
    right_ring="Woltaris Ring",
    back="Moonbeam Cape",
	}

    -- Idle mode that keeps PDT gear on, but doesn't prevent normal gear swaps for precast/etc.

    -- Idle mode scopes:
    -- Idle mode when weak.

    
    -- Town gear.
	
	sets.idle.Town = set_combine(sets.idle, {})
        
    -- Defense sets

    sets.defense.PDT = 
	{
	}

	sets.idle.PDT = set_combine(sets.defense.PDT, {range="x"})
	sets.idle.Weak = set_combine(sets.defense.PDT, {range="x"})
	sets.defense.MDT = set_combine(sets.defense.PDT, {range="x"})
		


    sets.Kiting = {
		ammo="Homiliary",
    head="Hjarrandi Helm",
    body="Rev. Surcoat +3",
    hands="Rev. Gauntlets +3",
    legs={ name="Cab. Breeches +3", augments={'Enhances "Invincible" effect',}},
    feet="Rev. Leggings +3",
    neck="Kgt. Beads +1",
    waist="Creed Baudrier",
    left_ear="Odnowa Earring +1",
    right_ear="Ethereal Earring",
    left_ring="Moonbeam Ring",
    right_ring="Defending Ring",
    back="Moonbeam Cape",
	}

    sets.latent_refresh = {    
    }

    -- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
    
   

    -- Engaged sets

    -- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
    -- sets if more refined versions aren't defined.
    -- If you create a set with both offense and defense modes, the offense mode should be first.
    -- EG: sets.engaged.Dagger.Accuracy.Evasion
    
    -- Normal melee group
	
    sets.engaged = {
	ammo="Staunch Tathlum",
    head="Hjarrandi Helm",
    body="Rev. Surcoat +3",
    hands="Rev. Gauntlets +3",
    legs={ name="Cab. Breeches +3", augments={'Enhances "Invincible" effect',}},
    feet="Rev. Leggings +3",
    neck="Kgt. Beads +1",
    waist="Creed Baudrier",
    left_ear="Odnowa Earring +1",
    right_ear="Ethereal Earring",
    left_ring="Moonbeam Ring",
    right_ring="Defending Ring",
    back="Moonbeam Cape",
	}
	
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 spellMap == 'Cure' or spellMap == 'Curaga' then
        gear.default.obi_waist = "Hachirin-no-obi"
    elseif spell.skill == 'Elemental Magic' then
        gear.default.obi_waist = "Sekhmet Corset"
        if state.CastingMode.value == 'Proc' then
            classes.CustomClass = 'Proc' 
        end
    end
end


-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)

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.


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

function job_post_precast(spell, action, spellMap, eventArgs)
	if spell.target.type=="SELF" and spell.skill == "Healing Magic" then
        equip(sets.precast.FC.SIRD) -- Cure Self Gear Set
			elseif spell.target.type=="Not Self" and spell.skill  == "Healing Magic" then
				equip(sets.precast.FC) -- Cure Others Gear Set
				end
	 end



 
function job_post_midcast(spell, action, spellMap, eventArgs)
			if spell.target.type=="SELF" and spell.skill == 'Healing Magic' then
				equip(sets.midcast.Cure.Self) -- Cure Self Gear Set
			elseif spell.target.type=="Not Self" and spell.skill  == 'Healing Magic' then
					equip(sets.midcast.Cure) -- Cure Others Gear Set
					end
	 end
	 
	 
	 
	 
	 

	



 



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

-- Custom spell mapping.


-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
    if player.mpp < 1 then
        idleSet = set_combine(idleSet, sets.latent_refresh)
    end
    
    return idleSet
end


-- Function to display the current relevant user state when doing an update.
function display_current_job_state(eventArgs)
    display_current_caster_state()
    eventArgs.handled = false
end

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

function job_setup()


end

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

 Asura.Chiaia
VIP
Offline
サーバ: Asura
Game: FFXI
user: Demmis
Posts: 1656
By Asura.Chiaia 2019-12-12 08:11:35  
You need to use the priority setting to override the default swap order to keep your HP up. From the help file included in the examples folder...
Code
-- Prioritizing gear changes --
Currently equip swaps can be ordered by using advanced "sets" tables similar to the above:
    sets.nohead = {head={name="empty",priority=1},lring={name="Angha ring",priority=2}}

Gear is changed in descending order from highest to lowest, so the above set would equip Angha ring and then
unequip the head slot. All gear that is not defined is given a default priority of zero, and all positive and
negative rational numbers are acceptable priorities. If two pieces of gear have the same priority value, they
will be swapped in the default order (from 0 to 15 in ../windower/res/slots.lua).

I do not recommend moving Sub in front of Main, Ammo in front of Range, etc. as these will cause silent equip
failures.
[+]
 Bismarck.Xurion
Offline
サーバ: Bismarck
Game: FFXI
user: Xurion
Posts: 694
By Bismarck.Xurion 2019-12-12 08:13:40  
Edit: nvm, Chiaia won.
 Phoenix.Mikumaru
Offline
サーバ: Phoenix
Game: FFXI
user: Mikumaru
Posts: 382
By Phoenix.Mikumaru 2019-12-12 08:22:15  
Thank you, too much. I'm right on top of that, Rose. ^.^
Offline
Posts: 464
By drakefs 2019-12-12 20:49:00  
Can you define a state in the character-globals.lua? someone clued me in, I just removed the function and left the the state initialization.



https://github.com/DrakeFS/GearSwap/tree/master



In the Dagna-Globals.lua I tried using
Code
function global_setup()

    state.CapacityMode = M(false, 'Capacity Point Mantle')

end


to setup the state but the function was never called so the state was never created. Is there a function I can implement in the character-globals.lua that will only be called once? Right now I am just creating the state in my Job.lua files.
 Phoenix.Mikumaru
Offline
サーバ: Phoenix
Game: FFXI
user: Mikumaru
Posts: 382
By Phoenix.Mikumaru 2019-12-12 21:24:26  
Using the Priority function didn't work. It caused the lua to practically not function. I used the syntax given in the example lua, it loads with no errors but doesnt swap a majority of the items. The samples dont seem have a special function or added instruction to append the Priority change so what gives?
What am I missing?
 Shiva.Zerowone
Offline
サーバ: Shiva
Game: FFXI
user: Zerowone
Posts: 655
By Shiva.Zerowone 2019-12-12 22:25:31  
Phoenix.Mikumaru said: »
Using the Priority function didn't work. It caused the lua to practically not function. I used the syntax given in the example lua, it loads with no errors but doesnt swap a majority of the items. The samples dont seem have a special function or added instruction to append the Priority change so what gives?
What am I missing?

Post your code.

Just based off what you said it sounds like you put the tags on some gear in some of your set tables but not all.
 Phoenix.Mikumaru
Offline
サーバ: Phoenix
Game: FFXI
user: Mikumaru
Posts: 382
By Phoenix.Mikumaru 2019-12-13 06:34:27  
I only did 2 sets, the instructions and examples didn't indicate that all sets needed to be prioritized. So I have to add the syntax to every gear set? Wouldn't it be easier to just reorder the default swap order? 81-95 and 255-269
Code
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job.  Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------

-- Initialization function for this job file.
function get_sets()
    mote_include_version = 2
    
    -- Load and initialize the include file.
    include('Mote-Include.lua')
	include('Debuffz.lua')
end


-- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
function job_setup()

end

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

-- Setup vars that are user-dependent.  Can override this function in a sidecar file.
function user_setup()
    state.OffenseMode:options('None', 'Normal')
   
  send_command('input /macro book 2;wait .1;input /macro set 4')

    


   
end

-- Called when this job file is unloaded (eg: job change)
function user_unload()
    send_command('unbind ^`')
	send_command('unbind !`')
    send_command('unbind numpad1')
	send_command('unbind ^b')
	send_command('unbind ^n')
	send_command('unbind numpad9')

end


-- Define sets and vars used by this job file.
function init_gear_sets()
    --------------------------------------
    -- Start defining the sets
    --------------------------------------
    
    ---- Precast Sets ----
    
    -- Precast sets to enhance JAs
   

    sets.precast.JA['Rampart'] = sets.engaged
    sets.precast.JA['Provoke'] = sets.precast.FC.Enmity
    sets.precast.JA['Palisade'] = sets.precast.FC.Enmity
	sets.precast.JA['Sentinel'] = sets.precast.FC.Enmity

--66% Fast Cast
	sets.precast.FC = {
    ammo="Sapience Orb",
    head={ name="Carmine Mask", augments={'Accuracy+15','Mag. Acc.+10','"Fast Cast"+3',}},
    body="Rev. Surcoat +3",
    hands={ name="Odyssean Gauntlets", augments={'"Mag.Atk.Bns."+14','"Fast Cast"+4','CHR+7','Mag. Acc.+5',}},
    legs={ name="Odyssean Cuisses", augments={'Mag. Acc.+15','"Fast Cast"+5','CHR+7','"Mag.Atk.Bns."+1',}},
    feet={ name="Odyssean Greaves", augments={'Mag. Acc.+4 "Mag.Atk.Bns."+4','"Fast Cast"+6','Mag. Acc.+4',}},
    neck="Voltsurge Torque",
    waist="Creed Baudrier",
    left_ear="Odnowa Earring +1",
    right_ear="Odnowa Earring",
    left_ring="Moonbeam Ring",
    right_ring="Kishar Ring",
    back={ name="Rudianos's Mantle", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Fast Cast+10','Spell interruption rate down-10%',}},	
	}

    sets.precast.FC.SIRD = {
	ammo={"Staunch Tathlum", priority=3},
    head={ name="Souv. Schaller +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}, priority=13},
    body={"Rev. Surcoat +3",priority=15}
    hands={ name="Souv. Handsch. +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}, priority=12},
    legs={ name="Founder's Hose", augments={'MND+3','Mag. Acc.+3','Attack+7','Breath dmg. taken -1%',}, priority=8},
    feet={ name="Odyssean Greaves", augments={'Attack+11','"Cure" potency +4%',}, priority=9},
    neck={"Moonbeam Necklace", priority=7},
    waist={"Creed Baudrier", priority=6},
    left_ear={"Odnowa Earring +1", priority=10},
    right_ear={"Halasz Earring", priority=5},
    left_ring={"Moonbeam Ring", priority=11},
    right_ring={"Kishar Ring", priority=4},
    back={ name="Rudianos's Mantle", augments={'HP+60','Eva.+20 /Mag. Eva.+20','"Fast Cast"+10','Spell interruption rate down-10%',}, priority=14},
	}

	sets.precast.FC.Enmity = {
    ammo="Sapience Orb",
    head={ name="Souv. Schaller +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
    body="Rev. Surcoat +3",
    hands={ name="Souv. Handsch. +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
    legs={ name="Souv. Diechlings +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
    feet={ name="Odyssean Greaves", augments={'Attack+11','"Cure" potency +4%',}},
    neck="Moonbeam Necklace",
    waist="Creed Baudrier",
    left_ear="Odnowa Earring +1",
    right_ear="Friomisi Earring",
    left_ring="Hercules' Ring",
    right_ring="Apeile Ring",
    back={ name="Rudianos's Mantle", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Enmity+10','Damage taken-5%',}},
}

	sets.precast.FC['Geist Wall'] =  set_combine(sets.precast.FC.SIRD , {feet={ name="Odyssean Greaves", augments={'Mag. Acc.+4 "Mag.Atk.Bns."+4','"Fast Cast"+6','Mag. Acc.+4',}}})
	sets.precast.FC['Healing Breeze'] = sets.precast.FC.SIRD
	sets.precast.FC['Stinking Gas'] = sets.precast.FC.SIRD
    sets.precast.FC['Cocoon'] =  sets.precast.FC.SIRD
    -- Weaponskill sets
    -- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS = {
	ammo="Ginsen",
    head={ name="Valorous Mask", augments={'Accuracy+15 Attack+15','Weapon skill damage +4%','STR+13','Accuracy+15',}},
    body="Nzingha Cuirass",
    hands={ name="Odyssean Gauntlets", augments={'Accuracy+28','Weapon skill damage +4%','DEX+4','Attack+11',}},
    legs={ name="Valor. Hose", augments={'Accuracy+23','Weapon skill damage +3%','STR+8','Attack+15',}},
    feet="Sulev. Leggings +2",
    neck="Fotia Gorget",
    waist="Fotia Belt",
    left_ear="Ishvara Earring",
    right_ear="Telos Earring",
    left_ring="Regal Ring",
    right_ring="Petrov Ring",
    back="Vespid Mantle",
	    }

    -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
    sets.precast.WS['Atonement'] = {
	ammo="Sapience Orb",
    head={ name="Souv. Schaller +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
    body="Rev. Surcoat +3",
    hands={ name="Souv. Handsch. +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
    legs={ name="Cab. Breeches +3", augments={'Enhances "Invincible" effect',}},
    feet={ name="Odyssean Greaves", augments={'Attack+11','"Cure" potency +4%',}},
    neck="Moonbeam Necklace",
    waist="Creed Baudrier",
    left_ear="Odnowa Earring +1",
    right_ear="Odnowa Earring",
    left_ring="Moonbeam Ring",
    right_ring="Petrov Ring",
    back={ name="Rudianos's Mantle", augments={'HP+60','Eva.+20 /Mag. Eva.+20','"Fast Cast"+10','Spell interruption rate down-10%',}},
	
	}
    
    
    ---- Midcast Sets ----

    sets.midcast.FastRecast = sets.precast.FC
	sets.midcast['Reprisal'] = {
	ammo="Sapience Orb",
    head={ name="Carmine Mask", augments={'Accuracy+15','Mag. Acc.+10','"Fast Cast"+3',}},
    body="Rev. Surcoat +3",
    hands={ name="Souv. Handsch. +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
    legs={ name="Souv. Diechlings +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
    feet={ name="Odyssean Greaves", augments={'Mag. Acc.+4 "Mag.Atk.Bns."+4','"Fast Cast"+6','Mag. Acc.+4',}},
    neck="Voltsurge Torque",
    waist="Creed Baudrier",
    left_ear="Odnowa Earring +1",
    right_ear="Loquac. Earring",
    right_ring="Kishar Ring",
    left_ring="Moonbeam Ring",
    back={ name="Rudianos's Mantle", augments={'HP+60','Eva.+20 /Mag. Eva.+20','"Fast Cast"+10','Spell interruption rate down-10%',}},
	}
	--47% Cure Potency
    sets.midcast.Cure = {
    ammo="Staunch Tathlum",
    head={ name="Souv. Schaller +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
    body={ name="Jumalik Mail", augments={'HP+50','Attack+15','Enmity+9','"Refresh"+2',}},
    hands="Macabre Gaunt. +1",
    legs={ name="Founder's Hose", augments={'MND+3','Mag. Acc.+3','Attack+7','Breath dmg. taken -1%',}},
    feet={ name="Odyssean Greaves", augments={'Attack+11','"Cure" potency +4%',}},
    neck="Moonbeam Necklace",
    waist="Resolute Belt",
    left_ear="Odnowa Earring +1",
    right_ear="Mendi. Earring",
    left_ring="Moonbeam Ring",
    right_ring="Evanescence Ring",
    back="Solemnity Cape",
}	
	sets.midcast.Cure.Self = sets.precast.FC.SIRD
	sets.midcast['Blue Magic'] = sets.precast.FC
    sets.midcast['Enhancing Magic'] = sets.precast.FC
	

   
    
	
	sets.midcast.Impact = set_combine(sets.midcast['Elemental Magic'], {head=empty,body="Twilight Cloak"})
--Current Stats on Enfeebling MND+288 MACC+366 swapping in Chironic head gives 4 mnd but loses 17 macc
    

    
    -- Sets to return to when not performing an action.
    
    -- Resting sets
    sets.resting = {    
     head={ name="Jumalik Helm", augments={'MND+10','"Mag.Atk.Bns."+15','Magic burst dmg.+10%','"Refresh"+1',}},
    body="Chozor. Coselete",
	 neck="Coatl Gorget",
	 left_ring="Woltaris Ring",
		}
    

    -- Idle sets
    
    -- Normal refresh idle set

	
    sets.idle = {
	ammo="Homiliary",
    head={ name="Jumalik Helm", augments={'MND+10','"Mag.Atk.Bns."+15','Magic burst dmg.+10%','"Refresh"+1',}},
    body="Chozor. Coselete",
    hands={ name="Souv. Handsch. +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
    legs={ name="Cab. Breeches +3", augments={'Enhances "Invincible" effect',}},
    feet="Rev. Leggings +3",
    neck="Coatl Gorget",
    waist="Creed Baudrier",
    left_ear="Odnowa Earring +1",
    right_ear="Ethereal Earring",
    left_ring="Moonbeam Ring",
    right_ring="Woltaris Ring",
    back="Moonbeam Cape",
	}

    -- Idle mode that keeps PDT gear on, but doesn't prevent normal gear swaps for precast/etc.

    -- Idle mode scopes:
    -- Idle mode when weak.

    
    -- Town gear.
	
	sets.idle.Town = set_combine(sets.idle, {})
        
    -- Defense sets

    sets.defense.PDT = 
	{
	}

	sets.idle.PDT = set_combine(sets.defense.PDT, {range="x"})
	sets.idle.Weak = set_combine(sets.defense.PDT, {range="x"})
	sets.defense.MDT = set_combine(sets.defense.PDT, {range="x"})
		


    sets.Kiting = {
	ammo={"Homiliary", priority=3},
    head={"Hjarrandi Helm", priority=13},
    body={"Rev. Surcoat +3", priority=15},
    hands={"Rev. Gauntlets +3", priority=12},
    legs={ name="Cab. Breeches +3", augments={'Enhances "Invincible" effect',}, priority=8},
    feet={"Rev. Leggings +3", priority=9},
    neck={"Kgt. Beads +1", priority=7},
    waist={"Creed Baudrier", priority=6},
    left_ear={"Odnowa Earring +1", priority=10},
    right_ear={"Ethereal Earring", priority=5},
    left_ring={"Moonbeam Ring", priority=11},
    right_ring={"Defending Ring", priority=4},
    back={"Moonbeam Cape", priority=14},
	}

    sets.latent_refresh = {    
    }

    -- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
    
   

    -- Engaged sets

    -- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
    -- sets if more refined versions aren't defined.
    -- If you create a set with both offense and defense modes, the offense mode should be first.
    -- EG: sets.engaged.Dagger.Accuracy.Evasion
    
    -- Normal melee group
	
    sets.engaged = {
	ammo="Staunch Tathlum",
    head="Hjarrandi Helm",
    body="Rev. Surcoat +3",
    hands="Rev. Gauntlets +3",
    legs={ name="Cab. Breeches +3", augments={'Enhances "Invincible" effect',}},
    feet="Rev. Leggings +3",
    neck="Loricate Torque",
    waist="Creed Baudrier",
    left_ear="Odnowa Earring +1",
    right_ear="Ethereal Earring",
    left_ring="Moonbeam Ring",
    right_ring="Defending Ring",
    back="Moonbeam Cape",
	}
	
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 spellMap == 'Cure' or spellMap == 'Curaga' then
        gear.default.obi_waist = "Hachirin-no-obi"
    elseif spell.skill == 'Elemental Magic' then
        gear.default.obi_waist = "Sekhmet Corset"
        if state.CastingMode.value == 'Proc' then
            classes.CustomClass = 'Proc' 
        end
    end
end


-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)

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.


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

function job_post_precast(spell, action, spellMap, eventArgs)
	if spell.target.type=="SELF" and spell.skill == "Healing Magic" then
        equip(sets.precast.FC.SIRD) -- Cure Self Gear Set
			elseif spell.target.type=="Not Self" and spell.skill  == "Healing Magic" then
				equip(sets.precast.FC) -- Cure Others Gear Set
				end
	 end



 
function job_post_midcast(spell, action, spellMap, eventArgs)
			if spell.target.type=="SELF" and spell.skill == 'Healing Magic' then
				equip(sets.midcast.Cure.Self) -- Cure Self Gear Set
			elseif spell.target.type=="Not Self" and spell.skill  == 'Healing Magic' then
					equip(sets.midcast.Cure) -- Cure Others Gear Set
					end
	 end
	 
	 
	 
	 
	 

	



 



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

-- Custom spell mapping.


-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
    if player.mpp < 1 then
        idleSet = set_combine(idleSet, sets.latent_refresh)
    end
    
    return idleSet
end


-- Function to display the current relevant user state when doing an update.
function display_current_job_state(eventArgs)
    display_current_caster_state()
    eventArgs.handled = false
end

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

function job_setup()


end

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

 Shiva.Zerowone
Offline
サーバ: Shiva
Game: FFXI
user: Zerowone
Posts: 655
By Shiva.Zerowone 2019-12-13 09:41:35  
Hmmmm. So for testing out a fix to your HP drop:

These luas don’t use an aftercast function, but the flow on these is pre> post pre> mid> post mid > player status (engaged/idle)

I’d start at Post midcast function on line 396 which deals with curing. Add priority tags to the gear defined in those sets that are being called in that function.
 Phoenix.Mikumaru
Offline
サーバ: Phoenix
Game: FFXI
user: Mikumaru
Posts: 382
By Phoenix.Mikumaru 2019-12-13 12:14:39  
So add the Priority syntax to idle, engaged, and kiting to see if it continues to swap properly and not drop the aforementioned HP. I'll give it a go.
 Shiva.Zerowone
Offline
サーバ: Shiva
Game: FFXI
user: Zerowone
Posts: 655
By Shiva.Zerowone 2019-12-13 13:15:27  
Phoenix.Mikumaru said: »
So add the Priority syntax to idle, engaged, and kiting to see if it continues to swap properly and not drop the aforementioned HP. I'll give it a go.

Yeah but no. Since it just testing troubleshooting, don't need to go gung-ho.

I would just modify the equip call in line 398 with a HP + piece of gear. Example:
Code
equip(sets.midcast.Cure.Self,{body="Caballarius Surcoat +3",priority=15})


Then just cast cure on myself to see if this is the function where its being affected. If so I would focus my prioritization there.
 Phoenix.Mikumaru
Offline
サーバ: Phoenix
Game: FFXI
user: Mikumaru
Posts: 382
By Phoenix.Mikumaru 2019-12-13 17:38:04  
it seems no matter where i implement this priority function , it breaks the lua making things not change. i tried changing the slots.lua in the res folder and it did nothing so i'm back to square one of this ghost HP dump. i cant even duplicate the HP number so i have no idea where its coming from.
 Phoenix.Mikumaru
Offline
サーバ: Phoenix
Game: FFXI
user: Mikumaru
Posts: 382
By Phoenix.Mikumaru 2019-12-13 17:57:50  
Update, so using the Equipsets, the exact same thing happens so i'm chasing spaghetti coding.
 Quetzalcoatl.Xilkk
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Xilk
Posts: 1419
By Quetzalcoatl.Xilkk 2019-12-17 21:48:15  
Question:

What is a good way to have a variable for 1 piece of gear.


ie. Reward set for bst
I would like to have a variable for the Pet food. Usually its just Pet food theta. but if I level sync down to do kraken club fight, I'd like to type a command to change it from pet food theta to pet food beta.
or a toggle.

I made a simple variable, but methinks I have the syntax wrong to type a command to change it.

//gs c PetFood="Pet Food Beta"

I know this doesn't seem to work.

thank you for help
 Bismarck.Xurion
Offline
サーバ: Bismarck
Game: FFXI
user: Xurion
Posts: 694
By Bismarck.Xurion 2019-12-18 02:23:24  
Quetzalcoatl.Xilkk said: »
Question:

What is a good way to have a variable for 1 piece of gear.


ie. Reward set for bst
I would like to have a variable for the Pet food. Usually its just Pet food theta. but if I level sync down to do kraken club fight, I'd like to type a command to change it from pet food theta to pet food beta.
or a toggle.

I made a simple variable, but methinks I have the syntax wrong to type a command to change it.

//gs c PetFood="Pet Food Beta"

I know this doesn't seem to work.

thank you for help
If you're using motes, you can do something like:
Code
//gs c food "Pet Food Beta"

Code
function job_self_command(cmdParams, eventArgs)
    if cmdParams[1]:lower() == 'food' and cmdParams[2] then
        PetFood = cmdParams[2]
        windower.add_to_chat(8, 'Changed food to ' .. PetFood)
    end
end

Might not be 100% accurate as I'm not at home right now to validate.
[+]
Offline
Posts: 113
By Heck 2019-12-22 21:15:36  
I'm having a bit of trouble trying to get a 'SELF' to work for a spell. For my RDM I have a refresh for normal casting and self casting, and a function that should swap gear specifically if I cast on myself. The issue I'm running into is that it only works for Refresh, but not Refresh II or III. I'm also using mote and Refresh III should = 'Refresh'
Code
    sets.midcast.Refresh = set_combine(sets.midcast.EnhancingDuration, {
                head="Amalric Coif +1",
		body="Atrophy Tabard +3",
		legs="Leth. Fuseau +1",
        })

    sets.midcast.RefreshSelf = set_combine(sets.midcast.EnhancingDuration, {
		waist="Gishdubar Sash",
                back="Grapevine Cape"
        })

Code
function job_post_midcast(spell, action, spellMap, eventArgs)
    if spell.skill == 'Enhancing Magic' then
        if classes.NoSkillSpells:contains(spell.english) then
            equip(sets.midcast.EnhancingDuration)
            if spellMap == 'Refresh' then
                equip(sets.midcast.Refresh)
                if spell.target.type == 'SELF' then
                    equip (sets.midcast.RefreshSelf)
                end
            end
        elseif skill_spells:contains(spell.english) then
            equip(sets.midcast.EnhancingSkill)
        elseif spell.english:startswith('Gain') then
            equip(sets.midcast.GainSpell)
        end
end
 Bismarck.Xurion
Offline
サーバ: Bismarck
Game: FFXI
user: Xurion
Posts: 694
By Bismarck.Xurion 2019-12-23 03:29:50  
Doesn't spell.name == 'Refresh III'? If so, double check classes.NoSkillSpells contains 'Refresh III'.
Offline
Posts: 113
By Heck 2019-12-23 08:30:04  
That's it, didn't define classes.NoSkillSpells, tyty
[+]
 Phoenix.Logical
Offline
サーバ: Phoenix
Game: FFXI
Posts: 519
By Phoenix.Logical 2019-12-25 23:09:05  
My main reason for not using gearswap up until now is I DIDN'T want it doing things for me like swapping to a certain set of gear based on buffs I have or using Echo Drops automatically when I get silenced as I prefer to make those decisions myself as they happen. However, I have realized the need for gearswap to consistently change gear for pre and mid cast sets so I've decided that I'll use it for that purpose only. I've created a lua from scratch that is working for me to do everything I need but I am needing to create 9 times as many lua files as needed and I want to see if I can simplify that.

So right now my aftercast changes to my default TP setup... but there are 8 other setups that I use each on their own macro bank (TP, 40DW, 20DW, Eva, Acc, etc). To get past this I am creating a separate LUA for each of these and pressing ALT+1 macro in each bank puts me on the correct LUA file for that set of gear.

This works, but what I'm hoping for is something where I have a single file with all 9 sets of gear configured in it and when I press ALT+1 instead of changing to a differnt LUA it simply enters a command that changes a variable that says "now use 40dw set for aftercast". It would remain in that state until I pressed ALT+1 on another macro bank to change it's state to 20dw for instance. I know I can use some of those complex lua's out there to accomplish this but I'm really trying to keep this light weight and not include a bunch of things I don't want or need that comes with those. Is there a simple way for me to define this variable in a few lines of code and be able to update it in the fashion I speak of? Hope that makes sense, thanks in advance!
 Bismarck.Xurion
Offline
サーバ: Bismarck
Game: FFXI
user: Xurion
Posts: 694
By Bismarck.Xurion 2019-12-26 08:54:45  
Phoenix.Logical said: »
My main reason for not using gearswap up until now is I DIDN'T want it doing things for me like swapping to a certain set of gear based on buffs I have or using Echo Drops automatically when I get silenced as I prefer to make those decisions myself as they happen. However, I have realized the need for gearswap to consistently change gear for pre and mid cast sets so I've decided that I'll use it for that purpose only. I've created a lua from scratch that is working for me to do everything I need but I am needing to create 9 times as many lua files as needed and I want to see if I can simplify that.

So right now my aftercast changes to my default TP setup... but there are 8 other setups that I use each on their own macro bank (TP, 40DW, 20DW, Eva, Acc, etc). To get past this I am creating a separate LUA for each of these and pressing ALT+1 macro in each bank puts me on the correct LUA file for that set of gear.

This works, but what I'm hoping for is something where I have a single file with all 9 sets of gear configured in it and when I press ALT+1 instead of changing to a differnt LUA it simply enters a command that changes a variable that says "now use 40dw set for aftercast". It would remain in that state until I pressed ALT+1 on another macro bank to change it's state to 20dw for instance. I know I can use some of those complex lua's out there to accomplish this but I'm really trying to keep this light weight and not include a bunch of things I don't want or need that comes with those. Is there a simple way for me to define this variable in a few lines of code and be able to update it in the fashion I speak of? Hope that makes sense, thanks in advance!
My first advice would be to just get an existing one and remove any functionality you don't want. Building your own from scratch as as Gearswap beginner will probably be frustrating and you'll likely abandon it.

If you are determined to build your own, then at least use motes: https://github.com/Kinematics/Mote-libs. This provides an easy way to switch between your different custom-defined melee modes such as dw20/40.

These Gearswap setups that all use motes will also be a good reference point: https://github.com/Kinematics/GearSwap-Jobs
 Phoenix.Logical
Offline
サーバ: Phoenix
Game: FFXI
Posts: 519
By Phoenix.Logical 2019-12-26 10:56:03  
Bismarck.Xurion said: »
Phoenix.Logical said: »
My main reason for not using gearswap up until now is I DIDN'T want it doing things for me like swapping to a certain set of gear based on buffs I have or using Echo Drops automatically when I get silenced as I prefer to make those decisions myself as they happen. However, I have realized the need for gearswap to consistently change gear for pre and mid cast sets so I've decided that I'll use it for that purpose only. I've created a lua from scratch that is working for me to do everything I need but I am needing to create 9 times as many lua files as needed and I want to see if I can simplify that.

So right now my aftercast changes to my default TP setup... but there are 8 other setups that I use each on their own macro bank (TP, 40DW, 20DW, Eva, Acc, etc). To get past this I am creating a separate LUA for each of these and pressing ALT+1 macro in each bank puts me on the correct LUA file for that set of gear.

This works, but what I'm hoping for is something where I have a single file with all 9 sets of gear configured in it and when I press ALT+1 instead of changing to a differnt LUA it simply enters a command that changes a variable that says "now use 40dw set for aftercast". It would remain in that state until I pressed ALT+1 on another macro bank to change it's state to 20dw for instance. I know I can use some of those complex lua's out there to accomplish this but I'm really trying to keep this light weight and not include a bunch of things I don't want or need that comes with those. Is there a simple way for me to define this variable in a few lines of code and be able to update it in the fashion I speak of? Hope that makes sense, thanks in advance!
My first advice would be to just get an existing one and remove any functionality you don't want. Building your own from scratch as as Gearswap beginner will probably be frustrating and you'll likely abandon it.

If you are determined to build your own, then at least use motes: https://github.com/Kinematics/Mote-libs. This provides an easy way to switch between your different custom-defined melee modes such as dw20/40.

These Gearswap setups that all use motes will also be a good reference point: https://github.com/Kinematics/GearSwap-Jobs

I'm sorry but I feel you didn't even read my message. This type of answer is exactly why so many continue to stay away from Gearswap as the only real support often given is "Use mote libs or someone else's work and just modify that."

I already have a 100% working gearswap that I already stated that I created from scratch and works perfectly. I simply wanted to know if there was a simple way to have me enter a command in game that would set a variable to put me in a mode. IE MEva, HPSet, DW 40, etc. From my experience with other coding languages this shouldn't be difficult and just take a few lines of code but it's the syntax of that code that I'm looking for help with. If the real answer is that utilizing that variable in aftercast takes more then that then I'll just stick with my method right now of managing separate files, I just wanted to know if there was an easier way... dumping my already working self made scripts and starting over with someone else's just to gain this limited functionality doesn't make sense.

Additionally the way that motes and others swap between these sets is downright odd to me with utilization of hotkeys like F9 and they also don't seem to have modes for many of the sets I would need so it would only be a partial solution anyway.
 Ragnarok.Neyochimaru
Offline
サーバ: Ragnarok
Game: FFXI
user: Neyochi
Posts: 91
By Ragnarok.Neyochimaru 2019-12-26 12:55:44  
Glad to see im not the only one that has seperate luas for modes because toggles are beyond me lolol
 Bismarck.Xurion
Offline
サーバ: Bismarck
Game: FFXI
user: Xurion
Posts: 694
By Bismarck.Xurion 2019-12-26 14:22:13  
Apologies, I misunderstood. If you want to avoid motes due to it's default functionality, you'd have to use the Gearswap self_command function. There are numerous ways you can use this, but I'll stick to a simple solution of changing a variable in a higher scope:
Code
tp_mode = 'normal' --higher scope var

function self_command(command)
  tp_mode = command
end


You'd also need to have a number of sets defined:
Code
sets.engaged = {...}
sets.engaged.dw40 = {...}


Calling (or more likely key binding) the following will trigger the self_command with 'dw40' as the command arg:
Code
//gs c dw40


Finally you'll need to configure/extend your pre/mid/aftercast functions to handle decisions:
Code
function aftercast(spell, act, spellMap, eventArgs)
  local set
  if player.status == 'Engaged' then
    set = sets.engaged
  end
  if set[tp_mode] then
    set = set[tp_mode]
  end
  equip(set)


Disclaimer: not tested.
First Page 2 3 ... 154 155 156 ... 183 184 185
Log in to post.