Advertisement
usnapoleon

Blm w/obi issue

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