Pergatory

Pergatory's RUN Gearswap

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