Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -------------------------------------------------------------------------------------------------------------------
- -- 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.
- function job_setup()
- -- /BLU Spell Maps
- blue_magic_maps = {}
- blue_magic_maps.Enmity = S{'Blank Gaze', 'Geist Wall', 'Jettatura', 'Soporific',
- 'Poison Breath', 'Blitzstrahl', 'Sheep Song', 'Chaotic Eye'}
- blue_magic_maps.Cure = S{'Wild Carrot'}
- blue_magic_maps.Buffs = S{'Cocoon', 'Refueling'}
- -- Table of entries
- rune_timers = T{}
- -- entry = rune, index, expires
- if player.main_job_level >= 65 then
- max_runes = 3
- elseif player.main_job_level >= 35 then
- max_runes = 2
- elseif player.main_job_level >= 5 then
- max_runes = 1
- else
- max_runes = 0
- end
- send_command('wait 6;input /lockstyleset 21')
- end
- -------------------------------------------------------------------------------------------------------------------
- -- User setup functions for this job. Recommend that these be overridden in a sidecar file.
- -------------------------------------------------------------------------------------------------------------------
- function user_setup()
- state.OffenseMode:options('Normal', 'DD', 'Parry')
- state.WeaponskillMode:options('Normal', 'ATK')
- state.CastingMode:options('Normal', 'SIRD')
- state.IdleMode:options('Normal', 'TANK', 'HP')
- select_default_macro_book(6)
- end
- function init_gear_sets()
- sets.enmity = {ammo="Sapience Orb",
- head="Halitus Helm",
- body="Emet Harness +1",
- hands="Kurys Gloves",
- legs="Eri. Leg Guards +3",
- feet="erilaz greaves +3",
- neck="Moonlight Necklace",
- waist="Plat. Mog. Belt",
- left_ear="Cryptic Earring",
- right_ear="Trux Earring",
- left_ring="Eihwaz Ring",
- right_ring="Begrudging Ring",
- back={ name="Ogma's Cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Enmity+10','Spell interruption rate down-10%',}},}
- --------------------------------------
- -- Precast sets
- --------------------------------------
- -- Precast sets to enhance JAs
- sets.precast.JA['Vallation'] = {body="Runeist Coat +1", back="Ogma's Cape"}
- sets.precast.JA['Valiance'] = sets.precast.JA['Vallation']
- sets.precast.JA['Pflug'] = {feet="Runeist Bottes +2"}
- sets.precast.JA['Battuta'] = {head="Futhark Bandeau +3"}
- sets.precast.JA['Liement'] = {body="Futhark Coat +1"}
- sets.precast.JA['Lunge'] = {ammo={ name="Ghastly Tathlum +1", augments={'Path: A',}},
- head="Agwu's Cap",
- body={ name="Agwu's Robe", augments={'Path: A',}},
- hands={ name="Agwu's Gages", augments={'Path: A',}},
- legs={ name="Agwu's Slops", augments={'Path: A',}},
- feet={ name="Agwu's Pigaches", augments={'Path: A',}},
- neck="Sibyl Scarf",
- waist="Skrymir Cord",
- left_ear="Friomisi Earring",
- right_ear="Odnowa Earring +1",
- left_ring={ name="Metamor. Ring +1", augments={'Path: A',}},
- right_ring="Mujin Band",
- back={ name="Ogma's Cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Enmity+10','Spell interruption rate down-10%',}},}
- sets.precast.JA['Swipe'] = set_combine(sets.precast.JA['Lunge'], {})
- sets.precast.JA['Gambit'] = {hands="Runeist Mitons +3"}
- sets.precast.JA['Rayke'] = {feet="Futhark Boots +1"}
- sets.precast.JA['Elemental Sforzo'] = {body="Futhark Coat +1"}
- sets.precast.JA['Swordplay'] = {hands="Futhark Mitons +1"}
- sets.precast.JA['Embolden'] = {back="Evasionist's Cape"}
- sets.precast.JA['Vivacious Pulse'] = {head="Erilaz Galea +3"}
- sets.precast.JA['One For All'] = {}
- sets.precast.JA['Provoke'] = set_combine(sets.enmity, {})
- -- Fast cast sets for spells
- sets.precast.FC = {ammo="Sapience Orb", --2
- head="Rune. Bandeau +2", --12
- body="Erilaz Surcoat +3", --10
- hands={ name="Leyline Gloves", augments={'Accuracy+12','Mag. Acc.+14','"Mag.Atk.Bns."+15','"Fast Cast"+2',}}, --7
- legs={ name="Agwu's Slops", augments={'Path: A',}}, --7
- feet={ name="Carmine Greaves +1", augments={'HP+80','MP+80','Phys. dmg. taken -4',}}, --8
- neck={ name="Unmoving Collar +1", augments={'Path: A',}},
- waist="Tempus Fugit",
- left_ear="Etiolation Earring", --1
- right_ear="Loquac. Earring", --2
- left_ring="Kishar Ring", --4
- right_ring="Naji's Loop", --1
- back={ name="Ogma's Cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','HP+10','"Fast Cast"+10',}},} --10
- sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {})
- sets.precast.FC['Utsusemi: Ichi'] = set_combine(sets.precast.FC, {})
- sets.precast.FC['Utsusemi: Ni'] = set_combine(sets.precast.FC['Utsusemi: Ichi'], {})
- -- Weaponskill sets
- sets.precast.WS = {ammo="Knobkierrie",
- head={ name="Nyame Helm", augments={'Path: B',}},
- body={ name="Nyame Mail", augments={'Path: B',}},
- hands="Nyame Gauntlets",
- legs={ name="Nyame Flanchard", augments={'Path: B',}},
- feet={ name="Nyame Sollerets", augments={'Path: B',}},
- neck="Rep. Plat. Medal",
- waist="Grunfeld Rope",
- left_ear="Ishvara Earring",
- right_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
- left_ring="Niqmaddu Ring",
- right_ring="Regal Ring",
- back={ name="Ogma's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}},}
- sets.precast.WS['Resolution'] = {ammo="Seething Bomblet +1",
- head={ name="Nyame Helm", augments={'Path: B',}},
- body={ name="Nyame Mail", augments={'Path: B',}},
- hands={ name="Adhemar Wrist. +1", augments={'STR+12','DEX+12','Attack+20',}},
- legs={ name="Nyame Flanchard", augments={'Path: B',}},
- feet={ name="Nyame Sollerets", augments={'Path: B',}},
- neck="Fotia Gorget",
- waist="Sailfi Belt +1",
- left_ear="Sherida Earring",
- right_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
- left_ring="Niqmaddu Ring",
- right_ring="Regal Ring",
- back={ name="Ogma's Cape", augments={'STR+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},
- }
- sets.precast.WS['Dimidiation'] = {ammo="Knobkierrie",
- head={ name="Nyame Helm", augments={'Path: B',}},
- body={ name="Nyame Mail", augments={'Path: B',}},
- hands="Nyame Gauntlets",
- legs={ name="Nyame Flanchard", augments={'Path: B',}},
- feet={ name="Nyame Sollerets", augments={'Path: B',}},
- neck="Rep. Plat. Medal",
- waist="Grunfeld Rope",
- left_ear="Ishvara Earring",
- right_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
- left_ring="Niqmaddu Ring",
- right_ring="Regal Ring",
- back={ name="Ogma's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}},}
- sets.precast.WS['Savage Blade'] = {ammo="Knobkierrie",
- head={ name="Nyame Helm", augments={'Path: B',}},
- body={ name="Nyame Mail", augments={'Path: B',}},
- hands="Nyame Gauntlets",
- legs={ name="Nyame Flanchard", augments={'Path: B',}},
- feet={ name="Nyame Sollerets", augments={'Path: B',}},
- neck="Rep. Plat. Medal",
- waist="Sailfi Belt +1",
- left_ear="Ishvara Earring",
- right_ear={ name="Moonshade Earring", augments={'Attack+4','TP Bonus +250',}},
- left_ring="Niqmaddu Ring",
- right_ring="Regal Ring",
- back={ name="Ogma's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Weapon skill damage +10%','Phys. dmg. taken-10%',}},}
- --------------------------------------
- -- Midcast sets
- --------------------------------------
- sets.midcast.FastRecast = {}
- sets.midcast['Enhancing Magic'] = {head="Erilaz Galea +3",
- hands="runeist mitons +3",
- legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
- neck="Unmoving Collar +1",
- waist="Olympus Sash",
- left_ear="Andoaa Earring",
- left_ring="Stikini Ring",
- right_ring="Stikini Ring",
- back="Moonbeam Cape",}
- sets.midcast['Refresh'] = set_combine(sets.midcast['Enhancing Magic'], {})
- sets.midcast['Phalanx'] = set_combine(sets.midcast['Enhancing Magic'], {ammo="Staunch Tathlum",
- head={ name="Fu. Bandeau +3", augments={'Enhances "Battuta" effect',}},
- body={ name="Taeon Tabard", augments={'Spell interruption rate down -9%','Phalanx +3',}},
- hands={ name="Taeon Gloves", augments={'Spell interruption rate down -10%','Phalanx +3',}},
- legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
- feet={ name="Taeon Boots", augments={'Spell interruption rate down -10%','Phalanx +3',}},
- neck="Moonlight Necklace",
- waist="Audumbla Sash",
- back={ name="Ogma's Cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Enmity+10','Spell interruption rate down-10%',}},})
- sets.midcast['Regen'] = {head="Rune. Bandeau +2",
- hands="Regal Gauntlets",
- legs={ name="Futhark Trousers +1", augments={'Enhances "Inspire" effect',}},
- right_ear="Erilaz Earring",
- neck="Sacro Gorget",
- back="Moonbeam Cape",}
- sets.midcast['Stoneskin'] = set_combine(sets.midcast['Enhancing Magic'], {hands="Stone Mufflers"})
- sets.midcast['Flash'] = set_combine(sets.enmity, {})
- sets.midcast['Foil'] = set_combine(sets.enmity, {})
- sets.midcast['Stun'] = set_combine(sets.enmity, {})
- sets.midcast['Temper'] = {head="Erilaz Galea +3",
- hands="runeist mitons +3",
- legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
- neck="Unmoving Collar +1",
- waist="Olympus Sash",
- left_ear="Andoaa Earring",
- left_ring="Stikini Ring",
- right_ring="Stikini Ring",
- back="Moonbeam Cape",}
- sets.midcast.Cure = {}
- sets.midcast['Blue Magic'] = {ammo="Staunch Tathlum",
- head="Erilaz Galea +3",
- hands="Regal Gauntlets",
- legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
- neck="Moonlight Necklace",
- waist="Audumbla Sash",
- left_ear="Tuisto Earring",
- right_ear="Odnowa Earring +1",
- right_ring="Evanescence Ring",
- back={ name="Ogma's Cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Enmity+10','Spell interruption rate down-10%',}},}
- sets.midcast['Blue Magic'].Enmity = set_combine(sets.enmity, {})
- sets.midcast['Blue Magic'].Enmity.SIRD = {ammo="Staunch Tathlum",
- head="Erilaz Galea +3",
- body="Emet Harness +1",
- hands="Regal Gauntlets",
- legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
- feet="erilaz greaves +3",
- neck="Moonlight Necklace",
- waist="Audumbla Sash",
- left_ear="Tuisto Earring",
- right_ear="Odnowa Earring +1",
- left_ring="Eihwaz Ring",
- right_ring="Evanescence Ring",
- back={ name="Ogma's Cape", augments={'HP+60','Eva.+20 /Mag. Eva.+20','Enmity+10','Spell interruption rate down-10%',}},}
- sets.midcast['Blue Magic'].Cure = set_combine(sets.midcast.Cure, {})
- sets.midcast['Blue Magic'].Buff = sets.midcast['Enhancing Magic']
- --------------------------------------
- -- Idle/resting/defense/etc sets
- --------------------------------------
- sets.idle = {ammo="Homiliary",
- head={ name="Nyame Helm", augments={'Path: B',}},
- body="Runeist Coat +1",
- hands="Regal Gauntlets",
- legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
- feet="Erilaz Greaves +3",
- neck="Warder's Charm +1",
- waist="Carrier's Sash",
- left_ear="Tuisto Earring",
- right_ear="Infused Earring",
- left_ring="Defending Ring",
- right_ring="Chirich Ring +1",
- back={ name="Ogma's Cape", augments={'HP+60','Accuracy+20 Attack+20','HP+20','"Store TP"+10','Phys. dmg. taken-10%',}},}
- sets.idle.TANK = {ammo="Staunch Tathlum",
- head="Erilaz Galea +3",
- body="Erilaz Surcoat +3",
- hands="Nyame Gauntlets",
- legs="Eri. Leg Guards +3",
- feet="Erilaz Greaves +3",
- neck={ name="Futhark Torque +2", augments={'Path: A',}},
- waist="Carrier's Sash",
- left_ear="Tuisto Earring",
- right_ear="Odnowa Earring +1",
- left_ring="Defending Ring",
- right_ring={ name="Gelatinous Ring +1", augments={'Path: A',}},
- back={ name="Ogma's Cape", augments={'HP+60','Accuracy+20 Attack+20','HP+20','"Store TP"+10','Phys. dmg. taken-10%',}},}
- sets.idle.HP = {ammo="Staunch Tathlum",
- head={ name="Nyame Helm", augments={'Path: B',}},
- body="Erilaz Surcoat +3",
- hhands="Nyame Gauntlets",
- legs={ name="Nyame Flanchard", augments={'Path: B',}},
- feet={ name="Nyame Sollerets", augments={'Path: B',}},
- neck={ name="Futhark Torque +2", augments={'Path: A',}},
- waist="Carrier's Sash",
- left_ear="Tuisto Earring",
- right_ear="Odnowa Earring +1",
- left_ring="Moonlight Ring",
- right_ring={ name="Gelatinous Ring +1", augments={'Path: A',}},
- back="Moonbeam Cape",}
- --------------------------------------
- -- Engaged sets
- --------------------------------------
- sets.engaged = {ammo={ name="Coiste Bodhar", augments={'Path: A',}},
- head="Erilaz Galea +3",
- body="Erilaz Surcoat +3",
- hands="Turms Mittens +1",
- legs="Eri. Leg Guards +3",
- feet="Erilaz Greaves +3",
- neck={ name="Futhark Torque +2", augments={'Path: A',}},
- waist="Audumbla Sash",
- left_ear="Tuisto Earring",
- right_ear="Odnowa Earring +1",
- left_ring="Moonlight Ring",
- right_ring="Moonlight Ring",
- back={ name="Ogma's Cape", augments={'HP+60','Accuracy+20 Attack+20','HP+20','"Store TP"+10','Phys. dmg. taken-10%',}},}
- sets.engaged.DD = {ammo={ name="Coiste Bodhar", augments={'Path: A',}},
- head={ name="Adhemar Bonnet +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
- body={ name="Adhemar Jacket +1", augments={'DEX+12','AGI+12','Accuracy+20',}},
- hands={ name="Adhemar Wrist. +1", augments={'STR+12','DEX+12','Attack+20',}},
- legs={ name="Samnuha Tights", augments={'STR+8','DEX+9','"Dbl.Atk."+3','"Triple Atk."+2',}},
- feet="Volte Spats",
- neck="Anu Torque",
- waist={ name="Sailfi Belt +1", augments={'Path: A',}},
- left_ear="Sherida Earring",
- right_ear="Telos Earring",
- left_ring="Moonlight Ring",
- right_ring="Moonlight Ring",
- back={ name="Ogma's Cape", augments={'STR+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}},}
- sets.engaged.Parry = set_combine(sets.engaged, {feet="Turms Leggings +1"})
- end
- ------------------------------------------------------------------
- -- Action events
- ------------------------------------------------------------------
- -- 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 spell.english == 'Lunge' or spell.english == 'Swipe' then
- local obi = get_obi(get_rune_obi_element())
- if obi then
- equip({waist=obi})
- end
- end
- end
- function job_aftercast(spell)
- if not spell.interrupted then
- if spell.type == 'Rune' then
- update_timers(spell)
- elseif spell.name == "Lunge" or spell.name == "Gambit" or spell.name == 'Rayke' then
- reset_timers()
- end
- end
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Customization hooks for idle and melee sets, after they've been automatically constructed.
- -------------------------------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------------------------------
- -- General hooks for other events.
- -------------------------------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------------------------------
- -- User code that supplements self-commands.
- -------------------------------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------------------------------
- -- Utility functions specific to this job.
- -------------------------------------------------------------------------------------------------------------------
- -- Select default macro book on initial load or subjob change.
- function select_default_macro_book()
- -- Default macro set/book
- if player.sub_job == 'WAR' then
- set_macro_page(1, 6)
- elseif player.sub_job == 'BLU' then
- set_macro_page(4, 6)
- elseif player.sub_job == 'SAM' then
- set_macro_page(2, 6)
- else
- set_macro_page(3, 6)
- end
- end
- function get_rune_obi_element()
- weather_rune = buffactive[elements.rune_of[world.weather_element] or '']
- day_rune = buffactive[elements.rune_of[world.day_element] or '']
- local found_rune_element
- if weather_rune and day_rune then
- if weather_rune > day_rune then
- found_rune_element = world.weather_element
- else
- found_rune_element = world.day_element
- end
- elseif weather_rune then
- found_rune_element = world.weather_element
- elseif day_rune then
- found_rune_element = world.day_element
- end
- return found_rune_element
- end
- function get_obi(element)
- if element and elements.obi_of[element] then
- return (player.inventory[elements.obi_of[element]] or player.wardrobe[elements.obi_of[element]]) and elements.obi_of[element]
- end
- end
- ------------------------------------------------------------------
- -- Timer manipulation
- ------------------------------------------------------------------
- -- Add a new run to the custom timers, and update index values for existing timers.
- function update_timers(spell)
- local expires_time = os.time() + 300
- local entry_index = rune_count(spell.name) + 1
- local entry = {rune=spell.name, index=entry_index, expires=expires_time}
- rune_timers:append(entry)
- end
- -- Get the command string to create a custom timer for the provided entry.
- function create_timer(entry)
- local timer_name = '"Rune: ' .. entry.rune .. '-' .. tostring(entry.index) .. '"'
- local duration = entry.expires - os.time()
- return 'timers c ' .. timer_name .. ' ' .. tostring(duration) .. ' down'
- end
- -- Get the command string to delete a custom timer for the provided entry.
- function delete_timer(entry)
- local timer_name = '"Rune: ' .. entry.rune .. '-' .. tostring(entry.index) .. '"'
- return 'timers d ' .. timer_name .. ''
- end
- -- Reset all timers
- function reset_timers()
- local cmd_queue = ''
- for index,entry in pairs(rune_timers) do
- cmd_queue = cmd_queue .. delete_timer(entry) .. ';wait 0.05;'
- end
- rune_timers:clear()
- send_command(cmd_queue)
- end
- -- Get a count of the number of runes of a given type
- function rune_count(rune)
- local count = 0
- local current_time = os.time()
- for _,entry in pairs(rune_timers) do
- if entry.rune == rune and entry.expires > current_time then
- count = count + 1
- end
- end
- return count
- end
- -- Remove the oldest rune(s) from the table, until we're below the max_runes limit.
- -- If given a value n, remove n runes from the table.
- --function trim(n)
- -- local cmd_queue = ''
- -- local to_remove = n or (rune_timers:length() - max_runes)
- -- while to_remove > 0 and rune_timers:length() > 0 do
- --local oldest
- --for index,entry in pairs(rune_timers) do
- -- if oldest == nil or entry.expires < rune_timers[oldest].expires then
- -- oldest = index
- --end
- -- end
- -- cmd_queue = cmd_queue .. prune(rune_timers[oldest].rune)
- --to_remove = to_remove - 1
- -- end
- -- return cmd_queue
- --end
- -- Drop the index of all runes of a given type.
- -- If the index drops to 0, it is removed from the table.
- --function prune(rune)
- --local cmd_queue = ''
- --for index,entry in pairs(rune_timers) do
- -- if entry.rune == rune then
- -- cmd_queue = cmd_queue .. delete_timer(entry) .. ';wait 0.05;'
- -- entry.index = entry.index - 1
- -- end
- -- end
- -- for index,entry in pairs(rune_timers) do
- -- if entry.rune == rune then
- -- if entry.index == 0 then
- -- rune_timers[index] = nil
- -- else
- -- cmd_queue = cmd_queue .. create_timer(entry) .. ';wait 0.05;'
- -- end
- -- end
- --end
- -- return cmd_queue
- --end
- ------------------------------------------------------------------
- -- Reset events
- ------------------------------------------------------------------
- windower.raw_register_event('zone change',reset_timers)
- windower.raw_register_event('logout',reset_timers)
- windower.raw_register_event('status change',function(new, old)
- if gearswap.res.statuses[new].english == 'Dead' then
- reset_timers()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment