Advertisement
Arnan

BLU Lua October 2017

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