Item Search
     
BG-Wiki Search
Page 213 of 302 FirstFirst ... 163 203 211 212 213 214 215 223 263 ... LastLast
Results 4241 to 4260 of 6036

Thread: Gearswap Help Thread!     submit to reddit submit to twitter

  1. #4241
    New Merits
    Join Date
    Jul 2011
    Posts
    245
    BG Level
    4
    FFXIV Character
    Already Banned
    FFXIV Server
    Hyperion
    FFXI Server
    Quetzalcoatl

    Quote Originally Posted by dlsmd View Post
    are you using motes include?? if so i have no idea how it works
    this will only work if your using your own hand built file put this in your status_change function
    Code:
        if new == "Idle" then
             if player.mpp <= 60 then
                 equip(sets.Idle.lowmp)
             else
                 equip(sets.Idle.normal)
             end
         end
    if your using my include just add this to your mf.status_change function
    Code:
        if new == "Idle" and player.mpp <= 60 then
            sets.building[current_event] = set_combine(sets.building[current_event], sets[current_event]lowmp)
        end
    Yeah i'm using the default mote include. I'll try to see if I can get your includes to work, but not sure if thats gonna break all my lua scripts or not. Or is there a way to get what I want without having to change includes?

    Edit: Yeah not sure how to get your includes to work with my current LUAs, I'm getting errors when replacing Mote includes with your includes.

  2. #4242
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Landsoul View Post
    Yeah i'm using the default mote include. I'll try to see if I can get your includes to work, but not sure if thats gonna break all my lua scripts or not. Or is there a way to get what I want without having to change includes?

    Edit: Yeah not sure how to get your includes to work with my current LUAs, I'm getting errors when replacing Mote includes with your includes.
    yah you cant just transfer from motes to mine thay work completely different
    you would have to rebuild your whole setup

    i have looked at some of motes files
    all the jobs that might need refresh gear should have a function called customize_idle_set with if player.mpp < 51 then in them already

    provided i can get byrth to accept my latest push for gearswap my include will be finished with:
    1.auto waltz adjust when used on self(based on gear and player stats and availability of tp,buffs)
    2.auto cure spell adjustments (based on mp,gear,targets missing hp,buffs)
    3.auto samba adjustments (based on tp)
    4.ring timer(for xp,cp ring)--not enabled
    5.step control (auto stop steps when thay reach a set value)
    6.ws_gear based on spell element
    7.obi_gear based on spell element
    8.aggro counter
    9.auto aoe ws change based on how many mobs are attacking you, party, alliance or all
    10.auto nin tool, ammo and cor card un boxing
    11.thf th counter and auto change of th weapon*
    12.auto saving of player settings so most of the settings stay the same from play to play
    13.magen staves auto change
    14.auto conquest gear change
    15.advanced debug mode
    16.auto nin wheel tool*
    17.and a display to show and make all adjustments
    18+.plus much more
    (*) un tested but will be

  3. #4243
    Cerberus
    Join Date
    May 2009
    Posts
    437
    BG Level
    4
    FFXI Server
    Gilgamesh

    ok, so my GS files are "out of date" whenever i log in, and i kind of want to fix this now.i dont know what a sidecar file is or whatever. im not really sure where to start. can someone maybe use my mules brd lua to demonstrate?
    Code:
     include('organizer-lib.lua') -------------------------------------------------------------------------------------------------------------------
    -- Initialization function that defines sets and variables to be used.
    -------------------------------------------------------------------------------------------------------------------
    
    -- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.
    
    --[[
    	Custom commands:
    	
    	Terpander has a set of modes: None, Dummy, Terpander
    	
    	You can set these via the standard 'set' and 'cycle' self-commands.  EG:
    	gs c cycle Terpander
    	gs c set Terpander Dummy
    	
    	The Dummy state will equip the Terpander and ensure non-duration gear is equipped.
    	The Terpander state will simply equip the Terpander on top of standard gear.
    	
    	Use the Dummy version to put up dummy songs that can be overwritten by full-potency songs.
    	
    	Use the Terpander version to simply put up additional songs without worrying about dummy songs.
    	
    	
    	Simple macro to cast a dummy Terpander song:
    	/console gs c set Terpander Dummy
    	/ma "Shining Fantasia" <me>
    	
    	
    	There is also an auto-handling of Terpander songs, via the state.AutoTerpander flag:
    	
    	If state.TerpanderMode is None, and if currently tracked songs (via timers) is less
    	than the max we could sing while using the Terpander, and if the song is cast on
    	self (rather than Pianissimo on another player), then it will equip the Terpander on
    	top of standard duration gear.
    
    --]]
    
    -- Initialization function for this job file.
    function get_sets()
    include('organizer-lib.lua')
    	-- Load and initialize the include file.
    	include('Mote-Include.lua')
    end
    
    
    -- Setup vars that are user-independent.
    function job_setup()
    	state.Buff['Pianissimo'] = buffactive['pianissimo'] or true
    
    	options.TerpanderModes = {'None','Dummy','Terpander'}
    	state.TerpanderMode = 'None'
    
    	-- For tracking current recast timers via the Timers plugin.
    	timer_reg = {}
    end
    
    
    -- Setup vars that are user-dependent.  Can override this function in a sidecar file.
    function user_setup()
    	-- Options: Override default values
    	options.CastingModes = {'None', 'Normal'}
    	options.DefenseModes = {'Normal'}
    	options.IdleModes = {'Normal', 'PDT', 'MP'}
    	options.RestingModes = {'Normal'}
    	options.PhysicalDefenseModes = {'PDT'}
    	options.MagicalDefenseModes = {'MDT'}
    
    state.CastingMode = 'None'
    	state.Defense.PhysicalMode = 'PDT'
    
    	brd_daggers = S{'Izhiikoh', 'Vanir Knife', 'Atoyac', 'Aphotic Kukri'}
    	pick_tp_weapon()
    	
    	-- Adjust this if using the Terpander (new +song instrument)
    	info.TerpanderInstrument = 'Terpander'
    	-- How many extra songs we can keep from Terpander/Terpander
    	info.TerpanderSongs = 1
    	-- Whether to try to automatically use Terpander when an appropriate gap in current vs potential
    	-- songs appears, and you haven't specifically changed state.TerpanderMode.
    	state.AutoTerpander = false
    	
    	-- Additional local binds
    	send_command('bind ^` input /ma "Herculean Etude" <me>')
    
    	-- Default macro set/book
    	set_macro_page(2, 18)
    end
    
    
    -- Called when this job file is unloaded (eg: job change)
    function file_unload()
    	if binds_on_unload then
    		binds_on_unload()
    	end
    
    	send_command('unbind ^`')
    end
    
    
    -- Define sets and vars used by this job file.
    function init_gear_sets()
    	--------------------------------------
    	-- Start defining the sets
    	--------------------------------------
    	
    	-- Precast Sets
    
    	sets.precast.FC = {
        main={ name="Lehbrailg +1", augments={'DMG:+18','CHR+1','"Fast Cast"+4',}},
        sub="Vivid Strap",
        range={ name="Linos", augments={'Mag. Acc.+12','"Fast Cast"+4','STR+2 CHR+2',}},
        head="Nahtirah Hat",
        body="Anhur Robe",
        hands={ name="Gende. Gages +1", augments={'Phys. dmg. taken -2%','"Cure" spellcasting time -4%',}},
        legs={ name="Artsieq Hose", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        feet="Telchine Boots",
        neck="Dualism Collar",
        waist="Witful Belt",
        left_ear="Gifted Ear./ring",
        right_ear="Loquac. Earring",
        left_ring="Veneficium Ring",
        right_ring="Prolix Ring",
        back="Swith Cape +1",
    }
    
    
    	sets.precast.FC['Healing Magic'] = {
        main={ name="Lehbrailg +1", augments={'DMG:+18','CHR+1','"Fast Cast"+4',}},
        sub="Vivid Strap",
        range={ name="Linos", augments={'Mag. Acc.+12','"Fast Cast"+4','STR+2 CHR+2',}},
        head="Nahtirah Hat",
        body="Anhur Robe",
        hands={ name="Gende. Gages +1", augments={'Phys. dmg. taken -2%','"Cure" spellcasting time -4%',}},
        legs={ name="Artsieq Hose", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        feet="Telchine Boots",
        neck="Dualism Collar",
        waist="Witful Belt",
        left_ear="Gifted Earring",
        right_ear="Loquac. Earring",
        left_ring="Veneficium Ring",
        right_ring="Prolix Ring",
        back="Swith Cape +1",
    }
    
    
    	sets.precast.FC.Cure ={
        main="Apaisante",
    	    range={ name="Linos", augments={'DEF+12','"Cure" spellcasting time -6%',}},
        sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -5%',}},
        hands={ name="Gende. Gages +1", augments={'Phys. dmg. taken -2%','"Cure" spellcasting time -4%',}},
        head="Nahtirah Hat",
        body="Heka's Kalasiris",
        hands={ name="Gende. Gages +1", augments={'Phys. dmg. taken -2%','"Cure" spellcasting time -4%',}},
        legs={ name="Artsieq Hose", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        feet="Telchine Boots",
        neck="Dualism Collar",
        waist="Acerbic Sash +1",
        left_ear="Gifted Earring",
        right_ear="Loquac. Earring",
        left_ring="Veneficium Ring",
        right_ring="Prolix Ring",
        back="Pahtli Cape",
    }
    
    	sets.precast.FC.Stoneskin = set_combine(sets.precast.FC, {head="Umuthi Hat"})
    sets.precast.FC['Haste'] ={
        main={ name="Lehbrailg +1", augments={'DMG:+18','CHR+1','"Fast Cast"+4',}},
        sub="Vivid Strap",
        range={ name="Linos", augments={'Mag. Acc.+12','"Fast Cast"+4','STR+2 CHR+2',}},
        head="Nahtirah Hat",
        body="Anhur Robe",
        hands={ name="Gende. Gages +1", augments={'Phys. dmg. taken -2%','"Cure" spellcasting time -4%',}},
        legs={ name="Artsieq Hose", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        feet="Telchine Boots",
        neck="Dualism Collar",
        waist="Witful Belt",
        left_ear="Gifted Ear./ring",
        right_ear="Loquac. Earring",
        left_ring="Veneficium Ring",
        right_ring="Prolix Ring",
        back="Swith Cape +1",
    }
    sets.precast.FC['Flurry'] = {
        main={ name="Lehbrailg +1", augments={'DMG:+18','CHR+1','"Fast Cast"+4',}},
        sub="Vivid Strap",
        range={ name="Linos", augments={'Mag. Acc.+12','"Fast Cast"+4','STR+2 CHR+2',}},
        head="Nahtirah Hat",
        body="Anhur Robe",
        hands={ name="Gende. Gages +1", augments={'Phys. dmg. taken -2%','"Cure" spellcasting time -4%',}},
        legs={ name="Artsieq Hose", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        feet="Telchine Boots",
        neck="Dualism Collar",
        waist="Witful Belt",
        left_ear="Gifted Ear./ring",
        right_ear="Loquac. Earring",
        left_ring="Veneficium Ring",
        right_ring="Prolix Ring",
        back="Swith Cape +1",
    }
    	sets.precast.FC['Enhancing Magic'] =  {
        main={ name="Lehbrailg +1", augments={'DMG:+18','CHR+1','"Fast Cast"+4',}},
        sub="Arbuda Grip",
        range={ name="Linos", augments={'Mag. Acc.+12','"Fast Cast"+4','STR+2 CHR+2',}},
        head={ name="Telchine Cap", augments={'Mag. Acc.+10 "Mag.Atk.Bns."+10','"Fast Cast"+3','Enh. Mag. eff. dur. +4',}},
        body="Hedera Cotehardie",
        hands={ name="Gende. Gages +1", augments={'Phys. dmg. taken -2%','"Cure" spellcasting time -4%',}},
        legs={ name="Artsieq Hose", augments={'"Mag.Atk.Bns."+25','Mag. Evasion+10','Phys. dmg. taken -5',}},
        feet={ name="Telchine Pigaches", augments={'Mag. Evasion+17','"Fast Cast"+5','"Regen" potency+2',}},
        neck="Dualism Collar",
        waist="Goading Belt",
        left_ear="Gifted Earring",
        right_ear="Loquac. Earring",
        left_ring="Sheltered Ring",
        right_ring="Prolix Ring",
        back="Swith Cape +1",
    }
    sets.midcast['Elemental Magic'] = {
        main={ name="Lehbrailg +2", augments={'DMG:+17','INT+3','"Mag.Atk.Bns."+25',}},
        sub="Zuuxowu Grip",
        range={ name="Linos", augments={'Mag. Acc.+12','"Cure" spellcasting time -4%','STR+2 CHR+2',}},
        head={ name="Telchine Cap", augments={'Mag. Acc.+10 "Mag.Atk.Bns."+10','"Fast Cast"+3','Enh. Mag. eff. dur. +4',}},
        body={ name="Artsieq Jubbah", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        hands={ name="Artsieq Cuffs", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        legs={ name="Artsieq Hose", augments={'"Mag.Atk.Bns."+25','Mag. Evasion+10','Phys. dmg. taken -5',}},
        feet="Umbani Boots",
        neck="Dualism Collar",
        waist="Salire Belt",
        left_ear="Friomisi Earring",
        right_ear="Strophadic Earring",
        left_ring="Irrwisch Ring",
        right_ring="Acumen Ring",
        back="Toro Cape",
    }
    
    		sets.precast.FC.BardSong = {
        main="Felibre's Dague",
        sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -5%',}},
        range={ name="Linos", augments={'DEF+12','Occ. quickens spellcasting +3%',}},
        head="Aoidos' Calot +2",
        body={ name="Sha'ir Manteel", augments={'INT-2.5 MND+5 CHR-2.5',}},
        hands={ name="Gendewitha Gages", augments={'Phys. dmg. taken -2%','Song spellcasting time -5%',}},
        legs={ name="Gende. Spats +1", augments={'Phys. dmg. taken -4%','Song spellcasting time -3%',}},
        feet="Telchine Pigaches",
        neck="Aoidos' Matinee",
        waist="Witful Belt",
        left_ear="Aoidos' Earring",
        right_ear="Loquac. Earring",
        left_ring="Veneficium Ring",
        right_ring="Prolix Ring",
        back="Swith Cape +1",
    }
    	sets.precast.FC.BardSong2 = {
        main="Felibre's Dague",
        sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -5%',}},
            range={ name="Linos", augments={'DEF+12','Occ. quickens spellcasting +3%',}},
        head="Aoidos' Calot +2",
        body={ name="Sha'ir Manteel", augments={'INT-2.5 MND+5 CHR-2.5',}},
        hands={ name="Gendewitha Gages", augments={'Phys. dmg. taken -2%','Song spellcasting time -5%',}},
        legs={ name="Gende. Spats +1", augments={'Phys. dmg. taken -4%','Song spellcasting time -3%',}},
        feet="Telchine Pigaches",
        neck="Aoidos' Matinee",
        waist="Witful Belt",
        left_ear="Aoidos' Earring",
        right_ear="Loquac. Earring",
        left_ring="Veneficium Ring",
        right_ring="Prolix Ring",
        back="Swith Cape",
    }
    
    	sets.precast.FC.Terpander = set_combine(sets.precast.FC.BardSong, {range=info.TerpanderInstrument})
    		
    	
    	-- Precast sets to enhance JAs
    	
    	sets.precast.JA.Nightingale = {feet="Bihu Slippers"}
    	sets.precast.JA.Troubadour = {body="Bihu Justaucorps +1"}
    	sets.precast.JA['Soul Voice'] = {legs="Bihu Cannions +1"}
    
    	-- Waltz set (chr and vit)
    	sets.precast.Waltz = {range="Gjallarhorn",
    		head="Nahtirah Hat",
    		body="Gendewitha Bilaut",hands="Buremte Gloves",
    		back="Refraction Cape",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
    	
           
    	-- Weaponskill sets
    	-- Default set for any weaponskill that isn't any more specifically defined
    	sets.precast.WS = {
        ammo="Hasty Pinion +1",
        head="Imp. Wing Hairpin",
        body={ name="Bihu Jstcorps +1", augments={'Enhances "Troubadour" effect',}},
        hands="Umuthi Gloves",
        legs="Zoar Subligar",
        feet="Battlecast Gaiters",
        neck="Iqabi Necklace",
        waist="Anguinus Belt",
        left_ear="Bladeborn Earring",
        right_ear="Steelflash Earring",
        left_ring="Enlivened Ring",
        right_ring="Rajas Ring",
        back="Kayapa Cape",
    }
    	
    	-- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
    
    	
    	
    	-- Midcast Sets
    
    	
    		sets.midcast['Haste'] = {
        main={ name="Lehbrailg +1", augments={'DMG:+18','CHR+1','"Fast Cast"+4',}},
        sub="Arbuda Grip",
        head="Nahtirah Hat",
        body="Anhur Robe",
    
        hands="Gendewitha Gages +1",
        legs="Artsieq Hose",
        feet="Gendewitha Galoshes +1",
        neck="Dualism Collar",
        waist="Goading Belt",
        ear1="Gwati Earring",
        ear2="Loquacious Earring",
        ring1="Prolix Ring",
        ring2="Sangoma Ring",
        back="Swith Cape",
    }
    
    	sets.midcast.Haste =  {
        main={ name="Lehbrailg +1", augments={'DMG:+18','CHR+1','"Fast Cast"+4',}},
        sub="Arbuda Grip",
        range={ name="Linos", augments={'Mag. Acc.+12','"Fast Cast"+4','STR+2 CHR+2',}},
        head={ name="Telchine Cap", augments={'Mag. Acc.+10 "Mag.Atk.Bns."+10','"Fast Cast"+3','Enh. Mag. eff. dur. +4',}},
        body="Hedera Cotehardie",
        hands={ name="Gende. Gages +1", augments={'Phys. dmg. taken -2%','"Cure" spellcasting time -4%',}},
        legs={ name="Artsieq Hose", augments={'"Mag.Atk.Bns."+25','Mag. Evasion+10','Phys. dmg. taken -5',}},
        feet={ name="Telchine Pigaches", augments={'Mag. Evasion+17','"Fast Cast"+5','"Regen" potency+2',}},
        neck="Dualism Collar",
        waist="Goading Belt",
        left_ear="Gifted Earring",
        right_ear="Loquac. Earring",
        left_ring="Sheltered Ring",
        right_ring="Prolix Ring",
        back="Swith Cape +1",
    }
    	-- General set for recast times.
    	sets.midcast.FastRecast =  {
        main={ name="Lehbrailg +1", augments={'DMG:+18','CHR+1','"Fast Cast"+4',}},
        sub="Arbuda Grip",
        range={ name="Linos", augments={'Mag. Acc.+12','"Fast Cast"+4','STR+2 CHR+2',}},
        head={ name="Telchine Cap", augments={'Mag. Acc.+10 "Mag.Atk.Bns."+10','"Fast Cast"+3','Enh. Mag. eff. dur. +4',}},
        body="Hedera Cotehardie",
        hands={ name="Gende. Gages +1", augments={'Phys. dmg. taken -2%','"Cure" spellcasting time -4%',}},
        legs={ name="Artsieq Hose", augments={'"Mag.Atk.Bns."+25','Mag. Evasion+10','Phys. dmg. taken -5',}},
        feet={ name="Telchine Pigaches", augments={'Mag. Evasion+17','"Fast Cast"+5','"Regen" potency+2',}},
        neck="Dualism Collar",
        waist="Goading Belt",
        left_ear="Gifted Earring",
        right_ear="Loquac. Earring",
        left_ring="Sheltered Ring",
        right_ring="Prolix Ring",
        back="Swith Cape +1",
    }
    	sets.midcast['Enhancing Magic'] =  {
        main={ name="Lehbrailg +1", augments={'DMG:+18','CHR+1','"Fast Cast"+4',}},
        sub="Arbuda Grip",
        range={ name="Linos", augments={'Mag. Acc.+12','"Fast Cast"+4','STR+2 CHR+2',}},
        head={ name="Telchine Cap", augments={'Mag. Acc.+10 "Mag.Atk.Bns."+10','"Fast Cast"+3','Enh. Mag. eff. dur. +4',}},
        body="Hedera Cotehardie",
        hands={ name="Gende. Gages +1", augments={'Phys. dmg. taken -2%','"Cure" spellcasting time -4%',}},
        legs={ name="Artsieq Hose", augments={'"Mag.Atk.Bns."+25','Mag. Evasion+10','Phys. dmg. taken -5',}},
        feet={ name="Telchine Pigaches", augments={'Mag. Evasion+17','"Fast Cast"+5','"Regen" potency+2',}},
        neck="Dualism Collar",
        waist="Goading Belt",
        left_ear="Gifted Earring",
        right_ear="Loquac. Earring",
        left_ring="Sheltered Ring",
        right_ring="Prolix Ring",
        back="Swith Cape +1",
    }
    		-- Gear to enhance certain classes of songs.  No instruments added here since Gjallarhorn is being used.
    	sets.midcast.Ballad = {}
    	sets.midcast.Lullaby = {hands="Brioso Cuffs"}
    	sets.midcast.Madrigal = {head="Aoidos' Calot +2"}
    	sets.midcast.March = {hands="Aoidos' Manchettes +2"}
    	sets.midcast.Minuet = {body="Aoidos' Hongreline +2"}
    	sets.midcast.Minne = {}
    	sets.midcast.Carol = {}
    	sets.midcast["Sentinel's Scherzo"] = {feet="Aoidos' Cothrn. +2"}
    
    
    	sets.midcast.Etude = {range=info.TerpanderInstrument}
    	
    
    	-- For song buffs (duration and AF3 set bonus)
    	sets.midcast.SongEffect = {main="Legato Dagger",sub="Genbu's Shield",range="Gjallarhorn",
    		head="Bihu Roundlet +1",neck="Aoidos' Matinee",ear1="Musical Earring", ear2="Loquacious Earring",
    		body="Aoidos' Hongreline +2",hands="Aoidos' Manchettes +2",ring2="Prolix Ring",ring1="Sangoma Ring",
    		back="Kumbira Cape",waist="Corvax Sash",legs="Aoidos' Rhing. +2",feet="Brioso Slippers +1"}
    
    	-- For song defbuffs (duration primary, accuracy secondary)
    	sets.midcast.SongDebuff = {
        main={ name="Lehbrailg +2", augments={'DMG:+16','Magic crit. hit rate +3','Mag. Acc.+30',}},
        sub="Mephitis Grip",
        range="Gjallarhorn",
        head={ name="Bihu Roundlet +1", augments={'Enhances "Foe Sirvente" effect',}},
        body={ name="Bihu Jstcorps +1", augments={'Enhances "Troubadour" effect',}},
        hands={ name="Artsieq Cuffs", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        legs={ name="Bihu Cannions +1", augments={'Enhances "Soul Voice" effect',}},
        feet={ name="Artsieq Boots", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        neck="Barcarolle Medal",
        waist="Ovate Rope",
        left_ear="Musical Earring",
        right_ear="Gwati Earring",
        left_ring="Sangoma Ring",
        right_ring="Perception Ring",
        back="Kumbira Cape",
    }
    	-- For song defbuffs (accuracy primary, duration secondary)
    	sets.midcast.ResistantSongDebuff = {
        main={ name="Lehbrailg +2", augments={'DMG:+16','Magic crit. hit rate +3','Mag. Acc.+30',}},
        sub="Mephitis Grip",
        range="Gjallarhorn",
        head={ name="Bihu Roundlet +1", augments={'Enhances "Foe Sirvente" effect',}},
        body={ name="Bihu Jstcorps +1", augments={'Enhances "Troubadour" effect',}},
        hands={ name="Artsieq Cuffs", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        legs={ name="Bihu Cannions +1", augments={'Enhances "Soul Voice" effect',}},
        feet={ name="Artsieq Boots", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        neck="Barcarolle Medal",
        waist="Ovate Rope",
        left_ear="Musical Earring",
        right_ear="Gwati Earring",
        left_ring="Sangoma Ring",
        right_ring="Perception Ring",
        back="Kumbira Cape",
    }
    sets.midcast.Stun = {
        main={ name="Lehbrailg +2", augments={'DMG:+16','Magic crit. hit rate +3','Mag. Acc.+30',}},
        sub="Vivid Strap",
        range={ name="Linos", augments={'Accuracy+2','"Fast Cast"+2',}},
        head="Nahtirah Hat",
        body="Emet Harness +1",
        hands={ name="Gende. Gages +1", augments={'Phys. dmg. taken -2%','"Cure" spellcasting time -4%',}},
        legs={ name="Artsieq Hose", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        feet={ name="Telchine Pigaches", augments={'Mag. Evasion+17','"Fast Cast"+5','"Regen" potency+2',}},
        neck="Dark Torque",
        waist="Chuq'aba Belt",
        left_ear="Gwati Earring",
        right_ear="Loquac. Earring",
        left_ring="Sangoma Ring",
        right_ring="Prolix Ring",
        back="Swith Cape +1",
    } 
    
    	sets.midcast.Stun.Resistant = {
        main={ name="Lehbrailg +2", augments={'DMG:+16','Magic crit. hit rate +3','Mag. Acc.+30',}},
        sub="Mephitis Grip",
        range={ name="Linos", augments={'Mag. Acc.+12','"Fast Cast"+4','STR+2 CHR+2',}},
        head="Nahtirah Hat",
        body={ name="Bihu Jstcorps +1", augments={'Enhances "Troubadour" effect',}},
        hands={ name="Artsieq Cuffs", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        legs={ name="Artsieq Hose", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        feet={ name="Artsieq Boots", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        neck="Dark Torque",
        waist="Ovate Rope",
        left_ear="Lifestorm Earring",
        right_ear="Psystorm Earring",
        left_ring="Sangoma Ring",
        right_ring="Perception Ring",
        back={ name="Rhapsode's Cape", augments={'HP+23','Mag. Acc.+1','Enmity-10','Damage taken-3%',}},
    }
    
    	sets.midcast['Divine Magic'] = {
        main={ name="Lehbrailg +2", augments={'DMG:+16','Magic crit. hit rate +3','Mag. Acc.+30',}},
        sub="Mephitis Grip",
        range={ name="Linos", augments={'Mag. Acc.+12','"Fast Cast"+4','STR+2 CHR+2',}},
        head={ name="Bihu Roundlet +1", augments={'Enhances "Foe Sirvente" effect',}},
        body={ name="Bihu Jstcorps +1", augments={'Enhances "Troubadour" effect',}},
        hands={ name="Artsieq Cuffs", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        legs={ name="Bihu Cannions +1", augments={'Enhances "Soul Voice" effect',}},
        feet={ name="Artsieq Boots", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        neck="Weike Torque",
        waist="Ovate Rope",
        left_ear="Lifestorm Earring",
        right_ear="Psystorm Earring",
        left_ring="Sangoma Ring",
        right_ring="Globidonta Ring",
        back={ name="Rhapsode's Cape", augments={'HP+23','Mag. Acc.+1','Enmity-10','Damage taken-3%',}},
    }
    
    sets.midcast.Repose ={
        main={ name="Lehbrailg +2", augments={'DMG:+16','Magic crit. hit rate +3','Mag. Acc.+30',}},
        sub="Mephitis Grip",
        range={ name="Linos", augments={'Mag. Acc.+12','"Fast Cast"+4','STR+2 CHR+2',}},    head={ name="Bihu Roundlet +1", augments={'Enhances "Foe Sirvente" effect',}},
        body={ name="Bihu Jstcorps +1", augments={'Enhances "Troubadour" effect',}},
        hands={ name="Artsieq Cuffs", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        legs={ name="Bihu Cannions +1", augments={'Enhances "Soul Voice" effect',}},
        feet={ name="Artsieq Boots", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        neck="Weike Torque",
        waist="Ovate Rope",
        left_ear="Lifestorm Earring",
        right_ear="Psystorm Earring",
        left_ring="Sangoma Ring",
        right_ring="Globidonta Ring",
        back={ name="Rhapsode's Cape", augments={'HP+23','Mag. Acc.+1','Enmity-10','Damage taken-3%',}},
    }
    
    	sets.midcast['Enfeebling Magic'] ={
        main={ name="Lehbrailg +2", augments={'DMG:+16','Magic crit. hit rate +3','Mag. Acc.+30',}},
        sub="Mephitis Grip",
        range={ name="Linos", augments={'Mag. Acc.+12','"Fast Cast"+4','STR+2 CHR+2',}},    head={ name="Bihu Roundlet +1", augments={'Enhances "Foe Sirvente" effect',}},
        body={ name="Bihu Jstcorps +1", augments={'Enhances "Troubadour" effect',}},
        hands={ name="Artsieq Cuffs", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        legs={ name="Bihu Cannions +1", augments={'Enhances "Soul Voice" effect',}},
        feet={ name="Artsieq Boots", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        neck="Weike Torque",
        waist="Ovate Rope",
        left_ear="Lifestorm Earring",
        right_ear="Psystorm Earring",
        left_ring="Sangoma Ring",
        right_ring="Globidonta Ring",
        back={ name="Rhapsode's Cape", augments={'HP+23','Mag. Acc.+1','Enmity-10','Damage taken-3%',}},
    }
    
    	sets.midcast['Sleep II'] ={
        main={ name="Lehbrailg +2", augments={'DMG:+16','Magic crit. hit rate +3','Mag. Acc.+30',}},
        sub="Mephitis Grip",
        range={ name="Linos", augments={'Mag. Acc.+12','"Fast Cast"+4','STR+2 CHR+2',}},
        head={ name="Bihu Roundlet +1", augments={'Enhances "Foe Sirvente" effect',}},
        body={ name="Bihu Jstcorps +1", augments={'Enhances "Troubadour" effect',}},
        hands={ name="Artsieq Cuffs", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        legs={ name="Bihu Cannions +1", augments={'Enhances "Soul Voice" effect',}},
        feet={ name="Artsieq Boots", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        neck="Weike Torque",
        waist="Ovate Rope",
        left_ear="Lifestorm Earring",
        right_ear="Psystorm Earring",
        left_ring="Sangoma Ring",
        right_ring="Globidonta Ring",
        back={ name="Rhapsode's Cape", augments={'HP+23','Mag. Acc.+1','Enmity-10','Damage taken-3%',}},
    }
    		
    		sets.midcast.Sleepga = {
        main={ name="Lehbrailg +2", augments={'DMG:+16','Magic crit. hit rate +3','Mag. Acc.+30',}},
        sub="Mephitis Grip",
        range={ name="Linos", augments={'Mag. Acc.+12','"Fast Cast"+4','STR+2 CHR+2',}},
        head={ name="Bihu Roundlet +1", augments={'Enhances "Foe Sirvente" effect',}},
        body={ name="Bihu Jstcorps +1", augments={'Enhances "Troubadour" effect',}},
        hands={ name="Artsieq Cuffs", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        legs={ name="Bihu Cannions +1", augments={'Enhances "Soul Voice" effect',}},
        feet={ name="Artsieq Boots", augments={'MP+30','Mag. Acc.+20','MND+7',}},
        neck="Weike Torque",
        waist="Ovate Rope",
        left_ear="Lifestorm Earring",
        right_ear="Psystorm Earring",
        left_ring="Sangoma Ring",
        right_ring="Globidonta Ring",
        back={ name="Rhapsode's Cape", augments={'HP+23','Mag. Acc.+1','Enmity-10','Damage taken-3%',}},
    }
    		
    	sets.midcast.Cursna =  {main="Lebrailg +2",sub='Mephitis Grip',ammo="Incantor Stone",head="Orison Cap +1",neck="Malison Medallion",ear1="Gwati Earring",ear2="Gifted Earring",
    		body="Orison Bliaud +2",hands="Dynasty Mitts",ring1="Ephedra Ring",ring2="Ephedra Ring",
    		back="Mending Cape",waist="Bishop's Sash",legs="Artsieq Hose",feet="Gendewitha Galoshes +1"}
    		
      
    		
    	sets.midcast.SongRecast = {
        main={ name="Lehbrailg +1", augments={'DMG:+18','CHR+1','"Fast Cast"+4',}},
        sub="Vivid Strap",
        range="Gjallarhorn",
        head="Nahtirah Hat",
        body="Anhur Robe",
        hands="Gendewitha Gages +1",
        feet="Telchine Boots",
        neck="Dualism Collar",
        waist="Witful Belt",
        ear1="Influx Earring",
        ear2="Loquacious Earring",
    ring2="Prolix Ring",
           ring1="Sangoma Ring",
        back="Swith Cape",legs="Aoidos' Rhing. +2"}
    
    	--sets.midcast.Terpander = set_combine(sets.midcast.FastRecast, sets.midcast.SongRecast, {range=info.TerpanderInstrument})
    
    	-- Cast spell with normal gear, except using Terpander instead
    	sets.midcast.Terpander = {range=info.TerpanderInstrument}
    
    	-- Dummy song with Terpander; minimize duration to make it easy to overwrite.
    	sets.midcast.TerpanderDummy ={
        main={ name="Lehbrailg +1", augments={'DMG:+18','CHR+1','"Fast Cast"+4',}},
        sub="Vivid Strap",
        range="Gjallarhorn",
        head="Nahtirah Hat",
        body="Anhur Robe",
        hands="Gendewitha Gages +1",
        feet="Telchine Boots",
        neck="Dualism Collar",
        waist="Witful Belt",
        ear1="Influx Earring",
        ear2="Loquacious Earring",
    ring2="Prolix Ring",
           ring1="Sangoma Ring",
        back="Swith Cape",legs="Aoidos' Rhing. +2"}
    
    		sets.midcast.CureWithLightWeather = {
        main="Galenus",
        sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -5%',}},
        range={ name="Linos", augments={'Mag. Acc.+12','"Fast Cast"+4','STR+2 CHR+2',}},
        head={ name="Gende. Caubeen +1", augments={'Phys. dmg. taken -3%','"Cure" potency +4%',}},
        body={ name="Gende. Bilaut +1", augments={'Phys. dmg. taken -2%','"Cure" potency +7%',}},
        hands={ name="Buremte Gloves", augments={'Haste+2','"Snapshot"+2','AGI+8',}},
        legs="Nares Trews",
        feet={ name="Telchine Pigaches", augments={'Mag. Evasion+17','"Fast Cast"+5','"Regen" potency+2',}},
        neck="Phrenic Torque",
        waist="Chuq'aba Belt",
        left_ear="Oneiros Earring",
        right_ear="Novia Earring",
        left_ring="Prolix Ring",
        right_ring="Kunaji Ring",
        back="Oretan. Cape +1",
    }
    		
    	-- Other general spells and classes.
    	sets.midcast.Cure = {
        main="Galenus",
        sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -5%',}},
        range={ name="Linos", augments={'Mag. Acc.+12','"Fast Cast"+4','STR+2 CHR+2',}},
        head={ name="Gende. Caubeen +1", augments={'Phys. dmg. taken -3%','"Cure" potency +4%',}},
        body={ name="Gende. Bilaut +1", augments={'Phys. dmg. taken -2%','"Cure" potency +7%',}},
        hands={ name="Buremte Gloves", augments={'Haste+2','"Snapshot"+2','AGI+8',}},
        legs="Nares Trews",
        feet={ name="Telchine Pigaches", augments={'Mag. Evasion+17','"Fast Cast"+5','"Regen" potency+2',}},
        neck="Phrenic Torque",
        waist="Chuq'aba Belt",
        left_ear="Oneiros Earring",
        right_ear="Novia Earring",
        left_ring="Prolix Ring",
        right_ring="Kunaji Ring",
        back="Oretan. Cape +1",
    }
    		
    	sets.midcast.Curaga = {
        main="Galenus",
        sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -5%',}},
        range={ name="Linos", augments={'Mag. Acc.+12','"Fast Cast"+4','STR+2 CHR+2',}},
        head={ name="Gende. Caubeen +1", augments={'Phys. dmg. taken -3%','"Cure" potency +4%',}},
        body={ name="Gende. Bilaut +1", augments={'Phys. dmg. taken -2%','"Cure" potency +7%',}},
        hands={ name="Buremte Gloves", augments={'Haste+2','"Snapshot"+2','AGI+8',}},
        legs="Nares Trews",
        feet={ name="Telchine Pigaches", augments={'Mag. Evasion+17','"Fast Cast"+5','"Regen" potency+2',}},
        neck="Phrenic Torque",
        waist="Chuq'aba Belt",
        left_ear="Oneiros Earring",
        right_ear="Novia Earring",
        left_ring="Prolix Ring",
        right_ring="Kunaji Ring",
        back="Oretan. Cape +1",
    }
    		
    	sets.midcast.Cursna = {
    		neck="Malison Medallion",
    		hands="Hieros Mittens",ring1="Ephedra Ring",ring2="Ephedra Ring"}
    
    	
    	-- Sets to return to when not performing an action.
    	
    	-- Resting sets
    	sets.resting = {main=gear.Staff.HMP, 
    		body="Gendewitha Bilaut",
    		legs="Nares Trews",feet="Telchine Boots"}
    	
    	
    	-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
    	sets.idle = {
        main={ name="Terra's Staff", augments={'Lightning resistance+15',}},
        sub="Volos Strap",
        range={ name="Linos", augments={'Mag. Evasion+15','Phys. dmg. taken -2%','MND+5',}},
        body="Respite Cloak",
        hands="Umuthi Gloves",
        legs="Assid. Pants +1",
        feet="Aoidos' Cothrn. +2",
        neck="Twilight Torque",
        waist="Fucho-no-Obi",
        left_ear="Flashward Earring",
        right_ear="Hearty Earring",
        left_ring={ name="Dark Ring", augments={'Enemy crit. hit rate -2','Magic dmg. taken -4%','Phys. dmg. taken -4%',}},
        right_ring={ name="Dark Ring", augments={'Magic dmg. taken -4%','Phys. dmg. taken -3%',}},
        back={ name="Mecisto. Mantle", augments={'Cap. Point+44%','INT+2','Accuracy+1','DEF+1',}},
    }
    
    	sets.idle.Town = {
        main={ name="Ipetam", augments={'Mag. Evasion+13','Phys. dmg. taken -4%','INT+17',}},
        sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -5%',}},
        range={ name="Linos", augments={'Mag. Evasion+15','Phys. dmg. taken -2%','MND+5',}},
        head={ name="Bihu Roundlet +1", augments={'Enhances "Foe Sirvente" effect',}},
        body={ name="Bihu Jstcorps +1", augments={'Enhances "Troubadour" effect',}},
        hands="Umuthi Gloves",
        legs={ name="Artsieq Hose", augments={'"Mag.Atk.Bns."+25','Mag. Evasion+10','Phys. dmg. taken -5',}},
        feet={ name="Gende. Galosh. +1", augments={'Phys. dmg. taken -3%','"Cure" spellcasting time -3%',}},
        neck="Twilight Torque",
        waist="Flume Belt",
        left_ear="Flashward Earring",
        right_ear="Hearty Earring",
        left_ring={ name="Dark Ring", augments={'Enemy crit. hit rate -2','Magic dmg. taken -4%','Phys. dmg. taken -4%',}},
        right_ring="Kunaji Ring",
        back="Felicitas Cape +1",
    }
    	
    	sets.idle.Weak ={
        main={ name="Ipetam", augments={'Mag. Evasion+13','Phys. dmg. taken -4%','INT+17',}},
        sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -5%',}},
        range={ name="Linos", augments={'Mag. Evasion+15','Phys. dmg. taken -2%','MND+5',}},
        head={ name="Bihu Roundlet +1", augments={'Enhances "Foe Sirvente" effect',}},
        body={ name="Bihu Jstcorps +1", augments={'Enhances "Troubadour" effect',}},
        hands="Umuthi Gloves",
        legs={ name="Artsieq Hose", augments={'"Mag.Atk.Bns."+25','Mag. Evasion+10','Phys. dmg. taken -5',}},
        feet="Coalrake Sabots",
        neck="Twilight Torque",
        waist="Flume Belt",
        left_ear="Flashward Earring",
        right_ear="Hearty Earring",
        left_ring={ name="Dark Ring", augments={'Enemy crit. hit rate -2','Magic dmg. taken -4%','Phys. dmg. taken -4%',}},
        right_ring={ name="Dark Ring", augments={'Magic dmg. taken -4%','Phys. dmg. taken -3%',}},
        back="Shadow Mantle",
    }
    	
    	
    	-- Defense sets
    
    	sets.defense.PDT ={
        main={ name="Ipetam", augments={'Mag. Evasion+13','Phys. dmg. taken -4%','INT+17',}},
        sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -5%',}},
        range={ name="Linos", augments={'Mag. Evasion+15','Phys. dmg. taken -2%','MND+5',}},
        head={ name="Bihu Roundlet +1", augments={'Enhances "Foe Sirvente" effect',}},
        body={ name="Bihu Jstcorps +1", augments={'Enhances "Troubadour" effect',}},
        hands="Umuthi Gloves",
        legs={ name="Artsieq Hose", augments={'"Mag.Atk.Bns."+25','Mag. Evasion+10','Phys. dmg. taken -5',}},
        feet="Coalrake Sabots",
        neck="Twilight Torque",
        waist="Flume Belt",
        left_ear="Flashward Earring",
        right_ear="Hearty Earring",
        left_ring={ name="Dark Ring", augments={'Enemy crit. hit rate -2','Magic dmg. taken -4%','Phys. dmg. taken -4%',}},
        right_ring={ name="Dark Ring", augments={'Magic dmg. taken -4%','Phys. dmg. taken -3%',}},
        back="Shadow Mantle",
    }
    
    			sets.idle.MP = {main="Galenus",sub="Genbu's shield",range="Gjallarhorn",
    		head="Nahtirah Hat",neck="Phrenic Torque",ear1="Gifted Earring",ear2="Loquacious Earring",
    		body="Gendewitha Bilaut +1",hands="Otomi Gloves",ring1="Dark Ring",ring2="Sangoma Ring",
    		back="Errant Cape",waist="Fucho-No-Obi",legs="Nares Trews",feet="Brioso Slippers +1"}
    	sets.defense.MDT = {
        main={ name="Ipetam", augments={'Mag. Evasion+13','Phys. dmg. taken -4%','INT+17',}},
        sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -5%',}},
        range={ name="Linos", augments={'Mag. Evasion+15','Phys. dmg. taken -2%','MND+5',}},
        head={ name="Bihu Roundlet +1", augments={'Enhances "Foe Sirvente" effect',}},
        body={ name="Telchine Chas.", augments={'Mag. Evasion+23','"Conserve MP"+5','"Regen" potency+3',}},
        hands={ name="Telchine Gloves", augments={'Mag. Evasion+18','"Cure" potency +7%','STR+6 VIT+6',}},
        legs={ name="Artsieq Hose", augments={'"Mag.Atk.Bns."+25','Mag. Evasion+10','Phys. dmg. taken -5',}},
        feet={ name="Telchine Pigaches", augments={'Mag. Evasion+17','"Fast Cast"+5','"Regen" potency+2',}},
        neck="Twilight Torque",
        waist="Slipor Sash",
        left_ear="Flashward Earring",
        right_ear="Hearty Earring",
        left_ring="Vexer Ring +1",
        right_ring="Icecrack Ring",
        back="Felicitas Cape +1",
    }
    	sets.Kiting = {Back="Mecisto. Mantle"}
    
    	-- 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.
    	 sets.engaged =    {
        sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -5%',}},
        ammo="Hasty Pinion +1",
        head={ name="Bihu Roundlet +1", augments={'Enhances "Foe Sirvente" effect',}},
        body="Emet Harness +1",
        hands="Umuthi Gloves",
        legs="Zoar Subligar",
        feet="Battlecast Gaiters",
        neck="Asperity Necklace",
        waist="Cetl Belt",
        left_ear="Steelflash Earring",
        right_ear="Bladeborn Earring",
        left_ring="Enlivened Ring",
        right_ring="Rajas Ring",
        back="Bleating Mantle",
    }
    	sets.precast.WS["Rudra's Storm"] =
    {
        sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -5%',}},
        ammo="Hasty Pinion +1",
        head="Imp. Wing Hairpin",
        body={ name="Bihu Jstcorps +1", augments={'Enhances "Troubadour" effect',}},
        hands="Umuthi Gloves",
        legs="Zoar Subligar",
        feet="Battlecast Gaiters",
        neck="Iqabi Necklace",
        waist="Anguinus Belt",
        left_ear="Steelflash Earring",
        right_ear="Bladeborn Earring",
        left_ring="Enlivened Ring",
        right_ring="Rajas Ring",
        back="Kayapa Cape",
    }
    end
    
    
    -------------------------------------------------------------------------------------------------------------------
    -- Job- versions of event handlers, allowing overriding default handling.
    -------------------------------------------------------------------------------------------------------------------
    
    -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
    -- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
    function job_precast(spell, action, spellMap, eventArgs)
    	if spell.type == 'BardSong' then
    		-- Auto-Pianissimo
    		if spell.target.type == 'PLAYER' and not spell.target.charmed and not state.Buff['Pianissimo'] then
    			cancel_spell()
    			send_command('@input /ja "Pianissimo" <me>; wait 1.25; input /ma "'..spell.name..'" '..spell.target.name)
    			eventArgs.cancel = true
    			return
    		end
    	end
    end
    
    
    -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
    function job_midcast(spell, action, spellMap, eventArgs)
    	if spell.action_type == 'Magic' then
    		-- Default base equipment layer of fast recast.
    		equip(sets.midcast.FastRecast)
    
    		if spell.type == 'BardSong' then
    			-- layer general gear on first, then let default handler add song-specific gear.
    			local generalClass = get_song_class(spell)
    			if generalClass and sets.midcast[generalClass] then
    				equip(sets.midcast[generalClass])
    			end
    		end
    	end
    end
    
    
    function job_post_midcast(spell, action, spellMap, eventArgs)
    	if spell.type == 'BardSong' then
    		if state.TerpanderMode == 'Terpander' then
    			equip(sets.midcast.Terpander)
    		elseif state.TerpanderMode == 'None' and spell.target.type == 'SELF' and state.AutoTerpander and daur_song_gap() then
    			equip(sets.midcast.Terpander)
    		end
    
    		state.TerpanderMode = 'None'
    	end
    end
    
    
    -- Set eventArgs.handled to true if we don't want automatic gear equipping to be done.
    function job_aftercast(spell, action, spellMap, eventArgs)
    	if not spell.interrupted then
    		if state.Buff[spell.name] ~= nil then
    			state.Buff[spell.name] = true
    		end
    
    		if spell.type == 'BardSong' then
    			if spell.target then
    				if spell.target.type and spell.target.type:upper() == 'SELF' then
    					adjust_Timers(spell, action, spellMap)
    				end
    			end
    		end
    	end
    end
    
    -------------------------------------------------------------------------------------------------------------------
    -- Hooks for other events that aren't handled by the include file.
    -------------------------------------------------------------------------------------------------------------------
    
    function job_buff_change(buff, gain)
    	if state.Buff[buff] ~= nil then
    		state.Buff[buff] = gain
    	end
    end
    
    -------------------------------------------------------------------------------------------------------------------
    -- Hooks for Terpander mode handling.
    -------------------------------------------------------------------------------------------------------------------
    
    -- Request job-specific mode tables.
    -- Return true on the third returned value to indicate an error: that we didn't recognize the requested field.
    function job_get_mode_list(field)
    	if field == 'Terpander' then
    		if player.inventory[info.TerpanderInstrument] then
    			return options.TerpanderModes, state.TerpanderMode
    		else
    			add_to_chat(123, info.TerpanderInstrument..' is not in player inventory.')
    		end
    	end
    end
    
    -- Set job-specific mode values.
    -- Return true if we recognize and set the requested field.
    function job_set_mode(field, val)
    	if field == 'Terpander' then
    		state.TerpanderMode = val
    		return true
    	end
    end
    
    -------------------------------------------------------------------------------------------------------------------
    -- User code that supplements self-commands.
    -------------------------------------------------------------------------------------------------------------------
    
    -- Called by the 'update' self-command.
    function job_update(cmdParams, eventArgs)
    	pick_tp_weapon()
    end
    
    
    -- Handle notifications of general user state change.
    function job_state_change(stateField, newValue)
    	if stateField == 'OffenseMode' then
    		if newValue == 'Normal' then
    			disable('main','sub')
    		else
    			enable('main','sub')
    		end
    	elseif stateField == 'Reset' then
    		if state.OffenseMode == 'None' then
    			enable('main','sub')
    		end
    	end
    end
    
    -- Function to display the current relevant user state when doing an update.
    -- Return true if display was handled, and you don't want the default info shown.
    function display_current_job_state(eventArgs)
    	local defenseString = ''
    	if state.Defense.Active then
    		local defMode = state.Defense.PhysicalMode
    		if state.Defense.Type == 'Magical' then
    			defMode = state.Defense.MagicalMode
    		end
    
    		defenseString = 'Defense: '..state.Defense.Type..' '..defMode..', '
    	end
    	
    	local meleeString = ''
    	if state.OffenseMode == 'Normal' then
    		if state.CombatForm then
    			meleeString = 'Melee: Dual-wield, '
    		else
    			meleeString = 'Melee: Single-wield, '
    		end
    	end
    
    	add_to_chat(122,'Casting ['..state.CastingMode..'], '..meleeString..'Idle ['..state.IdleMode..'], '..defenseString..
    		'Kiting: '..on_off_names[state.Kiting])
    
    	eventArgs.handled = true
    end
    
    
    -------------------------------------------------------------------------------------------------------------------
    -- Utility functions specific to this job.
    -------------------------------------------------------------------------------------------------------------------
    
    -- Determine the custom class to use for the given song.
    function get_song_class(spell)
    	-- Can't use spell.targets:contains() because this is being pulled from resources
    	if set.contains(spell.targets, 'Enemy') then
    		if state.CastingMode == 'Resistant' then
    			return 'ResistantSongDebuff'
    		else
    			return 'SongDebuff'
    		end
    	elseif state.TerpanderMode == 'Dummy' then
    		return 'TerpanderDummy'
    	else
    		return 'SongEffect'
    	end
    end
    
    
    -- Function to create custom buff-remaining timers with the Timers plugin,
    -- keeping only the actual valid songs rather than spamming the default
    -- buff remaining timers.
    function adjust_Timers(spell, action, spellMap)
    	local t = os.time()
    	
    	-- Eliminate songs that have already expired from our local list.
    	local tempreg = {}
    	for i,v in pairs(timer_reg) do
    		if v < t then tempreg[i] = true end
    	end
    	for i,v in pairs(tempreg) do
    		timer_reg[i] = nil
    	end
    	
    	local dur = calculate_duration(spell.name, spellMap)
    	if timer_reg[spell.name] then
    		-- Can delete timers that have less than 120 seconds remaining, since
    		-- the new version of the song will overwrite the old one.
    		-- Otherwise create a new timer counting down til we can overwrite.
    		--if (timer_reg[spell.name] - t) <= 120 then
    			send_command('timers delete "'..spell.name..'"')
    			timer_reg[spell.name] = t + dur
    			send_command('timers create "'..spell.name..'" '..dur..' down')
    		--end
    	else
    		-- Figure out how many songs we can maintain.
    		local maxsongs = 2
    		if player.equipment.range == info.TerpanderInstrument then
    			maxsongs = maxsongs + info.TerpanderSongs
    		end
    		if buffactive['Clarion Call'] then
    			maxsongs = maxsongs+1
    		end
    		-- If we have more songs active than is currently apparent, we can still overwrite
    		-- them while they're active, even if not using appropriate gear bonuses (ie: Daur).
    		if maxsongs < table.length(timer_reg) then
    			maxsongs = table.length(timer_reg)
    		end
    		
    		-- Create or update new song timers.
    		if table.length(timer_reg) < maxsongs then
    			timer_reg[spell.name] = t+dur
    			send_command('timers create "'..spell.name..'" '..dur..' down')
    		else
    			local rep,repsong
    			for i,v in pairs(timer_reg) do
    				if t+dur > v then
    					if not rep or rep > v then
    						rep = v
    						repsong = i
    					end
    				end
    			end
    			if repsong then
    				timer_reg[repsong] = nil
    				send_command('timers delete "'..repsong..'"')
    				timer_reg[spell.name] = t+dur
    				send_command('timers create "'..spell.name..'" '..dur..' down')
    			end
    		end
    	end
    end
    
    -- Function to calculate the duration of a song based on the equipment used to cast it.
    -- Called from adjust_Timers(), which is only called on aftercast().
    function calculate_duration(spellName, spellMap)
    	local mult = 1
    	if player.equipment.range == 'Terpander' then mult = mult + 0 end -- change to 0.25 with 90 Daur
    	if player.equipment.range == "Gjallarhorn" then mult = mult + 0.4 end -- change to 0.3 with 95 Gjall
    	
    	if player.equipment.main == "Carnwenhan" then mult = mult + 0.1 end -- 0.1 for 75, 0.4 for 95, 0.5 for 99/119
    	if player.equipment.main == "Legato Dagger" then mult = mult + 0.1 end
    	if player.equipment.neck == "Aoidos' Matinee" then mult = mult + 0.1 end
    	if player.equipment.body == "Aoidos' Hngrln. +2" then mult = mult + 0.1 end
    	if player.equipment.legs == "Mdk. Shalwar +1" then mult = mult + 0.1 end
    	if player.equipment.feet == "Brioso Slippers +1" then mult = mult + 0.1 end
    	if player.equipment.feet == "Brioso Slippers +1" then mult = mult + 0.11 end
    	
    	if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet" then mult = mult + 0.1 end
    	if spellMap == 'Paeon' and player.equipment.head == "Brioso Roundlet +1" then mult = mult + 0.1 end
    	if spellMap == 'Madrigal' and player.equipment.head == "Aoidos' Calot +2" then mult = mult + 0.1 end
    	if spellMap == 'Minuet' and player.equipment.body == "Aoidos' Hngrln. +2" then mult = mult + 0.1 end
    	if spellMap == 'March' and player.equipment.hands == 'Ad. Mnchtte. +2' then mult = mult + 0.1 end
    	if spellMap == 'Ballad' and player.equipment.legs == "Aoidos' Rhing. +2" then mult = mult + 0.1 end
    	if spellName == "Sentinel's Scherzo" and player.equipment.feet == "Aoidos' Cothrn. +2" then mult = mult + 0.1 end
    	
    	if buffactive.Troubadour then
    		mult = mult*2
    	end
    	if spellName == "Sentinel's Scherzo" then
    		if buffactive['Soul Voice'] then
    			mult = mult*2
    		elseif buffactive['Marcato'] then
    			mult = mult*1.5
    		end
    	end
    	
    	-- Tweak for inaccuracies in cast vs aftercast timing
    	mult = mult - 0.05
    	
    	local totalDuration = mult*120
    
    	return totalDuration
    end
    
    
    function daur_song_gap()
    	if player.inventory.Terpander then
    		-- Figure out how many songs we can maintain.
    		local maxsongs = 1 + info.TerpanderSongs
    		
    		local activesongs = table.length(timer_reg)
    		
    		-- If we already have at least 2 songs on, but not enough to max out
    		-- on possible Daur songs, flag us as Daur-ready.
    		if activesongs >= 2 and activesongs < maxsongs then
    			return true
    		end
    	end
    	
    	return false
    end
    
    
    
    -- Examine equipment to determine what our current TP weapon is.
    function pick_tp_weapon()
    	if brd_daggers:contains(player.equipment.main) then
    		state.CombatWeapon = 'Dagger'
    		
    		if S{'NIN','DNC'}:contains(player.sub_job) and brd_daggers:contains(player.equipment.sub) then
    			state.CombatForm = "DualWield"
    		else
    			state.CombatForm = nil
    		end
    	else
    		state.CombatWeapon = nil
    		state.CombatForm = nil
    	end
    end
    also, if anything can be done to increase efficiency that would be amazing. thanks in advance, its just getting to the point where i hear that the gearswap will be much better if i do this, yet havnt been able to get someone who knows what i should do next

  4. #4244
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Bukadan View Post
    ok, so my GS files are "out of date" whenever i log in, and i kind of want to fix this now.i dont know what a sidecar file is or whatever. im not really sure where to start. can someone maybe use my mules brd lua to demonstrate?...

    also, if anything can be done to increase efficiency that would be amazing. thanks in advance, its just getting to the point where i hear that the gearswap will be much better if i do this, yet havnt been able to get someone who knows what i should do next
    the only thing i can say is add this at this bottom of your file
    Code:
    -- Modify the default idle set after it was constructed.
    function customize_idle_set(idleSet)
        if player.mpp < 60 then
            set_combine(idleSet, <your idle refresh set name>)
        end
        return idleSet
    end
    and i did notice that rthis is a brd file normaly a brd does not need mp unless your subing a mage

  5. #4245
    Cerberus
    Join Date
    May 2009
    Posts
    437
    BG Level
    4
    FFXI Server
    Gilgamesh

    thanks for the tip on that! i pretty much play my mules brd like its main job is whm when im not redoing songs so they dont wear, ect. so this helps. if you (or someone else if you cant/arent willing to) wouldnt mind githubbing me your gearswap folder so i can see what the differences are between what i have now (which is outdated), and what i should have? id appreciate it.

  6. #4246
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Bukadan View Post
    thanks for the tip on that! i pretty much play my mules brd like its main job is whm when im not redoing songs so they dont wear, ect. so this helps. if you (or someone else if you cant/arent willing to) wouldnt mind githubbing me your gearswap folder so i can see what the differences are between what i have now (which is outdated), and what i should have? id appreciate it.
    your gearswap is the same as mine other then my include which is not part of gearswaps default setup as my include actually might break the windower rules

  7. #4247
    Cerberus
    Join Date
    May 2009
    Posts
    437
    BG Level
    4
    FFXI Server
    Gilgamesh

    if i copy and pasted my sets into your files, would it be simple? using your includes seems to me like it would help with the changing to ws gear when not able to ws if i hit the button by accident, or itll cancel a swap if i hit a macro mid-spell so i dont cast in random gear from the mistakenly activated spell as opposed to the right spells pre mid casts ect.is that not the case?

  8. #4248
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Bukadan View Post
    if i copy and pasted my sets into your files, would it be simple? using your includes seems to me like it would help with the changing to ws gear when not able to ws if i hit the button by accident, or itll cancel a swap if i hit a macro mid-spell so i dont cast in random gear from the mistakenly activated spell as opposed to the right spells pre mid casts ect.is that not the case?
    no it wont work
    if you look at my example files(no ware completed) there are a lot of sets that you can design
    weapon--weapons only (main,sub)
    range--range only (range,ammo)
    and modes (like tp, acc, etc) --for all other gear not included in weapon or range
    i.e.
    --these are your weapon sets (you can add as many as you want)(i advise only main and sub)
    sets.weapon['Axe'] = {main="Eminent Axe",sub="Eminent Scimitar"}
    sets.weapon['None'] = {main=empty,sub=empty}
    -- These are your Range sets (you can add as many as you want)(i advise only range and ammo)
    sets.range['Throwing'] = {range="Snakeeye",ammo=empty}
    -- These are your Armor sets (you can add as many as you want)
    sets.armor["Basic"] = {} -- do not change this i makes your equiped gear match your base Engaged/Idle/Resting sets
    -all the rest will adjust your gear based on how you set it up
    sets.armor["Tp"] = {}
    ---------------------------------------
    -- these are your base sets put in your
    -- default sets for status idle/resting
    -- Engaged/Idle/Resting (these must be here)
    -- do not put main,subrange,ammo in these sets as thay will be over written by your weapon ranged settings
    ---------------------------------------
    sets.Engaged = {}
    sets.Idle = {}
    sets.Resting = {}

    this is because i use a dynamic set build as to save processing of multipul gear changes from slowing it down plus you only ever have to put in the gear that is needed to be changed
    so if you want you base to be

    sets.Engaged = {
    head="Outrider Mask",
    body="Outrider Mail",
    hands="Outrider Mittens",
    legs="Outrider Hose",
    feet="Outrider Greaves",
    neck={ name="Wivre Gorget", augments={'"Subtle Blow"+4','MP+3',}},
    waist="Marid Belt",
    left_ear="Impreg. Earring",
    right_ear="Upsurge Earring",
    left_ring="Enlivened Ring",
    right_ring="Vehemence Ring",
    back="Cerberus Mantle",
    }
    then you want to have tp gear on you just add the gear that needs to be changed
    say you only want to equip Bronze Cap to your head(i know its lvl 1 its just an example)
    you would have your set like this
    sets.armor["Tp"] = {head ="Bronze Cap"}
    then it will automatically apply that gear over your base set and equip them

    then ofcorse you have
    these pre sets
    sets.pretarget = {}--only if you use a macro or chat command
    sets.precast = {}
    sets.midcast = {}
    sets.aftercast = {}
    sets.pet_midcast = {}
    sets.pet_aftercast = {}

    that allow you to build a sets based on(and it done automatically)
    the spells action_type,skill,name (in that order)
    so if you use Healer's Roll
    it builds the set like this
    example(this happens in each basic gearswap function):
    sets.Engaged
    sets.armor<based on setting>
    sets.weapon<based on setting>
    sets.range<based on setting>
    sets.pretarget["Ability"]
    sets.pretarget["CorsairRoll"]
    sets.pretarget["Healer's Roll"]
    include gear changes based on settings(magen stave,conquest wsgear,obigear,main file additions in that order based on settings)
    equips gear here
    --this continues all the way through to aftercast (midcast does not run for job ability's)

    and if you only want to set your gear by one of the you can just use
    sets.pretarget["Healer's Roll"] or you can just put a rule in your job file that overwrites all the gear changes like
    if spell.name == ""Healer's Roll" then
    sets.building[current_event] = set_combine(sets.building[current_event], <setname>)
    end

    plus all the extra stuff like magen staves,conquest,ammo nin tool,etc. can be added and removed(from use and system memory) at any time (only when using the display)

    and if a spell is not usable it will automatically be canceled with no warning (if you do not have the tp,mp,steps,etc. or if specific buffs are active or in town{excluding teleport spells})
    and all aftercast equips happen 1 second late and show under the equip_command when show_swaps is enabled

    there are also sji files that you can use to have the same rules,sets across all jobs for that specific sub job

    beyond that i recomend you read all the info files i have written in my include and then ask questions

    --needless to say my include is not for the faint of heart

  9. #4249
    Smells like Onions
    Join Date
    Apr 2015
    Posts
    3
    BG Level
    0

    Gearswap changing to my idle sets on sch anytime i lose or gain a buff during midcast

    Hey guys! just got back into ffxi and im really new to Gearswap so far im loving it and my sch.lua is functioning okay except for this issue. im almost certain im missing something simple but theres so many threads to try and sift through and dozens of google search attempts over last few months hasnt gotten me anywhere >< any help would be appreciated! Again issue i am having is whenever i am midcast on whm or sch and a buff is gained or lossed i get swapped into my idle sets still in midcast. i have no gain loss functions in my files that i can see. Im getting the feeling this is a issue with global files perhapes? ive poured over those as well but dont really understand what im looking at and when trying to include them into my main .lua's for whm and sch i ended up getting tons of errors that made them stop functioning

  10. #4250
    New Spam Forum
    Join Date
    Dec 2012
    Posts
    165
    BG Level
    3
    FFXI Server
    Cerberus

    Upload your lua

    Copy the contents of your lua file and post it between [ CODE][ /CODE] (without the spaces).

    With that it will be much easier for people to help you with your issue.

  11. #4251
    Relic Shield
    Join Date
    Jan 2013
    Posts
    1,868
    BG Level
    6

    Or better yet, use pastebin to upload your file and tell us the address. If you cant post addresses yet just post the last part of the address, such as:

    http://pastebin.com/p4EBXVS1

    Tell us p4EBXVS1 at pastebin.

  12. #4252
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Trumpy View Post
    Or better yet, use pastebin to upload your file and tell us the address. If you cant post addresses yet just post the last part of the address, such as:

    http://pastebin.com/p4EBXVS1

    Tell us p4EBXVS1 at pastebin.
    i perfer this one its alot easier on the one helping you out

  13. #4253
    New Spam Forum
    Join Date
    Dec 2012
    Posts
    165
    BG Level
    3
    FFXI Server
    Cerberus

    I bow before your superior knowledge!

  14. #4254
    Puppetmaster
    Join Date
    May 2010
    Posts
    52
    BG Level
    2
    FFXI Server
    Asura
    WoW Realm
    Cenarius

    Quote Originally Posted by Landsoul View Post
    Doesn't seem to work for me. My normal idle sets works but it doesn't wanna swap to lowmp set when below 60% MP.
    Code:
    function customize_idle_set(idleSet)
        if player.mpp <= 60 then
            idleSet = set_combine(idleSet, sets.latent_refresh)
        end
        return idleSet
    end
    Then just have a sets.idle and sets.latent_refresh (I'm assuming for something like Fucho-No-Obi?)

    The above is what I used with motes includes (ended up needing to get Arcon's help with this over a year ago on FFXIAH).

  15. #4255
    Sea Torques
    Join Date
    May 2010
    Posts
    718
    BG Level
    5
    FFXI Server
    Ragnarok

    What do rules look like to equip Frenzy Sallet when slept?

  16. #4256
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Gun-it View Post
    What do rules look like to equip Frenzy Sallet when slept?
    this is my sleep rule

    if S{2,19}:contains(buff_table.id) then
    if gain then
    equip({neck="Opo-opo Necklace",back="Aries Mantle"})
    disable("neck","back")
    else
    enable("neck","back")
    equip(<set name>)
    end
    end

  17. #4257
    Alk
    Alk is offline
    RIDE ARMOR
    Join Date
    Sep 2008
    Posts
    10
    BG Level
    1
    FFXI Server
    Bahamut

    I was on a long break and when I came back I wanted to use my Blue mage lua but keep getting errors when trying to cycle between modes

    "Gearswap has detected an error in the user function self command:
    xx/Gearswap/libs/Mote-Selfcommands.lua:341: attempt to concatenate field ´value´ (a table value)

    and

    xx/Gearswap/libs/Mote-Selfcommands.lua:162: attempt to concatenate field ´current´ (a table value)

    BLU lua
    http://pastebin.com/v7uLDHcR

    I didn't write this file myself and my understanding of GS is very low so this is very confusing to me.

    Edit: solved

  18. #4258
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Alk View Post
    I was on a long break and when I came back I wanted to use my Blue mage lua but keep getting errors when trying to cycle between modes

    "Gearswap has detected an error in the user function self command:
    xx/Gearswap/libs/Mote-Selfcommands.lua:341: attempt to concatenate field ´value´ (a table value)

    and

    xx/Gearswap/libs/Mote-Selfcommands.lua:162: attempt to concatenate field ´current´ (a table value)

    BLU lua
    http://pastebin.com/v7uLDHcR

    I didn't write this file myself and my understanding of GS is very low so this is very confusing to me.
    you have to wait for someone that knows motes include and i do not

  19. #4259
    Sea Torques
    Join Date
    May 2010
    Posts
    718
    BG Level
    5
    FFXI Server
    Ragnarok

    Quote Originally Posted by dlsmd View Post
    this is my sleep rule

    if S{2,19}:contains(buff_table.id) then
    if gain then
    equip({neck="Opo-opo Necklace",back="Aries Mantle"})
    disable("neck","back")
    else
    enable("neck","back")
    equip(<set name>)
    end
    end
    Thank you.

    Edit: Getting an error with buff_table.id is that a file that I need?

  20. #4260
    Bagel
    Join Date
    Dec 2012
    Posts
    1,488
    BG Level
    6

    Quote Originally Posted by Gun-it View Post
    Thank you.

    Edit: Getting an error with buff_table.id is that a file that I need?
    you use that in the buff_change function if your using motes this might be the one you need
    if name == "sleep" then
    if gain then
    equip({neck="Opo-opo Necklace",back="Aries Mantle"})
    disable("neck","back")
    else
    enable("neck","back")
    equip(gear_equip(name,'buff_change'))
    end
    end

Page 213 of 302 FirstFirst ... 163 203 211 212 213 214 215 223 263 ... LastLast

Similar Threads

  1. Replies: 6547
    Last Post: 2014-07-08, 22:45