daily pastebin goal
93%
SHARE
TWEET

Pergatory's SMN Gearswap

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