Advertisement
Guest User

Untitled

a guest
May 30th, 2018
436
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.35 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. indi_timer = ''
  16. indi_duration = 180
  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. gear.default.weaponskill_waist = "Windbuffet Belt"
  30.  
  31. select_default_macro_book()
  32. end
  33.  
  34.  
  35. -- Define sets and vars used by this job file.
  36. function init_gear_sets()
  37.  
  38. --------------------------------------
  39. -- Precast sets
  40. --------------------------------------
  41.  
  42. -- Precast sets to enhance JAs
  43. sets.precast.JA.Bolster = {body="Bagua Tunic +1"}
  44. sets.precast.JA['Life cycle'] = {body="Geo. Tunic +1"}
  45. sets.precast.JA['Full circle'] = {head="Azimuth Hood +1"}
  46.  
  47. -- Fast cast sets for spells
  48.  
  49. sets.precast.FC = {
  50. main={ name="Nehushtan", augments={'"Fast Cast"+4',}},head="Nahtirah Hat",ear2="Loquacious Earring",
  51. body="Dalmatica",hands="Bagua Mitaines",ring2="Prolix Ring",
  52. back="Lifestream Cape",waist="Witful Belt",legs="Geo. Pants +1",feet="Chelona Boots"}
  53.  
  54. sets.precast.FC.Cure = set_combine(sets.precast.FC, {main="Tamaxchi",sub="Genbu's Shield",back="Pahtli Cape"})
  55.  
  56. sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {neck="Stoicheion Medal"})
  57.  
  58. sets.precast.FC.Geomancy = set_combine(sets.precast.FC, {head="Azimuth Hood +1",body="Azimuth Coat +1",
  59. hands="Azimuth Gloves",legs="Azimuth Tights +1",feet="Azimuth Gaiters +1"})
  60.  
  61. sets.precast.FC.Geomancy.Indi = set_combine(sets.precast.FC, {head="Azimuth Hood +1",body="Azimuth Coat +1",
  62. hands="Azimuth Gloves",legs="Azimuth Tights +1",feet="Azimuth Gaiters +1"})
  63.  
  64.  
  65. -- Weaponskill sets
  66. -- Default set for any weaponskill that isn't any more specifically defined
  67. sets.precast.WS = {
  68. head="Nahtirah Hat",neck=gear.ElementalGorget,ear1="Bladeborn Earring",ear2="Steelflash Earring",
  69. body="Ischemia Chasu.",hands="Geo. Mitaines +1",ring1="Rajas Ring",ring2="Patricius Ring",
  70. back="Aptitude mantle",waist=gear.ElementalBelt,legs="Miasmic Pants",feet="Bagua Sandals +1"}
  71.  
  72. -- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
  73. sets.precast.WS['Flash Nova'] = {ammo="Dosis Tathlum",
  74. head="Helios Band",neck="Eddy Necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
  75. body="Bagua Tunic +1",hands="Helios Gloves",ring1="Acumen Ring",ring2="Strendu Ring",
  76. back="Toro Cape",waist="Sekhmet Corset",legs="Hagondes Pants +1",feet="Umbani Boots"}
  77.  
  78. sets.precast.WS['Starlight'] = {ear2="Moonshade Earring"}
  79.  
  80. sets.precast.WS['Moonlight'] = {ear2="Moonshade Earring"}
  81.  
  82.  
  83. --------------------------------------
  84. -- Midcast sets
  85. --------------------------------------
  86.  
  87. -- Base fast recast for spells
  88. sets.midcast.FastRecast = {
  89. head="Nahtirah Hat",ear2="Loquacious Earring",
  90. body="Dalmatica",ring2="Prolix Ring",
  91. back="Lifestream Cape",waist="Witful Belt",legs="Geo. Pants +1",feet="Umbani Boots"}
  92.  
  93. sets.midcast.Geomancy = {range="Dunna",head="Azimuth Hood +1",
  94. neck="Orunmila's Torque",ear1="Loquac. Earring",ear2="Gifted Earring",body="Bagua Tunic +1",
  95. hands="Geo. Mitaines +1",ring1="Renaye Ring",ring2="Prolix Ring",back="Lifestream Cape",
  96. legs="Geo. Pants +1",feet="Azimuth Gaiters +1"}
  97. sets.midcast.Geomancy.Indi = {range="Dunna",head="Azimuth Hood +1",
  98. neck="Orunmila's Torque",ear1="Loquac. Earring",ear2="Gifted Earring",body="Bagua Tunic +1",
  99. hands="Geo. Mitaines +1",ring1="Renaye Ring",ring2="Prolix Ring",back="Lifestream Cape",
  100. legs="Bagua Pants +1",feet="Azimuth Gaiters +1"}
  101.  
  102. sets.midcast.Cure = {main="Tamaxchi",sub="Genbu's Shield",
  103. body="Heka's Kalasiris",hands="Bokwus Gloves",
  104. back="Lifestream Cape",legs="Assid. Pants +1"}
  105.  
  106. sets.midcast.Curaga = sets.midcast.Cure
  107.  
  108. sets.midcast.Protectra = {ring1="Sheltered Ring"}
  109.  
  110. sets.midcast.Shellra = {ring1="Sheltered Ring"}
  111.  
  112. sets.midcast['Enfeebling Magic'] = {main="Lehbrailg +2",sub="Mephitis Grip",
  113. head="Nahtirah Hat",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
  114. body="Ischemia Chasu.",hands="Azimuth Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
  115. back="Lifestream Cape",legs="Hagondes Pants +1",feet="Bagua Sandals +1"}
  116.  
  117. sets.midcast['Dark Magic'] = {main="Lehbrailg +2",sub="Mephitis Grip",
  118. head="Nahtirah Hat",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
  119. body="Geomancy Tunic",hands="Otomi Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
  120. back="Lifestream Cape",legs="Azimuth Tights +1",feet="Bagua Sandals +1"}
  121.  
  122. sets.midcast.Drain = {main="Lehbrailg +2",sub="Mephitis Grip",
  123. head="Bagua Galero",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Hirudinea Earring",
  124. body="Geomancy Tunic",hands="Otomi Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
  125. back="Lifestream Cape",waist="Fucho-no-obi",legs="Hagondes Pants +1",feet="Umbani Boots"}
  126.  
  127. sets.midcast.Aspir = sets.midcast.Drain
  128.  
  129. sets.midcast['Elemental Magic'] = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Dosis Tathlum",
  130. head="Helios Band",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Friomisi Earring",
  131. body="Azimuth Coat +1",hands="Helios Gloves",ring1="Acumen Ring",ring2="Strendu Ring",
  132. back="Toro Cape",waist="Hachirin-no-obi",legs="Hagondes Pants +1",feet="Umbani Boots"}
  133.  
  134.  
  135. --------------------------------------
  136. -- Idle/resting/defense/etc sets
  137. --------------------------------------
  138.  
  139. -- Resting sets
  140. sets.resting = {head="Befouled Crown",neck="Wiglen Gorget",
  141. body="Hagondes Coat +1",hands="Bagua Mitanes",ring1="Renaye Ring",ring2="Paguroidea Ring",
  142. legs="Assid. Pants +1",feet="Chelona Boots"}
  143.  
  144.  
  145. -- Idle sets
  146.  
  147. sets.idle = {main="Bolelabunga",sub="Genbu's Shield",range="Dunna",
  148. head="Befouled Crown",neck="Wiglen Gorget",ear1="Hearty Earring",ear2="Ethereal Earring",
  149. body="Azimuth Coat +1",hands="Bagua Mitaines",ring1="Renaye Ring",ring2="Paguroidea Ring",
  150. back="Aptitude Mantle",waist="Fucho-no-obi",legs="Assid. Pants +1",feet="Geo. Sandals +1"}
  151.  
  152. sets.idle.PDT = {main={ name="Nehushtan", augments={'Accuracy+10','"Fast Cast"+4','STR+1 VIT+1',}},sub="Tamaxchi",range="Dunna",
  153. head="Befouled Crown",neck="Wiglen Gorget",ear1="Hearty Earring",ear2="Ethereal Earring",
  154. body="Azimuth Coat +1",hands="Bagua Mitaines",ring1="Renaye Ring",ring2="Paguroidea Ring",
  155. back="Aptitude Mantle",waist="Fucho-no-obi",legs="Assid. Pants +1",feet="Geo. Sandals +1"}
  156.  
  157. -- .Pet sets are for when Luopan is present.
  158. sets.idle.Pet = {main={ name="Nehushtan", augments={'Pet: Evasion+16','Pet: Damage taken -4%','MP+22',}},sub="Genbu's Shield",range="Dunna",
  159. head="Azimuth Hood +1",neck="Twilight Torque",ear1="Handler's Earring",ear2="Ethereal Earring",
  160. body="Telchine Chas.",hands="Geo. Mitaines +1",ring1="Dark Ring",ring2="Dark Ring",
  161. back="Lifestream Cape",waist="Isa Belt",legs="Telchine Braconi",feet="Bagua Sandals +1"}
  162.  
  163. sets.idle.PDT.Pet = {main={ name="Nehushtan", augments={'Pet: Mag. Evasion+18','Pet: "Regen"+3',}},sub={ name="Nehushtan", augments={'Pet: Evasion+16','Pet: Damage taken -4%','MP+22',}},range="Dunna",
  164. head="Azimuth Hood +1",neck="Twilight Torque",ear1="Handler's Earring",ear2="Ethereal Earring",
  165. body="Telchine Chas.",hands="Geo. Mitaines +1",ring1="Dark Ring",ring2="Dark Ring",
  166. back="Lifestream Cape",waist="Isa Belt",legs="Telchine Braconi",feet="Bagua Sandals +1"}
  167.  
  168. -- .Indi sets are for when an Indi-spell is active.
  169. sets.idle.Indi = set_combine(sets.idle, {})
  170. sets.idle.Pet.Indi = set_combine(sets.idle.Pet, {})
  171. sets.idle.PDT.Indi = set_combine(sets.idle.PDT, {})
  172. sets.idle.PDT.Pet.Indi = set_combine(sets.idle.PDT.Pet, {})
  173.  
  174. sets.idle.Town = {main="Bolelabunga",sub="Genbu's Shield",range="Dunna",
  175. head="Befouled Crown",neck="Wiglen Gorget",ear1="Merman's Earring",ear2="Merman's Earring",
  176. body="Azimuth Coat +1",hands="Bagua Mitaines",ring1="Renaye Ring",ring2="Paguroidea Ring",
  177. back="Umbra Cape",waist="Fucho-no-obi",legs="Assid. Pants +1",feet="Geo. Sandals +1"}
  178.  
  179. sets.idle.Weak = {main="Bolelabunga",sub="Genbu's Shield",range="Dunna",
  180. head="Befouled Crown",neck="Wiglen Gorget",ear1="Merman's Earring",ear2="Merman's Earring",
  181. body="Hagondes Coat +1",hands="Bagua Mitaines",ring1="Renaye Ring",ring2="Paguroidea Ring",
  182. back="Umbra Cape",waist="Fucho-no-obi",legs="Assid. Pants +1",feet="Geo. Sandals +1"}
  183.  
  184. -- Defense sets
  185.  
  186. sets.defense.PDT = {main="Terra's Staff",sub="Volos Strap",range="Dunna",
  187. head="Geo. Galero +1",neck="Twilight Torque",ear1="Merman's Earring",ear2="Ethereal Earring",
  188. body="Hagondes Coat +1",hands="Geo Mitaines +1",ring1="Dark Ring",ring2="Dark Ring",
  189. back="Umbra Cape",waist="Fucho-no-obi",legs="Hagondes Pants +1",feet="Geo. Sandals +1"}
  190.  
  191. sets.defense.MDT = {main="Terra's Staff",sub="Volos Strap",range="Dunna",
  192. head="Geo. Galero +1",neck="Twilight Torque",ear1="Merman's Earring",ear2="Ethereal Earring",
  193. body="Hagondes Coat +1",hands="Geo Mitaines +1",ring1="Dark Ring",ring2="Dark Ring",
  194. back="Umbra Cape",waist="Fucho-no-obi",legs="Hagondes Pants +1",feet="Geo. Sandals +1"}
  195.  
  196. sets.Kiting = {feet="Geo. Sandals +1"}
  197.  
  198. sets.latent_refresh = {waist="Fucho-no-obi"}
  199.  
  200.  
  201. --------------------------------------
  202. -- Engaged sets
  203. --------------------------------------
  204.  
  205. -- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
  206. -- sets if more refined versions aren't defined.
  207. -- If you create a set with both offense and defense modes, the offense mode should be first.
  208. -- EG: sets.engaged.Dagger.Accuracy.Evasion
  209.  
  210. -- Normal melee group
  211. sets.engaged = {range="Dunna",
  212. head="Befouled Crown",neck="Iqabi Necklace",ear1="Steelflash Earring",ear2="Bladeborn Earring",
  213. body="Ischemia Chasu.",hands="Bokwus Gloves",ring1="Rajas Ring",ring2="Patricius Ring",
  214. back="Aptitude Mantle",waist="Windbuffet Belt",legs="Miasmic Pants",feet="Azimuth Gaiters +1"}
  215.  
  216. --------------------------------------
  217. -- Custom buff sets
  218. --------------------------------------
  219.  
  220. end
  221.  
  222. -------------------------------------------------------------------------------------------------------------------
  223. -- Job-specific hooks for standard casting events.
  224. -------------------------------------------------------------------------------------------------------------------
  225.  
  226. function job_aftercast(spell, action, spellMap, eventArgs)
  227. if not spell.interrupted then
  228. if spell.english:startswith('Indi') then
  229. if not classes.CustomIdleGroups:contains('Indi') then
  230. classes.CustomIdleGroups:append('Indi')
  231. end
  232. send_command('@timers d "'..indi_timer..'"')
  233. indi_timer = spell.english
  234. send_command('@timers c "'..indi_timer..'" '..indi_duration..' down spells/00136.png')
  235. elseif spell.english == 'Sleep' or spell.english == 'Sleepga' then
  236. send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 60 down spells/00220.png')
  237. elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
  238. send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 90 down spells/00220.png')
  239. end
  240. elseif not player.indi then
  241. classes.CustomIdleGroups:clear()
  242. end
  243. end
  244.  
  245.  
  246. -------------------------------------------------------------------------------------------------------------------
  247. -- Job-specific hooks for non-casting events.
  248. -------------------------------------------------------------------------------------------------------------------
  249.  
  250. -- Called when a player gains or loses a buff.
  251. -- buff == buff gained or lost
  252. -- gain == true if the buff was gained, false if it was lost.
  253. function job_buff_change(buff, gain)
  254. if player.indi and not classes.CustomIdleGroups:contains('Indi')then
  255. classes.CustomIdleGroups:append('Indi')
  256. handle_equipping_gear(player.status)
  257. elseif classes.CustomIdleGroups:contains('Indi') and not player.indi then
  258. classes.CustomIdleGroups:clear()
  259. handle_equipping_gear(player.status)
  260. end
  261. end
  262.  
  263. function job_state_change(stateField, newValue, oldValue)
  264. if stateField == 'Offense Mode' then
  265. if newValue == 'Normal' then
  266. disable('main','sub','range')
  267. else
  268. enable('main','sub','range')
  269. end
  270. end
  271. end
  272.  
  273. -------------------------------------------------------------------------------------------------------------------
  274. -- User code that supplements standard library decisions.
  275. -------------------------------------------------------------------------------------------------------------------
  276.  
  277. function job_get_spell_map(spell, default_spell_map)
  278. if spell.action_type == 'Magic' then
  279. if spell.skill == 'Enfeebling Magic' then
  280. if spell.type == 'WhiteMagic' then
  281. return 'MndEnfeebles'
  282. else
  283. return 'IntEnfeebles'
  284. end
  285. elseif spell.skill == 'Geomancy' then
  286. if spell.english:startswith('Indi') then
  287. return 'Indi'
  288. end
  289. end
  290. end
  291. end
  292.  
  293. function customize_idle_set(idleSet)
  294. if player.mpp < 51 then
  295. idleSet = set_combine(idleSet, sets.latent_refresh)
  296. end
  297. return idleSet
  298. end
  299.  
  300. -- Called by the 'update' self-command.
  301. function job_update(cmdParams, eventArgs)
  302. classes.CustomIdleGroups:clear()
  303. if player.indi then
  304. classes.CustomIdleGroups:append('Indi')
  305. end
  306. end
  307.  
  308. -- Function to display the current relevant user state when doing an update.
  309. function display_current_job_state(eventArgs)
  310. display_current_caster_state()
  311. eventArgs.handled = true
  312. end
  313.  
  314. -------------------------------------------------------------------------------------------------------------------
  315. -- Utility functions specific to this job.
  316. -------------------------------------------------------------------------------------------------------------------
  317.  
  318. -- Select default macro book on initial load or subjob change.
  319. function select_default_macro_book()
  320. set_macro_page(1, 10)
  321. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement