Advertisement
ErC8D

GS_SAM

Jun 9th, 2014
385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.63 KB | None | 0 0
  1. --Gearswap file for Samurai(FFXI)
  2.  
  3. function get_sets()
  4.  
  5.     --JA Sets for Precast Functions--
  6.  
  7.         sets.JA = {}
  8.         sets.JA['Meikyo Shisui'] = {feet="Sakonji Sune-Ate +1"}
  9.         sets.JA['Third Eye'] = {legs="Sakonji Haidate +1"}
  10.         sets.JA['Hasso'] = {hands="Wakido Kote +1"}
  11.         sets.JA['Meditate'] = {head="Wakido Kabuto +1",hands="Sakonji Kote"}
  12.         sets.JA['Shikikoyo'] = {legs="Sakonji Haidate +1"}
  13.         sets.JA['Blade Bash'] = {hands="Sakonji Kote"}
  14.         sets.JA['Sengikori'] = {feet="Unkai Sune-Ate +2"}
  15.        
  16.        
  17.         --If user has Yoichinoyumi then simply replace Cibitshavore--
  18.         --Range/Ammo slots do not need to be defined, can simply delete range=/ammo=, as well --
  19.  
  20.         --TP Sets--
  21.         sets.TP = {}
  22.         sets.TP.index = {'Reg','Acc','PDT'}
  23.         TP_Index = 1
  24.    
  25.         sets.TP.Reg = {range="Cibitshavore",
  26.                    head="Otomi Helm",neck="Asperity Necklace", ear1="Steelflash Earring", ear2="Bladeborn Earring",
  27.                    body="Wakido Domaru +1",hands="Wakido Kote +1",ring1="Rajas Ring",ring2="K'ayres Ring",
  28.                    back="Takaha Mantle",waist="Cetl belt",legs="Wakido Haidate +1",feet="Whirlpool Greaves"}
  29.                            
  30.        
  31.         sets.TP.Acc = {range="Cibitshavore",
  32.                 head="Yaoyotl helm",neck="Iqabi necklace", ear1="Steelflash earring", ear2="Bladeborn earring",
  33.                 body="Sakonji Domaru +1",hands="Wakido Kote +1",ring1="Rajas ring",ring2="Patricius Ring",
  34.                 back="Takaha mantle",waist="Anguinus Belt",legs="Miki. Cuisses",feet="Whirlpool Greaves"}
  35.                            
  36.         sets.TP.PDT = {range="Cibitshavore",
  37.                 head="Lithelimb Cap",neck="Twilight Torque", ear1="Steelflash earring", ear2="Bladeborn earring",
  38.                 body="Miki. breastplate",hands="Umuthi Gloves",ring1="Defending Ring",ring2="Patricius Ring",
  39.                 back="Mollusca Mantle",waist="Cetl belt",legs="Wakido Haidate +1",feet="Whirlpool Greaves"}
  40.                  
  41.  
  42.     --Range and Ammo slots do not need to be defined as long as the user preferred weapon and ammo are already equipped--                    
  43.     --Range TP--
  44.         sets.RA = {}
  45.         sets.RA = {ammo="Tulfaire Arrow",
  46.                head="Sakonji Kabuto +1",neck="Iqabi Necklace",ear1="Clearview Earring",ear2="Matanki Earring",
  47.                body="Kyujutsugi",hands="Buremte Gloves",ring1="Hajduk Ring +1",ring2="Hajduk Ring +1", 
  48.                back="Thall Mantle",waist="Saotome Koshi-Ate",legs="Aetosaur Trousers +1",feet="Wakido Sune-Ate +1"}  
  49.                          
  50.     --Weaponskill Sets--
  51.         sets.WS = {}
  52.         sets.WS.index = {'Reg','Acc'}
  53.         WS_Index = 1
  54.        
  55.         sets.WS.Reg = {range="Cibitshavore",
  56.                    head="Otomi helm",neck="Asperity Necklace",ear1="Brutal earring",ear2="Moonshade earring",
  57.                    body="Sakonji Domaru +1",hands="Boor Bracelets",ring1="Rajas ring",ring2="Pyrosoul Ring",
  58.                    back="Buquwik cape",waist="Windbuffet Belt",legs="Wakido haidate +1",feet="Sak. Sune-Ate +1"}
  59.                    
  60.         sets.WS.Acc = {range="Cibitshavore",
  61.                    head="Yaoyotl helm",neck="Iqabi Necklace",ear1="Brutal earring",ear2="Moonshade earring",
  62.                    body="Sakonji Domaru +1",hands="Boor Bracelets",ring1="Rajas ring",ring2="Pyrosoul Ring",
  63.                    back="Takaha Mantle",waist="Anguinus Belt",legs="Wakido haidate +1",feet="Whirlpool Greaves"}
  64.        
  65.         --Tachi: Shoha--
  66.         sets.Shoha = {}
  67.         sets.Shoha.index = {'Reg','Acc'}
  68.         Shoha_Index = 1
  69.    
  70.         sets.Shoha.Reg = {range="Cibitshavore",
  71.                   head="Otomi helm",neck="Breeze Gorget",ear1="Brutal earring",ear2="Moonshade earring",
  72.                   body="Sakonji Domaru +1",hands="Miki. Gauntlets",ring1="Rajas Ring",ring2="Pyrosoul Ring",
  73.                   back="Atheling Mantle",waist="Windbuffet belt",legs="Miki. Cuisses",feet="Sak. Sune-Ate +1"}
  74.                                  
  75.         sets.Shoha.Acc = {range="Cibitshavore",
  76.                   head="Yaoyotl helm",neck="Breeze Gorget",ear1="Brutal earring",ear2="Moonshade earring",
  77.                   body="Sakonji Domaru +1",hands="Miki. Gauntlets",ring1="Rajas Ring",ring2="Pyrosoul Ring",
  78.                   back="Takaha Mantle",waist="Windbuffet belt",legs="Miki. Cuisses",feet="Sak. Sune-Ate +1"}
  79.        
  80.         --Tachi: Fudo/Tachi: Kaiten--
  81.        
  82.         sets.Fudo = {}
  83.         sets.Fudo.index = {'Reg','Acc'}
  84.         Fudo_Index = 1
  85.    
  86.         sets.Fudo.Reg = {range="Cibitshavore",
  87.                  head="Otomi helm",neck="Light Gorget",ear1="Brutal earring",ear2="Moonshade earring",
  88.                  body="Sakonji Domaru +1",hands="Boor Bracelets",ring1="Rajas ring",ring2="Pyrosoul Ring",
  89.                  back="Buquwik cape",waist="Light belt",legs="Wakido haidate +1",feet="Sak. Sune-Ate +1"}
  90.                                
  91.         sets.Fudo.Acc = {range="Cibitshavore",
  92.                  head="Yaoyotl helm",neck="Light Gorget",ear1="Brutal earring",ear2="Moonshade earring",
  93.                  body="Sakonji Domaru +1",hands="Boor Bracelets",ring1="Rajas ring",ring2="Pyrosoul Ring",
  94.                  back="Buquwik cape",waist="Light belt",legs="Wakido haidate +1",feet="Whirlpool Greaves"}
  95.            
  96.         --Apex Arrow--
  97.         --Range and Ammo slots do not need to be defined as long as the user preferred weapon and ammo are already equipped--
  98.  
  99.         sets.Apex = {}
  100.         sets.Apex.index = {'Reg','Acc'}
  101.         Apex_Index = 1
  102.        
  103.         sets.Apex.Reg = {range="Cibitshavore",ammo="Tulfaire Arrow",
  104.                  head="Sakonji Kabuto +1",neck="Thunder Gorget",ear1="Moonshade Earring",ear2="Breeze Pearl",
  105.                  body="Phorcys Korazin",hands="Unkai Kote +2",ring1="Stormsoul Ring",ring2="Stormsoul Ring",
  106.                  back="Ik Cape",waist="Thunder Belt",legs="Wakido Haidate +1",feet="Wakido Sune-Ate +1"}
  107.        
  108.         sets.Apex.Acc = {range="Cibitshavore",ammo="Tulfaire Arrow",
  109.                  head="Sakonji Kabuto +1",neck="Iqabi Necklace",ear1="Clearview Earring",ear2="Matanki Earring",
  110.                  body="Kyujutsugi",hands="Buremte Gloves",ring1="Hajduk Ring +1",ring2="Hajduk Ring +1",
  111.                  back="Thall Mantle",waist="Thunder Belt",legs="Aetosaur Trousers +1",feet="Wakido Sune-Ate +1"}
  112.        
  113.         --Namas Arrow--
  114.         sets.Nama = {}
  115.         sets.Nama.index = {'Reg','Acc'}
  116.         Nama_Index = 1
  117.        
  118.         sets.Nama.Reg = {range="Yoichinoyumi",ammo="Tulfaire Arrow",
  119.                 head="Sakonji Kabuto +1",neck="Light Gorget",ear1="Vulcan's Pearl",ear2="Vulcan's Pearl",
  120.                 body="Phorcys Korazin",hands="Unkai Kote +2",ring1="Rajas Ring",ring2="Pyrosoul Ring",
  121.                 back="Buquwik Cape",waist="Light Gorget",legs="Wakido Haidate +1",feet="Wakido Sune-Ate +1"}
  122.                    
  123.         sets.Nama.Acc = {range="Yoichinoyumi",ammo="Tulfaire Arrow",
  124.                 head="Sakonji Kabuto +1",neck="Iqabi Necklace",ear1="Clearview Earring",ear2="Matanki Earring",
  125.                 body="Kyujutsugi",hands="Buremte Gloves",ring1="Hajduk Ring +1",ring2="Hajduk Ring +1",
  126.                 back="Thall Mantle",waist="Light Belt",legs="Aetosaur Trousers +1",feet="Wakido Sune-Ate +1"}
  127.        
  128. end
  129.  
  130. --Precast Functions--
  131.  
  132. function precast(spell)
  133.     if spell.type == 'JobAbility' then
  134.         if sets.JA[spell.english] then
  135.             equip(sets.JA[spell.english])
  136.         end
  137.     end
  138.    
  139.     if spell.type == 'WeaponSkill' then
  140.         equip(sets.WS[sets.WS.index[WS_Index]])
  141.    
  142.     end
  143.    
  144.     if spell.english == "Tachi: Shoha" then
  145.         equip(sets.Shoha[sets.Shoha.index[Shoha_Index]])
  146.     end
  147.    
  148.     if spell.english == "Tachi: Kaiten" or spell.english == "Tachi: Fudo" then
  149.         equip(sets.Fudo[sets.Fudo.index[Fudo_Index]])
  150.     end
  151.  
  152.     if spell.english == "Apex Arrow" then
  153.         equip(sets.Apex[sets.Apex.index[Apex_Index]])
  154.     end
  155.    
  156.     if spell.english == "Namas Arrow" then
  157.         equip(sets.Nama[sets.Nama.index[Nama_Index]])
  158.     end
  159.    
  160. end    
  161.  
  162. --Midcast Function if using Ranged Attack to TP--
  163. --Mirror's Precast to ensure desired effects are applied--
  164.  
  165. function midcast(spell,act)
  166.     if spell.name == "Ranged" then
  167.         equip(sets.RA)
  168.     end
  169.    
  170.     if spell.type == 'JobAbility' then
  171.         if sets.JA[spell.english] then
  172.             equip(sets.JA[spell.english])
  173.         end
  174.     end
  175.    
  176.     if spell.type == 'WeaponSkill' then
  177.         equip(sets.WS[sets.WS.index[WS_Index]])
  178.     end
  179.    
  180.     if spell.english == "Tachi: Shoha" then
  181.         equip(sets.Shoha[sets.Shoha.index[Shoha_Index]])
  182.     end
  183.    
  184.     if spell.english == "Tachi: Kaiten" or spell.english == "Tachi: Fudo" then
  185.         equip(sets.Fudo[sets.Fudo.index[Fudo_Index]])
  186.     end
  187.  
  188.     if spell.english == "Apex Arrow" then
  189.         equip(sets.Apex[sets.Apex.index[Apex_Index]])
  190.     end
  191.    
  192.     if spell.english == "Namas Arrow" then
  193.         equip(sets.Nama[sets.Nama.index[Nama_Index]])
  194.     end
  195.    
  196. end
  197.  
  198. --Aftercast Functions--
  199.  
  200. function aftercast(spell,act)
  201.     if player.status == 'Engaged' and buffactive['Sekkanoki'] then
  202.         equip{hands="Unkai Kote +2"}
  203.        
  204.     elseif player.status == 'Engaged' then
  205.         equip(sets.TP[sets.TP.index[TP_Index]])
  206.     end
  207.    
  208.     if player.status == 'Engaged' and buffactive['Reive Mark'] then
  209.         equip{neck="Ygnas's Resolve"}
  210.     end
  211. end
  212.  
  213. function buff_change(new,old)
  214.     if buffactive['Sekkanoki'] then
  215.         equip{hands="Unkai Kote +2"}
  216.     end
  217.    
  218.     if player.status == 'Engaged' and buffactive['Reive Mark'] then
  219.         equip{neck="Ygnas's Resolve"}
  220.     end
  221.    
  222. end
  223.  
  224. function status_change(new,old)
  225.     if new == 'Engaged' then
  226.         equip(sets.TP[sets.TP.index[TP_Index]])
  227.     end
  228.    
  229.     if buffactive['Sekkanoki'] and new == 'Engaged' then
  230.         equip{hands="Unkai Kote +2"}
  231.     end
  232.    
  233.     if player.status == 'Engaged' and buffactive['Reive Mark'] then
  234.         equip{neck="Ygnas's Resolve"}
  235.     end
  236. end
  237.  
  238. --Toggle Command functions--
  239. --Gearswap direct command = //gs c toggle 'x' set
  240. --Macro line = console gs c toggle x set
  241. --ex: console gs c toggle Fudo set
  242. -- Index is set to 1 or 'Reg', press button once to switch to 'Acc', and so on.
  243.  
  244. function self_command(command)
  245.     if command == 'toggle TP set' then
  246.         TP_Index = TP_Index +1
  247.         if TP_Index > #sets.TP.index then TP_Index = 1 end
  248.         send_command('@input /echo >>> TP Set changed to: '..sets.TP.index[TP_Index]..' ')
  249.         equip(sets.TP[sets.TP.index[TP_Index]])
  250.        
  251.     elseif command == 'toggle Shoha set' then
  252.         Shoha_Index = Shoha_Index +1
  253.         if Shoha_Index > #sets.Shoha.index then Shoha_Index = 1 end
  254.         send_command('@input /echo >>> Tachi: Shoha Set changed to: '..sets.Shoha.index[Shoha_Index]..' ')
  255.         equip(sets.Shoha[sets.Shoha.index[Shoha_Index]])
  256.        
  257.     elseif command == 'toggle Fudo set' then
  258.         Fudo_Index = Fudo_Index +1
  259.         if Fudo_Index > #sets.Fudo.index then Fudo_Index = 1 end
  260.         send_command('@input /echo >>> Tachi: Fudo/Kaiten Set changed to: '..sets.Fudo.index[Fudo_Index]..' ')
  261.         equip(sets.Fudo[sets.Fudo.index[Fudo_Index]])
  262.        
  263.     elseif command == 'toggle Apex set' then
  264.         Apex_Index = Apex_Index +1
  265.         if Apex_Index > #sets.Apex.index then Apex_Index = 1 end
  266.         send_command('@input /echo >>> Apex Arrow Set Changed to: '..sets.Apex.index[Apex_Index]..' ')
  267.         equip(sets.Apex[sets.Apex.index[Apex_Index]])
  268.    
  269.     elseif command == 'toggle Namas set' then
  270.         Nama_Index = Nama_Index +1
  271.         if Nama_Index > #sets.Nama.index then Nama_Index = 1 end
  272.         send_command('@input /echo >>> Namas Arrow Set Changed to: '..sets.Nama.index[Nama_Index]..' ')
  273.         equip(sets.Nama[sets.Nama.index[Nama_Index]])
  274.    
  275.     elseif command == 'toggle WeaponSkill set' then
  276.         WS_Index = WS_Index +1
  277.         if WS_Index > #sets.WS.index then WS_Index = 1 end
  278.         send_command('@input /echo >>> WeaponSkill Set Changed to: '..sets.WS.index[WS_Index]..' ')
  279.         equip(sets.WS[sets.WS.index[WS_Index]])
  280.     end
  281. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement