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
- function job_setup()
- -- List of pet weaponskills to check for
- petWeaponskills = S{"Sic", "Ready", "Magic Mortar",
- "Chimera Ripper", "String Clipper", "Cannibal Blade", "Bone Crusher", "String Shredder",
- "Arcuballista", "Daze", "Armor Piercer", "Armor Shatterer"}
- 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'}
- options.DefenseModes = {'Normal', 'DT'}
- options.WeaponskillModes = {'Normal', 'Att', 'Mod'}
- options.IdleModes = {'Normal'}
- options.RestingModes = {'Normal'}
- options.PhysicalDefenseModes = {'PDT', 'Evasion'}
- options.MagicalDefenseModes = {'MDT'}
- state.Defense.PhysicalMode = 'PDT'
- 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 used by this job file.
- function init_gear_sets()
- -- Precast Sets
- -- Fast cast sets for spells
- sets.precast.FC = {head="Otomi Helm", neck="Jeweled Collar", ear1="Ethereal Earring", ear2="Loquacious Earring",body="Mirke Wardecors",
- hands="Buremte Gloves", ring1="Prolix Ring", ring2="Dark Ring", back="Boxer's Mantle", waist="Phasmida Belt", legs="Iuitl Tights",
- feet="Iuitl Gaiters"}
- sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {neck="Magoraga Beads",back="Mujin Mantle"})
- -- Precast sets to enhance JAs
- sets.precast.JA['Reward'] = {head="Khimaira Bonnet",ear2="Ferine Earring",body="Totemic Jackcoat",legs="Ankusa Trousers",feet="Ankusa Gaiters"}
- sets.precast.JA['Familiar'] = {hands="Ankusa Gloves",legs="Ankusa Trousers"}
- sets.precast.JA['Call Beast'] = {hands="Ankusa Gloves",legs="Ankusa Trousers"}
- sets.precast.JA['Ready'] = {hands="Frn. Manoplas +1"}
- sets.precast.JA['Sic'] = {hands="Frn. Manoplas +1"}
- sets.precast.JA['Tame'] = {head="Totemic Helm"}
- sets.precast.JA['Spur'] = {feet="Ferine Ocreae +1"}
- sets.precast.JA['Charm'] = {head="Ankusa Helm",neck="Ferine Necklace",body="Totemic Jackcoat",hands="Ankusa Gloves",legs="Totemic Trousers",
- feet="Ankusa Gaiters"}
- sets.precast.Sic = {hands="Frn. Manoplas +1"}
- -- Weaponskill sets
- -- Default set for any weaponskill that isn't any more specifically defined
- sets.precast.WS = {
- head="Otomi Helm",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
- body="Karieyh Haubert +1",hands="Buremite Gloves",ring1="Rajas Ring",ring2="Epona's Ring",
- back="Atheling Mantle",waist="Windbuffet Belt",legs="Ankusa Trousers",feet="Ejekamal Boots"}
- sets.precast.WS['Rampage'] = {
- head="Otomi Helm",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
- body="Karieyh Haubert +1",hands="Buremite Gloves",ring1="Rajas Ring",ring2="Epona's Ring",
- back="Atheling Mantle",waist="Windbuffet Belt",legs="Ankusa Trousers",feet="Ejekamal Boots"}
- -- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
- -- Midcast Sets
- sets.midcast.FastRecast = {head="Haruspex Hat",ear2="Loquacious Earring",body="Otronif Harness",
- hands="Regimen Mittens",waist="Twilight Belt",legs="Manibozho Brais",feet="Otronif Boots +1"}
- -- Midcast sets for pet actions
- sets.midcast.Pet.Weaponskill = {head="Empty"}
- -- Sets to return to when not performing an action.
- -- Resting sets
- sets.resting = {head="Ocelomeh Headpiece +1",ring1="Sheltered Ring",ring2="Paguroidea Ring"}
- -- Idle sets
- sets.idle = {ammo="Brigantia Pebble",head="Otomi Helm",neck="Twilight Torque",
- ear1="Phawaylla Earring",ear2="Ethereal Earring",body="Mekira Meikogai",hands="Buremte Gloves",ring1="Dark Ring",ring2="Dark Ring",back="Boxer's Mantle",waist="Nierenschutz",legs="Iuitl Tights",feet="Ejekamal Boots"}
- sets.idle.Town = set_combine(sets.idle, {main="Emxgha"})
- -- Set for idle while pet is out (eg: pet regen gear)
- sets.idle.Pet = {head="Anwig Salade",neck="Twilight Torque",ear1="Phawaylla Earring",
- ear2="Ethereal Earring",body="Mekira Meikogai",hands="Ankusa Gloves",back="Boxer's Mantle",
- waist="Nierenschutz",legs="Iuitl Tights",feet="Ankusa Gaiters"}
- -- Idle sets to wear while pet is engaged
- sets.idle.Pet.Engaged = {head="Anwig Salade",neck="Ferine Necklace",ear1="Sabong Earring",
- ear2="Ferine Earring",body="Ankusa Jackcoat",hands="Totemic Gloves",ring1="Dark Ring",
- ring2="Dark Ring",back="Pastoralist's Mantle",waist="Kuku Stone",legs="Ankusa Trousers",
- feet="Totemic Gaiters"}
- -- Defense sets
- sets.defense.Evasion = {
- head="Whirlpool Mask",neck="Twilight Torque",body="Otronif Harness",hands="Otronif Gloves",
- ring1="Beeline Ring",ring2="Dark Ring",back="Ik Cape",waist="Hurch'lan Sash",
- legs="Nahtirah Trousers",feet="Otronif Boots +1"}
- sets.defense.PDT = {head="Whirlpool Mask",neck="Twilight Torque",body="Otronif Harness",
- hands="Otronif Gloves",ring1="Beeline Ring",ring2="Dark Ring",back="Shadow Mantle",
- waist="Hurch'lan Sash",legs="Nahtirah Trousers",feet="Otronif Boots +1"}
- sets.defense.MDT = {head="Whirlpool Mask",neck="Twilight Torque",body="Otronif Harness",
- hands="Otronif Gloves",ring1="Dark Ring",ring2="Shadow Ring",back="Tuilha Cape",
- waist="Hurch'lan Sash",legs="Nahtirah Trousers",feet="Otronif Boots +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="Jukukik Feather",head="Otomi Helm",neck="Asperity Necklace",ear1="Suppanomimi",
- ear2="Brutal Earring",body="Karieyh Haubert +1",hands="Buremte Gloves",ring1="Epona's Ring",
- ring2="Rajas Ring",back="Atheling Mantle",waist="Patentia Sash",legs="Iuitl Tights",
- feet="Ejekamal Boots"}
- sets.engaged.Pet = {ammo="Demonry Core",head="Anwig Salade",neck="Ferine Necklace",ear1="Sabong Earring",
- ear2="Ferine Earring",body="Ankusa Jackcoat",hands="Totemic Gloves",ring1="Epona's Ring",
- ring2="Rajas Ring",back="Pastoralist's Mantle",waist="Kuku Stone",legs="Ankusa Trousers",
- feet="Totemic Gaiters"}
- sets.engaged.Acc = {head="Whirlpool Mask",neck="Peacock Charm",ear1="Bladeborn Earring",
- ear2="Steelflash Earring",body="Thaumas Coat",hands="Otronif Gloves",ring1="Rajas Ring",
- ring2="Epona's Ring",back="Pantin Cape",waist="Hurch'lan Sash",legs="Manibozho Brais",
- feet="Otronif Boots +1"}
- sets.engaged.DT = {head="Whirlpool Mask",neck="Twilight Torque",ear1="Bladeborn Earring",
- ear2="Steelflash Earring",body="Otronif Harness",hands="Regimen Mittens",ring1="Dark Ring",
- ring2="Epona's Ring",back="Iximulew Cape",waist="Windbuffet Belt",legs="Manibozho Brais",
- feet="Otronif Boots +1"}
- sets.engaged.Acc.DT = {head="Whirlpool Mask",neck="Twilight Torque",ear1="Bladeborn Earring",
- ear2="Steelflash Earring",body="Otronif Harness",hands="Regimen Mittens",ring1="Dark Ring",
- ring2="Beeline Ring",back="Iximulew Cape",waist="Hurch'lan Sash",legs="Manibozho Brais",
- feet="Otronif Boots +1"}
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Job-specific hooks that are called to process player actions at specific points in time.
- -------------------------------------------------------------------------------------------------------------------
- -- Called when player is about to perform an action
- function job_precast(spell, action, spellMap, eventArgs)
- if spell.type == 'Waltz' then
- refine_waltz(spell, action, spellMap, eventArgs)
- end
- end
- -- Called when pet is about to perform an action
- function job_pet_midcast(spell, action, spellMap, eventArgs)
- if petWeaponskills:contains(spell.english) then
- classes.CustomClass = "Weaponskill"
- end
- end
- -- Modify the default idle set after it was constructed.
- function customize_idle_set(idleSet)
- if pet.isvalid and pet.status == 'Engaged' then
- idleSet = set_combine(idleSet, sets.idle.Pet.Engaged)
- end
- if pet.isvalid and pet.status == 'Idle' then
- idleSet = set_combine(idleSet, sets.idle.Pet)
- end
- if pet.notvalid and player.status == 'Idle' then
- idleSet = set_combine(idleSet, sets.idle)
- end
- return idleSet
- end
- function customize_melee_set(meleeSet)
- if newStatus == 'Engaged' and pet.isvalid == 'True' then
- meleeSet = set_combine(meleeSet, sets.engaged.Pet)
- end
- if newStatus == 'Engaged' and pet.isvalid == 'False' then
- meleeSet = set_combine(meleeSet, sets.engaged)
- end
- return meleeSet
- end
- -------------------------------------------------------------------------------------------------------------------
- -- General hooks for other game events.
- -------------------------------------------------------------------------------------------------------------------
- -- Called when the player's subjob changes.
- function sub_job_change(newSubjob, oldSubjob)
- select_default_macro_book()
- end
- -------------------------------------------------------------------------------------------------------------------
- -- User code that supplements self-commands.
- -------------------------------------------------------------------------------------------------------------------
- -- Called when the player's pet's status changes.
- -- This is also called after pet_change after a pet is released. Check for pet validity.
- function job_pet_status_change(newStatus, oldStatus, eventArgs)
- if pet.isvalid and not midaction() and not pet_midaction() and (newStatus == 'Engaged' or oldStatus == 'Engaged') then
- handle_equipping_gear(player.status, newStatus)
- end
- end
- function job_midcast(spell, action, spellMap, eventArgs)
- if spell.name == 'Spectral Jig' and buffactive.sneak then
- -- If sneak is active when using, cancel before completion
- send_command('cancel 71')
- end
- end
- function job_precast(spell, action, spellMap, eventArgs)
- refine_waltz(spell, action, spellMap, eventArgs)
- if spell.skill == "Ninjutsu" and spell.target.type:lower() == 'self' and spellMap ~= "Utsusemi" then
- classes.CustomClass = "SelfNinjutsu"
- 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)
- 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
- -------------------------------------------------------------------------------------------------------------------
- -- Utility functions specific to this job.
- -------------------------------------------------------------------------------------------------------------------
- -- Get the pet mode value based on the equipped head of the automaton.
- -- Select default macro book on initial load or subjob change.
- function select_default_macro_book()
- -- Default macro set/book
- if player.sub_job == 'DNC' then
- set_macro_page(2, 9)
- elseif player.sub_job == 'NIN' then
- set_macro_page(3, 9)
- elseif player.sub_job == 'THF' then
- set_macro_page(4, 9)
- else
- set_macro_page(1, 9)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement