function get_sets() -------- Includes -------- DONE include('AllJobs.lua') -------- Variables -------- DONE -- TP_Index = 1 -- Idle_Index = 1 -- Idle_Set_Names = {'Normal','Fishing'} Weapon_Index = 1 Weapon_Set_Names = {"Club","Staff"} -------- Weapon Switch Sets -------- DONE sets.Command = {} sets.Command.Club = {main="Nehushtan",sub="Genbu's Shield"} sets.Command.Staff = {main="Eminent Staff",sub="Mephitis Grip"} -------- Idle Sets -------- DONE sets.Idle = {range="Dunna", head="Geomancy Galero",neck="Twilight Torque", lear="Moonshade Earring",rear="Novio Earring", body="Geomancy Tunic",hands="Bagua Mitaines", lring="Dark Ring",rring="Dark Ring", back="Repulse Mantle",waist="Oneiros Sash", legs="Nares Trews",feet="Geomancy Sandals"} sets.Idle.Club = set_combine(sets.Idle, {main="Nehushtan",sub="Genbu's Shield"}) sets.Idle.Staff = set_combine(sets.Idle, {main="Eminent Staff",sub="Mephitis Grip"}) sets.IdleLuopan = set_combine(sets.Idle, {range="Dunna", hands="Geomancy Mitaines", feet="Bagua Sandals"}) sets.IdleLuopan.Club = set_combine(sets.IdleLuopan, {main="Nehushtan",sub="Genbu's Shield"}) sets.IdleLuopan.Staff = set_combine(sets.IdleLuopan, {main="Eminent Staff",sub="Mephitis Grip"}) sets.Idle.Fishing = set_combine(sets.Idle.Normal, {range="Ebisu Fishing Rod",ammo="empty", neck="Fisher's Torque", body="Fisherman's Smock",hands="Fisherman's Gloves", lring="Puffin Ring",rring="Noddy Ring", waist="Fisher's Rope", legs="Fisherman's Hose",feet="Waders"}) -- sets.Idle.Crafting = set_combine(sets.Idle.Normal, -- {lring="Craftkeeper's Ring",rring="Artificer's Ring", -- back="Shaper's Shawl"}) -- sets.Idle.HELM = set_combine(sets.Idle.Normal, -- {neck="Field Torque", -- body="Trench Tunic",hands="Treefeller Gloves", -- waist="Field Rope",legs="Dredger Hose",feet="Agrarian Boots"}) -------- Resting Sets -------- DONE -- Change Club to ilvl 119 Delve Club From Yorcia Weald When Obtained. -- sets.Rest = {lear="Moonshade Earring", body="Geomancy Tunic",hands="Bagua Mitaines", legs="Nares Trews",feet="Chelona Boots"} sets.Rest.Club = set_combine(sets.Rest, {main="Nehushtan",sub="Genbu's Shield"}) sets.Rest.Staff = set_combine(sets.Rest, {main="Chatoyant Staff"}) sets.RestLuopan = set_combine(sets.Rest, {range="Dunna", hands="Geomancy Mitaines", feet="Bagua Sandals"}) sets.RestLuopan.Club = set_combine(sets.RestLuopan, {}) sets.RestLuopan.Staff = set_combine(sets.RestLuopan, {main="Chatoyant Staff"}) -------- Melee Sets -------- DONE -- Remove Skillup Gear When Capped Club/Staff (Delete sets.TP and remove the word .Real) -- sets.TP = {head="Temachtiani Headband",neck="Asperity Necklace", lear="Steelflash Earring",rear="Bladeborn Earring", body="Geomancy Tunic",hands="Bagua Mitaines", lring="Dark Ring",rring="Rajas Ring", back="Repulse Mantle",waist="Witful Belt", legs="Temachtiani Pants",feet="Temachtiani Boots"} sets.TP.Real = {head="Geomancy Galero",neck="Asperity Necklace", lear="Steelflash Earring",rear="Bladeborn Earring", body="Geomancy Tunic",hands="Bagua Mitaines", lring="Dark Ring",rring="Rajas Ring", back="Repulse Mantle",waist="Witful Belt", legs="Bagua Pants",feet="Bagua Sandals"} sets.TP.Club = set_combine(sets.TP, {main="Nehushtan",sub="Genbu's Shield"}) sets.TP.Staff = set_combine(sets.TP, {main="Eminent Staff",sub="Mephitis Grip"}) sets.TP.Acc = set_combine(sets.TP, {}) sets.TPLuopan = set_combine(sets.TP, {range="Dunna", hands="Geomancy Mitaines", feet="Bagua Sandals"}) sets.TPLuopan.Club = set_combine(sets.TPLuopan, {main="Nehushtan",sub="Genbu's Shield"}) sets.TPLuopan.Staff = set_combine(sets.TPLuopan, {main="Eminent Staff",sub="Mephitis Grip"}) -------- Magic Sets -------- DONE sets.MA = {} ---- Fast Cast ---- DONE sets.FC = -- Add Lifestream Cape When Obtained -- {rear="Loquacious Earring", hands="Repartie Gloves", lring="Prolix Ring", back="Lifestream Cape",waist="Witful Belt", legs="Geomancy Pants",feet="Chelona Boots"} sets.FC.Geo = set_combine(sets.FC, {range="Dunna"}) sets.FC.Elem = set_combine(sets.FC, {neck="Stoicheion Medal", hands="Bagua Mitaines"}) sets.FC.Impact = set_combine(sets.FC, {head="empty", body="Twilight Cloak"}) sets.FC.Stun = set_combine(sets.FC, {main="Apamajas I"}) sets.FC.Enh = set_combine(sets.FC, {waist="Siegel Sash"}) sets.FC.Stoneskin = set_combine(sets.FC.Enh, {head="Umuthi Hat", hands="Carapacho Cuffs", waist="Siegel Sash"}) sets.FC.Cure = set_combine(sets.FC, {back="Pahtli Cape"}) ---- Geomancy Skill ---- DONE sets.Geo = {range="Dunna", body="Bagua Tunic",hands="Geomancy Mitaines", back="Lifestream Cape", legs="Bagua Pants"} sets.Geo.Club = set_combine(sets.Geo, {main="Nehushtan",sub="Genbu's Shield"}) sets.Geo.Staff = set_combine(sets.Geo, {main="Eminent Staff",sub="Mephitis Grip"}) ---- Elemental Skill ---- DONE -- Change Elementa Grip to Zuuxowu Grip When Obtained. Diamond Ring to Acumen Ring/Shiva +1 When Obtained. Add to Feet Umbani Boots When Obtained. -- sets.Elem = -- Add Sets For When Collimated Fervor Is Used Before Castin Elem Magic If Primeval Zeal Is Ever Merited. Relic Head Augs This. -- {head="Geomancy Galero",neck="Stoicheion Medal", lear="Hecate's Earring",rear="Novio Earring", body="Bagua Tunic",hands="Yaoyotl Gloves", lring="Diamond Ring",rring="Diamond Ring", back="Toro Cape",waist="Olympus Sash", legs="Hagondes Pants"} sets.Elem.Club = set_combine(sets.Elem, {main="Nehushtan",sub="Genbu's Shield"}) sets.Elem.Staff = set_combine(sets.Elem, {main="Eminent Staff",sub="Elementa Grip"}) sets.Impact = set_combine(sets.Elem, {head="empty", body="Twilight Cloak"}) sets.Impact.Club = set_combine(sets.Impact, {main="Nehushtan",sub="Genbu's Shield"}) sets.Impact.Staff = set_combine(sets.Impact, {main="Eminent Staff",sub="Elementa Grip"}) ---- Enfeebling Skill ---- DONE -- Change Enfeebling Torque to Imbodla Necklace When Obtained. Remove Skillup Gear When Enfeeb Capped -- sets.Enfeeb = {head="Bagua Galero",neck="Enfeebling Torque", lear="Lifestorm Earring",rear="Psystorm Earring", body="Temachtiani Shirt",hands="Temachtiani Gloves", lring="Aquasoul Ring",rring="Aquasoul Ring", back="Lifestream Cape",waist="Casso Sash", legs="Hagondes Pants",feet="Bagua Sandals"} sets.Enfeeb.Real = {head="Bagua Galero",neck="Enfeebling Torque", lear="Lifestorm Earring",rear="Psystorm Earring", body="Hagondes Coat",hands="Hagondes Cuffs", lring="Aquasoul Ring",rring="Aquasoul Ring", back="Lifestream Cape",waist="Casso Sash", legs="Hagondes Pants",feet="Bagua Sandals"} sets.Enfeeb.Club = set_combine(sets.Enfeeb, {main="Nehushtan",sub="Genbu's Shield"}) sets.Enfeeb.Staff = set_combine(sets.Enfeeb, {main="Eminent Staff",sub="Mephitis Grip"}) ---- Dark Skill ---- DONE sets.Dark = {neck="Dark Torque", lear="Lifestorm Earring",rear="Psystorm Earring", body="Geomancy Tunic",hands="Yaoyotl Gloves", lring="Diamond Ring",rring="Diamond Ring", back="Refraction Cape",waist="Casso Sash"} sets.Dark.Club = set_combine(sets.Dark, {main="Nehushtan",sub="Genbu's Shield"}) sets.Dark.Staff = set_combine(sets.Dark, {main="Eminent Staff",sub="Caecus Grip"}) sets.Stun = set_combine(sets.Dark, {}) sets.Stun.Club = set_combine(sets.Stun, {}) sets.Stun.Staff = set_combine(sets.Stun, {main="Apamajas II",sub="Caecus Grip"}) sets.DrainAspir = set_combine(sets.Dark, {head="Striga Crown", lear="Hirudinea Earring", hands="Vampiric Mitts", lring="Excelsis Ring", waist="Fucho-no-Obi", feet="Vampiric Boots"}) sets.DrainAspir.Club = set_combine(sets.DrainAspir, {}) sets.DrainAspir.Staff = set_combine(sets.DrainAspir, {main="Bounty Sickle",sub="Caecus Grip"}) ---- Enhancing Skill ---- DONE sets.Enhance = {head="Umuthi Hat",neck="Enhancing Torque", back="Merciful Cape",waist="Olympus Sash"} sets.Enhance.Stoneskin = set_combine(sets.Enhance, {neck="Stone Gorget", rear="Earthcry Earring", hands="Stone Mufflers", waist="Siegel Sash", legs="Haven Hose"}) ---- Healing Skill ---- DONE sets.Heal = {neck="Nesanica Torque", rear="Beatific Earring", lring="Ephedra Ring",rring="Ephedra Ring", back="Tempered Cape",waist="Bishop's Sash"} sets.Heal.Club = set_combine(sets.Heal, {main="Tamaxchi",sub="Genbu's Shield"}) sets.Heal.Staff = set_combine(sets.Heal, {main="Arka IV",sub="Curatio Grip"}) sets.Cure = set_combine(sets.Heal, {hands="Bokwus Gloves", back="Tempered Cape", legs="Nares Trews"}) sets.Cure.Club = set_combine(sets.Cure, {main="Tamaxchi",sub="Genbu's Shield"}) sets.Cure.Staff = set_combine(sets.Cure, {main="Arka IV",sub="Curatio Grip"}) sets.Cursna = set_combine(sets.Heal, {neck="Malison Medallion", lring="Ephedra Ring",rring="Ephedra Ring"}) -------- Job Ability Sets -------- sets.JA = {} sets.JA.Bolster = {body="Bagua Tunic"} sets.JA["Mending Halation"] = {legs="Bagua Pants"} sets.JA["Radial Arcana"] = {feet="Bagua Sandals"} sets.JA["Full Circle"] = {hands="Bagua Mitaines"} sets.JA["Life Cycle"] = {body="Geomancy Tunic"} -------- Weapon Skill Sets -------- DONE sets.WS = {} sets.WS.Realmrazer = {head="Hagondes Hat",neck="Light Gorget", lear="Steelflash Earring",rear="Bladeborn Earring", body="Geomancy Tunic",hands="Bagua Mitaines", lring="Aquasoul Ring",rring="Aquasoul Ring", back="Refraction Cape",waist="Light Belt", legs="Bagua Pants",feet="Bagua Sandals"} sets.WS.Shattersoul = {head="Hagondes Hat",neck="Soil Gorget", lear="Steelflash Earring",rear="Bladeborn Earring", body="Geomancy Tunic",hands="Bagua Mitaines", lring="Diamond Ring",rring="Diamond Ring", back="Refraction Cape",waist="Soil Belt", legs="Bagua Pants",feet="Bagua Sandals"} sets.WS.STRMND = {head="Geomancy Galero",neck="Asperity Necklace", lear="Steelflash Earring",rear="Bladeborn Earring", body="Geomancy Tunic",hands="Bagua Mitaines", lring="Aquasoul Ring",rring="Aquasoul Ring", back="Refraction Cape", legs="Bagua Pants",feet="Bagua Sandals"} sets.WS["Spirit Taker"] = {head="Geomancy Galero",neck="Asperity Necklace", lear="Steelflash Earring",rear="Bladeborn Earring", body="Geomancy Tunic",hands="Bagua Mitaines", lring="Diamond Ring",rring="Diamond Ring", back="Refraction Cape", legs="Bagua Pants",feet="Bagua Sandals"} sets.WS.MAB = set_combine(sets.WS.STRMND, -- Change Diamond Ring to Acumen Ring/Shiva +1 When Obtained. Add to Feet Umbani Boots When Obtained. -- {head="Geomancy Galero",neck="Stoicheion Medal", lear="Hecate's Earring",rear="Novio Earring", body="Bagua Tunic",hands="Yaoyotl Gloves", lring="Diamond Ring",rring="Diamond Ring", back="Toro Cape",waist="Oneiros Sash", legs="Hagondes Pants"}) -------- Commands & Variables -------- -- Not sure if possible to change macro set based on subjob changing or not -- send_command('input /macro book 19;wait .1;input /macro set 1') send_command('bind ^f9 gs c weapon') end function precast(spell) -- if midaction() or pet_midaction() then -- add_to_chat(039,'Cancelling '..spell.name..'!') -- cancel_spell() -- return -- end if spell.action_type == 'Magic' then equip(sets.FC) if spell.skill == 'Geomancy' then equip(sets.FC.Geo) end if spell.skill == 'Elemental Magic' then if spell.name == 'Impact' then equip(sets.FC.Impact) else equip(sets.FC.Elem) end end if spell.name == 'Stun' then equip(sets.FC.Stun) end if spell.name == 'Stoneskin' then equip(sets.FC.Stoneskin) if buffactive.stoneskin then windower.ffxi.cancel_buff(37) end elseif spell.name == 'Sneak' then equip(sets.FC.Enh) if buffactive.sneak and spell.target.type == 'SELF' then windower.ffxi.cancel_buff(71) end elseif spell.skill == 'Enhancing Magic' then equip(sets.FC.Enh) end if spell.name:startswith('Cure') then equip(sets.FC.Cure) refine_cure(spell) return end if spell.name:startswith('Cura') then equip(sets.FC.Cure) end end if spell.name:startswith('Curing Waltz') then refine_waltz(spell) return end if spell.type == "Step" or spell.type == "Flourish1" then equip(sets.TP.Acc) -- Change to real Accuracy Gear if Ever Obtained. -- end if spell.name == 'Spectral Jig' and buffactive.sneak then windower.ffxi.cancel_buff(71) end if spell.name == 'Light Arts' and buffactive['Addendum: White'] then -- Code to Use Addendums with 1 macro for light arts and 1 for dark arts (typing //lightarts also works) -- cancel_spell() add_to_chat(122,'Addendum: White Already Activated. Using Light Arts Cancelled!') return elseif spell.name == 'Light Arts' and buffactive['Light Arts'] then cancel_spell() send_command('Addendum: White') add_to_chat(122,'Addendum: White Activated!') return elseif spell.name == 'Light Arts' and not buffactive['Light Arts'] then add_to_chat(122,'Click Second Time to Trigger Addendum!') send_command('@input /recast "Parsimony"') return end if spell.name == 'Dark Arts' and buffactive['Addendum: Black'] then cancel_spell() add_to_chat(122,'Addendum: Black Activated. Using Dark Arts Cancelled!') return elseif spell.name == 'Dark Arts' and buffactive['Dark Arts'] then cancel_spell() send_command('Addendum: Black') add_to_chat(122,'Addendum: Black Activated!') return elseif spell.name == 'Dark Arts' and not buffactive['Dark Arts'] then add_to_chat(122,'Click Second Time to Trigger Addendum!') send_command('@input /recast "Penury"') return end end function midcast(spell) if sets.JA[spell.name] then equip(sets.JA[spell.name]) end if spell.type == "WeaponSkill" then if sets.WS[spell.name] then equip(sets.WS[spell.name]) send_command('@input /echo % '..spell.name..' @ !') elseif spell.name=="Heavy Swing" or spell.name=="Starburst" or spell.name=="Sunburst" or spell.name=="Shell Crusher" or spell.name=="Full Swing" or spell.name=="Retribution" or spell.name=="Brainshaker" or spell.name=="Skullbreaker" or spell.name=="True Strike" or spell.name=="Judgment" or spell.name=="Black Halo" then equip(sets.WS.STRMND) send_command('@input /echo % '..spell.name..' @ !') elseif spell.name=="Rock Crusher" or spell.name=="Earth Crusher" or spell.name=="Cataclysm" or spell.name=="Shining Strike" or spell.name=="Seraph Strike" or spell.name=="Flash Nova" or spell.name=="Vidohunir" then equip(sets.WS.MAB) send_command('@input /echo % '..spell.name..' @ !') end end if spell.type == 'Scholar' then send_command('@input /recast "'..spell.name..'"') end if spell.name == 'Sublimation' then send_command('@wait 30;input /echo =======*****======= '..spell.name..' is Ready! =======*****=======') end if spell.skill == 'Geomancy' then equip(sets.Geo[Weapon_Set_Names[Weapon_Index]]) end if spell.skill == 'Elemental Magic' then if spell.name == 'Impact' then equip(sets.Impact[Weapon_Set_Names[Weapon_Index]]) else equip(sets.Elem[Weapon_Set_Names[Weapon_Index]]) end end if spell.skill == 'Enfeebling Magic' then equip(sets.Enfeeb[Weapon_Set_Names[Weapon_Index]]) if spell.name == 'Sleep II' or spell.name == 'Sleepga II' or spell.name == 'Repose' then send_command('@wait 45;input /echo '..spell.name..' Wearing off in 45 seconds!;wait 30;input /echo '..spell.name..' Wearing off in 15 seconds!;wait 10;input /echo '..spell.name..' Wearing off in 5 seconds!') end if spell.name == 'Sleep' or spell.name == 'Sleepga' then send_command('@wait 30;input /echo '..spell.name..' Wearing off in 30 seconds!;wait 15;input /echo '..spell.name..' Wearing off in 15 seconds!;wait 10;input /echo '..spell.name..' Wearing off in 5 seconds!') end end if spell.skill == 'Dark Magic' then if spell.name == 'Stun' then equip(sets.Stun[Weapon_Set_Names[Weapon_Index]]) elseif spell.name == 'Drain' or spell.name == 'Aspir' or spell.name == 'Aspir II' then equip(sets.DrainAspir[Weapon_Set_Names[Weapon_Index]]) else equip(sets.Dark[Weapon_Set_Names[Weapon_Index]]) end end if spell.skill == 'Enhancing Magic' then -- After Fastcast gear set to idle so equipment isnt accidently changed on Zoning for Teleports and Warp. -- if spell.name == 'Stoneskin' then equip(sets.Enhance.Stoneskin) elseif spell.name:startswith('Teleport') or spell.name:startswith('Warp') or spell.name == 'Escape' then equip(sets.Idle[Weapon_Set_Names[Weapon_Index]]) else equip(sets.Enhance) end end if spell.skill == 'Healing Magic' then if spell.name == 'Cursna' then equip(sets.Cursna) elseif spell.name:endswith('na') then equip(sets.Heal[Weapon_Set_Names[Weapon_Index]]) elseif spell.name:startswith('Cure') or spell.name:startswith('Cura') then equip(sets.Cure[Weapon_Set_Names[Weapon_Index]]) else equip(sets.Heal[Weapon_Set_Names[Weapon_Index]]) end end if spell.name == 'Monomi: Ichi' and buffactive.sneak then send_command('@wait 1.7;cancel 71') end if spell.name == 'Utsusemi: Ichi' and ( buffactive["Copy Image"] or buffactive["Copy Image (2)"] or buffactive["Copy Image (3)"] ) then send_command('@wait 2.5;cancel 66;cancel 444;cancel 445') end end function aftercast(spell) if spell.name:startswith('Geo-') then if player.status == 'Engaged' then equip(sets.TPLuopan[Weapon_Set_Names[Weapon_Index]]) else equip(sets.IdleLuopan[Weapon_Set_Names[Weapon_Index]]) end else if player.status == 'Engaged' then if pet.isvalid then equip(sets.TPLuopan[Weapon_Set_Names[Weapon_Index]]) else equip(sets.TP[Weapon_Set_Names[Weapon_Index]]) end else if pet.isvalid then equip(sets.IdleLuopan[Weapon_Set_Names[Weapon_Index]]) else equip(sets.Idle[Weapon_Set_Names[Weapon_Index]]) end end end end function status_change(new,old) if new == 'Engaged' then if pet.isvalid then equip(sets.TPLuopan[Weapon_Set_Names[Weapon_Index]]) else equip(sets.TP[Weapon_Set_Names[Weapon_Index]]) end elseif new == 'Resting' then if pet.isvalid then equip(sets.RestLuopan[Weapon_Set_Names[Weapon_Index]]) else equip(sets.Rest[Weapon_Set_Names[Weapon_Index]]) end else if pet.isvalid then equip(sets.IdleLuopan[Weapon_Set_Names[Weapon_Index]]) else equip(sets.Idle[Weapon_Set_Names[Weapon_Index]]) end end end function buff_change(buff,gain) if buff == 'Reraise' and not gain then send_command('@input /echo ======== Auto Casting Reraise in 5 Seconds! ========;wait 5;/ma "Reraise" ') end if buff == 'Encumbrance' and not gain then if player.status == 'Engaged' then if pet.isvalid then equip(sets.TPLuopan[Weapon_Set_Names[Weapon_Index]]) else equip(sets.TP[Weapon_Set_Names[Weapon_Index]]) end elseif player.status == 'Resting' then if pet.isvalid then equip(sets.RestLuopan[Weapon_Set_Names[Weapon_Index]]) else equip(sets.Rest[Weapon_Set_Names[Weapon_Index]]) end else if pet.isvalid then equip(sets.IdleLuopan[Weapon_Set_Names[Weapon_Index]]) else equip(sets.Idle[Weapon_Set_Names[Weapon_Index]]) end end end end function indi_change(indi_table,gain) -- Currently wont refresh timer if the same spell is recasted over the same last spell. Could delete the timer up above in precast for indi spells, but would cancel even if interupted! -- if gain then send_command('@timers c Indi-Spell 180 up IndiAura.png') else send_command('@timers d Indi-Spell;input /echo :::: :::: Indi-Spell Has Expired Or Been Overwritten! Recast If Needed! :::: ::::') end end function pet_change(pet,gain) if not gain then send_command('@timers d Geo-Spell;input /echo ::X:: ::X:: Luopan Has Died! Recast If Needed! ::X:: ::X::') if player.status == 'Engaged' then equip(sets.TP[Weapon_Set_Names[Weapon_Index]]) elseif player.status == 'Resting' then equip(sets.Rest[Weapon_Set_Names[Weapon_Index]]) else equip(sets.Idle[Weapon_Set_Names[Weapon_Index]]) end else send_command('@timers c Geo-Spell 180 up GeoAura.png') end end function self_command(command) if command == 'weapon' then Weapon_Index = Weapon_Index +1 if Weapon_Index > #Weapon_Set_Names then Weapon_Index = 1 end send_command('@input /echo ----- Weapon Changed To '..Weapon_Set_Names[Weapon_Index]..' -----') equip(sets.Command[Weapon_Set_Names[Weapon_Index]]) end end