Advertisement
Guest User

Untitled

a guest
Dec 30th, 2016
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 13.81 KB | None | 0 0
  1. --Gearswap file for Corsair (FFXI)
  2. --Highly recommend reviewing gearsets and replacing with personal items.
  3.  
  4. --Also recommend changing key bind keys since everyone's keyboard and play style are different. ^ = CTRL, != ALT.
  5.  
  6. function get_sets()
  7.  
  8. --C = Luzaf Ring On/Off
  9. --Z = TP Index Toggle
  10. --X = Ranged Attack Index Toggle
  11.  
  12.         send_command('bind C gs c toggle Luz')
  13.         send_command('bind Z gs c toggle TP set')
  14.         send_command('bind X gs c toggle RA set')
  15.        
  16. --Alt+C = Quick Draw Set Toggle    
  17. --Alt+Z = Melee WS index toggle
  18. --Alt+X = Ranged WS index toggle
  19.  
  20.         send_command('bind !C gs c toggle QD set')
  21.         send_command('bind !Z gs c toggle WS sets')
  22.         send_command('bind !X gs c toggle RWS set')
  23.  
  24.  
  25.     --Job Ability Sets--
  26.        
  27.         sets.JA = {}
  28.        
  29.         sets.JA['Random Deal'] = {head="Lanun tricorne +1",body="Commodore Frac",feet="Lanun bottes +1"}
  30.         sets.JA['Wild Card'] = {head="Lanun tricorne +1",body="Commodore Frac",feet="Lanun bottes +1"}
  31.         sets.JA['Snake Eye'] = {head="Lanun tricorne +1",body="Commodore Frac",legs="Lanun Culottes",feet="Lanun bottes +1"}
  32.         sets.JA['Fold'] = {head="Lanun Tricorne +1",body="Commodore Frac", hands="Lanun Gants",feet="Lanun bottes +1"}
  33.         sets.JA['Phantom Roll'] = {head="Lanun tricorne +1",body="Commodore Frac",hands="Nvrch. gants +1",ring2="Barataria Ring",back="Gunslinger's Cape"}
  34.         sets.JA['Tactician's Roll'] = {head="Lanun tricorne +1",body="Nvrch. Frac +1",hands="Nvrch. gants +1",ring2="Barataria Ring"}
  35.         sets.JA['Courser's Roll'] = {head="Lanun Tricorne +1",body="Commodore Frac",hands="Nvrch. gants +1",feet="Nvrch. bottes +1",ring2="Barataria Ring"}
  36.         sets.JA['Blitzer's Roll'] = {head="Nvrch. tricorne +2",body="Commodore Frac",hands="Nvrch. gants +1",ring2="Barataria Ring"}
  37.        
  38.         --Luzaf Ring index for Self_Command toggle--
  39.         sets.Luz = {}
  40.         sets.Luz.index = {'Off','On'}
  41.         Luz_Index = 1
  42.        
  43.         sets.Luz.Off = {ring1="Lunette Ring +1"}
  44.         sets.Luz.On = {ring1="Luzaf's Ring"}
  45.        
  46.         --Melee TP sets--  
  47.        
  48.         sets.TP = {}
  49.         sets.TP.index = {'Reg','Acc','DT'}
  50.         TP_Index = 1
  51.        
  52.         sets.TP.Reg = {
  53.                      head="Espial Cap", neck="Wivre gorget", ear1="Suppanomimi", ear2="Brutal Earring", body="Espial gambison", hands="Espial bracers", ring1="Rajas Ring", ring2="Epona's ring", back="Atheling mantle", waist="Twilight belt", legs="Espial hose", feet="Espial socks"}
  54.                            
  55.                        
  56.         sets.TP.Acc = {
  57.                      head="Espial Cap", neck="Wivre gorget", ear1="Suppanomimi", ear2="Brutal Earring", body="Espial gambison", hands="Espial bracers", ring1="Rajas Ring", ring2="Epona's ring", back="Atheling mantle", waist="Twilight belt", legs="Espial hose", feet="Espial socks"}
  58.                                
  59.                                
  60.         sets.TP.DT = {
  61.                     head="Espial Cap", neck="Wivre gorget", ear1="Suppanomimi", ear2="Brutal Earring", body="Espial gambison", hands="Espial bracers", ring1="Rajas Ring", ring2="Epona's ring", back="Atheling mantle", waist="Twilight belt", legs="Espial hose", feet="Espial socks"}
  62.        
  63.         --Snapshot Set--
  64.         sets.Snapshot = {}
  65.                              
  66.         sets.Snapshot =  {ammo="Bronze Bullet",
  67.                       hands="Lanun gants",back="Navarch's mantle",waist="Impulse belt",legs="Navarch's culottes +1",feet="Iuitl gaiters +1"}
  68.        
  69.        
  70.         --Ranged TP Sets--
  71.         sets.RA = {}
  72.         sets.RA.index = {'Reg','Acc'}
  73.        
  74.         RA_Index = 1
  75.         sets.RA.Reg = {
  76.                    head="Espial Cap", neck="Waylayer's scarf +1", ear1="Volley earring", ear2="Brutal Earring", body="Espial gambison", hands="Navarch's gants +1", ring1="Rajas Ring", ring2="Hajduk ring", back="Radical mantle", waist="Commodore belt", legs="Navarch's culottes +1", feet="Espial socks"}
  77.                                  
  78.         sets.RA.Acc = {
  79.                     head="Espial Cap", neck="Waylayer's scarf +1", ear1="Volley earring", ear2="Brutal Earring", body="Espial gambison", hands="Navarch's gants +1", ring1="Rajas Ring", ring2="Hajduk ring", back="Radical mantle", waist="Commodore belt", legs="Navarch's culottes +1", feet="Espial socks"}                    
  80.                                    
  81.         --Melee WS Sets--
  82.        
  83.         sets.Requi = {}
  84.         sets.Requi.index = {'Reg','Acc'}
  85.         Requi_Index = 1
  86.        
  87.         sets.Requi.Reg = {
  88.                    head="Whirlpool mask", neck="Breeze Gorget", ear1="Moonshade Earring", ear2="Brutal Earring",
  89.                    body="Qaaxo harness", hands="Buremte Gloves", ring1="Epona's ring", ring2="Aquasoul ring",
  90.                    back="Atheling mantle", waist="Breeze belt", legs="Quiahuiz trousers", feet="Qaaxo Leggings"}
  91.                                  
  92.         sets.Requi.Acc = set_combine(sets.Requi.Reg,{ear1="Bladeborn earring",
  93.                    ear2="Steelflash earring",body="Manibozho jerkin", legs="Manibozho brais"})
  94.        
  95.        
  96.         sets.Exen = {}
  97.         sets.Exen.index = {'Reg','Acc'}
  98.         Exen_Index = 1
  99.        
  100.         sets.Exen.Reg = set_combine(sets.TP.Reg,{neck="Breeze Gorget",ring1="Stormsoul Ring",ring2="Stormsoul Ring",waist="Breeze Belt"})
  101.        
  102.         sets.Exen.Acc = set_combine(sets.TP.Acc,{neck="Breeze Gorget",waist="Breeze Belt"})                    
  103.        
  104.        
  105.         --Ranged WS Sets--
  106.                                    
  107.         sets.LSalute = {}
  108.         sets.LSalute.index = {'Reg','Acc'}
  109.         LSalute_Index = 1
  110.        
  111.         sets.LSalute.Reg = {ammo="Eminent Bullet",
  112.                         head="Pixie Hairpin +1", neck="Stoicheion medal", ear1="Moonshade Earring", ear2="Friomisi earring",               
  113.                         body="Lanun frac +1", hands="Iuitl Wristbands +1", ring1="Fenrir ring +1", ring2="Archon ring",
  114.                         back="Gunslinger's cape", waist="Aquiline belt", legs="Lak. Trews +1", feet="Lanun bottes +1"}
  115.        
  116.         sets.LSalute.Acc = set_combine(sets.LSalute.Reg,{ring1="Sangoma Ring"})
  117.                    
  118.                        
  119.         sets.WFire = {}
  120.         sets.WFire.index = {'Reg','Acc'}
  121.         WFire_Index = 1
  122.        
  123.         sets.WFire.Reg = {ammo="Eminent Bullet",
  124.                          head="Lanun tricorne +1", neck="Stoicheion medal", ear1="Novio earring", ear2="Friomisi earring",                 
  125.                          body="Lanun frac +1", hands="Buremte Gloves", ring1="Acumen ring", ring2="Stormsoul ring",
  126.                          back="Gunslinger's cape", waist="Elanid belt", legs="Lak. trews +1", feet="Lanun bottes +1"}
  127.  
  128.        sets.WFire.Acc = {ammo="Eminent Bullet",
  129.                           head="Lanun tricorne +1", neck="Stoicheion medal", ear1="Novio earring", ear2="Friomisi earring",                    
  130.                           body="Lanun frac +1", hands="Buremte Gloves", ring1="Acumen ring", ring2="Sangoma ring",
  131.                           back="Gunslinger's cape", waist="Elanid belt", legs="Lak. trews +1", feet="Lanun bottes +1"}
  132.        
  133.  
  134.         sets.LastS = {}
  135.         sets.LastS.index = {'Reg','Acc'}
  136.         LastS_Index = 1
  137.        
  138.         sets.LastS.Reg = {ammo="Eminent Bullet",
  139.                         head="Lanun Tricorne +1",neck="Light Gorget",ear1="Moonshade Earring",ear2="Volley Earring",
  140.                         body="Lanun Frac +1",hands="Sigyn's Bazubands",ring1="Stormsoul Ring",ring2="Stormsoul Ring",
  141.                         back="Gunslinger's Cape",waist="Light Belt",legs="Lanun Culottes",feet="Iuitl gaiters +1"}
  142.        
  143.         sets.LastS.Acc = set_combine(sets.LastS.Reg,{ring1="Longshot Ring",legs="Thur. Tights +1"})
  144.        
  145.         sets.QD = {}
  146.         sets.QD.index = {'Reg','MAcc'}
  147.        
  148.         QD_Index = 1
  149.        
  150.         sets.QD.Reg = {ammo="Eminent Bullet",
  151.                      head="Corsair's Tricorne",neck="Stoicheion medal",ear1="Moldavite Earring",ear2="Hecate's Earring", body="Mirke Wardecors",hands="Nvrch. gants +2",ring1="Acumen ring",ring2="Fenrir ring +1",             back="Gunslinger's cape",waist="Aquiline belt",legs="Espial hose", feet="Nvrch. bottes +1"}
  152.                                      
  153.         sets.QD.MAcc = set_combine(sets.QD.Reg,{ring2="Sangoma Ring",feet="Nvrch. bottes +2"})
  154.        
  155. --Separate from QD index--Navarch's bottes +1
  156.        sets.QD.Pre = {ammo="Eminent Bullet",
  157.                      head="Corsair's Tricorne",neck="Stoicheion medal",ear1="Moldavite Earring",ear2="Hecate's Earring", body="Mirke wardecors",hands="Nvrch. gants +2",ring1="Acumen ring",ring2="Fenrir ring +1",     back="Gunslinger's cape",waist="Aquiline belt",legs="Espial hose", feet="Nvrch. bottes +1"}
  158.    
  159.         sets.QD.LightShot = set_combine(sets.QD.Reg,{head="Laksamana Hat +1"})
  160.        
  161.        
  162. --Copy and pasted set from Snprphnx_SCH example--  
  163.     --Obis--
  164.         sets.Obi = {}
  165.         sets.Obi.Fire = {waist='Karin Obi',ring2='Zodiac Ring'}
  166.         sets.Obi.Earth = {waist='Dorin Obi',ring2='Zodiac Ring'}
  167.         sets.Obi.Water = {waist='Suirin Obi',ring2='Zodiac Ring'}
  168.         sets.Obi.Wind = {waist='Furin Obi',ring2='Zodiac Ring'}
  169.         sets.Obi.Ice = {waist='Hyorin Obi',ring2='Zodiac Ring'}
  170.         sets.Obi.Thunder = {waist='Rairin Obi',ring2='Zodiac Ring'}
  171.         sets.Obi.Light = {waist='Korin Obi',ring2='Zodiac Ring'}
  172.         sets.Obi.Dark = {waist='Anrin Obi',ring2='Zodiac Ring'}
  173. end    
  174.        
  175.        
  176.        
  177.        
  178.         --Precast Rules--
  179. function precast(spell)
  180.    
  181.     if spell.type == 'JobAbility' then
  182.         if sets.JA[spell.english] then
  183.             equip(sets.JA[spell.english])
  184.         end
  185.     end
  186.    
  187.     if spell.type == 'CorsairRoll' then
  188.         equip(sets.JA['Phantom Roll'])
  189.     end
  190.    
  191.     if spell.english == "Blitzer's Roll" then
  192.         equip(sets.JA['Blitzer\'s Roll'])
  193.     end
  194.    
  195.     if spell.english == "Tactician's Roll" then
  196.         equip(sets.JA['Tactician\'s Roll'])
  197.     end
  198.    
  199.     if spell.english == "Courser's Roll" then
  200.         equip(sets.JA['Courser\'s Roll'])
  201.     end
  202.    
  203.     if spell.type == 'CorsairShot' then
  204.         equip(sets.QD.Pre)
  205.         if spell.element == world.weather_element or spell.element == world.day_element then
  206.             equip(sets.Obi[spell.element])
  207.         end
  208.     end
  209.    
  210.     if spell.name == "Ranged" then
  211.             equip(sets.Snapshot)
  212.     end
  213.  
  214.     if spell.english == "Double-Up" then
  215.         equip(sets.JA['Phantom Roll'])
  216.     end
  217.            
  218.     if spell.english == 'Requiescat' then
  219.         equip(sets.Requi[sets.Requi.index[Requi_Index]])
  220.     end
  221.            
  222.     if spell.english == "Exenterator" then
  223.         equip(sets.Exen[sets.Exen.index[Exen_Index]])
  224.     end
  225.            
  226.     if spell.english == 'Last Stand' then
  227.         equip(sets.LastS[sets.LastS.index[LastS_Index]])
  228.                    
  229.     end
  230.            
  231.     if spell.english == 'Leaden Salute' then
  232.         equip(sets.LSalute[sets.LSalute.index[LSalute_Index]])
  233.             if spell.element == world.weather_element or spell.element == world.day_element then
  234.                         equip(sets.Obi[spell.element])
  235.             end
  236.     end
  237.            
  238.     if spell.english == 'Wildfire' then
  239.         equip(sets.WFire[sets.WFire.index[WFire_Index]])
  240.             if spell.element == world.weather_element or spell.element == world.day_element then
  241.                         equip(sets.Obi[spell.element])
  242.             end
  243.     end
  244. end    
  245.                
  246. --Midcast Functions--
  247. --Mirror's Precast to ensure desired effects are applied--     
  248.        
  249. function midcast(spell,act)
  250.    
  251.     if spell.type == 'JobAbility' then
  252.         if sets.JA[spell.english] then
  253.             equip(sets.JA[spell.english])
  254.         end
  255.     end
  256.    
  257.     if spell.type == 'CorsairRoll' then
  258.         equip(sets.JA['Phantom Roll'])
  259.     end
  260.    
  261.     if spell.type == 'CorsairShot' then
  262.         equip(sets.QD.Pre)
  263.         if spell.element == world.weather_element or spell.element == world.day_element then
  264.             equip(sets.Obi[spell.element])
  265.         end
  266.     end
  267.    
  268.     if spell.english == 'Light Shot' or spell.english == 'Dark Shot' then
  269.             equip(sets.QD.LightShot)
  270.         if spell.element == world.weather_element or spell.element == world.day_element then
  271.             equip(sets.Obi[spell.element])
  272.         end
  273.     end
  274.    
  275.     if spell.name == "Ranged" then
  276.             equip(sets.RA[sets.RA.index[RA_Index]])
  277.     end
  278.    
  279.     if spell.english == "Double-Up" then
  280.         equip(sets.JA['Phantom Roll'])
  281.     end
  282.            
  283.     if spell.english == 'Requiescat' then
  284.         equip(sets.Requi[sets.Requi.index[Requi_Index]])
  285.     end
  286.            
  287.     if spell.english == "Exenterator" then
  288.         equip(sets.Exen[sets.Exen.index[Exen_Index]])
  289.     end
  290.            
  291.     if spell.english == 'Last Stand' then
  292.         equip(sets.LastS[sets.LastS.index[LastS_Index]])
  293.                    
  294.     end
  295.            
  296.     if spell.english == 'Leaden Salute' then
  297.         equip(sets.LSalute[sets.LSalute.index[LSalute_Index]])
  298.             if spell.element == world.weather_element or spell.element == world.day_element then
  299.                         equip(sets.Obi[spell.element])
  300.             end
  301.     end
  302.            
  303.     if spell.english == 'Wildfire' then
  304.         equip(sets.WFire[sets.WFire.index[WFire_Index]])
  305.             if spell.element == world.weather_element or spell.element == world.day_element then
  306.                         equip(sets.Obi[spell.element])
  307.             end
  308.     end
  309.                
  310.            
  311. end
  312.        
  313.        
  314.            
  315. --Aftercast function, returns user to TP or QD Precast set after action is complete--
  316. function aftercast(spell,act)
  317.            
  318.     if player.status == 'Engaged' then
  319.                 equip(sets.TP[sets.TP.index[TP_Index]])
  320.         else
  321.                 equip(sets.JA['Phantom Roll'])
  322.         end
  323.     end
  324.    
  325.            
  326. function status_change(new,old)
  327.            
  328.     if player.status == 'Engaged' then
  329.             equip(sets.TP[sets.TP.index[TP_Index]])
  330.         else
  331.             equip(sets.JA['Phantom Roll'])
  332.     end
  333.  
  334. end
  335.            
  336.    
  337.        
  338. function self_command(command)
  339.        
  340.             if command == 'toggle TP set' then
  341.                 TP_Index = TP_Index +1
  342.                 if TP_Index > #sets.TP.index then TP_Index = 1 end
  343.                 send_command('@input /echo >>> TP Set changed to '..sets.TP.index[TP_Index]..' ')
  344.                 equip(sets.TP[sets.TP.index[TP_Index]])
  345.                
  346.             elseif command == 'toggle RA set' then
  347.                 RA_Index = RA_Index +1
  348.                 if RA_Index > #sets.RA.index then RA_Index = 1 end
  349.                 send_command('@input /echo >>> Ranged TP Set changed to '..sets.RA.index[RA_Index]..' ')
  350.                 equip(sets.RA[sets.RA.index[RA_Index]])
  351.    
  352.        
  353.    
  354.             elseif command == 'toggle WS sets' then
  355.                 Requi_Index = Requi_Index +1
  356.                 if Requi_Index > #sets.Requi.index then Requi_Index = 1 end
  357.                 Exen_Index = Exen_Index +1
  358.                 if Exen_Index > #sets.Exen.index then Exen_Index = 1 end
  359.                 send_command('@input /echo >>> Melee WS sets changed to '..sets.Exen.index[Exen_Index]..' ')
  360.                
  361.             elseif command == 'toggle RWS set' then
  362.                 LastS_Index = LastS_Index +1
  363.                 if LastS_Index > #sets.LastS.index then LastS_Index = 1 end
  364.                 LSalute_Index = LSalute_Index +1
  365.                 if LSalute_Index > #sets.LSalute.index then LSalute_Index = 1 end
  366.                 WFire_Index = WFire_Index +1
  367.                 if WFire_Index > #sets.WFire.index then WFire_Index = 1 end
  368.                 send_command('@input /echo >>> Ranged WS sets changed to '..sets.WFire.index[WFire_Index]..' ')
  369.                
  370.             elseif command == 'toggle QD set' then
  371.                 QD_Index = QD_Index +1
  372.                 if QD_Index > #sets.QD.index then QD_Index = 1 end
  373.                 send_command('@input /echo >>> Quick Draw set changed to '..sets.QD.index[QD_Index]..' ')
  374.                
  375.             elseif command == 'toggle Luz' then
  376.                 Luz_Index = Luz_Index +1
  377.                 if Luz_Index > #sets.Luz.index then Luz_Index = 1 end
  378.                 send_command('@input /echo >>> Luzaf Ring: '..sets.Luz.index[Luz_Index]..' ')
  379.                 equip(sets.Luz[sets.Luz.index[Luz_Index]])
  380.    
  381.             end
  382.            
  383.         end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement