Advertisement
Arnan

PLD Lua January 2018

Jan 3rd, 2018
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 55.33 KB | None | 0 0
  1.  
  2.         ----------------------------------------------
  3.         -- *** Arnan Paladin Gearswap Lua File *** --
  4.         ----------------------------------------------
  5.  
  6.             -- Commands --
  7.                
  8.                 -- In Game: //gs c, Macro: /console gs c, Bind: gs c --
  9.            
  10.                 -- gs c shield      Toggle Shield
  11.                 -- gs c acc         Toggle accuracy tier for TP/WS
  12.                 -- gs c idle        Toggle idle sets
  13.                
  14.                 -- gs c pdt         PDT on/off
  15.                 -- gs c mdt         MDT on/off
  16.                 -- gs c dt          Full DT/BDT on/off
  17.                 -- gs c kiting      Kiting on/off
  18.                 -- gs c hybrid      Hybrid on/off
  19.                 -- gs c twilight    Twilight on/off
  20.  
  21.         ----------
  22.         -- Sets --
  23.         ----------
  24.  
  25. function get_sets()
  26.     AccIndex = 1
  27.     AccArray = {"LowACC","MidACC","HighACC"} -- 3 Levels Of Accuracy Sets For TP/WS/Hybrid. First Set Is LowACC. Add More ACC Sets If Needed Then Create Your New ACC Below --
  28.     ShieldIndex = 1
  29.     ShieldArray = {"Aegis","Ochain"} -- Default Shield Type Is Aegis. Set Default Shield Type Here. --
  30.     IdleIndex = 1
  31.     IdleArray = {"Full","DT","Warp"} -- Default Idle Set Is Movement --
  32.     TypeIndex = 1
  33.     Armor = 'None'
  34.     canceled = false
  35.     Twilight = 'None'
  36.     Cover = 'ON' -- Set Default Cover ON or OFF Here --
  37.     target_distance = 6 -- Set Default Distance Here --
  38.     send_command('input /macro book 2;wait .1;input /macro set 1') -- Change Default Macro Book Here --
  39.     add_to_chat(158,'-[Paladin Lua Loaded]-')
  40.     add_to_chat(155,'Shield Type: '..ShieldArray[ShieldIndex])
  41.     add_to_chat(155,'Accuracy Level: '..AccArray[AccIndex])
  42.     add_to_chat(158,'-----[Weapon Skill Keybinds]-----')
  43.     add_to_chat(155,'F7 - Sanguine Blade, F9 - Atonement, F10 - Requiescat, F11 - Savage Blade, Delete - Chant du Cygne')
  44.     add_to_chat(155,'F12 - Last Stand (mule), Alt+F12 - Leaden Salute (mule) Alt+Delete - Savage Blade (mule)')
  45.    
  46.         --------------------
  47.         -- Key Binds Load --
  48.         --------------------
  49.        
  50.         -- Key Bind Toggles (The Same for all my job files) (Ctrl Key) --
  51.         send_command('bind ^A input //gs c acc')
  52.         send_command('bind ^D input //gs c pdt')
  53.         send_command('bind ^H input //gs c hybrid')
  54.         send_command('bind ^I input //gs c idle')
  55.         send_command('bind ^K input //gs c kiting')
  56.  
  57.         -- Stuff to control both Mules (Ctrl Key) --
  58.         send_command('bind ^X input /pcmd add ojomo;pause 5;input /pcmd add oeogo')
  59.         send_command('bind ^7 input //send oeogo //ma haste ojomo')
  60.         send_command('bind ^8 input //send oeogo //ma Dia 2 <t>;pause 2;input //send ojomo //ja Light Shot <t>')
  61.         send_command('bind ^9 input //send ojomo //follow arnan;pause 0.1;input //send oeogo //follow arnan')
  62.         send_command('bind ^0 input //send ojomo //assist arnan;pause 0.1;input //send oeogo //assist arnan')
  63.         send_command('bind ^- input //send ojomo /attack <t>;pause 0.1;input //send oeogo /attack <t>')
  64.  
  65.         -- COR (Mule) Job Ability Key Binds (Alt Key) --
  66.         send_command('bind !7 input //send ojomo //ja Crooked Cards <me>')
  67.         send_command('bind !8 input //send ojomo //ja Snake Eye <me>')
  68.         send_command('bind !9 input //send ojomo //ja Fold <me>')
  69.         send_command('bind !0 input //send ojomo //ja Random Deal <me>')
  70.  
  71.         -- COR (mule) Phantom Roll Key Binds (Alt Key) --
  72.         send_command('bind !A input //send ojomo //ja Allies\' Roll <me>')
  73.         send_command('bind !C input //send ojomo //ja Chaos Roll <me>')
  74.         send_command('bind !D input //send ojomo //ja Dancer\'s Roll <me>')
  75.         send_command('bind !E input //send ojomo //ja Evoker\s Roll <me>')
  76.         send_command('bind !F input //send ojomo //ja Fighter\'s Roll <me>')
  77.         send_command('bind !H input //send ojomo //ja Hunter\'s Roll <me>')
  78.         send_command('bind !R input //send ojomo //ja Rogue\'s Roll <me>')
  79.         send_command('bind !S input //send ojomo //ja Samurai Roll <me>')
  80.         send_command('bind !T input //send ojomo //ja Tactician\'s Roll <me>')
  81.  
  82.         -- GEO (Mule) Job Ability Key Binds (Win Key) --
  83.         send_command('bind @7 input //send oeogo //ja Blaze of Glory <me>')
  84.         send_command('bind @8 input //send oeogo //ja Ecliptic Attrition <me>')
  85.         send_command('bind @9 input //send oeogo //ja Life Cycle <me>')
  86.         send_command('bind @0 input //send oeogo //ja Lasting Emanation <me>')
  87.  
  88.         -- GEO (Mule) Nuke Key Binds (Win Key) --
  89.         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>;')
  90.         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>;')
  91.         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>;')
  92.         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>;')
  93.         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>;')
  94.         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>;')
  95.  
  96.         -- GEO (Mule) Indicolure Spells (Win Key) --
  97.         send_command('bind @1 input //send oeogo /ma Indi-Regen <me>')
  98.         send_command('bind @2 input //send oeogo /ma Indi-Refresh <me>')
  99.         send_command('bind @D input //send oeogo /ma Indi-DEX <me>')
  100.         send_command('bind @F input //send oeogo /ma Indi-Fury <me>')
  101.         send_command('bind @H input //send oeogo /ma Indi-Haste <me>')
  102.         send_command('bind @K input //send oeogo /ma Indi-Focus <me>')
  103.         send_command('bind @M input //send oeogo /ma Indi-Acumen <me>')
  104.         send_command('bind @S input //send oeogo /ma Indi-STR <me>')
  105.         send_command('bind @T input //send oeogo /ma Indi-Precision <me>')
  106.         send_command('bind @V input //send oeogo /ma Indi-Attunement <me>')
  107.         send_command('bind @W input //send oeogo /ma Indi-Barrier <me>')
  108.  
  109.         -- GEO (Mule) Geocolure Spells (Alt+Win Keys) --
  110.         send_command('bind !@1 input //send oeogo /ma Geo-Regen <me>')
  111.         send_command('bind !@2 input //send oeogo /ma Geo-Refresh <me>')
  112.         send_command('bind !@D input //send oeogo /ma Geo-DEX <me>')
  113.         send_command('bind !@F input //send oeogo /ma Geo-Frailty <t>')
  114.         send_command('bind !@H input //send oeogo /ma Geo-Haste <me>')
  115.         send_command('bind !@K input //send oeogo /ma Geo-Languor <t>')
  116.         send_command('bind !@M input //send oeogo /ma Geo-Malaise <t>')
  117.         send_command('bind !@S input //send oeogo /ma Geo-STR <me>')
  118.         send_command('bind !@T input //send oeogo /ma Geo-Torpor <t>')
  119.         send_command('bind !@V input //send oeogo /ma Geo-Vex <t>')
  120.         send_command('bind !@W input //send oeogo /ma Geo-Wilt <t>')
  121.  
  122.         -- GEO (Mule) Entrust Indicolure Spells (Ctrl+Win Keys) --
  123.         send_command('bind ^@1 input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Regen Arnan')
  124.         send_command('bind ^@2 input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Refresh Arnan')
  125.         send_command('bind ^@D input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-DEX Arnan')
  126.         send_command('bind ^@F input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Fury Arnan')
  127.         send_command('bind ^@H input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Haste Arnan')
  128.         send_command('bind ^@K input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Focus Arnan')
  129.         send_command('bind ^@M input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Acumen Arnan')
  130.         send_command('bind ^@S input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-STR Arnan')
  131.         send_command('bind ^@T input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Precision Arnan')
  132.         send_command('bind ^@V input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Attunement Arnan')
  133.         send_command('bind ^@W input //send oeogo //ja Entrust <me>;pause 2;input //send oeogo /ma Indi-Barrier Arnan')
  134.  
  135.         -- Paladin Job Key Binds (Ctrl & Ctrl+Alt Keys) --
  136.         send_command('bind ^F input //ma Flash <stnpc>')
  137.         send_command('bind ^P input //ja Provoke <stnpc>')
  138.  
  139.         -- Paladin Weapon Skill Key Binds --
  140.         send_command('bind F7 input /ws "Sanguine Blade" <t>')
  141.         send_command('bind F9 input /ws "Atonement" <t>')
  142.         send_command('bind F10 input /ws "Requiescat" <t>')
  143.         send_command('bind F11 input /ws "Savage Blade" <t>')
  144.         send_command('bind Delete input /ws "Chant du Cygne" <t>')
  145.  
  146.         -- COR (mule) Weapon Skill Key Binds --
  147.         send_command('bind F12 input //send ojomo /ws "Last Stand" <t>')
  148.         send_command('bind !F12 input //send ojomo "Leaden Salute" <t>')
  149.         send_command('bind !Delete input //send ojomo /ws "Savage Blade" <t>') 
  150.  
  151.         ----------------------
  152.         -- Key Binds Unload --
  153.         ----------------------
  154.  
  155.         function file_unload()
  156.         -- Unbind Toggles --
  157.         send_command('unbind ^A')
  158.         send_command('unbind ^D')
  159.         send_command('unbind ^H')
  160.         send_command('unbind ^I')
  161.         send_command('unbind ^K')
  162.         -- Unbind Stuff to control both Mules --
  163.         send_command('unbind ^X')
  164.         send_command('unbind ^7')
  165.         send_command('unbind ^8')
  166.         send_command('unbind ^9')
  167.         send_command('unbind ^0')
  168.         send_command('unbind ^-')
  169.         -- Unbind COR JA's --
  170.         send_command('unbind !7')
  171.         send_command('unbind !8')
  172.         send_command('unbind !9')
  173.         send_command('unbind !0')
  174.         -- Unbind COR Rolls --
  175.         send_command('unbind !A')
  176.         send_command('unbind !C')
  177.         send_command('unbind !D')
  178.         send_command('unbind !E')
  179.         send_command('unbind !F')
  180.         send_command('unbind !H')
  181.         send_command('unbind !R')
  182.         send_command('unbind !S')
  183.         send_command('unbind !T')
  184.         -- Unbind GEO JA's --
  185.         send_command('unbind @7')
  186.         send_command('unbind @8')
  187.         send_command('unbind @9')
  188.         send_command('unbind @0')
  189.         -- Unbind GEO Nukes --
  190.         send_command('unbind @F1')
  191.         send_command('unbind @F2')
  192.         send_command('unbind @F3')
  193.         send_command('unbind @F4')
  194.         send_command('unbind @F5')
  195.         send_command('unbind @F6')
  196.         -- Unbind GEO Indi Spells --
  197.         send_command('unbind @D')
  198.         send_command('unbind @F')
  199.         send_command('unbind @H')
  200.         send_command('unbind @K')
  201.         send_command('unbind @M')
  202.         send_command('unbind @S')
  203.         send_command('unbind @T')
  204.         send_command('unbind @V')
  205.         send_command('unbind @W')
  206.         send_command('unbind @1')
  207.         send_command('unbind @2')
  208.         -- Unbind GEO Geocolure Spells --
  209.         send_command('unbind !@D')
  210.         send_command('unbind !@F')
  211.         send_command('unbind !@H')
  212.         send_command('unbind !@K')
  213.         send_command('unbind !@M')
  214.         send_command('unbind !@S')
  215.         send_command('unbind !@T')
  216.         send_command('unbind !@V')
  217.         send_command('unbind !@W')
  218.         send_command('unbind !@1')
  219.         send_command('unbind !@2')
  220.         -- Unbind GEO Entrust Spells --
  221.         send_command('unbind ^@D')
  222.         send_command('unbind ^@F')
  223.         send_command('unbind ^@H')
  224.         send_command('unbind ^@K')
  225.         send_command('unbind ^@M')
  226.         send_command('unbind ^@S')
  227.         send_command('unbind ^@T')
  228.         send_command('unbind ^@V')
  229.         send_command('unbind ^@W')
  230.         send_command('unbind ^@1')
  231.         send_command('unbind ^@2')
  232.         -- Unbind PLD Job Binds --
  233.         send_command('unbind ^F')
  234.         send_command('unbind ^P')
  235.         -- Unload Weapon Skill Key Binds --
  236.         send_command('unbind F7')
  237.         send_command('unbind F9')  
  238.         send_command('unbind F10')     
  239.         send_command('unbind F11')     
  240.         send_command('unbind F12') 
  241.         send_command('unbind !F12')                
  242.         send_command('unbind Delete')
  243.         send_command('unbind !Delete')
  244.         end
  245.    
  246.     -- Gavialis Helm --
  247.     elements = {}
  248.     elements.equip = {head="Gavialis Helm"}
  249.     elements["Chant du Cygne"] = S{"Light","Ice","Water","Wind","Fire","Lightning"}
  250.     elements.Requiescat = S{"Dark","Earth"}
  251.     elements.Resolution = S{"Lightning","Wind","Earth"}
  252.     elements.Scourge = S {"Light","Fire"}
  253.     elements.Torcleaver = S {"Light","Water","Ice"}
  254.  
  255.     Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
  256.     Curaga_Spells = {"Curaga","Curaga II"} -- Curaga Degradation --
  257.     Enmity_BlueMagic = S{"Jettatura","Sheep Song","Soporific","Blank Gaze","Geist Wall"} -- Add or Remove Enmity BlueMagic Here --
  258.    
  259.     -- Augments --
  260.     OHead={}
  261.     OHead.WSD={ name="Odyssean Helm", augments={'Accuracy+11 Attack+11','Weapon skill damage +4%','VIT+3','Accuracy+9',}}
  262.     OHands={}
  263.     OHands.WSD={ name="Odyssean Gauntlets", augments={'Accuracy+15 Attack+15','Weapon skill damage +4%','STR+1','Accuracy+15',}}
  264.     OLegs={}
  265.     OLegs.STP={ name="Odyssean Cuisses", augments={'Accuracy+30','"Store TP"+7','Attack+15',}}
  266.     OLegs.WSD={ name="Odyssean Cuisses", augments={'Accuracy+27','Weapon skill damage +4%','AGI+10','Attack+12',}}
  267.     VFeet={}
  268.     VFeet.STP={ name="Valorous Greaves", augments={'Accuracy+25','"Store TP"+7',}}
  269.    
  270.     -- Rudianos Mantle Augments --
  271.     FCMantle={ name="Rudianos's Mantle", augments={'HP+60','Accuracy+20 Attack+20','"Fast Cast"+10',}}
  272.     DEXDAMantle={ name="Rudianos's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}}
  273.     WSDMantle={ name="Rudianos's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}}
  274.    
  275.     --------------------
  276.     -- Idle/Town Sets --
  277.     --------------------
  278.     sets.Idle = {
  279.             ammo="Homiliary",
  280.             head="Valorous Mask",
  281.             neck="Coatl Gorget +1",
  282.             ear1="Etiolation Earring",
  283.             ear2="Odnowa Earring +1",
  284.             body="Jumalik Mail",
  285.             hands="Souv. Handsch. +1",
  286.             ring1="Moonbeam Ring",
  287.             ring2="Moonbeam Ring",
  288.             back="Moonlight Cape",
  289.             waist="Flume Belt +1",
  290.             legs="Carmine Cuisses +1",
  291.             feet="Souveran Schuhs +1"}
  292.    
  293.     -- Full Idle Sets --
  294.     sets.Idle.Full = set_combine(sets.Idle,{})
  295.     sets.Idle.Full.Ochain = set_combine(sets.Idle.Full,{
  296.             sub="Ochain"})
  297.     sets.Idle.Full.Aegis = set_combine(sets.Idle.Full,{
  298.             sub="Aegis"})
  299.            
  300.     -- Damage Taken Idle Sets --
  301.     sets.Idle.DT = set_combine(sets.Idle,{
  302.             head="Rev. Coronet +1",
  303.             neck="Loricate Torque +1"})
  304.     sets.Idle.DT.Ochain = set_combine(sets.Idle.DT,{
  305.             sub="Ochain"})
  306.     sets.Idle.DT.Aegis = set_combine(sets.Idle.DT,{
  307.             sub="Aegis"})
  308.            
  309.     -- Warp Ring Idle Sets --
  310.     sets.Idle.Warp = set_combine(sets.Idle,{
  311.             ring2="Warp Ring"})
  312.     sets.Idle.Warp.Ochain = set_combine(sets.Idle.Warp,{
  313.             sub="Ochain"})
  314.     sets.Idle.Warp.Aegis = set_combine(sets.Idle.Warp,{
  315.             sub="Aegis"})
  316.  
  317.     -- Resting Set --
  318.     sets.Resting = set_combine(sets.Idle.Full,{})
  319.  
  320.     -- Twilight Set --
  321.     sets.Twilight = {head="Twilight Helm",body="Twilight Mail"}
  322.    
  323.     -------------
  324.     -- TP Sets --
  325.     -------------
  326.     sets.TP = {
  327.             ammo="Ginsen",
  328.             head="Flam. Zucchetto +2",
  329.             neck="Combatant's Torque",
  330.             ear1="Cessance Earring",
  331.             ear2="Brutal Earring",
  332.             body="Emicho Haubert +1",
  333.             hands="Emi. Gauntlets +1",
  334.             ring1="Flamma Ring",
  335.             ring2="Hetairoi Ring",
  336.             back=DEXDAMantle,
  337.             waist="Sailfi Belt +1",
  338.             legs=OLegs.STP,
  339.             feet="Flam. Gambieras +2"}
  340.     sets.TP.MidACC = set_combine(sets.TP,{
  341.             head="Carmine Mask +1",
  342.             ear2="Telos Earring",
  343.             ring1="Chirich Ring",
  344.             ring2="Chirich Ring",
  345.             legs="Carmine Cuisses +1"})
  346.     sets.TP.HighACC = set_combine(sets.TP.MidACC,{
  347.             ear1="Mache Earring +1",
  348.             ear2="Mache Earring +1",
  349.             ring1="Ramuh Ring +1",
  350.             ring2="Ramuh Ring +1",
  351.             feet="Emi. Gambieras +1"})
  352.  
  353.     -- Ochain TP Sets --
  354.     sets.TP.Ochain = set_combine(sets.TP,{
  355.             sub="Ochain"})
  356.     sets.TP.Ochain.MidACC = set_combine(sets.TP.MidACC,{
  357.             sub="Ochain"})
  358.     sets.TP.Ochain.HighACC = set_combine(sets.TP.HighACC,{
  359.             sub="Ochain"})
  360.  
  361.     -- Aegis TP Sets --
  362.     sets.TP.Aegis = set_combine(sets.TP,{
  363.             sub="Aegis"})
  364.     sets.TP.Aegis.MidACC = set_combine(sets.TP.MidACC,{
  365.             sub="Aegis"})
  366.     sets.TP.Aegis.HighACC = set_combine(sets.TP.HighACC,{
  367.             sub="Aegis"})
  368.  
  369.     -- Ragnarok TP Sets --
  370.     sets.TP.Ragnarok = set_combine(sets.TP,{})
  371.     sets.TP.Ragnarok.MidACC = set_combine(sets.TP.MidACC,{})
  372.     sets.TP.Ragnarok.HighACC = set_combine(sets.TP.HighACC,{})
  373.    
  374.     -----------------------
  375.     -- Damage Taken Sets --
  376.     -----------------------
  377.    
  378.     -- PDT Sets --
  379.     sets.PDT = {
  380.             ammo="Staunch Tathlum +1",
  381.             head="Souv. Schaller +1",
  382.             neck="Loricate Torque +1",
  383.             ear1="Ethereal Earring",
  384.             ear2="Odnowa Earring +1",
  385.             body="Rev. Surcoat +2",
  386.             hands="Souv. Handsch. +1",
  387.             ring1="Moonbeam Ring",
  388.             ring2="Moonbeam Ring",
  389.             back="Moonlight Cape",
  390.             waist="Flume Belt +1",
  391.             legs="Souv. Diechlings +1",
  392.             feet="Souveran Schuhs +1"}
  393.     sets.PDT.Ochain = set_combine(sets.PDT,{
  394.             sub="Ochain"})
  395.     sets.PDT.Aegis = set_combine(sets.PDT,{
  396.             sub="Aegis"})
  397.  
  398.     -- MDT Sets --
  399.     sets.MDT = {
  400.             ammo="Staunch Tathlum +1",
  401.             head="Souv. Schaller +1",
  402.             neck="Loricate Torque +1",
  403.             ear1="Ethereal Earring",
  404.             ear2="Odnowa Earring +1",
  405.             body="Rev. Surcoat +2",
  406.             hands="Souv. Handsch. +1",
  407.             ring1="Moonbeam Ring",
  408.             ring2="Moonbeam Ring",
  409.             back="Moonlight Cape",
  410.             waist="Asklepian Belt",
  411.             legs="Souv. Diechlings +1",
  412.             feet="Souveran Schuhs +1"}
  413.     sets.MDT.Ochain = set_combine(sets.MDT,{
  414.             sub="Ochain"})
  415.     sets.MDT.Aegis = set_combine(sets.MDT,{
  416.             sub="Aegis"})
  417.  
  418.     -- DT Sets --
  419.     sets.DT = set_combine(sets.PDT,{})
  420.     sets.DT.Ochain = set_combine(sets.PDT.Ochain,{})
  421.     sets.DT.Aegis = set_combine(sets.PDT.Aegis,{})
  422.  
  423.     -- Kiting Sets --
  424.     sets.Kiting = set_combine(sets.PDT,{
  425.             legs="Carmine Cuisses +1",
  426.             feet="Hippo. Socks +1"})
  427.     sets.Kiting.Ochain = set_combine(sets.Kiting,{sub="Ochain"})
  428.     sets.Kiting.Aegis = set_combine(sets.Kiting,{sub="Aegis"})
  429.  
  430.     -- Hybrid Sets --
  431.     sets.TP.Hybrid = {
  432.             ammo="Staunch Tathlum +1",
  433.             head="Arke Zuchetto",
  434.             neck="Combatant's Torque",
  435.             ear1="Mache Earring +1",
  436.             ear2="Mache Earring +1",
  437.             body="Arke Corazza",
  438.             hands="Arke Manopolas",
  439.             ring1="Moonbeam Ring",
  440.             ring2="Moonbeam Ring",
  441.             back="Moonlight Cape",
  442.             waist="Sailfi Belt +1",
  443.             legs="Arke Cosciales",
  444.             feet="Arke Gambieras"}
  445.     sets.TP.Hybrid.MidACC = set_combine(sets.TP.Hybrid,{})
  446.     sets.TP.Hybrid.HighACC = set_combine(sets.TP.Hybrid.MidACC,{})
  447.  
  448.     --------------------
  449.     -- Weapon Skill Sets
  450.     --------------------
  451.    
  452.     -- WS Base Set -----
  453.     sets.WS = {
  454.             ammo="Floestone",
  455.             head="Flam. Zucchetto +2",
  456.             neck="Fotia Gorget",
  457.             lear="Moonshade Earring",
  458.             rear="Brutal Earring",
  459.             body="Emicho Haubert +1",
  460.             hands="Emi. Gauntlets +1",
  461.             ring1="Shukuyu Ring",
  462.             ring2="Regal Ring",
  463.             back=DEXDAMantle,
  464.             waist="Fotia Belt",
  465.             legs="Sulev. Cuisses +2",
  466.             feet="Flam. Gambieras +2"}
  467.     sets.WS.MidACC = set_combine(sets.WS,{
  468.             ear2="Mache Earring +1",
  469.             feet="Emi. Gambieras +1"})
  470.     sets.WS.HighACC = set_combine(sets.WS.MidACC,{
  471.             head="Carmine Mask +1",
  472.             ring1="Ramuh Ring +1",
  473.             ring2="Ramuh Ring +1",
  474.             legs="Carmine Cuisses +1"})
  475.  
  476.     -- Magic WS base set --
  477.     sets.WS.MABWS = {
  478.             ammo="Pemphredo Tathlum",
  479.             head="Jumalik Helm",
  480.             neck="Sanctity Necklace",
  481.             ear1="Friomisi Earring",
  482.             ear2="Crematio Earring",
  483.             body="Found. Breastplate",
  484.             hands="Founder's Gauntlets",
  485.             ring1="Shiva Ring +1",
  486.             ring2="Shiva Ring +1",
  487.             back="Argochampsa Mantle",
  488.             waist="Eschan Stone",
  489.             legs="Eschite Cuisses",
  490.             feet="Founder's Greaves"}
  491.  
  492.     -- Chant du Cygne Sets --
  493.     sets.WS["Chant du Cygne"] = set_combine(sets.WS,{
  494.             ear1="Mache Earring +1",
  495.             ear2="Mache Earring +1",
  496.             hands="Flam. Manopolas +2",
  497.             ring1="Begrudging Ring",
  498.             legs="Lustr. Subligar +1",
  499.             feet="Emi. Gambieras +1"})
  500.     sets.WS["Chant du Cygne"].MidACC = set_combine(sets.WS.MidACC,{
  501.             ear1="Mache Earring +1",
  502.             hands="Flam. Manopolas +2",
  503.             ring1="Begrudging Ring",
  504.             legs="Lustr. Subligar +1",
  505.             feet="Emi. Gambieras +1"})
  506.     sets.WS["Chant du Cygne"].HighACC = set_combine(sets.WS.HighACC,{
  507.             ear1="Mache Earring +1"})
  508.  
  509.     -- Requiescat Sets --
  510.     sets.WS.Requiescat = set_combine(sets.WS,{
  511.             ammo="Quartz Tathlum +1",
  512.             ring1="Rufescent Ring",
  513.             ring2="Levia. Ring"})
  514.     sets.WS.Requiescat.MidACC = set_combine(sets.WS.MidACC,{
  515.             ring1="Rufescent Ring",
  516.             ring2="Levia. Ring"})
  517.     sets.WS.Requiescat.HighACC = set_combine(sets.WS.HighACC,{})
  518.    
  519.     --- Savage Blade Sets --
  520.     sets.WS["Savage Blade"] = set_combine(sets.WS,{
  521.             head=OHead.WSD,
  522.             ear2="Ishvara Earring",
  523.             body="Sulevia's Plate. +2",
  524.             hands=OHands.WSD,
  525.             back=WSDMantle,
  526.             legs=OLegs.WSD,
  527.             feet="Sulev. Leggings +2"})
  528.     sets.WS["Savage Blade"].MidACC = set_combine(sets.WS.MidACC,{
  529.             head=OHead.WSD,
  530.             ear2="Ishvara Earring",
  531.             body="Sulevia's Plate. +2",
  532.             hands=OHands.WSD,
  533.             back=WSDMantle,
  534.             legs=OLegs.WSD,
  535.             feet="Sulev. Leggings +2"})
  536.     sets.WS["Savage Blade"].HighACC = set_combine(sets.WS.HighACC,{
  537.             hands=OHands.WSD,
  538.             back=WSDMantle,
  539.             feet="Sulev. Leggings +2"})
  540.  
  541.     -- Resolution Sets --
  542.     sets.WS.Resolution = set_combine(sets.WS,{})
  543.     sets.WS.Resolution.MidACC = set_combine(sets.WS.MidACC,{})
  544.     sets.WS.Resolution.HighACC = set_combine(sets.WS.HighACC,{})
  545.    
  546.     -- Torcleaver Sets --
  547.     sets.WS.Torcleaver = set_combine(sets.WS,{
  548.             head=OHead.WSD,
  549.             ear2="Ishvara Earring",
  550.             body="Sulevia's Plate. +2",
  551.             hands=OHands.WSD,
  552.             ring1="Titan Ring +1",
  553.             back=WSDMantle,
  554.             legs=OLegs.WSD,
  555.             feet="Sulev. Leggings +2"})
  556.     sets.WS.Torcleaver.MidACC = set_combine(sets.WS.MidACC,{
  557.             head=OHead.WSD,
  558.             ear2="Ishvara Earring",
  559.             body="Sulevia's Plate. +2",
  560.             hands=OHands.WSD,
  561.             ring1="Titan Ring +1",
  562.             back=WSDMantle,
  563.             legs=OLegs.WSD,
  564.             feet="Sulev. Leggings +2"})
  565.     sets.WS.Torcleaver.HighACC = set_combine(sets.WS.HighACC,{
  566.             hands=OHands.WSD,
  567.             back=WSDMantle,
  568.             feet="Sulev. Leggings +2"})
  569.            
  570.     -- Scourge Sets --
  571.     sets.WS.Scourge = set_combine(sets.WS,{
  572.             head=OHead.WSD,
  573.             ear2="Ishvara Earring",
  574.             body="Sulevia's Plate. +2",
  575.             hands=OHands.WSD,
  576.             back=WSDMantle,
  577.             legs=OLegs.WSD,
  578.             feet="Sulev. Leggings +2"})
  579.     sets.WS.Scourge.MidACC = set_combine(sets.WS.MidACC,{
  580.             head=OHead.WSD,
  581.             ear2="Ishvara Earring",
  582.             body="Sulevia's Plate. +2",
  583.             hands=OHands.WSD,
  584.             back=WSDMantle,
  585.             legs=OLegs.WSD,
  586.             feet="Sulev. Leggings +2"})
  587.     sets.WS.Scourge.HighACC = set_combine(sets.WS.HighACC,{
  588.             hands=OHands.WSD,
  589.             back=WSDMantle,
  590.             feet="Sulev. Leggings +2"})
  591.  
  592.     -- Atonement Set --
  593.     sets.WS.Atonement = {
  594.             head=OHead.WSD,
  595.             ear2="Ishvara Earring",
  596.             hands=OHands.WSD,
  597.             back=WSDMantle,
  598.             legs=OLegs.WSD,
  599.             feet="Sulev. Leggings +2"}
  600.  
  601.     -- Sanguine Blade Set --
  602.     sets.WS["Sanguine Blade"] = set_combine(sets.WS.MABWS,{
  603.             head="Pixie Hairpin +1",
  604.             ring1="Archon Ring",
  605.             back=WSDMantle})
  606.     sets.WS["Sanguine Blade"].MidACC = set_combine(sets.WS.MABWS,{
  607.             head="Pixie Hairpin +1",
  608.             ring1="Archon Ring",
  609.             back=WSDMantle})
  610.     sets.WS["Sanguine Blade"].HighACC = set_combine(sets.WS.MABWS,{
  611.             head="Pixie Hairpin +1",
  612.             ring1="Archon Ring",
  613.             back=WSDMantle})
  614.  
  615.     -- Aeolian Edge Set --
  616.     sets.WS["Aeolian Edge"] = set_combine(sets.WS.MABWS,{})
  617.     sets.WS["Aeolian Edge"].MidACC = set_combine(sets.WS.MABWS,{})
  618.     sets.WS["Aeolian Edge"].HighACC = set_combine(sets.WS.MABWS,{})
  619.  
  620.     ----------------------
  621.     -- Job Ability Sets --
  622.     ---------------------- 
  623.  
  624.     -- Enmity Set --
  625.     sets.Enmity = {
  626.             ammo="Egoist's Tathlum",
  627.             head="Souv. Schaller +1",
  628.             neck="Unmoving Collar +1",
  629.             ear1="Odnowa Earring",
  630.             ear2="Cryptic Earring",
  631.             body="Rev. Surcoat +2",
  632.             hands="Sou. Handsch. +1",
  633.             ring1="Eihwaz Ring",
  634.             ring2="Apeile Ring +1",
  635.             back="Fierabras's Mantle",
  636.             waist="Creed Baudrier",
  637.             legs="Souv. Diechlings +1",
  638.             feet="Souveran Schuhs +1"}
  639.  
  640.     -- PLD JA Sets --
  641.     sets.JA = {}
  642.     sets.JA["Shield Bash"] = set_combine(sets.Enmity,{hands="Cab. Gauntlets +2"})
  643.     sets.JA.Sentinel = set_combine(sets.Enmity,{feet="Cab. Leggings +1"})
  644.     sets.JA["Holy Circle"] = set_combine(sets.Enmity,{feet="Rev. Leggings +1"})
  645.     sets.JA["Divine Emblem"] = set_combine(sets.Enmity,{feet="Chev. Sabatons +1"})
  646.     sets.JA.Fealty = set_combine(sets.Enmity,{body="Cab. Surcoat +1"})
  647.     sets.JA.Invincible = set_combine(sets.Enmity,{legs="Cab. Breeches +1"})
  648.     sets.JA.Palisade = set_combine(sets.Enmity)
  649.     sets.JA.Chivalry = {hands="Cab. Gauntlets +2"}
  650.     sets.JA.Rampart = {head="Cab. Coronet +1"}
  651.     sets.JA.Cover = {head="Rev. Coronet +1"}
  652.  
  653.     -- Gear Worn During Cover --
  654.     sets.Cover = {
  655.             head="Rev. Coronet +1",
  656.             body="Cab. Surcoat +1"}
  657.    
  658.     -- /WAR JA Sets --
  659.     sets.JA.Provoke = set_combine(sets.Enmity)
  660.     sets.JA.Warcry = set_combine(sets.Enmity)
  661.    
  662.     -- /DRK JA Sets --
  663.     sets.JA.Souleater = set_combine(sets.Enmity)
  664.     sets.JA["Last Resort"] = set_combine(sets.Enmity)
  665.    
  666.     -- /DNC JA Sets --
  667.     sets.Flourish = set_combine(sets.Enmity)
  668.     sets.Step = {}
  669.     sets.Waltz = {}
  670.    
  671.     -- /RUN JA Sets --
  672.     sets.JA.Vallation = set_combine(sets.Enmity)
  673.     sets.JA.Swordplay = set_combine(sets.Enmity)
  674.     sets.JA.Pflug = set_combine(sets.Enmity)
  675.  
  676.     -------------------
  677.     -- Pre-Cast Sets --
  678.     -------------------
  679.  
  680.     -- Pre-cast Base Set --
  681.     sets.Precast = {
  682.             ammo="Impatiens",
  683.             head="Chev. Armet +1",
  684.             neck="Orunmila's Torque",
  685.             ear1="Etiolation Earring",
  686.             ear2="Odnowa Earring +1",
  687.             body="Rev. Surcoat +2",
  688.             hands="Souv. Handsch. +1",
  689.             ring1="Moonbeam Ring",
  690.             ring2="Moonbeam Ring",
  691.             back=FCMantle,
  692.             waist="Creed Baudrier",
  693.             legs="Souv. Diechlings +1",
  694.             feet="Carmine Greaves +1"}
  695.    
  696.     --Fastcast Set --
  697.     sets.Precast.FastCast = set_combine(sets.Precast,{})
  698.  
  699.     -- Precast Enhancing Magic --
  700.     sets.Precast['Enhancing Magic'] = set_combine(sets.Precast.FastCast,{waist="Siegel Sash"})
  701.  
  702.     -- Precast Cure Set --
  703.     sets.Precast.Cure = set_combine(sets.Precast,{
  704.             ear1="Nourish. Earring +1",
  705.             ear2="Mendi. Earring",
  706.             body="Jumalik Mail",
  707.             waist="Acerbic Sash +1"})
  708.  
  709.     -- Precast Self Cure Set: Use -HP Gear For Cure Cheat --
  710.     sets.Precast.SelfCure = set_combine(sets.Precast,{
  711.             ear1="Nourish. Earring +1",
  712.             ear2="Mendi. Earring",
  713.             body="Jumalik Mail",
  714.             ring1="Lebeche Ring",
  715.             ring2="Kishar Ring",
  716.             waist="Acerbic Sash +1"})
  717.  
  718.     ------------------
  719.     -- Midcast Sets --
  720.     ------------------
  721.    
  722.     -- Midcast Base Set --
  723.     sets.Midcast = {
  724.             ammo="Staunch Tathlum +1",
  725.             head="Chev. Armet +1",
  726.             neck="Orunmila's Torque",
  727.             ear1="Etiolation Earring",
  728.             ear2="Odnowa Earring +1",
  729.             body="Rev. Surcoat +2",
  730.             hands="Souv. Handsch. +1",
  731.             ring1="Moonbeam Ring",
  732.             ring2="Moonbeam Ring",
  733.             back=FCMantle,
  734.             waist="Creed Baudrier",
  735.             legs="Souv. Diechlings +1",
  736.             feet="Carmine Greaves +1"}
  737.  
  738.     -- Spells Recast --
  739.     sets.Midcast.Recast = set_combine(sets.Midcast,{})
  740.    
  741.     --------------------
  742.     -- Paladin Spells --
  743.     --------------------
  744.  
  745.     -- Divine Magic --
  746.     sets.Midcast['Divine Magic'] = set_combine(sets.Midcast,{
  747.             head="Jumalik Helm",
  748.             neck="Incanter's Torque",
  749.             body="Rev. Surcoat +2",
  750.             hands="Eschite Gauntlets",
  751.             ring1="Stikini Ring",
  752.             ring2="Stikini Ring",
  753.             waist="Asklepian Belt"})
  754.  
  755.     -- Enlight Set --
  756.     sets.Midcast.Enlight = set_combine(sets.Midcast['Divine Magic'],{})
  757.  
  758.     -- Banish Set --
  759.     sets.Midcast.Banish = set_combine(sets.Midcast.MACC,{})
  760.  
  761.     -- Holy Set --
  762.     sets.Midcast.Holy = set_combine(sets.Midcast.MAB,{})
  763.  
  764.     -- Cure Set --
  765.     sets.Midcast.Cure = {
  766.             ammo="Egoist's Tathlum",
  767.             head="Souv. Schaller +1",
  768.             neck="Phalaina Locket",
  769.             ear1="Nourish. Earring +1",
  770.             ear2="Mendi. Earring",
  771.             body="Jumalik Mail",
  772.             hands="Macabre Gaunt. +1",
  773.             ring1="Eihwaz Ring",
  774.             ring2="Moonbeam Ring",
  775.             back="Fierabras's Mantle",
  776.             waist="Creed Baudrier",
  777.             legs="Souv. Diechlings +1",
  778.             feet="Souveran Schuhs +1"}
  779.  
  780.     -- Self Cure Set: Use +HP Gear For Cure Cheat ---
  781.     sets.Midcast.SelfCure = set_combine(sets.Midcast.Cure,{
  782.             ear1="Odnowa Earring",
  783.             ear2="Odnowa Earring +1",
  784.             bacl="Moonlight Cape"})
  785.  
  786.     -- Flash Set --
  787.     sets.Midcast.Flash = {
  788.             ammo="Egoist's Tathlum",
  789.             head="Souv. Schaller +1",
  790.             neck="Unmoving Collar +1",
  791.             ear1="Trux Earring",
  792.             ear2="Cryptic Earring",
  793.             body="Rev. Surcoat +2",
  794.             hands="Souv. Handsch. +1",
  795.             ring1="Eihwaz Ring",
  796.             ring2="Moonbeam Ring",
  797.             back=FCMantle,
  798.             waist="Goading Belt",
  799.             legs="Souv. Diechlings +1",
  800.             feet="Souveran Schuhs +1"}
  801.  
  802.     -- Enhancing Magic --
  803.     sets.Midcast['Enhancing Magic'] = {
  804.             head="Carmine Mask +1",
  805.             neck="Incanter's Torque",
  806.             ear1="Andoaa Earring",
  807.             ear2="Augment. Earring",
  808.             body="Shabti Cuirass",
  809.             ring1="Stikini Ring",
  810.             ring2="Stikini Ring",
  811.             back="Merciful Cape",
  812.             waist="Olympus Sash",
  813.             legs="Carmine Cuisses +1"}
  814.  
  815.     -- Phalanx --
  816.     sets.Midcast.Phalanx =  set_combine(sets.Midcast['Enhancing Magic'],{
  817.             hands="Souv. Handsch. +1",
  818.             back="Weard Mantle",
  819.             feet="Souveran Schuhs +1"})
  820.        
  821.     -- Reprisal --
  822.     sets.Midcast.Reprisal = {}     
  823.    
  824.     ------------------------   
  825.     -- Non-Paladin Spells --
  826.     ------------------------
  827.        
  828.     -- Stoneskin --
  829.     sets.Midcast.Stoneskin =  set_combine(sets.Midcast['Enhancing Magic'],{
  830.             waist="Siegel Sash"})      
  831.  
  832.     -- Magic Attack Bonus Set --
  833.     sets.Midcast.MAB = {
  834.             ammo="Pemphredo Tathlum",
  835.             head="Jumalik Helm",
  836.             neck="Sanctity Necklace",
  837.             ear1="Friomisi Earring",
  838.             ear2="Crematio Earring",
  839.             body="Found. Breastplate",
  840.             hands="Founder's Gauntlets",
  841.             ring1="Shiva Ring +1",
  842.             ring2="Shiva Ring +1",
  843.             back="Argochampsa Mantle",
  844.             waist="Eschan Stone",
  845.             legs="Eschite Cuisses",
  846.             feet="Founder's Greaves"}
  847.  
  848.     -- Magic Accuracy Set --
  849.     sets.Midcast.MACC = {
  850.             ammo="Pemphredo Tathlum",
  851.             head="Carmine Mask +1",
  852.             neck="Erra Pendant",
  853.             ear1="Digni. Earring",
  854.             ear2="Gwati Earring",
  855.             body="Rev. Surcoat +2",
  856.             hands="Flam. Manopolas +2",
  857.             ring1="Stikini Ring",
  858.             ring2="Stikini Ring",
  859.             waist="Eschan Stone",
  860.             legs="Flamma Dirs +1",
  861.             feet="Flam. Gambieras +2"}
  862.    
  863.     -- Elemental Magic Set --
  864.     sets.Midcast['Elemental Magic'] = set_combine(sets.Midcast.MAB,{})
  865.  
  866.     -- Enfeebling Magic Set --
  867.     sets.Midcast['Enfeebling Magic'] = set_combine(sets.Midcast.MACC,{})
  868.        
  869.     -- Dark Magic Set --
  870.     sets.Midcast['Dark Magic'] = set_combine(sets.Midcast.MACC,{})
  871.        
  872. --  -- Repose Set --
  873.     sets.Midcast.Repose = set_combine(sets.Midcast.MACC,{})
  874.                        
  875.     -- Enfeebling Ninjutsu Set --
  876.     sets.Midcast.Enfeebling_Ninjutsu = set_combine(sets.Midcast.MACC,{})
  877.        
  878.     -- Elemental Ninjutsu Set --
  879.     sets.Midcast.Elemental_Ninjutsu = set_combine(sets.Midcast.MAB,{})
  880.    
  881. end
  882.  
  883.         ---------------
  884.         -- Functions --
  885.         ---------------
  886.  
  887.         ----------------
  888.         -- Pre-Target --
  889.         ----------------
  890.  
  891. function pretarget(spell,action)
  892.         if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
  893.                 cancel_spell()
  894.                 send_command('input /item "Echo Drops" <me>')
  895.         elseif spell.english == "Berserk" and buffactive.Berserk then -- Change Berserk To Aggressor If Berserk Is On --
  896.                 cancel_spell()
  897.                 send_command('Aggressor')
  898.         elseif spell.english:ifind("Cure") and player.mp<actualCost(spell.mp_cost) then -- Cure Degradation --
  899.                 degrade_spell(spell,Cure_Spells)
  900.         elseif spell.english:ifind("Curaga") and player.mp<actualCost(spell.mp_cost) then -- Curaga Degradation --
  901.                 degrade_spell(spell,Curaga_Spells)
  902.         return
  903.     end
  904. end
  905.  
  906.         --------------
  907.         -- Pre-Cast --
  908.         --------------
  909.  
  910. function precast(spell,action)
  911.     if canceled then
  912.         return
  913.     elseif spell.type == "WeaponSkill" then
  914.         if player.status ~= 'Engaged' then
  915.             return
  916.         else
  917.             equipSet = sets.WS
  918.             if equipSet[spell.english] then
  919.                 equipSet = equipSet[spell.english]
  920.             end
  921.             if equipSet[AccArray[AccIndex]] then
  922.                 equipSet = equipSet[AccArray[AccIndex]]
  923.             end
  924.             if elements[spell.name] and elements[spell.name]:contains(world.day_element) then
  925.                 equipSet = set_combine(equipSet,elements.equip)
  926.             end
  927.             if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
  928.                 equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
  929.             end
  930.             if player.tp > 2750 then
  931.                     equipSet = set_combine(equipSet,{ear1="Zwazo Earring"}) -- 3000 TP: Equip Zwazo Earring --
  932.             end
  933.             if world.time <= (7*60) or world.time >= (17*60) then
  934.                     equipSet = set_combine(equipSet,{ear2="Lugra Earring +1"}) -- Dusk til Dawn: Equip Lugra Earring +1 --
  935.             end
  936.             equip(equipSet)
  937.         end
  938.     elseif spell.type == "JobAbility" or spell.type == "Ward" or spell.type == "Effusion" then
  939.         if sets.JA[spell.english] then
  940.             equip(sets.JA[spell.english])
  941.         end
  942.     elseif spell.type == "Rune" then
  943.         equip(sets.Enmity)
  944.     elseif spell.action_type == 'Magic' then
  945.         if buffactive.silence or spell.target.distance > 16+target_distance then -- Cancel Magic or Ninjutsu If You Are Silenced or Out of Range --
  946.             cancel_spell()
  947.             add_to_chat(123, spell.name..' Canceled: [Silenced or Out of Casting Range]')
  948.             return
  949.         else
  950.             if (spell.english:startswith('Cur') or spell.english == "Wild Carrot" or spell.english == "Healing Breeze") and spell.english ~= "Cursna" then
  951.                 if spell.target.name == player.name then
  952.                     equip(sets.Precast.SelfCure)
  953.                 else
  954.                     equip(sets.Precast.Cure)
  955.                 end
  956.             elseif spell.english == "Reprisal" then
  957.                 if buffactive['Blaze Spikes'] or buffactive['Ice Spikes'] or buffactive['Shock Spikes'] then -- Cancel Blaze Spikes, Ice Spikes or Shock Spikes When You Cast Reprisal --
  958.                     cast_delay(0.2)
  959.                     send_command('cancel Blaze Spikes,Ice Spikes,Shock Spikes')
  960.                 end
  961.                 equip(sets.Precast.FastCast)
  962.             elseif spell.english == 'Utsusemi: Ni' then
  963.                 if buffactive['Copy Image (3)'] then
  964.                     cancel_spell()
  965.                     add_to_chat(123, spell.name .. ' Canceled: [3 Images]')
  966.                     return
  967.                 else
  968.                     equip(sets.Precast.FastCast)
  969.                 end
  970.             elseif sets.Precast[spell.skill] then
  971.                 equip(sets.Precast[spell.skill])
  972.             else
  973.                 equip(sets.Precast.FastCast)
  974.             end
  975.         end
  976.     elseif spell.type:endswith('Flourish') then
  977.         if spell.english == "Animated Flourish" then
  978.             equip(sets.Enmity)
  979.         else
  980.             equip(sets.Flourish)
  981.         end
  982.     elseif spell.type == "Step" then
  983.         equip(sets.Step)
  984.     elseif spell.type == "Waltz" then
  985.         equip(sets.Waltz)
  986.     elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
  987.         cast_delay(0.2)
  988.         send_command('cancel Sneak')
  989.     end
  990.     if Twilight == 'Twilight' then
  991.         equip(sets.Twilight)
  992.     end
  993. end
  994.         --------------
  995.         -- Mid-Cast --
  996.         --------------
  997.            
  998. function midcast(spell,action)
  999.     equipSet = {}
  1000.     if spell.action_type == 'Magic' then
  1001.         equipSet = sets.Midcast
  1002.         if equipSet[spell.english] then
  1003.             equipSet = equipSet[spell.english]
  1004.         elseif (spell.english:startswith('Cur') or spell.english == "Wild Carrot" or spell.english == "Healing Breeze") and spell.english ~= "Cursna" then
  1005.             if spell.target.name == player.name then
  1006.                 equipSet = equipSet.SelfCure
  1007.             else
  1008.                 equipSet = equipSet.Cure
  1009.             end
  1010.             if world.day_element == spell.element or world.weather_element == spell.element then
  1011.                 equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
  1012.             end
  1013.         elseif spell.english:startswith('Protect') or spell.english:startswith('Shell') then
  1014.             if spell.target.name == player.name then
  1015.                 equipSet = set_combine(equipSet,{ring2="Sheltered Ring"})
  1016.             end
  1017.         elseif spell.english:startswith('Refresh') or spell.english:startswith('Haste') or spell.english:startswith('Flurry') or spell.english:startswith('Blink') or spell.english:startswith('Regen') or spell.english:endswith('Spikes') then
  1018.                 equipSet = sets.Haste
  1019.         elseif spell.english == "Stoneskin" then
  1020.             if buffactive.Stoneskin then
  1021.                 send_command('@wait 2.8;cancel stoneskin')
  1022.             end
  1023.                 equipSet = equipSet.Stoneskin
  1024.         elseif spell.english:startswith('Enlight') then
  1025.             equipSet = equipSet.Enlight
  1026.         elseif spell.english:startswith('Banish') then
  1027.             equipSet = equipSet.Banish
  1028.             if world.day_element == spell.element or world.weather_element == spell.element then
  1029.                 equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
  1030.             end
  1031.         elseif spell.english:startswith('Holy') then
  1032.             equipSet = equipSet.Holy
  1033.             if world.day_element == spell.element or world.weather_element == spell.element then
  1034.                 equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
  1035.             end
  1036.         elseif Enmity_BlueMagic:contains(spell.english) or spell.english == "Stun" or spell.english:startswith('Absorb') or spell.english == 'Aspir' or spell.english == 'Drain' then
  1037.             if buffactive.Sentinel then
  1038.                 equipSet = equipSet.Recast
  1039.             else
  1040.                 equipSet = equipSet.Flash
  1041.             end
  1042.         elseif spell.english:endswith('Spikes') then
  1043.             equipSet = equipSet.Recast
  1044.                 elseif string.find(spell.english,'Utsusemi') then
  1045.                         if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then
  1046.                                 send_command('@wait 1.7;cancel Copy Image*')
  1047.                         end
  1048.                         equipSet = equipSet.Haste
  1049.                 elseif spell.english == 'Monomi: Ichi' then
  1050.                         if buffactive['Sneak'] then
  1051.                                 send_command('@wait 1.7;cancel sneak')
  1052.                         end
  1053.                         equipSet = equipSet.Haste
  1054.                 elseif spell.english:startswith('Tonko') then
  1055.                         equipSet = equipSet.Haste
  1056.                 elseif spell.english:startswith('Jabaku') or spell.english:startswith('Hojo') or spell.english:startswith('Kurayami') or spell.english:startswith('Dokumori') then
  1057.                         equipSet = equipSet.Enfeebling_Ninjutsu
  1058.                 elseif spell.english:startswith('Katon') or spell.english:startswith('Suiton') or spell.english:startswith('Doton') or spell.english:startswith('Hyoton') or spell.english:startswith('Huton') or spell.english:startswith('Raiton') then
  1059.                         equipSet = equipSet.Elemental_Ninjutsu
  1060.                 if (world.day_element == spell.element or world.weather_element == spell.element) then
  1061.                         equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
  1062.                 end
  1063.         elseif equipSet[spell.skill] then
  1064.             equipSet = equipSet[spell.skill]
  1065.         end
  1066.                 if spell.skill == 'Elemental Magic' or spell.english:startswith('Cur') or spell.english:startswith('Aspir') or spell.english:startswith('Drain') or spell.english:startswith('White Wind') then
  1067.                 if (world.day_element == spell.element or world.weather_element == spell.element) then
  1068.                         equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
  1069.                 end
  1070.                 if MB == 'ON' then
  1071.                         equipSet = set_combine(equipSet,sets.Midcast.MB)
  1072.                 end
  1073.                 end
  1074.     elseif equipSet[spell.english] then
  1075.         equipSet = equipSet[spell.english]
  1076.     end
  1077.     equip(equipSet)
  1078. end
  1079.  
  1080.         ----------------
  1081.         -- After-Cast --
  1082.         ----------------
  1083.  
  1084. function aftercast(spell,action)
  1085.     if canceled then
  1086.         canceled = false
  1087.         return
  1088.     else
  1089.         if not spell.interrupted then
  1090.             if spell.type == "WeaponSkill" then
  1091.                 send_command('wait 0.2;gs c TP')
  1092.             elseif spell.english == "Banish II" then -- Banish II Countdown --
  1093.                 send_command('@wait 20;input /echo Banish Effect: [WEARING OFF IN 10 SEC.]')
  1094.             elseif spell.english == "Holy Circle" then -- Holy Circle Countdown --
  1095.                 send_command('wait 260;input /echo '..spell.name..': [WEARING OFF IN 10 SEC.];wait 10;input /echo '..spell.name..': [OFF]')
  1096.             end
  1097.         end
  1098.         status_change(player.status)
  1099.     end
  1100. end
  1101.  
  1102.         -------------------
  1103.         -- Status Change --
  1104.         -------------------
  1105.  
  1106. function status_change(new,old)
  1107.     if Armor == 'PDT' or buffactive.Terror or buffactive.Stun or buffactive.Petrification or buffactive.Sleep then
  1108.         equip(sets.PDT[ShieldArray[ShieldIndex]])
  1109.     elseif Armor == 'MDT' then
  1110.         equip(sets.MDT[ShieldArray[ShieldIndex]])
  1111.     elseif Armor == 'Kiting' then
  1112.         equip(sets.Kiting[ShieldArray[ShieldIndex]])
  1113.     elseif Armor == 'Weakness' then
  1114.         equip(sets.Weakness[ShieldArray[ShieldIndex]])
  1115.     elseif Armor == 'DT' then
  1116.         equip(sets.DT[ShieldArray[ShieldIndex]])
  1117.     elseif buffactive.Cover and Cover == 'ON' then
  1118.         equip(sets.Cover)
  1119.     elseif new == 'Engaged' then
  1120.         equipSet = sets.TP
  1121.         if Armor == 'Hybrid' and equipSet["Hybrid"] then
  1122.             equipSet = equipSet["Hybrid"]
  1123.         end
  1124.         if equipSet[player.equipment.main] then
  1125.             equipSet = equipSet[player.equipment.main]
  1126.         end
  1127.         if equipSet[ShieldArray[ShieldIndex]] then
  1128.             equipSet = equipSet[ShieldArray[ShieldIndex]]
  1129.         end
  1130.         if equipSet[AccArray[AccIndex]] then
  1131.             equipSet = equipSet[AccArray[AccIndex]]
  1132.         end
  1133.         equip(equipSet)
  1134.     elseif new == 'Idle' then
  1135.         equipSet = sets.Idle
  1136.         if equipSet[IdleArray[IdleIndex]] then
  1137.             equipSet = equipSet[IdleArray[IdleIndex]]
  1138.         end
  1139.         if equipSet[ShieldArray[ShieldIndex]] then
  1140.             equipSet = equipSet[ShieldArray[ShieldIndex]]
  1141.         end
  1142.         if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
  1143.             equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
  1144.         end
  1145.         equip(equipSet)
  1146.     elseif new == 'Resting' then
  1147.         equip(sets.Resting)
  1148.     end
  1149.     if Twilight == 'Twilight' then
  1150.         equip(sets.Twilight)
  1151.     end
  1152. end
  1153.  
  1154.         -----------------
  1155.         -- Buff Change --
  1156.         -----------------
  1157.  
  1158. function buff_change(buff,gain,buff_table)
  1159.     buff = string.lower(buff)
  1160.         if buff_table['id'] == 273 and player.equipment.main == 'Excalibur' then -- Excalibur AM3 Timer/Countdown --
  1161.         if gain then
  1162.                 add_to_chat(158,'Excalibur Aftermath: [ON]')
  1163.         else
  1164.                 add_to_chat(123,'Relic Aftermath: [OFF]')
  1165.                 end
  1166.         elseif buff_table['id'] == 273 and player.equipment.main == 'Ragnarok' then -- Ragnarok AM3 Timer/Countdown --
  1167.         if gain then
  1168.                 add_to_chat(158,'Ragnarok Aftermath: [ON]')
  1169.         else
  1170.                 add_to_chat(123,'Relic Aftermath: [OFF]')
  1171.                 end
  1172.         elseif buff_table['id'] == 272 and player.equipment.main == 'Burtgang' then -- Burtgang AM3 Timer/Countdown --
  1173.         if gain then
  1174.                 send_command('timers create "Mythic Aftermath: Lv.3" 180 down')
  1175.                 add_to_chat(158,'Burtgang AM3: [ON]')
  1176.         else
  1177.                 send_command('timers delete "Mythic Aftermath: Lv.3"')
  1178.                 add_to_chat(123,'Burtgang AM3: [OFF]')
  1179.                 end
  1180.         elseif buff_table['id'] == 271 and player.equipment.main == 'Burtgang' then -- Burtgang AM2 Timer/Countdown --
  1181.         if gain then
  1182.                 send_command('timers create "Mythic Aftermath: Lv.2" 270 down')
  1183.                 add_to_chat(158,'Burtgang AM2: [ON]')
  1184.         else
  1185.                 send_command('timers delete "Mythic Aftermath: Lv.2"')
  1186.                 add_to_chat(123,'Burtgang AM2: [OFF]')
  1187.                 end    
  1188.         elseif buff_table['id'] == 270 and player.equipment.main == 'Burtgang' then -- Burtgang AM1 Timer/Countdown --
  1189.         if gain then
  1190.                 add_to_chat(158,'Burtgang AM1: [ON]')
  1191.         else
  1192.                 add_to_chat(123,'Burtgang AM1: [OFF]')
  1193.                 end
  1194.         elseif buff_table['id'] == 272 and player.equipment.main == 'Almace' then -- Almace AM3 Timer/Countdown --
  1195.         if gain then
  1196.                 send_command('timers create "Empy Aftermath: Lv.3" 180 down')
  1197.                 add_to_chat(158,'Almace AM3: [ON]')
  1198.                 else
  1199.                 send_command('timers delete "Empy Aftermath: Lv.3"')
  1200.                 add_to_chat(123,'Almace AM3: [OFF]')
  1201.                 end
  1202.         elseif buff_table['id'] == 271 and player.equipment.main == 'Almace' then -- Almace AM2 Timer/Countdown --
  1203.         if gain then
  1204.                 send_command('timers create "Empy Aftermath: Lv.2" 120 down')
  1205.                 add_to_chat(158,'Almace AM2: [ON]')
  1206.         else
  1207.                 send_command('timers delete "Empy Aftermath: Lv.2"')
  1208.                 add_to_chat(123,'Almace AM2: [OFF]')
  1209.                 end    
  1210.         elseif buff_table['id'] == 270 and player.equipment.main == 'Almace' then -- Almace AM1 Timer/Countdown --
  1211.         if gain then
  1212.                 add_to_chat(158,'Almace AM1: [ON]')
  1213.         else
  1214.                 add_to_chat(123,'Almace AM1: [OFF]')
  1215.                 end
  1216.         elseif buff_table['id'] == 272 and player.equipment.main == 'Caladbolg' then -- Caladbolg AM3 Timer/Countdown --
  1217.         if gain then
  1218.                 send_command('timers create "Empy Aftermath: Lv.3" 180 down')
  1219.                 add_to_chat(158,'Caladbolg AM3: [ON]')
  1220.                 else
  1221.                 send_command('timers delete "Empy Aftermath: Lv.3"')
  1222.                 add_to_chat(123,'Caladbolg AM3: [OFF]')
  1223.                 end
  1224.         elseif buff_table['id'] == 271 and player.equipment.main == 'Caladbolg' then -- Caladbolg AM2 Timer/Countdown --
  1225.         if gain then
  1226.                 send_command('timers create "Empy Aftermath: Lv.2" 120 down')
  1227.                 add_to_chat(158,'Caladbolg AM2: [ON]')
  1228.         else
  1229.                 send_command('timers delete "Empy Aftermath: Lv.2"')
  1230.                 add_to_chat(123,'Caladbolg AM2: [OFF]')
  1231.                 end    
  1232.         elseif buff_table['id'] == 270 and player.equipment.main == 'Caladbolg' then -- Caladbolg AM1 Timer/Countdown --
  1233.         if gain then
  1234.                 add_to_chat(158,'Caladbolg AM1: [ON]')
  1235.         else
  1236.                 send_command('timers delete "Empy Aftermath: Lv.2"')
  1237.                 add_to_chat(123,'Caladbolg AM1: [OFF]')
  1238.                 end    
  1239.         elseif buff_table['id'] == 272 and player.equipment.main == 'Sequence' then -- Sequence AM3 Timer/Countdown --
  1240.         if gain then
  1241.                 send_command('timers create "Aeonic Aftermath: Lv.3" 180 down')
  1242.                 add_to_chat(158,'Sequence AM3: [ON]')
  1243.                 else
  1244.                 send_command('timers delete "Aeonic Aftermath: Lv.3"')
  1245.                 add_to_chat(123,'Sequence AM3: [OFF]')
  1246.                 end
  1247.         elseif buff_table['id'] == 271 and player.equipment.main == 'Sequence' then -- Sequence AM2 Timer/Countdown --
  1248.         if gain then
  1249.                 send_command('timers create "Aeonic Aftermath: Lv.2" 180 down')
  1250.                 add_to_chat(158,'Sequence AM2: [ON]')
  1251.         else
  1252.                 send_command('timers delete "Aeonic Aftermath: Lv.2"')
  1253.                 add_to_chat(123,'Sequence AM2: [OFF]')
  1254.                 end    
  1255.         elseif buff_table['id'] == 270 and player.equipment.main == 'Sequence' then -- Sequence AM1 Timer/Countdown --
  1256.         if gain then
  1257.                 add_to_chat(158,'Sequence AM1: [ON]')
  1258.         else
  1259.                 add_to_chat(123,'Sequence AM1: [OFF]')
  1260.                 end
  1261.         elseif buff_table['id'] == 434 then -- Brew Timer --
  1262.         if gain then
  1263.                 send_command('timers create "Transcendency" 180 down')
  1264.         else
  1265.                 send_command('timers delete "Transcendency"')
  1266.                 add_to_chat(123,'Transcendency: [OFF]')
  1267.                 end            
  1268.         elseif buff_table['id'] == 1 then -- Weakness Timer --
  1269.         if gain then
  1270.                 send_command('timers create "Weakness" 300 up')
  1271.         else
  1272.                 send_command('timers delete "Weakness"')
  1273.                 add_to_chat(158,'Weakness: [OFF]')
  1274.                 end
  1275.         elseif buff_table['id'] == 15 then -- Doom Party Chat --
  1276.         if gain then
  1277.                 send_command('input /party Doom')
  1278.         else
  1279.                 send_command('input /party Doom off')
  1280.                 add_to_chat(158,'Doom: [OFF]')
  1281.                 end
  1282.         elseif buff_table['id'] == 9 then -- Curse Party Chat --
  1283.         if gain then
  1284.                 send_command('input /party Curse')
  1285.         else
  1286.                 add_to_chat(158,'Curse: [OFF]')
  1287.                 end
  1288.         elseif buff_table['id'] == 14 or buff_table['id'] == 17 then -- Charm Party Chat --
  1289.         if gain then
  1290.                 send_command('input /party Charmed')
  1291.         else
  1292.                 send_command('input /party Charm off')
  1293.                 add_to_chat(158,'Charm: [OFF]')
  1294.                 end
  1295.         elseif buff_table['id'] == 4 then -- Paralysis --
  1296.         if gain then
  1297.                 add_to_chat(123,'Paralyzed!')
  1298.         else
  1299.                 add_to_chat(158,'Paralysis: [OFF]')
  1300.                 end            
  1301.         elseif buff_table['id'] == 50 then -- Invincible --
  1302.         if not gain then
  1303.                 add_to_chat(123,'Invincible: [OFF]')
  1304.                 end    
  1305.         elseif buff_table['id'] == 57 then -- Defender --
  1306.         if not gain then
  1307.                 add_to_chat(123,'Defender: [OFF]')
  1308.                 end  
  1309.                 elseif buff_table['id'] == 62 then -- Sentinel --
  1310.         if not gain then
  1311.                 add_to_chat(123,'Sentinel: [OFF]')
  1312.                 end  
  1313.         elseif buff_table['id'] == 114 then -- Cover --
  1314.         if not gain then
  1315.                 add_to_chat(123,'Cover: [OFF]')
  1316.                 end  
  1317.         elseif buff_table['id'] == 344 then -- Fealty --
  1318.         if not gain then
  1319.                 add_to_chat(123,'Fealty: [OFF]')
  1320.                 end  
  1321.         elseif buff_table['id'] == 478 then -- Palisade --
  1322.         if not gain then
  1323.                 add_to_chat(123,'Palisade: [OFF]')
  1324.                 end  
  1325.         elseif buff_table['id'] == 93 then -- Cocoon Notification --
  1326.         if not gain then
  1327.                 add_to_chat(123,'Cocoon: [OFF]')
  1328.                 end    
  1329.         elseif buff_table['id'] == 33 then -- Haste --
  1330.         if not gain then
  1331.                 add_to_chat(123,'Haste: [OFF]')
  1332.                 end    
  1333.         elseif buff_table['id'] == 149 then -- Defense Down --
  1334.         if not gain then
  1335.                 add_to_chat(158,'Defense Down: [OFF]')
  1336.                 end    
  1337.         elseif buff_table['id'] == 13  then    -- Slow --
  1338.         if gain then
  1339.                 add_to_chat(123,'Slowed!')
  1340.                 else
  1341.                 add_to_chat(158,'Slow: [OFF]')
  1342.                 end
  1343.         elseif buff_table['id'] == 40 then -- Protect --
  1344.         if not gain then
  1345.                 add_to_chat(123,'Protect: [OFF]')
  1346.                 end  
  1347.         elseif buff_table['id'] == 41 then -- Shell --
  1348.         if not gain then
  1349.                 add_to_chat(123,'Shell: [OFF]')
  1350.                 end  
  1351.         elseif buff_table['id'] == 43 then -- Refresh --
  1352.         if not gain then
  1353.                 add_to_chat(123,'Refresh: [OFF]')
  1354.                 end    
  1355.         elseif buff_table['id'] == 116 then -- Phalanx --
  1356.         if not gain then
  1357.                 add_to_chat(123,'Phalanx: [OFF]')
  1358.                 end    
  1359.         elseif buff_table['id'] == 274 then -- EnLight --
  1360.         if not gain then
  1361.                 add_to_chat(123,'EnLight: [OFF]')
  1362.                 end  
  1363.         elseif buff_table['id'] == 289 then -- Crusade --
  1364.         if not gain then
  1365.                 add_to_chat(123,'Crusade: [OFF]')
  1366.                 end  
  1367.         elseif buff_table['id'] == 403 then -- Reprisal --
  1368.         if not gain then
  1369.                 add_to_chat(123,'Reprisal: [OFF]')
  1370.                 end  
  1371.         elseif buff_table['id'] == 251 then -- Food --
  1372.         if not gain then
  1373.                 add_to_chat(123,'Food: [OFF]')
  1374.                 end
  1375.         elseif buff_table['id'] == 28 then -- Terror --
  1376.         if not gain then
  1377.                 add_to_chat(158,'Terror: [OFF]')
  1378.                 end
  1379.         elseif buff_table['id'] == 10 then -- Stun --
  1380.         if not gain then
  1381.                 add_to_chat(158,'Stun: [OFF]')
  1382.                 end    
  1383.         elseif buff_table['id'] == 16 then -- Amnesia --
  1384.         if not gain then
  1385.                 add_to_chat(158,'Amnesia: [OFF]')
  1386.                 end                
  1387.         elseif buff_table['id'] == 2 or buff_table['id'] == 19 then -- Sleep --
  1388.         if gain then
  1389.                 send_command('input /party ZZZ')
  1390.         else
  1391.                 add_to_chat(158,'Sleep: [OFF]')
  1392.                 end        
  1393.         end
  1394.  
  1395.         if buffactive.Terror or buffactive.Stun or buffactive.Petrification or buffactive.Sleep and gain then -- Lock PDT When You Are Terrorised/Stunned/Petrified/Slept --
  1396.                 equip({
  1397.             ammo="Staunch Tathlum +1",
  1398.             head="Souv. Schaller +1",
  1399.             neck="Loricate Torque +1",
  1400.             ear1="Ethereal Earring",
  1401.             ear2="Odnowa Earring +1",
  1402.             body="Rev. Surcoat +2",
  1403.             hands="Souv. Handsch. +1",
  1404.             ring1="Moonbeam Ring",
  1405.             ring2="Moonbeam Ring",
  1406.             back="Moonlight Cape",
  1407.             waist="Flume Belt +1",
  1408.             legs="Souv. Diechlings +1",
  1409.             feet="Souveran Schuhs +1"})
  1410.         else
  1411.         if not midaction() then
  1412.                 status_change(player.status)
  1413.                 end
  1414.     end
  1415. end
  1416.  
  1417. -------------------------------------------------------------------------------------
  1418. -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
  1419. -------------------------------------------------------------------------------------
  1420.  
  1421. function self_command(command)
  1422.     if command == 'acc' then -- Accuracy Level Toggle --
  1423.         AccIndex = (AccIndex % #AccArray) + 1
  1424.         status_change(player.status)
  1425.         add_to_chat(155,'Accuracy Level: '..AccArray[AccIndex])
  1426.     elseif command == 'update' then -- Auto Update Gear Toggle --
  1427.         status_change(player.status)
  1428.         add_to_chat(155,'-[Gear Update]-')
  1429.         add_to_chat(155,'Shield Type: '..ShieldArray[ShieldIndex])
  1430.         add_to_chat(155,'Accuracy Level: '..AccArray[AccIndex])
  1431.     elseif command == 'shield' then -- Shield Type Toggle --
  1432.         ShieldIndex = (ShieldIndex % #ShieldArray) + 1
  1433.         status_change(player.status)
  1434.         add_to_chat(155,'Shield Type: '..ShieldArray[ShieldIndex])
  1435.     elseif command == 'hybrid' then -- Hybrid Toggle --
  1436.         if Armor == 'Hybrid' then
  1437.             Armor = 'None'
  1438.             add_to_chat(123,'Hybrid Set: [Unlocked]')
  1439.         else
  1440.             Armor = 'Hybrid'
  1441.             add_to_chat(158,'Hybrid Set: '..AccArray[AccIndex])
  1442.         end
  1443.         status_change(player.status)
  1444.     elseif command == 'pdt' then -- PDT Toggle --
  1445.         if Armor == 'PDT' then
  1446.             Armor = 'None'
  1447.             add_to_chat(123,'PDT Set: [Unlocked]')
  1448.         else
  1449.             Armor = 'PDT'
  1450.             add_to_chat(158,'PDT Set: [Locked]')
  1451.         end
  1452.         status_change(player.status)
  1453.     elseif command == 'mdt' then -- MDT Toggle --
  1454.         if Armor == 'MDT' then
  1455.             Armor = 'None'
  1456.             add_to_chat(123,'MDT Set: [Unlocked]')
  1457.         else
  1458.             Armor = 'MDT'
  1459.             add_to_chat(158,'MDT Set: [Locked]')
  1460.         end
  1461.         status_change(player.status)
  1462.     elseif command == 'kiting' then -- Kiting Toggle --
  1463.         if Armor == 'Kiting' then
  1464.             Armor = 'None'
  1465.             add_to_chat(123,'Kiting Set: [Unlocked]')
  1466.         else
  1467.             Armor = 'Kiting'
  1468.             add_to_chat(158,'Kiting Set: [Locked]')
  1469.         end
  1470.         status_change(player.status)
  1471.     elseif command == 'dt' then -- DT Toggle --
  1472.         if Armor == 'DT' then
  1473.             Armor = 'None'
  1474.             add_to_chat(123,'DT Set: [Unlocked]')
  1475.         else
  1476.             Armor = 'DT'
  1477.             add_to_chat(158,'DT Set: [Locked]')
  1478.         end
  1479.         status_change(player.status)
  1480.     elseif command == 'twilight' then -- Twilight Toggle --
  1481.         if Twilight == 'Twilight' then
  1482.             Twilight = 'None'
  1483.             add_to_chat(123,'Twilight Set: [Unlocked]')
  1484.         else
  1485.             Twilight = 'Twilight'
  1486.             add_to_chat(158,'Twilight Set: [locked]')
  1487.         end
  1488.         status_change(player.status)
  1489.     elseif command == 'C8' then -- Distance Toggle --
  1490.         if player.target.distance then
  1491.             target_distance = math.floor(player.target.distance*10)/10
  1492.             add_to_chat(155,'Distance: '..target_distance)
  1493.         else
  1494.             add_to_chat(123,'No Target Selected')
  1495.         end
  1496.     elseif command == 'idle' then -- Idle Toggle --
  1497.         IdleIndex = (IdleIndex % #IdleArray) + 1
  1498.         status_change(player.status)
  1499.         add_to_chat(155,'Idle Set: '..IdleArray[IdleIndex])
  1500.     elseif command == 'TP' then
  1501.         add_to_chat(155,'TP Return: ['..tostring(player.tp)..']')
  1502.     elseif command:match('^SC%d$') then
  1503.         send_command('//' .. sc_map[command])
  1504.     end
  1505. end
  1506.         -----------
  1507.         -- Misc. --
  1508.         -----------
  1509.  
  1510. function actualCost(originalCost)
  1511.     if buffactive["Penury"] then
  1512.         return originalCost*.5
  1513.     elseif buffactive["Light Arts"] or buffactive["Addendum: White"] then
  1514.         return originalCost*.9
  1515.     elseif buffactive["Dark Arts"] or buffactive["Addendum: Black"] then
  1516.         return originalCost*1.1
  1517.     else
  1518.         return originalCost
  1519.     end
  1520. end
  1521.  
  1522. function degrade_spell(spell,degrade_array)
  1523.     spell_index = table.find(degrade_array,spell.name)
  1524.     if spell_index > 1 then
  1525.         new_spell = degrade_array[spell_index - 1]
  1526.         change_spell(new_spell,spell.target.raw)
  1527.         add_to_chat(8,spell.name..' Canceled: ['..player.mp..'/'..player.max_mp..'MP::'..player.mpp..'%] Casting '..new_spell..' instead.')
  1528.     end
  1529. end
  1530.  
  1531. function change_spell(spell_name,target)
  1532.     cancel_spell()
  1533.     send_command('//'..spell_name..' '..target)
  1534. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement