Advertisement
Arnan

PLD Lua August 2018

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