Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.77 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. -- Start defining the sets
  40. --------------------------------------
  41.  
  42. -- Precast Sets
  43.  
  44. -- Precast sets to enhance JAs
  45.  
  46. -- Fast cast sets for spells
  47.  
  48. sets.precast.Stun = {head="Nahtirah Hate",sub="Mephitis grip",ammo="Impatiens",neck="Eddy Necklace",
  49. ear1="Lifestorm earring",ear2="Psystorm Earring",body="Artsieq Jubbah",legs="Artsieq Hose",hands="Lurid Mitts",
  50. ring1="Sangoma Ring",ring2="Prolix Ring",back="Refraction Cape",waist="Witful Belt",feet="Chelona Boots"}
  51.  
  52. sets.precast.FC = {
  53. head="Nahtirah Hat",ear2="Loquacious Earring",
  54. ring1="Prolix Ring",
  55. back="Lifestream Cape",waist="Witful Belt",legs="Geomancy Pants"}
  56.  
  57. sets.precast.FC.Cure = {
  58. head="Nahtirah Hat",ear2="Loquacious Earring",
  59. ring1="Prolix Ring",
  60. back="Lifestream Cape",waist="Witful Belt",legs="Geomancy Pants"}
  61.  
  62.  
  63. -- Weaponskill sets
  64. -- Default set for any weaponskill that isn't any more specifically defined
  65.  
  66. -- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
  67. sets.precast.WS['Flash Nova'] = {}
  68.  
  69. sets.precast.WS['Starlight'] = {ear2="Moonshade Earring"}
  70.  
  71. sets.precast.WS['Moonlight'] = {ear2="Moonshade Earring"}
  72.  
  73.  
  74. -- Midcast Sets
  75.  
  76. sets.midcast.FastRecast = {
  77. head="Nahtirah Hat",ear2="Loquacious Earring",
  78. ring1="Prolix Ring",body="Bagua Tunic +1",hands="Geo. Mitaines +1",
  79. back="Lifestream Cape",waist="Witful Belt",legs="Geomancy Pants",feet="Bagua Sandals +1"}
  80.  
  81. sets.midcast.Geomancy = {main="Seveneyes",range="Dunna",body="Bagua Tunic +1",back="Lifestream Cape",legs="Bagua Pants",hands="Geo. Mitaines +1",
  82. head="Artsieq Hat",ear1="Gifted Earring",ear2="Magnetic Earring",waist="Austerity Belt",feet="Umbani Boots"}
  83.  
  84. sets.midcast['Enfeebling Magic'] = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Kalboron Stone",head="Kaabnax Hat",neck="Imbodla Necklace",
  85. ear1="Lifestorm Earring",ear2="Psystorm Earring",body="Artsieq Jubbah",hands="Lurid Mitts",ring1="Perception Ring",ring2="Leviathan Ring",
  86. back="Refraction Cape",waist="Tengu-no-Obi",legs="Mes'yohi Slacks",feet="Uk'uxkaj Boots"}
  87.  
  88. sets.midcast['Elemental Magic'] = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Witchstone",head="Buremte Hat",neck="Eddy Necklace",
  89. ear1="Crematio Earring",ear2="Friomisi Earring",body="Artseiq Jubbah",hands="Yaoyotl Gloves",ring1="Fenrir Ring +1",ring2="Fenrir Ring +1",
  90. back="Toro Cape",waist="Tengu-no-Obi",legs="Hagondes Pants +1",feet="Umbani Boots"}
  91.  
  92. sets.midcast.Cure = {main="Arka IV",sub="Curatio Grip",ammo="Clarus Stone",head="Nahtirah Hat",body="Heka's Kalasiris",hands="Geo. Mitaines +1",ring1="Haoma's Ring",ring2="Sirona's Ring",
  93. back="Tempered Cape",waist="Austerity Belt",legs="Nares Trews",feet="Umbani boots",neck="Colossus's Torque",ear1="Gifted Earring",ear2="Magnetic Earring"}
  94.  
  95. sets.midcast.Protectra = {ring1="Sheltered Ring"}
  96.  
  97. sets.midcast.Shellra = {ring1="Sheltered Ring"}
  98.  
  99. -- JA precast sets
  100.  
  101. sets.precast['Bolster'] = {body="Bagua Tunic +1"}
  102.  
  103. sets.precast['Curative Recantation'] = {hands="Bagua Mitaines"}
  104.  
  105. sets.precast['Mending Halation'] = {legs="Bagua Pants"}
  106.  
  107. sets.precast['Radial Arcana'] = {feet="Bagua Sandals +1"}
  108.  
  109. sets.precast['Life Cycle'] = {body="Geomancy Tunic"}
  110.  
  111.  
  112.  
  113. -- Sets to return to when not performing an action.
  114.  
  115. -- Resting sets
  116. sets.resting = {main="Iradal Staff",sub="Achaq Grip"}
  117.  
  118.  
  119. -- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
  120.  
  121. sets.idle.Town = {main="Terra's Staff",sub="Oneiros Grip",range="Dunna",head="Nahtirah Hat",neck="Wiglen Gorget",ear1="Flashward Earring",ear2="Sanare Earring",
  122. body="Artsieq Jubbah",hands="Bagua Mitaines",ring1="Paguroidea Ring",ring2="Sheltered Ring",back="Umbra Cape",waist="Fucho-no-Obi",legs="Assiduity Pants",feet="Geomancy Sandals"}
  123.  
  124. sets.idle.Field = {main="Terra's Staff",sub="Oneiros Grip",range="Dunna",head="Nahtirah Hat",neck="Twilight Torque",ear1="Flashward Earring",ear2="Sanare Earring",
  125. body="Artsieq Jubbah",hands="Geo. Mitaines +1",ring1="Dark Ring",ring2="Dark Ring",back="Lifestream Cape",waist="Isa Belt",legs="Assiduity Pants",feet="Bagua Sandals +1"}
  126.  
  127. -- {main="Terra's Staff",sub="Oneiros Grip",range="Dunna",head="Nahtirah Hat",neck="Wiglen Gorget",ear1="Flashward Earring",ear2="Sanare Earring",
  128. -- body="Artsieq Jubbah",hands="Bagua Mitaines",ring1="Paguroidea Ring",ring2="Sheltered Ring",back="Umbra Cape",waist="Fucho-no-Obi",legs="Nares Trews",feet="Geomancy Sandals"}
  129.  
  130. sets.idle.Field.PDT = {main="Terra's Staff",sub="Oneiros Grip",range="Dunna",head="Nahtirah Hat",neck="Twilight Torque",ear1="Flashward Earring",ear2="Sanare Earring",
  131. body="Artsieq Jubbah",hands="Geo. Mitaines +1",ring1="Dark Ring",ring2="Dark Ring",back="Umbra Cape",waist="Isa Belt",legs="Assiduity Pants",feet="Bagua Sandals +1"}
  132.  
  133. sets.idle.Weak = {main="Terra's Staff",sub="Oneiros Grip",range="Dunna",head="Nahtirah Hat",neck="Twilight Torque",ear1="Flashward Earring",ear2="Sanare Earring",
  134. body="Artsieq Jubbah",hands="Geo. Mitaines +1",ring1="Dark Ring",ring2="Dark Ring",back="Umbra Cape",waist="Isa Belt",legs="Assiduity Pants",feet="Bagua Sandals +1"}
  135.  
  136. -- Defense sets
  137.  
  138. sets.defense.PDT = {main="Earth Staff",sub="Mephitis Grip",range="Dunna",head="Nahtirah Hat",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Novia Earring",
  139. body="Geo. Tunic +1",hands="Geo. Mitaines +1",ring1="Sheltered Ring",ring2="Paguroidea Ring",back="Repulse Mantle",waist="Isa Belt",legs="Geo. Pants +1",feet="Bagua Sandals +1"}
  140.  
  141. sets.defense.MDT = {main="Earth Staff",sub="Mephitis Grip",range="Dunna",head="Nahtirah Hat",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Novia Earring",
  142. body="Geo. Tunic +1",hands="Geo. Mitaines +1",ring1="Sheltered Ring",ring2="Paguroidea Ring",back="Repulse Mantle",waist="Isa Belt",legs="Geo. Pants +1",feet="Bagua Sandals +1"}
  143.  
  144. sets.Kiting = {}
  145.  
  146. -- Engaged sets
  147.  
  148. -- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
  149. -- sets if more refined versions aren't defined.
  150. -- If you create a set with both offense and defense modes, the offense mode should be first.
  151. -- EG: sets.engaged.Dagger.Accuracy.Evasion
  152.  
  153. -- Normal melee group
  154. sets.engaged = {}
  155. end
  156.  
  157. -------------------------------------------------------------------------------------------------------------------
  158. -- Job-specific hooks for standard casting events.
  159. -------------------------------------------------------------------------------------------------------------------
  160.  
  161. function job_aftercast(spell, action, spellMap, eventArgs)
  162. if not spell.interrupted then
  163. if spell.english:startswith('Indi') then
  164. if not classes.CustomIdleGroups:contains('Indi') then
  165. classes.CustomIdleGroups:append('Indi')
  166. end
  167. send_command('@timers d "'..indi_timer..'"')
  168. indi_timer = spell.english
  169. send_command('@timers c "'..indi_timer..'" '..indi_duration..' down spells/00136.png')
  170. elseif spell.english == 'Sleep' or spell.english == 'Sleepga' then
  171. send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 60 down spells/00220.png')
  172. elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
  173. send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 90 down spells/00220.png')
  174. end
  175. elseif not player.indi then
  176. classes.CustomIdleGroups:clear()
  177. end
  178. end
  179.  
  180.  
  181. -------------------------------------------------------------------------------------------------------------------
  182. -- Job-specific hooks for non-casting events.
  183. -------------------------------------------------------------------------------------------------------------------
  184.  
  185. -- Called when a player gains or loses a buff.
  186. -- buff == buff gained or lost
  187. -- gain == true if the buff was gained, false if it was lost.
  188. function job_buff_change(buff, gain)
  189. if player.indi and not classes.CustomIdleGroups:contains('Indi')then
  190. classes.CustomIdleGroups:append('Indi')
  191. handle_equipping_gear(player.status)
  192. elseif classes.CustomIdleGroups:contains('Indi') and not player.indi then
  193. classes.CustomIdleGroups:clear()
  194. handle_equipping_gear(player.status)
  195. end
  196. end
  197.  
  198. function job_state_change(stateField, newValue, oldValue)
  199. if stateField == 'Offense Mode' then
  200. if newValue == 'Normal' then
  201. disable('main','sub','range')
  202. else
  203. enable('main','sub','range')
  204. end
  205. end
  206. end
  207.  
  208. -------------------------------------------------------------------------------------------------------------------
  209. -- User code that supplements standard library decisions.
  210. -------------------------------------------------------------------------------------------------------------------
  211.  
  212. function job_get_spell_map(spell, default_spell_map)
  213. if spell.action_type == 'Magic' then
  214. if spell.skill == 'Enfeebling Magic' then
  215. if spell.type == 'WhiteMagic' then
  216. return 'MndEnfeebles'
  217. else
  218. return 'IntEnfeebles'
  219. end
  220. elseif spell.skill == 'Geomancy' then
  221. if spell.english:startswith('Indi') then
  222. return 'Indi'
  223. end
  224. end
  225. end
  226. end
  227.  
  228. function customize_idle_set(idleSet)
  229. if player.mpp < 51 then
  230. idleSet = set_combine(idleSet, sets.latent_refresh)
  231. end
  232. return idleSet
  233. end
  234.  
  235. -- Called by the 'update' self-command.
  236. function job_update(cmdParams, eventArgs)
  237. classes.CustomIdleGroups:clear()
  238. if player.indi then
  239. classes.CustomIdleGroups:append('Indi')
  240. end
  241. end
  242.  
  243. -- Function to display the current relevant user state when doing an update.
  244. function display_current_job_state(eventArgs)
  245. display_current_caster_state()
  246. eventArgs.handled = true
  247. end
  248.  
  249. function pet_change(pet, gain)
  250. if gain then
  251. equip(sets.idle.Field.PDT)
  252. else
  253. equip(sets.idle.Field)
  254. end
  255. end
  256. -------------------------------------------------------------------------------------------------------------------
  257. -- Utility functions specific to this job.
  258. -------------------------------------------------------------------------------------------------------------------
  259.  
  260. -- Select default macro book on initial load or subjob change.
  261. function select_default_macro_book()
  262. set_macro_page(1, 4)
  263. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement