Lygre

Custom weapon sets

Feb 21st, 2017
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.99 KB | None | 0 0
  1. function job_precast(spell, action, spellMap, eventArgs)
  2.     if spell.action_type == 'Ranged Attack' then
  3.         state.CombatWeapon:set(player.equipment.range)
  4.     end
  5. end
  6.  
  7. function job_aftercast(spell, action, spellMap, eventArgs)
  8.     state.CombatWeapon:set(player.equipment.main)
  9. end
  10.  
  11. function job_update(cmdParams, eventArgs)
  12.     update_combat_form()
  13. end
  14.  
  15. function update_combat_form()
  16.     -- Check for H2H or single-wielding
  17.     if player.equipment.sub == 'empty' or (player.equipment.sub:lower()):contains('grip') or (player.equipment.sub:lower()):contains('strap') or (player.equipment.sub:lower()):contains('shield') then
  18.         state.CombatForm:reset()
  19.     else
  20.         state.CombatForm:set('DW')
  21.     end
  22.     state.CombatWeapon:set(player.equipment.main)
  23. end
  24.  
  25. function job_status_change(oldStatus,newStatus)
  26.     if newStatus == 'Engaged' then
  27.         job_update()
  28.     end
  29. end
  30.  
  31. --Set definition ex.
  32.     sets.midcast.RA.Annihilator = set_combine(sets.midcast.RA, {})
  33.     sets.engaged.DW.Odium = {}
  34.     sets.engaged['Ternion Dagger +1'] = {}
Advertisement
Add Comment
Please, Sign In to add comment