Pergatory

Pergatory's RUN Gearswap

Jan 29th, 2017 (edited)
4,250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 37.82 KB | None | 0 0
  1. -- When engaged:
  2. -- TPMode determines aftercast set used. F9 will toggle between TP, MidHybrid, and Hybrid modes.
  3. -- Other modes may be accessed with "/console gs c TP <mode>"
  4.  
  5. -- When disengaged:
  6. -- IdleMode determines aftercast set used. F10 will toggle between DT, Kite, and Regain modes.
  7. -- Other modes may be accessed with "/console gs c Idle <mode>"
  8.  
  9. -- Some modes can be applied to both at once by not specifying "TP" or "Idle".
  10. -- For example: "/console gs c DT" or "/console gs c Kite"
  11. -- It is recommended to have "/console gs c DT" on a macro/bind for quickly going full DT.
  12.  
  13.  
  14. -- Applying Runes:
  15. -- This Lua uses a flexible system to allow you to apply your chosen runes with a single macro.
  16. -- The macro to activate a rune is:
  17. --      /console gs c Rune
  18. -- To change your selected rune, add an element after the word "Rune".
  19. --      Choices: Fire Earth Water Wind Ice Thunder Light Dark
  20. -- **It is very important to capitalize the first letter and only the first letter.**
  21. -- For example:
  22. --      /console gs c RuneFire
  23. --      /console gs c Rune Fire
  24. -- This will set your rune configuration to [Fire - Fire - Fire] indicating 3x Ignis runes.
  25.  
  26. -- You only need to set the elements once. After that, calling "gs c Rune" will cycle through them.
  27.  
  28. -- You may select up to 3 elements to cycle. For example:
  29. --      /console gs c RuneEarthWindIce
  30. --      /console gs c Rune Earth Wind Ice
  31.  
  32. function file_unload()
  33.     send_command('unbind f9')
  34.     send_command('unbind f10')
  35.     send_command('unbind f11')
  36.     send_command('unbind f12')
  37.     send_command('unbind ^f10')
  38.     send_command('unbind ^f11')
  39.     send_command('unbind ^f12')
  40. end
  41. function get_sets()
  42.     send_command('bind f9 gs c ToggleTP') -- F9 = Toggle TP Set (Used when engaged)
  43.     send_command('bind f10 gs c ToggleIdle') -- F10 = Toggle Idle Set (Used when not engaged)
  44.     send_command('bind f11 input /item "Panacea" <me>')
  45.     send_command('bind f12 input /item "Holy Water" <me>')
  46.     send_command('bind ^f10 gs c TH') -- Ctrl+F10 = Treasure Hunter toggle
  47.     send_command('bind ^f11 gs c Turms') -- Ctrl+F11 = Turms toggle for parry healing
  48.     send_command('bind ^f12 gs equip midcast.Phalanx') -- Ctrl+F12 to equip Phalanx gear when it's being cast on you
  49.  
  50.     StartLockStyle = '89'
  51.     TPMode = 'DT'
  52.     IdleMode = 'Kite'
  53.     AccMode = false -- "/console gs c Acc"
  54.     LowHate = false -- "/console gs c LowHate" - I use this to take Enmity+ out of my JA sets when I don't want a lot of hate.
  55.     Turms = false -- "/console gs c Turms" - This mode favors more parry healing when engaged
  56.     TH = false -- "/console gs TH" to engage & cast in TH gear
  57.     Announcements = true -- Announce Gambit & Rayke elements to the party (uses your first rune's element)
  58.     Rune_ind = 1
  59.     Rune = {}
  60.     Rune[1] = 'Dark'
  61.     Rune[2] = 'Dark'
  62.     Rune[3] = 'Dark'
  63.     ResistAilments = false
  64.     ResistStun = false
  65.     ResistPara = false
  66.     ResistSilence = false
  67.     ResistDeath = false
  68.     ResistCharm = false
  69.    
  70.     TPModeCommands = {'DT','TP','MidHybrid','Hybrid','HybridFull','Kite','Sword','Regain','KiteRegain','SB'}
  71.     IdleModeCommands = {'DT','Kite','Ailment','Regain','Refresh','MEva','Def','MDB'}
  72.  
  73.     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"}
  74.     Escha = S{"escha - zi'tah","escha - ru'aun","reisenjima"}
  75.     EnhancingSkillSpells = S{"Temper","Barfire","Barblizzard","Baraero","Barstone","Barthunder","Barwater"}
  76.     InterruptSpells = S{"Cocoon","Geist Wall","Sheep Song","Healing Breeze","Aquaveil","Sleepga","Poisonga"}
  77.     MAccWeaponskills = S{"Weapon Break","Armor Break"}
  78.  
  79.     macrobook = 2
  80.     macroset = 1
  81.     if player.sub_job=='WAR' then
  82.         macrobook = 1
  83.     elseif player.sub_job=='NIN' then
  84.         macrobook = 3
  85.     elseif player.sub_job=='SAM' then
  86.         macrobook = 15
  87.     elseif player.sub_job=='DRK' then
  88.         macrobook = 14
  89.     end
  90.     send_command('input /macro book '..macrobook..';wait .1;input /macro set '..macroset..';wait 3;input /lockstyleset '..StartLockStyle)
  91.     send_command('console_echo "Panacea: F11 ~~ Holy Water: F12 ~~ TreasureHunter: Ctrl+F10 ~~ Turms: Ctrl+F11"')
  92.     send_command('console_echo "Rune Mode: ['..Rune[1]..' - '..Rune[2]..' - '..Rune[3]..']"')
  93.     send_command('console_echo "TP Mode: ['..TPMode..'] ~ Idle Mode: ['..IdleMode..']"')
  94.  
  95.     -- This is your full defense set. It will be used as a baseline for several other sets.
  96.     -- It's ok for this set to be overcapped on DT, because sets that inherit it may override slots and lose DT.
  97.     sets.DT_Base = {
  98.         ammo="Yamarang",
  99.         head="Nyame Helm",
  100.         neck="Futhark Torque +2",
  101.         ear1="Odnowa Earring +1",
  102.         ear2="Tuisto Earring",
  103.         body="Adamantite Armor",
  104.         hands="Nyame Gauntlets",
  105.         ring1={name="Moonlight Ring", bag="wardrobe2"},
  106.         ring2="Defending Ring",
  107.         back={ name="Ogma's Cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+10','Enmity+10','DEF+50',}},
  108.         waist="Engraved Belt",
  109.         legs="Erilaz Leg Guards +3",
  110.         feet="Erilaz Greaves +3"
  111.     }
  112.  
  113.     -- Max HP set, mostly just used for One for All
  114.     sets.HP_Base = {
  115.         ammo="Staunch Tathlum +1",
  116.         head="Runeist Bandeau +3",
  117.         neck="Sanctity Necklace",
  118.         ear1="Odnowa Earring +1",
  119.         ear2="Tuisto Earring",
  120.         body="Runeist Coat +3",
  121.         hands="Regal Gauntlets",
  122.         ring1={name="Moonlight Ring", bag="wardrobe2"},
  123.         ring2={name="Moonlight Ring", bag="wardrobe4"},
  124.         back="Moonlight Cape",
  125.         waist="Platinum Moogle Belt",
  126.         legs="Carmine Cuisses +1",
  127.         feet="Nyame Sollerets"
  128.     }
  129.    
  130.     -- Base Magic Attack Bonus set, for elemental weaponskills, Lunge, and Swipe
  131.     sets.MAB_Base = {
  132.         ammo="Seething Bomblet +1",
  133.         head="Agwu's Cap",
  134.         neck="Sanctity Necklace",
  135.         ear1="Friomisi Earring",
  136.         ear2="Crematio Earring",
  137.         body="Agwu's Robe",
  138.         hands="Agwu's Gages",
  139.         ring1="Mujin Band",
  140.         ring2="Shiva Ring +1",
  141.         back="Evasionist's Cape",
  142.         waist="Orpheus's Sash",
  143.         legs="Agwu's Slops",
  144.         feet="Agwu's Pigaches"
  145.     }
  146.  
  147.     -- Pure accuracy set currently only used for Box Step, but could be used elsewhere.
  148.     sets.Acc_Base = {
  149.         ammo="Cath Palug Stone",
  150.         head="Rune. Bandeau +3",
  151.         body="Runeist Coat +3",
  152.         hands="Runeist Mitons +3",
  153.         legs="Erilaz Leg Guards +3",
  154.         feet="Erilaz Greaves +3",
  155.         neck="Sanctity Necklace",
  156.         waist="Eschan Stone",
  157.         ear1="Zennaroi Earring",
  158.         ear2="Telos Earring",
  159.         ring1="Regal Ring",
  160.         ring2="Varar Ring +1",
  161.         back={ name="Ogma's cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10','Phys. dmg. taken-10%',}},
  162.     }
  163.  
  164.     -- Treasure Hunter set. Don't put anything in here except TH+ gear.
  165.     -- It overwrites several other sets when TH toggle is on (Ctrl+F10).
  166.     sets.TH = {
  167.         head="Volte Cap",
  168.         waist="Chaac Belt",
  169.         hands="Volte Bracers",
  170.         feet="Volte Boots"
  171.     }
  172.    
  173.     sets.HolyWater = {
  174.         neck="Nicander's Necklace",
  175.         ring2="Purity Ring"
  176.     }
  177.  
  178.     -- ************************************************************************
  179.     --                               Precast
  180.     -- ************************************************************************
  181.  
  182.     sets.precast = {}
  183.  
  184.     -- I aim for 70 FC with 1 merit in Inspiration for this set
  185.     sets.precast.FC = {
  186.         ammo="Sapience Orb", -- +2
  187.         head="Rune. Bandeau +3", -- +14
  188.         neck="Orunmila's Torque", -- +5
  189.         ear1="Loquacious Earring", -- +2
  190.         ear2="Etiolation Earring", -- +1
  191.         body={ name="Adhemar Jacket +1", augments={'HP+105','"Fast Cast"+10','Magic dmg. taken -4',}}, -- +10
  192.         hands="Leyline Gloves", -- +8
  193.         ring1={name="Moonlight Ring", bag="wardrobe2"},
  194.         ring2="Kishar Ring", -- +4
  195.         back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','HP+20','"Fast Cast"+10','Spell interruption rate down-10%',}}, -- +10
  196.         waist={ name="Platinum Moogle Belt", priority=12 },
  197.         legs="Ayanmo Cosciales +2", -- +6
  198.         feet={ name="Carmine Greaves +1", priority=11 } -- +8
  199.     }
  200.  
  201.     sets.precast.FC_Enhancing = set_combine(sets.precast.FC, {
  202.         waist="Siegel Sash",
  203.         legs="Futhark Trousers +3"
  204.     })
  205.    
  206.     sets.precast.FC_Utsusemi = sets.precast.FC
  207.  
  208.     -- ************************************************************************
  209.     --                           Midcast - Spells
  210.     -- ************************************************************************
  211.  
  212.     sets.midcast = {}
  213.  
  214.     sets.midcast.Enhancing = set_combine(sets.DT_Base, {
  215.         head="Erilaz Galea +3",
  216.         neck="Incanter's Torque",
  217.         ear1="Mimir Earring",
  218.         ear2="Andoaa Earring",
  219.         hands="Runeist Mitons +3",
  220.         ring1={name="Stikini Ring +1", bag="wardrobe2"},
  221.         ring2={name="Stikini Ring +1", bag="wardrobe4"},
  222.         back="Merciful Cape",
  223.         waist="Olympus Sash",
  224.         legs="Futhark Trousers +3"
  225.     })
  226.  
  227.     sets.midcast.EnhancingDuration = set_combine(sets.midcast.Enhancing, {
  228.         hands="Regal Gauntlets"
  229.     })
  230.  
  231.     sets.midcast.Regen = set_combine(sets.midcast.EnhancingDuration, {
  232.         head="Rune. Bandeau +3",
  233.         neck="Sacro Gorget",
  234.         ear2="Erilaz Earring +1",
  235.         ring1={name="Moonlight Ring", bag="wardrobe2"},
  236.         ring2={name="Moonlight Ring", bag="wardrobe4"},
  237.         waist="Sroda Belt"
  238.     })
  239.  
  240.     sets.midcast.Divine = set_combine(sets.DT_Base, {
  241.         neck="Incanter's Torque",
  242.         ear1="Beatific Earring",
  243.         ring1={name="Stikini Ring +1", bag="wardrobe2"},
  244.         ring2={name="Stikini Ring +1", bag="wardrobe4"},
  245.         waist="Olympus Sash",
  246.         legs="Runeist Trousers +3"
  247.     })
  248.  
  249.     sets.midcast.Enmity = {
  250.         ammo={ name="Sapience Orb", }, -- +2
  251.         head={ name="Halitus Helm", }, -- +8
  252.         neck={ name="Futhark Torque +2", }, -- +10 (moonlight has +15 but no DT)
  253.         ear1={ name="Trux Earring", }, -- +5
  254.         ear2={ name="Cryptic Earring", }, -- +4
  255.         body={ name="Emet Harness +1", }, -- +10
  256.         hands={ name="Kurys Gloves", }, -- +9
  257.         ring1={ name="Moonlight Ring", bag="wardrobe2" },
  258.         ring2={ name="Eihwaz Ring", priority=1 }, -- +5
  259.         back={ name="Ogma's Cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+10','Enmity+10','DEF+50',}}, -- +10
  260.         --waist={ name="Trance Belt", }, -- +4
  261.         waist={ name="Platinum Moogle Belt" },
  262.         legs={ name="Erilaz Leg Guards +3" }, -- +13
  263.         feet={ name="Erilaz Greaves +3", } -- +7
  264.     }
  265.  
  266.     sets.midcast.LowHate = {
  267.         ammo="Yamarang",
  268.         head="Nyame Helm",
  269.         neck="Loricate Torque +1",
  270.         ear1="Odnowa Earring +1",
  271.         ear2="Tuisto Earring",
  272.         body="Nyame Mail",
  273.         hands="Nyame Gauntlets",
  274.         ring1={name="Moonlight Ring", bag="wardrobe2"},
  275.         ring2="Defending Ring",
  276.         back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','HP+20','"Fast Cast"+10','Spell interruption rate down-10%',}},
  277.         waist="Engraved Belt",
  278.         legs="Nyame Flanchard",
  279.         feet="Nyame Sollerets"
  280.     }
  281.  
  282.     sets.midcast.Interrupt = {
  283.         ammo="Staunch Tathlum +1",
  284.         head="Erilaz Galea +3",
  285.         neck="Moonlight Necklace",
  286.         ear1="Odnowa Earring +1",
  287.         ear2="Tuisto Earring",
  288.         body="Nyame Mail",
  289.         hands="Rawhide Gloves",
  290.         ring1={name="Moonlight Ring", bag="wardrobe2"},
  291.         ring2="Defending Ring",
  292.         back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','HP+20','"Fast Cast"+10','Spell interruption rate down-10%',}},
  293.         waist="Audumbla Sash",
  294.         legs="Carmine Cuisses +1",
  295.         feet="Erilaz Greaves +3"
  296.     }
  297.  
  298.     sets.midcast["Flash"] = set_combine(sets.midcast.Enmity, { })
  299.     sets.midcast["Foil"] = set_combine(sets.midcast.Enmity, { })
  300.     sets.midcast["Foil"].LowHate = set_combine(sets.midcast.LowHate, { })
  301.  
  302.     -- Phalanx tiers: 443 472 500
  303.     -- I don't recommend shooting for 500 unless you have 30+ MLs. It's good to have some HP & DT in this set.
  304.     sets.midcast["Phalanx"] = set_combine(sets.midcast.Enhancing, {
  305.         head="Futhark Bandeau +3",
  306.         neck="Futhark Torque +2",
  307.         body={ name="Taeon Tabard", augments={'Mag. Evasion+20','Spell interruption rate down -10%','Phalanx +3',}},
  308.         hands={ name="Taeon Gloves", augments={'Mag. Evasion+20','Enemy crit. hit rate -3','Phalanx +3',}},
  309.         --ring1={name="Moonlight Ring", bag="wardrobe2"},
  310.         legs={ name="Herculean Trousers", augments={'MND+8','DEX+5','Phalanx +5','Accuracy+12 Attack+12','Mag. Acc.+2 "Mag.Atk.Bns."+2',}},
  311.         back={ name="Moonlight Cape", priority=1},
  312.         waist={ name="Platinum Moogle Belt", priority=2 },
  313.         feet={ name="Taeon Boots", augments={'Mag. Evasion+20','Spell interruption rate down -10%','Phalanx +3',}}
  314.     })
  315.  
  316.     sets.midcast["Refresh"] = set_combine(sets.midcast.EnhancingDuration, {
  317.         head="Erilaz Galea +3",
  318.         waist="Gishdubar Sash"
  319.     })
  320.  
  321.     sets.midcast["Stoneskin"] = set_combine(sets.midcast.Interrupt, {
  322.         ear2="Earthcry Earring",
  323.         body={ name="Taeon Tabard", augments={'Mag. Evasion+20','Spell interruption rate down -10%','Phalanx +3',}},
  324.         waist="Siegel Sash"
  325.     })
  326.  
  327.     sets.midcast.Cure = set_combine(sets.DT_Base, {
  328.         --ammo="Staunch Tathlum +1",
  329.         neck="Sacro Gorget",
  330.         --ear1="Meili Earring",
  331.         --ear2="Beatific Earring",
  332.         body="Nyame Mail",
  333.         hands="Agwu's Gages",
  334.         ring1="Menelaus's Ring",
  335.         --back="Tempered Cape +1",
  336.         back="Moonlight Cape",
  337.         waist="Sroda Belt",
  338.     })
  339.  
  340.     sets.midcast.CuringWaltz = {
  341.     }
  342.  
  343.     sets.midcast["Absorb-TP"] = {
  344.         ammo="Yamarang",
  345.         head="Erilaz Galea +3",
  346.         neck="Erra Pendant",
  347.         ear1="Dignitary's Earring",
  348.         ear2="Mani Earring",
  349.         body="Nyame Mail",
  350.         hands="Nyame Gauntlets",
  351.         ring1={name="Stikini Ring +1", bag="wardrobe2"},
  352.         ring2={name="Stikini Ring +1", bag="wardrobe4"},
  353.         back="Moonlight Cape",
  354.         waist="Acuity Belt +1",
  355.         legs="Erilaz Leg Guards +3",
  356.         feet="Agwu's Pigaches"
  357.     }
  358.  
  359.     -- ************************************************************************
  360.     --                        Midcast - Weapon Skills
  361.     -- ************************************************************************
  362.  
  363.     -- Main WS set - I based mine on Dimidiation
  364.     sets.midcast.Weaponskill = {
  365.         ammo="Knobkierrie",
  366.         head="Nyame Helm",
  367.         neck="Fotia Gorget",
  368.         ear1="Sherida Earring",
  369.         ear2="Ishvara Earring",
  370.         body="Nyame Mail",
  371.         hands="Nyame Gauntlets",
  372.         ring1="Regal Ring",
  373.         ring2="Epaminondas's Ring",
  374.         back={ name="Ogma's cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}},
  375.         waist="Fotia Belt",
  376.         legs="Nyame Flanchard",
  377.         feet="Nyame Sollerets"
  378.     }
  379.  
  380.     sets.midcast.Weaponskill_Acc = set_combine(sets.midcast.Weaponskill, {
  381.         ammo="Cath Palug Stone",
  382.         head="Erilaz Galea +3",
  383.         ear1="Zennaroi Earring",
  384.         ear2="Telos Earring",
  385.         body="Erilaz Surcoat +3",
  386.         hands="Runeist Mitons +3",
  387.         ring2="Chirich Ring +1",
  388.         back={ name="Ogma's cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10','Phys. dmg. taken-10%',}},
  389.         legs="Erilaz Leg Guards +3",
  390.         feet="Erilaz Greaves +3",
  391.     })
  392.    
  393.     sets.midcast.MagicWeaponskill = set_combine(sets.midcast.Weaponkill, {
  394.         neck="Sanctity Necklace",
  395.         ear1="Friomisi Earring",
  396.         ring1="Regal Ring",
  397.         waist="Orpheus's Sash",
  398.     })
  399.  
  400.     sets.midcast.MAccWeaponskill = set_combine(sets.midcast.Weaponskill, {
  401.         ear1="Dignitary's Earring",
  402.     })
  403.  
  404.     sets.midcast["Savage Blade"] = set_combine(sets.midcast.Weaponskill, {
  405.         neck="Futhark Torque +2",
  406.         ring1="Sroda Ring",
  407.         waist="Engraved Belt",
  408.     })
  409.  
  410.     sets.midcast["Resolution"] = set_combine(sets.midcast.Weaponskill, {
  411.         ammo="Knobkierrie",
  412.         neck="Fotia Gorget",
  413.         ear2="Cessance Earring",
  414.         body={ name="Adhemar Jacket +1", augments={'STR+12','DEX+12','Attack+20',}},
  415.         ring1="Regal Ring",
  416.         ring2="Niqmaddu Ring",
  417.         back={ name="Ogma's cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','"Dbl.Atk."+10','Phys. dmg. taken-10%',}},
  418.         waist="Fotia Belt",
  419.         legs="Meghanada Chausses +2",
  420.     })
  421.  
  422.     sets.midcast["Herculean Slash"] = set_combine(sets.MagicWeaponskill, {
  423.         ring2="Epaminondas's Ring",
  424.     })
  425.  
  426.     sets.midcast["Shockwave"] = set_combine(sets.midcast["Savage Blade"], {
  427.         waist="Fotia Belt"
  428.     })
  429.  
  430.     sets.midcast["Ruinator"] = set_combine(sets.midcast.Weaponskill_Acc, {
  431.     })
  432.    
  433.     sets.midcast["Seraph Blade"] = set_combine(sets.DT_Base, {
  434.     })
  435.  
  436.     -- ************************************************************************
  437.     --                          Midcast - Named Sets
  438.     -- ************************************************************************
  439.  
  440.     -- JOB ABILITIES --
  441.     sets.midcast["Elemental Sforzo"] = set_combine(sets.midcast.Enmity, { body="Futhark Coat +3" })
  442.     sets.midcast["Elemental Sforzo"].LowHate = set_combine(sets.midcast.LowHate, { body="Futhark Coat +3" })
  443.  
  444.     sets.midcast["Gambit"] = set_combine(sets.midcast.Enmity, { hands="Runeist Mitons +3" })
  445.     sets.midcast["Gambit"].LowHate = set_combine(sets.midcast.LowHate, { hands="Runeist Mitons +3" })
  446.  
  447.     sets.midcast["Rayke"] = set_combine(sets.midcast.Enmity, { feet="Futhark Boots +3" })
  448.     sets.midcast["Rayke"].LowHate = set_combine(sets.midcast.LowHate, { feet="Futhark Boots +3" })
  449.  
  450.     sets.midcast["Liement"] = set_combine(sets.midcast.Enmity, { body="Futhark Coat +3" })
  451.     sets.midcast["Liement"].LowHate = set_combine(sets.midcast.LowHate, { body="Futhark Coat +3" })
  452.    
  453.     sets.midcast["One For All"] = sets.HP_Base
  454.  
  455.     sets.midcast["Valiance"] = set_combine(sets.DT_Base, {
  456.         body="Runeist Coat +3",
  457.         back={ name="Ogma's Cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+10','Enmity+10','DEF+50',}},
  458.         legs="Futhark Trousers +3"
  459.     })
  460.  
  461.     sets.midcast["Vallation"] = set_combine(sets.DT_Base, {
  462.         body="Runeist Coat +3",
  463.         back={ name="Ogma's Cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+10','Enmity+10','DEF+50',}},
  464.         legs="Futhark Trousers +3"
  465.     })
  466.  
  467.     sets.midcast["Pflug"] = set_combine(sets.midcast.Enmity, {})
  468.     sets.midcast["Pflug"].LowHate = set_combine(sets.midcast.LowHate, {})
  469.  
  470.     sets.midcast["Battuta"] = set_combine(sets.midcast.Enmity, { head="Futhark Bandeau +3" })
  471.     sets.midcast["Battuta"].LowHate = set_combine(sets.midcast.LowHate, { head="Futhark Bandeau +3" })
  472.  
  473.     sets.midcast["Vivacious Pulse"] = set_combine(sets.midcast.Divine, { head="Erilaz Galea +3" })
  474.  
  475.     sets.midcast["Embolden"] = { back="Evasionist's Cape" }
  476.  
  477.     sets.midcast["Swordplay"] = set_combine(sets.midcast.Enmity, { hands="Futhark Mitons +3" })
  478.     sets.midcast["Swordplay"].LowHate = set_combine(sets.midcast.LowHate, { hands="Futhark Mitons +3" })
  479.  
  480.     sets.midcast["Lunge"] = sets.MAB_Base
  481.  
  482.     sets.midcast["Swipe"] = sets.MAB_Base
  483.  
  484.     sets.midcast["Box Step"] = sets.Acc_Base
  485.  
  486.     sets.midcast.BP = {
  487.         legs={ name="Herculean Trousers", augments={'"Blood Pact" ability delay -6','MND+5','Crit.hit rate+2','Accuracy+12 Attack+12',}},
  488.     }
  489.  
  490.     -- ************************************************************************
  491.     --                               Aftercast
  492.     -- ************************************************************************
  493.  
  494.     sets.aftercast = {}
  495.  
  496.     sets.aftercast.DT = set_combine(sets.DT_Base, {
  497.         --body="Runeist Coat +3",
  498.         ring1="Gelatinous Ring +1",
  499.         ring2="Shadow Ring"
  500.     })
  501.  
  502.     sets.aftercast.DT_Escha = set_combine(sets.aftercast.DT, {
  503.     })
  504.  
  505.     sets.aftercast.DT_Turms = set_combine(sets.aftercast.DT, {
  506.         --ammo="Staunch Tathlum +1",
  507.         hands="Turms Mittens +1",
  508.         --ring2="Defending Ring",
  509.         back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+10','Enmity+10','Parrying rate+5%',}},
  510.         --waist="Flume Belt +1",
  511.         legs="Erilaz Leg Guards +3",
  512.         feet="Turms Leggings +1"
  513.     })
  514.  
  515.     sets.aftercast.DT_TurmsBattuta = sets.aftercast.DT_Turms
  516.  
  517.     -- If your set isn't capped when Shell is down, you can put a custom set here.
  518.     sets.aftercast.DT_NoShell = set_combine(sets.aftercast.DT, {
  519.     })
  520.    
  521.     sets.aftercast.MEva = set_combine(sets.aftercast.DT, {
  522.         body="Runeist Coat +3",
  523.         ear1="Sanare Earring",
  524.     })
  525.    
  526.     sets.aftercast.Def = set_combine(sets.aftercast.DT, {
  527.         ammo="Brigantia Pebble",
  528.         neck="Loricate Torque +1",
  529.         body="Adamantite Armor",
  530.         ring2="Gelatinous Ring +1"
  531.     })
  532.    
  533.     -- Set for non-elemental damage
  534.     sets.aftercast.MDB = set_combine(sets.aftercast.DT, {
  535.         head="Erilaz Galea +3",
  536.         neck="Warder's Charm +1",
  537.         body="Adamantite Armor",
  538.         ear2="Sanare Earring",
  539.     })
  540.  
  541.     sets.aftercast.Ailment = set_combine(sets.aftercast.DT, {
  542.         ear2="Hearty Earring",
  543.         hands="Volte Bracers",
  544.         legs="Runeist Trousers +3"
  545.     })
  546.  
  547.     sets.aftercast.Kite = set_combine(sets.aftercast.DT, {
  548.         --ring2="Defending Ring",
  549.         legs="Carmine Cuisses +1"
  550.     })
  551.  
  552.     sets.aftercast.Kite_Escha = set_combine(sets.aftercast.Kite, {
  553.     })
  554.  
  555.     sets.aftercast.Refresh = set_combine(sets.aftercast.Kite, {
  556.         ammo="Homiliary",
  557.         head="Rawhide Mask",
  558.         neck="Bathy Choker +1",
  559.         body="Runeist Coat +3",
  560.         hands="Regal Gauntlets",
  561.         ring1={name="Stikini Ring +1", bag="wardrobe2"},
  562.         ring2={name="Stikini Ring +1", bag="wardrobe4"},
  563.         waist="Flume Belt +1"
  564.     })
  565.  
  566.     sets.aftercast.DT_Regain = set_combine(sets.aftercast.DT, {
  567.         --ammo="Brigantia Pebble",
  568.         head="Turms Cap +1",
  569.         --ear2="Moonshade Earring",
  570.         body="Adamantite Armor",
  571.         --ring1="Karieyh Ring",
  572.         ring2="Shadow Ring",
  573.     })
  574.    
  575.     sets.aftercast.Kite_Regain = set_combine(sets.aftercast.Kite, {
  576.         head="Turms Cap +1",
  577.         body="Adamantite Armor",
  578.         ring2="Shadow Ring",
  579.     })
  580.  
  581.     sets.aftercast.TP = {
  582.         ammo="Aurgelmir Orb +1",
  583.         head={ name="Adhemar Bonnet +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
  584.         neck="Lissome Necklace",
  585.         ear1="Sherida Earring",
  586.         ear2="Telos Earring",
  587.         body="Turms Harness +1",
  588.         hands="Adhemar Wristbands +1",
  589.         ring1="Epona's Ring",
  590.         ring2="Niqmaddu Ring",
  591.         back={ name="Ogma's cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10','Phys. dmg. taken-10%',}},
  592.         waist="Ioskeha Belt +1",
  593.         legs="Samnuha Tights",
  594.         feet={ name="Herculean Boots", augments={'Accuracy+26','"Triple Atk."+4','Attack+11',}}
  595.     }
  596.  
  597.     sets.aftercast.TP_Turms = set_combine(sets.aftercast.TP, {
  598.         hands="Turms Mittens +1",
  599.         feet="Turms Leggings +1"
  600.     })
  601.  
  602.     sets.aftercast.TP_Sword = set_combine(sets.aftercast.TP, {
  603.         body={ name="Adhemar Jacket +1", augments={'STR+12','DEX+12','Attack+20',}},
  604.         --hands={ name="Herculean Gloves", augments={'Accuracy+25 Attack+25','"Dual Wield"+4','STR+2','Accuracy+11','Attack+14',}},
  605.         waist="Reiki Yotai"
  606.     })
  607.  
  608.     -- I removed most of this stuff because my TP sets all have plenty of accuracy.
  609.     -- I mainly use my accuracy toggle for WS sets now.
  610.     sets.aftercast.TP_Acc = set_combine(sets.aftercast.TP, {
  611.         --neck="Combatant's Torque",
  612.         --ear1="Zennaroi Earring",
  613.         --legs="Carmine Cuisses +1",
  614.     })
  615.  
  616.     sets.aftercast.TP_MidHybrid = {
  617.         ammo="Yamarang",
  618.         head="Ayanmo Zucchetto +2",
  619.         neck="Futhark Torque +2",
  620.         ear1="Sherida Earring",
  621.         ear2="Telos Earring",
  622.         body="Ashera Harness",
  623.         hands="Adhemar Wristbands +1",
  624.         ring1={name="Moonlight Ring", bag="wardrobe2"},
  625.         ring2={name="Moonlight Ring", bag="wardrobe4"},
  626.         back={ name="Ogma's cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10','Phys. dmg. taken-10%',}},
  627.         waist="Ioskeha Belt +1",
  628.         legs="Meghanada Chausses +2",
  629.         feet={ name="Herculean Boots", augments={'Accuracy+26','"Triple Atk."+4','Attack+11',}}
  630.     }
  631.  
  632.     sets.aftercast.TP_MidHybridTurms = set_combine(sets.aftercast.TP_MidHybrid, {
  633.         hands="Turms Mittens +1",
  634.         feet="Turms Leggings +1"
  635.     })
  636.  
  637.     sets.aftercast.TP_Hybrid = {
  638.         ammo="Yamarang",
  639.         head="Ayanmo Zucchetto +2",
  640.         neck="Futhark Torque +2",
  641.         ear1="Sherida Earring",
  642.         ear2="Telos Earring",
  643.         body="Ashera Harness",
  644.         hands="Nyame Gauntlets",
  645.         ring1="Fickblix's Ring",
  646.         ring2={name="Moonlight Ring", bag="wardrobe4"},
  647.         back={ name="Ogma's cape", augments={'DEX+20','Accuracy+20 Attack+20','Accuracy+10','"Store TP"+10','Phys. dmg. taken-10%',}},
  648.         waist="Ioskeha Belt +1",
  649.         legs="Meghanada Chausses +2",
  650.         feet="Nyame Sollerets"
  651.     }
  652.    
  653.     sets.aftercast.TP_HybridTurms = set_combine(sets.aftercast.TP_Hybrid, {
  654.         hands="Turms Mittens +1",
  655.         legs="Erilaz Leg Guards +3",
  656.         feet="Turms Leggings +1"
  657.     })
  658.  
  659.     -- I change this set as needed. Currently a high-meva version of the Hybrid build.
  660.     sets.aftercast.TP_HybridFull = set_combine(sets.aftercast.TP_Hybrid, {
  661.         ammo="Yamarang",
  662.         head="Nyame Helm",
  663.         hands="Nyame Gauntlets",
  664.         neck="Anu Torque",
  665.         ring2={name="Chirich Ring +1", bag="wardrobe4"},
  666.         legs="Erilaz Leg Guards +3",
  667.         feet="Erilaz Greaves +3"
  668.     })
  669.    
  670.     sets.aftercast.TP_HybridFullTurms = set_combine(sets.aftercast.TP_HybridFull, {
  671.         ammo="Staunch Tathlum +1",
  672.         neck="Futhark Torque +2",
  673.         hands="Turms Mittens +1",
  674.         ring1={name="Moonlight Ring", bag="wardrobe2"},
  675.         ring2="Defending Ring",
  676.         back={ name="Ogma's cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+10','Enmity+10','Parrying rate+5%',}},
  677.         legs="Erilaz Leg Guards +3",
  678.         feet="Turms Leggings +1"
  679.     })
  680.  
  681.     sets.aftercast.TP_Regain = set_combine(sets.aftercast.DT_Regain, {
  682.     })
  683.  
  684.     sets.aftercast.TP_Kite_Regain = set_combine(sets.aftercast.TP_Hybrid, {
  685.         head="Turms Cap +1"
  686.     })
  687.  
  688.     sets.aftercast.TP_HybridAilment = set_combine(sets.aftercast.TP_Hybrid, {
  689.         ear1="Hearty Earring",
  690.         legs="Runeist Trousers +3"
  691.     })
  692.    
  693.     -- Subtle Blow set (I assume no Auspice because I mostly use this to low-man Mboze RP)
  694.     sets.aftercast.TP_SB = {
  695.         ammo="Staunch Tathlum +1",
  696.         head="Nyame Helm",
  697.         neck="Bathy Choker +1",
  698.         ear1="Sherida Earring",
  699.         ear2="Dignitary's Earring",
  700.         body="Nyame Mail",
  701.         hands="Nyame Gauntlets",
  702.         ring1={name="Chirich Ring +1", bag="wardrobe2"},
  703.         ring2={name="Chirich Ring +1", bag="wardrobe4"},
  704.         back={ name="Ogma's Cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Mag. Evasion+10','Enmity+10','DEF+50',}},
  705.         waist="Ninurta's Sash",
  706.         legs="Erilaz Leg Guards +3",
  707.         feet="Erilaz Greaves +3"
  708.     }
  709. end
  710.  
  711. function precast(spell)
  712.     if spell.type=="Item" then
  713.         if spell.name=="Holy Water" then
  714.             equip(sets.HolyWater)
  715.         end
  716.         return
  717.     end
  718.     -- Spell fast cast
  719.     if spell.action_type=="Magic" then
  720.         if spell.skill=="Enhancing Magic" then
  721.             equip(sets.precast.FC_Enhancing)
  722.         elseif string.find(spell.name,"Utsusemi") then
  723.             equip(sets.precast.FC_Utsusemi)
  724.         else
  725.             equip(sets.precast.FC)
  726.         end
  727.     end
  728.     -- Prevents Valiance/Vallation/Liement from being prevented by each other (cancels whichever is active)
  729.     if spell.name=='Valiance' or spell.name=='Vallation' or spell.name=='Liement' then
  730.         if buffactive['Valiance'] then
  731.             cast_delay(0.2)
  732.             windower.ffxi.cancel_buff(535)
  733.         elseif buffactive['Vallation'] then
  734.             cast_delay(0.2)
  735.             windower.ffxi.cancel_buff(531)
  736.         elseif buffactive['Liement'] then
  737.             cast_delay(0.2)
  738.             windower.ffxi.cancel_buff(537)
  739.         end
  740.     elseif spell.name=="Stoneskin" and buffactive["Stoneskin"] then
  741.         windower.send_command('cancel 37;')
  742.     end
  743.     -- Gambit and Rayke announcements
  744.     if Announcements then
  745.         if spell.english == "Gambit" then
  746.             send_command('timers delete "Gambit"')
  747.             send_command('timers create "Gambit" 96 down;wait 66;input /party Gambit [WEARING OFF IN 30 SEC.];wait 30;input /party Gambit [OFF];timers delete "Gambit"')
  748.             send_command('input /p Gambit['..Rune[1]..'] >> '..spell.target.name)
  749.         elseif spell.english == "Rayke" then
  750.             send_command('timers delete "Rayke"')
  751.             send_command('timers create "Rayke" 47 down;wait 32;input /party Rayke [WEARING OFF IN 15 SEC.];wait 15;input /party Rayke [OFF];timers delete "Rayke"')
  752.             send_command('input /p Rayke['..Rune[1]..'] >> '..spell.target.name)
  753.         end
  754.     end
  755. end
  756.  
  757. function midcast(spell)
  758.     if spell.type=="Item" then
  759.         return
  760.     end
  761.     -- Check for a specific set
  762.     if sets.midcast[spell.english] then
  763.         equipSet = sets.midcast[spell.english]
  764.         if LowHate and equipSet.LowHate then
  765.             equipSet = equipSet.LowHate
  766.         end
  767.         if AccMode and equipSet.Acc then
  768.             equipSet = equipSet.Acc
  769.         end
  770.         equip(equipSet)
  771.     elseif InterruptSpells:contains(spell.name) then
  772.         equip(sets.midcast.Interrupt)
  773.     -- Specific Spells
  774.     elseif string.find(spell.english, 'Cure') or string.find(spell.english, 'Curaga') then
  775.         equip(sets.midcast.Cure)
  776.     elseif string.sub(spell.name,1,12)=="Curing Waltz" then
  777.         equip(sets.midcast.CuringWaltz)
  778.     -- Enhancing
  779.     elseif spell.skill=="Enhancing Magic" then
  780.         if string.find(spell.name,"Regen") then
  781.             equip(sets.midcast.Regen)
  782.         elseif string.find(spell.name,"Protect") or string.find(spell.name,"Shell") then
  783.             equip(set_combine(sets.midcast.EnhancingDuration, {ring2="Sheltered Ring"}))
  784.         elseif EnhancingSkillSpells:contains(spell.name) then
  785.             equip(sets.midcast.Enhancing)
  786.         else
  787.             equip(sets.midcast.EnhancingDuration)
  788.         end
  789.  
  790.         if spell.name=="Stoneskin" and buffactive["Stoneskin"] then
  791.             windower.send_command('wait 1;cancel 37;')
  792.         elseif spell.name=="Sneak" and buffactive["Sneak"] and spell.target.type=="SELF" then
  793.             windower.send_command('cancel 71;')
  794.         end
  795.     -- Blue Magic
  796.     elseif spell.skill=="Blue Magic" then
  797.         equip(sets.midcast.Enmity)
  798.     -- Ninjutsu
  799.     elseif spell.type=="Ninjutsu" then
  800.         if spell.name=="Utsusemi: Ichi" then
  801.             if buffactive["Copy Image"] then
  802.                 windower.send_command('wait 1;cancel Copy Image;')
  803.             elseif buffactive["Copy Image (2)"] then
  804.                 windower.send_command('wait 1;cancel Copy Image (2);')
  805.             end
  806.         end
  807.         equip(sets.aftercast.DT)
  808.     -- Weaponskill
  809.     elseif spell.type=="WeaponSkill" then
  810.         if AccMode then
  811.             equip(sets.midcast.Weaponskill_Acc)
  812.         elseif MAccWeaponskills:contains(spell.name) then
  813.             equip(sets.midcast.MAccWeaponskill)
  814.         else
  815.             equip(sets.midcast.Weaponskill)
  816.         end
  817.     elseif spell.type=="BloodPactWard" or spell.type=="BloodPactRage" then
  818.         equip(sets.midcast.BP)
  819.     elseif LowHate then
  820.         equip(sets.midcast.LowHate)
  821.     else
  822.         equip(sets.midcast.Enmity)
  823.     end
  824.     if TH and spell.target.type=="MONSTER" then
  825.         equip(sets.TH)
  826.     end
  827. end
  828.  
  829. function aftercast(spell)
  830.     if spell.type=="Item" then
  831.         return
  832.     end
  833.     idle()
  834. end
  835.  
  836. function status_change(new,old)
  837.     idle()
  838. end
  839.  
  840. function self_command(command)
  841.     is_valid = command:lower()=="idle"
  842.     announceModes = false
  843.  
  844.     if command:lower()=="toggletp" then
  845.         is_valid = true
  846.         if TPMode=="TP" then
  847.             TPMode = "MidHybrid"
  848.         elseif TPMode=="MidHybrid" then
  849.             TPMode = "Hybrid"
  850.         elseif TPMode=="Hybrid" then
  851.             TPMode = "HybridFull"
  852.         else
  853.             TPMode = "TP"
  854.         end
  855.         announceModes = true
  856.     elseif command:lower()=="toggleidle" then
  857.         is_valid = true
  858.         if IdleMode=="DT" then
  859.             IdleMode = "Kite"
  860.         elseif IdleMode=="Kite" then
  861.             IdleMode = "KiteRegain"
  862.         else
  863.             IdleMode = "DT"
  864.         end
  865.         announceModes = true
  866.     elseif command:lower()=="dt" then
  867.         is_valid = true
  868.         TPMode = command
  869.         IdleMode = command
  870.         announceModes = true
  871.     elseif command:lower()=="kite" then
  872.         is_valid = true
  873.         TPMode = command
  874.         IdleMode = command
  875.         announceModes = true
  876.     elseif command:lower()=="regain" then
  877.         is_valid = true
  878.         TPMode = command
  879.         IdleMode = command
  880.         announceModes = true
  881.     -- "gs c TP <mode>" to change TP mode
  882.     elseif string.sub(command:lower(),1,2)=="tp" and string.len(command) > 3 then
  883.         tpCommand = string.sub(command,4,string.len(command))
  884.         for _, v in ipairs(TPModeCommands) do
  885.             if tpCommand:lower()==v:lower() then
  886.                 is_valid = true
  887.                 TPMode = v
  888.                 announceModes = true
  889.             end
  890.         end
  891.     -- "gs c Idle <mode>" to change Idle mode
  892.     elseif string.sub(command:lower(),1,4)=="idle" and string.len(command) > 5 then
  893.         idleCommand = string.sub(command,6,string.len(command))
  894.         for _, v in ipairs(IdleModeCommands) do
  895.             if idleCommand:lower()==v:lower() then
  896.                 is_valid = true
  897.                 IdleMode = v
  898.                 announceModes = true
  899.             end
  900.         end
  901.     elseif command:lower()=="acc" then
  902.         if AccMode then
  903.             is_valid = true
  904.             AccMode = false
  905.             send_command('console_echo "AccMode: false"')
  906.         else
  907.             is_valid = true
  908.             AccMode = true
  909.             send_command('console_echo "AccMode: true"')
  910.         end
  911.     elseif command:lower()=="turms" then
  912.         Turms = Turms==false
  913.         send_command('console_echo "Turms Healing: '..tostring(Turms)..'"')
  914.         is_valid = true
  915.     elseif command:lower()=="lowhate" then
  916.         LowHate = LowHate==false
  917.         send_command('console_echo "Low Hate Mode: '..tostring(LowHate)..'"')
  918.         is_valid = true
  919.     elseif command:lower()=="resistailments" then
  920.         ResistAilments = ResistAilments==false
  921.         send_command('console_echo "Resist Ailments: '..tostring(ResistAilments)..'"')
  922.         is_valid = true
  923.     elseif command:lower()=="resiststun" then
  924.         ResistStun = ResistStun==false
  925.         send_command('console_echo "Resist Stun: '..tostring(ResistStun)..'"')
  926.         is_valid = true
  927.     elseif command:lower()=="resistpara" then
  928.         ResistPara = ResistPara==false
  929.         send_command('console_echo "Resist Para: '..tostring(ResistPara)..'"')
  930.         is_valid = true
  931.     elseif command:lower()=="resistsilence" then
  932.         ResistSilence = ResistSilence==false
  933.         send_command('console_echo "Resist Silence: '..tostring(ResistSilence)..'"')
  934.         is_valid = true
  935.     elseif command:lower()=="resistdeath" then
  936.         ResistDeath = ResistDeath==false
  937.         send_command('console_echo "Resist Death: '..tostring(ResistDeath)..'"')
  938.         is_valid = true
  939.     elseif command:lower()=="resistcharm" then
  940.         ResistDeath = ResistCharm==false
  941.         send_command('console_echo "Resist Charm: '..tostring(ResistCharm)..'"')
  942.         is_valid = true
  943.     elseif string.sub(command,1,4)=="Rune" then
  944.         is_valid = true
  945.         if (string.len(command) > 4) then
  946.             local i = 0
  947.             for word in string.gmatch(command, "%u%l+") do
  948.                 if (i > 0) then
  949.                     Rune[i] = word
  950.                 end
  951.                 i = i + 1
  952.             end
  953.             if (i < 3) then
  954.                 Rune[2] = Rune[1]
  955.                 Rune[3] = Rune[1]
  956.             elseif (i < 4) then
  957.                 Rune[3] = Rune[1]
  958.             end
  959.             Rune_ind = 1
  960.             send_command('console_echo "Rune Mode: ['..(Rune[1])..' - '..(Rune[2])..' - '..(Rune[3])..']"')
  961.         end
  962.         rune()
  963.     elseif command:lower()=="epeo" then
  964.         is_valid = true
  965.         equip({main="Epeolatry",sub="Utu Grip"})
  966.     elseif command:lower()=="lion" then
  967.         is_valid = true
  968.         equip({main="Lionheart",sub="Utu Grip"})
  969.     elseif command:lower()=="reikiko" then
  970.         is_valid = true
  971.         equip({main="Reikiko",sub="Chanter's Shield"})
  972.     elseif command:lower()=="th" then
  973.         TH = TH==false
  974.         send_command('console_echo "Treasure Hunter: '..tostring(TH)..'"')
  975.         is_valid = true
  976.     end
  977.  
  978.     if is_valid then
  979.         if (not midaction() and not pet_midaction()) or command:lower()=="idle" then
  980.             idle()
  981.         end
  982.         if announceModes then
  983.             send_command('console_echo "TP Mode: ['..TPMode..'] ~ Idle Mode: ['..IdleMode..']"')
  984.         end
  985.     else
  986.         sanitized = command:gsub("\"", "")
  987.         send_command('console_echo "Invalid self_command: '..sanitized..'"')
  988.     end
  989. end
  990.  
  991. function idle()
  992.     --if TownIdle:contains(world.area:lower()) then
  993.     --  return
  994.     --end
  995.  
  996. -- Engaged --
  997.     if player.status=="Engaged" then
  998.         if TPMode=="TP" then
  999.             if Turms then
  1000.                 equip(sets.aftercast.TP_Turms)
  1001.             elseif AccMode then
  1002.                 equip(sets.aftercast.TP_Acc)
  1003.             else
  1004.                 equip(sets.aftercast.TP)
  1005.             end
  1006.         elseif TPMode=="MidHybrid" then
  1007.             if Turms then
  1008.                 equip(sets.aftercast.TP_MidHybridTurms)
  1009.             else
  1010.                 equip(sets.aftercast.TP_MidHybrid)
  1011.             end
  1012.         elseif TPMode=="Hybrid" then
  1013.             if Turms then
  1014.                 equip(sets.aftercast.TP_HybridTurms)
  1015.             elseif ResistAilments then
  1016.                 equip(sets.aftercast.TP_HybridAilment)
  1017.             else
  1018.                 equip(sets.aftercast.TP_Hybrid)
  1019.             end
  1020.         elseif TPMode=="HybridFull" then
  1021.             if Turms then
  1022.                 equip(sets.aftercast.TP_HybridFullTurms)
  1023.             else
  1024.                 equip(sets.aftercast.TP_HybridFull)
  1025.             end
  1026.         elseif TPMode=="DT" then
  1027.             if Turms then
  1028.                 if buffactive['Battuta'] then
  1029.                     equip(sets.aftercast.DT_TurmsBattuta)
  1030.                 else
  1031.                     equip(sets.aftercast.DT_Turms)
  1032.                 end
  1033.             elseif not buffactive['Shell'] then
  1034.                 equip(sets.aftercast.DT_NoShell)
  1035.             else
  1036.                 equip(sets.aftercast.DT)
  1037.             end
  1038.         elseif TPMode=="Kite" then
  1039.             if Escha:contains(world.area:lower()) then
  1040.                 equip(sets.aftercast.Kite_Escha)
  1041.             else
  1042.                 equip(sets.aftercast.Kite)
  1043.             end
  1044.         elseif TPMode=="Regain" then
  1045.             equip(sets.aftercast.TP_Regain)
  1046.         elseif TPMode=="Kite_Regain" then
  1047.             equip(sets.aftercast.TP_Kite_Regain)
  1048.         elseif TPMode=="Sword" then
  1049.             equip(sets.aftercast.TP_Sword)
  1050.         elseif TPMode=="SB" then
  1051.             equip(sets.aftercast.TP_SB)
  1052.         end
  1053.         if TH then
  1054.             equip(sets.TH)
  1055.         end
  1056. -- Disengaged --
  1057.     else
  1058.         if IdleMode=="DT" then
  1059.             if not buffactive['Shell'] then
  1060.                 equip(sets.aftercast.DT_NoShell)
  1061.             elseif ResistAilments then
  1062.                 equip(sets.aftercast.Ailment)
  1063.             elseif Escha:contains(world.area:lower()) then
  1064.                 equip(sets.aftercast.DT_Escha)
  1065.             else
  1066.                 equip(sets.aftercast.DT)
  1067.             end
  1068.         elseif IdleMode=="Kite" then
  1069.             if Escha:contains(world.area:lower()) then
  1070.                 equip(sets.aftercast.Kite_Escha)
  1071.             else
  1072.                 equip(sets.aftercast.Kite)
  1073.             end
  1074.         elseif IdleMode=="Regain" then
  1075.             equip(sets.aftercast.DT_Regain)
  1076.         elseif IdleMode=="KiteRegain" then
  1077.             equip(sets.aftercast.Kite_Regain)
  1078.         elseif IdleMode=="Refresh" then
  1079.             equip(sets.aftercast.Refresh)
  1080.         elseif IdleMode=="MEva" then
  1081.             equip(sets.aftercast.MEva)
  1082.         elseif IdleMode=="MDB" then
  1083.             equip(sets.aftercast.MDB)
  1084.         elseif IdleMode=="Def" then
  1085.             equip(sets.aftercast.Def)
  1086.         end
  1087.     end
  1088.  
  1089. -- Ailment Resistance Gear - Last Takes Priority
  1090.     if ResistPara or ResistStun or ResistSilence or ResistCharm then
  1091.         if not IdleMode=='TP' and not IdleMode=='MidHybrid' and not IdleMode=='Hybrid' then
  1092.             equip({ammo="Staunch Tathlum +1"})
  1093.         end
  1094.     end
  1095.     if ResistPara then
  1096.         equip({ear2="Hearty Earring",ring2="Blood Ring"})
  1097.     end
  1098.     if ResistStun then
  1099.         if IdleMode=='TP' or IdleMode=='MidHybrid' or IdleMode=='Hybrid' then
  1100.             equip({neck="Anu Torque"})
  1101.         else
  1102.             equip({ear1="Hearty Earring",ear2="Dominance Earring",back="Tantalic Cape"})
  1103.         end
  1104.     end
  1105.     if ResistSilence then
  1106.         if ResistPara then
  1107.             equip({ring1="Insect Ring"})
  1108.         else
  1109.             equip({ring2="Insect Ring"})
  1110.         end
  1111.         equip({ear1="Hearty Earring",ear2="Etiolation Earring"})
  1112.     end
  1113.     if ResistCharm then
  1114.         equip({neck="Unmoving Collar +1",back="Solemnity Cape"})
  1115.     end
  1116.     if ResistDeath then
  1117.         equip({ring1="Shadow Ring",ring2="Warden's Ring"})
  1118.     end
  1119. end
  1120.  
  1121. function rune()
  1122.     nextRune = Rune[Rune_ind]
  1123.     Rune_ind = Rune_ind+1
  1124.     if (Rune_ind > 3) then
  1125.         Rune_ind = 1
  1126.     end
  1127.     if (nextRune=="Fire") then
  1128.         send_command('input /ja Ignis <me>')
  1129.     elseif (nextRune=="Earth") then
  1130.         send_command('input /ja Tellus <me>')
  1131.     elseif (nextRune=="Water") then
  1132.         send_command('input /ja Unda <me>')
  1133.     elseif (nextRune=="Wind") then
  1134.         send_command('input /ja Flabra <me>')
  1135.     elseif (nextRune=="Ice") then
  1136.         send_command('input /ja Gelus <me>')
  1137.     elseif (nextRune=="Thunder") then
  1138.         send_command('input /ja Sulpor <me>')
  1139.     elseif (nextRune=="Light") then
  1140.         send_command('input /ja Lux <me>')
  1141.     elseif (nextRune=="Dark") then
  1142.         send_command('input /ja Tenebrae <me>')
  1143.     else
  1144.         send_command('console_echo "Error: Bad Rune Element ['..nextRune..']"')
  1145.     end
  1146. end
Add Comment
Please, Sign In to add comment