Item Search
     
BG-Wiki Search
Closed Thread
Page 280 of 302 FirstFirst ... 230 270 278 279 280 281 282 290 ... LastLast
Results 5581 to 5600 of 6036

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

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

    Sweet! I wasnt too far off on some of the things I tried. Thank you very very much!

  2. #5582
    Old Merits
    Join Date
    Nov 2015
    Posts
    1,181
    BG Level
    6
    FFXI Server
    Asura
    WoW Realm
    Cho'gall

    Where should I put binds in a non-Mote gs? I've tried the usual suspects copy/paste from other gs files I have, but my go-to's like user_setup() don't work (and actually break the whole thing.)

  3. #5583

    Hello again! I am wondering if I am able to get help with my haste rules. For the life of me, I cannot get state.HasteMode.value to recognize my Haste mode at 30%. I will swap accordingly for all other rules and it even swaps perfectly when state.HasteMode.value is default. I'll pastebin the whole lua but the problem line is: 990. Thank you for advice you can offer me!

    http://pastebin.com/ii5QfxGd

    Edit:I should add that the toggle version of this has the same problem in my experimental lua.

    Nevermind! I feel so dumb. I forgot to add haste 30 sets x.x; I thought I already did...

  4. #5584
    Smells like Onions
    Join Date
    Sep 2016
    Posts
    4
    BG Level
    0

    Modes.lua

    Edit... I forgot to define command as a string....

  5. #5585
    Cerberus
    Join Date
    Nov 2008
    Posts
    419
    BG Level
    4
    FFXI Server
    Cerberus

    For my paladin I have a Castingmode toggle Normal/DT

    Code:
    options.CastingModes = {'Normal', 'DT'}
    sets defined for precast
    Code:
    { sets.precast.FC = 
    	ammo="Staunch Tathlum +1",
        head={ name="Carmine Mask +1", augments={'Accuracy+20','Mag. Acc.+12','"Fast Cast"+4',}},
        body={ name="Odyss. Chestplate", augments={'Mag. Acc.+15 "Mag.Atk.Bns."+15','"Fast Cast"+6','MND+10','Mag. Acc.+8',}},
        hands={ name="Leyline Gloves", augments={'Accuracy+12','Mag. Acc.+14','"Mag.Atk.Bns."+15','"Fast Cast"+2',}},
        legs={ name="Odyssean Cuisses", augments={'"Fast Cast"+6','"Mag.Atk.Bns."+15',}},
        feet={ name="Odyssean Greaves", augments={'"Fast Cast"+6','CHR+5',}},
        neck="Orunmila's Torque",
        waist={name="Rumination Sash",priority=2},
        left_ear={name="Etiolation Earring",priority=1},
        right_ear="Enchntr. Earring +1",
        left_ring="Kishar Ring",
        right_ring="Prolix Ring",
        back={ name="Rudianos's Mantle", augments={'HP+60','Eva.+20 /Mag. Eva.+20','HP+20','"Fast Cast"+10', priority=1}},
    }	
         
    	sets.precast.FC.DT = 
    { 
        ammo="Impatiens",
        head={ name="Carmine Mask +1", augments={'Accuracy+20','Mag. Acc.+12','"Fast Cast"+4',}},
        body={ name="Odyss. Chestplate", augments={'Mag. Acc.+15 "Mag.Atk.Bns."+15','"Fast Cast"+6','MND+10','Mag. Acc.+8',}},
    	hands="Souv. Handsch. +1",
        legs={ name="Souv. Diechlings +1", augments={'HP+105','Enmity+9','Potency of "Cure" effect received +15%',}},
        feet={ name="Odyssean Greaves", augments={'"Fast Cast"+6','CHR+5',}},
        neck="Orunmila's Torque",
        waist="Oneiros Belt",
        left_ear={ name="Odnowa Earring", priority=3},
        right_ear={ name="Odnowa Earring +1", priority=2},
        left_ring="Eihwaz Ring",
        right_ring="Defending Ring",
        back={ name="Rudianos's Mantle", augments={'HP+60','Eva.+20 /Mag. Eva.+20','HP+20','"Fast Cast"+10', priority=1}},
    }



    Code:
    function job_post_precast(spell, action, spellMap, eventArgs)
     
    end

    Issue is even when I toggle to DT it still uses normal fastcast, not the .DT set

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

    in my old luas on my pc that died i had a self command to tell me what proc period i was under per zone in dynamis. I just cant remember how I determined the time.

    I feel like i did it like below in the uncommented lines. the commented lines are how I found it done in Motes' NIN lua for movement feets. I dont recall using a * in my code though.
    Variables: "Current game time in hours.minutes format. Currently takes the floating point value, which is not precise."
    Does it only take the floating point value? it says hours.minute format but that doesnt seem to work. Id much rather do the hours.minute thing, am I writing it wrong?

    Code:
    if command == 'time' then
    	add_to_chat(50, 'World Time: '..world.time..'.')
    	--if world.time >= 0*60 and world.time < 8*60 then
    	if world.time >= 0.00 and world.time <= 7.59 then
    		add_to_chat(50, 'World Time: > 0 < 8')
    	--elseif world.time >= 8*60 and world.time < 16*60 then
    	elseif world.time >= 8.00 and world.time <= 15.59 then
    		add_to_chat(50, 'World Time: > 8 < 16')
    	--elseif world.time >= 16*60 and world.time < 24*60 then
    	elseif world.time >= 16.00 and world.time <= 23.59 then
    		add_to_chat(50, 'World Time: > 16 < 0')
    	end
    end

  7. #5587

    Quote Originally Posted by Trumpy View Post
    in my old luas on my pc that died i had a self command to tell me what proc period i was under per zone in dynamis. I just cant remember how I determined the time.

    I feel like i did it like below in the uncommented lines. the commented lines are how I found it done in Motes' NIN lua for movement feets. I dont recall using a * in my code though.
    Variables: "Current game time in hours.minutes format. Currently takes the floating point value, which is not precise."
    Does it only take the floating point value? it says hours.minute format but that doesnt seem to work. Id much rather do the hours.minute thing, am I writing it wrong?

    Code:
    if command == 'time' then
        add_to_chat(50, 'World Time: '..world.time..'.')
        --if world.time >= 0*60 and world.time < 8*60 then
        if world.time >= 0.00 and world.time <= 7.59 then
            add_to_chat(50, 'World Time: > 0 < 8')
        --elseif world.time >= 8*60 and world.time < 16*60 then
        elseif world.time >= 8.00 and world.time <= 15.59 then
            add_to_chat(50, 'World Time: > 8 < 16')
        --elseif world.time >= 16*60 and world.time < 24*60 then
        elseif world.time >= 16.00 and world.time <= 23.59 then
            add_to_chat(50, 'World Time: > 16 < 0')
        end
    end
    its hours: 60 x [hour in a 24 hour day] minutes: minutes in 60 minutes per hour
    so if it is
    8:30 you would use
    ((8*60)+30)
    16:30 you would use
    ((16*60)+30)
    at day change you would use
    0
    at mid day you would use
    12

    so it ( hour of the day ) *60 + ( minute of the hour )

    example:
    if world.time > 0 and world.time < (8*60) then

  8. #5588
    Smells like Onions
    Join Date
    Jan 2017
    Posts
    5
    BG Level
    0

    How to make it so i can toggle spaekona coat on/off with a button? I want to make it so that if i toggle spaekona coat on, all my elemental mid cast gear change to spaekona. Example, make F9 toggle spaekona on off

  9. #5589

    Quote Originally Posted by hamany9 View Post
    How to make it so i can toggle spaekona coat on/off with a button? I want to make it so that if i toggle spaekona coat on, all my elemental mid cast gear change to spaekona. Example, make F9 toggle spaekona on off
    untested but should work for basic gearswap files(not for motes or my include systems)
    Code:
    send_command('bind DIK_F1 gs c spaekona')
    spaekonaenabled = false
    
    function midcast(spell)
        ...
        if spell.skill == "Elemental Magic" then
            equip({body="spaekona"})
        end
    end
    
    function self_command(command)
        if command == "spaekona" then
            spaekonaenabled = not spaekonaenabled
            add_to_chat(7,"Spaekona Coat "..(spaekonaenabled and 'Enabled' or 'Disabled'))
        end
    end

  10. #5590
    Smells like Onions
    Join Date
    Jan 2017
    Posts
    5
    BG Level
    0

    Ok i got this gearswap error which happens only for my blue mage: it says i need to update my job files, how do i do it?

    gearswap/equip_processing.lua:268: attempt to index field '?' (a nil value .

    heres my gs file:

    -------------------------------------------------------------------------------------------------------------------
    -- 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['Burst Affinity'] = buffactive['Burst Affinity'] or false
    state.Buff['Chain Affinity'] = buffactive['Chain Affinity'] or false
    state.Buff.Convergence = buffactive.Convergence or false
    state.Buff.Diffusion = buffactive.Diffusion or false
    state.Buff.Efflux = buffactive.Efflux or false

    state.Buff['Unbridled Learning'] = buffactive['Unbridled Learning'] or false


    blue_magic_maps = {}

    -- Mappings for gear sets to use for various blue magic spells.
    -- While Str isn't listed for each, it's generally assumed as being at least
    -- moderately signficant, even for spells with other mods.

    -- Physical Spells --

    -- Physical spells with no particular (or known) stat mods
    blue_magic_maps.Physical = S{
    'Bilgestorm'
    }

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

    -- Physical spells with Str stat mod
    blue_magic_maps.PhysicalStr = S{
    'Battle Dance','Bloodrake','Death Scissors','Dimensional Death',
    'Empty Thrash','Quadrastrike','Sinker Drill','Spinal Cleave',
    'Uppercut','Vertical Cleave'
    }

    -- Physical spells with Dex stat mod
    blue_magic_maps.PhysicalDex = S{
    'Amorphic Spikes','Asuran Claws','Barbed Crescent','Claw Cyclone','Disseverment',
    'Foot Kick','Frenetic Rip','Goblin Rush','Hysteric Barrage','Paralyzing Triad',
    'Seedspray','Sickle Slash','Smite of Rage','Terror Touch','Thrashing Assault',
    'Vanity Dive'
    }

    -- Physical spells with Vit stat mod
    blue_magic_maps.PhysicalVit = S{
    'Body Slam','Cannonball','Delta Thrust','Glutinous Dart','Grand Slam',
    'Power Attack','Quad. Continuum','Sprout Smack','Sub-zero Smash'
    }

    -- Physical spells with Agi stat mod
    blue_magic_maps.PhysicalAgi = S{
    'Benthic Typhoon','Feather Storm','Helldive','Hydro Shot','Jet Stream',
    'Pinecone Bomb','Spiral Spin','Wild Oats'
    }

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

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

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

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

    -- Magical Spells --

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

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

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

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

    -- Magical spells with a Dex stat mod (on top of Int)
    blue_magic_maps.MagicalDex = S{
    'Charged Whisker','Gates of Hades'
    }

    -- Magical spells (generally debuffs) that we want to focus on magic accuracy over damage.
    -- Add Int for damage where available, though.
    blue_magic_maps.MagicAccuracy = S{
    '1000 Needles','Absolute Terror','Actinic Burst','Auroral Drape','Awful Eye',
    'Blank Gaze','Blistering Roar','Blood Drain','Blood Saber','Chaotic Eye',
    'Cimicine Discharge','Cold Wave','Corrosive Ooze','Demoralizing Roar','Digest',
    'Dream Flower','Enervation','Feather Tickle','Filamented Hold','Frightful Roar',
    'Geist Wall','Hecatomb Wave','Infrasonics','Jettatura','Light of Penance',
    'Lowing','Mind Blast','Mortal Ray','MP Drainkiss','Osmosis','Reaving Wind',
    'Sandspin','Sandspray','Sheep Song','Soporific','Sound Blast','Stinking Gas',
    'Sub-zero Smash','Venom Shell','Voracious Trunk','Yawn'
    }

    -- Breath-based spells
    blue_magic_maps.Breath = S{
    'Bad Breath','Flying Hip Press','Frost Breath','Heat Breath',
    'Hecatomb Wave','Magnetite Cloud','Poison Breath','Radiant Breath','Self-Destruct',
    'Thunder Breath','Vapor Spray','Wind Breath'
    }

    -- Stun spells
    blue_magic_maps.Stun = S{
    'Blitzstrahl','Frypan','Head Butt','Sudden Lunge','Tail slap','Temporal Shift',
    'Thunderbolt','Whirl of Rage'
    }

    -- Healing spells
    blue_magic_maps.Healing = S{
    'Healing Breeze','Magic Fruit','Plenilune Embrace','Pollen','Restoral','White Wind',
    'Wild Carrot'
    }

    -- Buffs that depend on blue magic skill
    blue_magic_maps.SkillBasedBuff = S{
    'Barrier Tusk','Diamondhide','Magic Barrier','Metallic Body','Plasma Charge',
    'Pyric Bulwark','Reactor Cool',
    }

    -- Other general buffs
    blue_magic_maps.Buff = S{
    'Amplification','Animating Wail','Battery Charge','Carcharian Verve','Cocoon',
    'Erratic Flutter','Exuviation','Fantod','Feather Barrier','Harden Shell',
    'Memento Mori','Nat. Meditation','Occultation','Orcish Counterstance','Refueling',
    'Regeneration','Saline Coat','Triumphant Roar','Warm-Up','Winds of Promyvion',
    'Zephyr Mantle'
    }


    -- Spells that require Unbridled Learning to cast.
    unbridled_spells = S{
    'Absolute Terror','Bilgestorm','Blistering Roar','Bloodrake','Carcharian Verve',
    'Crashing Thunder','Droning Whirlwind','Gates of Hades','Harden Shell','Polar Roar',
    'Pyric Bulwark','Thunderbolt','Tourbillion','Uproot'
    }
    end

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

    -- Setup vars that are user-dependent. Can override this function in a sidecar file.
    function user_setup()
    state.OffenseModeptions('Normal', 'Acc', 'DT')
    state.WeaponskillModeptions('Normal', 'Acc')
    state.CastingModeptions('Normal', 'Resistant')
    state.IdleModeptions('Normal', 'PDT', 'Learning')

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

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

    update_combat_form()
    select_default_macro_book()
    end


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


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

    sets.buff['Burst Affinity'] = {feet="Mavi Basmak +2"}
    sets.buff['Chain Affinity'] = {head="Mavi Kavuk +2", feet="Assimilator's Charuqs"}
    sets.buff.Convergence = {head="Luhlaza Keffiyeh"}
    sets.buff.Diffusion = {feet="Luhlaza Charuqs"}
    sets.buff.Enchainment = {body="Luhlaza Jubbah"}
    sets.buff.Efflux = {legs="Mavi Tayt +2"}


    -- Precast Sets

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


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

    -- Don't need any special gear for Healing Waltz.
    sets.precast.Waltz['Healing Waltz'] = {}

    -- Fast cast sets for spells

    sets.precast.FC = {ammo="Impatiens",
    head="Amalric coif",neck="Orunmila's torque",ear2="Loquacious Earring",ear1="Etiolation Earring",
    body="Luhlaza Jubbah +1",hands="Leyline Gloves",ring1="Prolix Ring",
    back="Swith Cape",waist="Witful Belt",legs="Lengo Pants",feet="Amalric nails"}

    sets.precast.FC['Blue Magic'] = set_combine(sets.precast.FC, {body="Mavi Mintan +2"})


    -- Weaponskill sets
    -- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS = {
    head="Herculean helm",neck="Fotia gorget",ear1="Bladeborn Earring",ear2="Steelflash Earring",
    body="Adhemar jacket",hands="Herculean gloves",ring1="Hetairoi ring",ring2="Epona's Ring",
    back="Rosmerta's Cape",waist="Fotia belt",legs="Samnuha tights",feet="Herculean boots"}

    sets.precast.WS.acc = set_combine(sets.precast.WS, {hands="Herculean gloves"})

    -- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
    sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {ring1="Aquasoul Ring",feet="Herculean boots"})

    sets.precast.WS['Sanguine Blade'] = {
    head="Jhakri coronal +1",neck="Eddy Necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
    body="Jhakri robe +1",hands="Jhakri cuffs +1",ring1="Acumen Ring",ring2="Strendu Ring",
    back="Cornflower cape",legs="Amalric slops",feet="Amalric nails"}


    -- Midcast Sets
    sets.midcast.FastRecast = {ammo="Impatiens",
    head="Amalric coif",neck="Orunmila's Torque",ear2="Loquacious Earring",ear1="Etiolation Earring",
    body="Luhlaza Jubbah +1",hands="Leyline Gloves",ring1="Prolix Ring",
    back="Swith Cape",waist="Witful Belt",legs="Lengo Pants",feet="Amalric nails"}

    sets.midcast['Blue Magic'] = {}

    -- Physical Spells --

    sets.midcast['Blue Magic'].Physical = {ammo="Falcon eye",
    head="Jhakri coronal +1",neck="Sanctity necklace",ear1="Dignitary's earring",ear2="Steelflash Earring",
    body="Adhemar jacket",hands="Jhakri cuffs +1",ring1="Rajas Ring",ring2="Petrov ring",
    back="Cornflower Cape",waist="Kentarch belt +1",legs="Jhakri slops +1",feet="Jhakri pigaches +1"}

    sets.midcast['Blue Magic'].PhysicalAcc = {ammo="Falcon eye",
    head="Jhakri coronal +1",neck="Sanctity necklace",ear1="Dignitary's earring",ear2="Steelflash Earring",
    body="Adhemar jacket",hands="Jhakri cuffs +1",ring1="Rajas Ring",ring2="Petrov ring",
    back="Cornflower Cape",waist="Kentarch belt +1",legs="Jhakri slops +1",feet="Jhakri pigaches +1"}

    sets.midcast['Blue Magic'].PhysicalStr = set_combine(sets.midcast['Blue Magic'].Physical,
    {body="Jhakri robe +1",hands="Jhakri cuffs +1"})

    sets.midcast['Blue Magic'].PhysicalDex = set_combine(sets.midcast['Blue Magic'].Physical,
    {ammo="Falcon eye",body="Adhemar jacket",hands="Jhakri cuffs +1",
    waist="Kentarch belt +1",legs="Jhakri slops +1"})

    sets.midcast['Blue Magic'].PhysicalVit = set_combine(sets.midcast['Blue Magic'].Physical,
    {body="Adhemar jacket",hands="Jhakri cuffs +1",back="Cornflower Cape"})

    sets.midcast['Blue Magic'].PhysicalAgi = set_combine(sets.midcast['Blue Magic'].Physical,
    {body="Adhemar jacket",hands="Jhakri cuffs +1",ring2="Petrov Ring",
    waist="Kentarch belt +1",feet="Jhakri slops +1"})

    sets.midcast['Blue Magic'].PhysicalInt = set_combine(sets.midcast['Blue Magic'].Physical,
    {ear1="Psystorm Earring",body="Jhakri robe +1",hands="Jhakri cuffs +1",
    ring2="Acumen ring",back="Cornflower Cape",feet="Jhakri pigaches +1"})

    sets.midcast['Blue Magic'].PhysicalMnd = set_combine(sets.midcast['Blue Magic'].Physical,
    {ear1="Lifestorm Earring",body="Jhakri robe +1",hands="Jhakri cuffs +1",
    ring2="Aquasoul Ring",back="Cornflower Cape"})

    sets.midcast['Blue Magic'].PhysicalChr = set_combine(sets.midcast['Blue Magic'].Physical,
    {body="Jhakri robe +1",hands="Jhakri cuffs +1",back="Cornflower Cape",
    waist="Kentarch belt +1"})

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


    -- Magical Spells --

    sets.midcast['Blue Magic'].Magical = {ammo="Pemphredo Tathlum",
    head="Jhakri coronal +1",neck="Sanctity necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
    body="Jhakri robe +1",hands="Jhakri cuffs +1",ring1="Strendu Ring",ring2="Acumen Ring",
    back="Cornflower Cape",waist="Yamabuki-no-obi",legs="Amalric slops",feet="Amalric nails"}

    sets.midcast['Blue Magic'].Magical.Resistant = set_combine(sets.midcast['Blue Magic'].Magical,
    {body="Jhakri coronal +1",ring1="Sangoma Ring",legs="Amalric slops",feet="Amalric nails"})

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

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

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

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

    sets.midcast['Blue Magic'].MagicAccuracy = {ammo="Pemphredo Tathlum",
    head="Jhakri coronal +1",neck="Sanctity necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
    body="Jhakri robe +1",hands="Jhakri cuffs +1",ring1="Strendu Ring",ring2="Acumen Ring",
    back="Cornflower Cape",waist="Yamabuki-no-obi",legs="Amalric slops",feet="Amalric nails"}

    -- Breath Spells --

    sets.midcast['Blue Magic'].Breath = {ammo="Pemphredo Tathlum",
    head="Jhakri coronal +1",neck="Sanctity necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
    body="Jhakri robe +1",hands="Jhakri cuffs +1",ring1="Strendu Ring",ring2="Acumen Ring",
    back="Cornflower Cape",waist="Yamabuki-no-obi",legs="Amalric slops",feet="Amalric nails"}

    -- Other Types --

    sets.midcast['Blue Magic'].Stun = set_combine(sets.midcast['Blue Magic'].MagicAccuracy,
    {waist="Kentarch belt +1"})

    sets.midcast['Blue Magic']['White Wind'] = {
    head="Herculean helm",neck="Orunmila's torque",ear1="Mendicant's earring",ear2="Loquacious Earring",
    body="Adhemar jacket",hands="Leyline Gloves",ring1="K'ayres Ring",ring2="Supershear Ring",
    back="Solemnity cape",waist="Gishdubar sash",legs="Lengo pants",feet="Medium's Sabots"}

    sets.midcast['Blue Magic'].Healing = {
    head="Herculean helm",neck="Orunmila's torque",ear1="Mendicant's earring",ear2="Loquacious Earring",
    body="Adhemar jacket",hands="Leyline Gloves",ring1="K'ayres Ring",ring2="Supershear Ring",
    back="Solemnity cape",waist="Gishdubar sash",legs="Lengo pants",feet="Medium's Sabots"}

    sets.midcast['Blue Magic'].SkillBasedBuff = {ammo="Mavi Tathlum",
    head="Luhlaza Keffiyeh",
    body="Assimilator's Jubbah",
    back="Cornflower Cape",legs="Mavi Tayt +2",feet="Luhlaza Charuqs"}

    sets.midcast['Blue Magic'].Buff = {}

    sets.midcast.Protect = {ring1="Sheltered Ring"}
    sets.midcast.Protectra = {ring1="Sheltered Ring"}
    sets.midcast.Shell = {ring1="Sheltered Ring"}
    sets.midcast.Shellra = {ring1="Sheltered Ring"}




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

    -- Gear for learning spells: +skill and AF hands.
    sets.Learning = {ammo="Mavi Tathlum",hands="Assimilator's Bazubands +1"}
    --head="Luhlaza Keffiyeh",
    --body="Assimilator's Jubbah",hands="Assimilator's Bazubands +1",
    --back="Cornflower Cape",legs="Mavi Tayt +2",feet="Luhlaza Charuqs"}


    sets.latent_refresh = {waist="Fucho-no-obi"}

    -- Resting sets
    sets.resting = {
    head="Rawhide mask",neck="Sanctity necklace",Ear1="Moonshade earring",Ear2="Infused earring",
    body="Jhakri robe +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Shel tered Ring",ring2="Paguroidea Ring",
    waist="Fucho-no-obi",feet={ name="Herculean Boots", augments={'Attack+15','Phys. dmg. taken -3%','DEX+6','Accuracy+11',}}}

    -- Idle sets
    sets.idle = {ammo="Staunch Tathlum",
    head="Rawhide Mask",neck="Loricate torque +1",ear1="Moonshade Earring",ear2="Infused Earring",
    body="Jhakri robe +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defe nding Ring",ring2="Vocane Ring",
    back="Umbra cape",waist="Flume Belt",legs="Carmine Cuisses",feet={ name="Herculean Boots", augments={'Attack+15','Phys. dmg. taken -3%','DEX+6','Accuracy+11',}}}

    sets.idle.PDT = {ammo="Staunch Tathlum",
    head="Rawhide Mask",neck="Loricate torque +1",ear1="Moonshade Earring",ear2="Ethereal Earring",
    body="Ayanmo Corazza +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defe nding Ring",ring2="Vocane Ring",
    back="Umbra cape",waist="Flume Belt",legs="Carmine Cuisses",feet={ name="Herculean Boots", augments={'Attack+15','Phys. dmg. taken -3%','DEX+6','Accuracy+11',}}}

    sets.idle.Town = {ammo="Staunch Tathlum",
    head="Rawhide Mask",neck="Sanctity necklace",ear1="Moonshade Earring",ear2="Infused Earring",
    body="Jhakri robe +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defe nding Ring",ring2="Vocane Ring",
    back="Umbra cape",waist="Flume Belt",legs="Carmine Cuisses",feet={ name="Herculean Boots", augments={'Attack+15','Phys. dmg. taken -3%','DEX+6','Accuracy+11',}}}


    -- Defense sets
    sets.defense.PDT = {ammo="Staunch Tathlum",
    head={ name="Herculean Helm", augments={'Phys. dmg. taken -4%','Accuracy+14','Attack+11',}},neck="Loricate torque +1",ear1="Suppanomimi",ear2="Cessance Earring",
    body="Ayanmo Corazza +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defe nding ring",ring2="Vocane ring",
    back="Rosmerta's cape",waist="Kentarch belt +1",legs={ name="Herculean Trousers", augments={'Attack+11','Phys. dmg. taken -4%','AGI+8',}},feet={ name="Herculean Boots", augments={'Attack+15','Phys. dmg. taken -3%','DEX+6','Accuracy+11',}}}

    sets.defense.MDT ={ammo="Staunch Tathlum",
    head={ name="Herculean Helm", augments={'Phys. dmg. taken -4%','Accuracy+14','Attack+11',}},neck="Loricate torque +1",ear1="Suppanomimi",ear2="Cessance Earring",
    body="Ayanmo Corazza +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defe nding ring",ring2="Vocane ring",
    back="Rosmerta's cape",waist="Kentarch belt +1",legs={ name="Herculean Trousers", augments={'Attack+11','Phys. dmg. taken -4%','AGI+8',}},feet={ name="Herculean Boots", augments={'Attack+15','Phys. dmg. taken -3%','DEX+6','Accuracy+11',}}}

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

    -- Engaged sets

    -- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
    -- sets if more refined versions aren't defined.
    -- If you create a set with both offense and defense modes, the offense mode should be first.
    -- EG: sets.engaged.Dagger.Accuracy.Evasion

    -- Normal melee group
    sets.engaged = {ammo="Ginsen",
    head={ name="Herculean Helm", augments={'Attack+15','"Triple Atk."+4','Accuracy+11',}},neck="Clotharius torque",ear1="Suppanomimi",ear2="Cessance Earring",
    body="Adhemar jacket",hands={ name="Herculean Gloves", augments={'Accuracy+14 Attack+14','"Triple Atk."+2','STR+8','Accuracy+13','Attack+2',}},ring1 ="Hetairoi Ring",ring2="Epona's Ring",
    back="Rosmerta's cape",waist="Kentarch belt +1",legs="Samnuha tights",feet={ name="Herculean Boots", augments={'Accuracy+21 Attack+21','"Triple Atk."+2','STR+5','Attack+13',}}}

    sets.engaged.Acc = {ammo="Ginsen",
    head={ name="Herculean Helm", augments={'Attack+15','"Triple Atk."+4','Accuracy+11',}},neck="Clotharius torque",ear1="Suppanomimi",ear2="Cessance Earring",
    body="Adhemar jacket",hands={ name="Herculean Gloves", augments={'Accuracy+14 Attack+14','"Triple Atk."+2','STR+8','Accuracy+13','Attack+2',}},ring1 ="Hetairoi Ring",ring2="Epona's Ring",
    back="Rosmerta's cape",waist="Kentarch belt +1",legs="Samnuha tights",feet={ name="Herculean Boots", augments={'Accuracy+21 Attack+21','"Triple Atk."+2','STR+5','Attack+13',}}}

    sets.engaged.DT ={ammo="Staunch Tathlum",
    head={ name="Herculean Helm", augments={'Phys. dmg. taken -4%','Accuracy+14','Attack+11',}},neck="Loricate torque +1",ear1="Suppanomimi",ear2="Cessance Earring",
    body="Ayanmo Corazza +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defe nding ring",ring2="Vocane ring",
    back="Rosmerta's cape",waist="Kentarch belt +1",legs={ name="Herculean Trousers", augments={'Attack+11','Phys. dmg. taken -4%','AGI+8',}},feet={ name="Herculean Boots", augments={'Attack+15','Phys. dmg. taken -3%','DEX+6','Accuracy+11',}}}




    sets.self_healing = {ring1="Kunaji Ring",ring2="Asklepian Ring"}
    end

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

    -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
    -- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
    function job_precast(spell, action, spellMap, eventArgs)
    if unbridled_spells:contains(spell.english) and not state.Buff['Unbridled Learning'] then
    eventArgs.cancel = true
    windower.send_command('@input /ja "Unbridled Learning" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
    end
    end

    -- Run after the default midcast() is done.
    -- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
    function job_post_midcast(spell, action, spellMap, eventArgs)
    -- Add enhancement gear for Chain Affinity, etc.
    if spell.skill == 'Blue Magic' then
    for buff,active in pairs(state.Buff) do
    if active and sets.buff[buff] then
    equip(sets.buff[buff])
    end
    end
    if spellMap == 'Healing' and spell.target.type == 'SELF' and sets.self_healing then
    equip(sets.self_healing)
    end
    end

    -- If in learning mode, keep on gear intended to help with that, regardless of action.
    if state.OffenseMode.value == 'Learning' then
    equip(sets.Learning)
    end
    end


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

    -- Called when a player gains or loses a buff.
    -- buff == buff gained or lost
    -- gain == true if the buff was gained, false if it was lost.
    function job_buff_change(buff, gain)
    if state.Buff[buff] ~= nil then
    state.Buff[buff] = gain
    end
    end

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

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

    -- Modify the default idle set after it was constructed.
    function customize_idle_set(idleSet)
    if player.mpp < 51 then
    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)
    update_combat_form()
    end


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

    function update_combat_form()
    -- Check for H2H or single-wielding
    if player.equipment.sub == "Genbu's Shield" or player.equipment.sub == 'empty' then
    state.CombatForm:reset()
    else
    state.CombatForm:set('DW')
    end
    end


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

  11. #5591
    Smells like Onions
    Join Date
    Jan 2017
    Posts
    5
    BG Level
    0

    where exactly do i write this code?

  12. #5592

    Quote Originally Posted by hamany9 View Post
    where exactly do i write this code?
    with motes you would do it completely differently but how i have no idea

  13. #5593
    Smells like Onions
    Join Date
    Jan 2017
    Posts
    5
    BG Level
    0

    I quit the game for few months, so when i tried to use my sparks.lua script to buy acheron shields, the file loads fine but when i talk to the npc it doesnt sell me the shield.

    I also tried the other script where you have sparks folder and within it you have sparks and map lua. it loads fine but when i do the command //sparks buy acheron shield nothing happens.

  14. #5594

    if your using this sparks.lua https://github.com/smd111/Sparks
    you need to put in the name given in in the map file exactly
    like
    //sparks buy Acheron Shield

    also because this is the gearswap help thread you should not ask about that here
    im not sure why you want Acheron Shield when Bahadur gives the best value unless something changed

  15. #5595
    Smells like Onions
    Join Date
    Jan 2017
    Posts
    5
    BG Level
    0

    I typed exactly like you did,
    //sparks buy Acheron Shield
    but nothing happened

  16. #5596
    Smells like Onions
    Join Date
    Jul 2015
    Posts
    2
    BG Level
    0

    Impact rules with weather/day obi conflict

    Hello everyone,

    So basically, I'm running into priority issues between day/weather effects, and Impact spell.

    First, here's a pastebin with fancy work around for the 10 post barrier.
    "pastebin.com/KQxfhMxy"

    Since Impact is elemental magic, if it's darksday or dark weather is up, my gear is getting forced into a standard elemental burst set in my lua (see line 366; day/weather rules) while I need there to be a different change in the event that Impact is being cast (see line 186; sets.midcast['Impact'])

    I figure I need to change the day/weather rules to either have one specifically for when Impact is being cast, or just a way to have 'elemental magic' not! impact,

    Not too sure how to go about this, any advice would be helpfull!

    Also, my burst spells are atrocious, I know they are ._.' apologies for coders who die a little on the inside

  17. #5597
    Campaign
    Join Date
    Jul 2007
    Posts
    6,633
    BG Level
    8

    So, I never managed to understand how Mote's Luas work (I always made my own Luas starting from zero).
    Tried to help a friend who's using Mote's Lua on BRD.
    Here's the original code

    Code:
    -- 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) or (spell.target.type == 'NPC' and spell.target.in_party)) and
                not state.Buff['Pianissimo'] then
                
                local spell_recasts = windower.ffxi.get_spell_recasts()
                if spell_recasts[spell.recast_id] < 2 then
                    send_command('@input /ja "Pianissimo" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
                    eventArgs.cancel = true
                    return
                end
            end
        end
    end

    And here is the small addition I've put in there
    Code:
    function job_precast(spell, action, spellMap, eventArgs)
    	if buffactive['Nightingale'] then 
    		eventArgs.useMidcastGear = true
    	else
    		eventArgs.useMidcastGear = false
    	end
        if spell.type == 'BardSong' then
            -- Auto-Pianissimo
            if ((spell.target.type == 'PLAYER' and not spell.target.charmed) or (spell.target.type == 'NPC' and spell.target.in_party)) and
                not state.Buff['Pianissimo'] then
               
                local spell_recasts = windower.ffxi.get_spell_recasts()
                if spell_recasts[spell.recast_id] < 2 then
                    send_command('@input /ja "Pianissimo" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
                    eventArgs.cancel = true
                    return
                end
            end
        end
    end
    Goal of this addition is to use midcast gear as precast, when Nightingale is up.
    My friend tried it out and says it doesn't work.
    Anybody knows if the error is somewhere in here or if I can safely assume it's somewhere else in the lua?

  18. #5598

    Quote Originally Posted by Sechs View Post
    So, I never managed to understand how Mote's Luas work (I always made my own Luas starting from zero).
    Tried to help a friend who's using Mote's Lua on BRD.
    Here's the original code

    Code:
    -- 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) or (spell.target.type == 'NPC' and spell.target.in_party)) and
                not state.Buff['Pianissimo'] then
                
                local spell_recasts = windower.ffxi.get_spell_recasts()
                if spell_recasts[spell.recast_id] < 2 then
                    send_command('@input /ja "Pianissimo" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
                    eventArgs.cancel = true
                    return
                end
            end
        end
    end
    And here is the small addition I've put in there
    Code:
    function job_precast(spell, action, spellMap, eventArgs)
        if buffactive['Nightingale'] then 
            eventArgs.useMidcastGear = true
        else
            eventArgs.useMidcastGear = false
        end
        if spell.type == 'BardSong' then
            -- Auto-Pianissimo
            if ((spell.target.type == 'PLAYER' and not spell.target.charmed) or (spell.target.type == 'NPC' and spell.target.in_party)) and
                not state.Buff['Pianissimo'] then
               
                local spell_recasts = windower.ffxi.get_spell_recasts()
                if spell_recasts[spell.recast_id] < 2 then
                    send_command('@input /ja "Pianissimo" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
                    eventArgs.cancel = true
                    return
                end
            end
        end
    end
    Goal of this addition is to use midcast gear as precast, when Nightingale is up.
    My friend tried it out and says it doesn't work.
    Anybody knows if the error is somewhere in here or if I can safely assume it's somewhere else in the lua?
    does he even have a midcast set named sets.midcast.<spellname or spell type or spellMap> if not then thats the reason
    not to mention motes include map has not been updated in a while and mote is not around to give help to anyone

  19. #5599

    Devotion Rules in Lua WHM

    Hello i'm searching a function in my lua WHM for the JA Devotion.

    I precise that Devotion sacrifices 25% of your current HP to restore an equal amount of MP to the target (without mérits), so what i want is to execute the JA when i'm a max HP set.

    - Make a rules that equipping a midcast selfcure in maxhp (i have a function to equip a different set when i'm curing myself)

    - Make a rules for an Idle set with MaxHP

    - If possible, join a precast cure with lowHP (that's for the HP recover 500+ for Omen Objectives)

    This is my lua :

    Spoiler: show
    Code:
    require 'organizer-lib'
    -------------------------------------------------------------------------------------------------------------------
    -- 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.
    
    -- Initialization function for this job file.
    function get_sets()
    	-- Load and initialize the include file.
    	include('Mote-Include.lua')
    end
    
    -- Setup vars that are user-independent.
    function job_setup()
    	state.Buff['Afflatus Solace'] = buffactive['afflatus solace'] or false
    end
    
    
    -- Setup vars that are user-dependent.  Can override this function in a sidecar file.
    function user_setup()
    	-- Options: Override default values
    	options.OffenseModes = {'None', 'Normal'}
    	options.DefenseModes = {'Normal'}
    	options.WeaponskillModes = {'Normal'}
    	options.CastingModes = {'Normal', 'Resistant', 'HP'}
    	options.IdleModes = {'Normal', 'PDT', 'HP'}
    	options.RestingModes = {'Normal'}
    	options.PhysicalDefenseModes = {'PDT'}
    	options.MagicalDefenseModes = {'MDT'}
    	
    	state.Defense.PhysicalMode = 'PDT'
    	state.OffenseMode = 'None'
    
    
    	-- Default macro set/book
    	set_macro_page(1, 3)
    end
    
    -- Called when this job file is unloaded (eg: job change)
    function file_unload()
    	if binds_on_unload then
    		binds_on_unload()
    	end
    end
    
    
    -- Define sets and vars used by this job file.
    function init_gear_sets()
    	--------------------------------------
    	-- Start defining the sets
    	--------------------------------------
    
    	-- Precast Sets
    
    	-- Fast cast sets for spells
    	sets.precast.FC = { main="Grioavolr",
        sub="Clerisy strap +1",
        ammo="Impatiens",
        head="Nahtirah Hat",
        body="Inyanga Jubbah +1",
        hands={ name="Fanatic Gloves", augments={'MP+50','Healing magic skill +10','"Conserve MP"+7','"Fast Cast"+7',}},
        legs="Artsieq Hose",
        feet="Regal Pumps +1",
        neck="Orunmila's Torque",
        waist="Witful Belt",
        left_ear="Enchntr. Earring +1",
        right_ear="Loquac. Earring",
        left_ring="Lebeche Ring",
        right_ring="Rahab Ring",
        back="Perimede Cape",
    }
    		
    	sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, { waist= "Siegel Sash"})
       
    	sets.precast.FC['Healing Magic'] = set_combine(sets.precast.FC, {main="Vadose Rod",sub="Chanter's Shield",legs="Ebers Pant. +1"})
    
    	sets.precast.FC.StatusRemoval = sets.precast.FC['Healing Magic'] 
    	
    	sets.precast.FC.Stoneskin = set_combine(sets.precast.FC['Enhancing Magic'], {hands="Carapacho Cuffs",legs="Doyen Pants"})
    
    	sets.precast.FC.Cure = set_combine(sets.precast.FC.HealingMagic, {main="Ababinili +1",
        sub="Clemency Grip",
        ammo="Impatiens",
        head={ name="Piety Cap +1", augments={'Enhances "Devotion" effect',}},
        body="Inyanga Jubbah +1",
        hands={ name="Vanya Cuffs", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
        legs="Doyen Pants",
        feet="Hygieia Clogs +1",
        neck="Orunmila's Torque",
        waist="Acerbic Sash +1",
        left_ear="Nourish. Earring +1",
        right_ear="Mendi. Earring",
        left_ring="Lebeche Ring",
        right_ring="Rahab Ring",
        back="Pahtli Cape",
    })
    
    	sets.precast.FC.Curaga = sets.precast.FC.Cure
    	-- Precast sets to enhance JAs
    	sets.precast.JA.Benediction = {body="piety briault +1"}
    	
    	sets.precast.JA.Devotion = {head="piety cap +1"}
    
    	-- Waltz set (chr and vit)
    	sets.precast.Waltz = {ear2="Roundel Earring"}
    	
    	
    	-- Weaponskill sets
    
    	-- Default set for any weaponskill that isn't any more specifically defined
    	gear.default.weaponskill_neck = "fotia gorget"
    	gear.default.weaponskill_waist = "fotia belt"
    	sets.precast.WS = {}
    	
    	sets.precast.WS['Flash Nova'] = {}
    	
    
    	-- Midcast Sets
    	
    	sets.midcast.FastRecast = {main="Sucellus",
        sub="Chanter's Shield",
        ammo="Pemphredo Tathlum",
        head={ name="Vanya Hood", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
        body={ name="Kaykaus Bliaut", augments={'MP+60','"Cure" potency +5%','"Conserve MP"+6',}},
        hands="Fanatic Gloves",
        legs={ name="Vanya Slops", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
        feet="Medium's Sabots",
        neck="incanter's torque",
        waist="Gishdubar Sash",
        left_ear="Gifted Earring",
        right_ear="Mendicant's Earring",
        left_ring="Lebeche Ring",
        right_ring="Prolix Ring",
        back="Solemnity Cape",
    }
    	
    	-- Cure sets
    	gear.default.obi_waist = ""
    	gear.default.obi_back = ""
    
    	sets.midcast.CureSolace = {
        main="Queller Rod",
        sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -8%','HP+22',}},
        ammo="Pemphredo Tathlum",
        head={ name="Vanya Hood", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
        body="Ebers Bliaud +1",
        hands={ name="Vanya Cuffs", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
        legs="Ebers Pant. +1",
        feet={ name="Vanya Clogs", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
        neck="Phalaina Locket",
        waist="Austerity Belt +1",
        left_ear="Glorious Earring",
        right_ear="Nourishing Earring +1",
        left_ring="Defending Ring",
        right_ring="Sirona's Ring",
        back={ name="Alaunus's Cape", augments={'MND+20','Eva.+20 /Mag. Eva.+20','"Cure" potency +10%',}},
    }
    
    	sets.midcast.Cure = {
        main="Queller Rod",
        sub="Thuellaic Ecu +1",
        ammo="Pemphredo Tathlum",
        head={ name="Vanya Hood", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
        body="Kaykaus Bliaut",
        hands={ name="Vanya Cuffs", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
        legs="Ebers Pant. +1",
        feet={ name="Vanya Clogs", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
        neck="Loricate Torque +1",
        waist="Austerity Belt +1",
        left_ear="Glorious Earring",
        right_ear="Nourishing Earring +1",
        left_ring="Defending Ring",
        right_ring="Dark Ring",
        back={ name="Alaunus's Cape", augments={'MND+20','Eva.+20 /Mag. Eva.+20','"Cure" potency +10%',}},
    }
    --	sets.midcast.Cure.HP = {
        main={ name="Queller Rod", augments={'MP+80','"Cure" potency +15%','Enmity-5',}},
        sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -8%','HP+22',}},
        ammo="Homiliary",
        head="Nahtirah Hat",
        body="Ebers Bliaud +1",
        hands={ name="Telchine Gloves", augments={'Pet: "Regen"+3','Pet: Damage taken -3%',}},
        legs={ name="Piety Pantaln. +1", augments={'Enhances "Shellra V" effect',}},
        feet="Ebers Duckbills +1",
        neck="Dualism Collar +1",
        waist="Fucho-no-Obi",
        left_ear="Etiolation Earring",
        right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
        left_ring="K'ayres Ring",
        right_ring="Kunaji Ring",
        back="Solemnity Cape",
    --}
    
    	sets.midcast.Curaga = {
        main="Queller Rod",
        sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -8%','HP+22',}},
        ammo="Pemphredo Tathlum",
        head={ name="Vanya Hood", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
        body="Kaykaus Bliaut",
        hands={ name="Vanya Cuffs", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
        legs="Ebers Pant. +1",
        feet={ name="Vanya Clogs", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
        neck="Incanter's Torque",
        waist="Austerity Belt +1",
        left_ear="Glorious Earring",
        right_ear="Mendi. Earring",
        left_ring="Defending Ring",
        right_ring="Sirona's Ring",
        back="Solemnity Cape",
    }
    
    	sets.self_healing = {main={ name="Queller Rod", augments={'MP+80','"Cure" potency +15%','Enmity-5',}},
        sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -8%','HP+22',}},
        ammo="Pemphredo Tathlum",
        head={ name="Vanya Hood", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
        body={ name="Kaykaus Bliaut", augments={'MP+60','"Cure" potency +5%','"Conserve MP"+6',}},
        hands={ name="Vanya Cuffs", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
        legs="Ebers Pant. +1",
        feet={ name="Vanya Clogs", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
        neck="Phalaina Locket",
        waist="Gishdubar Sash",
        left_ear="Glorious Earring",
        right_ear="Mendi. Earring",
        left_ring="Asklepian Ring",
        right_ring="Kunaji Ring",
        back={ name="Alaunus's Cape", augments={'MND+20','Eva.+20 /Mag. Eva.+20','"Cure" potency +10%',}},
    }
    --	sets.self_healing.HP = {
        main={ name="Queller Rod", augments={'MP+80','"Cure" potency +15%','Enmity-5',}},
        sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -8%','HP+22',}},
        ammo="Homiliary",
        head="Nahtirah Hat",
        body="Ebers Bliaud +1",
        hands={ name="Telchine Gloves", augments={'Pet: "Regen"+3','Pet: Damage taken -3%',}},
        legs={ name="Piety Pantaln. +1", augments={'Enhances "Shellra V" effect',}},
        feet="Ebers Duckbills +1",
        neck="Dualism Collar +1",
        waist="Fucho-no-Obi",
        left_ear="Etiolation Earring",
        right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
        left_ring="K'ayres Ring",
        right_ring="Kunaji Ring",
        back="Solemnity Cape",
    --}
    	
    	sets.midcast.CureMelee = {
        ammo="Pemphredo Tathlum",
        head={ name="Vanya Hood", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
        body="Kaykaus Bliaut",
        hands={ name="Vanya Cuffs", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
        legs="Ebers Pant. +1",
        feet={ name="Vanya Clogs", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
        neck="Incanter's Torque",
        waist="Austerity Belt +1",
        left_ear="Glorious Earring",
        right_ear="Mendi. Earring",
        left_ring="Defending Ring",
        right_ring="Sirona's Ring",
        back="Solemnity Cape",
    }
    
    	sets.midcast.Cursna = {main="Yagrush",
    	sub="Thuellaic ecu +1",
        ammo="Incantor Stone",
        head="Ebers Cap +1",
        body="Ebers Bliaud +1",
        hands="Fanatic Gloves",
        legs="Theo. Pant. +1",
        feet="Vanya Clogs",
        neck="Debilis Medallion",
        waist="Gishdubar Sash",
        left_ear="Gifted Earring",
        right_ear="Mendicant's Earring",
        left_ring="Haoma's Ring",
        right_ring="Haoma's Ring",
        back="Alaunus's Cape",
    }
    
    	sets.midcast.StatusRemoval = {main="Yagrush",
    	sub="Thuellaic ecu +1",
        ammo="Pemphredo Tathlum",
        head="Ebers Cap +1",
        body={ name="Kaykaus Bliaut", augments={'MP+60','"Cure" potency +5%','"Conserve MP"+6',}},
        hands="Fanatic Gloves",
        legs="Ebers Pant. +1",
        feet="Medium's Sabots",
        neck="incanter's torque",
        waist="Austerity Belt +1",
        left_ear="Gifted Earring",
        right_ear="Mendicant's Earring",
        back="Fi Follet Cape +1",
    }
    
    
    	sets.midcast['Enhancing Magic'] = {main="Sucellus",
        sub="Thuellaic Ecu +1",
        ammo="Pemphredo Tathlum",
        head={ name="Telchine Cap", augments={'Enh. Mag. eff. dur. +10',}},
        body={ name="Telchine Chas.", augments={'Enh. Mag. eff. dur. +10',}},
        hands={ name="Telchine Gloves", augments={'Enh. Mag. eff. dur. +10',}},
        legs={ name="Telchine Braconi", augments={'Enh. Mag. eff. dur. +9',}},
        feet={ name="Telchine Pigaches", augments={'Enh. Mag. eff. dur. +9',}},
        neck="Incanter's Torque",
        waist="Gishdubar Sash",
        left_ear="Gifted Earring",
        right_ear="Mendi. Earring",
        left_ring="Defending Ring",
        right_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Magic dmg. taken -6%',}},
        back="Fi Follet Cape +1",
    }
    
    	sets.midcast.Haste = set_combine(sets.midcast.Aquaveil, {head="Telchine Cap",Body="Telchine Chasuble",hands="Telchine Gloves",legs="Telchine Braconi",feet="Telchine Pigaches"})
    	
    	sets.midcast.Refresh = set_combine(sets.midcast.Aquaveil, {head={ name="Telchine Cap", augments={'Enh. Mag. eff. dur. +10',}},body={ name="Telchine Chas.", augments={'Enh. Mag. eff. dur. +10',}},hands={ name="Telchine Gloves", augments={'Enh. Mag. eff. dur. +9',}},legs={ name="Telchine Braconi", augments={'Enh. Mag. eff. dur. +9',}},waist="Gishdubar Sash",feet={ name="Telchine Pigaches", augments={'Enh. Mag. eff. dur. +9',}},back="Grapevine Cape"})
    	
    	sets.midcast.Shell = {main="Sucellus",
        sub="Thuellaic Ecu +1",
        ammo="Pemphredo Tathlum",
        head={ name="Telchine Cap", augments={'Enh. Mag. eff. dur. +10',}},
        body={ name="Telchine Chas.", augments={'Enh. Mag. eff. dur. +10',}},
        hands={ name="Telchine Gloves", augments={'Enh. Mag. eff. dur. +9',}},
        legs={ name="Telchine Braconi", augments={'Enh. Mag. eff. dur. +9',}},
        feet={ name="Telchine Pigaches", augments={'Enh. Mag. eff. dur. +9',}},
        neck="Incanter's Torque",
        waist="Gishdubar Sash",
        left_ear="Gifted Earring",
        right_ear="Mendi. Earring",
        left_ring="Defending Ring",
        right_ring="Sheltered Ring",
        back="Fi Follet Cape +1",
    }
    
    	sets.midcast.Protect = {main="Sucellus",
        sub="Thuellaic Ecu +1",
        ammo="Pemphredo Tathlum",
        head={ name="Telchine Cap", augments={'Enh. Mag. eff. dur. +10',}},
        body={ name="Telchine Chas.", augments={'Enh. Mag. eff. dur. +10',}},
        hands={ name="Telchine Gloves", augments={'Enh. Mag. eff. dur. +9',}},
        legs={ name="Telchine Braconi", augments={'Enh. Mag. eff. dur. +9',}},
        feet={ name="Telchine Pigaches", augments={'Enh. Mag. eff. dur. +9',}},
        neck="Incanter's Torque",
        waist="Gishdubar Sash",
        left_ear="Gifted Earring",
        right_ear="Mendi. Earring",
        left_ring="Defending Ring",
        right_ring="Sheltered Ring",
        back="Fi Follet Cape +1",
    }
    
    	sets.midcast.Stoneskin = {main="Sucellus",
        sub="Thuellaic Ecu +1",
        ammo="Pemphredo Tathlum",
        head={ name="Telchine Cap", augments={'Enh. Mag. eff. dur. +10',}},
        body={ name="Telchine Chas.", augments={'Enh. Mag. eff. dur. +10',}},
        hands={ name="Telchine Gloves", augments={'Enh. Mag. eff. dur. +9',}},
        legs="Shedir Seraweels",
        feet={ name="Telchine Pigaches", augments={'Enh. Mag. eff. dur. +9',}},
        neck="Stone Gorget",
        waist="Siegel Sash",
        left_ear="Gifted Earring",
        right_ear="Earthcry Earring",
        back="Fi Follet Cape +1",
    }
    	
    	sets.midcast.Aquaveil = {main="Vadose Rod",
        sub="Thuellaic Ecu +1",
        ammo="Pemphredo Tathlum",
        head="chironic hat",
        body={ name="Telchine Chas.", augments={'Enh. Mag. eff. dur. +10',}},
        hands={ name="Telchine Gloves", augments={'Enh. Mag. eff. dur. +9',}},
        legs="Shedir Seraweels",
        feet={ name="Telchine Pigaches", augments={'Enh. Mag. eff. dur. +9',}},
        neck="incanter's torque",
        waist="Emphatikos Rope",
        left_ear="Gifted Earring",
        right_ear="Mendicant's Earring",
        back="Fi Follet Cape +1",
    }
    
    	sets.midcast.Auspice = {main="Sucellus",
        sub="Thuellaic Ecu +1",
        ammo="Pemphredo Tathlum",
        head={ name="Vanya Hood", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
        body={ name="Kaykaus Bliaut", augments={'MP+60','"Cure" potency +5%','"Conserve MP"+6',}},
        hands="Dynasty Mitts",
        legs={ name="Vanya Slops", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
        feet="Ebers Duckbills +1",
        neck="incanter's torque",
        waist="Austerity Belt +1",
        left_ear="Gifted Earring",
        right_ear="Mendicant's Earring",
        back="Fi Follet Cape +1",
    }
    
    	sets.midcast.BarElement = {main="Beneficus",
        sub="Thuellaic Ecu +1",
        ammo="Pemphredo Tathlum",
        head="Ebers Cap +1",
        body="Ebers Bliaud +1",
        hands="Ebers Mitts +1",
        legs="Piety Pantaloons +1",
        feet="Ebers Duckbills +1",
        neck="incanter's torque",
        waist="Olympus Sash",
        left_ear="Andoaa Earring",
        right_ear="Mendicant's Earring",
        left_ring="Defending Ring",
        right_ring="Dark Ring",
        back="Fi Follet Cape +1",
    }
    
    	sets.midcast.Regen = {main="Bolelabunga",
        sub="Thuellaic Ecu +1",
        ammo="Pemphredo Tathlum",
        head="Inyanga Tiara +1",
        body={ name="Piety Briault +1", augments={'Enhances "Benediction" effect',}},
        hands="Ebers Mitts +1",
        legs="Theo. Pant. +1",
        feet={ name="Telchine Pigaches", augments={'Enh. Mag. eff. dur. +9',}},
        neck="incanter's torque",
        waist="Austerity Belt +1",
        left_ear="Gifted Earring",
        right_ear="Mendicant's Earring",
        back="Fi Follet Cape +1",
    }
    
    	sets.midcast.Protectra = {main="Sucellus",
        sub="Thuellaic Ecu +1",
        ammo="Pemphredo Tathlum",
        head={ name="Telchine Cap", augments={'Enh. Mag. eff. dur. +10',}},
        body={ name="Telchine Chas.", augments={'Enh. Mag. eff. dur. +10',}},
        hands={ name="Telchine Gloves", augments={'Enh. Mag. eff. dur. +9',}},
        legs={ name="Telchine Braconi", augments={'Enh. Mag. eff. dur. +9',}},
        feet="Piety Duckbills +1",
        neck="Incanter's Torque",
        waist="Gishdubar Sash",
        left_ear="Gifted Earring",
        right_ear="Mendi. Earring",
        left_ring="Defending Ring",
        right_ring="Sheltered Ring",
        back="Fi Follet Cape +1",
    }
    
    	sets.midcast.Shellra = {main="Sucellus",
        sub="Thuellaic Ecu +1",
        ammo="Pemphredo Tathlum",
        head={ name="Telchine Cap", augments={'Enh. Mag. eff. dur. +10',}},
        body={ name="Telchine Chas.", augments={'Enh. Mag. eff. dur. +10',}},
        hands={ name="Telchine Gloves", augments={'Enh. Mag. eff. dur. +9',}},
        legs="Piety Pantaloons +1",
        feet={ name="Telchine Pigaches", augments={'Enh. Mag. eff. dur. +9',}},
        neck="Incanter's Torque",
        waist="Gishdubar Sash",
        left_ear="Gifted Earring",
        right_ear="Mendi. Earring",
        left_ring="Defending Ring",
        right_ring="Sheltered Ring",
        back="Fi Follet Cape +1",
    }
    
    
    	sets.midcast['Divine Magic'] = {hands="Fanatic Gloves",}
    
    	sets.midcast['Dark Magic'] = {}
    
    	--sets.midcast.Stun = set_combine(sets.midcast.DarkMagic, {main=gear.RecastStaff})
    
    	-- Custom spell classes
    	sets.midcast['Enfeebling Magic'] = {main={ name="Gada", augments={'Enh. Mag. eff. dur. +6','"Mag.Atk.Bns."+7',}},
        sub="Chanter's Shield",
    	ammo="Quartz Tathlum +1",
        head="Befouled Crown",
        body="Vanya Robe",
        hands="Inyanga Dastanas +1",
        legs="Chironic Hose",
        feet="Medium's Sabots",
        neck="incanter's torque",
        waist="Rumination Sash",
        left_ear="Dignitary's Earring",
        right_ear="Enfeebling Earring",
        left_ring="Globidonta Ring",
        right_ring="Sangoma Ring",
        back="Altruistic Cape",
    }
    	sets.midcast.MndEnfeebles = {
        main={ name="Gada", augments={'Enh. Mag. eff. dur. +6','"Mag.Atk.Bns."+7',}},
        sub="Thuellaic Ecu +1",
        ammo="Quartz Tathlum +1",
        head="Befouled Crown",
        body={ name="Vanya Robe", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
        hands="Inyan. Dastanas +1",
        legs={ name="Chironic Hose", augments={'Mag. Acc.+11 "Mag.Atk.Bns."+11','MND+7','Mag. Acc.+14',}},
        feet={ name="Medium's Sabots", augments={'MP+50','MND+10','"Conserve MP"+7','"Cure" potency +5%',}},
        neck="Incanter's Torque",
        waist="Rumination Sash",
        left_ear="Digni. Earring",
        right_ear="Enfeebling Earring",
        left_ring="Stikini Ring +1",
        right_ring="Stikini Ring",
        back="Altruistic Cape",
    }
    
    	sets.midcast.IntEnfeebles = {
        main={ name="Gada", augments={'Enh. Mag. eff. dur. +6','"Mag.Atk.Bns."+7',}},
        sub="Thuellaic Ecu +1",
        ammo="Quartz Tathlum +1",
        head="Befouled Crown",
        body={ name="Vanya Robe", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
        hands="Inyan. Dastanas +1",
        legs={ name="Chironic Hose", augments={'Mag. Acc.+11 "Mag.Atk.Bns."+11','MND+7','Mag. Acc.+14',}},
        feet={ name="Medium's Sabots", augments={'MP+50','MND+10','"Conserve MP"+7','"Cure" potency +5%',}},
        neck="Incanter's Torque",
        waist="Rumination Sash",
        left_ear="Digni. Earring",
        right_ear="Enfeebling Earring",
        left_ring="Stikini Ring +1",
        right_ring="Stikini Ring",
        back="Altruistic Cape",
    }
    
    	
    	-- Sets to return to when not performing an action.
    	
    	-- Resting sets
    	sets.resting = {main="Boonwell Staff", sub="Oneiros Grip"}
    	
    
    	-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
    	sets.idle = {main={ name="Queller Rod", augments={'MP+80','"Cure" potency +15%','Enmity-5',}},
        sub="Genmei Shield",
        ammo="Homiliary",
        head="Befouled Crown",
        body={ name="Witching Robe", augments={'MP+50','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Refresh"+1',}},
        hands="Shrieker's Cuffs",
        legs="Assid. Pants +1",
        feet="Crier's Gaiters",
        neck="Loricate Torque +1",
        waist="Fucho-no-Obi",
        left_ear="Etiolation Earring",
        right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
        left_ring="Defending Ring",
        right_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Magic dmg. taken -6%',}},
        back="Solemnity Cape",}
    
    	sets.idle.HP = {
        main={ name="Queller Rod", augments={'MP+80','"Cure" potency +15%','Enmity-5',}},
        sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','"Cure" spellcasting time -8%','HP+22',}},
        ammo="Homiliary",
        head="Nahtirah Hat",
        body="Ebers Bliaud +1",
        hands={ name="Telchine Gloves", augments={'Pet: "Regen"+3','Pet: Damage taken -3%',}},
        legs={ name="Piety Pantaln. +1", augments={'Enhances "Shellra V" effect',}},
        feet="Ebers Duckbills +1",
        neck="Dualism Collar +1",
        waist="Fucho-no-Obi",
        left_ear="Etiolation Earring",
        right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
        left_ring="K'ayres Ring",
        right_ring="Kunaji Ring",
        back="Solemnity Cape",
    }
    	sets.idle.PDT = {main="Mafic Cudgel",
        sub="Genmei Shield",
        ammo="Homiliary",
        head={ name="Vanya Hood", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
        body="Vrikodara Jupon",
        hands="Shrieker's Cuffs",
        legs="Artsieq Hose",
        feet="Battlecast Gaiters",
        neck="Loricate Torque +1",
        waist="Rumination Sash",
        left_ear="Etiolation Earring",
        right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
        left_ring="Defending Ring",
        right_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Magic dmg. taken -6%',}},
        back="Solemnity Cape",
    }
    
    	sets.idle.Town = {main="Yagrush",
        sub="Genmei Shield",
        ammo="Homiliary",
        head="Befouled Crown",
        body={ name="Witching Robe", augments={'MP+50','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Refresh"+1',}},
        hands="Shrieker's Cuffs",
        legs="Assid. Pants +1",
        feet="Crier's Gaiters",
        neck="Loricate Torque +1",
        waist="Fucho-no-Obi",
        left_ear="Etiolation Earring",
        right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
        left_ring="Defending Ring",
        right_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Magic dmg. taken -6%',}},
        back="Solemnity Cape",
    }
    	
    	sets.idle.Weak = {main={ name="Queller Rod", augments={'MP+80','"Cure" potency +15%','Enmity-5',}},
        sub="Genmei Shield",
        ammo="Homiliary",
        head="Befouled Crown",
        body={ name="Witching Robe", augments={'MP+50','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Refresh"+1',}},
        hands="Shrieker's Cuffs",
        legs="Assid. Pants +1",
        feet="Crier's Gaiters",
        neck="Loricate Torque +1",
        waist="Fucho-no-Obi",
        left_ear="Etiolation Earring",
        right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
        left_ring="Defending Ring",
        right_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Magic dmg. taken -6%',}},
        back="Solemnity Cape",}
    	
    	sets.Owleyes = {main={ name="Queller Rod", augments={'MP+80','"Cure" potency +15%','Enmity-5',}},
        sub="Genmei Shield",
        ammo="Homiliary",
        head="Befouled Crown",
        body={ name="Witching Robe", augments={'MP+50','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Refresh"+1',}},
        hands="Shrieker's Cuffs",
        legs="Assid. Pants +1",
        feet="Crier's Gaiters",
        neck="Loricate Torque +1",
        waist="Fucho-no-Obi",
        left_ear="Etiolation Earring",
        right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
        left_ring="Defending Ring",
        right_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Magic dmg. taken -6%',}},
        back="Solemnity Cape",}
    	
    	-- Defense sets
    
    	sets.defense.PDT = {}
    
    	sets.defense.MDT = {}
    
    	sets.Kiting = {feet="crier's gaiters"}
    
    	-- 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
    	
    	-- Basic set for if no TP weapon is defined.
    	sets.engaged = {}
    
    
    	-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
    	sets.buff['Divine Caress'] = {hands="ebers mitts +1",back="Mending Cape"}
    end
    
    -------------------------------------------------------------------------------------------------------------------
    -- Job-specific hooks that are called to process player actions at specific points in time.
    -------------------------------------------------------------------------------------------------------------------
    
    -- 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)
    	classes.CustomClass = get_spell_class(spell, action, spellMap)
    
    	if spell.english == "Paralyna" and buffactive.Paralyzed then
    		-- no gear swaps if we're paralyzed, to avoid blinking while trying to remove it.
    		eventArgs.handled = true
    	end
    	
    	if spell.skill == 'HealingMagic' then
    		gear.default.obi_back = "Pahtli Cape"
    	else
    		gear.default.obi_back = "Pahtli Cape"
    	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)
    	end
    end
    
    
    function job_post_midcast(spell, action, spellMap, eventArgs)
    
        if spellMap == 'Cure' and spell.target.type == 'SELF' and sets.self_healing then
            equip(sets.self_healing)
        end
    
        -- Apply Divine Caress boosting items as highest priority over other gear, if applicable.
        if spellMap == 'StatusRemoval' and buffactive['Divine Caress'] then
            equip(sets.buff['Divine Caress'])
        end
    end
    
    
    -- Return true if we handled the aftercast work.  Otherwise it will fall back
    -- to the general aftercast() code in Mote-Include.
    function job_aftercast(spell, action, spellMap, eventArgs)
    	if not spell.interrupted then
    		if state.Buff[spell.name] ~= nil then
    			state.Buff[spell.name] = true
    		elseif spell.name == "Afflatus Misery" then
    			state.Buff['Afflatus Solace'] = false
    		end
    	end
    end
    
    
    -------------------------------------------------------------------------------------------------------------------
    -- Customization hooks for idle and melee sets, after they've been automatically constructed.
    -------------------------------------------------------------------------------------------------------------------
    
    function customize_idle_set(idleSet)
    	if player.mpp < 90 and state.IdleMode == "Normal" and state.Defense.Active == false then
    		idleSet = set_combine(idleSet, sets.Owleyes)
    	end
    	
    	return idleSet
    end
    
    
    -------------------------------------------------------------------------------------------------------------------
    -- General hooks for other events.
    -------------------------------------------------------------------------------------------------------------------
    
    -- Called when a player gains or loses a buff.
    -- buff == buff gained or lost
    -- gain == true if the buff was gained, false if it was lost.
    function job_buff_change(buff, gain)
    	if state.Buff[buff] ~= nil then
    		state.Buff[buff] = gain
    	end
    end
    
    
    -------------------------------------------------------------------------------------------------------------------
    -- User code that supplements self-commands.
    -------------------------------------------------------------------------------------------------------------------
    
    -- Called by the 'update' self-command.
    function job_update(cmdParams, eventArgs)
    	if cmdParams[1] == 'user' and not areas.Cities:contains(world.area) then
    		local needsArts = 
    			player.sub_job:lower() == 'sch' and
    			not buffactive['Light Arts'] and
    			not buffactive['Addendum: White'] and
    			not buffactive['Dark Arts'] and
    			not buffactive['Addendum: Black']
    			
    		if not buffactive['Afflatus Solace'] and not buffactive['Afflatus Misery'] then
    			if needsArts then
    				send_command('@input /ja "Afflatus Solace" <me>;wait 1.2;input /ja "Light Arts" <me>')
    			else
    				send_command('@input /ja "Afflatus Solace" <me>')
    			end
    		end
    	end
    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
    		meleeString = 'Melee: Weapons locked, '
    	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.
    -------------------------------------------------------------------------------------------------------------------
    
    function get_spell_class(spell, action, spellMap)
    	local spellclass
    	
    	if spell.action_type == 'Magic' then
    		if spell.skill == "EnfeeblingMagic" then
    			if spell.type == "WhiteMagic" then
    				spellclass = "MndEnfeebles"
    			else
    				spellclass = "IntEnfeebles"
    			end
    		else
    			if spellMap == 'Cure' and state.Buff['Afflatus Solace'] then
    				spellclass = "CureSolace"
    			elseif (spellMap == 'Cure' or spellMap == "Curaga") and player.status == 'Engaged' and player.equipment.main ~= 'Yagrush' then
    				spellclass = "CureMelee"
    			end
    		end
    	end
    	
    	return spellclass
    end

  20. #5600
    Campaign
    Join Date
    Jul 2007
    Posts
    6,633
    BG Level
    8

    Quote Originally Posted by dlsmd View Post
    does he even have a midcast set named sets.midcast.<spellname or spell type or spellMap> if not then thats the reason
    not to mention motes include map has not been updated in a while and mote is not around to give help to anyone
    Yeah he does!
    sets.midcast.SongEffect is the default song buffs midcast set. This gets merged somewhere with specific sets.midcast[song] sets for specific song-buffing items
    Then there's sets.midcast.SongDebuff for debuff songs.

    Mote's lua has a custom "get_song_class(spell)" function which returns wether the song being cast is a buff or a debuff, and equips one of the 2 sets above accordingly.
    I mean I don't exactely know how it works because Mote's lua are extremely complicated, but it should be something like this.

    My friend's lua works perfectly afaik, he just wanted to implement this exception for when Nightingale is up.
    According to Mote's comments (see the first Code I posted in my post above) he already has a variable for this specific use, it's called "eventArgs.useMidcastGear" and it has to be set to "true".
    Which is exactely what I do in my addition, I set it to true when Nightingale is up, to false when Nightingale is down.
    Maybe there's more to this variable and it has to be handled somewhere else, I dunno. It's not present in the BRD lua itself, so I assume it's an include from one of the general Mote's luas.

Similar Threads

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