Advertisement
Guest User

Untitled

a guest
Sep 20th, 2014
737
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 31.85 KB | None | 0 0
  1.        --Gearswap file for Samurai(FFXI) by meh(01/Zerowone/ERC8D)
  2.      
  3.     --Gearset advice and TP layout approach advised by Bismarck.Keityan
  4.     --Also thanks to Lakshmi.Jassik for crunching out TP returns because I am lazy.
  5.     --The update on 06/17/14 made  Jassiks math (pre update values) not so accurate. ^_^
  6.      
  7.     --Highly recommend reviewing gearsets and replacing with personal items.
  8.      
  9.     --Also recommend changing key bind keys since everyone's keyboard and play style are different. ^ = CTRL, != ALT.
  10.      
  11.     function get_sets()
  12.      
  13.     --KeyBinds for toggle commands found in self_command function
  14.     --F9-(Standard) TPset1,TPset2, TPset3, TPset4
  15.     --F10-(Accuracy) TPAcc1, TPAcc2
  16.     --F11-(Melee Accuracy WS) Standard,Accuracy,
  17.     --F12-(DT) Melee Hybrid, MDEF
  18.      
  19.      
  20.     --ALT+F10 -(Ranged TP) Reg, Acc, HiAcc
  21.     --ALT+F11-(Ranged WS) Reg, Acc, HiAcc
  22.     --ALT+F12- Turtle+Kite(Danzo+PDT set)&(Danzo+MDT set)
  23.      
  24.             send_command('bind f9 gs c toggle TP set')
  25.             send_command('bind f10 gs c toggle Acc set')
  26.             send_command('bind f11 gs c toggle WeaponSkill sets')
  27.             send_command('bind f12 gs c toggle DT set')
  28.      
  29.             send_command('bind !f10 gs c toggle RA set')
  30.             send_command('bind !f11 gs c toggle RA WS sets')
  31.             send_command('bind !f12 gs c toggle DTKite set')
  32.      
  33.     --CTR+F9 (Toggles Berserker's Torque on and off)
  34.     --CTRL+F10 (Toggles Twilight Armor on and off)
  35.      
  36.             send_command('bind ^f9 gs c toggle BerT set')  
  37.             send_command('bind ^f10 gs c toggle Twi set')  
  38.                    
  39.     --CTRL+F12 -(Fillmode Toggle)
  40.             send_command('bind ^f12 input //fillmode')
  41.      
  42.     -- Windower Keybinds for Job Abilities.
  43.     --ctrl+` = Hasso
  44.     --alt+` = Seigan
  45.      
  46.             send_command('bind ^` input /ja Hasso <me>')
  47.             send_command('bind !` input /ja Seigan <me>')
  48.      
  49.     function file_unload()
  50.            
  51.             send_command('unbind f9')
  52.             send_command('unbind f10')
  53.             send_command('unbind f11')
  54.             send_command('unbind f12')
  55.      
  56.             send_command('unbind !f10')
  57.             send_command('unbind !f11')
  58.             send_command('unbind !f12')
  59.            
  60.             send_command('unbind ^`')
  61.             send_command('unbind !`')
  62.            
  63.             send_command('unbind ^f9')
  64.             send_command('unbind ^f12')
  65.      
  66.     end
  67.            
  68.     --Job Ability sets for Precast and Midcast Functions--
  69.            
  70.     sets.JA = {}
  71.                     sets.JA['Meikyo Shisui'] = {feet="Sakonji Sune-Ate +1"}
  72.                     sets.JA['Third Eye'] = {legs="Sakonji Haidate +1"}
  73.                     sets.JA['Hasso'] = {hands="Wakido Kote +1"}
  74.                     sets.JA['Meditate'] = {head="Myochin Kabuto",hands="Sakonji Kote"}
  75.                     sets.JA['Shikikoyo'] = {legs="Sakonji Haidate +1"}
  76.                     sets.JA['Blade Bash'] = {hands="Sakonji Kote"}
  77.                     sets.JA['Sengikori'] = {feet="Unkai Sune-Ate +2"}
  78.                     sets.JA['Sekkanoki'] = {hands="Unkai Kote +2"}
  79.                     sets.JA['Seigan'] = {legs="Sakonji Haidate +1"}
  80.      
  81.      
  82.     --TP Sets--
  83.      
  84.     --As Monday 06/16/14 TP values will have to be slightly adjusted due to new TP UI.
  85.      
  86.     -- Anahera Blade = 494 Delay (if using Lentus Grip = 518.7 Delay). Ideal to have 52-53 STP in gear to 4 hit
  87.      
  88.     -- Tsurumaru & Kogarasumaru = 450 Delay (if using Lentus Grip = 472.5 Delay)
  89.      
  90.     -- Tsurumaru : With Ionis ideal to have + 49 STP in gear
  91.     -- Kogarasumaru: Ideal to have +36 STP in gear to 5 hit
  92.      
  93.     -- Amanomurakumo & Masamune = 437 Delay (if using Lentus Grip = 458.85)
  94.      
  95.     -- Amanomurakumo: Ideal to have +44 STP in gear to 5 hit
  96.     -- Masamune: Ideal to have +44 STP in gear to 5 hit
  97.      
  98.     --Range and Ammo slots do not need to be defined as long as the user preferred weapon and ammo are already equipped--
  99.     --Assuming user is using either Cibitshavore Path C or Yoichinoyumi as ranged weapon--
  100.      
  101.     sets.TP = {}
  102.     sets.TP.index = {'TP1','TP2','TP3','TP4','Acc1','Acc2','PDT','MDT','DTK','MDK'}
  103.     TP_Index = 1
  104.      
  105.     --65 STP
  106.     sets.TP.TP1 = {head="Sakonji Kabuto +1",neck="Ganesha's Mala",ear1="Brutal Earring",ear2="Tripudio Earring",
  107.                    body="Sakonji Domaru +1",hands="Wakido Kote +1",ring1="Rajas Ring",ring2="K'ayres Ring",
  108.                    back="Takaha Mantle",waist="Windbuffet Belt +1",legs="Otronif Brais +1",feet="Otronif Boots +1"}
  109.      
  110.     --58 STP                              
  111.     sets.TP.TP2 = set_combine(sets.TP.TP1,{head="Otomi Helm",waist="Windbuffet Belt +1",legs="Wakido Haidate +1",feet="Ejekamal Boots"})
  112.      
  113.     --53 STP
  114.     sets.TP.TP3 = set_combine(sets.TP.TP2,{feet={"Otronif Boots +1",augments={"DA +2"}}})
  115.      
  116.     --47 STP
  117.     sets.TP.TP4 = set_combine(sets.TP.TP3,{ear1="Trux Earring"})
  118.      
  119.     --37 STP
  120.     sets.TP.Acc1 = {head="Yaoyotl Helm",neck="Iqabi Necklace",ear1="Steelflash Earring",ear2="Bladeborn Earring",
  121.                     body="Sakonji Domaru +1",hands="Wakido Kote +1",ring1="Rajas Ring",ring2="K'ayres Ring",
  122.                     back="Takaha Mantle",waist="Olseni Belt",legs="Wakido Haidate +1",
  123.                     feet="Wakido Sune-Ate +1"}
  124.      
  125.     --21 STP                                
  126.     sets.TP.Acc2 = set_combine(sets.TP.Acc1,{ring1="Patricius Ring",ring2="Mars's Ring",legs="Xaddi Cuisses"})                            
  127.      
  128.      
  129.     sets.TP.PDT = {head="Lithelimb Cap",neck="Twilight Torque",ear1="Brutal Earring",ear2="Tripudio Earring",
  130.                    body="Xaddi Mail",hands="Buremte gloves",ring1="Defending Ring",ring2="Dark Ring",
  131.                    back="Mollusca Mantle",waist="Flume Belt",legs="Otronif brais +1",feet="Otronif Boots +1"}
  132.      
  133.     sets.TP.MDT = {head="Lithelimb Cap",neck="Twilight Torque",ear1="Sanare Earring",ear2="Mujin Stud",
  134.                    body="Otronif Harness +1",hands="Wakido Kote +1",ring1="Defending Ring",ring2="Shadow Ring",
  135.                    back="Engulfer Cape",belt="Flume Belt",legs="Otronif Brais +1",feet="Otronif Boots +1"}
  136.      
  137.     sets.TP.DTK = set_combine(sets.TP.PDT,{feet="Danzo Sune-Ate"})
  138.      
  139.     sets.TP.MDK = set_combine(sets.TP.MDT,{feet="Danzo Sune-Ate"})
  140.      
  141.      
  142.     --Range TP--
  143.     sets.Utility = {}
  144.      
  145.     sets.Utility.Snapshot = {head="Zha'Go's Barbut",neck="Iqabi Necklace",ear1="Clearview Earring",ear2="Matanki Earring",
  146.                  body="Nuevo Coselete",hands="Unkai Kote +2",ring1="Hajduk Ring +1",ring2="Hajduk Ring +1",
  147.                  back="Jaeger Mantle",waist="Buccaneer's Belt",legs="Mustela Brais",feet="Wakido Sune-Ate +1"}
  148.      
  149.     sets.RA = {}
  150.     sets.RA.index = {'Reg','Acc','HiAcc'}
  151.     RA_Index = 1
  152.      
  153.     sets.RA.Reg = {head="Sakonji Kabuto +1",neck="Iqabi Necklace",ear1="Clearview Earring",ear2="Matanki Earring",
  154.                    body="Kyujutsugi",hands="Unkai Kote +2",ring1="Rajas Ring",ring2="Hajduk Ring +1",      
  155.                    back="Thall Mantle",waist="Buccaneer's Belt",legs="Wakido Haidate",feet="Wakido Sune-Ate +1"}
  156.      
  157.     sets.RA.Acc = set_combine(sets.RA.Reg,{ring1="Hajduk Ring +1",legs="Wakido Haidate +1"})
  158.      
  159.     sets.RA.HiAcc = set_combine(sets.RA.Acc,{hands="Buremte Gloves",back="Jaeger Mantle",legs="Aetosaur Trousers +1"})
  160.      
  161.      
  162.     --Weaponskill Sets--
  163.      
  164.     --As of Monday 06/16/14, the Majority of Great Katana Weaponskills are modified by STR
  165.     sets.WS = {}
  166.     sets.WS.index = {'Reg','Acc'}
  167.     WS_Index = 1
  168.      
  169.     --Gear is just for example, can be and should be swapped with personal items.          
  170.     sets.WS.Reg = {head="Otomi helm",neck="Justiciar's Torque",ear1="Brutal earring",ear2="Moonshade earring",
  171.                    body="Phorcys Korazin",hands="Mikinaak gauntlets",ring1="Strigoi Ring",ring2="Ifrit Ring +1",
  172.                    back="Buquwik cape",waist="Metalsinger Belt",legs="Scuffler's Cosciales",feet="Ejekamal Boots"}
  173.                                            
  174.     sets.WS.Acc = {head="Otomi Helm",neck="Iqabi Necklace",ear1="Brutal earring",ear2="Moonshade earring",
  175.                    body="Sakonji Domaru +1",hands="Miki. Guantlets",ring1="Strigoi ring",ring2="Ifrit Ring +1",
  176.                    back="Takaha Mantle",waist="Metalsinger Belt",legs="Scuffler's Cosciales",feet="Sakonji sune-ate +1"}
  177.                    
  178.     --Tachi: Shoha--
  179.     sets.Shoha = {}
  180.     sets.Shoha.index = {'Reg','Acc'}
  181.     Shoha_Index = 1
  182.            
  183.     sets.Shoha.Reg = {head="Otomi helm",neck="Ganesha's Mala",ear1="Brutal earring",ear2="Moonshade earring",
  184.                       body="Sakonji Domaru +1",hands="Miki. Gauntlets",ring1="Strigoi Ring",ring2="Ifrit Ring +1",
  185.                       back="Buquwik Cape",waist="Metalsinger Belt",legs="Scuffler's Cosciales",feet="Ejekamal Boots"}
  186.                                                                      
  187.     sets.Shoha.Acc = {head="Otomi Helm",neck="Breeze Gorget",ear1="Brutal earring",ear2="Moonshade earring",
  188.                       body="Sakonji Domaru +1",hands="Miki. Gauntlets",ring1="Strigoi Ring",ring2="Ifrit Ring +1",
  189.                       back="Letalis Mantle",waist="Metalsinger Belt",legs="Scuffler's Cosciales",feet="Wakido Sune-Ate +1"}
  190.                    
  191.     --Tachi: Fudo--
  192.                    
  193.     sets.Fudo = {}
  194.     sets.Fudo.index = {'Reg','Acc'}
  195.     Fudo_Index = 1
  196.            
  197.     sets.Fudo.Reg = {head="Otomi helm",neck="Light Gorget",ear1="Brutal earring",ear2="Moonshade earring",
  198.                      body="Phorcys Korazin",hands="Miki. Gauntlets",ring1="Strigoi Ring",ring2="Ifrit Ring +1",
  199.                      back="Buquwik cape",waist="Metalsinger Belt",legs="Scuffler's Cosciales",feet="Sakonji sune-ate +1"}
  200.                                                                
  201.     sets.Fudo.Acc = {head="Yaoyotl Helm",neck="Light Gorget",ear1="Brutal earring",ear2="Moonshade earring",
  202.                      body="Sakonji Domaru +1",hands="Miki. Gauntlets",ring1="Strigoi Ring",ring2="Ifrit Ring +1",
  203.                      back="Buquwik cape",waist="Metalsinger belt",legs="Scuffler's Cosciales",feet="Wakido Sune-Ate +1"}
  204.      
  205.     --Tachi: Kaiten --
  206.      
  207.     sets.Kaiten = {}
  208.     sets.Kaiten.index = {'Reg','Acc'}
  209.     Kaiten_Index = 1
  210.      
  211.     sets.Kaiten.Reg = set_combine(sets.Fudo.Reg,{ear2="Vulcan's Pearl"})
  212.      
  213.     sets.Kaiten.Acc = {head="Yaoyotl helm",neck="Light Gorget",ear1="Brutal earring",ear2="Moonshade earring",
  214.                        body="Mes'yohi Haubergeon",hands="Miki. Gauntlets",ring1="Candent Ring",ring2="Pyrosoul Ring",
  215.                        back="Buquwik cape",waist="Light belt",legs="Miki. Cuisses",feet="Wakido Sune-Ate +1"}
  216.                                      
  217.     --Apex Arrow--
  218.     --Range and Ammo slots do not need to be defined as long as the user preferred weapon and ammo are already equipped--
  219.      
  220.     sets.Apex = {}
  221.     sets.Apex.index = {'Reg','Acc','HiAcc'}
  222.     Apex_Index = 1
  223.                    
  224.     sets.Apex.Reg = {head="Sakonji Kabuto +1",neck="Breeze Gorget",ear1="Moonshade Earring",ear2="Clearview Earring",
  225.                      body="Kyujutsugi",hands="Unkai Kote +2",ring1="Stormsoul Ring",ring2="Stormsoul Ring",
  226.                      back="Ik Cape",waist="Light Belt",legs="Wakido Haidate +1",feet="Wakido Sune-Ate +1"}
  227.                    
  228.     sets.Apex.Acc = {head="Sakonji Kabuto +1",neck="Iqabi Necklace",ear1="Clearview Earring",ear2="Matanki Earring",
  229.                      body="Kyujutsugi",hands="Unkai Kote +2",ring1="Hajduk Ring +1",ring2="Stormsoul Ring",
  230.                      back="Thall Mantle",waist="Buccaneer's Belt",legs="Wakido Haidate +1",feet="Wakido Sune-Ate +1"}
  231.                                      
  232.     sets.Apex.HiAcc =set_combine(sets.Apex.Acc,{hands="Buremte Gloves",ring2="Hajduk Ring +1",
  233.                     back="Jaeger Mantle",legs="Aetosaur Trousers +1"})                              
  234.                    
  235.     --Namas Arrow--
  236.     sets.Nama = {}
  237.     sets.Nama.index = {'Reg','Acc','HiAcc'}
  238.     Nama_Index = 1
  239.                    
  240.     sets.Nama.Reg = {head="Sakonji Kabuto +1",neck="Light Gorget",ear1="Flame Pearl",ear2="Flame Pearl",
  241.                      body="Phorcys Korazin",hands="Unkai Kote +2",ring1="Rajas Ring",ring2="Ifrit Ring +1",
  242.                      back="Buquwik Cape",waist="Light belt",legs="Wakido Haidate +1",feet="Wakido Sune-Ate +1"}
  243.                                            
  244.     sets.Nama.Acc = {head="Sukeroku Hachimaki",neck="Iqabi Necklace",ear1="Clearview Earring",ear2="Matanki Earring",
  245.                      body="Kyujutsugi",hands="Unkai Kote +2",ring1="Pyrosoul Ring",ring2="Hajduk Ring +1",
  246.                      back="Thall Mantle",waist="Buccaneer's Belt",legs="Wakido Haidate +1",feet="Wakido Sune-Ate +1"}
  247.      
  248.     sets.Nama.HiAcc = set_combine(sets.Nama.Acc,{hands="Buremte Gloves",ring1="Hajduk Ring +1",
  249.                     back="Jaeger Mantle",legs="Aetosaur Trousers +1"})
  250.                                                                    
  251.      
  252.     --Twilight/Zombie mode--
  253.      
  254.     sets.Twi = {}
  255.     sets.Twi.index = {'Off','On'}
  256.     Twi_Index = 1
  257.      
  258.     sets.Twi.Off = sets.TP[sets.TP.index[TP_Index]]
  259.     sets.Twi.On = set_combine(sets.TP[sets.TP.index[TP_Index]],{head="Twilight Helm",body="Twilight Mail"})                                                
  260.                                                                    
  261.     --Berserker Torque--
  262.     sets.BerT = {}
  263.     sets.BerT.index = {'Off','On'}
  264.     BerT_Index = 1
  265.      
  266.     sets.BerT.Off = sets.TP[sets.TP.index[TP_Index]]
  267.     sets.BerT.On = set_combine(sets.TP[sets.TP.index[TP_Index]],{neck="Berserker's Torque"})
  268.      
  269.                                                                    
  270.     end
  271.      
  272.     function precast(spell,act)
  273.             if spell.type == 'JobAbility' then
  274.                     if sets.JA[spell.english] then
  275.                             equip(sets.JA[spell.english])
  276.                     end
  277.             end
  278.            
  279.             if spell.name == 'Ranged' then
  280.                     equip(sets.Utility.Snapshot)
  281.             end
  282.      
  283.             if spell.type == 'WeaponSkill' then
  284.                     equip(sets.WS[sets.WS.index[WS_Index]])
  285.             end
  286.            
  287.             if spell.english == "Tachi: Shoha" then
  288.                     equip(sets.Shoha[sets.Shoha.index[Shoha_Index]])
  289.             end
  290.            
  291.             if spell.english == "Tachi: Fudo" then
  292.                     equip(sets.Fudo[sets.Fudo.index[Fudo_Index]])
  293.             end
  294.            
  295.             if spell.english == "Tachi: Kaiten" then
  296.                     equip(sets.Kaiten[sets.Kaiten.index[Kaiten_Index]])
  297.             end    
  298.                    
  299.             if spell.english == "Apex Arrow" then
  300.                     equip(sets.Apex[sets.Apex.index[Apex_Index]])
  301.             end
  302.            
  303.             if spell.english == "Namas Arrow" then
  304.                     equip(sets.Nama[sets.Nama.index[Nama_Index]])
  305.             end
  306.      
  307.             if buffactive['Meikyo Shisui'] and spell.type == 'WeaponSkill' then
  308.                     equip(sets.WS[sets.WS.index[WS_Index]],sets.JA['Meikyo Shisui'])
  309.             end
  310.      
  311.             if buffactive['Meikyo Shisui'] and spell.english == "Tachi: Shoha" then
  312.                     equip(sets.Shoha[sets.Shoha.index[Shoha_Index]],sets.JA['Meikyo Shisui'])
  313.             end
  314.      
  315.             if buffactive['Meikyo Shisui'] and spell.english == "Tachi: Fudo" then
  316.                     equip(sets.Fudo[sets.Fudo.index[Fudo_Index]],sets.JA['Meikyo Shisui'])
  317.             end
  318.      
  319.             if buffactive['Meikyo Shisui'] and spell.english == "Tachi: Kaiten" then
  320.                     equip(sets.Kaiten[sets.Kaiten.index[Kaiten_Index]],sets.JA['Meikyo Shisui'])
  321.             end
  322.      
  323.             if buffactive['Meikyo Shisui'] and spell.english == "Apex Arrow" then
  324.                     equip(sets.Apex[sets.Apex.index[Apex_Index]],sets.JA['Meikyo Shisui'])
  325.             end
  326.      
  327.             if buffactive['Meikyo Shisui'] and spell.english == "Namas Arrow" then
  328.                     equip(sets.Nama[sets.Nama.index[Nama_Index]],sets.JA['Meikyo Shisui'])
  329.             end
  330.      
  331.             if buffactive['Sekkanoki'] and spell.type == 'WeaponSkill' then
  332.                     equip(sets.WS[sets.WS.index[WS_Index]],sets.JA['Sekkanoki'])
  333.             end
  334.      
  335.             if buffactive['Sekkanoki'] and spell.english == "Tachi: Shoha" then
  336.                     equip(sets.Shoha[sets.Shoha.index[Shoha_Index]],sets.JA['Sekkanoki'])
  337.             end
  338.            
  339.             if buffactive['Sekkanoki'] and spell.english == "Tachi: Fudo" then
  340.                     equip(sets.Fudo[sets.Fudo.index[Fudo_Index]],sets.JA['Sekkanoki'])
  341.             end
  342.      
  343.             if buffactive['Sekkanoki'] and spell.english == "Tachi: Kaiten" then
  344.                     equip(sets.Kaiten[sets.Kaiten.index[Kaiten_Index]],sets.JA['Sekkanoki'])
  345.             end
  346.      
  347.             if buffactive['Sekkanoki'] and spell.english == "Apex Arrow" then
  348.                     equip(sets.Apex[sets.Apex.index[Apex_Index]],sets.JA['Sekkanoki'])
  349.             end
  350.      
  351.             if buffactive['Sekkanoki'] and spell.english == "Namas Arrow" then
  352.                     equip(sets.Nama[sets.Nama.index[Nama_Index]],sets.JA['Sekkanoki'])
  353.             end
  354.      
  355.              if buffactive['Sengikori'] and spell.type == 'WeaponSkill' then
  356.                     equip(sets.WS[sets.WS.index[WS_Index]],sets.JA['Sengikori'])
  357.             end
  358.      
  359.              if buffactive['Sengikori'] and spell.english == "Tachi: Shoha" then
  360.                     equip(sets.Shoha[sets.Shoha.index[Shoha_Index]],sets.JA['Sengikori'])
  361.             end
  362.      
  363.              if buffactive['Sengikori'] and spell.english == "Tachi: Fudo" then
  364.                     equip(sets.Fudo[sets.Fudo.index[Fudo_Index]],sets.JA['Sengikori'])
  365.             end
  366.      
  367.              if buffactive['Sengikori'] and spell.english == "Tachi: Kaiten" then
  368.                     equip(sets.Kaiten[sets.Kaiten.index[Kaiten_Index]],sets.JA['Sengikori'])
  369.             end
  370.      
  371.              if buffactive['Sengikori'] and spell.english == "Apex Arrow" then
  372.                     equip(sets.Apex[sets.Apex.index[Apex_Index]],sets.JA['Sengikori'])
  373.             end
  374.      
  375.              if buffactive['Sengikori'] and spell.english == "Namas Arrow" then    
  376.                     equip(sets.Nama[sets.Nama.index[Nama_Index]],sets.JA['Sengikori'])
  377.             end    
  378.      
  379.     end    
  380.      
  381.     --Due to speed of Gearswap there are times when gear will swap to the Aftercast conditions without a Midcast condition.
  382.     --This can on occasion cause the desired buffs to Weaponskills and Job Abilities to not occur.
  383.     --Midcast is a mirror of precast due to this--
  384.      
  385.     function midcast(spell,act)
  386.             if spell.type == 'JobAbility' then
  387.                     if sets.JA[spell.english] then
  388.                             equip(sets.JA[spell.english])
  389.                     end
  390.             end
  391.            
  392.             if spell.name == 'Ranged' then
  393.                     equip(sets.RA[sets.RA.index[RA_Index]])
  394.             end
  395.            
  396.             if spell.type == 'WeaponSkill' then
  397.                     equip(sets.WS[sets.WS.index[WS_Index]])
  398.             end
  399.            
  400.             if spell.english == "Tachi: Shoha" then
  401.                     equip(sets.Shoha[sets.Shoha.index[Shoha_Index]])
  402.             end
  403.            
  404.             if spell.english == "Tachi: Fudo" then
  405.                     equip(sets.Fudo[sets.Fudo.index[Fudo_Index]])
  406.             end
  407.            
  408.             if spell.english == "Tachi: Kaiten" then
  409.                     equip(sets.Kaiten[sets.Kaiten.index[Kaiten_Index]])
  410.             end    
  411.                    
  412.             if spell.english == "Apex Arrow" then
  413.                     equip(sets.Apex[sets.Apex.index[Apex_Index]])
  414.             end
  415.            
  416.             if spell.english == "Namas Arrow" then
  417.                     equip(sets.Nama[sets.Nama.index[Nama_Index]])
  418.             end
  419.      
  420.             if buffactive['Meikyo Shisui'] and spell.type == 'WeaponSkill' then
  421.                     equip(sets.WS[sets.WS.index[WS_Index]],sets.JA['Meikyo Shisui'])
  422.             end
  423.      
  424.             if buffactive['Meikyo Shisui'] and spell.english == "Tachi: Shoha" then
  425.                     equip(sets.Shoha[sets.Shoha.index[Shoha_Index]],sets.JA['Meikyo Shisui'])
  426.             end
  427.      
  428.             if buffactive['Meikyo Shisui'] and spell.english == "Tachi: Fudo" then
  429.                     equip(sets.Fudo[sets.Fudo.index[Fudo_Index]],sets.JA['Meikyo Shisui'])
  430.             end
  431.      
  432.             if buffactive['Meikyo Shisui'] and spell.english == "Tachi: Kaiten" then
  433.                     equip(sets.Kaiten[sets.Kaiten.index[Kaiten_Index]],sets.JA['Meikyo Shisui'])
  434.             end
  435.      
  436.             if buffactive['Meikyo Shisui'] and spell.english == "Apex Arrow" then
  437.                     equip(sets.Apex[sets.Apex.index[Apex_Index]],sets.JA['Meikyo Shisui'])
  438.             end
  439.      
  440.             if buffactive['Meikyo Shisui'] and spell.english == "Namas Arrow" then
  441.                     equip(sets.Nama[sets.Nama.index[Nama_Index]],sets.JA['Meikyo Shisui'])
  442.             end
  443.      
  444.             if buffactive['Sekkanoki'] and spell.type == 'WeaponSkill' then
  445.                     equip(sets.WS[sets.WS.index[WS_Index]],sets.JA['Sekkanoki'])
  446.             end
  447.      
  448.             if buffactive['Sekkanoki'] and spell.english == "Tachi: Shoha" then
  449.                     equip(sets.Shoha[sets.Shoha.index[Shoha_Index]],sets.JA['Sekkanoki'])
  450.             end
  451.            
  452.             if buffactive['Sekkanoki'] and spell.english == "Tachi: Fudo" then
  453.                     equip(sets.Fudo[sets.Fudo.index[Fudo_Index]],sets.JA['Sekkanoki'])
  454.             end
  455.      
  456.             if buffactive['Sekkanoki'] and spell.english == "Tachi: Kaiten" then
  457.                     equip(sets.Kaiten[sets.Kaiten.index[Kaiten_Index]],sets.JA['Sekkanoki'])
  458.             end
  459.      
  460.             if buffactive['Sekkanoki'] and spell.english == "Apex Arrow" then
  461.                     equip(sets.Apex[sets.Apex.index[Apex_Index]],sets.JA['Sekkanoki'])
  462.             end
  463.      
  464.             if buffactive['Sekkanoki'] and spell.english == "Namas Arrow" then
  465.                     equip(sets.Nama[sets.Nama.index[Nama_Index]],sets.JA['Sekkanoki'])
  466.             end
  467.      
  468.              if buffactive['Sengikori'] and spell.type == 'WeaponSkill' then
  469.                     equip(sets.WS[sets.WS.index[WS_Index]],sets.JA['Sengikori'])
  470.             end
  471.      
  472.              if buffactive['Sengikori'] and spell.english == "Tachi: Shoha" then
  473.                     equip(sets.Shoha[sets.Shoha.index[Shoha_Index]],sets.JA['Sengikori'])
  474.             end
  475.      
  476.              if buffactive['Sengikori'] and spell.english == "Tachi: Fudo" then
  477.                     equip(sets.Fudo[sets.Fudo.index[Fudo_Index]],sets.JA['Sengikori'])
  478.             end
  479.      
  480.              if buffactive['Sengikori'] and spell.english == "Tachi: Kaiten" then
  481.                     equip(sets.Kaiten[sets.Kaiten.index[Kaiten_Index]],sets.JA['Sengikori'])
  482.             end
  483.      
  484.              if buffactive['Sengikori'] and spell.english == "Apex Arrow" then
  485.                     equip(sets.Apex[sets.Apex.index[Apex_Index]],sets.JA['Sengikori'])
  486.             end
  487.      
  488.              if buffactive['Sengikori'] and spell.english == "Namas Arrow" then    
  489.                     equip(sets.Nama[sets.Nama.index[Nama_Index]],sets.JA['Sengikori'])
  490.             end    
  491.     end
  492.      
  493.     function aftercast(spell,act)
  494.            
  495.             if player.status == 'Engaged' and buffactive['Sekkanoki'] then
  496.                     equip(sets.JA['Sekkanoki'])
  497.             elseif player.status == 'Engaged' then
  498.                     equip(sets.TP[sets.TP.index[TP_Index]])
  499.             end
  500.      
  501.             if player.status == 'Engaged' and buffactive['Meikyo Shisui'] then
  502.                     equip(sets.JA['Meikyo Shisui'])
  503.             elseif player.status == 'Engaged' then
  504.                     equip(sets.TP[sets.TP.index[TP_Index]])
  505.             end
  506.            
  507.             if player.status == 'Engaged' and buffactive['Sengikori'] then
  508.                     equip(sets.JA['Sengikori'])
  509.             elseif player.status == 'Engaged' then
  510.                     equip(sets.TP[sets.TP.index[TP_Index]])
  511.             end    
  512.      
  513.             if player.status == 'Engaged' and (buffactive['Seigan'] or buffactive['Third Eye']) then
  514.                     equip(sets.JA['Seigan'])
  515.             elseif player.status == 'Engaged' then
  516.                     equip(sets.TP[sets.TP.index[TP_Index]])
  517.             end
  518.     end
  519.      
  520.     function buff_change(new)
  521.      
  522.             if buffactive['Sekkanoki'] then
  523.                     equip{hands="Unkai Kote +2"}
  524.             end
  525.            
  526.             if buffactive['Meikyo Shisui'] then
  527.                     equip{feet="Sakonji Sune-Ate +1"}
  528.             end
  529.            
  530.             if buffactive['Sengikori'] then
  531.                     equip{feet="Unkai Sune-Ate +2"}
  532.             end
  533.                    
  534.             if buffactive['Third Eye'] or buffactive['Seigan'] then
  535.                     equip{legs="Sakonji Haidate +1"}
  536.             end
  537.     end
  538.      
  539.      
  540.     function status_change(new,old)
  541.             if new == 'Engaged' then
  542.                     equip(sets.TP[sets.TP.index[TP_Index]])
  543.             end    
  544.      
  545.     --Shouldn't really be needed but if it does arise that you have Sekkanoki active and a fodder mob dies before Weaponskill this will keep Unkai on.            
  546.             if buffactive['Sekkanoki'] and new == 'Engaged' then
  547.                     equip{hands="Unkai Kote +2"}
  548.             end
  549.            
  550.             if buffactive['Meikyo Shisui'] and new == 'Engaged' then
  551.                     equip{feet="Sakonji Sune-Ate +1"}
  552.             end
  553.            
  554.              if buffactive['Sengikori'] and new == 'Engaged' then
  555.                     equip{feet="Unkai Sune-Ate +2"}
  556.             end
  557.      
  558.             if buffactive['Third Eye'] or buffactive['Seigan'] and new == 'Engaged' then
  559.                     equip{feet="Sakonji Haidate +1"}
  560.             end    
  561.     end    
  562.      
  563.      
  564.     --Toggle Command functions--
  565.     --Gearswap direct command = //gs c toggle 'x' set
  566.     --Macro line = /console gs c toggle x set
  567.     --ex: console gs c toggle TP set  or //gs c toggle TP set
  568.            
  569.      
  570.     function self_command(command)
  571.      
  572.     --Separate Toggles to allow user flexibility
  573.      
  574.     --Macro line: /console gs c toggle TP set
  575.     --Chat line: //gs c toggle TP set
  576.     --Toggles between TP1, TP2, TP3, TP4 sets
  577.      
  578.     if command == 'toggle TP set' then
  579.                     if TP_Index < 4 then
  580.                     TP_Index = TP_Index +1
  581.                     else TP_Index = 1 end
  582.                     send_command('@ input /echo >>> TP Sets Changed to: '..sets.TP.index[TP_Index]..' ')
  583.                     equip(sets.TP[sets.TP.index[TP_Index]])
  584.                    
  585.     --Macro line: /console gs c toggle dTP set
  586.     --Chat line: //gs c toggle dTP set
  587.     --Toggles down the index from TP4,TP3,TP2,TP1          
  588.     elseif command == 'toggle dTP set' then
  589.                     if TP_Index < 5 and TP_Index > 1 then
  590.                     TP_Index = TP_Index -1
  591.                     else TP_Index = 4 end
  592.                     send_command('@ input /echo >>> TP Sets Changed to: '..sets.TP.index[TP_Index]..' ')
  593.                     equip(sets.TP[sets.TP.index[TP_Index]])
  594.      
  595.      
  596.     --Macro line: /console gs c toggle Acc set
  597.     --Chat line: //gs c toggle Acc set
  598.     --Toggles between Acc1 and Acc2 sets.
  599.             elseif command == 'toggle Acc set' then
  600.                     if TP_Index < 6 and TP_Index > 4 then
  601.                     TP_Index = TP_Index +1
  602.                     else TP_Index = 5 end
  603.                     send_command('@ input /echo >>> TP Sets Changed to: '..sets.TP.index[TP_Index]..' ')
  604.                     equip(sets.TP[sets.TP.index[TP_Index]])
  605.                    
  606.     --Macro line: /console gs c toggle DT set
  607.     --Chat line: //gs c toggle DT set              
  608.     --Toggles between PDT and MDT sets
  609.            
  610.             elseif command == 'toggle DT set' then
  611.                     if TP_Index < 8 and TP_Index > 6 then
  612.                     TP_Index = TP_Index +1
  613.                     else TP_Index = 7 end
  614.                     send_command('@ input /echo >>> DT Set Changed to: '..sets.TP.index[TP_Index]..' ')
  615.                     equip(sets.TP[sets.TP.index[TP_Index]])
  616.            
  617.     --Macro line: /console gs c toggle DTKite set
  618.     --Chat line: //gs c toggle DTKite set
  619.     --Toggles between the PDT/MDT Kite sets
  620.      
  621.             elseif command == 'toggle DTKite set' then
  622.                     if TP_Index < 10 and TP_Index > 8 then
  623.                     TP_Index = TP_Index +1
  624.                     else TP_Index = 9 end
  625.                     send_command('@ input /echo >>> DTKite Set Changed to: '..sets.TP.index[TP_Index]..' ')
  626.                     equip(sets.TP[sets.TP.index[TP_Index]])
  627.                    
  628.     --Macro line: /console gs c toggle Twi set
  629.     --Chat line: //gs c toggle Twi set
  630.     --Toggles on Twilight Mail and Helm on and off.
  631.      
  632.             elseif command == 'toggle Twi set' then
  633.                     Twi_Index = Twi_Index +1
  634.                     if Twi_Index > #sets.Twi.index then Twi_Index = 1 end
  635.                     send_command('@ input /echo >>> Twilight Set: '..sets.Twi.index[Twi_Index]..' ')
  636.                     equip(sets.Twi[sets.Twi.index[Twi_Index]])
  637.                    
  638.     --Macro line: /console gs c toggle BerT set
  639.     --Chat line: //gs c toggle BerT set
  640.     --Toggles Berserker Torque on and off.
  641.                    
  642.             elseif command == 'toggle BerT set' then
  643.                     BerT_Index = BerT_Index +1
  644.                     if BerT_Index > #sets.BerT.index then BerT_Index = 1 end
  645.                     send_command('@ input /echo >>> Berserker Torque: '..sets.BerT.index[BerT_Index]..' ')
  646.                     equip(sets.BerT[sets.BerT.index[BerT_Index]])
  647.                    
  648.                    
  649.     --All Weaponskill sets are set to the "Reg" gear set by default, switching to "Acc" is hardly needed, but the option is nice to have.
  650.      
  651.     --Macro line: /console gs c toggle WeaponSkill set
  652.     --Chat line: //gs c toggle WeaponSkill set
  653.     --Changes all Melee Weaponskill Indicies at once.
  654.             elseif command == 'toggle WeaponSkill sets' then
  655.                     WS_Index = WS_Index +1
  656.                     if WS_Index > #sets.WS.index then WS_Index = 1 end
  657.                     Shoha_Index = Shoha_Index +1
  658.                     if Shoha_Index > #sets.Shoha.index then Shoha_Index = 1 end
  659.                     Fudo_Index = Fudo_Index +1
  660.                     if Fudo_Index > #sets.Fudo.index then Fudo_Index = 1 end
  661.                     Kaiten_Index = Kaiten_Index +1
  662.                     if Kaiten_Index > #sets.Kaiten.index then Kaiten_Index = 1 end
  663.                     send_command('@input /echo >>> All Melee WeaponSkill Sets Changed to: '..sets.WS.index[WS_Index]..' ')
  664.            
  665.     --Macro line: /console gs c toggle RA WS sets
  666.     --Chat line: /gs c toggle RA WS sets
  667.     --Changes defined RA sets, assuming user will only be using Apex and Namas Arrow(s).
  668.      
  669.      
  670.             elseif command == 'toggle RA WS sets' then
  671.                     Apex_Index = Apex_Index +1
  672.                     if Apex_Index > #sets.Apex.index then Apex_Index = 1 end
  673.                     Nama_Index = Nama_Index +1
  674.                     if Nama_Index > #sets.Nama.index then Nama_Index = 1 end
  675.                     send_command('@input /echo >>> All Ranged WS Sets Changed to: '..sets.Nama.index[Nama_Index]..' ')
  676.                    
  677.             elseif command == 'toggle RA set' then
  678.                     RA_Index = RA_Index +1
  679.                     if RA_Index > #sets.RA.index then RA_Index = 1 end
  680.                     send_command('@input /echo >>> Ranged TP Set Changed to: '..sets.RA.index[RA_Index]..' ')
  681.                     end
  682.             end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement