Pergatory

Pergatory's SCH Gearswap

Feb 9th, 2025 (edited)
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 34.41 KB | None | 0 0
  1. ----- Credit: Krystela of Asura | Last Update: 27 November 2016 ---->
  2. ---- .:: This was entirely created by me, it's not based off anyone's file ::. ---->
  3. ---- Always visit http://pastebin.com/u/KrystelaRose to look for possible updates ---->
  4. ---- .:: Please leave credit where it's due ::. ---->
  5. ---- v2.0 by Pergatory of Asura -- http://pastebin.com/u/Pergatory
  6.  
  7. function user_unload()
  8.     send_command('unbind f9')
  9.     send_command('unbind f10')
  10.     send_command('unbind f11')
  11.     send_command('unbind f12')
  12.     send_command('unbind ^f9')
  13.     send_command('unbind ^f10')
  14.     send_command('unbind ^f11')
  15.     send_command('unbind ^f12')
  16.     enable("main","sub","range","ammo","head","neck","ear1","ear2","body","hands","ring1","ring2","back","waist","legs","feet")
  17. end
  18.  
  19. function get_sets()
  20.     -- Binds for modes
  21.     send_command('bind f9 gs c ToggleIdle')
  22.     send_command('bind f10 gs c MagicBurst')
  23.     send_command('bind f11 input /item "Panacea" <me>')
  24.     send_command('bind f12 input /item "Holy Water" <me>')
  25.     send_command('bind ^f9 gs c WeaponLock')
  26.     send_command('bind ^f10 gs c TH')
  27.     send_command('bind ^f11 gs c LowDmg')
  28.     send_command('bind ^f12 input /item "Remedy" <me>')
  29.  
  30.     -- Auto Functions --
  31.     AutoRemedy = false -- Set to ON if you want to auto use remedies if silenced or Paralyzed, otherwise set to OFF --
  32.  
  33.     -- Mode Defaults --
  34.     IdleMode = 'Move' -- Press F9 to toggle idle mode --
  35.     WeaponLock = false -- Press F10 for Weapon Lock--
  36.     LowDmg = true -- Press F11 to toggle low-damage helix set. Used for making skillchains against enemies that reflect ailments like in Sortie.
  37.                     -- Helix II will still use the full damage set so it's safe to leave this turned on most of the time.
  38.     MagicBurst = true -- Press F10 to circle through Magic modes --
  39.     OccultMode = false
  40.     VagaryMode = false -- "//gs c Vagary" to enable Vagary nuking set (target 5~7k damage magic burst)
  41.     TreasureHunter = false -- Press Ctrl + F10 to toggle Treasure Hunter. Only equips for spells in the "THSpells" list below.
  42.     RegenPotency = true
  43.     IdleModes = {'Refresh','Move','DT','Kite','TP'}
  44.  
  45.     gear = {}
  46.     -- Situational Gear --
  47.     -- Fill these if you have the item. --
  48.     gear.Duration_Hands = {hands="Arbatel Bracers +3"} -- Add Empy hands if you want to use it, it not leave {} empty --
  49.     gear.Refresh_Head = {head="Amalric Coif +1"} -- Add refresh effect + head if you want to use it, it not leave {} empty --
  50.     gear.Alacrity_Feet = {} -- Add Relic feet for stun if you want to use it, it not leave {} empty --
  51.     gear.Klimaform_Feet = {} -- Add Empyrean feet for Klimaform nukes if you want to use it, it not leave {} empty --
  52.     gear.Rapture_Head = {head="Arbatel Bonnet +3"} -- Add Empyrean Head for Rapture Heals if you want to use it, it not leave {} empty --
  53.     -- Element-specific nuking pieces
  54.     gear.Stone = {neck="Quanpur Necklace"}
  55.  
  56.     -- Set macro book/set --
  57.     macrobook = 13
  58.     if player.sub_job=='DRK' then
  59.         macrobook = 33
  60.     end
  61.     send_command('input /macro book '..macrobook..';wait .1;input /macro set 10;wait 3;input /lockstyleset 85') -- set macro book/set here --
  62.     --send_command('input /macro book '..macrobook..';wait .1;input /macro set 10;wait 3;input /lockstyleset 99') -- set macro book/set here --
  63.    
  64.     THSpells = S{"Dia","Dia II","Diaga","Dispelga","Bio","Bio II"} -- If you want Treasure Hunter gear to swap for a spell/ability, add it here.
  65.     -- Treasure Hunter set. Don't put anything in here except TH+ gear.
  66.     -- It overwrites slots in other sets when TH toggle is on (Ctrl+F10).
  67.     sets.TH = {
  68.         head="Volte Cap",
  69.         waist="Chaac Belt",
  70.         hands="Volte Bracers",
  71.         feet="Volte Boots"
  72.     }
  73.  
  74.     -- Lists --
  75.     NoHelixMonsters = S{"Gartell","Leshonn","Haughty Tulittia"} -- To prevent accidents, you will not be able to cast Helix II spells on these targets.
  76.         --Regular helix can still be cast on these, so take care that you've got the low damage toggle on.
  77.     Town = S{"Ru'Lude Gardens","Upper Jeuno","Lower Jeuno","Port Jeuno","Port Windurst","Windurst Waters","Windurst Woods","Windurst Walls","Heavens Tower",
  78.              "Port San d'Oria","Northern San d'Oria","Southern San d'Oria","Port Bastok","Bastok Markets","Bastok Mines","Metalworks","Aht Urhgan Whitegate",
  79.              "Tavnazian Safehold","Nashmau","Selbina","Mhaura","Norg","Eastern Adoulin","Western Adoulin","Kazham","Heavens Tower"}
  80.    
  81.     ---- Precast ----
  82.     sets.precast = {}
  83.    
  84.     -- Fast Cast Set --
  85.     sets.precast.FC = {
  86.         main="Musa", -- +10
  87.         sub="Clerisy Strap +1", -- +3
  88.         ammo="Sapience Orb", -- +2
  89.         head="Pedagogy Mortarboard +3",
  90.         neck="Orunmila's Torque", -- +5
  91.         ear1="Malignance Earring", -- +4
  92.         ear2="Loquac. Earring", -- +2
  93.         body="Zendik Robe", -- +13
  94.         hands="Academic's Bracers +3", -- +9
  95.         ring1="Kishar Ring", -- +4
  96.         ring2="Rahab Ring", -- +2
  97.         back={ name="Lugh's Cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+10','"Fast Cast"+10','Phys. dmg. taken-10%',}},
  98.         waist="Embla Sash", -- +5
  99.         legs="Pinga Pants +1", -- +13
  100.         feet="Academic's Loafers +3"
  101.     }
  102.    
  103.     -- Fast Cast set used when your spell matches your active grimoire.
  104.     --sets.precast.FC.Grimoire = set_combine(sets.precast.FC, {
  105.     --})
  106.  
  107.     -- Immanence FC set, avoid quick magic so you don't mess with magic burst timing.
  108.     --sets.precast.FC['Immanence'] = set_combine(sets.precast.FC.Grimoire, {
  109.     --})
  110.  
  111.     sets.precast.FC.WeaponLock = set_combine(sets.precast.FC, {
  112.         head="Amalric Coif +1"
  113.     })
  114.  
  115.     sets.precast['Impact'] = set_combine(sets.precast.FC, { -- Make sure to leave the head empty --
  116.         head=empty,
  117.         body="Crepuscular Cloak"})
  118.  
  119.     sets.precast["Dispelga"] = set_combine(sets.precast.FC, {
  120.         main="Daybreak",
  121.         sub="Ammurapi Shield"
  122.     })
  123.  
  124.     -- Job Abilities --
  125.     sets.JA = {}
  126.     sets.JA['Tabula Rasa'] = { legs="Pedagogy Pants +1" }
  127.  
  128.     ---- Midcast ----
  129.     sets.midcast = {}
  130.    
  131.     -- Base Set --
  132.     sets.midcast.Recast = set_combine(sets.precast.FC, {
  133.         head="Amalric Coif +1",
  134.         feet={ name="Merlinic Crackows", augments={'DEX+10','Phys. dmg. taken -2%','"Refresh"+2','Accuracy+3 Attack+3',}},
  135.     })
  136.    
  137.     -- Healing Magic --
  138.     sets.midcast.Cure = {
  139.         main="Daybreak",
  140.         sub="Ammurapi Shield",
  141.         ammo="Esper Stone +1",
  142.         head="Kaykaus Mitra +1",
  143.         neck="Incanter's Torque",
  144.         ear1="Novia Earring",
  145.         ear2="Meili Earring",
  146.         body="Zendik Robe",
  147.         hands="Kaykaus Cuffs +1",
  148.         ring1={name="Stikini Ring +1", bag="wardrobe2"},
  149.         ring2="Haoma's Ring",
  150.         --back="Tempered Cape +1",
  151.         back="Moonlight Cape",
  152.         waist="Luminary Sash",
  153.         legs={ name="Kaykaus Tights +1", augments={'INT+12','"Mag.Atk.Bns."+20','Enmity-6',}},
  154.         feet="Kaykaus Boots +1"
  155.     }
  156.  
  157.     sets.midcast.Cure.Weather = set_combine(sets.midcast.Cure, {
  158.         main="Chatoyant staff",
  159.         sub="Clerisy Strap +1",
  160.         back="Twilight Cape",
  161.         waist="Hachirin-no-Obi",
  162.     })
  163.    
  164.     sets.midcast.Cure.WeaponLock = set_combine(sets.midcast.Cure, {
  165.     })
  166.    
  167.     sets.midcast['Cursna'] = set_combine(sets.midcast.Recast, {
  168.         main={ name="Gada", augments={'Enh. Mag. eff. dur. +6','DEX+1','Mag. Acc.+5','"Mag.Atk.Bns."+18','DMG:+4',}},
  169.         sub="Ammurapi Shield",
  170.         ammo="Impatiens",
  171.         head={ name="Vanya Hood", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}},
  172.         neck="Debilis Medallion",
  173.         ear1="Meili Earring",
  174.         ear2="Beatific Earring",
  175.         body="Pedagogy Gown +3",
  176.         hands="Hieros Mittens",
  177.         ring1="Menelaus's Ring",
  178.         ring2="Haoma's Ring",
  179.         back="Tempered Cape +1",
  180.         waist="Bishop's Sash",
  181.         feet={ name="Vanya Clogs", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}}
  182.     })
  183.    
  184.     -- Enhancing Magic --
  185.     sets.midcast.Enhancing = { -- Max enhancing set for spells with no cap like Enspell
  186.         main="Musa",
  187.         sub="Clerisy Strap +1",
  188.         ammo="Savant's Treatise",
  189.         head={ name="Telchine Cap", augments={'Mag. Evasion+24','"Conserve MP"+4','Enh. Mag. eff. dur. +10',}},
  190.         neck="Incanter's Torque",
  191.         ear1="Mimir Earring",
  192.         ear2="Andoaa earring",
  193.         body="Pedagogy Gown +3",
  194.         hands={ name="Telchine Gloves", augments={'Mag. Evasion+25','"Fast Cast"+5','Enh. Mag. eff. dur. +10',}},
  195.         ring1={name="Stikini Ring +1", bag="wardrobe2"},
  196.         ring2={name="Stikini Ring +1", bag="wardrobe4"},
  197.         back="Perimede Cape",
  198.         waist="Embla sash",
  199.         legs={ name="Telchine Braconi", augments={'Mag. Evasion+25','"Conserve MP"+4','Enh. Mag. eff. dur. +10',}},
  200.         feet={ name="Telchine Pigaches", augments={'Mag. Evasion+24','"Conserve MP"+3','Enh. Mag. eff. dur. +10',}}
  201.     }
  202.    
  203.     sets.midcast.Enhancing500 = set_combine(sets.midcast.Enhancing, {   -- This is 500 skill and full duration --
  204.     })
  205.     sets.midcast.Enhancing500.WeaponLock = set_combine(sets.midcast.Enhancing500, {})   -- Priority: 500skil > Duration For when weapon is locked --
  206.    
  207.     sets.midcast['Phalanx'] = set_combine(sets.midcast.Enhancing, {}) -- If you have specific phalanx gears --
  208.    
  209.     sets.midcast.Regen = set_combine(sets.midcast.Enhancing500, {
  210.         main="Musa",
  211.         sub="Clerisy Strap +1",
  212.         back={ name="Lugh's Cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+10','"Fast Cast"+10','Phys. dmg. taken-10%',}},
  213.     })
  214.    
  215.     sets.midcast.Regen.Potency = set_combine(sets.midcast.Regen, {
  216.         head="Arbatel Bonnet +3",
  217.         back="Bookworm's Cape",
  218.     })
  219.    
  220.     sets.midcast['Stoneskin'] = set_combine(sets.midcast.Enhancing500, {
  221.         neck="Nodens Gorget",
  222.         ear2="Earthcry Earring",
  223.         waist="Siegel Sash",
  224.     })
  225.    
  226.     sets.midcast['Aquaveil'] = set_combine(sets.midcast.Enhancing500, {
  227.         main="Vadose Rod",
  228.         head="Amalric Coif +1",
  229.         hands="Regal Cuffs",
  230.         waist="Emphatikos Rope",
  231.     })
  232.  
  233.     -- Enfeebling Magic --
  234.     sets.midcast.Enfeebling = { -- Full skill set for frazzle/distract/Poison --
  235.         main="Daybreak",
  236.         sub="Ammurapi Shield",
  237.         ammo="Pemphredo Tathlum",
  238.         head="Acad. Mortar. +3",
  239.         neck="Argute Stole +2",
  240.         ear1="Regal Earring",
  241.         ear2="Arbatel Earring +2",
  242.         body="Academic's Gown +3",
  243.         hands="Kaykaus Cuffs +1",
  244.         ring1={name="Stikini Ring +1", bag="wardrobe2"},
  245.         ring2={name="Stikini Ring +1", bag="wardrobe4"},
  246.         back="Aurist's Cape +1",
  247.         waist="Obstinate Sash",
  248.         legs="Arbatel Pants +3",
  249.         feet="Acad. Loafers +3"
  250.     }
  251.     sets.midcast.Enfeebling.MND = set_combine(sets.midcast.Enfeebling, {}) -- For Paralyze/Slow who's potency/macc is enhanced by MND --
  252.     sets.midcast.Enfeebling.INT = set_combine(sets.midcast.Enfeebling, { -- For Blind/Bind who's Macc is enhanced by INT --
  253.         --waist="Acuity Belt +1"
  254.     })
  255.     sets.midcast.Enfeebling.Duration = set_combine(sets.midcast.Enfeebling, {
  256.         hands="Regal Cuffs",
  257.     })
  258.     sets.midcast.Enfeebling.Ele = set_combine(sets.midcast.Enfeebling.INT, { -- For Burn/Drown/etc
  259.         legs="Agwu's Slops"
  260.     })
  261.  
  262.     sets.midcast["Dispelga"] = set_combine(sets.midcast.Enfeebling.Macc, {
  263.         main="Daybreak",
  264.         sub="Ammurapi Shield"
  265.     })
  266.  
  267.     -- Dark Magic --
  268.     sets.midcast.Dark = set_combine(sets.midcast.Recast, {
  269.         neck="Erra Pendant",
  270.         ear1="Mani Earring",
  271.         ear2="Regal Earring",
  272.         body="Academic's Gown +3",
  273.         --head="Pixie Hairpin +1",
  274.         ring1={name="Stikini Ring +1", bag="wardrobe2"},
  275.         ring2={name="Stikini Ring +1", bag="wardrobe4"},
  276.         back="Bookworm's Cape",
  277.         legs="Pedagogy Pants +1",
  278.     })
  279.  
  280.     sets.midcast.Aspir = set_combine(sets.midcast.Dark, {
  281.         ring1="Archon Ring",
  282.         ring2="Evanescence Ring",
  283.         waist="Fucho-no-Obi",
  284.         feet="Agwu's Pigaches"
  285.     })
  286.    
  287.     sets.midcast['Stun'] = set_combine(sets.midcast.Recast, {})
  288.    
  289.     sets.midcast['Absorb-TP'] = set_combine(sets.midcast.Recast, {
  290.         sub="Khonsu",
  291.         ammo="Pemphredo Tathlum",
  292.         head="Amalric Coif +1",
  293.         neck="Argute Stole +2",
  294.         ear1="Crepuscular Earring",
  295.         body="Agwu's Robe",
  296.         hands="Agwu's Gages",
  297.         ring2="Metamorph Ring +1",
  298.         waist="Acuity Belt +1",
  299.         legs="Arbatel Pants +3",
  300.         feet="Agwu's Pigaches"
  301.     })
  302.  
  303.     -- Elemental Magic --
  304.     sets.midcast.Elemental = { -- Normal Nukes --
  305.         main="Opashoro",
  306.         --sub="Enki Strap",
  307.         sub="Khonsu",
  308.         ammo="Ghastly Tathlum +1",
  309.         head="Pedagogy mortarboard +3",
  310.         neck="Argute Stole +2",
  311.         ear1="Malignance Earring",
  312.         ear2="Arbatel Earring +2",
  313.         body="Arbatel Gown +3",
  314.         hands="Arbatel Bracers +3",
  315.         ring1="Freke Ring",
  316.         ring2="Metamorph Ring +1",
  317.         back={ name="Lugh's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','"Mag.Atk.Bns."+10','Phys. dmg. taken-10%',}},
  318.         waist="Sacro Cord",
  319.         legs="Agwu's Slops",
  320.         feet="Arbatel Loafers +3"
  321.     }
  322.     -- For when MB mode is turned on --
  323.     sets.midcast.Elemental.MB = set_combine(sets.midcast.Elemental, {
  324.         body="Agwu's Robe",
  325.         hands="Agwu's Gages",
  326.         ring1="Mujin Band",
  327.     })
  328.     sets.midcast.Elemental.Weather = set_combine(sets.midcast.Elemental, {
  329.         waist="Hachirin-no-Obi",
  330.     })
  331.     sets.midcast.Elemental.MB.Weather = set_combine(sets.midcast.Elemental.MB, {
  332.         waist="Hachirin-no-Obi"
  333.     })
  334.  
  335.     -- Occult Acumen sets (uses magic burst sets as baseline)
  336.     sets.midcast.Elemental.Occult = set_combine(sets.midcast.Elemental.MB, {
  337.         legs="Perdition Slops",
  338.     })
  339.     sets.midcast.Elemental.Occult.Weather = set_combine(sets.midcast.Elemental.MB.Weather, {
  340.         legs="Perdition Slops",
  341.     })
  342.    
  343.     -- Target: 5~7k damage magic bursted
  344.     sets.midcast.Elemental.Vagary = {
  345.         main="Bolelabunga",
  346.         sub="Genmei Shield",
  347.         ammo="Ghastly Tathlum +1",
  348.         --head="Pedagogy mortarboard +3", --high
  349.         head="Academic's mortarboard +3", --low
  350.         neck="Argute Stole +2",
  351.         ear1="Malignance Earring",
  352.         ear2="Arbatel Earring +2",
  353.         --body="Arbatel Gown +3", --high
  354.         body="Annointed Kalasiris", --low
  355.         --hands="Arbatel Bracers +3", --high
  356.         hands="Academic's Bracers +3", --low
  357.         ring1="Freke Ring",
  358.         ring2="Metamorph Ring +1",
  359.         back={ name="Lugh's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','"Mag.Atk.Bns."+10','Phys. dmg. taken-10%',}},
  360.         waist="Sacro Cord",
  361.         legs="Agwu's Slops",
  362.         --feet="Arbatel Loafers +3" --high
  363.         feet="Academic's Loafers +3" --low
  364.     }
  365.  
  366.     -- Helix Set: Priority INT > Mdmg > Mab, don't put weather stuff in here, helix have natural 100% dmg + from weather --
  367.     sets.midcast.Helix = set_combine(sets.midcast.Elemental, {
  368.         main="Opashoro",
  369.         --sub="Enki Strap",
  370.         sub="Khonsu",
  371.         head="Arbatel Bonnet +3",
  372.         body="Arbatel Gown +3",
  373.         legs="Mallquis Trews +2",
  374.         waist="Acuity Belt +1",
  375.     })
  376.     -- Priority MB > INT > Mdmg > Mab, don't put weather obi here, helix have natural 100% dmg + from weather --
  377.     sets.midcast.Helix.MB = set_combine(sets.midcast.Helix, {
  378.         hands="Agwu's Gages",
  379.         ring1="Mujin Band",
  380.         legs="Agwu's Slops",
  381.     })
  382.  
  383.     sets.midcast.Helix['Light'] = set_combine(sets.midcast.Helix, {
  384.         main="Daybreak",
  385.         sub="Culminus",
  386.     })
  387.     sets.midcast.Helix['Light'].MB = set_combine(sets.midcast.Helix.MB, {
  388.         main="Daybreak",
  389.         sub="Culminus",
  390.     })
  391.    
  392.     -- Low Damage set for when you don't want to nuke for very much. Used on T1 nukes and T1 helixes only.
  393.     -- Useful for making skillchains when bosses reflect helix back on you or build resistance based on damage dealt.
  394.     -- Subtle blow is also nice here.
  395.     sets.midcast.Elemental.Low = set_combine(sets.midcast.Recast, {
  396.         main="Warp Cudgel",
  397.         sub="Genmei Shield",
  398.         head="Kaykaus Mitra +1",
  399.         neck="Bathy Choker +1",
  400.         ear1="Dignitary's Earring",
  401.         hands={ name="Telchine Gloves", augments={'Mag. Evasion+25','"Fast Cast"+5','Enh. Mag. eff. dur. +10',}},
  402.         ring1={name="Chirich Ring +1", bag="wardrobe2"},
  403.         ring2={name="Chirich Ring +1", bag="wardrobe4"},
  404.         waist="Ninurta's Sash",
  405.         legs="Assiduity Pants +1",
  406.         feet="Regal Pumps +1"
  407.     })
  408.     sets.midcast.Helix.Low = set_combine(sets.midcast.Elemental.Low, {
  409.     })
  410.  
  411.     sets.midcast.Kaustra = set_combine(sets.midcast.Elemental, { -- INT -> MaB --
  412.         --main="Opashoro",
  413.         --sub="Enki Strap",
  414.         main="Bunzi's Rod",
  415.         sub="Ammurapi Shield",
  416.         ammo="Ghastly Tathlum +1",
  417.         head="Arbatel Bonnet +3",
  418.         neck="Argute Stole +2",
  419.         ear1="Malignance Earring",
  420.         ear2="Regal Earring",
  421.         body="Arbatel Gown +3",
  422.         hands="Agwu's Gages",
  423.         ring1="Archon Ring",
  424.         ring2="Metamorph Ring +1",
  425.         back={ name="Lugh's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','"Mag.Atk.Bns."+10','Phys. dmg. taken-10%',}},
  426.         waist="Sacro Cord",
  427.         legs="Agwu's Slops",
  428.         feet="Arbatel Loafers +3"
  429.     })
  430.     sets.midcast.Kaustra.MB  = set_combine(sets.midcast.Kaustra, {
  431.         body="Agwu's Robe"
  432.     })
  433.     sets.midcast.Kaustra.Weather  = set_combine(sets.midcast.Kaustra, {  -- Priority: Weather effect -> INT -> MaB --
  434.         waist="Hachirin-no-Obi"
  435.     })
  436.     sets.midcast.Kaustra.MB.Weather  = set_combine(sets.midcast.Kaustra.MB, { -- Priority: MB% -> Weather effect -> INT -> MaB --
  437.          waist="Hachirin-no-Obi"
  438.     })
  439.  
  440.     sets.midcast['Impact'] = set_combine(sets.midcast.Elemental.MB, {  -- Make sure to leave the head empty --
  441.         head=empty,
  442.         body="Crepuscular Cloak",
  443.         --hands="Academic's Bracers +3",
  444.         --ring1={name="Stikini Ring +1", bag="wardrobe2"},
  445.         --ring2={name="Stikini Ring +1", bag="wardrobe4"},
  446.         --legs={ name="Chironic Hose", augments={'Mag. Acc.+23 "Mag.Atk.Bns."+23','Haste+1','MND+10','Mag. Acc.+7','"Mag.Atk.Bns."+11',}},
  447.         --feet="Academic's Loafers +3"
  448.     })
  449.    
  450.     sets.midcast.Enlightenment = {
  451.         body="Pedagogy Gown +3",
  452.     }
  453.    
  454.     -- Weaponskills --
  455.     sets.WS = {
  456.         ammo="Oshasha's Treatise",
  457.         head="Nyame Helm",
  458.         neck="Sanctity Necklace",
  459.         ear1="Malignance Earring",
  460.         ear2="Regal Earring",
  461.         body="Nyame Mail",
  462.         hands="Nyame Gauntlets",
  463.         ring1="Epaminondas's Ring",
  464.         ring2="Metamorph Ring +1",
  465.         back="Aurist's Cape +1",
  466.         waist="Acuity Belt +1",
  467.         legs="Nyame Flanchard",
  468.         feet="Nyame Sollerets"
  469.     }
  470.  
  471.     sets.WS['Myrkr'] = set_combine(sets.WS, {
  472.         head="Amalric Coif +1",
  473.         neck="Sanctity Necklace",
  474.         ear1="Gifted Earring",
  475.         ear2="Etiolation Earring",
  476.         body="Academic's Gown +3",
  477.         hands="Academic's Bracers +3",
  478.         ring1="Mephitas's Ring +1",
  479.         ring2="Mephitas's Ring",
  480.         back="Aurist's Cape +1",
  481.         waist="Luminary Sash",
  482.         legs={ name="Amalric Slops +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
  483.         feet="Psycloth Boots"
  484.     })
  485.  
  486.     sets.WS['Oshala'] = set_combine(sets.WS, {
  487.         neck="Argute Stole +2",
  488.     })
  489.  
  490.     sets.WS['Shattersoul'] = set_combine(sets.WS, {})
  491.     sets.WS['Omniscience'] = set_combine(sets.WS, {})
  492.  
  493.     -- /SMN sets
  494.     sets.midcast.BloodPact = {
  495.         head={ name="Helios Band", augments={'Pet: Mag. Acc.+29','"Blood Pact" ability delay -5','Summoning magic skill +8',}},
  496.         legs={ name="Helios Spats", augments={'Pet: Mag. Acc.+25','"Blood Pact" ability delay -5','Summoning magic skill +6',}},
  497.         feet={ name="Helios Boots", augments={'Pet: Mag. Acc.+29','"Blood Pact" ability delay -5','Summoning magic skill +8',}}
  498.     }
  499.    
  500.     sets.pet_midcast = {}
  501.    
  502.     sets.pet_midcast.Ward = {
  503.         -- main="Vayuvata III",
  504.         -- sub="Vox Grip",
  505.         -- neck="Incanter's Torque",
  506.         -- ear1="Andoaa Earring",
  507.         -- ear2="Lodurr Earring",
  508.         -- ring1={name="Stikini Ring +1", bag="wardrobe2"},
  509.         -- ring2={name="Stikini Ring +1", bag="wardrobe4"},
  510.         -- waist="Kobo Obi",
  511.     }
  512.    
  513.     sets.pet_midcast.Rage = {
  514.     }
  515.  
  516.     ---- Aftercast ----
  517.     sets.aftercast = {
  518.         main="Mpaca's Staff",
  519.         sub="Oneiros Grip",
  520.         ammo="Homiliary",
  521.         head={ name="Chironic Hat", augments={'"Fast Cast"+2','"Refresh"+2','Mag. Acc.+18 "Mag.Atk.Bns."+18',}},
  522.         neck="Loricate Torque +1",
  523.         left_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
  524.         right_ear="Etiolation Earring",
  525.         body="Arbatel Gown +3",
  526.         hands={ name="Chironic Gloves", augments={'Pet: INT+10','AGI+12','"Refresh"+2','Accuracy+6 Attack+6',}},
  527.         ring1={name="Stikini Ring +1", bag="wardrobe2"},
  528.         ring2={name="Stikini Ring +1", bag="wardrobe4"},
  529.         back={ name="Lugh's Cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+10','"Fast Cast"+10','Phys. dmg. taken-10%',}},
  530.         waist="Carrier's Sash",
  531.         legs={ name="Chironic Hose", augments={'AGI+8','Pet: Mag. Acc.+14','"Refresh"+2','Accuracy+16 Attack+16','Mag. Acc.+15 "Mag.Atk.Bns."+15',}},
  532.         feet={ name="Chironic Slippers", augments={'Pet: INT+6','"Snapshot"+1','"Refresh"+2','Accuracy+12 Attack+12','Mag. Acc.+4 "Mag.Atk.Bns."+4',}},
  533.     }
  534.  
  535.     sets.aftercast.Sub50 = set_combine(sets.aftercast, { waist="Fucho-no-obi" })
  536.    
  537.     sets.aftercast.Shiva = set_combine(sets.aftercast, {
  538.         --main="Vourukasha III",
  539.         --sub="Oneiros Grip",
  540.         waist="Avatar Belt",
  541.     })
  542.     sets.aftercast.Siren = set_combine(sets.aftercast, {
  543.         --main="Vayuvata III",
  544.         --sub="Oneiros Grip",
  545.         waist="Avatar Belt",
  546.     })
  547.     sets.aftercast.Garuda = sets.aftercast.Siren   
  548.     sets.aftercast.Ramuh = set_combine(sets.aftercast, {
  549.         --main="Apamajas III",
  550.         --sub="Oneiros Grip",
  551.         waist="Avatar Belt",
  552.     })
  553.     sets.aftercast.Pet = set_combine(sets.aftercast, {
  554.         ear2="Evans Earring",
  555.         waist="Avatar Belt",
  556.         legs="Assiduity Pants +1",
  557.     })
  558.  
  559.     sets.aftercast.Move = set_combine(sets.aftercast, {
  560.         ring2="Shneddick Ring +1"
  561.     })
  562.  
  563.     sets.aftercast.DT = set_combine(sets.aftercast, {
  564.         main="Bolelabunga",
  565.         sub="Genmei Shield",
  566.         head="Arbatel Bonnet +3",
  567.         hands="Nyame Gauntlets",
  568.         legs="Nyame Flanchard",
  569.         feet="Arbatel Loafers +3"
  570.     })
  571.    
  572.     sets.aftercast.Kite = set_combine(sets.aftercast.DT, {
  573.         ring2="Shneddick Ring +1",
  574.     })
  575.  
  576.     sets.aftercast.TP = {
  577.         ammo="Oshasha's Treatise",
  578.         head="Nyame Helm",
  579.         neck="Lissome Necklace",
  580.         ear1="Telos Earring",
  581.         ear2="Crepuscular Earring",
  582.         body="Nyame Mail",
  583.         hands="Nyame Gauntlets",
  584.         ring1={name="Chirich Ring +1", bag="wardrobe2"},
  585.         ring2={name="Chirich Ring +1", bag="wardrobe4"},
  586.         back="Aurist's Cape +1",
  587.         waist="Cetl Belt",
  588.         legs="Nyame Flanchard",
  589.         feet="Nyame Sollerets"
  590.     }
  591.  
  592.     sets.aftercast.Town = set_combine(sets.aftercast, { -- For town --
  593.         --feet="Herald's Gaiters"
  594.     })
  595.  
  596.     -- Variables
  597.     EnfeeblingMND = S{"Paralyze","Slow","Frazzle","Distract","Addle"}
  598.     EnfeeblingDuration = S{"Sleep","Sleepga","Sleep II","Sleepga II","Bind","Silence","Break"}
  599.     EnfeeblingEle = S{"Burn","Rasp","Drown","Choke","Frost","Shock"}
  600.     NoSwap = S{"Light Arts","Dark Arts","Addendum: White","Addendum: Black","Celerity","Alacrity","Penury","Parsimony","Accession","Manifestation","Rapture","Ebullience","Altruism","Focalization","Tranquility","Equanimity","Perpetuance","Immanence"}
  601.     Immanence = false
  602.     Perpetuance = false
  603. end
  604.  
  605. ---- .::Pretarget Functions::. ---->
  606. function pretarget(spell,action)
  607.     -- Auto Remedy --
  608.     if AutoRemedy then
  609.         if buffactive['Silence'] or buffactive['Paralysis'] then
  610.             if spell.action_type == 'Magic' or spell.type == 'JobAbility' then
  611.                 cancel_spell()
  612.                 send_command('input /item "Remedy" <me>')
  613.             end
  614.         end
  615.     end
  616.     -- Do not let me Helix2 on Leshonn/Gartell like an idiot
  617.     if string.find(spell.english, 'helix II') and NoHelixMonsters:contains(spell.target.name) then
  618.         cancel_spell()
  619.         send_command('console_echo "Helix II disabled on Target: '..tostring(spell.target.name)..'"')
  620.     end
  621. end
  622.  
  623. ---- .::Precast Functions::. ---->
  624. function precast(spell)
  625.     if spell.type=="Item" or NoSwap:contains(spell.name) then
  626.         return
  627.     end
  628.     -- Check for a specific set
  629.     if sets.precast[spell.english] then
  630.         equipSet = sets.precast[spell.english]
  631.     elseif spell.action_type == 'Magic' then
  632.         equipSet = sets.precast.FC
  633.         if WeaponLock and equipSet.WeaponLock then
  634.             equipSet = equipSet.WeaponLock
  635.         end
  636.         equipSet = checkStratagemSets(equipSet)
  637.         if spell.type == 'BlackMagic' and buffactive['Dark Arts'] and equipSet.Grimoire then
  638.             equipSet = equipSet.Grimoire
  639.         elseif spell.type == 'WhiteMagic' and buffactive['Light Arts'] and equipSet.Grimoire then
  640.             equipSet = equipSet.Grimoire
  641.         end
  642.     -- Job Abilities --
  643.     elseif spell.type == 'JobAbility' then
  644.         equipSet = sets.JA[spell.english]
  645.     -- Weaponskills --
  646.     elseif spell.type == 'WeaponSkill' then
  647.         if sets.WS[spell.english] then
  648.             equipSet = sets.WS[spell.english]
  649.         else
  650.             equipSet = sets.WS
  651.         end
  652.     end
  653.     if (equipSet) then
  654.         equip(equipSet)
  655.     end
  656. end
  657.  
  658. ---- .::Midcast Functions::. ---->
  659. function midcast(spell)
  660.     if spell.name == 'Immanence' then
  661.         Immanence = true
  662.     elseif spell.name == 'Perpetuance' then
  663.         Perpetuance = true
  664.     end
  665.     if spell.type=="Item" or NoSwap:contains(spell.name) then
  666.         return
  667.     end
  668.     -- Everything that has a specific name set --
  669.     if sets.midcast[spell.english] then
  670.         if spell.skill == 'Enhancing' and buffactive[469] then
  671.             equip(sets.midcast[spell.english], gear.Duration_Hands)
  672.         elseif spell.english == 'Stun' and buffactive[363] then
  673.             equip(sets.midcast[spell.english], gear.Alacrity_Feet)
  674.         else
  675.             equip(sets.midcast[spell.english])
  676.         end
  677.     elseif spell.action_type == 'Magic' then
  678.         -- Healing Magic --
  679.         if string.find(spell.english, 'Cure') or string.find(spell.english, 'Cura') then
  680.             if WeaponLock then
  681.                 if buffactive[364] then
  682.                     equip(sets.midcast.Cure.WeaponLock, gear.Rapture_Head)
  683.                 else
  684.                     equip(sets.midcast.Cure.WeaponLock)
  685.                 end
  686.             elseif spell.element == world.weather_element or spell.element == world.day_element then
  687.                 if buffactive[364] then
  688.                     equip(sets.midcast.Cure.Weather, gear.Rapture_Head)
  689.                 else
  690.                     equip(sets.midcast.Cure.Weather)
  691.                 end
  692.             elseif buffactive[364] then
  693.                 equip(sets.midcast.Cure, gear.Rapture_Head)
  694.             else
  695.                 equip(sets.midcast.Cure)
  696.             end
  697.         -- Enhancing Magic --
  698.         elseif spell.skill=="Enhancing Magic" then
  699.             if string.find(spell.english, 'Haste') or string.find(spell.english, 'storm') or string.find(spell.english, 'Reraise') or string.find(spell.english, 'Flurry') or string.find(spell.english, 'Bar') or string.find(spell.english, 'Embrava') or string.find(spell.english, 'Protect') or string.find(spell.english, 'Shell') or string.find(spell.english, 'Adloquium') or string.find(spell.english, 'Animus') then
  700.                 if buffactive[469] or Perpetuance then
  701.                     if WeaponLock then
  702.                         equip(sets.midcast.Enhancing.WeaponLock, gear.Duration_Hands)
  703.                     else
  704.                         equip(sets.midcast.Enhancing, gear.Duration_Hands)
  705.                     end
  706.                 else
  707.                     equip(sets.midcast.Enhancing)
  708.                 end
  709.             elseif string.find(spell.english, 'Refresh') then
  710.                 if buffactive[469] or Perpetuance then
  711.                     if WeaponLock then
  712.                         equip(sets.midcast.Enhancing.WeaponLock, gear.Refresh_Head, gear.Duration_Hands)
  713.                     else
  714.                         equip(sets.midcast.Enhancing, gear.Refresh_Head, gear.Duration_Hands)
  715.                     end
  716.                 else
  717.                     equip(sets.midcast.Enhancing, gear.Refresh_Head)
  718.                 end
  719.             elseif string.find(spell.english, 'Regen') then
  720.                 equipSet = sets.midcast.Regen
  721.                 if RegenPotency and equipSet["Potency"] then
  722.                     equipSet = equipSet["Potency"]
  723.                 end
  724.                 if buffactive[469] or Perpetuance then
  725.                     equip(equipSet, gear.Duration_Hands)
  726.                 else
  727.                     equip(equipSet)
  728.                 end
  729.             else
  730.                 if buffactive[469] or Perpetuance then
  731.                     equip(sets.midcast.Enhancing, gear.Duration_Hands)
  732.                 else
  733.                     equip(sets.midcast.Enhancing)
  734.                 end
  735.             end
  736.             if Perpetuance then
  737.                 Perpetuance = false
  738.             end
  739.         -- Enfeebling Magic --
  740.         elseif spell.skill=="Enfeebling Magic" then
  741.             if EnfeeblingDuration:contains(spell.name) then
  742.                 equip(sets.midcast.Enfeebling.Duration)
  743.             elseif EnfeeblingEle:contains(spell.name) then
  744.                 equip(sets.midcast.Enfeebling.Ele)
  745.             elseif EnfeeblingMND:contains(spell.name) then
  746.                 equip(sets.midcast.Enfeebling.MND)
  747.             elseif spell.type=="BlackMagic" then
  748.                 equip(sets.midcast.Enfeebling.INT)
  749.             else
  750.                 equip(sets.midcast.Enfeebling)
  751.             end
  752.         -- Dark Magic --
  753.         elseif spell.skill == 'Dark Magic' then
  754.             if spell.english == 'Stun' then
  755.                 if buffactive[363] then
  756.                     equip(sets.midcast['stun'], gear.Alacrity_Feet)
  757.                 else
  758.                     equip(sets.midcast[spell.english])
  759.                 end
  760.             elseif string.find(spell.english, 'Aspir') or string.find(spell.english, 'Drain') then
  761.                 equip(sets.midcast.Aspir)
  762.             elseif spell.english == 'Kaustra' then
  763.                 if MagicBurst then
  764.                     if spell.element == world.weather_element or spell.element == world.day_element then
  765.                         if buffactive[407] then
  766.                             equip(sets.midcast.Kaustra.MB.Weather, gear.Klimaform_Feet)
  767.                         else
  768.                             equip(sets.midcast.Kaustra.MB.Weather)
  769.                         end
  770.                     else
  771.                         equip(sets.midcast.Kaustra.MB)
  772.                     end
  773.                 elseif spell.element == world.weather_element or spell.element == world.day_element then
  774.                     if buffactive[407] then
  775.                         equip(sets.midcast.Kaustra.Weather, gear.Klimaform_Feet)
  776.                     else
  777.                         equip(sets.midcast.Kaustra.Weather)
  778.                     end
  779.                 else
  780.                     equip(sets.midcast.Kaustra)
  781.                 end
  782.             else
  783.                 equip(sets.midcast.Dark)
  784.             end
  785.         -- Elemental Magic --
  786.         elseif spell.skill == 'Elemental Magic' then
  787.             equipSet = sets.midcast.Elemental
  788.             if VagaryMode and not buffactive['Immanence'] and not Immanence then
  789.                 equipSet = sets.midcast.Elemental.Vagary
  790.             elseif string.find(spell.english, 'helix') then
  791.                 equipSet = sets.midcast.Helix
  792.             end
  793.             -- Conditional subsets
  794.             if LowDmg and equipSet.Low and not string.find(spell.english, 'II') and not string.find(spell.english, 'V') then
  795.                 equipSet = equipSet.Low
  796.             end
  797.             if equipSet[spell.element] then
  798.                 equipSet = equipSet[spell.element]
  799.             end
  800.             if OccultMode and equipSet.Occult then
  801.                 equipSet = equipSet.Occult
  802.             end
  803.             if MagicBurst and equipSet.MB then
  804.                 equipSet = equipSet.MB
  805.             end
  806.             if (spell.element == world.weather_element or spell.element == world.day_element) and equipSet.Weather then
  807.                 equipSet = equipSet.Weather
  808.             end
  809.             equipSet = checkStratagemSets(equipSet)
  810.             equip(equipSet)
  811.             -- Klimaform feet check
  812.             if spell.element == world.weather_element or spell.element == world.day_element and buffactive[407] then
  813.                 equip(gear.Klimaform_Feet)
  814.             end
  815.             -- Check for element-specific nuking pieces
  816.             if gear[spell.element] then
  817.                 equip(gear[spell.element])
  818.             end
  819.             if Immanence then
  820.                 Immanence = false
  821.             end
  822.         elseif spell.type=="BloodPactWard" or spell.type=="BloodPactRage" then
  823.             equip(sets.midcast.BloodPact)
  824.         -- Everything else that doesn't have a specific set for it --
  825.         else
  826.             equip(sets.midcast.Recast)
  827.         end
  828.     end
  829.     -- Treasure Hunter
  830.     if TreasureHunter and THSpells:contains(spell.name) then
  831.         equip(sets.TH)
  832.     end
  833.     -- Auto-cancel existing buffs
  834.     if spell.name=="Stoneskin" and buffactive["Stoneskin"] then
  835.         windower.send_command('cancel 37;')
  836.     elseif spell.name=="Sneak" and buffactive["Sneak"] and spell.target.type=="SELF" then
  837.         windower.send_command('cancel 71;')
  838.     elseif spell.name=="Utsusemi: Ichi" and buffactive["Copy Image"] then
  839.         windower.send_command('wait 1;cancel 66;')
  840.     end
  841. end
  842.  
  843. ---- .::Aftercast Sets::. ---->
  844. function aftercast(spell,action)
  845.     if spell.type=="Item" or NoSwap:contains(spell.name) then
  846.         return
  847.     end
  848.     idle()
  849. end
  850.  
  851. function pet_midcast(spell)
  852.     if spell.type=="BloodPactWard" then
  853.         equip(sets.pet_midcast.Ward)
  854.     elseif spell.type=="BloodPactRage" then
  855.         equip(sets.pet_midcast.Rage)
  856.     end
  857. end
  858.  
  859. function pet_aftercast()
  860.     if not midaction() then
  861.         idle()
  862.     end
  863. end
  864.  
  865. ---- .::Status Changes Functions::. ---->
  866. function status_change(new,tab,old)
  867.     idle()
  868. end
  869.  
  870. function pet_change(pet,gain)
  871.     if not midaction() and not pet_midaction() then
  872.         idle()
  873.     end
  874. end
  875.  
  876. --- ..::Self Commands functions::.. --->
  877. function self_command(command)
  878.     for _, v in ipairs(IdleModes) do
  879.         if command:lower()==v:lower() then
  880.             IdleMode = v
  881.             send_command('console_echo "Idle Mode: ['..IdleMode..']"')
  882.             idle()
  883.             return
  884.         end
  885.     end
  886.     if command:lower()=="magicburst" then
  887.         MagicBurst = MagicBurst==false
  888.         send_command('console_echo "Magic Burst Set: '..tostring(MagicBurst)..'"')
  889.     elseif command == "ToggleIdle" then
  890.         if IdleMode=="Kite" then
  891.             IdleMode = "DT"
  892.         elseif IdleMode=="DT" then
  893.             IdleMode = "Refresh"
  894.         elseif IdleMode=="Refresh" then
  895.             IdleMode = "Move"
  896.         else
  897.             IdleMode = "Kite"
  898.         end
  899.         send_command('console_echo "Idle Mode: '..IdleMode..'"')
  900.     elseif command:lower()=='weaponlock' then
  901.         WeaponLock = WeaponLock==false
  902.         send_command('console_echo "Weapon Lock: '..tostring(WeaponLock)..'"')
  903.         if WeaponLock then
  904.             --equip({main="Opashoro", sub="Enki Strap"})
  905.             equip({main="Opashoro", sub="Khonsu"})
  906.             disable('main', 'sub', 'range')
  907.         else
  908.             enable('main', 'sub', 'range')
  909.         end
  910.     elseif command:lower()=="th" then
  911.         TreasureHunter = TreasureHunter==false
  912.         send_command('console_echo "Treasure Hunter Mode: '..tostring(TreasureHunter)..'"')
  913.     elseif command:lower()=="low" then
  914.         LowDmg = LowDmg==false
  915.         send_command('console_echo "Low Damage T1 Set: '..tostring(LowDmg)..'"')
  916.     elseif command:lower()=="occult" then
  917.         OccultMode = OccultMode==false
  918.         send_command('console_echo "Occult Acumen Mode: '..tostring(OccultMode)..'"')
  919.     elseif command:lower()=="regen" then
  920.         RegenPotency = RegenPotency==false
  921.         send_command('console_echo "Regen Potency Mode: '..tostring(RegenPotency)..'"')
  922.     elseif command:lower()=="vagary" then
  923.         VagaryMode = VagaryMode==false
  924.         send_command('console_echo "Vagary Mode: '..tostring(VagaryMode)..'"')
  925.     elseif command:lower()=="lightart" then
  926.         send_command('input /ja "Light Arts" <me>;input /ja "Addendum: White" <me>')
  927.     elseif command:lower()=="darkart" then
  928.         send_command('input /ja "Dark Arts" <me>;input /ja "Addendum: Black" <me>')
  929.     end
  930.     idle()
  931. end
  932.  
  933. -- Automatically changes Idle gears if you zone in or out of town --
  934. windower.register_event('zone change', function()
  935.     idle()
  936. end)
  937.  
  938. -- Will make gears change the seconds you use Sublimation or the second it gets completed --
  939. function buff_change(buff,gain)
  940.     if midaction() then
  941.         return
  942.     end
  943.     if buff=="Sneak" or buff=="Invisible" or buff=="Sublimation: Activated" then
  944.         idle()
  945.     end
  946. end
  947.  
  948. function idle()
  949.     --if TownIdle:contains(world.area:lower()) then
  950.     --  return
  951.     --end
  952.     equipSet = sets.aftercast
  953.     if IdleMode=='Auto' then
  954.         if player.mpp < 50 then
  955.             equipSet = sets.aftercast.Sub50
  956.         else
  957.             equipSet = sets.aftercast.DT
  958.         end
  959.     elseif equipSet[IdleMode] then
  960.         equipSet = equipSet[IdleMode]
  961.     end
  962.     if pet.isvalid then
  963.         if equipSet[pet.name] then
  964.             equipSet = equipSet[pet.name]
  965.         elseif equipSet["Pet"] then
  966.             equipSet = equipSet["Pet"]
  967.         end
  968.     end
  969.     if player.mpp < 50 and equipSet['Sub50'] then
  970.         equipSet = equipSet['Sub50']
  971.     end
  972.     equip(equipSet)
  973.     if buffactive['Sneak'] or buffactive['Invisible'] or buffactive["Bolter's Roll"] then
  974.         equip({ring2="Shneddick Ring +1"})
  975.     end
  976. end
  977.  
  978. function checkStratagemSets(equipSet)
  979.     if (equipSet) then
  980.         if (buffactive['Immanence'] or Immanence) and equipSet['Immanence'] then
  981.             equipSet = equipSet['Immanence']
  982.         elseif (buffactive['Perpetuance'] or Perpetuance) and equipSet['Perpetuance'] then
  983.             equipSet = equipSet['Perpetuance']
  984.         end
  985.     end
  986.     return equipSet
  987. end
Add Comment
Please, Sign In to add comment