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 ... 156 157 158 ... 183 184 185
Offline
Posts: 8
By zinonffxi 2020-01-17 12:41:36  
much appreciated man ur amazing. now the impetus ws works. thanks alot.
About the job_post_precast
i don't understand it. do u mean i need to replace the whole
Code
function job_post_precast(spell, action, spellMap, eventArgs)
    if spell.type == 'WeaponSkill' and state.DefenseMode.current ~= 'None' then
        if state.Buff.Impetus and (spell.english == "Ascetic's Fury" or spell.english == "Victory Smite") then
            -- Need 6 hits at capped dDex, or 9 hits if dDex is uncapped, for Bhikku to tie or win.
            if (state.OffenseMode.current == 'Fodder' and info.impetus_hit_count > 5) or (info.impetus_hit_count > 8) then
                equip(sets.impetus_body)
            end
        elseif state.Buff.Footwork and (spell.english == "Dragon's Kick" or spell.english == "Tornado Kick") then
            equip(sets.footwork_kick_feet)
        end
          
        -- Replace Moonshade Earring if we're at cap TP
        if player.tp == 3000 then
            equip(sets.precast.MaxTP)
        end
    end
end

to this?
Code
function job_post_precast(spell, spellMap, eventArgs)
    if spell.type == 'WeaponSkill' then
        if buffactive.Impetus and (spell.english == "Ascetic's Fury" or spell.english == "Victory Smite") then
        equip(sets.buff.Impetus)
    elseif buffactive.Footwork and (spell.english == "Dragon Kick" or spell.english == "Tornado Kick") then
        equip(sets.FootworkWS)
    end
    end
 Quetzalcoatl.Orestes
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2020-01-17 12:52:54  
zinonffxi said: »
much appreciated man ur amazing. now the impetus ws works. thanks alot.
About the job_post_precast
i don't understand it. do u mean i need to replace the whole
Code
function job_post_precast(spell, action, spellMap, eventArgs)
    if spell.type == 'WeaponSkill' and state.DefenseMode.current ~= 'None' then
        if state.Buff.Impetus and (spell.english == "Ascetic's Fury" or spell.english == "Victory Smite") then
            -- Need 6 hits at capped dDex, or 9 hits if dDex is uncapped, for Bhikku to tie or win.
            if (state.OffenseMode.current == 'Fodder' and info.impetus_hit_count > 5) or (info.impetus_hit_count > 8) then
                equip(sets.impetus_body)
            end
        elseif state.Buff.Footwork and (spell.english == "Dragon's Kick" or spell.english == "Tornado Kick") then
            equip(sets.footwork_kick_feet)
        end
          
        -- Replace Moonshade Earring if we're at cap TP
        if player.tp == 3000 then
            equip(sets.precast.MaxTP)
        end
    end
end

to this?
Code
function job_post_precast(spell, spellMap, eventArgs)
    if spell.type == 'WeaponSkill' then
        if buffactive.Impetus and (spell.english == "Ascetic's Fury" or spell.english == "Victory Smite") then
        equip(sets.buff.Impetus)
    elseif buffactive.Footwork and (spell.english == "Dragon Kick" or spell.english == "Tornado Kick") then
        equip(sets.FootworkWS)
    end
    end

Sorry, my recommendation would actually have the same effect as the custom wsmode, so it's not necessary.

Glad it's working.
Offline
Posts: 8
By zinonffxi 2020-01-17 13:03:07  
All right! Again. i can't thank you enough man.
i have been trying to fix it for along time and now all fixed thanks to you. /salute^^
Best regards
Zinon.
[+]
 Asura.Iamarealgirl
Offline
サーバ: Asura
Game: FFXI
user: Latravant
Posts: 79
By Asura.Iamarealgirl 2020-01-18 17:04:53  
how can i make GS cycle through weapon sets? i'm on blu and sometimes want to switch between swords, or clubs for nuking, or sub a shield. and than how can i make it so the lua will lock the weapon while engaged?
 Quetzalcoatl.Orestes
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2020-01-18 17:49:04  
Asura.Iamarealgirl said: »
how can i make GS cycle through weapon sets? i'm on blu and sometimes want to switch between swords, or clubs for nuking, or sub a shield. and than how can i make it so the lua will lock the weapon while engaged?

You could do something like this, if your lua is based on Mote's.

Define a state in job_setup.
Code
function job_setup()
    state.WeaponMode = M{['description']='Weapon Mode', 'Sword', 'Club'}
--- other stuff
end

Define a hotkey in user_setup(). This example binds Windows key + Equals.
Code
    send_command('bind @= gs c cycle WeaponMode')

Now, to make it work, you need to setup two gear sets, and define some logic in job_state_change().
Example set would just include the weapons, and nothing else.
Code
    sets.Swords = {main="Naegling", sub="Colada"}
    sets.Clubs = {main="Nibiru Cudgel", sub="Nibiru Cudgel"}

inside job_state_change(). (you would create this function if it doesn't exist)
Code
function job_state_change(stateField, newValue, oldValue)
    if stateField == 'Weapon Mode' then
        if newValue == 'Sword' then
            equip(sets.Swords)
        elseif newValue == 'Club' then
            equip(sets.Clubs)
        end
    end
end

The main caveat to this, is that you can't include weapons in main or sub slot in ANY of your other gear sets. (casting, or otherwise)

Another possible complication, is if you include the same weapon in different slots. For example, lets say for the sake of example, that we were doing this for a COR.lua, and you had the following sets.
Code
sets.Sword = {main="Naegling", sub="Tauret"}
sets.Dagger = {main="Tauret", sub="Rostam"}

Tauret isn't going to switch from sub to main in a single toggle. What I'd do to fix this, is setup an empty set.
Code
-- in gs, empty is a special keyword so no quotes are needed
sets.Empty = {main=empty, sub=empty}

Then, you could do something like this in job_state_change().
Code
function job_state_change(stateField, newValue, oldValue)
    if stateField == 'Weapon Mode' then
        if newValue == 'Sword' then
            equip(sets.Empty)
            send_command('@wait 1; input //gs equip sets.Swords')
        elseif newValue == 'Dagger' then
            equip(sets.Empty)
            send_command('@wait 1; input //gs equip sets.Daggers')
        end
    end
end


If you don't use Mote's, then hopefully someone else can help you out. The technique would be similar, but I'm a bit lazy to look up the syntax.

HTH
[+]
 Asura.Iamarealgirl
Offline
サーバ: Asura
Game: FFXI
user: Latravant
Posts: 79
By Asura.Iamarealgirl 2020-01-18 19:58:28  
ok thanks, i'll try it tomorrow when its not so blurry and i can actually understand a little bit lol. ty again
 Quetzalcoatl.Orestes
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2020-01-18 21:08:04  
Asura.Iamarealgirl said: »
ok thanks, i'll try it tomorrow when its not so blurry and i can actually understand a little bit lol. ty again
If you are using motes and can’t figure it out feel free to DM or post a link to your lua.
 Bismarck.Xurion
Offline
サーバ: Bismarck
Game: FFXI
user: Xurion
Posts: 694
By Bismarck.Xurion 2020-01-19 04:31:08  
I usually find it easier to leave weapons out of GS and set up a bind that toggle through them, mainly for TP purposes.

My COR has:
Code
ranged_weapon = 1
ranged_weapons = {
  "Fomalhaut",
  "Death Penalty",
  "Armageddon",
  "Anarchy +2"
}

Code
function toggle_ranged_weapon()
  ranged_weapon = ranged_weapon + 1
  if ranged_weapon > #ranged_weapons then ranged_weapon = 1 end
  add_to_chat(104, 'Ranged weapon is now: ' .. ranged_weapons[ranged_weapon])
  equip({range = ranged_weapons[ranged_weapon]})
end
[+]
 Asura.Iamarealgirl
Offline
サーバ: Asura
Game: FFXI
user: Latravant
Posts: 79
By Asura.Iamarealgirl 2020-01-19 04:35:00  
oh wow i'll try this on my cor was trying to figure out a way to switch between my 3 guns. thanks
 Asura.Iamarealgirl
Offline
サーバ: Asura
Game: FFXI
user: Latravant
Posts: 79
By Asura.Iamarealgirl 2020-01-19 04:50:02  
ok question about the job_state_change. where do i put
Code
    if stateField == 'Weapon Mode' then
        if newValue == 'Sword' then
            equip(sets.Swords)
        elseif newValue == 'Club' then
            equip(sets.Clubs)
        end
    end

if i already have a job_state change setup. this is what i already have
Code
function job_state_change(stateField, newValue, oldValue)
    if stateField == 'Offense Mode' then
        if newValue == 'None' then
            enable('main','sub','range')
        else
            disable('main','sub','range')
        end
    end
end

do i just add it to whats already there like
Code
function job_state_change(stateField, newValue, oldValue)
    if stateField == 'Offense Mode' then
        if newValue == 'None' then
            enable('main','sub','range')
        else
            disable('main','sub','range')
        end
    end
    if stateField == 'Weapon Mode' then
        if newValue == 'Sword' then
            equip(sets.Swords)
        elseif newValue == 'Club' then
            equip(sets.Clubs)
        end
    end
end

or do i have to create a whole new job_state_change
Code
function job_state_change(stateField, newValue, oldValue)
    if stateField == 'Offense Mode' then
        if newValue == 'None' then
            enable('main','sub','range')
        else
            disable('main','sub','range')
        end
    end
end

function job_state_change(stateField, newValue, oldValue)
    if stateField == 'Weapon Mode' then
        if newValue == 'Sword' then
            equip(sets.Swords)
        elseif newValue == 'Club' then
            equip(sets.Clubs)
        end
    end
end
 Asura.Iamarealgirl
Offline
サーバ: Asura
Game: FFXI
user: Latravant
Posts: 79
By Asura.Iamarealgirl 2020-01-19 05:02:41  
also how do i get it to send a message letting me know which set is currently equipped so i dont have to open equipment to check.
and i have 3 sets of swords i want to equip, how do i equip sets for them?
sets.swords1
sets.swords2
sets.swords3?
or can i give them names like
sets.melee
sets.MA
sets.bluskill?
 Asura.Iamarealgirl
Offline
サーバ: Asura
Game: FFXI
user: Latravant
Posts: 79
By Asura.Iamarealgirl 2020-01-19 05:04:08  
oh and i've had problems with this before, what if i want to equip 2 of the same weapon that have the same stats, like my 2 colada's or nibiru clubs.
 Asura.Iamarealgirl
Offline
サーバ: Asura
Game: FFXI
user: Latravant
Posts: 79
By Asura.Iamarealgirl 2020-01-19 07:30:02  
i'm getting a get_sets error at line 198 for some reason.
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('organizer-lib')
end


-- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
function job_setup()
state.Buff['Burst Affinity'] = buffactive['Burst Affinity'] or false
state.Buff['Chain Affinity'] = buffactive['Chain Affinity'] or false
state.Buff.Convergence = buffactive.Convergence or false
state.Buff.Diffusion = buffactive.Diffusion or false
state.Buff.Efflux = buffactive.Efflux or false
    
    state.Buff['Unbridled Learning'] = buffactive['Unbridled Learning'] or false
	
    state.WeaponMode = M{['description']='Weapon Mode', 'Sword', 'Club'}


    blue_magic_maps = {}
    
    -- Mappings for gear sets to use for various blue magic spells.
    -- While Str isn't listed for each, it's generally assumed as being at least
    -- moderately signficant, even for spells with other mods.
    
    -- Physical Spells --
    
    -- Physical spells with no particular (or known) stat mods
    blue_magic_maps.Physical = S{
        'Bilgestorm'
    }

    -- Spells with heavy accuracy penalties, that need to prioritize accuracy first.
    blue_magic_maps.PhysicalAcc = S{
        'Heavy Strike',
    }

    -- Physical spells with Str stat mod
    blue_magic_maps.PhysicalStr = S{
        'Battle Dance','Bloodrake','Death Scissors','Dimensional Death',
        'Empty Thrash','Quadrastrike','Sinker Drill','Spinal Cleave',
        'Uppercut','Vertical Cleave'
    }
        
    -- Physical spells with Dex stat mod
    blue_magic_maps.PhysicalDex = S{
        'Amorphic Spikes','Asuran Claws','Barbed Crescent','Claw Cyclone','Disseverment',
        'Foot Kick','Frenetic Rip','Goblin Rush','Hysteric Barrage','Paralyzing Triad',
        'Seedspray','Sickle Slash','Smite of Rage','Terror Touch','Thrashing Assault',
        'Vanity Dive'
    }
        
    -- Physical spells with Vit stat mod
    blue_magic_maps.PhysicalVit = S{
        'Body Slam','Cannonball','Delta Thrust','Glutinous Dart','Grand Slam',
        'Power Attack','Quad. Continuum','Sprout Smack','Sub-zero Smash'
    }
        
    -- Physical spells with Agi stat mod
    blue_magic_maps.PhysicalAgi = S{
        'Benthic Typhoon','Feather Storm','Helldive','Hydro Shot','Jet Stream',
        'Pinecone Bomb','Spiral Spin','Wild Oats'
    }

    -- Physical spells with Int stat mod
    blue_magic_maps.PhysicalInt = S{
        'Mandibular Bite','Queasyshroom'
    }

    -- Physical spells with Mnd stat mod
    blue_magic_maps.PhysicalMnd = S{
        'Ram Charge','Screwdriver','Tourbillion'
    }

    -- Physical spells with Chr stat mod
    blue_magic_maps.PhysicalChr = S{
        'Bludgeon'
    }

    -- Physical spells with HP stat mod
    blue_magic_maps.PhysicalHP = S{
        'Final Sting'
    }

    -- Magical Spells --

    -- Magical spells with the typical Int mod
    blue_magic_maps.Magical = S{
        'Blastbomb','Blazing Bound','Bomb Toss','Cursed Sphere','Dark Orb','Death Ray',
        'Diffusion Ray','Droning Whirlwind','Embalming Earth','Firespit','Foul Waters',
        'Ice Break','Leafstorm','Maelstrom','Rail Cannon','Regurgitation','Rending Deluge',
        'Retinal Glare','Subduction','Tem. Upheaval','Water Bomb'
    }

    -- Magical spells with a primary Mnd mod
    blue_magic_maps.MagicalMnd = S{
        'Acrid Stream','Evryone. Grudge','Magic Hammer','Mind Blast'
    }

    -- Magical spells with a primary Chr mod
    blue_magic_maps.MagicalChr = S{
        'Eyes On Me','Mysterious Light'
    }

    -- Magical spells with a Vit stat mod (on top of Int)
    blue_magic_maps.MagicalVit = S{
        'Thermal Pulse'
    }

    -- Magical spells with a Dex stat mod (on top of Int)
    blue_magic_maps.MagicalDex = S{
        'Charged Whisker','Gates of Hades'
    }
            
    -- Magical spells (generally debuffs) that we want to focus on magic accuracy over damage.
    -- Add Int for damage where available, though.
    blue_magic_maps.MagicAccuracy = S{
        '1000 Needles','Absolute Terror','Actinic Burst','Auroral Drape','Awful Eye',
        'Blank Gaze','Blistering Roar','Blood Drain','Blood Saber','Chaotic Eye',
        'Cimicine Discharge','Cold Wave','Corrosive Ooze','Demoralizing Roar','Digest',
        'Dream Flower','Enervation','Feather Tickle','Filamented Hold','Frightful Roar',
        'Geist Wall','Hecatomb Wave','Infrasonics','Jettatura','Light of Penance',
        'Lowing','Mind Blast','Mortal Ray','MP Drainkiss','Osmosis','Reaving Wind',
        'Sandspin','Sandspray','Sheep Song','Soporific','Sound Blast','Stinking Gas',
        'Sub-zero Smash','Venom Shell','Voracious Trunk','Yawn'
    }
        
    -- Breath-based spells
    blue_magic_maps.Breath = S{
        'Bad Breath','Flying Hip Press','Frost Breath','Heat Breath',
        'Hecatomb Wave','Magnetite Cloud','Poison Breath','Radiant Breath','Self-Destruct',
        'Thunder Breath','Vapor Spray','Wind Breath'
    }

    -- Stun spells
    blue_magic_maps.Stun = S{
        'Blitzstrahl','Frypan','Head Butt','Sudden Lunge','Tail slap','Temporal Shift',
        'Thunderbolt','Whirl of Rage'
    }
        
    -- Healing spells
    blue_magic_maps.Healing = S{
        'Healing Breeze','Magic Fruit','Plenilune Embrace','Pollen','Restoral','White Wind',
        'Wild Carrot'
    }
    
    -- Buffs that depend on blue magic skill
    blue_magic_maps.SkillBasedBuff = S{
        'Barrier Tusk','Diamondhide','Magic Barrier','Metallic Body','Plasma Charge',
        'Pyric Bulwark','Reactor Cool',
    }

    -- Other general buffs
    blue_magic_maps.Buff = S{
        'Amplification','Animating Wail','Battery Charge','Carcharian Verve','Cocoon',
        'Erratic Flutter','Exuviation','Fantod','Feather Barrier','Harden Shell',
        'Memento Mori','Nat. Meditation','Occultation','Orcish Counterstance','Refueling',
        'Regeneration','Saline Coat','Triumphant Roar','Warm-Up','Winds of Promyvion',
        'Zephyr Mantle'
    }
    
    
    -- Spells that require Unbridled Learning to cast.
    unbridled_spells = S{
        'Absolute Terror','Bilgestorm','Blistering Roar','Bloodrake','Carcharian Verve',
        'Crashing Thunder','Droning Whirlwind','Gates of Hades','Harden Shell','Polar Roar',
        'Pyric Bulwark','Thunderbolt','Tourbillion','Uproot'
    }
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', 'TH', 'Acc', 'Refresh', 'Learning')
    state.WeaponskillMode:options('Normal', 'Acc')
    state.CastingMode:options('Normal', 'Resistant')
    state.IdleMode:options('Normal', 'matt', 'DT', 'Learning', 'refresh')

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

    -- Additional local binds
    send_command('bind ^` input /ja "Chain Affinity" <me>')
    send_command('bind !` input /ja "Efflux" <me>')
    send_command('bind @` input /ja "Burst Affinity" <me>')
	send_command('bind ^w gs c cycle WeaponMode')

    update_combat_form()
    select_default_macro_book()
end


-- Called when this job file is unloaded (eg: job change)
function user_unload()
    send_command('unbind ^`')
    send_command('unbind !`')
    send_command('unbind @`')
	send_command('unbind ^w')
end


-- Set up gear sets.
function init_gear_sets()
    --------------------------------------
    -- Start defining the sets
    --------------------------------------

    sets.buff['Burst Affinity'] = {feet="hashishin Basmak", legs="assimilator's shalwar +1"}
    sets.buff['Chain Affinity'] = {head="hashishin Kavuk", feet="Assimilator's Charuqs +1"}
    sets.buff.Convergence = {head="Luhlaza Keffiyeh +1"}
    sets.buff.Diffusion = {feet="Luhlaza Charuqs +1"}
    sets.buff.Enchainment = {body="Luhlaza Jubbah +1"}
    sets.buff.Efflux = {legs="hashishin Tayt", back="rosmerta's cape"}

    
    -- Precast Sets
    
    -- Precast sets to enhance JAs
    sets.precast.JA['Azure Lore'] = {hands="luhlaza Bazubands"}


    -- Waltz set (chr and vit)
    sets.precast.Waltz = {ammo="Sonia's Plectrum",
        head="Uk'uxkaj Cap",
        body="Vanir Cotehardie",hands="Buremte Gloves",ring1="Spiral Ring",
        back="Iximulew Cape",waist="Caudata Belt",legs="Hagondes Pants",feet="Iuitl Gaiters +1"}
        
    -- Don't need any special gear for Healing Waltz.
    sets.precast.Waltz['Healing Waltz'] = {}

    -- Fast cast sets for spells
    
    sets.precast.FC = {ammo="Impatiens",
        head="Carmine mask",ear1="etiolation earring", ear2="Loquacious Earring",
        body="Luhlaza Jubbah +1",hands="magavan mitts",ring1="menelaus's Ring",
        back="Swith Cape +1",waist="Witful Belt",legs="ayanmo cosciales +1",feet="amalric nails"}
        
    sets.precast.FC['Blue Magic'] = set_combine(sets.precast.FC, {body="hashishin mintan", hands="hashishin bazubands"})

       
    -- Weaponskill sets
    -- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS = {ammo="cheruski needle",
        head="jhakri coronal +2",neck="imbodla necklace",ear1="ishvara Earring",ear2="telos Earring",
        body="jhakri robe +2",hands="jhakri cuffs +1",ring1="ifrit ring",ring2="ifrit Ring",
        back="rosemerta's cape",waist="salire belt",legs="jhakri slops +2",feet="jhakri pigaches +1"}
    
    sets.precast.WS.acc = set_combine(sets.precast.WS, {hands="Buremte Gloves"})

    -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
    sets.precast.WS['Requiescat'] = {ammo="quartz tathlum +1", head="assimilator's keffiyeh +1",
		neck="imbodla necklace",ear1="ishvara earring", ear2="lifestorm earring",
        body="gyve doublet",hands="jhakri cuffs +1",ring1="stikini Ring +1",ring2="leviathan Ring",
        back="rosemerta's Cape", legs="mes'yohi slacks",feet="jhakri pigaches +1", waist="salire belt"}

    sets.precast.WS['Sanguine Blade'] = {ammo="quartz tathlum +1", head="assimilator's keffiyeh +1",
		neck="imbodla necklace",ear1="ishvara earring", ear2="lifestorm earring",
        body="gyve doublet",hands="jhakri cuffs +1",ring1="stikini Ring +1",ring2="leviathan Ring",
        back="rosemerta's Cape", legs="mes'yohi slacks",feet="jhakri pigaches +1", waist="salire belt"}

    sets.precast.WS['Savage Blade'] = {ammo="quartz tathlum +1", head="assimilator's keffiyeh +1",
		neck="imbodla necklace",ear1="ishvara earring", ear2="lifestorm earring",
        body="gyve doublet",hands="jhakri cuffs +1",ring1="stikini Ring +1",ring2="leviathan Ring",
        back="rosemerta's Cape", legs="mes'yohi slacks",feet="jhakri pigaches +1", waist="salire belt"}
    
    -- Midcast Sets
    sets.midcast.FastRecast = {ammo="impatiens",
        ear2="Loquacious Earring",ring2="diamond ring",
        body="Luhlaza Jubbah +1",hands="hashishin Bazubands",ring1="diamond Ring",
        waist="rumination Sash",legs="assimilator's shalwar +1"}
        
    sets.midcast['Blue Magic'] = {}
    
    -- Physical Spells --
    
    sets.midcast['Blue Magic'].Physical = {ammo="hasty pinion +1",
        head="whirlpool mask",neck="asperity necklace",ear1="telos earring", ear2="bladeborn earring", 
        body="jhakri robe +2",hands="jhakri cuffs +1",ring1="jhakri Ring",ring2="ilabrat ring",
        back="rosemerta's cape",waist="chaac belt",legs="jhakri slops +2",feet="herculean boots"}

    sets.midcast['Blue Magic'].PhysicalAcc = {ammo="hasty pinion +1",
        head="jhakri coronal +2",neck="ej necklace",ear1="telos Earring",ear2="Steelflash Earring",
        body="ayanmo corazza +2",hands="ayanmo manopolas +1",ring1="jhakri Ring",ring2="ilabrat Ring",
        back="rosemerta's cape",waist="hurch'lan sash", legs="jhakri slops +2",feet="jhakri pigaches +1"}

    sets.midcast['Blue Magic'].PhysicalStr = {ammo="cheruski needle", head="jhakri coronal +2",neck="tjukurrpa medal",
		ear1="flame pearl",ear2="flame pearl",body="jhakri robe +2",hands="despair finger gauntlets",ring1="ifrit ring", ring2="ifrit ring", 
		back="buquwik cape",waist="chuq'aba belt",legs="jhakri slops +2", feet="rawhide boots"}
    
    sets.midcast['Blue Magic'].PhysicalDex = {ammo="cheruski needle",
		head="ayanmo zucchetto +1",neck="shifting necklace", ear1="thunder pearl", 
		body="ayanmo corazza +2",hands="ayanmo manopolas +1",ring1="ramuh ring",ring2="ramuh ring", 
		back="rosemerta's cape",waist="artful belt", legs="gyve trousers", feet="ayanmo gambieras +1"}

    sets.midcast['Blue Magic'].PhysicalVit = 
        {ammo="brigantia pebble", head="carmine mask",ear1="soil earring",
		body="luhlaza jubbah +1",hands="despair finger gauntlets",ring1="terrasoul ring", ring2="terra's ring",
		back="iximulew cape",waist="chuq'aba belt",legs="osmium cuisses", feet="luhlaza charuqs +1"}

    sets.midcast['Blue Magic'].PhysicalAgi = {ammo="tengu-no-hane",
		head="adhemar bonnet", ear1="suppanomimi",
		body="ayanmo corazza +2",hands="ayanmo manopolas +1",ring1="garuda Ring", ring2="ilabrat ring",
		back="ik cape",waist="chaac belt",legs="ayanmo cosciales +1", feet="adhemar gamashes"}

    sets.midcast['Blue Magic'].PhysicalInt = {ammo="ghastly tathlum", 
		head="jhakri coronal +2",neck="imbodla necklace",ear1="psystorm earring",
		body="jhakri robe +2",hands="amalric gages",ring1="shiva ring",ring2="shiva Ring",
		back="Toro Cape",waist="acuity belt", legs="jhakri slops +2", feet="jhakri pigaches +1"}

    sets.midcast['Blue Magic'].PhysicalMnd = {ammo="quartz tathlum", 
		head="assimilator's keffiyeh +1",neck="imbodla necklace", ear1="mamool ja earring",ear2="lifestorm earring",
		body="gyve doublet",hands="jhakri cuffs +1",ring1="stikini ring +1",ring2="leviathan ring",
		back="aurist's Cape", waist="salire belt", legs="mes'yohi slacks",feet="jhakri pigaches +1"}

    sets.midcast['Blue Magic'].PhysicalChr = {ammo="mavi tathlum",
		head="assimilator's keffiyeh +1",neck="mirage stole +1",ear1="rimeice earring",
		body="gyve doublet",hands="despair finger gauntlets",ring1="stikini ring +1",
		back="kumbira Cape",waist="chaac belt",legs="gyve trousers", feet="jhakri pigaches +1"}

    sets.midcast['Blue Magic'].PhysicalHP = {ammo="brigantia pebble",
		head="luhlaza keffiyeh +1",neck="tjukurrpa medal",ear1="ethereal earring",ear2="etiolation earring", 
		body="gyve doublet", hands="despair finger gauntlets",ring1="stikini ring +1", ring2="ilabrat ring",
		back="iximulew cape", waist="chuq'aba belt", legs="osmium cuisses", feet="skaoi boots"}


    -- Magical Spells --
    
    sets.midcast['Blue Magic'].Magical = {ammo="mavi Tathlum",
        head="jhakri coronal +2",neck="eddy necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
        body="jhakri robe +2",hands="amalric gages",ring1="shiva Ring",ring2="Acumen Ring",
        back="cornflower cape", augments={'MP +15', 'dex +2', 'accuracy +3', 'blue magic skill +10'},legs="jhakri slops +2",
		feet="helios boots", augments={'"Mag.Atk.Bns."+20'}}

    sets.midcast['Blue Magic'].MagicalMnd = {ammo="quartz tathlum +1",
		head="assimilator's keffiyeh +1",neck="eddy necklace", ear1="friomisi earring", ear2="hecate's earring",
		body="gyve doublet",hands="amalric gages",ring1="Stikini Ring +1",ring2="leviathan ring",
        back="Cornflower cape",augments={'MP +15', 'dex +2', 'accuracy +3', 'blue magic skill +10'},waist="salire belt",
		legs="jhakri slops +2",feet="amalric nails"}

    sets.midcast['Blue Magic'].MagicalChr = set_combine(sets.midcast['Blue Magic'].Magical)

    sets.midcast['Blue Magic'].MagicalVit = set_combine(sets.midcast['Blue Magic'].Magical,
        {ring1="Spiral Ring"})

    sets.midcast['Blue Magic'].MagicalDex = set_combine(sets.midcast['Blue Magic'].Magical)

    sets.midcast['Blue Magic'].MagicAccuracy = {ammo="Mavi Tathlum",
        head="jhakri coronal +2", neck="mirage stole +1", ear1="lifestorm earring", ear2="psystorm earring",
		body="ayanmo corazza +2",hands="ayanmo manopolas +1",ring1="Sangoma Ring +1",ring2="Stikini Ring +1",
        back="Cornflower Cape", augments={'MP +15', 'dex +2', 'accuracy +3', 'blue magic skill +10'},
		waist="salire belt",legs="ayanmo cosciales +1",feet="amalric nails"}

    -- Breath Spells --
    
    sets.midcast['Blue Magic'].Breath = set_combine(sets.midcast['Blue Magic'].Magical,
	{head="luhlaza keffiyeh +1", neck="ardor pendant +1"})

    -- Other Types --
    
     sets.midcast['Blue Magic'].Stun = set_combine(sets.midcast['Blue Magic'].Magical,
        {waist="Chaac Belt"})
        
    sets.midcast['Blue Magic']['White Wind'] = set_combine(sets.midcast['Blue Magic'].PhysicalHP,
		{hands="telchine gloves", ring1="menelaus's ring",back="dew silk cape", waist="gishdubar sash", 
		legs="gyve trouser", feet="skaoi boots"})

    sets.midcast['Blue Magic'].Healing = {ammo="quartz tathlum",
        head="carmine mask",neck="imbodla necklace",ear1="lifestorm Earring",ear2="loquacious Earring",
        body="luhlaza jubbah +1",hands="telchine gloves",ring1="menelaus's ring",ring2="stikini ring +1",
        back="dew silk cape",waist="gishdubar sash",legs="gyve trousers",feet="skaoi boots"}

    sets.midcast['Blue Magic'].SkillBasedBuff = {ammo="Mavi Tathlum",
        head="Luhlaza Keffiyeh +1",neck="mirage stole +1", ear2="loquacious earring",
        body="Assimilator's Jubbah +1", hands="hashishin bazubands", ring1="antica ring", ring2="stikini ring +1",
        back="cornflower cape", augments={'MP +15', 'dex +2', 'accuracy +3', 'blue magic skill +10'},
		legs="hashishin Tayt",feet="Luhlaza Charuqs +1"}
	
    sets.midcast['Blue Magic']['Diamondhide'] = set_combine(sets.midcast['Blue Magic'].SkillBasedBuff,
		{ear1="earthcry earring", waist="siegel sash", legs="havenhose"})
    
    sets.midcast.Protect = {ring1="Sheltered Ring"}
    sets.midcast.Protectra = {ring1="Sheltered Ring"}
    sets.midcast.Shell = {ring1="Sheltered Ring"}
    sets.midcast.Shellra = {ring1="Sheltered Ring"}
    

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

    -- Gear for learning spells: +skill and AF hands.
    sets.Learning = {ammo="Mavi Tathlum", body="Assimilator's Jubbah +1", hands="Assimilator's Bazubands +1",
        head="Luhlaza Keffiyeh +1", ring1="stikini ring +1", ring2="stikini ring +1",
        back="cornflower cape", augments={'MP +15', 'dex +2', 'accuracy +3', 'blue magic skill +10'},
		legs="hashishin Tayt",feet="Luhlaza Charuqs +1"}
	

    sets.latent_refresh = {waist="Fucho-no-obi",ear1="moonshade earring"}

    -- Resting sets
    sets.resting = {
        head="Cobra unit hat",neck="Eidolon pendant +1",ear1="antivenom earring",ear2="rapture earring",
        body="errant houppelande",hands="genie gages",ring1="star ring",ring2="star ring",
        back="felicitas cape",waist="hierarch belt",feet="arborist nails"}
    
    -- Idle sets
    sets.idle = {ammo="staunch tathlum",
        head="ayanmo zucchetto +1",neck="twilight torque",ear1="ethereal earring",ear2="etiolation earring",
        body="luhlaza Jubbah +1",hands="ayanmo manopolas +1",ring1="defending Ring",ring2="Succor Ring",
        back="hexerei cape",waist="fucho-no-obi",legs="Crimson Cuisses",feet="ayanmo gambieras +1"}

    sets.idle.DT = {ammo="staunch tathlum",
        head="ayanmo zucchetto +1",neck="twilight torque",ear1="etiolation earring", ear2="ethereal earring", 
        body="ayanmo corazza +2", hands="ayanmo manopolas +1", ring1="Defending Ring",ring2="Ayanmo Ring",
        back="hexerei cape",waist="isa belt", legs="ayanmo cosciales +1",feet="ayanmo gambieras +1"}
    
    sets.idle.Learning = set_combine(sets.idle, sets.Learning)
    
    sets.idle.refresh = set_combine(sets.idle,
		{
        ear1="moonshade earring", ear2="ethereal earring",
		body="jhakri robe +2",hands="serpentes cuffs", ring1="stikini ring"})


    
    -- Defense sets
    sets.defense.PDT = {}

    sets.defense.MDT = {}

    sets.Kiting = {legs="Crimson Cuisses"}

    -- 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="Hasty pinion +1",
        head="whirlpool mask",neck="asperity necklace",ear1="steelflash earring",ear2="bladeborn earring",
        body="ayanmo corazza",hands="despair finger gauntlets",ring1="petrov ring",ring2="chirich ring",
        back="bleating Mantle",waist="Cetl Belt",legs="jhakri slops +1",feet="jhakri pigaches +1"}

	sets.engaged.TH = {ammo="Hasty pinion +1",
        head="whirlpool mask",neck="asperity necklace",ear1="steelflash earring",ear2="bladeborn earring",
        body="ayanmo corazza",hands="despair finger gauntlets",ring1="petrov ring",ring2="chirich ring",
        back="bleating Mantle",waist="Chaac Belt",legs="jhakri slops +1",feet="jhakri pigaches +1"}

    sets.engaged.Acc = {ammo="hasty pinion +1",
        head="ayanmo zucchetto +1",neck="ej necklace",ear1="mache Earring +1",ear2="mache Earring +1",
        body="ayanmo corazza",hands="ayanmo manopolas +1",ring1="chirich Ring",ring2="chirich Ring",
        back="enuma Mantle",waist="hurch'lan sash",legs="jhakri slops +1",feet="ayanmo gambieras +1"}

    sets.engaged.Refresh = {ammo="hasty pinion +1",
        head="ayanmo zucchetto +1",neck="asperity necklace",ear1="mache Earring +1",ear2="suppanomimi",
        body="Luhlaza Jubbah +1",hands="ayanmo manopolas +1",ring1="stikini ring +1", ring2="stikini ring +1",
        back="Atheling Mantle",waist="Cetl Belt",legs="ayanmo cosciales",feet="luhlaza Charuqs +1"}

	sets.engaged.DW = {ammo="Hasty pinion +1",
        head="ayanmo zucchetto +1",neck="asperity necklace",ear1="steelflash earring",ear2="bladeborn earring",
        body="ayanmo corazza",hands="despair finger gauntlets",ring1="petrov ring",ring2="chirich ring",
        back="bleating Mantle",waist="Cetl Belt",legs="jhakri slops +1",feet="jhakri pigaches +1"}

    sets.engaged.DW.TH = {ammo="Hasty pinion +1",
        head="whirlpool mask",neck="asperity necklace",ear1="steelflash earring",ear2="bladeborn earring",
        body="ayanmo corazza",hands="despair finger gauntlets",ring1="petrov ring",ring2="chirich ring",
        back="bleating Mantle",waist="Chaac Belt",legs="jhakri slops +1",feet="jhakri pigaches +1"}
    
    sets.engaged.DW.Acc = {ammo="hasty pinion +1",
        head="ayanmo zucchetto +1",neck="asperity necklace",ear1="mache Earring +1",ear2="suppanomimi",
        body="ayanmo corazza",hands="ayanmo manopolas +1",ring1="chirich Ring",ring2="mars's Ring",
        back="enuma Mantle",waist="cetl belt",legs="jhakri slops +1",feet="jhakri pigaches +1"}

    sets.engaged.DW.Refresh = {ammo="hasty pinion +1",
        head="ayanmo zucchetto +1",neck="asperity necklace",ear1="mache Earring +1",ear2="suppanomimi",
        body="Luhlaza Jubbah +1",hands="ayanmo manopolas +1",ring1="stikini ring +1", ring2="stikini ring +1",
        back="Atheling Mantle",waist="Cetl Belt",legs="ayanmo cosciales",feet="luhlaza Charuqs +1"}
        
    sets.engaged.Learning = set_combine(sets.engaged, sets.Learning)
    sets.engaged.DW.Learning = set_combine(sets.engaged.DW, sets.Learning)

	sets.Swords = {main="Naegling", sub="Almace"}
	sets.Clubs = {main="nibiru cudgel", sub="nibiru cudgel"}


    sets.self_healing = {ring1="Kunaji Ring",ring2="Asklepian Ring"}
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 unbridled_spells:contains(spell.english) and not state.Buff['Unbridled Learning'] then
        eventArgs.cancel = true
        windower.send_command('@input /ja "Unbridled Learning" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
    end
end

-- Run after the default 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)
    -- Add enhancement gear for Chain Affinity, etc.
    if spell.skill == 'Blue Magic' then
        for buff,active in pairs(state.Buff) do
            if active and sets.buff[buff] then
                equip(sets.buff[buff])
            end
        end
        if spellMap == 'Healing' and spell.target.type == 'SELF' and sets.self_healing then
            equip(sets.self_healing)
        end
    end

    -- If in learning mode, keep on gear intended to help with that, regardless of action.
    if state.OffenseMode.value == 'Learning' then
        equip(sets.Learning)
    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 state.Buff[buff] ~= nil then
        state.Buff[buff] = gain
    end
end

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

-- Custom spell mapping.
-- Return custom spellMap value that can override the default spell mapping.
-- Don't return anything to allow default spell mapping to be used.
function job_get_spell_map(spell, default_spell_map)
    if spell.skill == 'Blue Magic' then
        for category,spell_list in pairs(blue_magic_maps) do
            if spell_list:contains(spell.english) then
                return category
            end
        end
    end
end

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

function job_state_change(stateField, newValue, oldValue)
    if stateField == 'Weapon Mode' then
        if newValue == 'Sword' then
            equip(sets.Swords)
        elseif newValue == 'Club' then
            equip(sets.Clubs)
        end
    end
end

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



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



-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
		-- Default macro set/book
    if player.sub_job == 'rdm' then
        set_macro_page(3, 16)
    else
        set_macro_page(1, 16)
	end
	
end
 Asura.Iamarealgirl
Offline
サーバ: Asura
Game: FFXI
user: Latravant
Posts: 79
By Asura.Iamarealgirl 2020-01-19 07:36:32  
woot got it working now just need to figure out how to equip the 3 different sets.
 Quetzalcoatl.Orestes
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2020-01-19 09:27:00  
Asura.Iamarealgirl said: »
also how do i get it to send a message letting me know which set is currently equipped so i dont have to open equipment to check.
and i have 3 sets of swords i want to equip, how do i equip sets for them?
sets.swords1
sets.swords2
sets.swords3?
or can i give them names like
sets.melee
sets.MA
sets.bluskill?
You can name them however you want. To make it work, you'll need to add new toggles to the Set.
Code
state.WeaponMode = M{['description']='Weapon Mode', 'SwordSkill', 'SwordMA', 'SwordMelee', 'Club'}

You'll have to add these to job_state_change()
Code
function job_state_change(stateField, newValue, oldValue)
    if stateField == 'Weapon Mode' then
        if newValue == 'SwordSkill' then
            equip(sets.SwordSkill)
        elseif newValue == 'SwordMA' then
            equip(sets.SwordMA)
        elseif newValue == 'SwordMelee' then
            equip(sets.SwordMelee)
        elseif newValue == 'Club' then
            equip(sets.Clubs)
        end
    end
end

And make sure you create the sets you're equipping above.

Asura.Iamarealgirl said:
ok question about the job_state_change. where do i put
---------
if i already have a job_state change setup. this is what i already have
Don't duplicate job_state_change(). Only one of them will be used.
You should have one job_state_change() that looks like the following.
Code
function job_state_change(stateField, newValue, oldValue)
    if stateField == 'Offense Mode' then
        if newValue == 'None' then
            enable('main','sub','range')
        else
            disable('main','sub','range')
        end
    elseif stateField == 'Weapon Mode' then
        if newValue == 'SwordSkill' then
            equip(sets.Swords)
        elseif newValue == 'SwordMA' then
            equip(sets.Clubs)
        elseif newValue == 'SwordMelee' then
            equip(sets.Clubs)
        elseif newValue == 'Club' then
            equip(sets.Clubs)
        end
    end
end


Also, I'm not entirely sure on the error you're getting, but I don't think you can bind regular keys. (maybe you can) It would be worth testing using an unused F key (F7, etc. or equals key) just to see.
 Quetzalcoatl.Orestes
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2020-01-19 09:30:03  
To display the WeaponMode status, add this function to your lua.
Code
function display_current_job_state(eventArgs)
    local msg = ''
    msg = msg .. 'WEAPONMODE: '..state.WeaponMode.current
    add_to_chat(122, msg)
    eventArgs.handled = true
end
[+]
 Quetzalcoatl.Orestes
