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.
- mote_include_version = 2
- 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
- function user_setup()
- -- Default macro set/book
- set_macro_page(2, 2)
- 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['Familiar'] = {}
- sets.precast.JA['Reward'] = {ammo="Pet Food Theta",head="Brave's Warbonnet",
- ear1="Ferine Earring",body="Tot. Jackcoat +1",
- legs="Totemic Trousers",feet="Ankusa Gaiters"}
- sets.precast.JA['Call Beast'] = {hands="Ankusa Gloves"}
- sets.precast.JA['Charm'] = {head="Monster Helm",
- body="Ankusa Jackcoat",hands="Ankusa Gloves",
- waist="Aristo Belt",legs="Totemic Trousers",feet="Ankusa Gaiters"}
- -- Waltz set (chr and vit)
- sets.precast.Waltz = {
- head="Otomi Helm",neck="Ferine Necklace",body="Tot. Jackcoat +1",hands="Tot. Gloves +1",ring2="Askelpian Ring",
- feet="Ejekamal Boots"}
- -- Don't need any special gear for Healing Waltz.
- sets.precast.Waltz['Healing Waltz'] = {}
- sets.precast.JA['Feral Howl'] = {body="Ankusa Jackcoat"}
- sets.precast.JA['Spur'] = {feet="Ferine Ocreae +2"}
- -- Weaponskill sets
- -- Default set for any weaponskill that isn't any more specifically defined
- sets.precast.WS = {
- head="Otomi Helm",neck="Aqua Gorget",ear1="Kuwunga Earring",ear2="Dudgeon Earring",ammo="Cheruski Needle",
- body="Phorcys Korazin",hands="Miki. Gauntlets",ring1="Rajas Ring",ring2="Vehemence Ring",
- back="Atheling Mantle",waist="Snow Belt",legs="Outrider Hose",feet="Ejekamal Boots"}
- sets.midcast.Pet.WS = {
- ammo="Demonry Core",
- neck="Ferine Necklace",
- back="Pastoralist's Mantle",
- ear1="Sabong Earring",
- ear2="Ferine Earring"}
- -- Sets to return to when not performing an action.
- -- Resting sets
- sets.resting = set_combine(sets.idle, {head="Twilight Helm"})
- -- Idle sets
- sets.idle = {
- head="Otomi Helm",neck="Asperity Necklace",ear1="Steelflash Earring",ear2="Bladeborn Earring",ammo="Paeapua",
- body="Xaddi Mail",hands="Miki. Gauntlets",ring1="Rajas Ring",ring2="Epona's Ring",
- back="Pastoralist's Mantle",waist="Hurch'lan Sash",legs="Xaddi Cuisses",feet="Ejekamal Boots"}
- sets.idle.Reraise = set_combine(sets.idle, {head="Twilight Helm",body="Twilight Mail"})
- -- Defense sets
- sets.defense.PDT = {}
- sets.defense.MDT = {}
- sets.Kiting = {}
- -- 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.PetPlayerEngaged = {
- neck="Ferine Necklace",
- back="Pastoralist's Mantle"}
- sets.engaged.PetEngaged = {
- ammo="Demonry Core",
- neck="Ferine Necklace",
- back="Pastoralist's Mantle",
- head="Anwig Salade",
- ear1="Sabong Earring",
- ear2="Ferine Earring",
- body="Ankusa Jackcoat",
- hands="Tot. Gloves +1",
- legs="Totemic Trousers",
- feet="Totemic Gaiters"
- back="Pastoralist's Mantle"}
- sets.engaged = {
- head="Otomi Helm",neck="Asperity Necklace",ear1="Steelflash Earring",ear2="Bladeborn Earring",ammo="Paeapua",
- body="Xaddi Mail",hands="Miki. Gauntlets",ring2="Oneiros Ring",ring1="Epona's Ring",
- back="Atheling Mantle",waist="Hurch'lan Sash",legs="Xaddi Cuisses",feet="Ejekamal Boots"}
- if buffactive["Doom"] then
- equip(sets.idle, {head="Twilight Helm",body="Twilight Mail"})
- end
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Job-specific hooks that are called to process player actions at specific points in time.
- -------------------------------------------------------------------------------------------------------------------
- function job_pet_midcast(spell, action, spellMap, eventArgs)
- classes.CustomClass = "WS"
- 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 spell.english == 'Fight' and not spell.interrupted then
- display_pet_status('Engaged')
- end
- end
- -- Called when the pet's status changes.
- function job_pet_status_change(newStatus, oldStatus)
- adjust_gear_sets_for_pet()
- 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_gear_sets_for_pet()
- end
- -- Set eventArgs.handled to true if we don't want the automatic display to be run.
- 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
- add_to_chat(122,'Melee: '..state.OffenseMode..'/'..state.DefenseMode..', WS: '..state.WeaponskillMode..', '..defenseString..
- 'Kiting: '..on_off_names[state.Kiting])
- display_pet_status()
- eventArgs.handled = true
- end
- function adjust_gear_sets_for_pet()
- classes.CustomIdleGroups:clear()
- classes.CustomMeleeGroups:clear()
- -- If the pet is engaged, adjust potential idle and melee groups.
- if pet.isvalid and pet.status == 'Engaged' and player.in_combat then
- classes.CustomIdleGroups:append('PetPlayerEngaged')
- elseif pet.isvalid and pet.status == 'Engaged' and not player.in_combat then
- classes.CustomIdleGroups:append('PetEngaged')
- elseif pet.isvalid and pet.status == 'Idle' and player.in_combat then
- classes.CustomIdleGroups:append('Engaged')
- end
- end
- function display_pet_status(withStatus)
- if pet.isvalid then
- local petInfoString = pet.name..': '
- if withStatus then
- petInfoString = petInfoString..withStatus
- else
- petInfoString = petInfoString..tostring(pet.status)
- end
- petInfoString = petInfoString..' TP='..tostring(pet.tp)..' HP%='..tostring(pet.hpp)
- add_to_chat(122,petInfoString)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment