Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -------------------------------------------------------------------------------------------------------------------
- -------------------------------------------------------------------------------------------------------------------
- -- Initialization function that defines sets and variables to be used.
- -------------------------------------------------------------------------------------------------------------------
- -- IMPORTANT: Make sure to also get the Mote-Include.lua file (and it's supplementary files) to go with this.
- -- Also, you'll need the Shortcuts addon to handle the auto-targetting of the custom pact commands.
- --[[
- Custom commands:
- gs c petweather
- Automatically casts the storm appropriate for the current avatar, if possible.
- gs c siphon
- Automatically run the process to: dismiss the current avatar; cast appropriate
- weather; summon the appropriate spirit; Elemental Siphon; release the spirit;
- and re-summon the avatar.
- Will not cast weather you do not have access to.
- Will not re-summon the avatar if one was not out in the first place.
- Will not release the spirit if it was out before the command was issued.
- gs c pact [PactType]
- Attempts to use the indicated pact type for the current avatar.
- PactType can be one of:
- cure
- curaga
- buffOffense
- buffDefense
- buffSpecial
- debuff1
- debuff2
- sleep
- nuke2
- nuke4
- bp70
- bp75 (merits and lvl 75-80 pacts)
- astralflow
- --]]
- -- Initialization function for this job file.
- function get_sets()
- -- Load and initialize the include file.
- include('Mote-Include.lua')
- end
- -- Setup vars that are user-independent.
- function job_setup()
- state.Buff["Avatar's Favor"] = buffactive["Avatar's Favor"] or false
- debuffs = S{"Dia","Dia II","Bio","Bio II","Distract", "Frazzle", "Dispel", "Silence", "Slow", "Paralyze", "Sleep", "Sleep II", "Gravity", "Diaga", "Poison II", "Poison", "Blind", "Bind"}
- debuffs_acc = S{"Sleep", "Sleep II", "Bind", "Dispel", "Silence", "Gravity"}
- spirits = S{"LightSpirit", "DarkSpirit", "FireSpirit", "EarthSpirit", "WaterSpirit", "AirSpirit", "IceSpirit", "ThunderSpirit"}
- avatars = S{"Carbuncle", "Fenrir", "Diabolos", "Ifrit", "Titan", "Leviathan", "Garuda", "Shiva", "Ramuh", "Odin", "Alexander", "Cait Sith"}
- magicalRagePacts = S{
- 'Inferno','Earthen Fury','Tidal Wave','Aerial Blast','Diamond Dust','Judgment Bolt','Searing Light','Howling Moon','Ruinous Omen',
- 'Fire II','Stone II','Water II','Aero II','Blizzard II','Thunder II',
- 'Fire IV','Stone IV','Water IV','Aero IV','Blizzard IV','Thunder IV',
- 'Thunderspark','Burning Strike','Meteorite','Nether Blast','Flaming Crush',
- 'Meteor Strike','Heavenly Strike','Wind Blade','Geocrush','Grand Fall','Thunderstorm',
- 'Holy Mist','Lunar Bay','Night Terror','Level ? Holy','Conflag Strike'}
- pacts = {}
- pacts.cure = {['Carbuncle']='Healing Ruby'}
- pacts.curaga = {['Carbuncle']='Healing Ruby II', ['Garuda']='Whispering Wind', ['Leviathan']='Spring Water'}
- pacts.buffoffense = {['Carbuncle']='Glittering Ruby', ['Ifrit']='Crimson Howl', ['Garuda']='Hastega', ['Ramuh']='Rolling Thunder',
- ['Fenrir']='Ecliptic Growl'}
- pacts.buffdefense = {['Carbuncle']='Shining Ruby', ['Shiva']='Frost Armor', ['Garuda']='Aerial Armor', ['Titan']='Earthen Ward',
- ['Ramuh']='Lightning Armor', ['Fenrir']='Ecliptic Howl', ['Diabolos']='Noctoshield', ['Cait Sith']='Reraise II'}
- pacts.buffspecial = {['Ifrit']='Inferno Howl', ['Garuda']='Fleet Wind', ['Titan']='Earthen Armor', ['Diabolos']='Dream Shroud',
- ['Carbuncle']='Soothing Ruby', ['Fenrir']='Heavenward Howl', ['Cait Sith']='Raise II'}
- pacts.debuff1 = {['Shiva']='Diamond Storm', ['Ramuh']='Shock Squall', ['Leviathan']='Tidal Roar', ['Fenrir']='Lunar Cry',
- ['Diabolos']='Pavor Nocturnus', ['Cait Sith']='Eerie Eye'}
- pacts.debuff2 = {['Shiva']='Sleepga', ['Leviathan']='Slowga', ['Fenrir']='Lunar Roar', ['Diabolos']='Somnolence'}
- pacts.sleep = {['Shiva']='Sleepga', ['Diabolos']='Nightmare', ['Cait Sith']='Mewing Lullaby'}
- pacts.nuke2 = {['Ifrit']='Fire II', ['Shiva']='Blizzard II', ['Garuda']='Aero II', ['Titan']='Stone II',
- ['Ramuh']='Thunder II', ['Leviathan']='Water II'}
- pacts.nuke4 = {['Ifrit']='Fire IV', ['Shiva']='Blizzard IV', ['Garuda']='Aero IV', ['Titan']='Stone IV',
- ['Ramuh']='Thunder IV', ['Leviathan']='Water IV'}
- pacts.bp70 = {['Ifrit']='Flaming Crush', ['Shiva']='Rush', ['Garuda']='Predator Claws', ['Titan']='Mountain Buster',
- ['Ramuh']='Chaotic Strike', ['Leviathan']='Spinning Dive', ['Carbuncle']='Meteorite', ['Fenrir']='Eclipse Bite',
- ['Diabolos']='Nether Blast',['Cait Sith']='Regal Scratch'}
- pacts.bp75 = {['Ifrit']='Meteor Strike', ['Shiva']='Heavenly Strike', ['Garuda']='Wind Blade', ['Titan']='Geocrush',
- ['Ramuh']='Thunderstorm', ['Leviathan']='Grand Fall', ['Carbuncle']='Holy Mist', ['Fenrir']='Lunar Bay',
- ['Diabolos']='Night Terror', ['Cait Sith']='Level ? Holy'}
- pacts.astralflow = {['Ifrit']='Inferno', ['Shiva']='Diamond Dust', ['Garuda']='Aerial Blast', ['Titan']='Earthen Fury',
- ['Ramuh']='Judgment Bolt', ['Leviathan']='Tidal Wave', ['Carbuncle']='Searing Light', ['Fenrir']='Howling Moon',
- ['Diabolos']='Ruinous Omen', ['Cait Sith']="Altana's Favor"}
- -- Wards table for creating custom timers
- wards = {}
- -- Base duration for ward pacts.
- wards.durations = {
- ['Crimson Howl'] = 60, ['Earthen Armor'] = 60, ['Inferno Howl'] = 60, ['Heavenward Howl'] = 60,
- ['Rolling Thunder'] = 120, ['Fleet Wind'] = 120,
- ['Shining Ruby'] = 180, ['Frost Armor'] = 180, ['Lightning Armor'] = 180, ['Ecliptic Growl'] = 180,
- ['Glittering Ruby'] = 180, ['Hastega'] = 180, ['Noctoshield'] = 180, ['Ecliptic Howl'] = 180,
- ['Dream Shroud'] = 180, ['Hastega II'] = 180, ['Crystal Blessing'] = 180, ['Soothing Current'] = 180,
- ['Reraise II'] = 3600
- }
- -- Icons to use when creating the custom timer.
- wards.icons = {
- ['Earthen Armor'] = 'spells/00299.png', -- 00299 for Titan
- ['Shining Ruby'] = 'spells/00043.png', -- 00043 for Protect
- ['Dream Shroud'] = 'spells/00304.png', -- 00304 for Diabolos
- ['Noctoshield'] = 'spells/00106.png', -- 00106 for Phalanx
- ['Crimson Howl'] = 'spells/00298.png', -- 00298 for Ifrit
- ['Inferno Howl'] = 'spells/00298.png', -- 00298 for Ifrit
- ['Soothing Current'] = 'spells/00169.png', -- 00169 for Water Icon
- ['Crystal Blessing'] = 'spells/00269.png', -- 00169 for Water Icon
- ['Hastega'] = 'spells/00358.png', -- 00358 for Hastega
- ['Hastega II'] = 'spells/00358.png', -- 00358 for Hastega
- ['Rolling Thunder'] = 'spells/00104.png', -- 00358 for Enthunder
- ['Frost Armor'] = 'spells/00250.png', -- 00250 for Ice Spikes
- ['Lightning Armor'] = 'spells/00251.png', -- 00251 for Shock Spikes
- ['Reraise II'] = 'spells/00135.png', -- 00135 for Reraise
- ['Fleet Wind'] = 'abilities/00074.png', --
- }
- -- Flags for code to get around the issue of slow skill updates.
- wards.flag = false
- wards.spell = ''
- end
- -- Setup vars that are user-dependent. Can override this function in a sidecar file.
- function user_setup()
- -- Options: Override default values
- options.OffenseModes = {'Normal', 'Acc'}
- options.DefenseModes = {'Normal'}
- options.WeaponskillModes = {'Normal', 'Overdrive'}
- options.CastingModes = {'Normal', 'Resistant'}
- options.IdleModes = {'Normal','PDT'}
- options.RestingModes = {'Normal'}
- options.PhysicalDefenseModes = {'PDT'}
- options.MagicalDefenseModes = {'MDT'}
- state.Defense.PhysicalMode = 'PDT'
- select_default_macro_book()
- end
- -- Define sets and vars used by this job file.
- function init_gear_sets()
- Lehbrailg_MACC = {name="Lehbrailg +2", augments={'DMG:+14','INT+6','Mag. Acc.+22'}}
- Lehbrailg_FC = {name="Lehbrailg +2", augments={'DMG:+9','MND+5','"Fast Cast"+2'}}
- leftDarkRing = {name="Dark Ring",augments={"Phys. dmg. taken -5%","Magic dmg. taken -3%"}}
- rightDarkRing = {name="Dark Ring",augments={"Magic dmg. taken -4%","Breath dmg. taken -5%","Phys. dmg. taken -5%"}}
- HagondesBoots_MACC = {name="Hagondes Sabots",augments={"Mag. Acc.+21","Phys. dmg. taken -4%"}}
- HagondesBoots_MATK = {name="Hagondes Sabots",augments={"Mag.Atk.Bns.+16","Phys. dmg. taken -2%"}}
- HagondesBoots_PMACC = {name="Hagondes Sabots",augments={"Phys. dmg. taken -3%","Pet: Mag. Acc.+20"}}
- HagondesBoots_PMATK = {name="Hagondes Sabots",augments={"Phys. dmg. taken -3%","Pet:Mag.Atk.Bns+20"}}
- HagondesGloves_MACC = {name="Hagondes Cuffs",augments={"Mag. Acc.+21","Phys. dmg. taken -2%"}}
- HagondesGloves_MATK = {name="Hagondes Cuffs",augments={"Mag.Atk.Bns.+23","Phys. dmg. taken -4%"}}
- HagondesGloves_PMATK = {name="Hagondes Cuffs",augments={"Phys. dmg. taken -1%","Pet: Mag.Atk.Bns.+9"}}
- HagondesGloves_PMACC = {name="Hagondes Cuffs",augments={"Phys. dmg. taken -3%","Pet: Mag. Acc.+20"}}
- HagondesHat_PMACC = {name="Hagondes Hat",augments={"Phys. dmg. taken -4%","Pet: Mag. Acc.+22"}}
- HagondesHat_MACC = {name="Hagondes Hat",augments={"Mag. Acc.+24","Phys. dmg. taken -3%"}}
- HagondesHat_MATK = {name="Hagondes Hat",augments={"Mag.Atk.Bns.+29","Phys. dmg. taken -3%"}}
- HagondesHat_PATK = {name="Hagondes Hat",augments={'Phys. dmg. taken -3%','Pet: Attack+23 Pet: Rng.Atk.+23'}}
- HagondesHat_PACC = {name="Hagondes Hat",augments={'Phys. dmg. taken -3%','Pet: Accuracy+23 Pet: Rng.Acc.+23'}}
- HagondesHat_PMATK = {name="Hagondes Hat",augments={"Phys. dmg. taken -4%","Pet: Mag.Atk.Bns.+20"}}
- HagondesGloves_FC = {name="Hagondes Cuffs",augments={"Fast Cast+3","Phys. dmg. taken -3%"}}
- HagondesPants_PATK = {name="Hagondes Pants",augments={'Phys. dmg. taken -3%','Pet: Attack+25 Pet: Rng.Atk.+25'}}
- Keraunos_MATK = {name="Keraunos",augments={'Pet: "Mag.Atk.Bns."+18','"Conserve MP"+6'}}
- Keraunos_MACC = {name="Keraunos", augments={'Pet: Mag. Acc.+17','"Fast Cast"+3'}}
- --gear.ElementalRing = "Angha Ring"
- --------------------------------------
- -- Precast Sets
- --------------------------------------
- -- Precast sets to enhance JAs
- sets.precast.JA['Astral Flow'] = {head="Glyphic Horn"}
- sets.precast.JA['Elemental Siphon'] = {ammo="Esper Stone +1",main="Soulscourge",neck="Caller's Pendant",body="Anhur Robe",
- legs="Adapa's Slacks +1",feet="Marduk's Crackows +1",sub="Vox Grip",hands="Glyphic Bracers +1",back="Conveyance Cape",
- ring1="Evoker's Ring",ring2="Globidonta Ring",ear1="Andoaa Earring",ear2="Summoning Earring",waist="Cimmerian Sash"}
- sets.precast.JA['Mana Cede'] = {hands="Caller's Bracers +2"}
- -- Pact delay reduction gear
- sets.precast.BloodPactWard = {back="Samanisi Cape",head="Convoker's Horn +1",
- hands="Glyphic Bracers +1",legs="Summoner's Spats",body="Glyphic Doublet +1",feet="Glyphic Pigaches +1"}
- sets.precast.BloodPactRage = sets.precast.BloodPactWard
- -- Fast cast sets for spells
- sets.precast.FC = {main=Keraunos_MACC,sub="Vivid Strap",ammo="Impatiens",head="Nares Cap",body="Marduk's Jubbah +1",
- hands=HagondesGloves_FC,legs="Orvail Pants +1",feet="Chelona Boots",back="Swith Cape",waist="Witful Belt",
- ring1="Veneficium Ring",ring2="Prolix Ring",neck="Jeweled Collar",ear1="Enchanter Earring +1",ear2="Loquacious Earring"}
- sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC,{neck="Stoicheion Medal"})
- sets.precast.FC.Cure = set_combine(sets.precast.FC,{main="Tamaxchi",sub="Genbu's Shield",back="Pahtli Cape",legs="Nabu's Shalwar"})
- sets.precast.FC.Stoneskin = set_combine(sets.precast.FC,{head="Umuthi Hat",hands="Carapacho Cuffs",waist="Siegel Sash"})
- sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC,{waist="Siegel Sash"})
- -- Weaponskill sets
- -- Default set for any weaponskill that isn't any more specifically defined
- sets.precast.WS = {}
- -- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
- sets.precast.WS['Myrkr'] = {}
- --------------------------------------
- -- Midcast sets
- --------------------------------------
- sets.midcast.FastRecast = {ammo="Impatiens",main=Keraunos_MACC,sub="Vivid Strap",head="Nahtirah Hat",body="Marduk's Jubbah +1",
- hands="Regimen Mittens",legs="Mes'yohi Slacks",feet="Umbani Boots",back="Swith Cape",waist="Cetl Belt",
- ring1=leftDarkRing,ring2="Prolix Ring",neck="Jeweled Collar",ear1="Loquacious Earring",ear2="Gwati Earring"}
- -- 59% cure potency
- sets.midcast.Cure = {main="Tamaxchi",sub="Genbu's Shield",back="Tempered Cape +1",
- hands="Bokwus Gloves",ring1="Ephedra Ring",ring2="Sirona's Ring",
- legs="Nabu's Shalwar",head="Marduk's Tiara +1",feet="Umbani Boots",
- neck="Colossus's Torque",ear1="Roundel Earring",ear2="Domesticator's Earring"}
- sets.midcast.Stoneskin = {head="Nahtirah Hat",legs="Haven Hose",neck="Colossus's Torque",waist="Siegel Sash"}
- sets.midcast.Blink = {head="Nahtirah Hat"}
- sets.midcast.Refresh = {back="Grapevine Cape"}
- sets.midcast.Aquaveil = {waist="Emphatikos Rope"}
- sets.midcast.Protect = {ring1="Sheltered Ring"}
- sets.midcast.Shell = {ring1="Sheltered Ring"}
- sets.midcast.EarthenWard = {main="Soulscourge",legs="Haven Hose",waist="Jaq'ij Sash"}
- sets.midcast.AerialArmor = {main="Soulscourge",legs="Caller's Spats +2",waist="Jaq'ij Sash"}
- sets.midcast.Phalanx = {body="Anhur Robe",neck="Colossus's Torque",head="Umuthi Hat",ear1="Andoaa Earring"}
- sets.midcast.Regen = {main="Bolelabunga",sub="Genbu's Shield",head="Marduk's Tiara +1"}
- sets.midcast.Sneak = set_combine(sets.midcast.FastRecast,{back="Skulker's Cape"})
- sets.midcast.Invisible = set_combine(sets.midcast.FastRecast,{back="Skulker's Cape"})
- sets.conserve = {main=Keraunos_MATK,head="Nares Cap",back="Vita Cape",ear2="Gwati Earring",feet="Umbani Boots",waist="Austerity Belt"}
- sets.midcast.debuff = {main=Lehbrailg_MACC,head=HagondesHat_MACC,body="Ischemia Chasuble",
- ear1="Lifestorm Earring",ear2="Psystorm Earring",back="Ogapepo Cape",legs="Mes'yohi Slacks",
- waist="Demonry Sash",neck="Weike Torque",ring1="Sangoma Ring",
- ring2="Perception Ring",sub="Mephitis Grip",hands="Lurid Mitts",feet="Uk'uxkaj Boots"}
- sets.midcast.debuff.Resistant = {feet=HagondesBoots_MACC}
- --sets.midcast.debuff.Evasion = {
- sets.midcast.debuff.int = {waist="Tengu-no-Obi"}
- sets.midcast.debuff.mnd = {back="Refraction Cape"}
- sets.midcast.Dia = {waist="Chaac Belt"}
- sets.midcast['Dia II'] = {waist="Chaac Belt"}
- sets.midcast.Diaga = {waist="Chaac Belt"}
- sets.midcast['Elemental Magic'] = {main="Lehbrailg +2",body="Artsieq Jubbah",
- head=HagondesHat_MATK,ear1="Crematio Earring",ear2="Friomisi Earring",back=gear.ElementalCape,
- waist="Sekhmet Corset",neck="Eddy Necklace",legs="Hagondes Pants +1",ring1="Acumen Ring",ring2=gear.ElementalRing,
- hands=HagondesGloves_MATK,sub="Elder's Grip +1",feet="Umbani Boots"}
- sets.midcast['Elemental Magic'].Resistant = {main=Lehbrailg_MACC,body="Artsieq Jubbah",
- head=HagondesHat_MACC,ear1="Lifestorm Earring",ear2="Psystorm Earring",back="Refraction Cape",
- waist="Chaac Belt",neck="Weike Torque",legs="Mes'yohi Slacks",ring1="Perception Ring",ring2="Sangoma Ring",
- hands=HagondesGloves_MACC,sub="Elder's Grip +1",feet=HagondesBoots_MACC}
- sets.midcast.Blizzard = set_combine(sets.midcast['Elemental Magic'],{main="Ngqoqwanb"})
- sets.midcast['Aero II'] = set_combine(sets.midcast['Elemental Magic'],{waist="Yamabuki-no-obi"})
- sets.midcast['Water II'] = set_combine(sets.midcast['Elemental Magic'],{waist="Yamabuki-no-obi"})
- sets.midcast['Stone II'] = set_combine(sets.midcast['Elemental Magic'],{waist="Yamabuki-no-obi"})
- sets.midcast['Summoning Magic'] = {main="Hermit's Wand",sub="Genbu's Shield",waist="Emphatikos Rope",
- legs="Adapa's Slacks +1", ammo="Seraphicaller",hands="Auspex Gages",
- body="Marduk's Jubbah +1"}
- sets.midcast['Atomos'] = set_combine(sets.midcast.FastRecast,{ammo="Seraphicaller"})
- --sets.midcast['Fire Spirit'] = set_combine(sets.precast.JA['Elemental Siphon'],{ammo="Seraphicaller"})
- --sets.midcast.IceSpirit = set_combine(sets.precast.JA['Elemental Siphon'],{ammo="Seraphicaller"})
- --sets.midcast.AirSpirit = set_combine(sets.precast.JA['Elemental Siphon'],{ammo="Seraphicaller"})
- --sets.midcast.EarthSpirit = set_combine(sets.precast.JA['Elemental Siphon'],{ammo="Seraphicaller"})
- --sets.midcast.ThunderSpirit = set_combine(sets.precast.JA['Elemental Siphon'],{ammo="Seraphicaller"})
- --sets.midcast.WaterSpirit = set_combine(sets.precast.JA['Elemental Siphon'],{ammo="Seraphicaller"})
- --sets.midcast['Light Spirit'] = set_combine(sets.precast.JA['Elemental Siphon'],{ammo="Seraphicaller"})
- --sets.midcast.DarkSpirit = set_combine(sets.precast.JA['Elemental Siphon'],{ammo="Seraphicaller"})
- sets.Seraphicaller = {ammo="Seraphicaller"}
- -- Avatar pact sets. All pacts are Ability type.
- sets.midcast.Pet.BloodPactWard = {ammo="Esper Stone +1",main="Soulscourge",body="Anhur Robe",back="Conveyance Cape",
- legs="Caller's Spats +2",head="Convoker's Horn +1",feet="Marduk's Crackows +1",
- sub="Vox Grip",ring1="Evoker's Ring",ring2="Globidonta Ring",hands="Glyphic Bracers +1",
- waist="Jaq'ij Sash",ear1="Andoaa Earring"}
- sets.midcast.Pet.DebuffBloodPactWard = {ammo="Seraphicaller",main=Keraunos_MACC,neck="Caller's Pendant",back="Conveyance Cape",body="Anhur Robe",
- legs="Adapa's Slacks +1",feet=HagondesBoots_PMACC,head=HagondesHat_PMACC,
- sub="Vox Grip",ring1="Evoker's Ring",ring2="Globidonta Ring",hands="Glyphic Bracers +1",waist="Cimmerian Sash",
- ear1="Andoaa Earring",ear2="Summoning Earring"}
- sets.midcast.Pet.DebuffBloodPactWard.Acc = sets.midcast.Pet.DebuffBloodPactWard
- sets.midcast.Pet.BloodPactSleep = {ammo="Seraphicaller",neck="Caller's Pendant",main=Keraunos_MACC,back="Conveyance Cape",body="Anhur Robe",
- legs="Adapa's Slacks +1",feet=HagondesBoots_PMACC,head=HagondesHat_PMACC,
- sub="Vox Grip",ring1="Evoker's Ring",ring2="Globidonta Ring",hands=HagondesGloves_PMACC,waist="Cimmerian Sash",ear1="Andoaa Earring",ear2="Summoning Earring"}
- sets.midcast.Pet.PhysicalBloodPactRage = {ammo="Seraphicaller",main="Gridarvor",legs="Ngen Seraweels",body="Convoker's Doublet +1",neck="Sacrifice Torque",
- waist="Mujin Obi",head=HagondesHat_PATK,ring1="Evoker's Ring",ring2="Globidonta Ring",sub="Vox Grip",hands="Auspex Gages",back="Conveyance Cape",
- feet="Convoker's Pigaches +1",ear2="Domesticator's Earring",ear1="Esper Earring"}
- sets.midcast.Pet.PhysicalBloodPactRage.Acc = set_combine(sets.midcast.Pet.PhysicalBloodPactRage,{back="Samanisi Cape",ear2="Andoaa Earring",head=HagondesHat_PACC,legs="Convoker's Spats +1"})
- sets.midcast.Pet.MagicalBloodPactRage = {ammo="Seraphicaller",main=Keraunos_MATK,feet=HagondesBoots_PMATK,back="Argochampsa Mantle",
- body="Convoker's Doublet +1",neck="Eidolon Pendant +1",legs="Caller's Spats +2",head=HagondesHat_PMATK,ring1="Evoker's Ring",
- ring2="Globidonta Ring",sub="Vox Grip",hands="Auspex Gages",waist="Caller's Sash",ear1="Andoaa Earring",ear2="Esper Earring"}
- sets.midcast.Pet.MagicalBloodPactRage.Acc = set_combine(sets.midcast.Pet.MagicalBloodPactRage,{main=Keraunos_MACC,hands=HagondesGloves_PMACC,back="Samanisi Cape",neck="Caller's Pendant",waist="Cimmerian Sash"})
- sets.midcast.Pet.FlamingCrush = {ammo="Seraphicaller",main="Balsam Staff",back="Conveyance Cape",body="Convoker's Doublet +1",
- neck="Eidolon Pendant +1",legs="Ngen Seraweels",head=HagondesHat_PMATK,ring1="Evoker's Ring",
- ring2="Fervor Ring",sub="Vox Grip",hands="Auspex Gages",waist="Caller's Sash",feet=HagondesBoots_PMATK,ear2="Andoaa Earring",ear1="Esper Earring"}
- sets.midcast.Pet.FlamingCrush.Acc = set_combine(sets.midcast.Pet.FlamingCrush,{back="Samanisi Cape",head=HagondesHat_PACC,legs="Convoker's Spats +1"})
- -- Spirits cast magic spells, which can be identified in standard ways.
- sets.midcast.Pet.WhiteMagic = set_combine(sets.precast.JA['Elemental Siphon'],{ring1="Sheltered Ring",legs="Summoner's Spats"})
- sets.midcast.Pet['Elemental Magic'] = set_combine(sets.midcast.Pet.MagicalBloodPactRage, {legs="Summoner's Spats"})
- sets.midcast.Pet['Enfeebling Magic'] = sets.midcast.Pet.BloodPactSleep
- --sets.midcast.Pet['Elemental Magic'].Resistant = {}
- --------------------------------------
- -- Idle/resting/defense/etc sets
- --------------------------------------
- -- Resting sets
- sets.resting = {feet="Chelona Boots",neck="Eidolon Pendant +1"}
- -- Idle sets
- sets.idle = {main="Bolelabunga",sub="Genbu's Shield",ammo="Sihirik",
- head="Convoker's Horn +1",neck="Wiglen Gorget",
- body="Hagondes Coat",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
- waist="Slipor Sash",legs="Nares Trews",feet="Serpentes Sabots",back="Kumbira Cape",ear1="Sanare Earring",
- ear2="Moonshade Earring"}
- sets.idle.PDT = set_combine(sets.idle,{head="Hagondes Hat +1",neck="Twilight Torque",main="Terra's Staff",
- sub="Oneiros Grip",hands="Glyphic Bracers +1",legs="Hagondes Pants +1",feet=HagondesBoots_MACC,back="Umbra Cape",ring1=leftDarkRing,ring2=rightDarkRing})
- sets.superMP = {main="Gridarvor",sub="Achaq Grip",ammo="Kalboron Stone",body="Convoker's Doublet +1",feet="Glyphic Pigaches +1",
- back="Conveyance Cape",waist="Mujin Obi",hands="Caller's Bracers +2",legs="Convoker's Spats +1",
- ring1="Evoker's Ring",ring2="Zodiac Ring",ear1="Bloodgem Earring",ear2="Loquacious Earring",neck="Weike Torque",
- head="Convoker's Horn +1"}
- -- Latent Idle Set --
- sets.latent_refresh = {waist="Fucho-no-obi"}
- -- perp costs:
- -- spirits: 7
- -- carby: 11 (5 with mitts)
- -- fenrir: 13
- -- others: 15
- -- avatar's favor: -4/tick
- -- Max useful -perp gear is 1 less than the perp cost (can't be reduced below 1)
- -- Aim for -14 perp, and refresh in other slots.
- -- -perp gear:
- -- Gridarvor: -5
- -- Glyphic Horn: -4
- -- Caller's Doublet +2/Glyphic Doublet +1: -4
- -- Evoker's Ring: -1
- -- Convoker's Pigaches +1: -4
- -- total: -18
- -- Can make due without either the head or the body, and use +refresh items in those slots.
- sets.idle.Avatar = {main="Gridarvor",sub="Oneiros Grip",ammo="Seraphicaller",
- head="Convoker's Horn +1",neck="Caller's Pendant",
- body="Hagondes Coat",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
- waist="Isa Belt",legs="Nares Trews",feet="Convoker's Pigaches +1",back="Kumbira Cape",ear1="Sanare Earring",
- ear2="Moonshade Earring"}
- sets.idle.PDT.Avatar = set_combine(sets.idle.Avatar,{ammo="Seraphicaller",neck="Twilight Torque",hands="Glyphic Bracers +1",legs="Hagondes Pants +1",back="Umbra Cape",ring1=leftDarkRing,ring2=rightDarkRing})
- sets.idle.Spirit = set_combine(sets.midcast.Pet.BloodPactWard,{ammo="Seraphicaller",legs="Summoner's Spats",waist="Cimmerian Sash"})
- sets.idle.PDT.Spirit = sets.idle.PDT.Avatar
- sets.idle.Town = sets.idle
- sets.idle.PDT.Town = sets.idle.PDT
- -- Favor uses Caller's Horn instead of Convoker's Horn +1 for refresh
- --sets.idle.Avatar.Favor = set_combine(sets.midcast.Pet.BloodPactWard,{main="Gridarvor",head="Caller's Horn +2",feet="Convoker's Pigaches +1"})
- --sets.idle.Avatar.Favor = {head="Caller's Horn +2",legs="Adapa's Slacks +1",ring1="Evoker's Ring",ring2="Globidonta Ring",back="Conveyance Cape",hands="Glyphic Bracers +1", ear1="Andoaa Earring"}
- sets.idle.Avatar.Favor = {head="Caller's Horn +2"}
- --sets.idle.Avatar.Favor.Melee = sets.idle.Avatar.Favor
- sets.idle.Avatar.Melee = {ammo="Seraphicaller",hands="Regimen Mittens",back="Argochampsa Mantle",waist="Moepapa Stone",
- ear1="Rimeice Earring"}
- sets.idle.Avatar.Melee.Acc = set_combine(sets.idle.Avatar.Melee,{legs="Convoker's Spats +1",back="Samanisi Cape"})
- sets.idle.Avatar.Melee.Overdrive = {head="Selenian Cap",ear2="Domesticator's Earring",legs=HagondesPants_PATK}
- sets.idle.PDT.Avatar.Melee = set_combine(sets.idle.Avatar.Melee,{head="Convoker's Horn +1",ring1=leftDarkRing,ring2=rightDarkRing,neck="Twilight Torque",back="Umbra Cape",legs=HagondesPants_PATK})
- --to be done
- --sets.AvatarPDT = {waist="Isa Belt"}
- sets.perp = {}
- -- Caller's Bracer's halve the perp cost after other costs are accounted for.
- -- Using -10 (Gridavor, ring, Conv.feet), standard avatars would then cost 5, halved to 2.
- -- We can then use Hagondes Coat and end up with the same net MP cost, but significantly better defense.
- -- Weather is the same, but we can also use the latent on the pendant to negate the last point lost.
- --sets.perp.Day = {hands="Caller's Bracers +2"}
- --sets.perp.Weather = {neck="Caller's Pendant",hands="Caller's Bracers +2"}
- -- Carby: Mitts+Conv.feet = 1/tick perp. Everything else should be +refresh
- --sets.perp.Carbuncle = {hands="Carbuncle Mitts"}
- -- Diabolos's Rope doesn't gain us anything at this time
- --sets.perp.Diabolos = {waist="Diabolos's Rope"}
- sets.perp.Alexander = set_combine(sets.precast.JA['Elemental Siphon'],{ammo="Seraphicaller"})
- sets.perp.Atomos = sets.midcast.Pet.BloodPactSleep
- sets.perp.Odin = set_combine(sets.midcast.Pet.MagicalBloodPactRage.Acc,{legs="Ngen Seraweels",feet="Convoker's Pigaches +1",hands="Auspex Gages"})
- sets.midcast.Pet.PerfectDefense = set_combine(sets.precast.JA['Elemental Siphon'],{ammo="Seraphicaller"})
- --sets.perp.Spirit = set_combine(sets.midcast.Pet.BloodPactWard,{legs="Summoner's Spats"})
- -- Defense sets
- sets.defense.PDT = {}
- sets.defense.MDT = {}
- sets.Kiting = {}
- --------------------------------------
- -- Engaged sets
- --------------------------------------
- -- Normal melee group
- sets.engaged = sets.idle
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Job-specific hooks that are called to process player actions at specific points in time.
- -------------------------------------------------------------------------------------------------------------------
- -- 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 (spell.type == 'BloodPactRage' or spell.type == 'BloodPactWard') and buffactive['Astral Conduit'] or buffactive['Apogee'] then
- -- eventArgs.handled = true
- --end
- if state.Buff[spell.english] ~= nil then
- state.Buff[spell.english] = true
- end
- if spell.name == 'Sneak' and buffactive.Sneak and spell.target.type == 'SELF' then
- windower.ffxi.cancel_buff(71)
- cast_delay(0.3)
- elseif spell.name == 'Stoneskin' and buffactive.Stoneskin and spell.target.type == 'SELF' then
- windower.ffxi.cancel_buff(37)
- cast_delay(0.3)
- end
- end
- function job_midcast(spell, action, spellMap, eventArgs)
- if (not string.find(spell.type,'BloodPact') and pet.isvalid) then
- equip(get_idle_set(petStatus))
- end
- if (not pet.isvalid) and (spell.action_type == 'Magic') then
- equip(sets.conserve)
- end
- if debuffs:contains(spell.english) then
- equip(sets.midcast.debuff)
- if debuffs_acc:contains(spell.english) or state.CastingMode == options.CastingModes[2] then
- equip(sets.midcast.debuff.Resistant)
- end
- if (spell.type=='BlackMagic') then
- equip(sets.midcast.debuff.int)
- elseif (spell.type=='WhiteMagic' and not (spell.english == 'Dia' or spell.english=='Dia II')) then
- equip(sets.midcast.debuff.mnd)
- end
- elseif (spell.english=='Mana Cede') then
- equip(sets.precast.JA['Mana Cede'])
- elseif (spell.english=='Elemental Siphon') then
- equip(sets.precast.JA['Elemental Siphon'])
- --elseif spell.action_type == 'Magic' then
- --equip(get_idle_set())
- elseif spell.type=='BlackMagic' then
- if (spell.element == world.day_element) then
- --sets.midcast['Elemental Magic'] = set_combine(sets.midcast['Elemental Magic'], sets.day)
- gear.ElementalRing.name = "Zodiac Ring"
- gear.ElementalCape.name = "Twilight Cape"
- else
- gear.ElementalRing.name = "Sangoma Ring"
- gear.ElementalCape.name = "Toro Cape"
- end
- elseif spell.english:wcmatch("Bar*") then
- equip(sets.midcast.Phalanx)
- 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)
- --sets.midcast['Elemental Magic'] = sets.nuke
- if (spell.type=='BloodPactWard') then
- --create_pact_timer(spell.english)
- end
- sets.engaged = get_idle_set(pet.status)
- gear.debuffBoots = "Uk'uxkaj Boots"
- if state.Buff[spell.english] ~= nil then
- state.Buff[spell.english] = not spell.interrupted or buffactive[spell.english]
- end
- if spell.type == 'SummonerPact' then
- send_command("gs equip sets.Seraphicaller; gs disable ammo; wait 2; gs enable ammo")
- end
- end
- -- Runs when pet completes an action.
- function job_pet_aftercast(spell, action, spellMap, eventArgs)
- if not spell.interrupted and spell.type == 'BloodPactWard' and spellMap ~= 'DebuffBloodPactWard' then
- wards.flag = true
- wards.spell = spell.english
- send_command('wait 4; gs c reset_ward_flag')
- end
- if (spell.english=="Ecliptic Howl") then
- if (world.moon_pct>89) then
- add_to_chat(104,"[Ecliptic Howl] Accuracy 25 - Evasion 1")
- elseif (world.moon_pct>74) then
- add_to_chat(104,"[Ecliptic Howl] Accuracy 21 - Evasion 5")
- elseif (world.moon_pct>59) then
- add_to_chat(104,"[Ecliptic Howl] Accuracy 17 - Evasion 9")
- elseif (world.moon_pct>39) then
- add_to_chat(104,"[Ecliptic Howl] Accuracy 13 - Evasion 13")
- elseif (world.moon_pct>24) then
- add_to_chat(104,"[Ecliptic Howl] Accuracy 9 - Evasion 17")
- elseif (world.moon_pct>9) then
- add_to_chat(104,"[Ecliptic Howl] Accuracy 5 - Evasion 21")
- else
- add_to_chat(104,"[Ecliptic Howl] Accuracy 1 - Evasion 25")
- end
- end
- if (spell.english=="Ecliptic Growl") then
- if (world.moon_pct>89) then
- add_to_chat(104,"[Ecliptic Growl] STR/DEX/VIT 7 - INT/MND/CHR/AGI 1")
- elseif (world.moon_pct>74) then
- add_to_chat(104,"[Ecliptic Growl] STR/DEX/VIT 6 - INT/MND/CHR/AGI 2")
- elseif (world.moon_pct>59) then
- add_to_chat(104,"[Ecliptic Growl] STR/DEX/VIT 5 - INT/MND/CHR/AGI 3")
- elseif (world.moon_pct>39) then
- add_to_chat(104,"[Ecliptic Growl] STR/DEX/VIT 4 - INT/MND/CHR/AGI 4")
- elseif (world.moon_pct>24) then
- add_to_chat(104,"[Ecliptic Growl] STR/DEX/VIT 3 - INT/MND/CHR/AGI 5")
- elseif (world.moon_pct>9) then
- add_to_chat(104,"[Ecliptic Growl] STR/DEX/VIT 2 - INT/MND/CHR/AGI 6")
- else
- add_to_chat(104,"[Ecliptic Growl] STR/DEX/VIT 1 - INT/MND/CHR/AGI 7")
- end
- end
- if (spell.english=="Lunar Cry") then
- if (world.moon_pct>89) then
- add_to_chat(104,"[Lunar Cry] Enemy Acc Down 31 - Enemy Eva Down 1")
- elseif (world.moon_pct>74) then
- add_to_chat(104,"[Lunar Cry] Enemy Acc Down 26 - Enemy Eva Down 6")
- elseif (world.moon_pct>59) then
- add_to_chat(104,"[Lunar Cry] Enemy Acc Down 21 - Enemy Eva Down 11")
- elseif (world.moon_pct>39) then
- add_to_chat(104,"[Lunar Cry] Enemy Acc Down 16 - Enemy Eva Down 16")
- elseif (world.moon_pct>24) then
- add_to_chat(104,"[Lunar Cry] Enemy Acc Down 11 - Enemy Eva Down 21")
- elseif (world.moon_pct>9) then
- add_to_chat(104,"[Lunar Cry] Enemy Acc Down 6 - Enemy Eva Down 26")
- else
- add_to_chat(104,"[Lunar Cry] Enemy Acc Down 1 - Enemy Eva Down 31")
- end
- end
- if (spell.english=="Dream Shroud") then
- if (world.time >= 0 and world.time < 1*60) then
- add_to_chat(104,"[Dream Shroud] MAB 13 - MDB 1")
- elseif (world.time >= 1*60 and world.time < 2*60) or (world.time >= 23*60 and world.time <= 23*60+59) then
- add_to_chat(104,"[Dream Shroud] MAB 12 - MDB 2")
- elseif (world.time >= 2*60 and world.time < 3*60) or (world.time >= 22*60 and world.time < 23*60) then
- add_to_chat(104,"[Dream Shroud] MAB 11 - MDB 3")
- elseif (world.time >= 3*60 and world.time < 4*60) or (world.time >= 21*60 and world.time < 22*60) then
- add_to_chat(104,"[Dream Shroud] MAB 10 - MDB 4")
- elseif (world.time >= 4*60 and world.time < 5*60) or (world.time >= 20*60 and world.time < 21*60) then
- add_to_chat(104,"[Dream Shroud] MAB 9 - MDB 5")
- elseif (world.time >= 5*60 and world.time < 6*60) or (world.time >= 19*60 and world.time < 20*60) then
- add_to_chat(104,"[Dream Shroud] MAB 8 - MDB 6")
- elseif (world.time >= 6*60 and world.time < 7*60) or (world.time >= 18*60 and world.time < 19*60) then
- add_to_chat(104,"[Dream Shroud] MAB 7 - MDB 7")
- elseif (world.time >= 7*60 and world.time < 8*60) or (world.time >= 17*60 and world.time < 18*60) then
- add_to_chat(104,"[Dream Shroud] MAB 6 - MDB 8")
- elseif (world.time >= 8*60 and world.time < 9*60) or (world.time >= 16*60 and world.time < 17*60) then
- add_to_chat(104,"[Dream Shroud] MAB 5 - MDB 9")
- elseif (world.time >= 9*60 and world.time < 10*60) or (world.time >= 15*60 and world.time < 16*60) then
- add_to_chat(104,"[Dream Shroud] MAB 4 - MDB 10")
- elseif (world.time >= 10*60 and world.time < 11*60) or (world.time >= 14*60 and world.time < 15*60) then
- add_to_chat(104,"[Dream Shroud] MAB 3 - MDB 11")
- elseif (world.time >= 11*60 and world.time < 12*60) or (world.time >= 13*60 and world.time < 14*60) then
- add_to_chat(104,"[Dream Shroud] MAB 2 - MDB 12")
- else
- add_to_chat(104,"[Dream Shroud] MAB 1 - MDB 13")
- end
- end
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Customization hooks for idle and melee sets, after they've been automatically constructed.
- -------------------------------------------------------------------------------------------------------------------
- -- Modify the default idle set after it was constructed.
- function customize_idle_set(idleSet)
- if pet.isvalid then
- if pet.element == world.day_element then
- idleSet = set_combine(idleSet, sets.perp.Day)
- end
- if pet.element == world.weather_element then
- idleSet = set_combine(idleSet, sets.perp.Weather)
- end
- if sets.perp[pet.name] then
- idleSet = set_combine(idleSet, sets.perp[pet.name])
- end
- if sets.perp[pet.name] then
- idleSet = set_combine(idleSet, sets.perp[pet.name])
- end
- if spirits:contains(pet.name) then
- idleSet = set_combine(idleSet, sets.idle.Spirit)
- end
- local perp_staff = elements.perpetuance_staff_of[pet.element]
- if perp_staff and (player.inventory[perp_staff] or player.wardrobe[perp_staff]) then
- idleSet = set_combine(idleSet, {main=perp_staff,sub="Achaq Grip"})
- end
- if state.Buff["Avatar's Favor"] and avatars:contains(pet.name) then
- idleSet = set_combine(idleSet, sets.idle.Avatar.Favor)
- end
- if pet.status == 'Engaged' and not spirits:contains(pet.name) then
- if state.WeaponskillMode == options.WeaponskillModes[2] then
- idleSet = set_combine(idleSet, sets.idle.Avatar.Melee.Overdrive)
- end
- idleSet = set_combine(idleSet, sets.idle.Avatar.Melee)
- if state.OffenseMode == options.OffenseModes[2] and state.WeaponskillMode == options.WeaponskillModes[2] then
- idleSet = set_combine(idleSet, sets.idle.Avatar.Melee.Acc)
- end
- end
- end
- if player.mpp < 51 then
- if(state.WeaponskillMode == options.WeaponskillModes[1] or (state.WeaponskillMode == options.WeaponskillModes[2] and pet.status == 'Idle')) then
- idleSet = set_combine(idleSet, sets.latent_refresh)
- end
- end
- return idleSet
- end
- -------------------------------------------------------------------------------------------------------------------
- -- General hooks for other 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 state.Buff[buff] ~= nil then
- state.Buff[buff] = gain
- handle_equipping_gear(player.status)
- elseif storms:contains(buff) then
- handle_equipping_gear(player.status)
- end
- end
- -- Called when the player's pet's status changes.
- -- This is also called after pet_change after a pet is released. Check for pet validity.
- function job_pet_status_change(newStatus, oldStatus, eventArgs)
- if pet.isvalid and not midaction() and not pet_midaction() and (newStatus == 'Engaged' or oldStatus == 'Engaged') then
- handle_equipping_gear(player.status, newStatus)
- end
- end
- -- Called when a player gains or loses a pet.
- -- pet == pet structure
- -- gain == true if the pet was gained, false if it was lost.
- function job_pet_change(petparam, gain)
- classes.CustomIdleGroups:clear()
- if gain then
- --if avatars:contains(pet.name) then
- classes.CustomIdleGroups:append('Avatar')
- --elseif spirits:contains(pet.name) then
- -- classes.CustomIdleGroups:append('Spirit')
- --end
- else
- select_default_macro_book()
- end
- end
- -------------------------------------------------------------------------------------------------------------------
- -- User code that supplements self-commands.
- -------------------------------------------------------------------------------------------------------------------
- -- Called for custom player commands.
- function job_self_command(cmdParams, eventArgs)
- if cmdParams[1]:lower() == 'petweather' then
- handle_petweather()
- eventArgs.handled = true
- elseif cmdParams[1]:lower() == 'siphon' then
- handle_siphoning()
- eventArgs.handled = true
- elseif cmdParams[1]:lower() == 'pact' then
- handle_pacts(cmdParams)
- eventArgs.handled = true
- elseif cmdParams[1] == 'reset_ward_flag' then
- wards.flag = false
- wards.spell = ''
- eventArgs.handled = true
- end
- end
- -- Called by the 'update' self-command, for common needs.
- -- Set eventArgs.handled to true if we don't want automatic equipping of gear.
- function job_update(cmdParams, eventArgs)
- classes.CustomIdleGroups:clear()
- if pet.isvalid then
- if avatars:contains(pet.name) then
- classes.CustomIdleGroups:append('Avatar')
- elseif spirits:contains(pet.name) then
- classes.CustomIdleGroups:append('Spirit')
- end
- end
- end
- -- Set eventArgs.handled to true if we don't want the automatic display to be run.
- function display_current_job_state(eventArgs)
- end
- -------------------------------------------------------------------------------------------------------------------
- -- Utility functions specific to this job.
- -------------------------------------------------------------------------------------------------------------------
- -- Custom spell mapping.
- function job_get_spell_map(spell)
- if spell.english == 'Perfect Defense' then
- return 'PerfectDefense'
- elseif spell.type == 'BloodPactRage' then
- if spell.english == 'Flaming Crush' then
- return 'FlamingCrush'
- elseif magicalRagePacts:contains(spell.english) then
- return 'MagicalBloodPactRage'
- else
- return 'PhysicalBloodPactRage'
- end
- elseif spell.type == 'BloodPactWard' and spell.target.type == 'MONSTER' then
- if spell.english == "Sleepga" or spell.english == "Mewing Lullaby" then
- return 'BloodPactSleep'
- else
- return 'DebuffBloodPactWard'
- end
- end
- end
- -- Cast the appropriate storm for the currently summoned avatar, if possible.
- function handle_petweather()
- if player.sub_job ~= 'SCH' then
- add_to_chat(122, "You can not cast storm spells")
- return
- end
- if not pet.isvalid then
- add_to_chat(122, "You do not have an active avatar.")
- return
- end
- local element = pet.element
- if element == 'Thunder' then
- element = 'Lightning'
- end
- if S{'Light','Dark','Lightning'}:contains(element) then
- add_to_chat(122, 'You do not have access to '..elements.storm_of[element]..'.')
- return
- end
- local storm = elements.storm_of[element]
- if storm then
- send_command('@input /ma "'..elements.storm_of[element]..'" <me>')
- else
- add_to_chat(123, 'Error: Unknown element ('..tostring(element)..')')
- end
- end
- -- Custom uber-handling of Elemental Siphon
- function handle_siphoning()
- if areas.Cities:contains(world.area) then
- add_to_chat(122, 'Cannot use Elemental Siphon in a city area.')
- return
- end
- local siphonElement
- local stormElementToUse
- local releasedAvatar
- local dontRelease
- -- If we already have a spirit out, just use that.
- if pet.isvalid and spirits:contains(pet.name) then
- siphonElement = pet.element
- dontRelease = true
- -- If current weather doesn't match the spirit, but the spirit matches the day, try to cast the storm.
- if player.sub_job == 'SCH' and pet.element == world.day_element and pet.element ~= world.weather_element then
- if not S{'Light','Dark','Lightning'}:contains(pet.element) then
- stormElementToUse = pet.element
- end
- end
- -- If we're subbing /sch, there are some conditions where we want to make sure specific weather is up.
- -- If current (single) weather is opposed by the current day, we want to change the weather to match
- -- the current day, if possible.
- elseif player.sub_job == 'SCH' and world.weather_element ~= 'None' then
- -- We can override single-intensity weather; leave double weather alone, since even if
- -- it's partially countered by the day, it's not worth changing.
- if get_weather_intensity() == 1 then
- -- If current weather is weak to the current day, it cancels the benefits for
- -- siphon. Change it to the day's weather if possible (+0 to +20%), or any non-weak
- -- weather if not.
- -- If the current weather matches the current avatar's element (being used to reduce
- -- perpetuation), don't change it; just accept the penalty on Siphon.
- if world.weather_element == elements.weak_to[world.day_element] and
- (not pet.isvalid or world.weather_element ~= pet.element) then
- -- We can't cast lightning/dark/light weather, so use a neutral element
- if S{'Light','Dark','Lightning'}:contains(world.day_element) then
- stormElementToUse = 'Wind'
- else
- stormElementToUse = world.day_element
- end
- end
- end
- end
- -- If we decided to use a storm, set that as the spirit element to cast.
- if stormElementToUse then
- siphonElement = stormElementToUse
- elseif world.weather_element ~= 'None' and (get_weather_intensity() == 2 or world.weather_element ~= elements.weak_to[world.day_element]) then
- siphonElement = world.weather_element
- else
- siphonElement = world.day_element
- end
- local command = ''
- local releaseWait = 0
- if pet.isvalid and avatars:contains(pet.name) then
- command = command..'input /pet "Release" <me>;wait 1.1;'
- releasedAvatar = pet.name
- releaseWait = 10
- end
- if stormElementToUse then
- command = command..'input /ma "'..elements.storm_of[stormElementToUse]..'" <me>;wait 4;'
- releaseWait = releaseWait - 4
- end
- if not (pet.isvalid and spirits:contains(pet.name)) then
- command = command..'input /ma "'..elements.spirit_of[siphonElement]..'" <me>;wait 4;'
- releaseWait = releaseWait - 4
- end
- command = command..'input /ja "Elemental Siphon" <me>;'
- releaseWait = releaseWait - 1
- releaseWait = releaseWait + 0.1
- if not dontRelease then
- if releaseWait > 0 then
- command = command..'wait '..tostring(releaseWait)..';'
- else
- command = command..'wait 1.1;'
- end
- command = command..'input /pet "Release" <me>;'
- end
- if releasedAvatar then
- command = command..'wait 1.1;input /ma "'..releasedAvatar..'" <me>'
- end
- send_command(command)
- end
- -- Handles executing blood pacts in a generic, avatar-agnostic way.
- -- cmdParams is the split of the self-command.
- -- gs c [pact] [pacttype]
- function handle_pacts(cmdParams)
- if areas.Cities:contains(world.area) then
- add_to_chat(122, 'You cannot use pacts in town.')
- return
- end
- if not pet.isvalid then
- add_to_chat(122,'No avatar currently available. Returning to macro set 1.')
- set_macro_page(1)
- return
- end
- if spirits:contains(pet.name) then
- add_to_chat(122,'Cannot use pacts with spirits.')
- return
- end
- if not cmdParams[2] then
- add_to_chat(123,'No pact type given.')
- return
- end
- local pact = cmdParams[2]:lower()
- if not pacts[pact] then
- add_to_chat(123,'Unknown pact type: '..tostring(pact))
- return
- end
- if pacts[pact][pet.name] then
- if pact == 'astralflow' and not buffactive['astral flow'] then
- add_to_chat(122,'Cannot use Astral Flow pacts without 2hr active.')
- return
- end
- -- Leave out target; let Shortcuts auto-determine it.
- send_command('@input /pet "'..pacts[pact][pet.name]..'"')
- else
- add_to_chat(122,pet.name..' does not have a pact of type ['..pact..'].')
- end
- end
- -- Event handler for updates to player skill, since we can't rely on skill being
- -- correct at pet_aftercast for the creation of custom timers.
- windower.raw_register_event('incoming chunk',
- function (id)
- if id == 0x62 then
- if wards.flag then
- create_pact_timer(wards.spell)
- wards.flag = false
- wards.spell = ''
- end
- end
- end)
- -- Function to create custom timers using the Timers addon. Calculates ward duration
- -- based on player skill and base pact duration (defined in job_setup).
- function create_pact_timer(spell_name)
- -- Create custom timers for ward pacts.
- if wards.durations[spell_name] then
- local ward_duration = wards.durations[spell_name]
- if ward_duration < 181 then
- local skill = player.skills.summoning_magic
- if skill > 300 then
- skill = skill - 300
- if skill > 200 then skill = 200 end
- ward_duration = ward_duration + skill
- end
- end
- local timer_cmd = 'timers c "'..spell_name..'" '..tostring(ward_duration)..' down'
- if wards.icons[spell_name] then
- timer_cmd = timer_cmd..' '..wards.icons[spell_name]
- end
- send_command(timer_cmd)
- end
- end
- -- Select default macro book on initial load or subjob change.
- function select_default_macro_book()
- -- Default macro set/book
- set_macro_page(1, 1)
- send_command('console_displayactivity 0')
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement