Advertisement
Arnan

BLU Lua 9/3/2016

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