Advertisement
Tiralay

Obi Weaponskill

Nov 27th, 2017
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.05 KB | None | 0 0
  1. function job_post_precast(spell, action, spellMap, eventArgs)
  2.     if spell.type == 'WeaponSkill' then
  3.         if is_sc_element_today(spell) or is_sc_element_weather(spell) then
  4.             equip({waist='Hachirin-no-Obi'})
  5.         end
  6.     end
  7. end
  8.  
  9. -- Add the following down at the bottom of your main lua.
  10. function is_sc_element_today(spell)
  11.     local weaponskill_elements = S{}:
  12.         union(skillchain_elements[spell.skillchain_a]):
  13.         union(skillchain_elements[spell.skillchain_b]):
  14.         union(skillchain_elements[spell.skillchain_c])
  15.  
  16.     if weaponskill_elements:contains(world.day_element) then
  17.         return true
  18.     else
  19.         return false
  20.     end
  21. end
  22.  
  23. function is_sc_element_weather(spell)
  24.     local weaponskill_elements = S{}:
  25.         union(skillchain_elements[spell.skillchain_a]):
  26.         union(skillchain_elements[spell.skillchain_b]):
  27.         union(skillchain_elements[spell.skillchain_c])
  28.  
  29.     if weaponskill_elements:contains(world.weather_element) then
  30.         return true
  31.     else
  32.         return false
  33.     end
  34. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement