Advertisement
KGrinols

Basic White Bitch

Jan 6th, 2019
5,054
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 7.12 KB | None | 0 0
  1. -- Basic White Bitch Gearswap by Cambion
  2.  
  3. -- Initialization function for this job file.
  4. function get_sets()
  5.     mote_include_version = 2
  6.  
  7.     -- Load and initialize the include file.
  8.     include('Mote-Include.lua')
  9. end
  10.  
  11. -- Setup variables that are user-independent.  state.Buff vars initialized here will automatically be tracked.
  12. function job_setup()
  13.     state.Buff['Climactic Flourish'] = buffactive['climactic flourish'] or false
  14. end
  15.  
  16. -------------------------------------------------------------------------------------------------------------------
  17. -- User setup functions for this job.
  18. -------------------------------------------------------------------------------------------------------------------
  19.  
  20. -- Gear Modes
  21. function user_setup()
  22.     Haste = 0
  23.     DW_needed = 0
  24.     DW = false
  25.     moving = false
  26.     update_combat_form()
  27.     determine_haste_group()
  28. end
  29.  
  30. -- Define sets and vars used by this job file.
  31. function init_gear_sets()
  32.  
  33.     ------------------------------------------------------------------------------------------------
  34.     ---------------------------------------- Precast Sets ------------------------------------------
  35.     ------------------------------------------------------------------------------------------------
  36.  
  37.     sets.precast.JA['No Foot Rise'] = {body="Horos Casaque +2"}
  38.     sets.precast.Waltz = {}
  39.     sets.precast.WaltzSelf = set_combine(sets.precast.Waltz, {ring1="Asklepian Ring"})
  40.     sets.precast.Samba = {}
  41.     sets.precast.Jig = {}
  42.     sets.precast.Step = {}  
  43.     sets.precast.Flourish2['Reverse Flourish'] = {hands="Macu. Bangles +1",back="Toetapper Mantle"}
  44.     sets.precast.Flourish3['Climactic Flourish'] = {head="Maculele Tiara +1"}
  45.     sets.buff['Climactic Flourish'] = {head="Maculele Tiara +1", body="Meg. Cuirie +2"}
  46.  
  47.     ------------------------------------------------------------------------------------------------
  48.     ------------------------------------- Weapon Skill Sets ----------------------------------------
  49.     ------------------------------------------------------------------------------------------------
  50.  
  51.     sets.precast.WS = {}
  52.  
  53.     sets.precast.WS['Exenterator'] = {}
  54.  
  55.     sets.precast.WS['Pyrrhic Kleos'] = {}
  56.  
  57.     sets.precast.WS['Evisceration'] = {}
  58.  
  59.     sets.precast.WS['Rudra\'s Storm'] = {}
  60.  
  61.     sets.precast.WS['Aeolian Edge'] = {}
  62.  
  63.     ------------------------------------------------------------------------------------------------
  64.     ----------------------------------------- Idle Sets --------------------------------------------
  65.     ------------------------------------------------------------------------------------------------
  66.     sets.idle = {}
  67.  
  68.  
  69.     ------------------------------------------------------------------------------------------------
  70.     -------------------------------------- Dual Wield Sets -----------------------------------------
  71.     ------------------------------------------------------------------------------------------------
  72.     -- * DNC Native DW Trait: 30% DW
  73.     -- * DNC Job Points DW Gift: 5% DW
  74.  
  75.     -- No Magic Haste (39% DW to cap)
  76.     sets.engaged.DW = {}
  77.  
  78.     -- 15% Magic Haste (32% DW to cap)
  79.     sets.engaged.DW.LowHaste = {}
  80.  
  81.     -- 30% Magic Haste (21% DW to cap)
  82.     sets.engaged.DW.MidHaste = {}
  83.  
  84.     -- 35% Magic Haste (16% DW to cap)
  85.     sets.engaged.DW.HighHaste = {}
  86.  
  87.     -- 45% Magic Haste (1% DW to cap)
  88.     sets.engaged.DW.MaxHaste = {}
  89. end
  90.  
  91. -------------------------------------------------------------------------------------------------------------------
  92. -- Job-specific hooks for standard casting events.
  93. -------------------------------------------------------------------------------------------------------------------
  94. function job_post_precast(spell, action, spellMap, eventArgs)
  95.     if spell.type == "WeaponSkill" then
  96.         if state.Buff['Climactic Flourish'] then
  97.             equip(sets.buff['Climactic Flourish'])
  98.         end
  99.     end
  100.     if spell.type=='Waltz' and spell.target.type == 'SELF' then
  101.         equip(sets.precast.WaltzSelf)
  102.     end
  103. end
  104.  
  105. -------------------------------------------------------------------------------------------------------------------
  106. -- Job-specific hooks for non-casting events.
  107. -------------------------------------------------------------------------------------------------------------------
  108. function job_buff_change(buff,gain)
  109.     if buff == 'Climactic Flourish' then
  110.         handle_equipping_gear(player.status)
  111.     end
  112. end
  113. -------------------------------------------------------------------------------------------------------------------
  114. -- User code that supplements standard library decisions.
  115. -------------------------------------------------------------------------------------------------------------------
  116. function job_handle_equipping_gear(playerStatus, eventArgs)
  117.     update_combat_form()
  118.     determine_haste_group()
  119. end
  120.  
  121. function job_update(cmdParams, eventArgs)
  122.     handle_equipping_gear(player.status)
  123. end
  124.  
  125. function update_combat_form()
  126.     if DW == true then
  127.         state.CombatForm:set('DW')
  128.     elseif DW == false then
  129.         state.CombatForm:reset()
  130.     end
  131. end
  132.  
  133. function customize_melee_set(meleeSet)
  134.     if state.Buff['Climactic Flourish'] then
  135.         meleeSet = set_combine(meleeSet, sets.buff['Climactic Flourish'])
  136.     end
  137.     return meleeSet
  138. end
  139.  
  140. -------------------------------------------------------------------------------------------------------------------
  141. -- Utility functions specific to this job.
  142. -------------------------------------------------------------------------------------------------------------------
  143.  
  144. function determine_haste_group()
  145.     classes.CustomMeleeGroups:clear()
  146.     if DW == true then
  147.         if DW_needed <= 1 then
  148.             classes.CustomMeleeGroups:append('MaxHaste')
  149.         elseif DW_needed > 1 and DW_needed <= 9 then
  150.             classes.CustomMeleeGroups:append('HighHaste')
  151.         elseif DW_needed > 9 and DW_needed <= 21 then
  152.             classes.CustomMeleeGroups:append('MidHaste')
  153.         elseif DW_needed > 21 and DW_needed <= 39 then
  154.             classes.CustomMeleeGroups:append('LowHaste')
  155.         elseif DW_needed > 39 then
  156.             classes.CustomMeleeGroups:append('')
  157.         end
  158.     end
  159. end
  160.  
  161. function gearinfo(cmdParams, eventArgs)
  162.     if cmdParams[1] == 'gearinfo' then
  163.         if type(tonumber(cmdParams[2])) == 'number' then
  164.             if tonumber(cmdParams[2]) ~= DW_needed then
  165.             DW_needed = tonumber(cmdParams[2])
  166.             DW = true
  167.             end
  168.         elseif type(cmdParams[2]) == 'string' then
  169.             if cmdParams[2] == 'false' then
  170.                 DW_needed = 0
  171.                 DW = false
  172.             end
  173.         end
  174.         if type(tonumber(cmdParams[3])) == 'number' then
  175.             if tonumber(cmdParams[3]) ~= Haste then
  176.                 Haste = tonumber(cmdParams[3])
  177.             end
  178.         end
  179.         if type(cmdParams[4]) == 'string' then
  180.             if cmdParams[4] == 'true' then
  181.                 moving = true
  182.             elseif cmdParams[4] == 'false' then
  183.                 moving = false
  184.             end
  185.         end
  186.         if not midaction() then
  187.             job_update()
  188.         end
  189.     end
  190. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement