Advertisement
Vamperica

TAGWHM

Feb 24th, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.64 KB | None | 0 0
  1. -------------------------------------------------------------------------------------------------------------------
  2. -- Setup functions for this job. Generally should not be modified.
  3. -------------------------------------------------------------------------------------------------------------------
  4.  
  5. -- Initialization function for this job file.
  6. function get_sets()
  7. mote_include_version = 2
  8.  
  9. -- Load and initialize the include file.
  10. include('Mote-Include.lua')
  11. end
  12.  
  13. -- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
  14. function job_setup()
  15. state.Buff['Afflatus Solace'] = buffactive['Afflatus Solace'] or false
  16. state.Buff['Afflatus Misery'] = buffactive['Afflatus Misery'] or false
  17. end
  18.  
  19. -------------------------------------------------------------------------------------------------------------------
  20. -- User setup functions for this job. Recommend that these be overridden in a sidecar file.
  21. -------------------------------------------------------------------------------------------------------------------
  22.  
  23. -- Setup vars that are user-dependent. Can override this function in a sidecar file.
  24. function user_setup()
  25. state.OffenseMode:options('None', 'Normal')
  26. state.CastingMode:options('Normal', 'Resistant')
  27. state.IdleMode:options('Normal', 'PDT')
  28.  
  29. select_default_macro_book()
  30. end
  31.  
  32. -- Define sets and vars used by this job file.
  33. function init_gear_sets()
  34. --------------------------------------
  35. -- Start defining the sets
  36. --------------------------------------
  37.  
  38. -- Precast Sets
  39.  
  40. -- Fast cast sets for spells
  41. sets.precast.FC = {
  42. head="Vanya Hood",
  43. ammo="Impatiens",
  44. body="Inyanga Jubbah +1",
  45. left_ear="Loquac. Earring",
  46. left_ring="Kishar Ring",
  47. right_ring="Prolix Ring",
  48. back={ name="Alaunus's Cape", augments={'MND+20','Eva.+20 /Mag. Eva.+20','MND+10','"Fast Cast"+10','Phys. dmg. taken-10%',}},
  49. }
  50.  
  51. sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {})
  52.  
  53. sets.precast.FC.Stoneskin = set_combine(sets.precast.FC['Enhancing Magic'], {})
  54.  
  55. sets.precast.FC['Healing Magic'] = set_combine(sets.precast.FC, {})
  56.  
  57. sets.precast.FC.StatusRemoval = sets.precast.FC['Healing Magic']
  58.  
  59. sets.precast.FC.Cure = set_combine(sets.precast.FC['Healing Magic'], {
  60. main="Raetic Rod +1",
  61. sub="Thuellaic Ecu +1",
  62. head="Piety Cap +1",
  63. legs="Ebers Pant. +1",
  64. ear1="Mendicant's earring",
  65. ear2="Nourishing earring",
  66. feet="Vanya Clogs",
  67. })
  68. sets.precast.FC.Curaga = sets.precast.FC.Cure
  69. sets.precast.FC.CureSolace = sets.precast.FC.Cure
  70. -- CureMelee spell map should default back to Healing Magic.
  71.  
  72. -- Precast sets to enhance JAs
  73. sets.precast.JA.Benediction = {body="Piety Briault +1"}
  74.  
  75. -- Waltz set (chr and vit)
  76. sets.precast.Waltz = {}
  77.  
  78.  
  79. -- Weaponskill sets
  80.  
  81. -- Default set for any weaponskill that isn't any more specifically defined
  82. sets.precast.WS = {}
  83.  
  84. sets.precast.WS['Flash Nova'] = {}
  85.  
  86.  
  87. -- Midcast Sets
  88.  
  89. sets.midcast.FastRecast = set_combine(sets.precast.FC, {})
  90.  
  91. -- Cure sets
  92.  
  93. sets.midcast.Cure = {
  94. main="Raetic Rod +1",
  95. sub="Thuellaic Ecu +1",
  96. ammo="Esper Stone +1",
  97. head="Kaykaus Mitra +1",
  98. body ="Ebers Bliaud +1",
  99. --body="Theo. Briault +1",
  100. hands="Theophany Mitts +3",
  101. legs="Ebers Pant. +1",
  102. feet="Kaykaus Boots +1",
  103. neck="Cleric's Torque +2",
  104. waist="Austerity Belt +1",
  105. right_ear="Beatific Earring",
  106. left_ear="Glorious Earring",
  107. left_ring="Haoma's Ring",
  108. right_ring="Janniston Ring",
  109. back={ name="Alaunus's Cape", augments={'MND+20','Eva.+20 /Mag. Eva.+20','MND+10','"Fast Cast"+10','Phys. dmg. taken-10%',}},
  110. }
  111.  
  112. sets.midcast.CureSolace = set_combine(sets.midcast.Cure, {
  113. body ="Ebers Bliaud +1",
  114. })
  115.  
  116. sets.midcast.Curaga = set_combine(sets.midcast.Cure, {})
  117.  
  118. sets.midcast.CureMelee = set_combine(sets.midcast.Cure, {})
  119.  
  120. sets.midcast.Cursna = {
  121. body="Ebers Bliaud +1",
  122. hands="Theophany Mitts +3",
  123. legs="Theo. Pant. +1",
  124. feet="Gende. Galosh. +1",
  125. left_ear="Beatific Earring",
  126. left_ring="Haoma's Ring",
  127. right_ring="Menelaus's Ring",
  128. back={ name="Alaunus's Cape", augments={'MND+20','Eva.+20 /Mag. Eva.+20','MND+10','"Fast Cast"+10','Phys. dmg. taken-10%',}},
  129. waist="Austerity Belt +1",
  130. }
  131.  
  132. sets.midcast.StatusRemoval = {
  133. head="Ebers cap +1",
  134. hands="Ebers Mitts +1",
  135. legs="Theo. Pant. +1",
  136. feet={ name="Medium's Sabots", augments={'MP+45','MND+9','"Conserve MP"+5','"Cure" potency +4%',}},
  137. neck="Cleric's Torque +2",
  138. right_ear="Mendi. Earring",
  139. back="Mending Cape",
  140. waist="Austerity Belt +1",
  141. }
  142.  
  143. -- 110 total Enhancing Magic Skill; caps even without Light Arts
  144. sets.midcast['Enhancing Magic'] = {}
  145.  
  146. sets.midcast.Stoneskin = {}
  147.  
  148. sets.midcast.Auspice = {feet="Ebers duckbills +1"}
  149.  
  150. sets.midcast.BarElement = {
  151. head="Ebers Cap +1",
  152. body="Ebers Bliaud +1",
  153. hands="Ebers Mitts +1",
  154. legs="Piety Pantaln. +1",
  155. feet="Ebers Duckbills +1",
  156. waist="Austerity Belt +1",
  157. }
  158.  
  159. sets.midcast.Regen = {
  160. main="Bolelabunga",
  161. head="Inyanga Tiara +1",
  162. body="Piety Briault +1",
  163. hands="Ebers Mitts +1",
  164. waist="Austerity Belt +1",
  165. }
  166.  
  167. sets.midcast.Protectra = {ring1="Sheltered ring"}
  168.  
  169. sets.midcast.Shellra = {ring1="Sheltered ring"}
  170.  
  171. sets.midcast['Divine Magic'] = {}
  172.  
  173. sets.midcast['Dark Magic'] = {}
  174.  
  175. -- Custom spell classes
  176. sets.midcast.MndEnfeebles = {}
  177.  
  178. sets.midcast.IntEnfeebles = {}
  179.  
  180.  
  181. -- Sets to return to when not performing an action.
  182.  
  183. -- Resting sets
  184. sets.resting = {}
  185.  
  186. -- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
  187. sets.idle = {
  188. main="Bolelabunga",
  189. sub="Sors Shield",
  190. ammo="Staunch Tathlum",
  191. head="Befouled Crown",
  192. body={ name="Witching Robe", augments={'MP+50','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Refresh"+1',}},
  193. legs="Assiduity Pants",
  194. neck="Cleric's Torque +2",
  195. -- neck="Loricate Torque +1",
  196. left_ear="Infused Earring",
  197. left_ring="Defending Ring",
  198. right_ring="Patricius Ring",
  199. feet="Herald's Gaiters",
  200. back={ name="Alaunus's Cape", augments={'MND+20','Eva.+20 /Mag. Eva.+20','MND+10','"Fast Cast"+10','Phys. dmg. taken-10%',}}
  201. }
  202.  
  203. sets.idle.PDT = set_combine(sets.idle, {})
  204.  
  205. sets.idle.Town = set_combine(sets.idle, {})
  206.  
  207. sets.idle.Weak = set_combine(sets.idle, {})
  208.  
  209. -- Defense sets
  210.  
  211. sets.defense.PDT = {}
  212.  
  213. sets.defense.MDT = {}
  214.  
  215. sets.Kiting = {feet="Herald's Gaiters"}
  216.  
  217. sets.latent_refresh = {waist="Fucho-no-obi"}
  218.  
  219. -- Engaged sets
  220.  
  221. -- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
  222. -- sets if more refined versions aren't defined.
  223. -- If you create a set with both offense and defense modes, the offense mode should be first.
  224. -- EG: sets.engaged.Dagger.Accuracy.Evasion
  225.  
  226. -- Basic set for if no TP weapon is defined.
  227. sets.engaged = {}
  228.  
  229.  
  230. -- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
  231. sets.buff['Divine Caress'] = {hands = "Ebers Mitts +1", back="Mending cape"}
  232. end
  233.  
  234. -------------------------------------------------------------------------------------------------------------------
  235. -- Job-specific hooks for standard casting events.
  236. -------------------------------------------------------------------------------------------------------------------
  237.  
  238. -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
  239. -- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
  240. function job_precast(spell, action, spellMap, eventArgs)
  241. if spell.english == "Paralyna" and buffactive.Paralyzed then
  242. -- no gear swaps if we're paralyzed, to avoid blinking while trying to remove it.
  243. eventArgs.handled = true
  244. end
  245.  
  246. -- if spell.skill == 'Healing Magic' then
  247. -- gear.default.obi_back = "Mending Cape"
  248. -- else
  249. -- gear.default.obi_back = "Toro Cape"
  250. -- end
  251. end
  252.  
  253.  
  254. function job_post_midcast(spell, action, spellMap, eventArgs)
  255. -- Apply Divine Caress boosting items as highest priority over other gear, if applicable.
  256. if spellMap == 'StatusRemoval' and buffactive['Divine Caress'] then
  257. equip(sets.buff['Divine Caress'])
  258. end
  259. end
  260.  
  261. -------------------------------------------------------------------------------------------------------------------
  262. -- Job-specific hooks for non-casting events.
  263. -------------------------------------------------------------------------------------------------------------------
  264.  
  265. -- Handle notifications of general user state change.
  266. function job_state_change(stateField, newValue, oldValue)
  267. if stateField == 'Offense Mode' then
  268. if newValue == 'Normal' then
  269. disable('main','sub','range')
  270. else
  271. enable('main','sub','range')
  272. end
  273. end
  274. end
  275.  
  276.  
  277. -------------------------------------------------------------------------------------------------------------------
  278. -- User code that supplements standard library decisions.
  279. -------------------------------------------------------------------------------------------------------------------
  280.  
  281. -- Custom spell mapping.
  282. function job_get_spell_map(spell, default_spell_map)
  283. if spell.action_type == 'Magic' then
  284. if (default_spell_map == 'Cure' or default_spell_map == 'Curaga') and player.status == 'Engaged' then
  285. return "CureMelee"
  286. elseif default_spell_map == 'Cure' and state.Buff['Afflatus Solace'] then
  287. return "CureSolace"
  288. elseif spell.skill == "Enfeebling Magic" then
  289. if spell.type == "WhiteMagic" then
  290. return "MndEnfeebles"
  291. else
  292. return "IntEnfeebles"
  293. end
  294. end
  295. end
  296. end
  297.  
  298.  
  299. function customize_idle_set(idleSet)
  300. if player.mpp < 51 then
  301. idleSet = set_combine(idleSet, sets.latent_refresh)
  302. end
  303. return idleSet
  304. end
  305.  
  306. -- Called by the 'update' self-command.
  307. function job_update(cmdParams, eventArgs)
  308. if cmdParams[1] == 'user' and not areas.Cities:contains(world.area) then
  309. local needsArts =
  310. player.sub_job:lower() == 'sch' and
  311. not buffactive['Light Arts'] and
  312. not buffactive['Addendum: White'] and
  313. not buffactive['Dark Arts'] and
  314. not buffactive['Addendum: Black']
  315.  
  316. if not buffactive['Afflatus Solace'] and not buffactive['Afflatus Misery'] then
  317. if needsArts then
  318. send_command('@input /ja "Afflatus Solace" <me>;wait 1.2;input /ja "Light Arts" <me>')
  319. else
  320. send_command('@input /ja "Afflatus Solace" <me>')
  321. end
  322. end
  323. end
  324. end
  325.  
  326.  
  327. -- Function to display the current relevant user state when doing an update.
  328. function display_current_job_state(eventArgs)
  329. display_current_caster_state()
  330. eventArgs.handled = true
  331. end
  332.  
  333. -------------------------------------------------------------------------------------------------------------------
  334. -- Utility functions specific to this job.
  335. -------------------------------------------------------------------------------------------------------------------
  336.  
  337. -- Select default macro book on initial load or subjob change.
  338. function select_default_macro_book()
  339. -- Default macro set/book
  340. -- set_macro_page(4, 14)
  341. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement