Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -----------------------------------
- -- Setup functions for this job. --
- -----------------------------------
- function get_sets()
- mote_include_version = 2
- include('Mote-Include.lua')
- end
- function job_setup()
- -- Required for knowing when Sneak and Trick are on.
- state.Buff['Sneak Attack'] = buffactive['sneak attack'] or false
- state.Buff['Trick Attack'] = buffactive['trick attack'] or false
- state.Buff['Feint'] = buffactive['feint'] or false
- -- Not entirely valid on Era but needed to make the code work.
- -- For th_action_check():
- -- JA IDs for actions that always have TH: Provoke, Animated Flourish
- info.default_ja_ids = S{35, 204}
- -- Unblinkable JA IDs for actions that always have TH: Quick/Box/Stutter Step, Desperate/Violent Flourish
- info.default_u_ja_ids = S{201, 202, 203, 205, 207}
- include('Mote-TreasureHunter')
- end
- ----------------------------------------
- -- User setup functions for this job. --
- ----------------------------------------
- -- Called whin this file is initially loaded.
- function user_setup()
- state.OffenseMode:options('Haste', 'Accuracy', 'Evasion', 'Subtle')
- state.RangedMode:options('Power', 'Accuracy')
- state.HybridMode:options('Normal')
- state.WeaponskillMode:options('Normal') -- Does not possess a default binding.
- state.CastingMode:options('Normal')
- state.IdleMode:options('Normal') -- Ctrl+F12 to cycle modes.
- state.RestingMode:options('Normal')
- state.PhysicalDefenseMode:options('PDT') -- F10 to turn on and Ctrl+F10 to cycle and Alt+F12 turns off.
- state.MagicalDefenseMode:options('MDT') -- F11 to turn on and Alt+F12 turns off.
- state.TreasureMode:options('Tag', 'Fulltime', 'None')
- select_default_macro_book() -- Calls the function to set the default macro book page.
- -- send_command('gs enable all') -- Unlock any slots that may have been locked before this gearswap was loaded.
- send_command('wait 9; input /lockstyleset 06') -- Sets your lockstyle set to the two digit number at the end.
- send_command('bind %` gs c cycle treasuremode')
- send_command('bind %!f11 gs c cycle MagicalDefenseMode')
- send_command('bind %^space gs disable main sub range') -- Press ctrl + space to lock weapons.
- send_command('bind %!space gs enable main sub range') -- Press alt + space to unlock weapons.
- end
- -- Called when this file is unloaded or reloaded.
- function user_unload()
- -- Remove the bindings set above when this gearswap is unloaded.
- send_command('unbind %`')
- send_command('unbind %!f11')
- send_command('unbind %^space')
- send_command('unbind %!space')
- end
- ----------------
- -- Gear sets. --
- ----------------
- function init_gear_sets()
- ----------------
- -- Buff sets. --
- ----------------
- -----------------------
- -- Job ability sets. --
- -----------------------
- -- Uses TH gear for for these abilities. I might remove this later.
- sets.precast.Step = sets.TreasureHunter -- Must use TreasureHunter set for this ability manually.
- sets.precast.Flourish1 = sets.TreasureHunter -- Same as above
- sets.precast.JA.Provoke = sets.TreasureHunter -- Same.
- sets.precast.JA['Steal'] = {
- head = "Rogue's Bonnet",
- neck = "Rabbit Charm",
- hands = "Rogue's Armlets",
- legs = "Assassin's Culottes",
- feet = "Rogue's Poulaines",
- }
- sets.precast.JA['Mug'] = {head="Assassin's Bonnet",}
- sets.precast.JA["Flee"] = {feet="Rogue's Poulaines",} -- Equips your Thief feet AF before flee for increased duration.
- sets.precast.JA["Hide"] = {body="Rogue's Vest",} -- Equips your Thief body AF before hide for increased duration.
- sets.precast.JA['Collaborator'] = {}
- sets.precast.JA['Accomplice'] = {}
- -- You can safely delete these if you don't use dancer.
- sets.precast.Waltz = {
- hands="Assassin's Armlets",
- waist="Steppe Sash",
- feet="Assassin's Poulaines",
- }
- -- Same as above.
- sets.precast.Waltz['Healing Waltz'] = {} -- Intentionally empty so none of your waltz gear is used.
- -------------------
- -- Casting sets. --
- -------------------
- sets.precast.FC = { -- Benefits from only Fastcast gear and used before every spell cast.
- ear1 = "Loquacious Earring",
- }
- -- Almost every job has to use it at some point put lots of haste in here.
- sets.midcast.Utsusemi = { -- Put in haste, interrupt reduction, and evasion.
- head = "Walahra Turban",
- body = "Rapparee Harness",
- hands = "Dusk Gloves",
- waist = "Velocious Belt",
- legs = "Bravo's Subligar",
- feet = "Dusk Ledelsens",
- }
- -------------------
- -- Engaged sets. --
- -------------------
- sets.engaged.Haste = { -- This is your main fighting set while in combat.
- head = "Walahra Turban",
- neck = "Peacock Amulet",
- ear1 = "Cassie Earring",
- ring1 = "Rajas Ring",
- ear2 = "Suppanomimi",
- ring2 = "Ecphoria Ring",
- body = "Rapparee Harness",
- hands = "Dusk Gloves",
- back = "Cuchulain's Mantle",
- waist = "Velocious Belt",
- legs = "Bravo's Subligar",
- feet = "Dusk Ledelsens",
- }
- sets.engaged.Accuracy = { -- This is your main fighting set while in combat.
- head = "Optical Hat",
- neck = "Peacock Amulet",
- ear1 = "Cassie Earring",
- ring1 = "Rajas Ring",
- ear2 = "Suppanomimi",
- ring2 = "Ecphoria Ring",
- body = "Homam Corazza",
- hands = "Dusk Gloves",
- back = "Cuchulain's Mantle",
- waist = "Velocious Belt",
- legs = "Bravo's Subligar",
- feet = "Dusk Ledelsens",
- }
- sets.engaged.Evasion = { -- This is your main fighting set while in combat.
- head = "Optical Hat",
- neck = "Peacock Amulet",
- ear1 = "Dodge Earring",
- ring1 = "Rajas Ring",
- ear2 = "Dodge Earring",
- ring2 = "Ecphoria Ring",
- body = "Scorpion Harness +1",
- hands = "Dusk Gloves",
- back = "Bat Cape",
- waist = "Velocious Belt",
- legs = "Bravo's Subligar",
- feet = "Dance Shoes +1",
- }
- sets.engaged.Subtle = { -- This is your main fighting set while in combat.
- head = "Dragon Cap",
- neck = "Peacock Amulet",
- ear1 = "Cassie Earring",
- ring1 = "Rajas Ring",
- ear2 = "Suppanomimi",
- ring2 = "Ecphoria Ring",
- body = "Dragon Harness",
- hands = "Dragon Mittens",
- back = "Cuchulain's Mantle",
- waist = "Velocious Belt",
- legs = "Dragon Subligar",
- feet = "Dusk Ledelsens",
- }
- -- Delete this list if you never use NIN or DNC.
- -- A set pinned under your engaged sets while single wielding.
- -- If you delete the dual wielding code in customize_melee_set() you can delete this too.
- sets.engaged.SW = { -- Put your single wielding weapons in here and pieces used while doing so.
- main = "Mandau",
- sub = "Tatami Shield",
- }
- -- Same as above delete this if you never use NIN or DNC.
- -- A set pinned under your engaged sets while dual wielding.
- -- If you delete the dual wielding code in customize_melee_set() you can delete this too.
- sets.engaged.DW = { -- Put your dual wielding weapons in here and pieces used while doing so.
- main = "Mandau",
- sub = "Ridill",
- }
- -----------------------------------------------------------------------------------
- -- Range sets. -- Delete this section if your job doesn't have ranged abilities. --
- -----------------------------------------------------------------------------------
- sets.precast.RA.Power = {
- head="Walahra Turban",
- body="Rapparee Harness",
- hands="Dusk Gloves",
- waist="Velocious Belt",
- legs="Bravo's Subligar",
- feet="Dusk Ledelsens",
- }
- sets.midcast.RA.Power = {
- head="Optical Hat",
- neck="Peacock Amulet",
- ear1="Intruder Earring",
- ring1="Coral Ring",
- ear2="Suppanomimi",
- ring2="Coral Ring",
- body="Rapparee Harness",
- hands="Dragon Mittens",
- back="Cerberus Mantle",
- legs="Dusk Trousers",
- feet="Bounding boots",
- }
- sets.precast.RA.Accuracy = {
- head="Walahra Turban",
- body="Rapparee Harness",
- hands="Dusk Gloves",
- waist="Velocious Belt",
- legs="Bravo's Subligar",
- feet="Dusk Ledelsens",
- }
- sets.midcast.RA.Accuracy = {
- head="Optical Hat",
- neck="Peacock Amulet",
- ear1="Intruder Earring",
- ring1="Coral Ring",
- ear2="Suppanomimi",
- ring2="Coral Ring",
- body="Rapparee Harness",
- hands="Dragon Mittens",
- back="Cerberus Mantle",
- legs="Bravo's Subligar",
- feet="Bounding boots",
- }
- ------------------------
- -- Weapon skill sets. --
- ------------------------
- sets.buff['Sneak Attack'] = { -- A set just for while Sneak Attack is active, use dex gear in here.
- head = "Hecatomb Cap",
- neck = "Spike Necklace",
- ear1 = "Intruder Earring",
- ring1 = "Rajas Ring",
- ear2 = "Pixie Earring",
- ring2 = "Thunder Ring",
- body = "Dragon Harness",
- hands = "Hecatomb Mittens",
- back = "Cuchulain's Mantle",
- waist = "Warwolf Belt",
- legs = "Hecatomb Subligar",
- feet = "Hecatomb Leggings",
- }
- sets.buff['Trick Attack'] = { -- A set just for while Trick Attack is active, use agi gear in here.
- head = "Dragon Cap",
- neck = "Orochi Nodowa",
- ear1 = "Drone Earring",
- ring1 = "Snow Ring",
- ear2 = "Drone Earring",
- ring2 = "Snow Ring",
- body = "Dragon Harness",
- hands = "Dragon Mittens",
- back = "Assassin's Cape",
- waist = "Warwolf Belt",
- legs = "Dragon Subligar",
- feet = "Bounding Boots",
- }
- sets.precast.WS = {
- head = "Hecatomb Cap",
- neck = "Spike Necklace",
- ear1 = "Cassie Earring",
- ring1 = "Rajas Ring",
- ear2 = "Pixie Earring",
- ring2 = "Flame Ring",
- body = "Hecatomb Harness",
- hands = "Mecatomb Mittens",
- back = "Cuchulain's Mantle",
- waist = "Warwolf Belt",
- legs = "Hecatomb Subligar",
- feet = "Hecatomb Leggings",
- }
- sets.precast.WS.SA = sets.buff['Sneak Attack']
- sets.precast.WS.TA = sets.buff['Trick Attack']
- sets.precast.WS.SATA = set_combine(sets.buff['Trick Attack'], sets.buff['Sneak Attack'])
- sets.precast.WS['Mercy Stroke'] = {
- head = "Hecatomb Cap",
- neck = "Soil Gorget",
- ear1 = "Cassie Earring",
- ring1 = "Rajas Ring",
- ear2 = "Pixie Earring",
- ring2 = "Flame Ring",
- body = "Hecatomb Harness",
- hands = "Alkyoneus's Bracelets",
- back = "Cuchulain's Mantle",
- waist = "Warwolf Belt",
- legs = "Hecatomb Subligar",
- feet = "Hecatomb Leggings",
- }
- sets.precast.WS['Mercy Stroke'].SA = set_combine(sets.precast.WS['Mercy Stroke'], {
- ear1 = "Cassie Earring",
- ring2 = "Flame Ring",
- ear2 = "Pixie Earring",
- body = "Hecatomb Harness",
- hands = "Alkyoneus's Bracelets",
- back = "Cuchulain's Mantle",
- })
- sets.precast.WS['Mercy Stroke'].TA = set_combine(sets.precast.WS['Mercy Stroke'], {
- })
- sets.precast.WS['Mercy Stroke'].SATA = set_combine(sets.precast.WS['Mercy Stroke'], {
- head = "Hecatomb Cap",
- ear1 = "Intruder Earring",
- ring2 = "Thunder Ring",
- ear2 = "Pixie Earring",
- body = "Hecatomb Harness",
- hands = "Hecatomb Mittens",
- back = "Cuchulain's Mantle",
- })
- ----------------
- -- Idle sets. --
- ----------------
- sets.idle = { -- Stuff worn while walking around or inbetween casts while out of combat.
- range = "Velocity Bow +1",
- ammo = "Sleep Bolt",
- head = "Optical Hat",
- neck = "Orochi Nodowa",
- ear1 = "Dodge Earring",
- ring1 = "Bloodbead Ring",
- ear2 = "Dodge Earring",
- ring2 = "Jelly Ring",
- body = "Scorpion Harness +1",
- hands = "Dusk Gloves",
- back = "Bat Cape",
- waist = "Steppe Sash",
- legs = "Bravo's Subligar",
- feet = "Trotter Boots",
- }
- sets.idle.Town = set_combine(sets.idle, { -- In town idle set, items in here override main idle set.
- back = "Nexus Cape",
- })
- sets.idle.Weak = set_combine(sets.idle, { -- Weakened idle set, items in here override main idle set.
- ring2 = "Jelly Ring",
- })
- -- Delete this code if you never use /NIN or /DNC.
- -- A set pinned under your idle sets while single wielding.
- -- If you delete the dual wielding code in customize_idle_set() you can delete this too.
- sets.idle.SW = { -- Put your single wielding weapons in here and pieces used while doing so.
- main = "Mandau",
- sub = "Tatami Shield",
- }
- -- Same as above you can delete this if you never NIN or DNC.
- -- A set pinned under your idle sets while dual wielding.
- -- If you delete the dual wielding code in customize_idle_set() you can delete this too.
- sets.idle.DW = { -- Put your duel wielding weapons in here and pieces used while doing so.
- main = "Mandau",
- sub = "Ridill",
- }
- sets.resting = {
- range = " ",
- ammo = " ",
- head = " ",
- neck = " ",
- ear1 = " ",
- ring1 = " ",
- ear2 = " ",
- ring2 = " ",
- body = " ",
- hands = " ",
- back = " ",
- waist = " ",
- legs = " ",
- feet = " ",
- }
- -------------------
- -- Defense sets. --
- -------------------
- sets.Kiting = {feet = "Trotter Boots",} -- Movement speed gear press Alt + F10 to pin this.
- sets.defense.PDT = {ring2 = "Jelly Ring"}
- sets.defense.MDT = {
- ring2 = "Jelly Ring",
- back = "Resentment Cape",
- }
- -------------------
- -- Pinning sets. --
- -------------------
- sets.TreasureHunter = {hands = "Assassin's Armlets",}
- --[[
- These sets can be called and pinned in a windower macro using the example script.txt below.
- gs enable neck
- gs equip manual.whistle
- gs disable neck
- Or used (and pinned) in a standard in game macro with the example below.
- /console gs enable neck
- /console equip manual.whistle
- /console gs disable neck
- Make sure you enable then equip and then disable all the slots that are used in the sets.
- --]]
- sets.manual = {} -- Creates a empty list for these sets to be a sub list of.
- sets.manual.whistle = {neck = "Chocobo Whistle",}
- sets.manual.nexus = {back = "Nexus Cape",}
- sets.manual.warp = {ring2 = "Warp Ring",}
- sets.manual.bloody = {
- range = "Velocity Bow +1",
- ammo = "Bloody Bolt",
- }
- sets.manual.boomerange = {
- range = "Ungur Boomerang",
- }
- sets.manual.bomblet = {
- ammo = "Fire Bomblet",
- }
- sets.manual.sleep = {
- range = "Velocity Bow +1",
- ammo = "Sleep Bolt",
- }
- sets.manual.acid = {
- range = "Velocity Bow +1",
- ammo = "Acid Bolt",
- }
- sets.manual.silence = {
- range = "Lamian Kaman",
- ammo = "Silencing Arrow",
- }
- sets.manual.manthief = {
- main = "Mandau",
- sub = "Thief's Knife",
- }
- sets.manual.ridill = {
- main = "Mandau",
- sub = "Ridill",
- }
- sets.manual.kris = {
- main = "Mandau",
- sub = "Mercurial Kris",
- }
- sets.manual.thiefshield = {
- main = "Thief's Knife",
- sub = "Tatami Shield",
- }
- sets.manual.manshield = {
- main = "Mandau",
- sub = "Tatami Shield",
- }
- end
- -----------------------------------------------------
- -- Job-specific hooks for standard casting events. --
- -----------------------------------------------------
- function job_post_precast(spell, action, spellMap, eventArgs)
- -- Uses your treasure hunter gear when you use a AOE WS if in a treasure hunter mode.
- if spell.english == 'Cyclone' or spell.english == 'Aeolian Edge' and state.TreasureMode.value ~= 'None' then
- equip(sets.TreasureHunter)
- end
- end
- function job_post_midcast(spell, action, spellMap, eventArgs)
- -- Uses your treasure hunter gear when you range attack if in a treasure hunter mode.
- if state.TreasureMode.value ~= 'None' and spell.action_type == 'Ranged Attack' then
- equip(sets.TreasureHunter)
- end
- end
- function job_aftercast(spell, action, spellMap, eventArgs)
- -- If you WS with sneak or trick set gear on it stays on without this.
- if spell.type == 'WeaponSkill' and not spell.interrupted then
- state.Buff['Sneak Attack'] = false
- state.Buff['Trick Attack'] = false
- state.Buff['Feint'] = false
- end
- end
- ------------------------------------------------
- -- Job-specific hooks for non-casting events. --
- ------------------------------------------------
- function job_buff_change(buff, gain)
- -- 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.
- -- Without this when buffs end the gear never changes back.
- if state.Buff[buff] ~= nil then
- if not midaction() then
- handle_equipping_gear(player.status)
- end
- end
- end
- -----------------------------------------------------------
- -- User code that supplements standard library decisions. -
- -----------------------------------------------------------
- --[[
- function get_custom_wsmode(spell, spellMap, defaut_wsmode)
- -- Makes gearswap look for special WS sets for every WS ending in SA, TA, and SATA.
- local wsmode
- if state.Buff['Sneak Attack'] then
- wsmode = 'SA'
- end
- if state.Buff['Trick Attack'] then
- wsmode = (wsmode or '') .. 'TA'
- end
- return wsmode
- end
- --]]
- -- Called any time we attempt to handle automatic gear equips (ie: engaged or idle gear).
- function job_handle_equipping_gear(playerStatus, eventArgs)
- -- Checks for TA or SA and equips that gear specifically blocking other gear.
- check_buff('Trick Attack', eventArgs)
- check_buff('Sneak Attack', eventArgs)
- end
- -- Whenever a engaged set is used this function is called.
- function customize_melee_set(meleeSet)
- if state.TreasureMode.value == 'Fulltime' then
- meleeSet = set_combine(meleeSet, sets.TreasureHunter)
- end
- -- Checks if your subjob is DNC or NIN or isn't and uses the right weapons.
- if player.sub_job ~= "DNC" and player.sub_job ~= "NIN" then
- meleeSet = set_combine(sets.engaged.SW, meleeSet)
- else
- meleeSet = set_combine(sets.engaged.DW, meleeSet)
- end
- return meleeSet
- end
- -- Wenever a idle set is used this fuction is called.
- function customize_idle_set(idleSet)
- if state.TreasureMode.value == 'Fulltime' then
- idleSet = set_combine(idleSet, sets.TreasureHunter)
- end
- -- Checks if your subjob is DNC or NIN or isn't and uses the right weapons.
- if player.sub_job ~= "DNC" and player.sub_job ~= "NIN" then
- idleSet = set_combine(sets.idle.SW, idleSet)
- else
- idleSet = set_combine(sets.idle.DW, idleSet)
- end
- return idleSet
- end
- -- Believe this to also be required to recognize when TH has been applied.
- -- Called by the 'update' self-command.
- function job_update(cmdParams, eventArgs)
- th_update(cmdParams, eventArgs)
- end
- ---------------------------------------------
- -- Utility functions specific to this job. --
- ---------------------------------------------
- -- State buff checks that will equip buff gear and mark the event as handled.
- function check_buff(buff_name, eventArgs)
- if state.Buff[buff_name] then
- equip(sets.buff[buff_name] or {})
- eventArgs.handled = true
- end
- end
- -- Required for Treasure Hunter Tag mode to know when certain things have put your TH level on.
- -- Check for various actions that we've specified in user code as being used with TH gear.
- -- This will only ever be called if TreasureMode is not 'None'.
- -- Category and Param are as specified in the action event packet.
- function th_action_check(category, param)
- if category == 2 or -- any ranged attack
- category == 4 or -- any magic action
- (category == 3 and param == 30) or -- Aeolian Edge
- (category == 6 and info.default_ja_ids:contains(param)) or -- Provoke, Animated Flourish
- (category == 14 and info.default_u_ja_ids:contains(param)) -- Quick/Box/Stutter Step, Desperate/Violent Flourish
- then return true
- end
- end
- function select_default_macro_book()
- set_macro_page(1, 6)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement