Advertisement
Arnan

DRK Lua June 2017

Jun 23rd, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 40.90 KB | None | 0 0
  1.  
  2.         -------------------------------------------------
  3.         -- *** Arnan Dark Knight Gearswap Lua File *** --
  4.         -------------------------------------------------
  5.                
  6.             -- Commands --
  7.                
  8.                 -- In Game: //gs c, Macro: /console gs c, Bind: gs c --
  9.            
  10.                 -- gs c acc         Toggle accuracy tier for TP/WS
  11.                 -- gs c idle        Toggle idle sets
  12.                
  13.                 -- gs c pdt         PDT on/off
  14.                 -- gs c mdt         MDT on/off
  15.                 -- gs c kiting      Kiting on/off
  16.                 -- gs c hybrid      Hybrid on/off
  17.                
  18.                 -- gs c weapon      Toggle Weapon
  19.  
  20. function get_sets()
  21.     AccIndex = 1
  22.     AccArray = {"LowACC","MidACC","HighACC"}   
  23.     WeaponIndex = 1
  24.     WeaponArray = {"Ragnarok","Apocalypse"}
  25.     IdleIndex = 1
  26.     IdleArray = {"Full","DT"}
  27.     Armor = 'None' 
  28.     Samurai_Roll = 'ON' -- Set Default SAM Roll ON or OFF Here --
  29.     target_distance = 6 -- Set Default Distance Here --
  30.     send_command('input /macro book 18;wait .1;input /macro set 1') -- Change Default Macro Book
  31.     add_to_chat(158,'-[Dark Knight Lua Loaded]-')
  32.     add_to_chat(155,'Weapon: '..WeaponArray[WeaponIndex])
  33.     add_to_chat(155,'Accuracy Level: ' .. AccArray[AccIndex])
  34.     add_to_chat(155,'Idle Set: ' .. IdleArray[IdleIndex])
  35.    
  36.     -- Augments --
  37.     VHead={}
  38.     VHead.STP={ name="Valorous Mask", augments={'Accuracy+21 Attack+21','"Store TP"+8','STR+8','Attack+9',}}
  39.     OHead={}
  40.     OHead.WSD={ name="Odyssean Helm", augments={'Accuracy+11 Attack+11','Weapon skill damage +4%','VIT+3','Accuracy+9',}}
  41.     OHands={}
  42.     OHands.WSD={ name="Odyssean Gauntlets", augments={'Accuracy+15 Attack+15','Weapon skill damage +4%','STR+1','Accuracy+15',}}
  43.     OLegs={}
  44.     OLegs.STP={ name="Odyssean Cuisses", augments={'Accuracy+30','"Store TP"+7','Attack+15',}}
  45.     OLegs.WSD={ name="Odyssean Cuisses", augments={'Accuracy+27','Weapon skill damage +4%','AGI+10','Attack+12',}}
  46.     VFeet={}
  47.     VFeet.STP={ name="Valorous Greaves", augments={'Accuracy+25','"Store TP"+7',}}
  48.    
  49.     -- Ankou's Mantle Augments --
  50.     STRDAMantle={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+3','"Dbl.Atk."+10',}}
  51.     DEXDAMantle={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Dbl.Atk."+10',}}
  52.     INTDAMantle={ name="Ankou's Mantle", augments={'INT+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}}
  53.     DEXSTPMantle={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Store TP"+10',}}   
  54.     WSDMantle={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','Weapon skill damage +10%',}}
  55.     VITWSDMantle={ name="Ankou's Mantle", augments={'VIT+20','Accuracy+20 Attack+20','VIT+10','Weapon skill damage +10%',}}
  56.     FCMantle={ name="Ankou's Mantle", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','"Fast Cast"+9',}}
  57.  
  58.    
  59.    
  60.    
  61.     -- Key Binds --
  62.     send_command('bind Delete input /ws "Torcleaver" <t>')
  63.     send_command('bind F11 input /ws "Cross Reaper" <t>')
  64.     send_command('bind F12 input /ws "Resolution" <t>')
  65.     function file_unload()
  66.     send_command('unbind Delete')
  67.     send_command('unbind F11')
  68.     send_command('unbind F12')
  69.     end
  70.  
  71.     -- Gavialis Helm --
  72.     elements = {}
  73.     elements.equip = {head="Gavialis Helm"}
  74.     elements.Resolution = S{"Lightning","Wind","Earth"}
  75.     elements.Scourge = S {"Light","Fire"}
  76.     elements.Torcleaver = S {"Light","Water","Ice"}
  77.     elements.Catastrophe = S {"Dark","Earth"}
  78.     elements.Entropy = S{"Dark","Water","Earth"}
  79.     elements.Insurgency = S{"Light","Dark","Fire"}
  80.     elements.Quietus = S {"Light","Water","Ice"}
  81.     elements["Cross Reaper"] = S {"Water","Ice"}
  82.  
  83.     -- Idle Sets --
  84.     sets.Idle = {
  85.             ammo="Staunch Tathlum",
  86.             head=VHead.STP,
  87.             neck="Coatl Gorget +1",
  88.             ear1="Infused Earring",
  89.             ear2="Genmei Earring",
  90.             body="Jumalik Mail",
  91.             hands="Sulev. Gauntlets +2",
  92.             ring1="Defending Ring",
  93.             ring2="Paguroidea Ring",
  94.             back="Moonbeam Cape",
  95.             waist="Flume Belt +1",
  96.             legs="Carmine Cuisses +1",
  97.             feet="Sulev. Leggings +2"}
  98.    
  99.     -- Full Idle Set --
  100.     sets.Idle.Full = set_combine(sets.Idle,{})
  101.     sets.Idle.Full.Ragnarok = set_combine(sets.Idle.Full,{
  102.             main="Ragnarok"})
  103.     sets.Idle.Full.Ragnarok.SAM = set_combine(sets.Idle.Full,{
  104.             main="Ragnarok"})
  105.     sets.Idle.Full.Apocalypse = set_combine(sets.Idle.Full,{
  106.             main="Apocalypse"})
  107.     sets.Idle.Full.Apocalypse.SAM = set_combine(sets.Idle.Full,{
  108.             main="Apocalypse"})
  109.  
  110.     -- Damage Taken Idle Set --
  111.     sets.Idle.DT = set_combine(sets.Idle,{
  112.             neck="Loricate Torque +1",
  113.             ear1="Ethereal Earring",
  114.             ear2="Genmei Earring"})
  115.     sets.Idle.DT.Ragnarok = set_combine(sets.Idle.DT,{
  116.             main="Ragnarok"})
  117.     sets.Idle.DT.Ragnarok.SAM = set_combine(sets.Idle.DT,{
  118.             main="Ragnarok"})
  119.     sets.Idle.DT.Apocalypse = set_combine(sets.Idle.DT,{
  120.             main="Apocalypse"})
  121.     sets.Idle.DT.Apocalypse.SAM = set_combine(sets.Idle.DT,{
  122.             main="Apocalypse"})
  123.  
  124.     ------------------     
  125.     -- Base TP Sets --     
  126.     ------------------     
  127.     sets.TP = {
  128.             ammo="Yetshila",
  129.             head="Flam. Zucchetto +1",
  130.             neck="Ganesha's Mala",
  131.             ear1="Cessance Earring",
  132.             ear2="Brutal Earring",
  133.             Body="Emicho Haubert +1",
  134.             hands="Emi. Gauntlets +1",
  135.             ring1="Hetairoi Ring",
  136.             ring2="Niqmaddu Ring",
  137.             back=DEXDAMantle,
  138.             waist="Ioskeha Belt",
  139.             legs="Ig. Flanchard +3",
  140.             feet="Flam. Gambieras +1"}
  141.     sets.TP.MidACC = set_combine(sets.TP,{
  142.             ammo="Ginsen",
  143.             ear2="Zennaroi Earring",
  144.             ring1="Chirich Ring"})
  145.     sets.TP.HighACC = set_combine(sets.TP.MidACC,{
  146.             ammo="Seeth. Bomblet +1",
  147.             head="Carmine Mask +1",
  148.             neck="Combatant's Torque",
  149.             ear1="Digni. Earring",
  150.             ring1="Regal Ring",
  151.             ring2="Ramuh Ring +1",
  152.             legs="Carmine Cuisses +1",
  153.             feet="Emi. Gambieras +1"})
  154.  
  155.     -- High Haste TP Base Set --
  156.     sets.TP.HighHaste = set_combine(sets.TP,{})
  157.     sets.TP.MidACC.HighHaste = set_combine(sets.TP.MidACC,{})
  158.     sets.TP.HighACC.HighHaste = set_combine(sets.TP.HighACC,{})
  159.    
  160.     --------------
  161.     -- Ragnarok --
  162.     --------------
  163.    
  164.     -- Ragnarok TP Sets --
  165.     sets.TP.Ragnarok = set_combine(sets.TP,{
  166.             main="Ragnarok",
  167.             ring1="Petrov Ring",
  168.             legs=OLegs.STP,
  169.             feet=VFeet.STP})
  170.     sets.TP.Ragnarok.MidACC = set_combine(sets.TP.MidACC,{
  171.             main="Ragnarok",
  172.             legs=OLegs.STP,
  173.             feet=VFeet.STP})
  174.     sets.TP.Ragnarok.HighACC = set_combine(sets.TP.HighACC,{
  175.             main="Ragnarok"})
  176.  
  177.     -- Ragnarok(High Haste) TP Sets --
  178.     sets.TP.Ragnarok.HighHaste = set_combine(sets.TP.Ragnarok,{})
  179.     sets.TP.Ragnarok.MidACC.HighHaste = set_combine(sets.TP.Ragnarok.MidACC,{})
  180.     sets.TP.Ragnarok.HighACC.HighHaste = set_combine(sets.TP.Ragnarok.HighACC,{})
  181.  
  182.     -- Ragnarok(SAM Roll) TP Sets --
  183.     sets.TP.Ragnarok.STP = set_combine(sets.TP,{
  184.             main="Ragnarok"})
  185.     sets.TP.Ragnarok.MidACC.STP = set_combine(sets.TP.MidACC,{
  186.             main="Ragnarok"})
  187.     sets.TP.Ragnarok.HighACC.STP = set_combine(sets.TP.HighACC,{
  188.             main="Ragnarok"})
  189.  
  190.     -- Ragnarok(High Haste + SAM Roll) TP Sets --
  191.     sets.TP.Ragnarok.HighHaste.STP = set_combine(sets.TP.HighHaste,{
  192.             main="Ragnarok"})
  193.     sets.TP.Ragnarok.MidACC.HighHaste.STP = set_combine(sets.TP.MidACC.HighHaste,{
  194.             main="Ragnarok"})
  195.     sets.TP.Ragnarok.HighACC.HighHaste.STP = set_combine(sets.TP.HighACC.HighHaste,{
  196.             main="Ragnarok"})
  197.  
  198.     -- Ragnarok /SAM TP Sets --
  199.     sets.TP.Ragnarok.SAM = set_combine(sets.TP,{
  200.             main="Ragnarok",
  201.             ring1="Petrov Ring"})
  202.     sets.TP.Ragnarok.SAM.MidACC = set_combine(sets.TP.MidACC,{
  203.             main="Ragnarok",
  204.             ring1="Chirich Ring"})
  205.     sets.TP.Ragnarok.SAM.HighACC = set_combine(sets.TP.HighACC,{
  206.             main="Ragnarok"})
  207.  
  208.     -- Ragnarok(High Haste) /SAM TP Sets --
  209.     sets.TP.Ragnarok.SAM.HighHaste = set_combine(sets.TP.Ragnarok.SAM,{})
  210.     sets.TP.Ragnarok.SAM.MidACC.HighHaste = set_combine(sets.TP.Ragnarok.SAM.MidACC,{})
  211.     sets.TP.Ragnarok.SAM.HighACC.HighHaste = set_combine(sets.TP.Ragnarok.SAM.HighACC,{})
  212.  
  213.     -- Ragnarok(SAM Roll) /SAM TP Sets --
  214.     sets.TP.Ragnarok.SAM.STP = set_combine(sets.TP,{
  215.             main="Ragnarok"})
  216.     sets.TP.Ragnarok.SAM.MidACC.STP = set_combine(sets.TP.MidACC,{
  217.             main="Ragnarok"})
  218.     sets.TP.Ragnarok.SAM.HighACC.STP = set_combine(sets.TP.HighACC,{
  219.             main="Ragnarok"})
  220.  
  221.     -- Ragnarok(High Haste + SAM Roll) /SAM TP Sets --
  222.     sets.TP.Ragnarok.SAM.HighHaste.STP = set_combine(sets.TP.HighHaste,{
  223.             main="Ragnarok"})
  224.     sets.TP.Ragnarok.SAM.MidACC.HighHaste.STP = set_combine(sets.TP.MidACC.HighHaste,{
  225.             main="Ragnarok"})
  226.     sets.TP.Ragnarok.SAM.HighACC.HighHaste.STP = set_combine(sets.TP.HighACC.HighHaste,{
  227.             main="Ragnarok"})
  228.    
  229.     ----------------
  230.     -- Apocalypse --
  231.     ----------------
  232.    
  233.     -- Apocalypse TP Sets --
  234.     sets.TP.Apocalypse = set_combine(sets.TP,{
  235.             main="Apocalypse",
  236.             ring1="Petrov Ring",
  237.             ear2="Dedition Earring",
  238.             legs=OLegs.STP,
  239.             feet=VFeet.STP})
  240.     sets.TP.Apocalypse.MidACC = set_combine(sets.TP.MidACC,{
  241.             main="Apocalypse",
  242.             legs=OLegs.STP,
  243.             feet=VFeet.STP})
  244.     sets.TP.Apocalypse.HighACC = set_combine(sets.TP.HighACC,{
  245.             main="Apocalypse"})
  246.  
  247.     -- Apocalypse High Haste TP Sets --
  248.     sets.TP.Apocalypse.HighHaste = set_combine(sets.TP.Apocalypse,{})
  249.     sets.TP.Apocalypse.MidACC.HighHaste = set_combine(sets.TP.Apocalypse.MidACC,{})
  250.     sets.TP.Apocalypse.HighACC.HighHaste = set_combine(sets.TP.Apocalypse.HighACC,{})
  251.  
  252.     -- Apocalypse SAM Roll TP Sets --
  253.     sets.TP.Apocalypse.STP = set_combine(sets.TP,{
  254.             main="Apocalypse"})
  255.     sets.TP.Apocalypse.MidACC.STP = set_combine(sets.TP.MidACC,{
  256.             main="Apocalypse"})
  257.     sets.TP.Apocalypse.HighACC.STP = set_combine(sets.TP.HighACC,{
  258.             main="Apocalypse"})
  259.  
  260.     -- Apocalypse High Haste + SAM Roll TP Sets --
  261.     sets.TP.Apocalypse.HighHaste.STP = set_combine(sets.TP.HighHaste,{
  262.             main="Apocalypse"})
  263.     sets.TP.Apocalypse.MidACC.HighHaste.STP = set_combine(sets.TP.MidACC.HighHaste,{
  264.             main="Apocalypse"})
  265.     sets.TP.Apocalypse.HighACC.HighHaste.STP = set_combine(sets.TP.HighACC.HighHaste,{
  266.             main="Apocalypse"})
  267.  
  268.     -- Apocalypse /SAM TP Sets --
  269.     sets.TP.Apocalypse.SAM = set_combine(sets.TP,{
  270.             main="Apocalypse",
  271.             ear2="Dedition Earring",
  272.             ring1="Petrov Ring"})
  273.     sets.TP.Apocalypse.SAM.MidACC = set_combine(sets.TP.MidACC,{
  274.             main="Apocalypse",
  275.             neck="Combatant's Torque"})
  276.     sets.TP.Apocalypse.SAM.HighACC = set_combine(sets.TP.HighACC,{
  277.             main="Apocalypse"})
  278.  
  279.     -- Apocalypse High Haste /SAM TP Sets --
  280.     sets.TP.Apocalypse.SAM.HighHaste = set_combine(sets.TP.Apocalypse.SAM,{})
  281.     sets.TP.Apocalypse.SAM.MidACC.HighHaste = set_combine(sets.TP.Apocalypse.SAM.MidACC,{})
  282.     sets.TP.Apocalypse.SAM.HighACC.HighHaste = set_combine(sets.TP.Apocalypse.SAM.HighACC,{})
  283.  
  284.     -- Apocalypse SAM Roll /SAM TP Sets --
  285.     sets.TP.Apocalypse.SAM.STP = set_combine(sets.TP,{
  286.             main="Apocalypse"})
  287.     sets.TP.Apocalypse.SAM.MidACC.STP = set_combine(sets.TP.MidACC,{
  288.             main="Apocalypse"})
  289.     sets.TP.Apocalypse.SAM.HighACC.STP = set_combine(sets.TP.HighACC,{
  290.             main="Apocalypse"})
  291.  
  292.     -- Apocalypse High Haste + SAM Roll /SAM TP Sets --
  293.     sets.TP.Apocalypse.SAM.HighHaste.STP = set_combine(sets.TP.HighHaste,{
  294.             main="Apocalypse"})
  295.     sets.TP.Apocalypse.SAM.MidACC.HighHaste.STP = set_combine(sets.TP.MidACC.HighHaste,{
  296.             main="Apocalypse"})
  297.     sets.TP.Apocalypse.SAM.HighACC.HighHaste.STP = set_combine(sets.TP.HighACC.HighHaste,{
  298.             main="Apocalypse"})
  299.  
  300.     -- PDT/MDT Sets --
  301.     sets.PDT = {
  302.             ammo="Staunch Tathlum",
  303.             head="Sulevia's Mask +2",
  304.             neck="Loricate Torque +1",
  305.             ear1="Ethereal Earring",           
  306.             ear2="Odnowa Earring +1",
  307.             body="Sulevia's Plate. +1",
  308.             hands="Sulev. Gauntlets +2",
  309.             ring1="Moonbeam Ring",         
  310.             ring2="Moonbeam Ring",
  311.             back="Moonbeam Cape",
  312.             waist="Tempus Fugit",
  313.             legs="Sulevi. Cuisses +1",
  314.             feet="Sulev. Leggings +2"}
  315.  
  316.     sets.MDT = set_combine(sets.PDT,{
  317.             ear1="Sanare Earring"})
  318.  
  319.     -- Hybrid Set --
  320.     sets.TP.Hybrid = set_combine(sets.PDT,{})
  321.     sets.TP.Hybrid.MidACC = set_combine(sets.TP.Hybrid,{})
  322.     sets.TP.Hybrid.HighACC = set_combine(sets.TP.Hybrid.MidACC,{})
  323.  
  324.     -- WS Base Set (multi-attack) --
  325.     sets.WS = {
  326.             ammo="Seeth. Bomblet +1",
  327.             head="Flam. Zucchetto +1",
  328.             neck="Fotia Gorget",
  329.             ear1="Moonshade Earring",
  330.             ear2="Brutal Earring",
  331.             Body="Emicho Haubert +1",
  332.             hands="Emi. Gauntlets +1",
  333.             ring1="Regal Ring",
  334.             ring2="Niqmaddu Ring",
  335.             back=STRDAMantle,
  336.             waist="Fotia Belt",
  337.             legs="Ig. Flanchard +3",
  338.             feet="Flam. Gambieras +1"}
  339.     sets.WS.MidACC = set_combine(sets.WS,{
  340.             ear2="Zennaroi Earring",
  341.             back=DEXDAMantle,})
  342.     sets.WS.HighACC = set_combine(sets.WS.MidACC,{
  343.             head="Carmine Mask +1",
  344.             ring1="Ramuh Ring +1",
  345.             ring2="Ramuh Ring +1",
  346.             legs="Carmine Cuisses +1",
  347.             feet="Emi. Gambieras +1"})
  348.            
  349.     -- One Hit WS set--
  350.     sets.WS.OneHit = {
  351.             ammo="Knobkierrie",
  352.             head=OHead.WSD,
  353.             neck="Fotia Gorget",
  354.             ear1="Moonshade Earring",
  355.             ear2="Ishvara Earring",
  356.             body="Ignominy Cuirass +2",
  357.             hands=OHands.WSD,
  358.             ring1="Regal Ring",
  359.             ring2="Niqmaddu Ring",
  360.             back=WSDMantle,
  361.             waist="Fotia Belt",
  362.             legs=OLegs.WSD,
  363.             feet="Sulev. Leggings +2"}
  364.     sets.WS.OneHit.MidACC = set_combine(sets.WS.OneHit,{
  365.             ear2="Zennaroi Earring"})
  366.     sets.WS.OneHit.HighACC = set_combine(sets.WS.OneHit.MidACC,{
  367.             head="Carmine Mask +1",
  368.             legs="Carmine Cuisses +1"})
  369.            
  370.     -- Magic WS set --
  371.     sets.WS.MABWS = {
  372.             ammo="Pemphredo Tathlum",
  373.             head="Jumalik Helm",
  374.             neck="Sanctity Necklace",
  375.             ear1="Friomisi Earring",
  376.             ear2="Crematio Earring",
  377.             body="Found. Breastplate",
  378.             hands="Founder's Gauntlets",
  379.             ring1="Shiva Ring +1",
  380.             ring2="Shiva Ring +1",
  381.             back="Argochampsa Mantle",
  382.             waist="Eschan Stone",
  383.             legs="Eschite Cuisses",
  384.             feet="Founder's Greaves"}
  385.  
  386.     -- Resolution Sets (STR & Multi-Attack) --
  387.     sets.WS.Resolution = {
  388.             ammo="Seeth. Bomblet +1",
  389.             head="Argosy Celata +1",
  390.             neck="Fotia Gorget",
  391.             ear1="Moonshade Earring",
  392.             ear2="Brutal Earring",
  393.             body="Argosy Hauberk +1",
  394.             hands="Argosy Mufflers +1",
  395.             ring1="Regal Ring",
  396.             ring2="Niqmaddu Ring",
  397.             back=STRDAMantle,
  398.             waist="Fotia Belt",
  399.             legs="Ig. Flanchard +3",
  400.             feet="Argosy Sollerets +1"}
  401.     sets.WS.Resolution.MidACC = set_combine(sets.WS.Resolution,{})
  402.     sets.WS.Resolution.HighACC = set_combine(sets.WS.HighACC,{})
  403.  
  404.     -- Scourge Sets (STR/VIT & WSD+) --
  405.     sets.WS.Scourge = set_combine(sets.WS.OneHit,{})
  406.     sets.WS.Scourge.MidACC = set_combine(sets.WS.OneHit.MidACC,{})
  407.     sets.WS.Scourge.HighACC = set_combine(sets.WS.OneHit.HighACC,{})
  408.    
  409.     -- Torcleaver Sets (VIT & WSD+) --
  410.     sets.WS.Torcleaver = set_combine(sets.WS.OneHit,{
  411.             back=VITWSDMantle})
  412.     sets.WS.Torcleaver.MidACC = set_combine(sets.WS.Torcleaver,{
  413.             back=VITWSDMantle})
  414.     sets.WS.Torcleaver.HighACC = set_combine(sets.WS.OneHit.HighACC,{
  415.             back=VITWSDMantle})
  416.        
  417.     -- Herculean Slash Sets (MAB/Ice) --
  418.     sets.WS["Herculean Slash"] = set_combine(sets.WS.MABWS,{})
  419.     sets.WS["Herculean Slash"].MidACC = set_combine(sets.WS.MABWS,{})
  420.     sets.WS["Herculean Slash"].HighACC = set_combine(sets.WS.MABWS,{})
  421.  
  422.     -- Catastrophe Sets (STR/INT & WSD+) --
  423.     sets.WS.Catastrophe = set_combine(sets.WS.OneHit,{
  424.             head="Ratri Sallet",
  425.             body="Ratri Plate",
  426.             hands="Ratri Gadlings",
  427.             legs="Ratri Cuisses"})
  428.     sets.WS.Catastrophe.MidACC = set_combine(sets.WS.OneHit.MidACC,{
  429.             head="Ratri Sallet",
  430.             body="Ratri Plate",
  431.             hands="Ratri Gadlings",
  432.             legs="Ratri Cuisses"})
  433.     sets.WS.Catastrophe.HighACC = set_combine(sets.WS.OneHit.HighACC,{})
  434.  
  435.     -- Entropy Sets (INT & Gorget/Belt, four hits) --
  436.     sets.WS.Entropy = set_combine(sets.WS,{
  437.             ammo="Floestone",
  438.             head="Ratri Sallet",
  439.             ring1="Shiva Ring +1",
  440.             ring2="Shiva Ring +1",
  441.             back=INTDAMantle,
  442.             feet="Ratri Sollerets"})
  443.     sets.WS.Entropy.MidACC = set_combine(sets.WS.MidACC,{
  444.             head="Ratri Sallet",
  445.             ring1="Shiva Ring +1",
  446.             ring2="Shiva Ring +1",
  447.             back=INTDAMantle,
  448.             feet="Ratri Sollerets"})
  449.     sets.WS.Entropy.HighACC = set_combine(sets.WS.HighACC,{})
  450.  
  451.     -- Insurgency Sets (STR/INT, four hits) --
  452.     sets.WS.Insurgency = set_combine(sets.WS,{
  453.             ammo="Floestone",
  454.             head="Ratri Sallet",
  455.             body="Ratri Plate",
  456.             hands="Ratri Gadlings",
  457.             feet="Ratri Sollerets"})
  458.     sets.WS.Insurgency.MidACC = set_combine(sets.WS.MidACC,{
  459.             head="Ratri Sallet",
  460.             body="Ratri Plate",
  461.             hands="Ratri Gadlings",
  462.             feet="Ratri Sollerets"})
  463.     sets.WS.Insurgency.HighACC = set_combine(sets.WS.HighACC,{})
  464.    
  465.     -- Quietus Sets (STR/MND & WSD+) --
  466.     sets.WS.Quietus = set_combine(sets.WS.OneHit,{
  467.             head="Ratri Sallet",
  468.             body="Ratri Plate",
  469.             hands="Ratri Gadlings",
  470.             ring1="Rufescent Ring",
  471.             legs="Ratri Cuisses",
  472.             feet="Ratri Sollerets"})
  473.     sets.WS.Quietus.MidACC = set_combine(sets.WS.OneHit.MidACC,{
  474.             head="Ratri Sallet",
  475.             body="Ratri Plate",
  476.             hands="Ratri Gadlings",
  477.             legs="Ratri Cuisses",
  478.             feet="Ratri Sollerets"})
  479.     sets.WS.Quietus.HighACC = set_combine(sets.WS.OneHit.HighACC,{})
  480.  
  481.     -- Cross Reaper Sets (STR/MND & WSD+) --
  482.     sets.WS["Cross Reaper"] = set_combine(sets.WS.OneHit,{
  483.             head="Ratri Sallet",
  484.             body="Ratri Plate",
  485.             hands="Ratri Gadlings",
  486.             ring1="Rufescent Ring",
  487.             legs="Ratri Cuisses"})
  488.     sets.WS["Cross Reaper"].MidACC = set_combine(sets.WS.OneHit.MidACC,{
  489.             head="Ratri Sallet",
  490.             body="Ratri Plate",
  491.             hands="Ratri Gadlings",
  492.             legs="Ratri Cuisses"})
  493.     sets.WS["Cross Reaper"].HighACC = set_combine(sets.WS.OneHit.HighACC,{})
  494.  
  495.     -- Guillotine Sets (STR/MND) --
  496.     sets.WS.Guillotine = set_combine(sets.WS,{
  497.             head="Ratri Sallet",
  498.             body="Ratri Plate",
  499.             hands="Ratri Gadlings",
  500.             ring1="Rufescent Ring",
  501.             feet="Ratri Sollerets"})
  502.     sets.WS.Guillotine.MidACC = set_combine(sets.WS.MidACC,{
  503.             head="Ratri Sallet",
  504.             body="Ratri Plate",
  505.             hands="Ratri Gadlings",
  506.             feet="Ratri Sollerets"})
  507.     sets.WS.Guillotine.HighACC = set_combine(sets.WS.HighACC,{})
  508.  
  509.     -- Infernal Scythe Sets (MAB/Dark) --
  510.     sets.WS["Infernal Scythe"] = set_combine(sets.WS.MABWS,{
  511.             head="Pixie Hairpin +1",
  512.             ring1="Archon Ring"})
  513.     sets.WS["Infernal Scythe"].MidACC = set_combine(sets.WS.MABWS,{
  514.             head="Pixie Hairpin +1",
  515.             ring1="Archon Ring"})
  516.     sets.WS["Infernal Scythe"].HighACC = set_combine(sets.WS.MABWS,{
  517.             head="Pixie Hairpin +1",
  518.             ring1="Archon Ring"})
  519.        
  520.     -- Souleater WS Set --
  521.     sets.SE_WS = {
  522.             head="Ig. Burgonet +2"}
  523.            
  524.     -- Arcane Circle/Founders Breastplate WS Set --
  525.     sets.AC_WS = {
  526.             body="Found. Breastplate"}
  527.    
  528.     -------------
  529.     -- JA Sets --
  530.     -------------
  531.     sets.JA = {}
  532.     sets.JA["Blood Weapon"] = {body="Fallen's Cuirass"}
  533.     sets.JA["Diabolic Eye"] = {hands="Fall. Fin. Gaunt. +1"}
  534.     sets.JA["Nether Void"] = {legs="Heath. Flanchard +1"}
  535.     sets.JA["Arcane Circle"] = {feet="Igno. Sollerets +1"}
  536.     sets.JA["Last Resort"] = {back="Ankou's Mantle"}
  537.  
  538.     -- Waltz Set --
  539.     sets.Waltz = {}
  540.  
  541.     ------------------
  542.     -- Precast Sets --
  543.     ------------------
  544.     sets.Precast = {
  545.             ammo="Impatiens",
  546.             head="Carmine Mask +1",
  547.             neck="Orunmila's Torque",
  548.             ear1="Loquac. Earring",
  549.             ear2="Etiolation Earring",
  550.             body="Odyss. Chestplate",
  551.             hands="Leyline Gloves",
  552.             ring1="Lebeche Ring",
  553.             ring2="Kishar Ring",
  554.             back=FCMantle,
  555.             waist="Flume Belt +1",
  556.             legs="Enif Cosciales",
  557.             feet="Carmine Greaves +1"}
  558.            
  559.     -- Precast Cure Set --
  560.     sets.Precast.Cure = set_combine(sets.Precast,{
  561.             ear2="Mendi. Earring",
  562.             body="Jumalik Mail",
  563.             waist="Acerbic Sash +1"})
  564.    
  565.     -- Precast Enhancing Magic --
  566.     sets.Precast['Enhancing Magic'] = set_combine(sets.Precast.FastCast,{waist="Siegel Sash"})
  567.    
  568.     -- Fastcast Set --
  569.     sets.Precast.FastCast = set_combine(sets.Precast,{})
  570.  
  571.     ------------------
  572.     -- Midcast Sets --
  573.     ------------------
  574.     sets.Midcast = {
  575.             ammo="Staunch Tathlum",
  576.             head="Carmine Mask +1",
  577.             neck="Orunmila's Torque",
  578.             ear1="Loquac. Earring",
  579.             ear2="Etiolation Earring",
  580.             body="Odyss. Chestplate",
  581.             hands="Leyline Gloves",
  582.             ring1="Defending Ring",
  583.             ring2="Kishar Ring",
  584.             back=FCMantle,
  585.             waist="Flume Belt +1",
  586.             legs="Carmine Cuisses +1",
  587.             feet="Odyssean Greaves"}
  588.  
  589.     -- Magic Haste Set --
  590.     sets.Midcast.Haste = set_combine(sets.Midcast,{})
  591.    
  592.     -- Magic Attack Bonus Set --
  593.     sets.Midcast.MAB = {
  594.             ammo="Pemphredo Tathlum",
  595.             head="Jumalik Helm",
  596.             neck="Sanctity Necklace",
  597.             ear1="Friomisi Earring",
  598.             ear2="Crematio Earring",
  599.             body="Found. Breastplate",
  600.             hands="Founder's Gauntlets",
  601.             ring1="Shiva Ring +1",
  602.             ring2="Shiva Ring +1",
  603.             back=FCMantle,
  604.             waist="Eschan Stone",
  605.             legs="Eschite Cuisses",
  606.             feet="Founder's Greaves"}
  607.  
  608.     -- Magic Accuracy Set --
  609.     sets.Midcast.MACC = {
  610.             ammo="Pemphredo Tathlum",
  611.             head="Carmine Mask +1",
  612.             neck="Erra Pendant",
  613.             ear1="Digni. Earring",
  614.             ear2="Gwati Earring",
  615.             body="Flamma Korazin +1",
  616.             hands="Flam. Manopolas +1",
  617.             ring1="Stikini Ring",
  618.             ring2="Stikini Ring",
  619.             back=FCMantle,
  620.             waist="Eschan Stone",
  621.             legs="Flamma Dirs +1",
  622.             feet="Flam. Gambieras +1"}
  623.  
  624.     -- Dark Magic Set --
  625.     sets.Midcast['Dark Magic'] = set_combine(sets.Midcast.MACC,{
  626.             head="Ig. Burgonet +2",
  627.             neck="Erra Pendant",
  628.             ear1="Dark Earring",
  629.             body="Carm. Scale Mail",
  630.             hands="Fall. Fin. Gaunt. +1",
  631.             ring1="Stikini Ring",
  632.             ring2="Evanescence Ring",
  633.             back="Niht Mantle",
  634.             waist="Casso Sash",
  635.             legs="Eschite Cuisses",
  636.             feet="Ratri Sollerets"})
  637.  
  638.     -- Stun Sets --
  639.     sets.Midcast.Stun = set_combine(sets.Midcast.MACC,{})
  640.     sets.Midcast.Stun.MidACC = set_combine(sets.Midcast.Stun,{})
  641.     sets.Midcast.Stun.HighACC = set_combine(sets.Midcast.Stun.MidACC,{})
  642.  
  643.     -- Endark Set --
  644.     sets.Midcast.Endark = set_combine(sets.Midcast,{
  645.             head="Ig. Burgonet +2",
  646.             neck="Erra Pendant",
  647.             ear1="Dark Earring",
  648.             body="Carm. Scale Mail",
  649.             hands="Fall. Fin. Gaunt. +1",
  650.             ring1="Stikini Ring",
  651.             ring2="Evanescence Ring",
  652.             back="Niht Mantle",
  653.             waist="Casso Sash",
  654.             legs="Eschite Cuisses",
  655.             feet="Ratri Sollerets"})
  656.    
  657.     -- Absorb Set --
  658.     sets.Midcast.Absorb = set_combine(sets.Midcast.MACC,{
  659.             head="Ig. Burgonet +2",
  660.             neck="Erra Pendant",
  661.             body="Carm. Scale Mail",
  662.             hands="Pavor Gauntlets",
  663.             ring1="Archon Ring",
  664.             ring2="Kishar Ring",
  665.             back="Chuparrosa Mantle",
  666.             legs="Eschite Cuisses",
  667.             feet="Ratri Sollerets"})
  668.  
  669.     -- Drain & Aspir Sets --
  670.     sets.Midcast.Drain = set_combine(sets.Midcast.MACC,{
  671.             head="Pixie Hairpin +1",
  672.             neck="Erra Pendant",
  673.             ear2="Hirudinea Earring",
  674.             body="Carm. Scale Mail",
  675.             hands="Fall. Fin. Gaunt. +1",
  676.             ring1="Archon Ring",
  677.             ring2="Evanescence Ring",
  678.             back="Niht Mantle",
  679.             waist="Austerity Belt +1",
  680.             legs="Eschite Cuisses",
  681.             feet="Ratri Sollerets"})
  682.  
  683.     -- Enfeebling Magic Set --
  684.     sets.Midcast['Enfeebling Magic'] = set_combine(sets.Midcast.MACC,{
  685.             ring2="Kishar Ring"})
  686.  
  687.     -- Elemental Magic Set --
  688.     sets.Midcast['Elemental Magic'] = set_combine(sets.Midcast.MAB,{})
  689.  
  690.     -- Dread Spikes Set --
  691.     sets.Midcast['Dread Spikes'] = {
  692.             ammo="Egoist's Tathlum",
  693.             head="Ratri Sallet",
  694.             neck="Sanctity Necklace",
  695.             ear1="Odnowa Earring",
  696.             ear2="Odnowa Earring +1",
  697.             body="Heath. Cuirass +1",
  698.             hands="Ratri Gadlings",
  699.             ring1="Moonbeam Ring",
  700.             ring2="Moonbeam Ring",
  701.             waist="Eschan Stone",
  702.             back="Moonbeam Cape",
  703.             legs="Ratri Cuisses",
  704.             feet="Ratri Sollerets"}
  705.    
  706.     -- Enhancing Magic --
  707.     sets.Midcast['Enhancing Magic'] = {
  708.             head="Carmine Mask +1",
  709.             neck="Incanter's Torque",
  710.             ear1="Andoaa Earring",
  711.             ear2="Augment. Earring",
  712.             body="Shabti Cuirass",
  713.             ring1="Stikini Ring",
  714.             ring2="Stikini Ring",
  715.             back="Merciful Cape",
  716.             waist="Olympus Sash",
  717.             legs="Carmine Cuisses +1"}
  718.        
  719.     -- Stoneskin --
  720.     sets.Midcast.Stoneskin =  set_combine(sets.Midcast['Enhancing Magic'],{
  721.             waist="Siegel Sash"})  
  722.    
  723. end
  724.  
  725.         ---------------
  726.         -- Functions --
  727.         ---------------
  728.        
  729.         ----------------
  730.         -- Pre-Target --
  731.         ----------------
  732.  
  733. function pretarget(spell,action)
  734.     if spell.action_type == 'Magic' and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
  735.         cancel_spell()
  736.         send_command('input /item "Echo Drops" <me>')
  737.     elseif spell.english == "Berserk" and buffactive.Berserk then -- Change Berserk To Aggressor If Berserk Is On --
  738.         cancel_spell()
  739.         send_command('Aggressor')
  740.     elseif spell.english == "Seigan" and buffactive.Seigan then -- Change Seigan To Third Eye If Seigan Is On --
  741.         cancel_spell()
  742.         send_command('ThirdEye')
  743.     elseif spell.english == "Meditate" and player.tp > 2900 then -- Cancel Meditate If TP Is Above 2900 --
  744.         cancel_spell()
  745.         add_to_chat(123, spell.name .. ' Canceled: ['..player.tp..' TP]')
  746.     elseif spell.type == "WeaponSkill" and spell.target.distance > target_distance and player.status == 'Engaged' then -- Cancel WS If You Are Out Of Range --
  747.         cancel_spell()
  748.         add_to_chat(123, spell.name..' Canceled: [Out of Range]')
  749.         return
  750.     end
  751. end
  752.  
  753.         --------------
  754.         -- Pre-Cast --
  755.         --------------
  756.  
  757. function precast(spell,action)
  758.     if spell.type == "WeaponSkill" then
  759.         if player.status ~= 'Engaged' then -- Cancel WS If You Are Not Engaged. Can Delete It If You Don't Need It --
  760.             cancel_spell()
  761.             add_to_chat(123,'Unable To Use WeaponSkill: [Disengaged]')
  762.             return
  763.         else
  764.             equipSet = sets.WS
  765.             if equipSet[spell.english] then
  766.                 equipSet = equipSet[spell.english]
  767.             end
  768.             if equipSet[AccArray[AccIndex]] then
  769.                 equipSet = equipSet[AccArray[AccIndex]]
  770.             end
  771.             if buffactive["Arcane Circle"] then -- Equip Founders Breastplate when you have Arcane Circle on --
  772.                 equipSet = set_combine(equipSet,sets.AC_WS)
  773.             end
  774.             if buffactive["Souleater"] then -- Equip Ignominy Burgonet when you have Souleater on --
  775.                 equipSet = set_combine(equipSet,sets.SE_WS)
  776.             end
  777.             if elements[spell.name] and elements[spell.name]:contains(world.day_element) then
  778.                 equipSet = set_combine(equipSet,elements.equip)
  779.             end
  780.             if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
  781.                 equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
  782.             end
  783.             if player.tp > 2750 then
  784.                     equipSet = set_combine(equipSet,{ear1="Zwazo Earring"}) -- 3000 TP: Equip Zwazo Earring --
  785.             end
  786.             if world.time <= (7*60) or world.time >= (17*60) then
  787.                     equipSet = set_combine(equipSet,{ear2="Lugra Earring +1"}) -- Dusk til Dawn: Equip Lugra Earring +1 --
  788.             end
  789.             equip(equipSet)
  790.         end
  791.     elseif spell.type == "JobAbility" then
  792.         if sets.JA[spell.english] then
  793.             equip(sets.JA[spell.english])
  794.         end
  795.         elseif spell.english == 'Lunge' or spell.english == 'Swipe' then
  796.                 equip(sets.JA.Lunge)
  797.     elseif spell.action_type == 'Magic' then
  798.         if buffactive.silence or spell.target.distance > 16+target_distance then -- Cancel Magic or Ninjutsu If You Are Silenced or Out of Range --
  799.             cancel_spell()
  800.             add_to_chat(123, spell.name..' Canceled: [Silenced or Out of Casting Range]')
  801.             return
  802.         else
  803.             if spell.english == "Stun" or spell.english == "Drain III" or spell.english == "Drain II" then
  804.                 if buffactive.Hasso or buffactive.Seigan then -- Cancel Hasso or Seigan When You Use Stun --
  805.                     cast_delay(0.2)
  806.                     send_command('cancel Hasso,Seigan')
  807.                     add_to_chat(155,'Hasso/Seigan Canceled for Magic')
  808.                 end
  809.                 equip(sets.Precast.FastCast)
  810.             elseif spell.english == 'Utsusemi: Ni' then
  811.                 if buffactive['Copy Image (3)'] then
  812.                     cancel_spell()
  813.                     add_to_chat(123, spell.name .. ' Canceled: [3 Images]')
  814.                     return
  815.                 else
  816.                     equip(sets.Precast.FastCast)
  817.                 end
  818.             elseif sets.Precast[spell.skill] then
  819.                 equip(sets.Precast[spell.skill])
  820.             else
  821.                 equip(sets.Precast.FastCast)
  822.             end
  823.         end
  824.     elseif spell.type == "Waltz" then
  825.         refine_waltz(spell,action)
  826.         equip(sets.Waltz)
  827.     elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
  828.         cast_delay(0.2)
  829.         send_command('cancel Sneak')
  830.     end
  831. end
  832.  
  833.         --------------
  834.         -- Mid-Cast --
  835.         --------------
  836.  
  837. function midcast(spell,action)
  838.     equipSet = {}
  839.     if spell.action_type == 'Magic' then
  840.         equipSet = sets.Midcast
  841.         if spell.english:startswith('Absorb') then
  842.             equipSet = equipSet.Absorb
  843.         elseif spell.english:startswith('Drain') or spell.english:startswith('Aspir') then
  844.             equipSet = equipSet.Drain
  845.         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
  846.             equipSet = sets.Haste
  847.         elseif spell.english == "Stoneskin" then
  848.             if buffactive.Stoneskin then
  849.                 send_command('@wait 1.7;cancel stoneskin')
  850.             end
  851.             equipSet = equipSet.Stoneskin
  852.         elseif spell.english == "Sneak" then
  853.             if spell.target.name == player.name and buffactive['Sneak'] then
  854.                 send_command('cancel sneak')
  855.             end
  856.             equipSet = equipSet.Haste
  857.         elseif spell.english:startswith('Utsusemi') then
  858.             if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)'] or buffactive['Copy Image (3)']) then
  859.                 send_command('@wait 1.7;cancel Copy Image*')
  860.             end
  861.             equipSet = equipSet.Haste
  862.         elseif spell.english == 'Monomi: Ichi' then
  863.             if buffactive['Sneak'] then
  864.                 send_command('@wait 1.7;cancel sneak')
  865.             end
  866.             equipSet = equipSet.Haste
  867.         else
  868.             if equipSet[spell.english] then
  869.                 equipSet = equipSet[spell.english]
  870.             end
  871.             if equipSet[spell.skill] then
  872.                 equipSet = equipSet[spell.skill]
  873.             end
  874.             if equipSet[spell.type] then
  875.                 equipSet = equipSet[spell.type]
  876.             end
  877.         end
  878.         if spell.english:startswith('Cur') and spell.english ~= "Cursna" then
  879.         if (world.day_element == spell.element or world.weather_element == spell.element) then
  880.                 equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
  881.                 end
  882.                 end
  883.         if spell.skill == 'Elemental Magic' or spell.english:startswith('Aspir') or spell.english:startswith('Drain') then
  884.         if (world.day_element == spell.element or world.weather_element == spell.element) then
  885.                 equipSet = set_combine(equipSet,{waist="Hachirin-no-Obi"})
  886.                 end
  887.                 end
  888.         if spell.skill == 'Dark Magic' and buffactive["Nether Void"] then
  889.                 equipSet = set_combine(equipSet,{legs="Heath. Flanchard +1"})
  890.                 end
  891.     elseif equipSet[spell.english] then
  892.         equipSet = equipSet[spell.english]
  893.     end
  894.     equip(equipSet)
  895. end
  896.  
  897.         ----------------
  898.         -- After-Cast --
  899.         ----------------
  900.  
  901. function aftercast(spell,action)
  902.     if not spell.interrupted then
  903.         if spell.type == "WeaponSkill" then
  904.             send_command('wait 0.2;gs c TP')
  905.         elseif spell.english == "Sleep II" then -- Sleep II Countdown --
  906.             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.]')
  907.         elseif spell.english == "Sleep" or spell.english == "Sleepga" then -- Sleep Countdown --
  908.             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.]')
  909.         end
  910.     end
  911.     status_change(player.status)
  912. end
  913.  
  914.         -------------------
  915.         -- Status Change --
  916.         -------------------
  917.  
  918. function status_change(new,old)
  919.     if Armor == 'PDT' then
  920.         equip(sets.PDT)
  921.     elseif Armor == 'MDT' then
  922.         equip(sets.MDT)
  923.     elseif new == 'Engaged' then
  924.         equipSet = sets.TP
  925.         if Armor == 'Hybrid' and equipSet["Hybrid"] then
  926.             equipSet = equipSet["Hybrid"]
  927.         end
  928.         if equipSet[WeaponArray[WeaponIndex]] then
  929.             equipSet = equipSet[WeaponArray[WeaponIndex]]
  930.         end
  931.         if equipSet[player.sub_job] then
  932.             equipSet = equipSet[player.sub_job]
  933.         end
  934.         if equipSet[AccArray[AccIndex]] then
  935.             equipSet = equipSet[AccArray[AccIndex]]
  936.         end
  937.         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
  938.             equipSet = equipSet["HighHaste"]
  939.         end
  940.         if buffactive["Samurai Roll"] and equipSet["STP"] and Samurai_Roll == 'ON' then
  941.             equipSet = equipSet["STP"]
  942.         end
  943.         equip(equipSet)
  944.     else
  945.         equipSet = sets.Idle
  946.         if equipSet[IdleArray[IdleIndex]] then
  947.             equipSet = equipSet[IdleArray[IdleIndex]]
  948.         end
  949.         if equipSet[WeaponArray[WeaponIndex]] then
  950.             equipSet = equipSet[WeaponArray[WeaponIndex]]
  951.         end
  952.         if equipSet[player.sub_job] then
  953.             equipSet = equipSet[player.sub_job]
  954.         end
  955.         if buffactive['Reive Mark'] then -- Equip Ygnas's Resolve +1 During Reive --
  956.             equipSet = set_combine(equipSet,{neck="Ygnas's Resolve +1"})
  957.         end
  958.         equip(equipSet)
  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 == 'Ragnarok' then -- Ragnarok AM3 Timer/Countdown --
  969.         if gain then
  970.                 add_to_chat(158,'Ragnarok Aftermath: [ON]')
  971.         else
  972.                 add_to_chat(123,'Aftermath: [OFF]')
  973.                 end
  974.         elseif buff_table['id'] == 273 and player.equipment.main == 'Apocalypse' then -- Apocalypse AM3 Timer/Countdown --
  975.         if gain then
  976.                 add_to_chat(158,'Apocalypse Aftermath: [ON]')
  977.         else
  978.                 add_to_chat(123,'Aftermath: [OFF]')
  979.                 end
  980.                 elseif buff_table['id'] == 51 then -- Blood Weapon Timer --
  981.         if gain then
  982.                 send_command('timers create "Blood Weapon" 40 down')
  983.         else
  984.                 send_command('timers delete "Blood Weapon"')
  985.                 end    
  986.         elseif buff_table['id'] == 497 then -- Soul Enslavement Timer --
  987.         if gain then
  988.                 send_command('timers create "Soul Enslavement" 30 down')
  989.         else
  990.                 send_command('timers delete "Soul Enslavement"')
  991.                 end        
  992.         elseif buff_table['id'] == 434 then -- Brew Timer --
  993.         if gain then
  994.                 send_command('timers create "Transcendency" 180 down')
  995.         else
  996.                 send_command('timers delete "Transcendency"')
  997.                 add_to_chat(123,'Transcendency: [OFF]')
  998.                 end            
  999.         elseif buff_table['id'] == 1 then -- Weakness Timer --
  1000.         if gain then
  1001.                 send_command('timers create "Weakness" 300 up')
  1002.         else
  1003.                 send_command('timers delete "Weakness"')
  1004.                 add_to_chat(158,'Weakness: [OFF]')
  1005.                 end
  1006.         elseif buff_table['id'] == 15 then -- Doom Party Chat --
  1007.         if gain then
  1008.                 send_command('input /party Doom')
  1009.         else
  1010.                 send_command('input /party Doom off')
  1011.                 add_to_chat(158,'Doom: [OFF]')
  1012.                 end
  1013.         elseif buff_table['id'] == 9 then -- Curse Party Chat --
  1014.         if gain then
  1015.                 send_command('input /party Curse')
  1016.         else
  1017.                 add_to_chat(158,'Curse: [OFF]')
  1018.                 end
  1019.         elseif buff_table['id'] == 14 or buff_table['id'] == 17 then -- Charm Party Chat --
  1020.         if gain then
  1021.                 send_command('input /party Charmed')
  1022.         else
  1023.                 send_command('input /party Charm off')
  1024.                 add_to_chat(158,'Charm: [OFF]')
  1025.                 end
  1026.         elseif buff_table['id'] == 4 then -- Paralysis Party Chat --
  1027.         if gain then
  1028.                 add_to_chat(123,'Paralyzed!')
  1029.         else
  1030.                 add_to_chat(158,'Paralysis: [OFF]')
  1031.                 end            
  1032.         elseif buff_table['id'] == 64 then -- Last Resort --
  1033.         if not gain then
  1034.                 add_to_chat(123,'Last Resort: [OFF]')
  1035.                 end
  1036.         elseif buff_table['id'] == 75 then -- Arcane Circle --
  1037.         if not gain then
  1038.                 add_to_chat(123,'Arcane Circle: [OFF]')
  1039.                 end
  1040.         elseif buff_table['id'] == 63 then -- Souleater --
  1041.         if not gain then
  1042.                 add_to_chat(123,'Souleater: [OFF]')
  1043.                 end    
  1044.         elseif buff_table['id'] == 346 then -- Diabolic Eye --
  1045.         if not gain then
  1046.                 add_to_chat(123,'Diabolic Eye: [OFF]')
  1047.                 end
  1048.         elseif buff_table['id'] == 353 then -- Hasso --
  1049.         if not gain then
  1050.                 add_to_chat(123,'Hasso: [OFF]')
  1051.                 end                        
  1052.         elseif buff_table['id'] == 56 then -- Berserk --
  1053.         if not gain then
  1054.                 add_to_chat(123,'Berserk: [OFF]')
  1055.                 end
  1056.         elseif buff_table['id'] == 58 then -- Aggressor --
  1057.         if not gain then
  1058.                 add_to_chat(123,'Aggressor: [OFF]')
  1059.                 end
  1060.         elseif buff_table['id'] == 68 then -- Warcry --
  1061.         if not gain then
  1062.                 add_to_chat(123,'Warcry: [OFF]')
  1063.                 end            
  1064.         elseif buff_table['id'] == 33 then -- Haste --
  1065.         if not gain then
  1066.                 add_to_chat(123,'Haste: [OFF]')
  1067.                 end    
  1068.         elseif buff_table['id'] == 288 then -- EnDark --
  1069.         if not gain then
  1070.                 add_to_chat(123,'EnDark: [OFF]')
  1071.                 end                
  1072.         elseif buff_table['id'] == 173 then -- Dread Spikes --
  1073.         if not gain then
  1074.                 add_to_chat(123,'Dread Spikes: [OFF]')
  1075.                 end  
  1076.         elseif buff_table['id'] == 88 then -- Max HP Boost (Drain II & III) --
  1077.         if not gain then
  1078.                 add_to_chat(123,'Max HP Boost: [OFF]')
  1079.                 end  
  1080.         elseif buff_table['id'] == 13  then    -- Slow --
  1081.         if gain then
  1082.                 add_to_chat(123,'Slowed!')
  1083.                 else
  1084.                 add_to_chat(158,'Slow: [OFF]')
  1085.                 end
  1086.         elseif buff_table['id'] == 251 then -- Food --
  1087.         if not gain then
  1088.                 add_to_chat(123,'Food: [OFF]')
  1089.                 end
  1090.         elseif buff_table['id'] == 28 then -- Terror --
  1091.         if not gain then
  1092.                 add_to_chat(158,'Terror: [OFF]')
  1093.                 end
  1094.         elseif buff_table['id'] == 10 then -- Stun --
  1095.         if not gain then
  1096.                 add_to_chat(158,'Stun: [OFF]')
  1097.                 end    
  1098.         elseif buff_table['id'] == 16 then -- Amnesia --
  1099.         if not gain then
  1100.                 add_to_chat(158,'Amnesia: [OFF]')
  1101.                 end                
  1102.         elseif buff_table['id'] == 2 or buff_table['id'] == 19 then -- Sleep --
  1103.         if gain then
  1104.                 send_command('input /party ZZZ')
  1105.         else
  1106.                 add_to_chat(158,'Sleep: [OFF]')
  1107.                 end        
  1108.         end
  1109.         if buffactive.Terror or buffactive.Stun or buffactive.Petrification or buffactive.Sleep and gain then -- Lock PDT When You Are Terrorised/Stunned/Petrified/Slept --
  1110.                 equip({
  1111.                 ammo="Staunch Tathlum",
  1112.                 head="Sulevia's Mask +2",
  1113.                 neck="Loricate Torque +1",
  1114.                 ear1="Ethereal Earring",           
  1115.                 ear2="Cryptic Earring",
  1116.                 body="Sulevia's Plate. +1",
  1117.                 hands="Sulev. Gauntlets +2",
  1118.                 ring1="Defending Ring",        
  1119.                 ring2="Moonbeam Ring",
  1120.                 back="Moonbeam Cape",
  1121.                 waist="Tempus Fugit",
  1122.                 legs="Sulevi. Cuisses +1",
  1123.                 feet="Sulev. Leggings +2"})
  1124.         else
  1125.         if not midaction() then
  1126.                 status_change(player.status)
  1127.                 end
  1128.         end
  1129. end
  1130.  
  1131.         -------------------------------------------------------------------------------------
  1132.         -- In Game: //gs c (command), Macro: /console gs c (command), Bind: gs c (command) --
  1133.         -------------------------------------------------------------------------------------
  1134.  
  1135.         function self_command(command)
  1136.     if command == 'acc' then -- Accuracy Level Toggle --
  1137.         AccIndex = (AccIndex % #AccArray) + 1
  1138.         status_change(player.status)
  1139.         add_to_chat(155,'Accuracy Level: '..AccArray[AccIndex])
  1140.     elseif command == 'weapon' then -- Main Weapon Toggle --
  1141.         WeaponIndex = (WeaponIndex % #WeaponArray) + 1
  1142.         add_to_chat(155,'Main Weapon: '..WeaponArray[WeaponIndex])
  1143.         status_change(player.status)
  1144.     elseif command == 'update' then -- Auto Update Gear Toggle --
  1145.         status_change(player.status)
  1146.         add_to_chat(155,'-[Gear Update]-')
  1147.         add_to_chat(155,'Weapon: '..WeaponArray[WeaponIndex])
  1148.         add_to_chat(155,'Accuracy Level: ' .. AccArray[AccIndex])
  1149.         add_to_chat(155,'Idle Set: ' .. IdleArray[IdleIndex])
  1150.     elseif command == 'hybrid' then -- Hybrid Toggle --
  1151.         if Armor == 'Hybrid' then
  1152.             Armor = 'None'
  1153.             add_to_chat(123,'Hybrid Set: [Unlocked]')
  1154.         else
  1155.             Armor = 'Hybrid'
  1156.             add_to_chat(158,'Hybrid Set: '..AccArray[AccIndex])
  1157.         end
  1158.         status_change(player.status)
  1159.     elseif command == 'pdt' then -- PDT Toggle --
  1160.         if Armor == 'PDT' then
  1161.             Armor = 'None'
  1162.             add_to_chat(123,'PDT Set: [Unlocked]')
  1163.         else
  1164.             Armor = 'PDT'
  1165.             add_to_chat(158,'PDT Set: [Locked]')
  1166.         end
  1167.         status_change(player.status)
  1168.     elseif command == 'mdt' then -- MDT Toggle --
  1169.         if Armor == 'MDT' then
  1170.             Armor = 'None'
  1171.             add_to_chat(123,'MDT Set: [Unlocked]')
  1172.         else
  1173.             Armor = 'MDT'
  1174.             add_to_chat(158,'MDT Set: [Locked]')
  1175.         end
  1176.         status_change(player.status)
  1177.     elseif command == 'distance' then -- Distance Toggle --
  1178.         if player.target.distance then
  1179.             target_distance = math.floor(player.target.distance*10)/10
  1180.             add_to_chat(158,'Distance: '..target_distance)
  1181.         else
  1182.             add_to_chat(123,'No Target Selected')
  1183.         end
  1184.     elseif command == 'idle' then -- Idle Toggle --
  1185.         IdleIndex = (IdleIndex % #IdleArray) + 1
  1186.         status_change(player.status)
  1187.         add_to_chat(158,'Idle Set: '..IdleArray[IdleIndex])
  1188.     elseif command == 'TP' then
  1189.         add_to_chat(155,'TP Return: ['..tostring(player.tp)..']')
  1190.     elseif command:match('^SC%d$') then
  1191.         send_command('//' .. sc_map[command])
  1192.     end
  1193. end
  1194.     -----------
  1195.     -- Misc. --
  1196.     -----------
  1197.    
  1198. function find_player_in_alliance(name)
  1199.     for i,v in ipairs(alliance) do
  1200.         for k,p in ipairs(v) do
  1201.             if p.name == name then
  1202.                 return p
  1203.             end
  1204.         end
  1205.     end
  1206. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement