Advertisement
Arnan

BLU Lua August 2017

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