Advertisement
Quixacotl

[LUA] FFXI THF LUA

Jan 13th, 2014
788
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.90 KB | None | 0 0
  1. -- Updated 06/01/2014
  2.  
  3. function get_sets()
  4.     sets.JA = {}
  5.     sets.JA.Conspirator = {body="Raider's Vest +2"}
  6.     sets.JA.Accomplice = {head="Raid. Bonnet +2"}
  7.     sets.JA.Collaborator = {head="Raid. Bonnet +2"}
  8.     sets.JA['Perfect Dodge'] = {hands="Plun. Armlets"}
  9.     sets.JA.Steal = {
  10.         head="Assassin's Bonnet +2",
  11.         neck="Rabbit Charm",
  12.         hands="Thief's Kote",
  13.         waist="Key Ring Belt",
  14.         legs="Assassin's Culottes",
  15.         feet="Pillager's Poulaines"
  16.         }
  17.     sets.JA.Flee = {feet="Pillager's Poulaines"}
  18.     sets.JA.Despoil = {legs="Raid. Culottes +1", feet="Raid. Poulaines +2"}
  19.     sets.JA.Mug = {head="Assassin's Bonnet +2"}
  20.     sets.JA.Waltz = {
  21.         head="Whirlpool Mask",
  22.         neck="Dualism Collar",
  23.         body="Iuitl Vest",
  24.         hands="Buremte Gloves",
  25.         ring1="Omega Ring",
  26.         ring2="Angel's Ring",
  27.         waist="Aristo Belt",
  28.         legs="Nahtirah Trousers",
  29.         feet="Iuitl Gaiters"
  30.         }
  31.  
  32.     sets.JA.Step = {ear1="Choreia Earring"}
  33.  
  34.     sets.WS = {
  35.         head="Whirlpool Mask",
  36.         neck="Asperity Necklace",
  37.         ear1="Bladeborn Earring",
  38.         ear2="Steelflash Earring",
  39.         body="Manibozho Jerkin",
  40.         hands="Iuitl Wristbands",
  41.         ring1="Rajas Ring",
  42.         ring2="Thundersoul Ring",
  43.         back="Atheling Mantle",
  44.         waist="Caudata Belt",
  45.         legs="Manibozho Brais",
  46.         feet="Iuitl Gaiters"
  47.         }
  48.     sets.WS.SA = {}
  49.     sets.WS.TA = {}
  50.     sets.WS.SATA = {}
  51.  
  52.     sets.WS["Evisceration"] = set_combine(sets.WS, {})
  53.     sets.WS.SA["Evisceration"] = set_combine(sets.WS["Evisceration"],{hands="Raid. Armlets +2"})
  54.     sets.WS.TA["Evisceration"] = sets.WS.SA["Evisceration"]
  55.     sets.WS.SATA["Evisceration"] = sets.WS.TA["Evisceration"]
  56.  
  57.     sets.WS["Rudra's Storm"] = set_combine(sets.WS, {})
  58.     sets.WS.SA["Rudra's Storm"] = set_combine(sets.WS["Rudra's Storm"],{hands="Raid. Armlets +2"})
  59.     sets.WS.TA["Rudra's Storm"] = sets.WS.SA["Rudra's Storm"]
  60.     sets.WS.SATA["Rudra's Storm"] = sets.WS.TA["Rudra's Storm"]
  61.  
  62.     sets.WS["Exenterator"] = set_combine(sets.WS, {})
  63.     sets.WS.SA["Exenterator"] = set_combine(sets.WS["Exenterator"],{hands="Raid. Armlets +2"})
  64.     sets.WS.TA["Exenterator"] = set_combine(sets.WS.SA["Exenterator"],{})
  65.     sets.WS.SATA["Exenterator"] = sets.WS.TA["Exenterator"]
  66.  
  67.     sets.WS["Dancing Edge"] = set_combine(sets.WS, {neck="Soil Gorget"})
  68.     sets.WS.SA["Dancing Edge"] = set_combine(sets.WS['Dancing Edge'], {hands="Raid. Armlets +2"})
  69.     sets.WS.TA["Dancing Edge"] = set_combine(sets.WS.SA["Dancing Edge"],{})
  70.     sets.WS.SATA["Dancing Edge"] = sets.WS.TA["Dancing Edge"]
  71.  
  72.     sets.WS["Aeolian Edge"] = {
  73.         head="Whirlpool Mask",
  74.         neck="Moepapa Medal",
  75.         ear1="Thunder Pearl",
  76.         ear2="Psystorm Earring",
  77.         body="Iuitl Vest",
  78.         hands="Buremte Gloves",
  79.         ring1="Rajas Ring",
  80.         ring2="Thundersoul Ring",
  81.         back="Nifty Mantle",
  82.         waist="Caudata Belt",
  83.         legs="Nahtirah Trousers",
  84.         feet="Iuitl Gaiters"
  85.         }
  86.  
  87.     sets.WS["Cyclone"] = sets.WS["Aeolian Edge"]
  88.  
  89.     TP_Set_Names = {"Low Man","Delay Cap","Evasion","TH"}
  90.  
  91.     sets.TP = {}
  92.     sets.TP['Low Man'] = {
  93.         -- range="Raider's Bmrng.",
  94.         head="Whirlpool Mask",
  95.         neck="Asperity Necklace",
  96.         ear1="Dudgeon Earring",
  97.         ear2="Heartseeker Earring",
  98.         body="Manibozho Jerkin",
  99.         hands="Iuitl Wristbands",
  100.         ring1="Rajas Ring",
  101.         ring2="K'ayres Ring",
  102.         back="Atheling Mantle",
  103.         waist="Patentia Sash",
  104.         legs="Manibozho Brais",
  105.         feet="Manibozho Boots"
  106.         }
  107.  
  108.     sets.TP['TH'] = {
  109.         -- range="Raider's Bmrng.",
  110.         head="Whirlpool Mask",
  111.         neck="Asperity Necklace",
  112.         ear1="Dudgeon Earring",
  113.         ear2="Heartseeker Earring",
  114.         body="Manibozho Jerkin",
  115.         hands="Plun. Armlets",
  116.         ring1="Rajas Ring",
  117.         ring2="K'ayres Ring",
  118.         back="Atheling Mantle",
  119.         waist="Patentia Sash",
  120.         legs="Manibozho Brais",
  121.         feet="Raid. Poulaines +2"}
  122.  
  123.     sets.TP['Delay Cap'] = {
  124.         -- ammo="Potestas Bomblet",
  125.         head="Iuitl Headgear",
  126.         neck="Asperity Necklace",
  127.         ear1="Bladeborn Earring",
  128.         ear2="Steelflash Earring",
  129.         body="Manibozho Jerkin",
  130.         hands="Iuitl Wristbands",
  131.         ring1="Rajas Ring",
  132.         ring2="K'ayres Ring",
  133.         back="Atheling Mantle",
  134.         waist="Windbuffet Belt",
  135.         legs="Manibozho Brais",
  136.         feet="Manibozho Boots"
  137.         }
  138.  
  139.     sets.TP.Evasion = {
  140.         -- ranged="Aliyat Chakram",
  141.         head="Whirlpool Mask",
  142.         neck="Houyi's Gorget",
  143.         ear1="Novia Earring",
  144.         ear2="Ethereal Earring",
  145.         body="Qaaxo Harness",
  146.         hands="Iuitl Wristbands",
  147.         ring1="Beeline Ring",
  148.         ring2="Stormsoul Ring",
  149.         back="Fravashi Mantle",
  150.         waist="Flume Belt",
  151.         legs="Nahtirah Trousers",
  152.         feet="Iuitl Gaiters"
  153.         }
  154.  
  155.     Idle_Set_Names = {'Town','Normal'}
  156.  
  157.     sets.Idle = {}
  158.     sets.Idle.Normal = {
  159.         head="Whirlpool Mask",
  160.         neck="Wiglen Gorget",
  161.         ear1="Dudgeon Earring",
  162.         ear2="Heartseeker Earring",
  163.         body="Qaaxo Harness",
  164.         hands="Iuitl Wristbands",
  165.         ring1="Sheltered Ring",
  166.         ring2="Paguroidea Ring",
  167.         back="Fravashi Mantle",
  168.         waist="Flume Belt",
  169.         legs="Nahtirah Trousers",
  170.         feet="Manibozho Boots"
  171.         }
  172.  
  173.     sets.Idle.Town = set_combine(sets.Idle.Normal,{feet="Pillager's Poulaines"})
  174.  
  175.     send_command('input /macro book 7;wait .1;input /macro set 4')
  176.  
  177.     TP_Index = 1
  178.     Idle_Index = 1
  179. end
  180.  
  181. function precast(spell)
  182.     if sets.JA[spell.english] then
  183.         equip(sets.JA[spell.english])
  184.     elseif spell.type == "WeaponSkill" then
  185.         if sets.WS[spell.english] then
  186.             equip(sets.WS[spell.english])
  187.         end
  188.         if buffactive['sneak attack'] and buffactive['trick attack'] and sets.WS.SATA[spell.english] then
  189.             equip(sets.WS.SATA[spell.english])
  190.         elseif buffactive['sneak attack'] and sets.WS.SA[spell.english] then
  191.             equip(sets.WS.SA[spell.english])
  192.         elseif buffactive['trick attack'] and sets.WS.TA[spell.english] then
  193.             equip(sets.WS.TA[spell.english])
  194.         else
  195.             equip(sets.WS)
  196.         end
  197.     elseif string.find(spell.english,'Waltz') then
  198.         equip(sets.JA.Waltz)
  199.     elseif string.find(spell.english,'Step') then
  200.         equip(sets.JA.Step)
  201.     end
  202. end
  203.  
  204. function midcast(spell,action)
  205.     if spell.english == 'Spectral Jig' or spell.english:startswith('Monomi') then
  206.         send_command('cancel 71')
  207.     end
  208. end
  209.  
  210. function aftercast(spell)
  211.     if player.status == 'Engaged' then
  212.         equip(sets.TP[TP_Set_Names[TP_Index]])
  213.     else
  214.         equip(sets.Idle[Idle_Set_Names[Idle_Index]])
  215.     end
  216. end
  217.  
  218. function status_change(new,old)
  219.     if T{'Idle','Resting'}:contains(new) then
  220.         equip(sets.Idle[Idle_Set_Names[Idle_Index]])
  221.     elseif new == 'Engaged' then
  222.         equip(sets.TP[TP_Set_Names[TP_Index]])
  223.     end
  224. end
  225.  
  226. function buff_change(buff,gain_or_loss)
  227.     if buff == "Sneak Attack" then
  228.         soloSA = gain_or_loss
  229.     elseif buff == "Trick Attack" then
  230.         soloTA = gain_or_loss
  231.     end
  232. end
  233.  
  234. function self_command(command)
  235.     if command:lower() == 'toggle' then
  236.         TP_Index = TP_Index +1
  237.         if TP_Index > #TP_Set_Names then
  238.             TP_Index = 1
  239.         end
  240.         add_to_chat(8,'----- TP Set changed to '..TP_Set_Names[TP_Index]..' -----')
  241.         equip(sets.TP[TP_Set_Names[TP_Index]])
  242.     elseif command:lower() == 'idle' then
  243.         Idle_Index = Idle_Index +1
  244.         if Idle_Index > #Idle_Set_Names then
  245.             Idle_Index = 1
  246.         end
  247.         add_to_chat(8,'----- Idle Set changed to '..Idle_Set_Names[Idle_Index]..' -----')
  248.         equip(sets.Idle[Idle_Set_Names[Idle_Index]])
  249.     end
  250. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement