Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Trigger Macro
- -- Macro 1 -
- -- /console gs c equip HPMin
- -- /console gs c equip HPMax
- -- /console gs c set CureEnmity CureEnmity
- -------------------------------------------------------------------------------------------------------------------
- -- 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()
- -- Map automaton heads to combat roles
- petModes = {
- ['Harlequin Head'] = 'Melee',
- ['Sharpshot Head'] = 'Ranged',
- ['Valoredge Head'] = 'Tank',
- ['Stormwaker Head'] = 'Magic',
- ['Soulsoother Head'] = 'Heal',
- ['Spiritreaver Head'] = 'Nuke'
- }
- -- Subset of modes that use magic
- magicPetModes = S{'Nuke','Heal','Magic'}
- -- Var to track the current pet mode.
- state.PetMode = M{['description']='Pet Mode', 'None', 'Melee', 'Ranged', 'Tank', 'Magic', 'Heal', 'Nuke'}
- -- Var to track Enmity Cure rule
- state.CureEnmity = M{['description']='Cure Enmity', 'None', 'CureEnmity'}
- end
- -------------------------------------------------------------------------------------------------------------------
- -- User setup functions for this job. Recommend that these be overridden in a sidecar file.
- -------------------------------------------------------------------------------------------------------------------
- -- Setup vars that are user-dependent. Can override this function in a sidecar file.
- function user_setup()
- state.OffenseMode:options('Normal', 'Acc', 'Fodder')
- state.HybridMode:options('Normal', 'DT')
- state.WeaponskillMode:options('Normal', 'Acc', 'Fodder')
- state.PhysicalDefenseMode:options('PDT', 'Evasion')
- update_pet_mode()
- end
- -- Define sets used by this job file.
- function init_gear_sets()
- -- Precast Sets
- -- Fast cast sets for spells
- sets.precast.FC = {}
- -- Precast sets to enhance JAs
- sets.precast.JA['Tactical Switch'] = {}
- sets.precast.JA['Repair'] = {}
- sets.precast.JA.Maneuver = {}
- -- Waltz set (chr and vit)
- sets.precast.Waltz = {}
- -- Don't need any special gear for Healing Waltz.
- sets.precast.Waltz['Healing Waltz'] = {}
- -- Pet Cure Set Builds (minus & max HP).
- sets.HPMin = {
- head="Amanita Hairpin", neck="Morgana's Choker", ear1="Influx Earring", ear2="Astral Earring",
- body="Councilor's Garb", hands="Brook Gages", ring1="Serket Ring", ring2="Bifrost Ring",
- legs="Rawhide Trousers", feet="Rostrum Pumps"}
- sets.HPMax = {
- head="Taeon Chapeau", neck="Sanctity Necklace", ear1="Etiolation Earring",
- body="Taeon Tabard", hands="Taeon Gloves", ring1="Kunaji Ring", ring2="Vengeful Ring",
- back="Prodigious Mantle", waist="Steppe Sash", legs="Taeon Tights", feet="Taeon Boots"}
- -- Weaponskill sets
- -- Default set for any weaponskill that isn't any more specifically defined
- sets.precast.WS = {}
- -- Midcast Sets
- sets.midcast.FastRecast = {}
- -- Midcast sets for pet actions
- sets.midcast.Pet.Cure = {}
- sets.midcast.Pet.Cure.Pure = {
- head="Otronif Mask +1", body="Otro. Harness +1", hands="Otronif Gloves +1",
- legs="Otronif Brais +1", feet="Otronif Boots +1"}
- sets.midcast.Pet.Cure.Enmity = {
- head="Karagoz Capello +1", body="Kara. Farsetto +1", hands="Karagoz Guanti +1",
- legs="Kara. Pantaloni +1", feet="Karagoz Scarpe +1"}
- sets.midcast.Pet['Elemental Magic'] = {}
- sets.midcast.Pet.WeaponSkill = {}
- -- Sets to return to when not performing an action.
- -- Resting sets
- sets.resting = {}
- -- Idle sets
- sets.idle = {}
- sets.idle.Town = set_combine(sets.idle, {})
- -- Set for idle while pet is out (eg: pet regen gear)
- sets.idle.Pet = sets.idle
- -- Idle sets to wear while pet is engaged
- sets.idle.Pet.Engaged = {}
- sets.idle.Pet.Engaged.Ranged = set_combine(sets.idle.Pet.Engaged, {})
- sets.idle.Pet.Engaged.Nuke = set_combine(sets.idle.Pet.Engaged, {})
- sets.idle.Pet.Engaged.Magic = set_combine(sets.idle.Pet.Engaged, {})
- -- Defense sets
- sets.defense.Evasion = {}
- sets.defense.PDT = {}
- sets.defense.MDT = {}
- sets.Kiting = {}
- -- Engaged sets
- -- Normal melee group
- sets.engaged = {}
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Job-specific hooks for standard casting events.
- -------------------------------------------------------------------------------------------------------------------
- -- Called when pet is about to perform an action
- function job_pet_midcast(spell, action, spellMap, eventArgs)
- if spell.skill == 'Healing Magic' then
- if state.CureEnmity.value == 'CureEnmity' then
- equip(sets.midcast.Pet.Cure.Enmity)
- else
- equip(sets.midcast.Pet.Cure.Pure)
- end
- state.CureEnmity:reset()
- 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 buff == 'Wind Maneuver' then
- handle_equipping_gear(player.status)
- end
- end
- -- Called when a player gains or loses a pet.
- -- pet == pet gained or lost
- -- gain == true if the pet was gained, false if it was lost.
- function job_pet_change(pet, gain)
- update_pet_mode()
- end
- -- Called when the pet's status changes.
- function job_pet_status_change(newStatus, oldStatus)
- if newStatus == 'Engaged' then
- display_pet_status()
- end
- end
- -------------------------------------------------------------------------------------------------------------------
- -- User code that supplements standard library decisions.
- -------------------------------------------------------------------------------------------------------------------
- -- 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)
- update_pet_mode()
- end
- -- Set eventArgs.handled to true if we don't want the automatic display to be run.
- function display_current_job_state(eventArgs)
- display_pet_status()
- end
- -------------------------------------------------------------------------------------------------------------------
- -- User self-commands.
- -------------------------------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------------------------------
- -- Utility functions specific to this job.
- -------------------------------------------------------------------------------------------------------------------
- -- Get the pet mode value based on the equipped head of the automaton.
- -- Returns nil if pet is not valid.
- function get_pet_mode()
- if pet.isvalid then
- return petModes[pet.head] or 'None'
- else
- return 'None'
- end
- end
- -- Update state.PetMode, as well as functions that use it for set determination.
- function update_pet_mode()
- state.PetMode:set(get_pet_mode())
- update_custom_groups()
- end
- -- Update custom groups based on the current pet.
- function update_custom_groups()
- classes.CustomIdleGroups:clear()
- if pet.isvalid then
- classes.CustomIdleGroups:append(state.PetMode.value)
- end
- end
- -- Display current pet status.
- function display_pet_status()
- if pet.isvalid then
- local petInfoString = pet.name..' ['..pet.head..']: '..tostring(pet.status)..' TP='..tostring(pet.tp)..' HP%='..tostring(pet.hpp)
- if magicPetModes:contains(state.PetMode.value) then
- petInfoString = petInfoString..' MP%='..tostring(pet.mpp)
- end
- add_to_chat(122,petInfoString)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement