Advertisement
Arnan

BLU lua 27/02/2016

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