Guest User

Untitled

a guest
Jun 27th, 2015
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.12 KB | None | 0 0
  1. --------------------------------------------------------------------------
  2.  
  3. -----------------------------------------
  4. -- Setup functions for this job. Generally should not be modified.
  5. --------------------------------------------------------------------------
  6.  
  7. -----------------------------------------
  8.  
  9. -- Initialization function for this job file.
  10. function get_sets()
  11. mote_include_version = 2
  12.  
  13. -- Load and initialize the include file.
  14. include('Mote-Include.lua')
  15. end
  16.  
  17.  
  18. -- Setup vars that are user-independent. state.Buff vars initialized here
  19.  
  20. will automatically be tracked.
  21. function job_setup()
  22.  
  23. end
  24.  
  25. --------------------------------------------------------------------------
  26.  
  27. -----------------------------------------
  28. -- User setup functions for this job. Recommend that these be overridden
  29.  
  30. in a sidecar file.
  31. --------------------------------------------------------------------------
  32.  
  33. -----------------------------------------
  34.  
  35. -- Setup vars that are user-dependent. Can override this function in a
  36.  
  37. sidecar file.
  38. function user_setup()
  39. state.OffenseMode:options('None', 'Normal')
  40. state.CastingMode:options('Normal', 'Resistant', 'Proc')
  41. state.IdleMode:options('Normal', 'PDT')
  42.  
  43. state.MagicBurst = M(false, 'Magic Burst')
  44.  
  45. lowTierNukes = S{'Stone', 'Water', 'Aero', 'Fire', 'Blizzard',
  46.  
  47. 'Thunder',
  48. 'Stone II', 'Water II', 'Aero II', 'Fire II', 'Blizzard II',
  49.  
  50. 'Thunder II',
  51. 'Stone III', 'Water III', 'Aero III', 'Fire III', 'Blizzard III',
  52.  
  53. 'Thunder III',
  54. 'Stonega', 'Waterga', 'Aeroga', 'Firaga', 'Blizzaga', 'Thundaga',
  55. 'Stonega II', 'Waterga II', 'Aeroga II', 'Firaga II', 'Blizzaga
  56.  
  57. II', 'Thundaga II'}
  58.  
  59. gear.macc_hagondes = {}
  60.  
  61. -- Additional local binds
  62. send_command('bind ^` input /ma Stun <t>')
  63. send_command('bind @` gs c activate MagicBurst')
  64.  
  65. select_default_macro_book()
  66. end
  67.  
  68. -- Called when this job file is unloaded (eg: job change)
  69. function user_unload()
  70. send_command('unbind ^`')
  71. send_command('unbind @`')
  72. end
  73.  
  74.  
  75. -- Define sets and vars used by this job file.
  76. function init_gear_sets()
  77. --------------------------------------
  78. -- Start defining the sets
  79. --------------------------------------
  80.  
  81. ---- Precast Sets ----
  82.  
  83. -- Precast sets to enhance JAs
  84. sets.precast.JA['Mana Wall'] = {feet="Goetia Sabots +2"}
  85.  
  86. sets.precast.JA.Manafont = {body="Sorcerer's Coat +2"}
  87.  
  88. -- equip to maximize HP (for Tarus) and minimize MP loss before using
  89.  
  90. convert
  91. sets.precast.JA.Convert = {}
  92.  
  93.  
  94. -- Fast cast sets for spells
  95.  
  96. sets.precast.FC = {ear2="Loquacious Earring", back="Swith Cape"}
  97.  
  98. sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC,
  99.  
  100. {hands="Carapacho Cuffs"})
  101.  
  102. sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC,
  103.  
  104. {neck="Stoicheion Medal"})
  105.  
  106. sets.precast.FC.Cure = set_combine(sets.precast.FC)
  107.  
  108. sets.precast.FC.Curaga = sets.precast.FC.Cure
  109.  
  110. -- Weaponskill sets
  111. -- Default set for any weaponskill that isn't any more specifically
  112.  
  113. defined
  114. sets.precast.WS = {}
  115.  
  116. -- Specific weaponskill sets. Uses the base set if an appropriate
  117.  
  118. WSMod version isn't found.
  119. sets.precast.WS['Vidohunir'] = {}
  120.  
  121.  
  122. ---- Midcast Sets ----
  123.  
  124. sets.midcast.FastRecast = {
  125. ear2="Loquacious Earring", back="Swith Cape"}
  126.  
  127. sets.midcast.Cure = {main="chatoyant staff"}
  128.  
  129. sets.midcast.Curaga = sets.midcast.Cure
  130.  
  131. sets.midcast['Enhancing Magic'] = {hands="Carapacho Cuffs"}
  132.  
  133. sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'],
  134.  
  135. {hands="Carapacho Cuffs"})
  136.  
  137. sets.midcast['Enfeebling Magic'] = {body="wizard's coat"}
  138.  
  139. sets.midcast.ElementalEnfeeble = sets.midcast['Enfeebling Magic']
  140.  
  141. sets.midcast['Dark Magic'] = {legs="wizard's tonban"}
  142.  
  143. sets.midcast.Drain = {legs="wizard's tonban"}
  144.  
  145. sets.midcast.Aspir = sets.midcast.Drain
  146.  
  147. sets.midcast.Stun = sets.precast.FC
  148.  
  149. sets.midcast.BardSong = {}
  150.  
  151.  
  152. -- Elemental Magic sets
  153.  
  154. sets.midcast['Elemental Magic'] = {main="teiwaz", sub="wize strap",
  155.  
  156. ammo="snow sachet", head="wayfarer circlet", neck="stoicheion medal",
  157.  
  158. ear1="hecate's earring", ear2="moldavite earring", body="wayfarer robe",
  159.  
  160. hands="wayfarer cuffs", ring1="shiva ring", ring2="shiva ring",
  161.  
  162. back="goetia mantle", waist="cognition belt", legs="wayfarer slops",
  163.  
  164. feet="wayfarer clogs"}
  165.  
  166. sets.midcast['Elemental Magic'].Resistant = {main="teiwaz", sub="wize
  167.  
  168. strap", ammo="snow sachet", head="wayfarer circlet", neck="stoicheion
  169.  
  170. medal", ear1="hecate's earring", ear2="moldavite earring", body="wayfarer
  171.  
  172. robe", hands="wayfarer cuffs", ring1="shiva ring", ring2="shiva ring",
  173.  
  174. back="goetia mantle", waist="cognition belt", legs="wayfarer slops",
  175.  
  176. feet="wayfarer clogs"}
  177.  
  178. sets.midcast['Elemental Magic'].HighTierNuke = set_combine
  179.  
  180. (sets.midcast['Elemental Magic'], {sub="Wizzan Grip"})
  181. sets.midcast['Elemental Magic'].HighTierNuke.Resistant = set_combine
  182.  
  183. (sets.midcast['Elemental Magic'], {sub="Wizzan Grip"})
  184.  
  185.  
  186. -- Minimal damage gear for procs.
  187. sets.midcast['Elemental Magic'].Proc = {}
  188.  
  189.  
  190.  
  191. -- Sets to return to when not performing an action.
  192.  
  193. -- Resting sets
  194. sets.resting = {main="Chatoyant Staff",body="errant hpl.", neck="beak
  195.  
  196. necklace", ear1="magnetic earring", waist="hierarch belt"}
  197.  
  198.  
  199. -- Idle sets
  200.  
  201. -- Normal refresh idle set
  202. sets.idle = {main="Terra's Staff", body="dalmatica", head="wayfarer
  203.  
  204. circlet", neck="stoicheion medal", ear1="hecate's earring",
  205.  
  206. ear2="moldavite earring", hands="wayfarer cuffs", ring1="shiva ring",
  207.  
  208. ring2="shiva ring", back="goetia mantle", waist="cognition belt",
  209.  
  210. legs="wayfarer slops", feet="wayfarer clogs"}
  211.  
  212. -- Idle mode that keeps PDT gear on, but doesn't prevent normal gear
  213.  
  214. swaps for precast/etc.
  215. sets.idle.PDT = {main="Terra's Staff"}
  216.  
  217. -- Idle mode scopes:
  218. -- Idle mode when weak.
  219. sets.idle.Weak = {}
  220.  
  221. -- Town gear.
  222. sets.idle.Town = {}
  223.  
  224. -- Defense sets
  225.  
  226. sets.defense.PDT = {main="Terra's Staff"}
  227.  
  228. sets.defense.MDT = {}
  229.  
  230. sets.Kiting = {feet="Herald's Gaiters"}
  231.  
  232. sets.latent_refresh = {waist="Fucho-no-obi"}
  233.  
  234. -- Buff sets: Gear that needs to be worn to actively enhance a current
  235.  
  236. player buff.
  237.  
  238. sets.buff['Mana Wall'] = {feet="Goetia Sabots +2"}
  239.  
  240. sets.magic_burst = {neck="Mizukage-no-Kubikazari", ring1="Sorcerer's
  241.  
  242. Ring"}
  243.  
  244. -- Engaged sets
  245.  
  246. -- Variations for TP weapon and (optional) offense/defense modes.
  247.  
  248. Code will fall back on previous
  249. -- sets if more refined versions aren't defined.
  250. -- If you create a set with both offense and defense modes, the
  251.  
  252. offense mode should be first.
  253. -- EG: sets.engaged.Dagger.Accuracy.Evasion
  254.  
  255. -- Normal melee group
  256. sets.engaged = {}
  257. end
  258.  
  259. --------------------------------------------------------------------------
  260.  
  261. -----------------------------------------
  262. -- Job-specific hooks for standard casting events.
  263. --------------------------------------------------------------------------
  264.  
  265. -----------------------------------------
  266.  
  267. -- Set eventArgs.handled to true if we don't want any automatic gear
  268.  
  269. equipping to be done.
  270. -- Set eventArgs.useMidcastGear to true if we want midcast gear equipped
  271.  
  272. on precast.
  273. function job_precast(spell, action, spellMap, eventArgs)
  274. if spellMap == 'Cure' or spellMap == 'Curaga' then
  275. gear.default.obi_waist = "Goading Belt"
  276. elseif spell.skill == 'Elemental Magic' then
  277. gear.default.obi_waist = "Sekhmet Corset"
  278. if state.CastingMode.value == 'Proc' then
  279. classes.CustomClass = 'Proc'
  280. end
  281. end
  282. end
  283.  
  284.  
  285. -- Set eventArgs.handled to true if we don't want any automatic gear
  286.  
  287. equipping to be done.
  288. function job_midcast(spell, action, spellMap, eventArgs)
  289.  
  290. end
  291.  
  292. function job_post_midcast(spell, action, spellMap, eventArgs)
  293. if spell.skill == 'Elemental Magic' then
  294. if state.MagicBurst.value then
  295. equip(sets.magic_burst)
  296. end
  297. if player.hpp < 76 then
  298. equip({ring1="Sorcerer's Ring"})
  299. end
  300. end
  301. end
  302.  
  303. function job_aftercast(spell, action, spellMap, eventArgs)
  304. -- Lock feet after using Mana Wall.
  305. if not spell.interrupted then
  306. if spell.english == 'Mana Wall' then
  307. enable('feet')
  308. equip(sets.buff['Mana Wall'])
  309. disable('feet')
  310. elseif spell.skill == 'Elemental Magic' then
  311. state.MagicBurst:reset()
  312. end
  313. end
  314. end
  315.  
  316. --------------------------------------------------------------------------
  317.  
  318. -----------------------------------------
  319. -- Job-specific hooks for non-casting events.
  320. --------------------------------------------------------------------------
  321.  
  322. -----------------------------------------
  323.  
  324. -- Called when a player gains or loses a buff.
  325. -- buff == buff gained or lost
  326. -- gain == true if the buff was gained, false if it was lost.
  327. function job_buff_change(buff, gain)
  328. -- Unlock feet when Mana Wall buff is lost.
  329. if buff == "Mana Wall" and not gain then
  330. enable('feet')
  331. handle_equipping_gear(player.status)
  332. end
  333. end
  334.  
  335. -- Handle notifications of general user state change.
  336. function job_state_change(stateField, newValue, oldValue)
  337. if stateField == 'Offense Mode' then
  338. if newValue == 'Normal' then
  339. disable('main','sub','range')
  340. else
  341. enable('main','sub','range')
  342. end
  343. end
  344. end
  345.  
  346.  
  347. --------------------------------------------------------------------------
  348.  
  349. -----------------------------------------
  350. -- User code that supplements standard library decisions.
  351. --------------------------------------------------------------------------
  352.  
  353. -----------------------------------------
  354.  
  355. -- Custom spell mapping.
  356. function job_get_spell_map(spell, default_spell_map)
  357. if spell.skill == 'Elemental Magic' and default_spell_map ~=
  358.  
  359. 'ElementalEnfeeble' then
  360. --[[ No real need to differentiate with current gear.
  361. if lowTierNukes:contains(spell.english) then
  362. return 'LowTierNuke'
  363. else
  364. return 'HighTierNuke'
  365. end
  366. --]]
  367. end
  368. end
  369.  
  370. -- Modify the default idle set after it was constructed.
  371. function customize_idle_set(idleSet)
  372. if player.mpp < 51 then
  373. idleSet = set_combine(idleSet, sets.latent_refresh)
  374. end
  375.  
  376. return idleSet
  377. end
  378.  
  379.  
  380. -- Function to display the current relevant user state when doing an
  381.  
  382. update.
  383. function display_current_job_state(eventArgs)
  384. display_current_caster_state()
  385. eventArgs.handled = true
  386. end
  387.  
  388. --------------------------------------------------------------------------
  389.  
  390. -----------------------------------------
  391. -- Utility functions specific to this job.
  392. --------------------------------------------------------------------------
  393.  
  394. -----------------------------------------
  395.  
  396. -- Select default macro book on initial load or subjob change.
  397. function select_default_macro_book()
  398. set_macro_page(1, 15)
  399. end
Advertisement
Add Comment
Please, Sign In to add comment