Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -------------------------------------------------------------------------------------------------------------------
- -- Setup functions for this job. Generally should not be modified.
- -------------------------------------------------------------------------------------------------------------------
- --[[
- Custom commands:
- Shorthand versions for each strategem type that uses the version appropriate for
- the current Arts.
- Light Arts Dark Arts
- gs c scholar light Light Arts/Addendum
- gs c scholar dark Dark Arts/Addendum
- gs c scholar cost Penury Parsimony
- gs c scholar speed Celerity Alacrity
- gs c scholar aoe Accession Manifestation
- gs c scholar power Rapture Ebullience
- gs c scholar duration Perpetuance
- gs c scholar accuracy Altruism Focalization
- gs c scholar enmity Tranquility Equanimity
- gs c scholar skillchain Immanence
- gs c scholar addendum Addendum: White Addendum: Black
- --]]
- -- Initialization function for this job file.
- function get_sets()
- mote_include_version = 2
- include('organizer-lib')
- -- 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()
- info.addendumNukes = S{"Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV",
- "Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"}
- Non_Obi_Spells = S{
- 'Burn','Choke','Drown','Frost','Rasp','Shock','Impact','Anemohelix','Cryohelix',
- 'Geohelix','Hydrohelix','Ionohelix','Luminohelix','Noctohelix','Pyrohelix'}
- Cure_Spells = {"Cure","Cure II","Cure III","Cure IV"} -- Cure Degradation --
- Curaga_Spells = {"Curaga","Curaga II"} -- Curaga Degradation --
- state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
- update_active_strategems()
- 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('None', 'Normal')
- state.CastingMode:options('Normal', 'Resistant', 'Mburst')
- state.IdleMode:options('Normal', 'PDT','MDT','Hybrid')
- MagicBurstIndex = 1
- state.MagicBurst = M(false, 'Magic Burst')
- info.low_nukes = S{"Stone", "Water", "Aero", "Fire", "Blizzard", "Thunder"}
- info.mid_nukes = S{"Stone II", "Water II", "Aero II", "Fire II", "Blizzard II", "Thunder II",
- "Stone III", "Water III", "Aero III", "Fire III", "Blizzard III", "Thunder III",
- "Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV",}
- info.high_nukes = S{"Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"}
- gear.DarkRing.PDT = {name="Dark Ring", augments={'Phys. dmg. taken -5%','Magic dmg. taken -4%',}}
- gear.RegenCape = {name="Bookworm's Cape", augments={'INT+5','Helix eff. dur. +20','"Regen" potency+10',}}
- gear.HelixCape = {name="Bookworm's Cape", augments={'INT+5','Helix eff. dur. +20','"Regen" potency+10',}}
- send_command('bind ^` input /ma Stun <t>')
- select_default_macro_book()
- end
- function user_unload()
- send_command('unbind ^`')
- send_command('bind @` gs c toggle MagicBurst')
- end
- -- Define sets and vars used by this job file.
- function init_gear_sets()
- --------------------------------------
- -- Start defining the sets
- --------------------------------------
- -- Precast Sets
- -- Precast sets to enhance JAs
- sets.precast.JA['Tabula Rasa'] = {legs="Pedagogy Pants"}
- -- Fast cast sets for spells
- sets.precast.FC = {main="",sub="",ammo="",
- head="Pedagogy Mortarboard +1",neck="Voltsurge torque",ear1="",ear2="loquacious Earring",
- body="Vrikodara jupon",hands="Gendewitha Gages",ring1="Prolix Ring",ring2="Lebeche Ring",
- back="Swith Cape",waist="Witful Belt",legs="Psycloth Lappas",feet="Pedagogy loafers +1"}
- sets.precast.FC.Arts = {main="",sub="",ammo="",
- head="Pedagogy Mortarboard +1",neck="Voltsurge torque",ear1="Enchanter earring +1",ear2="loquacious Earring",
- body="Vrikodara jupon",hands="Gendewitha Gages",ring1="Prolix Ring",ring2="Lebeche Ring",
- back="Swith Cape",waist="Witful Belt",legs="Psycloth Lappas",feet="Academic's loafers +1"}
- sets.precast.FC.Stun = {main="",sub="",ammo="",
- head="Nahtirah Hat",neck="Voltsurge Torque",ear1="Enchanter earring +1",ear2="loquacious Earring",
- body="Vrikodara jupon",hands="Gendewitha Gages",ring1="Prolix Ring",ring2="Sangoma Ring",
- back="Swith Cape",waist="Ninurta's sash",legs="Psycloth Lappasfas",feet="Pedagogy loafers +1"}
- sets.precast.FC.Haste = {main="",sub="",ammo="",
- head="Arbatel Bonnet",neck="Voltsurge torque",ear1="Enchanter earring +1",ear2="loquacious Earring",
- body="Arbatel gown +1",hands="Arbatel bracers +1",ring1="Prolix Ring",ring2="Lebeche Ring",
- back="Ogapepo cape",waist="Witful Belt",legs="Arbatel pants +1",feet="Arbatel loafers +1"}
- sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
- sets.precast.FC['Enhancing Magic'].Stoneskin = set_combine(sets.precast.FC, {head="Umuthi Hat",waist="Siegel Sash",legs="Doyen pants"})
- sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {neck="",ear2="Barkarole earring"})
- sets.precast.FC.Cure = set_combine(sets.precast.FC,
- {main="",sub="",body="Heka's Kalasiris",back="Pahtli Cape",legs="Doyen Pants"})
- sets.precast.FC.Curaga = sets.precast.FC.Cure
- sets.precast.FC.Impact = set_combine(sets.precast.FC['Elemental Magic'], {head=empty,body="Twilight Cloak"})
- sets.precast.WS = {
- head="Nahtirah Hat",neck="Fotia gorget",ear1="Bladeborn Earring",ear2="Steelflash Earring",
- body="Vanya robe",hands="Gendewitha Gages",ring1="Rajas Ring",ring2="Metamorph Ring",
- back="Refraction Cape",waist="Fotia Belt",legs="Telchine Braconi",feet="Battlecast gaiters"}
- -- Midcast Sets
- sets.midcast.FastRecast = {ammo="",
- head="Nahtirah Hat",ear1="Enchanter earring +1",ear2="Loquacious Earring",
- body="Vrikodara jupon",hands="Gendewitha Gages",ring1="Prolix Ring",
- back="Swith Cape",waist="Witful Belt",legs="Psycloth Lappas",feet="Pedagogy loafers +1"}
- sets.midcast.Cure = {main="",sub="",ammo="Psilomene",
- head="",neck="Colossus's Torque",ear1="",ear2="",
- body="Pedagogy gown +1",hands="Telchine gloves",ring1="Lebeche Ring",ring2="Sirona's Ring",
- back="Tempered Cape",waist="",legs="Academic's pants +1",feet="Medium's Sabots"}
- sets.midcast.CureWithLightWeather = {main="Tamaxchi",sub="Genbu's Shield",ammo="Psilomene",
- head="Kaykaus mitra",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Beatific Earring",
- body="Arbatel gown +1",hands="Pedagogy bracers",ring1="Lebeche Ring",ring2="Sirona's Ring",
- back="Tempered Cape",waist="Bishop's sash",legs="Academic's pants +1",feet="Vanya clogs"}
- sets.midcast.Curaga = sets.midcast.Cure
- sets.midcast.Cursna = set_combine(sets.midcast.FastRecast,{
- neck="Malison Medallion",ear2="Beatific Earring",
- body="Pedagogy gown +1",hands="Hieros Mittens",ring1="Ephedra Ring",ring2="Sirona's Ring",
- back="Tempered Cape",waist="Bishop's Sash",legs="Academic's Pants +1",feet="Vanya clogs"})
- sets.midcast['Enhancing Magic'] = {main="",sub="",ammo="",
- head="Arbatel Bonnet",neck="Incanter's Torque",ear1="",
- body="",hands="Arbatel bracers +1",back="",
- waist="",legs="Academic's pants +1",feet=""}
- sets.midcast.Regen = set_combine(sets.midcast['Enhancing Magic'], {main="Bolelabunga",sub="Genbu's Shield",
- legs="",back=gear.RegenCape})
- sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {waist="Siegel Sash",neck="",ear1=""})
- sets.midcast.Storm = set_combine(sets.midcast['Enhancing Magic'], {feet="Pedagogy Loafers +1"})
- --Refresh Spell--
- sets.midcast.Refresh = set_combine(sets.midcast['Enhancing Magic'], {head="Amalric Coif",waist="Gishdubar Sash",feet="Inspirited Boots"})
- --Protect/Shell--
- sets.midcast.Protect = {ring1="Sheltered Ring"}
- sets.midcast.Protectra = sets.midcast.Protect
- sets.midcast.Shell = {ring1="Sheltered Ring"}
- sets.midcast.Shellra = sets.midcast.Shell
- -- Custom spell classes
- sets.midcast.MndEnfeebles = {main="Akademos",sub="",ammo="Aurole",
- head="Befouled Crown",neck="Incanter's Torque",ear1="Barkarole Earring",ear2="Gwati Earring",
- body="Vanya Robe",hands="",ring1="Globidonta Ring",ring2="Sangoma Ring",
- back="",waist="",legs="Psycloth Lappas",feet="Medium's sabots"}
- sets.midcast.MndEnfeebles.Resistant = {main="Akademos",sub="Mephitis Grip",ammo="Plumose sachet",
- head="",neck="Incanter's Torque",ear1="Barkarole Earring",ear2="Gwati Earring",
- body="Vanya Robe",hands="Kaykaus cuffs",ring1="Globidonta Ring",ring2="Metamorph Ring",
- back="",waist="",legs="Psycloth Lappas",feet="Medium's sabots"}
- sets.midcast.IntEnfeebles = {main="Akademos",sub="Benthos Grip",ammo="Plumose sachet",
- head="Helios Band",neck="Imbodla necklace",ear1="Psystorm Earring",ear2="Barkarole Earring",
- body="Vanya Robe",hands="Kaykaus cuffs",ring1="Globidonta Ring",ring2="Metamorph Ring",
- back="Refraction Cape",waist="Eschan Stone",legs="Arbatel pants +1",feet="Medium's sabots"}
- sets.midcast.IntEnfeebles.Resistant = {main="Akademos",sub="Mephitis Grip",ammo="Plumose sachet",
- head="Helios Band",neck="Imbodla necklace",ear1="Gwati Earring",ear2="Barkarole Earring",
- body="Vanya Robe",hands="Kaykaus cuffs",ring1="Globidonta Ring",ring2="Metamorph Ring",
- back="Refraction Cape",waist="Eschan Stone",legs="Arbatel pants +1",feet="Medium's sabots"}
- sets.midcast.ElementalEnfeeble = sets.midcast.IntEnfeebles
- sets.midcast['Dark Magic'] = {main="Rubicundity",sub="Genbu's shield",ammo="Plumose sachet",
- head="Helios band",neck="Aesir Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
- body="Arbatel gown +1",hands="Helios Gloves",ring1="Evanescence Ring",ring2="Sangoma Ring",
- back=gear.HelixCape,waist="Eschan Stone",legs="Arbatel pants +1",feet="Helios boots"}
- sets.midcast.Kaustra = {main="Akademos",sub="Benthos Grip",ammo="Plumose sachet",
- head="Buremte Hat",neck="Eddy Necklace",ear1="Barkarole Earring",ear2="Friomisi Earring",
- body="Witching Robe",hands="Loagaeth cuffs",ring1="Metamorph Ring",ring2="Acumen Ring",
- back="Bookworm's cape",waist="Eschan Stone",legs="Arbatel Pants +1",feet="Inspirited Boots"}
- sets.midcast.Drain = {main="",sub="",ammo="",
- head="Amalric Coif",neck="Icantor's Torque",ear1="Barkarole Earring",ear2="Gwati Earring",
- body="Arbatel gown +1",hands="Helios Gloves",ring1="Evanescence Ring",ring2="Sangoma Ring",
- back=gear.HelixCape,waist="Fucho-no-Obi",legs="Pedagogy pants",feet="Helios boots"}
- sets.midcast.Aspir = sets.midcast.Drain
- sets.midcast.Stun = {main="Apamajas II",sub="Arbuda Grip",ammo="Incantor Stone",
- head="Nahtirah Hat",neck="Voltsurge Torque",ear1="Enchanter earring +1",ear2="loquacious Earring",
- body="Vrikodara Jupon",hands="Gendewitha Gages",ring1="Prolix Ring",ring2="Sangoma Ring",
- back="Swith Cape",waist="Ninurta's sash",legs="Lengo pants",feet="Pedagogy loafers +1"}
- sets.midcast.Stun.Resistant = set_combine(sets.midcast.Stun, {main="Marin Staff",ammo="Plumose sachet"})
- sets.midcast.Helix = {main="Akademos",sub="Zuuxowu Grip",ammo="Dosis Tathlum",
- head="Buremte Hat", neck="Saevus pendant +1", ear1="Friomisi Earring", ear2="Barkarole earring",
- body="Witching robe", hands="Otomi Gloves", ring1="Metamorph Ring", ring2="Acumen Ring",
- back=gear.HelixCape, waist="Eschan Stone", legs="Hagondes Pants", feet="Inspirited Boots"}
- sets.midcast.Helix.Mburst = {main="Akademos",sub="Willpower Grip",ammo="Dosis Tathlum",
- head="Helios band", neck="Saevus pendant +1", ear1="Friomisi Earring", ear2="Barkarole earring",
- body="Helios Jacket", hands="Helios Gloves", ring1="Locus Ring", ring2="Acumen Ring",
- back=gear.HelixCape, waist="Eschan Stone", legs="Hagondes Pants", feet="Helios Boots"}
- -- Elemental Magic sets are default for handling low-tier nukes.
- sets.midcast['Elemental Magic'] = {main="Akademos",sub="Zuuxowu grip",ammo="Dosis Tathlum",
- head="Helios Band",neck="Saevus pendant +1",ear1="Barkarole Earring",ear2="Friomisi Earring",
- body="Witching Robe",hands="Amalric Gages",ring1="Shiva Ring +1",ring2="Shiva Ring +1",
- back="Bookworm's cape",waist="Eschan Stone",legs="Amalric Slops",feet="Amalric Nails"}
- sets.midcast['Elemental Magic'].Resistant = {main="Akademos",sub="Benthos Grip",ammo="Plumose sachet",
- head="Helios Band",neck="Eddy Necklace",ear1="Barkarole Earring",ear2="Friomisi Earring",
- body="Arbatel gown +1",hands="Amalric Gages",ring1="Metamorph Ring",ring2="Acumen Ring",
- back="Bookworm's Cape",waist="Eschan Stone",legs="",feet="Helios Boots"}
- sets.midcast['Elemental Magic'].MBurst = {main="Akademos",sub="Wiseman Grip",ammo="Dosis Tathlum",
- head="Helios Band",neck="Mizu. Kubikazari",ear1="Barkarole Earring",ear2="Friomisi Earring",
- body="Helios Jacket",hands="Amalric Gages",ring1="Mujin Ring",ring2="Locus Ring",
- back="Bookworm's cape",waist="Refoccilation Stone",legs="Amalric Slops",feet="Helios Boots"}
- --Magic Burst--
- sets.magic_burst = {head="Helios band",neck="Mizukage-no-Kubikazari",body="Helios Jacket",hands="Amalric Gages",
- ring1="Locus Ring", ring2="Mujin Band",feet="Amalric Nails"}
- -- Custom refinements for certain nuke tiers
- sets.midcast['Elemental Magic'].HighTierNuke = set_combine(sets.midcast['Elemental Magic'],
- {sub="Willpower grip",ammo="Witchstone",hands="Amalric Gages",feet="Helios Boots"})
- sets.midcast['Elemental Magic'].HighTierNuke.Resistant = set_combine(sets.midcast['Elemental Magic'].Resistant,
- {sub="Willpower grip",body="Witching Robe",hands="Amalric Gages"})
- sets.midcast['Elemental Magic'].HighTierNuke.MBurst = {main="Akademos",sub="Willpower grip",ammo="Dosis Tathlum",
- head="Helios Band",neck="Mizu. Kubikazari",ear1="Barkarole Earring",ear2="Friomisi Earring",
- body="Amalric Doublet",hands="Amalric Gages",ring1="Mujin Ring",ring2="Locus Ring",
- back="Bookworm's cape",waist="Refoccilation Stone",legs="Amalric Slops",feet="Amalric Nails"}
- sets.midcast.Impact = {main="Akademos",sub="Mephitis Grip",ammo="Dosis Tathlum",
- head=empty,neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
- body="Twilight Cloak",hands="Lurid Mitts",ring1="Metamorph Ring",ring2="Sangoma Ring",
- back="Bookworm's Cape",waist="Eschan Stone",legs="Arbatel Pants +1",feet="Medium's Sabots"}
- -- Sets to return to when not performing an action.
- -- Resting sets
- sets.resting = {main="Bolelabunga",sub="Genbu's Shield",
- head="Befouled Crown",
- body="Witching Robe",hands="Serpentes Cuffs",legs="Assiduity Pants",feet="Serpentes Sabots"}
- -- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
- sets.idle.Town = {main="Akademos",sub="Willpower Grip",ammo="",
- head="Arbatel Bonnet",neck="Twilight Torque",ear1="",ear2="",
- body="Witching Robe",hands="",ring1="",ring2="Defending Ring",
- back="Izdubar Mantle",waist="",legs="Assiduity pants",feet="Herald's Gaiters"}
- sets.idle.Field = {main="Akademos",sub="Willpower grip",ammo="",
- head="Befouled Crown",neck="Twilight torque",ear1="Barkarole Earring",ear2="",
- body="Witching Robe",hands="Amalric Gages",ring1="Defending Ring",ring2="Vocane Ring",
- back="Izdubar Mantle",waist="Fucho-no-Obi",legs="Assiduity Pants",feet="Herald's Gaiters"}
- sets.idle.Field.PDT = {main="Mafic Cudgel",sub="Genbu's Shield",ammo="Impatiens",
- head="Hagondes Hat",neck="Twilight Torque",ear1="Sanare Earring",ear2="Spellbreaker Earring",
- body="Vrikodara Jupon",hands="Gendewitha Gages",ring1=gear.DarkRing.PDT,ring2="Defending Ring",
- back="Repulse Mantle",waist="Slipor Sash",legs="Hagondes pants",feet="Battlecast gaiters"}
- sets.idle.Field.MDT = {main="Bolelabunga",sub="Genbu's Shield",ammo="Impatiens",
- head="Arbatel Bonnet",neck="Twilight Torque",ear1="Sanare Earring",ear2="Spellbreaker Earring",
- body="Onca Suit",hands=empty,ring1=gear.DarkRing.PDT,ring2="Defending Ring",
- back="Hexerei cape",waist="Slipor Sash",legs=empty,feet=empty}
- sets.idle.Field.Hybrid = {main="Mafic Cudgel",sub="Genbu's Shield",ammo="Impatiens",
- head="Hagondes Hat",neck="Twilight Torque",ear1="Sanare Earring",ear2="Spellbreaker Earring",
- body="Onca Suit",hands=empty,ring1=gear.DarkRing.PDT,ring2="Defending Ring",
- back="Hexerei cape",waist="Slipor Sash",legs=empty,feet=empty}
- sets.idle.Field.Stun = {main="Akademos",sub="Mephitis Grip",ammo="Impatiens",
- head="Nahtirah Hat",neck="Aesir Torque",ear1="Enchanter earring +1",ear2="Loquacious Earring",
- body="Vrikodara jupon",hands="Gendewitha Gages",ring1="Prolix Ring",ring2="Sangoma Ring",
- back="Swith Cape",waist="Witful Belt",legs="Assiduity Pants",feet="Pedagogy loafers +1"}
- sets.idle.Weak = {main="Akademos",sub="Mephitis grip",ammo="Incantor Stone",
- head=empty,neck="Twilight Torque",ear1="Sanare Earring",ear2="",
- body="",hands="Gendewitha Gages",ring1="",ring2="",
- back="",waist="",legs="Assiduity Pants",feet=""}
- -- Defense sets
- sets.defense.PDT = {main="Mafic Cudgel",sub="Genbu's Shield",ammo="Impatiens",
- head="Arbatel Bonnet",neck="Twilight Torque",ear1="Sanare Earring",ear2="Spellbreaker Earring",
- body="Vrikodara Jupon",hands="Gendewitha Gages",ring1=gear.DarkRing.PDT,ring2="Defending Ring",
- back="Repulse Mantle",waist="Slipor Sash",legs="Hagondes pants",feet="Battlecast gaiters"}
- sets.defense.MDT = {main="Akademos",sub="Vallus grip",ammo="Incantor Stone",
- head="Nahtirah Hat",neck="Twilight Torque",ear1="Sanare Earring",ear2="Spellbreaker Earring",
- body="Vanya Robe",hands="Gendewitha Gages",ring1=gear.DarkRing.PDT,ring2="Defending Ring",
- back="Hexerei Cape",waist="Slipor Sash",legs="Hagondes pants",feet="Battlecast gaiters"}
- sets.Kiting = {ring1=""}
- sets.latent_refresh = {waist="Fucho-no-obi"}
- -- 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 = {
- head="Umuthi Hat",neck="Twilight Torque",ear1="Steelflash Earring",ear2="Bladeborn Earring",
- body="Onca Suit",hands=empty,ring1="Rajas Ring",ring2="Defending Ring",
- back="Hexerei Cape",waist="Eschan Stone",legs=empty,feet=empty}
- -- Elemental Obi/Twilight Cape --
- sets.Obi = {main="Akademos",back="Twilight Cape",waist='Hachirin-no-Obi'}
- -- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
- sets.buff['Ebullience'] = {head="Arbatel Bonnet"}
- sets.buff['Rapture'] = {head="Arbatel Bonnet"}
- sets.buff['Perpetuance'] = {hands="Arbatel bracers +1"}
- sets.buff['Immanence'] = {hands="Arbatel bracers +1", legs="Amalric Slops"}
- sets.buff['Penury'] = {legs="Arbatel pants +1"}
- sets.buff['Parsimony'] = {legs="Arbatel pants +1"}
- sets.buff['Celerity'] = {feet="Pedagogy Loafers +1"}
- sets.buff['Alacrity'] = {feet="Pedagogy Loafers +1"}
- sets.buff['Klimaform'] = {feet="Arbatel loafers +1"}
- sets.buff.FullSublimation = {head="Academic's Mortarboard +1", body="Pedagogy Gown +1", ear1="Savant's Earring"}
- sets.buff.PDTSublimation = {head="Academic's Mortarboard +1",ear1="Savant's Earring"}
- end
- -------------------------------------------------------------------------
- --Pretarget
- -------------------------------------------------------------------------
- function pretarget(spell,action)
- if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") and buffactive.silence then -- Auto Use Echo Drops If You Are Silenced --
- cancel_spell()
- send_command('input /item "Echo Drops" <me>')
- elseif spell.english:ifind("Cure") and player.mp<actualCost(spell.mp_cost) then
- degrade_spell(spell,Cure_Spells)
- elseif spell.english:ifind("Curaga") and player.mp<actualCost(spell.mp_cost) then
- degrade_spell(spell,Curaga_Spells)
- elseif buffactive['Light Arts'] or buffactive['Addendum: White'] then
- if spell.english == "Light Arts" and not buffactive['Addendum: White'] then
- cancel_spell()
- send_command('input /ja Addendum: White <me>')
- elseif spell.english == "Manifestation" then
- cancel_spell()
- send_command('input /ja Accession <me>')
- elseif spell.english == "Alacrity" then
- cancel_spell()
- send_command('input /ja Celerity <me>')
- elseif spell.english == "Parsimony" then
- cancel_spell()
- send_command('input /ja Penury <me>')
- end
- elseif buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
- if spell.english == "Dark Arts" and not buffactive['Addendum: Black'] then
- cancel_spell()
- send_command('input /ja Addendum: Black <me>')
- elseif spell.english == "Accession" then
- cancel_spell()
- send_command('input /ja Manifestation <me>')
- elseif spell.english == "Celerity" then
- cancel_spell()
- send_command('input /ja Alacrity <me>')
- elseif spell.english == "Penury" then
- cancel_spell()
- send_command('input /ja Parsimony <me>')
- end
- end
- end
- -----------------------------------------------------------------
- --Precast
- ------------------------------------------------------------------
- function job_precast(spell, action, spellMap, eventArgs)
- if spell.type:endswith('Magic') or spell.type == "Ninjutsu" then
- if buffactive.silence then -- Cancel Magic or Ninjutsu If You Are Silenced or Out of Range --
- cancel_spell()
- add_to_chat(123, spell.name..' Canceled: [Silenced or Out of Casting Range]')
- return
- else
- if string.find(spell.english,'Cur') and spell.english ~= "Cursna" then
- equip(sets.precast.FC.Cure)
- elseif spell.english == "Impact" then
- equip(set_combine(sets.precast.FC,{body="Twilight Cloak"}))
- elseif spell.type == WhiteMagic and buffactive['Light Arts'] then
- equip(sets.precast.FC.Arts)
- elseif spell.type == BlackMagic and buffactive['Dark Arts'] then
- equip(sets.precast.FC.Arts)
- else
- equip(sets.precast.FC)
- end
- end
- end
- end
- -----------------------------------------------------------------------
- --Midcast
- -------------------------------------------------------------------------
- function job_post_midcast(spell, action, spellMap, eventArgs)
- if spell.skill == 'Elemental Magic' and state.MagicBurst.value then
- equip(sets.magic_burst)
- end
- if spell.skill == 'Elemental Magic' then
- if spell.element == world.day_element or spell.element == world.weather_element then
- equip(equipSet, sets.Obi)
- end
- end
- end
- function job_midcast(spell, action, spellMap, eventArgs)
- equipSet = {}
- if spell.type:endswith('Magic') or spell.type == 'Ninjutsu' or spell.type == 'BardSong' then
- equipSet = sets.midcast
- elseif string.find(spell.english,'Cure') then
- equipSet = equipSet.Cure
- elseif string.find(spell.english,'Cura') then
- equipSet = equipSet.Curaga
- elseif string.find(spell.english,'Banish') then
- equipSet = set_combine(equipSet.MndEnfeebles)
- elseif spell.english == "Stoneskin" then
- equipSet = equipSet.Stoneskin
- if buffactive.Stoneskin then
- send_command('cancel stoneskin')
- end
- elseif spell.english == "Sneak" then
- if spell.target.name == player.name and buffactive['Sneak'] then
- send_command('cancel sneak')
- end
- equipSet = equipSet.Haste
- elseif string.find(spell.english,'Utsusemi') then
- if spell.english == 'Utsusemi: Ichi' and (buffactive['Copy Image'] or buffactive['Copy Image (2)']) then
- send_command('@wait 1.7;cancel Copy Image*')
- end
- equipSet = equipSet.Haste
- elseif spell.english == 'Monomi: Ichi' then
- if buffactive['Sneak'] then
- send_command('@wait 1.7;cancel sneak')
- end
- equipSet = equipSet.Haste
- else
- if equipSet[spell.english] then
- equipSet = equipSet[spell.english]
- end
- if equipSet[spell.skill] then
- equipSet = equipSet[spell.skill]
- end
- if equipSet[spell.type] then
- equipSet = equipSet[spell.type]
- end
- if string.find(spell.english,'Cure') and (world.weather_element == spell.element) or (world.day_element == spell.element) then
- equipSet = set_combine(equipSet,sets.Obi)
- end
- if ((spell.english == 'Drain') or (spell.english == 'Aspir')) and ((world.day_element == spell.element) or (world.weather_element == spell.element)) then
- equipSet = set_combine(equipSet,sets.Obi)
- end
- end
- if equipSet[spell.english] then
- equipSet = equipSet[spell.english]
- end
- equip(equipSet)
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Job-specific hooks for standard casting events.
- -------------------------------------------------------------------------------------------------------------------
- -- Run after the general midcast() is done.
- function job_post_midcast(spell, action, spellMap, eventArgs)
- if spell.action_type == 'Magic' then
- apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
- end
- if spell.skill == 'Elemental Magic' then
- if spell.element == world.day_element or spell.element == world.weather_element then
- equip(equipSet, sets.Obi)
- if string.find(spell.english,'helix') then
- equip(sets.midcast.Helix)
- end
- end
- end
- if not spell.interrupted then
- if spell.english == "Sleep II" then -- Sleep II Countdown --
- send_command('wait 60;input /echo Sleep Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep Effect: [WEARING OFF IN 5 SEC.]')
- elseif spell.english == "Sleep" or spell.english == "Sleepga" then -- Sleep & Sleepga Countdown --
- send_command('wait 30;input /echo Sleep Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep Effect: [WEARING OFF IN 5 SEC.]')
- elseif spell.english == "Break" then -- Break Countdown --
- send_command('wait 25;input /echo Break Effect: [WEARING OFF IN 5 SEC.]')
- elseif spell.english == "Paralyze" then -- Paralyze Countdown --
- send_command('wait 115;input /echo Paralyze Effect: [WEARING OFF IN 5 SEC.]')
- elseif spell.english == "Slow" then -- Slow Countdown --
- send_command('wait 115;input /echo Slow Effect: [WEARING OFF IN 5 SEC.]')
- elseif spell.english == "Banish II" then -- Banish II Countdown --
- send_command('wait 20;input /echo Banish Effect: [WEARING OFF IN 10 SEC.]')
- end
- end
- 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)
- if buff == "Sublimation: Activated" then
- handle_equipping_gear(player.status)
- end
- end
- -- Handle notifications of general user state change.
- function job_state_change(stateField, newValue, oldValue)
- if stateField == 'Offense Mode' then
- if newValue == 'Normal' then
- disable('main','sub','range')
- else
- enable('main','sub','range')
- end
- end
- end
- -------------------------------------------------------------------------------------------------------------------
- -- User code that supplements standard library decisions.
- -------------------------------------------------------------------------------------------------------------------
- -- Custom spell mapping.
- function job_get_spell_map(spell, default_spell_map)
- if spell.action_type == 'Magic' then
- if default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
- if world.weather_element == 'Light' then
- return 'CureWithLightWeather'
- end
- elseif spell.skill == 'Enfeebling Magic' then
- if spell.type == 'WhiteMagic' then
- return 'MndEnfeebles'
- else
- return 'IntEnfeebles'
- end
- elseif spell.skill == 'Elemental Magic' then
- if info.low_nukes:contains(spell.english) then
- return 'LowTierNuke'
- elseif info.mid_nukes:contains(spell.english) then
- return 'MidTierNuke'
- elseif info.high_nukes:contains(spell.english) then
- return 'HighTierNuke'
- end
- end
- end
- end
- function customize_idle_set(idleSet)
- if state.Buff['Sublimation: Activated'] then
- if state.IdleMode.value == 'Normal' then
- idleSet = set_combine(idleSet, sets.buff.FullSublimation)
- elseif state.IdleMode.value == 'PDT' then
- idleSet = set_combine(idleSet, sets.buff.PDTSublimation)
- end
- end
- if player.mpp < 51 then
- idleSet = set_combine(idleSet, sets.latent_refresh)
- end
- return idleSet
- end
- -- Called by the 'update' self-command.
- function job_update(cmdParams, eventArgs)
- if cmdParams[1] == 'user' and not (buffactive['light arts'] or buffactive['dark arts'] or
- buffactive['addendum: white'] or buffactive['addendum: black']) then
- if state.IdleMode.value == 'Stun' then
- send_command('@input /ja "Dark Arts" <me>')
- else
- send_command('@input /ja "Light Arts" <me>')
- end
- end
- update_active_strategems()
- update_sublimation()
- 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)
- display_current_caster_state()
- eventArgs.handled = true
- end
- -------------------------------------------------------------------------------------------------------------------
- -- User code that supplements self-commands.
- -------------------------------------------------------------------------------------------------------------------
- -- Called for direct player commands.
- function job_self_command(cmdParams, eventArgs)
- if cmdParams[1]:lower() == 'scholar' then
- handle_strategems(cmdParams)
- eventArgs.handled = true
- end
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Utility functions specific to this job.
- -------------------------------------------------------------------------------------------------------------------
- -- Reset the state vars tracking strategems.
- function update_active_strategems()
- state.Buff['Ebullience'] = buffactive['Ebullience'] or false
- state.Buff['Rapture'] = buffactive['Rapture'] or false
- state.Buff['Perpetuance'] = buffactive['Perpetuance'] or false
- state.Buff['Immanence'] = buffactive['Immanence'] or false
- state.Buff['Penury'] = buffactive['Penury'] or false
- state.Buff['Parsimony'] = buffactive['Parsimony'] or false
- state.Buff['Celerity'] = buffactive['Celerity'] or false
- state.Buff['Alacrity'] = buffactive['Alacrity'] or false
- state.Buff['Klimaform'] = buffactive['Klimaform'] or false
- end
- function update_sublimation()
- state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
- end
- -- Equip sets appropriate to the active buffs, relative to the spell being cast.
- function apply_grimoire_bonuses(spell, action, spellMap)
- if state.Buff.Perpetuance and spell.type =='WhiteMagic' and spell.skill == 'Enhancing Magic' then
- equip(sets.buff['Perpetuance'])
- end
- if state.Buff.Rapture and (spellMap == 'Cure' or spellMap == 'Curaga') then
- equip(sets.buff['Rapture'])
- end
- if spell.skill == 'Elemental Magic' and spellMap ~= 'ElementalEnfeeble' then
- if state.Buff.Ebullience and spell.english ~= 'Impact' then
- equip(sets.buff['Ebullience'])
- end
- if state.Buff.Immanence then
- equip(sets.buff['Immanence'])
- end
- if state.Buff.Klimaform and spell.element == world.weather_element then
- equip(sets.buff['Klimaform'])
- end
- end
- if state.Buff.Penury then equip(sets.buff['Penury']) end
- if state.Buff.Parsimony then equip(sets.buff['Parsimony']) end
- if state.Buff.Celerity then equip(sets.buff['Celerity']) end
- if state.Buff.Alacrity then equip(sets.buff['Alacrity']) end
- end
- -- General handling of strategems in an Arts-agnostic way.
- -- Format: gs c scholar <strategem>
- function handle_strategems(cmdParams)
- -- cmdParams[1] == 'scholar'
- -- cmdParams[2] == strategem to use
- if not cmdParams[2] then
- add_to_chat(123,'Error: No strategem command given.')
- return
- end
- local currentStrats = get_current_strategem_count()
- local newStratCount = currentStrats - 1
- if currentStrats > 0 then
- add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
- else
- add_to_chat(122, '***Out of stratagems! Cancelling...***')
- return
- end
- local strategem = cmdParams[2]:lower()
- if strategem == 'light' then
- if buffactive['light arts'] then
- send_command('input /ja "Addendum: White" <me>')
- elseif buffactive['addendum: white'] then
- add_to_chat(122,'Error: Addendum: White is already active.')
- else
- send_command('input /ja "Light Arts" <me>')
- end
- elseif strategem == 'dark' then
- if buffactive['dark arts'] then
- send_command('input /ja "Addendum: Black" <me>')
- elseif buffactive['addendum: black'] then
- add_to_chat(122,'Error: Addendum: Black is already active.')
- else
- send_command('input /ja "Dark Arts" <me>')
- end
- elseif buffactive['light arts'] or buffactive['addendum: white'] then
- if strategem == 'cost' then
- send_command('input /ja Penury <me>')
- elseif strategem == 'speed' then
- send_command('input /ja Celerity <me>')
- elseif strategem == 'aoe' then
- send_command('input /ja Accession <me>')
- elseif strategem == 'power' then
- send_command('input /ja Rapture <me>')
- elseif strategem == 'duration' then
- send_command('input /ja Perpetuance <me>')
- elseif strategem == 'accuracy' then
- send_command('input /ja Altruism <me>')
- elseif strategem == 'enmity' then
- send_command('input /ja Tranquility <me>')
- elseif strategem == 'skillchain' then
- add_to_chat(122,'Error: Light Arts does not have a skillchain strategem.')
- elseif strategem == 'addendum' then
- send_command('input /ja "Addendum: White" <me>')
- else
- add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
- end
- elseif buffactive['dark arts'] or buffactive['addendum: black'] then
- if strategem == 'cost' then
- send_command('input /ja Parsimony <me>')
- elseif strategem == 'speed' then
- send_command('input /ja Alacrity <me>')
- elseif strategem == 'aoe' then
- send_command('input /ja Manifestation <me>')
- elseif strategem == 'power' then
- send_command('input /ja Ebullience <me>')
- elseif strategem == 'duration' then
- add_to_chat(122,'Error: Dark Arts does not have a duration strategem.')
- elseif strategem == 'accuracy' then
- send_command('input /ja Focalization <me>')
- elseif strategem == 'enmity' then
- send_command('input /ja Equanimity <me>')
- elseif strategem == 'skillchain' then
- send_command('input /ja Immanence <me>')
- elseif strategem == 'addendum' then
- send_command('input /ja "Addendum: Black" <me>')
- else
- add_to_chat(123,'Error: Unknown strategem ['..strategem..']')
- end
- else
- add_to_chat(123,'No arts has been activated yet.')
- end
- end
- -- Gets the current number of available strategems based on the recast remaining
- -- and the level of the sch.
- function get_current_strategem_count()
- -- returns recast in seconds.
- local allRecasts = windower.ffxi.get_ability_recasts()
- local stratsRecast = allRecasts[231]
- local maxStrategems = (player.main_job_level + 10) / 20
- local fullRechargeTime = 5*33
- local currentCharges = math.floor(maxStrategems - maxStrategems * stratsRecast / fullRechargeTime)
- return currentCharges
- end
- -- Select default macro book on initial load or subjob change.
- function select_default_macro_book()
- set_macro_page(5, 13)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement