Advertisement
usnapoleon

blm not working

Oct 26th, 2014
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.35 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.obi = {
  12.         Fire = {waist="Karin Obi"},
  13.         Earth = {waist="Dorin Obi"},
  14.         Water = {waist="Suirin Obi"},
  15.         Wind = {waist="Furin Obi"},
  16.         Ice = {waist="Hyorin Obi"},
  17.         Lightning = {waist="Rairin Obi"},
  18.         Light = {waist="Korin Obi"},
  19.         Dark = {waist="Anrin Obi"},
  20.         }
  21.    
  22.     sets.aftercast.Idle = {
  23.         main="Bolelabunga",
  24.         sub="Genbu's Shield",
  25.         ammo="Dosis Tathlum",
  26.         head="Nahtirah Hat",
  27.         neck="Twilight Torque",
  28.         lear="Friomisi Earring",
  29.         rear="Crematio Earring",
  30.         body="Artsieq Jubbah",
  31.         hands="Serpentes Cuffs",
  32.         lring="Dark Ring",
  33.         rring="Defending Ring",
  34.         back="Pahtli Cape",
  35.         waist="Slipor Sash",
  36.         legs="Nares Trews",
  37.         feet="Spae. Sabots +1"}
  38.  
  39.     sets.aftercast.Resting = set_combine(sets.aftercast.Idle, {
  40.         main="Boonwell Staff",
  41.         ammo="Mana Ampulla",
  42.         lear="Relaxing Earring",
  43.         hands="Nares Cuffs",
  44.         waist="Austerity Belt",
  45.         legs="Nisse Slacks"})
  46.    
  47. -------------------------------------------
  48. -- The outermost table has to be named "sets", but
  49. -- otherwise there are no restrictions.
  50. -------------------------------------------
  51.  
  52.     sets.engaged.TPnormal = {
  53.         ammo="Flame Sachet",
  54.         head="Spae. Petasos +1",
  55.         neck="Asperity Necklace",
  56.         lear="Bladeborn Earring",
  57.         rear="Steelflash Earring",
  58.         body="Artsieq Jubbah",
  59.         hands="Otomi Gloves",
  60.         lring="K'ayres Ring",
  61.         rring="Rajas Ring",
  62.         back="Potentia Cape",
  63.         waist="Goading Belt",
  64.         legs="Hagondes Pants",
  65.         feet="Spae. Sabots +1"} --6+3+3+5+4+3=24 haste
  66.        
  67.     sets.engaged.TPacc = set_combine(sets.engaged.TPnormal, {
  68.         lring="Patricius Ring",
  69.         rring="Mars's Ring"}) --6+3+3+5+4+3=24 haste
  70.    
  71.     sets.aftercast.TP = sets.engaged.TPnormal
  72. -------------------------------------------
  73.     -- WS sets
  74.     -- So it's easy to determine if new obtained gear can replace anything, listed str/mnd/int stats per piece 
  75. -------------------------------------------
  76.     sets.precast.WSStr = {
  77.         ammo="Flame Sachet", --2/0/0
  78.         head="Sukeroku Hachi.", --25/20/20
  79.         neck="Asperity Necklace",
  80.         lear="Bladeborn Earring",
  81.         rear="Steelflash Earring",
  82.         body="Artsieq Jubbah", --18/19/26
  83.         hands="Otomi Gloves", --5/28/16
  84.         lring="K'ayres Ring",
  85.         rring="Rajas Ring", --5/0/0
  86.         back="Potentia Cape", --6/0/6
  87.         waist="Goading Belt",
  88.         legs="Hagondes Pants", --20/19/27
  89.         feet="Spae. Sabots +1"} --10/19/22
  90.    
  91.     sets.precast.WSStrMnd = set_combine(sets.precast.WSStr, {
  92.         ammo="Mana Ampulla", --0/0/4
  93.         neck="Mizu. Kubikazari", --0/4/4
  94.         hands="Yaoyotl Gloves", --6/33/19
  95.         lring="Diamond Ring" }) --0/4/4
  96.        
  97.     sets.precast.WSStrInt = set_combine(sets.precast.WSStr, {
  98.         neck="Mizu. Kubikazari", --0/4/4
  99.         hands="Yaoyotl Gloves", --6/33/19
  100.         lring="Sprial Ring", --5/0/5
  101.         waist="Wanion Belt"}) --8/(5)/8
  102. -------------------------------------------
  103.     -- Fastcast sets:  
  104. -------------------------------------------
  105.     sets.precast.Fastcast = {
  106.         ammo="Impatiens",
  107.         head="Nahtirah Hat",
  108.         neck="Twilight Torque",
  109.         lear="Loquacious Earring",
  110.         rear="Crematio Earring",
  111.         body="Artsieq Jubbah",
  112.         hands="Hagondes Cuffs",
  113.         lring="Dark Ring",
  114.         rring="Defending Ring",
  115.         back="Shadow Mantle",
  116.         waist="Goading Belt",
  117.         legs="Hagondes Pants",
  118.         feet="Hagondes Sabots"}
  119.  
  120.     sets.precast.HasteEnhancing = set_combine(sets.precast.Fastcast, {
  121.         waist="Siegel Sash"})
  122.    
  123.     sets.precast.HasteStoneskin = set_combine(sets.precast.HasteEnhancing, {
  124.         head="Umuthi Hat",
  125.         hands="Carapacho Cuffs"})
  126.    
  127.     sets.precast.HasteHealing = set_combine(sets.precast.Fastcast, {
  128.         main="Tamaxchi",
  129.         sub="Genbu's Shield",
  130.         body="Heka's Kalasiris",
  131.         back="Pahtli Cape"})
  132.    
  133.     sets.precast.HasteElemental = set_combine(sets.precast.Fastcast, {
  134.         main="Laevateinn",
  135.         sub="Zuuxowu Grip",
  136.         head="Goetia Petasos +2",
  137.         neck="Stoicheion Medal",
  138.         feet="Spae. Sabots +1"})
  139. -------------------------------------------
  140.     -- Spell (midcast) sets:  
  141. -------------------------------------------
  142.     sets.midcast['Elemental Magic'] = {
  143.         main="Laevateinn",
  144.         sub="Zuuxowu Grip",
  145.         ammo="Dosis Tathlum",
  146.         head="Hagondes Hat",
  147.         neck="Mizu. Kubikazari",
  148.         lear="Friomisi Earring",
  149.         rear="Crematio Earring",
  150.         body="Artsieq Jubbah",
  151.         hands="Otomi Gloves",
  152.         lring="Strendu Ring",
  153.         rring="Acumen Ring",
  154.         back="Toro Cape",
  155.         waist="Sekhmet Corset",
  156.         legs="Hagondes Pants",
  157.         feet="Hagondes Sabots"}
  158.    
  159.     sets.midcast.Impact = set_combine(sets.midcast['Elemental Magic'], {
  160.         body="Twilight Cloak"})
  161.    
  162.     sets.midcast.Stone = set_combine(sets.midcast['Elemental Magic'], {
  163.         neck="Quanpur Necklace"})
  164.        
  165.     sets.midcast['Dark Magic'] = set_combine(sets.midcast['Elemental Magic'], {
  166.         legs="Spaekona's Tonban",
  167.         feet="Goetia Sabots +2"})
  168.        
  169.     sets.midcast['Enfeebling Magic'] = {
  170.         main="Laevateinn",
  171.         sub="Zuuxowu Grip",
  172.         ammo="Ombre Tathlum +1",
  173.         head="Igqira Tiara",
  174.         neck="Stoicheion Medal",
  175.         lear="Loquacious Earring",
  176.         rear="Gifted Earring",
  177.         body="Spaekona's Coat",
  178.         hands="Rubeus Gloves",
  179.         lring="Dark Ring",
  180.         rring="Strendu Ring",
  181.         back="Bane Cape",
  182.         waist="Yamabuki-no-Obi",
  183.         legs="Portent Pants",
  184.         feet="Rubeus Boots"}
  185.    
  186.     sets.midcast['Enhancing Magic'] = {
  187.         main="Bolelabunga",
  188.         sub="Genbu's Shield",
  189.         ammo="Impatiens",
  190.         head="Umuthi Hat",
  191.         neck="Twilight Torque",
  192.         lear="Loquacious Earring",
  193.         rear="Gifted Earring",
  194.         body="Artsieq Jubbah",
  195.         hands="Augur's Gloves",
  196.         lring="Dark Ring",
  197.         rring="Defending 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.         --70% potency, this is taking into consideratin that blm's mostly cast single tier cure spells
  210.         -- commented stats are potency/skill/mnd (ignoring vitality)
  211.         main="Tamaxchi", --22/0/5
  212.         sub="Genbu's Shield", --4/0/0
  213.         ammo="Mana Ampulla", --0/0/3
  214.         head="Spae. Petasos +1", --0/0/24
  215.         neck="Phalaina Locket", --4/0/3
  216.         lear="Loquacious Earring",
  217.         rear="Gifted Earring",
  218.         body="Heka's Kalasiris", --15/0/17
  219.         hands="Hagondes Cuffs", --0/0/26
  220.         lring="Sirona's Ring", --0/10/3
  221.         rring="Ephedra Ring", --0/7/0
  222.         back="Oretenia's Cape", --4/0/0
  223.         waist="Witch Sash", --0/0/5
  224.         legs="Spaekona's Tonban", --0/0/15
  225.         feet="Rubeus Boots"} --0/10/0
  226.    
  227.     sets.midcast.ProtectShell = set_combine(sets.midcast['Healing Magic'], {
  228.         lring="Sheltered Ring"})
  229.        
  230.     sets.midcast.Cursna = set_combine(sets.precast.Fastcast, {
  231.         lring="Sirona's Ring", --0/10/3
  232.         rring="Ephedra Ring", --0/7/0
  233.         feet="Rubeus Boots"}) --0/10/0
  234.        
  235.     sets.midcast['Divine Magic'] = set_combine(sets.midcast['Healing Magic'], {})
  236.  
  237.    
  238. -------------------------------------------
  239.     -- Job Ability sets
  240. -------------------------------------------
  241.        
  242.     sets.precast["Manafont"] = {}
  243.     sets.precast["Elemental Seal"] = {main="Laevateinn"}
  244.     sets.precast["Mana Wall"] = {feet="Goetia Sabots +2"}
  245.    
  246.     send_command('input /macro book 4')
  247. end
  248.  
  249. function precast(spell,action)
  250.     if player.equipment.head == 'Reraise Hairpin' then disable('head')
  251.     else enable('head') end
  252.     if player.equipment.left_ear == 'Reraise Earring' then disable('ear1')
  253.     else enable('ear1') end
  254.     if spell.action_type == 'Magic' or spell.type == 'Ninjutsu' then
  255.         if spell.english == 'Impact' then
  256.             equip(sets.precast.HasteElemental,{body="Twilight Cloak"})
  257.         elseif spell.english == 'Stoneskin' then
  258.             equip(sets.precast.HasteStoneskin)
  259.         elseif spell.english == 'Cursna' then
  260.             equip(sets.midcast.Cursna)
  261.         elseif spell.english == 'Stone' or 'Stone II' or 'Stonega' then
  262.             equip(sets.midcast.Stone)
  263.         elseif spell.skill == 'Elemental Magic' then
  264.             if spell.cast_time < 9 then
  265.                 equip(sets.midcast['Elemental Magic'])
  266.             else equip(sets.precast.HasteElemental)
  267.             end
  268.         elseif spell.skill == 'Enhancing Magic' then
  269.             equip(sets.precast.HasteEnhancing)
  270.         elseif spell.skill == 'Healing Magic' then
  271.             if spell.cast_time < 9 then
  272.                 equip(sets.midcast['Healing Magic'])
  273.             else equip(sets.precast.HasteHealing)
  274.             end
  275.         else equip(sets.precast.Fastcast)
  276.         end
  277.     elseif spell.type == 'WeaponSkill' then
  278.         if spell.english == 'Brainshaker' or 'Skullbreaker' or 'True Strike' or 'Heavy Swing' or 'Shell Crusher' then
  279.             equip(sets.precast.WSStr)
  280.         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
  281.             equip(sets.precast.WSStrMnd)
  282.         elseif spell.english == 'Rock Crusher' or 'Earth Crusher' or 'Spirit Taker' or 'Vidohunir' or 'Cataclysm' then
  283.             equip(sets.precast.WSStrInt)
  284.         else equip(sets.precast.WSStr)
  285.         end
  286.     elseif sets.precast[spell.english] then
  287.         equip(sets.precast[spell.english])
  288.     end
  289. end
  290.  
  291. function midcast(spell,action)
  292.     if spell.action_type == 'Magic' then
  293.         if spell.element == world.weather_element or spell.element == world.day_element then
  294.             equip(sets.obi[spell.element])
  295.         end
  296.         if sets.midcast[spell.english] then
  297.             equip(sets.midcast[spell.english])
  298.         elseif spell.english:startswith('Protect') or spell.english:startswith('Shell') then
  299.             equip(sets.midcast.ProtectShell)
  300.         elseif spell.english:startswith('Stone') then
  301.             equip(sets.midcast.Stone)      
  302.         elseif spell.english == 'Impact' then
  303.             equip(sets.midcast['Elemental Magic'],{body="Twilight Cloak"})
  304.         elseif sets.midcast[spell.skill] then
  305.             equip(sets.midcast[spell.skill])
  306.         else equip(sets.precast.Fastcast)
  307.         end
  308.     end
  309. end
  310.  
  311. function aftercast(spell)
  312.     if player.status == 'Engaged' then
  313.         equip(sets.aftercast.TP)
  314.     else
  315.         equip(sets.aftercast.Idle)
  316.     end
  317. end
  318.  
  319. function status_change(new,old)
  320.     if T{'Idle','Resting'}:contains(new) then
  321.         equip(sets.aftercast.Idle)
  322.     elseif new == 'Engaged' then
  323.         equip(sets.aftercast.TP)
  324.     end
  325. end
  326.  
  327. function self_command(command)
  328.     if command == 'toggle TP set' then
  329.         if sets.aftercast.TP == sets.engaged.TPnormal then
  330.             sets.aftercast.TP = sets.engaged.TPacc
  331.             send_command('@input /echo ACC SET')
  332.         elseif sets.aftercast.TP == sets.engaged.TPacc then
  333.             sets.aftercast.TP = sets.engaged.TPnormal
  334.             send_command('@input /echo NORMAL SET')
  335.         end
  336.     end
  337. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement