Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.40 KB | None | 0 0
  1. -- Initialization function for this job file.
  2. function get_sets()
  3. send_command('wait 1;input /lockstyleset 4')
  4. TP_Index = 1
  5.  
  6. SingleWS = S{'Savage Blade', 'Judgment'}
  7.  
  8. MultiWS = S{'Stardiver', 'Resolution', 'Evisceration'}
  9.  
  10. ElementalWS = S{'Raiden Thrust', 'Thunder Thrust', 'Frostbite', 'Freezebite', 'Herculean Slash', 'Flash Nova', 'Sanguine Blade'}
  11.  
  12. sets.precast = {}
  13.  
  14. sets.precast.Berserk = {body="Pumm. Lorica +1", feet="Agoge Calligae +1"}
  15.  
  16. sets.precast.Aggressor = {head="Pumm. Mask +1", body="Agoge Lorica +1"}
  17.  
  18. sets.precast.Warcry = {head="Agoge Mask +1"}
  19.  
  20. sets.precast.Tomahawk = {head="Agoge Mask +1"}
  21.  
  22. sets.precast['Mighty Strikes'] = {hands="Agoge Mufflers +1"}
  23.  
  24. sets.precast.Fastcast = {ammo="Impatiens", neck="Orunmila's Torque", ear1="Etiolation Earring", ear2="Loquac. Earring", hands="Leyline Gloves", ring1="Weather. Ring"}
  25.  
  26. sets.aftercast = {ammo="Staunch Tathlum", head="Valorous Mask", neck="Loricate Torque +1", ear1="Etiolation Earring", body="Sulevia's Plate. +1", hands="Sulev. Gauntlets +1", ring1="Shadow Ring", ring2="Fortified Ring", legs="Sulevi. Cuisses +1", feet="Sulev. Leggings +1", back="Xucau Mantle"}
  27.  
  28. sets.dt = {ammo="Staunch Tathlum", head="Sulevia's Mask +1", neck="Loricate Torque +1", ear1="Etiolation Earring", body="Sulevia's Plate. +1", hands="Sulev. Gauntlets +1", ring1="Shadow Ring", ring2="Fortified Ring", legs="Sulevi. Cuisses +1", feet="Sulev. Leggings +1", back="Xucau Mantle"}
  29.  
  30. TP_Set = {"Normal", "Acc", "High"}
  31. sets.engaged = {}
  32. sets.engaged.Normal = {ammo="Ginsen", head={name="Valorous Mask", augments={"AGI+8"}}, ear1="Cessance Earring", ear2="Brutal Earring", neck="Asperity Necklace", body={name="Valorous Mail", augments={"MND+5"}}, hands="Sulev. Gauntlets +1", ring1="Chirich Ring", ring2="Chirich Ring", waist="Ioskeha Belt", legs={name="Odyssean Cuisses", augments={"STR+2"}}, feet={name="Valorous Greaves", augments={"INT+1"}}, back={name="Cichol's Mantle", augments={'DEX+20',}}}
  33.  
  34. sets.engaged.Acc = set_combine(sets.engaged.Normal, {neck="Subtlety Spec.", ear1="Digni. Earring", ear2="Zennaroi Earring", ring1="Ramuh Ring +1", ring2="Ramuh Ring +1"})
  35.  
  36. sets.engaged.High = set_combine(sets.engaged.Acc, {})
  37.  
  38. sets.ws = {}
  39. sets.ws.Moonshade = {ear1="Moonshade Earring"}
  40. sets.ws.SA = {ammo="Yetshila"}
  41.  
  42. sets.ws.Normal = {ammo="Seeth. Bomblet +1", head="Argosy Celata +1", neck="Fotia Gorget", ear1="Cessance Earring", ear2="Brutal Earring", body="Argosy Hauberk +1", hands="Argosy Mufflers +1", ring1="Shukuyu Ring", ring2="Rufescent Ring", waist="Fotia Belt", legs="Argosy Breeches +1", feet="Argosy Sollerets +1", back={name="Cichol's Mantle", augments={'DEX+20',}}}
  43.  
  44. sets.ws.Acc = set_combine(sets.ws.Normal, {ear1="Digni. Earring", ear2="Zennaroi Earring", ring1="Ramuh Ring +1", ring2="Ramuh Ring +1"})
  45.  
  46. sets.ws.High = set_combine(sets.ws.Acc, {})
  47.  
  48. sets.ws.Dmg = {ammo="Floestone", head="Argosy Celata +1", neck="Fotia Gorget", ear1="Cessance Earring", ear2="Ishvara Earring", body="Argosy Hauberk +1", hands="Argosy Mufflers +1", ring1="Shukuyu Ring", ring2="Rufescent Ring", waist="Prosilio Belt +1", legs="Argosy Breeches +1", feet="Sulev. Leggings +1", back={name="Cichol's Mantle", augments={'Weapon skill damage +10%',}}}
  49.  
  50. sets.ws.Elemental = {ammo="Pemphredo Tathlum", head="Jumalik Helm", neck="Sanctity Necklace", ear1="Friomisi Earring", ear2="Hecate's Earring", body="Found. Breastplate", hands="Founder's Gauntlets", ring1="Shiva Ring +1", ring2="Shiva Ring +1", waist="Prosilio Belt +1", feet="Founder's Greaves"}
  51.  
  52. send_command('wait 1;input /macro Book 5')
  53. send_command('input /chatmode party')
  54. end
  55.  
  56. function precast(spell)
  57. if spell.action_type == "Magic" then
  58. equip(sets.precast.Fastcast)
  59. elseif spell.type == "WeaponSkill" then
  60. ws(spell)
  61. else
  62. ability(spell)
  63. end
  64. end
  65.  
  66. function aftercast(spell)
  67. if player.status == 'Engaged' then
  68. equip(sets.engaged[TP_Set[TP_Index]])
  69. else
  70. equip(sets.aftercast)
  71. end
  72. end
  73.  
  74. function sub_job_change()
  75. send_command('wait 7;input /lockstyleset 4')
  76. end
  77.  
  78. function status_change(new,old)
  79. if T{'Idle','Resting'}:contains(new) then
  80. equip(sets.aftercast)
  81. elseif new == 'Engaged' then
  82. equip(sets.engaged[TP_Set[TP_Index]])
  83. end
  84. end
  85.  
  86. function buff_change(name,gain)
  87. if name == "sleep" then
  88. if gain then
  89. equip(sets.dt)
  90. else
  91. if (not buffactive['terror']) or (not buffactive['stun']) or (not buffactive['petrification']) then
  92. equip(sets.engaged[TP_Set[TP_Index]])
  93. end
  94. end
  95. elseif (name == "terror") or (name == "stun") or (name == "petrification") then
  96. if gain then
  97. equip(sets.dt)
  98. else
  99. if (not buffactive['sleep']) or (not buffactive['terror']) or (not buffactive['stun']) or (not buffactive['petrification']) then
  100. equip(sets.engaged[TP_Set[TP_Index]])
  101. end
  102. end
  103. end
  104.  
  105. end
  106.  
  107. function self_command(command)
  108. if command == 'toggle TP' then
  109. TP_Index = TP_Index +1
  110. if TP_Index > #TP_Set then TP_Index = 1 end
  111. send_command('@input /echo ☆★ TP Set changed to '..TP_Set[TP_Index]..' ★☆')
  112. equip(sets.engaged[TP_Set[TP_Index]])
  113. end
  114. if command == 'aux' then
  115. equip(sets.dt)
  116. send_command('@input /echo ★☆ DT Set ON ☆★')
  117. end
  118.  
  119. end
  120.  
  121. windower.register_event('zone change', function()
  122. equip(sets.aftercast)
  123. end)
  124.  
  125. function ws(spell)
  126. if (spell.target.distance > 8) or (player.tp < 1000) or (buffactive['amnesia']) or (buffactive['sleep']) or (buffactive['terror']) then
  127. cancel_spell()
  128. else
  129. if SingleWS:contains(spell.name) then
  130. equip(sets.ws.Dmg)
  131. if (player.tp < 2270) then
  132. equip(sets.ws.Moonshade)
  133. end
  134. if buffactive['sneak attack'] then
  135. equip(sets.ws.SA)
  136. end
  137. elseif MultiWS:contains(spell.name) then
  138. equip(sets.ws[TP_Set[TP_Index]])
  139. if (player.tp < 3000) then
  140. equip(sets.ws.Moonshade)
  141. end
  142. elseif ElementalWS:contains(spell.name) then
  143. equip(sets.ws.Elemental)
  144. else
  145. equip(sets.ws[TP_Set[TP_Index]])
  146. if (player.tp < 3000) then
  147. equip(sets.ws.Moonshade)
  148. end
  149. end
  150. if buffactive['mighty strikes'] then
  151. equip(sets.ws.SA)
  152. end
  153. end
  154. end
  155.  
  156. function ability(spell)
  157. local cd = windower.ffxi.get_ability_recasts()[spell.recast_id]
  158. if (cd ~= nil) then
  159. if (buffactive['amnesia']) or (buffactive['paralysis']) or (buffactive['sleep']) or (buffactive['terror']) or (cd > 0) then
  160. cancel_spell()
  161. else
  162. equip(sets.precast[spell.name])
  163. end
  164. end
  165. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement