|  | 
    Gearswap Support Thread
 
    
        
        
        
            
                
                    
                    
                    
                                                            
                                                    
                                                                            
                                Server: Asura Game: FFXI Posts: 363 
                
			
			By Asura.Vafruvant 2015-08-30 01:29:55			
			
						
                     
                 Asura.Omnijuggernaut said: »I have been trying to get my gearswap to use certain sets when I enhance myself and a different set when enhancing party.  
I started checking with showswaps to see if it was set right but it seems that my direct spell is overwriting my self cast. CureSelf works changing gear but i can't get spells like refresh to put telchine body on for the duration. 
 
No laughing at my gear, this is a new account, been trying to catch up on gear. 
 
Furthermore I know I suck at gearswap, so if you can help me clean this up if at all possible that would be great, I know I have a lot of lines that probably aren't needed.
 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')
end
-- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
function job_setup()
    state.Buff.Saboteur = buffactive.saboteur or false
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent.  Can override this function in a sidecar file.
function user_setup()
    state.OffenseMode:options('None', 'Normal')
    state.HybridMode:options('Normal', 'PhysicalDef', 'MagicalDef')
    state.CastingMode:options('Normal', 'Resistant')
    state.IdleMode:options('Normal', 'PDT', 'MDT')
    gear.default.obi_waist = "Sekhmet Corset"
    
    select_default_macro_book()
