Arnan

PLD Lua June 2017

Jun 23rd, 2017
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 41.81 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"} -- 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 19;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.    
  43.     -- Key Binds --
  44.     send_command('bind Delete input /ws "Savage Blade" <t>')
  45.     function file_unload()
  46.     send_command('unbind Delete')
  47.     end
  48.    
  49.     -- Gavialis Helm --
  50.     elements = {}
  51.     elements.equip = {head="Gavialis Helm"}
  52.     elements["Chant du Cygne"] = S{"Light","Ice","Water","Wind","Fire","Lightning"}
  53.     elements.Requiescat = S{"Dark","Earth"}
  54.     elements.Resolution = S{"Lightning","Wind","Earth"}
  55.     elements.Scourge = S {"Light","Fire"}
  56.     elements.Torcleaver = S {"Light","Water","Ice"}
  57.  
  58.     Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
  59.     Curaga_Spells = {"Curaga","Curaga II"} -- Curaga Degradation --
  60.     Enmity_BlueMagic = S{"Jettatura","Sheep Song","Soporific","Blank Gaze","Geist Wall"} -- Add or Remove Enmity BlueMagic Here --
  61.    
  62.     -- Augments --
  63.     VHead={}
  64.     VHead.STP={ name="Valorous Mask", augments={'Accuracy+21 Attack+21','"Store TP"+8','STR+8','Attack+9',}}
  65.     OHead={}
  66.     OHead.WSD={ name="Odyssean Helm", augments={'Accuracy+11 Attack+11','Weapon skill damage +4%','VIT+3','Accuracy+9',}}
  67.     OHands={}
  68.     OHands.WSD={ name="Odyssean Gauntlets", augments={'Accuracy+15 Attack+15','Weapon skill damage +4%','STR+1','Accuracy+15',}}
  69.     OLegs={}
  70.     OLegs.STP={ name="Odyssean Cuisses", augments={'Accuracy+30','"Store TP"+7','Attack+15',}}
  71.     OLegs.WSD={ name="Odyssean Cuisses", augments={'Accuracy+27','Weapon skill damage +4%','AGI+10','Attack+12',}}
  72.     VFeet={}
  73.     VFeet.STP={ name="Valorous Greaves", augments={'Accuracy+25','"Store TP"+7',}}
  74.    
  75.     -- Rudianos Mantle Augments --
  76.     FCMantle={ name="Rudianos's Mantle", augments={'HP+60','Accuracy+20 Attack+20','"Fast Cast"+10',}}
  77.     DEXDAMantle={ name="Rudianos's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}}
  78.  
  79.     --------------------
  80.     -- Idle/Town Sets --
  81.     --------------------
  82.     sets.Idle = {
  83.             ammo="Staunch Tathlum",
  84.             head=VHead.STP,
  85.             neck="Coatl Gorget +1",
  86.             ear1="Etiolation Earring",
  87.             ear2="Odnowa Earring +1",
  88.             body="Jumalik Mail",
  89.             hands="Souv. Handsch. +1",
  90.             ring1="Moonbeam Ring",
  91.             ring2="Moonbeam Ring",
  92.             back="Moonbeam Cape",
  93.             waist="Flume Belt +1",
  94.             legs="Carmine Cuisses +1",
  95.             feet="Souveran Schuhs +1"}
  96.    
  97.     -- Full Idle Sets --
  98.     sets.Idle.Full = set_combine(sets.Idle,{})
  99.     sets.Idle.Full.Ochain = set_combine(sets.Idle.Full,{
  100.             sub="Ochain"})
  101.     sets.Idle.Full.Aegis = set_combine(sets.Idle.Full,{
  102.             sub="Aegis"})
  103.            
  104.     -- Damage Taken Idle Sets --
  105.     sets.Idle.DT = set_combine(sets.Idle,{
  106.             head="Rev. Coronet +1",
  107.             neck="Loricate Torque +1"})
  108.     sets.Idle.DT.Ochain = set_combine(sets.Idle.DT,{
  109.             sub="Ochain"})
  110.     sets.Idle.DT.Aegis = set_combine(sets.Idle.DT,{
  111.             sub="Aegis"})
  112.  
  113.     -- Resting Set --
  114.     sets.Resting = set_combine(sets.Idle.Full,{})
  115.  
  116.     -- Twilight Set --
  117.     sets.Twilight = {head="Twilight Helm",body="Twilight Mail"}
  118.    
  119.     -------------
  120.     -- TP Sets --
  121.     -------------
  122.     sets.TP = {
  123.             ammo="Ginsen",
  124.             head="Flam. Zucchetto +1",
  125.             neck="Combatant's Torque",
  126.             ear1="Cessance Earring",
  127.             ear2="Brutal Earring",
  128.             body="Emicho Haubert +1",
  129.             hands="Emi. Gauntlets +1",
  130.             ring1="Petrov Ring",
  131.             ring2="Hetairoi Ring",
  132.             back=DEXDAMantle,
  133.             waist="Sailfi Belt +1",
  134.             legs=OLegs.STP,
  135.             feet="Flam. Gambieras +1"}
  136.     sets.TP.MidACC = set_combine(sets.TP,{
  137.             head="Carmine Mask +1",
  138.             ring1="Chirich Ring",
  139.             ring2="Chirich Ring",
  140.             legs="Carmine Cuisses +1"})
  141.     sets.TP.HighACC = set_combine(sets.TP.MidACC,{
  142.             ear1="Digni. Earring",
  143.             ear2="Zennaroi Earring",
  144.             ring1="Ramuh Ring +1",
  145.             ring2="Ramuh Ring +1",
  146.             feet="Emi. Gambieras +1"})
  147.  
  148.     -- Ochain TP Sets --
  149.     sets.TP.Ochain = set_combine(sets.TP,{
  150.             sub="Ochain"})
  151.     sets.TP.Ochain.MidACC = set_combine(sets.TP.MidACC,{
  152.             sub="Ochain"})
  153.     sets.TP.Ochain.HighACC = set_combine(sets.TP.HighACC,{
  154.             sub="Ochain"})
  155.  
  156.     -- Aegis TP Sets --
  157.     sets.TP.Aegis = set_combine(sets.TP,{
  158.             sub="Aegis"})
  159.     sets.TP.Aegis.MidACC = set_combine(sets.TP.MidACC,{
  160.             sub="Aegis"})
  161.     sets.TP.Aegis.HighACC = set_combine(sets.TP.HighACC,{
  162.             sub="Aegis"})
  163.  
  164.     -- Ragnarok TP Sets --
  165.     sets.TP.Ragnarok = set_combine(sets.TP,{})
  166.     sets.TP.Ragnarok.MidACC = set_combine(sets.TP.MidACC,{})
  167.     sets.TP.Ragnarok.HighACC = set_combine(sets.TP.HighACC,{})
  168.    
  169.     -----------------------
  170.     -- Damage Taken Sets --
  171.     -----------------------
  172.    
  173.     -- PDT Sets --
  174.     sets.PDT = {
  175.             ammo="Staunch Tathlum",
  176.             head="Chevalier's Armet +1",
  177.             neck="Loricate Torque +1",
  178.             ear1="Ethereal Earring",
  179.             ear2="Odnowa Earring +1",
  180.             body="Rev. Surcoat +2",
  181.             hands="Souv. Handsch. +1",
  182.             ring1="Moonbeam Ring",
  183.             ring2="Moonbeam Ring",
  184.             back="Moonbeam Cape",
  185.             waist="Flume Belt +1",
  186.             legs="Souv. Diechlings +1",
  187.             feet="Souveran Schuhs +1"}
  188.     sets.PDT.Ochain = set_combine(sets.PDT,{
  189.             sub="Ochain"})
  190.     sets.PDT.Aegis = set_combine(sets.PDT,{
  191.             sub="Aegis"})
  192.  
  193.     -- MDT Sets --
  194.     sets.MDT = {
  195.             ammo="Staunch Tathlum",
  196.             head="Chevalier's Armet +1",
  197.             neck="Loricate Torque +1",
  198.             ear1="Ethereal Earring",
  199.             ear2="Odnowa Earring +1",
  200.             body="Rev. Surcoat +2",
  201.             hands="Souv. Handsch. +1",
  202.             ring1="Moonbeam Ring",
  203.             ring2="Shadow Ring",
  204.             back="Moonbeam Cape",
  205.             waist="Asklepian Belt",
  206.             legs="Souv. Diechlings +1",
  207.             feet="Souveran Schuhs +1"}
  208.     sets.MDT.Ochain = set_combine(sets.MDT,{
  209.             sub="Ochain"})
  210.     sets.MDT.Aegis = set_combine(sets.MDT,{
  211.             sub="Aegis"})
  212.  
  213.     -- DT Sets --
  214.     sets.DT = set_combine(sets.PDT,{})
  215.     sets.DT.Ochain = set_combine(sets.PDT.Ochain,{})
  216.     sets.DT.Aegis = set_combine(sets.PDT.Aegis,{})
  217.  
  218.     -- Kiting Sets --
  219.     sets.Kiting = set_combine(sets.PDT,{
  220.             head="Rev. Coronet +1",
  221.             ear2="Genmei Earring",
  222.             legs="Carmine Cuisses +1",
  223.             feet="Hippo. Socks +1"})
  224.     sets.Kiting.Ochain = set_combine(sets.Kiting,{sub="Ochain"})
  225.     sets.Kiting.Aegis = set_combine(sets.Kiting,{sub="Aegis"})
  226.  
  227.     -- Hybrid Sets --
  228.     sets.TP.Hybrid = {
  229.             ammo="Staunch Tathlum",
  230.             head="Arke Zuchetto",
  231.             neck="Combatant's Torque",
  232.             ear1="Ethereal Earring",
  233.             ear2="Zennaroi Earring",
  234.             body="Arke Corazza",
  235.             hands="Arke Manopolas",
  236.             ring1="Moonbeam Ring",
  237.             ring2="Moonbeam Ring",
  238.             back="Moonbeam Cape",
  239.             waist="Sailfi Belt +1",
  240.             legs="Arke Cosciales",
  241.             feet="Arke Gambieras"}
  242.     sets.TP.Hybrid.MidACC = set_combine(sets.TP.Hybrid,{})
  243.     sets.TP.Hybrid.HighACC = set_combine(sets.TP.Hybrid.MidACC,{})
  244.  
  245.     --------------------
  246.     -- Weapon Skill Sets
  247.     --------------------
  248.    
  249.     -- WS Base Set -----
  250.     sets.WS = {
  251.             ammo="Floestone",
  252.             head="Flam. Zucchetto +1",
  253.             neck="Fotia Gorget",
  254.             lear="Moonshade Earring",
  255.             rear="Brutal Earring",
  256.             body="Emicho Haubert +1",
  257.             hands="Emi. Gauntlets +1",
  258.             ring1="Shukuyu Ring",
  259.             ring2="Regal Ring",
  260.             back=DEXDAMantle,
  261.             waist="Fotia Belt",
  262.             legs="Sulevi. Cuisses +1",
  263.             feet="Flam. Gambieras +1"}
  264.     sets.WS.MidACC = set_combine(sets.WS,{
  265.             ear2="Zennaroi Earring",
  266.             feet="Emi. Gambieras +1"})
  267.     sets.WS.HighACC = set_combine(sets.WS.MidACC,{
  268.             head="Carmine Mask +1",
  269.             ring1="Ramuh Ring +1",
  270.             ring2="Ramuh Ring +1",
  271.             legs="Carmine Cuisses +1"})
  272.  
  273.     -- Magic WS base set --
  274.     sets.WS.MABWS = {
  275.             ammo="Pemphredo Tathlum",
  276.             head="Jumalik Helm",
  277.             neck="Sanctity Necklace",
  278.             ear1="Friomisi Earring",
  279.             ear2="Crematio Earring",
  280.             body="Found. Breastplate",
  281.             hands="Founder's Gauntlets",
  282.             ring1="Shiva Ring +1",
  283.             ring2="Shiva Ring +1",
  284.             back="Argochampsa Mantle",
  285.             waist="Eschan Stone",
  286.             legs="Eschite Cuisses",
  287.             feet="Founder's Greaves"}
  288.  
  289.     -- Chant du Cygne Sets --
  290.     sets.WS["Chant du Cygne"] = set_combine(sets.WS,{
  291.             ammo="Jukukik Feather",
  292.             hands="Flam. Manopolas +1",
  293.             ring1="Begrudging Ring",
  294.             legs="Lustr. Subligar +1",
  295.             feet="Emi. Gambieras +1"})
  296.     sets.WS["Chant du Cygne"].MidACC = set_combine(sets.WS.MidACC,{
  297.             hands="Flam. Manopolas +1",
  298.             ring1="Begrudging Ring",
  299.             legs="Lustr. Subligar +1",
  300.             feet="Emi. Gambieras +1"})
  301.     sets.WS["Chant du Cygne"].HighACC = set_combine(sets.WS.HighACC,{})
  302.  
  303.     -- Requiescat Sets --
  304.     sets.WS.Requiescat = set_combine(sets.WS,{
  305.             ammo="Quartz Tathlum +1",
  306.             ring1="Rufescent Ring",
  307.             ring2="Levia. Ring"})
  308.     sets.WS.Requiescat.MidACC = set_combine(sets.WS.MidACC,{
  309.             ring1="Rufescent Ring",
  310.             ring2="Levia. Ring"})
  311.     sets.WS.Requiescat.HighACC = set_combine(sets.WS.HighACC,{})
  312.    
  313.     --- Savage Blade Sets --
  314.     sets.WS["Savage Blade"] = set_combine(sets.WS,{
  315.             head=OHead.WSD,
  316.             ear2="Ishvara Earring",
  317.             body="Sulevia's Plate. +1",
  318.             hands=OHands.WSD,
  319.             legs=OLegs.WSD,
  320.             feet="Sulev. Leggings +2"})
  321.     sets.WS["Savage Blade"].MidACC = set_combine(sets.WS.MidACC,{
  322.             head=OHead.WSD,
  323.             ear2="Ishvara Earring",
  324.             body="Sulevia's Plate. +1",
  325.             hands=OHands.WSD,
  326.             legs=OLegs.WSD,
  327.             feet="Sulev. Leggings +2"})
  328.     sets.WS["Savage Blade"].HighACC = set_combine(sets.WS.HighACC,{
  329.             hands=OHands.WSD,
  330.             feet="Sulev. Leggings +2"})
  331.  
  332.     -- Resolution Sets --
  333.     sets.WS.Resolution = set_combine(sets.WS,{})
  334.     sets.WS.Resolution.MidACC = set_combine(sets.WS.MidACC,{})
  335.     sets.WS.Resolution.HighACC = set_combine(sets.WS.HighACC,{})
  336.    
  337.     -- Torcleaver Sets --
  338.     sets.WS.Torcleaver = set_combine(sets.WS,{
  339.             head=OHead.WSD,
  340.             ear2="Ishvara Earring",
  341.             body="Sulevia's Plate. +1",
  342.             hands=OHands.WSD,
  343.             ring1="Titan Ring +1",
  344.             legs=OLegs.WSD,
  345.             feet="Sulev. Leggings +2"})
  346.     sets.WS.Torcleaver.MidACC = set_combine(sets.WS.MidACC,{
  347.             head=OHead.WSD,
  348.             ear2="Ishvara Earring",
  349.             body="Sulevia's Plate. +1",
  350.             hands=OHands.WSD,
  351.             ring1="Titan Ring +1",
  352.             legs=OLegs.WSD,
  353.             feet="Sulev. Leggings +2"})
  354.     sets.WS.Torcleaver.HighACC = set_combine(sets.WS.HighACC,{
  355.             hands=OHands.WSD,
  356.             feet="Sulev. Leggings +2"})
  357.            
  358.     -- Scourge Sets --
  359.     sets.WS.Scourge = set_combine(sets.WS,{
  360.             head=OHead.WSD,
  361.             ear2="Ishvara Earring",
  362.             body="Sulevia's Plate. +1",
  363.             hands=OHands.WSD,
  364.             ring1="Titan Ring +1",
  365.             legs=OLegs.WSD,
  366.             feet="Sulev. Leggings +2"})
  367.     sets.WS.Scourge.MidACC = set_combine(sets.WS.MidACC,{
  368.             head=OHead.WSD,
  369.             ear2="Ishvara Earring",
  370.             body="Sulevia's Plate. +1",
  371.             hands=OHands.WSD,
  372.             ring1="Titan Ring +1",
  373.             legs=OLegs.WSD,
  374.             feet="Sulev. Leggings +2"})
  375.     sets.WS.Scourge.HighACC = set_combine(sets.WS.HighACC,{
  376.             hands=OHands.WSD,
  377.             feet="Sulev. Leggings +2"})
  378.  
  379.     -- Atonement Set --
  380.     sets.WS.Atonement = {
  381.             head=OHead.WSD,
  382.             ear2="Ishvara Earring",
  383.             hands=OHands.WSD,
  384.             legs=OLegs.WSD,
  385.             feet="Sulev. Leggings +2"}
  386.  
  387.     -- Sanguine Blade Set --
  388.     sets.WS["Sanguine Blade"] = set_combine(sets.WS.MABWS,{
  389.             head="Pixie Hairpin +1",
  390.             ring1="Archon Ring"})
  391.     sets.WS["Sanguine Blade"].MidACC = set_combine(sets.WS.MABWS,{
  392.             head="Pixie Hairpin +1",
  393.             ring1="Archon Ring"})
  394.     sets.WS["Sanguine Blade"].HighACC = set_combine(sets.WS.MABWS,{
  395.             head="Pixie Hairpin +1",
  396.             ring1="Archon Ring"})
  397.  
  398.     -- Aeolian Edge Set --
  399.     sets.WS["Aeolian Edge"] = set_combine(sets.WS.MABWS,{})
  400.     sets.WS["Aeolian Edge"].MidACC = set_combine(sets.WS.MABWS,{})
  401.     sets.WS["Aeolian Edge"].HighACC = set_combine(sets.WS.MABWS,{})
  402.  
  403.     ----------------------
  404.     -- Job Ability Sets --
  405.     ---------------------- 
  406.  
  407.     -- Enmity Set --
  408.     sets.Enmity = {
  409.             ammo="Egoist's Tathlum",
  410.             head="Souveran Schaller",
  411.             neck="Unmoving Collar +1",
  412.             ear1="Odnowa Earring",
  413.             ear2="Cryptic Earring",
  414.             body="Rev. Surcoat +2",
  415.             hands="Macabre Gaunt. +1",
  416.             ring1="Eihwaz Ring",
  417.             ring2="Apeile Ring +1",
  418.             back="Fierabras's Mantle",
  419.             waist="Creed Baudrier",
  420.             legs="Souv. Diechlings +1",
  421.             feet="Souveran Schuhs +1"}
  422.  
  423.     -- PLD JA Sets --
  424.     sets.JA = {}
  425.     sets.JA["Shield Bash"] = set_combine(sets.Enmity,{hands="Cab. Gauntlets +1"})
  426.     sets.JA.Sentinel = set_combine(sets.Enmity,{feet="Cab. Leggings +1"})
  427.     sets.JA["Holy Circle"] = set_combine(sets.Enmity,{feet="Rev. Leggings +1"})
  428.     sets.JA["Divine Emblem"] = set_combine(sets.Enmity,{feet="Chev. Sabatons"})
  429.     sets.JA.Fealty = set_combine(sets.Enmity,{body="Cab. Surcoat +1"})
  430.     sets.JA.Invincible = set_combine(sets.Enmity,{legs="Cab. Breeches +1"})
  431.     sets.JA.Palisade = set_combine(sets.Enmity)
  432.     sets.JA.Chivalry = {hands="Cab. Gauntlets +1"}
  433.     sets.JA.Rampart = {head="Cab. Coronet +1"}
  434.     sets.JA.Cover = {head="Rev. Coronet +1"}
  435.  
  436.     -- Gear Worn During Cover --
  437.     sets.Cover = {
  438.             head="Rev. Coronet +1",
  439.             body="Cab. Surcoat +1"}
  440.    
  441.     -- /WAR JA Sets --
  442.     sets.JA.Provoke = set_combine(sets.Enmity)
  443.     sets.JA.Warcry = set_combine(sets.Enmity)
  444.    
  445.     -- /DRK JA Sets --
  446.     sets.JA.Souleater = set_combine(sets.Enmity)
  447.     sets.JA["Last Resort"] = set_combine(sets.Enmity)
  448.    
  449.     -- /DNC JA Sets --
  450.     sets.Flourish = set_combine(sets.Enmity)
  451.     sets.Step = {}
  452.     sets.Waltz = {}
  453.    
  454.     -- /RUN JA Sets --
  455.     sets.JA.Vallation = set_combine(sets.Enmity)
  456.     sets.JA.Swordplay = set_combine(sets.Enmity)
  457.     sets.JA.Pflug = set_combine(sets.Enmity)
  458.  
  459.     -------------------
  460.     -- Pre-Cast Sets --
  461.     -------------------
  462.  
  463.     -- Pre-cast Base Set --
  464.     sets.Precast = {
  465.             ammo="Impatiens",
  466.             head="Chev. Armet +1",
  467.             neck="Orunmila's Torque",
  468.             ear1="Etiolation Earring",
  469.             ear2="Odnowa Earring +1",
  470.             body="Rev. Surcoat +2",
  471.             hands="Souv. Handsch. +1",
  472.             ring1="Moonbeam Ring",
  473.             ring2="Moonbeam Ring",
  474.             back=FCMantle,
  475.             waist="Creed Baudrier",
  476.             legs="Souv. Diechlings +1",
  477.             feet="Carmine Greaves +1"}
  478.    
  479.     --Fastcast Set --
  480.     sets.Precast.FastCast = set_combine(sets.Precast,{})
  481.  
  482.     -- Precast Enhancing Magic --
  483.     sets.Precast['Enhancing Magic'] = set_combine(sets.Precast.FastCast,{waist="Siegel Sash"})
  484.  
  485.     -- Precast Cure Set --
  486.     sets.Precast.Cure = set_combine(sets.Precast,{
  487.             ear1="Nourish. Earring +1",
  488.             ear2="Mendi. Earring",
  489.             body="Jumalik Mail",
  490.             waist="Acerbic Sash +1"})
  491.  
  492.     -- Precast Self Cure Set: Use -HP Gear For Cure Cheat --
  493.     sets.Precast.SelfCure = set_combine(sets.Precast,{
  494.             ear1="Nourish. Earring +1",
  495.             ear2="Mendi. Earring",
  496.             body="Jumalik Mail",
  497.             ring1="Lebeche Ring",
  498.             ring2="Kishar Ring",
  499.             waist="Acerbic Sash +1"})
  500.  
  501.     ------------------
  502.     -- Midcast Sets --
  503.     ------------------
  504.    
  505.     -- Midcast Base Set --
  506.     sets.Midcast = {
  507.             ammo="Staunch Tathlum",
  508.             head="Chev. Armet +1",
  509.             neck="Orunmila's Torque",
  510.             ear1="Etiolation Earring",
  511.             ear2="Odnowa Earring +1",
  512.             body="Rev. Surcoat +2",
  513.             hands="Souv. Handsch. +1",
  514.             ring1="Moonbeam Ring",
  515.             ring2="Moonbeam Ring",
  516.             back=FCMantle,
  517.             waist="Creed Baudrier",
  518.             legs="Souv. Diechlings +1",
  519.             feet="Carmine Greaves +1"}
  520.  
  521.     -- Spells Recast --
  522.     sets.Midcast.Recast = set_combine(sets.Midcast,{})
  523.    
  524.     --------------------
  525.     -- Paladin Spells --
  526.     --------------------
  527.  
  528.     -- Divine Magic --
  529.     sets.Midcast['Divine Magic'] = set_combine(sets.Midcast,{
  530.             head="Jumalik Helm",
  531.             neck="Incanter's Torque",
  532.             body="Rev. Surcoat +2",
  533.             hands="Eschite Gauntlets",
  534.             ring1="Stikini Ring",
  535.             ring2="Stikini Ring",
  536.             waist="Asklepian Belt"})
  537.  
  538.     -- Enlight Set --
  539.     sets.Midcast.Enlight = set_combine(sets.Midcast['Divine Magic'],{})
  540.  
  541.     -- Banish Set --
  542.     sets.Midcast.Banish = set_combine(sets.Midcast.MACC,{})
  543.  
  544.     -- Holy Set --
  545.     sets.Midcast.Holy = set_combine(sets.Midcast.MAB,{})
  546.  
  547.     -- Cure Set --
  548.     sets.Midcast.Cure = {
  549.             ammo="Egoist's Tathlum",
  550.             head="Souveran Schaller",
  551.             neck="Phalaina Locket",
  552.             ear1="Nourish. Earring +1",
  553.             ear2="Mendi. Earring",
  554.             body="Souveran Cuirass",
  555.             hands="Macabre Gaunt. +1",
  556.             ring1="Eihwaz Ring",
  557.             ring2="Moonbeam Ring",
  558.             back="Fierabras's Mantle",
  559.             waist="Creed Baudrier",
  560.             legs="Souv. Diechlings +1",
  561.             feet="Souveran Schuhs +1"}
  562.  
  563.     -- Self Cure Set: Use +HP Gear For Cure Cheat ---
  564.     sets.Midcast.SelfCure = set_combine(sets.Midcast.Cure,{
  565.             ear1="Odnowa Earring",
  566.             ear2="Odnowa Earring +1",
  567.             bacl="Moonbeam Cape"})
  568.  
  569.     -- Flash Set --
  570.     sets.Midcast.Flash = {
  571.             ammo="Egoist's Tathlum",
  572.             head="Souveran Schaller",
  573.             neck="Unmoving Collar +1",
  574.             ear1="Trux Earring",
  575.             ear2="Cryptic Earring",
  576.             body="Rev. Surcoat +2",
  577.             hands="Souv. Handsch. +1",
  578.             ring1="Eihwaz Ring",
  579.             ring2="Moonbeam Ring",
  580.             back=FCMantle,
  581.             waist="Goading Belt",
  582.             legs="Souv. Diechlings +1",
  583.             feet="Souveran Schuhs +1"}
  584.  
  585.     -- Enhancing Magic --
  586.     sets.Midcast['Enhancing Magic'] = {
  587.             head="Carmine Mask +1",
  588.             neck="Incanter's Torque",
  589.             ear1="Andoaa Earring",
  590.             ear2="Augment. Earring",
  591.             body="Shabti Cuirass",
  592.             ring1="Stikini Ring",
  593.             ring2="Stikini Ring",
  594.             back="Merciful Cape",
  595.             waist="Olympus Sash",
  596.             legs="Carmine Cuisses +1"}
  597.  
  598.     -- Phalanx --
  599.     sets.Midcast.Phalanx =  set_combine(sets.Midcast['Enhancing Magic'],{
  600.             hands="Souv. Handsch. +1",
  601.             back="Weard Mantle",
  602.             feet="Souveran Schuhs +1"})
  603.        
  604.     -- Reprisal --
  605.     sets.Midcast.Reprisal = {}     
  606.    
  607.     ------------------------   
  608.     -- Non-Paladin Spells --
  609.     ------------------------
  610.        
  611.     -- Stoneskin --
  612.     sets.Midcast.Stoneskin =  set_combine(sets.Midcast['Enhancing Magic'],{
  613.             waist="Siegel Sash"})      
  614.  
  615.     -- Magic Attack Bonus Set --
  616.     sets.Midcast.MAB = {
  617.             ammo="Pemphredo Tathlum",
  618.             head="Jumalik Helm",
  619.             neck="Sanctity Necklace",
  620.             ear1="Friomisi Earring",
  621.             ear2="Crematio Earring",
  622.             body="Found. Breastplate",
  623.             hands="Founder's Gauntlets",
  624.             ring1="Shiva Ring +1",
  625.             ring2="Shiva Ring +1",
  626.             back="Argochampsa Mantle",
  627.             waist="Eschan Stone",
  628.             legs="Eschite Cuisses",
  629.             feet="Founder's Greaves"}
  630.  
  631.     -- Magic Accuracy Set --
  632.     sets.Midcast.MACC = {
  633.             ammo="Pemphredo Tathlum",
  634.             head="Carmine Mask +1",
  635.             neck="Erra Pendant",
  636.             ear1="Digni. Earring",
  637.             ear2="Gwati Earring",
  638.             body="Rev. Surcoat +2",
  639.             hands="Flam. Manopolas +1",
  640.             ring1="Stikini Ring",
  641.             ring2="Stikini Ring",
  642.             waist="Eschan Stone",
  643.             legs="Flamma Dirs +1",
  644.             feet="Flam. Gambieras +1"}
  645.    
  646.     -- Elemental Magic Set --
  647.     sets.Midcast['Elemental Magic'] = set_combine(sets.Midcast.MAB,{})
  648.  
  649.     -- Enfeebling Magic Set --
  650.     sets.Midcast['Enfeebling Magic'] = set_combine(sets.Midcast.MACC,{})
  651.        
  652.     -- Dark Magic Set --
  653.     sets.Midcast['Dark Magic'] = set_combine(sets.Midcast.MACC,{})
  654.        
  655. --  -- Repose Set --
  656.     sets.Midcast.Repose = set_combine(sets.Midcast.MACC,{})
  657.                        
  658.     -- Enfeebling Ninjutsu Set --
  659.     sets.Midcast.Enfeebling_Ninjutsu = set_combine(sets.Midcast.MACC,{})
  660.        
  661.     -- Elemental Ninjutsu Set --
  662.     sets.Midcast.Elemental_Ninjutsu = set_combine(sets.Midcast.MAB,{})
  663.    
  664. end
  665.  
  666.         ---------------
  667.         -- Functions --
  668.         ---------------
  669.  
  670.         ----------------
  671.         -- Pre-Target --
  672.         ----------------
  673.  
  674. function pretarget(spell,action)
  675.         if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
  676.                 cancel_spell()
  677.                 send_command('input /item "Echo Drops" <me>')
  678.         elseif spell.english == "Berserk" and buffactive.Berserk then -- Change Berserk To Aggressor If Berserk Is On --
  679.                 cancel_spell()
  680.                 send_command('Aggressor')
  681.         elseif spell.english:ifind("Cure") and player.mp<actualCost(spell.mp_cost) then -- Cure Degradation --
  682.                 degrade_spell(spell,Cure_Spells)
  683.         elseif spell.english:ifind("Curaga") and player.mp<actualCost(spell.mp_cost) then -- Curaga Degradation --
  684.                 degrade_spell(spell,Curaga_Spells)
  685.         return
  686.     end
  687. end
  688.  
  689.         --------------
  690.         -- Pre-Cast --
  691.         --------------
  692.  
  693. function precast(spell,action)
  694.     if canceled then
  695.         return
  696.     elseif spell.type == "WeaponSkill" then
  697.         if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
  698.             cancel_spell()
  699.             add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]')
  700.             return
  701.         else
  702.             equipSet = sets.WS
  703.             if equipSet[spell.english] then
  704.                 equipSet = equipSet[spell.english]
  705.             end
  706.             if equipSet[AccArray[AccIndex]] then
  707.                 equipSet = equipSet[AccArray[AccIndex]]
  708.             end
  709.             if elements[spell.name] and elements[spell.name]:contains(world.day_element) then
  710.                 equipSet = set_combine(equipSet,elements.equip)
  711.             end
  712.             if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
  713.                 equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
  714.             end
  715.             if player.tp > 2750 then
  716.                     equipSet = set_combine(equipSet,{ear1="Zwazo Earring"}) -- 3000 TP: Equip Zwazo Earring --
  717.             end
  718.             if world.time <= (7*60) or world.time >= (17*60) then
  719.                     equipSet = set_combine(equipSet,{ear2="Lugra Earring +1"}) -- Dusk til Dawn: Equip Lugra Earring +1 --
  720.             end
  721.             equip(equipSet)
  722.         end
  723.     elseif spell.type == "JobAbility" or spell.type == "Ward" or spell.type == "Effusion" then
  724.         if sets.JA[spell.english] then
  725.             equip(sets.JA[spell.english])
  726.         end
  727.     elseif spell.type == "Rune" then
  728.         equip(sets.Enmity)
  729.     elseif spell.action_type == 'Magic' then
  730.         if buffactive.silence or spell.target.distance > 16+target_distance then -- Cancel Magic or Ninjutsu If You Are Silenced or Out of Range --
  731.             cancel_spell()
  732.             add_to_chat(123, spell.name..' Canceled: [Silenced or Out of Casting Range]')
  733.             return
  734.         else
  735.             if (spell.english:startswith('Cur') or spell.english == "Wild Carrot" or spell.english == "Healing Breeze") and spell.english ~= "Cursna" then
  736.                 if spell.target.name == player.name then
  737.                     equip(sets.Precast.SelfCure)
  738.                 else
  739.                     equip(sets.Precast.Cure)
  740.                 end
  741.             elseif spell.english == "Reprisal" then
  742.                 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 --
  743.                     cast_delay(0.2)
  744.                     send_command('cancel Blaze Spikes,Ice Spikes,Shock Spikes')
  745.                 end
  746.                 equip(sets.Precast.FastCast)
  747.             elseif spell.english == 'Utsusemi: Ni' then
  748.                 if buffactive['Copy Image (3)'] then
  749.                     cancel_spell()
  750.                     add_to_chat(123, spell.name .. ' Canceled: [3 Images]')
  751.                     return
  752.                 else
  753.                     equip(sets.Precast.FastCast)
  754.                 end
  755.             elseif sets.Precast[spell.skill] then
  756.                 equip(sets.Precast[spell.skill])
  757.             else
  758.                 equip(sets.Precast.FastCast)
  759.             end
  760.         end
  761.     elseif spell.type:endswith('Flourish') then
  762.         if spell.english == "Animated Flourish" then
  763.             equip(sets.Enmity)
  764.         else
  765.             equip(sets.Flourish)
  766.         end
  767.     elseif spell.type == "Step" then
  768.         equip(sets.Step)
  769.     elseif spell.type == "Waltz" then
  770.         refine_waltz(spell,action)
  771.         equip(sets.Waltz)
  772.     elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
  773.         cast_delay(0.2)
  774.         send_command('cancel Sneak')
  775.     end
  776.     if Twilight == 'Twilight' then
  777.         equip(sets.Twilight)
  778.     end
  779. end
  780.         --------------
  781.         -- Mid-Cast --
  782.         --------------
  783.            
  784. function midcast(spell,action)
  785.     equipSet = {}
  786.     if spell.action_type == 'Magic' then
  787.         equipSet = sets.Midcast
  788.         if equipSet[spell.english] then
  789.             equipSet = equipSet[spell.english]
  790.         elseif (spell.english:startswith('Cur') or spell.english == "Wild Carrot" or spell.english == "Healing Breeze") and spell.english ~= "Cursna" then
  791.             if spell.target.name == player.name then
  792.                 equipSet = equipSet.SelfCure
  793.             else
  794.                 equipSet = equipSet.Cure
  795.             end
  796.             if world.day_element == spell.element or world.weather_element == spell.element then
  797.                 equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
  798.             end
  799.         elseif spell.english:startswith('Protect') or spell.english:startswith('Shell') then
  800.             if spell.target.name == player.name then
  801.                 equipSet = set_combine(equipSet,{ring2="Sheltered Ring"})
  802.             end
  803.         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
  804.                 equipSet = sets.Haste
  805.         elseif spell.english == "Stoneskin" then
  806.             if buffactive.Stoneskin then
  807.                 send_command('@wait 2.8;cancel stoneskin')
  808.             end
  809.                 equipSet = equipSet.Stoneskin
  810.         elseif spell.english:startswith('Enlight') then
  811.             equipSet = equipSet.Enlight
  812.         elseif spell.english:startswith('Banish') then
  813.             equipSet = equipSet.Banish
  814.             if world.day_element == spell.element or world.weather_element == spell.element then
  815.                 equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
  816.             end
  817.         elseif spell.english:startswith('Holy') then
  818.             equipSet = equipSet.Holy
  819.             if world.day_element == spell.element or world.weather_element == spell.element then
  820.                 equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
  821.             end
  822.         elseif Enmity_BlueMagic:contains(spell.english) or spell.english == "Stun" or spell.english:startswith('Absorb') or spell.english == 'Aspir' or spell.english == 'Drain' then
  823.             if buffactive.Sentinel then
  824.                 equipSet = equipSet.Recast
  825.             else
  826.                 equipSet = equipSet.Flash
  827.             end
  828.         elseif spell.english:endswith('Spikes') then
  829.             equipSet = equipSet.Recast
  830.                 elseif string.find(spell.english,'Utsusemi') then
  831.                         if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then
  832.                                 send_command('@wait 1.7;cancel Copy Image*')
  833.                         end
  834.                         equipSet = equipSet.Haste
  835.                 elseif spell.english == 'Monomi: Ichi' then
  836.                         if buffactive['Sneak'] then
  837.                                 send_command('@wait 1.7;cancel sneak')
  838.                         end
  839.                         equipSet = equipSet.Haste
  840.                 elseif spell.english:startswith('Tonko') then
  841.                         equipSet = equipSet.Haste
  842.                 elseif spell.english:startswith('Jabaku') or spell.english:startswith('Hojo') or spell.english:startswith('Kurayami') or spell.english:startswith('Dokumori') then
  843.                         equipSet = equipSet.Enfeebling_Ninjutsu
  844.                 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
  845.                         equipSet = equipSet.Elemental_Ninjutsu
  846.                 if (world.day_element == spell.element or world.weather_element == spell.element) then
  847.                         equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
  848.                 end
  849.         elseif equipSet[spell.skill] then
  850.             equipSet = equipSet[spell.skill]
  851.         end
  852.                 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
  853.                 if (world.day_element == spell.element or world.weather_element == spell.element) then
  854.                         equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
  855.                 end
  856.                 if MB == 'ON' then
  857.                         equipSet = set_combine(equipSet,sets.Midcast.MB)
  858.                 end
  859.                 end
  860.     elseif equipSet[spell.english] then
  861.         equipSet = equipSet[spell.english]
  862.     end
  863.     equip(equipSet)
  864. end
  865.  
  866.         ----------------
  867.         -- After-Cast --
  868.         ----------------
  869.  
  870. function aftercast(spell,action)
  871.     if canceled then
  872.         canceled = false
  873.         return
  874.     else
  875.         if not spell.interrupted then
  876.             if spell.type == "WeaponSkill" then
  877.                 send_command('wait 0.2;gs c TP')
  878.             elseif spell.english == "Banish II" then -- Banish II Countdown --
  879.                 send_command('@wait 20;input /echo Banish Effect: [WEARING OFF IN 10 SEC.]')
  880.             elseif spell.english == "Holy Circle" then -- Holy Circle Countdown --
  881.                 send_command('wait 260;input /echo '..spell.name..': [WEARING OFF IN 10 SEC.];wait 10;input /echo '..spell.name..': [OFF]')
  882.             end
  883.         end
  884.         status_change(player.status)
  885.     end
  886. end
  887.  
  888.         -------------------
  889.         -- Status Change --
  890.         -------------------
  891.  
  892. function status_change(new,old)
  893.     if Armor == 'PDT' then
  894.         equip(sets.PDT[ShieldArray[ShieldIndex]])
  895.     elseif Armor == 'MDT' then
  896.         equip(sets.MDT[ShieldArray[ShieldIndex]])
  897.     elseif Armor == 'Kiting' then
  898.         equip(sets.Kiting[ShieldArray[ShieldIndex]])
  899.     elseif Armor == 'Weakness' then
  900.         equip(sets.Weakness[ShieldArray[ShieldIndex]])
  901.     elseif Armor == 'DT' then
  902.         equip(sets.DT[ShieldArray[ShieldIndex]])
  903.     elseif buffactive.Cover and Cover == 'ON' then
  904.         equip(sets.Cover)
  905.     elseif new == 'Engaged' then
  906.         equipSet = sets.TP
  907.         if Armor == 'Hybrid' and equipSet["Hybrid"] then
  908.             equipSet = equipSet["Hybrid"]
  909.         end
  910.         if equipSet[player.equipment.main] then
  911.             equipSet = equipSet[player.equipment.main]
  912.         end
  913.         if equipSet[ShieldArray[ShieldIndex]] then
  914.             equipSet = equipSet[ShieldArray[ShieldIndex]]
  915.         end
  916.         if equipSet[AccArray[AccIndex]] then
  917.             equipSet = equipSet[AccArray[AccIndex]]
  918.         end
  919.         equip(equipSet)
  920.     elseif new == 'Idle' then
  921.         equipSet = sets.Idle
  922.         if equipSet[IdleArray[IdleIndex]] then
  923.             equipSet = equipSet[IdleArray[IdleIndex]]
  924.         end
  925.         if equipSet[ShieldArray[ShieldIndex]] then
  926.             equipSet = equipSet[ShieldArray[ShieldIndex]]
  927.         end
  928.         if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
  929.             equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
  930.         end
  931.         equip(equipSet)
  932.     elseif new == 'Resting' then
  933.         equip(sets.Resting)
  934.     end
  935.     if Twilight == 'Twilight' then
  936.         equip(sets.Twilight)
  937.     end
  938. end
  939.  
  940.         -----------------
  941.         -- Buff Change --
  942.         -----------------
  943.  
  944. function buff_change(buff,gain,buff_table)
  945.     buff = string.lower(buff)
  946.     if buff_table['id'] == 272 and player.equipment.main == 'Almace' then -- Almace AM3 Timer/Countdown --
  947.         if gain then
  948.                 send_command('timers create "Empy Aftermath: Lv.3" 180 down')
  949.                 else
  950.                 send_command('timers delete "Empy Aftermath: Lv.3"')
  951.                 add_to_chat(123,'Almace AM3: [OFF]')
  952.                 end
  953.         elseif buff_table['id'] == 271 and player.equipment.main == 'Almace' then -- Almace AM2 Timer/Countdown --
  954.         if gain then
  955.                 send_command('timers create "Empy Aftermath: Lv.2" 120 down')
  956.         else
  957.                 send_command('timers delete "Empy Aftermath: Lv.2"')
  958.                 add_to_chat(123,'Almace AM2: [OFF]')
  959.                 end    
  960.         elseif buff_table['id'] == 272 and player.equipment.main == 'Sequence' then -- Sequence AM3 Timer/Countdown --
  961.         if gain then
  962.                 send_command('timers create "Aeonic Aftermath: Lv.3" 180 down')
  963.                 else
  964.                 send_command('timers delete "Aeonic Aftermath: Lv.3"')
  965.                 add_to_chat(123,'Sequence AM3: [OFF]')
  966.                 end
  967.         elseif buff_table['id'] == 271 and player.equipment.main == 'Sequence' then -- Sequence AM2 Timer/Countdown --
  968.         if gain then
  969.                 send_command('timers create "Aeonic Aftermath: Lv.2" 180 down')
  970.         else
  971.                 send_command('timers delete "Aeonic Aftermath: Lv.2"')
  972.                 add_to_chat(123,'Sequence AM2: [OFF]')
  973.                 end    
  974.         elseif buff_table['id'] == 434 then -- Brew Timer --
  975.         if gain then
  976.                 send_command('timers create "Transcendency" 180 down')
  977.         else
  978.                 send_command('timers delete "Transcendency"')
  979.                 add_to_chat(123,'Transcendency: [OFF]')
  980.                 end            
  981.         elseif buff_table['id'] == 1 then -- Weakness Timer --
  982.         if gain then
  983.                 send_command('timers create "Weakness" 300 up')
  984.         else
  985.                 send_command('timers delete "Weakness"')
  986.                 add_to_chat(158,'Weakness: [OFF]')
  987.                 end
  988.         elseif buff_table['id'] == 15 then -- Doom Party Chat --
  989.         if gain then
  990.                 send_command('input /party Doom')
  991.         else
  992.                 send_command('input /party Doom off')
  993.                 add_to_chat(158,'Doom: [OFF]')
  994.                 end
  995.         elseif buff_table['id'] == 9 then -- Curse Party Chat --
  996.         if gain then
  997.                 send_command('input /party Curse')
  998.         else
  999.                 add_to_chat(158,'Curse: [OFF]')
  1000.                 end
  1001.         elseif buff_table['id'] == 14 or buff_table['id'] == 17 then -- Charm Party Chat --
  1002.         if gain then
  1003.                 send_command('input /party Charmed')
  1004.         else
  1005.                 send_command('input /party Charm off')
  1006.                 add_to_chat(158,'Charm: [OFF]')
  1007.                 end
  1008.         elseif buff_table['id'] == 4 then -- Paralysis --
  1009.         if gain then
  1010.                 add_to_chat(123,'Paralyzed!')
  1011.         else
  1012.                 add_to_chat(158,'Paralysis: [OFF]')
  1013.                 end            
  1014.         elseif buff_table['id'] == 50 then -- Invincible --
  1015.         if not gain then
  1016.                 add_to_chat(123,'Invincible: [OFF]')
  1017.                 end    
  1018.         elseif buff_table['id'] == 57 then -- Defender --
  1019.         if not gain then
  1020.                 add_to_chat(123,'Defender: [OFF]')
  1021.                 end  
  1022.                 elseif buff_table['id'] == 62 then -- Sentinel --
  1023.         if not gain then
  1024.                 add_to_chat(123,'Sentinel: [OFF]')
  1025.                 end  
  1026.         elseif buff_table['id'] == 114 then -- Cover --
  1027.         if not gain then
  1028.                 add_to_chat(123,'Cover: [OFF]')
  1029.                 end  
  1030.         elseif buff_table['id'] == 344 then -- Fealty --
  1031.         if not gain then
  1032.                 add_to_chat(123,'Fealty: [OFF]')
  1033.                 end  
  1034.         elseif buff_table['id'] == 478 then -- Palisade --
  1035.         if not gain then
  1036.                 add_to_chat(123,'Palisade: [OFF]')
  1037.                 end  
  1038.         elseif buff_table['id'] == 93 then -- Cocoon Notification --
  1039.         if not gain then
  1040.                 add_to_chat(123,'Cocoon: [OFF]')
  1041.                 end    
  1042.         elseif buff_table['id'] == 33 then -- Haste --
  1043.         if not gain then
  1044.                 add_to_chat(123,'Haste: [OFF]')
  1045.                 end    
  1046.         elseif buff_table['id'] == 149 then -- Defense Down --
  1047.         if not gain then
  1048.                 add_to_chat(158,'Defense Down: [OFF]')
  1049.                 end    
  1050.         elseif buff_table['id'] == 13  then    -- Slow --
  1051.         if gain then
  1052.                 add_to_chat(123,'Slowed!')
  1053.                 else
  1054.                 add_to_chat(158,'Slow: [OFF]')
  1055.                 end
  1056.         elseif buff_table['id'] == 40 then -- Protect --
  1057.         if not gain then
  1058.                 add_to_chat(123,'Protect: [OFF]')
  1059.                 end  
  1060.         elseif buff_table['id'] == 41 then -- Shell --
  1061.         if not gain then
  1062.                 add_to_chat(123,'Shell: [OFF]')
  1063.                 end  
  1064.         elseif buff_table['id'] == 43 then -- Refresh --
  1065.         if not gain then
  1066.                 add_to_chat(123,'Refresh: [OFF]')
  1067.                 end    
  1068.         elseif buff_table['id'] == 116 then -- Phalanx --
  1069.         if not gain then
  1070.                 add_to_chat(123,'Phalanx: [OFF]')
  1071.                 end    
  1072.         elseif buff_table['id'] == 274 then -- EnLight --
  1073.         if not gain then
  1074.                 add_to_chat(123,'EnLight: [OFF]')
  1075.                 end  
  1076.         elseif buff_table['id'] == 289 then -- Crusade --
  1077.         if not gain then
  1078.                 add_to_chat(123,'Crusade: [OFF]')
  1079.                 end  
  1080.         elseif buff_table['id'] == 403 then -- Reprisal --
  1081.         if not gain then
  1082.                 add_to_chat(123,'Reprisal: [OFF]')
  1083.                 end  
  1084.         elseif buff_table['id'] == 251 then -- Food --
  1085.         if not gain then
  1086.                 add_to_chat(123,'Food: [OFF]')
  1087.                 end
  1088.         elseif buff_table['id'] == 28 then -- Terror --
  1089.         if not gain then
  1090.                 add_to_chat(158,'Terror: [OFF]')
  1091.                 end
  1092.         elseif buff_table['id'] == 10 then -- Stun --
  1093.         if not gain then
  1094.                 add_to_chat(158,'Stun: [OFF]')
  1095.                 end    
  1096.         elseif buff_table['id'] == 16 then -- Amnesia --
  1097.         if not gain then
  1098.                 add_to_chat(158,'Amnesia: [OFF]')
  1099.                 end                
  1100.         elseif buff_table['id'] == 2 or buff_table['id'] == 19 then -- Sleep --
  1101.         if gain then
  1102.                 send_command('input /party ZZZ')
  1103.         else
  1104.                 add_to_chat(158,'Sleep: [OFF]')
  1105.                 end        
  1106.         end
  1107.  
  1108.         if buffactive.Terror or buffactive.Stun or buffactive.Petrification or buffactive.Sleep and gain then -- Lock PDT When You Are Terrorised/Stunned/Petrified/Slept --
  1109.                 equip({
  1110.             ammo="Staunch Tathlum",
  1111.             head="Chevalier's Armet +1",
  1112.             neck="Loricate Torque +1",
  1113.             ear1="Ethereal Earring",
  1114.             ear2="Odnowa Earring +1",
  1115.             body="Rev. Surcoat +2",
  1116.             hands="Souv. Handsch. +1",
  1117.             ring1="Moonbeam Ring",
  1118.             ring2="Moonbeam Ring",
  1119.             back="Moonbeam Cape",
  1120.             waist="Flume Belt +1",
  1121.             legs="Souv. Diechlings +1",
  1122.             feet="Souveran Schuhs +1"})
  1123.         else
  1124.         if not midaction() then
  1125.                 status_change(player.status)
  1126.                 end
  1127.     end
  1128. end
  1129.  
  1130. -------------------------------------------------------------------------------------
  1131. -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
  1132. -------------------------------------------------------------------------------------
  1133.  
  1134. function self_command(command)
  1135.     if command == 'acc' then -- Accuracy Level Toggle --
  1136.         AccIndex = (AccIndex % #AccArray) + 1
  1137.         status_change(player.status)
  1138.         add_to_chat(155,'Accuracy Level: '..AccArray[AccIndex])
  1139.     elseif command == 'update' then -- Auto Update Gear Toggle --
  1140.         status_change(player.status)
  1141.         add_to_chat(155,'-[Gear Update]-')
  1142.         add_to_chat(155,'Shield Type: '..ShieldArray[ShieldIndex])
  1143.         add_to_chat(155,'Accuracy Level: '..AccArray[AccIndex])
  1144.     elseif command == 'shield' then -- Shield Type Toggle --
  1145.         ShieldIndex = (ShieldIndex % #ShieldArray) + 1
  1146.         status_change(player.status)
  1147.         add_to_chat(158,'Shield Type: '..ShieldArray[ShieldIndex])
  1148.     elseif command == 'hybrid' then -- Hybrid Toggle --
  1149.         if Armor == 'Hybrid' then
  1150.             Armor = 'None'
  1151.             add_to_chat(123,'Hybrid Set: [Unlocked]')
  1152.         else
  1153.             Armor = 'Hybrid'
  1154.             add_to_chat(158,'Hybrid Set: '..AccArray[AccIndex])
  1155.         end
  1156.         status_change(player.status)
  1157.     elseif command == 'pdt' then -- PDT Toggle --
  1158.         if Armor == 'PDT' then
  1159.             Armor = 'None'
  1160.             add_to_chat(123,'PDT Set: [Unlocked]')
  1161.         else
  1162.             Armor = 'PDT'
  1163.             add_to_chat(158,'PDT Set: [Locked]')
  1164.         end
  1165.         status_change(player.status)
  1166.     elseif command == 'mdt' then -- MDT Toggle --
  1167.         if Armor == 'MDT' then
  1168.             Armor = 'None'
  1169.             add_to_chat(123,'MDT Set: [Unlocked]')
  1170.         else
  1171.             Armor = 'MDT'
  1172.             add_to_chat(158,'MDT Set: [Locked]')
  1173.         end
  1174.         status_change(player.status)
  1175.     elseif command == 'kiting' then -- Kiting Toggle --
  1176.         if Armor == 'Kiting' then
  1177.             Armor = 'None'
  1178.             add_to_chat(123,'Kiting Set: [Unlocked]')
  1179.         else
  1180.             Armor = 'Kiting'
  1181.             add_to_chat(158,'Kiting Set: [Locked]')
  1182.         end
  1183.         status_change(player.status)
  1184.     elseif command == 'dt' then -- DT Toggle --
  1185.         if Armor == 'DT' then
  1186.             Armor = 'None'
  1187.             add_to_chat(123,'DT Set: [Unlocked]')
  1188.         else
  1189.             Armor = 'DT'
  1190.             add_to_chat(158,'DT Set: [Locked]')
  1191.         end
  1192.         status_change(player.status)
  1193.     elseif command == 'twilight' then -- Twilight Toggle --
  1194.         if Twilight == 'Twilight' then
  1195.             Twilight = 'None'
  1196.             add_to_chat(123,'Twilight Set: [Unlocked]')
  1197.         else
  1198.             Twilight = 'Twilight'
  1199.             add_to_chat(158,'Twilight Set: [locked]')
  1200.         end
  1201.         status_change(player.status)
  1202.     elseif command == 'C8' then -- Distance Toggle --
  1203.         if player.target.distance then
  1204.             target_distance = math.floor(player.target.distance*10)/10
  1205.             add_to_chat(158,'Distance: '..target_distance)
  1206.         else
  1207.             add_to_chat(123,'No Target Selected')
  1208.         end
  1209.     elseif command == 'idle' then -- Idle Toggle --
  1210.         IdleIndex = (IdleIndex % #IdleArray) + 1
  1211.         status_change(player.status)
  1212.         add_to_chat(155,'Idle Set: '..IdleArray[IdleIndex])
  1213.     elseif command == 'TP' then
  1214.         add_to_chat(155,'TP Return: ['..tostring(player.tp)..']')
  1215.     elseif command:match('^SC%d$') then
  1216.         send_command('//' .. sc_map[command])
  1217.     end
  1218. end
  1219.         -----------
  1220.         -- Misc. --
  1221.         -----------
  1222.  
  1223. function actualCost(originalCost)
  1224.     if buffactive["Penury"] then
  1225.         return originalCost*.5
  1226.     elseif buffactive["Light Arts"] or buffactive["Addendum: White"] then
  1227.         return originalCost*.9
  1228.     elseif buffactive["Dark Arts"] or buffactive["Addendum: Black"] then
  1229.         return originalCost*1.1
  1230.     else
  1231.         return originalCost
  1232.     end
  1233. end
  1234.  
  1235. function degrade_spell(spell,degrade_array)
  1236.     spell_index = table.find(degrade_array,spell.name)
  1237.     if spell_index > 1 then
  1238.         new_spell = degrade_array[spell_index - 1]
  1239.         change_spell(new_spell,spell.target.raw)
  1240.         add_to_chat(8,spell.name..' Canceled: ['..player.mp..'/'..player.max_mp..'MP::'..player.mpp..'%] Casting '..new_spell..' instead.')
  1241.     end
  1242. end
  1243.  
  1244. function change_spell(spell_name,target)
  1245.     cancel_spell()
  1246.     send_command('//'..spell_name..' '..target)
  1247. end
Advertisement
Add Comment
Please, Sign In to add comment