Offline
サーバ: Quetzalcoatl
Game: FFXI
user: Orestes78
Posts: 430
By Quetzalcoatl.Orestes 2020-01-19 09:37:04  
This is what people do if items have the same name, as far as I know. (haven't had this problem myself)

Make sure they're in the bag specified.
Code
    sets.Clubs = {main={name="Nibiru Cudgel",bag="Wardrobe"},sub={name="Nibiru Cudgel",bag="Wardrobe 2"}}
[+]
 Asura.Iamarealgirl
Offline
サーバ: Asura
Game: FFXI
user: Latravant
Posts: 79
By Asura.Iamarealgirl 2020-01-19 09:43:38  
omg. that is *** awesome thank so much for the help man!
[+]
 Asura.Iamarealgirl
Offline
サーバ: Asura
Game: FFXI
user: Latravant
Posts: 79
By Asura.Iamarealgirl 2020-01-19 09:49:23  
 Asura.Hieral
Offline
サーバ: Asura
Game: FFXI
user: Hieral
Posts: 3
By Asura.Hieral 2020-02-13 19:08:45  
Hello

So I'm a gearswap rookie, admittedly. Google search isn't really helping with this issue so I figured I'd try here.

So I recently borrowed a skeleton lua and basically made my own SAM lua out of it. Seems like everything works great except...

Sometimes neither the idle.set or idle.town.set equips. I was told maybe I need to add a wait time to these (maybe it takes too long to zone?) but I can't seem to find how to modify the idle rules anywhere in any of the Mote luas or the skeleton one.

Any help would be much appreciated!
 Leviathan.Draugo
Offline
サーバ: Leviathan
Game: FFXI
Posts: 2775
By Leviathan.Draugo 2020-02-13 19:20:48  
Asura.Hieral said: »
Hello

So I'm a gearswap rookie, admittedly. Google search isn't really helping with this issue so I figured I'd try here.

So I recently borrowed a skeleton lua and basically made my own SAM lua out of it. Seems like everything works great except...

Sometimes neither the idle.set or idle.town.set equips. I was told maybe I need to add a wait time to these (maybe it takes too long to zone?) but I can't seem to find how to modify the idle rules anywhere in any of the Mote luas or the skeleton one.

Any help would be much appreciated!
No one will be able to help you unless you post your .lua here so that they can look at your code and maybe find the problem, just friendly advice.

Use the[code ] [/code ] tags
 Asura.Hieral
Offline
サーバ: Asura
Game: FFXI
user: Hieral
Posts: 3
By Asura.Hieral 2020-02-13 19:23:34  
Code
-- Original: Motenten / Modified: Arislan / Modified Again: Cambion
-- Haste/DW Detection Requires Gearinfo Addon

-- 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 variables that are user-independent.  state.Buff vars initialized here will automatically be tracked.
function job_setup()
    state.Buff['Climactic Flourish'] = buffactive['climactic flourish'] or false
    state.Buff['Sneak Attack'] = buffactive['sneak attack'] or false

    state.MainStep = M{['description']='Main Step', 'Box Step', 'Quickstep', 'Feather Step', 'Stutter Step'}
    state.AltStep = M{['description']='Alt Step', 'Quickstep', 'Feather Step', 'Stutter Step', 'Box Step'}
    state.UseAltStep = M(false, 'Use Alt Step')
    state.SelectStepTarget = M(false, 'Select Step Target')
    state.IgnoreTargetting = M(true, 'Ignore Targetting')

    state.ClosedPosition = M(false, 'Closed Position')

    state.CurrentStep = M{['description']='Current Step', 'Main', 'Alt'}
--  state.SkillchainPending = M(false, 'Skillchain Pending')

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

    lockstyleset = 1
end

-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job.
-------------------------------------------------------------------------------------------------------------------

-- Gear Modes
function user_setup()
	state.OffenseMode:options('Normal', 'LowAcc', 'MidAcc', 'HighAcc')
    state.HybridMode:options('Normal', 'HIGH', 'MID', 'LOW')
    state.WeaponskillMode:options('Normal', 'Acc')
	
-- Allows the use of Ctrl + ~ and Alt + ~ for 2 more macros of your choice.
    send_command('bind ^` input /ja "Chocobo Jig II" <me>') --Ctrl'~'
    send_command('bind !` input /ja "Spectral Jig" <me>') --Alt'~'
	send_command('bind f9 gs c cycle OffenseMode') --F9
	send_command('bind ^f9 gs c cycle WeaponSkillMode') --Ctrl'F9'
	send_command('bind f10 gs c cycle HybridMode') --F10
	send_command('bind f11 gs c cycle mainstep') --F11
	send_command('bind @c gs c toggle CP')

    select_default_macro_book()
    set_lockstyle()

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

-- Erases the Key Binds above when you switch to another job.
function user_unload()
    send_command('unbind ^`')
    send_command('unbind !`')
	send_command('unbind !-')
	send_command('unbind ^=')
	send_command('unbind f11')
	send_command('unbind @c')
end

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

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

    sets.Enmity = {head="Highwing Helm",neck="Unmoving Collar +1",hands="Kurys Gloves",ear2="Friomisi Earring",ring1="Petrov Ring",body="Emet Harness +1",legs="Samnuha Tights",feet="Ahosi Leggings"}

    sets.precast.JA['Provoke'] = sets.Enmity
    sets.precast.JA['No Foot Rise'] = {body="Horos Casaque +2"}
    sets.precast.JA['Trance'] = {head="Horos Tiara +3"}
	sets.precast.JA.Meditate = {
	head="Wakido Kabuto +1",
	back={ name="Smertrios's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','"Regen"+5',}},
	}
	
    sets.precast.Waltz = {
	
	}

    sets.precast.WaltzSelf = set_combine(sets.precast.Waltz, {ring1="Asklepian Ring"})
    sets.precast.Waltz['Healing Waltz'] = {}
    sets.precast.Samba = {}
    sets.precast.Jig = {}

    sets.precast.Step = {}
	sets.precast.Step['Feather Step'] = set_combine(sets.precast.Step, {})
    
	sets.precast.Flourish1 = {}
    sets.precast.Flourish1['Animated Flourish'] = sets.Enmity
    sets.precast.Flourish1['Violent Flourish'] = {}
    sets.precast.Flourish1['Desperate Flourish'] = {}

    sets.precast.Flourish2 = {}
    sets.precast.Flourish2['Reverse Flourish'] = {hands="Macu. Bangles +1",back="Toetapper Mantle"}
	
    sets.precast.Flourish3 = {}
    sets.precast.Flourish3['Striking Flourish'] = {}
    sets.precast.Flourish3['Climactic Flourish'] = {head="Maculele Tiara +1",}

    sets.precast.FC = {}

    sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {neck="Magoraga Beads"})

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

    sets.precast.WS = {
    ammo="Knobkierrie",
    head="Flam. Zucchetto +2",
    body="Hiza. Haramaki +2",
    hands="Wakido Kote +2",
    legs="Wakido Haidate +2",
    feet="Flam. Gambieras +2",
    neck="Sam. Nodowa +2",
    waist="Fotia Belt",
    left_ear="Cessance Earring",
    right_ear="Brutal Earring",
    left_ring="Flamma Ring",
    right_ring="Niqmaddu Ring",
    back={ name="Smertrios's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%','"Regen"+5',}},
        }

    sets.precast.WS.Acc = set_combine(sets.precast.WS, {})

    sets.precast.WS.Critical = {body="Meg. Cuirie +2"}

    sets.precast.WS['Exenterator'] = {}

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

    sets.precast.WS['Pyrrhic Kleos'] = {
	
	}

    sets.precast.WS['Pyrrhic Kleos'].Acc = set_combine(sets.precast.WS['Pyrrhic Kleos'], {})

    sets.precast.WS['Evisceration'] = {
		
		}

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

    sets.precast.WS['Rudra\'s Storm'] = {
		
		}

    sets.precast.WS['Rudra\'s Storm'].Acc = set_combine(sets.precast.WS['Rudra\'s Storm'], {})

    sets.precast.WS['Aeolian Edge'] = {
        
        }

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

    sets.midcast.FastRecast = sets.precast.FC
    sets.midcast.SpellInterrupt = {}
    sets.midcast.Utsusemi = sets.midcast.SpellInterrupt

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

    sets.idle = {
    ammo="Knobkierrie",
    head="Flam. Zucchetto +2",
    body="Hiza. Haramaki +2",
    hands="Wakido Kote +2",
    legs="Wakido Haidate +2",
    feet="Danzo Sune-Ate",
    neck="Sam. Nodowa +2",
    waist="Ioskeha Belt +1",
    left_ear="Cessance Earring",
    right_ear="Brutal Earring",
    left_ring="Warp Ring",
    right_ring="Dim. Ring (Holla)",
    back={ name="Smertrios's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','"Regen"+5',}},
        }

    sets.idle.Town = {
	ammo="Knobkierrie",
    head="Flam. Zucchetto +2",
    body="Hiza. Haramaki +2",
    hands="Wakido Kote +2",
    legs="Wakido Haidate +2",
    feet="Danzo Sune-Ate",
    neck="Sam. Nodowa +2",
    waist="Ioskeha Belt +1",
    left_ear="Cessance Earring",
    right_ear="Brutal Earring",
    left_ring="Warp Ring",
    right_ring="Dim. Ring (Holla)",
    back={ name="Smertrios's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','"Regen"+5',}},
		}

    ------------------------------------------------------------------------------------------------
    ---------------------------------------- Engaged Sets ------------------------------------------
    ------------------------------------------------------------------------------------------------
-- This is a Set that would only be used when you are NOT Dual Wielding.  Most likely Airy Buckler Builds with Fencer as War Sub.
-- There are no haste parameters set for this build, because you wouldn't be juggling DW gear, you would always use the same gear, other than Damage Taken and Accuracy sets which ARE included below.
    sets.engaged = {
    ammo="Knobkierrie",
    head="Flam. Zucchetto +2",
    body="Flamma Korazin +1",
    hands="Wakido Kote +2",
    legs="Wakido Haidate +2",
    feet="Flam. Gambieras +2",
    neck="Sam. Nodowa +2",
    waist="Ioskeha Belt +1",
    left_ear="Cessance Earring",
    right_ear="Brutal Earring",
    left_ring="Flamma Ring",
    right_ring="Niqmaddu Ring",
    back={ name="Smertrios's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','"Regen"+5',}},
		}

    ------------------------------------------------------------------------------------------------
    -------------------------------------- Dual Wield Sets -----------------------------------------
	------------------------------------------------------------------------------------------------
    -- * DNC Native DW Trait: 30% DW
    -- * DNC Job Points DW Gift: 5% DW -- If you do not have these JP Gifts, add 5% 'to cap' to each set below)

    -- No Magic Haste (39% DW to cap) -- Reminder that 39% is assuming you already have 5% from Job Points.  44% DW to cap if not.
    sets.engaged.DW = {
		
        }

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

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

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

    -- 45% Magic Haste (1% DW to cap)
    sets.engaged.DW.MaxHaste = {
        
        }
	
	------------------------------------------------------------------------------------------------
    --------------------------------------- Accuracy Sets ------------------------------------------
    ------------------------------------------------------------------------------------------------
-- Define three tiers of Accuracy.  These sets are cycled with the F9 Button to increase accuracy in stages as desired.
    sets.engaged.Acc1 = {}
    sets.engaged.Acc2 = {}
    sets.engaged.Acc3 = {}
-- Base Shield
	sets.engaged.LowAcc = set_combine(sets.engaged, sets.engaged.Acc1)
    sets.engaged.MidAcc = set_combine(sets.engaged, sets.engaged.Acc2)
    sets.engaged.HighAcc = set_combine(sets.engaged, sets.engaged.Acc3)
-- Base DW
    sets.engaged.DW.LowAcc = set_combine(sets.engaged.DW, sets.engaged.Acc1)
    sets.engaged.DW.MidAcc = set_combine(sets.engaged.DW, sets.engaged.Acc2)
    sets.engaged.DW.HighAcc = set_combine(sets.engaged.DW, sets.engaged.Acc3)
-- LowHaste DW
	sets.engaged.DW.LowAcc.LowHaste = set_combine(sets.engaged.DW.LowHaste, sets.engaged.Acc1)
    sets.engaged.DW.MidAcc.LowHaste = set_combine(sets.engaged.DW.LowHaste, sets.engaged.Acc2)
    sets.engaged.DW.HighAcc.LowHaste = set_combine(sets.engaged.DW.LowHaste, sets.engaged.Acc3)
-- MidHaste DW
    sets.engaged.DW.LowAcc.MidHaste = set_combine(sets.engaged.DW.MidHaste, sets.engaged.Acc1)
    sets.engaged.DW.MidAcc.MidHaste = set_combine(sets.engaged.DW.MidHaste, sets.engaged.Acc2)
    sets.engaged.DW.HighAcc.MidHaste = set_combine(sets.engaged.DW.MidHaste, sets.engaged.Acc3)	
-- HighHaste DW
	sets.engaged.DW.LowAcc.HighHaste = set_combine(sets.engaged.DW.HighHaste, sets.engaged.Acc1)
    sets.engaged.DW.MidAcc.HighHaste = set_combine(sets.engaged.DW.HighHaste, sets.engaged.Acc2)
    sets.engaged.DW.HighAcc.HighHaste = set_combine(sets.engaged.DW.HighHaste, sets.engaged.Acc3)
-- HighHaste DW
	sets.engaged.DW.LowAcc.MaxHaste = set_combine(sets.engaged.DW.MaxHaste, sets.engaged.LowAcc)
    sets.engaged.DW.MidAcc.MaxHaste = set_combine(sets.engaged.DW.MaxHaste, sets.engaged.MidAcc)
    sets.engaged.DW.HighAcc.MaxHaste = set_combine(sets.engaged.DW.MaxHaste, sets.engaged.HighAcc)

    ------------------------------------------------------------------------------------------------
    ---------------------------------------- Hybrid Sets -------------------------------------------
    ------------------------------------------------------------------------------------------------
-- Define three tiers of Defense Taken.  These sets are cycled with the F10 Button. DT1-X%, DT2-X%, DT3-X%
    sets.engaged.DT1 = {}
	sets.engaged.DT2 = {}
	sets.engaged.DT3 = {}

-- Shield Base
    sets.engaged.LOW = set_combine(sets.engaged, sets.engaged.DT1)
    sets.engaged.LowAcc.LOW = set_combine(sets.engaged.LowAcc, sets.engaged.DT1)
    sets.engaged.MidAcc.LOW = set_combine(sets.engaged.MidAcc, sets.engaged.DT1)
    sets.engaged.HighAcc.LOW = set_combine(sets.engaged.HighAcc, sets.engaged.DT1)
	
	sets.engaged.MID = set_combine(sets.engaged, sets.engaged.DT2)
    sets.engaged.LowAcc.MID = set_combine(sets.engaged.LowAcc, sets.engaged.DT2)
    sets.engaged.MidAcc.MID = set_combine(sets.engaged.MidAcc, sets.engaged.DT2)
    sets.engaged.HighAcc.MID = set_combine(sets.engaged.HighAcc, sets.engaged.DT2)
	
	sets.engaged.HIGH = set_combine(sets.engaged, sets.engaged.DT3)
    sets.engaged.LowAcc.HIGH = set_combine(sets.engaged.LowAcc, sets.engaged.DT3)
    sets.engaged.MidAcc.HIGH = set_combine(sets.engaged.MidAcc, sets.engaged.DT3)
    sets.engaged.HighAcc.HIGH = set_combine(sets.engaged.HighAcc, sets.engaged.DT3)	
-- No Haste DW
    sets.engaged.DW.LOW = set_combine(sets.engaged.DW, sets.engaged.DT1)
    sets.engaged.DW.LowAcc.LOW = set_combine(sets.engaged.DW.LowAcc, sets.engaged.DT1)
    sets.engaged.DW.MidAcc.LOW = set_combine(sets.engaged.DW.MidAcc, sets.engaged.DT1)
    sets.engaged.DW.HighAcc.LOW = set_combine(sets.engaged.DW.HighAcc, sets.engaged.DT1)
	
    sets.engaged.DW.MID = set_combine(sets.engaged.DW, sets.engaged.DT2)
    sets.engaged.DW.LowAcc.MID = set_combine(sets.engaged.DW.LowAcc, sets.engaged.DT2)
    sets.engaged.DW.MidAcc.MID = set_combine(sets.engaged.DW.MidAcc, sets.engaged.DT2)
    sets.engaged.DW.HighAcc.MID = set_combine(sets.engaged.DW.HighAcc, sets.engaged.DT2)

    sets.engaged.DW.HIGH = set_combine(sets.engaged.DW, sets.engaged.DT3)
    sets.engaged.DW.LowAcc.HIGH = set_combine(sets.engaged.DW.LowAcc, sets.engaged.DT3)
    sets.engaged.DW.MidAcc.HIGH = set_combine(sets.engaged.DW.MidAcc, sets.engaged.DT3)
    sets.engaged.DW.HighAcc.HIGH = set_combine(sets.engaged.DW.HighAcc, sets.engaged.DT3)	
-- Low Haste DW
    sets.engaged.DW.LOW.LowHaste = set_combine(sets.engaged.DW.LowHaste, sets.engaged.DT1)
    sets.engaged.DW.LowAcc.LOW.LowHaste = set_combine(sets.engaged.DW.LowAcc.LowHaste, sets.engaged.DT1)
    sets.engaged.DW.MidAcc.LOW.LowHaste = set_combine(sets.engaged.DW.MidAcc.LowHaste, sets.engaged.DT1)
    sets.engaged.DW.HighAcc.LOW.LowHaste = set_combine(sets.engaged.DW.HighAcc.LowHaste, sets.engaged.DT1)
	
    sets.engaged.DW.MID.LowHaste = set_combine(sets.engaged.DW.LowHaste, sets.engaged.DT2)
    sets.engaged.DW.LowAcc.MID.LowHaste = set_combine(sets.engaged.DW.LowAcc.LowHaste, sets.engaged.DT2)
    sets.engaged.DW.MidAcc.MID.LowHaste = set_combine(sets.engaged.DW.MidAcc.LowHaste, sets.engaged.DT2)
    sets.engaged.DW.HighAcc.MID.LowHaste = set_combine(sets.engaged.DW.HighAcc.LowHaste, sets.engaged.DT2)
	
	sets.engaged.DW.HIGH.LowHaste = set_combine(sets.engaged.DW.LowHaste, sets.engaged.DT3)
    sets.engaged.DW.LowAcc.HIGH.LowHaste = set_combine(sets.engaged.DW.LowAcc.LowHaste, sets.engaged.DT3)
    sets.engaged.DW.MidAcc.HIGH.LowHaste = set_combine(sets.engaged.DW.MidAcc.LowHaste, sets.engaged.DT3)
    sets.engaged.DW.HighAcc.HIGH.LowHaste = set_combine(sets.engaged.DW.HighAcc.LowHaste, sets.engaged.DT3)
-- Mid Haste
    sets.engaged.DW.LOW.MidHaste = set_combine(sets.engaged.DW.MidHaste, sets.engaged.DT1)
    sets.engaged.DW.LowAcc.LOW.MidHaste = set_combine(sets.engaged.DW.LowAcc.MidHaste, sets.engaged.DT1)
    sets.engaged.DW.MidAcc.LOW.MidHaste = set_combine(sets.engaged.DW.MidAcc.MidHaste, sets.engaged.DT1)
    sets.engaged.DW.HighAcc.LOW.MidHaste = set_combine(sets.engaged.DW.HighAcc.MidHaste, sets.engaged.DT1)
	
    sets.engaged.DW.MID.MidHaste = set_combine(sets.engaged.DW.MidHaste, sets.engaged.DT2)
    sets.engaged.DW.LowAcc.MID.MidHaste = set_combine(sets.engaged.DW.LowAcc.MidHaste, sets.engaged.DT2)
    sets.engaged.DW.MidAcc.MID.MidHaste = set_combine(sets.engaged.DW.MidAcc.MidHaste, sets.engaged.DT2)
    sets.engaged.DW.HighAcc.MID.MidHaste = set_combine(sets.engaged.DW.HighAcc.MidHaste, sets.engaged.DT2)

    sets.engaged.DW.HIGH.MidHaste = set_combine(sets.engaged.DW.MidHaste, sets.engaged.DT3)
    sets.engaged.DW.LowAcc.HIGH.MidHaste = set_combine(sets.engaged.DW.LowAcc.MidHaste, sets.engaged.DT3)
    sets.engaged.DW.MidAcc.HIGH.MidHaste = set_combine(sets.engaged.DW.MidAcc.MidHaste, sets.engaged.DT3)
    sets.engaged.DW.HighAcc.HIGH.MidHaste = set_combine(sets.engaged.DW.HighAcc.MidHaste, sets.engaged.DT3)		
-- High Haste
    sets.engaged.DW.LOW.HighHaste = set_combine(sets.engaged.DW.HighHaste, sets.engaged.DT1)
    sets.engaged.DW.LowAcc.LOW.HighHaste = set_combine(sets.engaged.DW.LowAcc.HighHaste, sets.engaged.DT1)
    sets.engaged.DW.MidAcc.LOW.HighHaste = set_combine(sets.engaged.DW.MidAcc.HighHaste, sets.engaged.DT1)
    sets.engaged.DW.HighAcc.LOW.HighHaste = set_combine(sets.engaged.DW.HighAcc.HighHaste, sets.engaged.DT1)
	
	sets.engaged.DW.MID.HighHaste = set_combine(sets.engaged.DW.HighHaste, sets.engaged.DT2)
    sets.engaged.DW.LowAcc.MID.HighHaste = set_combine(sets.engaged.DW.LowAcc.HighHaste, sets.engaged.DT2)
    sets.engaged.DW.MidAcc.MID.HighHaste = set_combine(sets.engaged.DW.MidAcc.HighHaste, sets.engaged.DT2)
    sets.engaged.DW.HighAcc.MID.HighHaste = set_combine(sets.engaged.DW.HighAcc.HighHaste, sets.engaged.DT2)
	
	sets.engaged.DW.HIGH.HighHaste = set_combine(sets.engaged.DW.HighHaste, sets.engaged.DT3)
    sets.engaged.DW.LowAcc.HIGH.HighHaste = set_combine(sets.engaged.DW.LowAcc.HighHaste, sets.engaged.DT3)
    sets.engaged.DW.MidAcc.HIGH.HighHaste = set_combine(sets.engaged.DW.MidAcc.HighHaste, sets.engaged.DT3)
    sets.engaged.DW.HighAcc.HIGH.HighHaste = set_combine(sets.engaged.DW.HighAcc.HighHaste, sets.engaged.DT3)
-- Max Haste
    sets.engaged.DW.LOW.MaxHaste = set_combine(sets.engaged.DW.MaxHaste, sets.engaged.DT1)
    sets.engaged.DW.LowAcc.LOW.MaxHaste = set_combine(sets.engaged.DW.LowAcc.MaxHaste, sets.engaged.DT1)
    sets.engaged.DW.MidAcc.LOW.MaxHaste = set_combine(sets.engaged.DW.MidAcc.MaxHaste, sets.engaged.DT1)
    sets.engaged.DW.HighAcc.LOW.MaxHaste = set_combine(sets.engaged.DW.HighAcc.MaxHaste, sets.engaged.DT1)
	
	sets.engaged.DW.MID.MaxHaste = set_combine(sets.engaged.DW.MaxHaste, sets.engaged.DT2)
    sets.engaged.DW.LowAcc.MID.MaxHaste = set_combine(sets.engaged.DW.LowAcc.MaxHaste, sets.engaged.DT2)
    sets.engaged.DW.MidAcc.MID.MaxHaste = set_combine(sets.engaged.DW.MidAcc.MaxHaste, sets.engaged.DT2)
    sets.engaged.DW.HighAcc.MID.MaxHaste = set_combine(sets.engaged.DW.HighAcc.MaxHaste, sets.engaged.DT2)
	
    sets.engaged.DW.HIGH.MaxHaste = set_combine(sets.engaged.DW.MaxHaste, sets.engaged.DT3)
    sets.engaged.DW.LowAcc.HIGH.MaxHaste = set_combine(sets.engaged.DW.LowAcc.MaxHaste, sets.engaged.DT3)
    sets.engaged.DW.MidAcc.HIGH.MaxHaste = set_combine(sets.engaged.DW.MidAcc.MaxHaste, sets.engaged.DT3)
    sets.engaged.DW.HighAcc.HIGH.MaxHaste = set_combine(sets.engaged.DW.HighAcc.MaxHaste, sets.engaged.DT3)	

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

--  sets.buff['Saber Dance'] = {legs="Horos Tights +3"}
--  sets.buff['Fan Dance'] = {hands="Horos Bangles +3"}
    sets.buff['Climactic Flourish'] = {head="Maculele Tiara +1", body="Meg. Cuirie +2"}
--  sets.buff['Closed Position'] = {feet="Horos T. Shoes +3"}

    sets.buff.Doom = {
        
        }

    sets.CP = {back="Mecisto. Mantle"}

end

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

-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
    if 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
	
-- Used to overwrite Moonshade Earring if TP is more than 2750.
    if spell.type == 'WeaponSkill' then
        if player.tp > 2750 then
        equip({right_ear = "Sherida Earring"})
        end
    end
	
-- Used to optimize Rudra's Storm when Climactic Flourish is active.
    if spell.type == 'WeaponSkill' then
        if spell.english == "Rudra's Storm" and buffactive['Climactic Flourish'] then
			equip({head="Maculele Tiara +1", left_ear="Ishvara Earring"})
        end
    end
	
-- Forces Maculele Tiara +1 to override your WS Head slot if Climactic Flourish is active.	Corresponds with sets.buff['Climactic Flourish'].
    if spell.type == "WeaponSkill" then
        if state.Buff['Climactic Flourish'] then
            equip(sets.buff['Climactic Flourish'])
        end
    end
end

function job_post_precast(spell, action, spellMap, eventArgs)
    if spell.type == "WeaponSkill" then
        if state.Buff['Sneak Attack'] == true then
            equip(sets.precast.WS.Critical)
        end
        if state.Buff['Climactic Flourish'] then
            equip(sets.buff['Climactic Flourish'])
        end
    end
    if spell.type=='Waltz' and spell.target.type == 'SELF' then
        equip(sets.precast.WaltzSelf)
    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)
    -- Weaponskills wipe SATA.  Turn those state vars off before default gearing is attempted.
    if spell.type == 'WeaponSkill' and not spell.interrupted then
        state.Buff['Sneak Attack'] = false
    end
end

-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
function job_buff_change(buff,gain)
    if buff == 'Saber Dance' or buff == 'Climactic Flourish' or buff == 'Fan Dance' then
        handle_equipping_gear(player.status)
    end

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

end

-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
function job_handle_equipping_gear(playerStatus, eventArgs)
    update_combat_form()
    determine_haste_group()
end

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

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

function get_custom_wsmode(spell, spellMap, defaut_wsmode)
    local wsmode

    if state.Buff['Sneak Attack'] then
        wsmode = 'SA'
    end

    return wsmode
end

function customize_idle_set(idleSet)
    if state.CP.current == 'on' then
        equip(sets.CP)
        disable('back')
    else
        enable('back')
    end

    return idleSet
end

function customize_melee_set(meleeSet)
    if state.Buff['Climactic Flourish'] then
		meleeSet = set_combine(meleeSet, sets.buff['Climactic Flourish'])
    end
    if state.ClosedPosition.value == true then
        meleeSet = set_combine(meleeSet, sets.buff['Closed Position'])
    end

    return meleeSet
end

-- Handle auto-targetting based on local setup.
function job_auto_change_target(spell, action, spellMap, eventArgs)
    if spell.type == 'Step' then
        if state.IgnoreTargetting.value == true then
            state.IgnoreTargetting:reset()
            eventArgs.handled = true
        end

        eventArgs.SelectNPCTargets = state.SelectStepTarget.value
    end
end


-- Function to display the current relevant user state when doing an update.
-- Set eventArgs.handled to true if display was handled, and you don't want the default info shown.
function display_current_job_state(eventArgs)
    local msg = '[ Melee'

    if state.CombatForm.has_value then
        msg = msg .. ' (' .. state.CombatForm.value .. ')'
    end

    msg = msg .. ': '

    msg = msg .. state.OffenseMode.value
    if state.HybridMode.value ~= 'Normal' then
        msg = msg .. '/' .. state.HybridMode.value
    end
    msg = msg .. ' ][ WS: ' .. state.WeaponskillMode.value .. ' ]'

    if state.DefenseMode.value ~= 'None' then
        msg = msg .. '[ Defense: ' .. state.DefenseMode.value .. state[state.DefenseMode.value .. 'DefenseMode'].value .. ' ]'
    end

    if state.ClosedPosition.value then
        msg = msg .. '[ Closed Position: ON ]'
    end

    if state.Kiting.value then
        msg = msg .. '[ Kiting Mode: ON ]'
    end

    msg = msg .. '[ '..state.MainStep.current

    if state.UseAltStep.value == true then
        msg = msg .. '/'..state.AltStep.current
    end

    msg = msg .. ' ]'

    add_to_chat(060, msg)

    eventArgs.handled = true
end


-------------------------------------------------------------------------------------------------------------------
-- User self-commands.
-------------------------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------------------------
-- 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 <= 9 then
            classes.CustomMeleeGroups:append('HighHaste')
        elseif DW_needed > 9 and DW_needed <= 21 then
            classes.CustomMeleeGroups:append('MidHaste')
        elseif DW_needed > 21 and DW_needed <= 39 then
            classes.CustomMeleeGroups:append('LowHaste')
        elseif DW_needed > 39 then
            classes.CustomMeleeGroups:append('')
        end
    end
end

function job_self_command(cmdParams, eventArgs)
    if cmdParams[1] == 'step' then
        if cmdParams[2] == 't' then
            state.IgnoreTargetting:set()
        end

        local doStep = ''
        if state.UseAltStep.value == true then
            doStep = state[state.CurrentStep.current..'Step'].current
            state.CurrentStep:cycle()
        else
            doStep = state.MainStep.current
        end

        send_command('@input /ja "'..doStep..'" <t>')
    end
    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

-- If you attempt to use a step, this will automatically use Presto if you are under 5 Finishing moves and resend step.
function job_pretarget(spell, action, spellMap, eventArgs)
    if spell.type == 'Step' then
        local allRecasts = windower.ffxi.get_ability_recasts()
        local prestoCooldown = allRecasts[236]
        local under5FMs = not buffactive['Finishing Move 5'] and not buffactive['Finishing Move (6+)']
         
        if player.main_job_level >= 77 and prestoCooldown < 1 and under5FMs then
            cast_delay(1.1)
            send_command('input /ja "Presto" <me>')
        end
    end
	
-- If you attempt to use Climactic Flourish with zero finishing moves, this will automatically use Box Step and then resend Climactic Flourish.	
	    local under1FMs = not buffactive['Finishing Move 1'] and not buffactive['Finishing Move 2'] and not buffactive['Finishing Move 3'] and not buffactive['Finishing Move 4'] and not buffactive['Finishing Move 5'] and not buffactive['Finishing Move (6+)']

    if spell.english == "Climactic Flourish" and under1FMs then
            cast_delay(1.9)
            send_command('input /ja "Box Step" <t>')
    end	
end

-- My Waltz Rules to Overwrite Mote's
-- My Current Waltz Amounts: I:372 II:697 III:1134
function refine_waltz(spell, action, spellMap, eventArgs)
    if missingHP ~= nil then
        if player.main_job == 'DNC' then
            if missingHP < 40 and spell.target.name == player.name then
                -- Not worth curing yourself for so little.
                -- Don't block when curing others to allow for waking them up.
                add_to_chat(122,'Full HP!')
                eventArgs.cancel = true
                return
            elseif missingHP < 475 then
                newWaltz = 'Curing Waltz'
                waltzID = 190
            elseif missingHP < 850 then
                newWaltz = 'Curing Waltz II'
                waltzID = 191
            else
                newWaltz = 'Curing Waltz III'
                waltzID = 192
            end
        else
            -- Not dnc main or sub; ignore
            return
        end
    end
end

-- Automatically loads a Macro Set by: (Pallet,Book)
function select_default_macro_book()
    if player.sub_job == 'SAM' then
        set_macro_page(1, 5)
    elseif player.sub_job == 'WAR' then
        set_macro_page(2, 5)
    elseif player.sub_job == 'RUN' then
        set_macro_page(3, 5)    
    elseif player.sub_job == 'BLU' then
        set_macro_page(4, 5)
    elseif player.sub_job == 'THF' then
        set_macro_page(9, 5)
    elseif player.sub_job == 'NIN' then
        set_macro_page(10, 5)
    else
        set_macro_page(2, 5)
    end
end

function set_lockstyle()
    send_command('wait 2; input /lockstyleset ' .. lockstyleset)
end
Offline
Posts: 270
By eeternal 2020-02-14 13:21:46  
If you have 2 sets of weapons, how do you cycle through them?

sets.weapons.Sword = {main="Eminent Scimitar"}
sets.weapons.club = {main="Daybreak"}

would it be gs c cycle sets.weapons?

or something like:

state.Weapons = M{['description']='Current Weapons', 'Sword', 'Club'}

function cycle_weapons()
if state.Weapons.current == 'Sword' then
equip({main="Eminent Scimitar",sub=".."})
elseif state.Weapons.current == 'Club' then
equip({main="Daybreak",sub=".."})
end

For some reason cant get it to work
 Valefor.Yandaime
Offline
サーバ: Valefor
Game: FFXI
user: Yandaime
Posts: 782
By Valefor.Yandaime 2020-02-28 17:11:02  
Hello, I'm having an issue with Gearswap deleting rows of my BLU Macros and I'm just sick of dealing with it. Is there any way to put a stop to this nonsense once and for all?

This has been a problem for years and usually I avoid it by moving up to a blank bar before doing a reload command or such but it recently got the macro bar where I keep all my Macro'd spells -_-;
(I like to keep some super important spells on a macro for easier use and just move them over to the Main-Bar when I have said spells equipped and it's very helpful to me)


It only happens with BLU, no other jobs, no idea what's causing it.

It delete w/e row my Macros are currently at whenever I //gs Reload or sometimes even when I change from another job and then come back to BLU.
Code
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job.  Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
send_command('input /macro book 8;wait .1;input /macro set 1')
-- Initialization function for this job file.
function get_sets()
    mote_include_version = 2
  
    -- Load and initialize the include file.
    include('Mote-Include.lua')
	include('organizer-lib')
end


-- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
function job_setup()
    state.Buff['Burst Affinity'] = buffactive['Burst Affinity'] or false
    state.Buff['Chain Affinity'] = buffactive['Chain Affinity'] or false
    state.Buff.Convergence = buffactive.Convergence or false
    state.Buff.Diffusion = buffactive.Diffusion or false
    state.Buff.Efflux = buffactive.Efflux or false
    
    state.Buff['Unbridled Learning'] = buffactive['Unbridled Learning'] or false


    blue_magic_maps = {}
    
    -- Mappings for gear sets to use for various blue magic spells.
    -- While Str isn't listed for each, it's generally assumed as being at least
    -- moderately signficant, even for spells with other mods.
    
    -- Physical Spells --
    
    -- Physical spells with no particular (or known) stat mods
    blue_magic_maps.Physical = S{
        'Bilgestorm'
    }

    -- Spells with heavy accuracy penalties, that need to prioritize accuracy first.
    blue_magic_maps.PhysicalAcc = S{
        'Heavy Strike',
    }

    -- Physical spells with Str stat mod
    blue_magic_maps.PhysicalStr = S{
        'Battle Dance','Bloodrake','Death Scissors','Dimensional Death',
        'Empty Thrash','Quadrastrike','Sinker Drill','Spinal Cleave',
        'Uppercut','Vertical Cleave'
    }
        
    -- Physical spells with Dex stat mod
    blue_magic_maps.PhysicalDex = S{
        'Amorphic Spikes','Asuran Claws','Barbed Crescent','Claw Cyclone','Disseverment',
        'Foot Kick','Frenetic Rip','Goblin Rush','Hysteric Barrage','Paralyzing Triad',
        'Seedspray','Sickle Slash','Smite of Rage','Terror Touch','Thrashing Assault',
        'Vanity Dive'
    }
        
    -- Physical spells with Vit stat mod
    blue_magic_maps.PhysicalVit = S{
        'Body Slam','Cannonball','Delta Thrust','Glutinous Dart','Grand Slam',
        'Power Attack','Quad. Continuum','Sprout Smack','Sub-zero Smash'
    }
        
    -- Physical spells with Agi stat mod
    blue_magic_maps.PhysicalAgi = S{
        'Benthic Typhoon','Feather Storm','Helldive','Hydro Shot','Jet Stream',
        'Pinecone Bomb','Spiral Spin','Wild Oats'
    }

    -- Physical spells with Int stat mod
    blue_magic_maps.PhysicalInt = S{
        'Mandibular Bite','Queasyshroom'
    }

    -- Physical spells with Mnd stat mod
    blue_magic_maps.PhysicalMnd = S{
        'Ram Charge','Screwdriver','Tourbillion'
    }

    -- Physical spells with Chr stat mod
    blue_magic_maps.PhysicalChr = S{
        'Bludgeon'
    }

    -- Physical spells with HP stat mod
    blue_magic_maps.PhysicalHP = S{
        'Final Sting'
    }

    -- Magical Spells --

    -- Magical spells with the typical Int mod
    blue_magic_maps.Magical = S{
        'Blastbomb','Blazing Bound','Bomb Toss','Cursed Sphere','Dark Orb','Death Ray',
        'Diffusion Ray','Droning Whirlwind','Embalming Earth','Firespit','Foul Waters',
        'Ice Break','Leafstorm','Maelstrom','Rail Cannon','Regurgitation','Rending Deluge',
        'Retinal Glare','Subduction','Tem. Upheaval','Water Bomb','Spectral Floe','Tenebral Crush',
		'Entomb','Scouring Spate'
    }

    -- Magical spells with a primary Mnd mod
    blue_magic_maps.MagicalMnd = S{
        'Acrid Stream','Evryone. Grudge','Magic Hammer','Mind Blast'
    }

    -- Magical spells with a primary Chr mod
    blue_magic_maps.MagicalChr = S{
        'Eyes On Me','Mysterious Light'
    }

    -- Magical spells with a Vit stat mod (on top of Int)
    blue_magic_maps.MagicalVit = S{
        'Thermal Pulse'
    }

    -- Magical spells with a Dex stat mod (on top of Int)
    blue_magic_maps.MagicalDex = S{
        'Charged Whisker','Gates of Hades'
    }
            
    -- Magical spells (generally debuffs) that we want to focus on magic accuracy over damage.
    -- Add Int for damage where available, though.
    blue_magic_maps.MagicAccuracy = S{
        '1000 Needles','Absolute Terror','Actinic Burst','Auroral Drape','Awful Eye',
        'Blank Gaze','Blistering Roar','Blood Drain','Blood Saber','Chaotic Eye',
        'Cimicine Discharge','Cold Wave','Corrosive Ooze','Demoralizing Roar','Digest',
        'Dream Flower','Enervation','Feather Tickle','Filamented Hold','Frightful Roar',
        'Geist Wall','Hecatomb Wave','Infrasonics','Jettatura','Light of Penance',
        'Lowing','Mind Blast','Mortal Ray','MP Drainkiss','Osmosis','Reaving Wind',
        'Sandspin','Sandspray','Sheep Song','Soporific','Sound Blast','Stinking Gas',
        'Sub-zero Smash','Venom Shell','Voracious Trunk','Yawn'
    }
        
    -- Breath-based spells
    blue_magic_maps.Breath = S{
        'Bad Breath','Flying Hip Press','Frost Breath','Heat Breath',
        'Hecatomb Wave','Magnetite Cloud','Poison Breath','Radiant Breath','Self-Destruct',
        'Thunder Breath','Vapor Spray','Wind Breath'
    }

    -- Stun spells
    blue_magic_maps.Stun = S{
        'Blitzstrahl','Frypan','Head Butt','Sudden Lunge','Tail slap','Temporal Shift',
        'Thunderbolt','Whirl of Rage'
    }
        
    -- Healing spells
    blue_magic_maps.Healing = S{
        'Healing Breeze','Magic Fruit','Plenilune Embrace','Pollen','Restoral','White Wind',
        'Wild Carrot'
    }
    
    -- Buffs that depend on blue magic skill
    blue_magic_maps.SkillBasedBuff = S{
        'Barrier Tusk','Diamondhide','Magic Barrier','Metallic Body','Plasma Charge',
        'Pyric Bulwark','Reactor Cool','Carcharian Verve','Harden Shell'
    }

    -- Other general buffs
    blue_magic_maps.Buff = S{
        'Amplification','Animating Wail','Battery Charge','Carcharian Verve','Cocoon',
        'Exuviation','Fantod','Feather Barrier',
        'Memento Mori','Nat. Meditation','Occultation','Orcish Counterstance','Refueling',
        'Regeneration','Saline Coat','Triumphant Roar','Warm-Up','Winds of Promyvion',
        'Zephyr Mantle'
    }
    
    
    -- Spells that require Unbridled Learning to cast.
    blue_magic_maps.Unbridled = S{
        'Absolute Terror','Bilgestorm','Blistering Roar','Bloodrake','Carcharian Verve',
        'Crashing Thunder','Droning Whirlwind','Gates of Hades','Harden Shell','Polar Roar',
        'Pyric Bulwark','Thunderbolt','Tourbillion','Uproot'
    }
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', 'SomeAcc', 'Acc','Hybrid')
    state.WeaponskillMode:options('Normal', 'SomeAcc', 'Acc')
    state.CastingMode:options('Normal', 'SomeAcc', 'Resistant','Treasure')

    -- Additional local binds
    send_command('bind f5 gs c set OffenseMode Normal;gs c set WeaponskillMode Normal;gs c set CastingMode Normal')
	send_command('bind f6 gs c set OffenseMode SomeAcc;gs c set WeaponskillMode SomeAcc;gs c set CastingMode SomeAcc')
	send_command('bind f7 gs c set OffenseMode Acc;gs c set WeaponskillMode Acc;gs c set CastingMode Resistant')
	send_command('bind f8 gs c set OffenseMode Hybrid;gs c set WeaponskillMode Normal;gs c set CastingMode Normal')
	send_command('bind %c send @all exec cells.txt')
	
	send_command('bind f1 send Mule exec indi.txt')
	send_command('bind f2 send Mule exec geo.txt')
	send_command('bind f3 send Mule exec dia.txt')
	send_command('bind f4 send Mule exec full-circle.txt')
	send_command('bind f9 send Mule exec BoG.txt')
	send_command('bind f12 send Mule exec Thunder.txt')
	send_command('bind f11 send Mule exec Malaise.txt')
	
	select_default_macro_book()
end


-- Called when this job file is unloaded (eg: job change)
function user_unload()
    send_command('unbind f1')
    send_command('unbind f2')
    send_command('unbind f3')
    send_command('unbind f4')
    send_command('unbind f9')
    send_command('unbind f12')
    send_command('unbind f11')
end


-- Set up gear sets.
function init_gear_sets()
    --------------------------------------
    -- Start defining the sets
    --------------------------------------

    sets.precast.JA['Burst Affinity'] 	= {feet="Mavi Basmak +2"}
    sets.precast.JA['Chain Affinity'] 	= {head="Mavi Kavuk +2", feet="Assimilator's Charuqs"}
    sets.precast.JA['Convergence'] 		= {head="Mirage Keffiyeh +2"}
    sets.precast.JA['Enchainment'] 		= {body="Luhlaza Jubbah"}
    sets.precast.JA['Efflux'] 			= {legs="Mavi Tayt +2"}
	
	
	sets.precast.JA['Provoke'] = {ammo="Staunch Tathlum +1",
        head="Rabid Visor",
		neck="Warder's Charm +1",ear1="Friomisi Earring",ear2="Cryptic Earring",
        body="Emet Harness",
		hands={ name="Herculean Gloves", augments={'Rng.Atk.+19','Damage taken-3%','DEX+7','Accuracy+10','Attack+6',}},
		ring1="Provocare Ring",ring2="Eihwaz Ring",
        back="Reiki Cloak",
		waist="Chaac Belt",
		legs="Malignance Tights",
		feet="Ahosi Leggings"}

    
    -- Precast Sets
    
    -- Precast sets to enhance JAs
    sets.precast.JA['Azure Lore'] = {hands="Mirage Bazubands +2"}


    -- Waltz set (chr and vit)
    sets.precast.Waltz = {ammo="Sonia's Plectrum",
        head={ name="Adhemar Bonnet +1", augments={'STR+12','DEX+12','Attack+20',}},
        body="Vanir Cotehardie",hands="Buremte Gloves",ring1="Spiral Ring",
        back="Iximulew Cape",waist="Caudata Belt",legs="Malignance Tights",feet="Iuitl Gaiters +1"}
        
    -- Don't need any special gear for Healing Waltz.
    sets.precast.Waltz['Healing Waltz'] = {}

    -- Fast cast sets for spells
    
    sets.precast.FC = {ammo="Impatiens",
        head="Carmine Mask +1",
		ear1="Enchntr. Earring +1",ear2="Loquacious Earring",
        body={ name="Adhemar Jacket +1", augments={'HP+105','"Fast Cast"+10','Magic dmg. taken -4',}},
		hands="Leyline Gloves",
		ring1="Prolix Ring",ring2="Kishar Ring",
        back={ name="Rosmerta's Cape", augments={'"Fast Cast"+10',}},
		waist="Witful Belt",
		legs="Psycloth Lappas",
		feet="Carmine Greaves +1"}
    
	sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {neck="Magoraga Beads"})
	
    sets.precast.FC['Blue Magic'] = set_combine(sets.precast.FC, {body="Hashishin Mintan +1"})
    sets.precast.FC['Mighty Guard'] = set_combine(sets.precast.FC, {body="Hashishin Mintan +1"})
	
    -- Weaponskill sets
    -- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS = {ammo="Ginsen",
        head={ name="Herculean Helm", augments={'Weapon skill damage +3%','STR+14','Accuracy+1','Attack+2',}},neck="Fotia Gorget",ear1="Moonshade Earring",ear2="Ishvara Earring",
		body="Assim. Jubbah +3",hands="Jhakri Cuffs +2",
		ring1="Epaminondas's Ring",ring2="Karieyh Ring",
		back={ name="Rosmerta's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},
		waist="Grunfeld Rope",
		legs="Luhlaza Shalwar +3",
		feet="Adhemar Gamashes"}
		
	sets.precast.WS.SomeAcc = {ammo="Ginsen",
		head={ name="Herculean Helm", augments={'Weapon skill damage +3%','STR+14','Accuracy+1','Attack+2',}},neck="Fotia Gorget",ear1="Moonshade Earring",ear2="Ishvara Earring",
        body="Assim. Jubbah +3",hands="Jhakri Cuffs +2",
		ring1="Epaminondas's Ring",ring2="Karieyh Ring",
		back={ name="Rosmerta's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},
		waist="Grunfeld Rope",
		legs="Luhlaza Shalwar +3",
		feet={ name="Herculean Boots", augments={'"Mag.Atk.Bns."+19','Accuracy+12','Accuracy+20 Attack+20','Mag. Acc.+9 "Mag.Atk.Bns."+9',}}}
    
    sets.precast.WS.Acc = {ammo="Falcon Eye",
		head={ name="Herculean Helm", augments={'Weapon skill damage +3%','STR+14','Accuracy+1','Attack+2',}},neck="Fotia Gorget",ear1="Bladeborn Earring",ear2="Steelflash Earring",
        body="Assim. Jubbah +3",hands="Jhakri Cuffs +2",
		ring1="Epona's Ring",ring2="Ilabrat Ring",
		back={ name="Rosmerta's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},
		waist="Grunfeld Rope",
		legs="Luhlaza Shalwar +3",
		feet={ name="Herculean Boots", augments={'"Mag.Atk.Bns."+19','Accuracy+12','Accuracy+20 Attack+20','Mag. Acc.+9 "Mag.Atk.Bns."+9',}}}
	
		
    -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
    sets.precast.WS['Requiescat'] = {ammo="Ginsen",
        head="Jhakri Coronal +2",neck="Fotia Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
        body="Jhakri Robe +2",hands="Jhakri Cuffs +2",
		ring1="Epona's Ring",ring2="Stikini Ring +1",
		waist="Fotia Belt",
        back={ name="Rosmerta's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},
		legs="Luhlaza Shalwar +3",
		feet="Jhakri Pigaches +2"}

    sets.precast.WS['Sanguine Blade'] = {ammo="Pemphredo Tathlum",
        head="Pixie Hairpin +1",neck="Sanctity Necklace",ear1="Friomisi Earring",ear2="Novio Earring",
        body="Amalric Doublet +1",hands="Amalric Gages +1",
		ring1="Epaminondas's Ring",ring2="Archon Ring",waist=gear.ElementalObi,
        back="Cornflower Cape",legs="Luhlaza Shalwar +3",feet="Amalric Nails +1"}
    
	sets.precast.WS["Chant du Cygne"] = {ammo="Falcon Eye",
		head={ name="Adhemar Bonnet +1", augments={'STR+12','DEX+12','Attack+20',}},
		neck="Mirage Stole +2",ear1="Moonshade Earring",ear2="Mache Earring +1",
		body={ name="Herculean Vest", augments={'Accuracy+15','Crit. hit damage +4%','DEX+10','Attack+10',}},
		hands={ name="Adhemar Wrist. +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
		ring1="Epona's Ring",ring2="Begrudging Ring",
		back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Crit.hit rate+10',}},
		waist="Fotia Belt",
		legs="Samnuha Tights",
		feet="Thereoid Greaves"}
	sets.precast.WS["Chant du Cygne"].SomeAcc = {ammo="Falcon Eye",
		head={ name="Adhemar Bonnet +1", augments={'STR+12','DEX+12','Attack+20',}},
		neck="Mirage Stole +2",ear1="Moonshade Earring",ear2="Mache Earring +1",
		body={ name="Herculean Vest", augments={'Accuracy+15','Crit. hit damage +4%','DEX+10','Attack+10',}},
		ring2="Begrudging Ring",
		back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Crit.hit rate+10',}},
		waist="Fotia Belt",
		legs="Samnuha Tights",
		feet="Thereoid Greaves"}
	sets.precast.WS["Chant du Cygne"].Acc = {ammo="Falcon Eye",
		head={ name="Adhemar Bonnet +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
		neck="Mirage Stole +2",
		body="Abnoba Kaftan",
		ring1="Ramuh Ring +1",ring2="Ilabrat Ring",
		back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Crit.hit rate+10',}},
		waist="Fotia Belt",
		legs="Luhlaza Shalwar +3",
		feet="Ayanmo Gambieras +2"}
		
	sets.precast.WS["Savage Blade"] = {
		head={ name="Herculean Helm", augments={'Weapon skill damage +3%','STR+14','Accuracy+1','Attack+2',}},
		neck="Mirage Stole +2",ear1="Moonshade Earring",ear2="Ishvara Earring",
		body="Assim. Jubbah +3",
		hands="Jhakri Cuffs +2",
		ring1="Epaminonda's Ring",ring2="Karieyh Ring",
		legs="Luhlaza Shalwar +3",
		waist="Prosilio Belt +1",
		feet={ name="Herculean Boots", augments={'Weapon skill damage +4%','STR+13','Attack+7',}},
		back={ name="Rosmerta's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}}}
	sets.precast.WS["Savage Blade"].SomeAcc = {
		head={ name="Herculean Helm", augments={'Weapon skill damage +3%','STR+14','Accuracy+1','Attack+2',}},
		neck="Mirage Stole +2",ear1="Moonshade Earring",ear2="Ishvara Earring",
		body="Assim. Jubbah +3",
		hands="Jhakri Cuffs +2",
		ring1="Epaminondas's Ring",ring2="Karieyh Ring",
		legs="Luhlaza Shalwar +3",
		waist="Prosilio Belt +1",
		feet={ name="Herculean Boots", augments={'Weapon skill damage +4%','STR+13','Attack+7',}},
		back={ name="Rosmerta's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}}}
	sets.precast.WS["Savage Blade"].Acc = {
		head={ name="Herculean Helm", augments={'Weapon skill damage +3%','STR+14','Accuracy+1','Attack+2',}},
		neck="Mirage Stole +2",ear1="Moonshade Earring",ear2="Ishvara Earring",
		body="Assim. Jubbah +3",
		hands="Jhakri Cuffs +2",
		ring1="Epaminondas's Ring",ring2="Karieyh Ring",
		legs="Luhlaza Shalwar +3",
		waist="Prosilio Belt +1",
		feet={ name="Herculean Boots", augments={'Weapon skill damage +4%','STR+13','Attack+7',}},
		back={ name="Rosmerta's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}}}
		
	sets.precast.WS["Expiacion"] = {ammo="Falcon Eye",
		head={ name="Herculean Helm", augments={'Weapon skill damage +3%','STR+14','Accuracy+1','Attack+2',}},
		neck="Mirage Stole +2",ear1="Moonshade Earring",ear2="Ishvara Earring",
		body="Assim. Jubbah +3",
		hands="Jhakri Cuffs +2",
		ring1="Epaminondas's Ring",ring2="Karieyh Ring",
		legs="Luhlaza Shalwar +3",
		waist="Prosilio Belt +1",
		feet={ name="Herculean Boots", augments={'Weapon skill damage +4%','STR+13','Attack+7',}},
		back={ name="Rosmerta's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}}}
	sets.precast.WS["Expiacion"].SomeAcc = {ammo="Falcon Eye",
		head={ name="Herculean Helm", augments={'Weapon skill damage +3%','STR+14','Accuracy+1','Attack+2',}},
		neck="Mirage Stole +2",ear1="Moonshade Earring",ear2="Ishvara Earring",
		body="Assim. Jubbah +3",
		hands="Jhakri Cuffs +2",
		ring1="Epaminondas's Ring",ring2="Karieyh Ring",
		legs="Luhlaza Shalwar +3",
		waist="Prosilio Belt +1",
		feet={ name="Herculean Boots", augments={'Weapon skill damage +4%','STR+13','Attack+7',}},
		back={ name="Rosmerta's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}}}
	sets.precast.WS["Expiacion"].Acc = {ammo="Falcon Eye",
		head={ name="Herculean Helm", augments={'Weapon skill damage +3%','STR+14','Accuracy+1','Attack+2',}},
		neck="Mirage Stole +2",ear1="Moonshade Earring",ear2="Ishvara Earring",
		body="Assim. Jubbah +3",
		hands="Jhakri Cuffs +2",
		ring1="Epaminondas's Ring",ring2="Karieyh Ring",
		legs="Luhlaza Shalwar +3",
		waist="Prosilio Belt +1",
		feet={ name="Herculean Boots", augments={'Weapon skill damage +4%','STR+13','Attack+7',}},
		back={ name="Rosmerta's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}}}
		
	sets.precast.WS["Vorpal Blade"] = {ammo="Falcon Eye",
		head={ name="Adhemar Bonnet +1", augments={'STR+12','DEX+12','Attack+20',}},
		neck="Mirage Stole +2",ear1="Moonshade Earring",ear2="Mache Earring +1",
		body="Abnoba Kaftan",
		hands={ name="Adhemar Wrist. +1", augments={'STR+12','DEX+12','Attack+20',}},
		ring1="Epona's Ring",ring2="Begrudging Ring",
		back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Crit.hit rate+10',}},
		waist="Fotia Belt",
		legs="Samnuha Tights",
		feet="Thereoid Greaves"}
	sets.precast.WS["Vorpal Blade"].SomeAcc = {ammo="Falcon Eye",
		head={ name="Adhemar Bonnet +1", augments={'STR+12','DEX+12','Attack+20',}},
		neck="Mirage Stole +2",ear1="Moonshade Earring",ear2="Mache Earring +1",
		body="Abnoba Kaftan",
		hands={ name="Adhemar Wrist. +1", augments={'STR+12','DEX+12','Attack+20',}},
		ring1="Epona's Ring",ring2="Begrudging Ring",
		back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Crit.hit rate+10',}},
		waist="Fotia Belt",
		legs="Samnuha Tights",
		feet="Thereoid Greaves"}
	sets.precast.WS["Vorpal Blade"].Acc = {ammo="Falcon Eye",
		head={ name="Adhemar Bonnet +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
		neck="Mirage Stole +2",ear1="Moonshade Earring",ear2="Mache Earring +1",
		body="Abnoba Kaftan",
		hands={ name="Adhemar Wrist. +1", augments={'STR+12','DEX+12','Attack+20',}},
		ring1="Epona's Ring",ring2="Begrudging Ring",
		back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Crit.hit rate+10',}},
		waist="Fotia Belt",
		legs="Samnuha Tights",
		feet="Ayanmo Gambieras +2"}
    
    -- Midcast Sets
    sets.midcast.FastRecast = {ammo="Staunch Tathlum +1",
        head="Malignance Chapeau",
		neck="Mirage Stole +2",ear1="Suppanomimi",ear2="Cessance Earring",
        body="Malignance Tabard",
		hands="Malignance Gloves",
		ring1="Patricius Ring",ring2="Defending Ring",
        back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dual Wield"+10','Phys. dmg. taken-10%',}},
		waist="Flume Belt +1",
		legs="Malignance Tights",
		feet="Ahosi Leggings"}
        
    sets.midcast['Blue Magic'] = {}
    
    -- Physical Spells --
    
    sets.midcast['Blue Magic'].Physical = {ammo="Falcon Eye",
        head="Malignance Chapeau",neck="Sanctity Necklace",ear1="Dignitary's Earring",ear2="Mache Earring +1",
        body="Malignance Tabard",
		hands="Malignance Gloves",
		ring1="Ramuh Ring +1",ring2="Ilabrat Ring",
		back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Crit.hit rate+10',}},
		waist="Reiki Yotai",
		legs="Malignance Tights",
		feet="Jhakri Pigaches +2"}

    sets.midcast['Blue Magic'].PhysicalAcc = {ammo="Falcon Eye",
        head="Malignance Chapeau",neck="Sanctity Necklace",ear1="Dignitary's Earring",ear2="Mache Earring +1",
        body="Malignance Tabard",
		hands="Malignance Gloves",
		ring1={name="Ramuh Ring +1",priority=1},ring2={name="Ramuh Ring +1",priority=2},
		back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Crit.hit rate+10',}},
		waist="Reiki Yotai",
		legs="Malignance Tights",
		feet="Jhakri Pigaches +2"}

    sets.midcast['Blue Magic'].PhysicalStr = set_combine(sets.midcast['Blue Magic'].Physical,
        {})

    sets.midcast['Blue Magic'].PhysicalDex = set_combine(sets.midcast['Blue Magic'].Physical,{ammo="Falcon Eye",
		ring1="Ramuh Ring +1",ring2="Ilabrat Ring",waist="Artful Belt +1",
		back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Crit.hit rate+10',}}})

    sets.midcast['Blue Magic'].PhysicalVit = set_combine(sets.midcast['Blue Magic'].Physical,
        {ring1="Titan Ring",ring2="Titan Ring",back="Iximulew Cape"})

    sets.midcast['Blue Magic'].PhysicalAgi = set_combine(sets.midcast['Blue Magic'].Physical,
        {ring1="Stormsoul Ring",ring2="Stormsoul Ring",waist="Chaac Belt"})

    sets.midcast['Blue Magic'].PhysicalInt = set_combine(sets.midcast['Blue Magic'].Physical,
        {ear1="Dignitary's Earring",ring1={name="Shiva Ring +1",priority=1},ring2={name="Shiva Ring +1",priority=2},back="Rosmerta's Cape"})

    sets.midcast['Blue Magic'].PhysicalMnd = set_combine(sets.midcast['Blue Magic'].Physical,
        {ear1="Dignitary's Earring",ring1={name="Stikini Ring +1",priority=1},ring2={name="Stikini Ring +1",priority=2},back="Rosmerta's Cape"})

    sets.midcast['Blue Magic'].PhysicalChr = set_combine(sets.midcast['Blue Magic'].Physical,
        {back="Rosmerta's Cape",waist="Chaac Belt"})

    sets.midcast['Blue Magic'].PhysicalHP = set_combine(sets.midcast['Blue Magic'].Physical)


    -- Magical Spells --
    
    sets.midcast['Blue Magic'].Magical = {ammo="Pemphredo Tathlum",
        head="Jhakri Coronal +2",
		neck="Sanctity Necklace",ear1="Novio Earring",ear2="Friomisi Earring",
        body="Jhakri Robe +2",hands="Amalric Gages +1",ring1={name="Shiva Ring +1",priority=1},ring2={name="Shiva Ring +1",priority=2},
        back="Cornflower Cape",waist=gear.ElementalObi,legs="Amalric Slops +1",feet="Amalric Nails +1"}
		
    sets.midcast['Blue Magic'].Magical.Resistant = set_combine(sets.midcast['Blue Magic'].Magical,{
		ammo="Pemphredo Tathlum",
		neck="Mirage Stole +2",
		ear1="Digni. Earring",ear2="Enchntr. Earring +1",
		ring1="Shiva Ring +1",
		legs="Malignance Tights"})
		
    
    sets.midcast['Blue Magic'].MagicalMnd = set_combine(sets.midcast['Blue Magic'].Magical,
        {ring1={name="Stikini Ring +1",priority=1},ring2={name="Stikini Ring +1",priority=2},})

    sets.midcast['Blue Magic'].MagicalChr = set_combine(sets.midcast['Blue Magic'].Magical)

    sets.midcast['Blue Magic'].MagicalVit = set_combine(sets.midcast['Blue Magic'].Magical,
        {ring1="Spiral Ring"})

    sets.midcast['Blue Magic'].MagicalDex = set_combine(sets.midcast['Blue Magic'].Magical)

    sets.midcast['Blue Magic'].MagicAccuracy = {ammo="Pemphredo Tathlum",
        head="Malignance Chapeau",
		neck="Mirage Stole +2",ear1="Digni. Earring",ear2="Enchntr. Earring +1",
        body="Malignance Tabard",
		hands="Malignance Gloves",
		ring1={name="Stikini Ring +1",priority=1},ring2={name="Stikini Ring +1",priority=2},
        back="Cornflower Cape",legs="Malignance Tights",feet="Jhakri Pigaches +2"}
	
	sets.midcast['Diffusion Ray'] = {ammo="Pemphredo Tathlum",
        head="Jhakri Coronal +2",
		neck="Sanctity Necklace",ear1="Novio Earring",ear2="Friomisi Earring",
        body="Amalric Doublet +1",hands="Amalric Gages +1",ring1={name="Shiva Ring +1",priority=1},ring2={name="Shiva Ring +1",priority=2},
        back="Cornflower Cape",waist="Orpheus's Sash",legs="Amalric Slops +1",feet="Amalric Nails +1"}
		
	sets.midcast['Blinding Fulgor'] = {ammo="Pemphredo Tathlum",
        head="Jhakri Coronal +2",
		neck="Sanctity Necklace",ear1="Novio Earring",ear2="Friomisi Earring",
        body="Amalric Doublet +1",hands="Amalric Gages +1",ring1={name="Shiva Ring +1",priority=1},ring2={name="Shiva Ring +1",priority=2},
        back="Cornflower Cape",waist="Orpheus's Sash",legs="Amalric Slops +1",feet="Amalric Nails +1"}
		
	sets.midcast['Entomb'] = {ammo="Pemphredo Tathlum",
        head="Jhakri Coronal +2",
		neck="Mirage Stole +2",ear1="Novio Earring",ear2="Friomisi Earring",
        body="Jhakri Robe +2",hands="Amalric Gages +1",ring1={name="Shiva Ring +1",priority=1},ring2={name="Shiva Ring +1",priority=2},
        back="Cornflower Cape",waist="Orpheus's Sash",legs="Amalric Slops +1",feet="Amalric Nails +1"}
		
	sets.midcast['Magic Hammer'] = {ammo="Pemphredo Tathlum",
        head="Mirage Stole +2",
		neck="Sanctity Necklace",ear1="Novio Earring",ear2="Friomisi Earring",
        body="Jhakri Robe +2",hands="Amalric Gages +1",ring1={name="Shiva Ring +1",priority=1},ring2={name="Shiva Ring +1",priority=2},
        back="Cornflower Cape",waist=gear.ElementalObi,legs="Amalric Slops +1",feet="Amalric Nails +1"}
		
	sets.midcast['Tenebral Crush'] = {ammo="Pemphredo Tathlum",
        head="Pixie Hairpin +1",
		neck="Sanctity Necklace",ear1="Novio Earring",ear2="Friomisi Earring",
        body="Amalric Doublet +1",hands="Amalric Gages +1",ring1="Archon Ring",ring2="Shiva Ring +1",
        back="Cornflower Cape",waist="Orpheus's Sash",legs="Amalric Slops +1",feet="Amalric Nails +1"}
		
	sets.midcast['Blank Gaze'] = {ammo="Pemphredo Tathlum",
        head="Malignance Chapeau",
		neck="Mirage Stole +2",ear1="Digni. Earring",ear2="Enchntr. Earring +1",
        body="Malignance Tabard",
		hands="Malignance Gloves",
		ring1={name="Stikini Ring +1",priority=1},ring2={name="Stikini Ring +1",priority=2},
        back="Cornflower Cape",waist="Luminary Sash",
		legs="Malignance Tights",feet="Jhakri Pigaches +2"}
		
	sets.midcast['Subduction'] = {ammo="Pemphredo Tathlum",
        head="Jhakri Coronal +2",
		neck="Sanctity Necklace",ear1="Novio Earring",ear2="Friomisi Earring",
        body="Amalric Doublet +1",hands="Amalric Gages +1",ring1={name="Shiva Ring +1",priority=1},ring2={name="Shiva Ring +1",priority=2},
        back="Cornflower Cape",waist="Orpheus's Sash",legs="Amalric Slops +1",feet="Amalric Nails +1"}
		
	sets.midcast['Sheep Song'] = {ammo="Pemphredo Tathlum",
        head="Malignance Chapeau",
		neck="Mirage Stole +2",ear1="Digni. Earring",ear2="Enchntr. Earring +1",
        body="Malignance Tabard",
		hands="Malignance Gloves",
		ring1={name="Stikini Ring +1",priority=1},ring2={name="Stikini Ring +1",priority=2},
        back="Cornflower Cape",waist="Luminary Sash",
		legs="Malignance Tights",feet="Jhakri Pigaches +2"}   
		
	sets.midcast['Glutinous Dart'] = {ammo="Pemphredo Tathlum",
        head="Malignance Chapeau",
		neck="Mirage Stole +2",ear1="Digni. Earring",ear2="Telos Earring",
        body="Malignance Tabard",
		hands="Malignance Gloves",
		ring1={name="Stikini Ring +1",priority=1},ring2={name="Stikini Ring +1",priority=2},
        back="Cornflower Cape",waist="Chaac Belt",
		legs="Malignance Tights",feet="Jhakri Pigaches +2"} 
		
	sets.midcast['Dream Flower'] = {ammo="Pemphredo Tathlum",
        head="Malignance Chapeau",
		neck="Mirage Stole +2",ear1="Digni. Earring",ear2="Enchntr. Earring +1",
        body="Malignance Tabard",
		hands="Malignance Gloves",
		ring1={name="Stikini Ring +1",priority=1},ring2={name="Stikini Ring +1",priority=2},
        back="Cornflower Cape",waist="Luminary Sash",
		legs="Malignance Tights",feet="Jhakri Pigaches +2"}
		
	sets.midcast['Silent Storm'] = {ammo="Pemphredo Tathlum",
        head="Malignance Chapeau",
		neck="Mirage Stole +2",ear1="Digni. Earring",ear2="Enchntr. Earring +1",
        body="Malignance Tabard",
		hands="Malignance Gloves",
		ring1={name="Stikini Ring +1",priority=1},ring2={name="Stikini Ring +1",priority=2},
        back="Cornflower Cape",waist="Luminary Sash",
		legs="Malignance Tights",feet="Jhakri Pigaches +2"}
		
	sets.midcast['Mighty Guard'] = {ammo="Mavi Tathlum",
        head="Malignance Chapeau",
		neck="Incanter's Torque",ear1="Digni. Earring",ear2="Enchntr. Earring +1",
        body="Malignance Tabard",
		hands="Malignance Gloves",
		ring1={name="Stikini Ring +1",priority=1},ring2={name="Stikini Ring +1",priority=2},
        back="Cornflower Cape",legs="Malignance Tights",feet="Luhlaza Charuqs"}
		
	sets.midcast['Erratic Flutter'] = {ammo="Staunch Tathlum +1",
        head="Malignance Chapeau",
		neck="Loricate Torque +1",ear1="Ethereal Earring",ear2="Genmei Earring",
        body="Malignance Tabard",
		hands="Malignance Gloves",
		ring1="Patricius Ring",ring2="Defending Ring",
        back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dual Wield"+10','Phys. dmg. taken-10%',}},waist="Flume Belt +1",
		legs="Malignance Tights",
		feet="Luhlaza Charuqs"}
		
    -- Breath Spells --
    
    sets.midcast['Blue Magic'].Breath = {ammo="Mavi Tathlum",
        head={ name="Adhemar Bonnet +1", augments={'DEX+12','AGI+12','Accuracy+20',}},neck="Sanctity Necklace",ear1="Digni. Earring",ear2="Enchntr. Earring +1",
        body="Adhemar Jacket +1",
		hands={ name="Rawhide Gloves", augments={'HP+50','Accuracy+15','Evasion+20',}},
		ring1="K'ayres Ring",ring2="Beeline Ring",back="Cornflower Cape",
		legs="Samnuha Tights",
		feet="Jhakri Pigaches +2"}

    -- Other Types --
    
    sets.midcast['Blue Magic'].Stun = {ammo="Pemphredo Tathlum",
        head="Malignance Chapeau",
		neck="Mirage Stole +2",ear1="Digni. Earring",ear2="Enchntr. Earring +1",
        body="Malignance Tabard",
		hands="Malignance Gloves",
		ring1={name="Stikini Ring +1",priority=1},ring2={name="Stikini Ring +1",priority=2},
        back="Cornflower Cape",waist="Luminary Sash",
		legs="Malignance Tights",feet="Jhakri Pigaches +2"}  
        
    sets.midcast['White Wind'] = {head={ name="Adhemar Bonnet +1", augments={'DEX+12','AGI+12','Accuracy+20',}},neck="Sanctity Necklace",ear1="Dignitary's Earring",ear2="Mendi. Earring",
        body="Chelona Blazer",neck="Incanter's Torque",
		hands="Telchine Gloves",
		ring1="K'ayres Ring",ring2="Beeline Ring",back="Tempered Cape +1",
		legs="Hashishin Tayt +1",
		feet="Medium's Sabots"}

		
    sets.midcast['Blue Magic'].Healing = {ammo="Mavi Tathlum",
        head="Mirage Keffiyeh +2",neck="Incanter's Torque",
		ear1="Dignitary's Earring",ear2="Mendi. Earring",
        body="Chelona Blazer",hands="Telchine Gloves",ring1={name="Stikini Ring +1",priority=1},ring2={name="Stikini Ring +1",priority=2},
        back="Tempered Cape +1",legs="Hashishin Tayt +1",feet="Medium's Sabots"}

    sets.midcast['Blue Magic'].SkillBasedBuff = {ammo="Mavi Tathlum",
        head="Mirage Keffiyeh +2",neck="Incanter's Torque",
        body="Assim. Jubbah +3",hands={ name="Rawhide Gloves", augments={'HP+50','Accuracy+15','Evasion+20',}},
		ring1={name="Stikini Ring +1",priority=1},ring2={name="Stikini Ring +1",priority=2},
        back="Cornflower Cape",legs="Hashishin Tayt +1",feet="Luhlaza Charuqs"}

    sets.midcast['Blue Magic'].Buff = {ammo="Staunch Tathlum +1",
        head="Aya. Zucchetto +2",
		neck="Loricate Torque +1",ear1="Ethereal Earring",ear2="Genmei Earring",
        body="Ayanmo Corazza +2",
		hands="Amalric Gages +1",
		ring1="Patricius Ring",ring2="Defending Ring",
        back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dual Wield"+10','Phys. dmg. taken-10%',}},waist="Flume Belt +1",
		legs="Carmine Cuisses +1",
		feet="Luhlaza Charuqs"}
	
	sets.midcast['Blue Magic'].Unbridled = {feet="Luhlaza Charuqs"}
	
    
    sets.midcast.Protect = {ring1="Sheltered Ring"}
    sets.midcast.Protectra = {ring1="Sheltered Ring"}
    sets.midcast.Shell = {ring1="Sheltered Ring"}
    sets.midcast.Shellra = {ring1="Sheltered Ring"}
	sets.midcast['Dia'] = {ammo="Pemphredo Tathlum",
        head="Jhakri Coronal +2",neck="Sanctity Necklace",ear1="Novio Earring",ear2="Friomisi Earring",
        body="Amalric Doublet +1",hands="Amalric Gages +1",ring1={name="Shiva Ring +1",priority=1},ring2={name="Shiva Ring +1",priority=2},
        back="Cornflower Cape",waist="Orpheus's Sash",legs="Amalric Slops +1",feet="Amalric Nails +1"}
    sets.midcast['Dia II'] = {ammo="Pemphredo Tathlum",
        head="Jhakri Coronal +2",neck="Sanctity Necklace",ear1="Novio Earring",ear2="Friomisi Earring",
        body="Amalric Doublet +1",hands="Amalric Gages +1",
		ring1={name="Shiva Ring +1",priority=1},ring2={name="Shiva Ring +1",priority=2},
        back="Cornflower Cape",waist="Orpheus's Sash",legs="Amalric Slops +1",feet="Amalric Nails +1"}
		
	

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

    -- Gear for learning spells: +skill and AF hands.
    sets.Learning = {ammo="Mavi Tathlum",
		head="Mirage Keffiyeh +2",neck="Incanter's Torque",
		body="Assim. Jubbah +3",hands="Assimilator's Bazubands +1",
		ring1={name="Stikini Ring +1",priority=1},ring2={name="Stikini Ring +1",priority=2},
		back="Cornflower Cape",legs="Hashishin Tayt +1",feet="Luhlaza Charuqs"}
        --head="Mirage Keffiyeh +2",  
        --body="Assim. Jubbah +3",hands="Assimilator's Bazubands +1",
        --back="Cornflower Cape",legs="Mavi Tayt +2",feet="Luhlaza Charuqs"

    -- Resting sets
    sets.resting = {ammo="Staunch Tathlum +1",
        head="Rawhide Mask",neck="Loricate Torque +1",ear1="Ethereal Earring",ear2="Brachyura Earring",
        body="Jhakri Robe +2",
		hands={ name="Herculean Gloves", augments={'Mag. Acc.+12','Rng.Acc.+21','"Refresh"+1','Accuracy+3 Attack+3','Mag. Acc.+7 "Mag.Atk.Bns."+7',}},
		ring1="Patricius Ring",ring2="Defending Ring",
        back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dual Wield"+10','Phys. dmg. taken-10%',}},
		waist="Shinjutsu-no-obi",
		legs="Lengo Pants",
		feet="Ahosi Leggings"}
    
    -- Idle sets
    sets.idle = {ammo="Staunch Tathlum +1",
        head="Rawhide Mask",neck="Loricate Torque +1",ear1="Ethereal Earring",ear2="Brachyura Earring",
        body="Jhakri Robe +2",
		hands={ name="Herculean Gloves", augments={'Mag. Acc.+12','Rng.Acc.+21','"Refresh"+1','Accuracy+3 Attack+3','Mag. Acc.+7 "Mag.Atk.Bns."+7',}},
		ring1="Karieyh Ring",ring2="Defending Ring",
        back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dual Wield"+10','Phys. dmg. taken-10%',}},
		waist="Flume Belt +1",
		legs="Lengo Pants",
		feet="Ahosi Leggings"}

    sets.idle.Town = sets.precast.WS["Expiacion"]

    sets.idle.Learning = set_combine(sets.idle, sets.Learning)

    
    -- Defense sets
    sets.defense.PDT = {ammo="Staunch Tathlum +1",
        head="Malignance Chapeau",
		neck="Mirage Stole +2",ear1="Suppanomimi",ear2="Cessance Earring",
        body="Malignance Tabard",
		hands="Malignance Gloves",
		ring1="Patricius Ring",ring2="Defending Ring",
        back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dual Wield"+10','Phys. dmg. taken-10%',}},
		waist="Flume Belt +1",
		legs="Malignance Tights",
		feet="Ahosi Leggings"}

    sets.defense.MDT = set_combine(sets.defense.PDT, {
        head="Malignance Chapeau",
		neck="Warder's Charm +1",ear1="Ethereal Earring",ear2="Mujin Stud",
        body="Malignance Tabard",
		ring1="Shadow Ring",
		legs="Malignance Tights",feet="Amalric Nails +1"})

    sets.Kiting = {legs="Carmine Cuisses +1"}

    -- 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="Ginsen",
        head={ name="Adhemar Bonnet +1", augments={'DEX+12','AGI+12','Accuracy+20',}},neck="Mirage Stole +2",ear1="Suppanomimi",ear2="Cessance Earring",
        body="Adhemar Jacket +1",
		hands={ name="Adhemar Wrist. +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
		ring1="Epona's Ring",ring2="Chirich Ring +1",
		back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dual Wield"+10','Phys. dmg. taken-10%',}},waist="Reiki Yotai",
		legs="Samnuha Tights",
		feet={ name="Herculean Boots", augments={'Accuracy+17 Attack+17','"Triple Atk."+4','STR+9','Accuracy+1','Attack+14',}}}
	
	sets.engaged.SomeAcc = {ammo="Falcon Eye",
        head="Malignance Chapeau",neck="Mirage Stole +2",ear1="Suppanomimi",ear2="Cessance Earring",
        body="Adhemar Jacket +1",
		hands={ name="Adhemar Wrist. +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
		ring1="Epona's Ring",ring2="Chirich Ring +1",
		back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dual Wield"+10','Phys. dmg. taken-10%',}},waist="Reiki Yotai",
		legs="Samnuha Tights",
		feet={ name="Herculean Boots", augments={'Accuracy+17 Attack+17','"Triple Atk."+4','STR+9','Accuracy+1','Attack+14',}}}
		
    sets.engaged.Acc = {ammo="Falcon Eye",
        head="Malignance Chapeau",
		neck="Mirage Stole +2",ear1="Suppanomimi",ear2="Telos Earring",
        body="Adhemar Jacket +1",
		hands={ name="Adhemar Wrist. +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
		ring1={name="Chirich Ring +1",priority=1},ring2={name="Chirich Ring +1",priority=2},
		back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dual Wield"+10','Phys. dmg. taken-10%',}},waist="Reiki Yotai",
		legs="Carmine Cuisses +1",
		feet={ name="Herculean Boots", augments={'Accuracy+17 Attack+17','"Triple Atk."+4','STR+9','Accuracy+1','Attack+14',}}}
		
	sets.engaged.Hybrid = {ammo="Ginsen",
        head="Malignance Chapeau",neck="Mirage Stole +2",ear1="Suppanomimi",ear2="Cessance Earring",
        body="Malignance Tabard",
		hands="Malignance Gloves",
		ring1="Epona's Ring",ring2="Defending Ring",
		back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dual Wield"+10','Phys. dmg. taken-10%',}},waist="Reiki Yotai",
		legs="Malignance Tights",
		feet={ name="Herculean Boots", augments={'Accuracy+17 Attack+17','"Triple Atk."+4','STR+9','Accuracy+1','Attack+14',}}}
		
-- Dual Wield Adjustments --

	sets.engaged.MG = set_combine(sets.engaged, {
		ear1="Suppanomimi",ear2="Cessance Earring",
		waist="Windbuffet Belt +1",
		back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}})
	
	sets.engaged.SomeAcc.MG = set_combine(sets.engaged.SomeAcc, {
		ear1="Suppanomimi",ear2="Cessance Earring",
		waist="Windbuffet Belt +1",
		back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}})
	
	sets.engaged.Acc.MG = set_combine(sets.engaged.Acc, {
		ear1="Suppanomimi",ear2="Telos Earring",
		back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}})
	
	sets.engaged.Hybrid.MG = set_combine(sets.engaged.Hybrid, {
		ear1="Suppanomimi",ear2="Cessance Earring",
		waist="Windbuffet Belt +1",
		back={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}}})
	
-- Side Sets for letting Organizer grab my weapons --

	sets.weapons = {main="Colada",sub="Nibiru Blade"}
	sets.weapons2 = {main="Tanmogayi +1",sub="Xiutleato"}
	sets.weapons3 = {main="Nibiru Cudgel",sub="Nibiru Cudgel"}
	sets.weapons4 = {main="Iris",waist = "Orpheus's Sash"}

    sets.self_healing = {ring1="Kunaji Ring",ring2="Asklepian Ring"}
	sets.buff.Doom = {ring1="Purity Ring", ring2="Eshmun's Ring",neck="Nicander's Necklace"}
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.

-- Run after the default midcast() is done.
-- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
function job_precast(spell, action, spellMap, eventArgs)
    if spellMap == 'Magical' or spellMap == 'MagicalDex' then
        gear.default.obi_waist = "Orpheus's Sash"
	elseif spell == "Sanguine Blade" then
		gear.default.obi_waist = "Sanctity Necklace"
	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_state_change(field, new_value, old_value)
        if field == 'HybridDefenseMode' then
                classes.CustomDefenseGroups:clear()
                classes.CustomDefenseGroups:append(new_value)
        end
end
 
function job_buff_change(buff, gain)
	if state.Buff[buff] ~= nil then
        if not midaction() then
            handle_equipping_gear(player.status)
        end
    end

	if buff == "Mighty Guard" or "March" then
        classes.CustomMeleeGroups:clear()
        
        if (buff == "Mighty Guard" and gain) or buffactive['mighty guard'] then
            classes.CustomMeleeGroups:append('MG')
		end
		if (buff == "March" and gain) or buffactive['March'] then
            classes.CustomMeleeGroups:append('MG')
        end
		if (buffid == 580 and gain) or buffactive[580] then
            classes.CustomMeleeGroups:append('MG')
        end
		if buff == "Mighty Guard" or "March" then
			handle_equipping_gear(player.status)
		end
	end
    if buff == "doom" then
        if gain then           
			equip(sets.buff.Doom)
            send_command('@input /p Doomed, please Cursna ◆_◆;')
            disable('ring1','ring2')
        elseif not gain and not player.status == "Dead" and not player.status == "Engaged Dead" then
            enable('ring1','ring2')
            send_command('input /p Doom Cleared')
            handle_equipping_gear(player.status)
        else
            enable('ring1','ring2')
            send_command('input /p Doom Cleared ^_^;')
        end
    end
end




function update_melee_groups()
    classes.CustomMeleeGroups:clear()
    
    if buffactive['Mighty Guard'] then
        classes.CustomMeleeGroups:append('MG')
    end
	if buffactive['March'] then
        classes.CustomMeleeGroups:append('MG')
    end
	if (buffid == 580 and gain) or buffactive[580] then
            classes.CustomMeleeGroups:append('MG')
    end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------

-- Custom spell mapping.
-- Return custom spellMap value that can override the default spell mapping.
-- Don't return anything to allow default spell mapping to be used.
function job_get_spell_map(spell, default_spell_map)
    if spell.skill == 'Blue Magic' then
        for category,spell_list in pairs(blue_magic_maps) do
            if spell_list:contains(spell.english) then
                return category
            end
        end
    end
end

-- Modify the default idle set after it was constructed.

-- Called by the 'update' self-command, for common needs.
-- Set eventArgs.handled to true if we don't want automatic equipping of gear.


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


-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
    -- Default macro set/book
    if player.sub_job == 'WAR' then
        set_macro_page(1, 8)
	elseif player.sub_job == 'SAM' then
        set_macro_page(2, 8)
	elseif player.sub_job == 'NIN' then
        set_macro_page(3, 8)
	elseif player.sub_job == 'RUN' then
        set_macro_page(4, 8)
    else
        set_macro_page(1, 8)
    end
end


This is Mote's coding with very very little changed/added to it at all; I have a rule for Certain equips under certain buffs.. Some keybinds.. Nothing changed outside of that and updating the main gearsets.

Is there anything in there that would be causing this? or is this something specific to BLU that just.. Happens???
 Bismarck.Xurion
Offline
サーバ: Bismarck
Game: FFXI
user: Xurion
Posts: 694
By Bismarck.Xurion 2020-02-28 18:08:44  
I'm not aware of any ability for Gearswap to do what you say. Like many others, your Gearswap file sets the default macro book depending on your sub job.
 Valefor.Yandaime
Offline
サーバ: Valefor
Game: FFXI
user: Yandaime
Posts: 782
By Valefor.Yandaime 2020-02-28 20:15:59  
Well damn... it’s annoying as all hell lol.

I’ll try removing or simplifying the default macro book. Maybe it’s something getting weird with that.

It’s most definitely happening though and as far as I can tell, only with BLU
 Sylph.Subadai
Offline
サーバ: Sylph
Game: FFXI
user: Subadai
Posts: 184
By Sylph.Subadai 2020-02-29 00:24:39  
At the top of the lua you're using send_command() to set your macro book/set then at the bottom you're doing it again with select_default_macro_book(). Try removing one (I'd get rid of send_command personally) and see if that helps.
 Valefor.Yandaime
Offline
サーバ: Valefor
Game: FFXI
user: Yandaime
Posts: 782
By Valefor.Yandaime 2020-02-29 03:49:05  
Ahh I see that, thanks. Yeah I’ll change that soon as I get home and get back to you guys.
First Page 2 3 ... 156 157 158 ... 183 184 185
Log in to post.