Advertisement
Guest User

WAR LUA

a guest
Jan 18th, 2015
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 9.92 KB | None | 0 0
  1. -- Tables of Data
  2. toau_zones = S{"Leujaoam Sanctum","Mamool Ja Training Grounds","Lebros Cavern","Periqia","Ilrusi Atoll",
  3.         "Nyzul Isle","Bhaflau Remnants","Arrapago Remnants","Silver Sea Remnants","Zhayolm Remnants"}
  4.  
  5. abyssea_zones = S{"Abyssea - Konschtat","Abyssea - La Theine","Abyssea - Tahrongi","Abyssea - Attohwa",
  6.         "Abyssea - Misareaux","Abyssea - Vunkerl","Abyssea - Altepa","Abyssea - Grauberg",
  7.         "Abyssea - Uleguerand","Abyssea - Empyreal Paradox"}
  8.  
  9. strength_ws = S{"Steel Cyclone","King's Justice","Fell Cleave","Metatron Torment","Upheaval","Requiescat",
  10.         "Savage Blade","Vorpal Blade","Sanguine Blade","Herculean Slash","Resolution"}
  11.  
  12.  
  13. crithit_ws = S{"Ukko's Fury","Raging Rush"}
  14.  
  15. -- Functions
  16. -- Gear Sets go here
  17. function get_sets()            
  18.     sets.precast = {}
  19. -- JA Sets
  20.     sets.precast['Provoke'] = {waist="Chaac Belt"}
  21.     sets.precast['Warcry'] = {head="Agoge Mask +1"}
  22.     sets.precast['Tomahawk'] = {ammo="Thr. tomahawk",feet="Agoge Calligae +1"}
  23.     sets.precast['Seigan'] = {}
  24.     sets.precast["Warrior's Charge"] = {legs="Agoge Cuisses +1"}
  25.     sets.precast['Blood Rage'] = {body="Rvg. Lorica +2"}
  26.     sets.precast['Aggressor'] = {head="Pumm. Mask +1",body="Agoge Lorica +1"}
  27.     sets.precast['Berserk'] = {body="Pumm. Lorica +1",feet="Agoge Calligae +1"}
  28.     sets.precast['Mighty Strikes'] = {hands="Agoge muffler's +1"}
  29. -- Subjob JA Sets
  30.     sets.precast.Waltz = {head="Yaoyotl helm",neck="Twilight Torque",body="Xaddi Mail",hands="Agoge Mufflers +1",left_ring="Titan Ring",
  31.                 right_ring="Dark Ring",waist="Nierenschutz",back="Shadow Mantle",legs="Agoge Cuisses +1",feet="Ejekamal boots"}
  32. -- WS Sets
  33.     sets.WS = {}
  34.     sets.precast.Str_Ws = {ammo="Ravager's orb",head="Otomi helm",left_ear="Moonshade Earring",right_ear="Brutal Earring",
  35.         body="Phorcys Korazin",hands="Xaddi Gauntlets",left_ring="Rajas Ring",right_ring="Ifrit Ring",
  36.         back="Mauler's Mantle",legs="Agoge Cuisses +1",feet="Ejekamal Boots"}
  37.     sets.precast.Crit_Ws = {ammo="Yetshila",head="Felistris Mask",left_ear="Moonshade Earring",right_ear="Brutal Earring",
  38.                 body="Phorcys Korazin",hands="Xaddi Gauntlets",left_ring="Rajas Ring",right_ring="Ifrit Ring",
  39.                 back="Rancorous Mantle",legs="Agoge Cuisses +1",feet="Hrafn Gambieras"}
  40.     sets.precast.SACrit ={head="Felistris Mask",back="Cavaros mantle",feet="Hrafn Gambieras"}
  41.     sets.precast["Ukko's Fury"] = {neck="Light gorget",waist="Light belt"}
  42.     sets.precast["King's Justice"] = {neck="Asperity Necklace",waist="Breeze Belt"}
  43.     sets.precast["Fell Cleave"] = sets.precast["King's Justice"]
  44.     sets.precast["Metatron Torment"] = {neck="Light Gorget",waist="Light Belt"}
  45.     sets.precast["Upheaval"] = {ammo="Oneiros Pebble",head="Felistris Mask",neck="Light Gorget",
  46.         body="Xaddi Mail",hands="Agoge Mufflers +1",left_ring="Titan Ring",right_ring="Titan Ring",back="Iximulew Cape",
  47.         waist="Windbuffet Belt",feet="Pumm. Calligae +1"}
  48.     sets.precast["Steel Cyclone"] = sets.precast["Upheaval"]
  49.     sets.precast["Herculean Slash"] = sets.precast["Upheaval"]
  50.     sets.precast["Resolution"] = {head="Yaoyotl Helm",neck="Asperity Necklace",left_ear="Moonshade earring",
  51.         hands="Xaddi Gauntlets",waist="Breeze Belt",legs="Pumm. Cuisses +1"}
  52.     sets.precast["Savage Blade"] = sets.precast["Resolution"]
  53.     sets.precast["Requiescat"] = {head="Yaoyotl Helm",neck="Portus Collar",left_ear="Moonshade earring",
  54.         hands="Xaddi Gauntlets",waist="Windbuffet Belt",legs="Pumm. Cuisses +1"}
  55.     sets.precast["Sanguine Blade"] = {head="Yaoyotl Helm",neck="Iqabi Necklace",left_ear="Moonshade earring",
  56.         hands="Xaddi Gauntlets",waist="Dynamic Belt +1",legs="Pumm. Cuisses +1"}
  57.    
  58.  
  59. -- TP Sets
  60.     sets.TP = {}
  61.     sets.TP.Bravura = {}
  62.     sets.TP.Bravura.Normal = {ammo="Yetshila",head="Yaoyotl Helm",neck="Asperity Necklace",left_ear="Trux Earring",right_ear="Brutal Earring",
  63.         body="Xaddi Mail",hands="Xaddi Gauntlets",left_ring="Rajas Ring",right_ring="K'ayres Ring",
  64.         back="Mauler's mantle",waist="Windbuffet Belt",legs="Agoge Cuisses +1",feet="Xaddi Boots"}
  65.     sets.TP.Bravura.High = {ammo="Yetshila",head="Yaoyotl Helm",neck="Portus Collar",left_ear="Trux Earring",right_ear="Brutal Earring",
  66.         body="Xaddi Mail",hands="Xaddi Gauntlets",left_ring="Rajas Ring",right_ring="K'ayres Ring",
  67.         back="Mauler's mantle",waist="Windbuffet Belt",legs="Agoge Cuisses +1",feet="Xaddi Boots"}
  68.     sets.TP.Razorfury = {}
  69.     sets.TP.Razorfury.Normal = {ammo="Yetshila",head="Yaoyotl Helm",neck="Asperity Necklace",left_ear="Trux Earring",right_ear="Brutal Earring",
  70.         body="Xaddi Mail",hands="Xaddi Gauntlets",left_ring="Rajas Ring",right_ring="K'ayres Ring",
  71.         back="Mauler's mantle",waist="Windbuffet Belt",legs="Agoge Cuisses +1",feet="Xaddi Boots"}
  72.     sets.TP.Razorfury.High = {ammo="Yetshila",head="Yaoyotl Helm",neck="Portus Collar",left_ear="Trux Earring",right_ear="Brutal Earring",
  73.         body="Xaddi Mail",hands="Xaddi Gauntlets",left_ring="Rajas Ring",right_ring="K'ayres Ring",
  74.         back="Mauler's mantle",waist="Windbuffet Belt",legs="Agoge Cuisses +1",feet="Xaddi Boots"}
  75.     sets.TP.DD = {}
  76.     sets.TP.Hybrid = {ammo="Yetshila",head="Yaoyotl Helm",neck="Iqabi Necklace",left_ear="Trux Earring",right_ear="Brutal Earring",
  77.         body="Xaddi Mail",hands="Xaddi Gauntlets",left_ring="Rajas Ring",right_ring="K'ayres ring",
  78.         back="Mauler's Mantle",waist="Dynamic Belt +1",legs="Pumm. Cuisses +1",feet="Xaddi Boots"}
  79.     sets.TP.Ranged = {}
  80.     sets.TP.Engaged = {}
  81. -- Special Sets
  82.     sets.DT = {neck="Twilight Torque",hands="Agoge Mufflers +1",left_ring="Rajas Ring",right_ring="Dark Ring",waist="Nierenschutz",
  83.          back="Shadow Mantle",legs="Agoge Cuisses +1"}
  84.     sets.Twilight = {head="Twilight helm",body="Twilight mail"}
  85. -- Aftercast/Idle Sets
  86.     sets.aftercast = {}
  87.     sets.aftercast.TP = sets.TP.Engaged
  88.     sets.aftercast.Idle = {ammo="Yetshila",head="Ighwa Cap",body="Xaddi Mail",hands="Agoge Mufflers +1",legs="Agoge Cuisses +1",feet="Hermes' Sandals",
  89.     neck="Twilight Torque",waist="Nierenschutz",left_ear="Trux Earring",right_ear="Brutal Earring",left_ring="Rajas Ring",
  90.     right_ring="Dark Ring",back="Shadow Mantle"}
  91. end
  92.  
  93. -- Precast/Midcast/Aftercast Functions
  94. function precast(spell,action)
  95.     if spell.english == 'Spectral Jig' then
  96.         send_command('cancel 71;')
  97.     end
  98.     if spell.type=="WeaponSkill" then
  99.         if sets.precast[spell.english] then
  100.             if strength_ws:contains(spell.name) then
  101.                 if buffactive['Mighty Strikes'] or buffactive['Sneak Attack'] then
  102.                     equip(set_combine(sets.precast.Str_Ws,sets.precast[spell.english],sets.precast.SACrit))
  103.                 else
  104.                     equip(set_combine(sets.precast.Str_Ws,sets.precast[spell.english]))
  105.                 end
  106.             elseif crithit_ws:contains(spell.name) then
  107.                 if abyssea_zones:contains(zone) and buffactive['Blood Rage'] then
  108.                     equip(set_combine(sets.precast.Crit_Ws,sets.precast[spell.english],sets.precast['Blood Rage']))
  109.                 elseif buffactive['Mighty Strikes'] or buffactive['Sneak Attack'] then
  110.                     equip(set_combine(sets.precast.Crit_Ws,sets.precast[spell.english],sets.precast.SACrit))
  111.                 else
  112.                     equip(set_combine(sets.precast.Crit_Ws,sets.precast[spell.english]))
  113.                 end
  114.             else
  115.                 equip(sets.precast[spell.english])
  116.             end
  117.             equip(sets.precast[spell.english])
  118.         end
  119.     elseif string.find(spell.english,'Waltz') then
  120.         equip(sets.precast.Waltz)
  121.     elseif spell.type == "Ninjutsu" then
  122.         equip(sets.precast.FastCast)
  123.     elseif sets.precast[spell.english] then
  124.         equip(sets.precast[spell.english])
  125.     end
  126. end
  127.  
  128. function midcast(spell,action)
  129.     if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)'] or buffactive['Copy Image (3)']) then
  130.         send_command('@wait 3.3; cancel 66; cancel 444; cancel 445')
  131.     elseif spell.english == 'Monomi: Ichi' and buffactive['Sneak'] then
  132.         send_command('@wait 1.0; cancel 71')
  133.     end
  134.  
  135. end
  136.  
  137. function aftercast(spell,action)
  138.     if player.status =='Engaged' then
  139.         equip(sets.aftercast.TP)
  140.     else
  141.         equip(sets.aftercast.Idle)
  142.     end
  143.     if spell.english == 'Tomahawk' then
  144.         send_command('@wait 30; input /echo ------- Tomahawk wore off -------')
  145.     elseif spell.english == 'Mighty Strikes' then
  146.         send_command('@wait 65; input /echo ------- Mighty Strikes Wearing in 10 seconds!! -------')
  147.     end
  148. end
  149.  
  150. -- Status change (spells, songs, etc.)
  151. function status_change(new,old)
  152.     if T{'Idle','Resting'}:contains(new) then
  153.         equip(sets.aftercast.Idle)
  154.     elseif new == 'Engaged' then
  155.         if player.equipment.main == 'Bravura' then
  156.             if (buffactive['march'] == 2 and buffactive['haste']) or (buffactive['march'] and buffactive['embrava'] and buffactive['haste']) then
  157.                 sets.TP.Bravura = sets.TP.Bravura.High
  158.             else
  159.                 sets.TP.Bravura = sets.TP.Bravura.Normal
  160.             end
  161.             sets.TP.DD = sets.TP.Bravura
  162.         else
  163.             if (buffactive['march'] == 2 and buffactive['haste']) or (buffactive['march'] and buffactive['embrava'] and buffactive['haste']) then
  164.                 sets.TP.Razorfury = sets.TP.Razorfury.High
  165.             else
  166.                 sets.TP.Razorfury = sets.TP.Razorfury.Normal
  167.             end
  168.             sets.TP.DD = sets.TP.Razorfury
  169.         end
  170.        
  171.         sets.TP.Engaged = sets.TP.DD
  172.     end
  173.     if buffactive['Weakness'] or buffactive['Doom'] then
  174.         sets.aftercast.TP = set_combine(sets.TP.Engaged,sets.Twilight)
  175.     else
  176.         sets.aftercast.TP = sets.TP.Engaged
  177.     end
  178.         equip(sets.aftercast.TP)
  179. end
  180.  
  181. function buff_change(status,gain_or_loss)
  182. end
  183.  
  184. -- Self commands
  185. function self_command(command)
  186.     if command == 'DT' and (buffactive['Weakness'] or buffactive['Doom']) then
  187.         equip(sets.DT,sets.Twilight)
  188.         send_command('input /echo ------- DT Set Activated -------')
  189.     elseif command == 'DT' then
  190.         equip(sets.DT)
  191.         send_command('input /echo ------- DT Set Activated -------')
  192.     end
  193.     if command == 'Twilight' then
  194.         equip(sets.Twilight)
  195.         send_command('input /echo ------- Twilight Set Activated -------')
  196.     end
  197.     if command == 'TP' and sets.TP.Engaged == sets.TP.DD then
  198.         sets.TP.Engaged = sets.TP.Hybrid
  199.         send_command('input /echo ------- Hybrid TP Set Activated -------')
  200.     elseif command == 'TP' and sets.TP.Engaged == sets.TP.Hybrid then
  201.         sets.TP.Engaged = sets.TP.DD
  202.         send_command('input /echo ------- Normal TP Set Activated -------')
  203.     end
  204. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement