Advertisement
ErC8D

GS_RNG

Jun 9th, 2014
1,990
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 14.54 KB | None | 0 0
  1. --Gearswap file for Ranger(FFXI)
  2. --Highly recommend reviewing gearsets and replacing with personal items.
  3. --Also recommend changing key bind keys since everyone's keyboard and play style are different. ^ = CTRL, != ALT.
  4.  
  5.  
  6. function get_sets()
  7.  
  8. --Keybinds--
  9.  
  10. --F9 =Ranged Attack/RA
  11. --F10 = Barrage
  12. --F11 = Coronach
  13. --F12 = Last Stand
  14.  
  15.     send_command('bind f9 input /ra <t>')
  16.     send_command('bind f10 input /ja Barrage <me>')
  17.     send_command('bind f11 input /ws "Coronach" <t>')
  18.     send_command('bind f12 input /ws "Last Stand" <t>')
  19.  
  20.  
  21. --CTRL+F9 = RA index toggle
  22. --CTRL+F10 = Barrage index toggle
  23. --CTRL+F11 = RA WS index toggle
  24. --CTRL+F12 = Eagle Eye Shot
  25.  
  26.     send_command('bind ^f9 gs c toggle RangeTP set')
  27.     send_command('bind ^f10 gs c toggle Barrage set')
  28.     send_command('bind ^f11 gs c toggle Ranged WS sets')
  29.     send_command('bind ^f12 input /ja "Eagle Eye Shot" <t>')
  30.  
  31. --ALT+F9 = Melee TP toggle
  32. --ALT+F10 = Exen Toggle
  33.  
  34.     send_command('bind !f9 gs c toggle TP set')
  35.     send_command('bind !f10 gs c toggle Exenterator set')
  36.  
  37. function file_unload()
  38.  
  39.     send_command('unbind f9')
  40.         send_command('unbind f10')
  41.         send_command('unbind f11')
  42.         send_command('unbind f12')
  43.  
  44.     send_command('unbind ^f9')
  45.         send_command('unbind ^f10')
  46.     send_command('unbind ^f11')
  47.     send_command('unbind ^f12')      
  48.  
  49.         send_command('unbind !f9')
  50.         send_command('unbind !f10')
  51.        
  52. end
  53.        
  54.  
  55.  
  56.  
  57. --JA Sets for Precast Function--
  58.  
  59. sets.JA = {}
  60.        
  61. sets.JA['Eagle Eye Shot'] = {head="Meghanada Visor +1",
  62.     neck="Ocachi Gorget",ear1="Clearview Earring",ear2="Sylvan Earring",body="Meghanada Cuirie +1",
  63.     hands="Meghanada Gloves +1",ring1="Rajas Ring",ring2="Longshot Ring",back="Lutian Cape",
  64.     waist="Elanid Belt",legs="Arcadian Braccae +1",feet="Meghanada Jambeaux +1"}
  65.  
  66. sets.JA['Velocity Shot'] = {body="Sylvan Caban +2"}
  67. sets.JA['Sharpshot'] = {legs="Orion Braccae +1"}
  68. sets.JA['Barrage'] = {hands="Orion Bracers +1"}
  69. sets.JA['Double Shot'] = {head="Sylvan Gapette +2"}
  70. sets.JA['Shadowbind'] = {hands="Orion Bracers +1"}
  71. sets.JA['Camouflage'] = {body="Orion Jerkin +1"}
  72. sets.JA['Scavenge'] = {feet="Orion Socks +1"}
  73. sets.JA['Bounty Shot'] = {hands="Sylvan Glovettes +2"}
  74.        
  75.  
  76. --TP set for Melee or solo scenario--
  77.  
  78. sets.TP = {}
  79. sets.TP.index = {'Reg','Acc'}
  80. TP_Index = 1
  81.        
  82. sets.TP.Reg = {head="Dampening Tam",
  83.     neck="Asperity Necklace",ear1="Cessance Earring",ear2="Sherida Earring",body="Adhemar Jacket +1",
  84.     hands="Adhemar Wristbands +1",ring1="Rajas Ring",ring2="Epona's Ring",back="Atheling Mantle",waist="Windbuffet Belt",
  85.     legs="Meghanada Chausses +2",feet="Herculean Boots"}
  86.            
  87. sets.TP.Acc = set_combine(sets.TP.Reg,{hands="Floral Gauntlets",ring1="Ramuh Ring +1",ring2="Ramuh Ring +1",
  88.     back="Agema Cape",waist="Hurch'lan Sash"})
  89.            
  90.        
  91. --Utility Sets for Snapshot aka Ranged Attack Precast--
  92.  
  93. sets.Utility = {}
  94.  
  95. sets.Utility.Snapshot = {head="Sylvan Gapette +2",
  96.     body="Sylvan Caban +2",hands="Iuitl Wristbands +1",legs="Nahtirah Trousers",back="Lutian Cape",waist="Ponente Sash",feet="Meghanada Jambeaux +1"}
  97.  
  98.        
  99. --Ranged Attack TP Sets--
  100. sets.RangeTP = {}
  101. sets.RangeTP.index = {'Reg', 'Acc'}
  102. RangeTP_Index = 1
  103.                
  104. sets.RangeTP.Reg = {head="Arcadian Beret +1",
  105.     neck="Ocachi Gorget",ear1="Tripudio Earring",ear2="Volley Earring",body="Meghanada Cuirie +1",
  106.     hands="Meghanada Gloves +1",ring1="Rajas Ring",ring2="Hajduk ring",back="Sylvan Chlamys",
  107.     waist="Ponente Sash",legs="Meghanada Chausses +2",feet="Meghanada Jambeaux +1"}  
  108.            
  109. sets.RangeTP.Acc = {head="Meghanada Visor +1",
  110.     neck="Erudition Necklace",ear1="Clearview Earring",ear2="Volley Earring",body="Meghanada Cuirie +1",
  111.     hands="Meghanada Gloves +1",ring1="Longshot Ring",ring2="Hajduk ring",back="Lutian Cape",
  112.     waist="Elanid Belt",legs="Meghanada Chausses +2",feet="Meghanada Jambeaux +1"}  
  113.            
  114.     --Barrage--          
  115. sets.Barrage = {}
  116. sets.Barrage.index = {'Reg','Acc'}
  117. Barrage_Index = 1
  118.                
  119.  sets.Barrage.Reg = {head="Meghanada Visor +1",
  120.     neck="Ocachi Gorget",ear1="Clearview Earring",ear2="Volley Earring",body="Meghanada Cuirie +1",
  121.     hands="Orion Bracers +1",ring1="Longshot Ring",ring2="Hajduk ring",back="Lutian Cape",
  122.     waist="Elanid Belt",legs="Meghanada Chausses +2",feet="Meghanada Jambeaux +1"}
  123.                        
  124. sets.Barrage.Acc = {head="Meghanada Visor +1",
  125.     neck="Ej Necklace",ear1="Clearview Earring",ear2="Volley Earring",body="Meghanada Cuirie +1",
  126.     hands="Orion Bracers +1",ring1="Longshot Ring",ring2="Hajduk ring",back="Lutian Cape",
  127.     waist="Elanid Belt",legs="Meghanada Chausses +2",feet="Meghanada Jambeaux +1"}
  128.        
  129. --Exenterator Sets--
  130.        
  131. sets.Exen = {}
  132. sets.Exen.index = {'Reg','Acc'}
  133. Exen_Index = 1
  134.        
  135. sets.Exen.Reg = set_combine(sets.TP.Reg,{neck="Fotia Gorget",
  136.     ring1="Rajas Ring",ring2="Ramuh Ring +1",waist="Fotia Belt"})
  137.        
  138. sets.Exen.Acc = set_combine(sets.TP.Acc,{neck="Fotia Gorget",waist="Fotia Belt"})
  139.        
  140.        
  141. --Ranged WS Sets--
  142.            
  143. --Coronach/Namas Arrow/Sidewinder/Slug Shot/Refulgent Arrow--      
  144. sets.Coronach = {}
  145. sets.Coronach.index = {'Reg','Acc'}
  146. Coronach_Index = 1
  147.                
  148. sets.Coronach.Reg = {head="Meghanada Visor +1",
  149.     neck="Fotia Gorget",ear1="Moonshade Earring",ear2="Kuwunga Earring",body="Meghanada Cuirie +1",
  150.     hands="Meghanada Gloves +1",ring1="Rajas Ring",ring2="Ifrit Ring +1",back="Lutian Cape",
  151.     waist="Fotia Belt",legs="Meghanada Chausses +2",feet="Meghanada Jambeaux +1"}
  152.                        
  153. sets.Coronach.Acc = {head="Meghanada Visor +1",
  154.     neck="Fotia Gorget",ear1="Moonshade Earring",ear2="Volley Earring",body="Meghanada Cuirie +1",
  155.     hands="Meghanada Gloves +1",ring1="Longshot Ring",ring2="Hajduk ring",back="Lutian Cape",
  156.     waist="Fotia Belt",legs="Meghanada Chausses +2",feet="Meghanada Jambeaux +1"}
  157.  
  158.  
  159. --Wildfire--
  160. sets.Wildfire = {}
  161. sets.Wildfire.index = {'Reg','Acc'}
  162. Wildfire_Index = 1
  163.                
  164. sets.Wildfire.Reg = {head="Herculean Helm",
  165.     neck="Sanctity Necklace",ear1="Friomisi Earring",ear2="Moonshade Earring",body="Rawhide Vest",
  166.     hands="Leyline Gloves",ring1="Acumen Ring",ring2="Arvina Ringlet +1",back="Argochampsa Mantle",
  167.     waist="Yambuki-no-obi",legs="Limbo Trousers",feet="Herculean Boots"}
  168.                        
  169. sets.Wildfire.Acc = {head="Herculean Helm",
  170.     neck="Sanctity Necklace",ear1="Friomisi Earring",ear2="Moonshade Earring",body="Rawhide Vest",
  171.     hands="Leyline Gloves",ring1="Acumen Ring",ring2="Arvina Ringlet +1",back="Argochampsa Mantle",
  172.     waist="Yambuki-no-obi",legs="Limbo Trousers",feet="Herculean Boots"}       
  173.        
  174. --Trueflight---    
  175. sets.Trueflight = {}
  176. sets.Trueflight.index = {'Reg','Acc'}
  177. Trueflight_Index = 1
  178.  
  179. sets.Trueflight.Reg = set_combine(sets.Wildfire.Reg,{ring2="Weatherspoon Ring +1"})
  180.  
  181. sets.Trueflight.Acc = set_combine(sets.Wildfire.Acc,{ring2="Weatherspoon Ring +1"})
  182.        
  183. --Last Stand/Apex Arrow Sets--
  184. sets.LastS = {}
  185. sets.LastS.index = {'Reg','Acc'}
  186. LastS_Index = 1
  187.        
  188. sets.LastS.Reg = {head="Meghanada Visor +1",
  189.     neck="Fotia Gorget",ear1="Moonshade Earring",ear2="Sylvan Earring",body="Meghanada Cuirie +1",
  190.     hands="Meghanada Gloves +1",ring1="Garuda Ring",ring2="Garuda Ring",back="Lutian Cape",
  191.     waist="Fotia Belt",legs="Meghanada Chausses +2",feet="Arcadian Socks +1"}
  192.        
  193. sets.LastS.Acc = {head="Meghana Visor +1",
  194.      neck="Fotia Gorget",ear1="Moonshade Earring",ear2="Volley Earring",body="Meghanada Cuirie +1",
  195.      hands="Meghanada Gloves +1",ring1="Garuda Ring",ring2="Longshot Ring",back="Lutian Cape",
  196.      waist="Fotia Belt",legs="Meghanada Chausses +2",feet="Orion Socks +1"}
  197.  
  198. --Jishnu's Radiance / Heavy Shot / Arching Arrow Sets --
  199. -- Jishnu's has a dex modifier, but Range Attack crits are modified by AGI--
  200.        
  201. sets.Jishnu = {}
  202. sets.Jishnu.index = {'Reg','Acc'}
  203. Jishnu_Index = 1
  204.        
  205. sets.Jishnu.Reg = {head="Uk'uxkaj Cap",
  206.     neck="Light Gorget",ear1="Moonshade Earring",ear2="Kuwunga Earring",body="Kyujutsugi",
  207.     hands="Arcadian Bracers +1",ring1="Rajas Ring",ring2="Stormsoul Ring",back="Buquwik Cape",
  208.     waist="Fotia Belt",legs="Nahtirah Trousers",feet="Arcadian Socks +1"}
  209.                
  210. sets.Jishnu.Acc = {head="Umbani Cap",
  211.     neck="Light Gorget",ear1="Moonshade Earring",ear2="Volley Earring",body="Orion Jerkin +1",
  212.     hands="Buremte Gloves",ring1="Hajduk Ring",ring2="Longshot Ring",back="Lutian Cape",
  213.     waist="Fotia Belt",legs="Arcadian Braccae +1",feet="Orion Socks +1"}               
  214. end
  215.  
  216.  
  217.  
  218. --Precast Functions for JAs, Ranged Attacks, and Weaponskills--
  219.  
  220. function precast(spell,act)
  221.     if spell.type == 'JobAbility' then
  222.         if sets.JA[spell.english] then
  223.             equip(sets.JA[spell.english])
  224.         end
  225.     end
  226.    
  227.     if spell.name == "Ranged" then
  228.         equip(sets.Utility.Snapshot)
  229.     end
  230.  
  231. --Weaponskill sets coupled based on Stat Attribute Modifier/Crit Modifier--
  232.        
  233.     if spell.english == "Coronach" or spell.english == "Namas Arrow" then
  234.         equip(sets.Coronach[sets.Coronach.index[Coronach_Index]])
  235.     end
  236.    
  237.     if spell.english == "Slug Shot" or spell.english == "Sidewinder" then
  238.         equip(sets.Coronach[sets.Coronach.index[Coronach_Index]])
  239.     end
  240.    
  241.     if spell.english == "Refulgent Arrow" then
  242.         equip(sets.Coronach[sets.Coronach.index[Coronach_Index]])
  243.     end
  244.    
  245.     if spell.english == "Jishnu's Radiance" then
  246.         equip(sets.Jishnu[sets.Jishnu.index[Jishnu_Index]])
  247.     end
  248.    
  249.     if spell.english == "Heavy Shot" or spell.english == "Arching Arrow" then
  250.         equip(sets.Jishnu[sets.Jishnu.index[Jishnu_Index]])
  251.     end
  252.    
  253.     if spell.english == "Wildfire" then
  254.         equip(sets.Wildfire[sets.Wildfire.index[Wildfire_Index]])
  255.     end
  256.    
  257.     if spell.english == "Trueflight" then
  258.         equip(sets.Trueflight[sets.Trueflight.index[Trueflight_Index]])
  259.     end
  260.    
  261.     if spell.english == "Last Stand" or spell.english == "Apex Arrow" then
  262.         equip(sets.LastS[sets.LastS.index[LastS_Index]])
  263.     end
  264.    
  265.     if spell.english == "Detonator" or spell.english == "Empyreal Arrow" then
  266.         equip(sets.LastS[sets.LastS.index[LastS_Index]])
  267.     end
  268.    
  269.     if spell.english == "Exenterator" then
  270.         equip(sets.Exen[sets.Exen.index[Exen_Index]])
  271.     end
  272. end
  273.  
  274. --Midcast functions to equip midshot sets for Ranged Attacks and when Barrage is active--
  275. --Mirror's Precast to ensure desired effects are applied--
  276.  
  277. function midcast(spell,act)
  278.         if spell.name == "Ranged" then
  279.                 if buffactive.Barrage then
  280.                       equip(sets.Barrage[sets.Barrage.index[Barrage_Index]])
  281.                 else
  282.                        equip(sets.RangeTP[sets.RangeTP.index[RangeTP_Index]])
  283.                 end
  284.         end
  285.  
  286.     if spell.type == 'JobAbility' then
  287.         if sets.JA[spell.english] then
  288.             equip(sets.JA[spell.english])
  289.         end
  290.     end
  291.  
  292.     --Weaponskill sets coupled based on Stat Attribute Modifier/Crit Modifier--
  293.        
  294.     if spell.english == "Coronach" or spell.english == "Namas Arrow" then
  295.         equip(sets.Coronach[sets.Coronach.index[Coronach_Index]])
  296.     end
  297.    
  298.     if spell.english == "Slug Shot" or spell.english == "Sidewinder" then
  299.         equip(sets.Coronach[sets.Coronach.index[Coronach_Index]])
  300.     end
  301.    
  302.     if spell.english == "Refulgent Arrow" then
  303.         equip(sets.Coronach[sets.Coronach.index[Coronach_Index]])
  304.     end
  305.    
  306.     if spell.english == "Jishnu's Radiance" then
  307.         equip(sets.Jishnu[sets.Jishnu.index[Jishnu_Index]])
  308.     end
  309.    
  310.     if spell.english == "Heavy Shot" or spell.english == "Arching Arrow" then
  311.         equip(sets.Jishnu[sets.Jishnu.index[Jishnu_Index]])
  312.     end
  313.    
  314.     if spell.english == "Wildfire" then
  315.         equip(sets.Wildfire[sets.Wildfire.index[Wildfire_Index]])
  316.     end
  317.    
  318.     if spell.english == "Trueflight" then
  319.         equip(sets.Trueflight[sets.Trueflight.index[Trueflight_Index]])
  320.     end
  321.    
  322.     if spell.english == "Last Stand" or spell.english == "Apex Arrow" then
  323.         equip(sets.LastS[sets.LastS.index[LastS_Index]])
  324.     end
  325.    
  326.     if spell.english == "Detonator" or spell.english == "Empyreal Arrow" then
  327.         equip(sets.LastS[sets.LastS.index[LastS_Index]])
  328.     end
  329.    
  330.     if spell.english == "Exenterator" then
  331.         equip(sets.Exen[sets.Exen.index[Exen_Index]])
  332.     end
  333.  
  334.  end
  335.  
  336. --Aftercast function, returns user to TP/Melee set after action is complete--
  337.  
  338. function aftercast(spell,act)
  339.  
  340.     if player.status == 'Engaged' then 
  341.         equip(sets.TP[sets.TP.index[TP_Index]])
  342.     else
  343.         equip(sets.Utility.Snapshot)
  344.     end
  345. end
  346.  
  347. function buff_change(new,old)
  348.         if buffactive['Barrage'] then
  349.                 equip(sets.JA['Barrage'])
  350.         end
  351.  end
  352.  
  353. --Status Change function, switches user to TP set upon engaging--
  354.  
  355. function status_change(new,old)
  356.  
  357.         if player.status == 'Engaged' then
  358.                 equip(sets.TP[sets.TP.index[TP_index]])
  359.         else
  360.                 equip(sets.Utility.Snapshot)
  361.         end
  362.  
  363.         if buffactive['Barrage'] and new == 'Engaged' then
  364.                 equip(sets.JA['Barrage'])
  365.         end
  366. end
  367.  
  368.  
  369. --Toggle Command functions--
  370. --Gearswap direct command = //gs c toggle 'x' set
  371. --Macro line = /console gs c toggle x set
  372. --ex: /console gs c toggle RangeTP set
  373. -- Index is set to 1 or 'Reg', press button once to switch to 'Acc', and so on.
  374.  
  375. function self_command(command)
  376.    
  377.     if command == 'toggle TP set' then
  378.     TP_Index = TP_Index +1
  379.     if TP_Index > #sets.TP.index then TP_Index = 1 end
  380.     send_command('@input /echo >>> TP Set Changed to: '..sets.TP.index[TP_Index]..' ')
  381.     equip(sets.TP[sets.TP.index[TP_Index]])
  382.  
  383.     elseif command == 'toggle RangeTP set' then
  384.     RangeTP_Index = RangeTP_Index +1
  385.     if RangeTP_Index > #sets.RangeTP.index then RangeTP_Index = 1 end
  386.     send_command('@input /echo >>> Range TP set changed to: '..sets.RangeTP.index[RangeTP_Index]..' ')
  387.     equip(sets.RangeTP[sets.RangeTP.index[RangeTP_Index]])
  388.    
  389.     elseif command == 'toggle Barrage set' then
  390.     Barrage_Index = Barrage_Index +1
  391.     if Barrage_Index > #sets.Barrage.index then Barrage_Index = 1 end
  392.     send_command('@input /echo >>> Barrage Set Changed to: '..sets.Barrage.index[Barrage_Index]..' ')
  393.     equip(sets.Barrage[sets.Barrage.index[Barrage_Index]])
  394.    
  395.     elseif command == 'toggle Ranged WS sets' then
  396.     Coronach_Index = Coronach_Index +1
  397.     if Coronach_Index > #sets.Coronach.index then Coronach_Index = 1 end
  398.     Wildfire_Index = Wildfire_Index +1
  399.     if Wildfire_Index > #sets.Wildfire.index then Wildfire_Index = 1 end
  400.     Trueflight_Index = Trueflight_Index +1
  401.     if Trueflight_Index > #sets.Trueflight.index then Trueflight_Index = 1 end
  402.     LastS_Index = LastS_Index +1
  403.     if LastS_Index > #sets.LastS.index then LastS_Index = 1 end
  404.     Jishnu_Index = Jishnu_Index +1
  405.     if Jishnu_Index > #sets.Jishnu.index then Jishnu_Index = 1 end
  406.     send_command('@input /echo >>>Ranged WS sets changed to: '..sets.Jishnu.index[Jishnu_Index]..' ')
  407.    
  408.    
  409.     elseif command == 'toggle Exenterator set' then
  410.     Exen_Index = Exen_Index +1
  411.     if Exen_Index > #sets.Exen.index then Exen_Index = 1 end
  412.     send_command('@input /echo >>> Exenterator Set Changed to: '..sets.Exen.index[Exen_Index]..' ')
  413.     equip(sets.Exen[sets.Exen.index[Exen_Index]])
  414.     end
  415. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement