Advertisement
Sithel

GearSwap (RNG) (7-30-14)

Feb 16th, 2014
4,251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 19.73 KB | None | 0 0
  1. --GearSwap Version 0.873
  2. --File Created 2-16-13
  3. --Update
  4. --(7-30-14) Changed the way PDT/MDT sets lock on toggle. Added key bind F10 to update gear.
  5. --Weakness timer added (Timers plugin needed for this to work)
  6. --(3-22-14) Wildfire sets added.
  7. --(2-21-14) [For the buff "Battlefield" you'll see you can use an echo or the actual JA Scavenge for when
  8. --exiting a battlefield. By default when u exit a battlefield, you will receive a scavenge reminder. Change accordingly.]
  9.  
  10. function get_sets()
  11.     TP_Index = 1
  12.     Idle_Index = 1 
  13.     Midshot_Index = 1
  14.     Barrage_Index = 1
  15.     Coronach_Index = 1
  16.     LS_Index = 1 --Last Stand
  17.     WF_Index = 1 --Wildfire
  18.     NA_Index = 1 --Namas Arrow
  19.     JR_Index = 1 --Jishnu's Radiance
  20.     SW_Index = 1 --Sidewinder
  21.    
  22.     --Default Macro Set for RNG
  23.     send_command('input /macro book 8;wait .1;input /macro set 5')
  24.    
  25.     --Binds F10 to update player gear.
  26.     send_command('bind f10 gs c update')
  27.  
  28.     --PreSets Below (Snapshot/JA's)
  29.     sets.precast = {}
  30.     sets.precast.bullet = {ammo="Achiyalabopa Bullet"}
  31.     sets.precast.arrow = {ammo="Achiyal. Arrow"}
  32.     sets.precast.trialsammo = {ammo="Gargouille Arrow"}
  33.     sets.precast['Double Shot'] = {head="Sylvan Gapette +2"}
  34.     sets.precast['Velocity Shot'] = {body="Sylvan Caban +2"}
  35.     sets.precast['Camouflage'] = {body="Orion Jerkin"} 
  36.     sets.precast['Bounty Shot'] = {hands="Syl. Glvltte. +2"}
  37.     sets.precast['Sharpshot'] = {legs="Orion Braccae +1"}
  38.     sets.precast['Scavenge'] = {feet="Orion socks +1"}
  39.     sets.precast['Shadowbind'] = {hands="Orion Bracers +1"}
  40.    
  41.     sets.precast['Eagle Eye Shot'] = {
  42.         head="Orion Beret +1",
  43.         neck="Huani collar",
  44.         ear1="Flame pearl",
  45.         ear2="Flame pearl",
  46.         body="Kyujutsugi",
  47.         hands="Iuitl Wristbands +1",
  48.         ring1="Strigoi Ring",
  49.         ring2="Pyrosoul Ring",
  50.         back="Lutian cape",
  51.         waist="Prosilio belt",
  52.         legs="Arcadian Braccae",
  53.         feet="Orion Socks +1"}
  54.                        
  55.     sets.precast.PreShot = {
  56.         head="Orion Beret +1",                         
  57.         body="Sylvan Caban +2",
  58.         hands="Iuitl Wristbands +1",
  59.         waist="Impulse Belt",
  60.         legs="Nahtirah Trousers",
  61.         feet="Wurrukatte Boots"}
  62.        
  63.     -- Magic Sets Below    
  64.     sets.precast.FastCast = {
  65.         head="Whirlpool Mask",
  66.         neck="Twilight Torque",    
  67.         hands="Iuitl Wristbands +1",
  68.         ring1="Dark Ring",
  69.         ring2="Dark Ring",
  70.         back="Iximulew Cape",      
  71.         legs="Nahtirah Trousers",
  72.         feet="Iuitl Gaiters"}
  73.    
  74.     sets.precast.Utsusemi = set_combine(sets.precast.FastCast,{neck="Magoraga Beads"})     
  75.                        
  76.     --Midshot Sets Below
  77.     Midshot_Set_Names = {'LightAcc','FullAcc','STP'}
  78.     sets.Midshot = {}
  79.     sets.Midshot.LightAcc = {
  80.         head="Arcadian Beret +1",
  81.         neck="Huani collar",
  82.         ear1="Clearview Earring",
  83.         ear2="Volley Earring",
  84.         body="Kyujutsugi",
  85.         hands="Iuitl Wristbands +1",
  86.         ring1="Hajduk ring",
  87.         ring2="Paqichikaji Ring",
  88.         back="Lutian cape",
  89.         waist="Elanid Belt",
  90.         legs="Orion Braccae +1",
  91.         feet="Orion Socks +1"}
  92.                
  93.     sets.Midshot.FullAcc = {
  94.         head="Umbani Cap",
  95.         neck="Iqabi necklace",
  96.         ear1="Clearview Earring",
  97.         ear2="Volley Earring",
  98.         body="Kyujutsugi",
  99.         hands="Iuitl Wristbands +1",
  100.         ring1="Hajduk ring",
  101.         ring2="Paqichikaji Ring",
  102.         back="Lutian cape",
  103.         waist="Elanid Belt",
  104.         legs="Orion Braccae +1",
  105.         feet="Orion Socks +1"}
  106.        
  107.     sets.Midshot.STP = {
  108.         head="Arcadian Beret +1",
  109.         neck="Ocachi Gorget",
  110.         ear1="Tripudio Earring",
  111.         ear2="Volley Earring",
  112.         body="Kyujutsugi",
  113.         hands="Seiryu's kote",
  114.         ring1="Rajas Ring",
  115.         --ring2="K'ayres Ring",
  116.         ring2="Paqichikaji Ring",
  117.         back="Sylvan chlamys",
  118.         --back="Lutian cape",
  119.         waist="Elanid Belt",
  120.         legs="Aeto. Trousers +1",
  121.         feet="Orion Socks +1"}
  122.  
  123.     --Barrage Sets Below
  124.     Barrage_Set_Names = {'BarrageAcc','BarrageSTP'}
  125.     sets.Barrage = {}
  126.     sets.Barrage.BarrageAcc = {
  127.         head="Uk'uxkaj cap",
  128.         neck="Huani collar",
  129.         ear1="Clearview Earring",
  130.         ear2="Volley Earring",
  131.         body="Kyujutsugi",
  132.         hands="Orion Bracers +1",
  133.         ring1="Hajduk ring",
  134.         ring2="Paqichikaji Ring",
  135.         back="Lutian cape",
  136.         waist="Elanid Belt",
  137.         legs="Desultor Tassets",
  138.         feet="Orion Socks +1"}
  139.                
  140.     sets.Barrage.BarrageSTP = {
  141.         head="Arcadian Beret +1",
  142.         neck="Rancor Collar",
  143.         ear1="Clearview Earring",
  144.         ear2="Volley Earring",
  145.         body="Kyujutsugi",
  146.         hands="Orion Bracers +1",
  147.         ring1="Strigoi Ring",
  148.         ring2="Pyrosoul Ring",
  149.         back="Lutian cape",
  150.         waist="Elanid Belt",
  151.         legs="Desultor Tassets",
  152.         feet="Orion Socks +1"}                     
  153.    
  154.     -- Coronach Sets Below
  155.     Coronach_Set_Names = {'Normal','Acc','Atk'}
  156.     sets.Coronach = {}
  157.     sets.Coronach.Normal = {       
  158.         head="Arcadian Beret +1",
  159.         neck="Thunder Gorget",
  160.         ear1="Flame pearl",
  161.         ear2="Flame pearl",
  162.         body="Kyujutsugi",
  163.         hands="Orion Bracers +1",
  164.         ring1="Rajas Ring",
  165.         ring2="Pyrosoul Ring",
  166.         back="Lutian cape",
  167.         waist="Thunder belt",
  168.         legs="Nahtirah Trousers",
  169.         feet="Arcadian socks +1"}
  170.  
  171.     sets.Coronach.Acc = {
  172.         head="Orion Beret +1",
  173.         neck="Thunder Gorget",
  174.         ear1="Flame pearl",
  175.         ear2="Flame pearl",
  176.         body="Kyujutsugi",
  177.         hands="Manibozho Gloves",
  178.         ring1="Hajduk ring",
  179.         ring2="Paqichikaji Ring",
  180.         back="Lutian cape",
  181.         waist="Thunder belt",
  182.         legs="Orion braccae +1",
  183.         feet="Orion Socks +1"}
  184.                        
  185.     sets.Coronach.Atk = {
  186.         head="Orion Beret +1",
  187.         neck="Ocachi Gorget",
  188.         ear1="Flame pearl",
  189.         ear2="Flame pearl",
  190.         body="Kyujutsugi",
  191.         hands="Manibozho Gloves",
  192.         ring1="Strigoi Ring",
  193.         ring2="Pyrosoul Ring",
  194.         back="Lutian cape",
  195.         waist="Prosilio belt",
  196.         legs="Nahtirah Trousers",
  197.         feet="Orion Socks +1"}
  198.    
  199.     -- Last Stand Sets Below
  200.     LS_Set_Names = {'Normal','Acc','Atk'}
  201.     sets.LS = {}
  202.     sets.LS.Normal = {
  203.         head="Orion Beret +1",
  204.         neck="Light Gorget",
  205.         ear1="Flame pearl",
  206.         ear2="Sylvan Earring",
  207.         body="Kyujutsugi",
  208.         hands="Manibozho Gloves",
  209.         ring1="Stormsoul Ring",
  210.         ring2="Pyrosoul Ring",
  211.         back="Libeccio Mantle",
  212.         waist="Light belt",
  213.         legs="Nahtirah Trousers",
  214.         feet="Orion Socks +1"}
  215.  
  216.     sets.LS.Acc = {
  217.         head="Orion Beret +1",
  218.         neck="Light Gorget",
  219.         ear1="Clearview Earring",
  220.         ear2="Volley Earring",
  221.         body="Kyujutsugi",
  222.         hands="Manibozho Gloves",
  223.         ring1="Hajduk ring",
  224.         ring2="Paqichikaji Ring",
  225.         back="Libeccio Mantle",
  226.         waist="Light belt",
  227.         legs="Orion Braccae +1",
  228.         feet="Orion Socks +1"}
  229.                        
  230.     sets.LS.Atk = {
  231.         head="Orion Beret +1",
  232.         neck="Ocachi Gorget",
  233.         ear1="Flame pearl",
  234.         ear2="Flame pearl",
  235.         body="Kyujutsugi",
  236.         hands="Manibozho Gloves",
  237.         ring1="Strigoi Ring",
  238.         ring2="Pyrosoul Ring",
  239.         back="Libeccio Mantle",
  240.         waist="Prosilio belt",
  241.         legs="Nahtirah Trousers",
  242.         feet="Orion Socks +1"}
  243.    
  244.     -- Wildfire Sets Below
  245.     WF_Set_Names = {'Normal','Acc','Atk'}
  246.     sets.WF = {}
  247.     sets.WF.Normal = {
  248.         head="Orion Beret +1",
  249.         neck="Huani collar",
  250.         ear1="Hecate's earring",
  251.         ear2="Novio Earring",
  252.         body="Kyujutsugi",
  253.         hands="Orion Bracers +1",
  254.         ring1="Stormsoul Ring",
  255.         ring2="Paqichikaji Ring",
  256.         back="Lutian cape",
  257.         waist="Elanid Belt",
  258.         legs="Nahtirah Trousers",
  259.         feet="Orion Socks +1"}
  260.  
  261.     sets.WF.Acc = {
  262.         head="Orion Beret +1",
  263.         neck="Soil Gorget",
  264.         ear1="Clearview Earring",
  265.         ear2="Volley Earring",
  266.         body="Kyujutsugi",
  267.         hands="Manibozho Gloves",
  268.         ring1="Hajduk ring",
  269.         ring2="Paqichikaji Ring",
  270.         back="Libeccio Mantle",
  271.         waist="Soil belt",
  272.         legs="Orion Braccae +1",
  273.         feet="Orion Socks +1"}
  274.                        
  275.     sets.WF.Atk = {
  276.         head="Orion Beret +1",
  277.         neck="Ocachi Gorget",
  278.         ear1="Flame pearl",
  279.         ear2="Flame pearl",
  280.         body="Kyujutsugi",
  281.         hands="Manibozho Gloves",
  282.         ring1="Strigoi Ring",
  283.         ring2="Pyrosoul Ring",
  284.         back="Libeccio Mantle",
  285.         waist="Prosilio belt",
  286.         legs="Nahtirah Trousers",
  287.         feet="Orion Socks +1"}
  288.    
  289.     -- Namas Arrow Sets Below
  290.     NA_Set_Names = {'Normal','Acc','Atk'}
  291.     sets.NA = {}
  292.     sets.NA.Normal = {}
  293.  
  294.     sets.NA.Acc = {}
  295.                        
  296.     sets.NA.Atk = {}
  297.    
  298.     -- Jishnu's Radiance Sets Below
  299.     JR_Set_Names = {'Normal','Acc','Atk'}
  300.     sets.JR = {}
  301.     sets.JR.Normal = {
  302.         head="Uk'uxkaj cap",
  303.         neck="Light Gorget",
  304.         ear1="Flame pearl",
  305.         ear2="Flame pearl",
  306.         body="Kyujutsugi",
  307.         hands="Orion Bracers +1",
  308.         ring1="Rajas Ring",
  309.         ring2="Pyrosoul Ring",
  310.         back="Libeccio Mantle",
  311.         waist="Light belt",
  312.         legs="Nahtirah Trousers",
  313.         feet="Orion Socks +1"}
  314.  
  315.     sets.JR.Acc = {
  316.         head="Uk'uxkaj cap",
  317.         neck="Light Gorget",
  318.         ear1="Clearview Earring",
  319.         ear2="Volley Earring",
  320.         body="Kyujutsugi",
  321.         hands="Buremte Gloves",
  322.         ring1="Rajas Ring",
  323.         ring2="Pyrosoul Ring",
  324.         back="Libeccio Mantle",
  325.         waist="Light belt",
  326.         legs="Orion Braccae +1",
  327.         feet="Orion Socks +1"}
  328.                        
  329.     sets.JR.Atk = {
  330.         head="Orion Beret +1",
  331.         neck="Ocachi Gorget",
  332.         ear1="Flame pearl",
  333.         ear2="Flame pearl",
  334.         body="Kyujutsugi",
  335.         hands="Manibozho Gloves",
  336.         ring1="Strigoi Ring",
  337.         ring2="Pyrosoul Ring",
  338.         back="Libeccio Mantle",
  339.         waist="Prosilio belt",
  340.         legs="Nahtirah Trousers",
  341.         feet="Orion Socks +1"}
  342.    
  343.     -- Sidewinder Sets Below
  344.     SW_Set_Names = {'Normal','Acc','Atk'}
  345.     sets.SW = {}
  346.     sets.SW.Normal = {
  347.         head="Orion Beret +1",
  348.         neck="Light Gorget",
  349.         ear1="Flame pearl",
  350.         ear2="Flame pearl",
  351.         body="Kyujutsugi",
  352.         hands="Manibozho Gloves",
  353.         ring1="Strigoi Ring",
  354.         ring2="Pyrosoul Ring",
  355.         back="Libeccio Mantle",
  356.         waist="Light belt",
  357.         legs="Nahtirah Trousers",
  358.         feet="Orion Socks +1"}
  359.  
  360.     sets.SW.Acc = {
  361.         head="Orion Beret +1",
  362.         neck="Light Gorget",
  363.         ear1="Flame pearl",
  364.         ear2="Flame pearl",
  365.         body="Kyujutsugi",
  366.         hands="Manibozho Gloves",
  367.         ring1="Hajduk ring",
  368.         ring2="Paqichikaji Ring",
  369.         back="Libeccio Mantle",
  370.         waist="Light belt",
  371.         legs="Orion Braccae +1",
  372.         feet="Orion Socks +1"}
  373.                        
  374.     sets.SW.Atk = {}
  375.    
  376.     -- TP Sets Below(I don't really use for RNG but feel free to add your own)
  377.     TP_Set_Names = {"ACC","ATK","PDT","MDT"}
  378.     sets.TP = {}
  379.     sets.TP['ACC'] = {}
  380.        
  381.     sets.TP['ATK'] = {}
  382.        
  383.     sets.TP['MDT'] = {
  384.         head="Orion Beret +1",
  385.         neck="Huani collar",
  386.         ear1="Merman's Earring",
  387.         ear2="Merman's Earring",
  388.         body="Kyujutsugi",
  389.         hands="Manibozho Gloves",
  390.         ring1="Hajduk ring",
  391.         ring2="Paqichikaji Ring",
  392.         back="Tuilha Cape",
  393.         waist="Resolute Belt",
  394.         legs="Nahtirah Trousers",
  395.         feet="Iuitl Gaiters"}
  396.        
  397.     sets.TP['PDT'] = {
  398.         head="Whirlpool Mask",
  399.         neck="Twilight Torque",
  400.         ear1="Clearview Earring",
  401.         ear2="Volley Earring",
  402.         body="Kyujutsugi",
  403.         hands="Iuitl Wristbands",
  404.         ring1="Dark Ring",
  405.         ring2="Dark Ring",
  406.         back="Iximulew Cape",
  407.         waist="Elanid Belt",
  408.         legs="Nahtirah Trousers",
  409.         feet="Iuitl Gaiters"}
  410.    
  411.     --Idle Sets Below
  412.     Idle_Set_Names = {'Regen','Normal','Town','Vanity'}
  413.     sets.Idle = {}
  414.     sets.Idle.Normal = {
  415.         head="Orion Beret +1",
  416.         neck="Huani collar",
  417.         ear1="Clearview Earring",
  418.         ear2="Volley Earring",
  419.         body="Kyujutsugi",
  420.         hands="Manibozho Gloves",
  421.         ring1="Hajduk ring",
  422.         ring2="Paqichikaji Ring",
  423.         back="Lutian cape",
  424.         waist="Elanid Belt",
  425.         legs="Nahtirah Trousers",
  426.         feet="Orion Socks +1"}
  427.                        
  428.     sets.Idle.Town = {
  429.         head="Arcadian Beret +1",
  430.         neck="Iqabi necklace",
  431.         ear1="Clearview Earring",
  432.         ear2="Volley Earring",
  433.         body="Kyujutsugi",
  434.         hands="Orion Bracers +1",
  435.         ring1="Hajduk ring",
  436.         ring2="Paqichikaji Ring",
  437.         back="Lutian cape",
  438.         waist="Elanid Belt",
  439.         legs="Orion Braccae +1",
  440.         feet="Arcadian socks +1"}                  
  441.                
  442.     sets.Idle.Regen = set_combine(sets.Idle.Normal,{
  443.         head="Ocelomeh headpiece +1",
  444.         neck="Wiglen Gorget",                      
  445.         body="Kirin's Osode",
  446.         hands="Orion Bracers +1",
  447.         ring1="Paguroidea Ring",
  448.         ring2="Sheltered Ring",
  449.         back="Scuta Cape"})
  450.    
  451.     --Vanity Set used for the Stylish Addon to /lockstyle on when zoning.
  452.     --Link: http://forums.windower.net/index.php?/topic/328-any-interest-in-an-auto-lockstyle-on-addon/#entry1808
  453.     sets.Idle.Vanity = {
  454.         head="Arcadian Beret +1",
  455.         neck="Iqabi necklace",
  456.         ear1="Clearview Earring",
  457.         ear2="Volley Earring",
  458.         body="Kyujutsugi",
  459.         hands="Orion Bracers +1",
  460.         ring1="Hajduk ring",
  461.         ring2="Paqichikaji Ring",
  462.         back="Lutian cape",
  463.         waist="Elanid Belt",
  464.         legs="Orion Braccae +1",
  465.         feet="Arcadian socks +1"}
  466.    
  467.     -- PDT (Set will lock and unlock on toggle)
  468.     -- Macro /console gs c pdt
  469.     set.pdt = {}
  470.     pdt = {}
  471.     pdt.on = {
  472.         head="Whirlpool Mask",
  473.         neck="Twilight Torque",
  474.         ear1="Clearview Earring",
  475.         ear2="Volley Earring",
  476.         body="Kyujutsugi",
  477.         hands="Iuitl Wristbands",
  478.         ring1="Dark Ring",
  479.         ring2="Dark Ring",
  480.         back="Iximulew Cape",
  481.         waist="Elanid Belt",
  482.         legs="Nahtirah Trousers",
  483.         feet="Iuitl Gaiters"}
  484.     pdt.off = {}
  485.        
  486.         -- MDT (Set will lock and unlock on toggle)
  487.     -- Macro /console gs c mdt
  488.     set.mdt = {}
  489.     mdt = {}
  490.     mdt.on = set_combine(pdt.on,{      
  491.         ear1="Merman's Earring",
  492.         ear2="Merman's Earring",
  493.         body="Kyujutsugi",     
  494.         back="Tuilha Cape",
  495.         waist="Resolute Belt"})
  496.     mdt.off = {}   
  497. end
  498.  
  499. function precast(spell)
  500.     if sets.precast[spell.english] then
  501.                 equip(sets.precast[spell.english])
  502.         elseif spell.type == 'WeaponSkill' then
  503.             if spell.target.distance > 21.0  then                      
  504.             add_to_chat(167,''..spell.target.name..' is too far can not use '..spell.name..'!!!. Cancelling WeaponSkill ')                          
  505.             cancel_spell()
  506.             return         
  507.             elseif spell.name == "Coronach" then
  508.                 equip(sets.Coronach[Coronach_Set_Names[Coronach_Index]])
  509.             elseif spell.name == "Last Stand" then
  510.                 equip(sets.LS[LS_Set_Names[LS_Index]])
  511.             elseif spell.name == "Namas Arrow" then
  512.                 equip(sets.NA[NA_Set_Names[NA_Index]])
  513.             elseif spell.name == "Jishnu's Radiance" then
  514.                 equip(sets.JR[JR_Set_Names[JR_Index]])
  515.             elseif spell.name == "Sidewinder" then
  516.                 equip(sets.SW[SW_Set_Names[SW_Index]])
  517.             elseif spell.name == "Wildfire" then
  518.                 equip(sets.WF[WF_Set_Names[WF_Index]])
  519.         end    
  520.         elseif spell.name == "Ranged" then
  521.             equip(sets.precast.PreShot)
  522.             if player.equipment.range == 'Ajjub Bow' then
  523.             equip(sets.precast.arrow)            
  524.             elseif player.equipment.range == 'Yoichinoyumi' then
  525.             equip(sets.precast.arrow)            
  526.             elseif player.equipment.range == 'Annihilator' then
  527.             equip(sets.precast.bullet)            
  528.             elseif player.equipment.range == 'Astrild' then
  529.             equip(sets.precast.trialsammo)         
  530.         end
  531.         elseif spell.type == "Ninjutsu" then
  532.             if string.find(spell.english,'Utsusemi') then
  533.                 if buffactive['Copy Image (3)'] or buffactive['Copy Image (4)'] then
  534.                     cancel_spell()
  535.                     add_to_chat(167, spell.english .. ' Canceled: [3+ Images]')
  536.                     return
  537.             else
  538.                 equip(sets.precast.Utsusemi)
  539.             end
  540.             else
  541.                 equip(sets.precast.FastCast)
  542.         end
  543.         elseif spell.english == 'Spectral Jig' and buffactive.Sneak then
  544.             cast_delay(0.2)
  545.             send_command('cancel Sneak')        
  546.     end
  547. end
  548.  
  549. function midcast(spell)
  550.     if spell.name == "Ranged" then
  551.         equip(sets.Midshot[Midshot_Set_Names[Midshot_Index]])
  552.         if buffactive.Barrage then
  553.             equip(sets.Barrage[Barrage_Set_Names[Barrage_Index]])                      
  554.         end
  555.     end
  556. end
  557.  
  558. function aftercast(spell)  
  559.     if player.status=='Engaged' then
  560.         equip(sets.TP[TP_Set_Names[TP_Index]]) 
  561.     else       
  562.         equip(sets.Idle[Idle_Set_Names[Idle_Index]])       
  563.     end
  564. end
  565.  
  566. function status_change(new,old)
  567.     if T{'Idle','Resting'}:contains(new) then      
  568.         equip(sets.Idle[Idle_Set_Names[Idle_Index]])
  569.     elseif new == 'Engaged' then
  570.         equip(sets.TP[TP_Set_Names[TP_Index]])
  571.     end
  572. end
  573.  
  574. function buff_change(name,gain_or_loss)
  575.     if name == 'Battlefield' and not gain_or_loss then
  576.         --send_command('wait 3; input /ja "Scavenge" <me>')
  577.         add_to_chat(167,'You left the Battlefield, don\'t forget to Scavenge!')
  578.     end
  579.     if name == 'weakness' and gain_or_loss then
  580.             send_command('timers create "Weakness" 300 up abilities/00255.png')        
  581.     elseif name == 'weakness' and not gain_or_loss then
  582.             send_command('timers delete "Weakness"')
  583.     end
  584. end
  585.  
  586. --Toggle Self Commands with //gs c [command name]
  587. --Example type in chat //gs c tp (case sensitive)
  588. --Example Make a macro /console gs c tp (case sensitive)
  589. function self_command(command)
  590.     if command == 'tp' then
  591.         TP_Index = TP_Index +1     
  592.         if TP_Index > #TP_Set_Names then TP_Index = 1 end
  593.         add_to_chat(207,'TP Set Changed to: '..TP_Set_Names[TP_Index]..'')
  594.         status_change(player.status)
  595.     elseif command == 'idle' then
  596.         Idle_Index = Idle_Index +1
  597.         if Idle_Index > #Idle_Set_Names then Idle_Index = 1 end
  598.         add_to_chat(207,'Idle Set Changed to: '..Idle_Set_Names[Idle_Index]..'')       
  599.         equip(sets.Idle[Idle_Set_Names[Idle_Index]])   
  600.     elseif command == 'pdt' then
  601.         if sets.pdt == pdt.on then
  602.             equip(pdt.off)
  603.             sets.pdt = pdt.off
  604.             enable('ammo','head','neck','ear1','ear2','body','hands','ring1','ring2','back','waist','legs','feet')
  605.             status_change(player.status)
  606.             add_to_chat(207,'>>>>> PDT Set Unlocked! <<<<<')
  607.         else               
  608.             equip(pdt.on)
  609.             sets.pdt = pdt.on
  610.             disable('ammo','head','neck','ear1','ear2','body','hands','ring1','ring2','back','waist','legs','feet')
  611.             add_to_chat(66,'>>>>> PDT Set Locked! <<<<<')
  612.         end
  613.     elseif command == 'mdt' then
  614.         if sets.mdt == mdt.on then
  615.             equip(mdt.off)
  616.             sets.mdt = mdt.off
  617.             enable('ammo','head','neck','ear1','ear2','body','hands','ring1','ring2','back','waist','legs','feet')
  618.             status_change(player.status)
  619.             add_to_chat(207,'>>>>> MDT Set Unlocked! <<<<<')
  620.         else               
  621.             equip(mdt.on)
  622.             sets.mdt = mdt.on
  623.             disable('ammo','head','neck','ear1','ear2','body','hands','ring1','ring2','back','waist','legs','feet')
  624.             add_to_chat(15,'>>>>> MDT Set Locked! <<<<<')
  625.         end
  626.     elseif command == 'midshot' then
  627.         Midshot_Index = Midshot_Index +1
  628.         if Midshot_Index > #Midshot_Set_Names then Midshot_Index = 1 end
  629.         add_to_chat(207,'Midshot Set Changed to: '..Midshot_Set_Names[Midshot_Index]..'')      
  630.     elseif command == 'barrage' then
  631.         Barrage_Index = Barrage_Index +1
  632.         if Barrage_Index > #Barrage_Set_Names then Barrage_Index = 1 end
  633.         add_to_chat(207,'Barrage Set Changed to: '..Barrage_Set_Names[Barrage_Index]..'')
  634.     elseif command == 'relicgunws' then
  635.         Coronach_Index = Coronach_Index +1
  636.         if Coronach_Index > #Coronach_Set_Names then Coronach_Index = 1 end
  637.         add_to_chat(207,'Coronach Set Changed to: '..Coronach_Set_Names[Coronach_Index]..'')       
  638.     elseif command == 'meritws' then
  639.         LS_Index = LS_Index +1
  640.         if LS_Index > #LS_Set_Names then LS_Index = 1 end
  641.         add_to_chat(207,'Last Stand Set Changed to: '..LS_Set_Names[LS_Index]..'')
  642.     elseif command == 'wildfirews' then
  643.         WF_Index = WF_Index +1
  644.         if WF_Index > #WF_Set_Names then WF_Index = 1 end
  645.         add_to_chat(207,'Wildfire Set Changed to: '..WF_Set_Names[WF_Index]..'')   
  646.     elseif command == 'relicbowws' then
  647.         NA_Index = NA_Index +1
  648.         if NA_Index > #NA_Set_Names then NA_Index = 1 end
  649.         add_to_chat(207,'Namas Arrow Set Changed to: '..NA_Set_Names[NA_Index]..'')    
  650.     elseif command == 'empws' then
  651.         JR_Index = JR_Index +1
  652.         if JR_Index > #JR_Set_Names then JR_Index = 1 end
  653.         add_to_chat(207,'Jishnu\'s Radiance Set Changed to: '..JR_Set_Names[JR_Index]..'')     
  654.     elseif command == 'sidewinderws' then
  655.         SW_Index = SW_Index +1
  656.         if SW_Index > #SW_Set_Names then SW_Index = 1 end
  657.         add_to_chat(207,'Sidewinder Set Changed to: '..SW_Set_Names[SW_Index]..'')     
  658.     elseif command == 'update' then
  659.         status_change(player.status)
  660.         add_to_chat(207,'Update player status...')
  661.     elseif command == 'active' then
  662.         add_to_chat(207,'Idle Set Active: '..Idle_Set_Names[Idle_Index]..'')       
  663.         add_to_chat(207,'TP Set Active: '..TP_Set_Names[TP_Index]..'')
  664.         add_to_chat(207,'Midshot Set Active: '..Midshot_Set_Names[Midshot_Index]..'')
  665.         add_to_chat(207,'Barrage Set Active: '..Barrage_Set_Names[Barrage_Index]..'')
  666.         add_to_chat(207,'Coronach Set Active: '..Coronach_Set_Names[Coronach_Index]..'')
  667.         add_to_chat(207,'Last Stand Set Active: '..LS_Set_Names[LS_Index]..'')
  668.         add_to_chat(207,'Wildfire Set Active: '..WF_Set_Names[WF_Index]..'')
  669.         add_to_chat(207,'Namas Arrow Set Active: '..NA_Set_Names[NA_Index]..'')
  670.         add_to_chat(207,'Jishnu\'s Radiance Set Active: '..JR_Set_Names[JR_Index]..'')
  671.         add_to_chat(207,'Sidewinder Set Active: '..SW_Set_Names[SW_Index]..'')     
  672.     end
  673. end
  674.  
  675. function file_unload()
  676.     send_command('unbind f10') 
  677. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement