Advertisement
Lygre

Nin other DD haste group

Sep 5th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.78 KB | None | 0 0
  1. function job_setup()
  2.     --make macro '/con gs c cycle HasteMode' to switch between haste modes
  3.     state.HasteMode = M{['description'] = 'Haste Mode', '1', '2'}
  4.     determine_haste_group()
  5.     update_combat_form()
  6. end
  7.  
  8. --Engaged set table example
  9. function init_gear_sets()
  10.     sets.engaged.DW.MaxHaste = {ammo="Ginsen",
  11.         head=gear.adhemarhead_melee,neck="Asperity necklace",ear1="Telos Earring",ear2="Brutal earring",
  12.         body="Adhemar jacket",hands=gear.herchands_acc,ring1="Hetairoi Ring",ring2="Epona's Ring",
  13.         back=gear.blucape_tp,waist="Windbuffet belt +1",legs="Samnuha Tights",feet=gear.hercfeet_ta }
  14.     sets.engaged.DW.Acc.MaxHaste = {ammo="Ginsen",
  15.         head="Carmine Mask +1",neck="Lissome necklace",ear1="Telos earring",ear2="Brutal earring",
  16.         body="Adhemar Jacket",hands="Adhemar wristbands",ring1="Hetairoi Ring",ring2="Epona's Ring",
  17.         back=gear.blucape_tp,waist="Windbuffet belt +1",legs="Samnuha Tights",feet=gear.hercfeet_ta }
  18. end
  19.  
  20. function job_update(cmdParams, eventArgs)
  21.     update_combat_form()
  22.     determine_haste_group()
  23. end
  24.  
  25. function update_combat_form()
  26.     -- Check for H2H or single-wielding
  27.     if player.equipment.sub == 'empty' then
  28.         state.CombatForm:reset()
  29.     else
  30.         state.CombatForm:set('DW')
  31.     end
  32. end
  33.  
  34. function job_buff_change(buff, gain)
  35.     if S{'haste','march','embrava','mighty guard','Indi-Haste',''}:contains(buff:lower()) then
  36.         determine_haste_group()
  37.         handle_equipping_gear(player.status)
  38.     elseif state.Buff[buff] ~= nil then
  39.         state.Buff[buff] = gain
  40.         handle_equipping_gear(player.status)
  41.     end
  42. end
  43.  
  44. function determine_haste_group()
  45.     classes.CustomMeleeGroups:clear()
  46.     if state.HasteMode.value == '2' then
  47.         if buffactive[680] then
  48.             if buffactive[33] or buffactive[604] or buffactive[228] or buffactive.march then
  49.                 classes.CustomMeleeGroups:append('MaxHaste')
  50.             else
  51.                 classes.CustomMeleeGroups:append('HighHaste')
  52.             end
  53.         elseif buffactive[33] then
  54.             if buffactive[604] or buffactive[228] or buffactive.march then
  55.                 classes.CustomMeleeGroups:append('MaxHaste')
  56.             else
  57.                 classes.CustomMeleeGroups:append('HighHaste')
  58.             end
  59.         elseif buffactive[604] then
  60.             if buffactive.march == 1 and buffactive[228] then
  61.                 classes.CustomMeleeGroups:append('MaxHaste')
  62.             elseif buffactive.march == 2 or buffactive[228] then
  63.                 classes.CustomMeleeGroups:append('MaxHaste')
  64.             elseif buffactive.march == 1 then
  65.                 classes.CustomMeleeGroups:append('HighHaste')
  66.             else
  67.                 classes.CustomMeleeGroups:append('LowHaste')
  68.             end
  69.         elseif buffactive[228] then
  70.             if buffactive.march then
  71.                 classes.CustomMeleeGroups:append('MaxHaste')
  72.             else
  73.                 classes.CustomMeleeGroups:append('HighHaste')
  74.             end
  75.         end
  76.     elseif state.HasteMode.value == '1' then
  77.         if buffactive[680] then
  78.             if buffactive[33] or buffactive[604] or buffactive[228] or buffactive.march then
  79.                 classes.CustomMeleeGroups:append('MaxHaste')
  80.             else
  81.                 classes.CustomMeleeGroups:append('HighHaste')
  82.             end
  83.         elseif buffactive[33] then
  84.             if buffactive[228] or buffactive.march == 2 then
  85.                 classes.CustomMeleeGroups:append('MaxHaste')
  86.             elseif buffactive[604] or buffactive.march == 1 then
  87.                 classes.CustomMeleeGroups:append('HighHaste')
  88.             else
  89.                 classes.CustomMeleeGroups:append('LowHaste')
  90.             end
  91.         elseif buffactive[604] then
  92.             if buffactive.march == 1 and buffactive[228] then
  93.                 classes.CustomMeleeGroups:append('MaxHaste')
  94.             elseif buffactive.march == 2 or buffactive[228] then
  95.                 classes.CustomMeleeGroups:append('MaxHaste')
  96.             elseif buffactive.march == 1 then
  97.                 classes.CustomMeleeGroups:append('HighHaste')
  98.             else
  99.                 classes.CustomMeleeGroups:append('LowHaste')
  100.             end
  101.         elseif buffactive[228] then
  102.             if buffactive.march then
  103.                 classes.CustomMeleeGroups:append('MaxHaste')
  104.             else
  105.                 classes.CustomMeleeGroups:append('HighHaste')
  106.             end
  107.         end
  108.     end
  109. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement