Advertisement
Arnan

RDM Lua January 2018

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