Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Custom commands:
- gs c step
- Uses the currently configured step on the target, with either <t> or <stnpc> depending on setting.
- gs c step t
- Uses the currently configured step on the target, but forces use of <t>.
- Configuration commands:
- gs c cycle mainstep
- Cycles through the available steps to use as the primary step when using one of the above commands.
- gs c cycle altstep
- Cycles through the available steps to use for alternating with the configured main step.
- gs c toggle usealtstep
- Toggles whether or not to use an alternate step.
- gs c toggle selectsteptarget
- Toggles whether or not to use <stnpc> (as opposed to <t>) when using a step.
- --]]
- -- 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()
- state.Buff['Climactic Flourish'] = buffactive['climactic flourish'] or false
- state.MainStep = M{['description']='Main Step', 'Box Step', 'Quickstep', 'Feather Step', 'Stutter Step'}
- state.AltStep = M{['description']='Alt Step', 'Quickstep', 'Feather Step', 'Stutter Step', 'Box Step'}
- state.UseAltStep = M(false, 'Use Alt Step')
- state.SelectStepTarget = M(false, 'Select Step Target')
- state.IgnoreTargetting = M(false, 'Ignore Targetting')
- state.CurrentStep = M{['description']='Current Step', 'Main', 'Alt'}
- state.SkillchainPending = M(false, 'Skillchain Pending')
- determine_haste_group()
- 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()
- -- Additional local binds
- send_command('bind ^= gs c cycle mainstep')
- send_command('bind != gs c cycle altstep')
- send_command('bind ^- gs c toggle selectsteptarget')
- send_command('bind !- gs c toggle usealtstep')
- send_command('bind ^` input /ja "Chocobo Jig" <me>')
- send_command('bind !` input /ja "Chocobo Jig II" <me>')
- select_default_macro_book()
- end
- -- Called when this job file is unloaded (eg: job change)
- function user_unload()
- send_command('unbind ^`')
- send_command('unbind !`')
- send_command('unbind ^=')
- send_command('unbind !=')
- send_command('unbind ^-')
- send_command('unbind !-')
- end
- -- Define sets and vars used by this job file.
- function init_gear_sets()
- sets.precast.Waltz = {head="Etoile tiara",
- body = "Dancer's Casaque",
- ring1 = "Valseur's Ring"}
- sets.precast.Samba = {head = "Dancer's Tiara"}
- sets.precast.Jig = {feet = "Dancer's Toe Shoes"}
- sets.precast.Step = {feet = "Etoile toe shoes +2",back = "Belenos' mantle",waist = "Anguinus belt"}
- sets.precast.Flourish1 = {}
- sets.precast.Flourish1['Violent Flourish'] = {} -- magic accuracy
- sets.precast.Flourish1['Desperate Flourish'] = {back = "Belenos' mantle",waist = "Anguinus belt"} -- acc gear
- sets.precast.Flourish2 = {}
- sets.precast.Flourish2['Reverse Flourish'] = {}
- sets.precast.Flourish3 = {}
- sets.precast.Flourish3['Striking Flourish'] = {}
- sets.precast.Flourish3['Climactic Flourish'] = {}
- sets.precast.WS = {ammo="Potestas Bomblet",
- neck="Dancer's Torque",
- waist = "Anguinus belt",
- ear2="Brutal Earring",
- ring1="Rajas ring",
- back="Nifty mantle"}
- sets.precast.Skillchain = {}
- -- Midcast Sets
- sets.midcast.FastRecast = {}
- -- Specific spells
- sets.midcast.Utsusemi = {}
- -- Resting sets
- sets.resting = {}
- sets.ExtraRegen = {}
- sets.idle = {ammo="Charis feather",
- head="Espial cap",
- neck="Charis necklace",
- ear1="Infused Earring",
- ear2="Brutal Earring",
- body="Espial gambison",
- hands="Espial bracers",
- ring1="Rajas Ring",
- ring2="Enlivened Ring",
- back="Belenos' Mantle",
- waist="Velocious Belt",
- legs="Espial hose",
- feet="Espial socks"}
- sets.idle.Town = set_combine(sets.idle, {})
- sets.idle.Weak = set_combine(sets.idle, {})
- sets.defense = set_combine(sets.idle, {})
- sets.Kiting = set_combine(sets.defense, {})
- sets.engaged = {ammo="Charis feather",
- head="Espial cap",
- neck="Charis necklace",
- ear1="Infused Earring",
- ear2="Brutal Earring",
- body="Espial gambison",
- hands="Espial bracers",
- ring1="Rajas Ring",
- ring2="Enlivened Ring",
- back="Belenos' Mantle",
- waist="Velocious Belt",
- legs="Espial hose",
- feet="Espial socks"}
- sets.engaged.HighHaste = set_combine(sets.engaged, {})
- sets.engaged.MaxHaste = set_combine(sets.engaged, {})
- sets.buff['Saber Dance'] = {}
- sets.buff['Climactic Flourish'] = {}
- end
- function job_post_precast(spell, action, spellMap, eventArgs)
- if spell.type == "WeaponSkill" then
- if state.Buff['Climactic Flourish'] then
- equip(sets.buff['Climactic Flourish'])
- end
- if state.SkillchainPending.value == true then
- equip(sets.precast.Skillchain)
- end
- end
- end
- function job_aftercast(spell, action, spellMap, eventArgs)
- if not spell.interrupted then
- if spell.english == "Wild Flourish" then
- state.SkillchainPending:set()
- send_command('wait 5;gs c unset SkillchainPending')
- elseif spell.type:lower() == "weaponskill" then
- state.SkillchainPending:toggle()
- send_command('wait 6;gs c unset SkillchainPending')
- end
- end
- end
- function job_buff_change(buff,gain)
- -- If we gain or lose any haste buffs, adjust which gear set we target.
- if S{'haste','march','embrava','haste samba'}:contains(buff:lower()) then
- determine_haste_group()
- handle_equipping_gear(player.status)
- elseif buff == 'Saber Dance' or buff == 'Climactic Flourish' then
- handle_equipping_gear(player.status)
- end
- end
- function job_status_change(new_status, old_status)
- if new_status == 'Engaged' then
- determine_haste_group()
- end
- end
- -------------------------------------------------------------------------------------------------------------------
- -- User code that supplements standard library decisions.
- -------------------------------------------------------------------------------------------------------------------
- -- Called by the default 'update' self-command.
- function job_update(cmdParams, eventArgs)
- determine_haste_group()
- end
- function customize_idle_set(idleSet)
- if player.hpp < 80 and not areas.Cities:contains(world.area) then
- idleSet = set_combine(idleSet, sets.ExtraRegen)
- end
- return idleSet
- end
- function customize_melee_set(meleeSet)
- if state.DefenseMode.value ~= 'None' then
- if buffactive['saber dance'] then
- meleeSet = set_combine(meleeSet, sets.buff['Saber Dance'])
- end
- if state.Buff['Climactic Flourish'] then
- meleeSet = set_combine(meleeSet, sets.buff['Climactic Flourish'])
- end
- end
- return meleeSet
- end
- -- Handle auto-targetting based on local setup.
- function job_auto_change_target(spell, action, spellMap, eventArgs)
- if spell.type == 'Step' then
- if state.IgnoreTargetting.value == true then
- state.IgnoreTargetting:reset()
- eventArgs.handled = true
- end
- eventArgs.SelectNPCTargets = state.SelectStepTarget.value
- end
- end
- -- Called for custom player commands.
- function job_self_command(cmdParams, eventArgs)
- if cmdParams[1] == 'step' then
- if cmdParams[2] == 't' then
- state.IgnoreTargetting:set()
- end
- local doStep = ''
- if state.UseAltStep.value == true then
- doStep = state[state.CurrentStep.current..'Step'].current
- state.CurrentStep:cycle()
- else
- doStep = state.MainStep.current
- end
- send_command('@input /ja "'..doStep..'" <t>')
- end
- end
- function determine_haste_group()
- -- We have three groups of DW in gear: Charis body, Charis neck + DW earrings, and Patentia Sash.
- -- For high haste, we want to be able to drop one of the 10% groups (body, preferably).
- -- High haste buffs:
- -- 2x Marches + Haste
- -- 2x Marches + Haste Samba
- -- 1x March + Haste + Haste Samba
- -- Embrava + any other haste buff
- -- For max haste, we probably need to consider dropping all DW gear.
- -- Max haste buffs:
- -- Embrava + Haste/March + Haste Samba
- -- 2x March + Haste + Haste Samba
- classes.CustomMeleeGroups:clear()
- if buffactive.embrava and (buffactive.haste or buffactive.march) and buffactive['haste samba'] then
- classes.CustomMeleeGroups:append('MaxHaste')
- elseif buffactive.march == 2 and buffactive.haste and buffactive['haste samba'] then
- classes.CustomMeleeGroups:append('MaxHaste')
- elseif buffactive.embrava and (buffactive.haste or buffactive.march or buffactive['haste samba']) then
- classes.CustomMeleeGroups:append('HighHaste')
- elseif buffactive.march == 1 and buffactive.haste and buffactive['haste samba'] then
- classes.CustomMeleeGroups:append('HighHaste')
- elseif buffactive.march == 2 and (buffactive.haste or buffactive['haste samba']) then
- classes.CustomMeleeGroups:append('HighHaste')
- end
- end
- -- Automatically use Presto for steps when it's available and we have less than 3 finishing moves
- function job_pretarget(spell, action, spellMap, eventArgs)
- if spell.type == 'Step' then
- local allRecasts = windower.ffxi.get_ability_recasts()
- local prestoCooldown = allRecasts[236]
- local under3FMs = not buffactive['Finishing Move 3'] and not buffactive['Finishing Move 4'] and not buffactive['Finishing Move 5']
- if player.main_job_level >= 77 and prestoCooldown < 1 and under3FMs then
- cast_delay(1.1)
- send_command('input /ja "Presto" <me>')
- end
- end
- end
- -- 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(2, 19)
- elseif player.sub_job == 'NIN' then
- set_macro_page(4, 19)
- elseif player.sub_job == 'SAM' then
- set_macro_page(3, 19)
- elseif player.sub_job == 'THF' then
- set_macro_page(1, 19)
- else
- set_macro_page(5, 19)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement