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
- -- 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()
- -- Default macro set/book
- set_macro_page(1, 6)
- -- Options: Override default values
- options.OffenseModes = {'None', 'Normal'}
- options.DefenseModes = {'Normal'}
- options.WeaponskillModes = {'Normal'}
- options.CastingModes = {'Normal', 'Resistant', 'Dire'}
- options.IdleModes = {'Normal', 'PDT'}
- options.RestingModes = {'Normal'}
- options.PhysicalDefenseModes = {'PDT'}
- options.MagicalDefenseModes = {'MDT'}
- state.Defense.PhysicalMode = 'PDT'
- state.OffenseMode = 'None'
- state.Buff['Afflatus Solace'] = buffactive['afflatus solace'] or false
- --------------------------------------
- -- Start defining the sets
- --------------------------------------
- -- Precast Sets
- -- Fast cast sets for spells
- sets.precast.FC = {main=gear.FastcastStaff,ammo="Incantor Stone",
- head="Nahtirah Hat",neck="Orison Locket",ear2="Loquacious Earring",
- body="Anhur Robe",hands="Gendewitha Gages",ring1="Prolix Ring",
- back="Swith Cape",waist="Witful Belt",legs="Orvail Pants +1",feet="Chelona Boots"}
- sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
- sets.precast.FC['Healing Magic'] = set_combine(sets.precast.FC, {legs="Orison Pantaloons +2"})
- sets.precast.FC.StatusRemoval = sets.precast.FC['Healing Magic']
- sets.precast.FC.Cure = set_combine(sets.precast.FC['Healing Magic'], {main="Tamaxchi",sub="Genbu's Shield",ammo="Impatiens"})
- sets.precast.FC.Curaga = sets.precast.FC.Cure
- sets.precast.BarElement = {main="Beneficus"}
- -- Precast sets to enhance JAs
- sets.precast.JA.Benediction = {body="Piety Briault +1"}
- -- Waltz set (chr and vit)
- sets.precast.Waltz = {
- head="Nahtirah Hat",ear1="Roundel Earring",
- body="Vanir Cotehardie",hands="Yaoyotl Gloves",
- back="Refraction Cape",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
- -- Weaponskill sets
- -- Default set for any weaponskill that isn't any more specifically defined
- gear.default.weaponskill_neck = "Asperity Necklace"
- gear.default.weaponskill_waist = ""
- sets.precast.WS = {
- head="Nahtirah Hat",neck=gear.ElementalGorget,ear1="Bladeborn Earring",ear2="Steelflash Earring",
- body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
- back="Refraction Cape",waist=gear.ElementalBelt,legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
- sets.precast.WS['Flash Nova'] = {
- head="Nahtirah Hat",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Hecate's Earring",
- body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Rajas Ring",ring2="Strendu Ring",
- back="Toro Cape",waist="Thunder Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
- -- Midcast Sets
- sets.midcast.FastRecast = {
- head="Nahtirah Hat",ear2="Loquacious Earring",
- body="Anhur Robe",hands="Gendewitha Gages",ring1="Prolix Ring",
- back="Swith Cape",waist="Goading Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
- -- Cure sets
- gear.default.obi_waist = "Goading Belt"
- gear.default.obi_back = "Swith Cape"
- sets.midcast.CureSolace = {main="Tamaxchi",sub="Genbu's Shield",ammo="Mana Ampulla",
- head="Gendewitha Caubeen",neck="Colossus's Torque",ear1="Orison Earring",ear2="Beatific Earring",
- body="Orison Bliaud +2",hands="Theophany Mitts +1",ring1="Haoma's Ring",ring2="Sirona's Ring",
- back="Pahtli Cape",waist="Pythia Sash +1",legs="Orison Pantaloons +2",feet="Piety Duckbills +1"}
- sets.midcast.Cure = {main="Tamaxchi",sub="Genbu's Shield",ammo="Incantor Stone",
- head="Theophany Cap +1",neck="Colossus's Torque",ear1="Orison Earring",ear2="Loquacious Earring",
- body="Heka's Kalasiris",hands="Theophany Mitts +1",ring1="Prolix Ring",ring2="Sirona's Ring",
- back="Pahtli Cape",waist="Pythia Sash +1",legs="Orison Pantaloons +2",feet="Piety Duckbills +1"}
- sets.midcast.Curaga = {main="Tamaxchi",sub="Genbu's Shield",ammo="Incantor Stone",
- head="Theophany Cap +1",neck="Orison Locket",ear1="Orison Earring",ear2="Loquacious Earring",
- body="Heka's Kalasiris",hands="Theophany Mitts +1",ring1="Prolix Ring",ring2="Sangoma Ring",
- back="Pahtli Cape",waist="Pythia Sash +1",legs="Orison Pantaloons +2",feet="Piety Duckbills +1"}
- sets.midcast.CureMelee = {ammo="Incantor Stone",
- head="Theophany Cap +1",neck="Orison Locket",ear1="Lifestorm Earring",ear2="Loquacious Earring",
- body="Heka's Kalasiris",hands="Theophany Mitts +1",ring1="Prolix Ring",ring2="Sirona's Ring",
- back=gear.ElementalCape,waist=gear.ElementalBelt,legs="Orison Pantaloons +2",feet="Piety Duckbills +1"}
- sets.midcast.Cursna = {main="Beneficus",
- head="Orison Cap +2",neck="Malison Medallion",
- hands="Theophany Mitts +1",ring1="Haoma's Ring",ring2="Haoma's Ring",
- legs="Theophany Pantaloons +1",feet="Gendewitha Galoshes",back="Mending Cape",waist="Witful Belt"}
- sets.midcast.StatusRemoval = {
- head="Orison Cap +2",legs="Orison Pantaloons +2"}
- sets.midcast['Enhancing Magic'] = {main="Beneficus",sub="Genbu's Shield",
- body="Anhur Robe",hands="Dynasty Mitts",neck="Colossus's Torque",
- waist="Olympus Sash",legs="Piety Pantaloons +1",feet="Orison Duckbills +2"}
- sets.midcast.Stoneskin = {
- head="Nahtirah Hat",neck="Orison Locket",ear2="Loquacious Earring",
- body="Anhur Robe",hands="Gendewitha Gages",
- back="Swith Cape",waist="Siegel Sash",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
- sets.midcast.Auspice = {feet="Orison Duckbills +2"}
- sets.midcast.BarElement = {main="Beneficus",sub="Genbu's Shield",
- head="Orison Cap +2",neck="Colossus's Torque",
- body="Orison Bliaud +2",hands="Orison Mitts +2",
- waist="Olympus Sash",legs="Piety Pantaloons +1",feet="Orison Duckbills +2"}
- sets.midcast.Regen = {main="Bolelabunga",
- body="Piety Briault +1",hands="Orison Mitts +2",
- legs="Theophany Pantaloons +1"}
- sets.midcast.Protectra = {ring1="Sheltered Ring",feet="Piety Duckbills +1"}
- sets.midcast.Shellra = {ring1="Sheltered Ring",legs="Piety Pantaloons +1"}
- sets.midcast.Haste = {hands="Dynasty Mitts"}
- sets.midcast['Divine Magic'] = {main="Venabulum",sub="Mephitis Grip",
- head="Nahtirah Hat",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
- body="Gendewitha Bliaut",hands="Lurid Mitts",ring2="Sangoma Ring",
- back=gear.ElementalCape,waist=gear.ElementalBelt,legs="Theophany Pantaloons +1",feet="Orison Duckbills +2"}
- sets.midcast['Dark Magic'] = {main="Venabulum", sub="Mephitis Grip",
- head="Nahtirah Hat",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
- body="Gendewitha Bliaut",hands="Lurid Mitts",ring1="Strendu Ring",ring2="Sangoma Ring",
- back="Refraction Cape",waist="Demonry Sash",legs="Bokwus Slops",feet="Bokwus Boots"}
- --sets.midcast.Stun = set_combine(sets.midcast.Dark Magic, {main=gear.RecastStaff})
- -- Custom spell classes
- sets.midcast.MndEnfeebles = {main="Venabulum", sub="Mephitis Grip",
- head="Nahtirah Hat",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
- body="Gendewitha Bliaut",hands="Lurid Mitts",ring1="Strendu Ring",ring2="Sangoma Ring",
- back="Refraction Cape",waist="Demonry Sash",legs="Orvail Pants +1",feet="Theophany Duckbills +1"}
- sets.midcast.IntEnfeebles = {main="Venabulum", sub="Mephitis Grip",
- head="Nahtirah Hat",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
- body="Gendewitha Blaut",hands="Lurid Mitts",ring1="Strendu Ring",ring2="Sangoma Ring",
- back="Refraction Cape",waist="Demonry Sash",legs="Orvail Pants +1",feet="Theophany Duckbills +1"}
- -- Sets to return to when not performing an action.
- -- Resting sets
- sets.resting = {main=gear.Staff.HMP,
- head="Nefer Khat",
- body="Heka's Kalasiris",hands="Serpentes Cuffs",
- waist="Austerity Belt",legs="Nares Trews",feet="Chelona Boots",ammo="Mana Ampulla"}
- -- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
- sets.idle = {main="Bolelabunga", sub="Genbu's Shield",ammo="Incantor Stone",
- head="Nefer Khat",neck="Twilight Torque",ear1="Gifted Earring",ear2="Loquacious Earring",
- body="Heka's Kalasiris",hands="Serpentes Cuffs",ring1="Paguroidea Ring",ring2="Defending Ring",
- back="Umbra Cape",waist="Fucho-no-Obi",legs="Nares Trews",feet="Serpentes Sabots"}
- sets.idle.PDT = {main="Terra's Staff", sub="Oneiros Grip",ammo="Incantor Stone",
- head="Gendewitha Caubeen",neck="Twilight Torque",ear1="Gifted Earring",ear2="Loquacious Earring",
- body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1="Dark Ring",ring2="Defending Ring",
- back="Umbra Cape",waist="Slipor Sash",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
- sets.idle.Town = {main="Bolelabunga", sub="Genbu's Shield",ammo="Impatiens",
- head="Theophany Cap +1",neck="Colossus's Torque",ear1="Gifted Earring",ear2="Loquacious Earring",
- body="Piety Briault +1",hands="Theophany Mitts +1",ring1="Haoma's Ring",ring2="Defending Ring",
- back="Umbra Cape",waist="Pythia Sash +1",legs="Piety Pantaloons +1",feet="Piety Duckbills +1"}
- sets.idle.Weak = {main="Bolelabunga",sub="Genbu's Shield",ammo="Incantor Stone",
- head="Nefer Khat",neck="Twilight Torque",ear1="Gifted Earring",ear2="Loquacious Earring",
- body="Heka's Kalasiris",hands="Serpentes Cuffs",ring1="Sangoma Ring",ring2="Defending Ring",
- back="Umbra Cape",waist="Fucho-no-Obi",legs="Nares Trews",feet="Serpentes Sabots"}
- -- Defense sets
- sets.defense.PDT = {main="Terra's Staff",sub="Oneiros Grip",
- head="Gendewitha Caubeen",neck="Twilight Torque",
- body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1="Dark Ring",ring2="Defending Ring",
- back="Umbra Cape",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
- sets.defense.MDT = {main="Terra's Staff",sub="Oneiros Grip",
- head="Theophany Cap +1",neck="Twilight Torque",
- body="Piety Briault +1",hands="Dynasty Mitts",ring1="Dark Ring",ring2="Defending Ring",
- waist="Slipor Sash",legs="Theophany Pantaloons +1",feet="Theophany Duckbills +1",ear1="Sanare Earring",
- ear2="Mujin Stud"}
- sets.Kiting = {feet="Herald's Gaiters"}
- -- 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
- -- Basic set for if no TP weapon is defined.
- sets.engaged = {
- head="Theophany Cap +1",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
- body="Piety Briault +1",hands="Dynasty Mitts",ring1="Rajas Ring",ring2="K'ayres Ring",
- back="Umbra Cape",waist="Goading Belt",legs="Piety Pantaloons +1",feet="Piety Duckbills +1"}
- -- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
- sets.buff['Divine Caress'] = {hands="Orison Mitts +2"}
- 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)
- classes.CustomClass = get_spell_class(spell, action, spellMap)
- if spell.english == "Paralyna" and buffactive.Paralyzed then
- -- no gear swaps if we're paralyzed, to avoid blinking while trying to remove it.
- eventArgs.handled = true
- end
- if spell.skill == 'Healing Magic' then
- gear.default.obi_back = "Refraction Cape"
- else
- gear.default.obi_back = "Toro Cape"
- 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
- -- Default base equipment layer of fast recast.
- equip(sets.midcast.FastRecast)
- end
- end
- function job_post_midcast(spell, action, spellMap, eventArgs)
- -- Apply Divine Caress boosting items as highest priority over other gear, if applicable.
- if spellMap == 'StatusRemoval' and buffactive['Divine Caress'] then
- equip(sets.buff['Divine Caress'])
- end
- end
- -- Return true if we handled the aftercast work. Otherwise it will fall back
- -- to the general aftercast() code in Mote-Include.
- function job_aftercast(spell, action, spellMap, eventArgs)
- if not spell.interrupted then
- if state.Buff[spell.name] ~= nil then
- state.Buff[spell.name] = true
- elseif spell.name == "Afflatus Misery" then
- state.Buff['Afflatus Solace'] = false
- end
- end
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Customization hooks for idle and melee sets, after they've been automatically constructed.
- -------------------------------------------------------------------------------------------------------------------
- -- 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.english == "Paralyna" and buffactive.Paralyzed then
- -- no gear swaps if we're paralyzed, to avoid blinking while trying to remove it.
- eventArgs.handled = true
- end
- if spell.skill == 'Healing Magic' then
- gear.default.obi_back = "Mending Cape"
- else
- gear.default.obi_back = "Toro Cape"
- 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
- -- Default base equipment layer of fast recast.
- equip(sets.midcast.FastRecast)
- end
- end
- function job_post_midcast(spell, action, spellMap, eventArgs)
- -- Apply Divine Caress boosting items as highest priority over other gear, if applicable.
- if spellMap == 'StatusRemoval' and buffactive['Divine Caress'] then
- equip(sets.buff['Divine Caress'])
- end
- end
- -- Return true if we handled the aftercast work. Otherwise it will fall back
- -- to the general aftercast() code in Mote-Include.
- function job_aftercast(spell, action, spellMap, eventArgs)
- if not spell.interrupted then
- if state.Buff[spell.name] ~= nil then
- state.Buff[spell.name] = true
- elseif spell.name == "Afflatus Misery" then
- state.Buff['Afflatus Solace'] = false
- end
- end
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Customization hooks for idle and melee sets, after they've been automatically constructed.
- -------------------------------------------------------------------------------------------------------------------
- -- Custom spell mapping.
- function job_get_spell_map(spell, default_spell_map)
- if spell.action_type == 'Magic' then
- if (default_spell_map == 'Cure' or default_spell_map == 'Curaga') and player.status == 'Engaged' then
- return "CureMelee"
- elseif default_spell_map == 'Cure' and state.Buff['Afflatus Solace'] then
- return "CureSolace"
- elseif spell.skill == "Enfeebling Magic" then
- if spell.type == "WhiteMagic" then
- return "MndEnfeebles"
- else
- return "IntEnfeebles"
- end
- end
- end
- end
- -------------------------------------------------------------------------------------------------------------------
- -- General hooks for other 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 state.Buff[buff] ~= nil then
- state.Buff[buff] = gain
- end
- end
- -------------------------------------------------------------------------------------------------------------------
- -- User code that supplements self-commands.
- -------------------------------------------------------------------------------------------------------------------
- -- Called by the 'update' self-command.
- function job_update(cmdParams, eventArgs)
- if cmdParams[1] == 'user' and not areas.Cities:contains(world.area) then
- local needsArts =
- player.sub_job:lower() == 'sch' and
- not buffactive['Light Arts'] and
- not buffactive['Addendum: White'] and
- not buffactive['Dark Arts'] and
- not buffactive['Addendum: Black']
- if not buffactive['Afflatus Solace'] and not buffactive['Afflatus Misery'] then
- if needsArts then
- send_command('@input /ja "Afflatus Solace" <me>;wait 1.2;input /ja "Light Arts" <me>')
- else
- send_command('@input /ja "Afflatus Solace" <me>')
- end
- end
- end
- end
- -- Handle notifications of general user state change.
- function job_state_change(stateField, newValue, oldValue)
- if stateField == 'OffenseMode' then
- if newValue == 'Normal' then
- disable('main','sub')
- else
- enable('main','sub')
- end
- elseif stateField == 'Reset' then
- if state.OffenseMode == 'None' then
- enable('main','sub')
- end
- end
- end
- -- Function to display the current relevant user state when doing an update.
- -- Return true if display was handled, and you don't want the default info shown.
- function display_current_job_state(eventArgs)
- local defenseString = ''
- if state.Defense.Active then
- local defMode = state.Defense.PhysicalMode
- if state.Defense.Type == 'Magical' then
- defMode = state.Defense.MagicalMode
- end
- defenseString = 'Defense: '..state.Defense.Type..' '..defMode..', '
- end
- local meleeString = ''
- if state.OffenseMode == 'Normal' then
- meleeString = 'Melee: Weapons locked, '
- end
- add_to_chat(122,'Casting ['..state.CastingMode..'], '..meleeString..'Idle ['..state.IdleMode..'], '..defenseString..
- 'Kiting: '..on_off_names[state.Kiting])
- eventArgs.handled = true
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Utility functions specific to this job.
- -------------------------------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement