Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -------------------------------------------------------------------------------------------------------------------
- -- Setup functions for this job. Generally should not be modified.
- -------------------------------------------------------------------------------------------------------------------
- -- Initialization function for this job file.
- function get_sets()
- mote_include_version = 2
- -- Load and initialize the include file.
- include('Mote-Include.lua')
- end
- -- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
- function job_setup()
- 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', 'Proc')
- state.IdleMode:options('Normal', 'PDT')
- state.MagicBurst = M(false, 'Magic Burst')
- lowTierNukes = S{'Stone', 'Water', 'Aero', 'Fire', 'Blizzard', 'Thunder',
- 'Stone II', 'Water II', 'Aero II', 'Fire II', 'Blizzard II', 'Thunder II',
- 'Stone III', 'Water III', 'Aero III', 'Fire III', 'Blizzard III', 'Thunder III',
- 'Stonega', 'Waterga', 'Aeroga', 'Firaga', 'Blizzaga', 'Thundaga',
- 'Stonega II', 'Waterga II', 'Aeroga II', 'Firaga II', 'Blizzaga II', 'Thundaga II'}
- gear.macc_hagondes = {name="Hagondes Cuffs", augments={'Phys. dmg. taken -3%','Mag. Acc.+29'}}
- ShadowType = 'None'
- -- Additional local binds
- send_command('bind ^` input /ma Stun <t>')
- send_command('bind @` gs c activate MagicBurst')
- select_default_macro_book()
- 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()
- --------------------------------------
- -- Start defining the sets
- --------------------------------------
- ---- Precast Sets ----
- -- Precast sets to enhance JAs
- sets.precast.JA['Mana Wall'] = {feet="Goetia Sabots +2"}
- sets.precast.JA.Manafont = {body="Sorcerer's Coat +2"}
- -- equip to maximize HP (for Tarus) and minimize MP loss before using convert
- sets.precast.JA.Convert = {}
- -- Fast cast sets for spells
- sets.precast.FC = {sub="Vivid strap +1",
- head="Walahra turban",ear2="Loquacious Earring",
- waist="headlong belt"}
- sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
- sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {neck="Stoicheion Medal"})
- sets.precast.FC.Cure = set_combine(sets.precast.FC, {body="Heka's Kalasiris", back="Pahtli Cape"})
- sets.precast.FC.Curaga = sets.precast.FC.Cure
- -- Weaponskill sets
- -- Default set for any weaponskill that isn't any more specifically defined
- sets.precast.WS = {
- head="Hagondes Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
- body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Rajas Ring",ring2="Icesoul Ring",
- back="Refraction Cape",waist="Cognition Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
- -- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
- sets.precast.WS['Vidohunir'] = {ammo="Dosis Tathlum",
- head="Hagondes Hat",neck="Eddy Necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
- body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Icesoul Ring",ring2="Acumen Ring",
- back="Toro Cape",waist="Thunder Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
- ---- Midcast Sets ----
- sets.midcast.FastRecast = {sub="Vivid strap +1",
- head="Walahra turban",ear2="Loquacious Earring",
- waist="headlong belt"}
- sets.midcast.Cure = {main="Chatoyant Staff",sub="Vivid strap +1",
- head="Goliard Chapeau",neck="Fylgja Torque +1",ear1="Roundel Earring",ear2="Loquacious Earring",
- body="Mahatma Houppelande",hands="Mahatma Cuffs",ring1="Celestial Ring",ring2="Celestial Ring",
- back="Ixion Cape",waist=gear.ElementalObi,legs="Mahatma Slops",feet="Goliard clogs"}
- sets.midcast.Curaga = sets.midcast.Cure
- sets.midcast['Enhancing Magic'] = {main="Chatoyant Staff",sub="Vivid strap +1",
- head="Goliard Chapeau",neck="Enhancing Torque",ear1="Augment. Earring",ear2="Loquacious Earring",
- body="Goliard saio",hands="Mahatma Cuffs",ring1="Celestial Ring",ring2="Celestial Ring",
- legs="Mahatma Slops",waist=gear.ElementalObi,legs="Genie Huaraches"}
- sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {waist="Siegel Sash"})
- sets.midcast['Enfeebling Magic'] = {main="Chatoyant Staff",sub="Vivid strap +1",
- head="Genie Tiara",neck="Enfeebling Torque",ear1="Incubus Earring +1",ear2="Incubus Earring +1",
- body="Wizard's Coat +1",hands="Oracle's Gloves",ring1="Omniscient Ring +1",ring2="Omniscient Ring +1",
- back="Refraction Cape",waist="Witch Sash",legs="Genie Lappas",feet="Goliard Clogs"}
- sets.midcast.ElementalEnfeeble = sets.midcast['Enfeebling Magic']
- sets.midcast['Dark Magic'] = {main="Chatoyant Staff",sub="Dark Grip",ammo="Phtm. Tathlum",
- head="Sorcerer's Petasos +1",neck="Dark Torque",ear1="Dark Earring",ear2="Incubus Earring +1",
- body="Oracle's Robe",hands="Sorcerer's Gloves +1",ring1="Omniscient Ring +1",ring2="Omniscient Ring +1",
- back="Hecate's Cape",waist="Witch Sash",legs="Wizard's Tonban +1",feet="Genie Huaraches"}
- sets.midcast.Drain = {main="Diabolos's Pole",sub="Dark grip",ammo="Phtm. Tathlum",
- head="Sorcerer's Petasos +1",neck="Dark Torque",ear1="Dark Earring",ear2="Incubus Earring +1",
- body="Oracle's Robe",hands="Sorcerer's Gloves +1",ring1="Diabolos's Ring",ring2="Omniscient Ring +1",
- back="Hecate's Cape",waist="Witch Sash",legs="Wizard's Tonban +1",feet="Genie Huaraches"}
- sets.midcast.Aspir = sets.midcast.Drain
- sets.midcast.Stun = {main="Chatoyant Staff",sub="Thunder Grip",ammo="Phtm. Tathlum",
- head="Sorcerer's Petasos +1",neck="Dark Torque",ear1="Dark Earring",ear2="Incubus Earring +1",
- body="Oracle's Robe",hands="Sorcerer's Gloves +1",ring1="Omniscient Ring +1",ring2="Omniscient Ring +1",
- back="Hecate's Cape",waist="Witch Sash",legs="Wizard's Tonban +1",feet="Genie Huaraches"}
- --[[sets.midcast.BardSong = {main="Lehbrailg +2",sub="Mephitis Grip",ammo="Sturm's Report",
- head="Nahtirah Hat",neck="Weike Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
- body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
- back="Refraction Cape",legs="Bokwus Slops",feet="Bokwus Boots"}]]-- not used
- -- Elemental Magic sets
- sets.midcast['Elemental Magic'] = {main="Chatoyant Staff",sub="Vivid strap +1",ammo="Phtm. Tathlum",
- head="Sorcerer's Petasos +1",neck="Lemegeton medallion +1",ear1="Moldavite Earring",ear2="Crapaud Earring",
- body="Genie Weskit",hands="Zenith Mitts +1",ring1="Omniscient Ring +1",ring2="Omniscient Ring +1",
- back="Hecate's Cape",waist="Witch Sash",legs="Mahatma Slops",feet="Goliard clogs"}
- sets.midcast['Elemental Magic'].Resistant = {main="Chatoyant Staff",sub="Vivid strap +1",ammo="Phtm. Tathlum",
- head="Sorcerer's Petasos +1",neck="Lemegeton medallion +1",ear1="Moldavite Earring",ear2="Elemental Earring",
- body="Oracle's Robe",hands="Genie manillas",ring1="Omniscient Ring +1",ring2="Omniscient Ring +1",
- back="Hecate's Cape",waist="Witch Sash",legs="Mahatma Slops",feet="Goliard clogs"}--waist=gear.ElementalObi
- sets.midcast['Elemental Magic'].HighTierNuke = set_combine(sets.midcast['Elemental Magic'], {sub="Wizzan Grip"})
- sets.midcast['Elemental Magic'].HighTierNuke.Resistant = set_combine(sets.midcast['Elemental Magic'], {sub="Wizzan Grip"})
- -- Minimal damage gear for procs.
- sets.midcast['Elemental Magic'].Proc = {main="Earth Staff", sub="Mephitis Grip",ammo="Impatiens",
- head="Nahtirah Hat",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
- body="Manasa Chasuble",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
- back="Swith Cape +1",waist="Witful Belt",legs="Nares Trews",feet="Chelona Boots +1"}
- -- Sets to return to when not performing an action.
- -- Resting sets
- sets.resting = {main="Imperial Wand",ammo="Legion Scutum",
- head="Oracle's Cap",neck="Beak Necklace +1",ear1="Rapture Earring",ear2="Antivenom Earring",
- body="Oracle's robe",hands="Oracle's Gloves",ring1="Celestial Ring",ring2="Celestial Ring",
- back="Invigorating Cape",waist="headlong belt",legs="Oracle's braconi",feet="Numerist Pumps"}
- -- Idle sets
- -- Normal refresh idle set
- sets.idle = {main="Terra's Staff",sub="Vivid strap +1",ammo="Phtm. Tathlum",
- head="Sorcerer's petasos +1",neck="Orochi Nodowa +1",ear1="Sorcerer's Earring",ear2="Antivenom Earring",
- body="Dalmatica +1",hands="Sorcerer's Gloves +1",ring1="Celestial Ring",ring2="Celestial Ring",
- back="Umbra Cape",waist="Headlong Belt",legs="Mahatma Slops",feet="Herald's Gaiters"}
- -- Town gear.
- sets.idle.Town = {main="Terra's Staff",sub="Vivid strap +1",ammo="Phtm. Tathlum",
- head="Sorcerer's petasos +1",neck="Orochi Nodowa +1",ear1="Sorcerer's Earring",ear2="Antivenom Earring",
- body="Dalmatica +1",hands="Sorcerer's Gloves +1",ring1="Celestial Ring",ring2="Celestial Ring",
- back="Umbra Cape",waist="Headlong Belt",legs="Mahatma Slops",feet="Herald's Gaiters"}
- -- Idle mode that keeps PDT gear on, but doesn't prevent normal gear swaps for precast/etc.
- sets.idle.PDT = {main="Terra's Staff",sub="Vivid strap +1",ammo="Phtm. Tathlum",
- head="Genie tiara",neck="Orochi Nodowa +1",ear1="Sorcerer's Earring",ear2="Loquacious Earring",
- body="Sorcerer's Coat +1",hands="Genie Manillas",ring1="Defending Ring",ring2=gear.DarkRing.physical,
- back="Umbra Cape",waist="Headlong Belt",legs="Genie Lappas",feet="Herald's Gaiters"}
- -- Idle mode when weak.
- sets.idle.Weak = {main="Terra's Staff",sub="Vivid strap +1",ammo="Phtm. Tathlum",
- head="Genie tiara",neck="Orochi Nodowa +1",ear1="Sorcerer's Earring",ear2="Loquacious Earring",
- body="Sorcerer's Coat +1",hands="Genie Manillas",ring1="Defending Ring",ring2=gear.DarkRing.physical,
- back="Umbra Cape",waist="Headlong Belt",legs="Genie Lappas",feet="Herald's Gaiters"}
- -- Defense sets
- sets.defense.PDT = {main="Terra's Staff",sub="Vivid strap +1",ammo="Phtm. Tathlum",
- head="Genie tiara",neck="Orochi Nodowa +1",ear1="Sorcerer's Earring",ear2="Loquacious Earring",
- body="Sorcerer's Coat +1",hands="Genie Manillas",ring1="Defending Ring",ring2=gear.DarkRing.physical,
- back="Umbra Cape",waist="Headlong Belt",legs="Genie Lappas",feet="Herald's Gaiters"}
- --MDT set needs update
- sets.defense.MDT = {ammo="Demonry Stone",
- head="Nahtirah Hat",neck="Twilight Torque",
- body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2="Shadow Ring",
- back="Tuilha Cape",waist="Hierarch Belt",legs="Bokwus Slops",feet="Hagondes Sabots"}
- sets.Kiting = {feet="Herald's Gaiters"}
- sets.latent_refresh = {waist="Fucho-no-obi"}
- sets.midcast.pendant = {neck="Uggalepih Pendant"}
- sets.midcast.ring = {ring1="Sorcerer's Ring"}
- -- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
- sets.buff['Mana Wall'] = {feet="Goetia Sabots +2"}
- sets.magic_burst = {neck="Mizukage-no-Kubikazari"}
- -- 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 needs update
- sets.engaged = {
- head="Zelus Tiara",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
- body="Hagondes Coat",hands="Bokwus Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
- back="Umbra Cape",waist="Goading Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Job-specific hooks for standard casting events.
- -------------------------------------------------------------------------------------------------------------------
- -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
- -- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
- function job_precast(spell, action, spellMap, eventArgs)
- if spellMap == 'Cure' or spellMap == 'Curaga' then
- gear.default.obi_waist = "Goading Belt"
- elseif spell.skill == 'Elemental Magic' then
- gear.default.obi_waist = "Sekhmet Corset"
- if state.CastingMode.value == 'Proc' then
- classes.CustomClass = 'Proc'
- end
- end
- end
- -- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
- function job_midcast(spell, action, spellMap, eventArgs)
- end
- function job_post_midcast(spell, action, spellMap, eventArgs)
- -- Use Aquilo's if casting ice nukes.
- if spell.element == "Ice" and spell.skill == "Elemental Magic" then
- equip({main="Aquilo's Staff"})
- end
- --MAB +8 Active while MP is less than 51%.
- if spell.skill == "Elemental Magic" and player.mpp < 51 then
- equip({neck="Uggalepih Pendant"})
- end
- --MAB +10 Active while HP < 76% (yellow or lower) and TP < 100%.
- if spell.skill == "Elemental Magic" and player.hpp < 76 and player.tp < 100 then
- equip({ring1="Sorcerer's Ring"})
- end
- --Adds 5% to spells with same element as the current day.
- if spell.skill == "Elemental Magic" and spell.element == world.day_element then
- equip({legs="Sorcerer's Tonban +1"})
- end
- --Day/Weather/SCH buff check to equip the correct obi.
- if spell and spell.element == world.day_element or spell.element == world.weather_element or spell.element == buffactive[elements.storm_of[spell.element]]then
- equip({waist=gear.ElementalObi})
- end
- -- Ninjutsu
- if spell.skill == "Ninjutsu" then
- equip(sets.midcast.Recast)
- if spell.name == 'Utsusemi: Ichi' and ShadowType == 'Ni' then
- if buffactive['Copy Image'] then
- windower.ffxi.cancel_buff(66)
- elseif buffactive['Copy Image (2)'] then
- windower.ffxi.cancel_buff(444)
- elseif buffactive['Copy Image (3)'] then
- windower.ffxi.cancel_buff(445)
- elseif buffactive['Copy Image (4+)'] then
- windower.ffxi.cancel_buff(446)
- end
- elseif spell.name == 'Monomi: Ichi' and buffactive.Sneak and spell.target.type == 'SELF' then
- windower.ffxi.cancel_buff(71)
- end
- end
- end
- function job_aftercast(spell, action, spellMap, eventArgs)
- -- Lock feet after using Mana Wall.
- if not spell.interrupted then
- if spell.english == 'Mana Wall' then
- enable('feet')
- equip(sets.buff['Mana Wall'])
- disable('feet')
- elseif spell.skill == 'Elemental Magic' then
- state.MagicBurst:reset()
- end
- end
- -- Sleep Timers
- if spell.name == "Sleep II" or spell.name == "Sleepga II" or spell.name == "Repose" or spell.name == "Dream Flower" then
- windower.send_command('wait 75;input /echo [ WARNING! '..spell.name..' : Will wear off within 0:15 ]')
- windower.send_command('wait 80;input /echo [ WARNING! '..spell.name..' : Will wear off within 0:10 ]')
- windower.send_command('wait 85;input /echo [ WARNING! '..spell.name..' : Will wear off within 0:05 ]')
- elseif spell.name == "Sleep" or spell.name == "Sleepga" then
- windower.send_command('wait 45;input /echo [ WARNING! '..spell.name..' : Will wear off within 0:15 ]')
- windower.send_command('wait 50;input /echo [ WARNING! '..spell.name..' : Will wear off within 0:10 ]')
- windower.send_command('wait 55;input /echo [ WARNING! '..spell.name..' : Will wear off within 0:05 ]')
- end
- -- Convert
- if spell.name == 'Convert' then
- windower.send_command('wait 2;input /ma "Cure IV" me')
- end
- -- Changes shadow type variable to allow cancel Copy Image if last cast was Utsusemi: Ni
- if spell and spell.name == 'Utsusemi: Ni' then
- ShadowType = 'Ni'
- elseif spell and spell.name == 'Utsusemi: Ichi' then
- ShadowType = 'Ichi'
- 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)
- -- Unlock feet when Mana Wall buff is lost.
- if buff == "Mana Wall" and not gain then
- enable('feet')
- 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.skill == 'Elemental Magic' and default_spell_map ~= 'ElementalEnfeeble' then
- --[[ No real need to differentiate with current gear.
- if lowTierNukes:contains(spell.english) then
- return 'LowTierNuke'
- else
- return 'HighTierNuke'
- end
- --]]
- end
- end
- -- Modify the default idle set after it was constructed.
- function customize_idle_set(idleSet)
- if player.mpp < 51 then
- idleSet = set_combine(idleSet, sets.latent_refresh)
- end
- return idleSet
- end
- -- Function to display the current relevant user state when doing an update.
- function display_current_job_state(eventArgs)
- display_current_caster_state()
- eventArgs.handled = true
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Utility functions specific to this job.
- -------------------------------------------------------------------------------------------------------------------
- -- Select default macro book on initial load or subjob change.
- function select_default_macro_book()
- set_macro_page(1, 6)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement