daily pastebin goal
37%
SHARE
TWEET

Pergatory's SMN Gearswap

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