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()
- -- Load and initialize the include file.
- include('Mote-Include.lua')
- end
- -- Setup vars that are user-independent.
- function job_setup()
- --state.Buff['Aftermath'] = buffactive['Aftermath: Lv.1'] or
- --buffactive['Aftermath: Lv.2'] or
- --buffactive['Aftermath: Lv.3']
- --or false
- state.Buff['Souleater'] = buffactive['Souleater'] or false
- determine_haste_group()
- 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'}
- state.Defense.PhysicalMode = 'PDT'
- --adjust_engaged_sets()
- -- Additional local binds
- send_command('bind ^` input /ja "Hasso" <me>')
- send_command('bind !` input /ja "Seigan" <me>')
- select_default_macro_book()
- end
- -- Called when this job file is unloaded (eg: job change)
- function file_unload()
- if binds_on_unload then
- binds_on_unload()
- end
- send_command('unbind ^`')
- send_command('unbind !-')
- 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['Diabolic Eye'] = {}
- sets.precast.JA['Arcane Circle'] = {}
- sets.precast.JA['Nether Void'] = {}
- sets.precast.JA['Souleater'] = {}
- -- Waltz set (chr and vit)
- sets.precast.Waltz = {}
- -- Don't need any special gear for Healing Waltz.
- sets.precast.Waltz['Healing Waltz'] = {}
- -- Fast cast sets for spells
- sets.precast.FC = { head={ name="Carmine Mask +1", augments={'Accuracy+12','DEX+12','MND+20',}},
- hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
- legs="Arjuna Breeches",
- feet="Flam. Gambieras +2",
- neck="Baetyl Pendant",
- left_ear="Loquac. Earring",
- right_ear="Etiolation Earring",
- left_ring="Patricius Ring",
- right_ring="Kishar Ring",
- }
- -- Midcast Sets
- sets.midcast.FastRecast = {
- head={ name="Carmine Mask +1", augments={'Accuracy+12','DEX+12','MND+20',}},
- hands={ name="Leyline Gloves", augments={'Accuracy+15','Mag. Acc.+15','"Mag.Atk.Bns."+15','"Fast Cast"+3',}},
- legs="Arjuna Breeches",
- feet="Flam. Gambieras +2",
- neck="Baetyl Pendant",
- left_ear="Loquac. Earring",
- right_ear="Etiolation Earring",
- left_ring="Patricius Ring",
- right_ring="Kishar Ring",
- }
- -- Specific spells
- sets.midcast.Utsusemi = {}
- sets.midcast.DarkMagic = {}
- sets.midcast.EnfeeblingMagic = set_combine(sets.midcast.DarkMagic, {})
- sets.midcast['Dread Spikes'] = {}
- sets.midcast.Stun = set_combine(sets.midcast.DarkMagic, {})
- sets.midcast.Drain = sets.midcast.DarkMagic
- sets.midcast.Aspir = sets.midcast.Drain
- -- 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="Brutal Earring",
- right_ear="Suppanomimi",
- left_ring="Regal Ring",
- right_ring="Niqmaddu Ring",
- back="Agema Cape",}
- -- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
- sets.precast.WS['Catastrophe'] = set_combine(sets.precast.WS, {})
- sets.precast.WS['Catastrophe'].Acc = set_combine(sets.precast.WS.Acc, {})
- sets.precast.WS['Catastrophe'].Mod = set_combine(sets.precast.WS['Catastrophe'], {})
- sets.precast.WS['Entropy'] = set_combine(sets.precast.WS, {})
- sets.precast.WS['Entropy'].Acc = set_combine(sets.precast.WS.Acc, {})
- sets.precast.WS['Entropy'].Mod = set_combine(sets.precast.WS['Entropy'], {})
- sets.precast.WS['Resolution'] = set_combine(sets.precast.WS, {})
- sets.precast.WS['Resolution'].Acc = set_combine(sets.precast.WS.Acc, {})
- sets.precast.WS['Resolution'].Mod = set_combine(sets.precast.WS['Resolution'], {})
- -- Sets to return to when not performing an action.
- -- Resting sets
- sets.resting = {}
- -- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
- sets.idle.Town = {legs="Carmine Cuisses +1"}
- sets.idle.Field = {legs="Carmine Cuisses +1"}
- sets.idle.Weak = {}
- -- Defense sets
- sets.defense.PDT = {}
- sets.defense.Reraise = {}
- sets.defense.MDT = {}
- sets.Kiting = {}
- sets.Reraise = {}
- -- Engaged sets
- sets.engaged = {
- ammo="Ginsen",
- head="Flam. Zucchetto +2",
- body="Dagon Breast.",
- hands="Sulev. Gauntlets +2",
- legs="Sulev. Cuisses +2",
- feet="Flam. Gambieras +2",
- neck="Combatant's Torque",
- waist="Ioskeha Belt +1",
- left_ear="Brutal Earring",
- right_ear="Suppanomimi",
- left_ring="Flamma Ring",
- right_ring="Niqmaddu Ring",
- back="Agema Cape",}
- sets.engaged.Acc = set_combine(sets.engaged, {})
- sets.engaged.Multi = set_combine(sets.engaged, {})
- sets.engaged.Reraise = set_combine(sets.engaged, {})
- sets.engaged.HighHaste = set_combine(sets.engaged.Multi, {})
- sets.engaged.MaxHaste = sets.engaged.HighHaste
- sets.engaged.EmbravaHaste = sets.engaged.HighHaste
- -- 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.Apocalypse = {}
- --sets.engaged.Apocalypse.Acc = {}
- --sets.engaged.Apocalypse.AM = {}
- --sets.engaged.Apocalypse.Multi = {}
- --sets.engaged.Apocalypse.Multi.PDT = {}
- --sets.engaged.Apocalypse.Multi.Reraise = {}
- --sets.engaged.Apocalypse.PDT = {}
- --sets.engaged.Apocalypse.Acc.PDT = {}
- --sets.engaged.Apocalypse.Reraise = {}
- --sets.engaged.Apocalypse.Acc.Reraise = {}
- -- Custom Melee Group
- --sets.engaged['Anahera Scythe'] = {}
- --sets.engaged['Anahera Scythe'].Acc = set_combine(sets.engaged['Anahera Scythe'], {})
- --sets.engaged['Senbaak Nagan'].Multi = set_combine(sets.engaged['Anahera Scythe'], {})
- --sets.engaged['Anahera Scythe'].Multi.PDT = set_combine(sets.engaged['Anahera Scythe'].Multi, {})
- --sets.engaged['Anahera Scythe'].Multi.Reraise = set_combine(sets.engaged['Anahera Scythe'].Multi, {})
- --sets.engaged['Anahera Scythe'].PDT = set_combine(sets.engaged['Anahera Scythe'], {})
- --sets.engaged['Anahera Scythe'].Acc.PDT = set_combine(sets.engaged['Anahera Scythe'].PDT, {})
- --sets.engaged['Anahera Scythe'].Acc.Reraise = set_combine(sets.engaged['Anahera Scythe'].Acc, {})
- --sets.engaged['Anahera Scythe'].MaxHaste = set_combine(sets.engaged['Anahera Scythe'].Multi, {})
- --sets.engaged['Anahera Scythe'].EmbravaHaste = sets.engaged['Anahera Scythe'].MaxHaste
- --sets.engaged['Anahera Scythe'].HighHaste = sets.engaged['Anahera Scythe'].MaxHaste
- sets.buff.Souleater = {}
- 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 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
- -- 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)
- 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
- -- 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 not spell.interrupted then
- -- if state.Buff[spell.english] ~= nil then
- -- state.Buff[spell.english] = true
- -- end
- -- end
- -- end
- -------------------------------------------------------------------------------------------------------------------
- -- Customization hooks for idle and melee sets, after they've been automatically constructed.
- -------------------------------------------------------------------------------------------------------------------
- -- Modify the default idle set after it was constructed.
- function customize_idle_set(idleSet)
- if state.Buff.Souleater then
- idleSet = set_combine(idleSet, sets.buff.Souleater)
- end
- return idleSet
- end
- -- Modify the default melee set after it was constructed.
- function customize_melee_set(meleeSet)
- if state.Buff.Souleater then
- meleeSet = set_combine(meleeSet, sets.buff.Souleater)
- end
- 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 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 S{'haste','march','embrava','haste samba'}:contains(buff:lower()) then
- determine_haste_group()
- handle_equipping_gear(player.status)
- -- elseif buff:startswith('Aftermath') then
- -- state.Buff.Aftermath = gain
- -- adjust_melee_groups()
- -- handle_equipping_gear(player.status)
- elseif state.Buff[buff] ~= nil then
- state.Buff[buff] = gain
- handle_equipping_gear(player.status)
- end
- end
- -------------------------------------------------------------------------------------------------------------------
- -- User code that supplements self-commands.
- -------------------------------------------------------------------------------------------------------------------
- -- 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)
- --adjust_engaged_sets()
- determine_haste_group()
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Utility functions specific to this job.
- -------------------------------------------------------------------------------------------------------------------
- --function adjust_engaged_sets()
- -- state.CombatWeapon = player.equipment.main
- -- adjust_melee_groups()
- --end
- --function adjust_melee_groups()
- -- classes.CustomMeleeGroups:clear()
- -- if state.Buff.Aftermath then
- -- classes.CustomMeleeGroups:append('AM')
- -- end
- --end
- function determine_haste_group()
- -- This section only applies to LR being up
- --
- -- 1) uncapped delay reduction: 26% gear haste + LR's 25% JA haste
- -- 2) HighHaste - Marches: 16% gear haste with march+3, 14% with march+4, 12% with march+5
- -- 3) EmbravaHaste - embrava: 21% gear haste if sch is naked alt, 17% if it's capped potency
- -- 4) MaxHaste - capped magic haste: 12% gear haste
- classes.CustomMeleeGroups:clear()
- if buffactive.embrava and (buffactive.march == 2 or (buffactive.march and buffactive.haste)) then
- classes.CustomMeleeGroups:append('MaxHaste')
- elseif buffactive.march == 2 and buffactive.haste then
- classes.CustomMeleeGroups:append('MaxHaste')
- elseif buffactive.embrava and (buffactive.haste or buffactive.march) then
- classes.CustomMeleeGroups:append('EmbravaHaste')
- elseif buffactive.march == 1 and buffactive.haste and buffactive['haste samba'] then
- classes.CustomMeleeGroups:append('HighHaste')
- elseif buffactive.march == 1 and buffactive['Last Resort'] then
- classes.CustomMeleeGroups:append('HighHaste')
- end
- end
- function select_default_macro_book()
- -- Default macro set/book
- if player.sub_job == 'DNC' then
- set_macro_page(6, 2)
- elseif player.sub_job == 'SAM' then
- set_macro_page(6, 4)
- else
- set_macro_page(6, 2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement