Advertisement
usnapoleon

Blm Lua

Apr 3rd, 2016
540
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.01 KB | None | 0 0
  1. function get_sets()
  2. -------------------------------------------
  3.     -- aftercast for returning to TP and Idle sets
  4.     -- the 'self command' area will change the set defined as aftercast.TP
  5. -------------------------------------------    
  6.     sets.aftercast = {}
  7.     sets.engaged = {}
  8.     sets.precast = {}
  9.     sets.midcast = {}
  10.        
  11.     sets.aftercast.Idle = {
  12.         main="Lathi",
  13.         sub="Niobid Strap",
  14.         ammo="Pemphredo Tathlum",
  15. --      head="Nahtirah Hat",
  16.         neck="Twilight Torque",
  17.         lear="Infused Earring",
  18.         rear="Friomisi Earring",
  19.         body="Respite Cloak",
  20.         hands="Wicce Gloves +1",
  21. --      hands="Serpentes Cuffs",
  22.         lring="Defending Ring",
  23.         rring="Shneddick Ring",
  24.         back="Bane Cape",
  25.         waist="Belisama's Rope +1",
  26.         legs="Nares Trews",
  27.         feet="Merlinic Crackows"}
  28.  
  29.     sets.aftercast.Resting = set_combine(sets.aftercast.Idle, {
  30.         ammo="Mana Ampulla",
  31.         rear="Relaxing Earring",
  32.         hands="Nares Cuffs",
  33.         waist="Austerity Belt",
  34.         legs="Nisse Slacks"})
  35.        
  36. -------------------------------------------
  37. -- The outermost table has to be named "sets", but
  38. -- otherwise there are no restrictions.
  39. -------------------------------------------
  40.  
  41.     sets.engaged.TPnormal = {
  42.         ammo="Flame Sachet",
  43.         head="Spae. Petasos +1",
  44.         neck="Asperity Necklace",
  45.         lear="Bladeborn Earring",
  46.         rear="Steelflash Earring",
  47.         body="Count's Garb",
  48.         hands="Wicce Gloves +1",
  49.         lring="K'ayres Ring",
  50.         rring="Rajas Ring",
  51.         back="Potentia Cape",
  52.         waist="Goading Belt",
  53.         legs="Spae. Tonban +1",
  54.         feet="Umbani Boots"} --6+7+3+5+5+3=29 haste
  55.        
  56.  
  57.     sets.aftercast.TP = sets.engaged.TPnormal
  58. -------------------------------------------
  59.     -- WS sets
  60.     -- So it's easy to determine if new obtained gear can replace anything, listed str/mnd/int stats per piece 
  61. -------------------------------------------
  62.     sets.precast.WSStr = {
  63.         ammo="Flame Sachet", --2/0/0
  64.         head="Sukeroku Hachi.", --25/20/20
  65.         neck="Asperity Necklace",
  66.         lear="Bladeborn Earring",
  67.         rear="Steelflash Earring",
  68.         body="Count's Garb", --21/29/38
  69.         hands="Wicce Gloves +1", --6/32/27
  70.         lring="K'ayres Ring",
  71.         rring="Rajas Ring", --5/0/0
  72.         back="Potentia Cape", --6/0/6
  73.         waist="Goading Belt",
  74.         legs="Spae. Tonban +1", --25/24/34
  75.         feet="Umbani Boots"} --10/19/22
  76.    
  77.     sets.precast.WSStrMnd = set_combine(sets.precast.WSStr, {
  78.         ammo="Mana Ampulla", --0/0/4
  79.         lring="Diamond Ring"}) --0/4/4
  80.        
  81.     sets.precast.WSStrInt = set_combine(sets.precast.WSStr, {
  82.         lring="Sprial Ring", --5/0/5
  83.         waist="Wanion Belt", --8/(5)/8
  84.         legs="Wicce Chausses +1", --21/23/38
  85.         feet="Merlinic Crackows"}) --6/23/31
  86.    
  87.     sets.precast.Myrkr = set_combine(sets.precast.WSStr, {
  88.         rear="Moonshade Earring"})
  89.        
  90. -------------------------------------------
  91.     -- Fastcast sets:  
  92. -------------------------------------------
  93.     sets.precast.Fastcast = {
  94.         ammo="Impatiens",
  95.         head="Nahtirah Hat",
  96.         neck="Voltsurge Torque",
  97.         lear="Loquac. Earring",
  98.         rear="Enchntr. Earring +1",
  99.         body="Count's Garb",
  100.         hands="Helios Gloves",
  101.         lring="Lebeche Ring",
  102.         rring="Prolix Ring",
  103.         back="Shadow Mantle",
  104.         waist="Witful Belt",
  105.         legs="Artsieq Hose",
  106.         feet="Merlinic Crackows"}
  107.  
  108.     sets.precast.HasteEnhancing = set_combine(sets.precast.Fastcast, {
  109.         waist="Siegel Sash"})
  110.    
  111.     sets.precast.HasteStoneskin = set_combine(sets.precast.HasteEnhancing, {
  112.         head="Umuthi Hat",
  113.         hands="Carapacho Cuffs"})
  114.    
  115.     sets.precast.HasteHealing = set_combine(sets.precast.Fastcast, {
  116.         rear="Mendi. Earring",
  117.         body="Heka's Kalasiris",
  118.         back="Pahtli Cape"})
  119.    
  120.     sets.precast.HasteElemental = set_combine(sets.precast.Fastcast, {
  121.         main="Lathi",
  122.         sub="Niobid Strap",
  123.         head="Wicce Petasos +1",
  124.         neck="Stoicheion Medal",
  125.         body="Wicce Coat +1",
  126.         feet="Spae. Sabots +1"})
  127. -------------------------------------------
  128.     -- Spell (midcast) sets:  
  129. -------------------------------------------
  130.     sets.midcast['Elemental Magic'] = {
  131.         main="Lathi",
  132.         sub="Niobid Strap",
  133.         ammo="Pemphredo Tathlum",
  134.         head="Merlinic Hood",
  135.         neck="Eddy Necklace",
  136.         lear="Barkaro. Earring",
  137.         rear="Friomisi Earring",
  138.         body="Count's Garb",
  139.         hands="Wicce Gloves +1",
  140.         lring="Strendu Ring",
  141.         rring="Acumen Ring",
  142.         back="Toro Cape",
  143.         waist="Yamabuki-no-Obi",
  144.         legs="Merlinic Shalwar",
  145.         --legs="Hagondes Pants +1",
  146.         feet="Merlinic Crackows"}
  147.        
  148.     sets.midcast.Macc = set_combine(sets.midcast['Elemental Magic'], {
  149.         lring="Patricius Ring",
  150.         rring="Mars's Ring"})
  151.    
  152.     sets.midcast.Burst = set_combine(sets.midcast['Elemental Magic'], {
  153.         rear="Moonshade Earring",
  154.         body="Spae. Coat +1",
  155.         back="Mecisto. Mantle"})
  156.    
  157.     sets.midcast.Impact = set_combine(sets.midcast['Elemental Magic'], {
  158.         body="Twilight Cloak"})
  159.    
  160.     sets.midcast['Dark Magic'] = set_combine(sets.midcast['Elemental Magic'], {
  161.         ammo="Pemphredo Tathlum",
  162.         hands="Arch. Gloves +1",
  163.         rring="Archon Ring",
  164.         legs="Spae. Tonban +1",
  165.         feet="Wicce Sabots +1"})
  166.        
  167.     sets.midcast.weather = {waist="Hachirin-No-Obi"}
  168.    
  169.     sets.midcast['Enfeebling Magic'] = {
  170.         main="Lathi",
  171.         sub="Niobid Strap",
  172.         ammo="Pemphredo Tathlum",
  173.         head="Befouled Crown",
  174.         neck="Voltsurge Torque",
  175.         lear="Barkaro. Earring",
  176.         rear="Enchntr. Earring +1",
  177.         body="Spae. Coat +1",
  178.         hands="Lurid Mitts",
  179.         lring="Spiral Ring",
  180.         rring="Strendu Ring",
  181.         back="Bane Cape",
  182.         waist="Rumination Sash",
  183.         legs="Portent Pants",
  184.         feet="Spae. Sabots +1"}
  185.    
  186.     sets.midcast['Enhancing Magic'] = {
  187.         main="Lathi",
  188.         sub="Niobid Strap",
  189.         ammo="Impatiens",
  190.         head="Befouled Crown",
  191.         neck="Twilight Torque",
  192.         lear="Gifted Earring",
  193.         rear="Enchntr. Earring +1",
  194.         body="Count's Garb",
  195.         hands="Wicce Gloves +1",
  196.         lring="Defending Ring",
  197.         rring="Sirona's Ring",
  198.         back="Shadow Mantle",
  199.         waist="Siegel Sash",
  200.         legs="Portent Pants",
  201.         feet="Rubeus Boots"}
  202.        
  203.     sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {
  204.         neck="Stone Gorget",
  205.         waist="Siegel Sash",
  206.         legs="Haven Hose"})
  207.        
  208.     sets.midcast['Healing Magic'] = {
  209.         --33% potency, this is taking into consideration that blm's mostly cast single tier cure spells
  210.         -- commented stats are potency/skill/mnd (ignoring vitality)
  211.         main="Lathi",
  212.         sub="Niobid Strap",
  213.         ammo="Mana Ampulla", --0/0/3
  214.         head="Spae. Petasos +1", --0/0/24
  215.         neck="Phalaina Locket", --4/0/3
  216.         lear="Gifted Earring",
  217.         rear="Mendi. Earring", --5/0/0
  218.         body="Heka's Kalasiris", --15/0/17
  219.         hands="Wicce Gloves +1", --0/0/32
  220.         lring="Lebeche Ring", --3/0/0
  221.         rring="Sirona's Ring", --0/10/3
  222.         back="Tempered Cape +1", --6/8/0
  223.         waist="Korin Obi", --0/0/5
  224.         legs="Spae. Tonban +1", --0/0/24
  225.         feet="Rubeus Boots"} --0/10/0
  226.    
  227.     sets.midcast.ProtectShell = set_combine(sets.midcast['Healing Magic'], {
  228.         rring="Sheltered Ring"})
  229.        
  230.     sets.midcast.Cursna = set_combine(sets.precast.Fastcast, {
  231.         rear="Enchntr. Earring +1",
  232.         lring="Ephedra Ring", --0/7/0
  233.         rring="Sirona's Ring", --0/10/3
  234.         feet="Rubeus Boots"}) --0/10/0
  235.        
  236.     sets.midcast['Divine Magic'] = set_combine(sets.midcast['Healing Magic'], {
  237.         ammo="Pemphredo Tathlum",})
  238.  
  239.    
  240. -------------------------------------------
  241.     -- Job Ability sets
  242. -------------------------------------------
  243.        
  244.     sets.precast["Manafont"] = {body="Arch. Coat"}
  245.     --sets.precast["Elemental Seal"] = {main="Laevateinn"}
  246.     sets.precast["Mana Wall"] = {feet="Wicce Sabots +1"}
  247.    
  248.     send_command('input /macro book 4')
  249. end
  250.  
  251. function precast(spell,action)
  252.     if player.equipment.head == 'Reraise Hairpin' then
  253.         disable('head')
  254.     else enable('head') end
  255.     if player.equipment.left_ear == 'Reraise Earring' then
  256.         disable('ear1')
  257.     else enable('ear1') end
  258.     if sets.aftercast.TP == sets.engaged.CPfarm then
  259.         equip(sets.engaged.CPfarm)
  260.         disable('main', 'sub', 'rear', 'body', 'back')
  261.     else enable('main', 'sub', 'rear', 'body', 'back') end 
  262.     if spell.action_type == 'Magic' or spell.type == 'Ninjutsu' then
  263.         if spell.skill == 'Elemental Magic' then
  264.             if spell.name == 'Impact' then
  265.                 equip(sets.precast.HasteElemental,{body="Twilight Cloak"})
  266.             elseif spell.element == world.weather_element or spell.element == world.day_element then
  267.                 equip(sets.midcast.weather)
  268.             else equip(sets.precast.HasteElemental)
  269.             end
  270.         elseif spell.skill == 'Enhancing Magic' then
  271.             if spell.name == 'Stoneskin' then
  272.                 equip(sets.precast.HasteStoneskin)
  273.             else equip(sets.precast.HasteEnhancing)
  274.             end
  275.         elseif spell.skill == 'Healing Magic' then
  276.             if spell.english:startswith('Cur') then
  277.                 if spell.name == 'Cursna' then
  278.                     equip(sets.midcast.Cursna)
  279.                 else equip(sets.midcast['Healing Magic'])
  280.                 end
  281.             else equip(sets.precast.HasteHealing)
  282.             end
  283.         else equip(sets.precast.Fastcast)
  284.         end
  285.     elseif spell.type == 'WeaponSkill' then
  286.         if spell.english == 'Brainshaker' or 'Skullbreaker' or 'True Strike' or 'Heavy Swing' or 'Full Swing' or 'Shell Crusher' then
  287.             equip(sets.precast.WSStr)
  288.         elseif spell.english == 'Shining Strike' or 'Seraph Strike' or 'Judgement' or 'Hexa Strike' or 'Black Halo' or 'Flash Nova' or 'Starburst' or 'Sunburst' or 'Retribution' then
  289.             equip(sets.precast.WSStrMnd)
  290.         elseif spell.english == 'Rock Crusher' or 'Earth Crusher' or 'Spirit Taker' or 'Vidohunir' or 'Cataclysm' then
  291.             equip(sets.precast.WSStrInt)
  292.         elseif spell.english == 'Myrkr' then
  293.             equip(sets.precast.Myrkr)
  294.         else equip(sets.precast.WSStr)
  295.         end
  296.     elseif sets.precast[spell.english] then
  297.         equip(sets.precast[spell.english])
  298.     end
  299. end
  300.  
  301. function midcast(spell,action)
  302.     if spell.action_type == 'Magic' then
  303.         if spell.skill == 'Elemental Magic' then
  304.             if spell.english == 'Impact' then
  305.                 equip(sets.midcast.Impact)
  306.             else equip(sets.midcast['Elemental Magic'])
  307.             end
  308.             if spell.element == world.weather_element or spell.element == world.day_element then
  309.                 equip(sets.midcast.weather)
  310.             end
  311.         elseif spell.skill == 'Enhancing Magic' then
  312.             if spell.english:startswith('Protect') or spell.english:startswith('Shell') then
  313.                 equip(sets.midcast.ProtectShell)
  314.             elseif spell.name == 'Stoneskin' then
  315.                 equip(sets.midcast.Stoneskin)
  316.             else equip(sets.midcast['Enhancing Magic'])
  317.             end
  318.         elseif sets.midcast[spell.skill] then
  319.             equip(sets.midcast[spell.skill])
  320.         else equip(sets.precast.Fastcast)
  321.         end
  322.     end
  323. end
  324.  
  325. function aftercast(spell)
  326.     if player.status == 'Engaged' then
  327.         equip(sets.aftercast.TP)
  328.     else
  329.         equip(sets.aftercast.Idle)
  330.     end
  331. end
  332.  
  333. function status_change(new,old)
  334.     if new == 'Idle' then
  335.         equip(sets.aftercast.Idle)
  336.     elseif new == 'Resting' then
  337.         equip(sets.aftercast.Resting)
  338.     elseif new == 'Engaged' then
  339.         equip(sets.aftercast.TP)
  340.     end
  341. end
  342.  
  343. function self_command(command)  --this is all messed up, its not sets.aftercast.tp anymore, nor is it sets.engaged because we're nuking... what is it?
  344.     if command == 'toggle TP set' then
  345.         if sets.aftercast.TP == sets.engaged.TPnormal then
  346.             sets.aftercast.TP = sets.engaged.Macc
  347.             send_command('@input /echo M.ACC SET')
  348.         elseif sets.aftercast.TP == sets.engaged.Macc then
  349.             sets.aftercast.TP = sets.engaged.Burst
  350.             send_command('@input /echo BURST SET')
  351.         elseif sets.aftercast.TP == sets.engaged.Burst then
  352.             sets.aftercast.TP = sets.engaged.TPnormal
  353.             send_command('@input /echo NORMAL SET')
  354.         end
  355.     end
  356. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement