RDM Lua, Please Assist!

Eorzea Time
 
 
 
Language: JP EN FR DE
users online
Forum » FFXI » Jobs » Red Mage » RDM Lua, please assist!
RDM Lua, please assist!
Offline
Posts: 22
By joltz18 2018-07-31 00:26:10
Link | Quote | Reply
 
ok so i need some major help...I'm a complete and total noob when it comes to GS and this is what i've been working on the past 2 weeks, pretty much a template i found on the internet, i've had troubles with it but i've managed to fix a few...until tonight...i finished my ComposureOther set, plugged it in, and it doesn't work...i'm sure i'm screwing SOMETHING up so i'm adding my entire RDM lua to see if anyone can help me find it, i really appreciate it for those who read through it, i know it's a mess, but again, i'm still learning :)

Code
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
-- Initialization function for this job file.
function get_sets()
mote_include_version = 2
-- Load and initialize the include file.
include('Mote-Include.lua')
end
-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
function job_setup()
state.Buff.Saboteur = buffactive.saboteur or false
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
state.OffenseMode:options('None', 'Normal')
state.HybridMode:options('Normal', 'PhysicalDef', 'MagicalDef')
state.CastingMode:options('Normal', 'Resistant')
state.IdleMode:options('Normal', 'PDT', 'MDT')
gear.default.obi_waist = "Sekhmet Corset"
select_default_macro_book()
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA['Chainspell'] = {body="Vitivation Tabard"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {
head="Atrophy Chapeau +1",
body="Atrophy Tabard +1",hands="Yaoyotl Gloves",
back="Refraction Cape",legs="Hagondes Pants",feet="Hagondes Sabots"}
-- Don't need any special gear for Healing Waltz.
sets.precast.Waltz['Healing Waltz'] = {}
-- Fast cast sets for spells
-- 80% Fast Cast (including trait) for all spells, plus 5% quick cast
-- No other FC sets necessary.

sets.precast.FC = {
        head="Atro. Chapeau +1",
    body={ name="Viti. Tabard +1", augments={'Enhances "Chainspell" effect',}},
    hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
    legs="Aya. Cosciales +1",
    feet={ name="Merlinic Crackows", augments={'"Mag.Atk.Bns."+21','Magic burst dmg.+8%','INT+10','Mag. Acc.+9',}},
    neck="Voltsurge torque",
    waist="Witful Belt",
    left_ear="Loquac. Earring",
    right_ear="Bladeborn Earring",
    left_ring="Lebeche Ring",
    right_ring="Jhakri Ring",
    back="Swith Cape",}
sets.precast.FC.Impact = set_combine(sets.precast.FC, {head=empty,body="Twilight Cloak"})

sets.precast.FC['Enfeebling Magic'] = {  
    ammo="Hydrocera",
    head="Atro. Chapeau +1",
    body={ name="Viti. Tabard +1", augments={'Enhances "Chainspell" effect',}},
    hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
    legs="Aya. Cosciales +1",
    feet={ name="Merlinic Crackows", augments={'"Mag.Atk.Bns."+21','Magic burst dmg.+8%','INT+10','Mag. Acc.+9',}},
    neck="Lissome Necklace",
    waist="Witful Belt",
    left_ear="Loquac. Earring",
    right_ear="Bladeborn Earring",
    left_ring="Lebeche Ring",
    right_ring="Jhakri Ring",
    back="Swith Cape",}
sets.precast.FC['Healing Magic'] = sets.precast.FC

sets.precast.Cure = {
     ammo="Hydrocera",
    head="Atro. Chapeau +1",
    body={ name="Viti. Tabard +1", augments={'Enhances "Chainspell" effect',}},
    hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
    legs="Aya. Cosciales +1",
    feet={ name="Merlinic Crackows", augments={'"Mag.Atk.Bns."+21','Magic burst dmg.+8%','INT+10','Mag. Acc.+9',}},
    neck="Lissome Necklace",
    waist="Witful Belt",
    left_ear="Loquac. Earring",
    right_ear="Bladeborn Earring",
    left_ring="Lebeche Ring",
    right_ring="Jhakri Ring",
    back="Swith Cape",}
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS,
{ ammo="Jukukik Feather",
    head={ name="Vitivation Chapeau", augments={'Enhances "Dia III" effect','Enhances "Slow II" effect',}},
    body="Artsieq Jubbah", 
    hands={ name="Hagondes Cuffs", augments={'Phys. dmg. taken -1%',}},
    legs="Orvail Pants +1",
    feet="Weather. Souliers",
    neck="Soil Gorget",
    waist="Soil Belt",
    left_ear="Steelflash Earring",
    right_ear="Bladeborn Earring",
    left_ring="Rajas Ring",
    right_ring="Karka Ring",
    back="Atheling Mantle",})
sets.precast.WS['Savage Blade'] = {   ammo="Focal Orb",
    head="Jhakri Coronal +1",
    body="Jhakri Robe +1",
    hands="Jhakri Cuffs +1",
    legs="Jhakri Slops +1",
    feet="Jhakri Pigaches +1",
    neck="Fotia Gorget",
    waist="Fotia Belt",
    left_ear="Ishvara Earring",
    right_ear="Brutal Earring",
    left_ring="Apate Ring",
    right_ring="Rufescent Ring",
    back={ name="Sucellos's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10',}},
}

sets.precast.WS['Sanguine Blade'] = {ammo="Witchstone",
head="Hagondes Hat",neck="Eddy Necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Strendu Ring",ring2="Acumen Ring",
back="Toro Cape",legs="Hagondes Pants",feet="Hagondes Sabots"}
-- Midcast Sets
sets.midcast.FastRecast = {
head="Atrophy Chapeau",ear2="Loquacious Earring",
body="Vitivation Tabard",hands="Gendewitha Gages",ring1="Prolix Ring",
back="Swith Cape +1",waist="Witful Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}

sets.midcast.Cure = {
    ammo="Hydrocera",
    head={ name="Vanya Hood", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
    body={ name="Viti. Tabard +1", augments={'Enhances "Chainspell" effect',}},
    hands={ name="Telchine Gloves", augments={'"Cure" spellcasting time -6%',}},
    legs="Atrophy Tights +1",
    feet={ name="Vanya Clogs", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
    neck="Phalaina Locket",
    waist="Witful Belt",
    left_ear="Mendi. Earring",
    right_ear="Roundel Earring",
    left_ring="Ephedra Ring",
    right_ring="Sirona's Ring",
    back={ name="Ghostfyre Cape", augments={'Enfb.mag. skill +7','Enha.mag. skill +7','Mag. Acc.+10','Enh. Mag. eff. dur. +14',}},
}
sets.midcast.Curaga = sets.midcast.Cure

sets.midcast['Enhancing Magic'] = {main="Pukulatmuj",
    sub="Arendsi Fleuret",
    ammo="Ginsen",
    head="Atro. Chapeau +1",
    body={ name="Viti. Tabard +1", augments={'Enhances "Chainspell" effect',}},
    hands="Atrophy Gloves +1",
    legs="Atrophy Tights +1",
    feet="Leth. Houseaux +1",
    neck="Lissome Necklace",
    waist="Olympus Sash",
    left_ear="Loquac. Earring",
    right_ear="Mendi. Earring",
    left_ring="Lebeche Ring",
    right_ring="Jhakri Ring",
    back={ name="Ghostfyre Cape", augments={'Enfb.mag. skill +7','Enha.mag. skill +7','Mag. Acc.+10','Enh. Mag. eff. dur. +14',}},
}

sets.midcast['Haste II'] = {
ammo="Ginsen",
    head="Atro. Chapeau +1",
    body={ name="Viti. Tabard +1", augments={'Enhances "Chainspell" effect',}},
    hands="Atrophy Gloves +1",
    legs="Atrophy Tights +1",
    feet="Leth. Houseaux +1",
    neck="Lissome Necklace",
    waist="Olympus Sash",
    left_ear="Loquac. Earring",
    right_ear="Mendi. Earring",
    left_ring="Lebeche Ring",
    right_ring="Jhakri Ring",
    back={ name="Ghostfyre Cape", augments={'Enfb.mag. skill +7','Enha.mag. skill +7','Mag. Acc.+10','Enh. Mag. eff. dur. +14',}},
}
sets.buff.ComposureOther = {
ammo="Ginsen",
    head="Leth. Chapeau +1",
    body={ name="Viti. Tabard +1", augments={'Enhances "Chainspell" effect',}},
    hands="Atrophy Gloves +1",
    legs="Atrophy Tights +1",
    feet="Leth. Houseaux +1",
    neck="Lissome Necklace",
    waist="Olympus Sash",
    left_ear="Loquac. Earring",
    right_ear="Mendi. Earring",
    left_ring="Lebeche Ring",
    right_ring="Jhakri Ring",
    back={ name="Ghostfyre Cape", augments={'Enfb.mag. skill +7','Enha.mag. skill +7','Mag. Acc.+10','Enh. Mag. eff. dur. +14',}},
}
sets.midcast['Refresh II'] = sets.midcast['Haste II']
sets.midcast['Temper'] = sets.midcast['Enhancing Magic']
sets.midcast['Barfire'] = sets.midcast['Enhancing Magic']
sets.midcast['Barblizzard'] = sets.midcast['Enhancing Magic']
sets.midcast['Barstone'] = sets.midcast['Enhancing Magic']
sets.midcast['Barthunder'] = sets.midcast['Enhancing Magic']
sets.midcast['Baraero'] = sets.midcast['Enhancing Magic']
sets.midcast['Barwater'] = sets.midcast['Enhancing Magic']
sets.midcast['Barsleep'] = sets.midcast['Enhancing Magic']
sets.midcast['Barpoison'] = sets.midcast['Enhancing Magic']
sets.midcast['Barparalyze'] = sets.midcast['Enhancing Magic']
sets.midcast['Barblind'] = sets.midcast['Enhancing Magic']
sets.midcast['Barsilence'] = sets.midcast['Enhancing Magic']
sets.midcast['Barpetrify'] = sets.midcast['Enhancing Magic']
sets.midcast['Barvirus'] = sets.midcast['Enhancing Magic']
sets.midcast['Baramnesia'] = sets.midcast['Enhancing Magic']
sets.midcast['Gain-STR'] = sets.midcast['Enhancing Magic']
sets.midcast['Gain-VIT'] = sets.midcast['Enhancing Magic']
sets.midcast['Gain-DEX'] = sets.midcast['Enhancing Magic']
sets.midcast['Gain-AGI'] = sets.midcast['Enhancing Magic']
sets.midcast['Gain-MND'] = sets.midcast['Enhancing Magic']
sets.midcast['Gain-INT'] = sets.midcast['Enhancing Magic']
sets.midcast['Gain-CHR'] = sets.midcast['Enhancing Magic']
sets.midcast['Enfire'] = sets.midcast['Enhancing Magic']
sets.midcast['Enwater'] = sets.midcast['Enhancing Magic']
sets.midcast['Enaero'] = sets.midcast['Enhancing Magic']
sets.midcast['Enstone'] = sets.midcast['Enhancing Magic']
sets.midcast['Enthunder'] = sets.midcast['Enhancing Magic']
sets.midcast['Enblizzard'] = sets.midcast['Enhancing Magic']
sets.midcast['Enfire II'] = sets.midcast['Enhancing Magic']
sets.midcast['Enwater II'] = sets.midcast['Enhancing Magic']
sets.midcast['Enaero II'] = sets.midcast['Enhancing Magic']
sets.midcast['Enstone II'] = sets.midcast['Enhancing Magic']
sets.midcast['Enthunder II'] = sets.midcast['Enhancing Magic']
sets.midcast['Enblizzard II'] = sets.midcast['Enhancing Magic']
sets.midcast.Trust = sets.midcast['Haste II']
sets.midcast['Sheep Song'] = sets.midcast['Enfeebling Magic']
sets.midcast['Erase'] = sets.midcast['Haste II']
sets.midcast.CureWithLightWeather = {main="Chatoyant Staff",
    sub="Niobid Strap",
    ammo="Ginsen",
    head={ name="Vanya Hood", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
    body={ name="Viti. Tabard +1", augments={'Enhances "Chainspell" effect',}},
    hands={ name="Telchine Gloves", augments={'"Cure" spellcasting time -6%',}},
    legs="Atrophy Tights +1",
    feet={ name="Vanya Clogs", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
    neck="Phalaina Locket",
    waist="Hachirin-no-Obi",
    left_ear="Mendi. Earring",
    right_ear="Roundel Earring",
    left_ring="Lebeche Ring",
    right_ring="Jhakri Ring",
    back="Twilight Cape",
}

sets.midcast.Stoneskin = sets.midcast['Enhancing Magic']
sets.midcast['Enfeebling Magic'] = {     ammo="Hydrocera",
    head={ name="Merlinic Hood", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','INT+6','Mag. Acc.+3','"Mag.Atk.Bns."+15',}},
    body="Jhakri Robe +1",
    hands="Jhakri Cuffs +1",
    legs="Aya. Cosciales +1",
    feet="Aya. Gambieras +1",
    neck="Sanctity Necklace",
    waist="Eschan Stone",
    left_ear="Loquac. Earring",
    right_ear="Psystorm Earring",
    left_ring="Solemn Ring",
    right_ring="Fenrir Ring",
    back={ name="Ghostfyre Cape", augments={'Enfb.mag. skill +7','Enha.mag. skill +7','Mag. Acc.+10','Enh. Mag. eff. dur. +14',}},
}
sets.midcast['Dia III'] = set_combine(sets.midcast['Enfeebling Magic'], {head="Vitiation Chapeau +1"})
sets.midcast['Slow II'] = set_combine(sets.midcast['Enfeebling Magic'], {head="Vitiation Chapeau +1"})
sets.midcast['Elemental Magic'] = {
    ammo="Witchstone",
    head={ name="Merlinic Hood", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','INT+6','Mag. Acc.+3','"Mag.Atk.Bns."+15',}},
    body="Jhakri Robe +1",
    hands={ name="Amalric Gages", augments={'INT+10','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
    legs={ name="Merlinic Shalwar", augments={'"Mag.Atk.Bns."+28','Magic burst dmg.+1%','INT+7','Mag. Acc.+10',}},
    feet={ name="Merlinic Crackows", augments={'"Mag.Atk.Bns."+21','Magic burst dmg.+8%','INT+10','Mag. Acc.+9',}},
    neck="Mizu. Kubikazari",
    waist="Refoccilation Stone",
    left_ear="Hecate's Earring",
    right_ear="Friomisi Earring",
    left_ring="Acumen Ring",
    right_ring="Jhakri Ring",
    back="Toro Cape"}
sets.midcast.Impact = set_combine(sets.midcast['Elemental Magic'], {head=empty,body="Twilight Cloak"})
sets.midcast['Dark Magic'] = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Kalboron Stone",
head="Atrophy Chapeau",neck="Weike Torque",ear1="Lifestorm Earring",ear2="Psystorm Earring",
body="Vanir Cotehardie",hands="Gendewitha Gages",ring1="Prolix Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Goading Belt",legs="Bokwus Slops",feet="Bokwus Boots"}
--sets.midcast.Stun = set_combine(sets.midcast['Dark Magic'], {})
sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {ring1="Excelsis Ring", waist="Fucho-no-Obi"})
sets.midcast.Aspir = sets.midcast.Drain
-- Sets for special buff conditions on spells.
sets.midcast.EnhancingDurationSelf = {main="Pukulatmuj",
    sub="Arendsi Fleuret",
    ammo="Ginsen",
    head="Atro. Chapeau +1",
    body={ name="Viti. Tabard +1", augments={'Enhances "Chainspell" effect',}},
    hands="Atrophy Gloves +1",
    legs="Atrophy Tights +1",
    feet="Leth. Houseaux +1",
    neck="Lissome Necklace",
    waist="Olympus Sash",
    left_ear="Loquac. Earring",
    right_ear="Mendi. Earring",
    left_ring="Lebeche Ring",
    right_ring="Jhakri Ring",
    back={ name="Ghostfyre Cape", augments={'Enfb.mag. skill +7','Enha.mag. skill +7','Mag. Acc.+10','Enh. Mag. eff. dur. +14',}},
}
sets.buff.ComposureOther = {ammo="Ginsen",
    head="Leth. Chapeau +1",
    body={ name="Viti. Tabard +1", augments={'Enhances "Chainspell" effect',}},
    hands="Atrophy Gloves +1",
    legs="Leth. Tights +1",
    feet="Leth. Houseaux +1",
    neck="Lissome Necklace",
    waist="Olympus Sash",
    left_ear="Loquac. Earring",
    right_ear="Mendi. Earring",
    left_ring="Lebeche Ring",
    right_ring="Jhakri Ring",
    back={ name="Ghostfyre Cape", augments={'Enfb.mag. skill +7','Enha.mag. skill +7','Mag. Acc.+10','Enh. Mag. eff. dur. +14',}},
}
sets.buff.Saboteur = {hands="Estoqueur's Gantherots +2"}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main="iridal Staff",
head="Vitivation Chapeau",neck="Wiglen Gorget",
body="Atrophy Tabard +1",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
waist="Austerity Belt",legs="Nares Trews",feet="Chelona Boots +1"}
-- Idle sets
sets.idle.Field = {ammo="Ginsen",
    head="Vitiation Chapeau +1",
    body="Jhakri Robe +1",
    hands="Serpentes Cuffs",
    legs="Atrophy Tights +1",
    feet="Serpentes Sabots",
    neck="Lissome Necklace",
    waist="Witful Belt",
    left_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
    right_ear="Mendi. Earring",
    left_ring={ name="Dark Ring", augments={'Magic dmg. taken -3%','Phys. dmg. taken -5%',}},
    right_ring={ name="Dark Ring", augments={'Magic dmg. taken -3%','Phys. dmg. taken -6%',}},
    back={ name="Mecisto. Mantle", augments={'Cap. Point+49%','AGI+2','Attack+1','DEF+4',}},
} 
sets.idle.Town = {ammo="Ginsen",
    head="Vitiation Chapeau +1",
    body="Jhakri Robe +1",
    hands="Serpentes Cuffs",
    legs="Atrophy Tights +1",
    feet="Serpentes Sabots",
    neck="Lissome Necklace",
    waist="Witful Belt",
    left_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
    right_ear="Mendi. Earring",
    left_ring={ name="Dark Ring", augments={'Magic dmg. taken -3%','Phys. dmg. taken -5%',}},
    right_ring={ name="Dark Ring", augments={'Magic dmg. taken -3%','Phys. dmg. taken -6%',}},
    back={ name="Mecisto. Mantle", augments={'Cap. Point+49%','AGI+2','Attack+1','DEF+4',}},
} 
sets.idle.Weak = {}
sets.idle.PDT = {}
sets.idle.MDT = {}
-- Defense sets
sets.defense.PDT = {
main="Mafic Cudgel",
    sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','Lightning resistance+8','"Cure" spellcasting time -7%',}},
    ammo="Ginsen",
    head="Aya. Zucchetto +1",
    body="Ayanmo Corazza +1",
    hands="Aya. Manopolas +1",
    legs="Aya. Cosciales +1",
    feet="Aya. Gambieras +1",
    neck="Twilight Torque",
    waist="Sailfi Belt +1",
    left_ear="Steelflash Earring",
    right_ear="Bladeborn Earring",
    left_ring={ name="Dark Ring", augments={'Magic dmg. taken -3%','Phys. dmg. taken -5%',}},
    right_ring={ name="Dark Ring", augments={'Magic dmg. taken -3%','Phys. dmg. taken -6%',}},
    back={ name="Mecisto. Mantle", augments={'Cap. Point+49%','AGI+2','Attack+1','DEF+4',}},
}
sets.Kiting = {legs="Crimson Cuisses"}
sets.latent_refresh = {waist="Fucho-no-obi"}
-- Engaged sets
-- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
-- sets if more refined versions aren't defined.
-- If you create a set with both offense and defense modes, the offense mode should be first.
-- EG: sets.engaged.Dagger.Accuracy.Evasion
-- Normal melee group
sets.engaged = {
    main={ name="Vampirism", augments={'STR+6','INT+5','"Occult Acumen"+6','DMG:+10',}},
    sub="Fettering Blade",
    ammo="Ginsen",
    head="Aya. Zucchetto +1",
    body="Jhakri Robe +1",
    hands="Aya. Manopolas +1",
    legs="Jhakri Slops +1",
    feet="Jhakri Pigaches +1",
    neck="Lissome Necklace",
    waist="Sailfi Belt +1",
    left_ear="Steelflash Earring",
    right_ear="Bladeborn Earring",
    left_ring="Petrov Ring",
    right_ring="Apate Ring",
    back={ name="Mecisto. Mantle", augments={'Cap. Point+49%','AGI+2','Attack+1','DEF+4',}},
}
sets.engaged.Defense = {main="Mafic Cudgel",
    sub={ name="Genbu's Shield", augments={'"Cure" potency +3%','Lightning resistance+8','"Cure" spellcasting time -7%',}},
    ammo="Ginsen",
    head="Aya. Zucchetto +1",
    body="Ayanmo Corazza +1",
    hands="Aya. Manopolas +1",
    legs="Aya. Cosciales +1",
    feet="Aya. Gambieras +1",
    neck="Twilight Torque",
    waist="Sailfi Belt +1",
    left_ear="Steelflash Earring",
    right_ear="Bladeborn Earring",
    left_ring={ name="Dark Ring", augments={'Magic dmg. taken -3%','Phys. dmg. taken -5%',}},
    right_ring={ name="Dark Ring", augments={'Magic dmg. taken -3%','Phys. dmg. taken -6%',}},
    back={ name="Mecisto. Mantle", augments={'Cap. Point+49%','AGI+2','Attack+1','DEF+4',}},
}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
-- Run after the default midcast() is done.
-- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Enfeebling Magic' and state.Buff.Saboteur then
equip(sets.buff.Saboteur)
if spell.skill == 'Enhancing Magic' then
equip(sets.midcast.EnhancingDuration)
elseif buffactive.Composure and spell.target.type == 'PLAYER, NPC' then
equip(sets.buff.ComposureOther)
end
elseif spellMap == 'Cure' and spell.target.type == 'SELF' then
equip(sets.midcast.CureSelf)
end
 if spell.skill == 'Elemental Magic' then
        if spell.element == world.day_element or spell.element == world.weather_element then
            equip(sets.midcast['Elemental Magic'], {waist="Hachirin-No-Obi"})
        end
    elseif spell.skill == 'Healing Magic' then
        if spell.name:startswith('Cure') and world.weather_element == 'Light' then
            equip(sets.midcast.Cure, {waist="Hachirin-No-Obi", back="Twilight Cape", main="Chatoyant Staff", sub="Niobid strap"})
        end
end
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
if stateField == 'Offense Mode' then
if newValue == 'None' then
enable('main','sub','range')
else
disable('main','sub','range')
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
return idleSet
end
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
display_current_caster_state()
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book
if player.sub_job == 'WHM' then
set_macro_page(2, 3)
elseif player.sub_job == 'NIN' then
set_macro_page(9, 2)
elseif player.sub_job == 'THF' then
set_macro_page(4, 3)
elseif player.sub_job == 'SCH' then
set_macro_page (8, 3)
else
set_macro_page(1, 3)
end
end
Offline
Posts: 994
By Boshi 2018-07-31 00:56:45
Link | Quote | Reply
 
I think the issue is at line 428. you need an end to seperate the functions. Issues are in job_post_midcast
this is what you have here:
Code
function job_post_midcast(spell, action, spellMap, eventArgs)
	if spell.skill == 'Enfeebling Magic' and state.Buff.Saboteur then
		equip(sets.buff.Saboteur)
	if spell.skill == 'Enhancing Magic' then
		equip(sets.midcast.EnhancingDuration)
	elseif buffactive.Composure and spell.target.type == 'PLAYER, NPC' then
		equip(sets.buff.ComposureOther)
	end
	elseif spellMap == 'Cure' and spell.target.type == 'SELF' then
		equip(sets.midcast.CureSelf)
	end
	if spell.skill == 'Elemental Magic' then
        if spell.element == world.day_element or spell.element == world.weather_element then
            equip(sets.midcast['Elemental Magic'], {waist="Hachirin-No-Obi"})
        end
    elseif spell.skill == 'Healing Magic' then
        if spell.name:startswith('Cure') and world.weather_element == 'Light' then
            equip(sets.midcast.Cure, {waist="Hachirin-No-Obi", back="Twilight Cape", main="Chatoyant Staff", sub="Niobid strap"})
        end
	end
end


try this
Code
function job_post_midcast(spell, action, spellMap, eventArgs)
	if spell.skill == 'Enfeebling Magic' and state.Buff.Saboteur then
		equip(sets.buff.Saboteur)
	end
	if spell.skill == 'Enhancing Magic' then
		equip(sets.midcast.EnhancingDuration)
	elseif buffactive.Composure and spell.target.type == 'PLAYER, NPC' then
		equip(sets.buff.ComposureOther)
	end
	if spellMap == 'Cure' and spell.target.type == 'SELF' then
		equip(sets.midcast.CureSelf)
	end
	if spell.skill == 'Elemental Magic' then
        if spell.element == world.day_element or spell.element == world.weather_element then
            equip(sets.midcast['Elemental Magic'], {waist="Hachirin-No-Obi"})
        end
	end
    if spell.skill == 'Healing Magic' then
        if spell.name:startswith('Cure') and world.weather_element == 'Light' then
            equip(sets.midcast.Cure, {waist="Hachirin-No-Obi", back="Twilight Cape", main="Chatoyant Staff", sub="Niobid strap"})
        end
	end
end


1 note you have Ginsen in some midcast buff spells, when in doubt just toss staunch for sird, i see both swith cape and swith+1.

In my personal lua i set it up like this:
Code
	if spell.skill == 'Enhancing Magic' then
			if spell.english ~= 'Phalanx II' and spell.english ~= 'Refresh' and spell.english ~= 'Refresh II' and spell.english ~= 'Refresh III' then
				if spell.target.type == 'PLAYER' then		
					equip(sets.midcast.GeneralEnhancing.DurationPlayer)
				end
			end
			if spell.english == 'Phalanx' or spell.english == 'Phalanx II' then
				if spell.target.type == 'SELF' then
					equip(sets.midcast.Phalanx.Self)
				end
			end
	end

and setup sets like this
(GeneralEnhancing is just a label I use in my motes mapping)

sets.midcast.GeneralEnhancing.DurationPlayer= set_combine(sets.midcast.GeneralEnhancing, {
head="Lethargy Chappel +1",
body="Lethargy Sayon +1",
legs="Lethargy Fuseau +1",})

refresh and phal i map out separately.

sets.midcast.Refresh = set_combine(sets.midcast.GeneralEnhancing, {
head="Amalric Coif +1",
body="Atrophy Tabard +3",
waist="Gishdubar Sash",
legs="Lethargy Fuseau +1",})
Offline
Posts: 22
By joltz18 2018-07-31 01:01:19
Link | Quote | Reply
 
^^;; ya Ginsen is all i have atm, still working on gear lol and sadly what you gave me still didn't work :(
Offline
Posts: 22
By joltz18 2018-07-31 02:40:15
Link | Quote | Reply
 
Tried entering what you have as well, still nothing :( this is WAY more frustrating than i thought it was going to be
 Bahamut.Riyoko
Offline
Server: Bahamut
Game: FFXI
user: Jone
Posts: 30
By Bahamut.Riyoko 2018-07-31 08:03:05
Link | Quote | Reply
 
I have a similar gearswap and I've set up mine to this:

just right below function get_sets() I've put:
Code
Duration_Spells = S{"Blink","Shell V","Protect V","Haste","Haste II","Stoneskin","Thunderstorm","Hailstorm","Firestorm","Windstorm","Sandstorm","Rainstorm","Flurry","Flurry II","Sneak","Invisible","Deodorize"}


Then made a set called sets.buff.ComposureOther and a set for refreshing others:
Code
sets.midcast.RefreshOthers = set_combine(sets.buff.ComposureOther,{head="Amalric Coif +1",legs="Lethargy Fuseau +1"})


down below to function job_post_midcast(spell, action, spellMap, eventArgs) I've put the following rules:
Code
if ((spell.skill == 'Enhancing Magic') and Duration_Spells:contains(spell.english)) and not (buffactive.composure and spell.target.type == 'PLAYER') then
		equip(sets.midcast.EnhancingDuration)
	elseif (buffactive.composure and Duration_Spells:contains(spell.english)) and spell.target.type == 'PLAYER' then
		equip(sets.buff.ComposureOther)
	end
	if spell.english:startswith('Refresh') and not (buffactive.composure and spell.target.type == 'PLAYER') then
		equip(sets.midcast['Refresh III'])
	elseif (buffactive.composure and spell.english:startswith('Refresh')) and spell.target.type == 'PLAYER' then
		equip(sets.midcast.RefreshOthers)
	end	


I hope that helps
Offline
Posts: 22
By joltz18 2018-07-31 23:21:30
Link | Quote | Reply
 
so, i'm able to condense all my duration spells into one line and Temper and enspells into another? i'm sorry, i'm REALLY new to this stuff lol
 Bahamut.Riyoko
Offline
Server: Bahamut
Game: FFXI
user: Jone
Posts: 30
By Bahamut.Riyoko 2018-08-01 00:47:04
Link | Quote | Reply
 
Yes, you can. Try adding this below Duration_spells and function get_sets():
Code
Enhanced_Spells = S{"Temper","Temper II","Enfire","Enblizzard","Enaero","Enstone","Enthunder","Enwater","Enfire II","Enblizzard II","Enaero II","Enstone II","Enthunder II","Enwater II"}


Then make a sets.midcast.EnhancedSpells and add this line below function job_post_midcast(spell, action, spellMap, eventArgs):
Code
if Enhanced_Spells:contains(spell.english) then
    equip(sets.midcast.EnhancedSpells)
end
Offline
Posts: 994
By Boshi 2018-08-01 13:46:51
Link | Quote | Reply
 
joltz18 said: »
Tried entering what you have as well, still nothing :( this is WAY more frustrating than i thought it was going to be

oh so I should have explained this better. "GeneralEnhancing" is just a way I mapped all my normal non-potency based enhancing spells.

So your lua also draws from other files.
>>> gearswap/libs/Mote-Mapping.lua
is the one where you can map a group of spells. (this works across all jobs luas)
Some newer spells aren't here at all (like sets.midcast.Refresh won't have Refresh III, only I and II unless you add it)
Offline
Posts: 22
By joltz18 2018-08-02 14:24:14
Link | Quote | Reply
 
thank you guys so much for the info, you guys are awesome ^^
necroskull Necro Bump Detected! [238 days between previous and next post]
 Sylph.Wasenshi
Offline
Server: Sylph
Game: FFXI
user: Senshi
Posts: 126
By Sylph.Wasenshi 2019-03-28 19:03:25
Link | Quote | Reply
 
So I have just noticed that my composure set is also not swapping in when casting on others this is the function I am using
Code
function job_post_midcast(spell, action, spellMap, eventArgs)
    if spell.skill == 'Enfeebling Magic' and state.Buff.Saboteur then
        equip(sets.buff.Saboteur)
    end
    if spell.skill == 'Enhancing Magic' then
        equip(sets.midcast.EnhancingDuration)
    elseif buffactive.Composure and spell.target.type == 'PLAYER, NPC' then
        equip(sets.buff.ComposureOther)
    end
    end 

I have double checked set names ect. but it will not swap into my ComposureOther set
Offline
Posts: 10
By zigzagzig 2019-03-28 19:10:53
Link | Quote | Reply
 
function job_post_midcast(spell, action, spellMap, eventArgs)
if (spell.target.type == 'PLAYER' or spell.target.type == 'NPC' or buffactive['Accession']) and buffactive.Composure then
equip(sets.midcast.Other)
end
end

sets.midcast['Other'] = {
main={ name="Colada", augments={'Enh. Mag. eff. dur. +3','STR+1','Mag. Acc.+19','"Mag.Atk.Bns."+8','DMG:+13',}},
sub="Ammurapi Shield",
ammo="Regal Gem",
head="Leth. Chappel +1",
body="Lethargy Sayon +1",
hands="Leth. Gantherots +1",
legs="Leth. Fuseau +1",
feet="Leth. Houseaux +1",
neck="Dls. Torque +1",
waist="Siegel Sash",
left_ear="Loquac. Earring",
right_ear="Andoaa Earring",
left_ring="Stikini Ring +1",
right_ring="Stikini Ring +1",
back="Sucellos's Cape"}



this works for me , hope to help
 Sylph.Wasenshi
Offline
Server: Sylph
Game: FFXI
user: Senshi
Posts: 126
By Sylph.Wasenshi 2019-03-28 19:46:14
Link | Quote | Reply
 
Hmm still isn't working for me like it isn't showing that composure is active
zigzagzig said: »
function job_post_midcast(spell, action, spellMap, eventArgs)
if (spell.target.type == 'PLAYER' or spell.target.type == 'NPC' or buffactive['Accession']) and buffactive.Composure then
equip(sets.midcast.Other)
end
end
This is my full lua
Code
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job.  Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------

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

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


-- Setup vars that are user-independent.  state.Buff vars initialized here will automatically be tracked.
function job_setup()
    state.Buff.Saboteur = buffactive.saboteur or false

end

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

-- Setup vars that are user-dependent.  Can override this function in a sidecar file.
function user_setup()
    state.OffenseMode:options('None', 'Normal')
    state.HybridMode:options('Normal', 'PhysicalDef', 'MagicalDef')
    state.CastingMode:options('Normal', 'Resistant')
    state.IdleMode:options('Normal', 'PDT', 'MDT')
    
    state.MagicBurst = M(false, 'Magic Burst')

    gear.default.obi_waist = "Sekhmet Corset"
    
    select_default_macro_book()
end


-- Define sets and vars used by this job file.
function init_gear_sets()
    --------------------------------------
    -- Start defining the sets
    --------------------------------------
    
    -- Precast Sets
    sets.Obi = {waist="Hachirin-no-Obi"}
    
    -- Precast sets to enhance JAs
    sets.precast.JA['Chainspell'] = {body="Viti. Tabard +3"}
    

    -- Waltz set (chr and vit)
    sets.precast.Waltz = {
        head="Atrophy Chapeau +1",
        body="Atrophy Tabard +1",hands="Yaoyotl Gloves",
        back="Refraction Cape",legs="Hagondes Pants",feet="Hagondes Sabots"}
        
    -- Don't need any special gear for Healing Waltz.
    sets.precast.Waltz['Healing Waltz'] = {}

    -- Fast cast sets for spells
    
    -- 80% Fast Cast (including trait) for all spells, plus 5% quick cast
    -- No other FC sets necessary.
    sets.precast.FC = {head={ name="Carmine Mask", augments={'Accuracy+15','Mag. Acc.+10','"Fast Cast"+3',}},
    body={ name="Merlinic Jubbah", augments={'Mag. Acc.+26','"Fast Cast"+7',}},
    hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
    feet="Carmine Greaves +1",
    neck="Orunmila's Torque",
    left_ear="Loquac. Earring",
    right_ear="Brutal Earring",
    left_ring="Prolix Ring",
    right_ring="Kishar Ring",}
    
    sets.precast.FC['Enfeebling Magic'] = set_combine(sets.precast.FC, {head="Leth. Chappel +1",})

    sets.precast.FC.Impact = set_combine(sets.precast.FC, {head=empty,body="Twilight Cloak"})
       
    -- Weaponskill sets
    -- Default set for any weaponskill that isn't any more specifically defined
    sets.precast.WS['Chant du Cygne'] = {
        ammo="Ginsen",
    head="Viti. Chapeau +3",
    body="Ayanmo Corazza +2",
    hands="Jhakri Cuffs +2",
    legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
    feet="Thereoid Greaves",
    neck="Fotia Gorget",
    waist="Fotia Belt",
    left_ear="Sherida Earring",
    right_ear="Brutal Earring",
    left_ring="Ilabrat Ring",
    right_ring="Hetairoi Ring",
    back={ name="Sucellos's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},}

    -- Specific weaponskill sets.  Uses the base set if an appropriate WSMod version isn't found.
    sets.precast.WS = {ammo="Pemphredo Tathlum",
    head={ name="Merlinic Hood", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic burst dmg.+6%','CHR+4','"Mag.Atk.Bns."+11',}},
    body="Amalric Doublet +1",
    hands="Jhakri Cuffs +2",
    legs="Amalric Slops +1",
    feet={ name="Vitiation Boots +3", augments={'Enhances "Paralyze II" effect',}},
    neck="Mizu. Kubikazari",
    waist="Eschan Stone",
    left_ear="Friomisi Earring",
    right_ear="Regal Earring",
    left_ring="Jhakri Ring",
    right_ring="Strendu Ring",
    back={ name="Sucellos's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','MND+10','Weapon skill damage +10%',}},}

    sets.precast.WS['Sanguine Blade'] = set_combine(sets.precast.WS, {ring2="Archon Ring",})
    
    sets.precast.WS['Savage Blade'] = {
    ammo="Ginsen",
    head={ name="Viti. Chapeau +3", augments={'Enhances "Dia III" effect','Enhances "Slow II" effect',}},
    body={ name="Viti. Tabard +3", augments={'Enhances "Chainspell" effect',}},
    hands="Jhakri Cuffs +2",
    legs="Jhakri Slops +2",
    feet="Jhakri Pigaches +2",
    neck="Fotia Gorget",
    waist="Fotia Belt",
    left_ear="Ishvara Earring",
    right_ear="Telos Earring",
    left_ring="Ilabrat Ring",
    right_ring="Jhakri Ring",
    back={ name="Sucellos's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},}

    
    -- Midcast Sets
    
    sets.midcast.FastRecast = {
        head="Atrophy Chapeau +1",ear2="Loquacious Earring",
        body="Vitivation Tabard",hands="Gendewitha Gages",ring1="Prolix Ring",
        back="Swith Cape +1",waist="Witful Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}

    sets.midcast.Cure = {head={ name="Vanya Hood", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
    body="Heka's Kalasiris",
    hands={ name="Vanya Cuffs", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
    legs="Atrophy Tights +1",
    feet={ name="Vanya Clogs", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
    neck="Incanter's Torque",
    waist="Gishdubar Sash",
    left_ear="Mendi. Earring",
    right_ear="Magnetic Earring",
    left_ring="Stikini Ring +1",
    right_ring="Stikini Ring +1",
    back={ name="Sucellos's Cape", augments={'MND+20'}}}
        
    sets.midcast.Curaga = sets.midcast.Cure
    sets.midcast.CureSelf = {ring1="Kunaji Ring",ring2="Asklepian Ring"}

    sets.midcast['Enhancing Magic'] = {
    sub="Ammurapi Shield",    
    neck="Dls. Torque +2",
    head="Telchine Cap",
    body="Viti. Tabard +3",
    hands="Atrophy Gloves +2",
    legs="Telchine Braconi",
    feet="Leth. Houseaux +1",
    waist="Olympus Sash",
    ear1="Augment. Earring",
    left_ring="Stikini Ring +1",
    right_ring="Stikini Ring +1",
    back="Sucellos's Cape",}
    
    sets.midcast['Phalanx'] = set_combine(sets.midcast['Enhancing Magic'], {
    main="Pukulatmuj +1",
    sub="Pukulatmuj",
    head="Befouled Crown",legs="Atrophy Tights +1",
    hands={ name="Viti. Gloves +3", augments={'Enhances "Phalanx II" effect',}},
    neck="Incanter's Torque",
    back={ name="Ghostfyre Cape", augments={'Enfb.mag. skill +6','Enha.mag. skill +8','Enh. Mag. eff. dur. +18',}},})
    
    sets.midcast['Temper II'] = set_combine(sets.midcast['Enhancing Magic'], {
    main="Pukulatmuj +1",
    sub="Pukulatmuj",
    head="Befouled Crown",legs="Atrophy Tights +1",
    hands={ name="Viti. Gloves +3", augments={'Enhances "Phalanx II" effect',}},
    neck="Incanter's Torque",
    back={ name="Ghostfyre Cape", augments={'Enfb.mag. skill +6','Enha.mag. skill +8','Enh. Mag. eff. dur. +18',}},})
    
    sets.midcast.BarElement = sets.midcast['Temper II']
    
    sets.midcast.Bar = sets.midcast['Temper II']
    
    sets.midcast['Enfire'] = set_combine(sets.midcast['Enhancing Magic'], {
    main="Pukulatmuj +1",
    sub="Pukulatmuj",
    head="Befouled Crown",legs="Atrophy Tights +1",
    hands={ name="Viti. Gloves +3", augments={'Enhances "Phalanx II" effect',}},
    neck="Incanter's Torque",
    back={ name="Ghostfyre Cape", augments={'Enfb.mag. skill +6','Enha.mag. skill +8','Enh. Mag. eff. dur. +18',}},})
    
    sets.midcast['Enblizzard'] = sets.midcast['Enfire']
    
    sets.midcast['Enaero'] = sets.midcast['Enfire']
    
    sets.midcast['Enstone'] = sets.midcast['Enfire']
    
    sets.midcast['Enthunder'] = sets.midcast['Enfire']
    
    sets.midcast['Enwater'] = sets.midcast['Enfire']
    
    sets.midcast['Gain-STR'] = set_combine(sets.midcast['Enhancing Magic'], {hands="Viti. Gloves +3",})
    
    sets.midcast['Gain-DEX'] = sets.midcast['Gain-STR']
    
    sets.midcast['Gain-VIT'] = sets.midcast['Gain-STR']
    
    sets.midcast['Gain-AGI'] = sets.midcast['Gain-STR']
    
    sets.midcast['Gain-MND'] = sets.midcast['Gain-STR']
    
    sets.midcast['Gain-INT'] = sets.midcast['Gain-STR']

    sets.midcast.Refresh = set_combine(sets.midcast['Enhancing Magic'], {
    body="Atrophy Tabard +2",
    hands="Atrophy Gloves +2",
    legs="Leth. Fuseau +1",
    feet="Leth. Houseaux +1",
    waist="Gishdubar Sash",
    back="Sucellos's Cape",})

    sets.midcast.Stoneskin = {waist="Siegel Sash"}
    
    sets.midcast['Enfeebling Magic'] = {
    main="Crocea Mors",
    sub="Ammurapi Shield",
    range="Ullr",
    head="Viti. Chapeau +3",
    body="Lethargy Sayon +1",
    hands="Kaykaus Cuffs +1",
    legs="Chironic Hose",
    feet={ name="Vitiation Boots +3", augments={'Enhances "Paralyze II" effect',}},
    neck="Dls. Torque +2",
    waist="Casso Sash",
    left_ear="Digni. Earring",
    right_ear="Regal Earring",
    left_ring="Stikini Ring +1",
    right_ring="Stikini Ring +1",
    back={ name="Sucellos's Cape", augments={'MND+20'}},}
    
    sets.midcast['Enfeebling Magic'].Resistant = {
    main="Crocea Mors",
    sub="Ammurapi Shield",
    range="Ullr",
    head="Viti. Chapeau +3",
    body="Atrophy Tabard +2",
    hands="Kaykaus Cuffs +1",
    legs="Chironic Hose",
    feet={ name="Vitiation Boots +3", augments={'Enhances "Paralyze II" effect',}},
    neck="Dls. Torque +2",
    waist="Casso Sash",
    left_ear="Digni. Earring",
    right_ear="Regal Earring",
    left_ring="Stikini Ring +1",
    right_ring="Stikini Ring +1",
    back={ name="Sucellos's Cape", augments={'MND+20'}},}
    
    sets.midcast.Sleep = set_combine(sets.midcast['Enfeebling Magic'], {body="Atrophy Tabard +2"})
    
    sets.midcast['Sleep II'] = set_combine(sets.midcast['Enfeebling Magic'], {body="Atrophy Tabard +2"})
    
    sets.midcast['Dispel'] = set_combine(sets.midcast['Enfeebling Magic'], {body="Atrophy Tabard +2"})
    
    sets.midcast['Frazzle II'] = set_combine(sets.midcast['Enfeebling Magic'], {body="Atrophy Tabard +2"})
    
    sets.midcast['Silence'] = set_combine(sets.midcast['Enfeebling Magic'], {body="Atrophy Tabard +2"})
    
    sets.midcast['Bind'] = set_combine(sets.midcast['Enfeebling Magic'], {body="Atrophy Tabard +2"})
    
    sets.midcast['Blind'] = set_combine(sets.midcast['Enfeebling Magic'], {body="Atrophy Tabard +2"})
 
    sets.midcast['Elemental Magic'] = {
    main="Tauret",
    sub="Ammurapi Shield",
    ammo="Pemphredo Tathlum",
    head={ name="Merlinic Hood", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic burst dmg.+6%','CHR+4','"Mag.Atk.Bns."+11',}},
    body={ name="Amalric Doublet +1", augments={'MP+80','"Mag.Atk.Bns."+25','"Fast Cast"+4',}},
    hands="Jhakri Cuffs +2",
    legs={ name="Amalric Slops +1", augments={'MP+80','"Mag.Atk.Bns."+25','Enmity-6',}},
    feet={ name="Vitiation Boots +3", augments={'Enhances "Paralyze II" effect',}},
    neck="Sanctity Necklace",
    waist="Eschan Stone",
    left_ear="Regal Earring",
    right_ear="Friomisi Earring",
    left_ring="Stikini Ring +1",
    right_ring="Jhakri Ring",
    back={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','"Mag.Atk.Bns."+10',}},}
    
    sets.magic_burst = {
    main="Grioavolr",
    sub="Enki Strap",
    ammo="Pemphredo Tathlum",
    head={ name="Merlinic Hood", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic burst dmg.+6%','CHR+4','"Mag.Atk.Bns."+11',}},
    body={ name="Merlinic Jubbah", augments={'Mag. Acc.+22 "Mag.Atk.Bns."+22','Magic burst dmg.+7%','VIT+4','Mag. Acc.+6',}},
    hands={ name="Amalric Gages", augments={'INT+10','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
    legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+29','Magic burst dmg.+10%','INT+2','"Mag.Atk.Bns."+2',}},
    feet="Jhakri Pigaches +2",
    neck="Mizu. Kubikazari",
    waist="Eschan Stone",
    left_ear="Friomisi Earring",
    right_ear="Regal Earring",
    left_ring="Mujin Band",
    right_ring="Jhakri Ring",
    back={ name="Sucellos's Cape", augments={'INT+20'}}}
        
    sets.midcast.Impact = {
    main="Crocea Mors",
    sub="Tauret",
    range="Ullr",
    body="Twilight Cloak",
    hands="Jhakri Cuffs +2",
    legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+29','Magic burst dmg.+10%','INT+2','"Mag.Atk.Bns."+2',}},
    feet={ name="Vitiation Boots +3", augments={'Enhances "Paralyze II" effect',}},
    neck="Incanter's Torque",
    waist="Eschan Stone",
    left_ear="Gwati Earring",
    right_ear="Digni. Earring",
    left_ring="Stikini Ring +1",
    right_ring="Stikini Ring +1",
    back={ name="Sucellos's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','MND+10','Weapon skill damage +10%',}},}

    sets.midcast['Dark Magic'] = {
    main="Grioavolr",
    sub="Enki Strap",
    ammo="Pemphredo Tathlum",
    head={ name="Merlinic Hood", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic burst dmg.+6%','CHR+4','"Mag.Atk.Bns."+11',}},
    body={ name="Merlinic Jubbah", augments={'Mag. Acc.+22 "Mag.Atk.Bns."+22','Magic burst dmg.+7%','VIT+4','Mag. Acc.+6',}},
    hands={ name="Amalric Gages", augments={'INT+10','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
    legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+29','Magic burst dmg.+10%','INT+2','"Mag.Atk.Bns."+2',}},
    feet="Jhakri Pigaches +2",
    neck="Dls. Torque +2",
    waist="Eschan Stone",
    left_ear="Friomisi Earring",
    right_ear="Regal Earring",
    left_ring="Mujin Band",
    right_ring="Jhakri Ring",
    back={ name="Sucellos's Cape", augments={'INT+20'}}}

    --sets.midcast.Stun = set_combine(sets.midcast['Dark Magic'], {})

    sets.midcast.Drain = {main={ name="Rubicundity", augments={'Mag. Acc.+3','"Mag.Atk.Bns."+3','Dark magic skill +5','"Conserve MP"+2',}},
    head={ name="Merlinic Hood", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic burst dmg.+6%','CHR+4','"Mag.Atk.Bns."+11',}},
    body={ name="Carm. Scale Mail", augments={'Attack+15','"Mag.Atk.Bns."+10','"Dbl.Atk."+2',}},
    hands={ name="Amalric Gages", augments={'INT+10','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
    legs="Jhakri Slops +2",
    ammo="Pemphredo Tathlum",
    feet={ name="Merlinic Crackows", augments={'Accuracy+3','Magic Damage +1','"Refresh"+1','Mag. Acc.+20 "Mag.Atk.Bns."+20',}},
    neck="Erra Pendant",
    waist="Fucho-no-Obi",
    left_ear="Digni. Earring",
    right_ear="Regal Earring",
    left_ring="Archon Ring",
    right_ring="Evanescence Ring",
    back="Sucellos's Cape",}

    sets.midcast.Aspir = sets.midcast.Drain


    -- Sets for special buff conditions on spells.

    
        
    sets.midcast.ComposureOther = set_combine(sets.midcast['Enhancing Magic'], {
    head="Leth. Chappel +1",
    legs="Leth. Fuseau +1",
    back="Ghostfyre Cape",})

    sets.buff.Saboteur = set_combine(sets.midcast['Enfeebling Magic'], {hands="Leth. Gantherots +1",})
    

    -- Sets to return to when not performing an action.
    
    -- Resting sets
    sets.resting = {main="Chatoyant Staff",
        head="Vitivation Chapeau",neck="Wiglen Gorget",
        body="Atrophy Tabard +1",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
        waist="Austerity Belt",legs="Nares Trews",feet="Chelona Boots +1"}
    

    -- Idle sets
    sets.idle = {main="Bolelabunga",
    sub="Genbu's Shield",
    ammo="Staunch Tathlum +1",
    head="Viti. Chapeau +3",
    body="Jhakri Robe +2",
    hands="Viti. Gloves +3",
    legs="Lengo Pants",
    feet={ name="Merlinic Crackows", augments={'Accuracy+3','Magic Damage +1','"Refresh"+1','Mag. Acc.+20 "Mag.Atk.Bns."+20',}},
    neck="Sanctity Necklace",
    waist="Fucho-no-Obi",
    left_ear="Etiolation Earring",
    left_ring="Stikini Ring +1",
    right_ring="Stikini Ring +1",
    back="Moonbeam Cape",}

    sets.idle.Town = {main="Bolelabunga",
    sub="Ammurapi Shield",
    ammo="Staunch Tathlum +1",
    head="Viti. Chapeau +3",
    body="Jhakri Robe +2",
    hands="Viti. Gloves +3",
    legs="Lengo Pants",
    feet={ name="Merlinic Crackows", augments={'Accuracy+3','Magic Damage +1','"Refresh"+1','Mag. Acc.+20 "Mag.Atk.Bns."+20',}},
    neck="Sanctity Necklace",
    waist="Fucho-no-Obi",
    left_ear="Etiolation Earring",
    left_ring="Stikini Ring +1",
    right_ring="Stikini Ring +1",
    back="Moonbeam Cape",}
    
    sets.idle.Weak = {main="Bolelabunga",sub="Genbu's Shield",ammo="Impatiens",
        head="Vitivation Chapeau",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
        body="Atrophy Tabard +1",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
        back="Shadow Mantle",waist="Flume Belt",legs="Crimson Cuisses",feet="Hagondes Sabots"}

    sets.idle.PDT = {main="Bolelabunga",sub="Genbu's Shield",ammo="Demonry Stone",
        head="Gendewitha Caubeen +1",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
        body="Gendewitha Bliaut +1",hands="Gendewitha Gages",ring1="Defending Ring",ring2=gear.DarkRing.physical,
        back="Shadow Mantle",waist="Flume Belt",legs="Osmium Cuisses",feet="Gendewitha Galoshes"}

    sets.idle.MDT = {main="Bolelabunga",sub="Genbu's Shield",ammo="Demonry Stone",
        head="Gendewitha Caubeen +1",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
        body="Gendewitha Caubeen +1",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2="Shadow Ring",
        back="Engulfer Cape",waist="Flume Belt",legs="Osmium Cuisses",feet="Gendewitha Galoshes"}
    
    
    -- Defense sets
    sets.defense.PDT = {
        head="Atrophy Chapeau +1",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
        body="Hagondes Coat",hands="Gendewitha Gages",ring1="Defending Ring",ring2=gear.DarkRing.physical,
        back="Shadow Mantle",waist="Flume Belt",legs="Hagondes Pants",feet="Gendewitha Galoshes"}

    sets.defense.MDT = {ammo="Demonry Stone",
        head="Atrophy Chapeau +1",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
        body="Atrophy Tabard +1",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2="Shadow Ring",
        back="Engulfer Cape",waist="Flume Belt",legs="Bokwus Slops",feet="Gendewitha Galoshes"}

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

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

    -- Engaged sets

    -- Variations for TP weapon and (optional) offense/defense modes.  Code will fall back on previous
    -- sets if more refined versions aren't defined.
    -- If you create a set with both offense and defense modes, the offense mode should be first.
    -- EG: sets.engaged.Dagger.Accuracy.Evasion
    
    -- Normal melee group
    sets.engaged = {
    main="Crocea Mors",
    sub="Tauret",
    ammo="Ginsen",
    head="Aya. Zucchetto +2",
    body="Ayanmo Corazza +2",
    hands="Aya. Manopolas +2",
    legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
    feet={ name="Carmine Greaves +1", augments={'Accuracy+12','DEX+12','MND+20',}},
    neck="Combatant's Torque",
    waist="Kentarch Belt +1",
    left_ear="Suppanomimi",
    right_ear="Sherida Earring",
    left_ring="Hetairoi Ring",
    right_ring="Ilabrat Ring",
    back={ name="Sucellos's Cape", augments={'DEX+20'}},}

    sets.engaged.Defense = {ammo="Demonry Stone",
        head="Atrophy Chapeau +1",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
        body="Atrophy Tabard +1",hands="Atrophy Gloves +1",ring1="Rajas Ring",ring2="K'ayres Ring",
        back="Kayapa Cape",waist="Goading Belt",legs="Osmium Cuisses",feet="Atrophy Boots"}

end

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

-- Run after the default midcast() is done.
-- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
function job_post_midcast(spell, action, spellMap, eventArgs)
    if spell.skill == 'Enfeebling Magic' and state.Buff.Saboteur then
        equip(sets.buff.Saboteur)
    end
    if (spell.target.type == 'PLAYER' or spell.target.type == 'NPC' or buffactive['Accession']) and buffactive.Composure then
equip(sets.midcast.ComposureOther)
end
end
    
function job_precast(spell, action, spellMap, eventArgs)
	if spellMap == 'Utsusemi' then
        if buffactive['Copy Image (3)'] or buffactive['Copy Image (4+)'] then
            cancel_spell()
            add_to_chat(123, '**!! '..spell.english..' Canceled: [3+ IMAGES] !!**')
            eventArgs.handled = true
            return
        elseif buffactive['Copy Image'] or buffactive['Copy Image (2)'] then
            send_command('cancel 66; cancel 444; cancel Copy Image; cancel Copy Image (2)')
        end
    end
end
function job_post_precast(spell, action, spellMap, eventArgs)
 -- Equip obi if weather/day matches for WS.
    if spell.type == 'WeaponSkill' then
        if spell.english == 'Sanguine Blade' then
            if world.weather_element == 'Dark' or world.day_element == 'Dark' then
                equip(sets.Obi)
end
         elseif spell.english == 'Red Lotus Blade' and (world.weather_element == 'Fire' or world.day_element == 'Fire') then
            equip(sets.Obi)
        end
         elseif spell.english == 'Seraph Blade' and (world.weather_element == 'Light' or world.day_element == 'Light') then
            equip(sets.Obi)
        end
	end
function job_post_midcast(spell, action, spellMap, eventArgs)
    if spell.skill == 'Elemental Magic' and state.MagicBurst.value then
        equip(sets.magic_burst)
    end
end

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

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

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

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

-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
    display_current_caster_state()
    eventArgs.handled = true
end

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

-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
    -- Default macro set/book
    if player.sub_job == 'DNC' then
        set_macro_page()
    elseif player.sub_job == 'NIN' then
        set_macro_page()
    elseif player.sub_job == 'THF' then
        set_macro_page()
    else
        set_macro_page()
    end
end
Offline
Posts: 994
By Boshi 2019-03-29 08:47:24
Link | Quote | Reply
 
I'm on my work pc so I don't have my current lua but I'm checking my file from sep2017 which should still be good on this
Code
function midcast(spell)
   if spell.action_type == 'Magic' then
	-----Enhancing Magic
	if spell.skill == 'Enhancing Magic' then
		if spell.english ~= 'Refresh' and spell.english ~= 'Refresh II' and spell.english ~= 'Refresh III' then
			if spell.target.type == 'PLAYER' then		
				equip(sets.midcast.Enhancing.DurationPlayer)
			end
		end
	end
   end
end


refresh1/2/3 are the only spells you cast on other ppl that wouldn't be in normal gear, I just map those separately.



sets.midcast.Enhancing.DurationPlayer = set_combine(sets.midcast.Enhancing, {
head="Leth. Chappel +1",
body="Lethargy Sayon +1",
legs="Leth. Fuseau +1",})


sets.midcast.Enhancing is just the my base self-cast max duration set.
refresh/regen/stoneskin/phalanx/enspell/temper mapped seperate