Guest User

Kensagaku_RUN.lua

a guest
May 20th, 2014
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.86 KB | None | 0 0
  1. function get_sets()
  2. runes = S{'Ignis', 'Gelus', 'Unda', 'Tellus', 'Sulpor', 'Flabra', 'Lux', 'Tenebrae'}
  3.  
  4. --Variables
  5. idleset = 1 --1 = Standard Idle, 2 = DT Idle
  6. engagedset = 1 --1 = Multihit/damage Engaged, 2 = Tank Engaged
  7.  
  8. --Idle Sets
  9. sets.idle = {}
  10.  
  11. sets.idle.standard = {ammo="Demonry Stone",
  12. head="Wivre Hairpin", neck="Twilight Torque", lear="Brutal Earring", rear="Ethereal Earring",
  13. body="Runeist Coat", hands="Runeist Mitons +1", lring="Dark Ring", rring="Dark Ring",
  14. back="Iximulew Cape", waist="Twilight Belt", legs="Runeist Trousers +1", feet="Skd. Jambeaux +1"}
  15.  
  16. sets.idle.DT = {ammo="Demonry Stone",
  17. head="Futhark Bandeaux", neck="Twilight Torque", lear="Brutal Earring", rear="Ethereal Earring",
  18. body="Runeist Coat", hands="Runeist Mitons +1", lring="Dark Ring", rring="Dark Ring",
  19. back="Iximulew Cape", waist="Twilight Belt", legs="Runeist Trousers +1", feet="Runeist Bottes"}
  20.  
  21. --Precast Sets
  22. sets.precast = {}
  23.  
  24. sets.precast.FC = {head="Runeist Bandeau", neck="Jeweled Collar", rear="Loquac. Earring",
  25. hands="Thaumas Gloves",
  26. legs="Orvail Trousers", feet="Chelona Boots"}
  27.  
  28. sets.precast.Inspiration = {head="Runeist Bandeau", neck="Jeweled Collar",
  29. hands="Thaumas Gloves",
  30. legs="Orvail Pants +1"}
  31.  
  32.  
  33. sets.precast.Enhancing = {head="Runeist Bandeau", neck="Jeweled Collar", rear="Loquac. Earring",
  34. hands="Thaumas Gloves",
  35. waist="Siegel Sash", legs="Futhark Trousers", feet="Chelona Boots"}
  36.  
  37. sets.precast.IE = {head="Runeist Bandeau", legs="Futhark Trousers"}
  38.  
  39. --Midcast Sets
  40. sets.midcast = {}
  41.  
  42. sets.midcast.enhancing = {neck="Colossus's Torque",
  43. hands="Runist Mitons +1",
  44. back="Merciful Cape", waist="Cascade Belt", legs="Futhark Trousers"}
  45.  
  46. sets.midcast.cure = {ammo="Aqreaqa Bomblet",
  47. head="Whirlpool Mask", neck="Colossus's Torque", lear="Roundel Earring", rear="Trux Earring",
  48. body="Futhark Coat", hands="Futhark Mitons", lring="Aquasoul Ring",
  49. back="Iximulew Cape", waist="Goading Belt", legs="Runeist Trousers +1", feet="Qaaxo Leggings"}
  50.  
  51. sets.midcast.enmity = {ammo="Aqreaqa Bomblet",
  52. lear="Friomisi Earring", rear="Trux Earring",
  53. hands="Futhark Mitons",
  54. waist="Goading Belt"}
  55.  
  56. sets.midcast.recast = {head="Runeist Bandeau", neck="Jeweled Collar", rear="Loquac. Earring",
  57. body="Futhark Coat", hands="Runeist Mitons +1",
  58. back="Iximulew Cape", waist="Hurch'lan Sash", legs="Runeist Trousers +1", feet="Qaaxo Leggings"}
  59.  
  60. --Engaged Sets
  61. sets.engaged = {}
  62.  
  63. sets.engaged.standard = {ammo="Thew Bomblet",
  64. head="Whirlpool Mask", neck="Asperity Necklace", lear="Bladeborn Earring", rear="Steelflash Earring",
  65. body="Thaumas Coat", hands="Futhark Mitons", lring="Rajas Ring", rring="Epona's Ring",
  66. back="Atheling Mantle", waist="Windbuffet Belt", legs="Quiahuiz Trousers", feet="Qaaxo Leggings"}
  67.  
  68. sets.engaged.DT = {ammo="Aqreaqa Bomblet",
  69. head="Futhark Bandeau", neck="Twilight Torque", lear="Bladeborn Earring", rear="Steelflash Earring",
  70. body="Futhark Coat", hands="Runeist Mitons +1", lring="Dark Ring", rring="Epona's Ring",
  71. back="Atheling Mantle", waist="Goading Belt", legs="Runeist Trousers +1", feet="Runeist Bottes"}
  72.  
  73. sets.engaged.Battuta = set_combine(sets.engaged.standard,{head="Futhark Bandeau", feet="Futhark Boots"})
  74.  
  75. sets.engaged.TankBattuta = set_combine(sets.engaged.DT,{head="Futhark Bandeau", feet="Futhark Boots"})
  76.  
  77. sets.engaged.resist = set_combine(sets.engaged.DT, {head="Whirlpool Mask", neck="Jeweled Collar",
  78. body="Runeist Coat", hands="Runeist Mitons +1",
  79. legs="Runeist Trousers +1", feet="Qaaxo Leggings"})
  80.  
  81. --JA Sets
  82. sets.JA = {}
  83.  
  84. sets.JA.Lunge = {ammo="Aqreqaq Bomblet",
  85. head="A'as Circlet", neck="Eddy Necklace", lear="Friomisi Earring", rear="Novio Earring",
  86. body="Mirke Wardecors", hands="Futhark Mitons", rring="Acumen Ring",
  87. waist="Goading Belt", legs="Shneddick Tights", feet="Manabyss Pigaches"}
  88.  
  89. sets.JA['Vivacious Pulse'] = {ammo="Aqreqaq Bomblet",
  90. head="Whirlpool Mask", rear="Kuwunga Earring", lear="Trux Earring",
  91. body="Futhark Coat", hands="Runeist Mitons +1", lring="Dark Ring", rring="Dark Ring",
  92. back="Iximulew Cape", waist="Goading Belt", legs="Runeist Trousers +1", feet="Qaaxo Leggings"}
  93.  
  94. sets.JA.Val = set_combine(sets.midcast.enmity,{body="Runeist Coat", legs="Futhark Trousers"})
  95.  
  96. sets.JA['Elemental Sforzo'] = {body="Futhark Coat"}
  97.  
  98. sets.JA['Swordplay'] = {hands="Futhark Mitons"}
  99.  
  100. sets.JA['Battuta'] = {head="Futhark Bandeau"}
  101.  
  102. sets.JA['Pflug'] = {feet="Runeist Bottes"}
  103.  
  104. sets.JA['Liement'] = {body="Futhark Coat"}
  105.  
  106. sets.JA['Gambit'] = {hands="Runeist Mitons +1"}
  107.  
  108. --WS Sets
  109. sets.WS = {}
  110.  
  111. sets.WS.Resolution = {ammo="Aqreqaq Bomblet",
  112. head="Whirlpool Mask", neck="Breeze Gorget", lear="Bladeborn Earring", rear="Steelflash Earring",
  113. body="Manibozho Jerkin", hands="Futhark Mitons", lring="Rajas Ring", rring="Pyrosoul Ring",
  114. back="Atheling Mantle", waist="Breeze Belt", legs="Quiahuiz Trousers", feet="Qaaxo Leggings"}
  115.  
  116. sets.WS.other = {ammo="Aqreqaq Bomblet",
  117. head="Whirlpool Mask", neck="Ire Torque", lear="Bladeborn Earring", rear="Steelflash Earring",
  118. body="Manibozho Jerkin", hands="Futhark Mitons", lring="Rajas Ring", rring="Pyrosoul Ring",
  119. back="Atheling Mantle", waist="Wanion Belt", legs="Quiahuiz Trousers", feet="Qaaxo Leggings"}
  120. end
  121.  
  122. function precast(spell)
  123. if spell.action_type == 'Magic' then
  124. if spell.skill == 'Enhancing Magic' and spell.name ~= 'Foil' and spell.cast_time > 2 then
  125. if buffactive['Fast Cast'] then
  126. equip(sets.precast.IE)
  127. else
  128. equip(sets.precast.Enhancing)
  129. end
  130. elseif spell.skill == 'Enhancing Magic' and spell.name ~= 'Foil' and spell.name ~= 'Regen' and spell.cast_time < 2 then
  131. equip(sets.midcast.Enhancing)
  132. elseif string.find (spell.english,'Foil') then
  133. equip(sets.midcast.recast,{legs="Futhark Trousers"})
  134. elseif string.find (spell.english,'Regen') then
  135. equip(sets.midcast.recast,{head="Runeist Bandeau", legs="Futhark Trousers"})
  136. elseif spell.skill == 'Divine Magic' then
  137. equip(sets.midcast.enmity)
  138. elseif spell.skill == 'Healing Magic' then
  139. if buffactive['Fast Cast'] then
  140. equip(sets.precast.Inspiration)
  141. else
  142. equip(sets.precast.FC)
  143. end
  144. end
  145. elseif spell.type == 'JobAbility' then
  146. if string.find(spell.english,'Lunge') or string.find(spell.english,'Swipe') then
  147. equip(sets.JA.Lunge)
  148. elseif string.find(spell.english,'Vallation') or string.find(spell.english,'Valiance') then
  149. equip(sets.JA.Val)
  150. elseif runes:contains(spell.name) then
  151. equip(sets.midcast.enmity)
  152. elseif sets.JA[spell.english] and spell.name ~= 'Lunge' then
  153. equip(sets.JA[spell.english])
  154. end
  155. elseif spell.type == 'WeaponSkill' then
  156. if string.find(spell.english,'Resolution') then
  157. equip(sets.WS.Resolution)
  158. else
  159. equip(sets.WS.other)
  160. end
  161. end
  162. end
  163.  
  164. function midcast(spell)
  165. if spell.action_type == 'Magic' then
  166. if spell.skill == 'Enhancing Magic' and spell.name ~= 'Foil' and spell.cast_time > 2 then
  167. equip(sets.midcast.enhancing)
  168. elseif spell.skill == 'Healing Magic' then
  169. equip(sets.midcast.cure)
  170. end
  171. end
  172. end
  173.  
  174. function aftercast(spell)
  175. if player.status == 'Engaged' then
  176. if engagedset == 1 then
  177. if buffactive.Battuta then
  178. equip(sets.engaged.Battuta)
  179. else
  180. equip(sets.engaged.standard)
  181. end
  182. elseif engagedset == 2 then
  183. if buffactive.Battuta then
  184. equip(sets.engaged.TankBattuta)
  185. else
  186. equip(sets.engaged.DT)
  187. end
  188. end
  189. elseif player.status == 'Idle' then
  190. if idleset == 1 then
  191. equip(sets.idle.standard)
  192. elseif idleset == 2 then
  193. equip(sets.idle.DT)
  194. end
  195. end
  196. end
  197.  
  198. function status_change(new,tab)
  199. if new == 'Idle' then
  200. if idleset == 1 then
  201. equip(sets.idle.standard)
  202. elseif idleset == 2 then
  203. equip(sets.idle.DT)
  204. end
  205. elseif new == 'Engaged' then
  206. if engagedset == 1 then
  207. equip(sets.engaged.standard)
  208. elseif engagedset == 2 then
  209. equip(sets.engaged.DT)
  210. end
  211. end
  212. end
  213.  
  214. function self_command(command)
  215. if command == 'toggle combat set' then
  216. engagedset = engagedset +1
  217. if engagedset > 2 then
  218. engagedset = 1
  219. send_command('@input /echo ----- DD Set -----')
  220. equip(sets.engaged.standard)
  221. elseif engagedset == 2 then
  222. send_command('@input /echo ----- Tanking Set -----')
  223. equip(sets.engaged.DT)
  224. end
  225. end
  226. if command == 'toggle idle set' then
  227. idleset = idleset +1
  228. if idleset > 2 then
  229. idleset = 1
  230. send_command('@input /echo ----- Standard Idle -----')
  231. equip(sets.idle.standard)
  232. elseif idleset == 2 then
  233. send_command('@input /echo ----- DT Idle -----')
  234. equip(sets.idle.DT)
  235. end
  236. elseif command == 'idle' then
  237. if idleset == 1 then
  238. equip(sets.idle.standard)
  239. elseif idleset == 2 then
  240. equip(sets.idle.DT)
  241. end
  242. end
  243. end
Advertisement
Add Comment
Please, Sign In to add comment