Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.44 KB | None | 0 0
  1. -------------------------------------------------------------------------------------------------------------------
  2. -- Initialization function that defines sets and variables to be used.
  3. -------------------------------------------------------------------------------------------------------------------
  4.  
  5. -- IMPORTANT: Make sure to also get the Mote-Include.lua file to go with this.
  6.  
  7. -- Initialization function for this job file.
  8. function get_sets()
  9. -- Load and initialize the include file.
  10. mote_include_version = 2
  11. include('Mote-Include.lua')
  12. include('organizer-lib')
  13. end
  14.  
  15. -- Setup vars that are user-independent.
  16. function job_setup()
  17. state.Buff.Sentinel = buffactive.sentinel or false
  18. state.Buff.Cover = buffactive.cover or false
  19. state.Buff.Doomed = buffactive.doomed or false
  20. end
  21.  
  22.  
  23. -- Setup vars that are user-dependent. Can override this function in a sidecar file.
  24. function user_setup()
  25. -- Options: Override default values
  26. state.OffenseMode:options('Normal', 'PDT', 'MDT')
  27. state.RangedMode:options('Normal')
  28. state.HybridMode:options('Normal')
  29. state.WeaponskillMode:options('Normal')
  30. state.CastingMode:options('Normal')
  31. state.IdleMode:options('Normal', 'PDT', 'MDT')
  32. state.RestingMode:options('Normal')
  33. state.PhysicalDefenseMode:options('PDT')
  34. state.MagicalDefenseMode:options('MDT')
  35. end
  36.  
  37.  
  38. -- Define sets and vars used by this job file.
  39. function init_gear_sets()
  40. --------------------------------------
  41. -- Precast sets
  42. --------------------------------------
  43. sets.precast.JA = {
  44. }
  45.  
  46. -- Precast sets to enhance JAs
  47. sets.precast.JA['Invincible'] = set_combine(sets.precast.JA, { })
  48. sets.precast.JA['Holy Circle'] = set_combine(sets.precast.JA, { })
  49. sets.precast.JA['Shield Bash'] = set_combine(sets.precast.JA, {hands="Valor Gauntlets", ear1="Knightly Earring",})
  50. sets.precast.JA['Sentinel'] = set_combine(sets.precast.JA, {feet="Valor Leggings",})
  51. sets.precast.JA['Rampart'] = set_combine(sets.precast.JA, { })
  52. sets.precast.JA['Fealty'] = set_combine(sets.precast.JA, { })
  53. sets.precast.JA['Divine Emblem'] = set_combine(sets.precast.JA, { })
  54. sets.precast.JA['Cover'] = set_combine(sets.precast.JA, { })
  55.  
  56. -- add mnd for Chivalry
  57. sets.precast.JA['Chivalry'] = {
  58.  
  59. }
  60.  
  61.  
  62. -- Waltz set (chr and vit)
  63. sets.precast.Waltz = {}
  64.  
  65. -- Don't need any special gear for Healing Waltz.
  66. sets.precast.Waltz['Healing Waltz'] = {}
  67.  
  68. sets.precast.Step = {}
  69. sets.precast.Flourish1 = {}
  70.  
  71. -- Fast cast sets for spells
  72.  
  73. sets.precast.FC = {
  74.  
  75. }
  76.  
  77. sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {})
  78.  
  79. sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {neck="Enhancing Torque"})
  80.  
  81. sets.precast.FC.Cure = set_combine(sets.precast.FC, {})
  82.  
  83.  
  84. -- Weaponskill sets
  85. -- Default set for any weaponskill that isn't any more specifically defined
  86. sets.precast.WS = {
  87. }
  88.  
  89.  
  90. --------------------------------------
  91. -- Midcast sets
  92. --------------------------------------
  93.  
  94. sets.midcast.FastRecast = {
  95. }
  96.  
  97. sets.midcast['Reprisal'] = {
  98. } -- use +HP Gear/Haste gear for this. Not enmity. Stack Haste, and where you can't get haste, stack HP
  99.  
  100. sets.midcast.Enmity = {}
  101.  
  102. sets.midcast.Flash = set_combine(sets.midcast.Enmity, {
  103. })
  104.  
  105. sets.midcast.Stun = sets.midcast.Flash
  106.  
  107. sets.midcast.Cure = {
  108.  
  109. }
  110.  
  111.  
  112.  
  113. sets.midcast['Enhancing Magic'] = set_combine(sets.midcast.FastRecast,{neck="Enhancing Torque", legs="Gallant Breeches",})
  114.  
  115. sets.midcast.Protect = {}
  116. sets.midcast.Shell = {}
  117.  
  118. --------------------------------------
  119. -- Idle/resting/defense/etc sets
  120. --------------------------------------
  121.  
  122.  
  123. sets.resting = {body="Ares' Cuirass"}
  124.  
  125.  
  126. -- Idle sets
  127. sets.idle = {
  128. head="Crimson Mask",
  129. neck="Parade Gorget",
  130. ear1="Coral Earring",
  131. ear2="Coral Earring",
  132. body="Ares' Cuirass",
  133. hands="Heavy Gauntlets",
  134. ring2="Merman's Ring",
  135. ring1="Jelly Ring",
  136. back="Lamia Mantle +1",
  137. waist="Resolute Belt",
  138. legs="Blood Cuisses",
  139. feet="Askar Gambieras",}
  140.  
  141. sets.idle.Town = {
  142. head="Crimson Mask",
  143. neck="Parade Gorget",
  144. ear1="Coral Earring",
  145. ear2="Coral Earring",
  146. body="Ares' Cuirass",
  147. hands="Heavy Gauntlets",
  148. ring2="Merman's Ring",
  149. ring1="Jelly Ring",
  150. back="Lamia Mantle +1",
  151. waist="Resolute Belt",
  152. legs="Blood Cuisses",
  153. feet="Askar Gambieras",}
  154.  
  155. sets.idle.Weak = {
  156. head="Crimson Mask",
  157. neck="Parade Gorget",
  158. ear1="Coral Earring",
  159. ear2="Coral Earring",
  160. body="Ares' Cuirass",
  161. hands="Heavy Gauntlets",
  162. ring2="Merman's Ring",
  163. ring1="Jelly Ring",
  164. back="Lamia Mantle +1",
  165. waist="Resolute Belt",
  166. legs="Blood Cuisses",
  167. feet="Askar Gambieras",}
  168.  
  169. sets.idle.Weak.Reraise = set_combine(sets.idle.Weak, sets.Reraise)
  170.  
  171.  
  172.  
  173. sets.defense.PDT = {
  174. head="Darksteel Cap +1",
  175. neck="Shield Torque",
  176. ear1="Hades Earring +1",
  177. ear2="Buckler Earring",
  178. body="Ares' Cuirass",
  179. hands="Heavy Gauntlets",
  180. ring2="Jelly Ring",
  181. ring1="Hercules' Ring",
  182. back="Lamia Mantle +1",
  183. waist="Trance Belt",
  184. legs="Darksteel Subligar +1",
  185. feet="Askar Gambieras"}
  186.  
  187. sets.defense.MDT = {
  188. head="Coral Visor +1",
  189. neck="Orochi Nodowa",
  190. ear1="Merman's Earring",
  191. ear2="Merman's Earring",
  192. body="Coral Scale Mail +1",
  193. hands="Coral Finger Gauntlets +1",
  194. ring1="Merman's Ring",
  195. ring2="Merman's Ring",
  196. back="Lamia Mantle +1",
  197. waist="Resolute Belt",
  198. legs="Coral Cuisses +1",
  199. feet="Askar Gambieras"}
  200.  
  201. --------------------------------------
  202. -- Engaged sets
  203. --------------------------------------
  204.  
  205. sets.engaged = {}
  206.  
  207. sets.engaged.PDT = {
  208. head="Darksteel Cap +1",
  209. neck="Shield Torque",
  210. ear1="Hades Earring +1",
  211. ear2="Buckler Earring",
  212. body="Ares' Cuirass",
  213. hands="Heavy Gauntlets",
  214. ring1="Jelly Ring",
  215. ring2="Hercules' Ring",
  216. back="Lamia Mantle +1",
  217. waist="Trance Belt",
  218. legs="Darksteel Subligar +1",
  219. feet="Askar Gambieras"}
  220.  
  221. sets.engaged.MDT = {
  222. head="Coral Visor +1",
  223. neck="Orochi Nodowa",
  224. ear1="Coral Earring"
  225. ,ear2="Coral Earring",
  226. body="Coral Scale Mail +1",
  227. hands="Coral Finger Gauntlets +1",
  228. ring1="Merman's Ring",
  229. ring2="Merman's Ring",
  230. back="Lamia Mantle +1",
  231. waist="Resolute Belt",
  232. legs="Coral Cuisses +1",
  233. feet="Askar Gambieras"}
  234. --------------------------------------
  235. -- Custom buff sets
  236. --------------------------------------
  237.  
  238. end
  239.  
  240.  
  241. -------------------------------------------------------------------------------------------------------------------
  242. -- Job-specific hooks that are called to process player actions at specific points in time.
  243. -------------------------------------------------------------------------------------------------------------------
  244.  
  245. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  246. -- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
  247. function job_precast(spell, action, spellMap, eventArgs)
  248. -- Don't gearswap for weaponskills when Defense is on.
  249.  
  250. if state.Buff[spell.english] ~= nil then
  251. state.Buff[spell.english] = true
  252. end
  253. end
  254.  
  255. -- Run after the default precast() is done.
  256. -- eventArgs is the same one used in job_precast, in case information needs to be persisted.
  257. function job_post_precast(spell, action, spellMap, eventArgs)
  258.  
  259. end
  260.  
  261. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  262. function job_midcast(spell, action, spellMap, eventArgs)
  263.  
  264. end
  265.  
  266. -- Run after the default midcast() is done.
  267. -- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
  268. function job_post_midcast(spell, action, spellMap, eventArgs)
  269.  
  270. end
  271.  
  272. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  273. function job_aftercast(spell, action, spellMap, eventArgs)
  274. if state.Buff[spell.english] ~= nil then
  275. state.Buff[spell.english] = not spell.interrupted or buffactive[spell.english]
  276. end
  277. end
  278.  
  279. -------------------------------------------------------------------------------------------------------------------
  280. -- Customization hooks for idle and melee sets, after they've been automatically constructed.
  281. -------------------------------------------------------------------------------------------------------------------
  282.  
  283. -- Modify the default idle set after it was constructed.
  284. function customize_idle_set(idleSet)
  285. if player.mpp < 51 then
  286. idleSet = set_combine(idleSet, sets.latent_refresh)
  287. end
  288.  
  289. return idleSet
  290. end
  291.  
  292. -- Modify the default melee set after it was constructed.
  293. function customize_melee_set(meleeSet)
  294. if state.Buff.Doomed then
  295. meleeSet = set_combine(meleeSet, sets.Buff.Doomed)
  296. end
  297. return meleeSet
  298. end
  299.  
  300. -------------------------------------------------------------------------------------------------------------------
  301. -- General hooks for change events.
  302. -------------------------------------------------------------------------------------------------------------------
  303.  
  304. -- Called when the player's status changes.
  305. function job_state_change(field, new_value, old_value)
  306. if field == 'HybridDefenseMode' then
  307. classes.CustomDefenseGroups:clear()
  308. classes.CustomDefenseGroups:append(new_value)
  309. end
  310. end
  311.  
  312.  
  313. -- Called when a player gains or loses a buff.
  314. -- buff == buff gained or lost
  315. -- gain == true if the buff was gained, false if it was lost.
  316. function job_buff_change(buff, gain)
  317. if state.Buff[buff] ~= nil then
  318. state.Buff[buff] = gain
  319. end
  320. end
  321.  
  322.  
  323. -- Called by the 'update' self-command, for common needs.
  324. -- Set eventArgs.handled to true if we don't want automatic equipping of gear.
  325. function job_update(cmdParams, eventArgs)
  326. update_defense_mode()
  327. end
  328.  
  329.  
  330. -------------------------------------------------------------------------------------------------------------------
  331. -- User code that supplements self-commands.
  332. -------------------------------------------------------------------------------------------------------------------
  333.  
  334. -- Set eventArgs.handled to true if we don't want the automatic display to be run.
  335. function display_current_job_state(eventArgs)
  336.  
  337. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement