|
Gearswap Support Thread
Server: Leviathan
Game: FFXI
Posts: 3753
By Leviathan.Celebrindal 2017-01-15 13:58:27
Thanks for the responses- in reply to Pintseyes- I knew it was an actual code because the same lua also uses code "123", which corresponds to red. And to Chiaia, THANKS!!!
Leviathan.Stamos
Server: Leviathan
Game: FFXI
Posts: 1242
By Leviathan.Stamos 2017-01-15 15:27:08
Nvm figured out the error in my ways!
Server: Sylph
Game: FFXI
Posts: 184
By Sylph.Subadai 2017-01-16 02:22:17
In this tutorial, in pretarget() they replace any <st> type target with <lastst>: Code function pretarget(spell)
----makes it so script-based macros use <lastst>, rather than
----<stnpc>,<stpc>,etc. if this did not exist, then script-based
----macros will require user input to select the subtarget.
if spell.target.raw:contains('<st') then
target='<lastst>'
end
--------------------------------------------------------------------------
end
Wouldn't this cause problems the first time you tried to use <st>, since <lastst> at that point is undefined? Also, wouldn't that code make it impossible to change targets with <st>, since it would force <lastst> all the time?
Cerberus.Clackk
Server: Cerberus
Game: FFXI
Posts: 12
By Cerberus.Clackk 2017-01-18 17:57:50
So I can't figure out how to make it swap to my magicburst set. I tried using this code but it kept throwing errors. Can anyone help me? Code function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' and state.MagicBurst.value then
equip(sets.magic_burst)
end
end
Here is my full gearswap file: Code -------------------------------------------------------------------------------------------------------------------
-- 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
-- Load and initialize the include file.
include('Mote-Include.lua')
include('organizer-lib')
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"}
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', 'MagicBurst')
state.CastingMode:options('Normal', 'Resistant', 'MagicBurst')
state.IdleMode:options('Normal', 'PDT')
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.macc_hagondes = {name="Hagondes Cuffs", augments={'Phys. dmg. taken -3%','Mag. Acc.+29'}}
send_command('bind ^` input /ma Stun <t>')
select_default_macro_book()
end
function user_unload()
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['Tabula Rasa'] = {legs="Pedagogy Pants"}
-- Fast cast sets for spells
sets.precast.FC = {
main={},
sub={},
ammo="Sapience orb",
head="Nahtirah Hat",
body="anhur robe",
hands={ name="Gende. Gages +1", augments={'Phys. dmg. taken -1%','"Cure" spellcasting time -1%',}},
legs="psycloth lappas",
feet="pedagogy loafers",
neck="orunmila's torque",
waist="Witful Belt",
left_ear="Enchntr. Earring +1",
right_ear="Loquac. Earring",
left_ring="Prolix Ring",
right_ring="Weather. Ring",
back="Swith Cape +1",
}
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
sets.precast.FC.Impact = set_combine(sets.precast.FC['Elemental Magic'], {head=empty,body="Twilight Cloak"})
-- Midcast Sets
sets.midcast.FastRecast = {
main={},
sub={},
ammo="Sapience orb",
head="Nahtirah Hat",
body="anhur robe",
hands={ name="Gende. Gages +1", augments={'Phys. dmg. taken -1%','"Cure" spellcasting time -1%',}},
legs="psycloth lappas",
feet="pedagogy loafers",
neck="orunmila's torque",
waist="Witful Belt",
left_ear="Enchntr. Earring +1",
right_ear="Loquac. Earring",
left_ring="Prolix Ring",
right_ring="Weather. Ring",
back="Swith Cape +1",
}
sets.midcast.Cure = {
main={ name="Akademos", augments={'INT+15','"Mag.Atk.Bns."+15','Mag. Acc.+15',}},
sub="Niobid strap",
ammo="Oreiad's Tathlum",
head={ name="Gende. Caubeen +1", augments={'Phys. dmg. taken -1%','"Cure" potency +6%',}},
body={ name="Gende. Bilaut +1", augments={'Phys. dmg. taken -3%',}},
hands={ name="Telchine Gloves", augments={'Song spellcasting time -6%',}},
legs={ name="Lengo Pants", augments={'INT+9','Mag. Acc.+15','"Mag.Atk.Bns."+14',}},
feet={ name="Vanya Clogs", augments={'"Cure" potency +5%','"Cure" spellcasting time -15%','"Conserve MP"+6',}},
neck="phalaina locket",
waist="Bishop's Sash",
left_ear="Beatific Earring",
right_ear="Healing Earring",
left_ring="Sirona's Ring",
right_ring="Haoma's Ring",
back="Tempered Cape +1",
}
sets.midcast.CureWithLightWeather = {
main="Chatoyant Staff",
sub="Achaq Grip",
ammo="Oreiad's Tathlum",
head="Gendewitha Caubeen +1",
body="Pedagogy gown +1",
hands={ name="Telchine Gloves", augments={'Song spellcasting time -6%',}},
legs="Vanya slops",
feet="medium's Sabots",
neck="Colossus's Torque",
waist=gear.ElementalObi,
left_ear="Beatific Earring",
right_ear="Healing Earring",
left_ring="Haoma's Ring",
right_ring="Sirona's Ring",
back=gear.ElementalCape,
}
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.Regen = {
head="arbatel Bonnet +2",
body="telchine chasuble"}
sets.midcast.Cursna = {
neck="Malison Medallion",
hands="Hieros Mittens",
ring2="haoma's ring",
ring1="Haoma's Ring",
feet="Gendewitha Galoshes"}
sets.midcast['Enhancing Magic'] = {
main={ name="Akademos", augments={'INT+15','"Mag.Atk.Bns."+15','Mag. Acc.+15',}},
sub="Niobid strap",
ammo="pemphredo tathlum",
head="Arbatel Bonnet +1",
body={ name="Peda. Gown +1", augments={'Enhances "Enlightenment" effect',}},
hands="Svnt. Bracers +2",
legs="Portent Pants",
feet="Serpentes Sabots",
neck="Colossus's Torque",
waist="Olympus Sash",
left_ear="Andoaa Earring",
right_ear="Gifted Earring",
left_ring="Paguroidea Ring",
right_ring="Sheltered Ring",
back="Merciful Cape",
}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {waist="Siegel Sash"})
sets.midcast.Storm = set_combine(sets.midcast['Enhancing Magic'], {feet="Pedagogy Loafers"})
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={ name="Akademos", augments={'INT+15','"Mag.Atk.Bns."+15','Mag. Acc.+15',}},
sub="Niobid strap",
ammo="Oreiad's Tathlum",
head={ name="Artsieq Hat", augments={'MP+30','Mag. Acc.+20','MND+7',}},
body={ name="Amalric Doublet", augments={'MP+60','"Mag.Atk.Bns."+20','"Fast Cast"+3',}},
hands="lurid mitts",
legs="Savant's Pants +2",
feet="medium's sabots",
neck="Imbodla Necklace",
waist="Ovate Rope",
left_ear="Gwati Earring",
right_ear="Barkaro. Earring",
left_ring="Levia. Ring +1",
right_ring="Levia. Ring +1",
back="Ogapepo Cape",
}
sets.midcast.IntEnfeebles = {
main={ name="Akademos", augments={'INT+15','"Mag.Atk.Bns."+15','Mag. Acc.+15',}},
sub="Niobid strap",
ammo="Oreiad's Tathlum",
head={ name="Artsieq Hat", augments={'MP+30','Mag. Acc.+20','MND+7',}},
body={ name="Amalric Doublet", augments={'MP+60','"Mag.Atk.Bns."+20','"Fast Cast"+3',}},
hands="lurid mitts",
legs="Savant's Pants +2",
feet="medium's sabots",
neck="Imbodla Necklace",
waist="Ovate Rope",
left_ear="Gwati Earring",
right_ear="Barkaro. Earring",
left_ring="shiva Ring +1",
right_ring="shiva Ring +1",
back="Ogapepo Cape",
}
sets.midcast.ElementalEnfeeble = sets.midcast.IntEnfeebles
sets.midcast['Dark Magic'] = {
main={ name="Akademos", augments={'INT+15','"Mag.Atk.Bns."+15','Mag. Acc.+15',}},
sub="Benthos Grip",
ammo="Pemphredo Tathlum",
head="Pixie Hairpin +1",
body={ name="Merlinic Jubbah", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic Damage +13','INT+6','Mag. Acc.+7','"Mag.Atk.Bns."+11',}},
hands={ name="Hagondes Cuffs", augments={'Phys. dmg. taken -4%','Mag. Acc.+23',}},
legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','INT+10','"Mag.Atk.Bns."+13',}},
feet={ name="Merlinic Crackows", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic burst mdg.+9%','CHR+15','Mag. Acc.+10',}},
neck="Dark Torque",
waist="Fucho-no-Obi",
left_ear="Hirudinea Earring",
right_ear="Barkaro. Earring",
left_ring="Sangoma Ring",
right_ring="Archon Ring",
back={ name="Bookworm's Cape", augments={'INT+2','MND+1','Helix eff. dur. +20',}},
}
sets.midcast.Kaustra = {main="coeus",sub="Wizzan Grip",ammo="Witchstone",
head="Hagondes Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Icesoul Ring",ring2="Strendu Ring",
back="Toro Cape",waist="Cognition Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
sets.midcast.Drain = {
main={ name="Akademos", augments={'INT+15','"Mag.Atk.Bns."+15','Mag. Acc.+15',}},
sub="Benthos Grip",
ammo="Pemphredo Tathlum",
head="Pixie Hairpin +1",
body={ name="Merlinic Jubbah", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic Damage +13','INT+6','Mag. Acc.+7','"Mag.Atk.Bns."+11',}},
hands={ name="Hagondes Cuffs", augments={'Phys. dmg. taken -4%','Mag. Acc.+23',}},
legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','INT+10','"Mag.Atk.Bns."+13',}},
feet={ name="Merlinic Crackows", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic burst mdg.+9%','CHR+15','Mag. Acc.+10',}},
neck="Dark Torque",
waist="Fucho-no-Obi",
left_ear="Hirudinea Earring",
right_ear="Barkaro. Earring",
left_ring="Sangoma Ring",
right_ring="Archon Ring",
back={ name="Bookworm's Cape", augments={'INT+2','MND+1','Helix eff. dur. +20',}},
}
sets.midcast.Aspir = sets.midcast.Drain
sets.midcast.Stun = {main="coeus",sub="Mephitis Grip",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Aesir Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Gendewitha Gages",ring1="Prolix Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Witful Belt",legs="Pedagogy Pants",feet="Academic's Loafers"}
sets.midcast.Stun.Resistant = set_combine(sets.midcast.Stun, {main="Lehbrailg +2"})
-- Elemental Magic sets are default for handling low-tier nukes.
sets.midcast['Elemental Magic'] = {
main={ name="Akademos", augments={'INT+15','"Mag.Atk.Bns."+15','Mag. Acc.+15',}},
sub="Niobid strap",
ammo="pemphredo tathlum",
head="Merlinic hood",
body="Merlinic Jubbah",
hands="Chironic gloves",
legs="Merlinic shalwar",
feet="Merlinic Crackows",
neck="Saevus Pendant +1",
waist=gear.ElementalObi,
left_ear="Friomisi Earring",
right_ear="barkarole earring",
left_ring="Shiva Ring +1",
right_ring="Shiva Ring +1",
back=gear.ElementalCape,
}
sets.midcast['Elemental Magic'].Resistant = {
main={ name="Akademos", augments={'INT+15','"Mag.Atk.Bns."+15','Mag. Acc.+15',}},
sub="Niobid strap",
ammo="pemphredo tathlum",
head="Merlinic hood",
body={ name="Amalric Doublet", augments={'MP+60','"Mag.Atk.Bns."+20','"Fast Cast"+3',}},
hands="psycloth manillas",
legs="lengo pants",
feet="Arbatel Loafers +1",
neck="eddy necklace",
waist=gear.ElementalObi,
left_ear="Friomisi Earring",
right_ear="barkarole earring",
left_ring="shiva ring +1",
right_ring="shiva ring +1",
back="Toro Cape",
}
sets.midcast['Elemental Magic'].MagicBurst = {
main={ name="Akademos", augments={'INT+15','"Mag.Atk.Bns."+15','Mag. Acc.+15',}},
sub="Niobid strap",
ammo="pemphredo tathlum",
head="Merlinic hood",
body="Merlinic Jubbah",
hands={ name="Amalric Gages", augments={'INT+10','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
legs="merlinic shalwar",
feet="Arbatel Loafers +1",
neck="Mizu. Kubikazari",
waist=gear.ElementalObi,
left_ear="Friomisi Earring",
right_ear="barkarole earring",
left_ring="Locus Ring",
right_ring="Mujin Band",
back="Seshaw Cape",
}
-- Custom refinements for certain nuke tiers
sets.midcast['Elemental Magic'].HighTierNuke = set_combine(sets.midcast['Elemental Magic'])
sets.midcast['Elemental Magic'].HighTierNuke.Resistant = set_combine(sets.midcast['Elemental Magic'].Resistant)
sets.midcast.Impact = {main="coeus",sub="Mephitis Grip",ammo="pemphredo tathlum",
head=empty,neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Twilight Cloak",hands=gear.macc_hagondes,ring1="Icesoul Ring",ring2="Sangoma Ring",
back="Toro Cape",waist="Demonry Sash",legs="Hagondes Pants",feet="Bokwus Boots"}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main="Chatoyant Staff",sub="Mephitis Grip",
head="Nefer Khat +1",neck="Wiglen Gorget",
body="Heka's Kalasiris",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
waist="Austerity Belt",legs="Nares Trews",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="oneiros grip",
ammo="Vanir Battery",
body="Respite Cloak",
hands="Serpentes Cuffs",
legs="Assid. Pants +1",
feet="Serpentes Sabots",
neck="Wiglen Gorget",
waist="Fucho-no-Obi",
left_ear="Ethereal Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Paguroidea Ring",
right_ring="Sheltered Ring",
back="Repulse Mantle",
}
sets.idle.Field = {
main="akademos",
sub="oneiros grip",
ammo="Vanir Battery",
body="Respite Cloak",
hands="Serpentes Cuffs",
legs="Assid. Pants +1",
feet="Serpentes Sabots",
neck="Wiglen Gorget",
waist="Fucho-no-Obi",
left_ear="Ethereal Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Paguroidea Ring",
right_ring="Sheltered Ring",
back="Repulse Mantle",
}
sets.idle.Field.PDT = {main=gear.Staff.PDT,sub="Achaq Grip",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2="Paguroidea Ring",
back="Umbra Cape",waist="Hierarch Belt",legs="Nares Trews",feet="Herald's Gaiters"}
sets.idle.Field.Stun = {main="Apamajas II",sub="Mephitis Grip",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Aesir Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Gendewitha Gages",ring1="Prolix Ring",ring2="Sangoma Ring",
back="Swith Cape +1",waist="Goading Belt",legs="Bokwus Slops",feet="Academic's Loafers"}
sets.idle.Weak = {main="Bolelabunga",sub="Genbu's Shield",ammo="Incantor Stone",
head="wivre hairpin",neck="twilight torque",ear1="ethereal earring",ear2="sanare Earring",
body="genewitha bliaut",hands="serpentes cuffs",ring1="defending Ring",ring2="dark Ring",
back="cheviot Cape",waist="fucho-no-obi",legs="nares trews",feet="Herald's Gaiters"}
-- Defense sets
sets.defense.PDT = {main=gear.Staff.PDT,sub="Achaq Grip",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2=gear.DarkRing.physical,
back="Umbra Cape",waist="Hierarch Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
sets.defense.MDT = {main=gear.Staff.PDT,sub="Achaq Grip",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
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"}
-- 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="Zelus Tiara",
body="Vanir Cotehardie",hands="Bokwus Gloves",ring1="Rajas Ring",
waist="Goading Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
sets.precast.WS['Myrkr'] = {
main={ name="Akademos", augments={'INT+15','"Mag.Atk.Bns."+15','Mag. Acc.+15',}},
sub="Niobid strap",
ammo="Strobilus",
head="Pixie Hairpin +1",
body={ name="Weatherspoon Robe", augments={'MP+120',}},
hands={ name="Helios Gloves", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','"Occult Acumen"+7','INT+9',}},
legs={ name="Amalric Slops", augments={'MP+60','"Mag.Atk.Bns."+20','Enmity-5',}},
feet="Llwyd's Clogs",
neck="Dualism Collar +1",
waist="Shinjutsu-no-Obi",
left_ear="Loquac. Earring",
right_ear="Gifted Earring",
left_ring="Sangoma Ring",
right_ring="Fenrir Ring +1",
back="Pahtli Cape",
}
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Ebullience'] = {head="Arbatel Bonnet +1"}
sets.buff['Rapture'] = {head="Arbatel bonnet +1"}
sets.buff['Perpetuance'] = {hands="Savant's Bracers +2"}
sets.buff['Immanence'] = {hands="Savant's Bracers +2"}
sets.buff['Penury'] = {legs="Savant's Pants +2"}
sets.buff['Parsimony'] = {legs="Savant's Pants +2"}
sets.buff['Celerity'] = {feet="Pedagogy Loafers"}
sets.buff['Alacrity'] = {feet="Pedagogy Loafers"}
sets.buff['Klimaform'] = {feet="Arbatel Loafers +1"}
sets.buff.FullSublimation = {head="Academic's Mortarboard",ear1="Savant's Earring",body="Pedagogy Gown +1"}
sets.buff.PDTSublimation = {head="Academic's Mortarboard",ear1="Savant's Earring"}
--sets.buff['Sandstorm'] = {feet="Desert Boots"}
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
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 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 = 4*60
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(1, 17)
end
Cerberus.Clackk
Server: Cerberus
Game: FFXI
Posts: 12
By Cerberus.Clackk 2017-01-18 18:25:38
Code function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' and state.MagicBurst.value then
equip(sets.MagicBurst)
end
end
also, line 343
i'm confused. What about line 343?
Server: Shiva
Game: FFXI
Posts: 1052
By Shiva.Arislan 2017-01-18 18:32:50
Your code is calling for a set called "sets.magic_burst" to be equipped...
... but your MB set is named "sets.midcast['Elemental Magic'].MagicBurst", (line 343).
Cerberus.Clackk
Server: Cerberus
Game: FFXI
Posts: 12
By Cerberus.Clackk 2017-01-18 18:40:44
My BLM lua is the same exact way and it equips my magicburst set. That's why it's confusing me lol. Or are you saying it should be sets.MagicBurst and not sets.Magic_Burst?
Server: Shiva
Game: FFXI
Posts: 1052
By Shiva.Arislan 2017-01-18 19:25:43
Rename your MB set to sets.MagicBurst
(sorry the underscore before was a typo)
Code
sets.MagicBurst = {
main={ name="Akademos", augments={'INT+15','"Mag.Atk.Bns."+15','Mag. Acc.+15',}},
sub="Niobid strap",
ammo="pemphredo tathlum",
head="Merlinic hood",
body="Merlinic Jubbah",
hands={ name="Amalric Gages", augments={'INT+10','Mag. Acc.+15','"Mag.Atk.Bns."+15',}},
legs="merlinic shalwar",
feet="Arbatel Loafers +1",
neck="Mizu. Kubikazari",
waist=gear.ElementalObi,
left_ear="Friomisi Earring",
right_ear="barkarole earring",
left_ring="Locus Ring",
right_ring="Mujin Band",
back="Seshaw Cape",
}
Cerberus.Clackk
Server: Cerberus
Game: FFXI
Posts: 12
By Cerberus.Clackk 2017-01-18 20:43:42
Thank you both for your help!
By hamany9 2017-01-21 06:06:25
Help! Can't use new ambuscade gear (Ayanmo+1) in my blu lua, I keep getting this error :
gearswap/equip_processing.lua:268: attempt to index field '?' (a nil value .
And also It says your job file is out of date, please update to the latest repository baseline.
How do i update?
heres my gs file:
-------------------------------------------------------------------------------------------------------------------
-- 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()
state.Buff['Burst Affinity'] = buffactive['Burst Affinity'] or false
state.Buff['Chain Affinity'] = buffactive['Chain Affinity'] or false
state.Buff.Convergence = buffactive.Convergence or false
state.Buff.Diffusion = buffactive.Diffusion or false
state.Buff.Efflux = buffactive.Efflux or false
state.Buff['Unbridled Learning'] = buffactive['Unbridled Learning'] or false
blue_magic_maps = {}
-- Mappings for gear sets to use for various blue magic spells.
-- While Str isn't listed for each, it's generally assumed as being at least
-- moderately signficant, even for spells with other mods.
-- Physical Spells --
-- Physical spells with no particular (or known) stat mods
blue_magic_maps.Physical = S{
'Bilgestorm'
}
-- Spells with heavy accuracy penalties, that need to prioritize accuracy first.
blue_magic_maps.PhysicalAcc = S{
'Heavy Strike',
}
-- Physical spells with Str stat mod
blue_magic_maps.PhysicalStr = S{
'Battle Dance','Bloodrake','Death Scissors','Dimensional Death',
'Empty Thrash','Quadrastrike','Sinker Drill','Spinal Cleave',
'Uppercut','Vertical Cleave'
}
-- Physical spells with Dex stat mod
blue_magic_maps.PhysicalDex = S{
'Amorphic Spikes','Asuran Claws','Barbed Crescent','Claw Cyclone','Disseverment',
'Foot Kick','Frenetic Rip','Goblin Rush','Hysteric Barrage','Paralyzing Triad',
'Seedspray','Sickle Slash','Smite of Rage','Terror Touch','Thrashing Assault',
'Vanity Dive'
}
-- Physical spells with Vit stat mod
blue_magic_maps.PhysicalVit = S{
'Body Slam','Cannonball','Delta Thrust','Glutinous Dart','Grand Slam',
'Power Attack','Quad. Continuum','Sprout Smack','Sub-zero Smash'
}
-- Physical spells with Agi stat mod
blue_magic_maps.PhysicalAgi = S{
'Benthic Typhoon','Feather Storm','Helldive','Hydro Shot','Jet Stream',
'Pinecone Bomb','Spiral Spin','Wild Oats'
}
-- Physical spells with Int stat mod
blue_magic_maps.PhysicalInt = S{
'Mandibular Bite','Queasyshroom'
}
-- Physical spells with Mnd stat mod
blue_magic_maps.PhysicalMnd = S{
'Ram Charge','Screwdriver','Tourbillion'
}
-- Physical spells with Chr stat mod
blue_magic_maps.PhysicalChr = S{
'Bludgeon'
}
-- Physical spells with HP stat mod
blue_magic_maps.PhysicalHP = S{
'Final Sting'
}
-- Magical Spells --
-- Magical spells with the typical Int mod
blue_magic_maps.Magical = S{
'Blastbomb','Blazing Bound','Bomb Toss','Cursed Sphere','Dark Orb','Death Ray',
'Diffusion Ray','Droning Whirlwind','Embalming Earth','Firespit','Foul Waters',
'Ice Break','Leafstorm','Maelstrom','Rail Cannon','Regurgitation','Rending Deluge',
'Retinal Glare','Subduction','Tem. Upheaval','Water Bomb','Anvil Lightning','Spectral Floe',
'Tenebral Crush','Blinding Fulgor','Entomb','Scouring Spate','Silent Storm','Searing Tempest'
}
-- Magical spells with a primary Mnd mod
blue_magic_maps.MagicalMnd = S{
'Acrid Stream','Evryone. Grudge','Magic Hammer','Mind Blast'
}
-- Magical spells with a primary Chr mod
blue_magic_maps.MagicalChr = S{
'Eyes On Me','Mysterious Light'
}
-- Magical spells with a Vit stat mod (on top of Int)
blue_magic_maps.MagicalVit = S{
'Thermal Pulse'
}
-- Magical spells with a Dex stat mod (on top of Int)
blue_magic_maps.MagicalDex = S{
'Charged Whisker','Gates of Hades'
}
-- Magical spells (generally debuffs) that we want to focus on magic accuracy over damage.
-- Add Int for damage where available, though.
blue_magic_maps.MagicAccuracy = S{
'1000 Needles','Absolute Terror','Actinic Burst','Auroral Drape','Awful Eye',
'Blank Gaze','Blistering Roar','Blood Drain','Blood Saber','Chaotic Eye',
'Cimicine Discharge','Cold Wave','Corrosive Ooze','Demoralizing Roar','Digest',
'Dream Flower','Enervation','Feather Tickle','Filamented Hold','Frightful Roar',
'Geist Wall','Hecatomb Wave','Infrasonics','Jettatura','Light of Penance',
'Lowing','Mind Blast','Mortal Ray','MP Drainkiss','Osmosis','Reaving Wind',
'Sandspin','Sandspray','Sheep Song','Soporific','Sound Blast','Stinking Gas',
'Sub-zero Smash','Venom Shell','Voracious Trunk','Yawn'
}
-- Breath-based spells
blue_magic_maps.Breath = S{
'Bad Breath','Flying Hip Press','Frost Breath','Heat Breath',
'Hecatomb Wave','Magnetite Cloud','Poison Breath','Radiant Breath','Self-Destruct',
'Thunder Breath','Vapor Spray','Wind Breath'
}
-- Stun spells
blue_magic_maps.Stun = S{
'Blitzstrahl','Frypan','Head Butt','Sudden Lunge','Tail slap','Temporal Shift',
'Thunderbolt','Whirl of Rage'
}
-- Healing spells
blue_magic_maps.Healing = S{
'Healing Breeze','Magic Fruit','Plenilune Embrace','Pollen','Restoral','White Wind',
'Wild Carrot'
}
-- Buffs that depend on blue magic skill
blue_magic_maps.SkillBasedBuff = S{
'Barrier Tusk','Diamondhide','Magic Barrier','Metallic Body','Plasma Charge',
'Pyric Bulwark','Reactor Cool',
}
-- Other general buffs
blue_magic_maps.Buff = S{
'Amplification','Animating Wail','Battery Charge','Carcharian Verve','Cocoon',
'Erratic Flutter','Exuviation','Fantod','Feather Barrier','Harden Shell',
'Memento Mori','Nat. Meditation','Occultation','Orcish Counterstance','Refueling',
'Regeneration','Saline Coat','Triumphant Roar','Warm-Up','Winds of Promyvion',
'Zephyr Mantle'
}
-- Spells that require Unbridled Learning to cast.
unbridled_spells = S{
'Absolute Terror','Bilgestorm','Blistering Roar','Bloodrake','Carcharian Verve',
'Crashing Thunder','Droning Whirlwind','Gates of Hades','Harden Shell','Polar Roar',
'Pyric Bulwark','Thunderbolt','Tourbillion','Uproot'
}
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
state.OffenseMode:options('Normal', 'Acc', 'DT')
state.WeaponskillMode:options('Normal', 'Acc')
state.CastingMode:options('Normal', 'Resistant')
state.IdleMode:options('Normal', 'PDT', 'Learning')
gear.macc_hagondes = {name="Hagondes Cuffs", augments={'Phys. dmg. taken -3%','Mag. Acc.+29'}}
-- Additional local binds
send_command('bind ^` input /ja "Chain Affinity" <me>')
send_command('bind !` input /ja "Efflux" <me>')
send_command('bind @` input /ja "Burst Affinity" <me>')
update_combat_form()
select_default_macro_book()
end
-- Called when this job file is unloaded (eg: job change)
function user_unload()
send_command('unbind ^`')
send_command('unbind !`')
send_command('unbind @`')
end
-- Set up gear sets.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
sets.buff['Burst Affinity'] = {feet="Mavi Basmak +2"}
sets.buff['Chain Affinity'] = {head="Mavi Kavuk +2", feet="Assimilator's Charuqs"}
sets.buff.Convergence = {head="Luhlaza Keffiyeh"}
sets.buff.Diffusion = {feet="Luhlaza Charuqs"}
sets.buff.Enchainment = {body="Luhlaza Jubbah"}
sets.buff.Efflux = {legs="Mavi Tayt +2"}
-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA['Azure Lore'] = {hands="Mirage Bazubands +2"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {ammo="Sonia's Plectrum",
head="Uk'uxkaj Cap",
body="Vanir Cotehardie",hands="Buremte Gloves",ring1="Spiral Ring",
back="Iximulew Cape",waist="Caudata Belt",legs="Hagondes Pants",feet="Iuitl Gaiters +1"}
-- Don't need any special gear for Healing Waltz.
sets.precast.Waltz['Healing Waltz'] = {}
-- Fast cast sets for spells
sets.precast.FC = {ammo="Impatiens",
head="Amalric coif",neck="Orunmila's torque",ear2="Loquacious Earring",ear1="Etiolation Earring",
body="Luhlaza Jubbah +1",hands="Leyline Gloves",ring1="Prolix Ring",
back="Swith Cape",waist="Witful Belt",legs="Lengo Pants",feet="Amalric nails"}
sets.precast.FC['Blue Magic'] = set_combine(sets.precast.FC, {body="Mavi Mintan +2"})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {
head="Herculean helm",neck="Fotia gorget",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Adhemar jacket",hands="Herculean gloves",ring1="Hetairoi ring",ring2="Epona's Ring",
back="Rosmerta's Cape",waist="Fotia belt",legs="Samnuha tights",feet="Herculean boots"}
sets.precast.WS.acc = set_combine(sets.precast.WS, {hands="Herculean gloves"})
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {ring1="Aquasoul Ring",feet="Herculean boots"})
sets.precast.WS['Sanguine Blade'] = {
head="Jhakri coronal +1",neck="Eddy Necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Jhakri robe +1",hands="Jhakri cuffs +1",ring1="Acumen Ring",ring2="Strendu Ring",
back="Cornflower cape",legs="Amalric slops",feet="Amalric nails"}
-- Midcast Sets
sets.midcast.FastRecast = {ammo="Impatiens",
head="Amalric coif",neck="Orunmila's Torque",ear2="Loquacious Earring",ear1="Etiolation Earring",
body="Luhlaza Jubbah +1",hands="Leyline Gloves",ring1="Prolix Ring",
back="Swith Cape",waist="Witful Belt",legs="Lengo Pants",feet="Amalric nails"}
sets.midcast['Blue Magic'] = {}
-- Physical Spells --
sets.midcast['Blue Magic'].Physical = {ammo="Falcon eye",
head="Jhakri coronal +1",neck="Sanctity necklace",ear1="Dignitary's earring",ear2="Steelflash Earring",
body="Adhemar jacket",hands="Jhakri cuffs +1",ring1="Rajas Ring",ring2="Petrov ring",
back="Cornflower Cape",waist="Kentarch belt +1",legs="Jhakri slops +1",feet="Jhakri pigaches +1"}
sets.midcast['Blue Magic'].PhysicalAcc = {ammo="Falcon eye",
head="Jhakri coronal +1",neck="Sanctity necklace",ear1="Dignitary's earring",ear2="Steelflash Earring",
body="Adhemar jacket",hands="Jhakri cuffs +1",ring1="Rajas Ring",ring2="Petrov ring",
back="Cornflower Cape",waist="Kentarch belt +1",legs="Jhakri slops +1",feet="Jhakri pigaches +1"}
sets.midcast['Blue Magic'].PhysicalStr = set_combine(sets.midcast['Blue Magic'].Physical,
{body="Jhakri robe +1",hands="Jhakri cuffs +1"})
sets.midcast['Blue Magic'].PhysicalDex = set_combine(sets.midcast['Blue Magic'].Physical,
{ammo="Falcon eye",body="Adhemar jacket",hands="Jhakri cuffs +1",
waist="Kentarch belt +1",legs="Jhakri slops +1"})
sets.midcast['Blue Magic'].PhysicalVit = set_combine(sets.midcast['Blue Magic'].Physical,
{body="Adhemar jacket",hands="Jhakri cuffs +1",back="Cornflower Cape"})
sets.midcast['Blue Magic'].PhysicalAgi = set_combine(sets.midcast['Blue Magic'].Physical,
{body="Adhemar jacket",hands="Jhakri cuffs +1",ring2="Petrov Ring",
waist="Kentarch belt +1",feet="Jhakri slops +1"})
sets.midcast['Blue Magic'].PhysicalInt = set_combine(sets.midcast['Blue Magic'].Physical,
{ear1="Psystorm Earring",body="Jhakri robe +1",hands="Jhakri cuffs +1",
ring2="Acumen ring",back="Cornflower Cape",feet="Jhakri pigaches +1"})
sets.midcast['Blue Magic'].PhysicalMnd = set_combine(sets.midcast['Blue Magic'].Physical,
{ear1="Lifestorm Earring",body="Jhakri robe +1",hands="Jhakri cuffs +1",
ring2="Aquasoul Ring",back="Cornflower Cape"})
sets.midcast['Blue Magic'].PhysicalChr = set_combine(sets.midcast['Blue Magic'].Physical,
{body="Jhakri robe +1",hands="Jhakri cuffs +1",back="Cornflower Cape",
waist="Kentarch belt +1"})
sets.midcast['Blue Magic'].PhysicalHP = set_combine(sets.midcast['Blue Magic'].Physical)
-- Magical Spells --
sets.midcast['Blue Magic'].Magical = {ammo="Pemphredo Tathlum",
head="Jhakri coronal +1",neck="Sanctity necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Jhakri robe +1",hands="Jhakri cuffs +1",ring1="Strendu Ring",ring2="Acumen Ring",
back="Cornflower Cape",waist="Yamabuki-no-obi",legs="Amalric slops",feet="Amalric nails"}
sets.midcast['Blue Magic'].Magical.Resistant = set_combine(sets.midcast['Blue Magic'].Magical,
{body="Jhakri coronal +1",ring1="Sangoma Ring",legs="Amalric slops",feet="Amalric nails"})
sets.midcast['Blue Magic'].MagicalMnd = set_combine(sets.midcast['Blue Magic'].Magical,
{ring1="Aquasoul Ring"})
sets.midcast['Blue Magic'].MagicalChr = set_combine(sets.midcast['Blue Magic'].Magical)
sets.midcast['Blue Magic'].MagicalVit = set_combine(sets.midcast['Blue Magic'].Magical,
{ring1="Spiral Ring"})
sets.midcast['Blue Magic'].MagicalDex = set_combine(sets.midcast['Blue Magic'].Magical)
sets.midcast['Blue Magic'].MagicAccuracy = {ammo="Pemphredo Tathlum",
head="Jhakri coronal +1",neck="Sanctity necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Jhakri robe +1",hands="Jhakri cuffs +1",ring1="Strendu Ring",ring2="Acumen Ring",
back="Cornflower Cape",waist="Yamabuki-no-obi",legs="Amalric slops",feet="Amalric nails"}
-- Breath Spells --
sets.midcast['Blue Magic'].Breath = {ammo="Pemphredo Tathlum",
head="Jhakri coronal +1",neck="Sanctity necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Jhakri robe +1",hands="Jhakri cuffs +1",ring1="Strendu Ring",ring2="Acumen Ring",
back="Cornflower Cape",waist="Yamabuki-no-obi",legs="Amalric slops",feet="Amalric nails"}
-- Other Types --
sets.midcast['Blue Magic'].Stun = set_combine(sets.midcast['Blue Magic'].MagicAccuracy,
{waist="Kentarch belt +1"})
sets.midcast['Blue Magic']['White Wind'] = {
head="Herculean helm",neck="Orunmila's torque",ear1="Mendicant's earring",ear2="Loquacious Earring",
body="Adhemar jacket",hands="Leyline Gloves",ring1="K'ayres Ring",ring2="Supershear Ring",
back="Solemnity cape",waist="Gishdubar sash",legs="Lengo pants",feet="Medium's Sabots"}
sets.midcast['Blue Magic'].Healing = {
head="Herculean helm",neck="Orunmila's torque",ear1="Mendicant's earring",ear2="Loquacious Earring",
body="Adhemar jacket",hands="Leyline Gloves",ring1="K'ayres Ring",ring2="Supershear Ring",
back="Solemnity cape",waist="Gishdubar sash",legs="Lengo pants",feet="Medium's Sabots"}
sets.midcast['Blue Magic'].SkillBasedBuff = {ammo="Mavi Tathlum",
head="Luhlaza Keffiyeh",
body="Assimilator's Jubbah",
back="Cornflower Cape",legs="Mavi Tayt +2",feet="Luhlaza Charuqs"}
sets.midcast['Blue Magic'].Buff = {}
sets.midcast.Protect = {ring1="Sheltered Ring"}
sets.midcast.Protectra = {ring1="Sheltered Ring"}
sets.midcast.Shell = {ring1="Sheltered Ring"}
sets.midcast.Shellra = {ring1="Sheltered Ring"}
-- Sets to return to when not performing an action.
-- Gear for learning spells: +skill and AF hands.
sets.Learning = {ammo="Mavi Tathlum",hands="Assimilator's Bazubands +1"}
--head="Luhlaza Keffiyeh",
--body="Assimilator's Jubbah",hands="Assimilator's Bazubands +1",
--back="Cornflower Cape",legs="Mavi Tayt +2",feet="Luhlaza Charuqs"}
sets.latent_refresh = {waist="Fucho-no-obi"}
-- Resting sets
sets.resting = {
head="Rawhide mask",neck="Sanctity necklace",Ear1="Moonshade earring",Ear2="Infused earring",
body="Jhakri robe +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Sheltered Ring",ring2="Paguroidea Ring",
waist="Fucho-no-obi",feet={ name="Herculean Boots", augments={'Attack+15','Phys. dmg. taken -3%','DEX+6','Accuracy+11',}}}
-- Idle sets
sets.idle = {ammo="Staunch Tathlum",
head="Rawhide Mask",neck="Loricate torque +1",ear1="Moonshade Earring",ear2="Infused Earring",
body="Jhakri robe +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defending Ring",ring2="Vocane Ring",
back="Umbra cape",waist="Flume Belt",legs="Carmine Cuisses",feet={ name="Herculean Boots", augments={'Attack+15','Phys. dmg. taken -3%','DEX+6','Accuracy+11',}}}
sets.idle.PDT = {ammo="Staunch Tathlum",
head="Rawhide Mask",neck="Loricate torque +1",ear1="Moonshade Earring",ear2="Ethereal Earring",
body="Ayanmo Corazza +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defending Ring",ring2="Vocane Ring",
back="Umbra cape",waist="Flume Belt",legs="Carmine Cuisses",feet={ name="Herculean Boots", augments={'Attack+15','Phys. dmg. taken -3%','DEX+6','Accuracy+11',}}}
sets.idle.Town = {ammo="Staunch Tathlum",
head="Rawhide Mask",neck="Sanctity necklace",ear1="Moonshade Earring",ear2="Infused Earring",
body="Jhakri robe +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defending Ring",ring2="Vocane Ring",
back="Umbra cape",waist="Flume Belt",legs="Carmine Cuisses",feet={ name="Herculean Boots", augments={'Attack+15','Phys. dmg. taken -3%','DEX+6','Accuracy+11',}}}
-- Defense sets
sets.defense.PDT = {ammo="Staunch Tathlum",
head={ name="Herculean Helm", augments={'Phys. dmg. taken -4%','Accuracy+14','Attack+11',}},neck="Loricate torque +1",ear1="Suppanomimi",ear2="Cessance Earring",
body="Ayanmo Corazza +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defending ring",ring2="Vocane ring",
back="Rosmerta's cape",waist="Kentarch belt +1",legs={ name="Herculean Trousers", augments={'Attack+11','Phys. dmg. taken -4%','AGI+8',}},feet={ name="Herculean Boots", augments={'Attack+15','Phys. dmg. taken -3%','DEX+6','Accuracy+11',}}}
sets.defense.MDT ={ammo="Staunch Tathlum",
head={ name="Herculean Helm", augments={'Phys. dmg. taken -4%','Accuracy+14','Attack+11',}},neck="Loricate torque +1",ear1="Suppanomimi",ear2="Cessance Earring",
body="Ayanmo Corazza +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defending ring",ring2="Vocane ring",
back="Rosmerta's cape",waist="Kentarch belt +1",legs={ name="Herculean Trousers", augments={'Attack+11','Phys. dmg. taken -4%','AGI+8',}},feet={ name="Herculean Boots", augments={'Attack+15','Phys. dmg. taken -3%','DEX+6','Accuracy+11',}}}
sets.Kiting = {legs="Carmine Cuisses"}
-- 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 = {ammo="Ginsen",
head={ name="Herculean Helm", augments={'Attack+15','"Triple Atk."+4','Accuracy+11',}},neck="Clotharius torque",ear1="Suppanomimi",ear2="Cessance Earring",
body="Adhemar jacket",hands={ name="Herculean Gloves", augments={'Accuracy+14 Attack+14','"Triple Atk."+2','STR+8','Accuracy+13','Attack+2',}},ring1="Hetairoi Ring",ring2="Epona's Ring",
back="Rosmerta's cape",waist="Kentarch belt +1",legs="Samnuha tights",feet={ name="Herculean Boots", augments={'Accuracy+21 Attack+21','"Triple Atk."+2','STR+5','Attack+13',}}}
sets.engaged.Acc = {ammo="Ginsen",
head={ name="Herculean Helm", augments={'Attack+15','"Triple Atk."+4','Accuracy+11',}},neck="Clotharius torque",ear1="Suppanomimi",ear2="Cessance Earring",
body="Adhemar jacket",hands={ name="Herculean Gloves", augments={'Accuracy+14 Attack+14','"Triple Atk."+2','STR+8','Accuracy+13','Attack+2',}},ring1="Hetairoi Ring",ring2="Epona's Ring",
back="Rosmerta's cape",waist="Kentarch belt +1",legs="Samnuha tights",feet={ name="Herculean Boots", augments={'Accuracy+21 Attack+21','"Triple Atk."+2','STR+5','Attack+13',}}}
sets.engaged.DT ={ammo="Staunch Tathlum",
head={ name="Herculean Helm", augments={'Phys. dmg. taken -4%','Accuracy+14','Attack+11',}},neck="Loricate torque +1",ear1="Suppanomimi",ear2="Cessance Earring",
body="Ayanmo Corazza +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defending ring",ring2="Vocane ring",
back="Rosmerta's cape",waist="Kentarch belt +1",legs={ name="Herculean Trousers", augments={'Attack+11','Phys. dmg. taken -4%','AGI+8',}},feet={ name="Herculean Boots", augments={'Attack+15','Phys. dmg. taken -3%','DEX+6','Accuracy+11',}}}
sets.self_healing = {ring1="Kunaji Ring",ring2="Asklepian Ring"}
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 unbridled_spells:contains(spell.english) and not state.Buff['Unbridled Learning'] then
eventArgs.cancel = true
windower.send_command('@input /ja "Unbridled Learning" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
end
end
-- Run after the default midcast() is done.
-- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
function job_post_midcast(spell, action, spellMap, eventArgs)
-- Add enhancement gear for Chain Affinity, etc.
if spell.skill == 'Blue Magic' then
for buff,active in pairs(state.Buff) do
if active and sets.buff[buff] then
equip(sets.buff[buff])
end
end
if spellMap == 'Healing' and spell.target.type == 'SELF' and sets.self_healing then
equip(sets.self_healing)
end
end
-- If in learning mode, keep on gear intended to help with that, regardless of action.
if state.OffenseMode.value == 'Learning' then
equip(sets.Learning)
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 state.Buff[buff] ~= nil then
state.Buff[buff] = gain
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Custom spell mapping.
-- Return custom spellMap value that can override the default spell mapping.
-- Don't return anything to allow default spell mapping to be used.
function job_get_spell_map(spell, default_spell_map)
if spell.skill == 'Blue Magic' then
for category,spell_list in pairs(blue_magic_maps) do
if spell_list:contains(spell.english) then
return category
end
end
end
end
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if player.mpp < 51 then
set_combine(idleSet, sets.latent_refresh)
end
return idleSet
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)
update_combat_form()
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
function update_combat_form()
-- Check for H2H or single-wielding
if player.equipment.sub == "Genbu's Shield" or player.equipment.sub == 'empty' then
state.CombatForm:reset()
else
state.CombatForm:set('DW')
end
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book
if player.sub_job == 'DNC' then
set_macro_page(1, 4)
else
set_macro_page(1, 4)
end
end
By hamany9 2017-01-21 06:09:40
Note, if i remove ayanmo gear from my lua, everything works fine.
Server: Asura
Game: FFXI
Posts: 167
By Asura.Verbannt 2017-01-21 08:13:23
Hamany9 pls put your lua code in [ code] input text here [ /code] take out spaces at beginning of [] or use the code button. It makes it easier to select and for the rest of the people posting on the page. It's the note with the < > next to the quote button on the reply window. ^^
-- Edited looked like one large run on sentence with out periods.
By hamany9 2017-01-21 08:30:36
Ok quick update, i keep getting this error regardless if i have the ambuscade new ambuscade gear or not, it says i need update my lua files, not sure how to do that, However, only my blu lua not working. Rest are fine.
Code -------------------------------------------------------------------------------------------------------------------
-- 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()
state.Buff['Burst Affinity'] = buffactive['Burst Affinity'] or false
state.Buff['Chain Affinity'] = buffactive['Chain Affinity'] or false
state.Buff.Convergence = buffactive.Convergence or false
state.Buff.Diffusion = buffactive.Diffusion or false
state.Buff.Efflux = buffactive.Efflux or false
state.Buff['Unbridled Learning'] = buffactive['Unbridled Learning'] or false
blue_magic_maps = {}
-- Mappings for gear sets to use for various blue magic spells.
-- While Str isn't listed for each, it's generally assumed as being at least
-- moderately signficant, even for spells with other mods.
-- Physical Spells --
-- Physical spells with no particular (or known) stat mods
blue_magic_maps.Physical = S{
'Bilgestorm'
}
-- Spells with heavy accuracy penalties, that need to prioritize accuracy first.
blue_magic_maps.PhysicalAcc = S{
'Heavy Strike',
}
-- Physical spells with Str stat mod
blue_magic_maps.PhysicalStr = S{
'Battle Dance','Bloodrake','Death Scissors','Dimensional Death',
'Empty Thrash','Quadrastrike','Sinker Drill','Spinal Cleave',
'Uppercut','Vertical Cleave'
}
-- Physical spells with Dex stat mod
blue_magic_maps.PhysicalDex = S{
'Amorphic Spikes','Asuran Claws','Barbed Crescent','Claw Cyclone','Disseverment',
'Foot Kick','Frenetic Rip','Goblin Rush','Hysteric Barrage','Paralyzing Triad',
'Seedspray','Sickle Slash','Smite of Rage','Terror Touch','Thrashing Assault',
'Vanity Dive'
}
-- Physical spells with Vit stat mod
blue_magic_maps.PhysicalVit = S{
'Body Slam','Cannonball','Delta Thrust','Glutinous Dart','Grand Slam',
'Power Attack','Quad. Continuum','Sprout Smack','Sub-zero Smash'
}
-- Physical spells with Agi stat mod
blue_magic_maps.PhysicalAgi = S{
'Benthic Typhoon','Feather Storm','Helldive','Hydro Shot','Jet Stream',
'Pinecone Bomb','Spiral Spin','Wild Oats'
}
-- Physical spells with Int stat mod
blue_magic_maps.PhysicalInt = S{
'Mandibular Bite','Queasyshroom'
}
-- Physical spells with Mnd stat mod
blue_magic_maps.PhysicalMnd = S{
'Ram Charge','Screwdriver','Tourbillion'
}
-- Physical spells with Chr stat mod
blue_magic_maps.PhysicalChr = S{
'Bludgeon'
}
-- Physical spells with HP stat mod
blue_magic_maps.PhysicalHP = S{
'Final Sting'
}
-- Magical Spells --
-- Magical spells with the typical Int mod
blue_magic_maps.Magical = S{
'Blastbomb','Blazing Bound','Bomb Toss','Cursed Sphere','Dark Orb','Death Ray',
'Diffusion Ray','Droning Whirlwind','Embalming Earth','Firespit','Foul Waters',
'Ice Break','Leafstorm','Maelstrom','Rail Cannon','Regurgitation','Rending Deluge',
'Retinal Glare','Subduction','Tem. Upheaval','Water Bomb','Anvil Lightning','Spectral Floe',
'Tenebral Crush','Blinding Fulgor','Entomb','Scouring Spate','Silent Storm','Searing Tempest'
}
-- Magical spells with a primary Mnd mod
blue_magic_maps.MagicalMnd = S{
'Acrid Stream','Evryone. Grudge','Magic Hammer','Mind Blast'
}
-- Magical spells with a primary Chr mod
blue_magic_maps.MagicalChr = S{
'Eyes On Me','Mysterious Light'
}
-- Magical spells with a Vit stat mod (on top of Int)
blue_magic_maps.MagicalVit = S{
'Thermal Pulse'
}
-- Magical spells with a Dex stat mod (on top of Int)
blue_magic_maps.MagicalDex = S{
'Charged Whisker','Gates of Hades'
}
-- Magical spells (generally debuffs) that we want to focus on magic accuracy over damage.
-- Add Int for damage where available, though.
blue_magic_maps.MagicAccuracy = S{
'1000 Needles','Absolute Terror','Actinic Burst','Auroral Drape','Awful Eye',
'Blank Gaze','Blistering Roar','Blood Drain','Blood Saber','Chaotic Eye',
'Cimicine Discharge','Cold Wave','Corrosive Ooze','Demoralizing Roar','Digest',
'Dream Flower','Enervation','Feather Tickle','Filamented Hold','Frightful Roar',
'Geist Wall','Hecatomb Wave','Infrasonics','Jettatura','Light of Penance',
'Lowing','Mind Blast','Mortal Ray','MP Drainkiss','Osmosis','Reaving Wind',
'Sandspin','Sandspray','Sheep Song','Soporific','Sound Blast','Stinking Gas',
'Sub-zero Smash','Venom Shell','Voracious Trunk','Yawn'
}
-- Breath-based spells
blue_magic_maps.Breath = S{
'Bad Breath','Flying Hip Press','Frost Breath','Heat Breath',
'Hecatomb Wave','Magnetite Cloud','Poison Breath','Radiant Breath','Self-Destruct',
'Thunder Breath','Vapor Spray','Wind Breath'
}
-- Stun spells
blue_magic_maps.Stun = S{
'Blitzstrahl','Frypan','Head Butt','Sudden Lunge','Tail slap','Temporal Shift',
'Thunderbolt','Whirl of Rage'
}
-- Healing spells
blue_magic_maps.Healing = S{
'Healing Breeze','Magic Fruit','Plenilune Embrace','Pollen','Restoral','White Wind',
'Wild Carrot'
}
-- Buffs that depend on blue magic skill
blue_magic_maps.SkillBasedBuff = S{
'Barrier Tusk','Diamondhide','Magic Barrier','Metallic Body','Plasma Charge',
'Pyric Bulwark','Reactor Cool',
}
-- Other general buffs
blue_magic_maps.Buff = S{
'Amplification','Animating Wail','Battery Charge','Carcharian Verve','Cocoon',
'Erratic Flutter','Exuviation','Fantod','Feather Barrier','Harden Shell',
'Memento Mori','Nat. Meditation','Occultation','Orcish Counterstance','Refueling',
'Regeneration','Saline Coat','Triumphant Roar','Warm-Up','Winds of Promyvion',
'Zephyr Mantle'
}
-- Spells that require Unbridled Learning to cast.
unbridled_spells = S{
'Absolute Terror','Bilgestorm','Blistering Roar','Bloodrake','Carcharian Verve',
'Crashing Thunder','Droning Whirlwind','Gates of Hades','Harden Shell','Polar Roar',
'Pyric Bulwark','Thunderbolt','Tourbillion','Uproot'
}
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
state.OffenseMode:options('Normal', 'Acc', 'DT')
state.WeaponskillMode:options('Normal', 'Acc')
state.CastingMode:options('Normal', 'Resistant')
state.IdleMode:options('Normal', 'PDT', 'Learning')
gear.macc_hagondes = {name="Hagondes Cuffs", augments={'Phys. dmg. taken -3%','Mag. Acc.+29'}}
-- Additional local binds
send_command('bind ^` input /ja "Chain Affinity" <me>')
send_command('bind !` input /ja "Efflux" <me>')
send_command('bind @` input /ja "Burst Affinity" <me>')
update_combat_form()
select_default_macro_book()
end
-- Called when this job file is unloaded (eg: job change)
function user_unload()
send_command('unbind ^`')
send_command('unbind !`')
send_command('unbind @`')
end
-- Set up gear sets.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
sets.buff['Burst Affinity'] = {feet="Mavi Basmak +2"}
sets.buff['Chain Affinity'] = {head="Mavi Kavuk +2", feet="Assimilator's Charuqs"}
sets.buff.Convergence = {head="Luhlaza Keffiyeh"}
sets.buff.Diffusion = {feet="Luhlaza Charuqs"}
sets.buff.Enchainment = {body="Luhlaza Jubbah"}
sets.buff.Efflux = {legs="Mavi Tayt +2"}
-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA['Azure Lore'] = {hands="Mirage Bazubands +2"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {ammo="Sonia's Plectrum",
head="Uk'uxkaj Cap",
body="Vanir Cotehardie",hands="Buremte Gloves",ring1="Spiral Ring",
back="Iximulew Cape",waist="Caudata Belt",legs="Hagondes Pants",feet="Iuitl Gaiters +1"}
-- Don't need any special gear for Healing Waltz.
sets.precast.Waltz['Healing Waltz'] = {}
-- Fast cast sets for spells
sets.precast.FC = {ammo="Impatiens",
head="Amalric coif",neck="Orunmila's torque",ear2="Loquacious Earring",ear1="Etiolation Earring",
body="Luhlaza Jubbah +1",hands="Leyline Gloves",ring1="Prolix Ring",
back="Swith Cape",waist="Witful Belt",legs="Lengo Pants",feet="Amalric nails"}
sets.precast.FC['Blue Magic'] = set_combine(sets.precast.FC, {body="Mavi Mintan +2"})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {
head="Herculean helm",neck="Fotia gorget",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Adhemar jacket",hands="Herculean gloves",ring1="Hetairoi ring",ring2="Epona's Ring",
back="Rosmerta's Cape",waist="Fotia belt",legs="Samnuha tights",feet="Herculean boots"}
sets.precast.WS.acc = set_combine(sets.precast.WS, {hands="Herculean gloves"})
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS, {ring1="Aquasoul Ring",feet="Herculean boots"})
sets.precast.WS['Sanguine Blade'] = {
head="Jhakri coronal +1",neck="Eddy Necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Jhakri robe +1",hands="Jhakri cuffs +1",ring1="Acumen Ring",ring2="Strendu Ring",
back="Cornflower cape",legs="Amalric slops",feet="Amalric nails"}
-- Midcast Sets
sets.midcast.FastRecast = {ammo="Impatiens",
head="Amalric coif",neck="Orunmila's Torque",ear2="Loquacious Earring",ear1="Etiolation Earring",
body="Luhlaza Jubbah +1",hands="Leyline Gloves",ring1="Prolix Ring",
back="Swith Cape",waist="Witful Belt",legs="Lengo Pants",feet="Amalric nails"}
sets.midcast['Blue Magic'] = {}
-- Physical Spells --
sets.midcast['Blue Magic'].Physical = {ammo="Falcon eye",
head="Jhakri coronal +1",neck="Sanctity necklace",ear1="Dignitary's earring",ear2="Steelflash Earring",
body="Adhemar jacket",hands="Jhakri cuffs +1",ring1="Rajas Ring",ring2="Petrov ring",
back="Cornflower Cape",waist="Kentarch belt +1",legs="Jhakri slops +1",feet="Jhakri pigaches +1"}
sets.midcast['Blue Magic'].PhysicalAcc = {ammo="Falcon eye",
head="Jhakri coronal +1",neck="Sanctity necklace",ear1="Dignitary's earring",ear2="Steelflash Earring",
body="Adhemar jacket",hands="Jhakri cuffs +1",ring1="Rajas Ring",ring2="Petrov ring",
back="Cornflower Cape",waist="Kentarch belt +1",legs="Jhakri slops +1",feet="Jhakri pigaches +1"}
sets.midcast['Blue Magic'].PhysicalStr = set_combine(sets.midcast['Blue Magic'].Physical,
{body="Jhakri robe +1",hands="Jhakri cuffs +1"})
sets.midcast['Blue Magic'].PhysicalDex = set_combine(sets.midcast['Blue Magic'].Physical,
{ammo="Falcon eye",body="Adhemar jacket",hands="Jhakri cuffs +1",
waist="Kentarch belt +1",legs="Jhakri slops +1"})
sets.midcast['Blue Magic'].PhysicalVit = set_combine(sets.midcast['Blue Magic'].Physical,
{body="Adhemar jacket",hands="Jhakri cuffs +1",back="Cornflower Cape"})
sets.midcast['Blue Magic'].PhysicalAgi = set_combine(sets.midcast['Blue Magic'].Physical,
{body="Adhemar jacket",hands="Jhakri cuffs +1",ring2="Petrov Ring",
waist="Kentarch belt +1",feet="Jhakri slops +1"})
sets.midcast['Blue Magic'].PhysicalInt = set_combine(sets.midcast['Blue Magic'].Physical,
{ear1="Psystorm Earring",body="Jhakri robe +1",hands="Jhakri cuffs +1",
ring2="Acumen ring",back="Cornflower Cape",feet="Jhakri pigaches +1"})
sets.midcast['Blue Magic'].PhysicalMnd = set_combine(sets.midcast['Blue Magic'].Physical,
{ear1="Lifestorm Earring",body="Jhakri robe +1",hands="Jhakri cuffs +1",
ring2="Aquasoul Ring",back="Cornflower Cape"})
sets.midcast['Blue Magic'].PhysicalChr = set_combine(sets.midcast['Blue Magic'].Physical,
{body="Jhakri robe +1",hands="Jhakri cuffs +1",back="Cornflower Cape",
waist="Kentarch belt +1"})
sets.midcast['Blue Magic'].PhysicalHP = set_combine(sets.midcast['Blue Magic'].Physical)
-- Magical Spells --
sets.midcast['Blue Magic'].Magical = {ammo="Pemphredo Tathlum",
head="Jhakri coronal +1",neck="Sanctity necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Jhakri robe +1",hands="Jhakri cuffs +1",ring1="Strendu Ring",ring2="Acumen Ring",
back="Cornflower Cape",waist="Yamabuki-no-obi",legs="Amalric slops",feet="Amalric nails"}
sets.midcast['Blue Magic'].Magical.Resistant = set_combine(sets.midcast['Blue Magic'].Magical,
{body="Jhakri coronal +1",ring1="Sangoma Ring",legs="Amalric slops",feet="Amalric nails"})
sets.midcast['Blue Magic'].MagicalMnd = set_combine(sets.midcast['Blue Magic'].Magical,
{ring1="Aquasoul Ring"})
sets.midcast['Blue Magic'].MagicalChr = set_combine(sets.midcast['Blue Magic'].Magical)
sets.midcast['Blue Magic'].MagicalVit = set_combine(sets.midcast['Blue Magic'].Magical,
{ring1="Spiral Ring"})
sets.midcast['Blue Magic'].MagicalDex = set_combine(sets.midcast['Blue Magic'].Magical)
sets.midcast['Blue Magic'].MagicAccuracy = {ammo="Pemphredo Tathlum",
head="Jhakri coronal +1",neck="Sanctity necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Jhakri robe +1",hands="Jhakri cuffs +1",ring1="Strendu Ring",ring2="Acumen Ring",
back="Cornflower Cape",waist="Yamabuki-no-obi",legs="Amalric slops",feet="Amalric nails"}
-- Breath Spells --
sets.midcast['Blue Magic'].Breath = {ammo="Pemphredo Tathlum",
head="Jhakri coronal +1",neck="Sanctity necklace",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Jhakri robe +1",hands="Jhakri cuffs +1",ring1="Strendu Ring",ring2="Acumen Ring",
back="Cornflower Cape",waist="Yamabuki-no-obi",legs="Amalric slops",feet="Amalric nails"}
-- Other Types --
sets.midcast['Blue Magic'].Stun = set_combine(sets.midcast['Blue Magic'].MagicAccuracy,
{waist="Kentarch belt +1"})
sets.midcast['Blue Magic']['White Wind'] = {
head="Herculean helm",neck="Orunmila's torque",ear1="Mendicant's earring",ear2="Loquacious Earring",
body="Adhemar jacket",hands="Leyline Gloves",ring1="K'ayres Ring",ring2="Supershear Ring",
back="Solemnity cape",waist="Gishdubar sash",legs="Lengo pants",feet="Medium's Sabots"}
sets.midcast['Blue Magic'].Healing = {
head="Herculean helm",neck="Orunmila's torque",ear1="Mendicant's earring",ear2="Loquacious Earring",
body="Adhemar jacket",hands="Leyline Gloves",ring1="K'ayres Ring",ring2="Supershear Ring",
back="Solemnity cape",waist="Gishdubar sash",legs="Lengo pants",feet="Medium's Sabots"}
sets.midcast['Blue Magic'].SkillBasedBuff = {ammo="Mavi Tathlum",
head="Luhlaza Keffiyeh",
body="Assimilator's Jubbah",
back="Cornflower Cape",legs="Mavi Tayt +2",feet="Luhlaza Charuqs"}
sets.midcast['Blue Magic'].Buff = {}
sets.midcast.Protect = {ring1="Sheltered Ring"}
sets.midcast.Protectra = {ring1="Sheltered Ring"}
sets.midcast.Shell = {ring1="Sheltered Ring"}
sets.midcast.Shellra = {ring1="Sheltered Ring"}
-- Sets to return to when not performing an action.
-- Gear for learning spells: +skill and AF hands.
sets.Learning = {ammo="Mavi Tathlum",hands="Assimilator's Bazubands +1"}
--head="Luhlaza Keffiyeh",
--body="Assimilator's Jubbah",hands="Assimilator's Bazubands +1",
--back="Cornflower Cape",legs="Mavi Tayt +2",feet="Luhlaza Charuqs"}
sets.latent_refresh = {waist="Fucho-no-obi"}
-- Resting sets
sets.resting = {
head="Rawhide mask",neck="Sanctity necklace",Ear1="Moonshade earring",Ear2="Infused earring",
body="Jhakri robe +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Sheltered Ring",ring2="Paguroidea Ring",
waist="Fucho-no-obi",feet={ name="Herculean Boots", augments={'Attack+15','Phys. dmg. taken -3%','DEX+6','Accuracy+11',}}}
-- Idle sets
sets.idle = {ammo="Staunch Tathlum",
head="Rawhide Mask",neck="Loricate torque +1",ear1="Moonshade Earring",ear2="Infused Earring",
body="Jhakri robe +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defending Ring",ring2="Vocane Ring",
back="Umbra cape",waist="Flume Belt",legs="Carmine Cuisses",feet={ name="Herculean Boots", augments={'Attack+15','Phys. dmg. taken -3%','DEX+6','Accuracy+11',}}}
sets.idle.PDT = {ammo="Staunch Tathlum",
head="Rawhide Mask",neck="Loricate torque +1",ear1="Moonshade Earring",ear2="Ethereal Earring",
body="Emet Harness +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defending Ring",ring2="Vocane Ring",
back="Umbra cape",waist="Flume Belt",legs="Carmine Cuisses",feet={ name="Herculean Boots", augments={'Attack+15','Phys. dmg. taken -3%','DEX+6','Accuracy+11',}}}
sets.idle.Town = {ammo="Staunch Tathlum",
head="Rawhide Mask",neck="Sanctity necklace",ear1="Moonshade Earring",ear2="Infused Earring",
body="Jhakri robe +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defending Ring",ring2="Vocane Ring",
back="Umbra cape",waist="Flume Belt",legs="Carmine Cuisses",feet={ name="Herculean Boots", augments={'Attack+15','Phys. dmg. taken -3%','DEX+6','Accuracy+11',}}}
-- Defense sets
sets.defense.PDT = {ammo="Staunch Tathlum",
head={ name="Herculean Helm", augments={'Phys. dmg. taken -4%','Accuracy+14','Attack+11',}},neck="Loricate torque +1",ear1="Suppanomimi",ear2="Cessance Earring",
body="Emet Harness +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defending ring",ring2="Vocane ring",
back="Rosmerta's cape",waist="Kentarch belt +1",legs={ name="Herculean Trousers", augments={'Attack+11','Phys. dmg. taken -4%','AGI+8',}},feet={ name="Herculean Boots", augments={'Attack+15','Phys. dmg. taken -3%','DEX+6','Accuracy+11',}}}
sets.defense.MDT ={ammo="Staunch Tathlum",
head={ name="Herculean Helm", augments={'Phys. dmg. taken -4%','Accuracy+14','Attack+11',}},neck="Loricate torque +1",ear1="Suppanomimi",ear2="Cessance Earring",
body="Emet Harness +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defending ring",ring2="Vocane ring",
back="Rosmerta's cape",waist="Kentarch belt +1",legs={ name="Herculean Trousers", augments={'Attack+11','Phys. dmg. taken -4%','AGI+8',}},feet={ name="Herculean Boots", augments={'Attack+15','Phys. dmg. taken -3%','DEX+6','Accuracy+11',}}}
sets.Kiting = {legs="Carmine Cuisses"}
-- 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 = {ammo="Ginsen",
head={ name="Herculean Helm", augments={'Attack+15','"Triple Atk."+4','Accuracy+11',}},neck="Clotharius torque",ear1="Suppanomimi",ear2="Cessance Earring",
body="Adhemar jacket",hands={ name="Herculean Gloves", augments={'Accuracy+14 Attack+14','"Triple Atk."+2','STR+8','Accuracy+13','Attack+2',}},ring1="Hetairoi Ring",ring2="Epona's Ring",
back="Rosmerta's cape",waist="Kentarch belt +1",legs="Samnuha tights",feet={ name="Herculean Boots", augments={'Accuracy+21 Attack+21','"Triple Atk."+2','STR+5','Attack+13',}}}
sets.engaged.Acc = {ammo="Ginsen",
head={ name="Herculean Helm", augments={'Attack+15','"Triple Atk."+4','Accuracy+11',}},neck="Clotharius torque",ear1="Suppanomimi",ear2="Cessance Earring",
body="Adhemar jacket",hands={ name="Herculean Gloves", augments={'Accuracy+14 Attack+14','"Triple Atk."+2','STR+8','Accuracy+13','Attack+2',}},ring1="Hetairoi Ring",ring2="Epona's Ring",
back="Rosmerta's cape",waist="Kentarch belt +1",legs="Samnuha tights",feet={ name="Herculean Boots", augments={'Accuracy+21 Attack+21','"Triple Atk."+2','STR+5','Attack+13',}}}
sets.engaged.DT ={ammo="Staunch Tathlum",
head={ name="Herculean Helm", augments={'Phys. dmg. taken -4%','Accuracy+14','Attack+11',}},neck="Loricate torque +1",ear1="Suppanomimi",ear2="Cessance Earring",
body="Emet Harness +1",hands={ name="Herculean Gloves", augments={'Phys. dmg. taken -4%','STR+8','Accuracy+4','Attack+5',}},ring1="Defending ring",ring2="Vocane ring",
back="Rosmerta's cape",waist="Kentarch belt +1",legs={ name="Herculean Trousers", augments={'Attack+11','Phys. dmg. taken -4%','AGI+8',}},feet={ name="Herculean Boots", augments={'Attack+15','Phys. dmg. taken -3%','DEX+6','Accuracy+11',}}}
sets.self_healing = {ring1="Kunaji Ring",ring2="Asklepian Ring"}
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 unbridled_spells:contains(spell.english) and not state.Buff['Unbridled Learning'] then
eventArgs.cancel = true
windower.send_command('@input /ja "Unbridled Learning" <me>; wait 1.5; input /ma "'..spell.name..'" '..spell.target.name)
end
end
-- Run after the default midcast() is done.
-- eventArgs is the same one used in job_midcast, in case information needs to be persisted.
function job_post_midcast(spell, action, spellMap, eventArgs)
-- Add enhancement gear for Chain Affinity, etc.
if spell.skill == 'Blue Magic' then
for buff,active in pairs(state.Buff) do
if active and sets.buff[buff] then
equip(sets.buff[buff])
end
end
if spellMap == 'Healing' and spell.target.type == 'SELF' and sets.self_healing then
equip(sets.self_healing)
end
end
-- If in learning mode, keep on gear intended to help with that, regardless of action.
if state.OffenseMode.value == 'Learning' then
equip(sets.Learning)
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 state.Buff[buff] ~= nil then
state.Buff[buff] = gain
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Custom spell mapping.
-- Return custom spellMap value that can override the default spell mapping.
-- Don't return anything to allow default spell mapping to be used.
function job_get_spell_map(spell, default_spell_map)
if spell.skill == 'Blue Magic' then
for category,spell_list in pairs(blue_magic_maps) do
if spell_list:contains(spell.english) then
return category
end
end
end
end
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if player.mpp < 51 then
set_combine(idleSet, sets.latent_refresh)
end
return idleSet
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)
update_combat_form()
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
function update_combat_form()
-- Check for H2H or single-wielding
if player.equipment.sub == "Genbu's Shield" or player.equipment.sub == 'empty' then
state.CombatForm:reset()
else
state.CombatForm:set('DW')
end
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book
if player.sub_job == 'DNC' then
set_macro_page(1, 4)
else
set_macro_page(1, 4)
end
end
By hamany9 2017-01-21 08:42:15
I get this message:
Warning: your job file is out of date, please update to the latest repository baseline.
By hamany9 2017-01-21 09:03:38
What do you mean my spells are out of date? everything was fine 2 days ago, untill i added Ayanmo corazza +1 into my lua
By hamany9 2017-01-21 23:55:00
Update: I manually updated items.lua and restarted windower, this fixed it.
By Jumeya 2017-01-24 09:46:21
Impact rules with weather/day obi conflict
Hello everyone,
So basically, I'm running into priority issues between day/weather effects, and Impact spell.
First, here's a pastebin:
http://pastebin.com/KQxfhMxy
Since Impact is elemental magic, if it's darksday or dark weather is up, my gear is getting forced into a standard elemental burst set in my lua (see line 366; day/weather rules) while I need there to be a different change in the event that Impact is being cast (see line 186; sets.midcast['Impact'])
I figure I need to change the day/weather rules to either have one specifically for when Impact is being cast, have it check for Impact first before going on to the next step or just a way to have 'elemental magic' not! impact,
Not too sure how to go about this, any advice would be helpful!
Also, my burst spells are atrocious, I know they are ._.' apologies for coders who die a little on the inside
Server: Asura
Game: FFXI
Posts: 2666
By Asura.Ladyofhonor 2017-01-25 02:51:42
I'm using motes, is there a way to make a rule that if I'm afflicted by Slow, it'll change a piece of gear? Specifically toss on a DW cape.
Server: Asura
Game: FFXI
Posts: 115
By Asura.Pintseyes 2017-01-25 20:53:37
Impact rules with weather/day obi conflict
Hello everyone,
So basically, I'm running into priority issues between day/weather effects, and Impact spell.
First, here's a pastebin:
http://pastebin.com/KQxfhMxy
Since Impact is elemental magic, if it's darksday or dark weather is up, my gear is getting forced into a standard elemental burst set in my lua (see line 366; day/weather rules) while I need there to be a different change in the event that Impact is being cast (see line 186; sets.midcast['Impact'])
I figure I need to change the day/weather rules to either have one specifically for when Impact is being cast, have it check for Impact first before going on to the next step or just a way to have 'elemental magic' not! impact,
Not too sure how to go about this, any advice would be helpful!
Also, my burst spells are atrocious, I know they are ._.' apologies for coders who die a little on the inside
I was having the same issue with obi swapping for every spell skill. I don't claim to code I'm not even gonna claim this will work. What worked for me was to change this. function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' then
if spell.element == world.day_element or spell.element == world.weather_element then
equip(sets.midcast.mb, {waist="Hachirin-No-Obi"})
end
end to this. function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' and spell.element == world.day_element or spell.element == world.weather_element then
equip(sets.Obi)
end
With this obi only activates when casting elemental magic and/or if its defined specifically in the set. Sorry if someone else comes by and laughs at my methods or explains a easier way, I won't deny that I don't know how to code =)
edit, nevermind I noticed you have the same code it's two line instead of one.. Again I'm sure this isn't the best way but it'll work until someone else has the better method.
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' then
if spell.element == world.day_element or spell.element == world.weather_element then
equip(sets.midcast.mb, {waist="Hachirin-No-Obi"})
end
end
if spell.skill == 'Dark Magic' then
if spell.element == world.day_element or spell.element == world.weather_element then
equip(sets.midcast['Dark Magic'], {waist="Hachirin-No-Obi"})
end
if spell.english == 'Impact' then
equip(sets.midcast.Impact)
end
end
end
That'll force your impact set to midcast regardless of weather overriding the obi. I just returned to the game with a old lua. Revamping it I took that out of my post_midcast not understanding my methods. Your post reminded me why it was there to begin.. Thanks =))
Server: Shiva
Game: FFXI
Posts: 1052
By Shiva.Arislan 2017-01-25 22:12:28
Asura.Ladyofhonor said: »I'm using motes, is there a way to make a rule that if I'm afflicted by Slow, it'll change a piece of gear? Specifically toss on a DW cape.
Maybe something like this?
Code buff_change(buff,gain,tab)
if buff:lower() == 'slow' and gain then
equip({back=__________})
end
end
By Jumeya 2017-01-26 08:58:23
That will work for me, I don't care much for it being streamlined, in so much as not canceling out the impacts.
People tend to not have Twilight Cloaks, so I'm pretty much always the one going for the Impacts on our fights.
Especially Glassy Thinker.
Anyways, I'll go ahead and give it a shot.
By Jumeya 2017-01-26 11:10:18
Thank you, that resolved the priority issue, and as silly as it is, I'm not to sure why when I tried something similar beforehand, that I did not get this result.
Can't complain, here's the combination in case anyone else wants to use it to organize obis with elemental, dark and impact.
http://pastebin.com/AQjba0Er
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' then
if spell.element == world.day_element or spell.element == world.weather_element then
equip(sets.midcast.mb, {waist="Hachirin-No-Obi"})
end
if spell.english == 'Impact' then
equip(sets.midcast['Impact'],{waist="Hachirin-No-Obi"})
end
end
if spell.skill == 'Dark Magic' then
if spell.element == world.day_element or spell.element == world.weather_element then
equip(sets.midcast['Dark Magic'], {waist="Hachirin-No-Obi"})
end
end
end
Server: Asura
Game: FFXI
Posts: 1544
By Asura.Vienner 2017-01-29 15:51:10
Ok having a problem, everything worked fine last week, today i play on whm and i put stylelock on but I just keep blinking everytime i cure someone. I use my WHM lua
Code -------------------------------------------------------------------------------------------------------------------
-- 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()
state.Buff['Afflatus Solace'] = buffactive['Afflatus Solace'] or false
state.Buff['Afflatus Misery'] = buffactive['Afflatus Misery'] or false
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')
state.IdleMode:options('Normal', 'PDT', 'Town')
select_default_macro_book()
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Fast cast sets for spells
sets.precast.FC = {main="Queller rod",sub="Sors Shield", ammo="Incantor Stone",
head="Nahtirah Hat",neck="Orison Locket",ear1="Loquacious Earring",ear2="Etiolation Earring",
body="Inyanga Jubbah",hands="Telchine Gloves",ring1="Prolix Ring",ring2="Veneficium Ring",
back="Alaunus's Cape",waist="Witful Belt",legs="Gyve Trousers",feet="Helios Boots"}
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
sets.precast.FC.Stoneskin = set_combine(sets.precast.FC['Enhancing Magic'], {head="Umuthi Hat"})
sets.precast.FC['Healing Magic'] = set_combine(sets.precast.FC, {legs="Ebers Pantaloons +1"})
sets.precast.FC.StatusRemoval = sets.precast.FC['Healing Magic']
sets.precast.FC.Cure = set_combine(sets.precast.FC['Healing Magic'], {main="Ababinili +1",sub="Vivid Strap", head="Piety Cap +1", ear1="Mendicant's Earring", ring1="Lebeche Ring", ammo="Impatiens"})
sets.precast.FC.Curaga = sets.precast.FC.Cure
sets.precast.FC.CureSolace = sets.precast.FC.Cure
-- CureMelee spell map should default back to Healing Magic.
-- Precast sets to enhance JAs
sets.precast.JA.Benediction = {body="Piety Briault"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {
head="Nahtirah Hat",ear1="Roundel Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",
back="Refraction Cape",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
gear.default.weaponskill_neck = "Asperity Necklace"
gear.default.weaponskill_waist = ""
sets.precast.WS = {
head="Nahtirah Hat",neck=gear.ElementalGorget,ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Refraction Cape",waist=gear.ElementalBelt,legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
sets.precast.WS['Flash Nova'] = {
head="Nahtirah Hat",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Hecate's Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Rajas Ring",ring2="Strendu Ring",
back="Toro Cape",waist="Thunder Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
-- Midcast Sets
sets.midcast.FastRecast = {
head="Nahtirah Hat",ear2="Loquacious Earring",neck="Orison Locket",
body="Inyanga Jubbah",hands="Dynasty Mitts",ring1="Prolix Ring",
back="Swith Cape +1",waist="Goading Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
-- Cure sets
gear.default.obi_back = "Mending Cape"
sets.midcast.CureSolace = {main="Queller rod",sub="Sors Shield",ammo="Incantor Stone",
head="Vanya Hood",neck="Nodens Gorget",ear1="Nourishing Earring +1",ear2="Glorious Earring",
body="Ebers Bliaud +1",hands="Telchine Gloves",ring1="Prolix Ring",ring2="Lebeche Ring",
back="Alaunus's Cape",waist=gear.ElementalObi,legs="Ebers Pantaloons +1",feet="Kaykaus Boots"}
sets.midcast.Cure = {main="Queller Rod",sub="Sors Shield",ammo="Incantor Stone",
head="Vanya Hood",neck="Nodens Gorget",ear1="Nourishing Earring +1",ear2="Glorious Earring",
body="Vrikodara Jupon",hands="Telchine Gloves",ring1="Prolix Ring",ring2="Lebeche Ring",
back="Solemnity Cape",waist=gear.ElementalObi,legs="Ebers Pantaloons +1",feet="Kaykaus Boots"}
sets.midcast.Curaga = {main="Queller Rod",sub="Sors Shield",ammo="Incantor Stone",
head="Vanya Hood",neck="Nodens Gorget",ear1="Nourishing Earring +1",ear2="Glorious Earring",
body="Vrikodara Jupon",hands="Telchine Gloves",ring1="Prolix Ring",ring2="Lebeche Ring",
back="Solemnity Cape",waist=gear.ElementalObi,legs="Ebers Pantaloons +1",feet="Kaykaus Boots"}
sets.midcast.CureMelee = {main="Queller Rod",sub="Sors Shield",ammo="Incantor Stone",
head="Vanya Hood",neck="Nodens Gorget",ear1="Nourishing Earring +1",ear2="Glorious Earring",
body="Vrikodara Jupon",hands="Telchine Gloves",ring1="Prolix Ring",ring2="Lebeche Ring",
back="Solemnity Cape",waist=gear.ElementalObi,legs="Ebers Pantaloons +1",feet="Kaykaus Boots"}
sets.midcast.Cursna = {main="Divinity",sub="Sors Shield",
head="Ebers Cap +1",neck="Malison Medallion",
body="Ebers Bliaud +1",hands="Theophany Mitts +1",ring1="Ephedra Ring",ring2="Sirona's Ring",
back="Alaunus's Cape",waist="Bishop's Sash",legs="Theophany Pantaloons +1",feet="Gendewitha Galoshes"}
sets.midcast.StatusRemoval = {
head="Ebers Cap +1",legs="Ebers Pantaloons +1"}
-- 110 total Enhancing Magic Skill; caps even without Light Arts
sets.midcast['Enhancing Magic'] = {main="Beneficus",sub="Sors Shield",
head="Chironic Hat",neck="Enhancing Torque",
body="Telchine Chasuble",hands="Dynasty Mitts",
back="Mending Cape",waist="Siegel Sash",legs="Piety Pantaloons",feet="Ebers Duckbills +1"}
sets.midcast.Stoneskin = {main="Beneficus",sub="Sors Shield",
head="Chironic Hat",neck="Orison Locket",ear2="Loquacious Earring",ear1="Etiolation Earring",
body="Rosette Jaseran",hands="Dynasty Mitts",
back="Alaunus's Cape",waist="Siegel Sash",legs="Gyve Trousers",feet="Theophany Duckbills +1"}
sets.midcast.Auspice = {hands="Dynasty Mitts",feet="Ebers Duckbills +1"}
sets.midcast.BarElement = {main="Beneficus",sub="Sors Shield",
head="Ebers Cap +1",neck="Enhancing Torque",
body="Ebers Bliaud +1",hands="Ebers Mitts +1",
back="Mending Cape",waist="Olympus Sash",legs="Ebers Pantaloons +1",feet="Ebers Duckbills +1"}
sets.midcast.Regen = {main="Bolelabunga",sub="Genbu's Shield",
body="Piety Briault",hands="Orison Mitts +2",
legs="Theophany Pantaloons"}
sets.midcast.Protectra = {ring1="Sheltered Ring",feet="Piety Duckbills +1"}
sets.midcast.Shellra = {ring1="Sheltered Ring",legs="Piety Pantaloons"}
sets.midcast['Divine Magic'] = {main="Bolelabunga",sub="Genbu's Shield",
head="Nahtirah Hat",neck="Colossus's Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring2="Sangoma Ring",
back="Refraction Cape",waist=gear.ElementalObi,legs="Theophany Pantaloons",feet="Gendewitha Galoshes"}
sets.midcast['Dark Magic'] = {main="Bolelabunga", sub="Genbu's Shield",
head="Nahtirah Hat",neck="Aesir Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Demonry Sash",legs="Bokwus Slops",feet="Piety Duckbills +1"}
-- Custom spell classes
sets.midcast.MndEnfeebles = {main="Lehbrailg +2", sub="Mephitis Grip",
head="Nahtirah Hat",neck="Weike Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Aquasoul Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Demonry Sash",legs="Bokwus Slops",feet="Piety Duckbills +1"}
sets.midcast.IntEnfeebles = {main="Lehbrailg +2", sub="Mephitis Grip",
head="Nahtirah Hat",neck="Weike Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Icesoul Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Demonry Sash",legs="Bokwus Slops",feet="Piety Duckbills +1"}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main=gear.Staff.HMP,
body="Gendewitha Bliaut",hands="Serpentes Cuffs",head="Selenian Cap",
waist="Austerity Belt",legs="Nares Trews",feet="Chelona Boots +1"}
-- Idle sets (default idle set not needed since the other three are defined, but leaving for testing purposes)
sets.idle = {main="Queller Rod", sub="Sors Shield",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Gendewitha Bliaut",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Umbra Cape",waist="Witful Belt",legs="Nares Trews",feet="Herald's Gaiters"}
sets.idle.PDT = {main="Queller Rod", sub="Sors Shield",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Gendewitha Bliaut",hands="Gendewitha Gages",ring1="Defending Ring",ring2=gear.DarkRing.physical,
back="Umbra Cape",waist="Witful Belt",legs="Gendewitha Spats",feet="Herald's Gaiters"}
sets.idle.Town = {main="Bolelabunga", sub="Sors Shield",ammo="Incantor Stone",
head="Gendewitha Caubeen",neck="Wiglen Gorget",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Councilor's Garb",hands="Councilor's Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Umbra Cape",waist="Witful Belt",legs="Tatsumaki Sitagoromo",feet="Herald's Gaiters"}
sets.idle.Weak = {main="Bolelabunga",sub="Sors Shield",ammo="Incantor Stone",
head="Nahtirah Hat",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Gendewitha Bliaut",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2="Meridian Ring",
back="Umbra Cape",waist="Witful Belt",legs="Nares Trews",feet="Gendewitha Galoshes"}
-- Defense sets
sets.defense.PDT = {main="Queller Rod",sub="Achaq Grip",
head="Gendewitha Caubeen",neck="Twilight Torque",
body="Vrikodara Jupon",hands="Gendewitha Gages",ring1="Defending Ring",ring2=gear.DarkRing.physical,
back="Umbra Cape",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
sets.defense.MDT = {main="Queller Rod",sub="Achaq Grip",
head="Nahtirah Hat",neck="Twilight Torque",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Defending Ring",ring2="Shadow Ring",
back="Tuilha Cape",legs="Bokwus Slops",feet="Gendewitha Galoshes"}
sets.Kiting = {feet="Herald's Gaiters"}
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
-- Basic set for if no TP weapon is defined.
sets.engaged = {
head="Nahtirah Hat",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Vanir Cotehardie",hands="Dynasty Mitts",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Umbra Cape",waist="Goading Belt",legs="Gendewitha Spats",feet="Gendewitha Galoshes"}
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Divine Caress'] = {hands="Orison Mitts +2",back="Mending Cape"}
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 spell.english == "Paralyna" and buffactive.Paralyzed then
-- no gear swaps if we're paralyzed, to avoid blinking while trying to remove it.
eventArgs.handled = true
end
if spell.skill == 'Healing Magic' then
gear.default.obi_back = "Mending Cape"
else
gear.default.obi_back = "Toro Cape"
end
end
function job_post_midcast(spell, action, spellMap, eventArgs)
-- Apply Divine Caress boosting items as highest priority over other gear, if applicable.
if spellMap == 'StatusRemoval' and buffactive['Divine Caress'] then
equip(sets.buff['Divine Caress'])
end
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
-- 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') and player.status == 'Engaged' then
return "CureMelee"
elseif default_spell_map == 'Cure' and state.Buff['Afflatus Solace'] then
return "CureSolace"
elseif spell.skill == "Enfeebling Magic" then
if spell.type == "WhiteMagic" then
return "MndEnfeebles"
else
return "IntEnfeebles"
end
end
end
end
function customize_idle_set(idleSet)
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 areas.Cities:contains(world.area) then
local needsArts =
player.sub_job:lower() == 'sch' and
not buffactive['Light Arts'] and
not buffactive['Addendum: White'] and
not buffactive['Dark Arts'] and
not buffactive['Addendum: Black']
if not buffactive['Afflatus Solace'] and not buffactive['Afflatus Misery'] then
if needsArts then
send_command('@input /ja "Afflatus Solace" <me>;wait 1.2;input /ja "Light Arts" <me>')
else
send_command('@input /ja "Afflatus Solace" <me>')
end
end
end
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()
-- Default macro set/book
set_macro_page(2, 4)
end
Testing what was causing this (cause I could have sworn I didnt use to blink like an xmas tree while casting) I've changed pretty much every set to the same weapon and sub to prevent blinking, since at first I figured it was the weapon. but nope, still blinking. My friend sais dressup isnt working properly so guess no help from that...
Am I missing something obvious here? Is it not my lua file but the game? I mean it should work with lockstyle since I'm not changing weapon.
Some insight would be nice, thanks.
Bahamut.Riyoko
Server: Bahamut
Game: FFXI
Posts: 31
By Bahamut.Riyoko 2017-01-29 16:34:43
Your gearswap has a staff in precast.cure and a club in midcast.cure and lockstyle can't keep you locked on 2 different weapon types if I recall correctly.
[+]
Server: Asura
Game: FFXI
Posts: 1544
By Asura.Vienner 2017-01-30 02:12:02
Yup that fixed it, thanks!
By Molyneux 2017-02-01 10:38:55
Using motes is there a way to detect movement and swap accordingly? I'd like to be able to swap to movement speed gear when moving, then back to something else when stood still
Just looking for someone to explain this addon a bit for me. It looks like it is an alternative to Spellcast.
Is it going to be replacing Spellcast? In which ways is it better or worse. I don't know any programming but I've slowly learned more and more about spellcast and the 'language' used in gearswap is confusing to me.
It says it uses packets so it potentially could be more detectable? but does that also eliminate any lag that spellcast may encounter?
I plan on redoing my PUP xml to include pet casting sets thanks to the new addon petschool. I'm just not sure if it's worth it to just wait until gearswap gets more popular or to go ahead and do it in spellcast.
If anyone could give me more info I'd greatly appreciate it.
|
|