Advertisement
Arnan

BLU Lua June 2017

Jun 23rd, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 73.47 KB | None | 0 0
  1.  
  2.         -----------------------------------------------
  3.         -- *** Arnan Blue Mage Gearswap Lua File *** --
  4.         -----------------------------------------------
  5.        
  6.             -- Things to do --
  7.            
  8.                 -- Add Lunge to MB toggle and find a way to incorporate obi
  9.                 -- Add Vagary spells
  10.                
  11.             -- Commands --
  12.                
  13.                 -- In Game: //gs c, Macro: /console gs c, Bind: gs c --
  14.            
  15.                 -- gs c acc         Toggle accuracy tier for TP/WS
  16.                 -- gs c dw          Toggle Dual Wield tiers
  17.                 -- gs c idle        Toggle idle sets
  18.                
  19.                 -- gs c pdt         PDT on/off
  20.                 -- gs c mdt         MDT on/off
  21.                 -- gs c kiting      Kiting on/off
  22.                 -- gs c hybrid      Hybrid on/off
  23.                
  24.                 -- gs c th          Treasure Hunter TP gear on/off
  25.                 -- gs c thaumas     Thaumas Coat on/off
  26.                 -- gs c mb          Magic Burst on/off
  27.  
  28.                
  29.         ----------
  30.         -- Sets --
  31.         ----------
  32.  
  33. function get_sets()
  34.         AccIndex = 1
  35.         AccArray = {"LowACC","MidACC","HighACC","MaxACC"} -- 4 Levels Of Accuracy Sets For TP/WS. Default ACC Set Is LowACC (1) --
  36.         WeaponIndex = 3
  37.         WeaponArray = {"Single","DW3","DW4"} -- Amount of Dual Wield used for TP. Default is DW4 (3) --
  38.         IdleIndex = 1
  39.         IdleArray = {"Full","DT","Warp"} -- Default Idle Set Is Full (1) --
  40.         Armor = 'None'
  41.         target_distance = 6 -- Set Default Distance Here --
  42.         Thaumas = 'OFF' -- Set Default Thaumas Coat ON or OFF Here --
  43.         TH = 'OFF' -- Set Default TH ON or OFF Here --
  44.         MB = 'OFF' -- Set Default Magic Burst ON or OFF Here --
  45.         Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
  46.         Curaga_Spells = {"Curaga","Curaga II"} -- Curaga Degradation --
  47.         send_command('input /macro book 20;wait .1;input /macro set 1') -- Change Default Macro Book Here --
  48.         add_to_chat(158,'-[Blue Mage Lua Loaded]-')
  49.         add_to_chat(155,'Dual Wield: '..WeaponArray[WeaponIndex])
  50.         add_to_chat(155,'Accuracy Level: ' .. AccArray[AccIndex])
  51.         add_to_chat(155,'Idle Set: ' .. IdleArray[IdleIndex])
  52.  
  53.         -- Key Binds --
  54.         send_command('bind Delete input /ws "Chant du Cygne" <t>')
  55.         function file_unload()
  56.             send_command('unbind Delete')
  57.             end
  58.        
  59.         -- Town/City Areas --
  60.         Cities = S{
  61.                         "Ru'lude Gardens","Upper Jeuno","Lower Jeuno","Port Jeuno",
  62.                         "Port Windurst","Windurst Waters","Windurst Woods","Windurst Walls","Heavens Tower",
  63.                         "Port San d'Oria","Northern San d'Oria","Southern San d'Oria",
  64.                         "Port Bastok","Bastok Markets","Bastok Mines","Metalworks",
  65.                         "Aht Urhgan Whitegate","Nashmau","Tavanazian Safehold",
  66.                         "Selbina","Mhaura","Norg","Eastern Adoulin","Western Adoulin","Kazham","Tavnazia"}
  67.                    
  68.         -- Physical Blue Magic --
  69.         PhysicalBlueMagic = S{
  70.                         'Asuran Claws','Bludgeon','Body Slam','Feather Storm','Mandibular Bite','Queasyshroom',
  71.                         'Power Attack','Ram Charge','Saurian Slide','Screwdriver','Sickle Slash','Smite of Rage',
  72.                         'Spinal Cleave','Spiral Spin','Sweeping Gouge','Terror Touch'}
  73.  
  74.         -- STR Physical Blue Magic --
  75.         PhysicalBlueMagic_STR = S{
  76.                         'Battle Dance','Bloodrake','Death Scissors','Dimensional Death','Empty Thrash',
  77.                         'Quadrastrike','Uppercut','Tourbillion','Thrashing Assault','Vertical Cleave',
  78.                         'Whirl of Rage'}
  79.  
  80.         -- DEX Physical Blue Magic --
  81.         PhysicalBlueMagic_DEX = S{
  82.                         'Amorphic Spikes','Barbed Crescent','Claw Cyclone','Disseverment','Foot Kick',
  83.                         'Frenetic Rip','Goblin Rush','Hysteric Barrage','Paralyzing Triad','Seedspray',
  84.                         'Sinker Drill','Vanity Dive'}
  85.  
  86.         -- VIT Physical Blue Magic --
  87.         PhysicalBlueMagic_VIT = S{
  88.                         'Cannonball','Delta Thrust','Glutinous Dart','Grand Slam','Quad. Continuum',
  89.                         'Sprout Smack'}
  90.  
  91.         -- AGI Physical Blue Magic --
  92.         PhysicalBlueMagic_AGI = S{
  93.                         'Benthic Typhoon','Helldive','Hydro Shot','Jet Stream','Pinecone Bomb','Wild Oats'}
  94.            
  95.         -- Physical Accuracy Blue Magic --         
  96.         BlueMagic_PhysicalACC = S{
  97.                         'Heavy Strike'}
  98.        
  99.         -- Magical Blue Magic --
  100.         MagicalBlueMagic = S{
  101.                         'Acrid Stream','Anvil Lightning','Crashing Thunder','Charged Whisker','Droning Whirlwind','Firespit',
  102.                         'Foul Waters','Gates of Hades','Leafstorm','Molting Plumage','Nectarous Deluge','Polar Roar',
  103.                         'Regurgitation','Rending Deluge','Scouring Spate','Searing Tempest','Silent Storm','Spectral Floe',
  104.                         'Subduction','Tem. Upheaval','Thermal Pulse','Thunderbolt','Uproot','Water Bomb'}
  105.            
  106.         -- Dark Magical Blue Magic --          
  107.         BlueMagic_Dark = S{
  108.                         'Atra. Libations','Blood Saber','Dark Orb','Death Ray','Eyes On Me',
  109.                         'Evryone. Grudge','Palling Salvo','Tenebral Crush'}
  110.        
  111.         -- Light Magical Blue Magic --
  112.         BlueMagic_Light = S{
  113.                         'Blinding Fulgor','Diffusion Ray','Magic Hammer','Rail Cannon','Retinal Glare'}
  114.        
  115.         -- Earth Magical Blue Magic --
  116.         BlueMagic_Earth = S{
  117.                         'Embalming Earth','Entomb','Sandspin'}
  118.  
  119.         -- Magic Accuracy Blue Magic --
  120.         BlueMagic_Accuracy = S{
  121.                         '1000 Needles','Absolute Terror','Auroral Drape','Awful Eye','Blank Gaze','Blistering Roar',
  122.                         'Blood Drain','Blood Saber','Chaotic Eye','Cimicine Discharge','Cold Wave','Digest','Corrosive Ooze',
  123.                         'Demoralizing Roar','Dream Flower','Enervation','Feather Tickle','Filamented Hold','Frightful Roar',
  124.                         'Geist Wall','Hecatomb Wave','Infrasonics','Light of Penance','Lowing','Mind Blast','Mortal Ray',
  125.                         'MP Drainkiss','Osmosis','Reaving Wind','Sheep Song','Soporific','Sound Blast','Stinking Gas',
  126.                         'Sub-zero Smash','Triumphant Roar','Venom Shell','Voracious Trunk','Yawn'}
  127.  
  128.         -- Breath Blue Magic --
  129.         BlueMagic_Breath = S{
  130.                         'Bad Breath','Flying Hip Press','Final Sting','Frost Breath','Heat Breath','Magnetite Cloud',
  131.                         'Poison Breath','Radiant Breath','Self Destruct','Thunder Breath','Wind Breath'}
  132.  
  133.         -- Blue Magic Buffs --
  134.         BlueMagic_Buff = S{
  135.                         'Carcharian Verve','Diamondhide','Metallic Body','Magic Barrier',"Occultation",
  136.                         'Orcish Counterstance','Plasma Charge','Pyric Bulwark','Reactor Cool'}
  137.                            
  138.         -- Blue Magic Healing --                   
  139.         BlueMagic_Healing = S{
  140.                         'Healing Breeze','Magic Fruit','Plenilune Embrace','Pollen','Restoral','Wild Carrot'}
  141.                        
  142.         -- HP Cure Blue Magic --               
  143.         BlueMagic_HPCure = S{
  144.                         'White Wind'}
  145.  
  146.         -- Refresh Blue Magic --               
  147.         BlueMagic_Refresh = S{
  148.                         'Battery Charge'}
  149.  
  150.         -- Blue Magic Stun --
  151.         BlueMagic_Stun = S{
  152.                         'Blitzstrahl','Temporal Shift'}
  153.        
  154.         -- Blue Magic Physical Stun --
  155.         BlueMagic_PhysicalStun = S{
  156.                         'Frypan','Head Butt','Sudden Lunge','Tail slap','Whirl of Rage'}       
  157.        
  158.         -- Blue Magic Enmity --
  159.         BlueMagic_Emnity = S{
  160.                         'Actinic Burst','Exuviation','Fantod','Jettatura'}     
  161.  
  162.         -- Diffusion --
  163.         BlueMagic_Diffusion = S{
  164.                         'Amplification','Cocoon','Exuviation','Feather Barrier','Harden Shell','Memento Mori','Metallic Body',
  165.                         'Mighty Guard','Plasma Charge','Reactor Cool','Refueling','Saline Coat','Warm-Up','Zephyr Mantle'}
  166.  
  167.         -- Unbridled --
  168.         BlueMagic_Unbridled = S{
  169.                         'Absolute Terror','Bilgestorm','Blistering Roar','Bloodrake','Carcharian Verve',
  170.                         'Droning Whirlwind','Gates of Hades','Harden Shell','Mighty Guard','Pyric Bulwark',
  171.                         'Thunderbolt','Tourbillion'}
  172.        
  173.         -- Herculean Augments --
  174.         HerculeanVest={}
  175.         HerculeanVest.Crit={ name="Herculean Vest", augments={'Attack+25','Crit. hit damage +4%','DEX+13',}}       
  176.         HerculeanGloves={}
  177.         HerculeanGloves.DT={ name="Herculean Gloves", augments={'Damage taken-3%','DEX+8','Accuracy+11','Attack+10',}}
  178.         HerculeanGloves.TH={ name="Herculean Gloves", augments={'Mag. Acc.+6','Accuracy+8','"Treasure Hunter"+1','Accuracy+13 Attack+13',}}
  179.         HerculeanGloves.RF={ name="Herculean Gloves", augments={'Magic dmg. taken -1%','Enmity-2','"Refresh"+1','Accuracy+11 Attack+11',}}
  180.         HerculeanTrousers={}   
  181.         HerculeanTrousers.WSD={ name="Herculean Trousers", augments={'Accuracy+24 Attack+24','Weapon skill damage +4%','Accuracy+7',}}
  182.         HerculeanBoots={}
  183.         HerculeanBoots.TA={ name="Herculean Boots", augments={'Accuracy+27','"Triple Atk."+4','DEX+7','Attack+13',}}
  184.         HerculeanBoots.WSD={ name="Herculean Boots", augments={'Accuracy+18 Attack+18','Weapon skill damage +5%','STR+9','Attack+10',}}
  185.         HerculeanBoots.DT={ name="Herculean Boots", augments={'Accuracy+12','Phys. dmg. taken -5%','Attack+5',}}
  186.         HerculeanBoots.RF={ name="Herculean Boots", augments={'"Fast Cast"+3','Pet: "Regen"+2','"Refresh"+1',}}
  187.         HerculeanBoots.TH={ name="Herculean Boots", augments={'MND+7','INT+3','"Treasure Hunter"+1','Accuracy+1 Attack+1','Mag. Acc.+11 "Mag.Atk.Bns."+11',}}
  188.        
  189.         -- Rosmerta's Cape Augments --
  190.         CritCape={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Crit.hit rate+10',}}
  191.         DWCape={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Dual Wield"+10',}}
  192.         DACape={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Dbl.Atk."+10',}}
  193.         WSDCape={ name="Rosmerta's Cape", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}}
  194.         STPCape={ name="Rosmerta's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Store TP"+10',}}
  195.         MABCape={ name="Rosmerta's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','"Haste"+10',}}
  196.         FCCape={ name="Rosmerta's Cape", augments={'"Fast Cast"+10',}}
  197.        
  198.         --------------------
  199.         -- Idle/Town Sets --
  200.         --------------------
  201.         sets.Idle = {
  202.                         ammo="Staunch Tathlum",
  203.                         head="Spurrina coif",
  204.                         neck="Bathy Choker +1",
  205.                         ear1="Infused Earring",
  206.                         ear2="Genmei Earring",
  207.                         body="Amalric Doublet +1",
  208.                         hands=HerculeanGloves.RF,
  209.                         ring1="Defending Ring",
  210.                         ring2="Paguroidea Ring",
  211.                         back="Moonbeam Cape",
  212.                         waist="Flume Belt +1",
  213.                         legs="Carmine Cuisses +1",
  214.                         feet=HerculeanBoots.RF}
  215.         sets.Idle.Full = set_combine(sets.Idle,{})
  216.         sets.Idle.DT = set_combine(sets.Idle,{
  217.                         neck="Loricate Torque +1",
  218.                         ear1="Ethereal Earring",
  219.                         ring2="Patricius Ring"})
  220.         sets.Idle.Warp = set_combine(sets.Idle,{
  221.                         ring2="Warp Ring"})
  222.         sets.Idle.Town = set_combine(sets.Idle,{})
  223.  
  224.         -------------
  225.         -- TP Sets --
  226.         -------------
  227.         sets.TP = {
  228.                         ammo="Ginsen",
  229.                         head="Adhemar Bonnet +1",
  230.                         neck="Asperity Necklace",
  231.                         ear1="Suppanomimi",
  232.                         ear2="Eabani Earring",
  233.                         body="Adhemar Jacket +1",
  234.                         hands="Adhemar Wrist. +1",
  235.                         ring1="Hetairoi Ring",
  236.                         ring2="Epona's Ring",
  237.                         back=DWCape,
  238.                         waist="Windbuffet Belt +1",
  239.                         legs="Samnuha Tights",
  240.                         feet=HerculeanBoots.TA}
  241.         sets.TP.MidACC = set_combine(sets.TP,{
  242.                         ammo="Falcon Eye",
  243.                         ring1="Chirich Ring",
  244.                         neck="Combatant's Torque"})
  245.         sets.TP.HighACC = set_combine(sets.TP.MidACC,{
  246.                         head="Dampening Tam",
  247.                         ring2="Chirich Ring"})
  248.         sets.TP.MaxACC = set_combine(sets.TP.HighACC,{
  249.                         head="Carmine Mask +1",
  250.                         ring1="Ramuh Ring +1",
  251.                         ring2="Ramuh Ring +1",
  252.                         waist="Olseni Belt",
  253.                         legs="Carmine Cuisses +1"})
  254.  
  255.         ---------------------------
  256.         -- Single Weapon TP Sets --
  257.         ---------------------------
  258.         sets.TP.Single = set_combine(sets.TP,{
  259.                         ear1="Cessance Earring",
  260.                         ear2="Brutal Earring",
  261.                         back=DACape})
  262.         sets.TP.Single.MidACC = set_combine(sets.TP.MidACC,{
  263.                         ear1="Cessance Earring",
  264.                         ear2="Brutal Earring",
  265.                         back=DACape})
  266.         sets.TP.Single.HighACC = set_combine(sets.TP.HighACC,{
  267.                         ear1="Cessance Earring",
  268.                         ear2="Brutal Earring",
  269.                         back=DACape})
  270.         sets.TP.Single.MaxACC = set_combine(sets.TP.MaxACC,{
  271.                         ear1="Digni. Earring",
  272.                         ear2="Zennaroi Earring",
  273.                         back=DACape})
  274.  
  275.         -- Single Weapon Capped Magic Haste Sets --
  276.         sets.TP.Single.HighHaste = set_combine(sets.TP.Single,{})
  277.         sets.TP.Single.MidACC.HighHaste = set_combine(sets.TP.Single.MidACC,{})
  278.         sets.TP.Single.HighACC.HighHaste = set_combine(sets.TP.Single.HighACC,{})
  279.         sets.TP.Single.MaxACC.HighHaste = set_combine(sets.TP.Single.MaxACC,{})
  280.  
  281.         -- Single Weapon Mythic AM3 Sets --
  282.         sets.TP.Single.AM3 = set_combine(sets.TP.Single,{
  283.                         back=STPCape})
  284.         sets.TP.Single.MidACC.AM3 = set_combine(sets.TP.Single.MidACC,{
  285.                         back=STPCape})
  286.         sets.TP.Single.HighACC.AM3 = set_combine(sets.TP.Single.HighACC,{
  287.                         back=STPCape})
  288.         sets.TP.Single.MaxACC.AM3 = set_combine(sets.TP.Single.MaxACC,{
  289.                         back=STPCape})
  290.        
  291.         -- Single Weapon Mythic AM3 Capped Magic Haste Sets --
  292.         sets.TP.Single.HighHaste.AM3 = set_combine(sets.TP.Single,{})
  293.         sets.TP.Single.MidACC.HighHaste.AM3 = set_combine(sets.TP.Single.MidACC,{})
  294.         sets.TP.Single.HighACC.HighHaste.AM3 = set_combine(sets.TP.Single.HighACC,{})
  295.         sets.TP.Single.MaxACC.HighHaste.AM3 = set_combine(sets.TP.Single.MaxACC,{})
  296.  
  297.         ----------------------------
  298.         -- Dual Wield III TP Sets --
  299.         ----------------------------
  300.         sets.TP.DW3 = set_combine(sets.TP,{})
  301.         sets.TP.DW3.MidACC = set_combine(sets.TP.MidACC,{})
  302.         sets.TP.DW3.HighACC = set_combine(sets.TP.HighACC,{})
  303.         sets.TP.DW3.MaxACC = set_combine(sets.TP.MaxACC,{
  304.                         ear2="Zennaroi Earring"})
  305.  
  306.         -- Dual Wield III Capped Magic Haste Sets --
  307.         sets.TP.DW3.HighHaste =  set_combine(sets.TP,{
  308.                         ear2="Brutal Earring",
  309.                         back=DACape})
  310.         sets.TP.DW3.MidACC.HighHaste =  set_combine(sets.TP.MidACC,{
  311.                         ear2="Brutal Earring",
  312.                         back=DACape})
  313.         sets.TP.DW3.HighACC.HighHaste =  set_combine(sets.TP.HighACC,{
  314.                         ear2="Brutal Earring",
  315.                         back=DACape})
  316.         sets.TP.DW3.MaxACC.HighHaste =  set_combine(sets.TP.MaxACC,{
  317.                         ear2="Zennaroi Earring",
  318.                         back=DACape})
  319.                            
  320.         -- Dual Wield III Mythic AM3 Sets --
  321.         sets.TP.DW3.AM3 = set_combine(sets.TP,{})
  322.         sets.TP.DW3.MidACC.AM3 = set_combine(sets.TP.MidACC,{})
  323.         sets.TP.DW3.HighACC.AM3 = set_combine(sets.TP.HighACC,{})
  324.         sets.TP.DW3.MaxACC.AM3 = set_combine(sets.TP.MaxACC,{
  325.                         ear2="Zennaroi Earring"})
  326.  
  327.         -- Dual Wield III Mythic AM3 Capped Magic Haste Sets --
  328.         sets.TP.DW3.HighHaste.AM3 =  set_combine(sets.TP,{
  329.                         ear2="Brutal Earring",
  330.                         back=STPCape})
  331.         sets.TP.DW3.MidACC.HighHaste.AM3 = set_combine(sets.TP.MidACC,{
  332.                         ear2="Brutal Earring",
  333.                         back=STPCape})
  334.         sets.TP.DW3.HighACC.HighHaste.AM3 = set_combine(sets.TP.HighACC,{
  335.                         ear2="Brutal Earring",
  336.                         back=STPCape})
  337.         sets.TP.DW3.MaxACC.HighHaste.AM3 = set_combine(sets.TP.MaxACC,{
  338.                         ear2="Zennaroi Earring",
  339.                         back=STPCape})
  340.                                
  341.         ---------------------------
  342.         -- Dual Wield IV TP Sets --
  343.         ---------------------------
  344.         sets.TP.DW4 = set_combine(sets.TP,{
  345.                         ear2="Brutal Earring"})
  346.         sets.TP.DW4.MidACC = set_combine(sets.TP.MidACC,{
  347.                         ear2="Brutal Earring"})
  348.         sets.TP.DW4.HighACC = set_combine(sets.TP.HighACC,{
  349.                         ear2="Brutal Earring"})
  350.         sets.TP.DW4.MaxACC = set_combine(sets.TP.MaxACC,{
  351.                         ear2="Zennaroi Earring"})
  352.  
  353.         -- Dual Wield IV Capped Magic Haste Sets --
  354.         sets.TP.DW4.HighHaste =  set_combine(sets.TP,{
  355.                         ear1="Cessance Earring",
  356.                         ear2="Brutal Earring",
  357.                         back=DACape})
  358.         sets.TP.DW4.MidACC.HighHaste =  set_combine(sets.TP.MidACC,{
  359.                         ear1="Cessance Earring",
  360.                         ear2="Brutal Earring",
  361.                         back=DACape})
  362.         sets.TP.DW4.HighACC.HighHaste =  set_combine(sets.TP.HighACC,{
  363.                         ear1="Cessance Earring",
  364.                         ear2="Brutal Earring",
  365.                         back=DACape})
  366.         sets.TP.DW4.MaxACC.HighHaste =  set_combine(sets.TP.MaxACC,{
  367.                         ear1="Digni. Earring",
  368.                         ear2="Zennaroi Earring",
  369.                         back=DACape})
  370.  
  371.         -- Dual Wield IV Mythic AM3 Sets --
  372.         sets.TP.DW4.AM3 = set_combine(sets.TP,{
  373.                         ear2="Brutal Earring"})
  374.         sets.TP.DW4.MidACC.AM3 = set_combine(sets.TP.MidACC,{
  375.                         ear2="Brutal Earring"})
  376.         sets.TP.DW4.HighACC.AM3 = set_combine(sets.TP.HighACC,{
  377.                         ear2="Brutal Earring"})
  378.         sets.TP.DW4.MaxACC.AM3 = set_combine(sets.TP.MaxACC,{
  379.                         ear2="Zennaroi Earring"})
  380.  
  381.         -- Dual Wield IV Mythic AM3 Capped Magic Haste Sets --
  382.         sets.TP.DW4.HighHaste.AM3 =  set_combine(sets.TP,{
  383.                         ear1="Cessance Earring",
  384.                         ear2="Brutal Earring",
  385.                         back=STPCape})
  386.         sets.TP.DW4.MidACC.HighHaste.AM3 = set_combine(sets.TP.MidACC,{
  387.                         ear1="Cessance Earring",
  388.                         ear2="Brutal Earring",
  389.                         back=STPCape})
  390.         sets.TP.DW4.HighACC.HighHaste.AM3 = set_combine(sets.TP.HighACC,{
  391.                         ear1="Cessance Earring",
  392.                         ear2="Brutal Earring",
  393.                         back=STPCape})
  394.         sets.TP.DW4.MaxACC.HighHaste.AM3 = set_combine(sets.TP.MaxACC,{
  395.                         ear1="Digni. Earring",
  396.                         ear2="Zennaroi Earring",
  397.                         back=STPCape})
  398.                        
  399.         -- TP Thaumas Coat --
  400.         sets.TP.Thaumas = {body="Thaumas Coat"}
  401.        
  402.         -- TP Treasure Hunter --
  403.         sets.TP.TH = {hands=HerculeanGloves.TH,feet=HerculeanBoots.TH}
  404.  
  405.         -----------------------
  406.         -- Damage Taken Sets --
  407.         -----------------------
  408.        
  409.         -- PDT Set --
  410.         sets.PDT = {
  411.                         ammo="Staunch Tathlum",
  412.                         head="Dampening Tam",
  413.                         neck="Loricate Torque +1",
  414.                         ear1="Ethereal Earring",
  415.                         ear2="Eabani Earring",
  416.                         body="Ayanmo Corazza",
  417.                         hands=HerculeanGloves.DT,
  418.                         ring1="Defending Ring",
  419.                         ring2="Patricius Ring",
  420.                         back="Moonbeam Cape",
  421.                         waist="Flume Belt +1",
  422.                         legs="Ayanmo Cosciales",
  423.                         feet=HerculeanBoots.DT}
  424.  
  425.         -- MDT Set --
  426.         sets.MDT = set_combine(sets.PDT,{
  427.                         ear1="Sanare Earring",
  428.                         ear2="Etiolation Earring",
  429.                         Ring2="Shadow Ring"})
  430.  
  431.         -- Hybrid Sets --
  432.         sets.TP.Hybrid = set_combine(sets.PDT,{
  433.                         ear1="Suppanomimi",
  434.                         ear2="Brutal Earring",
  435.                         waist="Shetal Stone"})
  436.         sets.TP.Hybrid.MidACC = set_combine(sets.TP.Hybrid,{
  437.                         ear2="Zennaroi Earring"})
  438.         sets.TP.Hybrid.HighACC = set_combine(sets.TP.Hybrid.MidACC,{})
  439.         sets.TP.Hybrid.MaxACC = set_combine(sets.TP.Hybrid.HighACC,{
  440.                         neck="Combatant's Torque",
  441.                         waist="Olseni Belt"})
  442.                        
  443.         -- Hybrid High Haste Sets --
  444.         sets.TP.Hybrid.HighHaste = set_combine(sets.PDT,{
  445.                         ear1="Suppanomimi",
  446.                         ear2="Brutal Earring",
  447.                         waist="Windbuffet Belt +1",
  448.                         legs="Samnuha Tights"})
  449.         sets.TP.Hybrid.MidACC.HighHaste = set_combine(sets.TP.Hybrid.HighHaste,{
  450.                         ear2="Zennaroi Earring"})
  451.         sets.TP.Hybrid.HighACC.HighHaste = set_combine(sets.TP.Hybrid.MidACC.HighHaste,{})
  452.         sets.TP.Hybrid.MaxACC.HighHaste = set_combine(sets.TP.Hybrid.HighACC.HighHaste,{
  453.                         neck="Combatant's Torque",
  454.                         waist="Olseni Belt"})
  455.  
  456.         -- Kiting Set --
  457.         sets.Kiting =  set_combine(sets.PDT,{
  458.                         ear2="Genmei Earring",
  459.                         body="Vrikodara Jupon",
  460.                         legs="Carmine Cuisses +1",
  461.                         feet="Hippo. Socks +1"})
  462.  
  463.         -----------------------
  464.         -- Weapon Skill Sets --
  465.         -----------------------
  466.  
  467.         -- WS Base Sets --
  468.         sets.WS = {
  469.                         ammo="Floestone",
  470.                         head="Adhemar Bonnet +1",
  471.                         neck="Fotia Gorget",
  472.                         ear1="Moonshade Earring",
  473.                         ear2="Brutal Earring",
  474.                         body="Adhemar Jacket +1",
  475.                         hands="Adhemar Wrist. +1",
  476.                         ring1="Shukuyu Ring",
  477.                         ring2="Epona's Ring",
  478.                         back=DACape,
  479.                         waist="Fotia Belt",
  480.                         legs="Samnuha Tights",
  481.                         feet=HerculeanBoots.TA}
  482.         sets.WS.MidACC = set_combine(sets.WS,{
  483.                         ammo="Falcon Eye",
  484.                         head="Dampening Tam"})
  485.         sets.WS.HighACC = set_combine(sets.WS.MidACC,{
  486.                         ear2="Zennaroi Earring",
  487.                         ring1="Ramuh Ring +1"})
  488.         sets.WS.MaxACC = set_combine(sets.WS.HighACC,{
  489.                         head="Carmine Mask +1",
  490.                         ring2="Ramuh Ring +1",
  491.                         legs="Carmine Cuisses +1"})
  492.  
  493.         -- One-Hit Sets --
  494.         sets.WS.OneHit = set_combine(sets.WS,{
  495.                         head="Lilitu Headpiece",
  496.                         neck="Caro Necklace",
  497.                         ear2="Ishvara Earring",
  498.                         body="Assim. Jubbah +2",
  499.                         hands="Jhakri Cuffs +2",
  500.                         ring2="Ifrit Ring +1",
  501.                         back=WSDCape,
  502.                         waist="Prosilio Belt +1",
  503.                         legs=HerculeanTrousers.WSD,
  504.                         feet=HerculeanBoots.WSD})
  505.         sets.WS.OneHit.MidACC = set_combine(sets.WS.MidACC,{
  506.                         head="Lilitu Headpiece",
  507.                         neck="Caro Necklace",
  508.                         ear2="Ishvara Earring",
  509.                         body="Assim. Jubbah +2",
  510.                         hands="Jhakri Cuffs +2",
  511.                         ring2="Ifrit Ring +1",
  512.                         waist="Prosilio Belt +1",
  513.                         back=WSDCape,
  514.                         legs=HerculeanTrousers.WSD,
  515.                         feet=HerculeanBoots.WSD})
  516.         sets.WS.OneHit.HighACC = set_combine(sets.WS.HighACC,{
  517.                         ear2="Ishvara Earring",
  518.                         body="Assim. Jubbah +2",
  519.                         hands="Jhakri Cuffs +2",
  520.                         ring2="Ifrit Ring +1",
  521.                         back=WSDCape,
  522.                         legs=HerculeanTrousers.WSD,
  523.                         feet=HerculeanBoots.WSD})
  524.         sets.WS.OneHit.MaxACC = set_combine(sets.WS.MaxACC,{})
  525.                        
  526.         -- Magic WS Base Set --
  527.         sets.WS.MABWS = {
  528.                         ammo="Pemphredo Tathlum",
  529.                         head="Jhakri Coronal +2",
  530.                         neck="Sanctity Necklace",
  531.                         ear1="Friomisi Earring",
  532.                         ear2="Crematio Earring",
  533.                         body="Amalric Doublet +1",
  534.                         hands="Jhakri Cuffs +2",
  535.                         ring1="Shiva Ring +1",
  536.                         ring2="Shiva Ring +1",
  537.                         back=MABCape,
  538.                         waist="Eschan Stone",
  539.                         legs="Jhakri Slops +2",
  540.                         feet="Amalric nails +1"}
  541.        
  542.         -----------------------------
  543.         -- Sword Weapon Skill Sets --
  544.         -----------------------------
  545.  
  546.         -- Chant du Cygne Sets --
  547.         sets.WS["Chant du Cygne"] = set_combine(sets.WS,{
  548.                         ammo="Jukukik Feather",
  549.                         head="Adhemar Bonnet +1",
  550.                         body=HerculeanVest.Crit,
  551.                         ring1="Begrudging Ring",
  552.                         back=CritCape,
  553.                         feet="Adhe. Gamashes +1"})
  554.         sets.WS["Chant du Cygne"].MidACC = set_combine(sets.WS.MidACC,{
  555.                         ammo="Jukukik Feather",
  556.                         head="Adhemar Bonnet +1",
  557.                         ring1="Begrudging Ring",
  558.                         back=CritCape,
  559.                         feet="Adhe. Gamashes +1"})
  560.         sets.WS["Chant du Cygne"].HighACC = set_combine(sets.WS.HighACC,{
  561.                         ring1="Begrudging Ring",
  562.                         back=CritCape})
  563.         sets.WS["Chant du Cygne"].MaxACC = set_combine(sets.WS.MaxACC,{
  564.                         back=CritCape})
  565.  
  566.         -- Requiescat Sets --
  567.         sets.WS.Requiescat = set_combine(sets.WS,{
  568.                         ammo="Quartz Tathlum +1",
  569.                         head="Jhakri Coronal +2",
  570.                         body="Jhakri Robe +1",
  571.                         hands="Jhakri Cuffs +2",
  572.                         ring1="Rufescent Ring",
  573.                         legs="Jhakri Slops +2",
  574.                         feet="Jhakri Pigaches +1"})
  575.         sets.WS.Requiescat.MidACC = set_combine(sets.WS.MidACC,{
  576.                         ammo="Quartz Tathlum +1",
  577.                         head="Jhakri Coronal +2",
  578.                         body="Jhakri Robe +1",
  579.                         hands="Jhakri Cuffs +2",
  580.                         ring1="Rufescent Ring",
  581.                         legs="Jhakri Slops +2",
  582.                         feet="Jhakri Pigaches +1"})
  583.         sets.WS.Requiescat.HighACC = set_combine(sets.WS.HighACC,{
  584.                         head="Jhakri Coronal +2",
  585.                         body="Jhakri Robe +1",
  586.                         hands="Jhakri Cuffs +2",
  587.                         ring1="Rufescent Ring",
  588.                         legs="Jhakri Slops +2",
  589.                         feet="Jhakri Pigaches +1"})
  590.         sets.WS.Requiescat.MaxACC = set_combine(sets.WS.MaxACC,{})
  591.  
  592.         -- Vorpal Blade Sets --
  593.         sets.WS["Vorpal Blade"] = set_combine(sets.WS,{
  594.                         head="Adhemar Bonnet +1",
  595.                         body=HerculeanVest.Crit,
  596.                         ring1="Begrudging Ring",
  597.                         back=CritCape,
  598.                         feet="Adhe. Gamashes +1"})
  599.         sets.WS["Vorpal Blade"].MidACC = set_combine(sets.WS.MidACC,{
  600.                         head="Adhemar Bonnet +1",
  601.                         ring1="Begrudging Ring",
  602.                         back=CritCape,
  603.                         feet="Adhe. Gamashes +1"})
  604.         sets.WS["Vorpal Blade"].HighACC = set_combine(sets.WS.HighACC,{
  605.                         ring1="Begrudging Ring",
  606.                         back=CritCape})
  607.         sets.WS["Vorpal Blade"].MaxACC = set_combine(sets.WS.MaxACC,{
  608.                         back=CritCape})
  609.  
  610.         -- Expiacion Sets --
  611.         sets.WS.Expiacion = set_combine(sets.WS.OneHit,{})
  612.         sets.WS.Expiacion.MidACC = set_combine(sets.WS.MidACC.OneHit,{})
  613.         sets.WS.Expiacion.HighACC = set_combine(sets.WS.HighACC.OneHit,{})
  614.         sets.WS.Expiacion.MaxACC = set_combine(sets.WS.MaxACC.OneHit,{})
  615.        
  616.         -- Savage Blade Set --
  617.         sets.WS["Savage Blade"] = set_combine(sets.WS.OneHit,{})
  618.         sets.WS["Savage Blade"].MidACC = set_combine(sets.WS.OneHit.MidACC,{})
  619.         sets.WS["Savage Blade"].HighACC = set_combine(sets.WS.OneHit.HighACC,{})
  620.         sets.WS["Savage Blade"].MaxACC = set_combine(sets.WS.OneHit.MaxACC,{})
  621.        
  622.         -- Circle Blade Sets --
  623.         sets.WS["Circle Blade"] = set_combine(sets.WS.OneHit,{})
  624.         sets.WS["Circle Blade"].MidACC = set_combine(sets.WS.OneHit.MidACC,{})
  625.         sets.WS["Circle Blade"].HighACC = set_combine(sets.WS.OneHit.HighACC,{})
  626.         sets.WS["Circle Blade"].MaxACC = set_combine(sets.WS.OneHit.MaxACC,{})     
  627.        
  628.         -- Sanguine Blade Set --
  629.         sets.WS["Sanguine Blade"] = set_combine(sets.WS.MABWS,{
  630.                         head="Pixie Hairpin +1",
  631.                         ring1="Archon Ring"})
  632.         sets.WS["Sanguine Blade"].MidACC = set_combine(sets.WS.MABWS,{
  633.                         head="Pixie Hairpin +1",
  634.                         ring1="Archon Ring"})
  635.         sets.WS["Sanguine Blade"].HighACC = set_combine(sets.WS.MABWS,{
  636.                         head="Pixie Hairpin +1",
  637.                         ring1="Archon Ring"})
  638.         sets.WS["Sanguine Blade"].MaxACC = set_combine(sets.WS.MABWS,{
  639.                         head="Pixie Hairpin +1",
  640.                         ring1="Archon Ring"})
  641.        
  642.         ----------------------------
  643.         -- Club Weapon Skill Sets --
  644.         ----------------------------
  645.        
  646.         -- Realmrazer Sets --
  647.         sets.WS.Realmrazer = set_combine(sets.WS,{
  648.                         ammo="Quartz Tathlum +1",
  649.                         head="Lilitu Headpiece",
  650.                         ear2="Lifestorm Earring",
  651.                         ring1="Rufescent Ring",
  652.                         ring2="Levia. Ring"})
  653.         sets.WS.Realmrazer.MidACC = set_combine(sets.WS.MidACC,{
  654.                         ammo="Quartz Tathlum +1",
  655.                         ear2="Lifestorm Earring",
  656.                         ring1="Rufescent Ring",
  657.                         ring2="Levia. Ring"})
  658.         sets.WS.Realmrazer.HighACC = set_combine(sets.WS.HighACC,{
  659.                         ear2="Lifestorm Earring",
  660.                         ring1="Rufescent Ring",
  661.                         ring2="Levia. Ring"})
  662.         sets.WS.Realmrazer.MaxACC = set_combine(sets.WS.MaxACC,{
  663.                         ring1="Rufescent Ring",})
  664.  
  665.         -- Black Halo Sets --
  666.         sets.WS["Black Halo"] = set_combine(sets.WS,{
  667.                         ammo="Quartz Tathlum +1",
  668.                         head="Dampening Tam",
  669.                         ring1="Rufescent Ring"})
  670.         sets.WS["Black Halo"].MidACC = set_combine(sets.WS.MidACC,{
  671.                         ammo="Quartz Tathlum +1",
  672.                         ring1="Rufescent Ring"})
  673.         sets.WS["Black Halo"].HighACC = set_combine(sets.WS.HighACC,{
  674.                         ring1="Rufescent Ring"})
  675.         sets.WS["Black Halo"].MaxACC = set_combine(sets.WS.MaxACC,{})
  676.        
  677.         -- True Strike Sets --
  678.         sets.WS["True Strike"] = set_combine(sets.WS.OneHit,{
  679.                         head="Adhemar Bonnet +1"})
  680.         sets.WS["True Strike"].MidACC = set_combine(sets.WS.OneHit.MidACC,{
  681.                         head="Adhemar Bonnet +1"})
  682.         sets.WS["True Strike"].HighACC = set_combine(sets.WS.OneHit.HighACC,{
  683.                         head="Adhemar Bonnet +1"})
  684.         sets.WS["True Strike"].MaxACC = set_combine(sets.WS.OneHit.MaxACC,{})
  685.        
  686.         -- Judgment Sets --
  687.         sets.WS.Judgment = set_combine(sets.WS.OneHit,{})
  688.         sets.WS.Judgment.MidACC = set_combine(sets.WS.OneHit.MidACC,{})
  689.         sets.WS.Judgment.HighACC = set_combine(sets.WS.OneHit.HighACC,{})
  690.         sets.WS.Judgment.MaxACC = set_combine(sets.WS.OneHit.MaxACC,{})
  691.        
  692.         -- Flash Nova Set --
  693.         sets.WS["Flash Nova"] = set_combine(sets.WS.MABWS,{})
  694.         sets.WS["Flash Nova"].MidACC = set_combine(sets.WS.MABWS,{})
  695.         sets.WS["Flash Nova"].HighACC = set_combine(sets.WS.MABWS,{})
  696.         sets.WS["Flash Nova"].MaxACC = set_combine(sets.WS.MABWS,{})
  697.        
  698.         ----------------------
  699.         -- Job Ability Sets --
  700.         ----------------------
  701.        
  702.         -- Blue Mage JA Sets --
  703.         sets.JA = {}
  704.         sets.JA['Azure Lore'] = {hands="Luh. Bazubands +1"}
  705.         sets['Chain Affinity'] = {head="Hashishin Kavuk +1",feet="Assim. Charuqs +2"}
  706.         sets.Efflux = {back=DACape,legs="Hashishin Tayt +1"}
  707.         sets['Burst Affinity'] = {feet="Hashi. Basmak +1"}
  708.         sets.Convergence = {head="Luh. Keffiyeh +1"}
  709.         sets.Diffusion = {feet="Luhlaza Charuqs +1"}
  710.        
  711.         -- Enmity JA Set --
  712.         sets.JA.Enmity = set_combine(sets.PDT,{
  713.                         neck="Unmoving Collar +1",
  714.                         ear1="Trux Earring",
  715.                         ear2="Cryptic Earring",
  716.                         body="Emet Harness +1",
  717.                         ring1="Petrov Ring",
  718.                         ring2="Eihwaz Ring",
  719.                         waist="Goading Belt"})
  720.        
  721.         -- /WAR JA Sets --
  722.         sets.JA.Provoke = set_combine(sets.JA.Enmity,{})
  723.         sets.JA.Warcry = set_combine(sets.JA.Enmity,{})
  724.        
  725.         -- /PLD JA Sets --
  726.         sets.JA["Shield Bash"] = set_combine(sets.JA.Enmity,{})
  727.         sets.JA.Sentinel = set_combine(sets.JA.Enmity,{})
  728.         sets.JA["Holy Circle"] = set_combine(sets.JA.Enmity,{})
  729.        
  730.         -- /DRK JA Sets --
  731.         sets.JA.Souleater = set_combine(sets.JA.Enmity,{})
  732.         sets.JA["Last Resort"] = set_combine(sets.JA.Enmity,{})
  733.         sets.JA["Arcane Circle"] = set_combine(sets.JA.Enmity,{})
  734.        
  735.         -- /DNC JA Sets --
  736.         sets.Waltz = {
  737.                         ammo="Staunch Tathlum",
  738.                         head="Carmine Mask +1",
  739.                         neck="Loricate Torque +1",
  740.                         ear1="Ethereal Earring",
  741.                         ear2="Genmei Earring",
  742.                         body="Vrikodara Jupon",
  743.                         hands="Amalric Gages +1",
  744.                         ring1="Defending Ring",
  745.                         ring2="Patricius Ring",
  746.                         waist="Chaac Belt",
  747.                         legs="Hashishin Tayt +1",
  748.                         feet="Hippo. Socks +1"}
  749.         sets.Step = {
  750.                         ammo="Pemphredo Tathlum",
  751.                         head="Jhakri Coronal +2",
  752.                         neck="Sanctity Necklace",
  753.                         ear1="Gwati Earring",
  754.                         ear2="Digni. Earring",
  755.                         body="Jhakri Robe +1",
  756.                         hands="Jhakri Cuffs +2",
  757.                         ring1="Stikini Ring",
  758.                         ring2="Stikini Ring",
  759.                         back=MABCape,
  760.                         waist="Chaac Belt",
  761.                         legs="Jhakri Slops +2",
  762.                         feet="Jhakri Pigaches +1"}     
  763.         sets.Flourish = set_combine(sets.Step,{})
  764.  
  765.         -- /RUN JA Sets --
  766.         sets.JA.Lunge = {
  767.                         ammo="Pemphredo Tathlum",
  768.                         head="Jhakri Coronal +2",
  769.                         neck="Sanctity Necklace",
  770.                         ear1="Friomisi Earring",
  771.                         ear2="Crematio Earring",
  772.                         body="Amalric Doublet +1",
  773.                         hands="Amalric Gages +1",
  774.                         ring1="Shiva Ring +1",
  775.                         ring2="Shiva Ring +1",
  776.                         back=MABCape,
  777.                         waist="Eschan Stone",
  778.                         legs="Jhakri Slops +2",
  779.                         feet="Amalric nails +1"}
  780.        
  781.         --------------------
  782.         -- Pre-Cast Sets --
  783.         --------------------
  784.        
  785.         -- Base Pre-Cast Set --
  786.         sets.Precast = {
  787.                         ammo="Impatiens",
  788.                         head="Carmine Mask +1",
  789.                         neck="Orunmila's Torque",
  790.                         ear1="Loquac. Earring",
  791.                         ear2="Etiolation Earring",
  792.                         body="Taeon Tabard",
  793.                         hands="Leyline Gloves",
  794.                         ring1="Lebeche Ring",
  795.                         ring2="Kishar Ring",
  796.                         back="Perimede Cape",
  797.                         waist="Witful Belt",
  798.                         legs="Psycloth Lappas",
  799.                         feet="Carmine Greaves +1"}
  800.        
  801.         -- Fast Cast Set --
  802.         sets.Precast.FastCast = set_combine(sets.Precast,{})
  803.                        
  804.         -- Pre-Cast Blue Magic --
  805.         sets.Precast['Blue Magic'] = set_combine(sets.Precast,{
  806.                         body="Hashishin Mintan +1"})
  807.                        
  808.         -- Pre-Cast Enhancing Magic --
  809.         sets.Precast['Enhancing Magic'] = set_combine(sets.Precast,{
  810.                         waist="Siegel Sash"})
  811.        
  812.         -- Cure Precast Set --
  813.         sets.Precast.Cure = set_combine(sets.Precast.FastCast,{
  814.                         ear2="Mendi. Earring",
  815.                         waist="Acerbic Sash +1"})
  816.  
  817.         ------------------------------------
  818.         -- Mid-Cast Sets (Non-Blue Magic) --
  819.         ------------------------------------
  820.  
  821.         -- Mid-Cast Base Set --
  822.         sets.Midcast = {
  823.                         ammo="Staunch Tathlum",
  824.                         head="Carmine Mask +1",
  825.                         neck="Orunmila's Torque",
  826.                         ear1="Loquac. Earring",
  827.                         ear2="Etiolation Earring",
  828.                         body="Taeon Tabard",
  829.                         hands="Leyline Gloves",
  830.                         ring1="Defending Ring",
  831.                         ring2="Kishar Ring",
  832.                         back=FCCape,
  833.                         waist="Witful Belt",
  834.                         legs="Psycloth Lappas",
  835.                         feet="Amalric nails +1"}
  836.  
  837.         -- Magic Haste Set --
  838.         sets.Midcast.Haste = set_combine(sets.Midcast,{})
  839.                        
  840.         -- Magic Attack Bonus Set --
  841.         sets.Midcast.MAB = {
  842.                         ammo="Pemphredo Tathlum",
  843.                         head="Jhakri Coronal +2",
  844.                         neck="Sanctity Necklace",
  845.                         ear1="Friomisi Earring",
  846.                         ear2="Crematio Earring",
  847.                         body="Amalric Doublet +1",
  848.                         hands="Amalric Gages +1",
  849.                         ring1="Shiva Ring +1",
  850.                         ring2="Shiva Ring +1",
  851.                         back=MABCape,
  852.                         waist="Eschan Stone",
  853.                         legs="Jhakri Slops +2",
  854.                         feet="Amalric nails +1"}
  855.                        
  856.         -- Magic Burst Set --
  857.         sets.Midcast.MB = {
  858.                         body="Samnuha Coat",
  859.                         hands="Amalric Gages +1",
  860.                         ring1="Mujin Band",
  861.                         ring2="Locus Ring",
  862.                         back="Seshaw Cape",
  863.                         feet="Jhakri Pigaches +1"}
  864.  
  865.         -- Magic Accuracy Set --
  866.         sets.Midcast.MACC = {
  867.                         ammo="Pemphredo Tathlum",
  868.                         head="Carmine Mask +1",
  869.                         neck="Erra Pendant",
  870.                         ear1="Digni. Earring",
  871.                         ear2="Gwati Earring",
  872.                         body="Amalric Doublet +1",
  873.                         hands="Jhakri Cuffs +2",
  874.                         ring1="Stikini Ring",
  875.                         ring2="Stikini Ring",
  876.                         back=MABCape,
  877.                         waist="Eschan Stone",
  878.                         legs="Jhakri Slops +2",
  879.                         feet="Jhakri Pigaches +1"}
  880.                        
  881.         -- Magic Enmity Set --
  882.         sets.Midcast.MagicEnmity = set_combine(sets.Midcast,{
  883.                         ammo="Sapience Orb",
  884.                         neck="Unmoving Collar +1",
  885.                         ear1="Trux Earring",
  886.                         ear2="Cryptic Earring",
  887.                         body="Emet Harness +1",
  888.                         ring1="Petrov Ring",
  889.                         ring2="Eihwaz Ring",
  890.                         waist="Goading Belt"})
  891.        
  892.         -- Enhancing Magic Base Set --
  893.         sets.Midcast['Enhancing Magic'] = {
  894.                         head="Carmine Mask +1",
  895.                         neck="Incanter's Torque",
  896.                         ear1="Andoaa Earring",
  897.                         ear2="Augment. Earring",
  898.                         body="Telchine Chas.",
  899.                         ring1="Stikini Ring",
  900.                         ring2="Stikini Ring",
  901.                         back="Perimede Cape",
  902.                         waist="Olympus Sash",
  903.                         legs="Carmine Cuisses +1"}
  904.        
  905.         -- Elemental Magic Set --
  906.         sets.Midcast['Elemental Magic'] = set_combine(sets.Midcast.MAB,{})
  907.  
  908.         -- Enfeebling Magic Set --
  909.         sets.Midcast['Enfeebling Magic'] = set_combine(sets.Midcast.MACC,{
  910.                         head="Carmine Mask +1",
  911.                         ring2="Kishar Ring"})
  912.        
  913.         -- Dark Magic Set --
  914.         sets.Midcast['Dark Magic'] = set_combine(sets.Midcast.MACC,{})
  915.        
  916.         -- Refresh Set --
  917.         sets.Midcast.Refresh = set_combine(sets.Midcast,{
  918.                         head="Amalric Coif",
  919.                         waist="Gishdubar Sash"})
  920.        
  921.         -- Flash Set --
  922.         sets.Midcast.Flash = set_combine(sets.Midcast.MagicEnmity,{})
  923.        
  924.         -- Repose Set --
  925.         sets.Midcast.Repose = set_combine(sets.Midcast.MACC,{})
  926.        
  927.         -- Stoneskin Set --
  928.         sets.Midcast.Stoneskin = set_combine(sets.Midcast['Enhancing Magic'],{waist="Siegel Sash"})
  929.                        
  930.         -- Enfeebling Ninjutsu Set --
  931.         sets.Midcast.Enfeebling_Ninjutsu = set_combine(sets.Midcast.MACC,{})
  932.        
  933.         -- Elemental Ninjutsu Set --
  934.         sets.Midcast.Elemental_Ninjutsu = set_combine(sets.Midcast.MAB,{})
  935.  
  936.         -----------------------------------------------------
  937.         -- For Cure Spells & The Listed Healing Blue Magic --
  938.         -----------------------------------------------------
  939.        
  940.         -- Cure Set --
  941.         sets.Midcast.Cure = {
  942.                         ammo="Quartz Tathlum +1",
  943.                         head="Carmine Mask +1",
  944.                         neck="Phalaina Locket",
  945.                         ear1="Loquac. Earring",
  946.                         ear2="Mendi. Earring",
  947.                         body="Vrikodara Jupon",
  948.                         hands="Telchine Gloves",
  949.                         ring1="Rufescent Ring",
  950.                         ring2="Levia. Ring",
  951.                         back="Solemnity Cape",
  952.                         waist="Gishdubar Sash",
  953.                         legs="Telchine Braconi",
  954.                         feet="Medium's Sabots"}
  955.                        
  956.         -- Self Cures --
  957.         sets.Midcast.SelfCure = set_combine(sets.Midcast.Cure,{
  958.                         waist="Gishdubar Sash"})
  959.                        
  960.         -- HP-up Cures --
  961.         sets.Midcast.HPCure = set_combine(sets.Midcast.Cure,{
  962.                         ammo="Egoist's Tathlum",
  963.                         ear1="Odnowa Earring",
  964.                         ear2="Odnowa Earring +1",
  965.                         ring1="Eihwaz Ring",
  966.                         waist="Gishdubar Sash",
  967.                         back="Moonbeam Cape"})
  968.        
  969.         ------------------------------
  970.         -- Mid-Cast Blue Magic Sets --
  971.         ------------------------------
  972.        
  973.          -- Blue Magic Base Mid-Cast Set --
  974.         sets.Midcast['Blue Magic'] = set_combine(sets.Midcast,{hands="Hashi. Bazu. +1"})
  975.  
  976.         -- For The Listed Physical Type Blue Magic --
  977.         sets.Midcast.PhysicalBlueMagic = {
  978.                         ammo="Floestone",
  979.                         head="Adhemar Bonnet +1",
  980.                         neck="Caro Necklace",
  981.                         ear1="Digni. Earring",
  982.                         ear2="Zennaroi Earring",
  983.                         body="Adhemar Jacket +1",
  984.                         hands="Adhemar Wrist. +1",
  985.                         ring1="Shukuyu Ring",
  986.                         ring2="Ifrit Ring +1",
  987.                         back=WSDCape,
  988.                         waist="Prosilio Belt +1",
  989.                         legs="Jhakri Slops +2",
  990.                         feet="Adhe. Gamashes +1"}
  991.  
  992.         -- BlueMagic STR Set --
  993.         sets.Midcast.PhysicalBlueMagic_STR = set_combine(sets.Midcast.PhysicalBlueMagic,{})
  994.  
  995.         -- BlueMagic STR/DEX Set --
  996.         sets.Midcast.PhysicalBlueMagic_DEX = set_combine(sets.Midcast.PhysicalBlueMagic,{
  997.                         ring1="Ramuh Ring +1",
  998.                         ring2="Ramuh Ring +1"})
  999.  
  1000.         -- BlueMagic STR/VIT Set --
  1001.         sets.Midcast.PhysicalBlueMagic_VIT = set_combine(sets.Midcast.PhysicalBlueMagic,{})
  1002.  
  1003.         -- BlueMagic STR/AGI Set --
  1004.         sets.Midcast.PhysicalBlueMagic_AGI = set_combine(sets.Midcast.PhysicalBlueMagic,{})
  1005.        
  1006.         -- Physical Acc Blue Magic --
  1007.         sets.Midcast.BlueMagic_PhysicalACC = {
  1008.                         ammo="Falcon Eye",
  1009.                         head="Carmine Mask +1",
  1010.                         neck="Combatant's Torque",
  1011.                         ear1="Digni. Earring",
  1012.                         ear2="Zennaroi Earring",
  1013.                         body="Adhemar Jacket +1",
  1014.                         hands="Adhemar Wrist. +1",
  1015.                         ring1="Ramuh Ring +1",
  1016.                         ring2="Ramuh Ring +1",
  1017.                         back=DACape,
  1018.                         waist="Olseni Belt",
  1019.                         legs="Carmine Cuisses +1",
  1020.                         feet=HerculeanBoots.TA}
  1021.                      
  1022.         -- For The Listed Magical Type BlueMagic --
  1023.         sets.Midcast.MagicalBlueMagic = set_combine(sets.Midcast.MAB,{})
  1024.        
  1025.         -- Dark Based Magical Blue Magic --
  1026.         sets.Midcast.BlueMagic_Dark = set_combine(sets.Midcast.MAB,{head="Pixie Hairpin +1",ring1="Archon Ring"})
  1027.        
  1028.         -- Light Based Magical Blue Magic --
  1029.         sets.Midcast.BlueMagic_Light = set_combine(sets.Midcast.MAB,{}) -- Insert Weatherspoon Ring Here --
  1030.  
  1031.         -- Earth Based Magical Blue Magic --
  1032.         sets.Midcast.BlueMagic_Earth = set_combine(sets.Midcast.MAB,{}) -- Insert Quanpur Necklace Here --
  1033.        
  1034.         -- Blue Magic Burst Affinity Magic Burst Set --
  1035.         sets.Midcast.BAMB = {}                                          -- Insert Emp Feet here if no +1 Amalric --
  1036.  
  1037.         -- Magic Accuracy For The Listed BlueMagic --
  1038.         sets.Midcast.BlueMagic_Accuracy = set_combine(sets.Midcast.MACC,{})
  1039.  
  1040.         -- Stun Set For The Listed BlueMagic --
  1041.         sets.Midcast.BlueMagic_Stun = set_combine(sets.Midcast.MACC,{})
  1042.                        
  1043.         -- Physical Stun Blue Magic --
  1044.         sets.Midcast.BlueMagic_PhysicalStun = set_combine(sets.Midcast.MACC,{
  1045.                         head="Carmine Mask +1",
  1046.                         body="Jhakri Robe +1",
  1047.                         hands="Jhakri Cuffs +2",
  1048.                         legs="Jhakri Slops +2",
  1049.                         feet="Jhakri Pigaches +1"})
  1050.  
  1051.         -- Buff Set For The Listed Blue Magic --
  1052.         sets.Midcast.BlueMagic_Buff = {
  1053.                         ammo="Staunch Tathlum",
  1054.                         head="Carmine Mask +1",
  1055.                         neck="Incanter's Torque",
  1056.                         ear1="Loquac. Earring",
  1057.                         ear2="Etiolation Earring",
  1058.                         body="Assim. Jubbah +2",
  1059.                         hands="Hashi. Bazu. +1",
  1060.                         ring1="Defending Ring",
  1061.                         ring2="Kishar Ring",
  1062.                         back="Cornflower Cape",
  1063.                         legs="Hashishin Tayt +1",
  1064.                         waist="Hachirin-no-Obi",
  1065.                         feet="Luhlaza Charuqs +1"}
  1066.  
  1067.         -- Breath Set For The Listed Blue Magic --
  1068.         sets.Midcast.BlueMagic_Breath = set_combine(sets.Midcast,{head="Luh. Keffiyeh +1"})
  1069.        
  1070.         -- White Wind Set --
  1071.         sets.Midcast.BlueMagic_HPCure = set_combine(sets.Midcast.HPCure,{})
  1072.        
  1073.         -- Enmity Sets For the Listed Blue Magic --
  1074.         sets.Midcast.BlueMagic_Emnity = set_combine(sets.Midcast.MagicEnmity,{})
  1075.  
  1076. end
  1077.  
  1078.         ---------------
  1079.         -- Functions --
  1080.         ---------------
  1081.        
  1082.         ----------------
  1083.         -- Pre-Target --
  1084.         ----------------
  1085.  
  1086. function pretarget(spell,action)
  1087.         if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
  1088.                 cancel_spell()
  1089.                 send_command('input /item "Echo Drops" <me>')
  1090.         elseif spell.english == "Berserk" and buffactive.Berserk then -- Change Berserk To Aggressor If Berserk Is On --
  1091.                 cancel_spell()
  1092.                 send_command('Aggressor')
  1093.         elseif spell.english:ifind("Cure") and player.mp<actualCost(spell.mp_cost) then -- Cure Degradation --
  1094.                 degrade_spell(spell,Cure_Spells)
  1095.         elseif spell.english:ifind("Curaga") and player.mp<actualCost(spell.mp_cost) then -- Curaga Degradation --
  1096.                 degrade_spell(spell,Curaga_Spells)
  1097.         return
  1098.     end
  1099. end
  1100.  
  1101.         --------------
  1102.         -- Pre-Cast --
  1103.         --------------
  1104.        
  1105. function precast(spell,action)
  1106.         if spell.type == "WeaponSkill" then
  1107.         if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
  1108.                 cancel_spell()
  1109.                 add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]')
  1110.         return
  1111.         else
  1112.                 equipSet = sets.WS
  1113.         if equipSet[spell.english] then
  1114.                 equipSet = equipSet[spell.english]
  1115.                 end
  1116.         if equipSet[AccArray[AccIndex]] then
  1117.                 equipSet = equipSet[AccArray[AccIndex]]
  1118.                 end
  1119.         if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
  1120.                 equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
  1121.                 end
  1122.         if spell.english == "Chant du Cygne" and player.tp > 2750 then
  1123.                 equipSet = set_combine(equipSet,{ear1="Mache Earring"})  
  1124.         elseif spell.english == "Requiescat" and player.tp > 2750 then
  1125.                 equipSet = set_combine(equipSet,{ear1="Lifestorm Earring"})  
  1126.         elseif spell.english == "Expiacion" and player.tp > 2750 then
  1127.                 equipSet = set_combine(equipSet,{ear1="Ishvara Earring",ear2="Brutal Earring"})
  1128.         elseif spell.english == "Savage Blade" and player.tp > 2750 then
  1129.                 equipSet = set_combine(equipSet,{ear1="Ishvara Earring",ear2="Brutal Earring"})
  1130.         elseif spell.english == "Vorpal Blade" and player.tp > 2750 then
  1131.                 equipSet = set_combine(equipSet,{ear1="Ishvara Earring",ear2="Brutal Earring"})
  1132.         elseif spell.english == "Sanguine Blade" and world.day == "Darksday" or world.weather_element == "Dark" then
  1133.                 equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
  1134.         elseif spell.english == "Realmrazer" and player.tp > 2750 then
  1135.                 equipSet = set_combine(equipSet,{ear1="Lifestorm Earring"})  
  1136.         elseif spell.english == "Black Halo" and player.tp > 2750 then
  1137.                 equipSet = set_combine(equipSet,{ear1="Ishvara Earring",ear2="Brutal Earring"})
  1138.         elseif spell.english == "Flash Nova" and world.day == "Lightsday" or world.weather_element == "Light" then
  1139.                 equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})                 
  1140.                 end
  1141.                 equip(equipSet)
  1142.                 end
  1143.         elseif spell.type == "JobAbility" or spell.type == "Ward" then
  1144.         if sets.JA[spell.english] then
  1145.                 equip(sets.JA[spell.english])
  1146.                 end        
  1147.         elseif spell.english == 'Lunge' or spell.english == 'Swipe' then
  1148.                 equip(sets.JA.Lunge)
  1149.         elseif spell.type == "Rune" then
  1150.                 equip(sets.JA.Enmity)              
  1151.         elseif spell.type:endswith('Magic') or spell.type == "Ninjutsu" then
  1152.         if buffactive.silence  then -- Cancel Magic or Ninjutsu If You Are Silenced --
  1153.                 cancel_spell()
  1154.                 add_to_chat(123, spell.name..' Canceled: [Silenced]')
  1155.         return
  1156.         else
  1157.         if (string.find(spell.english,'Cur') or BlueMagic_Healing:contains(spell.english) or BlueMagic_HPCure:contains(spell.english))  and spell.english ~= "Cursna" then
  1158.                 equip(sets.Precast.Cure)
  1159.         elseif string.find(spell.english,'Utsusemi') then
  1160.         if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
  1161.                 cancel_spell()
  1162.                 add_to_chat(123, spell.english .. ' Canceled: [3+ Images]')
  1163.         return
  1164.         else
  1165.                 equip(sets.Precast.FastCast)
  1166.                 end
  1167.         elseif sets.Precast[spell.skill] then
  1168.                 equip(sets.Precast[spell.skill])
  1169.         else
  1170.                 equip(sets.Precast.FastCast)
  1171.                 end
  1172.                 end
  1173.         elseif string.find(spell.type,'Flourish') then
  1174.         if spell.english == "Animated Flourish" then
  1175.                 equip(sets.Enmity)
  1176.         else
  1177.                 equip(sets.Flourish)
  1178.                 end
  1179.         elseif spell.type == "Step" then
  1180.                 equip(sets.Step)
  1181.         elseif spell.type == "Waltz" then
  1182.                 refine_waltz(spell,action)
  1183.                 equip(sets.Waltz)
  1184.         elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
  1185.                 cast_delay(0.2)
  1186.                 send_command('cancel Sneak')
  1187.         end
  1188. end
  1189.            
  1190.         --------------
  1191.         -- Mid-Cast --
  1192.         --------------
  1193.            
  1194. function midcast(spell,action)
  1195.                 equipSet = {}
  1196.         if spell.type:endswith('Magic') or spell.type == 'Ninjutsu' or spell.type == 'Trust' then
  1197.                 equipSet = sets.Midcast
  1198.         if equipSet[spell.english] then
  1199.                 equipSet = equipSet[spell.english]
  1200.         elseif (string.find(spell.english,'Cur') or BlueMagic_Healing:contains(spell.english)) and spell.english ~= "Cursna" then
  1201.         if spell.target.name == player.name then
  1202.                 equipSet = equipSet.SelfCure
  1203.         else
  1204.                 equipSet = equipSet.Cure
  1205.                 end
  1206.         elseif BlueMagic_HPCure:contains(spell.english) then
  1207.                 equipSet = equipSet.BlueMagic_HPCure
  1208.         elseif string.find(spell.english,'Protect') or string.find(spell.english,'Shell') then
  1209.         if spell.target.name == player.name then
  1210.                 equipSet = set_combine(equipSet,{ring1="Sheltered Ring"})
  1211.                 end    
  1212.         elseif spell.english:startswith('Haste') or spell.english:startswith('Flurry') or spell.english:startswith('Blink') or spell.english:startswith('Regen') or spell.english:endswith('Spikes') then
  1213.                 equipSet = sets.Haste
  1214.         elseif spell.english == "Stoneskin" then
  1215.         if buffactive.Stoneskin then
  1216.                 send_command('@wait 2.8;cancel stoneskin')
  1217.                 end
  1218.                 equipSet = equipSet.Stoneskin
  1219.         elseif PhysicalBlueMagic:contains(spell.english) or PhysicalBlueMagic_STR:contains(spell.english) or PhysicalBlueMagic_DEX:contains(spell.english) or PhysicalBlueMagic_VIT:contains(spell.english) or PhysicalBlueMagic_AGI:contains(spell.english) or BlueMagic_PhysicalACC:contains(spell.english) then
  1220.         if PhysicalBlueMagic_STR:contains(spell.english) then
  1221.                 equipSet = equipSet.PhysicalBlueMagic_STR
  1222.         elseif PhysicalBlueMagic_DEX:contains(spell.english) then
  1223.                 equipSet = equipSet.PhysicalBlueMagic_DEX
  1224.         elseif PhysicalBlueMagic_VIT:contains(spell.english) then
  1225.                 equipSet = equipSet.PhysicalBlueMagic_VIT
  1226.         elseif PhysicalBlueMagic_AGI:contains(spell.english) then
  1227.                 equipSet = equipSet.PhysicalBlueMagic_AGI
  1228.         elseif PhysicalBlueMagic:contains(spell.english) then
  1229.                 equipSet = equipSet.PhysicalBlueMagic
  1230.         elseif BlueMagic_PhysicalACC:contains(spell.english) then
  1231.                 equipSet = equipSet.BlueMagic_PhysicalACC
  1232.                 end
  1233.         if buffactive['Chain Affinity'] then
  1234.                 equipSet = set_combine(equipSet,sets['Chain Affinity'])
  1235.                 end
  1236.         if buffactive.Efflux then
  1237.                 equipSet = set_combine(equipSet,sets.Efflux)
  1238.                 end
  1239.         elseif MagicalBlueMagic:contains(spell.english) or BlueMagic_Dark:contains(spell.english) or BlueMagic_Light:contains(spell.english) or BlueMagic_Earth:contains(spell.english) then
  1240.         if MagicalBlueMagic:contains(spell.english) then
  1241.                 equipSet = equipSet.MagicalBlueMagic
  1242.         elseif BlueMagic_Dark:contains(spell.english) then
  1243.                 equipSet = equipSet.BlueMagic_Dark
  1244.         elseif BlueMagic_Light:contains(spell.english) then
  1245.                 equipSet = equipSet.BlueMagic_Light
  1246.         elseif BlueMagic_Earth:contains(spell.english) then
  1247.                 equipSet = equipSet.BlueMagic_Earth
  1248.                 end
  1249.         if buffactive['Burst Affinity'] then
  1250.                 equipSet = set_combine(equipSet,sets['Burst Affinity'])
  1251.                 end
  1252.         if world.day_element == spell.element or world.weather_element == spell.element then
  1253.                 equipSet = set_combine(equipSet,{waist='Hachirin-no-Obi'})
  1254.                 end
  1255.         if buffactive.Convergence then
  1256.                 equipSet = set_combine(equipSet,sets.Convergence)
  1257.                 end
  1258.         if buffactive['Burst Affinity'] or buffactive['Azure Lore'] and MB == 'ON' then
  1259.                 equipSet = set_combine(equipSet,sets.Midcast.BAMB)
  1260.                 end
  1261.                 equip(equipSet)
  1262.         elseif BlueMagic_Accuracy:contains(spell.english) then
  1263.                 equipSet = equipSet.BlueMagic_Accuracy
  1264.         elseif BlueMagic_Stun:contains(spell.english) then
  1265.                 equipSet = equipSet.BlueMagic_Stun
  1266.         elseif BlueMagic_PhysicalStun:contains(spell.english) then
  1267.                 equipSet = equipSet.BlueMagic_PhysicalStun
  1268.         elseif BlueMagic_Emnity:contains(spell.english) then
  1269.                 equipSet = equipSet.BlueMagic_Emnity                       
  1270.         elseif BlueMagic_Buff:contains(spell.english) then
  1271.                 equipSet = equipSet.BlueMagic_Buff
  1272.         elseif BlueMagic_Refresh:contains(spell.english) then
  1273.                 equipSet = equipSet.Refresh
  1274.         elseif BlueMagic_Diffusion:contains(spell.english) and buffactive.Diffusion then
  1275.                 equipSet = set_combine(equipSet,sets.Diffusion)
  1276.         elseif BlueMagic_Breath:contains(spell.english) then
  1277.                 equipSet = equipSet.BlueMagic_Breath
  1278.         elseif spell.english == "Stoneskin" then
  1279.         if buffactive.Stoneskin then
  1280.                 send_command('@wait 2.8;cancel stoneskin')
  1281.                 end
  1282.                 equipSet = equipSet.Stoneskin
  1283.         elseif spell.english == "Sneak" then
  1284.         if spell.target.name == player.name and buffactive['Sneak'] then
  1285.                 send_command('cancel sneak')
  1286.                 end
  1287.                 equipSet = equipSet.Haste
  1288.         elseif string.find(spell.english,'Utsusemi') then
  1289.         if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then
  1290.                 send_command('@wait 1.7;cancel Copy Image*')
  1291.                 end
  1292.                 equipSet = equipSet.Haste
  1293.         elseif spell.english == 'Monomi: Ichi' then
  1294.         if buffactive['Sneak'] then
  1295.                 send_command('@wait 1.7;cancel sneak')
  1296.                 end
  1297.                 equipSet = equipSet.Haste
  1298.         elseif spell.english:startswith('Tonko') then
  1299.                 equipSet = equipSet.Haste
  1300.         elseif spell.english:startswith('Jabaku') or spell.english:startswith('Hojo') or spell.english:startswith('Kurayami') or spell.english:startswith('Dokumori') then
  1301.                 equipSet = equipSet.Enfeebling_Ninjutsu
  1302.         elseif spell.english:startswith('Katon') or spell.english:startswith('Suiton') or spell.english:startswith('Doton') or spell.english:startswith('Hyoton') or spell.english:startswith('Huton') or spell.english:startswith('Raiton') then
  1303.                 equipSet = equipSet.Elemental_Ninjutsu
  1304.         if (world.day_element == spell.element or world.weather_element == spell.element) then
  1305.                 equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
  1306.         end
  1307.         if MB == 'ON' then
  1308.                 equipSet = set_combine(equipSet,sets.Midcast.MB)
  1309.                 end
  1310.         elseif equipSet[spell.skill] then
  1311.                 equipSet = equipSet[spell.skill]
  1312.                 end
  1313.         if spell.english:startswith('Cur') or spell.english:startswith('White Wind') and spell.english ~= "Cursna" then
  1314.         if (world.day_element == spell.element or world.weather_element == spell.element) then
  1315.                 equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
  1316.                 end
  1317.                 end
  1318.         if spell.skill == 'Elemental Magic' or spell.english:startswith('Aspir') or spell.english:startswith('Drain') then
  1319.         if (world.day_element == spell.element or world.weather_element == spell.element) then
  1320.                 equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
  1321.                 end
  1322.         if MB == 'ON' then
  1323.                 equipSet = set_combine(equipSet,sets.Midcast.MB)
  1324.                 end
  1325.                 end
  1326.         elseif equipSet[spell.english] then
  1327.                 equipSet = equipSet[spell.english]
  1328.         end
  1329.         equip(equipSet)
  1330. end
  1331.        
  1332.         ----------------
  1333.         -- After-Cast --
  1334.         ----------------
  1335.        
  1336. function aftercast(spell,action)
  1337.         if spell.type == "WeaponSkill" and not spell.interrupted then
  1338.                 send_command('wait 0.2;gs c TP')
  1339.         elseif spell.english == "Sleep II" or spell.english == "Repose" or spell.english == "Dream Flower" then -- Sleep II//Repose/Dream Flower Countdown --
  1340.                 send_command('wait 60;input /echo Sleep II/Dream Flower Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep II/Dream Flower Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep II/Dream Flower Effect: [WEARING OFF IN 5 SEC.]')
  1341.         elseif spell.english == "Sleep" or spell.english == "Sleepga" or spell.english == "Sheep Song" then -- Sleep/Sleepga/Sheep Song Countdown --
  1342.                 send_command('wait 30;input /echo Sleep/Sheep Song Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep/Sheep Song Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep/Sheep Song Effect: [WEARING OFF IN 5 SEC.]')
  1343.         end
  1344.         status_change(player.status)
  1345. end
  1346.  
  1347.         -------------------
  1348.         -- Status Change --
  1349.         -------------------
  1350.        
  1351. function status_change(new,old)
  1352.         if Armor == 'PDT' then
  1353.                 equip(sets.PDT)
  1354.         elseif Armor == 'MDT' then
  1355.                 equip(sets.MDT)
  1356.         elseif Armor == 'Kiting' then
  1357.                 equip(sets.Kiting)
  1358.         elseif new == 'Engaged' then
  1359.                 equipSet = sets.TP
  1360.         if Armor == 'Hybrid' and equipSet["Hybrid"] then
  1361.                 equipSet = equipSet["Hybrid"]
  1362.                 end
  1363.         if equipSet[WeaponArray[WeaponIndex]] then
  1364.                 equipSet = equipSet[WeaponArray[WeaponIndex]]
  1365.                 end
  1366.         if equipSet[AccArray[AccIndex]] then
  1367.                 equipSet = equipSet[AccArray[AccIndex]]
  1368.                 end
  1369.         if (buffactive.March and (buffactive.Embrava or buffactive.Haste or buffactive['Mighty Guard']) or (buffactive.Haste == 2) or (buffactive['Mighty Guard']) and (buffactive.Embrava or buffactive.Haste)) and equipSet["HighHaste"] then
  1370.                 equipSet = equipSet["HighHaste"]
  1371.                 end
  1372.         if buffactive["Aftermath: Lv.3"] and player.equipment.main == 'Tizona' and equipSet["AM3"] then -- AM3 Set Equip (Mythic Only) --
  1373.                 equipSet = equipSet["AM3"]
  1374.                 end
  1375.         if Thaumas == 'ON' then
  1376.                 equipSet = set_combine(equipSet,sets.TP.Thaumas)
  1377.                 end
  1378.         if TH == 'ON' then -- Treasure Hunter TP Toggle --
  1379.             equipSet = set_combine(equipSet,sets.TP.TH)
  1380.         end
  1381.                 equip(equipSet)
  1382.         elseif new == 'Idle' then
  1383.                 equipSet = sets.Idle
  1384.         if equipSet[IdleArray[IdleIndex]] then
  1385.                 equipSet = equipSet[IdleArray[IdleIndex]]
  1386.                 end
  1387.         if Cities:contains(world.area) then
  1388.                 equipSet = equip(sets.Idle.Town)
  1389.                 end
  1390.         if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
  1391.                 equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
  1392.                 end
  1393.         equip(equipSet)
  1394.         end
  1395. end
  1396.        
  1397.         -----------------
  1398.         -- Buff Change --
  1399.         -----------------
  1400.    
  1401. function buff_change(buff,gain,buff_table)
  1402.         buff = string.lower(buff)
  1403.         if buff_table['id'] == 272 and player.equipment.main == 'Tizona' then -- Tizona AM3 Timer/Countdown --
  1404.         if gain then
  1405.                 send_command('timers create "Mythic Aftermath: Lv.3" 180 down')
  1406.         else
  1407.                 send_command('timers delete "Mythic Aftermath: Lv.3"')
  1408.                 add_to_chat(123,'Tizona AM3: [OFF]')
  1409.                 end
  1410.         elseif buff_table['id'] == 271 and player.equipment.main == 'Tizona' then -- Tizona AM2 Timer/Countdown --
  1411.         if gain then
  1412.                 send_command('timers create "Mythic Aftermath: Lv.2" 270 down')
  1413.         else
  1414.                 send_command('timers delete "Mythic Aftermath: Lv.2"')
  1415.                 add_to_chat(123,'Tizona AM2: [OFF]')
  1416.                 end    
  1417.         elseif buff_table['id'] == 272 and player.equipment.main == 'Almace' then -- Almace AM3 Timer/Countdown --
  1418.         if gain then
  1419.                 send_command('timers create "Empy Aftermath: Lv.3" 180 down')
  1420.                 else
  1421.                 send_command('timers delete "Empy Aftermath: Lv.3"')
  1422.                 add_to_chat(123,'Almace AM3: [OFF]')
  1423.                 end
  1424.         elseif buff_table['id'] == 271 and player.equipment.main == 'Almace' then -- Almace AM2 Timer/Countdown --
  1425.         if gain then
  1426.                 send_command('timers create "Empy Aftermath: Lv.2" 120 down')
  1427.         else
  1428.                 send_command('timers delete "Empy Aftermath: Lv.2"')
  1429.                 add_to_chat(123,'Almace AM2: [OFF]')
  1430.                 end    
  1431.         elseif buff_table['id'] == 272 and player.equipment.main == 'Sequence' then -- Sequence AM3 Timer/Countdown --
  1432.         if gain then
  1433.                 send_command('timers create "Aeonic Aftermath: Lv.3" 180 down')
  1434.                 else
  1435.                 send_command('timers delete "Aeonic Aftermath: Lv.3"')
  1436.                 add_to_chat(123,'Sequence AM3: [OFF]')
  1437.                 end
  1438.         elseif buff_table['id'] == 271 and player.equipment.main == 'Sequence' then -- Sequence AM2 Timer/Countdown --
  1439.         if gain then
  1440.                 send_command('timers create "Aeonic Aftermath: Lv.2" 180 down')
  1441.         else
  1442.                 send_command('timers delete "Aeonic Aftermath: Lv.2"')
  1443.                 add_to_chat(123,'Sequence AM2: [OFF]')
  1444.                 end    
  1445.         elseif buff_table['id'] == 163 then -- Azure Lore Timer --
  1446.         if gain then
  1447.                 send_command('timers create "Azure Lore" 40 down')
  1448.         else
  1449.                 send_command('timers delete "Azure Lore"')
  1450.                 end    
  1451.         elseif buff_table['id'] == 164 then -- Chain Affinity Timer --
  1452.         if gain then
  1453.                 send_command('timers create "Chain Affinity" 30 down')
  1454.         else
  1455.                 send_command('timers delete "Chain Affinity"')
  1456.                 end        
  1457.         elseif buff_table['id'] == 165 then -- Burst Affinity Timer --
  1458.         if gain then
  1459.                 send_command('timers create "Burst Affinity" 30 down')
  1460.         else
  1461.                 send_command('timers delete "Burst Affinity"')
  1462.                 end    
  1463.         elseif buff_table['id'] == 457 then -- Efflux Timer --
  1464.         if gain then
  1465.                 send_command('timers create "Efflux" 60 down')
  1466.         else
  1467.                 send_command('timers delete "Efflux"')
  1468.                 end    
  1469.         elseif buff_table['id'] == 356 then -- Diffusion Timer --
  1470.         if gain then
  1471.                 send_command('timers create "Diffusion" 60 down')
  1472.         else
  1473.                 send_command('timers delete "Diffusion"')
  1474.                 end    
  1475.         elseif buff_table['id'] == 485 then -- Unbridled Learning Timer --
  1476.         if gain then
  1477.                 send_command('timers create "Unbridled Learning" 60 down')
  1478.         else
  1479.                 send_command('timers delete "Unbridled Learning"')
  1480.                 end    
  1481.         elseif buff_table['id'] == 505 then -- Unbridled Wisdom Timer --
  1482.         if gain then
  1483.                 send_command('timers create "Unbridled Wisdom" 60 down')
  1484.         else
  1485.                 send_command('timers delete "Unbridled Wisdom"')
  1486.                 end                    
  1487.         elseif buff_table['id'] == 434 then -- Brew Timer --
  1488.         if gain then
  1489.                 send_command('timers create "Transcendency" 180 down')
  1490.         else
  1491.                 send_command('timers delete "Transcendency"')
  1492.                 add_to_chat(123,'Transcendency: [OFF]')
  1493.                 end            
  1494.         elseif buff_table['id'] == 1 then -- Weakness Timer --
  1495.         if gain then
  1496.                 send_command('timers create "Weakness" 300 up')
  1497.         else
  1498.                 send_command('timers delete "Weakness"')
  1499.                 add_to_chat(158,'Weakness: [OFF]')
  1500.                 end
  1501.         elseif buff_table['id'] == 15 then -- Doom Party Chat --
  1502.         if gain then
  1503.                 send_command('input /party Doom')
  1504.         else
  1505.                 send_command('input /party Doom off')
  1506.                 add_to_chat(158,'Doom: [OFF]')
  1507.                 end
  1508.         elseif buff_table['id'] == 9 then -- Curse Party Chat --
  1509.         if gain then
  1510.                 send_command('input /party Curse')
  1511.         else
  1512.                 add_to_chat(158,'Curse: [OFF]')
  1513.                 end
  1514.         elseif buff_table['id'] == 14 or buff_table['id'] == 17 then -- Charm Party Chat --
  1515.         if gain then
  1516.                 send_command('input /party Charmed')
  1517.         else
  1518.                 send_command('input /party Charm off')
  1519.                 add_to_chat(158,'Charm: [OFF]')
  1520.                 end
  1521.         elseif buff_table['id'] == 4 then -- Paralysis Party Chat --
  1522.         if gain then
  1523.                 add_to_chat(123,'Paralyzed!')
  1524.         else
  1525.                 add_to_chat(158,'Paralysis: [OFF]')
  1526.                 end            
  1527.         elseif buff_table['id'] == 91 then -- Nat. Meditation --
  1528.         if not gain then
  1529.                 add_to_chat(123,'Nat. Meditation: [OFF]')
  1530.                 end
  1531.         elseif buff_table['id'] == 93 then -- Cocoon Notification --
  1532.         if not gain then
  1533.                 add_to_chat(123,'Cocoon: [OFF]')
  1534.                 end    
  1535.         elseif buff_table['id'] == 33 then -- Haste --
  1536.         if not gain then
  1537.                 add_to_chat(123,'Haste: [OFF]')
  1538.                 end    
  1539.         elseif buff_table['id'] == 147 then -- Attack Down --
  1540.         if not gain then
  1541.                 add_to_chat(158,'Attack Down: [OFF]')
  1542.                 end
  1543.         elseif buff_table['id'] == 149 then -- Defense Down --
  1544.         if not gain then
  1545.                 add_to_chat(158,'Defense Down: [OFF]')
  1546.                 end    
  1547.         elseif buff_table['id'] == 13  then    -- Slow --
  1548.         if gain then
  1549.                 add_to_chat(123,'Slowed!')
  1550.                 else
  1551.                 add_to_chat(158,'Slow: [OFF]')
  1552.                 end
  1553.         elseif buff_table['id'] == 42 then -- Regen --
  1554.         if not gain then
  1555.                 add_to_chat(123,'Regen: [OFF]')
  1556.                 end    
  1557.         elseif buff_table['id'] == 43 then -- Refresh --
  1558.         if not gain then
  1559.                 add_to_chat(123,'Refresh: [OFF]')
  1560.                 end
  1561.         elseif buff_table['id'] == 152 then -- Magic Barrier --
  1562.         if not gain then
  1563.                 add_to_chat(123,'Magic Barrier: [OFF]')
  1564.                 end    
  1565.         elseif buff_table['id'] == 116 then -- Phalanx/Barrier Tusk --
  1566.         if not gain then
  1567.                 add_to_chat(123,'Phalanx: [OFF]')
  1568.                 end    
  1569.         elseif buff_table['id'] == 36 then -- Blink/Occultation --
  1570.         if not gain then
  1571.                 add_to_chat(123,'Blink: [OFF]')
  1572.                 end    
  1573.         elseif buff_table['id'] == 604 then -- Mighty Guard --
  1574.         if not gain then
  1575.                 add_to_chat(123,'Mighty Guard: [OFF]')
  1576.                 end    
  1577.         elseif buff_table['id'] == 251 then -- Food --
  1578.         if not gain then
  1579.                 add_to_chat(123,'Food: [OFF]')
  1580.                 end
  1581.         elseif buff_table['id'] == 28 then -- Terror --
  1582.         if not gain then
  1583.                 add_to_chat(158,'Terror: [OFF]')
  1584.                 end
  1585.         elseif buff_table['id'] == 10 then -- Stun --
  1586.         if not gain then
  1587.                 add_to_chat(158,'Stun: [OFF]')
  1588.                 end    
  1589.         elseif buff_table['id'] == 16 then -- Amnesia --
  1590.         if not gain then
  1591.                 add_to_chat(158,'Amnesia: [OFF]')
  1592.                 end                
  1593.         elseif buff_table['id'] == 2 or buff_table['id'] == 19 then -- Sleep --
  1594.         if gain then
  1595.                 send_command('input /party ZZZ')
  1596.         else
  1597.                 add_to_chat(158,'Sleep: [OFF]')
  1598.                 end        
  1599.         end
  1600.         if buffactive.Terror or buffactive.Stun or buffactive.Petrification or buffactive.Sleep and gain then -- Lock PDT When You Are Terrorised/Stunned/Petrified/Slept --
  1601.                 equip({
  1602.                         ammo="Staunch Tathlum",
  1603.                         head="Lithelimb Cap",
  1604.                         neck="Loricate Torque +1",
  1605.                         ear1="Ethereal Earring",
  1606.                         ear2="Eabani Earring",
  1607.                         body="Ayanmo Corazza",
  1608.                         hands=HerculeanGloves.DT,
  1609.                         ring1="Defending Ring",
  1610.                         ring2="Gelatinous Ring +1",
  1611.                         back="Moonbeam Cape",
  1612.                         waist="Flume Belt +1",
  1613.                         legs="Iuitl Tights +1",
  1614.                         feet=HerculeanBoots.DT})
  1615.         else
  1616.         if not midaction() then
  1617.                 status_change(player.status)
  1618.                 end
  1619.         end
  1620. end
  1621.  
  1622.  
  1623.         -------------------------------------------------------------------------------------
  1624.         -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
  1625.         -------------------------------------------------------------------------------------
  1626.        
  1627. function self_command(command)
  1628.         if command == 'acc' then -- Accuracy Level Toggle --
  1629.                 AccIndex = (AccIndex % #AccArray) + 1
  1630.                 add_to_chat(155,'Accuracy Level: ' .. AccArray[AccIndex])
  1631.                 status_change(player.status)
  1632.         elseif command == 'dw' then -- DW Toggle --
  1633.                 WeaponIndex = (WeaponIndex % #WeaponArray) + 1
  1634.                 add_to_chat(155,'Dual Wield: '..WeaponArray[WeaponIndex])
  1635.                 status_change(player.status)
  1636.         elseif command == 'update' then -- Update Gear --
  1637.                 status_change(player.status)
  1638.                 add_to_chat(155,'-[Gear Update]-')
  1639.                 add_to_chat(155,'Dual Wield: '..WeaponArray[WeaponIndex])
  1640.                 add_to_chat(155,'Accuracy Level: ' .. AccArray[AccIndex])
  1641.                 add_to_chat(155,'Idle Set: ' .. IdleArray[IdleIndex])
  1642.         elseif command == 'hybrid' then -- Hybrid Toggle --
  1643.         if Armor == 'Hybrid' then
  1644.                 Armor = 'None'
  1645.                 add_to_chat(123,'Hybrid Set: [Unlocked]')
  1646.         else
  1647.                 Armor = 'Hybrid'
  1648.                 add_to_chat(158,'Hybrid Set: '..AccArray[AccIndex])
  1649.                 end
  1650.                 status_change(player.status)
  1651.         elseif command == 'th' then -- Treasure Hunter TP Toggle --
  1652.         if TH == 'ON' then
  1653.                 TH = 'OFF'
  1654.                 add_to_chat(123,'Treasure Hunter TP: [Unlocked]')
  1655.         else
  1656.                 TH = 'ON'
  1657.                 add_to_chat(158,'Treasure Hunter TP: [Locked]')
  1658.                 end
  1659.                 status_change(player.status)
  1660.         elseif command == 'pdt' then -- PDT Toggle --
  1661.         if Armor == 'PDT' then
  1662.                 Armor = 'None'
  1663.                 add_to_chat(123,'PDT Set: [Unlocked]')
  1664.         else
  1665.                 Armor = 'PDT'
  1666.                 add_to_chat(158,'PDT Set: [Locked]')
  1667.                 end
  1668.                 status_change(player.status)
  1669.         elseif command == 'mdt' then -- MDT Toggle --
  1670.         if Armor == 'MDT' then
  1671.                 Armor = 'None'
  1672.                 add_to_chat(123,'MDT Set: [Unlocked]')
  1673.         else
  1674.                 Armor = 'MDT'
  1675.                 add_to_chat(158,'MDT Set: [Locked]')
  1676.                 end
  1677.                 status_change(player.status)
  1678.         elseif command == 'kiting' then -- Kiting Toggle --
  1679.         if Armor == 'Kiting' then
  1680.                 Armor = 'None'
  1681.                 add_to_chat(123,'Kiting Set: [Unlocked]')
  1682.         else
  1683.                 Armor = 'Kiting'
  1684.                 add_to_chat(158,'Kiting Set: [Locked]')
  1685.                 end
  1686.                 status_change(player.status)
  1687.         elseif command == 'thaumas' then -- Thaumas Coat Toggle --
  1688.         if Thaumas == 'ON' then
  1689.                 Thaumas = 'OFF'
  1690.                 add_to_chat(123,'Thaumas Coat: [OFF]')
  1691.         else
  1692.                 Thaumas = 'ON'
  1693.                 add_to_chat(158,'Thaumas Coat: [ON]')
  1694.                 end
  1695.         elseif command == 'mb' then -- Magic Burst Toggle --
  1696.         if MB == 'ON' then
  1697.                 MB = 'OFF'
  1698.                 add_to_chat(123,'Magic Burst: [OFF]')
  1699.         else
  1700.                 MB = 'ON'
  1701.                 add_to_chat(158,'Maic Burst: [ON]')
  1702.                 end
  1703.                 status_change(player.status)
  1704.         elseif command == 'distance' then -- Distance Toggle --
  1705.         if player.target.distance then
  1706.                 target_distance = math.floor(player.target.distance*10)/10
  1707.                 add_to_chat(158,'Distance: '..target_distance)
  1708.         else
  1709.                 add_to_chat(123,'No Target Selected')
  1710.                 end
  1711.         elseif command == 'idle' then -- Idle Toggle --
  1712.                 IdleIndex = (IdleIndex % #IdleArray) + 1
  1713.                 add_to_chat(155,'Idle Set: ' .. IdleArray[IdleIndex])
  1714.                 status_change(player.status)
  1715.         elseif command == 'TP' then
  1716.                 add_to_chat(155,'TP Return: ['..tostring(player.tp)..']')
  1717.         elseif command:match('^SC%d$') then
  1718.                 send_command('//' .. sc_map[command])
  1719.                 end
  1720.        
  1721. end
  1722.  
  1723.         -----------
  1724.         -- Misc. --
  1725.         -----------
  1726.        
  1727. function actualCost(originalCost)
  1728.         if buffactive["Penury"] then
  1729.                 return originalCost*.5
  1730.         elseif buffactive["Light Arts"] then
  1731.                 return originalCost*.9
  1732.         else
  1733.                 return originalCost
  1734.         end
  1735. end
  1736.  
  1737. function degrade_spell(spell,degrade_array)
  1738.                 spell_index = table.find(degrade_array,spell.name)
  1739.         if spell_index>1 then
  1740.                 new_spell = degrade_array[spell_index - 1]
  1741.                 change_spell(new_spell,spell.target.raw)
  1742.                 add_to_chat(8,spell.name..' Canceled: ['..player.mp..'/'..player.max_mp..'MP::'..player.mpp..'%] Casting '..new_spell..' instead.')
  1743.         end
  1744. end
  1745.  
  1746. function find_player_in_alliance(name)
  1747.         for i,v in ipairs(alliance) do
  1748.         for k,p in ipairs(v) do
  1749.         if p.name == name then
  1750.         return p
  1751.         end
  1752.     end
  1753.     end
  1754. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement