Advertisement
Arnan

BLU Lua 20/6/16

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