Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -------------------------------------------------------------------------------------------------------------------
- -- Setup functions for this job. Generally should not be modified.
- -------------------------------------------------------------------------------------------------------------------
- -- Initialization function for this job file.
- function get_sets()
- mote_include_version = 2
- -- Load and initialize the include file.
- include('Mote-Include.lua')
- end
- -- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
- function job_setup()
- indi_timer = ''
- indi_duration = 180
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Job-specific hooks for standard casting events.
- -------------------------------------------------------------------------------------------------------------------
- function job_aftercast(spell, action, spellMap, eventArgs)
- if not spell.interrupted then
- if spell.english:startswith('Indi') then
- if not classes.CustomIdleGroups:contains('Indi') then
- classes.CustomIdleGroups:append('Indi')
- end
- send_command('@timers d "'..indi_timer..'"')
- indi_timer = spell.english
- send_command('@timers c "'..indi_timer..'" '..indi_duration..' down spells/00136.png')
- elseif spell.english == 'Sleep' or spell.english == 'Sleepga' then
- send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 60 down spells/00220.png')
- elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
- send_command('@timers c "'..spell.english..' ['..spell.target.name..']" 90 down spells/00220.png')
- end
- elseif not player.indi then
- classes.CustomIdleGroups:clear()
- end
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Job-specific hooks for non-casting events.
- -------------------------------------------------------------------------------------------------------------------
- -- Called when a player gains or loses a buff.
- -- buff == buff gained or lost
- -- gain == true if the buff was gained, false if it was lost.
- function job_buff_change(buff, gain)
- if player.indi and not classes.CustomIdleGroups:contains('Indi')then
- classes.CustomIdleGroups:append('Indi')
- handle_equipping_gear(player.status)
- elseif classes.CustomIdleGroups:contains('Indi') and not player.indi then
- classes.CustomIdleGroups:clear()
- handle_equipping_gear(player.status)
- end
- end
- function job_state_change(stateField, newValue, oldValue)
- if stateField == 'Offense Mode' then
- if newValue == 'Normal' then
- disable('main','sub','ammo')
- else
- enable('main','sub','ammo')
- end
- end
- end
- -------------------------------------------------------------------------------------------------------------------
- -- User code that supplements standard library decisions.
- -------------------------------------------------------------------------------------------------------------------
- function job_get_spell_map(spell, default_spell_map)
- if spell.action_type == 'Magic' then
- if spell.skill == 'Enfeebling Magic' then
- if spell.type == 'WhiteMagic' then
- return 'MndEnfeebles'
- else
- return 'IntEnfeebles'
- end
- elseif spell.skill == 'Geomancy' then
- if spell.english:startswith('Indi') then
- return 'Indi'
- end
- end
- end
- end
- function customize_idle_set(idleSet)
- if player.mpp < 51 then
- idleSet = set_combine(idleSet, sets.latent_refresh)
- end
- return idleSet
- end
- -- Called by the 'update' self-command.
- function job_update(cmdParams, eventArgs)
- classes.CustomIdleGroups:clear()
- if player.indi then
- classes.CustomIdleGroups:append('Indi')
- end
- end
- -- Function to display the current relevant user state when doing an update.
- function display_current_job_state(eventArgs)
- display_current_caster_state()
- eventArgs.handled = true
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Utility functions specific to this job.
- -------------------------------------------------------------------------------------------------------------------
- -- Select default macro book on initial load or subjob change.
- function select_default_macro_book()
- set_macro_page(1, 6)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement