Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -------------------------------------------------------------------------------------------------------------------
- -- Setup functions for this job. Generally should not be modified.
- -- Modified JUN 29 2018
- -------------------------------------------------------------------------------------------------------------------
- --[[
- Custom commands:
- gs c cycle treasuremode (set on ctrl-= by default): Cycles through the available treasure hunter modes.
- Treasure hunter modes:
- None - Will never equip TH gear
- Tag - Will equip TH gear sufficient for initial contact with a mob (either melee, ranged hit, or Aeolian Edge AOE)
- SATA - Will equip TH gear sufficient for initial contact with a mob, and when using SATA
- Fulltime - Will keep TH gear equipped fulltime
- --]]
- -- 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['Sneak Attack'] = buffactive['Sneak Attack'] or false
- state.Buff['Trick Attack'] = buffactive['Trick Attack'] or false
- state.Buff['Feint'] = buffactive['Feint'] or false
- state.Buff["Assassin's Charge"] = buffactive["Assassin's Charge"] or false
- state.Buff['Perfect Dodge'] = buffactive['Perfect Dodge'] or false
- state.Buff['Flee'] = buffactive['Perfect Dodge'] or false
- state.Buff['sleep'] = buffactive['Sleep'] or false
- state.Buff['Bio'] = buffactive['Bio'] or false
- state.Buff['Poison'] = buffactive['Poison'] or false
- state.Buff['Doom'] = buffactive['Doom'] or false
- state.Buff['Reive Mark'] = buffactive['Reive Mark'] or false
- state.Buff['Elvorseal'] = buffactive['Elvorseal'] or false
- include('Mote-TreasureHunter')
- -- 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}
- 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()
- state.OffenseMode:options('Normal', 'Acc', 'PDT', 'Salvage', 'MDT')
- state.RangedMode:options('Normal', 'Acc')
- state.WeaponskillMode:options('Normal', 'Acc')
- select_default_macro_book()
- -- Gear Definitions
- gear.DarkRing = {name="Dark Ring"}
- gear.Reive = {name="Ygnas's Resolve +1"}
- gear.JPcape = {name="Mecistopins Mantle"}
- gear.HasteBelt = {name="Sailfi Belt +1"}
- gear.Sleep = {name="Frenzy Sallet"}
- -- Iuitl Set
- -- This entire set should be acquired, +1, and aug for DT
- -- Iuitl head is for DT, ta
- gear.IHead = {name="Iuitl Headgear +1"}
- -- Iuitl body is for DT, acc, r.acc, subtle blow
- gear.IBody = {name="Iuitl Vest +1"}
- -- Iuitl hands is for DT, acc, r.acc, snapshot
- -- Best aug is snapshot 1-3, for Precast ra
- gear.IHands = {name="Iuitl Wristbands +1"}
- -- Iuitl legs is for DT, m.acc, mab, stp
- gear.ILegs = {name="Iuitl Tights +1"}
- -- Iuitl feet is for DT, atk, r.atk, m.acc
- gear.IFeet = {name="Iuitl Gaiters +1"}
- -- Artifact set
- -- Artifact Head has acc, r.acc, crit dmg
- gear.AFHead = {name="Pillager's Bonnet +1"}
- -- Artifact Body has acc, crit dmg, aug: Hide
- gear.AFBody = {name="Pillager's Vest +1"}
- -- Artifact Hands have steal, crit dmg, increased trick dmg
- gear.AFHands = {name="Pillager's Armlets +1"}
- -- Artifact Legs have acc, atk, steal, crit dmg
- gear.AFLegs = {name="Pillager's Culottes +1"}
- -- Artifact Feet have acc, r.acc, steal, movement+12%, aug: Flee
- gear.AFFeet = {name="Pillager's Poulaines +1"}
- -- Relic set
- -- Relic Head has acc, mug, aug: Aura Steal
- gear.RHead = {name="Plunderer's Bonnet +1"}
- -- Relic Body has crit rate, crit dmg, aug: Ambush
- gear.RBody = {name="Plunderer's Vest +1"}
- -- Relic Hands have acc, th, aug: Perfect Dodge
- gear.RHands = {name="Plunderer's Armlets +1"}
- -- Relic Legs have acc, gilfinder, aug: Feint
- gear.RLegs = {name="Plunderer's Culottes +1"}
- -- Relic Feet have ta, ta dmg, aug: Assassin's Charge
- gear.RFeet = {name="Plunderer's Poulaines +1"}
- -- Empyrean set
- -- Empyrean set has a unique set bonus which applies with as little as 2 pieces.
- -- Empyrean Head is for ta, aug: Accomplice, aug: Collaborator
- gear.EmpHead = {name="Skulker's Bonnet +1"}
- -- Empyrean Body is for aug: Conspirator
- gear.EmpBody = {name="Skulker's Vest +1"}
- -- Empyrean Hands are for sa dmg
- gear.EmpHands = {name="Skulker's Armlets +1"}
- -- Empyrean Legs are for crit rate, despoil
- gear.EmpLegs = {name="Skulker's Culottes +1"}
- -- Empyrean Feet are for th, despoil
- gear.EmpFeet = {name="Skulker's Poulaines +1"}
- -- Taeon set, all pieces aug: atk or atk/acc, dw, crit
- -- Taeon head is for acc, r.acc, crit rate
- gear.THead = {name="Taeon Chapeau"}
- -- Taeon body is for atk, r.atk, fast cast
- gear.TBody = {name="Taeon Tabard"}
- -- Taeon hands is for m.acc, mab
- gear.THands = {name="Taeon Gloves"}
- -- Taeon legs is for acc, r.acc, ta
- gear.TLegs = {name="Taeon Tights"}
- -- Taeon feet is for acc, r.acc, m.acc, dw
- gear.TFeet = {name="Taeon Boots"}
- -- Pursuer's set
- -- Pursuer's head is for ratk, marks, stp
- gear.PHead = {name="Pursuer's Beret"}
- -- Pursuer's body is for racc, ratk, stp
- gear.PBody = {name="Pursuer's Doublet"}
- -- Pursuer's hands is for ratk, enm-
- gear.PHands = {name="Pursuer's Cuffs"}
- -- Pursuer's legs is for racc, ratk, rapid shot
- gear.PLegs = {name="Pursuer's Pants"}
- -- Pursuer's feet is for racc, enm-
- gear.PFeet = {name="Pursuer's Gaiters"}
- -- Rawhide set
- -- Rawhide head is for atk, refresh
- gear.RawHead = {name="Rawhide Mask"}
- -- Rawhide body is for acc, atk, matk, ta
- gear.RawBody = {name="Rawhide Vest"}
- -- Rawhide hands is for acc, m.acc, blue magic skill, spell int-
- gear.RawHands = {name="Rawhide Gloves"}
- -- Rawhide legs is for m.acc, enh magic skill, tactical parry
- gear.RawLegs = {name="Rawhide Trousers"}
- -- Rawhide feet is for acc, dw, waltz pot
- gear.RawFeet = {name="Rawhide Boots"}
- -- Herculean set, Ranged Path aug
- -- Herculean head is for atk, ratk, mab, fc
- gear.HHeadR = {name="Herculean Helm", augments={'AGI+7'}}
- -- Herculean body is for acc, racc, enm-, stp, crit hit rate
- gear.HBodyR = {name="Herculean Vest", augments={''}}
- -- Herculean hands is for acc, racc, ta, sb, pdt
- gear.HHandsR = {name="Herculean Gloves", augments={'AGI+8'}}
- -- Herculean legs is for ratk, enm-, stp, pdt
- gear.HLegsR = {name="Herculean Trousers", augments={'AGI+8'}}
- -- Herculean feet is for acc, atk, racc, ratk, macc, mab, ta, sb, pdt
- gear.HFeetR = {name="Herculean Boots", augments={'AGI+10'}}
- -- Herculean set, Magic Path aug
- -- Herculean head is for atk, ratk, mab, fc
- gear.HHeadM = {name="Herculean Helm", augments={'AGI+15'}}
- -- Herculean body is for acc, racc, enm-, stp, crit hit rate
- gear.HBodyM = {name="Herculean Vest", augments={''}}
- -- Herculean hands is for acc, racc, ta, sb, pdt
- gear.HHandsM = {name="Herculean Gloves", augments={''}}
- -- Herculean legs is for ratk, enm-, stp, pdt
- gear.HLegsM = {name="Herculean Trousers", augments={'Weapon skill damage +2%'}}
- -- Herculean feet is for acc, atk, racc, ratk, macc, mab, ta, sb, pdt
- gear.HFeetM = {name="Herculean Boots", augments={'AGI+8'}}
- -- Meghanada set
- -- Meghanada head is for
- gear.MegHead = {name="Meghanada Visor +1"}
- -- Meghanada body is for
- gear.MegBody = {name="Meghanada Cuirie +1"}
- -- Meghanada hands is for
- gear.MegHands = {name="Meghanada Gloves +1"}
- -- Meghanada legs is for
- gear.MegLegs = {name="Meghanada Chausses +1"}
- -- Meghanada feet is for
- gear.MegFeet = {name="Meghanada Jambeaux +1"}
- gear.AugCanny = {name="Canny Cape", augments={'"Dual Wield"+5'}}
- gear.AugAmbuSTP = {name="Toutatis's Cape", augments={'"Store TP"+10'}}
- gear.AugAmbuWS = {name="Toutatis's Cape", augments={'Weapon skill damage +10%'}}
- gear.default.weaponskill_neck = "Fotia Gorget"
- gear.default.weaponskill_waist = "Fotia Belt"
- -- Additional local binds
- -- F10, F11, F12 are occupied by default as follows:
- -- f10 reset DefenseMode
- -- ^f10 DefenseMode Physical
- -- !f10 DefenseMode Magical
- -- f11 toggle CP
- -- ^f11 toggle Kiting
- -- !f11 EquipStop
- -- f12 update user
- -- ^f12 IdleMode
- send_command('bind f9 gs c cycle OffenseMode')
- send_command('bind ^f9 gs c cycle WeaponskillMode')
- send_command('bind !f9 gs c cycle RangedMode')
- send_command('bind ^` input /ja "Flee" <me>')
- send_command('bind !` gs c cycle treasuremode')
- end
- -- Called when this job file is unloaded (eg: job change)
- function user_unload()
- send_command('unbind ^`')
- send_command('unbind !`')
- end
- -- Define sets and vars used by this job file.
- function init_gear_sets()
- --------------------------------------
- -- Special sets (required by rules)
- --------------------------------------
- -- Globally defined sets
- sets.Kiting = {main="Odium",body="Samnuha Coat",ring1="Warden's Ring",ring2="Shadow Ring"}
- sets.TreasureHunter = {hands=gear.RHands, feet=gear.EmpFeet}
- sets.CP = {back=gear.JPcape}
- -- vm0d's Custom Sets
- -- Sets to augment the Idle set
- sets.ExtraRegen = {head="Ocelomeh Headpiece +1",neck="Sanctity Necklace",ring1="Sheltered Ring",ring2="Paguroidea Ring"}
- sets.Refresh = {head=gear.RawHead,body="Mekosuchinae Harness",legs=gear.RawLegs}
- sets.CureRcvd = {ear1="Oneiros Earring",hands="Buremte Gloves",ring2="Kunaji Ring",belt="Gishdubar Sash"}
- sets.Roll = {ring1="Roller's Ring"}
- sets.Aries = {back="Aries Mantle"}
- sets.ProSh = {ring1="Sheltered Ring"}
- -- Sets that augment various sets
- sets.Moonshade = {ear2="Moonshade Earring"}
- -- Buff sets: Gear that needs to be worn to enhance an active player buff.
- sets.buff['Sneak Attack'] = {hands=gear.EmpHands}
- sets.buff['Trick Attack'] = {hands=gear.RHands}
- sets.buff["Assassin's Charge"] = {waist="Chiner's Belt +1",feet=gear.RFeet}
- sets.buff['Flee'] = {feet="Skadi's Jambeaux +1"}
- sets.buff['Sleep'] = {head=gear.Sleep}
- sets.buff['Doom'] = {ring1="Purity Ring",waist="Gishdubar Sash"}
- sets.buff['Reive Mark'] = {neck=gear.Reive}
- sets.buff['Elvorseal'] = {head=gear.MegHead,body="Ashera Harness",hands=gear.MegHands,legs=gear.MegLegs,feet=gear.MegFeet}
- --------------------------------------
- -- Precast sets
- --------------------------------------
- -- Precast sets to enhance JAs
- sets.precast.JA['Collaborator'] = {head=gear.EmpHead}
- sets.precast.JA['Accomplice'] = {head=gear.EmpHead}
- sets.precast.JA['Flee'] = {feet=gear.AFFeet}
- sets.precast.JA['Hide'] = {body=gear.AFBody}
- sets.precast.JA['Conspirator'] = {body=gear.EmpBody}
- sets.precast.JA['Steal'] = {head=gear.RHead,hands="Thief's Kote",neck="Pentalagus Charm",waist="Key Ring Belt",legs=gear.AFLegs,feet=gear.AFFeet}
- sets.precast.JA['Despoil'] = {legs=gear.EmpLegs,feet=gear.EmpFeet}
- sets.precast.JA['Mug'] = {head=gear.RHead}
- sets.precast.JA['Perfect Dodge'] = {hands=gear.RHands}
- sets.precast.JA['Feint'] = {legs=gear.RLegs}
- sets.precast.JA['Sneak Attack'] = set_combine(sets.buff['Sneak Attack'], {})
- sets.precast.JA['Trick Attack'] = set_combine(sets.buff['Trick Attack'], {})
- -- Actions we want to use to tag TH.
- sets.precast.JA.Provoke = set_combine(sets.TreasureHunter, {})
- sets.precast.JA['Animated Flourish'] = set_combine(sets.TreasureHunter, {})
- -- DNC actions
- -- Curing/Divine Waltz set
- -- Anwig Salade (Augment): Waltz Recast -2 Seconds
- -- HP Cured = floor((Waltz Potency gear + Waltz Potency Received) ×floor( M×(User's CHR + Target's VIT) + B + 2*(Waltz Job Point Tiers) ) )
- -- As THF, you will most often be waltzing yourself, so CHR and VIT are both helpful
- -- Waltz Potency gear caps at 50%, while Waltz received potency caps at 30%.
- sets.precast.Waltz = {ammo="Yamarang",head="Anwig Salade",feet=gear.RawFeet}
- -- Healing Waltz set
- -- Removes status ailments and does not have stat modifiers, but still uses augmented Anwig Salade for recast reduction.
- sets.precast.JA['Healing Waltz'] = {head="Anwig Salade"}
- -- Steps are affected by accuracy
- sets.precast.Step = {ammo="Yamarang",
- head=gear.MegHead,neck="Sanctity Necklace",ear1="Heartseeker Earring",ear2="Zennaroi Earring",
- body="Ashera Harness",hands=gear.MegHands,ring1="Ramuh Ring +1",ring2="Ramuh Ring +1",
- back=gear.AugAmbuSTP,waist="Olseni Belt",legs=gear.MegLegs,feet=gear.MegFeet}
- -- Fast cast sets for spells
- sets.precast.FC = {head=gear.HHeadM,body=gear.TBody,hands="Leyline Gloves",legs=gear.AFLegs,feet=gear.AFFeet}
- sets.precast.Utsusemi = set_combine(sets.precast.FC, {neck="Magoraga Beads"})
- -- Ranged snapshot gear
- sets.precast.RA = {head="Aurore Beret +1",body=gear.PBody,hands=gear.IHands,legs="Adhemar Kecks",feet=gear.MegFeet}
- -- Weaponskill sets
- -- Default set for any weaponskill that isn't any more specifically defined
- sets.precast.WS = {ammo="Seething Bomblet",
- head=gear.MegHead,neck="Fotia Gorget",ear1="Tati Earring",ear2="Tati Earring",
- body=gear.MegBody,hands=gear.MegHands,ring1="Petrov Ring",ring2="Karieyh Ring",
- back=gear.AugAmbuWS,waist="Fotia Belt",legs=gear.MegLegs,feet=gear.MegFeet}
- sets.precast.WS.Acc = set_combine(sets.precast.WS, {ear2="Zennaroi Earring",ring1="Ramuh Ring +1"})
- -- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
- -- Exenterator
- -- Delivers a fourfold attack that decreases target's accuracy. Duration of effect varies with TP.
- -- 73% AGI mod on 1st merit, +3% for 2nd-5th merits. 85% AGI mod at 5/5.
- -- This weaponskill has its fTP transferred across all hits, making Elemental Gorgets and Elemental Belts excellent neck and waist gear options.
- sets.precast.WS['Exenterator'] = set_combine(sets.precast.WS, {ring1="Garuda Ring +1",ring2="Garuda Ring +1"})
- sets.precast.WS['Exenterator'].Acc = set_combine(sets.precast.WS['Exenterator'], {ear2="Zennaroi Earring"})
- sets.precast.WS['Exenterator'].SA = set_combine(sets.precast.WS['Exenterator'], {ammo="Yetshila"})
- sets.precast.WS['Exenterator'].TA = set_combine(sets.precast.WS['Exenterator'], {ammo="Yetshila"})
- -- Dancing Edge
- -- Delivers a fivefold attack. Accuracy varies with TP.
- -- 40% CHR / 40% DEX
- -- This weaponskill has its fTP transferred across all hits, making Elemental Gorgets and Elemental Belts excellent neck and waist gear options.
- sets.precast.WS['Dancing Edge'] = set_combine(sets.precast.WS, {ring1="Ramuh Ring +1",ring2="Ramuh Ring +1"})
- sets.precast.WS['Dancing Edge'].Acc = set_combine(sets.precast.WS['Dancing Edge'], {ear2="Zennaroi Earring"})
- sets.precast.WS['Dancing Edge'].SA = set_combine(sets.precast.WS['Dancing Edge'], {ammo="Yetshila"})
- sets.precast.WS['Dancing Edge'].TA = set_combine(sets.precast.WS['Dancing Edge'], {ammo="Yetshila"})
- -- Evisceration
- -- Delivers an attack comprised of five hits. Critical hit rate varies with TP.
- -- 50% DEX
- -- This weaponskill has its fTP transferred across all hits, making Elemental Gorgets and Elemental Belts excellent neck and waist gear options.
- sets.precast.WS['Evisceration'] = set_combine(sets.precast.WS, {ring1="Ramuh Ring +1",ring2="Ramuh Ring +1"})
- sets.precast.WS['Evisceration'].Acc = set_combine(sets.precast.WS['Evisceration'], {ear2="Zennaroi Earring"})
- sets.precast.WS['Evisceration'].SA = set_combine(sets.precast.WS['Evisceration'], {ammo="Yetshila"})
- sets.precast.WS['Evisceration'].TA = set_combine(sets.precast.WS['Evisceration'], {ammo="Yetshila"})
- -- Rudra's Storm
- -- Deals quintuple damage and weighs target down. Damage varies with TP.
- -- 80% DEX
- sets.precast.WS["Rudra's Storm"] = set_combine(sets.precast.WS, {ring1="Ramuh Ring +1",ring2="Ramuh Ring +1"})
- sets.precast.WS["Rudra's Storm"].Acc = set_combine(sets.precast.WS["Rudra's Storm"], {ear2="Zennaroi Earring"})
- sets.precast.WS["Rudra's Storm"].SA = set_combine(sets.precast.WS["Rudra's Storm"], {ammo="Yetshila"})
- sets.precast.WS["Rudra's Storm"].TA = set_combine(sets.precast.WS["Rudra's Storm"], {ammo="Yetshila"})
- -- Mercy Stroke
- -- Deals quintuple damage and weighs target down. Damage varies with TP.
- -- 80% DEX
- sets.precast.WS['Mercy Stroke'] = set_combine(sets.precast.WS, {ring1="Ramuh Ring +1",ring2="Ramuh Ring +1"})
- sets.precast.WS['Mercy Stroke'].Acc = set_combine(sets.precast.WS['Mercy Stroke'], {ear2="Zennaroi Earring"})
- sets.precast.WS["Mercy Stroke"].SA = set_combine(sets.precast.WS["Mercy Stroke"], {ammo="Yetshila"})
- sets.precast.WS["Mercy Stroke"].TA = set_combine(sets.precast.WS["Mercy Stroke"], {ammo="Yetshila"})
- -- Shark Bite
- -- Delivers a twofold attack. Damage varies with TP.
- -- 40% DEX 40% AGI
- sets.precast.WS["Shark Bite"] = set_combine(sets.precast.WS, {ring1="Ramuh Ring +1",ring2="Ramuh Ring +1"})
- sets.precast.WS['Shark Bite'].Acc = set_combine(sets.precast.WS['Shark Bite'], {ear2="Zennaroi Earring"})
- sets.precast.WS['Shark Bite'].SA = set_combine(sets.precast.WS['Shark Bite'], {ammo="Yetshila"})
- sets.precast.WS['Shark Bite'].TA = set_combine(sets.precast.WS['Shark Bite'], {ammo="Yetshila"})
- -- Mandalic Stab
- -- Damage varies with TP.
- -- 60% DEX
- sets.precast.WS['Mandalic Stab'] = set_combine(sets.precast.WS, {ring1="Ramuh Ring +1",ring2="Ramuh Ring +1"})
- sets.precast.WS['Mandalic Stab'].Acc = set_combine(sets.precast.WS['Mandalic Stab'], {ear2="Zennaroi Earring"})
- sets.precast.WS['Mandalic Stab'].SA = set_combine(sets.precast.WS['Mandalic Stab'], {ammo="Yetshila"})
- sets.precast.WS['Mandalic Stab'].TA = set_combine(sets.precast.WS['Mandalic Stab'], {ammo="Yetshila"})
- -- Aeolian Edge
- -- Delivers an area attack that deals wind elemental damage. Damage varies with TP.
- -- 40% DEX / 40% INT
- sets.precast.WS['Aeolian Edge'] = {ammo="Seething Bomblet",
- head=gear.HHeadM,neck="Sanctity Necklace",ear1="Friomisi Earring",ear2="Novio Earring",
- body="Mekosuchinae Harness",hands="Leyline Gloves",ring1="Shiva Ring +1",ring2="Ramuh Ring +1",
- back=gear.AugAmbuWS,waist="Eschan Stone",legs=gear.HLegsM,feet=gear.HFeetM}
- -- Cyclone (TH set)
- -- Delivers an area of effect wind elemental attack. Damage varies with TP.
- -- Can be used at range (15'+), and the area of effect is target-centered.
- sets.precast.WS['Cyclone'] = set_combine(sets.precast.WS['Aeolian Edge'], sets.TreasureHunter)
- --------------------------------------
- -- Midcast sets
- --------------------------------------
- sets.midcast.FastRecast = {
- head=gear.AFHead,
- body=gear.AFBody,hands=gear.AFHands,
- waist=gear.HasteBelt,legs=gear.AFLegs,feet=gear.AFFeet}
- -- Specific spells
- sets.midcast.Utsusemi = {
- head=gear.AFHead,
- body=gear.AFBody,hands=gear.AFHands,
- waist=gear.HasteBelt,legs=gear.AFLegs,feet=gear.AFFeet}
- -- Ranged gear
- sets.midcast.RA = {
- head=gear.MegHead,neck="Marked Gorget",ear1="Enervating Earring",ear2="Clearview Earring",
- body="Ashera Harness",hands=gear.MegHands,ring1="Hajduk Ring",ring2="Paqichikaji Ring",
- back="Kayapa Cape",waist="Yemaya Belt",legs=gear.MegLegs,feet=gear.MegFeet}
- -- Max Racc set for gashing bolts
- sets.midcast.RA.Acc = set_combine(sets.midcast.RA, {})
- --------------------------------------
- -- Idle/resting/defense sets
- --------------------------------------
- -- Idle sets
- sets.idle = {ammo="Vanir Battery",
- head=gear.MegHead,neck="Loricate Torque +1",ear1="Eabani Earring",ear2="Sanare Earring",
- body="Ashera Harness",hands=gear.MegHands,ring1="Defending Ring",ring2="Karieyh Ring",
- back="Solemnity Cape",waist="Flume Belt",legs=gear.MegLegs,feet="Skadi's Jambeaux +1"}
- sets.idle.Town = set_combine(sets.idle, {})
- sets.idle.Field = set_combine(sets.idle, {})
- sets.idle.Weak = set_combine(sets.idle, {})
- -- Defense sets
- sets.defense.PDT = set_combine(sets.idle, {ring2="Dark Ring",feet=gear.MegFeet})
- sets.defense.MDT = set_combine(sets.idle, {neck="Warder's Charm",ring2="Dark Ring",feet=gear.MegFeet})
- -- Resting sets
- sets.resting = set_combine(sets.idle, sets.ExtraRegen, sets.CureRcvd)
- --------------------------------------
- -- Melee sets
- --------------------------------------
- -- rather than F9 cycling, i recommend making macros
- -- FORMAT BELOW (Acc example):
- -- /echo Acc set (full accuracy), is that correct?
- -- /ta <stpt>
- -- /console gs c set OffenseMode Acc
- -- /console gs equip sets.engaged.Acc
- --------------------------------------
- -- Normal melee group
- -- No buffs
- -- Taeon head/body/hands/legs/feet need Dual Wield +4-5 aug.
- -- Canny with Dual Wield +5 aug or 550 JP gift
- sets.engaged = {ammo="Yetshila",
- head=gear.THead,neck="Nefarious Collar +1",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
- body=gear.TBody,hands=gear.THands,ring1="Begrudging Ring",ring2="Epona's Ring",
- back=gear.AugAmbuSTP,waist="Patentia Sash",legs=gear.TLegs,feet=gear.TFeet}
- -- Acc with DW7 (12 including 550 JP gift)
- sets.engaged.Acc = {ammo="Yamarang",
- head=gear.MegHead,neck="Nefarious Collar +1",ear1="Dudgeon Earring",ear2="Heartseeker Earring",
- body="Ashera Harness",hands=gear.MegHands,ring1="Ramuh Ring +1",ring2="Ramuh Ring +1",
- back=gear.AugAmbuSTP,waist=gear.HasteBelt,legs=gear.MegLegs,feet=gear.MegFeet}
- -- PDT with a little Acc
- sets.engaged.PDT = set_combine(sets.engaged, {})
- -- Salvage set, for use with drain samba
- -- Jugo Kukri's add'l effect is not overwritten by drain samba
- sets.engaged.Salvage = set_combine(sets.engaged, {})
- -- Fire Absorb, for Cerberus
- sets.engaged.MDT = set_combine(sets.engaged, {neck="Loricate Torque +1",back="Engulfer Cape +1"})
- -- STP
- -- Theoretical, for max haste in settings where limiting TP feed is optimal
- --sets.engaged.STP = {
- -- head="Whirlpool Mask",neck="Houyi's Gorget",ear1="Tripudio Earring",ear2="Brutal Earring",
- -- body="Qaaxo Harness",hands="Aetosaur Gloves +1",ring1="Petrov Ring",ring2="Rajas Ring",
- -- back=gear.JPcape,waist="Patentia Sash",legs="Iuitl Tights +1",feet="Qaaxo Leggings"}
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Job-specific hooks for standard casting events.
- -------------------------------------------------------------------------------------------------------------------
- -- Run after the general precast() is done.
- function job_post_precast(spell, action, spellMap, eventArgs)
- if spell.english == 'Sneak Attack' or spell.english == 'Trick Attack' then
- if state.TreasureMode.value == 'SATA' or state.TreasureMode.value == 'Fulltime' then
- equip(sets.TreasureHunter)
- end
- end
- if spell.type:lower() == 'weaponskill' then
- if buffactive["Assassin's Charge"] then
- equip(sets.buff["Assassin's Charge"])
- end
- if buffactive['Sneak Attack'] then
- equip(sets.buff['Sneak Attack'])
- elseif buffactive['Trick Attack'] then
- equip(sets.buff['Trick Attack'])
- end
- if (player.tp > 1749 and player.tp < 2000) or (player.tp > 2749 and player.tp < 3000) then
- equip(sets.Moonshade)
- end
- end
- if spell.type == 'Waltz' and spell.english ~= 'Healing Waltz' and spell.target.type == 'SELF' then
- equip(sets.CureRcvd)
- end
- end
- -- Run after the general midcast() set is constructed.
- function job_post_midcast(spell, action, spellMap, eventArgs)
- if state.TreasureMode.value ~= 'None' and spell.action_type == 'Ranged Attack' then
- equip(sets.TreasureHunter)
- 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)
- -- Weaponskills wipe SATA/Feint. Turn those state vars off before default gearing is attempted.
- if spell.type == 'WeaponSkill' and not spell.interrupted then
- state.Buff['Sneak Attack'] = false
- state.Buff['Trick Attack'] = false
- state.Buff['Feint'] = false
- state.Buff["Assassin's Charge"] = false
- end
- --Countdowns--
- if not spell.interrupted then
- if spell.english == "Steal" then
- coroutine.schedule(windower.add_to_chat:prepare(215, spell.name .. ': Ready in 10 seconds!'), 289)
- coroutine.schedule(windower.add_to_chat:prepare(167, spell.name .. ': Ready!'), 299)
- elseif spell.english == "Despoil" then
- coroutine.schedule(windower.add_to_chat:prepare(215, spell.name .. ': Ready in 10 seconds!'), 289)
- coroutine.schedule(windower.add_to_chat:prepare(167, spell.name .. ': Ready!'), 299)
- elseif spell.english == "Assassin's Charge" then
- coroutine.schedule(windower.add_to_chat:prepare(215, spell.name .. ': Ready in 10 seconds!'), 289)
- coroutine.schedule(windower.add_to_chat:prepare(167, spell.name .. ': Ready!'), 299)
- elseif spell.english == "Conspirator" then
- coroutine.schedule(windower.add_to_chat:prepare(215, spell.name .. ': Ready in 10 seconds!'), 289)
- coroutine.schedule(windower.add_to_chat:prepare(167, spell.name .. ': Ready!'), 299)
- elseif spell.english == "Sneak Attack" then
- coroutine.schedule(windower.add_to_chat:prepare(167, spell.name .. ': Ready!'), 49)
- elseif spell.english == "Trick Attack" then
- coroutine.schedule(windower.add_to_chat:prepare(167, spell.name .. ': Ready!'), 59)
- elseif spell.english == "Bully" then
- send_command('timers create "Bully" 30 down')
- elseif spell.english == "Quickstep" then
- send_command('timers create "Quickstep" 60 down')
- elseif spell.english == "Box Step" then
- send_command('timers create "Box Step" 60 down')
- elseif spell.english == "Stutter Step" then
- send_command('timers create "Stutter Step" 60 down')
- end
- end
- end
- -- Called after the default aftercast handling is complete.
- function job_post_aftercast(spell, action, spellMap, eventArgs)
- -- If Feint is active, put that gear set on on top of regular gear.
- -- This includes overlaying SATA gear.
- check_buff('Feint', eventArgs)
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Job-specific hooks for non-casting events.
- -------------------------------------------------------------------------------------------------------------------
- -- 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.
- function job_buff_change(buff, gain)
- -- Check if we're slept
- if buff == "sleep" then
- if gain then
- -- should be "player.hp > 100 and player.status == "Engaged" and not buffactive['Bio'] and not buffactive['Poison']"
- -- for safety
- if player.hp > 100 and player.status == "Engaged" then
- equip(sets.buff['Sleep'])
- --send_command('@input /p Buff sleep ON !')
- if buffactive.stoneskin then
- send_command('cancel Stoneskin')
- end
- else
- equip(set_combine(sets.engaged.MDT, sets.Aries))
- end
- elseif not gain then
- if buffactive['Elvorseal'] and player.sub_job == "DNC" and player.tp > 400 and player.hpp < 90 then
- send_command('@input /ja "Divine Waltz" <me>')
- --send_command('@input /p Buff Sleep OFF !')
- else
- status_change(player.status)
- end
- end
- end
- -- Check if we're in a Reive
- if buff == "Reive Mark" then
- if player.inventory[sets.buff['Reive Mark']] or player.wardrobe[sets.buff['Reive Mark']] or player.wardrobe2[sets.buff['Reive Mark']] or player.wardrobe3[sets.buff['Reive Mark']] or player.wardrobe4[sets.buff['Reive Mark']] then
- if gain then
- equip(sets.buff['Reive Mark'])
- disable('neck')
- elseif not gain then
- enable('neck')
- status_change(player.status)
- end
- end
- end
- if buff == "Terror" or buff == "Petrification" or buff == "Stun" or buff == "Curse" or buff == "Weakness" then
- if gain then
- equip(sets.defense.MDT)
- elseif not gain then
- status_change(player.status)
- end
- end
- if buff == "Doom" then
- if gain then
- equip(sets.buff['Doom'])
- disable('ring1','waist')
- send_command('@input /p Doomed !')
- elseif not gain then
- enable('ring1','waist')
- send_command('@input /p All better')
- status_change(player.status)
- end
- end
- if buff == "Charm" then
- if gain then
- send_command('@input /p Charmed !')
- elseif not gain then
- send_command('@input /p All better')
- end
- end
- end
- -- Handle notifications of general user state change.
- function job_state_change(stateField, newValue, oldValue)
- -- Equip capacity point gear
- if stateField == 'CP' then
- if newValue ~= false then
- equip(sets.CP)
- disable('back','ring1')
- else
- enable('back','ring1')
- end
- end
- end
- -------------------------------------------------------------------------------------------------------------------
- -- User code that supplements standard library decisions.
- -------------------------------------------------------------------------------------------------------------------
- function get_custom_wsmode(spell, spellMap, defaut_wsmode)
- if state.WeaponskillMode.value ~= 'Acc' then
- local wsmode
- if buffactive['Sneak Attack'] then
- wsmode = 'SA'
- elseif buffactive['Trick Attack'] then
- wsmode = 'TA'
- end
- return wsmode
- end
- end
- -- Called any time we attempt to handle automatic gear equips (ie: engaged or idle gear).
- function job_handle_equipping_gear(playerStatus, eventArgs)
- -- Check that ranged slot is locked, if necessary
- check_range_lock()
- -- Check for SATA when equipping gear.
- -- If either is active, equip that gear specifically, and block equipping default gear.
- check_buff('Sneak Attack', eventArgs)
- check_buff('Trick Attack', eventArgs)
- end
- function customize_idle_set(idleSet)
- if player.hpp < 99 then
- idleSet = set_combine(idleSet, sets.ExtraRegen)
- end
- if player.hpp < 65 then
- idleSet = set_combine(idleSet, sets.CureRcvd)
- end
- if player.mpp < 30 then
- idleSet = set_combine(idleSet, sets.Refresh)
- end
- if buffactive["Dancer's Roll"] or buffactive["Evoker's Roll"] or buffactive["Corsair's Roll"] or buffactive["Bolter's Roll"] then
- idleSet = set_combine(idleSet, sets.Roll)
- end
- if buffactive["Fighter's Roll"] or buffactive["Rogue's Roll"] or buffactive["Hunter's Roll"] or buffactive["Chaos Roll"] then
- idleSet = set_combine(idleSet, sets.Roll)
- end
- if buffactive["Wizard's Roll"] or buffactive["Warlock's Roll"] or buffactive["Caster's Roll"] or buffactive["Courser's Roll"] then
- idleSet = set_combine(idleSet, sets.Roll)
- end
- if buffactive["Samurai Roll"] or buffactive["Blitzer's Roll"] or buffactive["Tactician's Roll"] or buffactive["Miser's Roll"] then
- idleSet = set_combine(idleSet, sets.Roll)
- end
- if buffactive['Flee'] then
- idleSet = set_combine(idleSet, sets.buff['Flee'])
- end
- if buffactive['Elvorseal'] then
- idleSet = set_combine(idleSet, sets.buff['Elvorseal'])
- end
- if not buffactive['Protect'] or not buffactive['Shell'] then
- idleSet = set_combine(idleSet, sets.ProSh)
- end
- return idleSet
- end
- function customize_melee_set(melee_set)
- if state.TreasureMode.value == 'Fulltime' then
- melee_set = set_combine(melee_set, sets.TreasureHunter)
- end
- if state.OffenseMode ~= Acc then
- if player.mp < 100 then
- melee_set = set_combine(melee_set, {ring1="Petrov Ring"})
- end
- end
- return melee_set
- end
- -- Called by the 'update' self-command.
- function job_update(cmdParams, eventArgs)
- th_update(cmdParams, eventArgs)
- --update_combat_form()
- end
- -- Function to display the current relevant user state when doing an update.
- -- Return true if display was handled, and you don't want the default info shown.
- function display_current_job_state(eventArgs)
- determine_haste()
- local msg = 'Thief'
- if state.CombatForm.has_value then
- msg = msg .. ' (' .. state.CombatForm.value .. ')'
- end
- msg = msg .. ', Offense: ' .. state.OffenseMode.value
- msg = msg .. ', WS: ' .. state.WeaponskillMode.value
- msg = msg .. ', RA: ' .. state.RangedMode.value
- if state.DefenseMode.value ~= 'None' then
- msg = msg .. ', ' .. 'Defense: ' .. state.DefenseMode.value .. ' (' .. state[state.DefenseMode.value .. 'DefenseMode'].value .. ')'
- end
- if state.Kiting.value == true then
- msg = msg .. ', Kiting ON'
- end
- if state.CP.value == true then
- msg = msg .. ', CP ON'
- end
- msg = msg .. ', TH: ' .. state.TreasureMode.value
- add_to_chat(122, msg)
- eventArgs.handled = true
- 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 {})
- if state.TreasureMode.value == 'SATA' or state.TreasureMode.value == 'Fulltime' then
- equip(sets.TreasureHunter)
- end
- eventArgs.handled = true
- end
- end
- -- 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 to lock various equipments based on the ranged slot equipment.
- function check_range_lock()
- if player.equipment.range ~= 'empty' then
- disable('range', 'ammo')
- else
- enable('range', 'ammo')
- end
- -- This function works, but i have no way to deal with th_lock/th_unlock
- -- Settled for a macro that equips fishing gear and unloads gs. :[
- --if player.equipment.range == "Lu Shang's F. Rod" then
- -- disable('main', 'sub', 'range', 'ammo', 'head', 'neck', 'ear1', 'ear2', 'body', 'hands', 'ring1', 'ring2', 'back', 'waist', 'legs', 'feet')
- --elseif player.equipment.range ~= 'empty' then
- -- enable('main', 'sub', 'head', 'neck', 'ear1', 'ear2', 'body', 'hands', 'ring1', 'ring2', 'back', 'waist', 'legs', 'feet')
- -- disable('range', 'ammo')
- --else
- -- enable('main', 'sub', 'range', 'ammo', 'head', 'neck', 'ear1', 'ear2', 'body', 'hands', 'ring1', 'ring2', 'back', 'waist', 'legs', 'feet')
- --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 == 'DNC' then
- set_macro_page(1, 6)
- elseif player.sub_job == 'WAR' then
- set_macro_page(2, 6)
- elseif player.sub_job == 'NIN' then
- set_macro_page(2, 6)
- else
- set_macro_page(1, 6)
- end
- end
- function determine_haste()
- -- assuming +4 for marches (ghorn has +5)
- -- Haste (white magic) 15%
- -- Haste Samba (Sub) 5%
- -- Haste (Merited DNC) 10% (never account for this)
- -- Victory March +0/+3/+4/+5 9.4/14%/15.6%/17.1% +0
- -- Advancing March +0/+3/+4/+5 6.3/10.9%/12.5%/14% +0
- -- Embrava 30% with 500 enhancing skill
- -- Mighty Guard - 15%
- -- buffactive[580] = indi/geo haste
- -- buffactive[33] = regular haste/haste2
- -- buffactive[604] = mighty guard
- -- state.HasteMode = toggle for when you know Haste II is being cast on you
- -- Hi = Haste II is being cast. This is clunky to use when both haste II and haste I are being cast
- --spells.Haste = S{buffactive[33],buffactive[580],buffactive.embrava,buffactive.march,buffactive[604]}
- if ( buffactive[580] and ( buffactive.march or buffactive[33] or buffactive.embrava or buffactive[604]) ) or -- geo haste + anything
- ( buffactive.embrava and (buffactive.march or buffactive[33] or buffactive[604]) ) or -- embrava + anything
- ( buffactive.march == 2 and (buffactive[33] or buffactive[604]) ) or -- two marches + anything
- ( buffactive[33] and buffactive[604] and buffactive.march ) then -- haste + mighty guard + any marches
- add_to_chat(8, '-------------Max Haste Mode Enabled--------------')
- elseif(
- ( buffactive[604] or buffactive[33]) and buffactive['haste samba'] and buffactive.march == 1) or -- MG or haste + samba with 1 march
- ( buffactive.march == 2 and buffactive['haste samba'] ) or
- ( buffactive[580] and buffactive['haste samba'] ) then
- add_to_chat(8, '-------------Haste 35%-------------')
- elseif
- ( buffactive.march == 2 ) or -- two marches from ghorn
- ( (buffactive[33] or buffactive[604]) and buffactive.march == 1 ) or -- MG or haste + 1 march
- ( buffactive[580] ) or -- geo haste
- ( buffactive[33] and buffactive[604] ) then -- haste with MG
- add_to_chat(8, '-------------Haste 30%-------------')
- elseif buffactive[33] or buffactive[604] or buffactive.march == 1 then
- add_to_chat(8, '-------------Haste 15%-------------')
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment