Arnan

RDM Lua August 2018

Aug 21st, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 43.71 KB | None | 0 0
  1.  
  2.         ----------------------------------------------
  3.         -- *** Arnan Red Mage Gearswap Lua File *** --
  4.         ----------------------------------------------
  5.                
  6.             -- Commands --
  7.                
  8.                 -- In Game: //gs c, Macro: /console gs c, Bind: gs c --
  9.            
  10.                 -- gs c acc         Toggle accuracy tier for TP/WS
  11.                 -- gs c idle        Toggle idle sets
  12.                
  13.                 -- gs c pdt         PDT on/off
  14.                 -- gs c mdt         MDT on/off
  15.                 -- gs c kiting      Kiting on/off
  16.                 -- gs c mb          Magic Burst on/off
  17.    
  18.         ----------
  19.         -- Sets --
  20.         ----------
  21.  
  22. function get_sets()
  23.     AccIndex = 1
  24.     AccArray = {"LowACC","MidACC","HighACC"} -- 3 Levels Of Accuracy Sets For TP/WS/Magic. Default ACC Set Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below --
  25.     IdleIndex = 1
  26.     IdleArray = {"Full","DT","Warp"} -- Default Idle Set Is Movement --
  27.     Armor = 'None'
  28.     StunIndex = 0
  29.     Lock_Main = 'OFF' -- Set Default Lock Main Weapon ON or OFF Here --
  30.     Obi = 'ON' -- Turn Default Obi ON or OFF Here --
  31.     LowNuke = 'ON' -- Set Default Low Tier Nuke ON or OFF Here --
  32.     MB = 'ON' -- Set Default MB ON or OFF Here --
  33.     Elemental_Staff = 'OFF' -- Set Default Precast Elemental Staff ON or OFF Here --
  34.     Enspells = 'OFF' -- Set Default Enspells ON or OFF Here --
  35.     target_distance = 6 -- Set Default Distance Here --
  36.     send_command('input /macro book 7;wait .1;input /macro set 1') -- Change Default Macro Book Here --
  37.     add_to_chat(158,'-----[Red Mage Lua Loaded]-----')
  38.     add_to_chat(155,'Accuracy Level: ' .. AccArray[AccIndex])
  39.     add_to_chat(155,'Idle Set: ' .. IdleArray[IdleIndex])
  40.     add_to_chat(158,'-----[Weapon Skill Keybinds]-----')
  41.     add_to_chat(155,'F7 - Sanguine Blade, F9 - Death Blossom, F10 - Requiescat, F11 - Savage Blade, Delete - Chant du Cygne')
  42.     add_to_chat(155,'F12 - Last Stand (mule), Alt+F12 - Leaden Salute (mule) Alt+Delete - Savage Blade (mule)')
  43.  
  44.     Low_Tier_Spells = S{
  45.             'Fire','Aero','Water','Blizzard','Stone','Thunder','Fire II','Aero II','Water II',
  46.             'Blizzard II','Stone II','Thunder II'}
  47.  
  48.     Non_Obi_Spells = S{
  49.             'Burn','Choke','Drown','Frost','Rasp','Shock','Impact','Anemohelix','Cryohelix',
  50.             'Geohelix','Hydrohelix','Ionohelix','Luminohelix','Noctohelix','Pyrohelix'}
  51.  
  52.     Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
  53.     Curaga_Spells = {"Curaga","Curaga II"} -- Curaga Degradation --
  54.    
  55.     -- Sucellos's Cape Augments --
  56.     WSDCape={ name="Sucellos's Cape", augments={'STR+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}}
  57.     INTCape={ name="Sucellos's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','"Mag.Atk.Bns."+10',}}
  58.     STPCape={ name="Sucellos's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Store TP"+10','Phys. dmg. taken-10%',}}
  59.     CritCape={ name="Sucellos's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Crit.hit rate+10',}}
  60.  
  61.         --------------------
  62.         -- Key Binds Load --
  63.         --------------------
  64.        
  65.         -- Key Bind Toggles (The Same for all my job files) (Ctrl Key) --
  66.         send_command('bind ^A input //gs c acc')
  67.         send_command('bind ^D input //gs c pdt')
  68.         send_command('bind ^H input //gs c hybrid')
  69.         send_command('bind ^I input //gs c idle')
  70.         send_command('bind ^K input //gs c kiting')
  71.  
  72.         -- Stuff to control both Mules (Ctrl Key) --
  73.         send_command('bind ^X input /pcmd add ojomo;pause 5;input /pcmd add oeogo')
  74.         send_command('bind ^3 input //send oeogo //ma Cure 3 Arnan')
  75.         send_command('bind ^4 input //send oeogo //ma Cure 4 Arnan')
  76.         send_command('bind ^5 input //send oeogo //ma Refresh Arnan')
  77.         send_command('bind ^7 input //send oeogo //ma haste ojomo')
  78.         send_command('bind ^8 input //send oeogo //ma Dia 2 <t>;pause 2;input //send ojomo //ja Light Shot <t>')
  79.         send_command('bind ^9 input //send ojomo //follow arnan;pause 0.1;input //send oeogo //follow arnan')
  80.         send_command('bind ^0 input //send ojomo //assist arnan;pause 0.1;input //send oeogo //assist arnan')
  81.         send_command('bind ^- input //send ojomo /attack <t>;pause 0.1;input //send oeogo /attack <t>')
  82.  
  83.         -- COR (Mule) Job Ability Key Binds (Alt Key) --
  84.         send_command('bind !7 input //send ojomo //ja Crooked Cards <me>')
  85.         send_command('bind !8 input //send ojomo //ja Snake Eye <me>')
  86.         send_command('bind !9 input //send ojomo //ja Fold <me>')
  87.         send_command('bind !0 input //send ojomo //ja Random Deal <me>')
  88.  
  89.         -- COR (mule) Phantom Roll Key Binds (Alt Key) --
  90.         send_command('bind !A input //send ojomo //ja Allies\' Roll <me>')
  91.         send_command('bind !B input //send ojomo //ja Bolter\'s Roll <me>')
  92.         send_command('bind !C input //send ojomo //ja Chaos Roll <me>')
  93.         send_command('bind !D input //send ojomo //ja Dancer\'s Roll <me>')
  94.         send_command('bind !E input //send ojomo //ja Evoker\s Roll <me>')
  95.         send_command('bind !F input //send ojomo //ja Fighter\'s Roll <me>')
  96.         send_command('bind !G input //send ojomo //ja Gallant\'s Roll <me>')
  97.         send_command('bind !H input //send ojomo //ja Hunter\'s Roll <me>')
  98.         send_command('bind !Q input //send ojomo //ja Warlock\'s Roll <me>')       
  99.         send_command('bind !R input //send ojomo //ja Rogue\'s Roll <me>')
  100.         send_command('bind !S input //send ojomo //ja Samurai Roll <me>')
  101.         send_command('bind !T input //send ojomo //ja Tactician\'s Roll <me>')
  102.         send_command('bind !W input //send ojomo //ja Wizard\'s Roll <me>')
  103.         send_command('bind !X input //send ojomo //ja Corsair\'s Roll <me>')
  104.  
  105.         -- GEO (Mule) Job Ability Key Binds (Win Key) --
  106.         send_command('bind @3 input //send oeogo //ja Radial Arcana <me>')
  107.         send_command('bind @5 input //send oeogo //ma Refresh <me>')
  108.         send_command('bind @7 input //send oeogo //ja Blaze of Glory <me>')
  109.         send_command('bind @8 input //send oeogo //ja Ecliptic Attrition <me>')
  110.         send_command('bind @9 input //send oeogo //ja Life Cycle <me>')
  111.         send_command('bind @0 input //send oeogo //ja Lasting Emanation <me>')
  112.  
  113.         -- GEO (Mule) Nuke Key Binds (Win Key) --
  114.         send_command('bind @F1 input //send oeogo /ma Aero V <t>;pause 0.5;input //send oeogo /ma Aero IV <t>;pause 0.5;input //send oeogo /ma Aero III <t>;')
  115.         send_command('bind @F2 input //send oeogo /ma Fire V <t>;pause 0.5;input //send oeogo /ma Fire IV <t>;pause 0.5;input //send oeogo /ma Fire III <t>;')
  116.         send_command('bind @F3 input //send oeogo /ma Thunder V <t>;pause 0.5;input //send oeogo /ma Thunder IV <t>;pause 0.5;input //send oeogo /ma Thunder III <t>;')
  117.         send_command('bind @F4 input //send oeogo /ma Stone V <t>;pause 0.5;input //send oeogo /ma Stone IV <t>;pause 0.5;input //send oeogo /ma Stone III <t>;')
  118.         send_command('bind @F5 input //send oeogo /ma Water V <t>;pause 0.5;input //send oeogo /ma Water IV <t>;pause 0.5;input //send oeogo /ma Water III <t>;')
  119.         send_command('bind @F6 input //send oeogo /ma Blizzard V <t>;pause 0.5;input //send oeogo /ma Blizzard IV <t>;pause 0.5;input //send oeogo /ma Blizzard III <t>;')
  120.  
  121.         -- GEO (Mule) Indicolure Spells (Win Key) --
  122.         send_command('bind @1 input //send oeogo /ma Indi-Regen <me>')
  123.         send_command('bind @2 input //send oeogo /ma Indi-Refresh <me>')
  124.         send_command('bind @D input //send oeogo /ma Indi-DEX <me>')
  125.         send_command('bind @A input //send oeogo /ma Indi-Acumen <me>')
  126.         send_command('bind @F input //send oeogo /ma Indi-Fury <me>')
  127.         send_command('bind @H input //send oeogo /ma Indi-Haste <me>')
  128.         send_command('bind @K input //send oeogo /ma Indi-Focus <me>')
  129.         send_command('bind @P input //send oeogo /ma Indi-Precision <me>')
  130.         send_command('bind @Q input //send oeogo /ma Indi-Barrier <me>')
  131.         send_command('bind @S input //send oeogo /ma Indi-STR <me>')
  132.         send_command('bind @V input //send oeogo /ma Indi-Attunement <me>')
  133.  
  134.         -- GEO (Mule) Geocolure Spells (Alt+Win Keys) --
  135.         send_command('bind !@1 input //send oeogo /ma Geo-Regen <me>')
  136.         send_command('bind !@2 input //send oeogo /ma Geo-Refresh <me>')
  137.         send_command('bind !@A input //send oeogo /ma Geo-Malaise <t>')
  138.         send_command('bind !@D input //send oeogo /ma Geo-DEX <me>')
  139.         send_command('bind !@F input //send oeogo /ma Geo-Frailty <t>')
  140.         send_command('bind !@H input //send oeogo /ma Geo-Haste <me>')
  141.         send_command('bind !@K input //send oeogo /ma Geo-Languor <t>')
  142.         send_command('bind !@P input //send oeogo /ma Geo-Torpor <t>') --
  143.         send_command('bind !@Q input //send oeogo /ma Geo-Wilt <t>') --
  144.         send_command('bind !@S input //send oeogo /ma Geo-STR <me>')
  145.         send_command('bind !@V input //send oeogo /ma Geo-Vex <t>')
  146.  
  147.         -- GEO (Mule) Entrust Indicolure Spells (Ctrl+Win Keys) --
  148.         send_command('bind ^@1 input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Regen Arnan')
  149.         send_command('bind ^@2 input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Refresh Arnan')
  150.         send_command('bind ^@A input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Acumen Arnan')
  151.         send_command('bind ^@D input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-DEX Arnan')
  152.         send_command('bind ^@F input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Fury Arnan')
  153.         send_command('bind ^@H input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Haste Arnan')
  154.         send_command('bind ^@K input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Focus Arnan')
  155.         send_command('bind ^@P input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Precision Arnan')
  156.         send_command('bind ^@Q input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Barrier Arnan')
  157.         send_command('bind ^@S input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-STR Arnan')
  158.         send_command('bind ^@V input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Attunement Arnan')
  159.  
  160.         -- Red Mage Job Key Binds (Ctrl & Ctrl+Alt Keys) --
  161.         send_command('bind ^!C input //ja Chainspell <me>')
  162.         send_command('bind ^1 input //ma Regen II')
  163.         send_command('bind ^2 input //ma Refresh III')
  164.        
  165.         -- Red Mage Nuke Key Binds (Ctrl Key) --
  166.         send_command('bind ^F1 input /ma Aero V <t>;pause 0.5;input /ma Aero IV <t>;pause 0.5;input /ma Aero III <t>;')
  167.         send_command('bind ^F2 input /ma Fire V <t>;pause 0.5;input /ma Fire IV <t>;pause 0.5;input /ma Fire III <t>;')
  168.         send_command('bind ^F3 input /ma Thunder V <t>;pause 0.5;input /ma Thunder IV <t>;pause 0.5;input /ma Thunder III <t>;')
  169.         send_command('bind ^F4 input /ma Stone V <t>;pause 0.5;input /ma Stone IV <t>;pause 0.5;input /ma Stone III <t>;')
  170.         send_command('bind ^F5 input /ma Water V <t>;pause 0.5;input /ma Water IV <t>;pause 0.5;input /ma Water III <t>;')
  171.         send_command('bind ^F6 input /ma Blizzard V <t>;pause 0.5;input /ma Blizzard IV <t>;pause 0.5;input /ma Blizzard III <t>;')
  172.  
  173.         -- Red Mage Weapon Skill Key Binds --
  174.         send_command('bind F7 input /ws "Sanguine Blade" <t>')
  175.         send_command('bind F9 input /ws "Death Blossom" <t>')
  176.         send_command('bind Insert input /ws "Knights of Round" <t>')
  177.         send_command('bind F10 input /ws "Requiescat" <t>')
  178.         send_command('bind F11 input /ws "Savage Blade" <t>')
  179.         send_command('bind Delete input /ws "Chant du Cygne" <t>')
  180.  
  181.         -- COR (mule) Weapon Skill Key Binds --
  182.         send_command('bind F12 input //send ojomo /ws "Last Stand" <t>')
  183.         send_command('bind !F12 input //send ojomo "Leaden Salute" <t>')
  184.         send_command('bind !Delete input //send ojomo /ws "Savage Blade" <t>') 
  185.  
  186.         ----------------------
  187.         -- Key Binds Unload --
  188.         ----------------------
  189.  
  190.         function file_unload()
  191.         -- Unbind Toggles --
  192.         send_command('unbind ^A')
  193.         send_command('unbind ^D')
  194.         send_command('unbind ^H')
  195.         send_command('unbind ^I')
  196.         send_command('unbind ^K')
  197.         -- Unbind Stuff to control both Mules --
  198.         send_command('unbind ^X')
  199.         send_command('unbind ^3')
  200.         send_command('unbind ^4')
  201.         send_command('unbind ^4')
  202.         send_command('unbind ^7')
  203.         send_command('unbind ^8')
  204.         send_command('unbind ^9')
  205.         send_command('unbind ^0')
  206.         send_command('unbind ^-')
  207.         -- Unbind COR JA's --
  208.         send_command('unbind !7')
  209.         send_command('unbind !8')
  210.         send_command('unbind !9')
  211.         send_command('unbind !0')
  212.         -- Unbind COR Rolls --
  213.         send_command('unbind !A')
  214.         send_command('unbind !B')
  215.         send_command('unbind !C')
  216.         send_command('unbind !D')
  217.         send_command('unbind !E')
  218.         send_command('unbind !F')
  219.         send_command('unbind !G')
  220.         send_command('unbind !H')
  221.         send_command('unbind !Q')
  222.         send_command('unbind !R')
  223.         send_command('unbind !S')
  224.         send_command('unbind !T')
  225.         send_command('unbind !W')
  226.         send_command('unbind !X')
  227.         -- Unbind GEO JA's --
  228.         send_command('unbind @3')
  229.         send_command('unbind @5')
  230.         send_command('unbind @7')
  231.         send_command('unbind @8')
  232.         send_command('unbind @9')
  233.         send_command('unbind @0')
  234.         -- Unbind GEO Nukes --
  235.         send_command('unbind @F1')
  236.         send_command('unbind @F2')
  237.         send_command('unbind @F3')
  238.         send_command('unbind @F4')
  239.         send_command('unbind @F5')
  240.         send_command('unbind @F6')
  241.         -- Unbind GEO Indi Spells --
  242.         send_command('unbind @1')
  243.         send_command('unbind @2')
  244.         send_command('unbind @A')
  245.         send_command('unbind @D')
  246.         send_command('unbind @F')
  247.         send_command('unbind @H')
  248.         send_command('unbind @K')
  249.         send_command('unbind @P')
  250.         send_command('unbind @Q')
  251.         send_command('unbind @S')
  252.         send_command('unbind @V')
  253.         -- Unbind GEO Geocolure Spells --
  254.         send_command('unbind !@1')
  255.         send_command('unbind !@2')
  256.         send_command('unbind !@A')
  257.         send_command('unbind !@D')
  258.         send_command('unbind !@F')
  259.         send_command('unbind !@H')
  260.         send_command('unbind !@K')
  261.         send_command('unbind !@P')
  262.         send_command('unbind !@Q')
  263.         send_command('unbind !@S')
  264.         send_command('unbind !@V')
  265.         -- Unbind GEO Entrust Spells --
  266.         send_command('unbind ^@1')
  267.         send_command('unbind ^@2')
  268.         send_command('unbind ^@A')
  269.         send_command('unbind ^@D')
  270.         send_command('unbind ^@F')
  271.         send_command('unbind ^@H')
  272.         send_command('unbind ^@K')
  273.         send_command('unbind ^@P')
  274.         send_command('unbind ^@Q')
  275.         send_command('unbind ^@S')
  276.         send_command('unbind ^@V')
  277.         -- Unbind RDM Job Binds --
  278.         send_command('unbind ^!C')
  279.         send_command('unbind ^1')
  280.         send_command('unbind ^2')
  281.         -- Unbind RDM Nukes --
  282.         send_command('unbind ^F1')
  283.         send_command('unbind ^F2')
  284.         send_command('unbind ^F3')
  285.         send_command('unbind ^F4')
  286.         send_command('unbind ^F5')
  287.         send_command('unbind ^F6')
  288.         -- Unload Weapon Skill Key Binds --
  289.         send_command('unbind F7')
  290.         send_command('unbind F9')  
  291.         send_command('unbind F10')     
  292.         send_command('unbind F11')     
  293.         send_command('unbind F12') 
  294.         send_command('unbind !F12')
  295.         send_command('unbind Insert')                  
  296.         send_command('unbind Delete')
  297.         send_command('unbind !Delete')
  298.         end
  299.    
  300.    
  301.    
  302.     --------------------
  303.     -- Idle/Town Sets --
  304.     --------------------
  305.     sets.Idle = {
  306.                         ammo="Homiliary",
  307.                         head="Viti. Chapeau +3",
  308.                         neck="Bathy Choker +1",
  309.                         ear1="Infused Earring",
  310.                         ear2="Genmei Earring",
  311.                         body="Jhakri Robe +2",
  312.                         hands="Merlinic Dastanas",
  313.                         ring1="Stikini Ring +1",
  314.                         ring2="Stikini Ring +1",
  315.                         back="Moonlight Cape",
  316.                         waist="Flume Belt +1",
  317.                         legs="Carmine Cuisses +1",
  318.                         feet="Merlinic Crackows"}
  319.     sets.Idle.Full = set_combine(sets.Idle,{})
  320.     sets.Idle.DT = set_combine(sets.Idle,{
  321.                         neck="Loricate Torque +1",
  322.                         ear1="Ethereal Earring",
  323.                         hands="Aya. Manopolas +2",
  324.                         ring1="Defending Ring",
  325.                         ring2="Ayanmo Ring",
  326.                         feet="Aya. Gambieras +2"})
  327.     sets.Idle.Warp = set_combine(sets.Idle,{
  328.                         ring2="Warp Ring"})
  329.    
  330.     sets.Resting = set_combine(sets.Idle,{})
  331.    
  332.     -------------
  333.     -- TP Sets --
  334.     -------------
  335.     sets.Melee = {
  336.             ammo="Ginsen",
  337.             head="Aya. Zucchetto +2",
  338.             neck="Combatant's Torque",
  339.             ear1="Suppanomimi",
  340.             ear2="Sherida Earring",
  341.             body="Ayanmo Corazza +2",
  342.             hands={ name="Taeon Gloves", augments={'Accuracy+19 Attack+19','"Triple Atk."+2','STR+4 DEX+4',}},
  343.             ring1="Petrov Ring",
  344.             ring2="Hetairoi Ring",
  345.             back=STPCape,
  346.             waist="Windbuffet Belt +1",
  347.             legs="Carmine Cuisses +1",
  348.             feet="Carmine Greaves +1"}
  349.     sets.Melee.MidACC = set_combine(sets.Melee,{})
  350.     sets.Melee.HighACC = set_combine(sets.Melee.MidACC,{})
  351.  
  352.     -----------------------
  353.     -- Damage Taken Sets --
  354.     -----------------------
  355.    
  356.     -- PDT Set --
  357.     sets.PDT = {
  358.                         ammo="Staunch Tathlum +1",
  359.                         head="Aya. Zucchetto +2",
  360.                         neck="Loricate Torque +1",
  361.                         ear1="Ethereal Earring",
  362.                         ear2="Eabani Earring",
  363.                         body="Ayanmo Corazza +2",
  364.                         hands="Aya. Manopolas +2",
  365.                         ring1="Defending Ring",
  366.                         ring2="Ayanmo Ring",
  367.                         back="Moonlight Cape",
  368.                         waist="Flume Belt +1",
  369.                         legs="Aya. Cosciales +2",
  370.                         feet="Aya. Gambieras +2"}
  371.                        
  372.     -----------------------
  373.     -- Weapon Skill Sets --
  374.     -----------------------
  375.        
  376.     -- WS Base Set --
  377.     sets.WS = {
  378.             ammo="Floestone",
  379.             head={ name="Taeon Chapeau", augments={'Accuracy+18 Attack+18','"Triple Atk."+2','DEX+9',}},
  380.             neck="Fotia Gorget",
  381.             ear1="Moonshade Earring",
  382.             ear2="Sherida Earring",
  383.             body="Ayanmo Corazza +2",
  384.             hands={ name="Taeon Gloves", augments={'Accuracy+19 Attack+19','"Triple Atk."+2','STR+4 DEX+4',}},
  385.             ring1="Shukuyu Ring",
  386.             ring2="Ifrit Ring +1",
  387.             back=STPCape,
  388.             waist="Fotia Belt",
  389.             legs={ name="Taeon Tights", augments={'Accuracy+19 Attack+19','"Triple Atk."+2','DEX+10',}},
  390.             feet={ name="Taeon Boots", augments={'Accuracy+18 Attack+18','"Triple Atk."+2','DEX+9',}}}
  391.  
  392.     -- Chant du Cygne Sets --
  393.     sets.WS["Chant du Cygne"] = {
  394.             ammo="Yetshila +1",
  395.             head={ name="Taeon Chapeau", augments={'Accuracy+18 Attack+18','"Triple Atk."+2','DEX+9',}},
  396.             neck="Fotia Gorget",
  397.             ear1="Moonshade Earring",
  398.             ear2="Sherida Earring",
  399.             body="Ayanmo Corazza +2",
  400.             hands="Aya. Manopolas +2",
  401.             ring1="Begrudging Ring",
  402.             ring2="Ilabrat Ring",
  403.             back=CritCape,
  404.             waist="Fotia Belt",
  405.             legs={ name="Taeon Tights", augments={'Accuracy+19 Attack+19','"Triple Atk."+2','DEX+10',}},
  406.             feet="Thereoid Greaves"}
  407.     sets.WS["Chant du Cygne"].MidACC = set_combine(sets.WS["Chant du Cygne"],{})
  408.     sets.WS["Chant du Cygne"].HighACC = set_combine(sets.WS["Chant du Cygne"].MidACC,{})
  409.  
  410.     -- Savage Blade Set --
  411.     sets.WS["Savage Blade"] = set_combine(sets.WS,{
  412.                         head="Viti. Chapeau +3",
  413.                         body="Jhakri Robe +2",
  414.                         ear2="Ishvara Earring",
  415.                         hands="Jhakri Cuffs +2",
  416.                         ring2="Rufescent Ring",
  417.                         back=WSDCape,
  418.                         waist="Prosilio Belt +1",
  419.                         legs="Jhakri Slops +2",
  420.                         feet="Jhakri Pigaches +2"})
  421.     sets.WS["Savage Blade"].MidACC = set_combine(sets.WS["Savage Blade"],{})
  422.     sets.WS["Savage Blade"].HighACC = set_combine(sets.WS["Savage Blade"].MidACC,{})
  423.    
  424.     -- Requiescat Sets --
  425.     sets.WS.Requiescat = set_combine(sets.WS,{
  426.                         ammo="Regal Gem",
  427.                         head="Jhakri Coronal +2",
  428.                         ear2="Regal Earring",
  429.                         body="Jhakri Robe +2",
  430.                         hands="Jhakri Cuffs +2",
  431.                         ring1="Rufescent Ring",
  432.                         ring2="Levia. Ring",
  433.                         legs="Jhakri Slops +2",
  434.                         feet="Jhakri Pigaches +2"})
  435.     sets.WS.Requiescat.MidACC = set_combine(sets.WS.Requiescat,{})
  436.     sets.WS.Requiescat.HighACC = set_combine(sets.WS.Requiescat.MidACC,{})
  437.  
  438.     -- Knights of Round Set --
  439.     sets.WS["Knights of Round"] = set_combine(sets.WS["Savage Blade"],{})
  440.     sets.WS["Knights of Round"].MidACC = set_combine(sets.WS["Savage Blade"].MidACC,{})
  441.     sets.WS["Knights of Round"].HighACC = set_combine(sets.WS["Savage Blade"].HighACC,{})
  442.    
  443.     -- Death Blossom Set --
  444.     sets.WS["Death Blossom"] = set_combine(sets.WS["Savage Blade"],{})
  445.     sets.WS["Death Blossom"].MidACC = set_combine(sets.WS["Savage Blade"].MidACC,{})
  446.     sets.WS["Death Blossom"].HighACC = set_combine(sets.WS["Savage Blade"].HighACC,{})
  447.    
  448.         -- Sanguine Blade Set --
  449.     sets.WS["Sanguine Blade"] = {
  450.                         ammo="Pemphredo Tathlum",
  451.                         head="Jhakri Coronal +2",
  452.                         neck="Sanctity Necklace",
  453.                         ear1="Friomisi Earring",
  454.                         ear2="Regal Earring",
  455.                         body="Amalric Doublet +1",
  456.                         hands="Jhakri Cuffs +2",
  457.                         ring1="Shiva Ring +1",
  458.                         ring2="Shiva Ring +1",
  459.                         back=WSDCape,
  460.                         waist="Eschan Stone",
  461.                         legs="Jhakri Slops +2",
  462.                         feet="Amalric nails +1"}
  463.     sets.WS["Sanguine Blade"].MidACC = set_combine(sets.WS["Savage Blade"],{})
  464.     sets.WS["Sanguine Blade"].HighACC = set_combine(sets.WS["Savage Blade"].MidACC,{})
  465.     -- Exenterator Sets --
  466.     sets.WS.Exenterator = {}
  467.     sets.WS.Exenterator.MidACC = set_combine(sets.WS.Exenterator,{})
  468.     sets.WS.Exenterator.HighACC = set_combine(sets.WS.Exenterator.MidACC,{})
  469.  
  470.     -- Evisceration Sets --
  471.     sets.WS.Evisceration = set_combine(sets.WS["Chant du Cygne"],{})
  472.     sets.WS.Evisceration.MidACC = set_combine(sets.WS["Chant du Cygne"].MidACC,{})
  473.     sets.WS.Evisceration.HighACC = set_combine(sets.WS["Chant du Cygne"].HighACC,{})
  474.  
  475.     ----------------------
  476.     -- Job Ability Sets --
  477.     ----------------------
  478.    
  479.     sets.JA = {}
  480.     sets.JA.Chainspell = {body="Viti. Tabard +3"}
  481.     sets.JA.Saboteur = {hands="Leth. Gantherots +1"}
  482.    
  483.     --------------------
  484.     -- Pre-Cast Sets --
  485.     --------------------
  486.    
  487.     -- Fastcast Set --
  488.     sets.Precast = {
  489.                         ammo="Impatiens",
  490.                         head="Atro. Chapeau +1",
  491.                         neck="Orunmila's Torque",
  492.                         ear1="Loquac. Earring",
  493.                         ear2="Etiolation Earring",
  494.                         body="Viti. Tabard +3",
  495.                         hands="Leyline Gloves",
  496.                         ring1="Lebeche Ring",
  497.                         ring2="Kishar Ring",
  498.                         back="Perimede Cape",
  499.                         waist="Witful Belt",
  500.                         legs="Aya. Cosciales +2",
  501.                         feet="Carmine Greaves +1"}
  502.  
  503.     sets.Precast.FastCast = set_combine(sets.Precast,{})
  504.  
  505.     -- Elemental Staves --
  506.     sets.Precast.Lightning = {}
  507.     sets.Precast.Water = {}
  508.     sets.Precast.Fire = {}
  509.     sets.Precast.Ice = {}
  510.     sets.Precast.Wind = {}
  511.     sets.Precast.Earth = {}
  512.     sets.Precast.Light = {}
  513.     sets.Precast.Dark = {}
  514.  
  515.     -- Precast Enhancing Magic --
  516.     sets.Precast['Enhancing Magic'] = set_combine(sets.Precast.FastCast,{waist="Siegel Sash"})
  517.  
  518.     -- Precast Enfeebling Magic --
  519.     sets.Precast['Enfeebling Magic'] = set_combine(sets.Precast.FastCast,{})
  520.  
  521.     -- Precast Cure Set --
  522.     sets.Precast.Cure = {}
  523.    
  524.     -------------------
  525.     -- Mid-Cast Sets --
  526.     -------------------
  527.  
  528.     -- Midcast Base Set --
  529.     sets.Midcast = {
  530.                         ammo="Staunch Tathlum +1",
  531.                         head="Atro. Chapeau +1",
  532.                         neck="Loricate Torque +1",
  533.                         ear1="Loquac. Earring",
  534.                         ear2="Etiolation Earring",
  535.                         body="Viti. Tabard +3",
  536.                         hands="Leyline Gloves",
  537.                         ring1="Defending Ring",
  538.                         ring2="Kishar Ring",
  539.                         back="Moonlight Cape",
  540.                         waist="Flume Belt +1",
  541.                         legs="Carmine Cuisses +1",
  542.                         feet="Amalric nails +1"}
  543.  
  544.     -- Haste Set -
  545.     sets.Midcast.Haste = set_combine(sets.Midcast,{})
  546.  
  547.     -- Cure Set --
  548.     sets.Midcast.Cure = {
  549.                         ammo="Regal Gem",
  550.                         head="Vanya Hood",
  551.                         neck="Phalaina Locket",
  552.                         ear1="Lifestorm Earring",
  553.                         ear2="Mendi. Earring",
  554.                         body="Kaykaus Bliaut",
  555.                         hands="Kaykaus Cuffs",
  556.                         ring1="Stikini Ring +1",
  557.                         ring2="Stikini Ring +1",
  558.                         back="Solemnity Cape",
  559.                         waist="Bishop's Sash",
  560.                         legs="Atrophy Tights +1",
  561.                         feet="Vanya Clogs"}
  562.  
  563.     -- Curaga Set --
  564.     sets.Midcast.Curaga = set_combine(sets.Midcast.Cure,{})
  565.  
  566.     -- Enhancing Magic --
  567.     sets.Midcast['Enhancing Magic'] = {
  568.                         ammo="Staunch Tathlum +1",
  569.                         head="Telchine Cap",
  570.                         neck="Incanter's Torque",
  571.                         ear1="Andoaa Earring",
  572.                         ear2="Augment. Earring",
  573.                         body="Viti. Tabard +3",
  574.                         hands="Atrophy Gloves +3",
  575.                         ring1="Stikini Ring +1",
  576.                         ring2="Stikini Ring +1",
  577.                         back="Sucellos's Cape",
  578.                         waist="Olympus Sash",
  579.                         legs="Telchine Braconi",
  580.                         feet="Leth. Houseaux +1"}
  581.        
  582.  
  583.     -- Refresh --
  584.     sets.Midcast.Refresh = set_combine(sets.Midcast,{
  585.                         head="Amalric Coif +1",
  586.                         body="Atrophy Tabard +3",
  587.                         hands="Atrophy Gloves +3",
  588.                         waist="Gishdubar Sash",
  589.                         legs="Leth. Fuseau +1",
  590.                         feet="Leth. Houseaux +1"})
  591.  
  592.     -- Stoneskin --
  593.     sets.Midcast.Stoneskin = set_combine(sets.Midcast['Enhancing Magic'],{waist="Siegel Sash"})
  594.  
  595.     -- Phalanx --
  596.     sets.Midcast.Phalanx = set_combine(sets.Midcast['Enhancing Magic'],{
  597.                         head={ name="Taeon Chapeau", augments={'Phalanx +2',}},
  598.                         body={ name="Taeon Tabard", augments={'Accuracy+18 Attack+18','"Fast Cast"+5','Phalanx +3',}},
  599.                         hands={ name="Taeon Gloves", augments={'Phalanx +3',}},
  600.                         legs={ name="Taeon Tights", augments={'Phalanx +3',}},
  601.                         feet={ name="Taeon Boots", augments={'Phalanx +2',}}})
  602.    
  603.     -- Temper --
  604.     sets.Midcast.Temper = set_combine(sets.Midcast['Enhancing Magic'],{
  605.             head="Carmine Mask +1",
  606.             body="Viti. Tabard +3",
  607.             hands="Viti. Gloves +2",
  608.             back="Perimede Cape",
  609.             legs="Carmine Cuisses +1"})
  610.     sets.Midcast['Temper II'] = set_combine(sets.Midcast.Temper,{})
  611.    
  612.     -- Gain Spells --
  613.     sets.Midcast.GainSpell = set_combine(sets.Midcast['Enhancing Magic'],{hands="Viti. Gloves +2"})
  614.  
  615.     -- Cursna --
  616.     sets.Midcast.Cursna = set_combine(sets.Midcast.Haste,{})
  617.  
  618.     -- Stun Sets --
  619.     sets.Midcast.Stun = {
  620.             ammo="Regal Gem",
  621.             head="Carmine Mask +1",
  622.             neck="Erra Pendant",
  623.             ear1="Digni. Earring",
  624.             ear2="Gwati Earring",
  625.             body="Amalric Doublet +1",
  626.             hands="Jhakri Cuffs +2",
  627.             ring1="Stikini Ring +1",
  628.             ring2="Stikini Ring +1",
  629.             back=INTCape,
  630.             waist="Eschan Stone",
  631.             legs="Chironic Hose",
  632.             feet="Jhakri Pigaches +2"}
  633.     sets.Midcast.Stun.MidACC = set_combine(sets.Midcast.Stun,{})
  634.     sets.Midcast.Stun.HighACC = set_combine(sets.Midcast.Stun.MidACC,{})
  635.  
  636.     -- Dark Magic Sets --
  637.     sets.Midcast['Dark Magic'] = {
  638.             ammo="Regal Gem",
  639.             head="Carmine Mask +1",
  640.             neck="Erra Pendant",
  641.             ear1="Digni. Earring",
  642.             ear2="Gwati Earring",
  643.             body="Amalric Doublet +1",
  644.             hands="Jhakri Cuffs +2",
  645.             ring1="Stikini Ring +1",
  646.             ring2="Stikini Ring +1",
  647.             back=INTCape,
  648.             waist="Eschan Stone",
  649.             legs="Chironic Hose",
  650.             feet="Jhakri Pigaches +2"}
  651.     sets.Midcast['Dark Magic'].MidACC = set_combine(sets.Midcast['Dark Magic'],{})
  652.     sets.Midcast['Dark Magic'].HighACC = set_combine(sets.Midcast['Dark Magic'].MidACC,{})
  653.  
  654.     -- Low Tier Set --
  655.     sets.LowNuke = {
  656.                         ammo="Pemphredo Tathlum",
  657.                         head="Jhakri Coronal +2",
  658.                         neck="Sanctity Necklace",
  659.                         ear1="Friomisi Earring",
  660.                         ear2="Regal Earring",
  661.                         body="Amalric Doublet +1",
  662.                         hands="Amalric Gages +1",
  663.                         ring1="Shiva Ring +1",
  664.                         ring2="Shiva Ring +1",
  665.                         back=INTCape,
  666.                         waist="Eschan Stone",
  667.                         legs="Amalric Slops +1",
  668.                         feet="Amalric Nails +1"}
  669.  
  670.     -- MB Set --
  671.     sets.MB = {
  672.                         head="Ea Hat",
  673.                         neck="Mizu. Kubikazari",
  674.                         hands="Ea Cuffs",
  675.                         ring1="Mujin Band",
  676.                         legs="Ea Slops",
  677.                         feet="Ea Pigaches"}
  678.  
  679.     -- Elemental Sets --
  680.     sets.Midcast['Elemental Magic'] = {
  681.                         ammo="Pemphredo Tathlum",
  682.                         head="Jhakri Coronal +2",
  683.                         neck="Sanctity Necklace",
  684.                         ear1="Friomisi Earring",
  685.                         ear2="Regal Earring",
  686.                         body="Amalric Doublet +1",
  687.                         hands="Amalric Gages +1",
  688.                         ring1="Shiva Ring +1",
  689.                         ring2="Shiva Ring +1",
  690.                         back=INTCape,
  691.                         waist="Eschan Stone",
  692.                         legs="Amalric Slops +1",
  693.                         feet="Amalric Nails +1"}
  694.     sets.Midcast['Elemental Magic'].MidACC = set_combine(sets.Midcast['Elemental Magic'],{})
  695.     sets.Midcast['Elemental Magic'].HighACC = set_combine(sets.Midcast['Elemental Magic'].MidACC,{})
  696.  
  697.     -- Enfeebling Sets --
  698.     sets.Midcast['Enfeebling Magic'] = {
  699.             ammo="Regal Gem",
  700.             head="Carmine Mask +1",
  701.             neck="Duelist's Torque",
  702.             ear1="Digni. Earring",
  703.             ear2="Gwati Earring",
  704.             body="Lethargy Sayon +1",
  705.             hands="Kaykaus Cuffs",
  706.             ring1="Stikini Ring +1",
  707.             ring2="Kishar Ring",
  708.             back=INTCape,
  709.             waist="Eschan Stone",
  710.             legs="Chironic Hose",
  711.             feet="Vitiation Boots +2"}
  712.     sets.Midcast['Enfeebling Magic'].MidACC =  set_combine(sets.Midcast['Enfeebling Magic'],{})
  713.     sets.Midcast['Enfeebling Magic'].HighACC = set_combine(sets.Midcast['Enfeebling Magic'].MidACC,{})
  714.  
  715.     -- Impact --
  716.     sets.Midcast.Impact = {
  717.             body="Twilight Cloak"}
  718.  
  719.     -- Elemental Obi/Twilight Cape --
  720.     sets.Obi = {}
  721.     sets.Obi.Lightning = {waist='Hachirin-no-Obi'}
  722.     sets.Obi.Water = {waist='Hachirin-no-Obi'}
  723.     sets.Obi.Fire = {waist='Hachirin-no-Obi'}
  724.     sets.Obi.Ice = {waist='Hachirin-no-Obi'}
  725.     sets.Obi.Wind = {waist='Hachirin-no-Obi'}
  726.     sets.Obi.Earth = {waist='Hachirin-no-Obi'}
  727.     sets.Obi.Light = {waist='Hachirin-no-Obi'}
  728.     sets.Obi.Dark = {waist='Hachirin-no-Obi'}
  729.  
  730.     -- Reive Set --
  731.     sets.Reive = {neck="Ygnas's Resolve +1"}
  732. end
  733.  
  734.     ----------------
  735.     -- Pre-Target --
  736.     ----------------
  737.  
  738. function pretarget(spell,action)
  739.     if spell.action_type == 'Magic' and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
  740.         cancel_spell()
  741.         send_command('input /item "Echo Drops" <me>')
  742.     elseif spell.type == "WeaponSkill" and spell.target.distance > target_distance and player.status == 'Engaged' then -- Cancel WS If You Are Out Of Range --
  743.         cancel_spell()
  744.         add_to_chat(123, spell.name..' Canceled: [Out of Range]')
  745.         return
  746.     elseif spell.english:startswith("Cure") and player.mp<actualCost(spell.mp_cost) then
  747.         degrade_spell(spell,Cure_Spells)
  748.     elseif spell.english:startswith("Curaga") and player.mp<actualCost(spell.mp_cost) then
  749.         degrade_spell(spell,Curaga_Spells)
  750.     elseif buffactive['Light Arts'] or buffactive['Addendum: White'] then
  751.         if spell.english == "Light Arts" and not buffactive['Addendum: White'] then
  752.             cancel_spell()
  753.             send_command('input /ja Addendum: White <me>')
  754.         elseif spell.english == "Manifestation" then
  755.             cancel_spell()
  756.             send_command('input /ja Accession <me>')
  757.         elseif spell.english == "Alacrity" then
  758.             cancel_spell()
  759.             send_command('input /ja Celerity <me>')
  760.         elseif spell.english == "Parsimony" then
  761.             cancel_spell()
  762.             send_command('input /ja Penury <me>')
  763.         end
  764.     elseif buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
  765.         if spell.english == "Dark Arts" and not buffactive['Addendum: Black'] then
  766.             cancel_spell()
  767.             send_command('input /ja Addendum: Black <me>')
  768.         elseif spell.english == "Accession" then
  769.             cancel_spell()
  770.             send_command('input /ja Manifestation <me>')
  771.         elseif spell.english == "Celerity" then
  772.             cancel_spell()
  773.             send_command('input /ja Alacrity <me>')
  774.         elseif spell.english == "Penury" then
  775.             cancel_spell()
  776.             send_command('input /ja Parsimony <me>')
  777.         end
  778.     end
  779. end
  780.  
  781.     --------------
  782.     -- Pre-Cast --
  783.     --------------
  784.  
  785. function precast(spell,action)
  786.     if spell.action_type == 'Magic' then
  787.         if buffactive.silence or spell.target.distance > 16+target_distance then -- Cancel Magic or Ninjutsu If You Are Silenced or Out of Range --
  788.             cancel_spell()
  789.             add_to_chat(123, spell.name..' Canceled: [Silenced or Out of Casting Range]')
  790.             return
  791.         else
  792.             if spell.english:startswith('Cur') and spell.english ~= "Cursna" then
  793.                 equip(sets.Precast.Cure)
  794.             elseif spell.english == "Stun" then
  795.                 if buffactive.Composure then -- Cancel Composure When You Cast Stun --
  796.                     cast_delay(0.2)
  797.                     send_command('cancel Composure')
  798.                 end
  799.                 equip(sets.Precast.FastCast)
  800.             elseif spell.english == "Impact" then
  801.                 equip(set_combine(sets.Precast.FastCast,{body="Twilight Cloak"}))
  802.             elseif spell.english:startswith("En") and Enspells == 'ON' then
  803.                 local list={Dark="blizzard",Water="water",Earth="stone",Ice="blizzard",Fire="fire",Wind="aero",Lightning="thunder",Light="fire"}
  804.                 if spell.english ~= 'En'..list[world.day_element]..''..(spell.english:endswith(' II') and ' II' or '') then
  805.                     cancel_spell()
  806.                     send_command('@input /ma "En'..list[world.day_element]..''..(spell.english:endswith(' II') and ' II' or '')..'" <me>')
  807.                     return
  808.                 end
  809.             elseif spell.english == 'Utsusemi: Ni' then
  810.                 if buffactive['Copy Image (3)'] then
  811.                     cancel_spell()
  812.                     add_to_chat(123, spell.name .. ' Canceled: [3 Images]')
  813.                     return
  814.                 else
  815.                     equip(sets.Precast.FastCast)
  816.                 end
  817.             elseif sets.Precast[spell.skill] then
  818.                 equip(sets.Precast[spell.skill])
  819.             else
  820.                 equip(sets.Precast.FastCast)
  821.             end
  822.         end
  823.         elseif spell.type == "WeaponSkill" then
  824.         if player.status ~= 'Engaged' then
  825.         return
  826.         else
  827.                 equipSet = sets.WS
  828.             if equipSet[spell.english] then
  829.                 equipSet = equipSet[spell.english]
  830.             end
  831.             if equipSet[AccArray[AccIndex]] then
  832.                 equipSet = equipSet[AccArray[AccIndex]]
  833.             end
  834.             if player.tp > 2750 or (player.equipment.main == 'Sequence' and player.tp > 2250) then
  835.                     equipSet = set_combine(equipSet,{ear1="Cessance Earring"}) -- 3000 TP: Equip Zwazo Earring --
  836.             end
  837.             equip(equipSet)
  838.         end
  839.     elseif spell.type == "JobAbility" then
  840.         if sets.JA[spell.english] then
  841.             equip(sets.JA[spell.english])
  842.         end
  843.     elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
  844.         cast_delay(0.2)
  845.         send_command('cancel Sneak')
  846.     end
  847.     if sets.Precast[spell.element] and Elemental_Staff == 'ON' then
  848.         equip(sets.Precast[spell.element])
  849.     end
  850.     if StunIndex == 1 then
  851.         equip(sets.Midcast.Stun)
  852.     end
  853. end
  854.  
  855.     --------------
  856.     -- Mid-Cast --
  857.     --------------
  858.  
  859. function midcast(spell,action)
  860.                 equipSet = {}
  861.         if spell.type:endswith('Magic') or spell.type == 'Ninjutsu' or spell.type == 'Trust' then
  862.                 equipSet = sets.Midcast
  863.         if spell.english:startswith('Cur') and spell.english ~= "Cursna" then
  864.             if spell.english:startswith('Cure') then
  865.                 equipSet = equipSet.Cure
  866.             elseif spell.english:startswith('Cura') then
  867.                 equipSet = equipSet.Curaga
  868.             end
  869.             if world.day_element == spell.element or world.weather_element == spell.element then
  870.                 equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
  871.             end
  872.         elseif spell.english:startswith('Refresh') then
  873.             equipSet = equipSet.Refresh
  874.         elseif spell.english == "Stoneskin" then
  875.             if buffactive.Stoneskin then
  876.                 send_command('@wait 2.8;cancel stoneskin')
  877.             end
  878.             equipSet = equipSet.Stoneskin
  879.         elseif spell.english == "Phalanx II" then -- Equip Aug'd Viti. Gloves +2 When You Cast Phalanx II --
  880.             equipSet = set_combine(equipSet,{hands="Viti. Gloves +2"})
  881.         elseif spell.english == "Dia III" or spell.english == "Slow II" then -- Equip Aug'd Viti. Chapeau +3 When You Cast Dia III or Slow II --
  882.             equipSet = set_combine(equipSet,{head="Viti. Chapeau +3"})
  883.         elseif spell.english == "Paralyze II" then -- Equip Aug'd Vitiation Boots +2 When You Cast Paralyze II --
  884.             equipSet = set_combine(equipSet,{feet="Vitiation Boots +2"})
  885.         elseif spell.english == "Blind II" or spell.english == "Bio III" then -- Equip Aug'd Viti. Tights +1 When You Cast Blind II or Bio III --
  886.             equipSet = set_combine(equipSet,{legs="Viti. Tights +1"})
  887.         elseif spell.english == "Sneak" then
  888.             if spell.target.name == player.name and buffactive['Sneak'] then
  889.                 send_command('cancel sneak')
  890.             end
  891.             equipSet = equipSet.Haste
  892.         elseif spell.english:startswith('Gain') then
  893.             equipSet = set_combine(equipSet.GainSpell,{})      
  894.         elseif spell.english:startswith('Banish') then
  895.             equipSet = set_combine(equipSet.Haste,{})
  896.         elseif Low_Tier_Spells:contains(spell.english) and LowNuke == 'ON' then
  897.             equipSet = set_combine(equipSet,sets.LowNuke)
  898.                 if world.day_element == spell.element or world.weather_element == spell.element then
  899.                 equipSet = set_combine(equipSet,{waist='Hachirin-no-Obi'})
  900.                 end
  901.         elseif spell.skill == 'Elemental Magic' and MB == 'ON' then
  902.             equipSet = set_combine(equipSet,sets.MB)
  903.                 if world.day_element == spell.element or world.weather_element == spell.element then
  904.                 equipSet = set_combine(equipSet,{waist='Hachirin-no-Obi'})
  905.                 end
  906.         elseif spell.english:startswith('Utsusemi') then
  907.             if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)'] or buffactive['Copy Image (3)']) then
  908.                 send_command('@wait 1.7; cancel Copy Image*')
  909.             end
  910.             equipSet = equipSet.Haste
  911.         elseif spell.english == 'Monomi: Ichi' then
  912.             if buffactive['Sneak'] then
  913.                 send_command('@wait 1.7;cancel sneak')
  914.             end
  915.             equipSet = equipSet.Haste
  916.         else
  917.             if equipSet[spell.english] then
  918.                 equipSet = equipSet[spell.english]
  919.             end
  920.             if equipSet[spell.skill] then
  921.                 equipSet = equipSet[spell.skill]
  922.             end
  923.             if equipSet[AccArray[AccIndex]] then
  924.                 equipSet = equipSet[AccArray[AccIndex]]
  925.             end
  926.             if equipSet[spell.type] then
  927.                 equipSet = equipSet[spell.type]
  928.             end
  929.             if (spell.skill == 'Elemental Magic' or spell.english:startswith('Cur') or spell.english:startswith('Bio') or spell.english:startswith('Dia') or spell.english == 'Aspir' or spell.english == 'Drain') and not Non_Obi_Spells:contains(spell.english) and (world.day_element == spell.element or world.weather_element == spell.element) and sets.Obi[spell.element] and Obi == 'ON' and spell.english ~= "Cursna" then -- Use Obi Toggle To Equip Normal Waist Gear --
  930.                 equipSet = set_combine(equipSet,sets.Obi[spell.element])
  931.             end
  932.         end
  933.     end
  934.     if equipSet[spell.english] then
  935.         equipSet = equipSet[spell.english]
  936.     end
  937.     equip(equipSet)
  938.     if StunIndex == 1 then
  939.         equip(sets.Midcast.Stun)
  940.     end
  941. end
  942.  
  943.     ----------------
  944.     -- After-Cast --
  945.     ----------------
  946.  
  947. function aftercast(spell,action)
  948.     if not spell.interrupted then
  949.         if spell.english == "Sleep II" then -- Sleep II Countdown --
  950.             send_command('wait 60;input /echo Sleep Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep Effect: [WEARING OFF IN 5 SEC.]')
  951.         elseif spell.english == "Sleep" or spell.english == "Sleepga" then -- Sleep & Sleepga Countdown --
  952.             send_command('wait 30;input /echo Sleep Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep Effect: [WEARING OFF IN 5 SEC.]')
  953.         elseif spell.english == "Banish II" then -- Banish II Countdown --
  954.             send_command('wait 20;input /echo Banish Effect: [WEARING OFF IN 10 SEC.]')
  955.         end
  956.     end
  957.     status_change(player.status)
  958. end
  959.  
  960.     -------------------
  961.     -- Status Change --
  962.     -------------------
  963.  
  964. function status_change(new,old)
  965.     if Armor == 'PDT' or buffactive.Terror or buffactive.Stun or buffactive.Petrification or buffactive.Sleep then
  966.         equip(sets.PDT)
  967.     elseif new == 'Engaged' then
  968.         equipSet = sets.Melee
  969.         if equipSet[AccArray[AccIndex]] then
  970.             equipSet = equipSet[AccArray[AccIndex]]
  971.         end
  972.         equip(equipSet)
  973.     elseif new == 'Idle' then
  974.         equipSet = sets.Idle
  975.         if equipSet[IdleArray[IdleIndex]] then
  976.             equipSet = equipSet[IdleArray[IdleIndex]]
  977.         end
  978.         if buffactive['Reive Mark'] then -- Equip Arciela's Grace +1 During Reive --
  979.             equipSet = set_combine(equipSet,sets.Reive)
  980.         end
  981.         equip(equipSet)
  982.     elseif new == 'Resting' then
  983.         equip(sets.Resting)
  984.     end
  985.     if StunIndex == 1 then
  986.         equip(sets.Midcast.Stun)
  987.     end
  988. end
  989.  
  990.     -----------------
  991.     -- Buff Change --
  992.     -----------------
  993.  
  994.  function buff_change(buff,gain,loss)
  995.     buff = string.lower(buff)
  996.     if gain then  
  997.         add_to_chat(158,'--- Gained: ['..buff..']')
  998.     elseif loss then
  999.         add_to_chat(123,'--- Lost: ['..buff..']')
  1000.     end
  1001.     if not midaction() then
  1002.         status_change(player.status)
  1003.     end
  1004.  end
  1005.  
  1006.     -------------------------------------------------------------------------------------
  1007.     -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
  1008.     -------------------------------------------------------------------------------------
  1009.  
  1010. function self_command(command)
  1011.     if command == 'acc' then -- Accuracy Toggle --
  1012.         AccIndex = (AccIndex % #AccArray) + 1
  1013.         add_to_chat(155,'Accuracy Level: ' .. AccArray[AccIndex])
  1014.         status_change(player.status)
  1015.     elseif command == 'update' then -- Auto Update Gear Toggle --
  1016.         status_change(player.status)
  1017.         add_to_chat(155,'Auto Update Gear')
  1018.     elseif command == 'stun' then -- Stun Toggle --
  1019.         if StunIndex == 1 then
  1020.             StunIndex = 0
  1021.             add_to_chat(123,'Stun Set: [Unlocked]')
  1022.         else
  1023.             StunIndex = 1
  1024.             add_to_chat(158,'Stun Set: [Locked]')
  1025.         end
  1026.         status_change(player.status)
  1027.     elseif command == 'obi' then -- Obi Toggle --
  1028.         if Obi == 'ON' then
  1029.             Obi = 'OFF'
  1030.             add_to_chat(123,'Obi: [OFF]')
  1031.         else
  1032.             Obi = 'ON'
  1033.             add_to_chat(158,'Obi: [ON]')
  1034.         end
  1035.         status_change(player.status)
  1036.     elseif command == 'pdt' then -- PDT Toggle --
  1037.         if Armor == 'PDT' then
  1038.             Armor = 'None'
  1039.             add_to_chat(123,'PDT Set: [Unlocked]')
  1040.         else
  1041.             Armor = 'PDT'
  1042.             add_to_chat(158,'PDT Set: [Locked]')
  1043.         end
  1044.         status_change(player.status)
  1045.     elseif command == 'lownuke' then -- LowNuke Toggle --
  1046.         if LowNuke == 'ON' then
  1047.             LowNuke = 'OFF'
  1048.             add_to_chat(123,'Low Nuke: [OFF]')
  1049.         else
  1050.             LowNuke = 'ON'
  1051.             add_to_chat(158,'Low Nuke: [ON]')
  1052.         end
  1053.         status_change(player.status)
  1054.     elseif command == 'mb' then -- MB Toggle --
  1055.         if MB == 'ON' then
  1056.             MB = 'OFF'
  1057.             add_to_chat(123,'MB: [OFF]')
  1058.         else
  1059.             MB = 'ON'
  1060.             add_to_chat(158,'MB: [ON]')
  1061.         end
  1062.         status_change(player.status)
  1063.     elseif command == 'mainlock' then -- Lock Main Weapon Toggle --
  1064.         if Lock_Main == 'ON' then
  1065.             Lock_Main = 'OFF'
  1066.             add_to_chat(123,'Main Weapon: [Unlocked]')
  1067.         else
  1068.             Lock_Main = 'ON'
  1069.             add_to_chat(158,'Main Weapon: [Locked]')
  1070.         end
  1071.         status_change(player.status)
  1072.     elseif command == 'enspell' then -- Enspells Toggle --
  1073.         if Enspells == 'ON' then
  1074.             Enspells = 'OFF'
  1075.             add_to_chat(123,'Enspells: [OFF]')
  1076.         else
  1077.             Enspells = 'ON'
  1078.             add_to_chat(158,'Enspells: [ON]')
  1079.         end
  1080.         status_change(player.status)
  1081.     elseif command == 'distance' then -- Distance Toggle --
  1082.         if player.target.distance then
  1083.             target_distance = math.floor(player.target.distance*10)/10
  1084.             add_to_chat(155,'Distance: '..target_distance)
  1085.         else
  1086.             add_to_chat(123,'No Target Selected')
  1087.         end
  1088.     elseif command == 'idle' then -- Idle Toggle --
  1089.         IdleIndex = (IdleIndex % #IdleArray) + 1
  1090.         add_to_chat(155,'Idle Set: '..IdleArray[IdleIndex])
  1091.         status_change(player.status)
  1092.     elseif command == 'TP' then
  1093.         add_to_chat(155,'TP Return: ['..tostring(player.tp)..']')
  1094.     elseif command:match('^SC%d$') then
  1095.         send_command('//' .. sc_map[command])
  1096.     end
  1097. end
  1098.  
  1099.     -----------
  1100.     -- Misc. --
  1101.     -----------
  1102.  
  1103. function actualCost(originalCost)
  1104.     if buffactive["Penury"] then
  1105.         return originalCost*.5
  1106.     elseif buffactive["Light Arts"] then
  1107.         return originalCost*.9
  1108.     else
  1109.         return originalCost
  1110.     end
  1111. end
  1112.  
  1113. function degrade_spell(spell,degrade_array)
  1114.     spell_index = table.find(degrade_array,spell.name)
  1115.     if spell_index > 1 then
  1116.         new_spell = degrade_array[spell_index - 1]
  1117.         change_spell(new_spell,spell.target.raw)
  1118.         add_to_chat(8,spell.name..' Canceled: [Current MP = ' .. player.mp .. ' | ' .. player.mpp .. '%] Using '..new_spell..' instead.')
  1119.     end
  1120. end
  1121.  
  1122. function change_spell(spell_name,target)
  1123.     cancel_spell()
  1124.     send_command('//'..spell_name..' '..target)
  1125. end
Add Comment
Please, Sign In to add comment