SHARE
TWEET

Pergatory's SMN Gearswap

Pergatory Jan 27th, 2017 (edited) 8,440 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- IdleMode determines the set used after casting. You change it with "/console gs c <IdleMode>"
  2. -- The modes are:
  3. -- Refresh: Uses the most refresh available.
  4. -- DT: A mix of refresh, PDT, and MDT to help when you can't avoid AOE.
  5. -- PetDT: Sacrifice refresh to reduce avatar's damage taken. WARNING: Selenian Cap drops you below 119, use with caution!
  6. -- DD: When melee mode is on and you're engaged, uses TP gear. Otherwise, avatar melee gear.
  7. -- Favor: Uses Beckoner's Horn +1 and max smn skill to boost the favor effect.
  8. -- 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)
  9.  
  10. -- Additional Bindings:
  11. -- F9 - Toggles between a subset of IdleModes (Refresh > DT > PetDT)
  12. -- F10 - Toggles MeleeMode (When enabled, equips Nirvana and Elan+1, then disables those 2 slots from swapping)
  13. --       NOTE: If you don't already have the Nirvana & Elan+1 equipped, YOU WILL LOSE TP
  14.  
  15. -- Additional Commands:
  16. -- /console gs c AccMode - Toggles high-accuracy sets to be used where appropriate.
  17. -- /console gs c ImpactMode - Toggles between using normal magic BP set for Fenrir's Impact or a custom high-skill set for debuffs.
  18. -- /console gs c ForceIlvl - I have this set up to override a few specific slots where I normally use non-ilvl pieces.
  19. -- /console gs c LagMode - Used to help BPs land in the right gear in high-lag situations.
  20. --                          Sets a timer to swap gear 0.2s after the BP is used rather than waiting for server response.
  21.  
  22. function file_unload()
  23.     send_command('unbind f9')
  24.     send_command('unbind f10')
  25. end
  26.  
  27. function get_sets()
  28.     send_command('bind f9 gs c ToggleIdle')
  29.     send_command('bind f10 gs c MeleeMode')
  30.  
  31.     -- Set your merits here. This is used in deciding between Enticer's Pants or Apogee Slacks +1.
  32.     -- To change in-game, "/console gs c MeteorStrike3" will change Meteor Strike to 3/5 merits.
  33.     -- The damage difference is very minor unless you're over 2400 TP.
  34.     -- It's ok to just always use Enticer's Pants and ignore this section.
  35.     MeteorStrike = 1
  36.     HeavenlyStrike = 1
  37.     WindBlade = 1
  38.     Geocrush = 1
  39.     Thunderstorm = 5
  40.     GrandFall = 1
  41.  
  42.     StartLockStyle = '75'
  43.     IdleMode = 'Refresh'
  44.     AccMode = false
  45.     ImpactDebuff = false
  46.     MeleeMode = false
  47.     ForceIlvl = false
  48.     LagMode = false -- Default LagMode. If you have a lot of lag issues, change to "true".
  49.     AutoRemedy = false -- Auto Remedy when using an ability while Paralyzed.
  50.     AutoEcho = false -- Auto Echo Drop when using an ability while Silenced.
  51.     Test = 0
  52.  
  53.     -- ===================================================================================================================
  54.     --      Sets
  55.     -- ===================================================================================================================
  56.  
  57.     -- Base Damage Taken Set - Mainly used when IdleMode is "DT"
  58.     sets.DT_Base = {
  59.         main="Nirvana",
  60.         sub="Alber Strap",
  61.         head="Convoker's Horn +3",
  62.         neck="Loricate Torque +1",
  63.         ear1="Genmei Earring",
  64.         ear2="Etiolation Earring",
  65.         body="Udug Jacket",
  66.         hands={ name="Merlinic Dastanas", augments={'Pet: Crit.hit rate +2','"Mag.Atk.Bns."+25','"Refresh"+2','Mag. Acc.+10 "Mag.Atk.Bns."+10',}},
  67.         ring1="Vocane Ring +1",
  68.         ring2="Defending Ring",
  69.         back={ name="Campestres's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','Haste+10','Phys. dmg. taken-10%',}},
  70.         waist="Regal Belt",
  71.         legs="Assiduity Pants +1",
  72.         feet={ name="Merlinic Crackows", augments={'DEX+10','Phys. dmg. taken -2%','"Refresh"+2','Accuracy+3 Attack+3',}}
  73.     }
  74.  
  75.     sets.precast = {}
  76.  
  77.     -- Fast Cast
  78.     sets.precast.FC = {
  79.         main={ name="Grioavolr", augments={'"Fast Cast"+6','INT+2','"Mag.Atk.Bns."+17',}}, -- +10
  80.         sub="Clerisy Strap +1", -- +3
  81.         --ammo="Sapience Orb",
  82.         head="Amalric Coif +1", -- +11
  83.         neck="Orunmila's Torque", -- +5
  84.         ear1="Loquacious Earring", -- +2
  85.         ear2="Etiolation Earring", -- +1
  86.         hands={ name="Telchine Gloves", augments={'"Fast Cast"+5','Enh. Mag. eff. dur. +10',}},
  87.         body="Inyanga Jubbah +2", -- +14
  88.         ring1="Lebeche Ring",
  89.         ring2="Kishar Ring", -- +4
  90.         back={ name="Campestres's Cape", augments={'Pet: M.Acc.+20 Pet: M.Dmg.+20','Accuracy+20 Attack+20','Pet: Mag. Acc.+10','"Fast Cast"+10',}},
  91.         waist="Witful Belt", -- +3
  92.         legs={ name="Merlinic Shalwar", augments={'"Fast Cast"+6','CHR+6','Mag. Acc.+14','"Mag.Atk.Bns."+14',}},
  93.         feet="Regal Pumps +1" -- +5~7
  94.     }
  95.  
  96.     sets.midcast = {}
  97.  
  98.     -- BP Timer Gear
  99.     sets.midcast.BP = {
  100.         main={ name="Espiritus", augments={'Summoning magic skill +15','Pet: Mag. Acc.+30','Pet: Damage taken -4%',}},
  101.         sub="Vox Grip",
  102.         ammo="Sancus Sachet +1",
  103.         head="Beckoner's Horn +1",
  104.         neck="Incanter's Torque",
  105.         ear1="Andoaa Earring",
  106.         ear2="Summoning Earring",
  107.         body="Baayami Robe +1",
  108.         hands="Baayami Cuffs +1",
  109.         ring1="Stikini Ring +1",
  110.         ring2="Evoker's Ring",
  111.         back={ name="Conveyance Cape", augments={'Summoning magic skill +5','Pet: Enmity+12','Blood Pact Dmg.+2',}},
  112.         waist="Kobo Obi",
  113.         legs="Baayami Slops +1",
  114.         feet="Baayami Sabots +1"
  115.     }
  116.  
  117.     -- Elemental Siphon sets. Zodiac Ring is affected by day, Chatoyant Staff by weather, and Twilight Cape by both.
  118.     sets.midcast.Siphon = {
  119.         main={ name="Espiritus", augments={'Summoning magic skill +15','Pet: Mag. Acc.+30','Pet: Damage taken -4%',}},
  120.         sub="Vox Grip",
  121.         ammo="Esper Stone +1",
  122.         head="Baayami Hat +1",
  123.         neck="Incanter's Torque",
  124.         ear1="Andoaa Earring",
  125.         ear2="Smn. Earring",
  126.         body="Baayami Robe +1",
  127.         hands="Baayami Cuffs +1",
  128.         ring1="Stikini Ring +1",
  129.         ring2="Evoker's Ring",
  130.         back={ name="Conveyance Cape", augments={'Summoning magic skill +5','Pet: Enmity+12','Blood Pact Dmg.+2',}},
  131.         waist="Kobo Obi",
  132.         legs="Baayami Slops +1",
  133.         feet="Beck. Pigaches +1"
  134.     }
  135.  
  136.     sets.midcast.SiphonZodiac = set_combine(sets.midcast.Siphon, { ring1="Zodiac Ring" })
  137.  
  138.     sets.midcast.SiphonWeather = set_combine(sets.midcast.Siphon, { main="Chatoyant Staff" })
  139.    
  140.     sets.midcast.SiphonWeatherZodiac = set_combine(sets.midcast.SiphonZodiac, { main="Chatoyant Staff" })
  141.  
  142.     sets.midcast.Summon = set_combine(sets.DT_Base, {
  143.         body="Baayami Robe +1",
  144.         legs="Lengo Pants"
  145.     })
  146.  
  147.     sets.midcast.Cure = {
  148.         main="Nirvana",
  149.         sub="Oneiros Grip",
  150.         ammo="Sancus Sachet +1",
  151.         head={ name="Vanya Hood", augments={'MP+50','"Cure" potency +7%','Enmity-6',}},
  152.         neck="Nodens Gorget",
  153.         ear1="Mendi. Earring",
  154.         ear2="Novia Earring",
  155.         body="Zendik Robe",
  156.         hands={ name="Telchine Gloves", augments={'"Fast Cast"+5','Enh. Mag. eff. dur. +10',}},
  157.         ring1="Lebeche Ring",
  158.         ring2="Menelaus's Ring",
  159.         back="Tempered Cape +1",
  160.         waist="Witful Belt",
  161.         legs="Assiduity Pants +1",
  162.         feet={ name="Vanya Clogs", augments={'MP+50','"Cure" potency +7%','Enmity-6',}}
  163.     }
  164.  
  165.     sets.midcast.Cursna = set_combine(sets.precast.FC, {
  166.         neck="Debilis Medallion",
  167.         ear1="Healing Earring",
  168.         ear2="Beatific Earring",
  169.         ring1="Menelaus's Ring",
  170.         ring2="Haoma's Ring",
  171.         back="Tempered Cape +1",
  172.         waist="Bishop's Sash",
  173.         feet={ name="Vanya Clogs", augments={'Healing magic skill +20','"Cure" spellcasting time -7%','Magic dmg. taken -3',}}
  174.     })
  175.    
  176.     sets.midcast.EnmityRecast = set_combine(sets.precast.FC, {
  177.         main="Nirvana",
  178.         ear1="Novia Earring",
  179.         body={ name="Apo. Dalmatica +1", augments={'Summoning magic skill +20','Enmity-6','Pet: Damage taken -4%',}}
  180.     })
  181.  
  182.     sets.midcast.Enfeeble = {
  183.         main={ name="Gada", augments={'"Fast Cast"+2','MND+13','Mag. Acc.+20','"Mag.Atk.Bns."+14',}},
  184.         sub="Ammurapi Shield",
  185.         head="Inyanga Tiara +2",
  186.         neck="Erra Pendant",
  187.         ear1="Dignitary's Earring",
  188.         ear2="Gwati Earring",
  189.         body="Inyanga Jubbah +2",
  190.         hands="Inyanga Dastanas +2",
  191.         ring1="Stikini Ring +1",
  192.         ring2="Stikini Ring +1",
  193.         back={ name="Campestres's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','Haste+10','Phys. dmg. taken-10%',}},
  194.         waist="Luminary Sash",
  195.         legs="Inyanga Shalwar +2",
  196.         feet="Skaoi Boots"
  197.     }
  198.  
  199.     sets.midcast.Enhancing = {
  200.         main={ name="Gada", augments={'Enh. Mag. eff. dur. +6','DEX+1','Mag. Acc.+5','"Mag.Atk.Bns."+18','DMG:+4',}},
  201.         sub="Ammurapi Shield",
  202.         head={ name="Telchine Cap", augments={'Pet: "Mag.Atk.Bns."+19','"Elemental Siphon"+25','Enh. Mag. eff. dur. +10',}},
  203.         neck="Incanter's Torque",
  204.         ear1="Andoaa Earring",
  205.         ear2="Augmenting Earring",
  206.         body={ name="Telchine Chas.", augments={'"Conserve MP"+5','Enh. Mag. eff. dur. +10',}},
  207.         hands={ name="Telchine Gloves", augments={'"Fast Cast"+5','Enh. Mag. eff. dur. +10',}},
  208.         ring1="Stikini Ring +1",
  209.         ring2="Stikini Ring +1",
  210.         back="Merciful Cape",
  211.         waist="Olympus Sash",
  212.         legs={ name="Telchine Braconi", augments={'"Conserve MP"+4','Enh. Mag. eff. dur. +10',}},
  213.         feet={ name="Telchine Pigaches", augments={'"Conserve MP"+3','Enh. Mag. eff. dur. +9',}}
  214.     }
  215.  
  216.     sets.midcast.Stoneskin = set_combine(sets.midcast.Enhancing, {
  217.         neck="Nodens Gorget",
  218.         ear2="Earthcry Earring",
  219.         waist="Siegel Sash",
  220.         --legs="Shedir Seraweels"
  221.     })
  222.  
  223.     sets.midcast.Nuke = {
  224.         main={ name="Grioavolr", augments={'"Fast Cast"+6','INT+2','"Mag.Atk.Bns."+17',}},
  225.         sub="Niobid Strap",
  226.         head="Inyanga Tiara +2",
  227.         neck="Eddy Necklace",
  228.         ear1="Hecate's Earring",
  229.         ear2="Friomisi Earring",
  230.         body="Witching Robe",
  231.         hands={ name="Merlinic Dastanas", augments={'Pet: Crit.hit rate +2','"Mag.Atk.Bns."+25','"Refresh"+2','Mag. Acc.+10 "Mag.Atk.Bns."+10',}},
  232.         ring1="Acumen Ring",
  233.         ring2="Strendu Ring",
  234.         back={ name="Campestres's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','Haste+10','Phys. dmg. taken-10%',}},
  235.         waist="Eschan Stone",
  236.         legs="Lengo Pants",
  237.         feet={ name="Merlinic Crackows", augments={'DEX+10','Phys. dmg. taken -2%','"Refresh"+2','Accuracy+3 Attack+3',}}
  238.     }
  239.  
  240.     sets.midcast["Refresh"] = set_combine(sets.midcast.Enhancing, {
  241.         head="Amalric Coif +1",
  242.         waist="Gishdubar Sash"
  243.     })
  244.  
  245.     sets.midcast["Aquaveil"] = set_combine(sets.midcast.Enhancing, {
  246.         main="Vadose Rod",
  247.         head="Amalric Coif +1"
  248.     })
  249.  
  250.     sets.midcast["Mana Cede"] = { hands="Beckoner's Bracers +1" }
  251.  
  252.     sets.midcast["Astral Flow"] = { head="Glyphic Horn +3" }
  253.  
  254.     sets.midcast["Garland of Bliss"] = {
  255.         head="Inyanga Tiara +2",
  256.         neck="Sanctity Necklace",
  257.         ear1="Dignitary's Earring",
  258.         ear2="Gwati Earring",
  259.         body="Inyanga Jubbah +2",
  260.         hands="Inyanga Dastanas +2",
  261.         ring1="Stikini Ring +1",
  262.         ring2="Stikini Ring +1",
  263.         back={ name="Campestres's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','Haste+10','Phys. dmg. taken-10%',}},
  264.         waist="Eschan Stone",
  265.         legs="Inyanga Shalwar +2",
  266.         feet="Inyanga Crackows +2"
  267.     }
  268.  
  269.     sets.midcast["Shattersoul"] = {
  270.         head="Convoker's Horn +3",
  271.         neck="Fotia Gorget",
  272.         ear1="Zennaroi Earring",
  273.         ear2="Telos Earring",
  274.         body="Tali'ah Manteel +2",
  275.         hands="Tali'ah Gages +2",
  276.         ring1="Rajas Ring",
  277.         ring2="Varar Ring +1",
  278.         back={ name="Campestres's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},
  279.         waist="Fotia Belt",
  280.         legs={ name="Telchine Braconi", augments={'Accuracy+17','Weapon Skill Acc.+14','Weapon skill damage +3%',}},
  281.         feet="Convoker's Pigaches +3"
  282.     }
  283.  
  284.     sets.midcast["Cataclysm"] = sets.midcast.Nuke
  285.  
  286.     sets.pet_midcast = {}
  287.  
  288.     -- Main physical pact set (Volt Strike, Pred Claws, etc.)
  289.     sets.pet_midcast.Physical_BP = {
  290.         main="Nirvana",
  291.         sub="Elan Strap +1",
  292.         ammo="Sancus Sachet +1",
  293.         head={ name="Helios Band", augments={'Pet: Attack+30 Pet: Rng.Atk.+30','Pet: "Dbl. Atk."+8','Blood Pact Dmg.+7',}},
  294.         neck="Summoner's Collar +2",
  295.         ear1="Lugalbanda Earring",
  296.         ear2="Kyrene's Earring",
  297.         --body="Convoker's Doublet +3",
  298.         body="Glyphic Doublet +3",
  299.         hands={ name="Merlinic Dastanas", augments={'Pet: Attack+24 Pet: Rng.Atk.+24','Blood Pact Dmg.+9','Pet: STR+10','Pet: Mag. Acc.+7',}},
  300.         ring1="Varar Ring +1",
  301.         ring2="Varar Ring +1",
  302.         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',}},
  303.         waist="Incarnation Sash",
  304.         legs={ name="Apogee Slacks +1", augments={'Pet: STR+20','Blood Pact Dmg.+14','Pet: "Dbl. Atk."+4',}},
  305.         feet={ name="Helios Boots", augments={'Pet: Accuracy+28 Pet: Rng. Acc.+28','Pet: "Dbl. Atk."+8','Blood Pact Dmg.+7',}}
  306.     }
  307.  
  308.     sets.pet_midcast.Physical_BP_AM3 = set_combine(sets.pet_midcast.Physical_BP, {
  309.         ear2="Gelos Earring",
  310.         body="Convoker's Doublet +3",
  311.         feet={ name="Apogee Pumps +1", augments={'MP+80','Pet: Attack+35','Blood Pact Dmg.+8',}}
  312.     })
  313.  
  314.     -- Physical pacts which benefit more from TP than Pet:DA (like single-hit BP)
  315.     sets.pet_midcast.Physical_BP_TP = set_combine(sets.pet_midcast.Physical_BP, {
  316.         head={ name="Apogee Crown +1", augments={'MP+80','Pet: Attack+35','Blood Pact Dmg.+8',}},
  317.         ear2="Gelos Earring",
  318.         body="Convoker's Doublet +3",
  319.         waist="Regal Belt",
  320.         legs="Enticer's Pants",
  321.         feet={ name="Apogee Pumps +1", augments={'MP+80','Pet: Attack+35','Blood Pact Dmg.+8',}}
  322.     })
  323.  
  324.     -- Used for all physical pacts when AccMode is true
  325.     sets.pet_midcast.Physical_BP_Acc = set_combine(sets.pet_midcast.Physical_BP, {
  326.         head={ name="Apogee Crown +1", augments={'MP+80','Pet: Attack+35','Blood Pact Dmg.+8',}},
  327.         body="Convoker's Doublet +3",
  328.         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',}},
  329.         --feet="Convoker's Pigaches +3"
  330.     })
  331.  
  332.     -- Base magic pact set
  333.     sets.pet_midcast.Magic_BP_Base = {
  334.         main={ name="Grioavolr", augments={'Blood Pact Dmg.+10','Pet: STR+5','Pet: Mag. Acc.+18','Pet: "Mag.Atk.Bns."+25',}},
  335.         sub="Elan Strap +1",
  336.         ammo="Sancus Sachet +1",
  337.         head={ name="Apogee Crown +1", augments={'MP+80','Pet: "Mag.Atk.Bns."+35','Blood Pact Dmg.+8',}},
  338.         neck="Summoner's Collar +2",
  339.         ear1="Lugalbanda Earring",
  340.         ear2="Gelos Earring",
  341.         body={ name="Apo. Dalmatica +1", augments={'MP+80','Pet: "Mag.Atk.Bns."+35','Blood Pact Dmg.+8',}},
  342.         hands={ name="Merlinic Dastanas", augments={'Pet: Mag. Acc.+25 Pet: "Mag.Atk.Bns."+25','Blood Pact Dmg.+10','Pet: "Mag.Atk.Bns."+7',}},
  343.         ring1="Varar Ring +1",
  344.         ring2="Varar Ring +1",
  345.         back={ name="Campestres's Cape", augments={'Pet: M.Acc.+20 Pet: M.Dmg.+20','Accuracy+20 Attack+20','Pet: Mag. Acc.+10','"Fast Cast"+10',}},
  346.         waist="Regal Belt",
  347.         feet={ name="Apogee Pumps +1", augments={'MP+80','Pet: "Mag.Atk.Bns."+35','Blood Pact Dmg.+8',}}
  348.     }
  349.    
  350.     -- Some magic pacts benefit more from TP than others.
  351.     -- Note: This set will only be used on merit pacts if you have less than 4 merits.
  352.     --       Make sure to update your merit values at the top of this Lua.
  353.     sets.pet_midcast.Magic_BP_TP = set_combine(sets.pet_midcast.Magic_BP_Base, {
  354.         legs="Enticer's Pants"
  355.     })
  356.  
  357.     -- NoTP set used when you don't need Enticer's
  358.     sets.pet_midcast.Magic_BP_NoTP = set_combine(sets.pet_midcast.Magic_BP_Base, {
  359.         legs={ name="Apogee Slacks +1", augments={'MP+80','Pet: "Mag.Atk.Bns."+35','Blood Pact Dmg.+8',}}
  360.     })
  361.  
  362.     sets.pet_midcast.Magic_BP_TP_Acc = set_combine(sets.pet_midcast.Magic_BP_TP, {
  363.         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',}},
  364.         body="Convoker's Doublet +3",
  365.         hands={ name="Merlinic Dastanas", augments={'Pet: Mag. Acc.+29','Blood Pact Dmg.+10','Pet: INT+7','Pet: "Mag.Atk.Bns."+10',}}
  366.     })
  367.  
  368.     sets.pet_midcast.Magic_BP_NoTP_Acc = set_combine(sets.pet_midcast.Magic_BP_NoTP, {
  369.         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',}},
  370.         body="Convoker's Doublet +3",
  371.         hands={ name="Merlinic Dastanas", augments={'Pet: Mag. Acc.+29','Blood Pact Dmg.+10','Pet: INT+7','Pet: "Mag.Atk.Bns."+10',}}
  372.     })
  373.  
  374.     sets.pet_midcast.FlamingCrush = {
  375.         main="Nirvana",
  376.         sub="Elan Strap +1",
  377.         ammo="Sancus Sachet +1",
  378.         head={ name="Apogee Crown +1", augments={'MP+80','Pet: "Mag.Atk.Bns."+35','Blood Pact Dmg.+8',}},
  379.         neck="Summoner's Collar +2",
  380.         ear1="Lugalbanda Earring",
  381.         ear2="Gelos Earring",
  382.         body="Convoker's Doublet +3",
  383.         hands={ name="Merlinic Dastanas", augments={'Pet: Mag. Acc.+25 Pet: "Mag.Atk.Bns."+25','Blood Pact Dmg.+10','Pet: "Mag.Atk.Bns."+7',}},
  384.         ring1="Varar Ring +1",
  385.         ring2="Varar Ring +1",
  386.         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',}},
  387.         waist="Regal Belt",
  388.         legs={ name="Apogee Slacks +1", augments={'MP+80','Pet: "Mag.Atk.Bns."+35','Blood Pact Dmg.+8',}},
  389.         --legs={ name="Apogee Slacks +1", augments={'Pet: STR+20','Blood Pact Dmg.+14','Pet: "Dbl. Atk."+4',}},
  390.         feet={ name="Apogee Pumps +1", augments={'MP+80','Pet: "Mag.Atk.Bns."+35','Blood Pact Dmg.+8',}}
  391.     }
  392.  
  393.     sets.pet_midcast.FlamingCrush_Acc = set_combine(sets.pet_midcast.FlamingCrush, {
  394.         ear2="Kyrene's Earring",
  395.         body="Convoker's Doublet +3",
  396.         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',}},
  397.         --feet="Convoker's Pigaches +3"
  398.     })
  399.  
  400.     -- Pet: Magic Acc set - Mainly used for debuff pacts like Shock Squall
  401.     sets.pet_midcast.MagicAcc_BP = {
  402.         main="Nirvana",
  403.         sub="Vox Grip",
  404.         ammo="Sancus Sachet +1",
  405.         head="Convoker's Horn +3",
  406.         neck="Summoner's Collar +2",
  407.         ear1="Lugalbanda Earring",
  408.         ear2="Enmerkar Earring",
  409.         body="Convoker's Doublet +3",
  410.         hands="Apogee Mitts +1",
  411.         ring1="Stikini Ring +1",
  412.         ring2="Evoker's Ring",
  413.         back={ name="Campestres's Cape", augments={'Pet: M.Acc.+20 Pet: M.Dmg.+20','Accuracy+20 Attack+20','Pet: Mag. Acc.+10','"Fast Cast"+10',}},
  414.         waist="Regal Belt",
  415.         legs="Convoker's Spats +3",
  416.         feet="Convoker's Pigaches +3"
  417.     }
  418.  
  419.     sets.pet_midcast.Debuff_Rage = sets.pet_midcast.MagicAcc_BP
  420.  
  421.     -- Pure summoning magic set, mainly used for buffs like Hastega II.
  422.     sets.pet_midcast.SummoningMagic = {
  423.         main={ name="Espiritus", augments={'Summoning magic skill +15','Pet: Mag. Acc.+30','Pet: Damage taken -4%',}},
  424.         sub="Vox Grip",
  425.         ammo="Sancus Sachet +1",
  426.         head="Baayami Hat +1",
  427.         neck="Incanter's Torque",
  428.         ear1="Andoaa Earring",
  429.         ear2="Smn. Earring",
  430.         body="Baayami Robe +1",
  431.         hands="Baayami Cuffs +1",
  432.         ring1="Stikini Ring +1",
  433.         ring2="Evoker's Ring",
  434.         back={ name="Conveyance Cape", augments={'Summoning magic skill +5','Pet: Enmity+12','Blood Pact Dmg.+2',}},
  435.         waist="Kobo Obi",
  436.         legs="Baayami Slops +1",
  437.         feet="Baayami Sabots +1"
  438.     }
  439.  
  440.     sets.pet_midcast.Buff = sets.pet_midcast.SummoningMagic
  441.  
  442.     -- I use Apogee gear for healing BPs because the amount healed is affected by avatar max HP.
  443.     -- I'm probably stupid. It puts you in yellow HP after using a healing move.
  444.     sets.pet_midcast.Buff_Healing = set_combine(sets.pet_midcast.SummoningMagic, {
  445.         main="Nirvana",
  446.         head={ name="Apogee Crown +1", augments={'MP+80','Pet: "Mag.Atk.Bns."+35','Blood Pact Dmg.+8',}},
  447.         body={ name="Apo. Dalmatica +1", augments={'Summoning magic skill +20','Enmity-6','Pet: Damage taken -4%',}},
  448.         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',}},
  449.         feet={ name="Apogee Pumps +1", augments={'MP+80','Pet: "Mag.Atk.Bns."+35','Blood Pact Dmg.+8',}}
  450.     })
  451.  
  452.     -- This set is used for certain blood pacts when ImpactDebuff mode is ON. (/console gs c ImpactDebuff)
  453.     -- These pacts are normally used as nukes, but they're also strong debuffs which are enhanced by smn skill.
  454.     sets.pet_midcast.Impact = set_combine(sets.pet_midcast.SummoningMagic, {
  455.         main="Nirvana",
  456.         head="Convoker's Horn +3",
  457.         ear1="Lugalbanda Earring",
  458.         ear2="Enmerkar Earring"
  459.     })
  460.  
  461.     sets.aftercast = {}
  462.  
  463.     -- Idle set with no avatar out.
  464.     sets.aftercast.Idle = {
  465.         main="Contemplator +1",
  466.         sub="Oneiros Grip",
  467.         ammo="Sancus Sachet +1",
  468.         head="Convoker's Horn +3",
  469.         neck="Loricate Torque +1",
  470.         ear1="Moonshade Earring",
  471.         ear2="Etiolation Earring",
  472.         body={ name="Apo. Dalmatica +1", augments={'MP+80','Pet: "Mag.Atk.Bns."+35','Blood Pact Dmg.+8',}},
  473.         hands={ name="Merlinic Dastanas", augments={'Pet: Crit.hit rate +2','"Mag.Atk.Bns."+25','"Refresh"+2','Mag. Acc.+10 "Mag.Atk.Bns."+10',}},
  474.         ring1="Stikini Ring +1",
  475.         ring2="Defending Ring",
  476.         back={ name="Campestres's Cape", augments={'MND+20','Mag. Acc+20 /Mag. Dmg.+20','Mag. Acc.+10','Haste+10','Phys. dmg. taken-10%',}},
  477.         waist="Regal Belt",
  478.         legs="Assiduity Pants +1",
  479.         feet="Herald's Gaiters"
  480.     }
  481.    
  482.     -- Idle set used when ForceIlvl is ON. Use this mode to avoid Gaiters dropping ilvl.
  483.     sets.aftercast.Idle_Ilvl = set_combine(sets.aftercast.Idle, {
  484.         feet="Baayami Sabots +1"
  485.     })
  486.    
  487.     sets.aftercast.DT = sets.DT_Base
  488.  
  489.     -- Many idle sets inherit from this set.
  490.     -- Put common items here so you don't have to repeat them over and over.
  491.     sets.aftercast.Perp_Base = {
  492.         main="Nirvana",
  493.         sub="Oneiros Grip",
  494.         ammo="Sancus Sachet +1",
  495.         head="Convoker's Horn +3",
  496.         neck="Caller's Pendant",
  497.         ear1="Moonshade Earring",
  498.         ear2="Evans Earring",
  499.         body={ name="Apo. Dalmatica +1", augments={'Summoning magic skill +20','Enmity-6','Pet: Damage taken -4%',}},
  500.         --hands="Asteria Mitts +1",
  501.         hands={ name="Merlinic Dastanas", augments={'Pet: Crit.hit rate +2','"Mag.Atk.Bns."+25','"Refresh"+2','Mag. Acc.+10 "Mag.Atk.Bns."+10',}},
  502.         ring1="Stikini Ring +1",
  503.         ring2="Evoker's Ring",
  504.         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',}},
  505.         waist="Isa Belt",
  506.         legs="Assiduity Pants +1",
  507.         feet="Baayami Sabots +1"
  508.     }
  509.  
  510.     -- Avatar Melee set. Equipped when IdleMode is "DD" and MeleeMode is OFF.
  511.     sets.aftercast.Perp_DD = set_combine(sets.aftercast.Perp_Base, {
  512.         ear2="Rimeice Earring",
  513.         body="Glyphic Doublet +3",
  514.         hands={ name="Helios Gloves", augments={'Pet: Accuracy+22 Pet: Rng. Acc.+22','Pet: "Dbl. Atk."+8','Pet: Haste+6',}},
  515.         waist="Klouskap Sash",
  516.         feet={ name="Helios Boots", augments={'Pet: Accuracy+21 Pet: Rng. Acc.+21','Pet: "Dbl. Atk."+8','Pet: Haste+6',}}
  517.     })
  518.  
  519.     -- Refresh set with avatar out. Equipped when IdleMode is "Refresh".
  520.     sets.aftercast.Perp_Refresh = set_combine(sets.aftercast.Perp_Base, {
  521.         body={ name="Apo. Dalmatica +1", augments={'Summoning magic skill +20','Enmity-6','Pet: Damage taken -4%',}}
  522.     })
  523.  
  524.     sets.aftercast.Perp_RefreshSub50 = set_combine(sets.aftercast.Perp_Refresh, {
  525.         waist="Fucho-no-obi"
  526.     })
  527.    
  528.     sets.aftercast.Perp_Favor = set_combine(sets.aftercast.Perp_Refresh, {
  529.         head="Beckoner's Horn +1",
  530.         ear2="Andoaa Earring",
  531.         ring1="Stikini Ring +1",
  532.         ring2="Evoker's Ring",
  533.         legs="Baayami Slops +1",
  534.         feet="Baayami Sabots +1"
  535.     })
  536.  
  537.     sets.aftercast.Perp_Zendik = set_combine(sets.aftercast.Perp_Favor, {
  538.         body="Zendik Robe"
  539.     })
  540.  
  541.     -- TP set. Equipped when IdleMode is "DD" and MeleeMode is ON.
  542.     sets.aftercast.Perp_Melee = set_combine(sets.aftercast.Perp_Refresh, {
  543.         head="Convoker's Horn +3",
  544.         neck="Shulmanu Collar",
  545.         ear1="Telos Earring",
  546.         ear2="Cessance Earring",
  547.         body="Tali'ah Manteel +2",
  548.         hands={ name="Merlinic Dastanas", augments={'"Mag.Atk.Bns."+3','Accuracy+12','"Store TP"+7','Accuracy+7 Attack+7',}},
  549.         ring1="Rajas Ring",
  550.         ring2="Petrov Ring",
  551.         back={ name="Campestres's Cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Dbl.Atk."+10',}},
  552.         waist="Cetl Belt",
  553.         legs="Convoker's Spats +3",
  554.         feet="Convoker's Pigaches +3"
  555.     })
  556.  
  557.     -- Pet:DT build. Equipped when IdleMode is "PetDT".
  558.     sets.aftercast.Avatar_DT = {
  559.         main="Nirvana",
  560.         sub="Oneiros Grip",
  561.         ammo="Sancus Sachet +1",
  562.         head="Selenian Cap",
  563.         neck="Summoner's Collar +2",
  564.         ear1="Enmerkar Earring",
  565.         ear2="Handler's Earring +1",
  566.         body={ name="Apo. Dalmatica +1", augments={'Summoning magic skill +20','Enmity-6','Pet: Damage taken -4%',}},
  567.         hands="Artsieq Cuffs",
  568.         ring1="Stikini Ring +1",
  569.         ring2="Evoker's Ring",
  570.         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',}},
  571.         waist="Isa Belt",
  572.         legs="Assiduity Pants +1",
  573.         feet={ name="Telchine Pigaches", augments={'Pet: DEF+14','Pet: "Regen"+3','Pet: Damage taken -3%',}}
  574.     }
  575.  
  576.     -- Perp down set used when ForceIlvl is ON. Use this mode to avoid Selenian Cap dropping ilvl.
  577.     sets.aftercast.Avatar_DT_Ilvl = set_combine(sets.aftercast.Avatar_DT, {
  578.         head="Glyphic Horn +3",
  579.         legs="Tali'ah Seraweels +2"
  580.     })
  581.  
  582.     -- DT build with avatar out. Equipped when IdleMode is "DT".
  583.     sets.aftercast.Perp_DT = set_combine(sets.DT_Base, {
  584.         ear2="Evans Earring",
  585.         body="Udug Jacket",
  586.         waist="Lucidity Sash"
  587.     })
  588.  
  589.     sets.aftercast.Spirit = {
  590.         main="Nirvana",
  591.         sub="Vox Grip",
  592.         ammo="Sancus Sachet +1",
  593.         head="Convoker's Horn +3",
  594.         neck="Incanter's Torque",
  595.         ear1="Andoaa Earring",
  596.         ear2="Evans Earring",
  597.         body="Baayami Robe +1",
  598.         hands="Baayami Cuffs +1",
  599.         ring1="Stikini Ring +1",
  600.         ring2="Evoker's Ring",
  601.         back={ name="Conveyance Cape", augments={'Summoning magic skill +5','Pet: Enmity+12','Blood Pact Dmg.+2',}},
  602.         waist="Lucidity Sash",
  603.         legs="Glyphic Spats +3",
  604.         feet="Baayami Sabots +1"
  605.     }
  606.  
  607.     -- ===================================================================================================================
  608.     --      End of Sets
  609.     -- ===================================================================================================================
  610.  
  611.     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'}
  612.     Buff_BPs_Healing = S{'Healing Ruby','Healing Ruby II','Whispering Wind','Spring Water'}
  613.     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'}
  614.     Debuff_Rage_BPs = S{'Moonlit Charge','Tail Whip'}
  615.  
  616.     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'}
  617.     Magic_BPs_TP = S{'Impact','Conflag Strike','Level ? Holy','Lunar Bay'}
  618.     Merit_BPs = S{'Meteor Strike','Geocrush','Grand Fall','Wind Blade','Heavenly Strike','Thunderstorm'}
  619.     Physical_BPs_TP = S{'Rock Buster','Mountain Buster','Crescent Fang','Spinning Dive'}
  620.    
  621.     ZodiacElements = S{'Fire','Earth','Water','Wind','Ice','Lightning'}
  622.  
  623.     AvatarList = S{'Shiva','Ramuh','Garuda','Leviathan','Diabolos','Titan','Fenrir','Ifrit','Carbuncle','Fire Spirit','Air Spirit','Ice Spirit','Thunder Spirit','Light Spirit','Dark Spirit','Earth Spirit','Water Spirit','Cait Sith','Alexander','Odin','Atomos'}
  624.     --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","al zahbi","nashmau","western adoulin","eastern adoulin"}
  625.     --Salvage = S{"Bhaflau Remnants","Zhayolm Remnants","Arrapago Remnants","Silver Sea Remnants"}
  626.  
  627.     -- Select initial macro set and set lockstyle
  628.     -- This section likely requires changes or removal if you aren't Pergatory
  629.     if pet.isvalid then
  630.         if pet.name=='Fenrir' then
  631.             send_command('input /macro book 10;wait .1;input /macro set 2;wait 3;input /lockstyleset '..StartLockStyle)
  632.         elseif pet.name=='Ifrit' then
  633.             send_command('input /macro book 10;wait .1;input /macro set 3;wait 3;input /lockstyleset '..StartLockStyle)
  634.         elseif pet.name=='Titan' then
  635.             send_command('input /macro book 10;wait .1;input /macro set 4;wait 3;input /lockstyleset '..StartLockStyle)
  636.         elseif pet.name=='Leviathan' then
  637.             send_command('input /macro book 10;wait .1;input /macro set 5;wait 3;input /lockstyleset '..StartLockStyle)
  638.         elseif pet.name=='Garuda' then
  639.             send_command('input /macro book 10;wait .1;input /macro set 6;wait 3;input /lockstyleset '..StartLockStyle)
  640.         elseif pet.name=='Shiva' then
  641.             send_command('input /macro book 10;wait .1;input /macro set 7;wait 3;input /lockstyleset '..StartLockStyle)
  642.         elseif pet.name=='Ramuh' then
  643.             send_command('input /macro book 10;wait .1;input /macro set 8;wait 3;input /lockstyleset '..StartLockStyle)
  644.         elseif pet.name=='Diabolos' then
  645.             send_command('input /macro book 10;wait .1;input /macro set 9;wait 3;input /lockstyleset '..StartLockStyle)
  646.         elseif pet.name=='Cait Sith' then
  647.             send_command('input /macro book 11;wait .1;input /macro set 2;wait 3;input /lockstyleset '..StartLockStyle)
  648.         end
  649.     else
  650.         send_command('input /macro book 10;wait .1;input /macro set 1;wait 3;input /lockstyleset '..StartLockStyle)
  651.     end
  652.     -- End macro set / lockstyle section
  653. end
  654.  
  655. function pet_change(pet,gain)
  656.     idle()
  657. end
  658.  
  659. function pretarget(spell,action)
  660.     if not buffactive['Muddle'] then
  661.         -- Auto Remedy --
  662.         if AutoRemedy and (spell.action_type == 'Magic' or spell.type == 'JobAbility') then
  663.             if buffactive['Paralysis'] or (buffactive['Silence'] and not AutoEcho) then
  664.                 cancel_spell()
  665.                 send_command('input /item "Remedy" <me>')
  666.             end
  667.         end
  668.         -- Auto Echo Drop --
  669.         if AutoEcho and spell.action_type == 'Magic' and buffactive['Silence'] then
  670.             cancel_spell()
  671.             send_command('input /item "Echo Drops" <me>')
  672.         end
  673.     end
  674. end
  675.  
  676. function precast(spell)
  677.     if (pet.isvalid and pet_midaction()) or spell.type=="Item" then
  678.         return
  679.     end
  680.     -- Spell fast cast
  681.     if spell.action_type=="Magic" then
  682.         if spell.name=="Stoneskin" then
  683.             equip(sets.precast.FC,{waist="Siegel Sash"})
  684.         else
  685.             equip(sets.precast.FC)
  686.         end
  687.     end
  688. end
  689.  
  690. function midcast(spell)
  691.     if (pet.isvalid and pet_midaction()) or spell.type=="Item" then
  692.         return
  693.     end
  694.     -- BP Timer gear needs to swap here
  695.     if (spell.type=="BloodPactWard" or spell.type=="BloodPactRage") then
  696.         if not buffactive["Astral Conduit"] then
  697.             equip(sets.midcast.BP)
  698.         end
  699.         -- If lag compensation mode is on, set up a timer to equip the BP gear.
  700.         if LagMode then
  701.             send_command('wait 0.5;gs c EquipBP '..spell.name)
  702.         end
  703.     -- Spell Midcast & Potency Stuff
  704.     elseif sets.midcast[spell.english] then
  705.         equip(sets.midcast[spell.english])
  706.     elseif spell.name=="Elemental Siphon" then
  707.         if pet.element==world.day_element and ZodiacElements:contains(pet.element) then
  708.             if pet.element==world.weather_element then
  709.                 equip(sets.midcast.SiphonWeatherZodiac)
  710.             else
  711.                 equip(sets.midcast.SiphonZodiac)
  712.             end
  713.         else
  714.             if pet.element==world.weather_element then
  715.                 equip(sets.midcast.SiphonWeather)
  716.             else
  717.                 equip(sets.midcast.Siphon)
  718.             end
  719.         end
  720.     elseif spell.type=="SummonerPact" then
  721.         equip(sets.midcast.Summon)
  722.     elseif spell.type=="WhiteMagic" then
  723.         if string.find(spell.name,"Cure") or string.find(spell.name,"Curaga") then
  724.             equip(sets.midcast.Cure)
  725.         elseif string.find(spell.name,"Protect") or string.find(spell.name,"Shell") then
  726.             equip(sets.midcast.Enhancing,{ring2="Sheltered Ring"})
  727.         elseif spell.skill=="Enfeebling Magic" then
  728.             equip(sets.midcast.Enfeeble)
  729.         elseif spell.skill=="Enhancing Magic" then
  730.             equip(sets.midcast.Enhancing)
  731.         else
  732.             idle()
  733.         end
  734.     elseif spell.type=="BlackMagic" then
  735.         if spell.skill=="Elemental Magic" then
  736.             equip(sets.midcast.Nuke)
  737.         end
  738.     elseif spell.action_type=="Magic" then
  739.         equip(sets.midcast.EnmityRecast)
  740.     else
  741.         idle()
  742.     end
  743.     -- Auto-cancel existing buffs
  744.     if spell.name=="Stoneskin" and buffactive["Stoneskin"] then
  745.         windower.send_command('cancel 37;')
  746.     elseif spell.name=="Sneak" and buffactive["Sneak"] and spell.target.type=="SELF" then
  747.         windower.send_command('cancel 71;')
  748.     elseif spell.name=="Utsusemi: Ichi" and buffactive["Copy Image"] then
  749.         windower.send_command('wait 1;cancel 66;')
  750.     end
  751. end
  752.  
  753. function aftercast(spell)
  754.     if pet_midaction() or spell.type=="Item" then
  755.         return
  756.     end
  757.     if not string.find(spell.type,"BloodPact") then
  758.         idle()
  759.     end
  760. end
  761.  
  762. function status_change(new,old)
  763.     if new=="Idle" then
  764.         idle()
  765.     end
  766. end
  767.  
  768. function buff_change(name,gain)
  769.     if name=="Quickening" then
  770.         idle()
  771.     end
  772. end
  773.  
  774. function pet_midcast(spell)
  775.     if not LagMode then
  776.         equipBPGear(spell.name)
  777.     end
  778. end
  779.  
  780. function pet_aftercast(spell)
  781.     idle()
  782. end
  783.  
  784. function equipBPGear(spell)
  785.     if spell=="Perfect Defense" then
  786.         equip(sets.pet_midcast.SummoningMagic)
  787.     elseif Debuff_BPs:contains(spell) then
  788.         equip(sets.pet_midcast.MagicAcc_BP)
  789.     elseif Buff_BPs_Healing:contains(spell) then
  790.         equip(sets.pet_midcast.Buff_Healing)
  791.     elseif Buff_BPs_Duration:contains(spell) then
  792.         equip(sets.pet_midcast.Buff)
  793.     elseif spell=="Flaming Crush" then
  794.         if AccMode then
  795.             equip(sets.pet_midcast.FlamingCrush_Acc)
  796.         else
  797.             equip(sets.pet_midcast.FlamingCrush)
  798.         end
  799.     elseif ImpactDebuff and (spell=="Impact" or spell=="Conflag Strike") then
  800.         equip(sets.pet_midcast.Impact)
  801.     elseif Magic_BPs_TP:contains(spell) or string.find(spell," II") or string.find(spell," IV") then
  802.         if AccMode then
  803.             equip(sets.pet_midcast.Magic_BP_TP_Acc)
  804.         else
  805.             equip(sets.pet_midcast.Magic_BP_TP)
  806.         end
  807.     elseif Magic_BPs_NoTP:contains(spell) then
  808.         if AccMode then
  809.             equip(sets.pet_midcast.Magic_BP_NoTP_Acc)
  810.         else
  811.             equip(sets.pet_midcast.Magic_BP_NoTP)
  812.         end
  813.     elseif Merit_BPs:contains(spell) then
  814.         if AccMode then
  815.             equip(sets.pet_midcast.Magic_BP_TP_Acc)
  816.         elseif spell=="Meteor Strike" and MeteorStrike>4 then
  817.             equip(sets.pet_midcast.Magic_BP_NoTP)
  818.         elseif spell=="Geocrush" and Geocrush>4 then
  819.             equip(sets.pet_midcast.Magic_BP_NoTP)
  820.         elseif spell=="Grand Fall" and GrandFall>4 then
  821.             equip(sets.pet_midcast.Magic_BP_NoTP)
  822.         elseif spell=="Wind Blade" and WindBlade>4 then
  823.             equip(sets.pet_midcast.Magic_BP_NoTP)
  824.         elseif spell=="Heavenly Strike" and HeavenlyStrike>4 then
  825.             equip(sets.pet_midcast.Magic_BP_NoTP)
  826.         elseif spell=="Thunderstorm" and Thunderstorm>4 then
  827.             equip(sets.pet_midcast.Magic_BP_NoTP)
  828.         else
  829.             equip(sets.pet_midcast.Magic_BP_TP)
  830.         end
  831.     elseif Debuff_Rage_BPs:contains(spell) then
  832.         equip(sets.pet_midcast.Debuff_Rage)
  833.     else
  834.         if AccMode then
  835.             equip(sets.pet_midcast.Physical_BP_Acc)
  836.         elseif Physical_BPs_TP:contains(spell) then
  837.             equip(sets.pet_midcast.Physical_BP_TP)
  838.         elseif buffactive["Aftermath: Lv.3"] then
  839.             equip(sets.pet_midcast.Physical_BP_AM3)
  840.         else
  841.             equip(sets.pet_midcast.Physical_BP)
  842.         end
  843.     end
  844. end
  845.  
  846. -- This command is called whenever you input "gs c <command>"
  847. function self_command(command)
  848.     IdleModeCommands = {'DD','Refresh','DT','Favor','PetDT','Zendik'}
  849.     is_valid = false
  850.    
  851.     for _, v in ipairs(IdleModeCommands) do
  852.         if command:lower()==v:lower() then
  853.             IdleMode = v
  854.             send_command('console_echo "Idle Mode: ['..IdleMode..']"')
  855.             idle()
  856.             return
  857.         end
  858.     end
  859.     if string.sub(command,1,7)=="EquipBP" then
  860.         equipBPGear(string.sub(command,9,string.len(command)))
  861.         return
  862.     elseif command:lower()=="accmode" then
  863.         AccMode = AccMode==false
  864.         is_valid = true
  865.         send_command('console_echo "AccMode: '..tostring(AccMode)..'"')
  866.     elseif command:lower()=="impactmode" then
  867.         ImpactDebuff = ImpactDebuff==false
  868.         is_valid = true
  869.         send_command('console_echo "Impact Debuff: '..tostring(ImpactDebuff)..'"')
  870.     elseif command:lower()=="forceilvl" then
  871.         ForceIlvl = ForceIlvl==false
  872.         is_valid = true
  873.         send_command('console_echo "Force iLVL: '..tostring(ForceIlvl)..'"')
  874.     elseif command:lower()=="lagmode" then
  875.         LagMode = LagMode==false
  876.         is_valid = true
  877.         send_command('console_echo "Lag Compensation Mode: '..tostring(LagMode)..'"')
  878.     elseif command:lower()=="meleemode" then
  879.         if MeleeMode then
  880.             MeleeMode = false
  881.             enable("main","sub")
  882.             send_command('console_echo "Melee Mode: false"')
  883.         else
  884.             MeleeMode = true
  885.             equip({main="Nirvana",sub="Elan Strap +1"})
  886.             disable("main","sub")
  887.             send_command('console_echo "Melee Mode: true"')
  888.         end
  889.         is_valid = true
  890.     elseif command=="ToggleIdle" then
  891.         is_valid = true
  892.         if IdleMode=="Refresh" then
  893.             IdleMode = "DT"
  894.         elseif IdleMode=="DT" then
  895.             IdleMode = "PetDT"
  896.         elseif IdleMode=="PetDT" then
  897.             IdleMode = "DD"
  898.         else
  899.             IdleMode = "Refresh"
  900.         end
  901.         send_command('console_echo "Idle Mode: ['..IdleMode..']"')
  902.     elseif command:lower()=="lowhp" then
  903.         -- Use for "Cure 500 HP" objectives in Omen
  904.         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"})
  905.         return
  906.     elseif string.sub(command:lower(),1,12)=="meteorstrike" then
  907.         MeteorStrike = string.sub(command,13,13)
  908.         send_command('console_echo "Meteor Strike: '..MeteorStrike..'/5"')
  909.         is_valid = true
  910.     elseif string.sub(command:lower(),1,8)=="geocrush" then
  911.         Geocrush = string.sub(command,9,9)
  912.         send_command('console_echo "Geocrush: '..Geocrush..'/5"')
  913.         is_valid = true
  914.     elseif string.sub(command:lower(),1,9)=="grandfall" then
  915.         GrandFall = string.sub(command,10,10)
  916.         send_command('console_echo "Grand Fall: '..GrandFall..'/5"')
  917.         is_valid = true
  918.     elseif string.sub(command:lower(),1,9)=="windblade" then
  919.         WindBlade = +string.sub(command,10,10)
  920.         send_command('console_echo "Wind Blade: '..WindBlade..'/5"')
  921.         is_valid = true
  922.     elseif string.sub(command:lower(),1,14)=="heavenlystrike" then
  923.         HeavenlyStrike = string.sub(command,15,15)
  924.         send_command('console_echo "Heavenly Strike: '..HeavenlyStrike..'/5"')
  925.         is_valid = true
  926.     elseif string.sub(command:lower(),1,12)=="thunderstorm" then
  927.         Thunderstorm = string.sub(command,13,13)
  928.         send_command('console_echo "Thunderstorm: '..Thunderstorm..'/5"')
  929.         is_valid = true
  930.     elseif command=="TestMode" then
  931.         Test = Test + 1
  932.         if Test==3 then
  933.             Test = 0
  934.         end
  935.         is_valid = true
  936.         send_command('console_echo "Test Mode: '..tostring(Test)..'"')
  937.     end
  938.  
  939.     if not is_valid then
  940.         send_command('console_echo "gs c {Refresh|DT|DD|PetDT|Favor} {AccMode} {ImpactMode} {MeleeMode}"')
  941.     end
  942.     idle()
  943. end
  944.  
  945. function idle()
  946.     --if TownIdle:contains(world.area:lower()) then
  947.     --  return
  948.     --end
  949.     if pet.isvalid then
  950.         if IdleMode=='DT' then
  951.             equip(sets.aftercast.Perp_DT)
  952.         elseif string.find(pet.name,'Spirit') then
  953.             equip(sets.aftercast.Spirit)
  954.         elseif IdleMode=='PetDT' then
  955.             if ForceIlvl then
  956.                 equip(sets.aftercast.Avatar_DT_Ilvl)
  957.             else
  958.                 equip(sets.aftercast.Avatar_DT)
  959.             end
  960.         elseif IdleMode=='Refresh' then
  961.             if player.mpp < 50 then
  962.                 equip(sets.aftercast.Perp_RefreshSub50)
  963.             else
  964.                 equip(sets.aftercast.Perp_Refresh)
  965.             end
  966.         elseif IdleMode=='Favor' then
  967.             equip(sets.aftercast.Perp_Favor)
  968.         elseif IdleMode=='Zendik' then
  969.             equip(sets.aftercast.Perp_Zendik)
  970.         elseif MeleeMode then
  971.             equip(sets.aftercast.Perp_Melee)
  972.         elseif IdleMode=='DD' then
  973.             equip(sets.aftercast.Perp_DD)
  974.         end
  975.         -- Gaiters if Fleet Wind is up
  976.         if buffactive['Quickening'] and IdleMode~='DT' and not ForceIlvl then
  977.             equip({feet="Herald's Gaiters"})
  978.         end
  979.     else
  980.         if IdleMode=='DT' then
  981.             equip(sets.aftercast.DT)
  982.         elseif MeleeMode and IdleMode=='DD' then
  983.             equip(sets.aftercast.Perp_Melee)
  984.         elseif ForceIlvl then
  985.             equip(sets.aftercast.Idle_Ilvl)
  986.         else
  987.             equip(sets.aftercast.Idle)
  988.         end
  989.     end
  990.     -- Balrahn's Ring
  991.     --if Salvage:contains(world.area) then
  992.     --  equip({ring2="Balrahn's Ring"})
  993.     --end
  994.     -- Maquette Ring
  995.     --if world.area=='Maquette Abdhaljs-Legion' and not IdleMode=='DT' then
  996.     --  equip({ring2="Maquette Ring"})
  997.     --end
  998. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top