Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -------------------------------------------------------------------------------------------------------------------
- -- Initialization function that defines sets and variables to be used.
- -------------------------------------------------------------------------------------------------------------------
- -- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.
- -- 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.
- function job_setup()
- -- state.CombatForm = get_combat_form()
- state.Buff = {}
- end
- -- Setup vars that are user-dependent. Can override this function in a sidecar file.
- function user_setup()
- -- Options: Override default values
- options.OffenseModes = {'Normal', 'Acc', 'Multi'}
- options.DefenseModes = {'Normal', 'PDT', 'Reraise'}
- options.WeaponskillModes = {'Normal', 'Acc', 'Att', 'Mod'}
- options.CastingModes = {'Normal'}
- options.IdleModes = {'Normal'}
- options.RestingModes = {'Normal'}
- options.PhysicalDefenseModes = {'PDT', 'Reraise'}
- options.MagicalDefenseModes = {'MDT'}
- -- Additional local binds
- select_default_macro_book(2, 4)
- end
- -- Called when this job file is unloaded (eg: job change)
- function file_unload()
- if binds_on_unload then
- binds_on_unload()
- end
- end
- -- Define sets and vars used by this job file.
- function init_gear_sets()
- --------------------------------------
- -- Start defining the sets
- --------------------------------------
- -- Precast Sets
- -- Precast sets to enhance JAs
- sets.precast.JA.Angon =
- {
- ammo="Angon",
- }
- sets.precast.JA.Jump =
- {}
- sets.precast.JA['Ancient Circle'] = {}
- sets.precast.JA['High Jump'] =
- {}
- sets.precast.JA['Soul Jump'] =
- {}
- sets.precast.JA['Spirit Jump'] =
- {}
- sets.precast.JA['Super Jump'] =
- {}
- sets.precast.JA['Spirit Link'] =
- {}
- sets.precast.JA['Call Wyvern'] = {}
- sets.precast.JA['Deep Breathing'] = {}
- sets.precast.JA['Spirit Surge'] = {}
- -- Healing Breath sets
- sets.HB = {}
- sets.HB.Pre = {}
- sets.HB.Mid = {}
- -- Waltz set (chr and vit)
- sets.precast.Waltz = {}
- -- Don't need any special gear for Healing Waltz.
- sets.precast.Waltz['Healing Waltz'] = {}
- sets.midcast.Breath =
- set_combine(
- sets.midcast.FastRecast,
- {})
- -- Fast cast sets for spells
- sets.precast.FC = {}
- -- Midcast Sets
- sets.midcast.FastRecast =
- {}
- -- Weaponskill sets
- -- Default set for any weaponskill that isn't any more specifically defined
- sets.precast.WS = {
- ammo="Knobkierrie",
- head="Flam. Zucchetto +2",
- body="Dagon Breast.",
- hands="Sulev. Gauntlets +2",
- legs="Sulev. Cuisses +2",
- feet="Flam. Gambieras +2",
- neck="Fotia Gorget",
- waist="Fotia Belt",
- left_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
- right_ear="Sherida Earring",
- left_ring="Flamma Ring",
- right_ring="Niqmaddu Ring",
- back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},
- }
- -- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
- sets.precast.WS['Stardiver'] = set_combine(sets.precast.WS, {})
- sets.precast.WS['Stardiver'].Acc = set_combine(sets.precast.WS.Acc, {})
- sets.precast.WS['Stardiver'].Mod = set_combine(sets.precast.WS['Stardiver'], {})
- sets.precast.WS['Drakesbane'] = set_combine(sets.precast.WS, {})
- sets.precast.WS['Drakesbane'].Acc = set_combine(sets.precast.WS.Acc, {})
- sets.precast.WS['Drakesbane'].Mod = set_combine(sets.precast.WS['Drakesbane'], {})
- -- Sets to return to when not performing an action.
- -- Resting sets
- sets.resting = {}
- -- Idle sets
- sets.idle =
- {
- ammo="Staunch Tathlum",
- head="Ynglinga Sallet",
- body="Tartarus Platemail",
- hands="Sulev. Gauntlets +2",
- legs={ name="Carmine Cuisses +1", augments={'Accuracy+12','DEX+12','MND+20',}},
- feet={ name="Amm Greaves", augments={'HP+50','VIT+10','Accuracy+15','Damage taken-2%',}},
- neck="Loricate Torque +1",
- waist="Flume Belt",
- left_ear="Infused Earring",
- right_ear="Sherida Earring",
- left_ring="Defending Ring",
- right_ring="Patricius Ring",
- back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},
- }
- -- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
- sets.idle.Town = set_combine(sets.idle, {})
- sets.idle.Field = set_combine(sets.idle, {})
- sets.idle.Weak = set_combine(sets.idle, {})
- -- Defense sets
- sets.defense.PDT =
- {}
- sets.Reraise = {head="Twilight Helm",body="Twilight Mail"}
- sets.defense.Reraise = set_combine(sets.defense.PDT, sets.Reraise)
- sets.defense.MDT = set_combine(sets.defense.PDT, {})
- sets.Kiting = {legs="Carmine Cuisses +1"}
- -- Engaged sets
- -- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
- -- sets if more refined versions aren't defined.
- -- If you create a set with both offense and defense modes, the offense mode should be first.
- -- EG: sets.engaged.Dagger.Accuracy.Evasion
- -- Normal melee group
- sets.engaged =
- {
- ammo="Ginsen",
- head="Flam. Zucchetto +2",
- body="Dagon Breast.",
- hands="Sulev. Gauntlets +2",
- legs="Sulev. Cuisses +2",
- feet="Flam. Gambieras +2",
- neck="Shulmanu Collar",
- waist="Ioskeha Belt +1",
- left_ear="Brutal Earring",
- right_ear="Sherida Earring",
- left_ring="Flamma Ring",
- right_ring="Niqmaddu Ring",
- back={ name="Brigantia's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},
- }
- sets.engaged.Acc = set_combine(sets.engaged, {})
- sets.engaged.Multi = set_combine(sets.engaged, {})
- sets.engaged.Multi.PDT = set_combine(sets.engaged.Multi, {})
- sets.engaged.Multi.Reraise = set_combine(sets.engaged.Multi, {})
- sets.engaged.PDT = set_combine(sets.engaged, {})
- sets.engaged.Acc.PDT = set_combine(sets.engaged.Acc, {})
- sets.engaged.Reraise = set_combine(sets.engaged, {})
- sets.engaged.Acc.Reraise = set_combine(sets.engaged.Acc, {})
- -- Melee sets for in Adoulin, which has an extra 2% Haste from Ionis.
- sets.engaged.Adoulin = set_combine(sets.engaged, {})
- sets.engaged.Adoulin.Acc = set_combine(sets.engaged.Adoulin, {})
- sets.engaged.Adoulin.Multi = set_combine(sets.engaged.Adoulin, {})
- sets.engaged.Adoulin.Multi.PDT = set_combine(sets.engaged.Adoulin.Multi, {})
- sets.engaged.Adoulin.Multi.Reraise = set_combine(sets.engaged.Adoulin.Multi, {})
- sets.engaged.Adoulin.PDT = set_combine(sets.engaged.Adoulin, {})
- sets.engaged.Adoulin.Acc.PDT = set_combine(sets.engaged.Adoulin.Acc, {})
- sets.engaged.Adoulin.Reraise = set_combine(sets.engaged.Adoulin, {})
- sets.engaged.Adoulin.Acc.Reraise = set_combine(sets.engaged.Adoulin.Acc, {})
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Job-specific hooks that are called to process player actions at specific points in time.
- -------------------------------------------------------------------------------------------------------------------
- -- Set eventArgs.handled to true if we don't want any automatic target handling to be done.
- function job_pretarget(spell, action, spellMap, eventArgs)
- end
- -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
- -- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
- function job_precast(spell, action, spellMap, eventArgs)
- if spell.action_type == 'Magic' then
- equip(sets.precast.FC)
- end
- end
- -- Run after the default precast() is done.
- -- eventArgs is the same one used in job_precast, in case information needs to be persisted.
- function job_post_precast(spell, action, spellMap, eventArgs)
- end
- -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
- function job_midcast(spell, action, spellMap, eventArgs)
- if spell.action_type == 'Magic' then
- equip(sets.midcast.FastRecast)
- if player.hpp < 51 then
- classes.CustomClass = "Breath" -- This would cause it to look for sets.midcast.Breath
- end
- end
- end
- -- Run after the default midcast() is done.
- -- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
- function job_post_midcast(spell, action, spellMap, eventArgs)
- -- if state.DefenseMode == 'Reraise' or
- -- (state.Defense.Active and state.Defense.Type == 'Physical' and state.Defense.PhysicalMode == 'Reraise') then
- -- equip(sets.Reraise)
- -- end
- end
- -- Runs when a pet initiates an action.
- -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
- function job_pet_midcast(spell, action, spellMap, eventArgs)
- if spell.english:startswith('Healing Breath') or spell.english == 'Restoring Breath' then
- equip(sets.HB.Mid)
- end
- end
- -- Run after the default pet midcast() is done.
- -- eventArgs is the same one used in job_pet_midcast, in case information needs to be persisted.
- function job_pet_post_midcast(spell, action, spellMap, eventArgs)
- end
- -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
- --function job_aftercast(spell, action, spellMap, eventArgs)
- --if state.DefenseMode == 'Reraise' or
- --(state.Defense.Active and state.Defense.Type == 'Physical' and state.Defense.PhysicalMode == 'Reraise') then
- --end
- --end
- -- Run after the default aftercast() is done.
- -- eventArgs is the same one used in job_aftercast, in case information needs to be persisted.
- function job_post_aftercast(spell, action, spellMap, eventArgs)
- end
- -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
- function job_pet_aftercast(spell, action, spellMap, eventArgs)
- end
- -- Run after the default pet aftercast() is done.
- -- eventArgs is the same one used in job_pet_aftercast, in case information needs to be persisted.
- function job_pet_post_aftercast(spell, action, spellMap, eventArgs)
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Customization hooks for idle and melee sets, after they've been automatically constructed.
- -------------------------------------------------------------------------------------------------------------------
- -- Called before the Include starts constructing melee/idle/resting sets.
- -- Can customize state or custom melee class values at this point.
- -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
- function job_handle_equipping_gear(status, eventArgs)
- end
- -- Return a customized weaponskill mode to use for weaponskill sets.
- -- Don't return anything if you're not overriding the default value.
- function get_custom_wsmode(spell, action, spellMap)
- end
- -- Modify the default idle set after it was constructed.
- function customize_idle_set(idleSet)
- return idleSet
- end
- -- Modify the default melee set after it was constructed.
- function customize_melee_set(meleeSet)
- return meleeSet
- end
- -------------------------------------------------------------------------------------------------------------------
- -- General hooks for other events.
- -------------------------------------------------------------------------------------------------------------------
- -- Called when the player's status changes.
- function job_status_change(newStatus, oldStatus, eventArgs)
- end
- -- Called when the player's pet's status changes.
- function job_pet_status_change(newStatus, oldStatus, eventArgs)
- end
- -- 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)
- end
- function job_update(cmdParams, eventArgs)
- --state.CombatForm = get_combat_form()
- end
- -------------------------------------------------------------------------------------------------------------------
- -- User code that supplements self-commands.
- -------------------------------------------------------------------------------------------------------------------
- -- Called for custom player commands.
- function job_self_command(cmdParams, eventArgs)
- end
- --function get_combat_form()
- -- if areas.Adoulin:contains(world.area) and buffactive.ionis then
- -- return 'Adoulin'
- -- end
- --end
- -- Called by the 'update' self-command, for common needs.
- -- Set eventArgs.handled to true if we don't want automatic equipping of gear.
- function job_update(cmdParams, eventArgs)
- classes.CustomMeleeGroups:clear()
- if areas.Adoulin:contains(world.area) and buffactive.ionis then
- classes.CustomMeleeGroups:append('Adoulin')
- end
- end
- -- Job-specific toggles.
- function job_toggle(field)
- end
- -- Request job-specific mode lists.
- -- Return the list, and the current value for the requested field.
- function job_get_mode_list(field)
- end
- -- Set job-specific mode values.
- -- Return true if we recognize and set the requested field.
- function job_set_mode(field, val)
- end
- -- Handle auto-targetting based on local setup.
- function job_auto_change_target(spell, action, spellMap, eventArgs)
- end
- -- Handle notifications of user state values being changed.
- function job_state_change(stateField, newValue)
- end
- -- Set eventArgs.handled to true if we don't want the automatic display to be run.
- function display_current_job_state(eventArgs)
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Utility functions specific to this job.
- -------------------------------------------------------------------------------------------------------------------
- function select_default_macro_book()
- set_macro_page(2, 4)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement