SHARE
TWEET

Archaide MNK lua, January 2020

Archaide Jan 29th, 2020 651 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.         ------------------------------------------------------
  3.         -- *** Archaide's Monk Gearswap Lua File *** --
  4.         ------------------------------------------------------
  5.                
  6.             -- Commands --
  7.                
  8.                 -- In Game: //gs c, Macro: /console gs c, Bind: gs c --
  9.            
  10.                 -- F9 -- gs c weapon      Toggle Weapon
  11.                 -- F10 - gs c pdt         -DT on/off
  12.                 -- !F10 - gs c counter    Counter on/off
  13.                 -- F11 - gs c acc         Toggle accuracy tier for TP/WS
  14.                 -- F12 - gs c idle        Toggle idle sets
  15.                
  16.                 -- gs c hybrid            Hybrid on/off (no shortcut for these 2)
  17.                 -- gs c kiting            Kiting on/off
  18.  
  19. function get_sets()
  20.     AccIndex = 1
  21.     AccArray = {"LowACC","MidACC","HighACC",}  
  22.     WeaponIndex = 1
  23.     WeaponArray = {"Godhands","Verethragna",}--"MalignancePole"}
  24.     IdleIndex = 1
  25.     IdleArray = {"Town","Regen","DT"}
  26.     Armor = 'None'
  27.     Samurai_Roll = 'ON' -- Set Default SAM Roll ON or OFF Here --
  28.     target_distance = 6 -- Set Default Distance Here --
  29.     send_command('input /macro book 9;wait .1;input /macro set 1') -- Change Default Macro Book
  30.     add_to_chat(158,'-[Archaides Monk Lua Loaded]-')
  31.     add_to_chat(155,'Weapon: '..WeaponArray[WeaponIndex])
  32.     add_to_chat(155,'Accuracy Level: ' .. AccArray[AccIndex])
  33.     add_to_chat(155,'Idle Set: ' .. IdleArray[IdleIndex])
  34.  
  35.     StartLockStyle = '54'
  36.     send_command('wait 3;input /lockstyleset '..StartLockStyle)
  37.    
  38.     -- Key Binds --
  39.     send_command('bind F9 gs c weapon')
  40.     send_command('bind F10 gs c pdt')
  41.     send_command('bind !F10 gs c counter')
  42.     send_command('bind F11 gs c acc')
  43.     send_command('bind F12 gs c idle')
  44.     send_command('bind ` input //send @others /follow Archaide')
  45.     send_command('bind Delete input /ws "Victory Smite" <t>')
  46.     send_command('bind End input /ws "Raging Fist/s" <t>')
  47.     send_command('bind PageDown input /ws "Howling Fist" <t>')
  48.     send_command('bind Home input /ws "Ascetic/s Fury" <t>')
  49.     send_command('bind PageUp input /ws "Tornado Kick" <t>')
  50.     function file_unload()
  51.     send_command('unbind F9')
  52.     send_command('unbind F10')
  53.     send_command('unbind !F10')
  54.     send_command('unbind F11')
  55.     send_command('unbind F12')
  56.     send_command('unbind `')
  57.     send_command('unbind Delete')
  58.     send_command('unbind End')
  59.     send_command('unbind PageDown')
  60.     send_command('unbind Home')
  61.     send_command('unbind PageUp')
  62.     end
  63.  
  64.     ---------------
  65.     -- Idle Sets --    
  66.     ---------------
  67.  
  68.     sets.Idle = {
  69.             ammo="Aurgelmir Orb",
  70.             head={ name="Adhemar Bonnet +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
  71.             body="Ken. Samue +1",
  72.             hands={ name="Adhemar Wrist. +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
  73.             legs="Ken. Hakama +1",
  74.             feet="Herald's Gaiters",
  75.             neck={ name="Mnk. Nodowa +2", augments={'Path: A',}},
  76.             waist="Moonbow Belt",
  77.             left_ear="Odr Earring",
  78.             right_ear="Sherida Earring",
  79.             left_ring="Dim. Ring (Dem)",
  80.             right_ring="Warp Ring",
  81.             back={ name="Segomo's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10','Damage taken-5%',}},}
  82.    
  83.     -- Town Idle Set --
  84.     sets.Idle.Town = set_combine(sets.Idle,{
  85.             ammo="Aurgelmir Orb",
  86.             head={ name="Adhemar Bonnet +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
  87.             body="Ken. Samue +1",
  88.             hands={ name="Adhemar Wrist. +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
  89.             legs="Ken. Hakama +1",
  90.             feet="Herald's Gaiters",
  91.             neck={ name="Mnk. Nodowa +2", augments={'Path: A',}},
  92.             waist="Moonbow Belt",
  93.             left_ear="Odr Earring",
  94.             right_ear="Sherida Earring",
  95.             left_ring="Dim. Ring (Dem)",
  96.             right_ring="Warp Ring",
  97.             back={ name="Segomo's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10','Damage taken-5%',}},})
  98.     sets.Idle.Town.Godhands = set_combine(sets.Idle.Town,{
  99.             main="Godhands"})
  100.     sets.Idle.Town.Godhands.SAM = set_combine(sets.Idle.Town,{
  101.             main="Godhands"})
  102.     sets.Idle.Town.MalignancePole = set_combine(sets.Idle.Town,{
  103.             main="Malignance Pole",
  104.             sub="Bloodrain Strap"})
  105.     sets.Idle.Town.MalignancePole.SAM = set_combine(sets.Idle.Town,{
  106.             main="Malignance Pole",
  107.             sub="Bloodrain Strap"})
  108.     sets.Idle.Town.Verethragna = set_combine(sets.Idle.Town,{
  109.             main="Verethragna"})
  110.     sets.Idle.Town.Verethragna.SAM = set_combine(sets.Idle.Town,{
  111.             main="Verethragna"})
  112.            
  113.     -- Regen Idle Set --
  114.     sets.Idle.Regen = set_combine(sets.Idle,{
  115.             ammo="Staunch Tathlum +1",
  116.             head="Malignance Chapeau",
  117.             body="Hiza. Haramaki +2",
  118.             hands="Malignance Gloves",
  119.             legs="Mummu Kecks +2",
  120.             feet="Herald's Gaiters",
  121.             neck="Bathy Choker +1",
  122.             waist="Moonbow Belt +1",
  123.             left_ear="Telos Earring",
  124.             right_ear="Etiolation Earring",
  125.             left_ring="Chirich Ring +1",
  126.             right_ring="Defending Ring",
  127.             back={ name="Segomo's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10','Damage taken-5%',}},})
  128.     sets.Idle.Regen.Godhands = set_combine(sets.Idle.Regen,{
  129.             main="Godhands"})
  130.     sets.Idle.Regen.Godhands.SAM = set_combine(sets.Idle.Regen,{
  131.             main="Godhands"})
  132.     sets.Idle.Regen.MalignancePole = set_combine(sets.Idle.Regen,{
  133.             main="Malignance Pole",
  134.             sub="Bloodrain Strap"})
  135.     sets.Idle.Regen.MalignancePole.SAM = set_combine(sets.Idle.Regen,{
  136.             main="Malignance Pole",
  137.             sub="Bloodrain Strap"})
  138.     sets.Idle.Regen.Verethragna = set_combine(sets.Idle.Regen,{
  139.             main="Verethragna"})
  140.     sets.Idle.Regen.Verethragna.SAM = set_combine(sets.Idle.Regen,{
  141.             main="Verethragna"})
  142.  
  143.     -- Damage Taken Idle Set --
  144.     sets.Idle.DT = set_combine(sets.Idle,{
  145.             ammo="Staunch Tathlum +1",
  146.             head="Malignance Chapeau",
  147.             body="Hiza. Haramaki +2",
  148.             hands="Malignance Gloves",
  149.             legs="Mummu Kecks +2",
  150.             feet="Herald's Gaiters",
  151.             neck="Loricate Torque +1",
  152.             waist="Moonbow Belt +1",
  153.             left_ear="Telos Earring",
  154.             right_ear="Etiolation Earring",
  155.             left_ring="Chirich Ring +1",
  156.             right_ring="Defending Ring",
  157.             back={ name="Segomo's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10','Damage taken-5%',}},})
  158.     sets.Idle.DT.Godhands = set_combine(sets.Idle.DT,{
  159.             main="Godhands"})
  160.     sets.Idle.DT.Godhands.SAM = set_combine(sets.Idle.DT,{
  161.             main="Godhands"})
  162.     sets.Idle.DT.MalignancePole = set_combine(sets.Idle.DT,{
  163.             main="Malignance Pole",
  164.             sub="Bloodrain Strap"})
  165.     sets.Idle.DT.MalignancePole.SAM = set_combine(sets.Idle.DT,{
  166.             main="Malignance Pole",
  167.             sub="Bloodrain Strap"})
  168.     sets.Idle.DT.Verethragna = set_combine(sets.Idle.DT,{
  169.             main="Verethragna"})
  170.     sets.Idle.DT.Verethragna.SAM = set_combine(sets.Idle.DT,{
  171.             main="Verethragna"})
  172.  
  173.     ------------------    
  174.     -- Base TP Sets --    
  175.     ------------------    
  176.     sets.TP= {
  177.             ammo="Aurgelmir Orb",
  178.             head={ name="Adhemar Bonnet +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
  179.             body="Ken. Samue +1",
  180.             hands={ name="Adhemar Wrist. +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
  181.             legs="Ken. Hakama +1",
  182.             feet="Ken. Sune-Ate +1",
  183.             neck={ name="Mnk. Nodowa +2", augments={'Path: A',}},
  184.             waist="Moonbow Belt +1",
  185.             left_ear="Telos Earring",
  186.             right_ear="Sherida Earring",
  187.             left_ring="Niqmaddu Ring",
  188.             right_ring="Gere Ring",
  189.             back={ name="Segomo's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10','Damage taken-5%',}},}
  190.     sets.TP.MidACC = set_combine(sets.TP,{})
  191.     sets.TP.HighACC = set_combine(sets.TP.MidACC,{})
  192.  
  193.     -- (High Haste) TP Sets --
  194.     sets.TP.HighHaste = set_combine(sets.TP,{})
  195.     sets.TP.MidACC.HighHaste = set_combine(sets.TP.MidACC,{})
  196.     sets.TP.HighACC.HighHaste = set_combine(sets.TP.HighACC,{})
  197.    
  198.     --------------
  199.     -- Godhands --
  200.     --------------
  201.    
  202.     -- Godhands TP Sets --
  203.     sets.TP.Godhands = set_combine(sets.TP,{
  204.             main="Godhands"})
  205.     sets.TP.Godhands.MidACC = set_combine(sets.TP.MidACC,{
  206.             main="Godhands"})
  207.     sets.TP.Godhands.HighACC = set_combine(sets.TP.HighACC,{
  208.             main="Godhands"})
  209.  
  210.     -- Godhands(High Haste) TP Sets --
  211.     sets.TP.Godhands.HighHaste = set_combine(sets.TP.Godhands,{})
  212.     sets.TP.Godhands.MidACC.HighHaste = set_combine(sets.TP.Godhands.MidACC,{})
  213.     sets.TP.Godhands.HighACC.HighHaste = set_combine(sets.TP.Godhands.HighACC,{})
  214.  
  215.     -- Godhands(SAM Roll) TP Sets --
  216.     sets.TP.Godhands.STP = set_combine(sets.TP,{
  217.             main="Godhands"})
  218.     sets.TP.Godhands.MidACC.STP = set_combine(sets.TP.MidACC,{
  219.             main="Godhands"})
  220.     sets.TP.Godhands.HighACC.STP = set_combine(sets.TP.HighACC,{
  221.             main="Godhands"})
  222.  
  223.     -- Godhands(High Haste + SAM Roll) TP Sets --
  224.     sets.TP.Godhands.HighHaste.STP = set_combine(sets.TP.HighHaste,{
  225.             main="Godhands"})
  226.     sets.TP.Godhands.MidACC.HighHaste.STP = set_combine(sets.TP.MidACC.HighHaste,{
  227.             main="Godhands"})
  228.     sets.TP.Godhands.HighACC.HighHaste.STP = set_combine(sets.TP.HighACC.HighHaste,{
  229.             main="Godhands"})
  230.  
  231.     -- Godhands /SAM TP Sets --
  232.     sets.TP.Godhands.SAM = set_combine(sets.TP,{
  233.             main="Godhands"})
  234.     sets.TP.Godhands.SAM.MidACC = set_combine(sets.TP.MidACC,{
  235.             main="Godhands"})
  236.     sets.TP.Godhands.SAM.HighACC = set_combine(sets.TP.HighACC,{
  237.             main="Godhands"})
  238.  
  239.     -- Godhands(High Haste) /SAM TP Sets --
  240.     sets.TP.Godhands.SAM.HighHaste = set_combine(sets.TP.Godhands.SAM,{})
  241.     sets.TP.Godhands.SAM.MidACC.HighHaste = set_combine(sets.TP.Godhands.SAM.MidACC,{})
  242.     sets.TP.Godhands.SAM.HighACC.HighHaste = set_combine(sets.TP.Godhands.SAM.HighACC,{})
  243.  
  244.     -- Godhands(SAM Roll) /SAM TP Sets --
  245.     sets.TP.Godhands.SAM.STP = set_combine(sets.TP,{
  246.             main="Godhands"})
  247.     sets.TP.Godhands.SAM.MidACC.STP = set_combine(sets.TP.MidACC,{
  248.             main="Godhands"})
  249.     sets.TP.Godhands.SAM.HighACC.STP = set_combine(sets.TP.HighACC,{
  250.             main="Godhands"})
  251.  
  252.     -- Godhands(High Haste + SAM Roll) /SAM TP Sets --
  253.     sets.TP.Godhands.SAM.HighHaste.STP = set_combine(sets.TP.HighHaste,{
  254.             main="Godhands"})
  255.     sets.TP.Godhands.SAM.MidACC.HighHaste.STP = set_combine(sets.TP.MidACC.HighHaste,{
  256.             main="Godhands"})
  257.     sets.TP.Godhands.SAM.HighACC.HighHaste.STP = set_combine(sets.TP.HighACC.HighHaste,{
  258.             main="Godhands"})
  259.            
  260.     ------------------
  261.     -- Godhands Imp --
  262.     ------------------
  263.    
  264.     -- Godhands Imp TP Sets --
  265.     sets.TP.Godhands.Imp = {
  266.             main="Godhands",
  267.             ammo="Aurgelmir Orb",
  268.             head={ name="Adhemar Bonnet +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
  269.             body="Bhikku Cyclas +1",
  270.             hands={ name="Adhemar Wrist. +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
  271.             legs="Ken. Hakama +1",
  272.             feet="Ken. Sune-Ate +1",
  273.             neck={ name="Mnk. Nodowa +2", augments={'Path: A',}},
  274.             waist="Moonbow Belt +1",
  275.             left_ear="Telos Earring",
  276.             right_ear="Sherida Earring",
  277.             left_ring="Niqmaddu Ring",
  278.             right_ring="Gere Ring",
  279.             back={ name="Segomo's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10','Damage taken-5%',}},}
  280.     sets.TP.Godhands.MidACC.Imp = set_combine(sets.TP.Godhands.Imp,{})
  281.     sets.TP.Godhands.HighACC.Imp = set_combine(sets.TP.Godhands.Imp.MidACC,{})
  282.                    
  283.     -- Godhands High Haste TP Sets --
  284.     sets.TP.Godhands.Imp.HighHaste = set_combine(sets.TP.Godhands.Imp,{})
  285.     sets.TP.Godhands.MidACC.Imp.HighHaste = set_combine(sets.TP.Godhands.MidACC.Imp,{})
  286.     sets.TP.Godhands.HighACC.Imp.HighHaste = set_combine(sets.TP.Godhands.HighACC.Imp,{})
  287.  
  288.     -- Godhands SAM Roll TP Sets --
  289.     sets.TP.Godhands.Imp.STP = set_combine(sets.TP.Godhands.Imp,{})
  290.     sets.TP.Godhands.MidACC.Imp.STP = set_combine(sets.TP.Godhands.MidACC.Imp,{})
  291.     sets.TP.Godhands.HighACC.Imp.STP = set_combine(sets.TP.Godhands.HighACC.Imp,{})
  292.  
  293.     -- Godhands High Haste + SAM Roll TP Sets --
  294.     sets.TP.Godhands.Imp.HighHaste.STP = set_combine(sets.TP.Godhands.HighHaste.Imp,{})
  295.     sets.TP.Godhands.MidACC.Imp.HighHaste.STP = set_combine(sets.TP.Godhands.MidACC.HighHaste.Imp,{})
  296.     sets.TP.Godhands.HighACC.Imp.HighHaste.STP = set_combine(sets.TP.Godhands.HighACC.HighHaste.Imp,{})
  297.  
  298.     -- Godhands /SAM TP Sets --
  299.     sets.TP.Godhands.SAM.Imp = set_combine(sets.TP.Godhands.Imp,{})
  300.     sets.TP.Godhands.SAM.MidACC.Imp = set_combine(sets.TP.Godhands.MidACC.Imp,{})
  301.     sets.TP.Godhands.SAM.HighACC.Imp = set_combine(sets.TP.Godhands.HighACC.Imp,{})
  302.  
  303.     -- Godhands High Haste /SAM TP Sets --
  304.     sets.TP.Godhands.SAM.Imp.HighHaste = set_combine(sets.TP.Godhands.Imp,{})
  305.     sets.TP.Godhands.SAM.MidACC.Imp.HighHaste = set_combine(sets.TP.Godhands.MidACC.Imp,{})
  306.     sets.TP.Godhands.SAM.HighACC.Imp.HighHaste = set_combine(sets.TP.Godhands.HighACC.Imp,{})
  307.  
  308.     -- Godhands SAM Roll /SAM TP Sets --
  309.     sets.TP.Godhands.SAM.Imp.STP = set_combine(sets.TP.Godhands.Imp,{})
  310.     sets.TP.Godhands.SAM.MidACC.Imp.STP = set_combine(sets.TP.Godhands.MidACC.Imp,{})
  311.     sets.TP.Godhands.SAM.HighACC.Imp.STP = set_combine(sets.TP.Godhands.HighACC.Imp,{})
  312.  
  313.     -- Godhands High Haste + SAM Roll /SAM TP Sets --
  314.     sets.TP.Godhands.SAM.Imp.HighHaste.STP = set_combine(sets.TP.Godhands.Imp,{})
  315.     sets.TP.Godhands.SAM.MidACC.Imp.HighHaste.STP = set_combine(sets.TP.Godhands.MidACC.Imp,{})
  316.     sets.TP.Godhands.SAM.HighACC.Imp.HighHaste.STP = set_combine(sets.TP.Godhands.HighACC.Imp,{})
  317.    
  318.     -----------------
  319.     -- Verethragna --
  320.     -----------------
  321.    
  322.     -- Verethragna TP Sets --
  323.     sets.TP.Verethragna = set_combine(sets.TP,{        
  324.             main="Verethragna"})
  325.     sets.TP.Verethragna.MidACC = set_combine(sets.TP.MidACC,{
  326.             main="Verethragna"})
  327.     sets.TP.Verethragna.HighACC = set_combine(sets.TP.HighACC,{
  328.             main="Verethragna"})
  329.  
  330.     -- Verethragna High Haste TP Sets --
  331.     sets.TP.Verethragna.HighHaste = set_combine(sets.TP.Verethragna,{})
  332.     sets.TP.Verethragna.MidACC.HighHaste = set_combine(sets.TP.Verethragna.MidACC,{})
  333.     sets.TP.Verethragna.HighACC.HighHaste = set_combine(sets.TP.Verethragna.HighACC,{})
  334.  
  335.     -- Verethragna SAM Roll TP Sets --
  336.     sets.TP.Verethragna.STP = set_combine(sets.TP.Verethragna,{
  337.             main="Verethragna"})
  338.     sets.TP.Verethragna.MidACC.STP = set_combine(sets.TP.Verethragna.MidACC,{
  339.             main="Verethragna"})
  340.     sets.TP.Verethragna.HighACC.STP = set_combine(sets.TP.Verethragna.HighACC,{
  341.             main="Verethragna"})
  342.  
  343.     -- Verethragna High Haste + SAM Roll TP Sets --
  344.     sets.TP.Verethragna.HighHaste.STP = set_combine(sets.TP.HighHaste,{
  345.             main="Verethragna"})
  346.     sets.TP.Verethragna.MidACC.HighHaste.STP = set_combine(sets.TP.MidACC.HighHaste,{
  347.             main="Verethragna"})
  348.     sets.TP.Verethragna.HighACC.HighHaste.STP = set_combine(sets.TP.HighACC.HighHaste,{
  349.             main="Verethragna"})
  350.  
  351.     -- Verethragna /SAM TP Sets --
  352.     sets.TP.Verethragna.SAM = set_combine(sets.TP.Verethragna,{
  353.             main="Verethragna"})
  354.     sets.TP.Verethragna.SAM.MidACC = set_combine(sets.TP.Verethragna.MidACC,{
  355.             main="Verethragna"})
  356.     sets.TP.Verethragna.SAM.HighACC = set_combine(sets.TP.Verethragna.HighACC,{
  357.             main="Verethragna"})
  358.  
  359.     -- Verethragna High Haste /SAM TP Sets --
  360.     sets.TP.Verethragna.SAM.HighHaste = set_combine(sets.TP.Verethragna.SAM,{})
  361.     sets.TP.Verethragna.SAM.MidACC.HighHaste = set_combine(sets.TP.Verethragna.SAM.MidACC,{})
  362.     sets.TP.Verethragna.SAM.HighACC.HighHaste = set_combine(sets.TP.Verethragna.SAM.HighACC,{})
  363.  
  364.     -- Verethragna SAM Roll /SAM TP Sets --
  365.     sets.TP.Verethragna.SAM.STP = set_combine(sets.TP,{
  366.             main="Verethragna"})
  367.     sets.TP.Verethragna.SAM.MidACC.STP = set_combine(sets.TP.MidACC,{
  368.             main="Verethragna"})
  369.     sets.TP.Verethragna.SAM.HighACC.STP = set_combine(sets.TP.HighACC,{
  370.             main="Verethragna"})
  371.  
  372.     -- Verethragna High Haste + SAM Roll /SAM TP Sets --
  373.     sets.TP.Verethragna.SAM.HighHaste.STP = set_combine(sets.TP.HighHaste,{
  374.             main="Verethragna"})
  375.     sets.TP.Verethragna.SAM.MidACC.HighHaste.STP = set_combine(sets.TP.MidACC.HighHaste,{
  376.             main="Verethragna"})
  377.     sets.TP.Verethragna.SAM.HighACC.HighHaste.STP = set_combine(sets.TP.HighACC.HighHaste,{
  378.             main="Verethragna"})
  379.            
  380.     ---------------------
  381.     -- Verethragna Imp --
  382.     ---------------------
  383.    
  384.     -- Verethragna Imp TP Sets --
  385.     sets.TP.Verethragna.Imp = {
  386.             main="Verethragna",
  387.             ammo="Aurgelmir Orb",
  388.             head={ name="Adhemar Bonnet +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
  389.             body="Bhikku Cyclas +1",
  390.             hands={ name="Adhemar Wrist. +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
  391.             legs="Ken. Hakama +1",
  392.             feet="Ken. Sune-Ate +1",
  393.             neck={ name="Mnk. Nodowa +2", augments={'Path: A',}},
  394.             waist="Moonbow Belt +1",
  395.             left_ear="Telos Earring",
  396.             right_ear="Sherida Earring",
  397.             left_ring="Niqmaddu Ring",
  398.             right_ring="Gere Ring",
  399.             back={ name="Segomo's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10','Damage taken-5%',}},}
  400.     sets.TP.Verethragna.MidACC.Imp = set_combine(sets.TP.Verethragna.Imp,{})
  401.     sets.TP.Verethragna.HighACC.Imp = set_combine(sets.TP.Verethragna.Imp.MidACC,{})
  402.                    
  403.     -- Verethragna High Haste TP Sets --
  404.     sets.TP.Verethragna.Imp.HighHaste = set_combine(sets.TP.Verethragna.Imp,{})
  405.     sets.TP.Verethragna.MidACC.Imp.HighHaste = set_combine(sets.TP.Verethragna.MidACC.Imp,{})
  406.     sets.TP.Verethragna.HighACC.Imp.HighHaste = set_combine(sets.TP.Verethragna.HighACC.Imp,{})
  407.  
  408.     -- Verethragna SAM Roll TP Sets --
  409.     sets.TP.Verethragna.Imp.STP = set_combine(sets.TP.Verethragna.Imp,{})
  410.     sets.TP.Verethragna.MidACC.Imp.STP = set_combine(sets.TP.Verethragna.MidACC.Imp,{})
  411.     sets.TP.Verethragna.HighACC.Imp.STP = set_combine(sets.TP.Verethragna.HighACC.Imp,{})
  412.  
  413.     -- Verethragna High Haste + SAM Roll TP Sets --
  414.     sets.TP.Verethragna.Imp.HighHaste.STP = set_combine(sets.TP.Verethragna.HighHaste.Imp,{})
  415.     sets.TP.Verethragna.MidACC.Imp.HighHaste.STP = set_combine(sets.TP.Verethragna.MidACC.HighHaste.Imp,{})
  416.     sets.TP.Verethragna.HighACC.Imp.HighHaste.STP = set_combine(sets.TP.Verethragna.HighACC.HighHaste.Imp,{})
  417.  
  418.     -- Verethragna /SAM TP Sets --
  419.     sets.TP.Verethragna.SAM.Imp = set_combine(sets.TP.Verethragna.Imp,{})
  420.     sets.TP.Verethragna.SAM.MidACC.Imp = set_combine(sets.TP.Verethragna.MidACC.Imp,{})
  421.     sets.TP.Verethragna.SAM.HighACC.Imp = set_combine(sets.TP.Verethragna.HighACC.Imp,{})
  422.  
  423.     -- Verethragna High Haste /SAM TP Sets --
  424.     sets.TP.Verethragna.SAM.Imp.HighHaste = set_combine(sets.TP.Verethragna.Imp,{})
  425.     sets.TP.Verethragna.SAM.MidACC.Imp.HighHaste = set_combine(sets.TP.Verethragna.MidACC.Imp,{})
  426.     sets.TP.Verethragna.SAM.HighACC.Imp.HighHaste = set_combine(sets.TP.Verethragna.HighACC.Imp,{})
  427.  
  428.     -- Verethragna SAM Roll /SAM TP Sets --
  429.     sets.TP.Verethragna.SAM.Imp.STP = set_combine(sets.TP.Verethragna.Imp,{})
  430.     sets.TP.Verethragna.SAM.MidACC.Imp.STP = set_combine(sets.TP.Verethragna.MidACC.Imp,{})
  431.     sets.TP.Verethragna.SAM.HighACC.Imp.STP = set_combine(sets.TP.Verethragna.HighACC.Imp,{})
  432.  
  433.     -- Verethragna High Haste + SAM Roll /SAM TP Sets --
  434.     sets.TP.Verethragna.SAM.Imp.HighHaste.STP = set_combine(sets.TP.Verethragna.Imp,{})
  435.     sets.TP.Verethragna.SAM.MidACC.Imp.HighHaste.STP = set_combine(sets.TP.Verethragna.MidACC.Imp,{})
  436.     sets.TP.Verethragna.SAM.HighACC.Imp.HighHaste.STP = set_combine(sets.TP.Verethragna.HighACC.Imp,{})
  437.    
  438.     ---------------------
  439.     -- Malignance Pole --
  440.     ---------------------
  441.    
  442.     -- Malignance Pole TP Sets --
  443.     sets.TP.MalignancePole = set_combine(sets.TP,{
  444.             main="Malignance Pole",
  445.             sub="Bloodrain Strap"})
  446.     sets.TP.MalignancePole.MidACC = set_combine(sets.TP.MidACC,{
  447.             main="Malignance Pole",
  448.             sub="Bloodrain Strap"})
  449.     sets.TP.MalignancePole.HighACC = set_combine(sets.TP.HighACC,{
  450.             main="Malignance Pole",
  451.             sub="Bloodrain Strap"})
  452.  
  453.     -- Malignance Pole(High Haste) TP Sets --
  454.     sets.TP.MalignancePole.HighHaste = set_combine(sets.TP.MalignancePole,{})
  455.     sets.TP.MalignancePole.MidACC.HighHaste = set_combine(sets.TP.MalignancePole.MidACC,{})
  456.     sets.TP.MalignancePole.HighACC.HighHaste = set_combine(sets.TP.MalignancePole.HighACC,{})
  457.  
  458.     -- Malignance Pole(SAM Roll) TP Sets --
  459.     sets.TP.MalignancePole.STP = set_combine(sets.TP,{
  460.             main="Malignance Pole",
  461.             sub="Bloodrain Strap"})
  462.     sets.TP.MalignancePole.MidACC.STP = set_combine(sets.TP.MidACC,{
  463.             main="Malignance Pole",
  464.             sub="Bloodrain Strap"})
  465.     sets.TP.MalignancePole.HighACC.STP = set_combine(sets.TP.HighACC,{
  466.             main="Malignance Pole",
  467.             sub="Bloodrain Strap"})
  468.  
  469.     -- Malignance Pole(High Haste + SAM Roll) TP Sets --
  470.     sets.TP.MalignancePole.HighHaste.STP = set_combine(sets.TP.HighHaste,{
  471.             main="Malignance Pole",
  472.             sub="Bloodrain Strap"})
  473.     sets.TP.MalignancePole.MidACC.HighHaste.STP = set_combine(sets.TP.MidACC.HighHaste,{
  474.             main="Malignance Pole",
  475.             sub="Bloodrain Strap"})
  476.     sets.TP.MalignancePole.HighACC.HighHaste.STP = set_combine(sets.TP.HighACC.HighHaste,{
  477.             main="Malignance Pole",
  478.             sub="Bloodrain Strap"})
  479.  
  480.     -- Malignance Pole /SAM TP Sets --
  481.     sets.TP.MalignancePole.SAM = set_combine(sets.TP,{
  482.             main="Malignance Pole",
  483.             sub="Bloodrain Strap"})
  484.     sets.TP.MalignancePole.SAM.MidACC = set_combine(sets.TP.MidACC,{
  485.             main="Malignance Pole",
  486.             sub="Bloodrain Strap"})
  487.     sets.TP.MalignancePole.SAM.HighACC = set_combine(sets.TP.HighACC,{
  488.             main="Malignance Pole",
  489.             sub="Bloodrain Strap"})
  490.  
  491.     -- Malignance Pole(High Haste) /SAM TP Sets --
  492.     sets.TP.MalignancePole.SAM.HighHaste = set_combine(sets.TP.MalignancePole.SAM,{})
  493.     sets.TP.MalignancePole.SAM.MidACC.HighHaste = set_combine(sets.TP.MalignancePole.SAM.MidACC,{})
  494.     sets.TP.MalignancePole.SAM.HighACC.HighHaste = set_combine(sets.TP.MalignancePole.SAM.HighACC,{})
  495.  
  496.     -- Malignance Pole(SAM Roll) /SAM TP Sets --
  497.     sets.TP.MalignancePole.SAM.STP = set_combine(sets.TP,{
  498.             main="Malignance Pole",
  499.             sub="Bloodrain Strap"})
  500.     sets.TP.MalignancePole.SAM.MidACC.STP = set_combine(sets.TP.MidACC,{
  501.             main="Malignance Pole",
  502.             sub="Bloodrain Strap"})
  503.     sets.TP.MalignancePole.SAM.HighACC.STP = set_combine(sets.TP.HighACC,{
  504.             main="Malignance Pole",
  505.             sub="Bloodrain Strap"})
  506.  
  507.     -- Malignance Pole(High Haste + SAM Roll) /SAM TP Sets --
  508.     sets.TP.MalignancePole.SAM.HighHaste.STP = set_combine(sets.TP.HighHaste,{
  509.             main="Malignance Pole",
  510.             sub="Bloodrain Strap"})
  511.     sets.TP.MalignancePole.SAM.MidACC.HighHaste.STP = set_combine(sets.TP.MidACC.HighHaste,{
  512.             main="Malignance Pole",
  513.             sub="Bloodrain Strap"})
  514.     sets.TP.MalignancePole.SAM.HighACC.HighHaste.STP = set_combine(sets.TP.HighACC.HighHaste,{
  515.             main="Malignance Pole",
  516.             sub="Bloodrain Strap"})
  517.  
  518.     ----------------------
  519.     -- PDT/Counter Sets --
  520.     ----------------------
  521.    
  522.     sets.PDT = {
  523.             ammo="Staunch Tathlum +1",
  524.             head="Malignance Chapeau",
  525.             body="Ken. Samue +1",
  526.             hands="Malignance Gloves",
  527.             legs="Ken. Hakama +1",
  528.             feet="Malignance Boots",
  529.             neck="Loricate Torque +1",
  530.             waist="Moonbow Belt +1",
  531.             left_ear="Telos Earring",
  532.             right_ear="Sherida Earring",
  533.             left_ring="Chirich Ring +1",
  534.             right_ring="Defending Ring",
  535.             back={ name="Segomo's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10','Damage taken-5%',}},}
  536.  
  537.     sets.Counter = {
  538.             ammo="Amar Cluster",
  539.             head={ name="Rao Kabuto +1", augments={'VIT+12','Attack+25','"Counter"+4',}},
  540.             body={ name="Hes. Cyclas +1", augments={'Enhances "Formless Strikes" effect',}},
  541.             hands="Malignance Gloves",
  542.             legs="Anch. Hose +1",
  543.             feet={ name="Hes. Gaiters +3", augments={'Enhances "Mantra" effect',}},
  544.             neck={ name="Mnk. Nodowa +2", augments={'Path: A',}},
  545.             waist="Moonbow Belt +1",
  546.             left_ear="Cryptic Earring",
  547.             right_ear="Sherida Earring",
  548.             left_ring="Niqmaddu Ring",
  549.             right_ring="Defending Ring",
  550.             back={ name="Segomo's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10','System: 1 ID: 640 Val: 4',}},}
  551.  
  552.     -- Hybrid Set --
  553.     sets.TP.Hybrid = set_combine(sets.PDT,{})
  554.     sets.TP.Hybrid.MidACC = set_combine(sets.TP.Hybrid,{})
  555.     sets.TP.Hybrid.HighACC = set_combine(sets.TP.Hybrid.MidACC,{})
  556.    
  557.     sets.TP.Hybrid.HighHaste = set_combine(sets.TP.Hybrid,{})
  558.     sets.TP.Hybrid.MidACC.HighHaste = set_combine(sets.TP.Hybrid.MidACC,{})
  559.     sets.TP.Hybrid.HighACC.HighHaste = set_combine(sets.TP.Hybrid.HighACC,{})
  560.            
  561.     -- Kiting Set --
  562.     sets.Kiting =  set_combine(sets.PDT,{
  563.             legs="Herald's Gaiters"})
  564.  
  565.     -----------------------
  566.     -- Weapon Skill Sets --
  567.     -----------------------        
  568.            
  569.     -- WS Base Set (Crit) --
  570.     sets.WS = {
  571.             ammo="Knobkierrie",
  572.             head={ name="Adhemar Bonnet +1", augments={'STR+12','DEX+12','Attack+20',}},
  573.             body={ name="Adhemar Jacket +1", augments={'STR+12','DEX+12','Attack+20',}},
  574.             hands={ name="Adhemar Wrist. +1", augments={'STR+12','DEX+12','Attack+20',}},
  575.             legs="Ken. Hakama +1",
  576.             feet="Ken. Sune-Ate +1",
  577.             neck="Fotia Gorget",
  578.             waist="Moonbow Belt +1",
  579.             left_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
  580.             right_ear="Sherida Earring",
  581.             left_ring="Niqmaddu Ring",
  582.             right_ring="Gere Ring",
  583.             back={ name="Segomo's Mantle", augments={'STR+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},}
  584.     sets.WS.MidACC = set_combine(sets.WS,{})
  585.     sets.WS.HighACC = set_combine(sets.WS.MidACC,{})
  586.            
  587.     -- Magic WS set --
  588.     sets.WS.MABWS = {}
  589.  
  590. -- H2H WS sets --
  591.  
  592.     -- Victory Smite Sets (STR & Crit) --
  593.     sets.WS["Victory Smite"] = {
  594.             ammo="Knobkierrie",
  595.             head={ name="Adhemar Bonnet +1", augments={'STR+12','DEX+12','Attack+20',}},
  596.             body="Ken. Samue +1",
  597.             hands={ name="Ryuo Tekko +1", augments={'STR+12','DEX+12','Accuracy+20',}},
  598.             legs="Ken. Hakama +1",
  599.             feet="Ken. Sune-Ate +1",
  600.             neck="Fotia Gorget",
  601.             waist="Moonbow Belt +1",
  602.             left_ear="Odr Earring",
  603.             right_ear="Sherida Earring",
  604.             left_ring="Niqmaddu Ring",
  605.             right_ring="Gere Ring",
  606.             back={ name="Segomo's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Crit.hit rate+10',}},}
  607.     sets.WS["Victory Smite"].MidACC = set_combine(sets.WS["Victory Smite"],{})
  608.     sets.WS["Victory Smite"].HighACC = set_combine(sets.WS["Victory Smite"].MidACC,{})
  609.    
  610.     -- Ascetic's Fury Sets --
  611.     sets.WS["Ascetic's Fury"] = {
  612.             ammo="Knobkierrie",
  613.             head={ name="Adhemar Bonnet +1", augments={'STR+12','DEX+12','Attack+20',}},
  614.             body="Ken. Samue +1",
  615.             hands={ name="Ryuo Tekko +1", augments={'STR+12','DEX+12','Accuracy+20',}},
  616.             legs="Ken. Hakama +1",
  617.             feet="Ken. Sune-Ate +1",
  618.             neck="Fotia Gorget",
  619.             waist="Moonbow Belt +1",
  620.             left_ear="Odr Earring",
  621.             right_ear="Sherida Earring",
  622.             left_ring="Niqmaddu Ring",
  623.             right_ring="Gere Ring",
  624.             back={ name="Segomo's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Crit.hit rate+10',}},}
  625.     sets.WS["Ascetic's Fury"].MidACC = set_combine(sets.WS["Ascetic's Fury"],{})
  626.     sets.WS["Ascetic's Fury"].HighACC = set_combine(sets.WS["Ascetic's Fury"].MidACC,{})
  627.    
  628.     -- Impetus VSmite/AFury Sets --
  629.     sets.impWS   = {
  630.             ammo="Knobkierrie",
  631.             head={ name="Adhemar Bonnet +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
  632.             body="Bhikku Cyclas +1",
  633.             hands={ name="Ryuo Tekko +1", augments={'STR+12','DEX+12','Accuracy+20',}},
  634.             legs="Ken. Hakama +1",
  635.             feet="Ken. Sune-Ate +1",
  636.             neck="Fotia Gorget",
  637.             waist="Moonbow Belt +1",
  638.             left_ear="Odr Earring",
  639.             right_ear="Sherida Earring",
  640.             left_ring="Niqmaddu Ring",
  641.             right_ring="Gere Ring",
  642.             back={ name="Segomo's Mantle", augments={'STR+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},}
  643.    
  644.     -- Shijin Spiral Sets (DEX & MA) --
  645.     sets.WS["Shijin Spiral"] = {
  646.             ammo="Knobkierrie",
  647.             head="Ken. Jinpachi +1",
  648.             body={ name="Adhemar Jacket +1", augments={'STR+12','DEX+12','Attack+20',}},
  649.             hands={ name="Adhemar Wrist. +1", augments={'STR+12','DEX+12','Attack+20',}},
  650.             legs="Ken. Hakama +1",
  651.             feet="Ken. Sune-Ate +1",
  652.             neck="Fotia Gorget",
  653.             waist="Moonbow Belt +1",
  654.             left_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
  655.             right_ear="Sherida Earring",
  656.             left_ring="Niqmaddu Ring",
  657.             right_ring="Ilabrat Ring",
  658.             back={ name="Segomo's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10','Damage taken-5%',}},}
  659.     sets.WS["Shijin Spiral"].MidACC = set_combine(sets.WS["Shijin Spiral"],{})
  660.     sets.WS["Shijin Spiral"].HighACC = set_combine(sets.WS["Shijin Spiral"].MidACC,{})
  661.    
  662.     -- Raging Fists Sets (STR & MA) --
  663.     sets.WS["Raging Fists"] = {
  664.             ammo="Knobkierrie",
  665.             head={ name="Adhemar Bonnet +1", augments={'STR+12','DEX+12','Attack+20',}},
  666.             body={ name="Adhemar Jacket +1", augments={'STR+12','DEX+12','Attack+20',}},
  667.             hands={ name="Adhemar Wrist. +1", augments={'STR+12','DEX+12','Attack+20',}},
  668.             legs="Ken. Hakama +1",
  669.             feet="Ken. Sune-Ate +1",
  670.             neck="Fotia Gorget",
  671.             waist="Moonbow Belt +1",
  672.             left_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
  673.             right_ear="Sherida Earring",
  674.             left_ring="Niqmaddu Ring",
  675.             right_ring="Gere Ring",
  676.             back={ name="Segomo's Mantle", augments={'STR+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},}
  677.     sets.WS["Raging Fists"].MidACC = set_combine(sets.WS["Raging Fists"],{})
  678.     sets.WS["Raging Fists"].HighACC = set_combine(sets.WS["Raging Fists"].MidACC,{})
  679.    
  680.     -- Howling Fist Sets (VIT & MA) --
  681.     sets.WS["Howling Fist"] = {
  682.             ammo="Knobkierrie",
  683.             head={ name="Herculean Helm", augments={'Accuracy+27','Weapon skill damage +4%','Attack+8',}},
  684.             body="Ken. Samue +1",
  685.             hands={ name="Adhemar Wrist. +1", augments={'STR+12','DEX+12','Attack+20',}},
  686.             legs="Ken. Hakama +1",
  687.             feet={ name="Herculean Boots", augments={'Accuracy+19 Attack+19','"Triple Atk."+3','AGI+7','Accuracy+9','Attack+6',}},
  688.             neck="Fotia Gorget",
  689.             waist="Moonbow Belt +1",
  690.             left_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
  691.             right_ear="Sherida Earring",
  692.             left_ring="Niqmaddu Ring",
  693.             right_ring="Gere Ring",
  694.             back={ name="Segomo's Mantle", augments={'VIT+20','Accuracy+20 Attack+20','VIT+10','Weapon skill damage +10%',}},}
  695.     sets.WS["Howling Fist"].MidACC = set_combine(sets.WS["Howling Fist"],{})
  696.     sets.WS["Howling Fist"].HighACC = set_combine(sets.WS["Howling Fist"].MidACC,{})
  697.    
  698.     -- Tornado Kick Sets (STR & MA) --
  699.     sets.WS["Tornado Kick"] = {
  700.             ammo="Knobkierrie",
  701.             head={ name="Herculean Helm", augments={'Accuracy+27','Weapon skill damage +4%','Attack+8',}},
  702.             body="Ken. Samue +1",
  703.             hands={ name="Adhemar Wrist. +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
  704.             legs="Ken. Hakama +1",
  705.             feet="Anch. Gaiters +2",
  706.             neck={ name="Mnk. Nodowa +2", augments={'Path: A',}},
  707.             waist="Moonbow Belt +1",
  708.             left_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
  709.             right_ear="Sherida Earring",
  710.             left_ring="Niqmaddu Ring",
  711.             right_ring="Gere Ring",
  712.             back={ name="Segomo's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}},}
  713.     sets.WS["Tornado Kick"].MidACC = set_combine(sets.WS["Tornado Kick"],{})
  714.     sets.WS["Tornado Kick"].HighACC = set_combine(sets.WS["Tornado Kick"].MidACC,{})
  715.    
  716.     -- Dragon Kick Sets (STR & MA) --
  717.     sets.WS["Dragon Kick"] = {
  718.             ammo="Knobkierrie",
  719.             head={ name="Herculean Helm", augments={'Accuracy+27','Weapon skill damage +4%','Attack+8',}},
  720.             body="Ken. Samue +1",
  721.             hands={ name="Adhemar Wrist. +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
  722.             legs="Ken. Hakama +1",
  723.             feet="Anch. Gaiters +2",
  724.             neck={ name="Mnk. Nodowa +2", augments={'Path: A',}},
  725.             waist="Moonbow Belt +1",
  726.             left_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
  727.             right_ear="Sherida Earring",
  728.             left_ring="Niqmaddu Ring",
  729.             right_ring="Gere Ring",
  730.             back={ name="Segomo's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}},}
  731.     sets.WS["Dragon Kick"].MidACC = set_combine(sets.WS["Dragon Kick"],{})
  732.     sets.WS["Dragon Kick"].HighACC = set_combine(sets.WS["Dragon Kick"].MidACC,{})
  733.    
  734.     -- Shell Crusher Sets (STR & MA) --
  735.     sets.WS["Shell Crusher"] = {
  736.             ammo="Pemphredo Tathlum",
  737.             head="Malignance Chapeau",
  738.             body={ name="Samnuha Coat", augments={'Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+5','"Dual Wield"+5',}},
  739.             hands="Malignance Gloves",
  740.             legs={ name="Herculean Trousers", augments={'Accuracy+13','"Mag.Atk.Bns."+29','Accuracy+8 Attack+8','Mag. Acc.+10 "Mag.Atk.Bns."+10',}},
  741.             feet="Malignance Boots",
  742.             neck="Sanctity Necklace",
  743.             waist="Luminary Sash",
  744.             left_ear="Digni. Earring",
  745.             right_ear="Enchntr. Earring +1",
  746.             left_ring="Stikini Ring +1",
  747.             right_ring="Stikini Ring +1",
  748.             back={ name="Segomo's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}},}
  749.     sets.WS["Shell Crusher"].MidACC = set_combine(sets.WS["Shell Crusher"],{})
  750.     sets.WS["Shell Crusher"].HighACC = set_combine(sets.WS["Shell Crusher"].MidACC,{})
  751.    
  752.     -------------
  753.     -- JA Sets --
  754.     -------------
  755.     sets.JA = {}
  756.    
  757.     sets.JA["Focus"] = {head="Anchor. Crown +1",}
  758.        
  759.     sets.JA["Dodge"] = {feet="Anch. Gaiters +2",}
  760.        
  761.     sets.JA["Chakra"] = {body="Anch. Cyclas +1", hands={ name="Hes. Gloves +1", augments={'Enhances "Invigorate" effect',}},}
  762.        
  763.     sets.JA["Impetus"] = {"Bhikku Cyclas +1"}
  764.        
  765.     sets.JA["Footwork"] = {feet="Shukuyu Sune-Ate"}
  766.    
  767.     sets.JA["Counterstance"] = {feet={ name="Hes. Gaiters +3", augments={'Enhances "Mantra" effect',}},}
  768.    
  769.     sets.JA["Hundred Fists"] = {legs={ name="Hes. Hose +1", augments={'Enhances "Hundred Fists" effect',}},}
  770.    
  771.     sets.JA["Mantra"] = {feet={ name="Hes. Gaiters +3", augments={'Enhances "Mantra" effect',}},}
  772.        
  773.     sets.JA["Formless Strikes"] = { body={ name="Hes. Cyclas +1", augments={'Enhances "Formless Strikes" effect',}},}
  774.        
  775.     sets.JA["Boost"] = {hands="Anchor. Gloves +2",waist="Ask Sash"}
  776.        
  777.     sets.JA["Provoke"] = {
  778.             ammo="Sapience Orb",
  779.             head="Halitus Helm",
  780.             body="Emet Harness +1",
  781.             hands="Kurys Gloves",
  782.             legs="Ken. Hakama +1",
  783.             feet="Ahosi Leggings",
  784.             neck="Moonlight Necklace",
  785.             waist="Kasiri Belt",
  786.             left_ear="Cryptic Earring",
  787.             right_ear="Sherida Earring",
  788.             left_ring="Eihwaz Ring",
  789.             right_ring="Supershear Ring",
  790.             back={ name="Segomo's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10','Damage taken-5%',}},}
  791.  
  792.     -- Waltz Set --
  793.     sets.Waltz = {}
  794.  
  795.     ------------------
  796.     -- Precast Sets --
  797.     ------------------
  798.     sets.Precast = {
  799.             ammo="Sapience Orb",
  800.             head={ name="Herculean Helm", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','"Fast Cast"+4','Mag. Acc.+15','"Mag.Atk.Bns."+12',}},
  801.             body={ name="Samnuha Coat", augments={'Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+5','"Dual Wield"+5',}},
  802.             hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
  803.             legs="Ken. Hakama +1",
  804.             feet="Malignance Boots",
  805.             neck="Voltsurge Torque",
  806.             waist="Moonbow Belt +1",
  807.             left_ear="Enchntr. Earring +1",
  808.             right_ear="Loquac. Earring",
  809.             left_ring="Defending Ring",
  810.             right_ring="Weather. Ring",
  811.             back={ name="Segomo's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10','Damage taken-5%',}},}
  812.            
  813.     -- Precast Cure Set --
  814.     sets.Precast.Cure = set_combine(sets.Precast,{})
  815.    
  816.     -- Precast Enhancing Magic --
  817.     sets.Precast['Enhancing Magic'] = set_combine(sets.Precast.FastCast,{waist="Siegel Sash"})
  818.    
  819.     -- Fastcast Set --
  820.     sets.Precast.FastCast = set_combine(sets.Precast,{})
  821.  
  822.     ------------------
  823.     -- Midcast Sets --
  824.     ------------------
  825.     sets.Midcast = {}
  826.  
  827.     -- Magic Haste Set --
  828.     sets.Midcast.Haste = set_combine(sets.Midcast,{})
  829.  
  830.     -- Magic Accuracy Set --
  831.     sets.Midcast.MACC = {}
  832.        
  833.     -- Stoneskin --
  834.     sets.Midcast.Stoneskin =  set_combine(sets.Midcast['Enhancing Magic'],{
  835.             waist="Siegel Sash"})  
  836.    
  837. end
  838.  
  839.         ---------------
  840.         -- Functions --
  841.         ---------------
  842.  
  843.      
  844.         ----------------
  845.         -- Pre-Target --
  846.         ----------------
  847.  
  848. function pretarget(spell,action)
  849.     if spell.action_type == 'Magic' and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
  850.         cancel_spell()
  851.         send_command('input /item "Echo Drops" <me>')
  852.     elseif spell.english == "Berserk" and buffactive.Berserk then -- Change Berserk To Aggressor If Berserk Is On --
  853.         cancel_spell()
  854.         send_command('Aggressor')
  855.     elseif spell.english == "Seigan" and buffactive.Seigan then -- Change Seigan To Third Eye If Seigan Is On --
  856.         cancel_spell()
  857.         send_command('ThirdEye')
  858.     elseif spell.english == "Meditate" and player.tp > 2900 then -- Cancel Meditate If TP Is Above 2900 --
  859.         cancel_spell()
  860.         add_to_chat(123, spell.name .. ' Canceled: ['..player.tp..' TP]')
  861.     elseif spell.type == "WeaponSkill" and spell.target.distance > target_distance and player.status == 'Engaged' then -- Cancel WS If You Are Out Of Range --
  862.         cancel_spell()
  863.         add_to_chat(123, spell.name..' Canceled: [Out of Range]')
  864.         return
  865.     end
  866. end
  867.  
  868.         --------------
  869.         -- Pre-Cast --
  870.         --------------
  871.  
  872. function precast(spell,action)
  873.     if spell.type == "WeaponSkill" then
  874.         if player.status ~= 'Engaged' then
  875.         return
  876.         else
  877.             equipSet = sets.WS
  878.             if equipSet[spell.english] then
  879.                 equipSet = equipSet[spell.english]
  880.             end
  881.             if equipSet[AccArray[AccIndex]] then
  882.                 equipSet = equipSet[AccArray[AccIndex]]
  883.             end
  884.             if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
  885.                 equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
  886.             end
  887.             if player.tp > 2750 or (player.equipment.main == 'Godhands' and player.tp > 2250) then
  888.                     equipSet = set_combine(equipSet,{ear1="Odr Earring"}) -- 3000 TP: Equip Odr Earring --
  889.             end
  890.             if spell.english == "Cataclysm" and (world.day == "Darksday" or world.weather_element == "Dark") then
  891.                 equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
  892.             end
  893.             equip(equipSet)
  894.         end
  895.         elseif spell.type == "JobAbility" then
  896.             if sets.JA[spell.english] then
  897.                 equip(sets.JA[spell.english])
  898.             end
  899.             if spell.type == "WeaponSkill" then
  900.             enable('waist')
  901.             if spell.english == "Boost" then
  902.                 disable('waist')
  903.             end
  904.         end
  905.         elseif spell.english == 'Lunge' or spell.english == 'Swipe' then
  906.                 equip(sets.JA.Lunge)
  907. elseif spell.type:endswith('Magic') or spell.type == "Ninjutsu" or spell.type == "Trust" then
  908.         if buffactive.silence or spell.target.distance > 16+target_distance then -- Cancel Magic or Ninjutsu If You Are Silenced or Out of Range --
  909.             cancel_spell()
  910.             add_to_chat(123, spell.name..' Canceled: [Silenced or Out of Casting Range]')
  911.             return
  912.         else
  913.             if spell.english == "Stun" or spell.english == "Drain III" or spell.english == "Drain II" or spell.english == "Dread Spikes" then
  914.                 if buffactive.Hasso or buffactive.Seigan then -- Cancel Hasso or Seigan When You Use Stun/Drain/Dread Spikes --
  915.                     cast_delay(0.2)
  916.                     send_command('cancel Hasso,Seigan')
  917.                     add_to_chat(155,'Hasso/Seigan Canceled for Magic')
  918.                 end
  919.                 equip(sets.Precast.FastCast)
  920.             elseif spell.english == 'Utsusemi: Ni' then
  921.                 if buffactive['Copy Image (3)'] then
  922.                     cancel_spell()
  923.                     add_to_chat(123, spell.name .. ' Canceled: [3 Images]')
  924.                     return
  925.                 else
  926.                     equip(sets.Precast.FastCast)
  927.                 end
  928.             elseif sets.Precast[spell.skill] then
  929.                 equip(sets.Precast[spell.skill])
  930.             else
  931.                 equip(sets.Precast.FastCast)
  932.             end
  933.         end
  934.     elseif spell.type == "Waltz" then
  935.         equip(sets.Waltz)
  936.     elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
  937.         cast_delay(0.2)
  938.         send_command('cancel Sneak')
  939.     end
  940. end
  941.  
  942.         --------------
  943.         -- Mid-Cast --
  944.         --------------
  945.  
  946. function midcast(spell,action)
  947.                 equipSet = {}
  948.         if spell.type:endswith('Magic') or spell.type == 'Ninjutsu' or spell.type == 'Trust' then
  949.                 equipSet = sets.Midcast
  950.         if spell.english:startswith('Absorb') and spell.english ~= "Absorb-TP" then
  951.             equipSet = equipSet.Absorb
  952.         elseif spell.english:startswith('Drain') or spell.english:startswith('Aspir') then
  953.             equipSet = equipSet.Drain
  954.         elseif spell.english:startswith('Haste') or spell.english:startswith('Flurry') or spell.english:startswith('Blink') or spell.english:startswith('Regen') or spell.english:startswith('Reraise') then
  955.             equipSet = sets.Haste
  956.         elseif spell.english == "Stoneskin" then
  957.             if buffactive.Stoneskin then
  958.                 send_command('@wait 1.7;cancel stoneskin')
  959.             end
  960.             equipSet = equipSet.Stoneskin
  961.         elseif spell.english == "Sneak" then
  962.             if spell.target.name == player.name and buffactive['Sneak'] then
  963.                 send_command('cancel sneak')
  964.             end
  965.             equipSet = equipSet.Haste
  966.         elseif spell.english:startswith('Utsusemi') then
  967.             if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)'] or buffactive['Copy Image (3)']) then
  968.                 send_command('@wait 1.7;cancel Copy Image*')
  969.             end
  970.             equipSet = equipSet.Haste
  971.         elseif spell.english == 'Monomi: Ichi' then
  972.             if buffactive['Sneak'] then
  973.                 send_command('@wait 1.7;cancel sneak')
  974.             end
  975.             equipSet = equipSet.Haste
  976.         else
  977.             if equipSet[spell.english] then
  978.                 equipSet = equipSet[spell.english]
  979.             end
  980.             if equipSet[spell.skill] then
  981.                 equipSet = equipSet[spell.skill]
  982.             end
  983.             if equipSet[spell.type] then
  984.                 equipSet = equipSet[spell.type]
  985.             end
  986.         end
  987.         if spell.english:startswith('Cur') and spell.english ~= "Cursna" then
  988.         if (world.day_element == spell.element or world.weather_element == spell.element) then
  989.                 equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
  990.                 end
  991.                 end
  992.         if spell.skill == 'Elemental Magic' or spell.english:startswith('Aspir') or spell.english:startswith('Drain') then
  993.         if (world.day_element == spell.element or world.weather_element == spell.element) then
  994.                 equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
  995.                 end
  996.                 end
  997.     elseif equipSet[spell.english] then
  998.         equipSet = equipSet[spell.english]
  999.     end
  1000.     equip(equipSet)
  1001. end
  1002.  
  1003.         ----------------
  1004.         -- After-Cast --
  1005.         ----------------
  1006.  
  1007. function aftercast(spell,action)
  1008.     if not spell.interrupted then
  1009.         if spell.type == "WeaponSkill" then
  1010.             send_command('wait 0.2;gs c TP')
  1011.         elseif spell.english == "Sleep II" then -- Sleep II Countdown --
  1012.             send_command('wait 60;input /echo Sleep Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep Effect: [WEARING OFF IN 5 SEC.]')
  1013.         elseif spell.english == "Sleep" or spell.english == "Sleepga" then -- Sleep Countdown --
  1014.             send_command('wait 30;input /echo Sleep Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep Effect: [WEARING OFF IN 5 SEC.]')
  1015.         end
  1016.     end
  1017.     status_change(player.status)
  1018. end
  1019.  
  1020.         -------------------
  1021.         -- Status Change --
  1022.         -------------------
  1023.  
  1024. function status_change(new,old)
  1025.     if Armor == 'PDT' or buffactive.Terror or buffactive.Stun or buffactive.Petrification or buffactive.Sleep then
  1026.         equip(sets.PDT)
  1027.     elseif Armor == 'Counter' then
  1028.         equip(sets.Counter)
  1029.     elseif Armor == 'Kiting' then
  1030.         equip(sets.Kiting)
  1031.     elseif new == 'Engaged' then
  1032.         equipSet = sets.TP
  1033.         if Armor == 'Hybrid' and equipSet["Hybrid"] then
  1034.             equipSet = equipSet["Hybrid"]
  1035.         end
  1036.         if equipSet[WeaponArray[WeaponIndex]] then
  1037.             equipSet = equipSet[WeaponArray[WeaponIndex]]
  1038.         end
  1039.         if equipSet[player.sub_job] then
  1040.             equipSet = equipSet[player.sub_job]
  1041.         end
  1042.         if equipSet[AccArray[AccIndex]] then
  1043.             equipSet = equipSet[AccArray[AccIndex]]
  1044.         end
  1045.         if buffactive["Impetus"] and player.equipment.main == 'Godhands' and equipSet["Imp"] then -- Imp set Equip for Godhands --
  1046.             equipSet = equipSet["Imp"]
  1047.         end
  1048.         if buffactive["Impetus"] and player.equipment.main == 'Verethragna' and equipSet["Imp"] then -- Imp set Equip for Verethragna --
  1049.             equipSet = equipSet["Imp"]
  1050.         end
  1051.         if buffactive["Last Resort"] and ((buffactive.Haste and buffactive.March == 2) or (buffactive.Embrava and (buffactive.March == 2 or (buffactive.March and buffactive.Haste))) or (buffactive[580] and (buffactive.March or buffactive.Haste or buffactive.Embrava))) and equipSet["HighHaste"] then
  1052.             equipSet = equipSet["HighHaste"]
  1053.         end
  1054.         if buffactive["Samurai Roll"] and equipSet["STP"] and Samurai_Roll == 'ON' then
  1055.             equipSet = equipSet["STP"]
  1056.         end
  1057.         equip(equipSet)
  1058.     else
  1059.         equipSet = sets.Idle
  1060.         if equipSet[IdleArray[IdleIndex]] then
  1061.             equipSet = equipSet[IdleArray[IdleIndex]]
  1062.         end
  1063.         if equipSet[WeaponArray[WeaponIndex]] then
  1064.             equipSet = equipSet[WeaponArray[WeaponIndex]]
  1065.         end
  1066.         if equipSet[player.sub_job] then
  1067.             equipSet = equipSet[player.sub_job]
  1068.         end
  1069.         if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
  1070.             equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
  1071.         end
  1072.         equip(equipSet)
  1073.     end
  1074. end
  1075.  
  1076.         -----------------
  1077.         -- Buff Change --
  1078.         -----------------
  1079.  
  1080. function buff_change(buff,gain,buff_table)
  1081.         buff = string.lower(buff)
  1082.         if buff_table['id'] == 273 and player.equipment.main == 'Godhands' then -- Godhands AM3 Timer/Countdown --
  1083.         if gain then
  1084.                 add_to_chat(158,'Godhands Aftermath: [ON]')
  1085.         else
  1086.                 add_to_chat(123,'Aeonic Aftermath: [OFF]')
  1087.                 end
  1088.         elseif buff_table['id'] == 272 and player.equipment.main == 'Verethragna' then -- Verethragna AM3 Timer/Countdown --
  1089.         if gain then
  1090.                 send_command('timers create "Empy Aftermath: Lv.3" 180 down')
  1091.                 add_to_chat(158,'Verethragna AM3: [ON]')
  1092.                 else
  1093.                 send_command('timers delete "Empy Aftermath: Lv.3"')
  1094.                 add_to_chat(123,'Verethragna AM3: [OFF]')
  1095.                 end
  1096.         elseif buff_table['id'] == 271 and player.equipment.main == 'Verethragna' then -- Verethragna AM2 Timer/Countdown --
  1097.         if gain then
  1098.                 send_command('timers create "Empy Aftermath: Lv.2" 120 down')
  1099.                 add_to_chat(158,'Verethragna AM2: [ON]')
  1100.         else
  1101.                 send_command('timers delete "Empy Aftermath: Lv.2"')
  1102.                 add_to_chat(123,'Verethragna AM2: [OFF]')
  1103.                 end    
  1104.         elseif buff_table['id'] == 270 and player.equipment.main == 'Verethragna' then -- Verethragna AM1 Timer/Countdown --
  1105.         if gain then
  1106.                 add_to_chat(158,'Verethragna AM1: [ON]')
  1107.         else
  1108.                 send_command('timers delete "Empy Aftermath: Lv.2"')
  1109.                 add_to_chat(123,'Verethragna AM1: [OFF]')
  1110.                 end  
  1111.         elseif buff_table['id'] == 17 then -- Hundred Fists Timer --
  1112.         if gain then
  1113.                 send_command('timers create "Hundred Fists" 60 down')
  1114.         else
  1115.                 send_command('timers delete "Hundred Fists"')
  1116.                 end    
  1117.         elseif buff_table['id'] == 324 then -- Inner Strength Timer --
  1118.         if gain then
  1119.                 send_command('timers create "Inner Strength" 30 down')
  1120.         else
  1121.                 send_command('timers delete "Inner Strength"')
  1122.                 end        
  1123.         elseif buff_table['id'] == 434 then -- Brew Timer --
  1124.         if gain then
  1125.                 send_command('timers create "Transcendency" 180 down')
  1126.         else
  1127.                 send_command('timers delete "Transcendency"')
  1128.                 add_to_chat(123,'Transcendency: [OFF]')
  1129.                 end            
  1130.         elseif buff_table['id'] == 1 then -- Weakness Timer --
  1131.         if gain then
  1132.                 send_command('timers create "Weakness" 300 up')
  1133.         else
  1134.                 send_command('timers delete "Weakness"')
  1135.                 add_to_chat(158,'Weakness: [OFF]')
  1136.                 end
  1137.         elseif buff_table['id'] == 15 then -- Doom Party Chat --
  1138.         if gain then
  1139.                 send_command('input /party doom')
  1140.         else
  1141.                 send_command('input /party Doom off')
  1142.                 add_to_chat(158,'Doom: [OFF]')
  1143.                 end
  1144.         elseif buff_table['id'] == 9 then -- Curse Party Chat --
  1145.         if gain then
  1146.                 send_command('input /party curse')
  1147.         else
  1148.                 add_to_chat(158,'Curse: [OFF]')
  1149.                 end
  1150.         elseif buff_table['id'] == 14 or buff_table['id'] == 17 then -- Charm Party Chat --
  1151.         if gain then
  1152.                 send_command('input /party charmed')
  1153.         else
  1154.                 send_command('input /party Charm off')
  1155.                 add_to_chat(158,'Charm: [OFF]')
  1156.                 end
  1157.         elseif buff_table['id'] == 4 then -- Paralysis --
  1158.         if gain then
  1159.                 add_to_chat(123,'Paralyzed!')
  1160.         else
  1161.                 add_to_chat(158,'Paralysis: [OFF]')
  1162.                 end            
  1163.         elseif buff_table['id'] == 75 then -- Arcane Circle --
  1164.         if not gain then
  1165.                 add_to_chat(123,'Arcane Circle: [OFF]')
  1166.                 end
  1167.         elseif buff_table['id'] == 63 then -- Souleater --
  1168.         if not gain then
  1169.                 add_to_chat(123,'Souleater: [OFF]')
  1170.                 end                              
  1171.         elseif buff_table['id'] == 56 then -- Berserk --
  1172.         if not gain then
  1173.                 add_to_chat(123,'Berserk: [OFF]')
  1174.                 end
  1175.         elseif buff_table['id'] == 58 then -- Aggressor --
  1176.         if not gain then
  1177.                 add_to_chat(123,'Aggressor: [OFF]')
  1178.                 end
  1179.         elseif buff_table['id'] == 68 then -- Warcry --
  1180.         if not gain then
  1181.                 add_to_chat(123,'Warcry: [OFF]')
  1182.                 end            
  1183.         elseif buff_table['id'] == 33 then -- Haste --
  1184.         if not gain then
  1185.                 add_to_chat(123,'Haste: [OFF]')
  1186.                 end      
  1187.         elseif buff_table['id'] == 13  then -- Slow --
  1188.         if gain then
  1189.                 add_to_chat(123,'Slowed!')
  1190.                 else
  1191.                 add_to_chat(158,'Slow: [OFF]')
  1192.                 end
  1193.         elseif buff_table['id'] == 251 then -- Food --
  1194.         if not gain then
  1195.                 add_to_chat(123,'Food: [OFF]')
  1196.                 end
  1197.         elseif buff_table['id'] == 28 then -- Terror --
  1198.         if not gain then
  1199.                 add_to_chat(158,'Terror: [OFF]')
  1200.                 end
  1201.         elseif buff_table['id'] == 10 then -- Stun --
  1202.         if not gain then
  1203.                 add_to_chat(158,'Stun: [OFF]')
  1204.                 end    
  1205.         elseif buff_table['id'] == 16 then -- Amnesia --
  1206.         if not gain then
  1207.                 add_to_chat(158,'Amnesia: [OFF]')
  1208.                 end                
  1209.         elseif buff_table['id'] == 2 or buff_table['id'] == 19 then -- Sleep --
  1210.         if gain then
  1211.                 send_command('input /party zzz')
  1212.         else
  1213.                 add_to_chat(158,'Sleep: [OFF]')
  1214.                 end        
  1215.         elseif buff == "Boost" and not gain then
  1216.         enable('waist')
  1217.         end    
  1218.         if not midaction() then
  1219.                 status_change(player.status)
  1220.                 end
  1221.         end
  1222.  
  1223.         -------------------------------------------------------------------------------------
  1224.         -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
  1225.         -------------------------------------------------------------------------------------
  1226.  
  1227.         function self_command(command)
  1228.     if command == 'acc' then -- Accuracy Level Toggle --
  1229.         AccIndex = (AccIndex % #AccArray) + 1
  1230.         status_change(player.status)
  1231.         add_to_chat(155,'Accuracy Level: '..AccArray[AccIndex])
  1232.     elseif command == 'weapon' then -- Main Weapon Toggle --
  1233.         WeaponIndex = (WeaponIndex % #WeaponArray) + 1
  1234.         add_to_chat(155,'Main Weapon: '..WeaponArray[WeaponIndex])
  1235.         status_change(player.status)
  1236.     elseif command == 'update' then -- Auto Update Gear Toggle --
  1237.         status_change(player.status)
  1238.         add_to_chat(155,'-[Gear Update]-')
  1239.         add_to_chat(155,'Weapon: '..WeaponArray[WeaponIndex])
  1240.         add_to_chat(155,'Accuracy Level: ' .. AccArray[AccIndex])
  1241.         add_to_chat(155,'Idle Set: ' .. IdleArray[IdleIndex])
  1242.     elseif command == 'hybrid' then -- Hybrid Toggle --
  1243.         if Armor == 'Hybrid' then
  1244.             Armor = 'None'
  1245.             add_to_chat(123,'Hybrid Set: [Unlocked]')
  1246.         else
  1247.             Armor = 'Hybrid'
  1248.             add_to_chat(158,'Hybrid Set: '..AccArray[AccIndex])
  1249.         end
  1250.         status_change(player.status)
  1251.     elseif command == 'pdt' then -- PDT Toggle --
  1252.         if Armor == 'PDT' then
  1253.             Armor = 'None'
  1254.             add_to_chat(123,'PDT Set: [Unlocked]')
  1255.         else
  1256.             Armor = 'PDT'
  1257.             add_to_chat(158,'PDT Set: [Locked]')
  1258.         end
  1259.         status_change(player.status)
  1260.     elseif command == 'counter' then -- Counter Toggle --
  1261.         if Armor == 'Counter' then
  1262.             Armor = 'None'
  1263.             add_to_chat(123,'Counter Set: [Unlocked]')
  1264.         else
  1265.             Armor = 'Counter'
  1266.             add_to_chat(158,'Counter Set: [Locked]')
  1267.         end
  1268.         status_change(player.status)
  1269.     elseif command == 'kiting' then -- Kiting Toggle --
  1270.         if Armor == 'Kiting' then
  1271.             Armor = 'None'
  1272.             add_to_chat(123,'Kiting Set: [Unlocked]')
  1273.         else
  1274.             Armor = 'Kiting'
  1275.             add_to_chat(158,'Kiting Set: [Locked]')
  1276.         end
  1277.         status_change(player.status)
  1278.     elseif command == 'distance' then -- Distance Toggle --
  1279.         if player.target.distance then
  1280.             target_distance = math.floor(player.target.distance*10)/10
  1281.             add_to_chat(155,'Distance: '..target_distance)
  1282.         else
  1283.             add_to_chat(123,'No Target Selected')
  1284.         end
  1285.     elseif command == 'idle' then -- Idle Toggle --
  1286.         IdleIndex = (IdleIndex % #IdleArray) + 1
  1287.         status_change(player.status)
  1288.         add_to_chat(155,'Idle Set: '..IdleArray[IdleIndex])
  1289.     elseif command == 'TP' then
  1290.         add_to_chat(155,'TP Return: ['..tostring(player.tp)..']')
  1291.     elseif command:match('^SC%d$') then
  1292.         send_command('//' .. sc_map[command])
  1293.     end
  1294. end
  1295.  
  1296. -- Keep track of the current hit count while Impetus is up.
  1297. function on_action_for_impetus(action)
  1298.     if state.Buff.Impetus then
  1299.         -- count melee hits by player
  1300.         if action.actor_id == player.id then
  1301.             if action.category == 1 then
  1302.                 for _,target in pairs(action.targets) do
  1303.                     for _,action in pairs(target.actions) do
  1304.                         -- Reactions (bitset):
  1305.                         -- 1 = evade
  1306.                         -- 2 = parry
  1307.                         -- 4 = block/guard
  1308.                         -- 8 = hit
  1309.                         -- 16 = JA/weaponskill?
  1310.                         -- If action.reaction has bits 1 or 2 set, it missed or was parried. Reset count.
  1311.                         if (action.reaction % 4) > 0 then
  1312.                             info.impetus_hit_count = 0
  1313.                         else
  1314.                             info.impetus_hit_count = info.impetus_hit_count + 1
  1315.                         end
  1316.                     end
  1317.                 end
  1318.             elseif action.category == 3 then
  1319.                 -- Missed weaponskill hits will reset the counter.  Can we tell?
  1320.                 -- Reaction always seems to be 24 (what does this value mean? 8=hit, 16=?)
  1321.                 -- Can't tell if any hits were missed, so have to assume all hit.
  1322.                 -- Increment by the minimum number of weaponskill hits: 2.
  1323.                 for _,target in pairs(action.targets) do
  1324.                     for _,action in pairs(target.actions) do
  1325.                         -- This will only be if the entire weaponskill missed or was parried.
  1326.                         if (action.reaction % 4) > 0 then
  1327.                             info.impetus_hit_count = 0
  1328.                         else
  1329.                             info.impetus_hit_count = info.impetus_hit_count + 2
  1330.                         end
  1331.                     end
  1332.                 end
  1333.             end
  1334.         elseif action.actor_id ~= player.id and action.category == 1 then
  1335.             -- If mob hits the player, check for counters.
  1336.             for _,target in pairs(action.targets) do
  1337.                 if target.id == player.id then
  1338.                     for _,action in pairs(target.actions) do
  1339.                         -- Spike effect animation:
  1340.                         -- 63 = counter
  1341.                         -- ?? = missed counter
  1342.                         if action.has_spike_effect then
  1343.                             -- spike_effect_message of 592 == missed counter
  1344.                             if action.spike_effect_message == 592 then
  1345.                                 info.impetus_hit_count = 0
  1346.                             elseif action.spike_effect_animation == 63 then
  1347.                                 info.impetus_hit_count = info.impetus_hit_count + 1
  1348.                             end
  1349.                         end
  1350.                     end
  1351.                 end
  1352.             end
  1353.         end
  1354.        
  1355.         --add_to_chat(123,'Current Impetus hit count = ' .. tostring(info.impetus_hit_count))
  1356.     else
  1357.         info.impetus_hit_count = 0
  1358.     end
  1359.    
  1360. end
  1361.  
  1362.     -----------
  1363.     -- Misc. --
  1364.     -----------
  1365.    
  1366. function find_player_in_alliance(name)
  1367.     for i,v in ipairs(alliance) do
  1368.         for k,p in ipairs(v) do
  1369.             if p.name == name then
  1370.                 return p
  1371.             end
  1372.         end
  1373.     end
  1374. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top