Advertisement
Arnan

PLD Lua October 2017

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