Advertisement
ErC8D

GS_MNK

Jun 9th, 2014
471
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.38 KB | None | 0 0
  1. --Gearswap file for Monk(FFXI)--
  2.  
  3. function get_sets ()
  4.  
  5. -- Job Ability sets for Precast Function --
  6. -- Chi Blast and others intentionally omitted --
  7. sets.JA = {}
  8.  
  9. sets.JA['Hundred Fist'] = {legs="Hesychast's Hose +1"}
  10. sets.JA['Boost'] = {hands="Anchorite's Gloves"}
  11. sets.JA['Focus'] = {head="Anchorite's Crown +1"}
  12. sets.JA['Impetus'] = {body="Tantra Cyclas +2"}
  13. sets.JA['Dodge'] = {feet="Anchorite's Gaiters +1"}
  14. sets.JA['Counterstance'] = {feet="Hesychast's Gaiters +1"}
  15. sets.JA['Mantra'] = {feet="Hesychast's Gaiters +1"}
  16. sets.JA['Formless Strikes'] = {body="Hesychast's Cyclas +1"}
  17.  
  18. sets.JA['Chakra'] = {head="Lithelimb Cap",
  19.         body="Anchorite's Cyclas +1",neck="Tjukurrpa Medal",ear1="Upsurge Earring",ear2="Impregnable Earring",
  20.         hands="Hesychast's Gloves +1",ring1="Terrasoul Ring",ring2="Terrasoul Ring",back="Iximulew Cape",
  21.         waist="Caudata Belt",legs="Ighwa Trousers",feet="Qaaxo Leggings"}
  22.  
  23. --TP Sets--        
  24.  
  25. sets.TP = {}
  26. sets.TP.index = {'Reg','Acc','PDT',}
  27. TP_Index = 1
  28.  
  29. sets.TP.Reg = {ammo="Ginsen",
  30.         head="Felistris Mask",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
  31.         body="Qaaxo Harness",hands="Hesychast's Gloves +1",ring1="Rajas Ring",ring2="Epona's Ring",
  32.         back="Atheling Mantle",waist="Windbuffet Belt",legs="Hesychast's Hose +1",feet="Qaaxo Leggings"}
  33.  
  34. sets.TP.Acc = {ammo="Honed Tathlum",
  35.         head="Whirlpool Mask",neck="Ej Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
  36.         body="Manibozho Jerkin",hands="Hesychast's Gloves +1",ring1="Beeline Ring",ring2="Patricius Ring",
  37.         back="Anchoret's Mantle",waist="Anguinus Belt",legs="Ighwa Trousers",feet="Qaaxo Leggings"}
  38.  
  39. sets.TP.PDT = {head="Lithelimb Cap",
  40.         body="Qaaxo Harness",neck="Twilight Torque",ring1="Defending Ring",ring2="Patricius Ring",
  41.         back="Mollusca Mantle",waist="Black Belt",legs="Ighwa Trousers"}
  42.  
  43.  
  44. --Impetus TP--
  45.  
  46. sets.Imp = {}
  47. sets.Imp.index = {'Reg','Acc'}
  48. Imp_Index = 1
  49.  
  50. sets.Imp.Reg = set_combine(sets.TP.Reg,{body="Tantra Cyclas +2"})
  51. sets.Imp.Acc = set_combine(sets.TP.Acc,{body="Tantra Cyclas +2"})      
  52.  
  53. --WS Sets--
  54.  
  55. sets.WS = {}
  56. sets.WS.index = {'Reg','Acc',}
  57. WS_Index = 1
  58.  
  59. sets.WS.Reg = {ammo="Ginsen",
  60.         head="Felistris Mask",neck="Asperity Necklace", ear1="Moonshade Earring",ear2="Brutal Earring",
  61.         body="Anchorite's Cyclas +1",hands="Hesychast's Gloves +1",ring1="Pyrosoul Ring",ring2="Epona's Ring",
  62.         back="Buquwik Cape",waist="Caudata Belt",legs="Hesychast's Hose +1",feet="Qaaxo Leggings"}
  63.        
  64. sets.WS.Acc = {ammo="Honed Tathlum",
  65.         head="Whirlpool Mask",neck="Asperity Necklace",ear1="Moonshade Earring",ear2="Brutal Earring",
  66.         body="Manibozho Jerkin",hands="Hesychast's Gloves +1",ring1="Rajas Ring",ring2="Beeline Ring",
  67.         body="Anchorite's Mantle", waist="Caudata Belt",legs="Ighwa Trousers",feet="Qaaxo Leggings"}
  68.  
  69.  
  70.  
  71. --Victory Smite/Ascetic's Fury--
  72.  
  73. sets.VS = {}
  74. sets.VS.index = {'Reg','Acc','Imp'}
  75. VS_Index = 1
  76.  
  77. sets.VS.Reg = {ammo="Ginsen",
  78.         head="Uk'uxkaj Cap",neck="Light Gorget", ear1="Moonshade Earring",ear2="Brutal Earring",
  79.         body="Anchorite's Cyclas +1",hands="Hesychast's Gloves +1",ring1="Pyrosoul Ring",ring2="Epona's Ring",
  80.         back="Buquwik Cape",waist="Caudata Belt",legs="Hesychast's Hose +1",feet="Qaaxo Leggings"}
  81.  
  82. sets.VS.Acc = {ammo="Honed Tathlum",
  83.         head="Whirlpool Mask",neck="Light Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
  84.         body="Manibozho Jerkin",hands="Hesychast's Gloves +1",ring1="Rajas Ring",ring2="Beeline Ring",
  85.         body="Anchorite's Mantle", waist="Caudata Belt",legs="Ighwa Trousers",feet="Qaaxo Leggings"}
  86.  
  87. sets.VS.Imp = set_combine(sets.VS.Reg,{body="Tantra Cyclas +2"})
  88.  
  89.  
  90.  
  91. --Asuran Fists--
  92.  
  93. sets.AF = {}
  94. sets.AF.index = {'Reg','Acc'}
  95. AF_Index = 1
  96.  
  97. sets.AF.Reg = set_combine(sets.WS.Reg,{back="Vespid Mantle"})
  98. sets.AF.Acc = set_combine(sets.WS.Acc,{back="Vespid Mantle"})
  99.  
  100. end
  101.  
  102. --Precast Functions--
  103.  
  104. function precast(spell,act)
  105.     if spell.type == 'JobAbility' then
  106.         if sets.JA[spell.english] then
  107.             equip(sets.JA[spell.english])
  108.         end
  109.     end
  110.  
  111.     if spell.type == 'WeaponSkill' then
  112.         equip(sets.WS[sets.WS.index[WS_Index]])
  113.     end
  114.  
  115.     if spell.english == "Victory Smite" or spell.english == "Ascetic's Fury" then
  116.         equip(sets.VS[sets.VS.index[VS_Index]])
  117.     end
  118.    
  119.         if spell.english == "Asuran Fists" then
  120.         equip(sets.AF[sets.AF.index[AF_Index]])
  121.     end
  122.  
  123.     if buffactive['Impetus'] and (spell.english == "Victory Smite" or spell.english == "Ascetic's Fury") then
  124.         equip(sets.VS.Imp)
  125.     end
  126. end
  127.  
  128. --Mirror's Precast to ensure desired effects are applied--
  129. function midcast(spell,act)
  130.     if spell.type == 'JobAbility' then
  131.         if sets.JA[spell.english] then
  132.             equip(sets.JA[spell.english])
  133.         end
  134.     end
  135.  
  136.     if spell.type == 'WeaponSkill' then
  137.         equip(sets.WS[sets.WS.index[WS_Index]])
  138.     end
  139.  
  140.     if spell.english == "Victory Smite" or spell.english == "Ascetic's Fury" then
  141.         equip(sets.VS[sets.VS.index[VS_Index]])
  142.     end
  143.    
  144.         if spell.english == "Asuran Fists" then
  145.         equip(sets.AF[sets.AF.index[AF_Index]])
  146.     end
  147.  
  148.     if buffactive['Impetus'] and (spell.english == "Victory Smite" or spell.english == "Ascetic's Fury") then
  149.         equip(sets.VS.Imp)
  150.     end
  151. end
  152.  
  153.  
  154. --Aftercast Functions--
  155.  
  156. function aftercast(spell,act)
  157.     if player.status == 'Engaged' and buffactive['Impetus'] then
  158.         equip(sets.Imp[sets.Imp.index[Imp_Index]])
  159.    
  160.     elseif player.status == 'Engaged' then
  161.         equip(sets.TP[sets.TP.index[TP_Index]])
  162.    
  163.     end
  164. end
  165.  
  166. --Buff Change Function for Impetus gear--
  167.  
  168. function buff_change(new,old)
  169.     if buffactive['Impetus'] then
  170.         equip(sets.Imp[sets.Imp.index[Imp_Index]])
  171.     end
  172. end
  173.  
  174. --Function to retain Impetus Gear after mob is defeated, while status is still active--
  175.  
  176. function status_change(new,old)
  177.     if new == 'Engaged' then
  178.         equip(sets.TP[sets.TP.index[TP_Index]])
  179.     end
  180.  
  181.     if buffactive['Impetus'] and new == 'Engaged' then
  182.         equip(sets.Imp[sets.Imp.index[Imp_Index]])
  183.     end
  184. end
  185.  
  186. --Toggle Command functions--
  187. --Gearswap direct command = //gs c toggle 'x' set
  188. --Macro line = /console gs c toggle x set
  189. --ex: /console gs c toggle TP set
  190. -- Index is set to 1 or 'Reg', press button once to switch to 'Acc', press again to switch 'PDT', and again to return to 'Reg'
  191.  
  192. function self_command(command)
  193.     if command == 'toggle TP set' then 
  194.         TP_Index = TP_Index +1
  195.         if TP_Index > #sets.TP.index then TP_Index = 1 end
  196.         send_command('@ input /echo >>> TP set changed to '..sets.TP.index[TP_Index]..' ')
  197.         equip(sets.TP[sets.TP.index[TP_Index]])
  198.  
  199.     elseif command == 'toggle WS set' then
  200.         WS_Index = WS_Index +1
  201.         if WS_Index > #sets.WS.index then WS_Index = 1 end
  202.         send_command('@ input /echo >>> WS set changed to '..sets.WS.index[WS_Index]..' ')
  203.         equip(sets.WS[sets.WS.index[WS_Index]])
  204.        
  205.     elseif command == 'toggle VS set' then
  206.         VS_Index = VS_Index +1
  207.         if VS_Index > #sets.VS.index then VS_Index = 1 end
  208.         send_command('@ input /echo >>> VS set changed to '..sets.VS.index[VS_Index]..' ')
  209.         equip(sets.VS[sets.VS.index[VS_Index]])
  210.        
  211.     elseif command == 'toggle AF set' then
  212.         AF_Index = AF_Index +1
  213.         if AF_Index > #sets.AF.index then AF_Index = 1 end
  214.         send_command('@ input /echo >>> AF set changed to '..sets.AF.index[AF_Index]..' ')
  215.         equip(sets.AF[sets.AF.index[AF_Index]])
  216.        
  217.     elseif command == 'toggle Imp set' then
  218.         Imp_Index = Imp_Index +1
  219.         if Imp_Index > #sets.Imp.index then Imp_Index = 1 end
  220.         send_command('@ input /echo >>> Imp set changed to '..sets.Imp.index[Imp_Index]..' ')
  221.         equip(sets.Imp[sets.Imp.index[Imp_Index]])
  222.     end
  223. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement