Pergatory

Pergatory's SMN Gearswap

Jan 27th, 2017 (edited)
25,028
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 55.38 KB | None | 0 0
  1. -- Summoner Gearswap Lua by Pergatory - http://pastebin.com/u/pergatory
  2. -- IdleMode determines the set used after casting. You change it with "/console gs c <IdleMode>"
  3. -- The out-of-the-box modes are:
  4. -- Refresh: Uses the most refresh available.
  5. -- DT: A mix of refresh, PDT, and MDT to help when you can't avoid AOE.
  6. -- PetDT: Sacrifice refresh to reduce avatar's damage taken. WARNING: Selenian Cap drops you below 119, use with caution!
  7. -- DD: When melee mode is on and you're engaged, uses TP gear. Otherwise, avatar melee gear.
  8. -- Favor: Uses Beckoner's Horn and max smn skill to boost the favor effect.
  9. -- Zendik: Favor build with the Zendik Robe added in, for Shiva's Favor in manaburn parties. (Shut up, it sounded like a good idea at the time)
  10.  
  11. -- You can add your own modes in the IdleModes list, just make sure to add corresponding sets as well.
  12.  
  13. -- Additional Bindings:
  14. -- F9 - Toggles between a subset of IdleModes (Refresh > DT > PetDT)
  15. -- Ctrl+F9 - Toggles WeaponLock (When enabled, equips Nirvana and Elan+1, then disables those 2 slots from swapping)
  16. --       NOTE: If you don't already have the Nirvana & Elan+1 equipped, YOU WILL LOSE TP
  17.  
  18. -- Additional Commands:
  19. -- /console gs c AccMode - Toggles high-accuracy sets to be used where appropriate.
  20. -- /console gs c ImpactMode - Toggles between using normal magic BP set for Fenrir's Impact or a custom high-skill set for debuffs.
  21. -- /console gs c ForceIlvl - I have this set up to override a few specific slots where I normally use non-ilvl pieces.
  22. -- /console gs c TH - Treasure Hunter toggle. By default, this is only used for Dia, Dia II, and Diaga.
  23. -- /console gs c LagMode - Used to help BPs land in the right gear in high-lag situations.
  24. --                          Sets a timer to swap gear 0.5s after the BP is used rather than waiting for server response.
  25.  
  26. function file_unload()
  27.     send_command('unbind f9')
  28.     send_command('unbind f11')
  29.     send_command('unbind ^f9')
  30.     send_command('unbind ^f10')
  31.     enable("main","sub","range","ammo","head","neck","ear1","ear2","body","hands","ring1","ring2","back","waist","legs","feet")
  32. end
  33.  
  34. function get_sets()
  35.     enable("main","sub","range","ammo","head","neck","ear1","ear2","body","hands","ring1","ring2","back","waist","legs","feet")
  36.     -- Binding shorthand: ^ = Ctrl, ! = Alt, ~ = Shift, @ = Win, # = Apps
  37.     send_command('bind f9 gs c ToggleIdle') -- F9 = Cycle through commonly used idle modes
  38.     send_command('bind f11 gs c ForceIlvl') -- Ctrl+F9 = Toggle ForceIlvl
  39.     send_command('bind ^f9 gs c WeaponLock') -- F10 = Toggle Melee Mode
  40.     send_command('bind ^f10 gs c TH') -- Ctrl+F10 = Treasure Hunter toggle
  41.  
  42.     -- Set your merits here. This is used in deciding between Enticer's Pants or Apogee Slacks +1.
  43.     -- To change in-game, "/console gs c MeteorStrike3" will change Meteor Strike to 3/5 merits.
  44.     -- The damage difference is very minor unless you're over 2400 TP.
  45.     -- It's ok to just always use Enticer's Pants and ignore this section.
  46.     MeteorStrike = 1
  47.     HeavenlyStrike = 1
  48.     WindBlade = 1
  49.     Geocrush = 1
  50.     Thunderstorm = 5
  51.     GrandFall = 1
  52.  
  53.     StartLockStyle = '85'
  54.     IdleMode = 'Refresh'
  55.     AccMode = false
  56.     ImpactDebuff = false
  57.     WeaponLock = false
  58.     TreasureHunter = false
  59.     Empy = false -- Empy toggle for Wards. I use this set in V25s to try for a chance at a ward that lasts the whole fight.
  60.     THSpells = S{"Dia","Dia II","Diaga","Bio","Bio II"} -- If you want Treasure Hunter gear to swap for a spell/ability, add it here.
  61.     ForceIlvl = false
  62.     LagMode = false -- Default LagMode. If you have a lot of lag issues, change to "true".
  63.         -- Warning: LagMode can cause problems if you spam BPs during Conduit because it doesn't trust server packets to say whether the BP is readying or not.
  64.     SacTorque = true -- If you have Sacrifice Torque, this will auto-equip it when slept in order to wake up.
  65.     AutoRemedy = false -- Auto Remedy when using an ability while Paralyzed.
  66.     AutoEcho = false -- Auto Echo Drop when using an ability while Silenced.
  67.     TestMode = false
  68.  
  69.     -- Add idle modes here if you need more options for your sets
  70.     IdleModes = {'Refresh','DT','DD','PetDT','PetDD','Favor','Zendik','MEva','Enspell','Kite','MDB','Move'}
  71.    
  72.     -- Custom idle modes - If you want toggles that change the normal behavior you can add them here.
  73.     -- For example when I lock Opashoro, I lose the perp down of Nirvana and my sets need to compensate, so I added a custom mode for it.
  74.     -- "/console gs c Custom <mode>" to change mode, and append ".<mode>" to the end of the set name to use it in that mode.
  75.     CustomMode = 'None'
  76.     CustomModes = {'None','Opashoro'}
  77.  
  78.     -- ===================================================================================================================
  79.     --      Sets
  80.     -- ===================================================================================================================
  81.  
  82.     -- Base Damage Taken Set - Mainly used when IdleMode is "DT"
  83.     sets.DT_Base = {
  84.         main="Nirvana",
  85.         sub="Oneiros Grip",
  86.         ammo="Epitaph",
  87.         head="Beckoner's Horn +3",
  88.         neck="Summoner's Collar +2",
  89.         ear1="Cath Palug Earring",
  90.         ear2="Beckoner's Earring +1",
  91.         body="Beckoner's Doublet +3",
  92.         hands={ name="Merlinic Dastanas", augments={'Pet: Crit.hit rate +2','"Mag.Atk.Bns."+25','"Refresh"+2','Mag. Acc.+10 "Mag.Atk.Bns."+10',}},
  93.         ring1="Inyanga Ring",
  94.         ring2="Murky Ring",
  95.         back={ name="Campestres's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Mag.Atk.Bns."+10','Phys. dmg. taken-10%',}},
  96.         waist="Carrier's Sash",
  97.         legs="Inyanga Shalwar +2",
  98.         feet="Baayami Sabots +1"
  99.     }
  100.  
  101.     -- Treasure Hunter set. Don't put anything in here except TH+ gear.
  102.     -- It overwrites slots in other sets when TH toggle is on (Ctrl+F10).
  103.     sets.TH = {
  104.         head="Volte Cap",
  105.         waist="Chaac Belt",
  106.         body="Nyame Mail", -- Because otherwise Cohort Cloak and such mess up the swap
  107.         hands="Volte Bracers",
  108.         feet="Volte Boots"
  109.     }
  110.    
  111.     -- This gets equipped automatically when you have Sneak/Invis or Quickening such as from Fleet Wind.
  112.     sets.Movement = {
  113.         ring1="Shneddick Ring +1"
  114.         --feet="Herald's Gaiters"
  115.     }
  116.  
  117.     sets.precast = {}
  118.  
  119.     -- Fast Cast
  120.     sets.precast.FC = {
  121.         main={ name="Grioavolr", augments={'"Fast Cast"+6','INT+2','"Mag.Atk.Bns."+17',}}, -- +10
  122.         sub="Clerisy Strap +1", -- +3
  123.         --ammo="Sapience Orb",
  124.         head="Amalric Coif +1", -- +11
  125.         neck="Orunmila's Torque", -- +5
  126.         ear1="Malignance Earring", -- +4
  127.         ear2="Loquacious Earring", -- +2
  128.         hands={ name="Telchine Gloves", augments={'Mag. Evasion+25','"Fast Cast"+5','Enh. Mag. eff. dur. +10',}},
  129.         body="Inyanga Jubbah +2", -- +14
  130.         ring1="Lebeche Ring",
  131.         ring2="Kishar Ring", -- +4
  132.         back={ name="Campestres's Cape", augments={'Pet: M.Acc.+20 Pet: M.Dmg.+20','Eva.+20 /Mag. Eva.+20','Pet: Mag. Acc.+10','"Fast Cast"+10',}},
  133.         waist="Witful Belt", -- +3
  134.         legs={ name="Merlinic Shalwar", augments={'"Fast Cast"+6','CHR+6','Mag. Acc.+14','"Mag.Atk.Bns."+14',}},
  135.         feet="Regal Pumps +1" -- +5~7
  136.     }
  137.  
  138.     sets.precast["Dispelga"] = set_combine(sets.precast.FC, {
  139.         main="Daybreak",
  140.         sub="Ammurapi Shield"
  141.     })
  142.  
  143.     sets.midcast = {}
  144.  
  145.     -- BP Timer Gear
  146.     -- Use BP Recast Reduction here, along with Avatar's Favor gear.
  147.     -- Avatar's Favor skill tiers are 512 / 575 / 670 / 735.
  148.     sets.midcast.BP = {
  149.         main={ name="Espiritus", augments={'Summoning magic skill +15','Pet: Mag. Acc.+30','Pet: Damage taken -4%',}},
  150.         sub="Vox Grip",
  151.         ammo="Sancus Sachet +1",
  152.         head="Beckoner's Horn +3", -- Always use Beckoner's Horn here.
  153.         neck="Hoxne Torque",
  154.         ear1="Cath Palug Earring",
  155.         ear2="Lodurr Earring",
  156.         body="Baayami Robe +1",
  157.         hands="Baayami Cuffs +1",
  158.         ring1={name="Stikini Ring +1", bag="wardrobe2"},
  159.         ring2="Evoker's Ring",
  160.         back={ name="Conveyance Cape", augments={'Summoning magic skill +5','Pet: Enmity+12','Blood Pact Dmg.+2',}},
  161.         waist="Kobo Obi",
  162.         legs="Baayami Slops +1",
  163.         feet="Baayami Sabots +1"
  164.     }
  165.    
  166.     -- Shock Squall is too fast to swap gear in pet_midcast() or otherwise. It'll generally land in your BP timer set.
  167.     -- I settle for the 670-skill favor tier so I can fit more Pet:MAcc, credit to Papesse of Carbuncle for suggesting this compromise
  168.     sets.midcast.BP["Shock Squall"] = set_combine(sets.midcast.BP, {
  169.         neck="Summoner's Collar +2",
  170.         ear1="Enmerkar Earring",
  171.         ear2="Lugalbanda Earring",
  172.         ring1="Cath Palug Ring",
  173.         ring2="Fickblix's Ring",
  174.         back={ name="Campestres's Cape", augments={'Pet: M.Acc.+20 Pet: M.Dmg.+20','Eva.+20 /Mag. Eva.+20','Pet: Mag. Acc.+10','"Fast Cast"+10',}},
  175.         waist="Incarnation Sash",
  176.     })
  177.  
  178.     -- Elemental Siphon sets. Zodiac Ring is affected by day, Chatoyant Staff by weather, and Twilight Cape by both.
  179.     sets.midcast.Siphon = {
  180.         main={ name="Espiritus", augments={'Summoning magic skill +15','Pet: Mag. Acc.+30','Pet: Damage taken -4%',}},
  181.         sub="Vox Grip",
  182.         ammo="Esper Stone +1",
  183.         head="Baayami Hat +1",
  184.         neck="Hoxne Torque",
  185.         ear1="Cath Palug Earring",
  186.         ear2="Lodurr Earring",
  187.         body="Baayami Robe +1",
  188.         hands="Baayami Cuffs +1",
  189.         ring1={name="Stikini Ring +1", bag="wardrobe2"},
  190.         ring2="Evoker's Ring",
  191.         back={ name="Conveyance Cape", augments={'Summoning magic skill +5','Pet: Enmity+12','Blood Pact Dmg.+2',}},
  192.         waist="Kobo Obi",
  193.         legs="Baayami Slops +1",
  194.         feet="Beckoner's Pigaches +3"
  195.     }
  196.  
  197.     sets.midcast.SiphonZodiac = set_combine(sets.midcast.Siphon, { ring1="Zodiac Ring" })
  198.  
  199.     sets.midcast.SiphonWeather = set_combine(sets.midcast.Siphon, { main="Chatoyant Staff" })
  200.    
  201.     sets.midcast.SiphonWeatherZodiac = set_combine(sets.midcast.SiphonZodiac, { main="Chatoyant Staff" })
  202.  
  203.     -- Summoning Midcast, cap spell interruption if possible (Baayami Robe gives 100, need 2 more)
  204.     -- PDT isn't a bad idea either, so don't overwrite a lot from the DT set it inherits from.
  205.     sets.midcast.Summon = set_combine(sets.DT_Base, {
  206.         body="Baayami Robe +1",
  207.         legs="Bunzi's Pants",
  208.     })
  209.  
  210.     -- If you ever lock your weapon, keep that in mind when building cure potency set.
  211.     sets.midcast.Cure = {
  212.         main="Nirvana",
  213.         sub="Clerisy Strap +1",
  214.         head={ name="Vanya Hood", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
  215.         neck="Orunmila's Torque",
  216.         ear1="Meili Earring",
  217.         ear2="Novia Earring",
  218.         body="Zendik Robe",
  219.         hands={ name="Telchine Gloves", augments={'Mag. Evasion+25','"Fast Cast"+5','Enh. Mag. eff. dur. +10',}},
  220.         ring1="Lebeche Ring",
  221.         ring2="Menelaus's Ring",
  222.         back="Tempered Cape +1",
  223.         waist="Luminary Sash",
  224.         legs="Beckoner's Spats +3",
  225.         feet={ name="Vanya Clogs", augments={'MP+50','"Cure" potency +7%','Enmity-6',}}
  226.     }
  227.  
  228.     sets.midcast.Cursna = set_combine(sets.precast.FC, {
  229.         neck="Debilis Medallion",
  230.         ear1="Meili Earring",
  231.         ear2="Beatific Earring",
  232.         ring1="Menelaus's Ring",
  233.         ring2="Haoma's Ring",
  234.         back="Tempered Cape +1",
  235.         waist="Bishop's Sash",
  236.         feet={ name="Vanya Clogs", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}}
  237.     })
  238.    
  239.     -- Just a standard set for spells that have no set
  240.     sets.midcast.EnmityRecast = set_combine(sets.precast.FC, {
  241.         main="Nirvana",
  242.         ear1="Novia Earring",
  243.         body={ name="Apo. Dalmatica +1", augments={'Summoning magic skill +20','Enmity-6','Pet: Damage taken -4%',}}
  244.     })
  245.  
  246.     -- Strong alternatives: Daybreak and Ammurapi Shield, Cath Crown, Gwati Earring
  247.     sets.midcast.Enfeeble = {
  248.         main="Contemplator +1",
  249.         sub="Enki Strap",
  250.         head=empty,
  251.         neck="Null Loop",
  252.         ear1="Malignance Earring",
  253.         ear2="Dignitary's Earring",
  254.         body="Cohort Cloak +1",
  255.         hands="Inyanga Dastanas +2",
  256.         ring1={name="Stikini Ring +1", bag="wardrobe2"},
  257.         ring2={name="Stikini Ring +1", bag="wardrobe4"},
  258.         back="Aurist's Cape +1",
  259.         waist="Null Belt",
  260.         legs="Inyanga Shalwar +2",
  261.         feet="Skaoi Boots"
  262.     }
  263.     sets.midcast.Enfeeble.INT = set_combine(sets.midcast.Enfeeble, {
  264.         waist="Acuity Belt +1"
  265.     })
  266.  
  267.     sets.midcast.Enhancing = {
  268.         main={ name="Gada", augments={'Enh. Mag. eff. dur. +6','DEX+1','Mag. Acc.+5','"Mag.Atk.Bns."+18','DMG:+4',}},
  269.         sub="Ammurapi Shield",
  270.         head={ name="Telchine Cap", augments={'Mag. Evasion+24','"Conserve MP"+4','Enh. Mag. eff. dur. +10',}},
  271.         neck="Hoxne Torque",
  272.         ear1="Mimir Earring",
  273.         ear2="Andoaa Earring",
  274.         body={ name="Telchine Chas.", augments={'Mag. Evasion+25','"Conserve MP"+5','Enh. Mag. eff. dur. +10',}},
  275.         hands={ name="Telchine Gloves", augments={'Mag. Evasion+25','"Fast Cast"+5','Enh. Mag. eff. dur. +10',}},
  276.         ring1={name="Stikini Ring +1", bag="wardrobe2"},
  277.         ring2={name="Stikini Ring +1", bag="wardrobe4"},
  278.         back="Merciful Cape",
  279.         waist="Embla Sash",
  280.         legs={ name="Telchine Braconi", augments={'Mag. Evasion+25','"Conserve MP"+4','Enh. Mag. eff. dur. +10',}},
  281.         feet={ name="Telchine Pigaches", augments={'Mag. Evasion+24','"Conserve MP"+3','Enh. Mag. eff. dur. +10',}}
  282.     }
  283.  
  284.     sets.midcast.Stoneskin = set_combine(sets.midcast.Enhancing, {
  285.         neck="Nodens Gorget",
  286.         ear2="Earthcry Earring",
  287.         waist="Siegel Sash",
  288.         --legs="Shedir Seraweels"
  289.     })
  290.  
  291.     -- Alternatives: Cath Palug Crown, Amalric gear, Sanctity Necklace, Eschan Stone
  292.     sets.midcast.Nuke = {
  293.         main="Opashoro",
  294.         sub="Enki Strap",
  295.         head="Bunzi's Hat",
  296.         neck="Sibyl Scarf",
  297.         ear1="Malignance Earring",
  298.         ear2="Friomisi Earring",
  299.         body={ name="Amalric Doublet +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
  300.         hands="Bunzi's Gloves",
  301.         ring1="Freke Ring",
  302.         ring2="Metamorph Ring +1",
  303.         back={ name="Campestres's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Mag.Atk.Bns."+10','Phys. dmg. taken-10%',}},
  304.         waist="Acuity Belt +1",
  305.         legs="Bunzi's Pants",
  306.         feet="Bunzi's Sabots"
  307.     }
  308.  
  309.     sets.midcast["Refresh"] = set_combine(sets.midcast.Enhancing, {
  310.         head="Amalric Coif +1",
  311.         waist="Gishdubar Sash"
  312.     })
  313.  
  314.     sets.midcast["Aquaveil"] = set_combine(sets.midcast.Enhancing, {
  315.         main="Vadose Rod",
  316.         head="Amalric Coif +1",
  317.         hands="Regal Cuffs",
  318.         waist="Emphatikos Rope",
  319.     })
  320.  
  321.     sets.midcast["Dispelga"] = set_combine(sets.midcast.Enfeeble, {
  322.         main="Daybreak",
  323.         sub="Ammurapi Shield"
  324.     })
  325.  
  326.     sets.midcast["Mana Cede"] = { hands="Beckoner's Bracers +3" }
  327.  
  328.     sets.midcast["Astral Flow"] = { head="Glyphic Horn +4" }
  329.    
  330.     -- ===================================================================================================================
  331.     --  Weaponskills
  332.     -- ===================================================================================================================
  333.  
  334.     -- Base weaponskill set, used when you don't have a specific set for the weaponskill.
  335.     sets.Weaponskill = {
  336.         head="Nyame Helm",
  337.         neck="Fotia Gorget",
  338.         ear1="Malignance Earring",
  339.         ear2="Crepuscular Earring",
  340.         body="Nyame Mail",
  341.         hands="Nyame Gauntlets",
  342.         ring1="Epaminondas's Ring",
  343.         ring2="Metamorph Ring +1",
  344.         back="Aurist's Cape +1",
  345.         waist="Fotia Belt",
  346.         legs="Nyame Flanchard",
  347.         feet="Nyame Sollerets"
  348.     }
  349.  
  350.     -- It's ok to just target accuracy & magic accuracy for this set, and use it to get AM3, apply defense down, and/or open skillchains.
  351.     sets.midcast["Garland of Bliss"] = set_combine(sets.Weaponskill, {
  352.         neck="Sanctity Necklace",
  353.         ear2="Friomisi Earring",
  354.         waist="Orpheus's Sash",
  355.     })
  356.  
  357.     -- Shattersoul is a good weaponskill for skillchaining with Ifrit. If that's your intent, I suggest stacking accuracy.
  358.     -- If you have access to Oshala, that's generally a better use.
  359.     sets.midcast["Shattersoul"] = set_combine(sets.Weaponskill, {
  360.         head="Beckoner's Horn +3",
  361.         ear1="Zennaroi Earring",
  362.         ear2="Telos Earring",
  363.         body="Tali'ah Manteel +2",
  364.         hands="Beckoner's Bracers +3",
  365.         back={ name="Campestres's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},
  366.         waist="Fotia Belt",
  367.         feet="Beckoner's Pigaches +3"
  368.     })
  369.  
  370.     sets.midcast["Cataclysm"] = set_combine(sets.midcast["Garland of Bliss"], {})
  371.    
  372.     -- Magic accuracy here to land defense down
  373.     sets.midcast["Shell Crusher"] = set_combine(sets.Weaponskill, {
  374.         head="Beckoner's Horn +3",
  375.         neck="Sanctity Necklace",
  376.         ear1="Dignitary's Earring",
  377.         body="Beckoner's Doublet +3",
  378.         hands="Beckoner's Bracers +3",
  379.         ring1={name="Stikini Ring +1", bag="wardrobe2"},
  380.         back={ name="Campestres's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},
  381.         waist="Null Belt",
  382.         feet="Beckoner's Pigaches +3",
  383.     })
  384.    
  385.     sets.midcast["Black Halo"] = set_combine(sets.Weaponskill, {
  386.         neck="Republican Platinum Medal",
  387.         waist="Grunfeld Rope",
  388.     })
  389.    
  390.     sets.midcast["Oshala"] = set_combine(sets.Weaponskill, {
  391.         ear2="Telos Earring",
  392.         neck="Shulmanu Collar",
  393.         ring1="Epaminondas's Ring",
  394.         ring2="Metamorph Ring +1",
  395.         waist="Acuity Belt +1",
  396.     })
  397.  
  398.     sets.pet_midcast = {}
  399.  
  400.     -- Main physical pact set (Volt Strike, Pred Claws, etc.)
  401.     -- Prioritize BP Damage & Pet: Double Attack
  402.     -- Strong Alternatives:
  403.     --   Nirvana, Gridarvor, Apogee Crown/Pumps/Dalmatica, AF body/hands, Empy Feet, Shulmanu Collar (equal to ~R15 Collar),
  404.     --   Merlinic Dastanas or Helios Gloves (both equal to R20 Indomitable), Gelos Earring, Regal Belt, Varar Ring, Kyrene's Earring
  405.     sets.pet_midcast.Physical_BP = {
  406.         main="Opashoro",
  407.         sub="Elan Strap +1",
  408.         ammo="Epitaph",
  409.         head={ name="Helios Band", augments={'Pet: Attack+30 Pet: Rng.Atk.+30','Pet: "Dbl. Atk."+8','Blood Pact Dmg.+7',}},
  410.         neck="Summoner's Collar +2",
  411.         ear1="Lugalbanda Earring",
  412.         ear2="Sroda Earring",
  413.         body="Glyphic Doublet +4",
  414.         hands="Indomitable Gloves",
  415.         ring1="Cath Palug Ring",
  416.         ring2="Fickblix's Ring",
  417.         back={ name="Campestres's Cape", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Eva.+20 /Mag. Eva.+20','Pet: Attack+10 Pet: Rng.Atk.+10','Pet: "Regen"+10','Pet: Damage taken -5%',}},
  418.         waist="Incarnation Sash",
  419.         legs={ name="Apogee Slacks +1", augments={'Pet: STR+20','Blood Pact Dmg.+14','Pet: "Dbl. Atk."+4',}},
  420.         feet={ name="Helios Boots", augments={'Pet: Accuracy+28 Pet: Rng. Acc.+28','Pet: "Dbl. Atk."+8','Blood Pact Dmg.+7',}}
  421.     }
  422.  
  423.     -- Physical Pact AM3 set, less emphasis on Pet:DA (can use the calculator on my Pastebin to fine tune BP Dmg versus Pet:DA)
  424.     -- Indomitable Gloves generally surpasses well-augmented Merlinic only at max rank (R30)
  425.     sets.pet_midcast.Physical_BP_AM3 = set_combine(sets.pet_midcast.Physical_BP, {
  426.         body="Convoker's Doublet +4",
  427.         hands={ name="Merlinic Dastanas", augments={'Pet: Attack+24 Pet: Rng.Atk.+24','Blood Pact Dmg.+9','Pet: STR+10','Pet: Mag. Acc.+7',}},
  428.         ring1="Varar Ring +1",
  429.         feet={ name="Apogee Pumps +1", augments={'MP+80','Pet: Attack+35','Blood Pact Dmg.+8',}}
  430.     })
  431.  
  432.     -- Physical pacts which benefit more from TP than Pet:DA (like Spinning Dive and other pacts you never use except that one time)
  433.     sets.pet_midcast.Physical_BP_TP = set_combine(sets.pet_midcast.Physical_BP, {
  434.         head={ name="Apogee Crown +1", augments={'MP+80','Pet: Attack+35','Blood Pact Dmg.+8',}},
  435.         body="Convoker's Doublet +4",
  436.         hands={ name="Merlinic Dastanas", augments={'Pet: Attack+24 Pet: Rng.Atk.+24','Blood Pact Dmg.+9','Pet: STR+10','Pet: Mag. Acc.+7',}},
  437.         ring1="Varar Ring +1",
  438.         waist="Regal Belt",
  439.         legs="Enticer's Pants",
  440.         feet={ name="Apogee Pumps +1", augments={'MP+80','Pet: Attack+35','Blood Pact Dmg.+8',}}
  441.     })
  442.  
  443.     -- Used for all physical pacts when AccMode is true
  444.     sets.pet_midcast.Physical_BP_Acc = set_combine(sets.pet_midcast.Physical_BP, {
  445.         head={ name="Apogee Crown +1", augments={'MP+80','Pet: Attack+35','Blood Pact Dmg.+8',}},
  446.         ear2="Beckoner's Earring +1",
  447.         body="Convoker's Doublet +4",
  448.         feet="Beckoner's Pigaches +3"
  449.     })
  450.  
  451.     -- Base magic pact set
  452.     -- Prioritize BP Damage & Pet:MAB
  453.     -- Strong Alternatives:
  454.     -- Espiritus, Apogee Crown/Slacks, Adad Amulet (equal to ~R12 Collar), Gelos Earring, Sancus Sachet
  455.     sets.pet_midcast.Magic_BP_Base = {
  456.         main={ name="Grioavolr", augments={'Blood Pact Dmg.+10','Pet: STR+5','Pet: Mag. Acc.+18','Pet: "Mag.Atk.Bns."+25',}},
  457.         sub="Elan Strap +1",
  458.         ammo="Epitaph",
  459.         head="Cath Palug Crown",
  460.         neck="Summoner's Collar +2",
  461.         ear1="Lugalbanda Earring",
  462.         ear2="Beckoner's Earring +1",
  463.         body={ name="Apo. Dalmatica +1", augments={'MP+80','Pet: "Mag.Atk.Bns."+35','Blood Pact Dmg.+8',}},
  464.         hands={ name="Merlinic Dastanas", augments={'Pet: Mag. Acc.+25 Pet: "Mag.Atk.Bns."+25','Blood Pact Dmg.+10','Pet: "Mag.Atk.Bns."+7',}},
  465.         ring1={name="Varar Ring +1", bag="wardrobe2"},
  466.         ring2="Fickblix's Ring",
  467.         back={ name="Campestres's Cape", augments={'Pet: M.Acc.+20 Pet: M.Dmg.+20','Eva.+20 /Mag. Eva.+20','Pet: Mag. Acc.+10','"Fast Cast"+10',}},
  468.         waist="Regal Belt",
  469.         legs="Enticer's Pants",
  470.         feet={ name="Apogee Pumps +1", augments={'MP+80','Pet: "Mag.Atk.Bns."+35','Blood Pact Dmg.+8',}}
  471.     }
  472.    
  473.     -- Some magic pacts benefit more from TP than others.
  474.     -- Note: This set will only be used on merit pacts if you have less than 4 merits.
  475.     --       Make sure to update your merit values at the top of this Lua.
  476.     sets.pet_midcast.Magic_BP_TP = set_combine(sets.pet_midcast.Magic_BP_Base, {
  477.     })
  478.  
  479.     -- NoTP set used when you don't need Enticer's
  480.     sets.pet_midcast.Magic_BP_NoTP = set_combine(sets.pet_midcast.Magic_BP_Base, {
  481.         legs={ name="Apogee Slacks +1", augments={'MP+80','Pet: "Mag.Atk.Bns."+35','Blood Pact Dmg.+8',}}
  482.     })
  483.  
  484.     sets.pet_midcast.Magic_BP_TP_Acc = set_combine(sets.pet_midcast.Magic_BP_TP, {
  485.         head={ name="Merlinic Hood", augments={'Pet: Mag. Acc.+21 Pet: "Mag.Atk.Bns."+21','Blood Pact Dmg.+7','Pet: INT+6','Pet: "Mag.Atk.Bns."+11',}},
  486.         body="Convoker's Doublet +4",
  487.         hands={ name="Merlinic Dastanas", augments={'Pet: Mag. Acc.+29','Blood Pact Dmg.+10','Pet: INT+7','Pet: "Mag.Atk.Bns."+10',}}
  488.     })
  489.  
  490.     sets.pet_midcast.Magic_BP_NoTP_Acc = set_combine(sets.pet_midcast.Magic_BP_NoTP, {
  491.         head={ name="Merlinic Hood", augments={'Pet: Mag. Acc.+21 Pet: "Mag.Atk.Bns."+21','Blood Pact Dmg.+7','Pet: INT+6','Pet: "Mag.Atk.Bns."+11',}},
  492.         body="Convoker's Doublet +4",
  493.         hands={ name="Merlinic Dastanas", augments={'Pet: Mag. Acc.+29','Blood Pact Dmg.+10','Pet: INT+7','Pet: "Mag.Atk.Bns."+10',}}
  494.     })
  495.  
  496.     -- Favor BP Damage above all. Pet:MAB also very strong.
  497.     -- Pet: Accuracy, Attack, Magic Accuracy moderately important.
  498.     -- Strong Alternatives:
  499.     -- Nirvana, Keraunos, Grioavolr, Espiritus, Was, Apogee Crown, Apogee Dalmatica, Adad Amulet
  500.     sets.pet_midcast.FlamingCrush = {
  501.         main="Opashoro",
  502.         sub="Elan Strap +1",
  503.         ammo="Epitaph",
  504.         head="Cath Palug Crown",
  505.         neck="Summoner's Collar +2",
  506.         ear1="Lugalbanda Earring",
  507.         ear2="Beckoner's Earring +1",
  508.         body="Convoker's Doublet +4",
  509.         hands={ name="Merlinic Dastanas", augments={'Pet: Mag. Acc.+25 Pet: "Mag.Atk.Bns."+25','Blood Pact Dmg.+10','Pet: "Mag.Atk.Bns."+7',}},
  510.         ring1={name="Varar Ring +1", bag="wardrobe2"},
  511.         ring2="Fickblix's Ring",
  512.         back={ name="Campestres's Cape", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Eva.+20 /Mag. Eva.+20','Pet: Attack+10 Pet: Rng.Atk.+10','Pet: "Regen"+10','Pet: Damage taken -5%',}},
  513.         waist="Regal Belt",
  514.         legs={ name="Apogee Slacks +1", augments={'MP+80','Pet: "Mag.Atk.Bns."+35','Blood Pact Dmg.+8',}},
  515.         feet={ name="Apogee Pumps +1", augments={'MP+80','Pet: "Mag.Atk.Bns."+35','Blood Pact Dmg.+8',}}
  516.     }
  517.  
  518.     sets.pet_midcast.FlamingCrush_Acc = set_combine(sets.pet_midcast.FlamingCrush, {
  519.         hands={ name="Merlinic Dastanas", augments={'Pet: Accuracy+28 Pet: Rng. Acc.+28','Blood Pact Dmg.+10','Pet: DEX+9','Pet: Mag. Acc.+9','Pet: "Mag.Atk.Bns."+3',}},
  520.         feet="Beckoner's Pigaches +3"
  521.     })
  522.  
  523.     -- Pet: Magic Acc set - Mainly used for debuff pacts like Bitter Elegy
  524.     sets.pet_midcast.MagicAcc_BP = {
  525.         main="Opashoro",
  526.         sub="Vox Grip",
  527.         ammo="Epitaph",
  528.         head="Beckoner's Horn +3",
  529.         neck="Summoner's Collar +2",
  530.         ear1="Enmerkar Earring",
  531.         ear2="Lugalbanda Earring",
  532.         body="Beckoner's Doublet +4",
  533.         hands="Lamassu Mitts +1",
  534.         ring1="Cath Palug Ring",
  535.         ring2="Fickblix's Ring",
  536.         back={ name="Campestres's Cape", augments={'Pet: M.Acc.+20 Pet: M.Dmg.+20','Eva.+20 /Mag. Eva.+20','Pet: Mag. Acc.+10','"Fast Cast"+10',}},
  537.         waist="Incarnation Sash",
  538.         legs="Beckoner's Spats +3",
  539.         feet="Bunzi's Sabots"
  540.     }
  541.  
  542.     sets.pet_midcast.Debuff_Rage = sets.pet_midcast.MagicAcc_BP
  543.  
  544.     -- Pure summoning magic set, mainly used for buffs like Hastega II.
  545.     -- Strong Alternatives:
  546.     -- Andoaa Earring, Summoning Earring, Lamassu Mitts +1, Caller's Pendant
  547.     sets.pet_midcast.SummoningMagic = {
  548.         main={ name="Espiritus", augments={'Summoning magic skill +15','Pet: Mag. Acc.+30','Pet: Damage taken -4%',}},
  549.         sub="Vox Grip",
  550.         ammo="Epitaph",
  551.         head="Baayami Hat +1",
  552.         neck="Hoxne Torque",
  553.         ear1="Cath Palug Earring",
  554.         ear2="Lodurr Earring",
  555.         body="Baayami Robe +1",
  556.         hands="Baayami Cuffs +1",
  557.         ring1={name="Stikini Ring +1", bag="wardrobe2"},
  558.         ring2="Evoker's Ring",
  559.         back={ name="Conveyance Cape", augments={'Summoning magic skill +5','Pet: Enmity+12','Blood Pact Dmg.+2',}},
  560.         waist="Kobo Obi",
  561.         legs="Baayami Slops +1",
  562.         feet="Baayami Sabots +1"
  563.     }
  564.  
  565.     sets.pet_midcast.Buff = set_combine(sets.pet_midcast.SummoningMagic, {})
  566.    
  567.     -- Super optional set. I use it in 15-minute Odyssey fights where a proc at the start would save me from having to reapply it.
  568.     sets.pet_midcast.Buff.Empy = set_combine(sets.pet_midcast.Buff, {
  569.         head="Beckoner's Horn +3", -- 8
  570.         body="Beckoner's Doublet +3", -- 13
  571.         --hands="Beckoner's Bracers +3", -- 33
  572.         legs="Beckoner's Spats +3", -- 5
  573.         feet="Beckoner's Pigaches +3", -- 29
  574.     })
  575.    
  576.     -- Wind's Blessing set. Pet:MND increases potency.
  577.     sets.pet_midcast.Buff_MND = set_combine(sets.pet_midcast.Buff, {
  578.         main="Opashoro",
  579.         neck="Summoner's Collar +2",
  580.         ear2="Beckoner's Earring +1",
  581.         hands="Lamassu Mitts +1",
  582.         back={ name="Campestres's Cape", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Eva.+20 /Mag. Eva.+20','Pet: Attack+10 Pet: Rng.Atk.+10','Pet: "Regen"+10','Pet: Damage taken -5%',}},
  583.         legs="Assiduity Pants +1",
  584.         feet="Bunzi's Sabots"
  585.     })
  586.  
  587.     -- Don't drop Avatar level in this set if you can help it.
  588.     -- You can use Avatar:HP+ gear to increase the HP recovered, but most of it will decrease your own max HP.
  589.     sets.pet_midcast.Buff_Healing = set_combine(sets.pet_midcast.Buff, {
  590.         main="Opashoro",
  591.         back={ name="Campestres's Cape", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Eva.+20 /Mag. Eva.+20','Pet: Attack+10 Pet: Rng.Atk.+10','Pet: "Regen"+10','Pet: Damage taken -5%',}},
  592.         --body={ name="Apo. Dalmatica +1", augments={'Summoning magic skill +20','Enmity-6','Pet: Damage taken -4%',}},
  593.         --feet={ name="Apogee Pumps +1", augments={'MP+80','Pet: "Mag.Atk.Bns."+35','Blood Pact Dmg.+8',}}
  594.     })
  595.  
  596.     -- This set is used for certain blood pacts when ImpactDebuff mode is turned ON. (/console gs c ImpactDebuff)
  597.     -- These pacts are normally used with magic damage gear, but they're also strong debuffs when enhanced by summoning skill.
  598.     -- This set is safe to ignore.
  599.     sets.pet_midcast.Impact = set_combine(sets.pet_midcast.SummoningMagic, {
  600.         main="Opashoro",
  601.         head="Beckoner's Horn +3",
  602.         ear1="Enmerkar Earring",
  603.         ear2="Lugalbanda Earring",
  604.         hands="Lamassu Mitts +1"
  605.     })
  606.    
  607.     -- ===================================================================================================================
  608.     -- Aftercast Sets
  609.     -- ===================================================================================================================
  610.     -- Syntax: sets.aftercast.{IdleMode}.{PetName|Spirit|Avatar}.{PlayerStatus}.{LowMP}.{ForceIlvl}.{CustomMode}
  611.  
  612.     -- Example: sets.aftercast.DT["Cait Sith"] will be a set used when IdleMode is "DT" and you have Cait Sith summoned.
  613.  
  614.     -- This is your default idle gear used as a baseline for most idle sets below. Put gear here and you won't have to repeat it over and over.
  615.     -- I focus on refresh. Strong alternatives: Asteria Mitts, Convoker Horn, Shomonjijoe
  616.     sets.aftercast = {
  617.         main="Mpaca's Staff",
  618.         sub="Oneiros Grip",
  619.         ammo="Epitaph",
  620.         head="Beckoner's Horn +3",
  621.         neck="Loricate Torque +1",
  622.         ear1="Cath Palug Earring",
  623.         ear2="Beckoner's Earring +1",
  624.         body={ name="Apo. Dalmatica +1", augments={'MP+80','Pet: "Mag.Atk.Bns."+35','Blood Pact Dmg.+8',}},
  625.         hands={ name="Merlinic Dastanas", augments={'Pet: Crit.hit rate +2','"Mag.Atk.Bns."+25','"Refresh"+2','Mag. Acc.+10 "Mag.Atk.Bns."+10',}},
  626.         ring1="Shneddick Ring +1",
  627.         --ring1={name="Stikini Ring +1", bag="wardrobe2"},
  628.         ring2="Murky Ring",
  629.         back={ name="Campestres's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','"Mag.Atk.Bns."+10','Phys. dmg. taken-10%',}},
  630.         waist="Regal Belt",
  631.         legs="Assiduity Pants +1",
  632.         --feet="Herald's Gaiters"
  633.         feet="Baayami Sabots +1"
  634.     }
  635.    
  636.     -- sets.aftercast.ForceIlvl = set_combine(sets.aftercast, {
  637.         -- feet="Baayami Sabots +1"
  638.     -- })
  639.     sets.aftercast.LowMP = set_combine(sets.aftercast, {
  640.         waist="Fucho-no-obi"
  641.     })
  642.     -- sets.aftercast.LowMP.ForceIlvl = set_combine(sets.aftercast.LowMP, {
  643.         -- feet="Baayami Sabots +1"
  644.     -- })
  645.    
  646.     -- Main perpetuation set ~~ Strong Alternatives:
  647.     -- Gridarvor, Asteria Mitts, Shomonjijoe, Convoker's Horn, Evans Earring, Isa Belt
  648.     sets.aftercast.Avatar = {
  649.         main="Nirvana",
  650.         sub="Oneiros Grip",
  651.         ammo="Epitaph",
  652.         head="Beckoner's Horn +3",
  653.         neck="Caller's Pendant",
  654.         ear1="Cath Palug Earring",
  655.         ear2="Beckoner's Earring +1",
  656.         body={ name="Apo. Dalmatica +1", augments={'Summoning magic skill +20','Enmity-6','Pet: Damage taken -4%',}},
  657.         hands={ name="Merlinic Dastanas", augments={'Pet: Crit.hit rate +2','"Mag.Atk.Bns."+25','"Refresh"+2','Mag. Acc.+10 "Mag.Atk.Bns."+10',}},
  658.         ring1={name="Stikini Ring +1", bag="wardrobe2"},
  659.         ring2="Evoker's Ring",
  660.         back={ name="Campestres's Cape", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Eva.+20 /Mag. Eva.+20','Pet: Attack+10 Pet: Rng.Atk.+10','Pet: "Regen"+10','Pet: Damage taken -5%',}},
  661.         waist="Lucidity Sash",
  662.         legs="Assiduity Pants +1",
  663.         feet="Baayami Sabots +1"
  664.     }
  665.     -- If you have Fucho and don't need Lucidity Sash for perp down, you can uncomment the belt here to enable using it.
  666.     sets.aftercast.Avatar.LowMP = set_combine(sets.aftercast.Avatar, {
  667.         --waist="Fucho-no-obi"
  668.     })
  669.  
  670.     sets.aftercast.Avatar.Opashoro = set_combine(sets.aftercast.Avatar, {
  671.         body="Beckoner's Doublet +3",
  672.     })
  673.  
  674.     -- Damage Taken set
  675.     sets.aftercast.DT = set_combine(sets.DT_Base, {
  676.     })
  677.  
  678.     sets.aftercast.DT.Avatar = set_combine(sets.aftercast.DT, {
  679.         waist="Isa Belt"
  680.     })
  681.    
  682.     sets.aftercast.DT.Avatar.Opashoro = set_combine(sets.aftercast.DT.Avatar, {
  683.         feet="Beckoner's Pigaches +3"
  684.     })
  685.  
  686.     -- You aren't likely to be in PetDT mode without an avatar for long, but I default to the DT set in that scenario.
  687.     sets.aftercast.PetDT = set_combine(sets.aftercast.DT, { })
  688.  
  689.     -- Pet:DT build. Equipped when IdleMode is "PetDT".
  690.     -- Strong alternatives:
  691.     -- Selenian Cap, Enticer's Pants, Enmerkar Earring, Handler's Earring, Rimeice Earring, Tali'ah Seraweels
  692.     sets.aftercast.PetDT.Avatar = {
  693.         main="Nirvana",
  694.         sub="Oneiros Grip",
  695.         ammo="Epitaph",
  696.         head={ name="Apogee Crown +1", augments={'Pet: Accuracy+25','"Avatar perpetuation cost"+7','Pet: Damage taken -4%',}},
  697.         neck="Summoner's Collar +2",
  698.         ear1="Enmerkar Earring",
  699.         ear2="Beckoner's Earring +1",
  700.         body={ name="Apo. Dalmatica +1", augments={'Summoning magic skill +20','Enmity-6','Pet: Damage taken -4%',}},
  701.         hands={ name="Telchine Gloves", augments={'Pet: DEF+17','Pet: "Regen"+3','Pet: Damage taken -4%',}},
  702.         --ring1="Thurandaut Ring +1",
  703.         ring1={name="Stikini Ring +1", bag="wardrobe2"},
  704.         ring2={name="Stikini Ring +1", bag="wardrobe4"},
  705.         back={ name="Campestres's Cape", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Eva.+20 /Mag. Eva.+20','Pet: Attack+10 Pet: Rng.Atk.+10','Pet: "Regen"+10','Pet: Damage taken -5%',}},
  706.         waist="Isa Belt",
  707.         legs="Bunzi's Pants",
  708.         feet={ name="Telchine Pigaches", augments={'Pet: DEF+14','Pet: "Regen"+3','Pet: Damage taken -4%',}}
  709.     }
  710.  
  711.     -- ===================================================================================================================
  712.     -- Sets below this point are extremely niche. If just getting set up, this is a good stopping point to save for later.
  713.    
  714.     -- Kite set. I just use this to gather up mobs in Escha Ru'Aun for merit farming.
  715.     sets.aftercast.Kite = set_combine(sets.aftercast.DT, sets.Movement)
  716.     sets.aftercast.Kite.Avatar = set_combine(sets.aftercast.DT.Avatar, sets.Movement)
  717.    
  718.     sets.aftercast.Move = set_combine(sets.aftercast, sets.Movement)
  719.     sets.aftercast.Move.Avatar = set_combine(sets.aftercast.Avatar, sets.Movement)
  720.  
  721.     -- These 2 sets are for when you're in DD mode but not actually engaged to something.
  722.     sets.aftercast.DD = set_combine(sets.aftercast, {
  723.         head="Null Masque",
  724.     })
  725.  
  726.     sets.aftercast.DD.Avatar = set_combine(sets.aftercast.Avatar, {
  727.         head="Null Masque",
  728.     })
  729.     sets.aftercast.DD.Avatar.Opashoro = set_combine(sets.aftercast.DD.Avatar, {
  730.         body="Beckoner's Doublet +3",
  731.     })
  732.  
  733.     -- Main melee set
  734.     -- If you want specific things equipped only when an avatar is out, modify "sets.aftercast.DD.Avatar.Engaged" below.
  735.     sets.aftercast.DD.Engaged = set_combine(sets.aftercast.DD.Avatar, {
  736.         --head="Beckoner's Horn +3",
  737.         head="Bunzi's Hat",
  738.         neck="Shulmanu Collar",
  739.         ear1="Telos Earring",
  740.         ear2="Cessance Earring",
  741.         body="Tali'ah Manteel +2",
  742.         hands="Bunzi's Gloves",
  743.         ring1={ name="Chirich Ring +1", bag="wardrobe2" },
  744.         ring2="Fickblix's Ring",
  745.         back={ name="Campestres's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},
  746.         waist="Cetl Belt",
  747.         legs="Nyame Flanchard",
  748.         feet="Beckoner's Pigaches +3"
  749.     })
  750.    
  751.     -- Main melee set when engaged with an avatar out. Usually doesn't have many changes from the above set.
  752.     sets.aftercast.DD.Avatar.Engaged = set_combine(sets.aftercast.DD.Engaged, {
  753.         ear2="Sroda Earring"
  754.     })
  755.    
  756.     sets.aftercast.DD.Avatar.Engaged.Opashoro = set_combine(sets.aftercast.DD.Engaged, {
  757.         body="Beckoner's Doublet +3",
  758.     })
  759.  
  760.     sets.aftercast.Enspell = set_combine(sets.aftercast, { })
  761.     sets.aftercast.Enspell.Avatar = set_combine(sets.aftercast.Avatar, { })
  762.    
  763.     -- Enspell set I mainly use for Peach Power. Load up on accuracy & magic accuracy. Doesn't seem to help much honestly, it's a work in progress.
  764.     sets.aftercast.Enspell.Engaged = set_combine(sets.aftercast.DD.Avatar.Engaged, {
  765.         ear1="Crepuscular Earring",
  766.         ear2="Beckoner's Earring +1",
  767.         body="Beckoner's Doublet +3", --replaces feet for perp cost
  768.         ring1="Metamorph Ring +1",
  769.         waist="Orpheus's Sash",
  770.         feet="Nyame Sollerets",
  771.     })
  772.     sets.aftercast.Enspell.Avatar.Engaged = set_combine(sets.aftercast.Enspell.Engaged, {})
  773.    
  774.     sets.aftercast.Favor = set_combine(sets.aftercast, { })
  775.    
  776.     -- Used when IdleMode is "Favor" to maximize avatar's favor effect.
  777.     -- Skill tiers are 512 / 575 / 670 / 735
  778.     sets.aftercast.Favor.Avatar = set_combine(sets.aftercast.Avatar, {
  779.         head="Beckoner's Horn +3",
  780.         --ear2="Lodurr Earring",
  781.         body="Beckoner's Doublet +3",
  782.         hands="Baayami Cuffs +1",
  783.         legs="Baayami Slops +1",
  784.         feet="Baayami Sabots +1"
  785.     })
  786.  
  787.     sets.aftercast.PetDD = set_combine(sets.aftercast, { })
  788.  
  789.     -- Avatar Melee set. You really don't need this set. It's only here because I can't bring myself to throw it away.
  790.     sets.aftercast.PetDD.Avatar = set_combine(sets.aftercast.Avatar, {
  791.         ear2="Rimeice Earring",
  792.         body="Glyphic Doublet +4",
  793.         hands={ name="Helios Gloves", augments={'Pet: Accuracy+22 Pet: Rng. Acc.+22','Pet: "Dbl. Atk."+8','Pet: Haste+6',}},
  794.         ring2="Fickblix's Ring",
  795.         waist="Klouskap Sash",
  796.         feet={ name="Helios Boots", augments={'Pet: Accuracy+21 Pet: Rng. Acc.+21','Pet: "Dbl. Atk."+8','Pet: Haste+6',}}
  797.     })
  798.  
  799.     sets.aftercast.Zendik = set_combine(sets.aftercast, {
  800.         body="Zendik Robe"
  801.     })
  802.     -- sets.aftercast.Zendik.ForceIlvl = set_combine(sets.aftercast.Zendik, {
  803.         -- feet="Baayami Sabots +1"
  804.     -- })
  805.     sets.aftercast.Zendik.LowMP = set_combine(sets.aftercast.Zendik, {
  806.         waist="Fucho-no-obi"
  807.     })
  808.     -- sets.aftercast.Zendik.LowMP.ForceIlvl = set_combine(sets.aftercast.Zendik.LowMP, {
  809.         -- feet="Baayami Sabots +1"
  810.     -- })
  811.  
  812.     sets.aftercast.Zendik.Avatar = set_combine(sets.aftercast.Favor.Avatar, {
  813.         body="Zendik Robe"
  814.     })
  815.  
  816.     -- I use this mode for Mewing Lullaby duty in V20+ Gaol. Heaviest defense possible, less attention toward MP management.
  817.     sets.aftercast.MEva = set_combine(sets.aftercast.DT, {
  818.         sub="Khonsu",
  819.         hands="Nyame Gauntlets",
  820.         feet="Baayami Sabots +1"
  821.     })
  822.  
  823.     sets.aftercast.MEva.Avatar = set_combine(sets.aftercast.MEva, {
  824.         ear1="Enmerkar Earring",
  825.         waist="Isa Belt",
  826.         back={ name="Campestres's Cape", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Eva.+20 /Mag. Eva.+20','Pet: Attack+10 Pet: Rng.Atk.+10','Pet: "Regen"+10','Pet: Damage taken -5%',}},
  827.     })
  828.    
  829.     -- MDB set for Limbus bosses
  830.     sets.aftercast.MDB = set_combine(sets.aftercast.DT, {
  831.         body="Adamantite Armor",
  832.         hands="Bunzi's Gloves",
  833.         ring1="Shneddick Ring +1",
  834.         waist="Null Belt",
  835.         feet="Beckoner's Pigaches +3",
  836.     })
  837.  
  838.     sets.aftercast.MDB.Avatar = set_combine(sets.aftercast.MDB, {
  839.         back={ name="Campestres's Cape", augments={'Pet: Acc.+20 Pet: R.Acc.+20 Pet: Atk.+20 Pet: R.Atk.+20','Eva.+20 /Mag. Eva.+20','Pet: Attack+10 Pet: Rng.Atk.+10','Pet: "Regen"+10','Pet: Damage taken -5%',}},
  840.     })
  841.  
  842.     -- Idle set used when you have a spirit summoned.
  843.     -- Perp Down caps at 7. Glyphic Spats will make them cast more frequently, caps at ~20 seconds.
  844.     sets.aftercast.Spirit = set_combine(sets.aftercast.Avatar, {
  845.         ring1={name="Stikini Ring +1", bag="wardrobe2"},
  846.         ring2={name="Stikini Ring +1", bag="wardrobe4"},
  847.         waist="Fucho-no-obi",
  848.         legs="Glyphic Spats +4",
  849.     })
  850.     sets.aftercast.Favor.Spirit = set_combine(sets.aftercast.Spirit, {
  851.     })
  852.     sets.aftercast.Zendik.Spirit = set_combine(sets.aftercast.Favor.Spirit, {
  853.     })
  854.    
  855.     sets.aftercast.Town = set_combine(sets.aftercast.Avatar, {
  856.         main="Opashoro",
  857.         sub="Oneiros Grip",
  858.         ammo="Sancus Sachet +1",
  859.         head="Null Masque",
  860.         neck="Summoner's Collar +2",
  861.         hands="Indomitable Gloves",
  862.         ring1="Shneddick Ring +1",
  863.         ring2="Fickblix's Ring",
  864.         waist="Ninurta's Sash",
  865.         legs="Bunzi's Pants",
  866.     })
  867.    
  868.     sets.Test = set_combine(sets.pet_midcast.Magic_BP_NoTP, {
  869.         hands={ name="Merlinic Dastanas", augments={'Pet: Attack+16 Pet: Rng.Atk.+16','Blood Pact Dmg.+10','Pet: STR+9','Pet: "Mag.Atk.Bns."+5',}},
  870.         waist="Incarnation Sash",
  871.         feet="Beckoner's Pigaches +3"
  872.     })
  873.  
  874.     -- ===================================================================================================================
  875.     --      End of Sets
  876.     -- ===================================================================================================================
  877.  
  878.     Buff_BPs_Duration = S{'Shining Ruby','Aerial Armor','Frost Armor','Rolling Thunder','Crimson Howl','Lightning Armor','Ecliptic Growl','Glittering Ruby','Earthen Ward','Hastega','Noctoshield','Ecliptic Howl','Dream Shroud','Earthen Armor','Fleet Wind','Inferno Howl','Heavenward Howl','Hastega II','Soothing Current','Crystal Blessing','Katabatic Blades'}
  879.     Buff_BPs_Healing = S{'Healing Ruby','Healing Ruby II','Whispering Wind','Spring Water'}
  880.     Buff_BPs_MND = S{"Wind's Blessing"}
  881.     Debuff_BPs = S{'Mewing Lullaby','Eerie Eye','Lunar Cry','Lunar Roar','Nightmare','Pavor Nocturnus','Ultimate Terror','Somnolence','Slowga','Tidal Roar','Diamond Storm','Sleepga','Shock Squall','Bitter Elegy','Lunatic Voice'}
  882.     Debuff_Rage_BPs = S{'Moonlit Charge','Tail Whip'}
  883.  
  884.     Magic_BPs_NoTP = S{'Holy Mist','Nether Blast','Aerial Blast','Searing Light','Diamond Dust','Earthen Fury','Zantetsuken','Tidal Wave','Judgment Bolt','Inferno','Howling Moon','Ruinous Omen','Night Terror','Thunderspark','Tornado II','Sonic Buffet'}
  885.     Magic_BPs_TP = S{'Impact','Conflag Strike','Level ? Holy','Lunar Bay'}
  886.     Merit_BPs = S{'Meteor Strike','Geocrush','Grand Fall','Wind Blade','Heavenly Strike','Thunderstorm'}
  887.     Physical_BPs_TP = S{'Rock Buster','Mountain Buster','Crescent Fang','Spinning Dive','Roundhouse'}
  888.    
  889.     ZodiacElements = S{'Fire','Earth','Water','Wind','Ice','Lightning'}
  890.  
  891.     TownIdle = S{"windurst woods","windurst waters","windurst walls","port windurst","bastok markets","bastok mines","port bastok","southern san d'oria","northern san d'oria","port san d'oria","upper jeuno","lower jeuno","port jeuno","ru'lude gardens","norg","kazham","tavnazian safehold","rabao","selbina","mhaura","aht urhgan whitegate","nashmau","western adoulin","eastern adoulin","chocobo circuit"}
  892.     --Salvage = S{"Bhaflau Remnants","Zhayolm Remnants","Arrapago Remnants","Silver Sea Remnants"}
  893.  
  894.     -- Select initial macro set and set lockstyle
  895.     -- This section likely requires changes or removal if you aren't Pergatory
  896.     -- NOTE: This doesn't change your macro set for you during play, your macros have to do that. This is just for when the Lua is loaded.
  897.     if pet.isvalid then
  898.         if pet.name=='Fenrir' then
  899.             send_command('input /macro book 10;wait .1;input /macro set 2;wait 3;input /lockstyleset '..StartLockStyle)
  900.         elseif pet.name=='Ifrit' then
  901.             send_command('input /macro book 10;wait .1;input /macro set 3;wait 3;input /lockstyleset '..StartLockStyle)
  902.         elseif pet.name=='Titan' then
  903.             send_command('input /macro book 10;wait .1;input /macro set 4;wait 3;input /lockstyleset '..StartLockStyle)
  904.         elseif pet.name=='Leviathan' then
  905.             send_command('input /macro book 10;wait .1;input /macro set 5;wait 3;input /lockstyleset '..StartLockStyle)
  906.         elseif pet.name=='Garuda' then
  907.             send_command('input /macro book 10;wait .1;input /macro set 6;wait 3;input /lockstyleset '..StartLockStyle)
  908.         elseif pet.name=='Shiva' then
  909.             send_command('input /macro book 10;wait .1;input /macro set 7;wait 3;input /lockstyleset '..StartLockStyle)
  910.         elseif pet.name=='Ramuh' then
  911.             send_command('input /macro book 10;wait .1;input /macro set 8;wait 3;input /lockstyleset '..StartLockStyle)
  912.         elseif pet.name=='Diabolos' then
  913.             send_command('input /macro book 10;wait .1;input /macro set 9;wait 3;input /lockstyleset '..StartLockStyle)
  914.         elseif pet.name=='Cait Sith' then
  915.             send_command('input /macro book 11;wait .1;input /macro set 2;wait 3;input /lockstyleset '..StartLockStyle)
  916.         elseif pet.name=='Siren' then
  917.             send_command('input /macro book 11;wait .1;input /macro set 4;wait 3;input /lockstyleset '..StartLockStyle)
  918.         end
  919.     else
  920.         -- Macro set for no avatar out (usually the case unless you're reloading Gearswap in the field)
  921.         send_command('input /macro book 10;wait .1;input /macro set 1;wait 3;input /lockstyleset '..StartLockStyle)
  922.     end
  923.     -- End macro set / lockstyle section
  924. end
  925.  
  926. -- ===================================================================================================================
  927. --      Gearswap rules below this point - Modify at your own peril
  928. -- ===================================================================================================================
  929.  
  930. function pretarget(spell,action)
  931.     if not buffactive['Muddle'] then
  932.         -- Auto Remedy --
  933.         if AutoRemedy and (spell.action_type == 'Magic' or spell.type == 'JobAbility') then
  934.             if buffactive['Paralysis'] or (buffactive['Silence'] and not AutoEcho) then
  935.                 cancel_spell()
  936.                 send_command('input /item "Remedy" <me>')
  937.             end
  938.         end
  939.         -- Auto Echo Drop --
  940.         if AutoEcho and spell.action_type == 'Magic' and buffactive['Silence'] then
  941.             cancel_spell()
  942.             send_command('input /item "Echo Drops" <me>')
  943.         end
  944.     end
  945. end
  946.  
  947. function precast(spell)
  948.     if (pet.isvalid and pet_midaction() and not spell.type=="SummonerPact") or spell.type=="Item" then
  949.         -- Do not swap if pet is mid-action. I added the type=SummonerPact check because sometimes when the avatar
  950.         -- dies mid-BP, pet.isvalid and pet_midaction() continue to return true for a brief time.
  951.         return
  952.     end
  953.     -- Spell fast cast
  954.     if sets.precast[spell.english] then
  955.         equip(sets.precast[spell.english])
  956.     elseif spell.action_type=="Magic" then
  957.         if spell.name=="Stoneskin" then
  958.             equip(sets.precast.FC,{waist="Siegel Sash"})
  959.         else
  960.             equip(sets.precast.FC)
  961.         end
  962.     end
  963. end
  964.  
  965. function midcast(spell)
  966.     if (pet.isvalid and pet_midaction()) or spell.type=="Item" then
  967.         return
  968.     end
  969.     -- BP Timer gear needs to swap here
  970.     if (spell.type=="BloodPactWard" or spell.type=="BloodPactRage") then
  971.         if not buffactive["Astral Conduit"] then
  972.             equipSet = sets.midcast.BP
  973.             if equipSet[spell.name] then
  974.                 equipSet = equipSet[spell.name]
  975.             end
  976.             equip(equipSet)
  977.         end
  978.         -- If lag compensation mode is on, set up a timer to equip the BP gear.
  979.         if LagMode then
  980.             send_command('wait 0.5;gs c EquipBP '..spell.name)
  981.         end
  982.     -- Spell Midcast & Potency Stuff
  983.     elseif sets.midcast[spell.english] then
  984.         equip(sets.midcast[spell.english])
  985.     elseif spell.name=="Elemental Siphon" then
  986.         if pet.element==world.day_element and ZodiacElements:contains(pet.element) then
  987.             if pet.element==world.weather_element then
  988.                 equip(sets.midcast.SiphonWeatherZodiac)
  989.             else
  990.                 equip(sets.midcast.SiphonZodiac)
  991.             end
  992.         else
  993.             if pet.element==world.weather_element then
  994.                 equip(sets.midcast.SiphonWeather)
  995.             else
  996.                 equip(sets.midcast.Siphon)
  997.             end
  998.         end
  999.     elseif spell.type=="SummonerPact" then
  1000.         equip(sets.midcast.Summon)
  1001.     elseif string.find(spell.name,"Cure") or string.find(spell.name,"Curaga") then
  1002.         equip(sets.midcast.Cure)
  1003.     elseif string.find(spell.name,"Protect") or string.find(spell.name,"Shell") then
  1004.         equip(sets.midcast.Enhancing,{ring2="Sheltered Ring"})
  1005.     elseif spell.skill=="Enfeebling Magic" then
  1006.         equip(sets.midcast.Enfeeble)
  1007.     elseif spell.skill=="Enhancing Magic" then
  1008.         equip(sets.midcast.Enhancing)
  1009.     elseif spell.skill=="Elemental Magic" then
  1010.         equip(sets.midcast.Nuke)
  1011.     elseif spell.action_type=="Magic" then
  1012.         equip(sets.midcast.EnmityRecast)
  1013.     elseif spell.type=="WeaponSkill" then
  1014.         equip(sets.Weaponskill)
  1015.     else
  1016.         idle()
  1017.     end
  1018.     -- Treasure Hunter
  1019.     if TreasureHunter and THSpells:contains(spell.name) then
  1020.         equip(sets.TH)
  1021.     end
  1022.     -- Auto-cancel existing buffs
  1023.     if spell.name=="Stoneskin" and buffactive["Stoneskin"] then
  1024.         windower.send_command('cancel 37;')
  1025.     elseif spell.name=="Sneak" and buffactive["Sneak"] and spell.target.type=="SELF" then
  1026.         windower.send_command('cancel 71;')
  1027.     elseif spell.name=="Utsusemi: Ichi" and buffactive["Copy Image"] then
  1028.         windower.send_command('wait 1;cancel 66;')
  1029.     end
  1030. end
  1031.  
  1032. function aftercast(spell)
  1033.     if pet_midaction() or spell.type=="Item" then
  1034.         return
  1035.     end
  1036.     if not string.find(spell.type,"BloodPact") then
  1037.         idle()
  1038.     end
  1039. end
  1040.  
  1041. function pet_change(pet,gain)
  1042.     if (not (gain and pet_midaction())) then
  1043.         idle()
  1044.     end
  1045. end
  1046.  
  1047. function status_change(new,old)
  1048.     if not midaction() and not pet_midaction() then
  1049.         idle()
  1050.     end
  1051. end
  1052.  
  1053. function buff_change(name,gain)
  1054.     if name=="quickening" and not pet_midaction() then
  1055.         idle()
  1056.     end
  1057.     if SacTorque and name=="sleep" and gain and pet.isvalid then
  1058.         equip({neck="Sacrifice Torque"})
  1059.         disable("neck")
  1060.         if buffactive["Stoneskin"] then
  1061.             windower.send_command('cancel 37;')
  1062.         end
  1063.     end
  1064.     if SacTorque and name=="sleep" and not gain then
  1065.         enable("neck")
  1066.     end
  1067. end
  1068.  
  1069. function pet_midcast(spell)
  1070.     if not LagMode then
  1071.         equipBPGear(spell.name)
  1072.     end
  1073. end
  1074.  
  1075. function pet_aftercast(spell)
  1076.     idle()
  1077. end
  1078.  
  1079. function equipBPGear(spell)
  1080.     if spell=="Shock Squall" then
  1081.         return -- Don't bother for Shock Squall, it already went off by the time we get here
  1082.     end
  1083.     if spell=="Perfect Defense" then
  1084.         equip(sets.pet_midcast.SummoningMagic)
  1085.     elseif Debuff_BPs:contains(spell) then
  1086.         equip(sets.pet_midcast.MagicAcc_BP)
  1087.     elseif Buff_BPs_Healing:contains(spell) then
  1088.         equip(sets.pet_midcast.Buff_Healing)
  1089.     elseif Buff_BPs_Duration:contains(spell) then
  1090.         if Empy then
  1091.             equip(sets.pet_midcast.Buff.Empy)
  1092.         else
  1093.             equip(sets.pet_midcast.Buff)
  1094.         end
  1095.     elseif Buff_BPs_MND:contains(spell) then
  1096.         equip(sets.pet_midcast.Buff_MND)
  1097.     elseif spell=="Flaming Crush" then
  1098.         if AccMode then
  1099.             equip(sets.pet_midcast.FlamingCrush_Acc)
  1100.         else
  1101.             equip(sets.pet_midcast.FlamingCrush)
  1102.         end
  1103.     elseif ImpactDebuff and (spell=="Impact" or spell=="Conflag Strike") then
  1104.         equip(sets.pet_midcast.Impact)
  1105.     elseif Magic_BPs_NoTP:contains(spell) then
  1106.         if AccMode then
  1107.             equip(sets.pet_midcast.Magic_BP_NoTP_Acc)
  1108.         else
  1109.             equip(sets.pet_midcast.Magic_BP_NoTP)
  1110.         end
  1111.     elseif Magic_BPs_TP:contains(spell) or string.find(spell," II") or string.find(spell," IV") then
  1112.         if AccMode then
  1113.             equip(sets.pet_midcast.Magic_BP_TP_Acc)
  1114.         else
  1115.             equip(sets.pet_midcast.Magic_BP_TP)
  1116.         end
  1117.     elseif Merit_BPs:contains(spell) then
  1118.         if AccMode then
  1119.             equip(sets.pet_midcast.Magic_BP_TP_Acc)
  1120.         elseif spell=="Meteor Strike" and MeteorStrike>4 then
  1121.             equip(sets.pet_midcast.Magic_BP_NoTP)
  1122.         elseif spell=="Geocrush" and Geocrush>4 then
  1123.             equip(sets.pet_midcast.Magic_BP_NoTP)
  1124.         elseif spell=="Grand Fall" and GrandFall>4 then
  1125.             equip(sets.pet_midcast.Magic_BP_NoTP)
  1126.         elseif spell=="Wind Blade" and WindBlade>4 then
  1127.             equip(sets.pet_midcast.Magic_BP_NoTP)
  1128.         elseif spell=="Heavenly Strike" and HeavenlyStrike>4 then
  1129.             equip(sets.pet_midcast.Magic_BP_NoTP)
  1130.         elseif spell=="Thunderstorm" and Thunderstorm>4 then
  1131.             equip(sets.pet_midcast.Magic_BP_NoTP)
  1132.         else
  1133.             equip(sets.pet_midcast.Magic_BP_TP)
  1134.         end
  1135.     elseif Debuff_Rage_BPs:contains(spell) then
  1136.         equip(sets.pet_midcast.Debuff_Rage)
  1137.     else
  1138.         if string.find(pet.name,'Spirit') then
  1139.             return
  1140.         elseif AccMode then
  1141.             equip(sets.pet_midcast.Physical_BP_Acc)
  1142.         elseif Physical_BPs_TP:contains(spell) then
  1143.             equip(sets.pet_midcast.Physical_BP_TP)
  1144.         elseif buffactive["Aftermath: Lv.3"] and not CustomMode=="Opashoro" then
  1145.             equip(sets.pet_midcast.Physical_BP_AM3)
  1146.         else
  1147.             equip(sets.pet_midcast.Physical_BP)
  1148.         end
  1149.     end
  1150.     if TestMode then
  1151.         equip(sets.Test)
  1152.     end
  1153.     -- Custom Timers
  1154.     if spell=="Mewing Lullaby" and string.find(world.area,"Walk of Echoes %[P") then
  1155.         send_command('timers create "Mewing Resist: can go @ 30s" 60 down') -- In Gaol, underperforms if used every 20s. 60s is full potency.
  1156.         -- Tip: I found it was best to go after 30 seconds. It doesn't fully drain them but you can't afford to wait the full 60.
  1157.         -- Use the time between this to use BP:Rages for additional damage! They feed no TP, as long as your avatar doesn't attack.
  1158.     end
  1159. end
  1160.  
  1161. -- This command is called whenever you input "gs c <command>"
  1162. function self_command(command)
  1163.     if string.sub(command,1,7)=="EquipBP" then
  1164.         equipBPGear(string.sub(command,9,string.len(command)))
  1165.         return
  1166.     end
  1167.  
  1168.     is_valid = command:lower()=="idle"
  1169.  
  1170.     for _, v in ipairs(IdleModes) do
  1171.         if command:lower()==v:lower() then
  1172.             IdleMode = v
  1173.             send_command('console_echo "Idle Mode: ['..IdleMode..']"')
  1174.             is_valid = true
  1175.         end
  1176.     end
  1177.     if not is_valid then
  1178.         if string.sub(command,1,6):lower()=="custom" then
  1179.             for _, v in ipairs(CustomModes) do
  1180.                 if string.sub(command,8,string.len(command)):lower()==v:lower() then
  1181.                     CustomMode = v
  1182.                     send_command('console_echo "Custom Mode: ['..CustomMode..']"')
  1183.                     is_valid = true
  1184.                 end
  1185.             end
  1186.         elseif command:lower()=="accmode" then
  1187.             AccMode = AccMode==false
  1188.             is_valid = true
  1189.             send_command('console_echo "AccMode: '..tostring(AccMode)..'"')
  1190.         elseif command:lower()=="impactmode" then
  1191.             ImpactDebuff = ImpactDebuff==false
  1192.             is_valid = true
  1193.             send_command('console_echo "Impact Debuff: '..tostring(ImpactDebuff)..'"')
  1194.         elseif command:lower()=="forceilvl" then
  1195.             ForceIlvl = ForceIlvl==false
  1196.             is_valid = true
  1197.             send_command('console_echo "Force iLVL: '..tostring(ForceIlvl)..'"')
  1198.         elseif command:lower()=="lagmode" then
  1199.             LagMode = LagMode==false
  1200.             is_valid = true
  1201.             send_command('console_echo "Lag Compensation Mode: '..tostring(LagMode)..'"')
  1202.         elseif command:lower()=="th" then
  1203.             TreasureHunter = TreasureHunter==false
  1204.             is_valid = true
  1205.             send_command('console_echo "Treasure Hunter Mode: '..tostring(TreasureHunter)..'"')
  1206.         elseif command:lower()=="empy" then
  1207.             Empy = Empy==false
  1208.             is_valid = true
  1209.             send_command('console_echo "Empyrean Ward Mode: '..tostring(Empy)..'"')
  1210.         elseif command:lower()=="test" then
  1211.             TestMode = TestMode==false
  1212.             is_valid = true
  1213.             send_command('console_echo "Test Mode: '..tostring(TestMode)..'"')
  1214.         elseif command:lower()=="weaponlock" then
  1215.             if WeaponLock then
  1216.                 enable("main","sub")
  1217.                 WeaponLock = false
  1218.             else
  1219.                 equip({main="Nirvana",sub="Elan Strap +1"})
  1220.                 disable("main","sub")
  1221.                 WeaponLock = true
  1222.             end
  1223.             is_valid = true
  1224.             send_command('console_echo "Weapon Lock: '..tostring(WeaponLock)..'"')
  1225.         elseif command=="ToggleIdle" then
  1226.             is_valid = true
  1227.             -- If you want to change the sets cycled with F9, this is where you do it
  1228.             if IdleMode=="Refresh" then
  1229.                 IdleMode = "DT"
  1230.             elseif IdleMode=="DT" then
  1231.                 IdleMode = "PetDT"
  1232.             elseif IdleMode=="PetDT" then
  1233.                 IdleMode = "DD"
  1234.             else
  1235.                 IdleMode = "Refresh"
  1236.             end
  1237.             send_command('console_echo "Idle Mode: ['..IdleMode..']"')
  1238.         elseif command:lower()=="lowhp" then
  1239.             -- Use for "Cure 500 HP" objectives in Omen
  1240.             equip({head="Apogee Crown +1",body={ name="Apo. Dalmatica +1", augments={'MP+80','Pet: "Mag.Atk.Bns."+35','Blood Pact Dmg.+8',}},legs="Apogee Slacks +1",feet="Apogee Pumps +1",back="Campestres's Cape"})
  1241.             return
  1242.         elseif string.sub(command:lower(),1,12)=="meteorstrike" then
  1243.             MeteorStrike = string.sub(command,13,13)
  1244.             send_command('console_echo "Meteor Strike: '..MeteorStrike..'/5"')
  1245.             is_valid = true
  1246.         elseif string.sub(command:lower(),1,8)=="geocrush" then
  1247.             Geocrush = string.sub(command,9,9)
  1248.             send_command('console_echo "Geocrush: '..Geocrush..'/5"')
  1249.             is_valid = true
  1250.         elseif string.sub(command:lower(),1,9)=="grandfall" then
  1251.             GrandFall = string.sub(command,10,10)
  1252.             send_command('console_echo "Grand Fall: '..GrandFall..'/5"')
  1253.             is_valid = true
  1254.         elseif string.sub(command:lower(),1,9)=="windblade" then
  1255.             WindBlade = +string.sub(command,10,10)
  1256.             send_command('console_echo "Wind Blade: '..WindBlade..'/5"')
  1257.             is_valid = true
  1258.         elseif string.sub(command:lower(),1,14)=="heavenlystrike" then
  1259.             HeavenlyStrike = string.sub(command,15,15)
  1260.             send_command('console_echo "Heavenly Strike: '..HeavenlyStrike..'/5"')
  1261.             is_valid = true
  1262.         elseif string.sub(command:lower(),1,12)=="thunderstorm" then
  1263.             Thunderstorm = string.sub(command,13,13)
  1264.             send_command('console_echo "Thunderstorm: '..Thunderstorm..'/5"')
  1265.             is_valid = true
  1266.         elseif command:lower()=="opa" then
  1267.             if CustomMode=='Opashoro' then
  1268.                 enable("main","sub")
  1269.                 WeaponLock = false
  1270.                 CustomMode = 'None'
  1271.             else
  1272.                 enable("main","sub")
  1273.                 equip({main="Opashoro",sub="Elan Strap +1"})
  1274.                 disable("main","sub")
  1275.                 WeaponLock = true
  1276.                 CustomMode = 'Opashoro'
  1277.             end
  1278.             send_command('console_echo "Opashoro Mode: '..tostring(WeaponLock)..'"')
  1279.             is_valid = true
  1280.         end
  1281.     end
  1282.  
  1283.     if is_valid then
  1284.         if not midaction() and not pet_midaction() then
  1285.             idle()
  1286.         end
  1287.     else
  1288.         sanitized = command:gsub("\"", "")
  1289.         send_command('console_echo "Invalid self_command: '..sanitized..'"') -- Note: If you use Gearinfo, comment out this line
  1290.     end
  1291. end
  1292.  
  1293. -- This function is for returning to aftercast gear after an action/event.
  1294. function idle()
  1295.     equipSet = sets.aftercast
  1296.     if TownIdle:contains(world.area:lower()) then
  1297.         equipSet = sets.aftercast.Town
  1298.     end
  1299.     if equipSet[IdleMode] then
  1300.         equipSet = equipSet[IdleMode]
  1301.     end
  1302.     if pet.isvalid then
  1303.         if equipSet[pet.name] then
  1304.             equipSet = equipSet[pet.name]
  1305.         elseif string.find(pet.name,'Spirit') and equipSet["Spirit"] then
  1306.             equipSet = equipSet["Spirit"]
  1307.         elseif equipSet["Avatar"] then
  1308.             equipSet = equipSet["Avatar"]
  1309.         end
  1310.     end
  1311.     if equipSet[player.status] then
  1312.         equipSet = equipSet[player.status]
  1313.     end
  1314.     if player.mpp < 50 and equipSet["LowMP"] then
  1315.         equipSet = equipSet["LowMP"]
  1316.     end
  1317.     if ForceIlvl and equipSet["ForceIlvl"] then
  1318.         equipSet = equipSet["ForceIlvl"]
  1319.     end
  1320.     if equipSet[CustomMode] then
  1321.         equipSet = equipSet[CustomMode]
  1322.     end
  1323.     equip(equipSet)
  1324.  
  1325.     if (buffactive['Quickening'] or buffactive['Sneak'] or buffactive['Invisible']) and IdleMode~='DT' then
  1326.         --if not ForceIlvl then
  1327.             equip(sets.Movement)
  1328.         --end
  1329.     end
  1330.     -- Balrahn's Ring
  1331.     --if Salvage:contains(world.area) then
  1332.     --  equip({ring2="Balrahn's Ring"})
  1333.     --end
  1334.     -- Maquette Ring (works in Ambuscade too)
  1335.     --if world.area=='Maquette Abdhaljs-Legion' and not IdleMode=='DT' then
  1336.     --  equip({ring2="Maquette Ring"})
  1337.     --end
  1338. end
Add Comment
Please, Sign In to add comment