end
-- Define sets and vars used by this job file.
function init_gear_sets()
    --------------------------------------
	-- Start defining the sets
	--------------------------------------
	
	-- Precast Sets
	
	-- Precast sets to enhance JAs
	sets.precast.JA['Chainspell'] = {body="Vitivation Tabard +1"}
	
	-- Waltz set (chr and vit)
	sets.precast.Waltz = {
		head="Hagondes hat",
		body="Gendewitha Bliaut",hands="Helios Gloves",
		back="Refraction Cape",legs="Orvail Pants +1",feet="Uk'uxkaj boots"}
		
	-- Don't need any special gear for Healing Waltz.
	sets.precast.Waltz['Healing Waltz'] = {}
	-- Fast cast sets for spells
	
	-- 80% Fast Cast (including trait) for all spells, plus 5% quick cast
	-- No other FC sets necessary.
	sets.precast.FC = {main="Marin staff +1",sub="Mephitis grip",ammo="Impatiens",
		head="Atrophy chapeau +1",neck="Orunmila's torque",ear1="Estoqueur's earring",ear2="Gwati earring",
		body="Vitivation Tabard +1",hands="Gendewitha gages +1",ring1="Perception Ring",ring2="Sangoma Ring",
		back="Ogapepo cape",waist="Witful belt",legs="Artsieq hose",feet="Helios boots"}
		
	sets.precast.FC.Impact = set_combine(sets.precast.FC, {head=empty,body="Twilight Cloak"})
    
	
	-- Midcast Sets
		
	sets.midcast.Cure = {main="Tamaxchi",sub="Sors shield",ammo="Esper Stone +1",
		head="Gendewitha Caubeen",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
		body="Vitivation tabard +1",hands="Lethargy gantherots +1",ring1="Ephedra Ring",ring2="Haoma's Ring",
		back="Vates cape +1",waist="Ovate rope",legs="Atrophy Tights +1",feet="Vanya clogs"}
		
	sets.midcast.Curaga = sets.midcast.Cure
	sets.midcast.CureSelf = {ring1="Kunaji Ring",ring2="Asklepian Ring",hands="Buremte Gloves"}
	sets.midcast['Enhancing Magic'] = {main="Pukulatmuj",sub="Secespita",
		head="Telchine cap",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Atrophy gloves +1",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast.Enwater = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Hollow earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
		
	sets.midcast.Enthunder = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Hollow earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
		
	sets.midcast.Enstone = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Hollow earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
		
	sets.midcast.Enblizzard = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Hollow earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
		
	sets.midcast.Enfire = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Hollow earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
		
	sets.midcast.Enaero = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Hollow earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast['Gain-Str'] = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast['Gain-Dex'] = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
		
	sets.midcast['Gain-Vit'] = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast['Gain-Agi'] = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast['Gain-Int'] = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast['Gain-Mnd'] = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast['Gain-Chr'] = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast.Protect = {main="Pukulatmuj",sub="Beatific shield",
		head="Lethargy Chappel",neck="Colossus's Torque",
		body="Lethargy sayon +1",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Lethargy fuseau +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast.ProtectSelf = {main="Pukulatmuj",sub="Beatific shield",
		head="Telchine cap",neck="Colossus's Torque",
		body="Telchine chasuble",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Telchine braconi",feet="Lethargy Houseaux +1"}
	
	sets.midcast.Shell = {main="Pukulatmuj",sub="Beatific shield",
		head="Lethargy Chappel",neck="Colossus's Torque",
		body="Lethargy sayon +1",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Lethargy fuseau +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast.ShellSelf = {main="Pukulatmuj",sub="Beatific shield",
		head="Telchine cap",neck="Colossus's Torque",
		body="Telchine chasuble",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Telchine braconi",feet="Lethargy Houseaux +1"}
	
	sets.midcast.Haste = {main="Pukulatmuj",sub="Beatific shield",
		head="Lethargy Chappel",neck="Colossus's Torque",
		body="Lethargy sayon +1",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Lethargy fuseau +1",feet="Lethargy Houseaux +1"}
	sets.midcast.HasteSelf = {main="Pukulatmuj",sub="Beatific shield",
		head="Telchine cap",neck="Colossus's Torque",
		body="Telchine chasuble",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Telchine braconi",feet="Lethargy Houseaux +1"}	
		
	sets.midcast.Refresh = {main="Pukulatmuj",sub="Beatific shield",
		head="Lethargy Chappel",neck="Colossus's Torque",
		body="Lethargy sayon +1",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Lethargy fuseau +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast.RefreshSelf = {main="Pukulatmuj",sub="Beatific shield",
		head="Telchine cap",neck="Colossus's Torque",
		body="Telchine chasuble",hands="Atrophy gloves +1",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Lethargy fuseau +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast.Phalanx = {main="Egeking",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",ring1="Perception ring",
		back="Estoqueur's Cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
			
	sets.midcast.Temper = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",ring1="Perception ring",
		back="Estoqueur's cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
				
	sets.midcast.Regen = {main="Pukulatmuj",sub="Beatific shield",
		head="Lethargy Chappel",neck="Colossus's Torque",
		body="Telchine chasuble",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Lethargy fuseau +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast.RegenSelf = {main="Pukulatmuj",sub="Beatific shield",
		head="Telchine cap",neck="Colossus's Torque",
		body="Telchine chasuble",hands="Atrophy gloves +1",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Telchine braconi",feet="Lethargy Houseaux +1"}
	
	sets.midcast.Cursna = {neck="Malison medallion",back="Orentania's cape +1",ring1="Haoma's ring",
		ring2="ephedra ring",feet="Vanya clogs"}
	sets.midcast.Stoneskin = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Stone gorget",ear1="Andoaa earring",ear2="Earthcry earring",
		body="Vitivation tabard +1",hands="Stone mufflers",ring1="Perception ring",
		back="Estoqueur's cape",waist="Siegel Sash",legs="Haven hose",feet="Lethargy Houseaux +1"}
	
	sets.midcast['Enfeebling Magic'] = {main="Marin staff +1",sub="Mephitis grip",range="Aureole",
		head="Vitivation Chapeau +1",neck="Weike torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
		body="Lethargy sayon +1",hands="Hagondes cuffs",ring1="Perception Ring",ring2="Sangoma Ring",
		back="Ogapepo Cape",waist="Ovate rope",legs="Artsieq hose",feet="Artsieq boots"}
		
	sets.midcast.Distract = {main="Marin staff +1",sub="Mephitis grip",range="Aureole",
		head="Vitivation Chapeau +1",neck="Weike torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
		body="Lethargy sayon +1",hands="Hagondes cuffs",ring1="Perception Ring",ring2="Sangoma Ring",
		back="Ogapepo Cape",waist="Ovate rope",legs="Artsieq hose",feet="Artsieq boots"}
		
	sets.midcast.Frazzle = {main="Marin staff +1",sub="Mephitis grip",range="Aureole",
		head="Vitivation Chapeau +1",neck="Weike torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
		body="Lethargy sayon +1",hands="Hagondes cuffs",ring1="Perception Ring",ring2="Sangoma Ring",
		back="Ogapepo Cape",waist="Ovate rope",legs="Artsieq hose",feet="Artsieq boots"}
	sets.midcast['Dia III'] = set_combine(sets.midcast['Enfeebling Magic'], {head="Vitivation Chapeau"})
	sets.midcast['Slow II'] = set_combine(sets.midcast['Enfeebling Magic'], {head="Vitivation Chapeau"})
	
	sets.midcast['Elemental Magic'] = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Memoria sachet",
		head="Helios band",neck="Eddy Necklace",ear1="Friomisi Earring",ear2="Sortiarius Earring",
		body="Hagondes coat",hands="Helios gloves",ring1="Fenrir Ring +1",ring2="Acumen Ring",
		back="Toro Cape",waist="Othila sash",legs="Hagondes pants",feet="Helios boots"}
		
	sets.midcast.Impact = set_combine(sets.midcast['Elemental Magic'], {head=empty,body="Twilight Cloak"})
	sets.midcast.Drain = {main="Lehbrailg +2",sub="Mephitis Grip",ranged="Aureole",
		head="Befouled crown",neck="Eddy Necklace",ear1="Estoqueur's earring",ear2="Psystorm Earring",
		body="Atrophy tabard",hands="Hagondes Cuffs",ring1="Perception Ring",ring2="Sangoma Ring",
		back="Ogapepo Cape",waist="Ovate rope",legs="Lethargy fuseau +1",feet="Helios boots"}
		
	sets.midcast.Aspir = {main="Lehbrailg +2",sub="Mephitis Grip",ranged="Aureole",
		head="Befouled crown",neck="Eddy Necklace",ear1="Estoqueur's earring",ear2="Psystorm Earring",
		body="Atrophy tabard",hands="Hagondes Cuffs",ring1="Perception Ring",ring2="Sangoma Ring",
		back="Ogapepo Cape",waist="Ovate rope",legs="Lethargy fuseau +1",feet="Helios boots"}
		
	sets.midcast['Stun'] = {main="Marin staff +1",sub="Mephitis grip",ammo="Impatiens",
		head="Atrophy chapeau +1",neck="Orunmila's torque",ear1="Estoqueur's earring",ear2="Gwati earring",
		body="Vitivation Tabard +1",hands="Gendewitha gages +1",ring1="Perception Ring",ring2="Sangoma Ring",
		back="Ogapepo cape",waist="Pya'ekue belt",legs="Artsieq hose",feet="Helios boots"}
	
	sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {ring1="Excelsis Ring", waist="Fucho-no-Obi"})
	sets.midcast.Aspir = sets.midcast.Drain
	-- Weaponskill sets
            -- Default set for any weaponskill that isn't any more specifically defined
            sets.precast.WS = {ammo="Paeapua",
					head="Taeon chapeau",neck="Fotia gorget",ear1="Bladeborn earring",ear2="Steelflash Earring",
					body="Taeon tabard",hands="Taeon Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
					back="Bleating Mantle",waist="Fotia belt",legs="Taeon tights",feet="Atrophy Boots +1"}
					
			sets.precast.WS['Sanguine Blade'] = set_combine(sets.precast.WS, {ammo="Memoria sachet",
					head="Helios band",neck="Eddy Necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
					body="Hagondes coat",hands="Helios gloves",ring1="Fenrir Ring +1",ring2="Acumen Ring",
					back="Toro Cape",waist="Othila sash",legs="Hagondes pants",feet="Helios boots"})
					
			sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {ammo="Oreiad's tathlum",
					head="Atrophy chapeau +1",neck="Tlamiztli collar",ear1="Lifestorm Earring",ear2="Bladeborn Earring",
					body="Vitivation tabard +1",hands="Atrophy gloves +1",ring1="Rajas Ring",ring2="Perception Ring",
					back="Buquwik Cape",waist="Prosilo belt +1",legs="Telchine braconi",feet="Artsieq boots"})		
					
			sets.precast.WS['Aeolian Edge'] = set_combine(sets.precast.WS, {ammo="Memoria sachet",
					head="Helios band",neck="Eddy Necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
					body="Hagondes coat",hands="Helios gloves",ring1="Fenrir Ring +1",ring2="Acumen Ring",
					back="Toro Cape",waist="Othila sash",legs="Hagondes pants",feet="Helios boots"})
					
			sets.precast.WS['Savage Blade'] = set_combine(sets.precast.WS, {ammo="Yetshila",
                    head="Atrophy Chapeau +1",neck="Fotia gorget",ear1="Brutal Earring",ear2="Moonshade Earring",
                    body="Taeon Tabard",hands="Lethargy Gantherotes",ring1="Rajas ring",ring2="Karieyh Ring",
                    back="Buquwik cape",waist="Fotia belt",legs="Lethargy fuseau +1",feet="Lethargy houseaux +1"})
					
			sets.precast.WS['Chant du Cygne'] = set_combine(sets.precast.WS, {ammo="Yetshila",
                    head="Taeon chapeau",neck="Shifting necklace",ear1="Brutal Earring",ear2="Moonshade Earring",
                    body="Taeon Tabard",hands="Taeon gloves",ring1="Rajas ring",ring2="Jupiter's Ring",
                    back="Kayapa cape",waist="Artful belt +1",legs="Taeon tights",feet="Taeon boots"})
					
			sets.precast.WS['Death Blossom'] = set_combine(sets.precast.WS, {ammo="Yetshila",
                    head="Atrophy Chapeau +1",neck="Fotia gorget",ear1="Brutal Earring",ear2="Moonshade Earring",
                    body="Taeon tabard",hands="Lethargy Gantherotes +1",ring1="Rajas ring",ring2="Karieyh Ring",
                    back="Buquwik cape",waist="Fotia belt",legs="Lethargy fuseau +1",feet="Lethargy houseaux +1"})
					
	-- Sets for special buff conditions on spells.
	
	sets.buff.Saboteur = {hands="Lethargy Gantherots +1"}
	
	-- Sets to return to when not performing an action.
	
	-- Resting sets
	sets.resting = {main="Bolelabunga",sub="Beatific shield",ammo="Impatiens",
		head="Vitivation Chapeau +1",neck="Wiglen Gorget",
		body="Atrophy Tabard",hands="Serpentes Cuffs",ring1="Paguroidea Ring",ring2="Sheltered Ring",
		back="Kumbira cape",waist="Witful Belt",back="Shadow Mantle",legs="Nares trews",feet="Serpentes Sabots"}
	
	-- Idle sets
	sets.idle = {main="Bolelabunga",sub="Beatific shield",ammo="Impatiens",
		head="Vitivation Chapeau +1",neck="Wiglen Gorget",ear1="Estoqueur's Earring",ear2="Loquacious Earring",
		body="Lethargy sayon +1",hands="Serpentes Cuffs",ring1="Paguroidea Ring",ring2="Sheltered Ring",
		back="Kumbira cape",waist="Flume Belt",legs="Nares trews",feet="Serpentes Sabots"}
	sets.idle.Town = {main="Bolelabunga",sub="Beatific shield",ammo="Impatiens",
		head="Vitivation Chapeau +1",neck="Wiglen Gorget",ear1="Estoqueur's Earring",ear2="Loquacious Earring",
		body="Lethargy sayon +1",hands="Serpentes Cuffs",ring1="Paguroidea Ring",ring2="Sheltered Ring",
		back="Kumbira cape",waist="Flume Belt",legs="Nares trews",feet="Serpentes Sabots"}
	
	sets.idle.Weak = {main="Bolelabunga",sub="Beatific shield",ammo="Impatiens",
		head="Vitivation Chapeau +1",neck="Wiglen Gorget",ear1="Estoqueur's Earring",ear2="Loquacious Earring",
		body="Lethargy sayon +1",hands="Serpentes Cuffs",ring1="Paguroidea Ring",ring2="Sheltered Ring",
		back="Kumbira cape",waist="Flume Belt",legs="Nares trews",feet="Serpentes Sabots"}
	
	-- Defense sets
	sets.defense.PDT = {main="Egeking",sub="Beatific shield",range="Phulax bow",
		head="Gendewitha caubeen",neck="Wiglen Gorget",ear1="Merman's earring",ear2="Merman's earring",
		body="Emet harness +1",hands="Buremte gloves",ring1="Paguroidea Ring",ring2="Yacuruna Ring",
		back="Umbra cape",waist="Pya'ekue belt",legs="Hagondes pants",feet="Gendewitha galoshes"}
	sets.defense.MDT = {main="Egeking",sub="Beatific shield",ammo="Memoria sachet",
		head="Gendewitha caubeen",neck="Twilight torque",ear1="Merman's earring",ear2="Merman's earring",
		body="Hagondes coat",hands="Buremte gloves",ring1="Paguroidea Ring",ring2="Yacuruna Ring",
		back="Umbra cape",waist="Pya'ekue belt",legs="Hagondes pants",feet="Gendewitha galoshes"}
	sets.Kiting = {legs="Crimson Cuisses"}
	sets.latent_refresh = {waist="Fucho-no-obi"}
	-- 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 = {main="Pukulatmuj",sub="Beatific shield",ammo="Paeapua",
		head="Taeon chapeau",neck="Asperity Necklace",ear1="Brutal earring",ear2="Suppanomimi",
		body="Taeon tabard",hands="Taeon Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
		back="Bleating Mantle",waist="windbuffet belt +1",legs="Taeon tights",feet="Taeon boots"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
-- 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)
    if spell.skill == 'Enfeebling Magic' and state.Buff.Saboteur then
        equip(sets.buff.Saboteur)
    elseif spell.skill == 'Enhancing Magic' then
        equip(sets.midcast.EnhancingDuration)
        if buffactive.composure and spell.target.type == 'PLAYER' then
            equip(sets.buff.ComposureOther)
        end
    elseif spellMap == 'Cure' and spell.target.type == 'SELF' then
        equip(sets.midcast.CureSelf)
    end
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
-- 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
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
    if player.mpp < 51 then
        idleSet = set_combine(idleSet, sets.latent_refresh)
    end
    
    return idleSet
end
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
    display_current_caster_state()
    eventArgs.handled = true
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 == 'DNC' then
        set_macro_page(2, 4)
    elseif player.sub_job == 'NIN' then
        set_macro_page(3, 4)
    elseif player.sub_job == 'THF' then
        set_macro_page(4, 4)
    else
        set_macro_page(1, 4)
    end
end
Use this version:
http://pastebin.com/iAMJBhag 
There was some redundancy that I believe I trimmed up without breaking anything. There wasn't a sets.midcast.EnhancingDuration set to actually get called, so I merged a lot of the spells into that set, added the ComposureOther set also, for the same reason. Everything should work as you requested now.                                             
                    [+]
                                              
            
            
                
			
			By nanohamaho 2015-08-30 09:51:41			
			
						
                     
                 returning player, using motes Geo lua file, i don't have all the elemental obis at the momemt, but for the life of me how the hell do I make that simple statement waist=gear.ElementalObi work?
 I was thinking maybe it calls from one of the mote files and I had to go in somewhere and type out all the obi names. That or maybe I needed to insert some kind of argument in the job file that did the whole weather thing... I'm probably missing something obvious here. I haven't done anything special to the base file from the kinematics github, so if someone could point me in the right direction I'd really appreciate it.
 
 tl;dr - where does gear.ElementalObi take its info from, and how/where do I have to change it if at all?
 
            
            
                
			
			By geigei 2015-08-30 11:18:36			
			
						
                     
                 Any way to have multiple preshot sets for rng based on which flurry is up? like no flurry-flurry1-flurry2                                     
            
                
                    
                    
                    
                                                            
                                                    
                                                                            
                                Server: Asura Game: FFXI Posts: 95 
                
			
			By Asura.Omnijuggernaut 2015-08-30 11:38:17			
			
						
                     
                 Asura.Omnijuggernaut said: »I have been trying to get my gearswap to use certain sets when I enhance myself and a different set when enhancing party.  
I started checking with showswaps to see if it was set right but it seems that my direct spell is overwriting my self cast. CureSelf works changing gear but i can't get spells like refresh to put telchine body on for the duration. 
 
No laughing at my gear, this is a new account, been trying to catch up on gear. 
 
Furthermore I know I suck at gearswap, so if you can help me clean this up if at all possible that would be great, I know I have a lot of lines that probably aren't needed.
 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')
end
-- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
function job_setup()
    state.Buff.Saboteur = buffactive.saboteur or false
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent.  Can override this function in a sidecar file.
function user_setup()
    state.OffenseMode:options('None', 'Normal')
    state.HybridMode:options('Normal', 'PhysicalDef', 'MagicalDef')
    state.CastingMode:options('Normal', 'Resistant')
    state.IdleMode:options('Normal', 'PDT', 'MDT')
    gear.default.obi_waist = "Sekhmet Corset"
    
    select_default_macro_book()
end
-- Define sets and vars used by this job file.
function init_gear_sets()
    --------------------------------------
	-- Start defining the sets
	--------------------------------------
	
	-- Precast Sets
	
	-- Precast sets to enhance JAs
	sets.precast.JA['Chainspell'] = {body="Vitivation Tabard +1"}
	
	-- Waltz set (chr and vit)
	sets.precast.Waltz = {
		head="Hagondes hat",
		body="Gendewitha Bliaut",hands="Helios Gloves",
		back="Refraction Cape",legs="Orvail Pants +1",feet="Uk'uxkaj boots"}
		
	-- Don't need any special gear for Healing Waltz.
	sets.precast.Waltz['Healing Waltz'] = {}
	-- Fast cast sets for spells
	
	-- 80% Fast Cast (including trait) for all spells, plus 5% quick cast
	-- No other FC sets necessary.
	sets.precast.FC = {main="Marin staff +1",sub="Mephitis grip",ammo="Impatiens",
		head="Atrophy chapeau +1",neck="Orunmila's torque",ear1="Estoqueur's earring",ear2="Gwati earring",
		body="Vitivation Tabard +1",hands="Gendewitha gages +1",ring1="Perception Ring",ring2="Sangoma Ring",
		back="Ogapepo cape",waist="Witful belt",legs="Artsieq hose",feet="Helios boots"}
		
	sets.precast.FC.Impact = set_combine(sets.precast.FC, {head=empty,body="Twilight Cloak"})
    
	
	-- Midcast Sets
		
	sets.midcast.Cure = {main="Tamaxchi",sub="Sors shield",ammo="Esper Stone +1",
		head="Gendewitha Caubeen",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
		body="Vitivation tabard +1",hands="Lethargy gantherots +1",ring1="Ephedra Ring",ring2="Haoma's Ring",
		back="Vates cape +1",waist="Ovate rope",legs="Atrophy Tights +1",feet="Vanya clogs"}
		
	sets.midcast.Curaga = sets.midcast.Cure
	sets.midcast.CureSelf = {ring1="Kunaji Ring",ring2="Asklepian Ring",hands="Buremte Gloves"}
	sets.midcast['Enhancing Magic'] = {main="Pukulatmuj",sub="Secespita",
		head="Telchine cap",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Atrophy gloves +1",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast.Enwater = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Hollow earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
		
	sets.midcast.Enthunder = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Hollow earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
		
	sets.midcast.Enstone = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Hollow earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
		
	sets.midcast.Enblizzard = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Hollow earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
		
	sets.midcast.Enfire = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Hollow earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
		
	sets.midcast.Enaero = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Hollow earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast['Gain-Str'] = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast['Gain-Dex'] = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
		
	sets.midcast['Gain-Vit'] = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast['Gain-Agi'] = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast['Gain-Int'] = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast['Gain-Mnd'] = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast['Gain-Chr'] = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast.Protect = {main="Pukulatmuj",sub="Beatific shield",
		head="Lethargy Chappel",neck="Colossus's Torque",
		body="Lethargy sayon +1",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Lethargy fuseau +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast.ProtectSelf = {main="Pukulatmuj",sub="Beatific shield",
		head="Telchine cap",neck="Colossus's Torque",
		body="Telchine chasuble",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Telchine braconi",feet="Lethargy Houseaux +1"}
	
	sets.midcast.Shell = {main="Pukulatmuj",sub="Beatific shield",
		head="Lethargy Chappel",neck="Colossus's Torque",
		body="Lethargy sayon +1",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Lethargy fuseau +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast.ShellSelf = {main="Pukulatmuj",sub="Beatific shield",
		head="Telchine cap",neck="Colossus's Torque",
		body="Telchine chasuble",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Telchine braconi",feet="Lethargy Houseaux +1"}
	
	sets.midcast.Haste = {main="Pukulatmuj",sub="Beatific shield",
		head="Lethargy Chappel",neck="Colossus's Torque",
		body="Lethargy sayon +1",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Lethargy fuseau +1",feet="Lethargy Houseaux +1"}
	sets.midcast.HasteSelf = {main="Pukulatmuj",sub="Beatific shield",
		head="Telchine cap",neck="Colossus's Torque",
		body="Telchine chasuble",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Telchine braconi",feet="Lethargy Houseaux +1"}	
		
	sets.midcast.Refresh = {main="Pukulatmuj",sub="Beatific shield",
		head="Lethargy Chappel",neck="Colossus's Torque",
		body="Lethargy sayon +1",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Lethargy fuseau +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast.RefreshSelf = {main="Pukulatmuj",sub="Beatific shield",
		head="Telchine cap",neck="Colossus's Torque",
		body="Telchine chasuble",hands="Atrophy gloves +1",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Lethargy fuseau +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast.Phalanx = {main="Egeking",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",ring1="Perception ring",
		back="Estoqueur's Cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
			
	sets.midcast.Temper = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",ring1="Perception ring",
		back="Estoqueur's cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
				
	sets.midcast.Regen = {main="Pukulatmuj",sub="Beatific shield",
		head="Lethargy Chappel",neck="Colossus's Torque",
		body="Telchine chasuble",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Lethargy fuseau +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast.RegenSelf = {main="Pukulatmuj",sub="Beatific shield",
		head="Telchine cap",neck="Colossus's Torque",
		body="Telchine chasuble",hands="Atrophy gloves +1",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Telchine braconi",feet="Lethargy Houseaux +1"}
	
	sets.midcast.Cursna = {neck="Malison medallion",back="Orentania's cape +1",ring1="Haoma's ring",
		ring2="ephedra ring",feet="Vanya clogs"}
	sets.midcast.Stoneskin = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Stone gorget",ear1="Andoaa earring",ear2="Earthcry earring",
		body="Vitivation tabard +1",hands="Stone mufflers",ring1="Perception ring",
		back="Estoqueur's cape",waist="Siegel Sash",legs="Haven hose",feet="Lethargy Houseaux +1"}
	
	sets.midcast['Enfeebling Magic'] = {main="Marin staff +1",sub="Mephitis grip",range="Aureole",
		head="Vitivation Chapeau +1",neck="Weike torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
		body="Lethargy sayon +1",hands="Hagondes cuffs",ring1="Perception Ring",ring2="Sangoma Ring",
		back="Ogapepo Cape",waist="Ovate rope",legs="Artsieq hose",feet="Artsieq boots"}
		
	sets.midcast.Distract = {main="Marin staff +1",sub="Mephitis grip",range="Aureole",
		head="Vitivation Chapeau +1",neck="Weike torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
		body="Lethargy sayon +1",hands="Hagondes cuffs",ring1="Perception Ring",ring2="Sangoma Ring",
		back="Ogapepo Cape",waist="Ovate rope",legs="Artsieq hose",feet="Artsieq boots"}
		
	sets.midcast.Frazzle = {main="Marin staff +1",sub="Mephitis grip",range="Aureole",
		head="Vitivation Chapeau +1",neck="Weike torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
		body="Lethargy sayon +1",hands="Hagondes cuffs",ring1="Perception Ring",ring2="Sangoma Ring",
		back="Ogapepo Cape",waist="Ovate rope",legs="Artsieq hose",feet="Artsieq boots"}
	sets.midcast['Dia III'] = set_combine(sets.midcast['Enfeebling Magic'], {head="Vitivation Chapeau"})
	sets.midcast['Slow II'] = set_combine(sets.midcast['Enfeebling Magic'], {head="Vitivation Chapeau"})
	
	sets.midcast['Elemental Magic'] = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Memoria sachet",
		head="Helios band",neck="Eddy Necklace",ear1="Friomisi Earring",ear2="Sortiarius Earring",
		body="Hagondes coat",hands="Helios gloves",ring1="Fenrir Ring +1",ring2="Acumen Ring",
		back="Toro Cape",waist="Othila sash",legs="Hagondes pants",feet="Helios boots"}
		
	sets.midcast.Impact = set_combine(sets.midcast['Elemental Magic'], {head=empty,body="Twilight Cloak"})
	sets.midcast.Drain = {main="Lehbrailg +2",sub="Mephitis Grip",ranged="Aureole",
		head="Befouled crown",neck="Eddy Necklace",ear1="Estoqueur's earring",ear2="Psystorm Earring",
		body="Atrophy tabard",hands="Hagondes Cuffs",ring1="Perception Ring",ring2="Sangoma Ring",
		back="Ogapepo Cape",waist="Ovate rope",legs="Lethargy fuseau +1",feet="Helios boots"}
		
	sets.midcast.Aspir = {main="Lehbrailg +2",sub="Mephitis Grip",ranged="Aureole",
		head="Befouled crown",neck="Eddy Necklace",ear1="Estoqueur's earring",ear2="Psystorm Earring",
		body="Atrophy tabard",hands="Hagondes Cuffs",ring1="Perception Ring",ring2="Sangoma Ring",
		back="Ogapepo Cape",waist="Ovate rope",legs="Lethargy fuseau +1",feet="Helios boots"}
		
	sets.midcast['Stun'] = {main="Marin staff +1",sub="Mephitis grip",ammo="Impatiens",
		head="Atrophy chapeau +1",neck="Orunmila's torque",ear1="Estoqueur's earring",ear2="Gwati earring",
		body="Vitivation Tabard +1",hands="Gendewitha gages +1",ring1="Perception Ring",ring2="Sangoma Ring",
		back="Ogapepo cape",waist="Pya'ekue belt",legs="Artsieq hose",feet="Helios boots"}
	
	sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {ring1="Excelsis Ring", waist="Fucho-no-Obi"})
	sets.midcast.Aspir = sets.midcast.Drain
	-- Weaponskill sets
            -- Default set for any weaponskill that isn't any more specifically defined
            sets.precast.WS = {ammo="Paeapua",
					head="Taeon chapeau",neck="Fotia gorget",ear1="Bladeborn earring",ear2="Steelflash Earring",
					body="Taeon tabard",hands="Taeon Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
					back="Bleating Mantle",waist="Fotia belt",legs="Taeon tights",feet="Atrophy Boots +1"}
					
			sets.precast.WS['Sanguine Blade'] = set_combine(sets.precast.WS, {ammo="Memoria sachet",
					head="Helios band",neck="Eddy Necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
					body="Hagondes coat",hands="Helios gloves",ring1="Fenrir Ring +1",ring2="Acumen Ring",
					back="Toro Cape",waist="Othila sash",legs="Hagondes pants",feet="Helios boots"})
					
			sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {ammo="Oreiad's tathlum",
					head="Atrophy chapeau +1",neck="Tlamiztli collar",ear1="Lifestorm Earring",ear2="Bladeborn Earring",
					body="Vitivation tabard +1",hands="Atrophy gloves +1",ring1="Rajas Ring",ring2="Perception Ring",
					back="Buquwik Cape",waist="Prosilo belt +1",legs="Telchine braconi",feet="Artsieq boots"})		
					
			sets.precast.WS['Aeolian Edge'] = set_combine(sets.precast.WS, {ammo="Memoria sachet",
					head="Helios band",neck="Eddy Necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
					body="Hagondes coat",hands="Helios gloves",ring1="Fenrir Ring +1",ring2="Acumen Ring",
					back="Toro Cape",waist="Othila sash",legs="Hagondes pants",feet="Helios boots"})
					
			sets.precast.WS['Savage Blade'] = set_combine(sets.precast.WS, {ammo="Yetshila",
                    head="Atrophy Chapeau +1",neck="Fotia gorget",ear1="Brutal Earring",ear2="Moonshade Earring",
                    body="Taeon Tabard",hands="Lethargy Gantherotes",ring1="Rajas ring",ring2="Karieyh Ring",
                    back="Buquwik cape",waist="Fotia belt",legs="Lethargy fuseau +1",feet="Lethargy houseaux +1"})
					
			sets.precast.WS['Chant du Cygne'] = set_combine(sets.precast.WS, {ammo="Yetshila",
                    head="Taeon chapeau",neck="Shifting necklace",ear1="Brutal Earring",ear2="Moonshade Earring",
                    body="Taeon Tabard",hands="Taeon gloves",ring1="Rajas ring",ring2="Jupiter's Ring",
                    back="Kayapa cape",waist="Artful belt +1",legs="Taeon tights",feet="Taeon boots"})
					
			sets.precast.WS['Death Blossom'] = set_combine(sets.precast.WS, {ammo="Yetshila",
                    head="Atrophy Chapeau +1",neck="Fotia gorget",ear1="Brutal Earring",ear2="Moonshade Earring",
                    body="Taeon tabard",hands="Lethargy Gantherotes +1",ring1="Rajas ring",ring2="Karieyh Ring",
                    back="Buquwik cape",waist="Fotia belt",legs="Lethargy fuseau +1",feet="Lethargy houseaux +1"})
					
	-- Sets for special buff conditions on spells.
	
	sets.buff.Saboteur = {hands="Lethargy Gantherots +1"}
	
	-- Sets to return to when not performing an action.
	
	-- Resting sets
	sets.resting = {main="Bolelabunga",sub="Beatific shield",ammo="Impatiens",
		head="Vitivation Chapeau +1",neck="Wiglen Gorget",
		body="Atrophy Tabard",hands="Serpentes Cuffs",ring1="Paguroidea Ring",ring2="Sheltered Ring",
		back="Kumbira cape",waist="Witful Belt",back="Shadow Mantle",legs="Nares trews",feet="Serpentes Sabots"}
	
	-- Idle sets
	sets.idle = {main="Bolelabunga",sub="Beatific shield",ammo="Impatiens",
		head="Vitivation Chapeau +1",neck="Wiglen Gorget",ear1="Estoqueur's Earring",ear2="Loquacious Earring",
		body="Lethargy sayon +1",hands="Serpentes Cuffs",ring1="Paguroidea Ring",ring2="Sheltered Ring",
		back="Kumbira cape",waist="Flume Belt",legs="Nares trews",feet="Serpentes Sabots"}
	sets.idle.Town = {main="Bolelabunga",sub="Beatific shield",ammo="Impatiens",
		head="Vitivation Chapeau +1",neck="Wiglen Gorget",ear1="Estoqueur's Earring",ear2="Loquacious Earring",
		body="Lethargy sayon +1",hands="Serpentes Cuffs",ring1="Paguroidea Ring",ring2="Sheltered Ring",
		back="Kumbira cape",waist="Flume Belt",legs="Nares trews",feet="Serpentes Sabots"}
	
	sets.idle.Weak = {main="Bolelabunga",sub="Beatific shield",ammo="Impatiens",
		head="Vitivation Chapeau +1",neck="Wiglen Gorget",ear1="Estoqueur's Earring",ear2="Loquacious Earring",
		body="Lethargy sayon +1",hands="Serpentes Cuffs",ring1="Paguroidea Ring",ring2="Sheltered Ring",
		back="Kumbira cape",waist="Flume Belt",legs="Nares trews",feet="Serpentes Sabots"}
	
	-- Defense sets
	sets.defense.PDT = {main="Egeking",sub="Beatific shield",range="Phulax bow",
		head="Gendewitha caubeen",neck="Wiglen Gorget",ear1="Merman's earring",ear2="Merman's earring",
		body="Emet harness +1",hands="Buremte gloves",ring1="Paguroidea Ring",ring2="Yacuruna Ring",
		back="Umbra cape",waist="Pya'ekue belt",legs="Hagondes pants",feet="Gendewitha galoshes"}
	sets.defense.MDT = {main="Egeking",sub="Beatific shield",ammo="Memoria sachet",
		head="Gendewitha caubeen",neck="Twilight torque",ear1="Merman's earring",ear2="Merman's earring",
		body="Hagondes coat",hands="Buremte gloves",ring1="Paguroidea Ring",ring2="Yacuruna Ring",
		back="Umbra cape",waist="Pya'ekue belt",legs="Hagondes pants",feet="Gendewitha galoshes"}
	sets.Kiting = {legs="Crimson Cuisses"}
	sets.latent_refresh = {waist="Fucho-no-obi"}
	-- 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 = {main="Pukulatmuj",sub="Beatific shield",ammo="Paeapua",
		head="Taeon chapeau",neck="Asperity Necklace",ear1="Brutal earring",ear2="Suppanomimi",
		body="Taeon tabard",hands="Taeon Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
		back="Bleating Mantle",waist="windbuffet belt +1",legs="Taeon tights",feet="Taeon boots"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
-- 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)
    if spell.skill == 'Enfeebling Magic' and state.Buff.Saboteur then
        equip(sets.buff.Saboteur)
    elseif spell.skill == 'Enhancing Magic' then
        equip(sets.midcast.EnhancingDuration)
        if buffactive.composure and spell.target.type == 'PLAYER' then
            equip(sets.buff.ComposureOther)
        end
    elseif spellMap == 'Cure' and spell.target.type == 'SELF' then
        equip(sets.midcast.CureSelf)
    end
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
-- 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
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
    if player.mpp < 51 then
        idleSet = set_combine(idleSet, sets.latent_refresh)
    end
    
    return idleSet
end
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
    display_current_caster_state()
    eventArgs.handled = true
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 == 'DNC' then
        set_macro_page(2, 4)
    elseif player.sub_job == 'NIN' then
        set_macro_page(3, 4)
    elseif player.sub_job == 'THF' then
        set_macro_page(4, 4)
    else
        set_macro_page(1, 4)
    end
end
Use this version:
http://pastebin.com/iAMJBhag 
There was some redundancy that I believe I trimmed up without breaking anything. There wasn't a sets.midcast.EnhancingDuration set to actually get called, so I merged a lot of the spells into that set, added the ComposureOther set also, for the same reason. Everything should work as you requested now.
Thank you it works great.                                     
            
                
                    
                    
                    
                                                            
                                                    
                                                                            
                                Server: Asura Game: FFXI Posts: 363 
                
			
			By Asura.Vafruvant 2015-08-30 17:16:39			
			
						
                     
                 returning player, using motes Geo lua file, i don't have all the elemental obis at the momemt, but for the life of me how the hell do I make that simple statement waist=gear.ElementalObi work?
 I was thinking maybe it calls from one of the mote files and I had to go in somewhere and type out all the obi names. That or maybe I needed to insert some kind of argument in the job file that did the whole weather thing... I'm probably missing something obvious here. I haven't done anything special to the base file from the kinematics github, so if someone could point me in the right direction I'd really appreciate it.
 
 tl;dr - where does gear.ElementalObi take its info from, and how/where do I have to change it if at all?
/GearSwap/libs/Mote-Mappings.lua
 
The line you're looking for is element.obi_of                                     
            
                
                    
                    
                    
                                                            
                                                    
                                                                            
                                Server: Asura Game: FFXI Posts: 363 
                
			
			By Asura.Vafruvant 2015-08-30 17:36:35			
			
						
                     
                 Any way to have multiple preshot sets for rng based on which flurry is up? like no flurry-flurry1-flurry2You can name sets, like: Code  sets.precast.RA (normal set)
sets.Flurry
sets.Flurry2
then in your function job_precast (if using Mote's files) or function precast (if not Mote) have a call for checking the buffs: Code  function job_precast(spell, action, spellMap, eventArgs)
	if spell.action_type == 'Ranged Attack' then
		if buffactive[581] then
			equip(sets.Flurry2)
		elseif buffactive[265] then
			equip(sets.Flurry)
		else
			equip(sets.precast.RA)
		end
	end
end 
            
                
                    
                    
                    
                                                            
                                                    
                                                                            
                                Server: Asura Game: FFXI Posts: 95 
                
			
			By Asura.Omnijuggernaut 2015-08-31 13:06:46			
			
						
                     
                 Asura.Omnijuggernaut said: »Asura.Omnijuggernaut said: »I have been trying to get my gearswap to use certain sets when I enhance myself and a different set when enhancing party.  
I started checking with showswaps to see if it was set right but it seems that my direct spell is overwriting my self cast. CureSelf works changing gear but i can't get spells like refresh to put telchine body on for the duration. 
 
No laughing at my gear, this is a new account, been trying to catch up on gear. 
 
Furthermore I know I suck at gearswap, so if you can help me clean this up if at all possible that would be great, I know I have a lot of lines that probably aren't needed.
 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')
end
-- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
function job_setup()
    state.Buff.Saboteur = buffactive.saboteur or false
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent.  Can override this function in a sidecar file.
function user_setup()
    state.OffenseMode:options('None', 'Normal')
    state.HybridMode:options('Normal', 'PhysicalDef', 'MagicalDef')
    state.CastingMode:options('Normal', 'Resistant')
    state.IdleMode:options('Normal', 'PDT', 'MDT')
    gear.default.obi_waist = "Sekhmet Corset"
    
    select_default_macro_book()
end
-- Define sets and vars used by this job file.
function init_gear_sets()
    --------------------------------------
	-- Start defining the sets
	--------------------------------------
	
	-- Precast Sets
	
	-- Precast sets to enhance JAs
	sets.precast.JA['Chainspell'] = {body="Vitivation Tabard +1"}
	
	-- Waltz set (chr and vit)
	sets.precast.Waltz = {
		head="Hagondes hat",
		body="Gendewitha Bliaut",hands="Helios Gloves",
		back="Refraction Cape",legs="Orvail Pants +1",feet="Uk'uxkaj boots"}
		
	-- Don't need any special gear for Healing Waltz.
	sets.precast.Waltz['Healing Waltz'] = {}
	-- Fast cast sets for spells
	
	-- 80% Fast Cast (including trait) for all spells, plus 5% quick cast
	-- No other FC sets necessary.
	sets.precast.FC = {main="Marin staff +1",sub="Mephitis grip",ammo="Impatiens",
		head="Atrophy chapeau +1",neck="Orunmila's torque",ear1="Estoqueur's earring",ear2="Gwati earring",
		body="Vitivation Tabard +1",hands="Gendewitha gages +1",ring1="Perception Ring",ring2="Sangoma Ring",
		back="Ogapepo cape",waist="Witful belt",legs="Artsieq hose",feet="Helios boots"}
		
	sets.precast.FC.Impact = set_combine(sets.precast.FC, {head=empty,body="Twilight Cloak"})
    
	
	-- Midcast Sets
		
	sets.midcast.Cure = {main="Tamaxchi",sub="Sors shield",ammo="Esper Stone +1",
		head="Gendewitha Caubeen",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
		body="Vitivation tabard +1",hands="Lethargy gantherots +1",ring1="Ephedra Ring",ring2="Haoma's Ring",
		back="Vates cape +1",waist="Ovate rope",legs="Atrophy Tights +1",feet="Vanya clogs"}
		
	sets.midcast.Curaga = sets.midcast.Cure
	sets.midcast.CureSelf = {ring1="Kunaji Ring",ring2="Asklepian Ring",hands="Buremte Gloves"}
	sets.midcast['Enhancing Magic'] = {main="Pukulatmuj",sub="Secespita",
		head="Telchine cap",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Atrophy gloves +1",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast.Enwater = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Hollow earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
		
	sets.midcast.Enthunder = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Hollow earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
		
	sets.midcast.Enstone = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Hollow earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
		
	sets.midcast.Enblizzard = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Hollow earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
		
	sets.midcast.Enfire = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Hollow earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
		
	sets.midcast.Enaero = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Hollow earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast['Gain-Str'] = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast['Gain-Dex'] = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
		
	sets.midcast['Gain-Vit'] = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast['Gain-Agi'] = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast['Gain-Int'] = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast['Gain-Mnd'] = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast['Gain-Chr'] = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast.Protect = {main="Pukulatmuj",sub="Beatific shield",
		head="Lethargy Chappel",neck="Colossus's Torque",
		body="Lethargy sayon +1",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Lethargy fuseau +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast.ProtectSelf = {main="Pukulatmuj",sub="Beatific shield",
		head="Telchine cap",neck="Colossus's Torque",
		body="Telchine chasuble",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Telchine braconi",feet="Lethargy Houseaux +1"}
	
	sets.midcast.Shell = {main="Pukulatmuj",sub="Beatific shield",
		head="Lethargy Chappel",neck="Colossus's Torque",
		body="Lethargy sayon +1",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Lethargy fuseau +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast.ShellSelf = {main="Pukulatmuj",sub="Beatific shield",
		head="Telchine cap",neck="Colossus's Torque",
		body="Telchine chasuble",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Telchine braconi",feet="Lethargy Houseaux +1"}
	
	sets.midcast.Haste = {main="Pukulatmuj",sub="Beatific shield",
		head="Lethargy Chappel",neck="Colossus's Torque",
		body="Lethargy sayon +1",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Lethargy fuseau +1",feet="Lethargy Houseaux +1"}
	sets.midcast.HasteSelf = {main="Pukulatmuj",sub="Beatific shield",
		head="Telchine cap",neck="Colossus's Torque",
		body="Telchine chasuble",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Telchine braconi",feet="Lethargy Houseaux +1"}	
		
	sets.midcast.Refresh = {main="Pukulatmuj",sub="Beatific shield",
		head="Lethargy Chappel",neck="Colossus's Torque",
		body="Lethargy sayon +1",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Lethargy fuseau +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast.RefreshSelf = {main="Pukulatmuj",sub="Beatific shield",
		head="Telchine cap",neck="Colossus's Torque",
		body="Telchine chasuble",hands="Atrophy gloves +1",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Lethargy fuseau +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast.Phalanx = {main="Egeking",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",ring1="Perception ring",
		back="Estoqueur's Cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
			
	sets.midcast.Temper = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Vitivation gloves",ring1="Perception ring",
		back="Estoqueur's cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
				
	sets.midcast.Regen = {main="Pukulatmuj",sub="Beatific shield",
		head="Lethargy Chappel",neck="Colossus's Torque",
		body="Telchine chasuble",hands="Atrophy gloves +1",ring2="Sheltered ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Lethargy fuseau +1",feet="Lethargy Houseaux +1"}
	
	sets.midcast.RegenSelf = {main="Pukulatmuj",sub="Beatific shield",
		head="Telchine cap",neck="Colossus's Torque",
		body="Telchine chasuble",hands="Atrophy gloves +1",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Telchine braconi",feet="Lethargy Houseaux +1"}
	
	sets.midcast.Cursna = {neck="Malison medallion",back="Orentania's cape +1",ring1="Haoma's ring",
		ring2="ephedra ring",feet="Vanya clogs"}
	sets.midcast.Stoneskin = {main="Pukulatmuj",sub="Secespita",
		head="Umuthi hat",neck="Stone gorget",ear1="Andoaa earring",ear2="Earthcry earring",
		body="Vitivation tabard +1",hands="Stone mufflers",ring1="Perception ring",
		back="Estoqueur's cape",waist="Siegel Sash",legs="Haven hose",feet="Lethargy Houseaux +1"}
	
	sets.midcast['Enfeebling Magic'] = {main="Marin staff +1",sub="Mephitis grip",range="Aureole",
		head="Vitivation Chapeau +1",neck="Weike torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
		body="Lethargy sayon +1",hands="Hagondes cuffs",ring1="Perception Ring",ring2="Sangoma Ring",
		back="Ogapepo Cape",waist="Ovate rope",legs="Artsieq hose",feet="Artsieq boots"}
		
	sets.midcast.Distract = {main="Marin staff +1",sub="Mephitis grip",range="Aureole",
		head="Vitivation Chapeau +1",neck="Weike torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
		body="Lethargy sayon +1",hands="Hagondes cuffs",ring1="Perception Ring",ring2="Sangoma Ring",
		back="Ogapepo Cape",waist="Ovate rope",legs="Artsieq hose",feet="Artsieq boots"}
		
	sets.midcast.Frazzle = {main="Marin staff +1",sub="Mephitis grip",range="Aureole",
		head="Vitivation Chapeau +1",neck="Weike torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
		body="Lethargy sayon +1",hands="Hagondes cuffs",ring1="Perception Ring",ring2="Sangoma Ring",
		back="Ogapepo Cape",waist="Ovate rope",legs="Artsieq hose",feet="Artsieq boots"}
	sets.midcast['Dia III'] = set_combine(sets.midcast['Enfeebling Magic'], {head="Vitivation Chapeau"})
	sets.midcast['Slow II'] = set_combine(sets.midcast['Enfeebling Magic'], {head="Vitivation Chapeau"})
	
	sets.midcast['Elemental Magic'] = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Memoria sachet",
		head="Helios band",neck="Eddy Necklace",ear1="Friomisi Earring",ear2="Sortiarius Earring",
		body="Hagondes coat",hands="Helios gloves",ring1="Fenrir Ring +1",ring2="Acumen Ring",
		back="Toro Cape",waist="Othila sash",legs="Hagondes pants",feet="Helios boots"}
		
	sets.midcast.Impact = set_combine(sets.midcast['Elemental Magic'], {head=empty,body="Twilight Cloak"})
	sets.midcast.Drain = {main="Lehbrailg +2",sub="Mephitis Grip",ranged="Aureole",
		head="Befouled crown",neck="Eddy Necklace",ear1="Estoqueur's earring",ear2="Psystorm Earring",
		body="Atrophy tabard",hands="Hagondes Cuffs",ring1="Perception Ring",ring2="Sangoma Ring",
		back="Ogapepo Cape",waist="Ovate rope",legs="Lethargy fuseau +1",feet="Helios boots"}
		
	sets.midcast.Aspir = {main="Lehbrailg +2",sub="Mephitis Grip",ranged="Aureole",
		head="Befouled crown",neck="Eddy Necklace",ear1="Estoqueur's earring",ear2="Psystorm Earring",
		body="Atrophy tabard",hands="Hagondes Cuffs",ring1="Perception Ring",ring2="Sangoma Ring",
		back="Ogapepo Cape",waist="Ovate rope",legs="Lethargy fuseau +1",feet="Helios boots"}
		
	sets.midcast['Stun'] = {main="Marin staff +1",sub="Mephitis grip",ammo="Impatiens",
		head="Atrophy chapeau +1",neck="Orunmila's torque",ear1="Estoqueur's earring",ear2="Gwati earring",
		body="Vitivation Tabard +1",hands="Gendewitha gages +1",ring1="Perception Ring",ring2="Sangoma Ring",
		back="Ogapepo cape",waist="Pya'ekue belt",legs="Artsieq hose",feet="Helios boots"}
	
	sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {ring1="Excelsis Ring", waist="Fucho-no-Obi"})
	sets.midcast.Aspir = sets.midcast.Drain
	-- Weaponskill sets
            -- Default set for any weaponskill that isn't any more specifically defined
            sets.precast.WS = {ammo="Paeapua",
					head="Taeon chapeau",neck="Fotia gorget",ear1="Bladeborn earring",ear2="Steelflash Earring",
					body="Taeon tabard",hands="Taeon Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
					back="Bleating Mantle",waist="Fotia belt",legs="Taeon tights",feet="Atrophy Boots +1"}
					
			sets.precast.WS['Sanguine Blade'] = set_combine(sets.precast.WS, {ammo="Memoria sachet",
					head="Helios band",neck="Eddy Necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
					body="Hagondes coat",hands="Helios gloves",ring1="Fenrir Ring +1",ring2="Acumen Ring",
					back="Toro Cape",waist="Othila sash",legs="Hagondes pants",feet="Helios boots"})
					
			sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {ammo="Oreiad's tathlum",
					head="Atrophy chapeau +1",neck="Tlamiztli collar",ear1="Lifestorm Earring",ear2="Bladeborn Earring",
					body="Vitivation tabard +1",hands="Atrophy gloves +1",ring1="Rajas Ring",ring2="Perception Ring",
					back="Buquwik Cape",waist="Prosilo belt +1",legs="Telchine braconi",feet="Artsieq boots"})		
					
			sets.precast.WS['Aeolian Edge'] = set_combine(sets.precast.WS, {ammo="Memoria sachet",
					head="Helios band",neck="Eddy Necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
					body="Hagondes coat",hands="Helios gloves",ring1="Fenrir Ring +1",ring2="Acumen Ring",
					back="Toro Cape",waist="Othila sash",legs="Hagondes pants",feet="Helios boots"})
					
			sets.precast.WS['Savage Blade'] = set_combine(sets.precast.WS, {ammo="Yetshila",
                    head="Atrophy Chapeau +1",neck="Fotia gorget",ear1="Brutal Earring",ear2="Moonshade Earring",
                    body="Taeon Tabard",hands="Lethargy Gantherotes",ring1="Rajas ring",ring2="Karieyh Ring",
                    back="Buquwik cape",waist="Fotia belt",legs="Lethargy fuseau +1",feet="Lethargy houseaux +1"})
					
			sets.precast.WS['Chant du Cygne'] = set_combine(sets.precast.WS, {ammo="Yetshila",
                    head="Taeon chapeau",neck="Shifting necklace",ear1="Brutal Earring",ear2="Moonshade Earring",
                    body="Taeon Tabard",hands="Taeon gloves",ring1="Rajas ring",ring2="Jupiter's Ring",
                    back="Kayapa cape",waist="Artful belt +1",legs="Taeon tights",feet="Taeon boots"})
					
			sets.precast.WS['Death Blossom'] = set_combine(sets.precast.WS, {ammo="Yetshila",
                    head="Atrophy Chapeau +1",neck="Fotia gorget",ear1="Brutal Earring",ear2="Moonshade Earring",
                    body="Taeon tabard",hands="Lethargy Gantherotes +1",ring1="Rajas ring",ring2="Karieyh Ring",
                    back="Buquwik cape",waist="Fotia belt",legs="Lethargy fuseau +1",feet="Lethargy houseaux +1"})
					
	-- Sets for special buff conditions on spells.
	
	sets.buff.Saboteur = {hands="Lethargy Gantherots +1"}
	
	-- Sets to return to when not performing an action.
	
	-- Resting sets
	sets.resting = {main="Bolelabunga",sub="Beatific shield",ammo="Impatiens",
		head="Vitivation Chapeau +1",neck="Wiglen Gorget",
		body="Atrophy Tabard",hands="Serpentes Cuffs",ring1="Paguroidea Ring",ring2="Sheltered Ring",
		back="Kumbira cape",waist="Witful Belt",back="Shadow Mantle",legs="Nares trews",feet="Serpentes Sabots"}
	
	-- Idle sets
	sets.idle = {main="Bolelabunga",sub="Beatific shield",ammo="Impatiens",
		head="Vitivation Chapeau +1",neck="Wiglen Gorget",ear1="Estoqueur's Earring",ear2="Loquacious Earring",
		body="Lethargy sayon +1",hands="Serpentes Cuffs",ring1="Paguroidea Ring",ring2="Sheltered Ring",
		back="Kumbira cape",waist="Flume Belt",legs="Nares trews",feet="Serpentes Sabots"}
	sets.idle.Town = {main="Bolelabunga",sub="Beatific shield",ammo="Impatiens",
		head="Vitivation Chapeau +1",neck="Wiglen Gorget",ear1="Estoqueur's Earring",ear2="Loquacious Earring",
		body="Lethargy sayon +1",hands="Serpentes Cuffs",ring1="Paguroidea Ring",ring2="Sheltered Ring",
		back="Kumbira cape",waist="Flume Belt",legs="Nares trews",feet="Serpentes Sabots"}
	
	sets.idle.Weak = {main="Bolelabunga",sub="Beatific shield",ammo="Impatiens",
		head="Vitivation Chapeau +1",neck="Wiglen Gorget",ear1="Estoqueur's Earring",ear2="Loquacious Earring",
		body="Lethargy sayon +1",hands="Serpentes Cuffs",ring1="Paguroidea Ring",ring2="Sheltered Ring",
		back="Kumbira cape",waist="Flume Belt",legs="Nares trews",feet="Serpentes Sabots"}
	
	-- Defense sets
	sets.defense.PDT = {main="Egeking",sub="Beatific shield",range="Phulax bow",
		head="Gendewitha caubeen",neck="Wiglen Gorget",ear1="Merman's earring",ear2="Merman's earring",
		body="Emet harness +1",hands="Buremte gloves",ring1="Paguroidea Ring",ring2="Yacuruna Ring",
		back="Umbra cape",waist="Pya'ekue belt",legs="Hagondes pants",feet="Gendewitha galoshes"}
	sets.defense.MDT = {main="Egeking",sub="Beatific shield",ammo="Memoria sachet",
		head="Gendewitha caubeen",neck="Twilight torque",ear1="Merman's earring",ear2="Merman's earring",
		body="Hagondes coat",hands="Buremte gloves",ring1="Paguroidea Ring",ring2="Yacuruna Ring",
		back="Umbra cape",waist="Pya'ekue belt",legs="Hagondes pants",feet="Gendewitha galoshes"}
	sets.Kiting = {legs="Crimson Cuisses"}
	sets.latent_refresh = {waist="Fucho-no-obi"}
	-- 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 = {main="Pukulatmuj",sub="Beatific shield",ammo="Paeapua",
		head="Taeon chapeau",neck="Asperity Necklace",ear1="Brutal earring",ear2="Suppanomimi",
		body="Taeon tabard",hands="Taeon Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
		back="Bleating Mantle",waist="windbuffet belt +1",legs="Taeon tights",feet="Taeon boots"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
-- 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)
    if spell.skill == 'Enfeebling Magic' and state.Buff.Saboteur then
        equip(sets.buff.Saboteur)
    elseif spell.skill == 'Enhancing Magic' then
        equip(sets.midcast.EnhancingDuration)
        if buffactive.composure and spell.target.type == 'PLAYER' then
            equip(sets.buff.ComposureOther)
        end
    elseif spellMap == 'Cure' and spell.target.type == 'SELF' then
        equip(sets.midcast.CureSelf)
    end
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
-- 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
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
    if player.mpp < 51 then
        idleSet = set_combine(idleSet, sets.latent_refresh)
    end
    
    return idleSet
end
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
    display_current_caster_state()
    eventArgs.handled = true
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 == 'DNC' then
        set_macro_page(2, 4)
    elseif player.sub_job == 'NIN' then
        set_macro_page(3, 4)
    elseif player.sub_job == 'THF' then
        set_macro_page(4, 4)
    else
        set_macro_page(1, 4)
    end
end
Use this version:
http://pastebin.com/iAMJBhag 
There was some redundancy that I believe I trimmed up without breaking anything. There wasn't a sets.midcast.EnhancingDuration set to actually get called, so I merged a lot of the spells into that set, added the ComposureOther set also, for the same reason. Everything should work as you requested now.
Thank you it works great.
Ok I noticed today that for some reason telchine is overriding during enhance duration for pt/ally members, that is when I need the lethargy/vitivation set. How would I fix that                                     
            
                
                    
                    
                    
                                                            
                                                    
                                                                            
                                Server: Asura Game: FFXI Posts: 363 
                
			
			By Asura.Vafruvant 2015-08-31 14:00:37			
			
						
                     
                 Asura.Omnijuggernaut said: »Ok I noticed today that for some reason telchine is overriding during enhance duration for pt/ally members, that is when I need the lethargy/vitivation set. How would I fix thatAnd that is with Composure up? The job_post_midcast rule only triggers when it is.                                             
                    [+]
                                              
            
                
                    
                    
                    
                                                            
                                                    
                                                                            
                                Server: Asura Game: FFXI Posts: 95 
                
			
			By Asura.Omnijuggernaut 2015-08-31 14:38:59			
			
						
                     
                 yeah that is composure up, just did showswaps and it showed telchine on pt member with composure up                                     
            
                
                    
                    
                    
                                                            
                                                    
                                                                            
                                Server: Asura Game: FFXI Posts: 363 
                
			
			By Asura.Vafruvant 2015-08-31 16:36:15			
			
						
                     
                 I found the mistake I made, messed up a name of a set. I updated the link I posted.                                             
                    [+]
                                              
            
                
                    
                    
                    
                                                            
                                                    
                                                                            
                                Server: Asura Game: FFXI Posts: 95 
                
			
			By Asura.Omnijuggernaut 2015-08-31 18:13:18			
			
						
                     
                 wonderful thanks again 
edit:
 
I changed this  Code  function job_get_spell_map(spell, default_spell_map)
	if spell.action_type == 'Magic' then
		if spell.skill == 'Enhancing Magic' then
			if spell.english:startswith('En') then
				return 'EnSpells'
			elseif spell.english:startswith('Gain') then
				return 'GainSpells'
			endk, ta
		end
	end
end
to this Code  function job_get_spell_map(spell, default_spell_map)
	if spell.action_type == 'Magic' then
		if spell.skill == 'Enhancing Magic' then
			if spell.english:startswith('En') then
				return 'EnSpells'
			elseif spell.english:startswith('Gain') then
				return 'GainSpells'
			end
		elseif spellMap == 'Cure' and spell.target.type == 'SELF' then
			equip(sets.midcast.CureSelf)
		end
	end
end 
            
                
                     Ramuh.Austar
                                                    
                                                                            
                                Server: Ramuh Game: FFXI Posts: 10483 
                
			
			By Ramuh.Austar 2015-09-01 14:52:36			
			
						
                     
                 If I make an error in a set, such as legs="Warwolf Belt", is there a way to find it without //gs showswaps and trying to find all the errors?                                     
            
                
                     Lakshmi.ByrthVIP 
                                                    
                                                                            
                                Server: Lakshmi Game: FFXI Posts: 6503 
                
			
			By Lakshmi.Byrth 2015-09-01 14:56:21			
			
						
                     
                 //gs debugmode might show it. It shows error messages, iirc.                                     
            
                
                     Ramuh.Austar
                                                    
                                                                            
                                Server: Ramuh Game: FFXI Posts: 10483 
                
			
			By Ramuh.Austar 2015-09-01 15:07:16			
			
						
                     
                 That should only show the equipment that isn't swapped, right?                                     
            
                
                     Cerberus.Tidis
                                                    
                                                                            
                                Server: Cerberus Game: FFXI Posts: 3927 
                
			
			By Cerberus.Tidis 2015-09-01 15:36:59			
			
						
                     
                 Out of curiosity, how would one make it so you automatically equip Councilor's Garb using Mote's files? I tried to do this myself by editing the Mote-Mappings and Mote-Include files then finally my own gearswap but it wasn't successful.
 Wish I could get the hang of this!
 
            
                
                    
                    
                    
                                                            
                                                    
                                                                            
                                Server: Shiva Game: FFXI Posts: 66 
                
			
			By Shiva.Verohawke 2015-09-03 08:52:07			
			
						
                     
                 Hi I have this weird error; tried everything including fresh install of gearswap, unloading all other addons and plugins:
 Every time I zone, get a drop or buy/sell something from inventory I get following error on my screen (same error repeated 20 times)
 
 Gearswap: Lua runtime error gearswap/gearswap.lua379: attempt to index field '?' (a nil value)
 
 I looked up line 379 in gearswap.lua (but didn't touch anything /scared), wich says:
 if not items[bag][slot] then items[bag][slot] = make_empty_item_table(slot) end
 
 Could someone please help me out, this error is making me crazy and unloading gearswap because of that error spam I get bombarded with everytime I zone or my inv changes.
 
 Gearswap seems to be working fine for the rest, if this can't be fixed, I would be happy with a mute method for that error line as well!
 
            
                
                     Asura.Neufko
                                                    
                                                                            
                                Server: Asura Game: FFXI Posts: 236 
                
			
			By Asura.Neufko 2015-09-03 09:10:58			
			
						
                     
                 The same issue has been reported on may 19th here :https://github.com/Byrth/Lua-Byrth/issues/381 
Seems like it hasn't been resolved yet.
 
Try maybe to comment the line #379 and see what happens ?
 
Someone with more lua power will surely come with a better answer soon.                                     
            
                
                     Ragnarok.Boq
                                                    
                                                                            
                                Server: Ragnarok Game: FFXI Posts: 31 
                
			
			By Ragnarok.Boq 2015-09-03 10:14:44			
			
						
                     
                 Hello. I'm reposting this here as it seems more appropriate. I wish I realized this thread sooner so I didn't make a new topic. I'm a returning player who is new to Gearswap. I used Spellcast extensively, but I'm slowly getting accustomed to GS.
 I have a problem with trying to setup my gearswap to switch in the Hachirin-no-Obi when the spell being cast matches the weather or day element. Specifically I'm just trying to get it to work for Cures for my SMN. I'm using Kinematic's .lua as a base for SMN. I'm trying to add in code which will swap in the Hachirin-no-Obi for cures during Light weather and Lightsday. I've done extensive searching on this on Google and can't seem to get the coding to work at all. I've activated //gs showswaps so I can confirm what equipment is being swapped during pre, mid and aftercast.
 
 I've made a gear set, called sets.midcast.Obi which only contains waist = "Hachirin-no-Obi". Written as sets.midcast.Obi = {waist="Hachirin-no-Obi"}
 
 And my cure set is written as sets.midcast.Cure with my desired curing gear.
 
 But when I write a function to use these sets for light weather and day, it only equips the precast and curing midcast. The Obi never gets equipped. One of the functions I've tried is below. Can anyone help me out with this? I can't see what I'm doing wrong. Thanks!
 
 
 function midcast(spell,action)
 if string.find(spell.english,'Cur') then. equip(sets.midcast.Cure)
 if spell.element == world.weather_element or spell_element == world.day_element then equip(sets.midcast.Obi)
 end
 end
 end
 
            
            
                
			
			By geigei 2015-09-03 16:25:55			
			
						
                     
                 function job_precast(spell, action, spellMap, eventArgs)if spell.action_type == 'Ranged Attack' then
 if buffactive[581] then
 equip(sets.Flurry2)
 elseif buffactive[265] then
 equip(sets.Flurry)
 else
 equip(sets.precast.RA)
 end
 end
 end
Not working, equips sets.precast.RA even if i have flurry on, what mote files i need? i only use mote-include.                                     
            
                
                    
                    
                    
                                                            
                                                    
                                                                            
                                Server: Asura Game: FFXI Posts: 95 
                
			
			By Asura.Omnijuggernaut 2015-09-03 17:29:06			
			
						
                     
                 Is there a way to set it to nuke in weather obi based off day/weather? 
Like auto set the belt if it aligns?
 
since I am on rdm I can't use thunderstorm as /sch so would need MaB belt, but I want it to recognize the day/weather alignments. I originally was going to ask if I could have it set weather obi when I was /sch and just live with that but I am not certain the capabilities of gearswap. Would really like it to auto equip based of alignment of day/weather
 
I have had a few gear changes since I last posted this. 
 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')
end
-- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
function job_setup()
	state.Buff.Saboteur = buffactive.saboteur or false
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent.  Can override this function in a sidecar file.
function user_setup()
	state.OffenseMode:options('None', 'Normal')
	state.HybridMode:options('Normal', 'PhysicalDef', 'MagicalDef')
	state.CastingMode:options('Normal', 'Resistant')
	state.IdleMode:options('Normal', 'PDT', 'MDT')
	gear.default.obi_waist = "Othila sash"
	select_default_macro_book()
end
-- Define sets and vars used by this job file.
function init_gear_sets()
	--------------------------------------
	-- Start defining the sets
	--------------------------------------
	-- Precast Sets
	-- Precast sets to enhance JAs
	sets.precast.JA['Chainspell'] = {body="Vitivation Tabard +1"}
	-- Waltz set (chr and vit)
	sets.precast.Waltz = {
		head="Hagondes hat",
		body="Gendewitha Bliaut",hands="Helios Gloves",
		back="Refraction Cape",legs="Orvail Pants +1",feet="Uk'uxkaj boots"}
	-- Don't need any special gear for Healing Waltz.
	sets.precast.Waltz['Healing Waltz'] = {}
	-- Fast cast sets for spells
	-- 80% Fast Cast (including trait) for all spells, plus 5% quick cast
	-- No other FC sets necessary.
	sets.precast.FC = {main="Emissary",ammo="Impatiens",
		head="Atrophy chapeau +1",neck="Eddy's necklace",ear1="Lifestorm earring",ear2="Psystorm earring",
		body="Vitivation Tabard +1",hands="Taeon boots",ring1="Weatherspoon Ring",ring2="Sangoma Ring",
		back="Ogapepo cape",waist="Witful belt",legs="Psycloth lappas",feet="Taeon boots"}
	sets.precast.FC.Impact = set_combine(sets.precast.FC, {head=empty,body="Twilight Cloak"})
	-- Weaponskill sets
	-- Default set for any weaponskill that isn't any more specifically defined
	sets.precast.WS = {ammo="Paeapua",
		head="Taeon chapeau",neck="Fotia gorget",ear1="Bladeborn earring",ear2="Steelflash Earring",
		body="Taeon tabard",hands="Taeon Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
		back="Bleating Mantle",waist="Fotia belt",legs="Taeon tights",feet="Atrophy Boots +1"}
	sets.precast.WS['Sanguine Blade'] = set_combine(sets.precast.WS, {ammo="Memoria sachet",
		head="Helios band",neck="Eddy Necklace",ear1="Friomisi Earring",ear2="Sortiarius Earring",
		body="Hagondes coat",hands="Helios gloves",ring1="Fenrir Ring +1",ring2="Acumen Ring",
		back="Toro Cape",waist="Othila sash",legs="Hagondes pants",feet="Helios boots"})
	sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {ammo="Oreiad's tathlum",
		head="Atrophy chapeau +1",neck="Tlamiztli collar",ear1="Lifestorm Earring",ear2="Bladeborn Earring",
		body="Vitivation tabard +1",hands="Atrophy gloves +1",ring1="Rajas Ring",ring2="K'ayres Ring",
		back="Buquwik Cape",waist="Prosilo belt +1",legs="Psycloth lappas",feet="Artsieq boots"})	  
	sets.precast.WS['Aeolian Edge'] = set_combine(sets.precast.WS, {ammo="Memoria sachet",
		head="Helios band",neck="Eddy Necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
		body="Hagondes coat",hands="Helios gloves",ring1="Fenrir Ring +1",ring2="Acumen Ring",
		back="Toro Cape",waist="Othila sash",legs="Hagondes pants",feet="Helios boots"})
	sets.precast.WS['Savage Blade'] = set_combine(sets.precast.WS, {ammo="Yetshila",
		head="Atrophy Chapeau +1",neck="Fotia gorget",ear1="Brutal Earring",ear2="Moonshade Earring",
		body="Taeon Tabard",hands="Lethargy Gantherotes",ring1="Rajas ring",ring2="Karieyh Ring",
		back="Buquwik cape",waist="Fotia belt",legs="Psycloth lappas",feet="Lethargy houseaux +1"})
	sets.precast.WS['Chant du Cygne'] = set_combine(sets.precast.WS, {ammo="Yetshila",
		head="Taeon chapeau",neck="Shifting necklace",ear1="Brutal Earring",ear2="Moonshade Earring",
		body="Taeon Tabard",hands="Taeon gloves",ring1="Rajas ring",ring2="Jupiter's Ring",
		back="Kayapa cape",waist="Artful belt +1",legs="Taeon tights",feet="Taeon boots"})
	sets.precast.WS['Evisceration'] = set_combine(sets.precast.WS, {ammo="Yetshila",
		head="Taeon chapeau",neck="Shifting necklace",ear1="Brutal Earring",ear2="Moonshade Earring",
		body="Taeon Tabard",hands="Taeon gloves",ring1="Rajas ring",ring2="Jupiter's Ring",
		back="Kayapa cape",waist="Artful belt +1",legs="Taeon tights",feet="Taeon boots"})
		
	sets.precast.WS['Death Blossom'] = set_combine(sets.precast.WS, {ammo="Yetshila",
		head="Atrophy Chapeau +1",neck="Fotia gorget",ear1="Brutal Earring",ear2="Moonshade Earring",
		body="Taeon tabard",hands="Lethargy Gantherotes +1",ring1="Rajas ring",ring2="Karieyh Ring",
		back="Buquwik cape",waist="Fotia belt",legs="Psycloth lappas",feet="Lethargy houseaux +1"})
	-- Midcast Sets
	sets.midcast.Cure = {main="Tamaxchi",sub="Sors shield",ammo="Esper Stone +1",
		head="Gendewitha Caubeen",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
		body="Vitivation tabard +1",hands="Lethargy gantherots +1",ring1="Ephedra Ring",ring2="Haoma's Ring",
		back="Vates cape +1",waist="Ovate rope",legs="Atrophy Tights +1",feet="Vanya clogs"}
	sets.midcast.Curaga = sets.midcast.Cure
	sets.midcast.CureSelf = {ring1="Kunaji Ring",ring2="Asklepian Ring",hands="Buremte Gloves"}
	sets.midcast['Enhancing Magic'] = {main="Pukulatmuj",sub="Egeking",
		head="Umuthi Hat",neck="Colossus's Torque",ear1="Andoaa earring",ear2="Augmenting earring",
		body="Vitivation tabard +1",hands="Atrophy gloves +1",ring1="Weatherspoon ring",
		back="Ghostfyre cape",waist="Olympus Sash",legs="Atrophy tights +1",feet="Lethargy Houseaux +1"}
	sets.midcast['Enhancing Magic'].EnSpells = set_combine(sets.midcast['Enhancing Magic'],{ear2="Hollow Earring",hands="Vitivation Gloves"})
	sets.midcast['Enhancing Magic'].GainSpells = set_combine(sets.midcast['Enhancing Magic'],{hands="Vitivation Gloves"})
	sets.midcast.EnhancingDuration = {head="Telchine Cap",body="Telchine Chasuble",legs="Telchine Braconi",}
	sets.buff.ComposureOther = {head="Lethargy Chappel +1",body="Lethargy Sayon +1",legs="Lethargy Fuseau +1",feet="Lethargy Houseaux +1"}
	sets.midcast.Protect = {ring2="Sheltered Ring"}
	sets.midcast.Shell = sets.midcast.Protect
	sets.midcast.Phalanx = set_combine(sets.midcast['Enhancing Magic'],{main="Egeking"})
	sets.midcast.Cursna = {neck="Malison medallion",back="Oretania's cape +1",ring1="Haoma's ring",ring2="ephedra ring",feet="Vanya clogs"}
	sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'],{neck="Stone gorget",ear2="Earthcry earring",hands="Stone mufflers",waist="Siegel Sash",legs="Shedir seraweels"})
	sets.midcast['Enfeebling Magic'] = {main="Marin staff +1",sub="Mephitis grip",range="Aureole",
		head="Lethargy Chappel +1",neck="Weike torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
		body="Vanya robe",hands="Lethargy gantherots +1",ring1="Weatherspoon Ring",ring2="Sangoma Ring",
		back="Ogapepo Cape",waist="Ovate rope",legs="Psycloth lappas",feet="Artsieq boots"}
	sets.midcast.Distract = {main="Marin staff +1",sub="Mephitis grip",range="Aureole",
		head="Lethargy Chappel +1",neck="Weike torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
		body="Vanya robe",hands="Lethargy gantherots +1",ring1="Weatherspoon Ring",ring2="Sangoma Ring",
		back="Ogapepo Cape",waist="Ovate rope",legs="Psycloth lappas",feet="Artsieq boots"}
	sets.midcast.Frazzle = {main="Marin staff +1",sub="Mephitis grip",range="Aureole",
		head="Lethargy Chappel +1",neck="Weike torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
		body="Vanya robe",hands="Lethargy gantherots +1",ring1="Weatherspoon Ring",ring2="Sangoma Ring",
		back="Ogapepo Cape",waist="Ovate rope",legs="Psycloth lappas",feet="Artsieq boots"}
	sets.midcast['Dia III'] = set_combine(sets.midcast['Enfeebling Magic'], {head="Vitivation Chapeau +1"})
	sets.midcast['Slow II'] = set_combine(sets.midcast['Enfeebling Magic'], {head="Vitivation Chapeau +1"})
	sets.midcast['Elemental Magic'] = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Memoria sachet",
		head="Helios band",neck="Eddy Necklace",ear1="Friomisi Earring",ear2="Sortiarius Earring",
		body="Hagondes coat",hands="Helios gloves",ring1="Fenrir Ring +1",ring2="Acumen Ring",
		back="Toro Cape",waist=gear.ElementalObi,legs="Hagondes pants",feet="Helios boots"}
	sets.midcast.Impact = set_combine(sets.midcast['Elemental Magic'], {head=empty,body="Twilight Cloak"})
	sets.midcast.Drain = {main="Lehbrailg +2",sub="Mephitis Grip",ranged="Aureole",
		head="Befouled crown",neck="Eddy Necklace",ear1="Lifestorm earring",ear2="Psystorm Earring",
		body="Atrophy tabard",hands="Hagondes Cuffs",ring1="Weatherspoon Ring",ring2="Sangoma Ring",
		back="Ogapepo Cape",waist="Ovate rope",legs="Lethargy fuseau +1",feet="Helios boots"}
	sets.midcast.Aspir = {main="Lehbrailg +2",sub="Mephitis Grip",ranged="Aureole",
		head="Befouled crown",neck="Eddy Necklace",ear1="Lifestorm earring",ear2="Psystorm Earring",
		body="Atrophy tabard",hands="Hagondes Cuffs",ring1="Weatherspoon Ring",ring2="Sangoma Ring",
		back="Ogapepo Cape",waist="Ovate rope",legs="Lethargy fuseau +1",feet="Helios boots"}
	sets.midcast['Stun'] = {main="Marin staff +1",sub="Mephitis grip",ammo="Impatiens",
		head="Atrophy chapeau +1",neck="Eddy's necklace",ear1="Lifestorm earring",ear2="Psystorm earring",
		body="Vitivation Tabard +1",hands="Taeon boots",ring1="Weatherspoon Ring",ring2="Sangoma Ring",
		back="Ogapepo cape",waist="Witful belt",legs="Psycloth lappas",feet="Taeon boots"}
	sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {ring1="Excelsis Ring", waist="Fucho-no-Obi"})
	sets.midcast.Aspir = sets.midcast.Drain
	-- Sets to return to when not performing an action.
	-- Resting sets
	sets.resting = {main="Bolelabunga",sub="Beatific shield",ammo="Impatiens",
		head="Vitivation Chapeau +1",neck="Wiglen Gorget",
		body="Atrophy Tabard",hands="Serpentes Cuffs",ring1="Paguroidea Ring",ring2="Sheltered Ring",
		back="Kumbira cape",waist="Witful Belt",back="Shadow Mantle",legs="Nares trews",feet="Serpentes Sabots"}
	-- Idle sets
	sets.idle = {main="Bolelabunga",sub="Beatific shield",ammo="Impatiens",
		head="Vitivation Chapeau +1",neck="Wiglen Gorget",ear1="Merman's Earring",ear2="Infused Earring",
		body="Lethargy sayon +1",hands="Serpentes Cuffs",ring1="Paguroidea Ring",ring2="Sheltered Ring",
		back="Kumbira cape",waist="Flume Belt",legs="Nares trews",feet="Serpentes Sabots"}
	sets.idle.Town = {main="Bolelabunga",sub="Beatific shield",ammo="Impatiens",
		head="Vitivation Chapeau +1",neck="Wiglen Gorget",ear1="Merman's Earring",ear2="Infused Earring",
		body="Lethargy sayon +1",hands="Serpentes Cuffs",ring1="Paguroidea Ring",ring2="Sheltered Ring",
		back="Kumbira cape",waist="Flume Belt",legs="Nares trews",feet="Serpentes Sabots"}
	sets.idle.Weak = {main="Bolelabunga",sub="Beatific shield",ammo="Impatiens",
		head="Vitivation Chapeau +1",neck="Wiglen Gorget",ear1="Merman's Earring",ear2="Infused Earring",
		body="Lethargy sayon +1",hands="Serpentes Cuffs",ring1="Paguroidea Ring",ring2="Sheltered Ring",
		back="Kumbira cape",waist="Flume Belt",legs="Nares trews",feet="Serpentes Sabots"}
	-- Defense sets
	sets.defense.PDT = {main="Claidheamh Soluis",sub="Beatific shield",range="Phulax bow",
		head="Gendewitha caubeen",neck="Wiglen Gorget",ear1="Merman's earring",ear2="Merman's earring",
		body="Emet harness +1",hands="Buremte gloves",ring1="Paguroidea Ring",ring2="Yacuruna Ring",
		back="Umbra cape",waist="Dynamic belt",legs="Hagondes pants",feet="Gendewitha galoshes"}
	sets.defense.MDT = {main="Claidheamh Soluis",sub="Beatific shield",ammo="Memoria sachet",
		head="Gendewitha caubeen",neck="Twilight torque",ear1="Merman's earring",ear2="Merman's earring",
		body="Hagondes coat",hands="Buremte gloves",ring1="Paguroidea Ring",ring2="Yacuruna Ring",
		back="Umbra cape",waist="Dynamic belt",legs="Hagondes pants",feet="Gendewitha galoshes"}
	sets.Kiting = {legs="Crimson Cuisses"}
	sets.latent_refresh = {waist="Fucho-no-obi"}
	-- 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 = {main="Claidheamh Soluis",sub="Demersal degan +1",ammo="Paeapua",
		head="Taeon chapeau",neck="Asperity Necklace",ear1="Brutal earring",ear2="Suppanomimi",
		body="Taeon tabard",hands="Taeon Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
		back="Bleating Mantle",waist="windbuffet belt +1",legs="Taeon tights",feet="Taeon boots"}
	-- Sets for special buff conditions on spells.
	sets.buff.Saboteur = {hands="Lethargy Gantherots +1"}
end
 
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
 
-- 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)
	if spell.skill == 'Enfeebling Magic' and state.Buff.Saboteur then
		equip(sets.buff.Saboteur)
	elseif spell.skill == 'Enhancing Magic' then
		equip(sets.midcast.EnhancingDuration)
		if buffactive.composure and spell.target.type == 'PLAYER' then
			equip(sets.buff.ComposureOther)
		end
	elseif spellMap == 'Cure' and spell.target.type == 'SELF' then
		equip(sets.midcast.CureSelf)
	end
end
function job_get_spell_map(spell, default_spell_map)
	if spell.action_type == 'Magic' then
		if spell.skill == 'Enhancing Magic' then
			if spell.english:startswith('En') then
				return 'EnSpells'
			elseif spell.english:startswith('Gain') then
				return 'GainSpells'
			end
		elseif spellMap == 'Cure' and spell.target.type == 'SELF' then
			equip(sets.midcast.CureSelf)
		end
	end
end
 
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
 
-- 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
 
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
 
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
	if player.mpp < 51 then
		idleSet = set_combine(idleSet, sets.latent_refresh)
	end
	 
	return idleSet
end
 
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
	display_current_caster_state()
	eventArgs.handled = true
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 == 'DNC' then
		set_macro_page(2, 4)
	elseif player.sub_job == 'NIN' then
		set_macro_page(3, 4)
	elseif player.sub_job == 'THF' then
		set_macro_page(4, 4)
	else
		set_macro_page(1, 4)
	end
end 
            
                
                     Asura.Neufko
                                                    
                                                                            
                                Server: Asura Game: FFXI Posts: 236 
                
			
			By Asura.Neufko 2015-09-03 17:42:23			
			
						
                     
                 function job_post_midcast(spell, action, spellMap, eventArgs)if spell.skill == 'Elemental Magic' then
 if spell.element == world.day_element or spell.element == world.weather_element then
 equip(sets.midcast['Elemental Magic'], {waist="Hachirin-No-Obi"})
 end
 end
 end
 
            
                
                    
                    
                    
                                                            
                                                    
                                                                            
                                Server: Asura Game: FFXI Posts: 95 
                
			
			By Asura.Omnijuggernaut 2015-09-03 18:00:57			
			
						
                     
                 awesome thanks                                     
            
                
                    
                    
                    
                                                            
                                                    
                                                                            
                                Server: Asura Game: FFXI Posts: 363 
                
			
			By Asura.Vafruvant 2015-09-03 18:11:12			
			
						
                     
                 Asura.Omnijuggernaut said: »Is there a way to set it to nuke in weather obi based off day/weather?
 Like auto set the belt if it aligns?
Yes there is, and it's built-in to your file structure. Towards the top of your file, you'll see a line that says:
 
gear.default.obi_waist = "Sekhmet Corset"
 
Change that Sekhmet Corset to whatever belt you want to equip if the weather/day does not match. Then, in your sets, change the waist to: 
 
waist=gear.ElementalObi
 
This will automatically equip it if the weather/day matches and not require adding anything else.                                             
                    [+]
                                              
            
                
                     Ragnarok.Boq
                                                    
                                                                            
                                Server: Ragnarok Game: FFXI Posts: 31 
                
			
			By Ragnarok.Boq 2015-09-04 07:09:53			
			
						
                     
                 Hello again. I'm reposting this in a better format and hopefully I can be more explicit in what I'm looking for to fix this code. I'm using Kinematic's SMN lua as a base, which does not contain any segment of code dealing with Curing during lightsday or weather. I'd like to add this into my lua, and I can't seem to get the coding correct. What I'm trying to do is have the Hachirin-no-Obi equipped midcast when cures are cast during lightsday and/or weather. 
I've put my full lua code below. The relevant portion where I have the weather/day conditions defined is:
 Code  
-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
    if default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
        if world.weather_element == 'Light' or world.day_element == 'Light' then
            return 'CureWithLightWeather'
        end
    elseif spell.type == 'BloodPactRage' then
        if magicalRagePacts:contains(spell.english) then
            return 'MagicalBloodPactRage'
        else
            return 'PhysicalBloodPactRage'
        end
    elseif spell.type == 'BloodPactWard' and spell.target.type == 'MONSTER' then
        return 'DebuffBloodPactWard'
    end
end
The result when I run my lua file is that I end up casting Cures with my precast belt (verified by having the showswaps on) during lightsday or light weather. 
 
If someone could help figure this out I'd be very appreciative.
 
Full lua code: Code  -------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job.  Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
-- Also, you'll need the Shortcuts addon to handle the auto-targetting of the custom pact commands.
--[[
    Custom commands:
    
    gs c petweather
        Automatically casts the storm appropriate for the current avatar, if possible.
    
    gs c siphon
        Automatically run the process to: dismiss the current avatar; cast appropriate
        weather; summon the appropriate spirit; Elemental Siphon; release the spirit;
        and re-summon the avatar.
        
        Will not cast weather you do not have access to.
        Will not re-summon the avatar if one was not out in the first place.
        Will not release the spirit if it was out before the command was issued.
        
    gs c pact [PactType]
        Attempts to use the indicated pact type for the current avatar.
        PactType can be one of:
            cure
            curaga
            buffOffense
            buffDefense
            buffSpecial
            debuff1
            debuff2
            sleep
            nuke2
            nuke4
            bp70
            bp75 (merits and lvl 75-80 pacts)
            astralflow
--]]
-- Initialization function for this job file.
function get_sets()
    mote_include_version = 2
    -- Load and initialize the include file.
    include('Mote-Include.lua')
end
-- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
function job_setup()
    state.Buff["Avatar's Favor"] = buffactive["Avatar's Favor"] or false
    state.Buff["Astral Conduit"] = buffactive["Astral Conduit"] or false
    spirits = S{"LightSpirit", "DarkSpirit", "FireSpirit", "EarthSpirit", "WaterSpirit", "AirSpirit", "IceSpirit", "ThunderSpirit"}
    avatars = S{"Carbuncle", "Fenrir", "Diabolos", "Ifrit", "Titan", "Leviathan", "Garuda", "Shiva", "Ramuh", "Odin", "Alexander", "Cait Sith"}
    magicalRagePacts = S{
        'Inferno','Earthen Fury','Tidal Wave','Aerial Blast','Diamond Dust','Judgment Bolt','Searing Light','Howling Moon','Ruinous Omen',
        'Fire II','Stone II','Water II','Aero II','Blizzard II','Thunder II',
        'Fire IV','Stone IV','Water IV','Aero IV','Blizzard IV','Thunder IV',
        'Thunderspark','Burning Strike','Meteorite','Nether Blast','Flaming Crush',
        'Meteor Strike','Heavenly Strike','Wind Blade','Geocrush','Grand Fall','Thunderstorm',
        'Holy Mist','Lunar Bay','Night Terror','Level ? Holy'}
    pacts = {}
    pacts.cure = {['Carbuncle']='Healing Ruby'}
    pacts.curaga = {['Carbuncle']='Healing Ruby II', ['Garuda']='Whispering Wind', ['Leviathan']='Spring Water'}
    pacts.buffoffense = {['Carbuncle']='Glittering Ruby', ['Ifrit']='Crimson Howl', ['Garuda']='Hastega', ['Garuda']='Hastega II', ['Ramuh']='Rolling Thunder',
        ['Fenrir']='Ecliptic Growl'}
    pacts.buffdefense = {['Carbuncle']='Shining Ruby', ['Shiva']='Frost Armor', ['Garuda']='Aerial Armor', ['Titan']='Earthen Ward',
        ['Ramuh']='Lightning Armor', ['Fenrir']='Ecliptic Howl', ['Diabolos']='Noctoshield', ['Cait Sith']='Reraise II'}
    pacts.buffspecial = {['Ifrit']='Inferno Howl', ['Garuda']='Fleet Wind', ['Titan']='Earthen Armor', ['Diabolos']='Dream Shroud',
        ['Carbuncle']='Soothing Ruby', ['Fenrir']='Heavenward Howl', ['Cait Sith']='Raise II'}
    pacts.debuff1 = {['Shiva']='Diamond Storm', ['Ramuh']='Shock Squall', ['Leviathan']='Tidal Roar', ['Fenrir']='Lunar Cry',
        ['Diabolos']='Pavor Nocturnus', ['Cait Sith']='Eerie Eye'}
    pacts.debuff2 = {['Shiva']='Sleepga', ['Leviathan']='Slowga', ['Fenrir']='Lunar Roar', ['Diabolos']='Somnolence'}
    pacts.sleep = {['Shiva']='Sleepga', ['Diabolos']='Nightmare', ['Cait Sith']='Mewing Lullaby'}
    pacts.nuke2 = {['Ifrit']='Fire II', ['Shiva']='Blizzard II', ['Garuda']='Aero II', ['Titan']='Stone II',
        ['Ramuh']='Thunder II', ['Leviathan']='Water II'}
    pacts.nuke4 = {['Ifrit']='Fire IV', ['Shiva']='Blizzard IV', ['Garuda']='Aero IV', ['Titan']='Stone IV',
        ['Ramuh']='Thunder IV', ['Leviathan']='Water IV'}
    pacts.bp70 = {['Ifrit']='Flaming Crush', ['Shiva']='Rush', ['Garuda']='Predator Claws', ['Titan']='Mountain Buster',
        ['Ramuh']='Chaotic Strike', ['Leviathan']='Spinning Dive', ['Carbuncle']='Meteorite', ['Fenrir']='Eclipse Bite',
        ['Diabolos']='Nether Blast',['Cait Sith']='Regal Scratch'}
    pacts.bp75 = {['Ifrit']='Meteor Strike', ['Shiva']='Heavenly Strike', ['Garuda']='Wind Blade', ['Titan']='Geocrush',
        ['Ramuh']='Thunderstorm', ['Leviathan']='Grand Fall', ['Carbuncle']='Holy Mist', ['Fenrir']='Lunar Bay',
        ['Diabolos']='Night Terror', ['Cait Sith']='Level ? Holy'}
    pacts.astralflow = {['Ifrit']='Inferno', ['Shiva']='Diamond Dust', ['Garuda']='Aerial Blast', ['Titan']='Earthen Fury',
        ['Ramuh']='Judgment Bolt', ['Leviathan']='Tidal Wave', ['Carbuncle']='Searing Light', ['Fenrir']='Howling Moon',
        ['Diabolos']='Ruinous Omen', ['Cait Sith']="Altana's Favor"}
    -- Wards table for creating custom timers   
    wards = {}
    -- Base duration for ward pacts.
    wards.durations = {
        ['Crimson Howl'] = 60, ['Earthen Armor'] = 60, ['Inferno Howl'] = 60, ['Heavenward Howl'] = 60,
        ['Rolling Thunder'] = 120, ['Fleet Wind'] = 120,
        ['Shining Ruby'] = 180, ['Frost Armor'] = 180, ['Lightning Armor'] = 180, ['Ecliptic Growl'] = 180,
        ['Glittering Ruby'] = 180, ['Hastega'] = 180, ['Noctoshield'] = 180, ['Ecliptic Howl'] = 180,
        ['Dream Shroud'] = 180,
        ['Reraise II'] = 3600
    }
    -- Icons to use when creating the custom timer.
    wards.icons = {
        ['Earthen Armor']   = 'spells/00299.png', -- 00299 for Titan
        ['Shining Ruby']    = 'spells/00043.png', -- 00043 for Protect
        ['Dream Shroud']    = 'spells/00304.png', -- 00304 for Diabolos
        ['Noctoshield']     = 'spells/00106.png', -- 00106 for Phalanx
        ['Inferno Howl']    = 'spells/00298.png', -- 00298 for Ifrit
        ['Hastega']         = 'spells/00358.png', -- 00358 for Hastega
        ['Rolling Thunder'] = 'spells/00104.png', -- 00358 for Enthunder
        ['Frost Armor']     = 'spells/00250.png', -- 00250 for Ice Spikes
        ['Lightning Armor'] = 'spells/00251.png', -- 00251 for Shock Spikes
        ['Reraise II']      = 'spells/00135.png', -- 00135 for Reraise
        ['Fleet Wind']      = 'abilities/00074.png', -- 
    }
    -- Flags for code to get around the issue of slow skill updates.
    wards.flag = false
    wards.spell = ''
    
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job.  Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent.  Can override this function in a sidecar file.
function user_setup()
    state.OffenseMode:options('None', 'Normal', 'Acc')
    state.CastingMode:options('Normal', 'Resistant')
    state.IdleMode:options('Normal', 'PDT')
    gear.perp_staff = {name=""}
    
    select_default_macro_book()
end
-- Define sets and vars used by this job file.
function init_gear_sets()
    --------------------------------------
    -- Precast Sets
    --------------------------------------
    
    -- Precast sets to enhance JAs
    sets.precast.JA['Astral Flow'] = {head="Glyphic Horn"}
    
    sets.precast.JA['Elemental Siphon'] = {main="Soulscourge",
        head="Caller's Horn +2",sub="Vox Grip",neck="Caller's Pendant",
        body="Anhur Robe",hands="Summoner's Bracers +2",ring2="Evoker's Ring",ring1="Fervor Ring",
        legs="Caller's Spats +2",waist="Cimmerian Sash",feet="Caller's Pigaches +2"}
    sets.precast.JA['Mana Cede'] = {hands="Caller's Bracers +2"}
    -- Pact delay reduction gear
    sets.precast.BloodPactWard = {head="Summoner's Horn", ammo="Eminent Sachet", ear1="Caller's Earring", body="Yinyang Robe",hands="Summoner's Bracers +2",
        back="Tiresias' Cape", legs="Summoner's Spats", feet="Summoner's Pigaches"}
    sets.precast.BloodPactRage = sets.precast.BloodPactWard
    -- Fast cast sets for spells
    
    sets.precast.FC = {
        head="Nares Cap",ear1="Loquacious Earring",ammo="Impatiens",
        body="Anhur Robe",hands="Rubeus Gloves",
        back="Swith Cape",waist="Witful Belt",legs="Rubeus Spats",feet="Rostrum Pumps"}
    sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
	sets.precast.FC['Healing Magic'] = set_combine(sets.precast.FC, {body="Heka's Kalasiris"})
    
    -- Weaponskill sets
    -- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS = {
        head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
        body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
        back="Pahtli Cape",waist="Cascade Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
    -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
    sets.precast.WS['Myrkr'] = {
        head="Nahtirah Hat",ear1="Gifted Earring",ear2="Loquacious Earring",
        body="Convoker's Doublet",hands="Caller's Bracers +2",ring1="Evoker's Ring",ring2="Sangoma Ring",
        back="Pahtli Cape",waist="Fucho-no-Obi",legs="Nares Trews",feet="Chelona Boots +1"}
    
    --------------------------------------
    -- Midcast sets
    --------------------------------------
    sets.midcast.FastRecast = {
        head="Nahtirah Hat",ear2="Loquacious Earring",
        body="Vanir Cotehardie",hands="Bokwus Gloves",ring1="Prolix Ring",
        back="Swith Cape +1",waist="Witful Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
    sets.midcast.Cure = {main="Arka IV",sub="Bugard Strap +1",
        head="Nares Cap",neck="Phalaina Locket",ear1="Magnetic Earring",
        body="Heka's Kalasiris",hands="Serpentes Cuffs",ring1="Tamas Ring",
        back="Swith Cape +1",waist="Penitent's Rope",legs="Nares Trews",feet="Serpentes Sabots"}
	sets.midcast.CureWithLightWeather = {waist="Hachirin-no-Obi"}
	
    sets.midcast.Stoneskin = {main="Kirin's Pole",sub="Bugard Strap+1", neck="Colossus's Torque", body="Anhur Robe",waist="Penitent's Rope",ring1="Tamas Ring",
		back="Merciful Cape",legs="Nares Trews",feet="Rubeus Boots"}
	sets.midcast.Barfira = sets.midcast.Stoneskin
	sets.midcast.Baraera = sets.midcast.Stoneskin
	sets.midcast.Barblizzara = sets.midcast.Stoneskin
	sets.midcast.Barwatera = sets.midcast.Stoneskin
	sets.midcast.Barthundra = sets.midcast.Stoneskin
	sets.midcast.Barstonra = sets.midcast.Stoneskin
	sets.midcast.Barvira = sets.midcast.Stoneskin
	sets.midcast.Barsleepra = sets.midcast.Stoneskin
	sets.midcast.Barparalyzra = sets.midcast.Stoneskin
	sets.midcast.Barpoisonra = sets.midcast.Stoneskin
	sets.midcast.Barblindra = sets.midcast.Stoneskin
	sets.midcast.Barsilencera = sets.midcast.Stoneskin
	sets.midcast.Barpetra = sets.midcast.Stoneskin
	sets.midcast.Barfire = sets.midcast.Stoneskin
	sets.midcast.Baraero = sets.midcast.Stoneskin
	sets.midcast.Barblizzard = sets.midcast.Stoneskin
	sets.midcast.Barwater = sets.midcast.Stoneskin
	sets.midcast.Barthunder = sets.midcast.Stoneskin
	sets.midcast.Barstone = sets.midcast.Stoneskin
	sets.midcast.Barvirus = sets.midcast.Stoneskin
	sets.midcast.Barsleep = sets.midcast.Stoneskin
	sets.midcast.Barparalyze = sets.midcast.Stoneskin
	sets.midcast.Barpoison = sets.midcast.Stoneskin
	sets.midcast.Barblind = sets.midcast.Stoneskin
	sets.midcast.Barsilence = sets.midcast.Stoneskin
	sets.midcast.Barpetrify = sets.midcast.Stoneskin
	
    sets.midcast['Elemental Magic'] = {main="Lehbrailg +2",sub="Wizzan Grip",
        head="Hagondes Hat",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Hecate's Earring",
        body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Icesoul Ring",ring2="Acumen Ring",
        back="Toro Cape",waist=gear.ElementalBelt,legs="Hagondes Pants",feet="Hagondes Sabots"}
    sets.midcast['Dark Magic'] = {main="Lehbrailg +2",sub="Wizzan Grip",
        head="Nahtirah Hat",neck="Aesir Torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
        body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Excelsis Ring",ring2="Sangoma Ring",
        waist="Fuchi-no-Obi",legs="Bokwus Slops",feet="Bokwus Boots"}
    -- Avatar pact sets.  All pacts are Ability type.
    
    sets.midcast.Pet.BloodPactWard = {main="Soulscourge",sub="Vox Grip",head="Caller's Horn +2",neck="Caller's Pendant", ammo="Eminent Sachet",
        body="Anhur Robe",hands="Summoner's Bracers +2",ring2="Evoker's Ring",ring1="Fervor Ring",
        legs="Caller's Spats +2",waist="Cimmerian Sash",feet="Rubeus Boots"}
    sets.midcast.Pet.DebuffBloodPactWard = {main="Soulscourge",ammo="Eminent Sachet",
        head="Caller's Horn +2",neck="Caller's Pendant",
        body="Caller's Doublet +2",hands="Summoner's Bracers +2",ring2="Evoker's Ring",ring1="Fervor Ring",
        waist="Cimmerian Sash",legs="Caller's Spats +2",feet="Caller's Pigaches +2"}
        
    sets.midcast.Pet.DebuffBloodPactWard.Acc = sets.midcast.Pet.DebuffBloodPactWard
    
    sets.midcast.Pet.PhysicalBloodPactRage = {main="Soulscourge",ammo="Eminent Sachet",
        head="Caller's Horn +2",neck="Caller's Pendant",
        body="Caller's Doublet +2",hands="Summoner's Bracers +2",ring1="Evoker's Ring",ring2="Fervor Ring",
        waist="Cimmerian Sash",legs="Caller's Spats +2",feet="Summoner's Pigaches"}
    sets.midcast.Pet.PhysicalBloodPactRage.Acc = sets.midcast.Pet.PhysicalBloodPactRage
    sets.midcast.Pet.MagicalBloodPactRage = {main="Balsam Staff",ammo="Eminent Sachet",
        head="Caller's Horn +2",neck="Caller's Pendant",
        body="Caller's Doublet +2",hands="Glyphic Bracers",ring1="Evoker's Ring",ring2="Fervor Ring",
        back="Tiresias' Cape",waist="Cimmerian Sash",legs="Caller's Spats +2",feet="Caller's Pigaches +2"}
    sets.midcast.Pet.MagicalBloodPactRage.Acc = sets.midcast.Pet.MagicalBloodPactRage
    -- Spirits cast magic spells, which can be identified in standard ways.
    
    sets.midcast.Pet.WhiteMagic = {legs="Summoner's Spats"}
    
    sets.midcast.Pet['Elemental Magic'] = set_combine(sets.midcast.Pet.BloodPactRage, {legs="Summoner's Spats"})
    sets.midcast.Pet['Elemental Magic'].Resistant = {}
    
    --------------------------------------
    -- Idle/resting/defense/etc sets
    --------------------------------------
    
    -- Resting sets
    sets.resting = sets.idle
    
    -- Idle sets
    sets.idle = {main="Owleyes",sub="Genbu's Shield",
        head="Caller's Horn +2",ear2="Moonshade Earring",ear1="Loquacious Earring",
        body="Orvail Robe",hands="Serpentes Cuffs",ring1="Dark Ring",ring2="Evoker's Ring",
        back="Merciful Cape",waist="Tarutaru Sash",legs="Tatsumaki Sitagoromo",feet="Serpentes Sabots"}
    sets.idle.PDT = {main=gear.Staff.PDT,sub="Vox Grip",ammo="Eminent Sachet",
        head="Convoker's Horn",neck="Twilight Torque",ear1="Gifted Earring",ear2="Loquacious Earring",
        body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2="Sangoma Ring",
        back="Umbra Cape",waist="Fucho-no-Obi",legs="Hagondes Pants",feet="Herald's Gaiters"}
    -- perp costs:
    -- spirits: 7
    -- carby: 11 (5 with mitts)
    -- fenrir: 13
    -- others: 15
    -- avatar's favor: -4/tick
    
    -- Max useful -perp gear is 1 less than the perp cost (can't be reduced below 1)
    -- Aim for -14 perp, and refresh in other slots.
    
    -- -perp gear:
    -- Gridarvor: -5
    -- Glyphic Horn: -4
    -- Caller's Doublet +2/Glyphic Doublet: -4
    -- Evoker's Ring: -1
    -- Convoker's Pigaches: -4
    -- total: -18
    
    -- Can make due without either the head or the body, and use +refresh items in those slots.
    
    sets.idle.Avatar = {main="Chatoyant Staff",sub="Vox Grip",ammo="Eminent Sachet",
        head="Caller's Horn +2",neck="Caller's Pendant",ear1="Caller's Earring",ear2="Moonshade Earring",
        body="Caller's Doublet +2",hands="Serpentes Cuffs",ring2="Evoker's Ring",ring1="Dark Ring",
        back="Merciful Cape",waist="Moepapa Stone",legs="Nares Trews",feet="Caller's Pigaches +2"}
    sets.idle.PDT.Avatar = {main="Gridarvor",sub="Vox Grip",ammo="Eminent Sachet",
        head="Convoker's Horn",neck="Caller's Pendant",ear1="Gifted Earring",ear2="Loquacious Earring",
        body="Hagondes Coat",hands="Regimen Mittens",ring1="Evoker's Ring",ring2="Defending Ring",
        back="Conveyance Cape",waist="Fucho-no-Obi",legs="Hagondes Pants",feet="Convoker's Pigaches"}
    sets.idle.Spirit = {main="Chatoyant Staff",sub="Vox Grip",ammo="Eminent Sachet",
        head="Caller's Horn +2",neck="Caller's Pendant",ear1="Caller's Earring",ear2="Moonshade Earring",
        body="Caller's Doublet +2",hands="Serpentes Cuffs",ring2="Evoker's Ring",ring1="Dark Ring",
        back="Merciful Cape",waist="Moepapa Stone",legs="Summoner's Spats",feet="Caller's Pigaches +2"}
    sets.idle.Town = {main="Owleyes",sub="Genbu's Shield",ammo="Eminent Sachet",
        head="Caller's Horn +2",ear2="Moonshade Earring",ear1="Loquacious Earring",
        body="Orvail Robe",hands="Serpentes Cuffs",ring1="Dark Ring",ring2="Evoker's Ring",
        back="Merciful Cape",waist="Tarutaru Sash",legs="Tatsumaki Sitagoromo",feet="Serpentes Sabots"}
    -- Favor uses Caller's Horn instead of Convoker's Horn for refresh
    sets.idle.Avatar.Favor = {head="Caller's Horn +2",sub="Vox Grip",neck="Caller's Pendant",
        body="Anhur Robe",hands="Summoner's Bracers +2",ring2="Evoker's Ring",ring1="Fervor Ring",
        legs="Caller's Spats +2",waist="Cimmerian Sash",feet="Caller's Pigaches +2"}
    sets.idle.Avatar.Melee = {hands="Regimen Mittens",back="Samanisi Cape",waist="Kuku Stone",legs="Convoker's Spats"}
        
    sets.perp = {}
    -- Caller's Bracer's halve the perp cost after other costs are accounted for.
    -- Using -10 (Gridavor, ring, Conv.feet), standard avatars would then cost 5, halved to 2.
    -- We can then use Hagondes Coat and end up with the same net MP cost, but significantly better defense.
    -- Weather is the same, but we can also use the latent on the pendant to negate the last point lost.
    sets.perp.Day = {hands="Caller's Bracers +2"}
    sets.perp.Weather = {neck="Caller's Pendant",hands="Caller's Bracers +2"}
    -- Carby: Mitts+Conv.feet = 1/tick perp.  Everything else should be +refresh
    sets.perp.Carbuncle = {main="Chatoyant Staff",sub="Vox Grip",
        head="Caller's Horn +2",body="Orvail Robe",hands="Carbuncle Mitts",legs="Nares Trews",feet="Caller's Pigaches +2"}
    -- Garuda Perp:
    sets.perp.Garuda = {main="Vayuvata III",sub="Vox Grip",ammo="Eminent Sachet",
        head="Caller's Horn +2",neck="Caller's Pendant",ear1="Caller's Earring",ear2="Moonshade Earring",
        body="Caller's Doublet +2",hands="Serpentes Cuffs",ring2="Evoker's Ring",ring1="Dark Ring",
        back="Merciful Cape",waist="Moepapa Stone",legs="Nares Trews",feet="Caller's Pigaches +2"}
    -- Diabolos's Rope doesn't gain us anything at this time
    --sets.perp.Diabolos = {waist="Diabolos's Rope"}
    sets.perp.Alexander = sets.midcast.Pet.BloodPactWard
    sets.perp.staff_and_grip = {main=gear.perp_staff,sub="Vox Grip"}
    
    -- Defense sets
    sets.defense.PDT = {main=gear.Staff.PDT,
        head="Hagondes Hat",neck="Wiglen Gorget",ear1="Gifted Earring",ear2="Loquacious Earring",
        body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2=gear.DarkRing.physical,
        back="Umbra Cape",waist="Fucho-no-Obi",legs="Hagondes Pants",feet="Hagondes Sabots"}
    sets.defense.MDT = {
        head="Hagondes Hat",neck="Twilight Torque",ear1="Gifted Earring",ear2="Loquacious Earring",
        body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2="Shadow Ring",
        back="Umbra Cape",waist="Fucho-no-Obi",legs="Bokwus Slops",feet="Hagondes Sabots"}
    sets.Kiting = {legs="Tatsumaki Sitagoromo"}
    
    sets.latent_refresh = {waist="Fucho-no-obi"}
    
    --------------------------------------
    -- Engaged sets
    --------------------------------------
    
    -- Normal melee group
    sets.engaged = {ammo="Eminent Sachet",
        head="Zelus Tiara",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
        body="Vanir Cotehardie",hands="Bokwus Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
        back="Umbra Cape",waist="Goading Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
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 state.Buff['Astral Conduit'] and pet_midaction() then
        eventArgs.handled = true
    end
end
function job_midcast(spell, action, spellMap, eventArgs)
    if state.Buff['Astral Conduit'] and pet_midaction() then
        eventArgs.handled = true
    end
end
-- Runs when pet completes an action.
function job_pet_aftercast(spell, action, spellMap, eventArgs)
    if not spell.interrupted and spell.type == 'BloodPactWard' and spellMap ~= 'DebuffBloodPactWard' then
        wards.flag = true
        wards.spell = spell.english
        send_command('wait 4; gs c reset_ward_flag')
    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
        handle_equipping_gear(player.status)
    elseif storms:contains(buff) then
        handle_equipping_gear(player.status)
    end
end
-- Called when the player's pet's status changes.
-- This is also called after pet_change after a pet is released.  Check for pet validity.
function job_pet_status_change(newStatus, oldStatus, eventArgs)
    if pet.isvalid and not midaction() and not pet_midaction() and (newStatus == 'Engaged' or oldStatus == 'Engaged') then
        handle_equipping_gear(player.status, newStatus)
    end
end
-- Called when a player gains or loses a pet.
-- pet == pet structure
-- gain == true if the pet was gained, false if it was lost.
function job_pet_change(petparam, gain)
    classes.CustomIdleGroups:clear()
    if gain then
        if avatars:contains(pet.name) then
            classes.CustomIdleGroups:append('Avatar')
        elseif spirits:contains(pet.name) then
            classes.CustomIdleGroups:append('Spirit')
        end
    else
        select_default_macro_book('reset')
    end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
    if default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
        if world.weather_element == 'Light' or world.day_element == 'Light' then
            return 'CureWithLightWeather'
        end
    elseif spell.type == 'BloodPactRage' then
        if magicalRagePacts:contains(spell.english) then
            return 'MagicalBloodPactRage'
        else
            return 'PhysicalBloodPactRage'
        end
    elseif spell.type == 'BloodPactWard' and spell.target.type == 'MONSTER' then
        return 'DebuffBloodPactWard'
    end
end
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
    if pet.isvalid then
        if pet.element == world.day_element then
            idleSet = set_combine(idleSet, sets.perp.Day)
        end
        if pet.element == world.weather_element then
            idleSet = set_combine(idleSet, sets.perp.Weather)
        end
        if sets.perp[pet.name] then
            idleSet = set_combine(idleSet, sets.perp[pet.name])
        end
        gear.perp_staff.name = elements.perpetuance_staff_of[pet.element]
        if gear.perp_staff.name and (player.inventory[gear.perp_staff.name] or player.wardrobe[gear.perp_staff.name]) then
            idleSet = set_combine(idleSet, sets.perp.staff_and_grip)
        end
        if state.Buff["Avatar's Favor"] and avatars:contains(pet.name) then
            idleSet = set_combine(idleSet, sets.idle.Avatar.Favor)
        end
        if pet.status == 'Engaged' then
            idleSet = set_combine(idleSet, sets.idle.Avatar.Melee)
        end
    end
    
    if player.mpp < 51 then
        idleSet = set_combine(idleSet, sets.latent_refresh)
    end
    
    return idleSet
end
-- Called by the 'update' self-command, for common needs.
-- Set eventArgs.handled to true if we don't want automatic equipping of gear.
function job_update(cmdParams, eventArgs)
    classes.CustomIdleGroups:clear()
    if pet.isvalid then
        if avatars:contains(pet.name) then
            classes.CustomIdleGroups:append('Avatar')
        elseif spirits:contains(pet.name) then
            classes.CustomIdleGroups:append('Spirit')
        end
    end
end
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
end
-------------------------------------------------------------------------------------------------------------------
-- User self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Called for custom player commands.
function job_self_command(cmdParams, eventArgs)
    if cmdParams[1]:lower() == 'petweather' then
        handle_petweather()
        eventArgs.handled = true
    elseif cmdParams[1]:lower() == 'siphon' then
        handle_siphoning()
        eventArgs.handled = true
    elseif cmdParams[1]:lower() == 'pact' then
        handle_pacts(cmdParams)
        eventArgs.handled = true
    elseif cmdParams[1] == 'reset_ward_flag' then
        wards.flag = false
        wards.spell = ''
        eventArgs.handled = true
    end
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Cast the appopriate storm for the currently summoned avatar, if possible.
function handle_petweather()
    if player.sub_job ~= 'SCH' then
        add_to_chat(122, "You can not cast storm spells")
        return
    end
        
    if not pet.isvalid then
        add_to_chat(122, "You do not have an active avatar.")
        return
    end
    
    local element = pet.element
    if element == 'Thunder' then
        element = 'Lightning'
    end
    
    if S{'Light','Dark','Lightning'}:contains(element) then
        add_to_chat(122, 'You do not have access to '..elements.storm_of[element]..'.')
        return
    end 
    
    local storm = elements.storm_of[element]
    
    if storm then
        send_command('@input /ma "'..elements.storm_of[element]..'" <me>')
    else
        add_to_chat(123, 'Error: Unknown element ('..tostring(element)..')')
    end
end
-- Custom uber-handling of Elemental Siphon
function handle_siphoning()
    if areas.Cities:contains(world.area) then
        add_to_chat(122, 'Cannot use Elemental Siphon in a city area.')
        return
    end
    local siphonElement
    local stormElementToUse
    local releasedAvatar
    local dontRelease
    
    -- If we already have a spirit out, just use that.
    if pet.isvalid and spirits:contains(pet.name) then
        siphonElement = pet.element
        dontRelease = true
        -- If current weather doesn't match the spirit, but the spirit matches the day, try to cast the storm.
        if player.sub_job == 'SCH' and pet.element == world.day_element and pet.element ~= world.weather_element then
            if not S{'Light','Dark','Lightning'}:contains(pet.element) then
                stormElementToUse = pet.element
            end
        end
    -- If we're subbing /sch, there are some conditions where we want to make sure specific weather is up.
    -- If current (single) weather is opposed by the current day, we want to change the weather to match
    -- the current day, if possible.
    elseif player.sub_job == 'SCH' and world.weather_element ~= 'None' then
        -- We can override single-intensity weather; leave double weather alone, since even if
        -- it's partially countered by the day, it's not worth changing.
        if get_weather_intensity() == 1 then
            -- If current weather is weak to the current day, it cancels the benefits for
            -- siphon.  Change it to the day's weather if possible (+0 to +20%), or any non-weak
            -- weather if not.
            -- If the current weather matches the current avatar's element (being used to reduce
            -- perpetuation), don't change it; just accept the penalty on Siphon.
            if world.weather_element == elements.weak_to[world.day_element] and
                (not pet.isvalid or world.weather_element ~= pet.element) then
                -- We can't cast lightning/dark/light weather, so use a neutral element
                if S{'Light','Dark','Lightning'}:contains(world.day_element) then
                    stormElementToUse = 'Wind'
                else
                    stormElementToUse = world.day_element
                end
            end
        end
    end
    
    -- If we decided to use a storm, set that as the spirit element to cast.
    if stormElementToUse then
        siphonElement = stormElementToUse
    elseif world.weather_element ~= 'None' and (get_weather_intensity() == 2 or world.weather_element ~= elements.weak_to[world.day_element]) then
        siphonElement = world.weather_element
    else
        siphonElement = world.day_element
    end
    
    local command = ''
    local releaseWait = 0
    
    if pet.isvalid and avatars:contains(pet.name) then
        command = command..'input /pet "Release" <me>;wait 1.1;'
        releasedAvatar = pet.name
        releaseWait = 10
    end
    
    if stormElementToUse then
        command = command..'input /ma "'..elements.storm_of[stormElementToUse]..'" <me>;wait 4;'
        releaseWait = releaseWait - 4
    end
    
    if not (pet.isvalid and spirits:contains(pet.name)) then
        command = command..'input /ma "'..elements.spirit_of[siphonElement]..'" <me>;wait 4;'
        releaseWait = releaseWait - 4
    end
    
    command = command..'input /ja "Elemental Siphon" <me>;'
    releaseWait = releaseWait - 1
    releaseWait = releaseWait + 0.1
    
    if not dontRelease then
        if releaseWait > 0 then
            command = command..'wait '..tostring(releaseWait)..';'
        else
            command = command..'wait 1.1;'
        end
        
        command = command..'input /pet "Release" <me>;'
    end
    
    if releasedAvatar then
        command = command..'wait 1.1;input /ma "'..releasedAvatar..'" <me>'
    end
    
    send_command(command)
end
-- Handles executing blood pacts in a generic, avatar-agnostic way.
-- cmdParams is the split of the self-command.
-- gs c [pact] [pacttype]
function handle_pacts(cmdParams)
    if areas.Cities:contains(world.area) then
        add_to_chat(122, 'You cannot use pacts in town.')
        return
    end
    if not pet.isvalid then
        add_to_chat(122,'No avatar currently available. Returning to default macro set.')
        select_default_macro_book('reset')
        return
    end
    if spirits:contains(pet.name) then
        add_to_chat(122,'Cannot use pacts with spirits.')
        return
    end
    if not cmdParams[2] then
        add_to_chat(123,'No pact type given.')
        return
    end
    
    local pact = cmdParams[2]:lower()
    
    if not pacts[pact] then
        add_to_chat(123,'Unknown pact type: '..tostring(pact))
        return
    end
    
    if pacts[pact][pet.name] then
        if pact == 'astralflow' and not buffactive['astral flow'] then
            add_to_chat(122,'Cannot use Astral Flow pacts at this time.')
            return
        end
        
        -- Leave out target; let Shortcuts auto-determine it.
        send_command('@input /pet "'..pacts[pact][pet.name]..'"')
    else
        add_to_chat(122,pet.name..' does not have a pact of type ['..pact..'].')
    end
end
-- Event handler for updates to player skill, since we can't rely on skill being
-- correct at pet_aftercast for the creation of custom timers.
windower.raw_register_event('incoming chunk',
    function (id)
        if id == 0x62 then
            if wards.flag then
                create_pact_timer(wards.spell)
                wards.flag = false
                wards.spell = ''
            end
        end
    end)
-- Function to create custom timers using the Timers addon.  Calculates ward duration
-- based on player skill and base pact duration (defined in job_setup).
function create_pact_timer(spell_name)
    -- Create custom timers for ward pacts.
    if wards.durations[spell_name] then
        local ward_duration = wards.durations[spell_name]
        if ward_duration < 181 then
            local skill = player.skills.summoning_magic
            if skill > 300 then
                skill = skill - 300
                if skill > 200 then skill = 200 end
                ward_duration = ward_duration + skill
            end
        end
        
        local timer_cmd = 'timers c "'..spell_name..'" '..tostring(ward_duration)..' down'
        
        if wards.icons[spell_name] then
            timer_cmd = timer_cmd..' '..wards.icons[spell_name]
        end
        send_command(timer_cmd)
    end
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book(reset)
    if reset == 'reset' then
        -- lost pet, or tried to use pact when pet is gone
    end
    
    -- Default macro set/book
    set_macro_page(4, 16)
end
 
            
            
                
			
			By Aeyela 2015-09-04 07:36:42			
			
						
                     
                 Why not just put this: Code          if world.weather_element == 'Light' or world.day_element == 'Light' then
            equip({waist="Hachirin-no-Obi"})
        end
If you're not using Hachirin-no-Obi anywhere else, no need to overcomplicate your code by adding more functions. You probably don't even need to have the weather check inside a separate function. Just add it to your midcast under Cures. I have the above inside the midcast function inside the cure part, beneath the line equipping my cure midcast set... So it only equips the waist if the weather is present, otherwise it'll use the regular midcast cure waist.                                     
            
                
                    
                    
                    
                                                            
                                                    
                                                                            
                                Server: Asura Game: FFXI Posts: 95 
                
			
			By Asura.Omnijuggernaut 2015-09-04 09:59:52			
			
						
                     
                 Asura.Omnijuggernaut said: »Is there a way to set it to nuke in weather obi based off day/weather?
 Like auto set the belt if it aligns?
Yes there is, and it's built-in to your file structure. Towards the top of your file, you'll see a line that says:
 
gear.default.obi_waist = "Sekhmet Corset"
 
Change that Sekhmet Corset to whatever belt you want to equip if the weather/day does not match. Then, in your sets, change the waist to: 
 
waist=gear.ElementalObi
 
This will automatically equip it if the weather/day matches and not require adding anything else.
got it, ty, the other way was screwing with my enhance duration for some reason.                                     
            
            
                
			
			By Ulthakptah 2015-09-04 13:16:29			
			
						
                     
                 I have a morally grey question about gearswap. You know how when you get charmed you can't use menus or anything? During that time can gearswap still change your equipment?                                             
                    [+]
                                              
            
                
                    
                    
                    
                                                            
                                                    
                                                                            
                                Server: Asura Game: FFXI Posts: 95 
                
			
			By Asura.Omnijuggernaut 2015-09-05 14:29:10			
			
						
                     
                 I have a morally grey question about gearswap. You know how when you get charmed you can't use menus or anything? During that time can gearswap still change your equipment?
I am in with this guy.
 
Also I feel like I am bugging Vafruvant, can I make the gs set certain weapons to be wielded based off the sub job I use? i.e. /nin or /dnc it sets a sword as offhand?
 
Even further can I set it based on zone? That way low lvl zones I dual occ/attk style weapons?                                     
            
                
                     Bismarck.Inference
                                                    
                                                                            
                                Server: Bismarck Game: FFXI Posts: 417 
                
			
			By Bismarck.Inference 2015-09-05 16:08:35			
			
						
                     
                 Asura.Omnijuggernaut said: »can I make the gs set certain weapons to be wielded based off the sub job I use? i.e. /nin or /dnc it sets a sword as offhand?
 Even further can I set it based on zone? That way low lvl zones I dual occ/attk style weapons?
Yes, there is player.sub_job and world.zone(or world.area) which hold strings of the information you're looking for. Example :
 Code  
if player.sub_job == 'NIN' then
   do something /NIN specific
end
if world.area == 'Ceizak Battlegrounds' then
   do something Ceizak related
end
Haven't toyed with Mote's in a long time so I'm not sure the best place to put the code chunks...for simplicity I'd probably make an event to modify my default gearsets directly on zone or subjob change.                                     
            
                
                     Ragnarok.Boq
                                                    
                                                                            
                                Server: Ragnarok Game: FFXI Posts: 31 
                
			
			By Ragnarok.Boq 2015-09-08 09:06:18			
			
						
                     
                 Quote:  Why not just put this:Code
 1
 2
 3
 if world.weather_element == 'Light' or world.day_element == 'Light' then
 equip({waist="Hachirin-no-Obi"})
 end
 
 
 If you're not using Hachirin-no-Obi anywhere else, no need to overcomplicate your code by adding more functions. You probably don't even need to have the weather check inside a separate function. Just add it to your midcast under Cures. I have the above inside the midcast function inside the cure part, beneath the line equipping my cure midcast set... So it only equips the waist if the weather is present, otherwise it'll use the regular midcast cure waist.
Thanks for your help! That helped me understand GS a bit better. I am new to GS and am still getting used to it.                                     
    
    
        
        Just looking for someone to explain this addon a bit for me. It looks like it is an alternative to Spellcast. 
 Is it going to be replacing Spellcast? In which ways is it better or worse. I don't know any programming but I've slowly learned more and more about spellcast and the 'language' used in gearswap is confusing to me.
 
 It says it uses packets so it potentially could be more detectable? but does that also eliminate any lag that spellcast may encounter?
 
 I plan on redoing my PUP xml to include pet casting sets thanks to the new addon petschool. I'm just not sure if it's worth it to just wait until gearswap gets more popular or to go ahead and do it in spellcast.
 
 If anyone could give me more info I'd greatly appreciate it.
 |  |