|
Gearswap Support Thread
Carbuncle.Doryll
Server: Carbuncle
Game: FFXI
By Carbuncle.Doryll 2016-03-05 15:35:37
Hello, i have a request please.
I'm working on my lua BLM, i want to add a Cycle for use(or not) the AF Body during my nukes. I have 1 cycle already in CastingMode (Normal or MagicBurst) and i know than i could add 2 variables in for what i want (Normal, Magicburst, NormalBodyAF, MagicBurstBodyAF) but it's not very pleasant to use....
So i would prefer to add a new cycle for choosing if i use the AFBody or not. I tried this :
state.OffenseModeptions('Normal', 'None')
state.CastingModeptions('Normal', 'MagicBurst')
state.EquipBodyAFptions('BodyAF', 'AmalricBody')
state.IdleModeptions('Normal', 'PDT')
state.PhysicalDefenseModeptions('PDT')
state.MagicalDefenseModeptions('MDT')
I added " send_command('bind f3 gs c cycle EquipBodyAF')" in Mote-Globals and
" state.EquipBodyAF = M{['description'] = 'EquipBodyAF'}" in Mote-include
i created a set for using it : sets.midcast['Elemental Magic'].HighTierNuke.AmalricBody = set_combine( sets.midcast['Elemental Magic'].HighTierNuke, {body="Amalric Doublet +1"} )
My problem is that when i cast HightierNuke, my body doesn't switch, it seems that GS doesn't recognize the set when i cast
If you can help me, thanks a lot.
By Isilrhofal 2016-03-05 17:59:56
How about something like this?
you would still need to change my MB stuff (which doesn't work yet as I want it to):
Quote: if state.MagicBurst == "tmp" or state.MagicBurst == "Perma" then
Quote: function user_setup()
state.MPMode = M{['description']='MPMode', 'None', 'Normal', 'MPP60', 'MPALL'}
send_command('bind ^` gs c cycle MPMode')
end
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
if player.mpp < 35 and state.MPMode.value == 'MPP35' then
if state.MagicBurst == "tmp" or state.MagicBurst == "Perma" then
equip(sets.magic_burst,{waist="Hachirin-No-Obi",body="Spaekona's coat +1"})
else
equip(sets.midcast['Elemental Magic'],{waist="Hachirin-No-Obi",body="Spaekona's coat +1"})
end
elseif player.mpp < 60 and state.MPMode.value == 'MPP60' then
if state.MagicBurst == "tmp" or state.MagicBurst == "Perma" then
equip(sets.magic_burst,{waist="Hachirin-No-Obi",body="Spaekona's coat +1"})
else
equip(sets.midcast['Elemental Magic'],{waist="Hachirin-No-Obi",body="Spaekona's coat +1"})
end
elseif state.MPMode.value == 'MPALL' then
if state.MagicBurst == "tmp" or state.MagicBurst == "Perma" then
equip(sets.magic_burst,{waist="Hachirin-No-Obi",body="Spaekona's coat +1"})
else
equip(sets.midcast['Elemental Magic'],{waist="Hachirin-No-Obi",body="Spaekona's coat +1"})
end
elseif state.MPMode.value == 'Normal' then
if state.MagicBurst == "tmp" or state.MagicBurst == "Perma" then
equip(sets.magic_burst,{waist="Hachirin-No-Obi"})
else
equip(sets.midcast['Elemental Magic'],{waist="Hachirin-No-Obi"})
end
end
else
if player.mpp < 35 and state.MPMode.value == 'MPP35' then
if state.MagicBurst == "tmp" or state.MagicBurst == "Perma" then
equip(sets.magic_burst,{body="Spaekona's coat +1"})
else
equip(sets.midcast['Elemental Magic'],{body="Spaekona's coat +1"})
end
elseif player.mpp < 60 and state.MPMode.value == 'MPP60' then
if state.MagicBurst == "tmp" or state.MagicBurst == "Perma" then
equip(sets.magic_burst,{body="Spaekona's coat +1"})
else
equip(sets.midcast['Elemental Magic'],{body="Spaekona's coat +1"})
end
elseif state.MPMode.value == 'MPALL' then
if state.MagicBurst == "tmp" or state.MagicBurst == "Perma" then
equip(sets.magic_burst,{body="Spaekona's coat +1"})
else
equip(sets.midcast['Elemental Magic'],{body="Spaekona's coat +1"})
end
elseif state.MPMode.value == 'Normal' or state.MPMode.value == 'None' then
if state.MagicBurst == "tmp" or state.MagicBurst == "Perma" then
equip(sets.magic_burst)
else
equip(sets.midcast['Elemental Magic'])
end
end
end
end
end
By Isilrhofal 2016-03-05 18:09:28
Maybe anyone here tried this already and got this working.
I am trying to set a variable once a skillchain has been made which is valid for about 5-6 seconds. When the gearswap is midcast I would check this variable and set MB gear or not. (For the lazy BLM in a 'non MB Focused' party.) My problem however is resetting the variable again properly after it has been set, so it works once but fails after.
My current code for this would be:
Quote: --windower.send_command('/echo [ Custom Globals Loading ]')
-- Returns all mob IDs for anyone in your alliance, including their pets.
function get_ally_mob_ids()
local allies = T{}
local party = windower.ffxi.get_party()
for _, member in pairs(party) do
if type(member) == 'table' and member.mob then
allies:append(member.mob.id)
if member.mob.pet_index and member.mob.pet_index> 0 and windower.ffxi.get_mob_by_index(member.mob.pet_index) then
allies:append(windower.ffxi.get_mob_by_index(member.mob.pet_index).id)
end
end
end
return allies
end
-- Returns true if is someone (or a pet of someone) in your alliance.
function mob_is_ally(mob_id)
-- get zone-local ids of all allies and their pets
return get_ally_mob_ids():contains(mob_id)
end
--Reset sc_element after 5 seconds
function reset_sc()
sc_element = ''
end
function action_handler(raw_actionpacket,sc_element)
sc_element = ''
local actionpacket = ActionPacket.new(raw_actionpacket)
local category = actionpacket:get_category_string()
local player = windower.ffxi.get_player()
local pet
if player ~= nil then
local player_mob = windower.ffxi.get_mob_by_id(player.id)
if player_mob ~= nil then
local pet_index = player_mob.pet_index
if pet_index ~= nil then
pet = windower.ffxi.get_mob_by_index(pet_index)
end
end
end
if not player or not (windower.ffxi.get_player().in_combat or (pet ~= nil and pet.status == 1)) then
-- nothing to do
return
end
for target in actionpacket:get_targets() do
for subactionpacket in target:get_actions() do
if (mob_is_ally(actionpacket.raw.actor_id) and not mob_is_ally(target.raw.id)) then
local add = subactionpacket:get_add_effect()
if add and add.conclusion then
if T{196,223,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,
385,386,387,388,389,390,391,392,393,394,395,396,397,398,732}:contains(add.message_id) then
sc_element = add.message_id
windower.send_command('@wait 6; lua i ResetSetting reset_sc')
end
end
end
end
end
end
-- AutoMB End
ActionPacket.open_listener(action_handler,sc_element)
Asura.Cair
VIP
Server: Asura
Game: FFXI
Posts: 246
By Asura.Cair 2016-03-05 18:14:31
Your best bet would be looking into how battlemod handles displaying skillchain damage, honestly. You could probably even write it right into BattleMod itself if you were inclined.
By Isilrhofal 2016-03-05 18:26:32
Getting the Skillchain types and matching it with the Spells cast works fine. The only thing which doesn't work is that reset where I reset the MB true/false value.
windower.send_command('@wait 6; lua i ResetSetting reset_sc')
It seems that I am missing some lua logic here in order to get it to work.
Edit: Some spelling mistakes, it's late.
By Avechu 2016-03-05 20:02:29
Is there something that checks what spells you have set on BLU?
Want to add something like: If MagicFruit is not set cast PleniluneEmbrace, and if thats not set cast Restoral, and just keep it going down the line until it hits something that is set.
By Kingsleu 2016-03-05 20:20:51
Hello, my BLM script seems to have stopped working after I edited my gear earlier today. It doesn't change my gear to the midcast sets and immediately equips my aftercast sets. Could someone help me find out what happened?
Edit: Sorry I should have mentioned what was happening. Whenever I do an action it instantly loads my precast, midcast and aftercast all at the same time.
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()
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
state.OffenseMode:options('None', 'Normal')
state.CastingMode:options('Normal', 'Resistant', 'Proc')
state.IdleMode:options('Normal', 'PDT')
state.MagicBurst = M(false, 'Magic Burst')
lowTierNukes = S{'Stone', 'Water', 'Aero', 'Fire', 'Blizzard', 'Thunder',
'Stone II', 'Water II', 'Aero II', 'Fire II', 'Blizzard II', 'Thunder II',
'Stone III', 'Water III', 'Aero III', 'Fire III', 'Blizzard III', 'Thunder III',
'Stonega', 'Waterga', 'Aeroga', 'Firaga', 'Blizzaga', 'Thundaga',
'Stonega II', 'Waterga II', 'Aeroga II', 'Firaga II', 'Blizzaga II', 'Thundaga II'}
gear.macc_hagondes = {name="Hagondes Cuffs", augments={'Phys. dmg. taken -3%','Mag. Acc.+29'}}
-- Additional local binds
send_command('bind ^` input /ma Stun <t>')
send_command('bind @` gs c activate MagicBurst')
select_default_macro_book()
end
-- Called when this job file is unloaded (eg: job change)
function user_unload()
send_command('unbind ^`')
send_command('unbind @`')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
---- Precast Sets ----
-- Precast sets to enhance JAs
sets.precast.JA['Mana Wall'] = {feet="Wicce Sabots"}
sets.precast.JA.Manafont = {body="Archmage's Coat"}
-- equip to maximize HP (for Tarus) and minimize MP loss before using convert
sets.precast.JA.Convert = {}
-- Fast cast sets for spells
sets.precast.FC = {ammo="Impatiens",
head="Merlinic Hood",ear2="Loquacious Earring",
body="Helios Jacket",hands="Helios Gloves",ring1="Lebeche Ring",ring2="Weatherspoon Ring",
back="Swith Cape",waist="Witful Belt",legs="Psycloth Lappas",feet="Regal Pumps +1"}
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {head="Wicce Petasos", neck="Stoicheion Medal", feet="Spaekona's Sabots +1"})
sets.precast.FC.Cure = set_combine(sets.precast.FC, {main="Serenity", body="Heka's Kalasiris", back="Pahtli Cape"})
sets.precast.FC.Curaga = sets.precast.FC.Cure
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {
head="Hagondes Hat +1",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Hagondes Coat +1",hands="Hagondes Cuffs +1",ring1="Rajas Ring",ring2="Icesoul Ring",
back="Refraction Cape",waist="Cognition Belt",legs="Hagondes Pants +1",feet="Hagondes Sabots +1"}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Vidohunir'] = {ammo="Ghastly Tathlum",
head="Merlinic Hood",neck="Serenity Necklace",ear1="Crematio Earring",ear2="Friomisi Earring",
body="Witching Robe",hands="Helios Gloves",ring1="Shiva Ring +1",ring2="Shiva Ring +1",
back="Toro Cape",waist="Fotia Belt",legs="Merlinic Shalwar",feet="Helios Boots"}
---- Midcast Sets ----
sets.midcast.FastRecast = {
head="Merlinic Hood",ear2="Loquacious Earring",
body="Helios Jacket",hands="Helios Gloves",ring1="Lebeche Ring",ring2="Weatherspoon Ring",
back="Swith Cape",waist="Witful Belt",legs="Psycloth Lappas",feet="Regal Pumps +1"}
sets.midcast.Cure = {main="Serenity",sub="Oneiros Grip",
head="Merlinic Hood",neck="Phalaina Locket",ear1="Mendicant's Earring",ear2="Loquacious Earring",
body="Heka's Kalasiris",hands="Helios Gloves",ring1="Lebeche Ring",ring2="Weatherspoon Ring",
back="Pahtli Cape",waist=gear.ElementalObi,legs="Gyve Trousers",feet="Medium's Sabots"}
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast['Enhancing Magic'] = {
neck="Jeweled Collar",
body="Telchine Chasuble",hands="Helios Gloves",
legs="Gyve Trousers"}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {head="Umuthi Hat",waist="Siegel Sash"})
sets.midcast['Enfeebling Magic'] = {main="Keraunos",sub="Mephitis Grip",ammo="Hydrocera",
head="Nahtirah Hat",neck="Sanctity Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Ischemia Chasu.",hands="Lurid Mitts",ring1="Weatherspoon Ring",ring2="Sangoma Ring",
back="Bane Cape",legs="Psycloth Lappas",feet="Medium's Sabots"}
sets.midcast.ElementalEnfeeble = sets.midcast['Enfeebling Magic']
sets.midcast['Dark Magic'] = {main="Rubicundity",sub="Genbu's Shield",ammo="Impatiens",
head="Pixie Hairpin +1",neck="Jeweled Collar",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Helios Jacket",hands="Archmage's Gloves",ring1="Archon Ring",ring2="Weatherspoon Ring",
back="Bane Cape",waist="Witful Belt",legs="Spaekona's Tonban +1",feet="Wicce Sabots"}
sets.midcast.Drain = {main="Rubicundity",sub="Genbu's Shield",ammo="Impatiens",
head="Pixie Hairpin +1",neck="Aesir Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Helios Jacket",hands="Archmage's Gloves",ring1="Archon Ring",ring2="Weatherspoon Ring",
back="Bane Cape",waist="Fucho-no-Obi",legs="Spaekona's Tonban +1",feet="Wicce Sabots"}
sets.midcast.Aspir = sets.midcast.Drain
sets.midcast.Stun = {main="Keraunos",sub="Mephitis Grip",ammo="Impatiens",
head="Merlinic Hood",neck="Jeweled Collar",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Helios Jacket",hands="Helios Gloves",ring1="Prolix Ring",ring2="Weatherspoon Ring",
back="Swith Cape",waist="Witful Belt",legs="Psycloth Lappas",feet="Regal Pumps +1"}
sets.midcast.BardSong = {main="Keraunos",sub="Mephitis Grip",ammo="Impatiens",
head="Nahtirah Hat",neck="Sanctity Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Helios Jacket",hands="Helios Gloves",ring1="Weatherspoon Ring",ring2="Sangoma Ring",
back="Bane Cape",legs="Psycloth Lappas",feet="Helios Boots"}
-- Elemental Magic sets
sets.midcast['Elemental Magic'] = {main="Keraunos",sub="Niobid Strap",ammo="Ghastly Tathlum",
head="Merlinic Hood",neck="Sanctity Necklace",ear1="Crematio Earring",ear2="Friomisi Earring",
body="Spaekona's Coat +1",hands="Helios Gloves",ring1="Shiva Ring +1",ring2="Shiva Ring +1",
back="Toro Cape",waist=gear.ElementalObi,legs="Merlinic Shalwar",feet="Helios Boots"}
sets.midcast['Elemental Magic'].Resistant = {main="Keraunos",sub="Niobid Strap",ammo="Ghastly Tathlum",
head="Merlinic Hood",neck="Sanctity Necklace",ear1="Crematio Earring",ear2="Friomisi Earring",
body="Psycloth Vest",hands="Helios Gloves",ring1="Shiva Ring +1",ring2="Shiva Ring +1",
back="Bane Cape",waist=gear.ElementalObi,legs="Merlinic Shalwar",feet="Helios Boots"}
sets.midcast['Elemental Magic'].HighTierNuke = set_combine(sets.midcast['Elemental Magic'], {sub="Niobid Strap"})
sets.midcast['Elemental Magic'].HighTierNuke.Resistant = set_combine(sets.midcast['Elemental Magic'], {sub="Niobid Strap"})
-- Minimal damage gear for procs.
sets.midcast['Elemental Magic'].Proc = {main="Earth Staff", sub="Mephitis Grip",ammo="Impatiens",
head="Nahtirah Hat",neck="Twilight Torque",ear1="Bloodgem Earring",ear2="Loquacious Earring",
body="Ischemia Chasuble",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Swith Cape",waist="Witful Belt",legs="Nares Trews",feet="Regal Pumps +1"}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main="Keraunos",sub="Niobid Strap",ammo="Hydrocera",
neck="Sanctity Necklace",
body="Respite Cloak",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
waist="Fucho-no-Obi",legs="Assiduity Pants +1",feet="Herald's Gaiters"}
-- Idle sets
-- Normal refresh idle set
sets.idle = {main="Keraunos",sub="Niobid Strap",ammo="Impatiens",
neck="Sanctity Necklace",ear1="Mendicant's Earring",ear2="Loquacious Earring",
body="Respite Cloak",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Umbra Cape",waist="Fucho-no-Obi",legs="Assiduity Pants +1",feet="Herald's Gaiters"}
-- Idle mode that keeps PDT gear on, but doesn't prevent normal gear swaps for precast/etc.
sets.idle.PDT = {main="Terra's Staff", sub="Oneiros Grip",ammo="Impatiens",
head="Hagondes Hat +1",neck="Twilight Torque",ear1="Mendicant's Earring",ear2="Loquacious Earring",
body="Hagondes Coat",hands="Hagondes Cuffs +1",ring1="Defending Ring",ring2="Dark Ring",
back="Umbra Cape",waist="Fucho-no-Obi",legs="Hagondes Pants +1",feet="Herald's Gaiters"}
-- Idle mode scopes:
-- Idle mode when weak.
sets.idle.Weak = {main="Terra's Staff",sub="Oneiros Grip",ammo="Impatiens",
head="Hagondes Hat +1",neck="Twilight Torque",ear1="Mendicant's Earring",ear2="Loquacious Earring",
body="Hagondes Coat +1",hands="Hagondes Cuffs +1",ring1="Defending Ring",ring2="Paguroidea Ring",
back="Umbra Cape",waist="Fucho-no-Obi",legs="Assiduity Pants +1",feet="Hagondes Sabots +1"}
-- Town gear.
sets.idle.Town = {main="Keraunos", sub="Niobid Strap",ammo="Impatiens",
neck="Sanctity Necklace",ear1="Mendicant's Earring",ear2="Loquacious Earring",
body="Respite Cloak",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Umbra Cape",waist="Fucho-no-Obi",legs="Assiduity Pants +1",feet="Herald's Gaiters"}
-- Defense sets
sets.defense.PDT = {main="Terra's Staff",sub="Oneiros Grip",
head="Hagondes Hat +1",neck="Twilight Torque",
body="Hagondes Coat +1",hands="Hagondes Cuffs +1",ring1="Defending Ring",ring2="Dark Ring",
back="Umbra Cape",waist="Fucho-no-obi",legs="Hagondes Pants +1",feet="Hagondes Sabots +1"}
sets.defense.MDT = {ammo="Ghastly Tathlum",
head="Hagondes Hat +1",neck="Twilight Torque",
body="Hagondes Coat +1",hands="Hagondes Cuffs +1",ring1="Defending Ring",ring2="Dark Ring",
back="Solemnity Cape",waist="Fucho-no-Obi",legs="Hagondes Pants +1",feet="Hagondes Sabots +1"}
sets.Kiting = {feet="Herald's Gaiters"}
sets.latent_refresh = {waist="Fucho-no-obi"}
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Mana Wall'] = {feet="Wicce Sabots"}
sets.magic_burst = {neck="Mizukage-no-Kubikazari"}
-- Engaged sets
-- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
-- sets if more refined versions aren't defined.
-- If you create a set with both offense and defense modes, the offense mode should be first.
-- EG: sets.engaged.Dagger.Accuracy.Evasion
-- Normal melee group
sets.engaged = {
head="Hagondes Hat +1",neck="Twilight Torque",ear1="Ethereal Earring",ear2="Cessance Earring",
body="Hagondes Coat +1",hands="Hagondes Cuffs +1",ring1="Defending Ring",ring2="Dark Ring",
back="Umbra Cape",waist="Ninurta's Sash",legs="Hagondes Pants +1",feet="Hagondes Sabots +1"}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
if spellMap == 'Cure' or spellMap == 'Curaga' then
gear.default.obi_waist = "Witful Belt"
elseif spell.skill == 'Elemental Magic' then
gear.default.obi_waist = "Sekhmet Corset"
if state.CastingMode.value == 'Proc' then
classes.CustomClass = 'Proc'
end
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)
end
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' and state.MagicBurst.value then
equip(sets.magic_burst)
end
end
function job_aftercast(spell, action, spellMap, eventArgs)
-- Lock feet after using Mana Wall.
if not spell.interrupted then
if spell.english == 'Mana Wall' then
enable('feet')
equip(sets.buff['Mana Wall'])
disable('feet')
elseif spell.skill == 'Elemental Magic' then
state.MagicBurst:reset()
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
-- Unlock feet when Mana Wall buff is lost.
if buff == "Mana Wall" and not gain then
enable('feet')
handle_equipping_gear(player.status)
end
end
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
if stateField == 'Offense Mode' then
if newValue == 'Normal' then
disable('main','sub','range')
else
enable('main','sub','range')
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
if spell.skill == 'Elemental Magic' and default_spell_map ~= 'ElementalEnfeeble' then
--[[ No real need to differentiate with current gear.
if lowTierNukes:contains(spell.english) then
return 'LowTierNuke'
else
return 'HighTierNuke'
end
--]]
end
end
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
return idleSet
end
-- Function to display the current relevant user state when doing an update.
function display_current_job_state(eventArgs)
display_current_caster_state()
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
set_macro_page(1, 15)
end
Asura.Cair
VIP
Server: Asura
Game: FFXI
Posts: 246
By Asura.Cair 2016-03-05 21:49:33
Getting the Skillchain types and matching it with the Spells cast works fine. The only thing which doesn't work is that reset where I reset the MB true/false value.
windower.send_command('@wait 6; lua i ResetSetting reset_sc')
It seems that I am missing some lua logic here in order to get it to work.
Edit: Some spelling mistakes, it's late.
You have an addon called ResetSetting? Why not just use gearswap self commands to manage the variable since it's not really possible to effectively use a variable external to an addon anyway.
[+]
By Isilrhofal 2016-03-06 15:51:20
Is there something that checks what spells you have set on BLU?
Want to add something like: If MagicFruit is not set cast PleniluneEmbrace, and if thats not set cast Restoral, and just keep it going down the line until it hits something that is set.
This should work:
Quote: function check_set_spells(...)
--[[ Function Author: Arcon
Used to pull list of currently set spells, this is useful for
determining traits such as Dual Wield IV
Also used to determine the Cure spell set, when used with a
self_command ]]
set_spells = set_spells
or gearswap.res.spells:type('BlueMagic'):rekey('name')
return table.all({...}, function(name)
return S(windower.ffxi.get_mjob_data().spells)
:contains(set_spells[name].id)
end)
end
Quote: if check_set_spells('Magic Fruit') then
if party.count > 1 then
windower.send_command('input /ma "Magic Fruit" <stpc>')
else
windower.send_command('input /ma "Magic Fruit" <me>')
end
elseif check_set_spells('Plenilune Embrace') then
if party.count > 1 then
windower.send_command('input /ma "Plenilune Embrace" <stpc>')
else
windower.send_command('plenilune embrace')
end
elseif check_set_spells('Restoral') then
windower.send_command('restoral')
elseif check_set_spells('White Wind') then
windower.send_command('white wind')
else
if player.sub_job == 'RDM' then
if party.count > 1 then
windower.send_command('input /ma "Cure IV" <stpc>')
else
windower.send_command('input /ma "Cure IV" <me>')
end
else
windower.add_to_chat(8,'WARNING: No Cure spell is'
..' currently set!')
end
end
@Cair Never script stuff when you're tired. specifically if you have no clue what you're doing ... :D Will try this later.
Server: Siren
Game: FFXI
Posts: 116
By Siren.Blackroses 2016-03-07 06:28:59
Hello Folks,
I am trying to understand why the set_combine do not seem to work, or at leats do not show into showswaps, particularly for helix spells.
Secondly, I would like to make sure the Bookworm Cape and the Refocciliation Stone are equipped, even in case of magic burst mode.
Cookies reward for people willing to help!
Here is the code :
Code -- Define sets and vars used by this job file.
function init_gear_sets()
include('organizer-lib')
--------------------------------------
-- Start defining the sets
--------------------------------------
--GearVARS
HoodFC={ name="Merlinic Hood", augments={'"Fast Cast"+6','Mag. Acc.+9','"Mag.Atk.Bns."+4',}}
HoodMAB={ name="Merlinic Hood", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic Damage +10','INT+3','Mag. Acc.+12','"Mag.Atk.Bns."+15',}}
HoodMB={ name="Merlinic Hood", augments={'"Mag.Atk.Bns."+24','Magic burst mdg.+8%','INT+12','Mag. Acc.+10',}}
BootsFC={ name="Merlinic Crackows", augments={'"Mag.Atk.Bns."+4','"Fast Cast"+5','CHR+10','Mag. Acc.+2',}}
BootsMAB={ name="Merlinic Crackows", augments={'"Mag.Atk.Bns."+16','Magic burst mdg.+9%','CHR+11','Mag. Acc.+10',}}
BootsMB={ name="Merlinic Crackows", augments={'"Mag.Atk.Bns."+16','Magic burst mdg.+9%','CHR+11','Mag. Acc.+10',}}
-- Precast Sets
-- Precast sets to enhance JAs
sets.precast.JA['Tabula Rasa'] = {legs="Pedagogy Pants"}
sets.precast.JA['Dark Arts'] = {body="Academic's Gown +1"}
sets.precast.JA['Light Arts'] = {body="Academic's Pants +1"}
sets.precast.JA['Enlightenment'] = {body="Peda. Gown +1"}
organizer_items = {agown="Academic's Gown +1",
zod="Zodiac Ring",obi="Hachirin-no-obi",CPring="Trizeck Ring",Wring="Warp Ring",CPring2="Capacity Ring"}
-- Fast cast sets for spells
sets.precast.FC = {ammo="Sapience Orb",
head=HoodFC,neck="Orunmila's Torque",ear1="",ear2="Loquacious Earring",
body="Anhur Robe",hands="Gendewitha Gages",ring1="Prolix Ring",ring2="",
back="Perimede Cape",waist="Witful Belt",legs="Psycloth Lappas",feet=BootsFC}
sets.precast.FC.Cure = set_combine(sets.precast.FC, {head="",body="Heka's Kalasiris",hands="Gendewitha Gages",back="Pahtli Cape"})
sets.precast.FC.Curaga = sets.precast.FC.Cure
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",ear1="Barkarole Earring"})
sets.precast.FC.Impact = set_combine(sets.precast.FC['Elemental Magic'], {head=empty,body="Twilight Cloak"})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Myrkr'] = {ammo="Pemphredo Tathlum",
head="Kaabnax Hat",neck="Sanctity Necklace",ear1="Moonshade Earring",ear2="Loquacious Earring",
body="Merlinic Jubbah",hands="Otomi Gloves",ring1="Sangoma Ring",ring2="Bifrost Ring",
back="Pahtli Cape",waist="Fucho-no-obi",legs="Psycloth Lappas",feet="Medium's Sabots"}
-- Midcast Sets
sets.midcast.FastRecast = {ammo="Incantor Stone",ring2="Prolix Ring",back="Perimede Cape"}
-- Cure Sets
sets.midcast.Cure = {main="Serenity",sub="Curatio Grip",ammo="Hydrocera",
head="Vanya Hood",neck="Henic Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
body="Vanya Robe",hands="Pedagogy Bracers +1",ring1="Haoma's Ring",ring2="Sirona's Ring",
back="Tempered Cape +1",waist="Bishop's Sash",legs="Academic's Pants +1",feet="Vanya Clogs"}
sets.midcast.CureWithLightWeather = set_combine(sets.midcast.Cure, {
main="Chatoyant Staff",body="Gendewitha Bliaut +1",hands="Telchine Gloves",back="Twilight Cape",waist="Hachirin-no-obi"})
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.Regen = {main="Gada", sub="Genbu's Shield", ammo="Savant's Treatise",
head="Arbatel Bonnet +1",neck="Incanter's Torque",ear1="Andoaa Earring",
body="Telchine Chas.",hands="",
back="Perimede Cape",waist="Cascade Belt",legs="Telchine Braconi",feet="Telchine Pigaches"}
-- Enhancing Magic Sets
sets.midcast['Enhancing Magic'] = {main="Gada", sub="Genbu's Shield", ammo="Savant's Treatise",
head="Arbatel Bonnet +1",neck="Incanter's Torque",ear1="Andoaa Earring",
body="Telchine Chas.", back="Fi Follet Cape", waist="Cascade Belt",legs="Telchine Braconi",feet="Telchine Pigaches"}
sets.midcast.Cursna = {
neck="",ring1="",ring2="",feet="Gendewitha Galoshes"}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {head="Umuthi Hat",neck="Nodens Gorget",
ear1="",waist="",legs=""})
sets.midcast.Storm = {main="Gada", sub="Genbu's Shield", ammo="Savant's Treatise",
head="Arbatel Bonnet +1",neck="Incanter's Torque",ear1="Andoaa Earring",
body="Telchine Chas.", back="Fi Follet Cape", waist="Cascade Belt",legs="Telchine Braconi",feet="Telchine Pigaches"}
sets.midcast.Protect = {ring1="Sheltered Ring"}
sets.midcast.Protectra = sets.midcast.Protect
sets.midcast.Shell = {ring1="Sheltered Ring"}
sets.midcast.Shellra = sets.midcast.Shell
sets.midcast.Erase = sets.midcast.FastRecast
-- Custom spell classes
sets.midcast.MndEnfeebles = {main="Gada",sub="Genbu's Shield",ammo="Hydrocera",
head="Amalric Coif",neck="Incanter's Torque",ear1="Barkarole Earring",ear2="Gwati Earring",
body="Vanya Robe",hands="Amalric Gages",ring1="Vertigo Ring",ring2="Globidonta Ring",
back="Refraction Cape",waist="Hachirin-no-obi",legs="Chironic Hose",feet="Medium's Sabots"}
sets.midcast.IntEnfeebles = sets.midcast.MndEnfeebles
sets.midcast.ElementalEnfeeble = sets.midcast.IntEnfeebles
sets.midcast.Kaustra = sets.midcast['Elemental Magic']
sets.midcast['Dark Magic'] = {ammo="Hydrocera",
head="Merlinic Hood",neck="Eddy Necklace",ear1="Barkarole Earring",ear2="Gwati Earring",
body="Merlinic Jubbah",hands="Lurid Mitts",ring1="Weatherspoon Ring",ring2="Evanescence Ring",
back="Bookworm's Cape",waist="Witful Belt",legs="Pedagogy Pants",feet="Medium's Sabots"}
sets.midcast.Drain = set_combine(sets.midcast['Dark Magic'], {ammo="Incantor Stone",
head="Pixie Hairpin +1",ear1="Hirudinea Earring",ear2="Loquacious Earring",hands="",waist="Fucho-no-obi",feet="Merlinic Crackows"})
sets.midcast.Aspir = sets.midcast.Drain
sets.midcast.Stun = {main="Akademos",sub="Arbuda Grip",ammo="Incantor Stone",
head="Pedagogy Mortarboard +1",neck="Orunmila's Torque",ear1="Enchanter Earring +1",ear2="Loquac. Earring",
body="Shango Robe",hands="Gendewitha Gages",ring1="",ring2="Prolix Ring",
back="Perimede Cape",waist="Ninurta's Sash",legs="Psycloth Lappas",feet="Academic's Loafers +1"}
sets.midcast.Stun.Resistant = set_combine(sets.midcast.Stun, {})
-- Elemental Magic sets are default for handling low-tier nukes.
sets.midcast['Elemental Magic'] = {main="Akademos",sub="Niobid Strap",ammo="Pemphredo Tathlum",
head=HOODMAB,neck="Saevus Pendant +1",ear1="Barkarole Earring",ear2="Friomisi Earring",
body="Merlinic Jubbah",hands="Chironic Gloves",ring1="Shiva Ring",ring2="Shiva Ring",
back="Toro Cape",waist="Hachirin-no-obi",legs="Amalric Slops",feet=BootsMAB}
sets.midcast['Elemental Magic'].Resistant = sets.midcast['Elemental Magic']
-- Custom refinements for certain nuke tiers
sets.midcast['Elemental Magic'].HighTierNuke = set_combine(sets.midcast['Elemental Magic'], {ammo="Pemphredo Tathlum",
main="Akademos",sub="Niobid Strap",head=HoodMAB,body="Merlinic Jubbah",hands="Chironic Gloves",legs="Merlinic Shalwar",
back="Toro Cape",waist="Refoccilation Stone",feet="BootsMAB"})
sets.midcast['Elemental Magic'].HighTierNuke.Resistant = set_combine(sets.midcast['Elemental Magic'].HighTierNuke, {
main="Akademos",sub="Niobid Strap",ammo="Pemphredo Tathlum",
neck="Eddy Necklace",back="Bookworm's Cape",feet="BootsMAB"})
sets.midcast.Impact = {main="Akademos",sub="Mephitis Grip",ammo="Hydrocera",
head=empty,neck="Eddy Necklace",ear1="Barkarole Earring",ear2="Gwati Earring",
body="Twilight Cloak",hands="Chironic Gloves",ring1="Weatherspoon Ring",ring2="Sangoma Ring",
back="Refraction Cape",waist="Refoccilation Stone",legs="Psycloth Lappas",feet="Medium's Sabots"}
sets.midcast.Helix = set_combine(sets.midcast.HighTierNuke, {back="Bookworm's Cape",waist="Refoccilation Stone"})
sets.midcast.Noctohelix = set_combine(sets.midcast.Helix, {head="Pixie Hairpin +1"})
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main="Chatoyant Staff",sub="Mephitis Grip",
neck="Wiglen Gorget",body="Witching Robe",hands="Serpentes Cuffs",
ring1="Sheltered Ring",ring2="Paguroidea Ring",legs="Assiduity Pants +1",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="Niobid Strap",ammo="Hydrocera",
head="Merlinic Hood",neck="Orunmila's Torque",ear1="Enchanter Earring +1",ear2="Loquacious Earring",
body="Merlinic Jubbah",hands="Amalric Gages",ring1="Defending Ring",ring2="Succor Ring",
back="Bookworm's Cape",waist="Fucho-no-obi",legs="Merlinic Shalwar",feet="Herald's Gaiters"}
sets.idle.Field = {main="Akademos",sub="Niobid Strap",ammo="Homiliary",
head="Amalric Coif",neck="Loricate Torque +1",ear1="Enchanter Earring +1",ear2="Loquacious Earring",
body="Amalric Doublet",hands="Serpentes Cuffs",ring1="Defending Ring",ring2="Succor Ring",
back="Umbra Cape",waist="Fucho-no-obi",legs="Assiduity Pants +1",feet="Herald's Gaiters"}
sets.idle.PDT = {main="Bolelabunga",sub="Genbu's Shield",ammo="Incantor Stone",
neck="Loricate Torque +1",ear1="Ethereal Earring",ring1="Defending Ring",ring2=gear.DarkRing.physical,
body="Vanya Robe",hands="Gendewitha Gages",back="Umbra Cape",feet="Argute Loafers +2"}
sets.idle.Weak = sets.idle.Field
-- Defense sets
sets.defense.PDT = {main="Bolelabunga",sub="Genbu's Shield",ammo="Incantor Stone",
head="Amalric Coif",neck="Loricate Torque +1",ear1="Ethereal Earring",
body="Vanya Robe",hands="Gendewitha Gages",ring1="Defending Ring",ring2="Succor Ring",
back="Umbra Cape",legs="Chironic Hose",feet="Vanya Clogs"}
sets.defense.MDT = {
head="Merlinic Hood",neck="Loricate Torque +1",
body="Pedagogy Gown +1",hands="Chironic Gloves",ring1="Defending Ring",ring2="Shadow Ring",
back="Umbra Cape",legs="Chironic Hose",feet="Arbatel Loafers +1"}
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="Gendewitha Caubeen +1",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Pedagogy Gown +1",hands="Lurid Mitts",ring1="Rajas Ring",ring2="Mars's Ring",
back="Buquwik Cape",waist="Ninurta's Sash",legs="Academic's Pants +1",feet="Argute Loafers +2"}]]--
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Ebullience'] = {}
sets.buff['Rapture'] = {head="Arbatel Bonnet +1"}
sets.buff['Perpetuance'] = {hands="Arbatel Bracers +1"}
sets.buff['Immanence'] = {hands="Arbatel Bracers +1"}
sets.buff['Penury'] = {legs="Arbatel Pants +1"}
sets.buff['Parsimony'] = {legs="Arbatel Pants +1"}
sets.buff['Celerity'] = {feet="Argute Loafers +2"}
sets.buff['Alacrity'] = {head=HoodFC,feet="Argute Loafers +2"}
sets.buff['Stormsurge'] = {feet="Argute Loafers +2"}
sets.buff['Klimaform'] = {feet="Arbatel Loafers +1"}
sets.buff.FullSublimation = {head="Academic's Mortarboard +1",ear1="Savant's Earring",body="Pedagogy Gown +1",neck="Wiglen Gorget",ring1="Sheltered Ring",ring2="Paguroidea Ring"}
sets.buff.PDTSublimation = {head="Academic's Mortarboard +1",ear1="Savant's Earring",body="Pedagogy Gown +1"}
sets.magic_burst = {main="Akademos",sub="Niobid Strap", ammo="Pemphredo Tathlum",ear1="Barkarole Earring",ear2="Friomisi Earring",
body="Merlinic Jubbah",head=HoodMB,neck="Mizukage-no-Kubikazari",hands="Amalric Gages",
ring1="Mujin Band",ring2="Locus Ring",back="Seshaw Cape",waist="Refoccilation Stone",legs="Merlinic Shalwar",feet=BootsMB}
-- Cap: 40%
-- Akademos: 10%, Merlinic Hood: 4%, Mizukage: 10%, Locus: 5%, Seshaw: 5%, Helios Boots: 6% = 40%
--sets.buff['Sandstorm'] = {feet="Desert Boots"}
end
-------------------------------------------------------------------------------------------------------------------
-- Setup functions for this job. Generally should not be modified.
-------------------------------------------------------------------------------------------------------------------
--[[
Custom commands:64
Shorthand versions for each strategem type that uses the version appropriate for
the current Arts.
In-game macro: /console gs c scholar xxx
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')
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')
state.CastingMode:options('Normal', 'Resistant')
state.IdleMode:options('Normal', 'PDT')
state.MagicBurst = M(false, 'Magic Burst')
info.low_nukes = S{"Stone", "Water", "Aero", "Fire", "Blizzard", "Thunder",
"Stone II", "Water II", "Aero II", "Fire II", "Blizzard II", "Thunder II"}
info.mid_nukes = S{}
info.high_nukes = S{"Stone III", "Water III", "Aero III", "Fire III", "Blizzard III", "Thunder III",
"Stone IV", "Water IV", "Aero IV", "Fire IV", "Blizzard IV", "Thunder IV",
"Stone V", "Water V", "Aero V", "Fire V", "Blizzard V", "Thunder V"}
send_command('bind ` input /ma Stun <t>; wait 0.5; input /p Casting STUN on <t>.')
send_command('bind ^` gs c toggle MagicBurst')
send_command('bind !%numpad3 gs c scholar skillchain')
send_command('bind !%numpad1 gs c scholar light')
send_command('bind !%numpad2 gs c scholar dark')
send_command('bind !%numpad4 gs c scholar speed')
send_command('bind !%numpad5 gs c scholar duration')
send_command('bind !%numpad6 gs c scholar aoe')
--SelfSkillchaines Keybinds
send_command('bind ^1 input /p Fusion Skillchain Starting now!;gs c scholar skillchain;wait 1;input /ma fire;wait 4;gs c scholar skillchain;wait 1;input /ma thunder')
send_command('bind ^2 input /p Fragmentation Skillchain Starting now!;gs c scholar skillchain;wait 1;input /ma blizzard;wait 4;gs c scholar skillchain;wait 1;input /ma water')
send_command('bind ^3 input /p Gravitation Skillchain Starting now!;gs c scholar skillchain;wait 1;input /ma aero;wait 4;gs c scholar skillchain;wait 1;input /ma noctohelix')
send_command('bind ^4 input /p Distortion Skillchain Starting now!;gs c scholar skillchain;wait 1;input /ma luminohelix;wait 6;gs c scholar skillchain;wait 1;input /ma stone')
send_command('bind ^5 input /p Scission Skillchain Starting now!;gs c scholar skillchain;wait 1;input /ma aero;wait 4;gs c scholar skillchain;wait 1;input /ma stone')
select_default_macro_book()
end
function user_unload()
send_command('unbind `')
send_command('unbind ^`')
send_command('unbind !%numpad3')
send_command('unbind !%numpad1')
send_command('unbind !%numpad2')
send_command('unbind !%numpad4')
send_command('unbind !%numpad5')
send_command('unbind !%numpad6')
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
function job_precast(spell, action, spellMap, eventArgs)
if (spell.type:endswith('Magic') or spell.type == "Ninjutsu") then
if buffactive.Silence then
cancel_spell()
send_command('input /item "Echo Drops" <me>')
end
end
end
-- Run after the general midcast() is done.
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' then
apply_grimoire_bonuses(spell, action, spellMap, eventArgs)
end
if spell.element == world.day_element or spell.element == world.weather_element then
if info.low_nukes:contains(spell.english) then
equip(sets.midcast['Elemental Magic'], {ring1="Zodiac Ring",back="Twilight Cape", waist="Hachirin-no-obi"})
elseif info.high_nukes:contains(spell.english) then
equip(sets.midcast['Elemental Magic'].HighTierNuke, {ring1="Zodiac Ring",back="Twilight Cape", waist="Hachirin-no-obi"})
end
end
if spell.skill == 'Elemental Magic' then
if state.MagicBurst.value then
equip(sets.magic_burst, {waist="Hachirin-no-obi"})
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for non-casting events.
-------------------------------------------------------------------------------------------------------------------
-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
if buff == "Sublimation: Activated" then
handle_equipping_gear(player.status)
end
end
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
if stateField == 'Offense Mode' then
if newValue == 'Normal' then
disable('main','sub','range')
else
enable('main','sub','range')
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
if spell.action_type == 'Magic' then
if default_spell_map == 'Cure' or default_spell_map == 'Curaga' then
if world.weather_element == 'Light' then
return 'CureWithLightWeather'
end
elseif spell.skill == 'Enfeebling Magic' then
if spell.type == 'WhiteMagic' then
return 'MndEnfeebles'
else
return 'IntEnfeebles'
end
elseif spell.skill == 'Elemental Magic' then
if info.low_nukes:contains(spell.english) then
return 'LowTierNuke'
elseif info.mid_nukes:contains(spell.english) then
return 'MidTierNuke'
elseif info.high_nukes:contains(spell.english) then
return 'HighTierNuke'
end
end
end
end
function customize_idle_set(idleSet)
if state.Buff['Sublimation: Activated'] then
if state.IdleMode.value == 'Normal' then
idleSet = set_combine(idleSet, sets.buff.FullSublimation)
elseif state.IdleMode.value == 'PDT' then
idleSet = set_combine(idleSet, sets.buff.PDTSublimation)
end
end
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
return idleSet
end
-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
if cmdParams[1] == 'user' and not (buffactive['light arts'] or buffactive['dark arts'] or
buffactive['addendum: white'] or buffactive['addendum: black']) then
if state.IdleMode.value == 'Stun' then
send_command('@input /ja "Dark Arts" <me>')
else
send_command('@input /ja "Light Arts" <me>')
end
end
update_active_strategems()
update_sublimation()
end
-- Function to display the current relevant user state when doing an update.
-- Return true if display was handled, and you don't want the default info shown.
function display_current_job_state(eventArgs)
display_current_caster_state()
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Called for direct player commands.
function job_self_command(cmdParams, eventArgs)
if cmdParams[1]:lower() == 'scholar' then
handle_strategems(cmdParams)
eventArgs.handled = true
end
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
-- Reset the state vars tracking strategems.
function update_active_strategems()
state.Buff['Ebullience'] = buffactive['Ebullience'] or false
state.Buff['Rapture'] = buffactive['Rapture'] or false
state.Buff['Perpetuance'] = buffactive['Perpetuance'] or false
state.Buff['Immanence'] = buffactive['Immanence'] or false
state.Buff['Penury'] = buffactive['Penury'] or false
state.Buff['Parsimony'] = buffactive['Parsimony'] or false
state.Buff['Celerity'] = buffactive['Celerity'] or false
state.Buff['Alacrity'] = buffactive['Alacrity'] or false
state.Buff['Klimaform'] = buffactive['Klimaform'] or false
end
function update_sublimation()
state.Buff['Sublimation: Activated'] = buffactive['Sublimation: Activated'] or false
end
-- Equip sets appropriate to the active buffs, relative to the spell being cast.
function apply_grimoire_bonuses(spell, action, spellMap)
if state.Buff.Perpetuance and spell.type =='WhiteMagic' and spell.skill == 'Enhancing Magic' then
equip(sets.buff['Perpetuance'])
end
if state.Buff.Rapture and (spellMap == 'Cure' or spellMap == 'Curaga') then
equip(sets.buff['Rapture'])
end
if spell.skill == 'Elemental Magic' and spellMap ~= 'ElementalEnfeeble' then
if state.Buff.Ebullience and spell.english ~= 'Impact' then
equip(sets.buff['Ebullience'])
end
if state.Buff.Immanence then
equip(sets.buff['Immanence'])
end
if state.Buff.Klimaform then --and spell.element == world.weather_element
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
function display_current_caster_state()
local msg = ''
if state.OffenseMode.value ~= 'None' then
msg = msg .. 'Melee'
if state.CombatForm.has_value then
msg = msg .. ' (' .. state.CombatForm.value .. ')'
end
msg = msg .. ', '
end
msg = msg .. 'Idle ['..state.IdleMode.value..'], Casting ['..state.CastingMode.value..']'
add_to_chat(122, msg)
local currentStrats = get_current_strategem_count()
local arts
if buffactive['Light Arts'] or buffactive['Addendum: White'] then
arts = 'Light Arts'
elseif buffactive['Dark Arts'] or buffactive['Addendum: Black'] then
arts = 'Dark Arts'
else
arts = 'No Arts Activated'
end
add_to_chat(122, 'Current Available Strategems: ['..currentStrats..'], '..arts..'')
end
-- General handling of strategems in an Arts-agnostic way.
-- Format: gs c scholar <strategem>
function handle_strategems(cmdParams)
-- cmdParams[1] == 'scholar'
-- cmdParams[2] == strategem to use
if not cmdParams[2] then
add_to_chat(123,'Error: No strategem command given.')
return
end
local currentStrats = get_current_strategem_count()
local newStratCount = currentStrats - 1
local strategem = cmdParams[2]:lower()
if currentStrats > 0 and strategem ~= 'light' and strategem ~= 'dark' then
add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
elseif currentStrats == 0 then
add_to_chat(122, '***Out of strategems! Canceling...***')
return
end
if strategem == 'light' then
if buffactive['light arts'] then
send_command('input /ja "Addendum: White" <me>')
add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
elseif buffactive['addendum: white'] then
add_to_chat(122,'Error: Addendum: White is already active.')
elseif buffactive['dark arts'] or buffactive['addendum: black'] then
send_command('input /ja "Light Arts" <me>')
add_to_chat(122, '***Changing Arts! Current Charges Available: ['..currentStrats..']***')
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>')
add_to_chat(122, '***Current Charges Available: ['..newStratCount..']***')
elseif buffactive['addendum: black'] then
add_to_chat(122,'Error: Addendum: Black is already active.')
elseif buffactive['light arts'] or buffactive['addendum: white'] then
send_command('input /ja "Dark Arts" <me>')
add_to_chat(122, '***Changing Arts! Current Charges Available: ['..currentStrats..']***')
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
function get_current_strategem_count()
local allRecasts = windower.ffxi.get_ability_recasts()
local stratsRecast = allRecasts[231]
local maxStrategems = math.floor(player.main_job_level + 10) / 20
local fullRechargeTime = 5*33
local currentCharges = math.floor(maxStrategems - maxStrategems * stratsRecast / fullRechargeTime)
return currentCharges
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
if player.sub_job == 'RDM' then
set_macro_page(1, 8)
elseif player.sub_job == 'BLM' then
set_macro_page(1, 8)
elseif player.sub_job == 'WHM' then
set_macro_page(2, 8)
end
end
Bismarck.Speedyjim
Server: Bismarck
Game: FFXI
Posts: 516
By Bismarck.Speedyjim 2016-03-07 06:41:57
Hello Folks,
I am trying to understand why the set_combine do not seem to work, or at leats do not show into showswaps, particularly for helix spells. This is my LUA and all midcasts work. I suspect the issue with Helix's are the II-type spells not swapping?
If that's the case, open Windower4/addons/GearSwap/libs/Mote-Mappings.lua and add the Helix-II spells. While you're there, may as well add the storm-II spells too.
Code ['Pyrohelix']='Helix',['Cryohelix']='Helix',['Anemohelix']='Helix',['Geohelix']='Helix',['Ionohelix']='Helix',['Hydrohelix']='Helix',['Luminohelix']='Helix',['Noctohelix']='Helix',
['Pyrohelix II']='Helix',['Cryohelix II']='Helix',['Anemohelix II']='Helix',['Geohelix II']='Helix',['Ionohelix II']='Helix',['Hydrohelix II']='Helix',['Luminohelix II']='Helix',['Noctohelix II']='Helix',
['Firestorm']='Storm',['Hailstorm']='Storm',['Windstorm']='Storm',['Sandstorm']='Storm',['Thunderstorm']='Storm',['Rainstorm']='Storm',['Aurorastorm']='Storm',['Voidstorm']='Storm',
['Firestorm II']='Storm',['Hailstorm II']='Storm',['Windstorm II']='Storm',['Sandstorm II']='Storm',['Thunderstorm II']='Storm',['Rainstorm II']='Storm',['Aurorastorm II']='Storm',['Voidstorm II']='Storm',
Quote: Secondly, I would like to make sure the Bookworm Cape and the Refocciliation Stone are equipped, even in case of magic burst mode. This I'm unsure of, tbh.
[+]
Server: Siren
Game: FFXI
Posts: 116
By Siren.Blackroses 2016-03-07 06:44:33
Hi SpeedyJim,
Thanks for the quick answer. I have already modified the Mote-Mappins, so this is not the issue in case...
Otherwise, when you use "gearswap showswap", it does equip the tiernukeset + cape and stone (or whatever you set there?
Server: Siren
Game: FFXI
Posts: 116
By Siren.Blackroses 2016-03-07 06:49:16
Actually, I think I found a mistake in my SC.
I changed the helix line showed above for Code sets.midcast.Helix = set_combine(sets.midcast['Elemental Magic'].HighTierNuke, {back="Bookworm's Cape",waist="Refoccilation Stone"})
and it seems to work properly.
Lakshmi.Sulia
Server: Lakshmi
Game: FFXI
Posts: 83
By Lakshmi.Sulia 2016-03-07 06:54:16
Code sets.midcast.Helix = set_combine(sets.midcast.HighTierNuke, {back="Bookworm's Cape",waist="Refoccilation Stone"})
sets.midcast.Noctohelix = set_combine(sets.midcast.Helix, {head="Pixie Hairpin +1"})
If you're using your Elemental Magic set as the base should probably look like this:
Code sets.midcast.Helix = set_combine(sets.midcast['Elemental Magic'].HighTierNuke, {back="Bookworm's Cape",waist="Refoccilation Stone"})
sets.midcast.Noctohelix = set_combine(sets.midcast.Helix, {head="Pixie Hairpin +1"})
You remembered to do it with earlier set combines, but that one you omitted the ['Elemental Magic'] from the set you were using as the base to combine.
[+]
Server: Siren
Game: FFXI
Posts: 116
By Siren.Blackroses 2016-03-07 07:02:12
Cookies for both of you!
Now, how would I create a line for noctohelix II?
Would : Code sets.midcast.Noctohelix.II = set_combine(sets.midcast.Helix, {head="Pixie Hairpin +1"})
works in this case? (Testing atm).
Lakshmi.Sulia
Server: Lakshmi
Game: FFXI
Posts: 83
By Lakshmi.Sulia 2016-03-07 07:06:47
This might do the trick? I'm not used to coding for specific spells, so someone that knows better than I would probably be able to help better.
Code sets.midcast.['Noctohelix II'] = set_combine(sets.midcast.Helix, {head="Pixie Hairpin +1"})
Sylph.Mozhat
Server: Sylph
Game: FFXI
Posts: 58
By Sylph.Mozhat 2016-03-07 07:56:48
I have a question about smn "sets.midcast.Pet."
On the function user_setup(),
what state."NAME"Mode:options('None', 'PhyAcc', 'MagAcc')
would you use to toggle the sets.midcast.Pet.?
This lua uses mote_include_version = 2.
There's no miscast.set in the event section.
-- Custom spell mapping.
function job_get_spell_map(spell)
if spell.type == 'BloodPactRage' then
if magicalRagePacts:contains(spell.english) then
return 'MagicalBloodPactRage'
else
return 'PhysicalBloodPactRage'
end
elseif spell.type == 'BloodPactWard' and spell.target.type == 'MONSTER' then
return 'DebuffBloodPactWard'
end
end
Can anyone help me with this?
I want to make a midcast pet ACC sets for phy and magical on the 135-145 lv. content.
Bismarck.Speedyjim
Server: Bismarck
Game: FFXI
Posts: 516
By Bismarck.Speedyjim 2016-03-07 18:01:28
This might do the trick? I'm not used to coding for specific spells, so someone that knows better than I would probably be able to help better.
Code sets.midcast.['Noctohelix II'] = set_combine(sets.midcast.Helix, {head="Pixie Hairpin +1"}) Drop the period after midcast. Code sets.midcast['Noctohelix II'] = set_combine(sets.midcast.Helix, {head="Pixie Hairpin +1"})
Carbuncle.Doryll
Server: Carbuncle
Game: FFXI
By Carbuncle.Doryll 2016-03-08 09:32:49
How about something like this?
you would still need to change my MB stuff (which doesn't work yet as I want it to):
Quote: if state.MagicBurst == "tmp" or state.MagicBurst == "Perma" then
Hello, I tried to work with your code to have what i want (equip or not the AF body). It seems that doesn't work :/
Maybe i wrote something false, or i miss something, i'm a noob on coding^^ -- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------
-- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.
-- 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.
function job_setup()
end
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
-- Options: Override default values
state.OffenseMode:options('Normal', 'None')
state.CastingMode:options('Normal', 'MagicBurst')
state.EquipBodyAF:options('BodyAF', 'AmalricBody')
state.IdleMode:options('Normal', 'PDT')
state.PhysicalDefenseMode:options('PDT')
state.MagicalDefenseMode:options('MDT')
state.MagicBurst = M(false, 'Magic Burst')
lowTierNukes = S{'Stone', 'Water', 'Aero', 'Fire', 'Blizzard', 'Thunder',
'Stone II', 'Water II', 'Aero II', 'Fire II', 'Blizzard II', 'Thunder II',
'Stone III', 'Water III', 'Aero III', 'Fire III', 'Blizzard III', 'Thunder III',
'Stonega', 'Waterga', 'Aeroga', 'Firaga', 'Blizzaga', 'Thundaga',
'Stonega II', 'Waterga II', 'Aeroga II', 'Firaga II', 'Blizzaga II', 'Thundaga II'}
-- Default macro set/book
set_macro_page(8, 4)
end
-- Called when this job file is unloaded (eg: job change)
function file_unload()
if binds_on_unload then
binds_on_unload()
end
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
sets.lockstyle = {main={ name="Lathi", augments={'MP+80','INT+20','"Mag.Atk.Bns."+20',}},
sub="Niobid Strap",
ammo="Strobilus",
head={ name="Amalric Coif +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
body={ name="Amalric Doublet +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
hands={ name="Amalric Gages +1", augments={'INT+12','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
legs={ name="Amalric Slops +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
feet={ name="Amalric Nails +1", augments={'Mag. Acc.+20','"Mag.Atk.Bns."+20','"Conserve MP"+7',}},
neck="Twilight Torque",
waist="Fucho-no-Obi",
left_ear="Etiolation Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Defending Ring",
right_ring="Mephitas's Ring +1",
back={ name="Bane Cape", augments={'Elem. magic skill +9','Dark magic skill +7','"Mag.Atk.Bns."+3',}},}
---- Precast Sets ----
-- Precast sets to enhance JAs
sets.precast.JA['Mana Wall'] = {feet="Wicce Sabots +1"}
sets.precast.JA.Manafont = {body="Archmage's Coat +1"}
-- equip to maximize HP (for Tarus) and minimize MP loss before using convert
sets.precast.JA.Convert = {}
-- Fast cast sets for spells
sets.precast.FC = {
head={name="Amalric Coif +1", priority=1},neck={name="Orunmila's Torque", priority=3},ear1="Etiolation Earring",ear2="Loquacious Earring",hands={ name="Merlinic Dastanas", augments={'Mag. Acc.+4','"Fast Cast"+7','"Mag.Atk.Bns."+12',}},waist="Witful Belt",body={ name="Merlinic Jubbah", augments={'Mag. Acc.+21','"Fast Cast"+7','CHR+1','"Mag.Atk.Bns."+14',}},back="Perimede Cape",ammo="Impatiens",
ring1={name="Lebeche Ring", priority=4},ring2="Rahab Ring",
legs={name="Psycloth Lappas", priority=2},feet={ name="Merlinic Crackows", augments={'Mag. Acc.+21','"Fast Cast"+7','INT+2',}}}
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {ear2="Barkarole Earring"})
sets.precast.FC.Death = set_combine(sets.precast.FC, {ear2="Barkarole Earring",ring1="Rahab Ring",Ring2={name="Mephitas's Ring +1", priority=4}})
sets.precast.FC.Cure = set_combine(sets.precast.FC, {head={name="Amalric Coif +1", priority=1},hands="Vanya Cuffs",back={name="Pahtli Cape", priority=2},legs="Vanya Slops",feet="Vanya Clogs",ear1="Etiolation Earring",ear2="Mendicant's Earring",neck="Orunmila's Torque",waist="Acerbic sash +1",ammo="Strobilus"})
sets.precast.FC.Curaga = sets.precast.FC.Cure
sets.precast.FC.Impact = set_combine(sets.precast.FC, {ring1="Prolix Ring",ammo="Sapience Orb",ear1="Enchanter Earring +1",back="Swith Cape +1",head=empty,body="Twilight Cloak"})
sets.precast.FC.Stoneskin = set_combine(sets.precast.FC['Enhancing Magic'], {hands="Carapacho Cuffs",legs={name="Psycloth Lappas", priority=1},ring1={name="Lebeche Ring", priority=2}})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {ammo="Pemphredo Tathlum",
head="Hagondes Hat +1",neck="Mizukage-no-Kubikazari",ear1="Crematio Earring",ear2="Friomisi Earring",
body="Amalric Doublet +1",hands="Amalric Gages +1",ring1="Shiva Ring +1",ring2="Shiva Ring +1",
back="Bane Cape",waist="Yamabuki-no-obi",legs="Hagondes Pants +1",feet={ name="Merlinic Crackows", augments={'Mag. Acc.+23 "Mag.Atk.Bns."+23','INT+8','Mag. Acc.+14','"Mag.Atk.Bns."+14',}}}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Myrkr'] = {ammo="Strobilus",
head="Amalric Coif +1",neck="Dualism Collar +1",ear1="Etiolation Earring",ear2="Influx Earring",
body="Weatherspoon robe +1",hands="Otomi Gloves",ring1="Mephitas's Ring +1",ring2="Mephitas's Ring",
back="Bane Cape",waist="Shinjutsu-no-obi +1",legs="Amalric Slops +1",feet="Psycloth Boots"}
sets.precast.WS['Vidohunir'] = {ammo="Pemphredo Tathlum",
head="Pixie Hairpin +1",neck="Mizukage-no-Kubikazari",ear1="Friomisi Earring",ear2="Barkarole Earring",
body="Amalric Doublet +1",hands="Amalric Gages +1",ring1="Archon Ring",ring2="Shiva Ring +1",
back="Toro Cape",waist="Yamabuki-no-obi",legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','Magic burst mdg.+3%','INT+15','Mag. Acc.+6','"Mag.Atk.Bns."+12',}},feet={ name="Merlinic Crackows", augments={'Mag. Acc.+23 "Mag.Atk.Bns."+23','INT+8','Mag. Acc.+14','"Mag.Atk.Bns."+14',}},}
---- Midcast Sets ----
sets.midcast.FastRecast = {
head="Amalric Coif +1",ammo="Impatiens",ear1="Etiolation Earring",ear2="Loquacious Earring",
body="Amalric Doublet +1",hands="Otomi Gloves",ring1="Lebeche Ring",
back="Perimede Cape",waist="Cetl Belt",legs="Psycloth Lappas",feet="Battlecast gaiters"}
sets.midcast.Cure = {ammo="Strobilus",
head="Vanya Hood",neck="Phalaina Locket",ear1="Roundel Earring",ear2="Mendicant's Earring",
body="Vrikodara Jupon",hands="Vanya Cuffs",ring1="Lebeche ring",ring2={name="Mephitas's Ring +1", priority=1},
back="Solemnity Cape",waist={name="Shinjutsu-no-Obi +1", priority=2},legs="Vanya Slops",feet="Vanya Clogs"}
sets.self_healing = {ammo={name="Strobilus", priority=3},
head="Vanya Hood",neck="Phalaina Locket",ear1="Roundel Earring",ear2="Mendicant's Earring",
body="Vrikodara Jupon",hands={name="Otomi Gloves", priority=2},ring1="Asklepian ring",ring2="Kunaji Ring",
back="Solemnity Cape",waist="Gishdubar Sash",legs={name="Psycloth Lappas", priority=1},feet="Medium's Sabots"}
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast['Enhancing Magic'] = {
head="Telchine Cap",ear1={name="Etiolation Earring", priority=4},ear2="Andoaa Earring",ammo="Strobilus",
neck="Incanter's Torque",body="Telchine Chasuble",ring1={name="mephitas's ring", priority=2},ring2={name="mephitas's ring +1", priority=1},
back={name="Fi Follet Cape +1", priority=3},hands="Telchine Gloves",waist="Olympus Sash",
legs="Telchine Braconi",feet="Telchine Pigaches"}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {hands={name="Otomi Gloves", priority=3},back={name="Fi Follet Cape +1", priority=4},neck="Stone Gorget",ear1="Earthcry Earring",legs="Shedir Seraweels",waist="Siegel Sash",ring1={name="mephitas's ring", priority=2},ring2={name="mephitas's ring +1", priority=1}})
sets.midcast.Aquaveil = set_combine(sets.midcast['Enhancing Magic'], {head="Amalric Coif +1",waist="Emphatikos Rope",legs="Shedir Seraweels"})
sets.midcast.Refresh = set_combine(sets.midcast.Aquaveil, {head="Amalric Coif +1",Body="Telchine Chasuble",hands="Telchine Gloves",legs="Telchine Braconi",waist="Gishdubar Sash",feet="Telchine Pigaches"})
sets.midcast.Haste = set_combine(sets.midcast.Aquaveil, {head="Telchine Cap",Body="Telchine Chasuble",hands="Telchine Gloves",legs="Telchine Braconi",feet="Telchine Pigaches"})
sets.midcast.MndEnfeebles = {ammo="Quartz Tathlum +1",
head="Befouled Crown",neck="Incanter's Torque",ear1="Dignitary's Earring",ear2="Barkarole Earring",
body="Vanya Robe",hands="Lurid Mitts",ring1={name="Sangoma Ring", priority=2},ring2="Globidonta Ring",
back="Altruistic Cape",waist="Rumination sash",legs={name="Psycloth Lappas", priority=1},feet={name="Medium's Sabots", priority=3}}
sets.midcast.IntEnfeebles = sets.midcast.MndEnfeebles
sets.midcast['Dark Magic'] = {ammo="Pemphredo Tathlum",
head="Amalric Coif +1",neck="Incanter's Torque",ear1="Dark Earring",ear2="Barkarole Earring",
body="Psycloth Vest",hands="Archmage's Gloves +1",ring1="Archon Ring",ring2="Evanescence Ring",
back={name="Bane Cape", priority=2},waist="Cetl Belt",legs="Spaekona's Tonban +1",feet="Wicce Sabots +1"}
sets.midcast.Drain = {ammo="Strobilus",
head="Pixie Hairpin +1",neck="Incanter's Torque",ear1="Hirudinea Earring",ear2="Barkarole Earring",
body="Psycloth Vest",hands={ name="Merlinic Dastanas", augments={'Mag. Acc.+12','"Drain" and "Aspir" potency +11','"Mag.Atk.Bns."+7',}},ring1="Archon Ring",ring2="Evanescence Ring",
back={name="Bane Cape", priority=1},waist="Fucho-no-obi",legs="Spaekona's Tonban +1",feet="Wicce Sabots +1"}
sets.midcast.Aspir = sets.midcast.Drain
sets.midcast['Aspir III'] = sets.midcast.Drain
-- Elemental Magic sets are default for handling low-tier nukes.
sets.midcast['Elemental Magic'] = {ammo="Dosis Tathlum",
head={ name="Merlinic Hood", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','INT+10','Mag. Acc.+5','"Mag.Atk.Bns."+14',}},neck="Sanctity Necklace",ear1="Friomisi Earring",ear2="Crematio Earring",
body={name="Amalric Doublet +1", priority=1},hands="Amalric Gages +1",ring1="Shiva Ring +1",ring2="Shiva Ring +1",
back={name="Bane Cape", priority=2},waist="Yamabuki-no-obi",legs={name="Amalric Slops +1", priority=2},feet="Amalric Nails +1"}
sets.midcast['Elemental Magic'].MagicBurst = {ammo="Pemphredo Tathlum",
head={ name="Merlinic Hood", augments={'Mag. Acc.+19 "Mag.Atk.Bns."+19','Magic burst mdg.+5%','INT+15','Mag. Acc.+6',}},neck="Mizukage-no-Kubikazari",ear1="Friomisi Earring",ear2="Barkarole Earring",
body={name="Amalric Doublet +1", priority=1},hands="Amalric Gages +1",ring1="Shiva Ring +1",ring2="Mujin Band",
back="Seshaw Cape +1",waist="Yamabuki-no-obi",legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic burst mdg.+9%','INT+13','Mag. Acc.+1',}},feet={ name="Merlinic Crackows", augments={'Mag. Acc.+16 "Mag.Atk.Bns."+16','Magic burst mdg.+8%','INT+10','"Mag.Atk.Bns."+12',}}}
sets.midcast['Elemental Magic'].HighTierNuke = set_combine( sets.midcast['Elemental Magic'], {feet={ name="Merlinic Crackows", augments={'Mag. Acc.+23 "Mag.Atk.Bns."+23','INT+8','Mag. Acc.+14','"Mag.Atk.Bns."+14',}},head={ name="Merlinic Hood", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','INT+10','Mag. Acc.+5','"Mag.Atk.Bns."+14',}},body="Spaekona's Coat +1",waist="Yamabuki-no-obi",neck="Mizukage-no-Kubikazari",ammo="Pemphredo Tathlum",back="Toro Cape",legs="Amalric Slops +1",ear2="Barkarole Earring"} )
sets.midcast['Elemental Magic'].HighTierNuke.MagicBurst = set_combine( sets.midcast['Elemental Magic'].HighTierNuke, {body="Amalric Doublet +1",feet={ name="Merlinic Crackows", augments={'Mag. Acc.+16 "Mag.Atk.Bns."+16','Magic burst mdg.+8%','INT+10','"Mag.Atk.Bns."+12',}},head={ name="Merlinic Hood", augments={'Mag. Acc.+19 "Mag.Atk.Bns."+19','Magic burst mdg.+5%','INT+15','Mag. Acc.+6',}},ammo="Pemphredo Tathlum",ear1="Friomisi Earring",back="Seshaw Cape +1",ring1="Shiva Ring +1",Ring2="Mujin Band",legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic burst mdg.+9%','INT+13','Mag. Acc.+1',}}} )
sets.midcast.Impact = {
ammo="Seraphic Ampulla",
head=empty,
body="Twilight Cloak",
hands={ name="Helios Gloves", augments={'"Mag.Atk.Bns."+24','"Occult Acumen"+10','INT+7 MND+7',}},
legs="Perdition Slops",
feet={ name="Helios Boots", augments={'Pet: Attack+26 Pet: Rng.Atk.+26','"Occult Acumen"+7',}},
neck="Gaudryi Necklace",
waist="Oneiros Rope",
left_ear="Dedition Earring",
right_ear="Tripudio Earring",
left_ring="K'ayres Ring",
right_ring="Rajas Ring",
back="Toro Cape",}
sets.midcast.Impact.MagicBurst = sets.midcast.Impact
sets.midcast.Meteor = {ammo="Pemphredo Tathlum",
head={ name="Merlinic Hood", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','INT+10','Mag. Acc.+5','"Mag.Atk.Bns."+14',}},neck="Mizukage-no-Kubikazari",ear1="Friomisi Earring",ear2="Barkarole Earring",
body="Amalric Doublet +1",hands="Amalric Gages +1",ring1="Shiva Ring +1",ring2="Shiva Ring +1",
back="Toro Cape",waist="Yamabuki-no-obi",legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','Magic burst mdg.+3%','INT+15','Mag. Acc.+6','"Mag.Atk.Bns."+12',}},feet={ name="Merlinic Crackows", augments={'Mag. Acc.+23 "Mag.Atk.Bns."+23','INT+8','Mag. Acc.+14','"Mag.Atk.Bns."+14',}}}
sets.midcast.Comet = {ammo="Pemphredo Tathlum",
head="Pixie Hairpin +1",neck="Mizukage-no-Kubikazari",ear1="Friomisi Earring",ear2="Barkarole Earring",
body="Spaekona's Coat +1",hands="Amalric Gages +1",ring1="Archon Ring",ring2="Shiva Ring +1",
back="Toro Cape",waist="Yamabuki-no-obi",legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','Magic burst mdg.+3%','INT+15','Mag. Acc.+6','"Mag.Atk.Bns."+12',}},feet={ name="Merlinic Crackows", augments={'Mag. Acc.+23 "Mag.Atk.Bns."+23','INT+8','Mag. Acc.+14','"Mag.Atk.Bns."+14',}}}
sets.midcast.Comet.MagicBurst = {ammo="Pemphredo Tathlum",
head="Pixie Hairpin +1",neck="Mizukage-no-Kubikazari",ear1="Static Earring",ear2="Barkarole Earring",
body="Spaekona's Coat +1",hands="Amalric Gages +1",ring1="Archon Ring",ring2="Mujin Band",
back="Seshaw Cape +1",waist="Yamabuki-no-obi",legs="Wicce Chausses +1",feet={ name="Merlinic Crackows", augments={'Mag. Acc.+16 "Mag.Atk.Bns."+16','Magic burst mdg.+8%','INT+10','"Mag.Atk.Bns."+12',}}}
sets.midcast.Death = set_combine( sets.midcast.Comet, {body="Amalric Doublet +1",legs="Amalric Slops +1"})
sets.midcast.Death.MagicBurst = set_combine( sets.midcast.Comet.MagicBurst, {body={name="Amalric Doublet +1", priority=1},legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic burst mdg.+9%','INT+13','Mag. Acc.+1',}}})
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {ammo="Strobilus",
head="Amalric Coif +1",neck="Dualism Collar +1",ear1="Etiolation Earring",ear2="Influx Earring",
body="Amalric Doublet +1",hands="Serpentes Cuffs",ring1="Sangoma Ring",ring2="Mephitas's Ring",
waist="Shinjutsu-no-obi +1",legs="Assiduity Pants +1",feet="Serpentes Sabots"}
-- Idle sets
-- Normal refresh idle set
sets.idle = {ammo="Strobilus",
head="Befouled Crown",neck="Twilight Torque",ear1={name="Etiolation Earring", priority=3},ear2="Moonshade Earring",
body={name="Amalric Doublet +1", priority=1},hands="Shrieker's Cuffs",ring1="Defending ring",ring2="Mephitas's Ring +1",
back="Bane Cape",waist={name="Shinjutsu-no-obi +1", priority=2},legs="Assiduity Pants +1",feet="Crier's Gaiters"}
-- Idle mode that keeps PDT gear on, but doesn't prevent normal gear swaps for precast/etc.
sets.idle.PDT = {
ammo="Strobilus",
head={ name="Merlinic Hood", augments={'Mag. Acc.+21 "Mag.Atk.Bns."+21','Phys. dmg. taken -4%',}},
body={ name="Merlinic Jubbah", augments={'Mag. Acc.+22','Phys. dmg. taken -2%',}},
hands={ name="Merlinic Dastanas", augments={'"Mag.Atk.Bns."+24','Phys. dmg. taken -4%','CHR+13',}},
legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+19','Damage taken-3%','MND+6',}},
feet={ name="Merlinic Crackows", augments={'Phys. dmg. taken -4%','CHR+3','Mag. Acc.+3','"Mag.Atk.Bns."+4',}},
neck="Twilight Torque",
waist="Shinjutsu-no-Obi +1",
left_ear="Etiolation Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Defending Ring",
right_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Magic dmg. taken -6%',}},
back="Umbra Cape",}
-- Idle mode scopes:
-- Idle mode when weak.
sets.idle.Weak = {ammo="Strobilus",
head="Befouled Crown",neck="Dualism Collar +1",ear1="Etiolation Earring",ear2="Moonshade Earring",
body="Amalric Doublet +1",hands="Otomi Gloves",ring1="Mephitas's Ring +1",ring2="Mephitas's Ring",
back="Bane Cape",waist="Shinjutsu-no-obi +1",legs="Assiduity Pants +1",feet="Psycloth Boots"}
-- Town gear.
sets.idle.Town = {main={ name="Lathi", augments={'MP+80','INT+20','"Mag.Atk.Bns."+20',}},
sub="Thrace Strap",
ammo="Pemphredo Tathlum",
head={ name="Amalric Coif +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
body="Amalric Doublet +1",
hands={ name="Amalric Gages +1", augments={'INT+12','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
legs="Amalric Slops +1",
feet="Crier's Gaiters",
neck="Incanter's Torque",
waist="Hachirin-no-Obi",
left_ear="Etiolation Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Defending Ring",
right_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Magic dmg. taken -6%',}},
back="Seshaw Cape +1"}
-- Defense sets
sets.defense.PDT = {}
sets.defense.MDT = {}
sets.Kiting = {feet="Crier's Gaiters"}
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Mana Wall'] = {feet="Wicce Sabots +1"}
sets.TPdown = {neck="Chrysopoeia torque"}
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 = {
ammo="Strobilus",
head={ name="Amalric Coif +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
body={ name="Merlinic Jubbah", augments={'Mag. Acc.+22','Phys. dmg. taken -2%',}},
hands={ name="Merlinic Dastanas", augments={'"Mag.Atk.Bns."+24','Phys. dmg. taken -4%','CHR+13',}},
legs={ name="Amalric Slops +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
feet={ name="Merlinic Crackows", augments={'Phys. dmg. taken -4%','CHR+3','Mag. Acc.+3','"Mag.Atk.Bns."+4',}},
neck="Dualism Collar +1",
waist="Shinjutsu-no-Obi +1",
left_ear="Bladeborn Earring",
right_ear="Steelflash Earring",
left_ring="Defending Ring",
right_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Magic dmg. taken -6%',}},
back="Umbra 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 spellMap == 'Cure' or spellMap == 'Curaga' then
gear.default.obi_waist = "Goading Belt"
elseif spell.skill == 'Elemental Magic' then
gear.default.obi_waist = "Sekhmet Corset"
if state.CastingMode.value == 'Proc' then
classes.CustomClass = 'Proc'
end
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)
end
-- 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)
if spellMap == 'Cure' and spell.target.type == 'SELF' and sets.self_healing then
equip(sets.self_healing)
end
if spell.skill == 'Elemental Magic' then
if spell.element == world.day_element or spell.element == world.weather_element then
equip({waist="Hachirin-No-Obi"})
add_to_chat(8,'----- Obi Equipped. -----')
end
end
if spell.skill == 'Elemental Magic' and spell.name == 'Impact' then
if spell.element == world.day_element or spell.element == world.weather_element then
equip({waist="Oneiros Rope"})
add_to_chat(8,'----- TP Equipped. -----')
end
end
if spell.skill == 'Elemental Magic' then
if state.EquipBodyAF == 'Amalric Body' then
equip(sets.midcast['Elemental Magic'].HighTierNuke,{body="Amalric Doublet +1"})
end
end
end
function job_aftercast(spell, action, spellMap, eventArgs)
-- Lock feet after using Mana Wall.
if not spell.interrupted then
if spell.english == 'Mana Wall' then
enable('feet')
equip(sets.buff['Mana Wall'])
disable('feet')
end
end
if spell.english == 'Sleep' or spell.english == 'Sleepga' then
send_command('@wait 50;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
send_command('@wait 80;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Break' or spell.english == 'Breakga' then
send_command('@wait 20;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
end
end
-------------------------------------------------------------------------------------------------------------------
-- Customization hooks for idle and melee sets, after they've been automatically constructed.
-------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------
-- General hooks for other events.
-------------------------------------------------------------------------------------------------------------------
-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
-- Unlock feet when Mana Wall buff is lost.
if buff == "Mana Wall" and not gain then
enable('feet')
handle_equipping_gear(player.status)
end
end
-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
if spell.skill == 'Elemental Magic' and default_spell_map ~= 'ElementalEnfeeble' then
if lowTierNukes:contains(spell.english) then
return 'LowTierNuke'
else
return 'HighTierNuke'
end
end
if spell.skill == 'Enfeebling Magic' then
if spell.type == 'WhiteMagic' then
return 'MndEnfeebles'
else
return 'IntEnfeebles'
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Handle notifications of general user state change.
--function job_state_change(stateField, newValue)
if stateField == 'Offense Mode' then
if newValue == 'Normal' then
disable('main','sub')
else
enable('main','sub')
end
elseif stateField == 'Reset' then
if state.OffenseMode == 'None' then
enable('main','sub')
end
end
--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)
local meleeString = ''
if state.OffenseMode == 'Normal' then
meleeString = 'Melee: Weapons locked, '
end
local defenseString = ''
if state.Defense.Active then
local defMode = state.Defense.PhysicalMode
if state.Defense.Type == 'Magical' then
defMode = state.Defense.MagicalMode
end
defenseString = 'Defense: '..state.Defense.Type..' '..defMode..', '
end
add_to_chat(122,meleeString..'Casting ['..state.CastingMode..'], Idle ['..state.IdleMode..'], '..defenseString..
'Kiting: '..on_off_names[state.Kiting])
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
function job_precast(spell, action, spellMap, eventArgs)
if spell.type == 'Cure' then
refine_cure(spell, action, spellMap, eventArgs)
end
end
-- Function to get the custom class to use for nukes.
function get_nuke_class(spell, action, spellMap)
if Impact[spell.english] then
return 'Impact'
end
end
function customize_idle_set(idleSet)
-- if player.tp > 2950 then
-- idleSet = set_combine(idleSet, sets.TPdown)
-- end
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
return idleSet
end
function refine_various_spells(spell, action, spellMap, eventArgs)
aspirs = S{'Aspir','Aspir II','Aspir III'}
sleeps = S{'Sleep II','Sleep'}
sleepgas = S{'Sleepga II','Sleepga'}
nukes = S{'Fire', 'Blizzard', 'Aero', 'Stone', 'Thunder', 'Water',
'Fire II', 'Blizzard II', 'Aero II', 'Stone II', 'Thunder II', 'Water II',
'Fire III', 'Blizzard III', 'Aero III', 'Stone III', 'Thunder III', 'Water III',
'Fire IV', 'Blizzard IV', 'Aero IV', 'Stone IV', 'Thunder IV', 'Water IV',
'Fire V', 'Blizzard V', 'Aero V', 'Stone V', 'Thunder V', 'Water V',
'Fire VI', 'Blizzard VI', 'Aero VI', 'Stone VI', 'Thunder VI', 'Water VI',
'Firaga', 'Blizzaga', 'Aeroga', 'Stonega', 'Thundaga', 'Waterga',
'Firaga II', 'Blizzaga II', 'Aeroga II', 'Stonega II', 'Thundaga II', 'Waterga II',
'Firaga III', 'Blizzaga III', 'Aeroga III', 'Stonega III', 'Thundaga III', 'Waterga III',
'Firaja', 'Blizzaja', 'Aeroja', 'Stoneja', 'Thundaja', 'Waterja',
}
if not sleepgas:contains(spell.english) and not sleeps:contains(spell.english) and not aspirs:contains(spell.english) and not nukes:contains(spell.english) then
return
end
local newSpell = spell.english
local spell_recasts = windower.ffxi.get_spell_recasts()
local cancelling = 'All '..spell.english..' spells are on cooldown. Cancelling spell casting.'
if spell_recasts[spell.recast_id] > 0 then
if aspirs:contains(spell.english) then
if spell.english == 'Aspir' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
elseif spell.english == 'Aspir II' then
newSpell = 'Aspir'
elseif spell.english == 'Aspir III' then
newSpell = 'Aspir II'
end
elseif sleeps:contains(spell.english) then
if spell.english == 'Sleep' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
elseif spell.english == 'Sleep II' then
newSpell = 'Sleep'
end
elseif sleepgas:contains(spell.english) then
if spell.english == 'Sleepga' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
elseif spell.english == 'Sleepga II' then
newSpell = 'Sleepga'
end
elseif nukes:contains(spell.english) then
if spell.english == 'Fire' then
eventArgs.cancel = true
return
elseif spell.english == 'Fire VI' then
newSpell = 'Fire V'
elseif spell.english == 'Fire IV' then
newSpell = 'Fire III'
elseif spell.english == 'Fire II' then
newSpell = 'Fire'
elseif spell.english == 'Firaja' then
newSpell = 'Firaga III'
elseif spell.english == 'Firaga II' then
newSpell = 'Firaga'
end
if spell.english == 'Blizzard' then
eventArgs.cancel = true
return
elseif spell.english == 'Blizzard VI' then
newSpell = 'Blizzard V'
elseif spell.english == 'Blizzard IV' then
newSpell = 'Blizzard III'
elseif spell.english == 'Blizzard II' then
newSpell = 'Blizzard'
elseif spell.english == 'Blizzaja' then
newSpell = 'Blizzaga III'
elseif spell.english == 'Blizzaga II' then
newSpell = 'Blizzaga'
end
if spell.english == 'Aero' then
eventArgs.cancel = true
return
elseif spell.english == 'Aero VI' then
newSpell = 'Aero V'
elseif spell.english == 'Aero IV' then
newSpell = 'Aero III'
elseif spell.english == 'Aero II' then
newSpell = 'Aero'
elseif spell.english == 'Aeroja' then
newSpell = 'Aeroga III'
elseif spell.english == 'Aeroga II' then
newSpell = 'Aeroga'
end
if spell.english == 'Stone' then
eventArgs.cancel = true
return
elseif spell.english == 'Stone VI' then
newSpell = 'Stone V'
elseif spell.english == 'Stone IV' then
newSpell = 'Stone III'
elseif spell.english == 'Stone II' then
newSpell = 'Stone'
elseif spell.english == 'Stoneja' then
newSpell = 'Stonega III'
elseif spell.english == 'Stonega II' then
newSpell = 'Stonega'
end
if spell.english == 'Thunder' then
eventArgs.cancel = true
return
elseif spell.english == 'Thunder VI' then
newSpell = 'Thunder V'
elseif spell.english == 'Thunder IV' then
newSpell = 'Thunder III'
elseif spell.english == 'Thunder II' then
newSpell = 'Thunder'
elseif spell.english == 'Thundaja' then
newSpell = 'Thundaga III'
elseif spell.english == 'Thundaga II' then
newSpell = 'Thundaga'
end
if spell.english == 'Water' then
eventArgs.cancel = true
return
elseif spell.english == 'Water VI' then
newSpell = 'Water V'
elseif spell.english == 'Water IV' then
newSpell = 'Water III'
elseif spell.english == 'Water II' then
newSpell = 'Water'
elseif spell.english == 'Waterja' then
newSpell = 'Waterga III'
elseif spell.english == 'Waterga II' then
newSpell = 'Waterga'
end
end
end
if newSpell ~= spell.english then
send_command('@input /ma "'..newSpell..'" '..tostring(spell.target.raw))
eventArgs.cancel = true
return
end
end
function job_precast(spell, action, spellMap, eventArgs)
refine_various_spells(spell, action, spellMap, eventArgs)
end
By Isilrhofal 2016-03-08 17:14:07
How about something like this?
you would still need to change my MB stuff (which doesn't work yet as I want it to):
Quote: if state.MagicBurst == "tmp" or state.MagicBurst == "Perma" then
Hello, I tried to work with your code to have what i want (equip or not the AF body). It seems that doesn't work :/
Maybe i wrote something false, or i miss something, i'm a noob on coding^^ -- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------
-- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.
-- 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.
function job_setup()
end
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
-- Options: Override default values
state.OffenseMode:options('Normal', 'None')
state.CastingMode:options('Normal', 'MagicBurst')
state.EquipBodyAF:options('BodyAF', 'AmalricBody')
state.IdleMode:options('Normal', 'PDT')
state.PhysicalDefenseMode:options('PDT')
state.MagicalDefenseMode:options('MDT')
state.MagicBurst = M(false, 'Magic Burst')
lowTierNukes = S{'Stone', 'Water', 'Aero', 'Fire', 'Blizzard', 'Thunder',
'Stone II', 'Water II', 'Aero II', 'Fire II', 'Blizzard II', 'Thunder II',
'Stone III', 'Water III', 'Aero III', 'Fire III', 'Blizzard III', 'Thunder III',
'Stonega', 'Waterga', 'Aeroga', 'Firaga', 'Blizzaga', 'Thundaga',
'Stonega II', 'Waterga II', 'Aeroga II', 'Firaga II', 'Blizzaga II', 'Thundaga II'}
-- Default macro set/book
set_macro_page(8, 4)
end
-- Called when this job file is unloaded (eg: job change)
function file_unload()
if binds_on_unload then
binds_on_unload()
end
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
sets.lockstyle = {main={ name="Lathi", augments={'MP+80','INT+20','"Mag.Atk.Bns."+20',}},
sub="Niobid Strap",
ammo="Strobilus",
head={ name="Amalric Coif +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
body={ name="Amalric Doublet +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
hands={ name="Amalric Gages +1", augments={'INT+12','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
legs={ name="Amalric Slops +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
feet={ name="Amalric Nails +1", augments={'Mag. Acc.+20','"Mag.Atk.Bns."+20','"Conserve MP"+7',}},
neck="Twilight Torque",
waist="Fucho-no-Obi",
left_ear="Etiolation Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Defending Ring",
right_ring="Mephitas's Ring +1",
back={ name="Bane Cape", augments={'Elem. magic skill +9','Dark magic skill +7','"Mag.Atk.Bns."+3',}},}
---- Precast Sets ----
-- Precast sets to enhance JAs
sets.precast.JA['Mana Wall'] = {feet="Wicce Sabots +1"}
sets.precast.JA.Manafont = {body="Archmage's Coat +1"}
-- equip to maximize HP (for Tarus) and minimize MP loss before using convert
sets.precast.JA.Convert = {}
-- Fast cast sets for spells
sets.precast.FC = {
head={name="Amalric Coif +1", priority=1},neck={name="Orunmila's Torque", priority=3},ear1="Etiolation Earring",ear2="Loquacious Earring",hands={ name="Merlinic Dastanas", augments={'Mag. Acc.+4','"Fast Cast"+7','"Mag.Atk.Bns."+12',}},waist="Witful Belt",body={ name="Merlinic Jubbah", augments={'Mag. Acc.+21','"Fast Cast"+7','CHR+1','"Mag.Atk.Bns."+14',}},back="Perimede Cape",ammo="Impatiens",
ring1={name="Lebeche Ring", priority=4},ring2="Rahab Ring",
legs={name="Psycloth Lappas", priority=2},feet={ name="Merlinic Crackows", augments={'Mag. Acc.+21','"Fast Cast"+7','INT+2',}}}
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {ear2="Barkarole Earring"})
sets.precast.FC.Death = set_combine(sets.precast.FC, {ear2="Barkarole Earring",ring1="Rahab Ring",Ring2={name="Mephitas's Ring +1", priority=4}})
sets.precast.FC.Cure = set_combine(sets.precast.FC, {head={name="Amalric Coif +1", priority=1},hands="Vanya Cuffs",back={name="Pahtli Cape", priority=2},legs="Vanya Slops",feet="Vanya Clogs",ear1="Etiolation Earring",ear2="Mendicant's Earring",neck="Orunmila's Torque",waist="Acerbic sash +1",ammo="Strobilus"})
sets.precast.FC.Curaga = sets.precast.FC.Cure
sets.precast.FC.Impact = set_combine(sets.precast.FC, {ring1="Prolix Ring",ammo="Sapience Orb",ear1="Enchanter Earring +1",back="Swith Cape +1",head=empty,body="Twilight Cloak"})
sets.precast.FC.Stoneskin = set_combine(sets.precast.FC['Enhancing Magic'], {hands="Carapacho Cuffs",legs={name="Psycloth Lappas", priority=1},ring1={name="Lebeche Ring", priority=2}})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {ammo="Pemphredo Tathlum",
head="Hagondes Hat +1",neck="Mizukage-no-Kubikazari",ear1="Crematio Earring",ear2="Friomisi Earring",
body="Amalric Doublet +1",hands="Amalric Gages +1",ring1="Shiva Ring +1",ring2="Shiva Ring +1",
back="Bane Cape",waist="Yamabuki-no-obi",legs="Hagondes Pants +1",feet={ name="Merlinic Crackows", augments={'Mag. Acc.+23 "Mag.Atk.Bns."+23','INT+8','Mag. Acc.+14','"Mag.Atk.Bns."+14',}}}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Myrkr'] = {ammo="Strobilus",
head="Amalric Coif +1",neck="Dualism Collar +1",ear1="Etiolation Earring",ear2="Influx Earring",
body="Weatherspoon robe +1",hands="Otomi Gloves",ring1="Mephitas's Ring +1",ring2="Mephitas's Ring",
back="Bane Cape",waist="Shinjutsu-no-obi +1",legs="Amalric Slops +1",feet="Psycloth Boots"}
sets.precast.WS['Vidohunir'] = {ammo="Pemphredo Tathlum",
head="Pixie Hairpin +1",neck="Mizukage-no-Kubikazari",ear1="Friomisi Earring",ear2="Barkarole Earring",
body="Amalric Doublet +1",hands="Amalric Gages +1",ring1="Archon Ring",ring2="Shiva Ring +1",
back="Toro Cape",waist="Yamabuki-no-obi",legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','Magic burst mdg.+3%','INT+15','Mag. Acc.+6','"Mag.Atk.Bns."+12',}},feet={ name="Merlinic Crackows", augments={'Mag. Acc.+23 "Mag.Atk.Bns."+23','INT+8','Mag. Acc.+14','"Mag.Atk.Bns."+14',}},}
---- Midcast Sets ----
sets.midcast.FastRecast = {
head="Amalric Coif +1",ammo="Impatiens",ear1="Etiolation Earring",ear2="Loquacious Earring",
body="Amalric Doublet +1",hands="Otomi Gloves",ring1="Lebeche Ring",
back="Perimede Cape",waist="Cetl Belt",legs="Psycloth Lappas",feet="Battlecast gaiters"}
sets.midcast.Cure = {ammo="Strobilus",
head="Vanya Hood",neck="Phalaina Locket",ear1="Roundel Earring",ear2="Mendicant's Earring",
body="Vrikodara Jupon",hands="Vanya Cuffs",ring1="Lebeche ring",ring2={name="Mephitas's Ring +1", priority=1},
back="Solemnity Cape",waist={name="Shinjutsu-no-Obi +1", priority=2},legs="Vanya Slops",feet="Vanya Clogs"}
sets.self_healing = {ammo={name="Strobilus", priority=3},
head="Vanya Hood",neck="Phalaina Locket",ear1="Roundel Earring",ear2="Mendicant's Earring",
body="Vrikodara Jupon",hands={name="Otomi Gloves", priority=2},ring1="Asklepian ring",ring2="Kunaji Ring",
back="Solemnity Cape",waist="Gishdubar Sash",legs={name="Psycloth Lappas", priority=1},feet="Medium's Sabots"}
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast['Enhancing Magic'] = {
head="Telchine Cap",ear1={name="Etiolation Earring", priority=4},ear2="Andoaa Earring",ammo="Strobilus",
neck="Incanter's Torque",body="Telchine Chasuble",ring1={name="mephitas's ring", priority=2},ring2={name="mephitas's ring +1", priority=1},
back={name="Fi Follet Cape +1", priority=3},hands="Telchine Gloves",waist="Olympus Sash",
legs="Telchine Braconi",feet="Telchine Pigaches"}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {hands={name="Otomi Gloves", priority=3},back={name="Fi Follet Cape +1", priority=4},neck="Stone Gorget",ear1="Earthcry Earring",legs="Shedir Seraweels",waist="Siegel Sash",ring1={name="mephitas's ring", priority=2},ring2={name="mephitas's ring +1", priority=1}})
sets.midcast.Aquaveil = set_combine(sets.midcast['Enhancing Magic'], {head="Amalric Coif +1",waist="Emphatikos Rope",legs="Shedir Seraweels"})
sets.midcast.Refresh = set_combine(sets.midcast.Aquaveil, {head="Amalric Coif +1",Body="Telchine Chasuble",hands="Telchine Gloves",legs="Telchine Braconi",waist="Gishdubar Sash",feet="Telchine Pigaches"})
sets.midcast.Haste = set_combine(sets.midcast.Aquaveil, {head="Telchine Cap",Body="Telchine Chasuble",hands="Telchine Gloves",legs="Telchine Braconi",feet="Telchine Pigaches"})
sets.midcast.MndEnfeebles = {ammo="Quartz Tathlum +1",
head="Befouled Crown",neck="Incanter's Torque",ear1="Dignitary's Earring",ear2="Barkarole Earring",
body="Vanya Robe",hands="Lurid Mitts",ring1={name="Sangoma Ring", priority=2},ring2="Globidonta Ring",
back="Altruistic Cape",waist="Rumination sash",legs={name="Psycloth Lappas", priority=1},feet={name="Medium's Sabots", priority=3}}
sets.midcast.IntEnfeebles = sets.midcast.MndEnfeebles
sets.midcast['Dark Magic'] = {ammo="Pemphredo Tathlum",
head="Amalric Coif +1",neck="Incanter's Torque",ear1="Dark Earring",ear2="Barkarole Earring",
body="Psycloth Vest",hands="Archmage's Gloves +1",ring1="Archon Ring",ring2="Evanescence Ring",
back={name="Bane Cape", priority=2},waist="Cetl Belt",legs="Spaekona's Tonban +1",feet="Wicce Sabots +1"}
sets.midcast.Drain = {ammo="Strobilus",
head="Pixie Hairpin +1",neck="Incanter's Torque",ear1="Hirudinea Earring",ear2="Barkarole Earring",
body="Psycloth Vest",hands={ name="Merlinic Dastanas", augments={'Mag. Acc.+12','"Drain" and "Aspir" potency +11','"Mag.Atk.Bns."+7',}},ring1="Archon Ring",ring2="Evanescence Ring",
back={name="Bane Cape", priority=1},waist="Fucho-no-obi",legs="Spaekona's Tonban +1",feet="Wicce Sabots +1"}
sets.midcast.Aspir = sets.midcast.Drain
sets.midcast['Aspir III'] = sets.midcast.Drain
-- Elemental Magic sets are default for handling low-tier nukes.
sets.midcast['Elemental Magic'] = {ammo="Dosis Tathlum",
head={ name="Merlinic Hood", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','INT+10','Mag. Acc.+5','"Mag.Atk.Bns."+14',}},neck="Sanctity Necklace",ear1="Friomisi Earring",ear2="Crematio Earring",
body={name="Amalric Doublet +1", priority=1},hands="Amalric Gages +1",ring1="Shiva Ring +1",ring2="Shiva Ring +1",
back={name="Bane Cape", priority=2},waist="Yamabuki-no-obi",legs={name="Amalric Slops +1", priority=2},feet="Amalric Nails +1"}
sets.midcast['Elemental Magic'].MagicBurst = {ammo="Pemphredo Tathlum",
head={ name="Merlinic Hood", augments={'Mag. Acc.+19 "Mag.Atk.Bns."+19','Magic burst mdg.+5%','INT+15','Mag. Acc.+6',}},neck="Mizukage-no-Kubikazari",ear1="Friomisi Earring",ear2="Barkarole Earring",
body={name="Amalric Doublet +1", priority=1},hands="Amalric Gages +1",ring1="Shiva Ring +1",ring2="Mujin Band",
back="Seshaw Cape +1",waist="Yamabuki-no-obi",legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic burst mdg.+9%','INT+13','Mag. Acc.+1',}},feet={ name="Merlinic Crackows", augments={'Mag. Acc.+16 "Mag.Atk.Bns."+16','Magic burst mdg.+8%','INT+10','"Mag.Atk.Bns."+12',}}}
sets.midcast['Elemental Magic'].HighTierNuke = set_combine( sets.midcast['Elemental Magic'], {feet={ name="Merlinic Crackows", augments={'Mag. Acc.+23 "Mag.Atk.Bns."+23','INT+8','Mag. Acc.+14','"Mag.Atk.Bns."+14',}},head={ name="Merlinic Hood", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','INT+10','Mag. Acc.+5','"Mag.Atk.Bns."+14',}},body="Spaekona's Coat +1",waist="Yamabuki-no-obi",neck="Mizukage-no-Kubikazari",ammo="Pemphredo Tathlum",back="Toro Cape",legs="Amalric Slops +1",ear2="Barkarole Earring"} )
sets.midcast['Elemental Magic'].HighTierNuke.MagicBurst = set_combine( sets.midcast['Elemental Magic'].HighTierNuke, {body="Amalric Doublet +1",feet={ name="Merlinic Crackows", augments={'Mag. Acc.+16 "Mag.Atk.Bns."+16','Magic burst mdg.+8%','INT+10','"Mag.Atk.Bns."+12',}},head={ name="Merlinic Hood", augments={'Mag. Acc.+19 "Mag.Atk.Bns."+19','Magic burst mdg.+5%','INT+15','Mag. Acc.+6',}},ammo="Pemphredo Tathlum",ear1="Friomisi Earring",back="Seshaw Cape +1",ring1="Shiva Ring +1",Ring2="Mujin Band",legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic burst mdg.+9%','INT+13','Mag. Acc.+1',}}} )
sets.midcast.Impact = {
ammo="Seraphic Ampulla",
head=empty,
body="Twilight Cloak",
hands={ name="Helios Gloves", augments={'"Mag.Atk.Bns."+24','"Occult Acumen"+10','INT+7 MND+7',}},
legs="Perdition Slops",
feet={ name="Helios Boots", augments={'Pet: Attack+26 Pet: Rng.Atk.+26','"Occult Acumen"+7',}},
neck="Gaudryi Necklace",
waist="Oneiros Rope",
left_ear="Dedition Earring",
right_ear="Tripudio Earring",
left_ring="K'ayres Ring",
right_ring="Rajas Ring",
back="Toro Cape",}
sets.midcast.Impact.MagicBurst = sets.midcast.Impact
sets.midcast.Meteor = {ammo="Pemphredo Tathlum",
head={ name="Merlinic Hood", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','INT+10','Mag. Acc.+5','"Mag.Atk.Bns."+14',}},neck="Mizukage-no-Kubikazari",ear1="Friomisi Earring",ear2="Barkarole Earring",
body="Amalric Doublet +1",hands="Amalric Gages +1",ring1="Shiva Ring +1",ring2="Shiva Ring +1",
back="Toro Cape",waist="Yamabuki-no-obi",legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','Magic burst mdg.+3%','INT+15','Mag. Acc.+6','"Mag.Atk.Bns."+12',}},feet={ name="Merlinic Crackows", augments={'Mag. Acc.+23 "Mag.Atk.Bns."+23','INT+8','Mag. Acc.+14','"Mag.Atk.Bns."+14',}}}
sets.midcast.Comet = {ammo="Pemphredo Tathlum",
head="Pixie Hairpin +1",neck="Mizukage-no-Kubikazari",ear1="Friomisi Earring",ear2="Barkarole Earring",
body="Spaekona's Coat +1",hands="Amalric Gages +1",ring1="Archon Ring",ring2="Shiva Ring +1",
back="Toro Cape",waist="Yamabuki-no-obi",legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','Magic burst mdg.+3%','INT+15','Mag. Acc.+6','"Mag.Atk.Bns."+12',}},feet={ name="Merlinic Crackows", augments={'Mag. Acc.+23 "Mag.Atk.Bns."+23','INT+8','Mag. Acc.+14','"Mag.Atk.Bns."+14',}}}
sets.midcast.Comet.MagicBurst = {ammo="Pemphredo Tathlum",
head="Pixie Hairpin +1",neck="Mizukage-no-Kubikazari",ear1="Static Earring",ear2="Barkarole Earring",
body="Spaekona's Coat +1",hands="Amalric Gages +1",ring1="Archon Ring",ring2="Mujin Band",
back="Seshaw Cape +1",waist="Yamabuki-no-obi",legs="Wicce Chausses +1",feet={ name="Merlinic Crackows", augments={'Mag. Acc.+16 "Mag.Atk.Bns."+16','Magic burst mdg.+8%','INT+10','"Mag.Atk.Bns."+12',}}}
sets.midcast.Death = set_combine( sets.midcast.Comet, {body="Amalric Doublet +1",legs="Amalric Slops +1"})
sets.midcast.Death.MagicBurst = set_combine( sets.midcast.Comet.MagicBurst, {body={name="Amalric Doublet +1", priority=1},legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic burst mdg.+9%','INT+13','Mag. Acc.+1',}}})
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {ammo="Strobilus",
head="Amalric Coif +1",neck="Dualism Collar +1",ear1="Etiolation Earring",ear2="Influx Earring",
body="Amalric Doublet +1",hands="Serpentes Cuffs",ring1="Sangoma Ring",ring2="Mephitas's Ring",
waist="Shinjutsu-no-obi +1",legs="Assiduity Pants +1",feet="Serpentes Sabots"}
-- Idle sets
-- Normal refresh idle set
sets.idle = {ammo="Strobilus",
head="Befouled Crown",neck="Twilight Torque",ear1={name="Etiolation Earring", priority=3},ear2="Moonshade Earring",
body={name="Amalric Doublet +1", priority=1},hands="Shrieker's Cuffs",ring1="Defending ring",ring2="Mephitas's Ring +1",
back="Bane Cape",waist={name="Shinjutsu-no-obi +1", priority=2},legs="Assiduity Pants +1",feet="Crier's Gaiters"}
-- Idle mode that keeps PDT gear on, but doesn't prevent normal gear swaps for precast/etc.
sets.idle.PDT = {
ammo="Strobilus",
head={ name="Merlinic Hood", augments={'Mag. Acc.+21 "Mag.Atk.Bns."+21','Phys. dmg. taken -4%',}},
body={ name="Merlinic Jubbah", augments={'Mag. Acc.+22','Phys. dmg. taken -2%',}},
hands={ name="Merlinic Dastanas", augments={'"Mag.Atk.Bns."+24','Phys. dmg. taken -4%','CHR+13',}},
legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+19','Damage taken-3%','MND+6',}},
feet={ name="Merlinic Crackows", augments={'Phys. dmg. taken -4%','CHR+3','Mag. Acc.+3','"Mag.Atk.Bns."+4',}},
neck="Twilight Torque",
waist="Shinjutsu-no-Obi +1",
left_ear="Etiolation Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Defending Ring",
right_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Magic dmg. taken -6%',}},
back="Umbra Cape",}
-- Idle mode scopes:
-- Idle mode when weak.
sets.idle.Weak = {ammo="Strobilus",
head="Befouled Crown",neck="Dualism Collar +1",ear1="Etiolation Earring",ear2="Moonshade Earring",
body="Amalric Doublet +1",hands="Otomi Gloves",ring1="Mephitas's Ring +1",ring2="Mephitas's Ring",
back="Bane Cape",waist="Shinjutsu-no-obi +1",legs="Assiduity Pants +1",feet="Psycloth Boots"}
-- Town gear.
sets.idle.Town = {main={ name="Lathi", augments={'MP+80','INT+20','"Mag.Atk.Bns."+20',}},
sub="Thrace Strap",
ammo="Pemphredo Tathlum",
head={ name="Amalric Coif +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
body="Amalric Doublet +1",
hands={ name="Amalric Gages +1", augments={'INT+12','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
legs="Amalric Slops +1",
feet="Crier's Gaiters",
neck="Incanter's Torque",
waist="Hachirin-no-Obi",
left_ear="Etiolation Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Defending Ring",
right_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Magic dmg. taken -6%',}},
back="Seshaw Cape +1"}
-- Defense sets
sets.defense.PDT = {}
sets.defense.MDT = {}
sets.Kiting = {feet="Crier's Gaiters"}
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Mana Wall'] = {feet="Wicce Sabots +1"}
sets.TPdown = {neck="Chrysopoeia torque"}
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 = {
ammo="Strobilus",
head={ name="Amalric Coif +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
body={ name="Merlinic Jubbah", augments={'Mag. Acc.+22','Phys. dmg. taken -2%',}},
hands={ name="Merlinic Dastanas", augments={'"Mag.Atk.Bns."+24','Phys. dmg. taken -4%','CHR+13',}},
legs={ name="Amalric Slops +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
feet={ name="Merlinic Crackows", augments={'Phys. dmg. taken -4%','CHR+3','Mag. Acc.+3','"Mag.Atk.Bns."+4',}},
neck="Dualism Collar +1",
waist="Shinjutsu-no-Obi +1",
left_ear="Bladeborn Earring",
right_ear="Steelflash Earring",
left_ring="Defending Ring",
right_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Magic dmg. taken -6%',}},
back="Umbra 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 spellMap == 'Cure' or spellMap == 'Curaga' then
gear.default.obi_waist = "Goading Belt"
elseif spell.skill == 'Elemental Magic' then
gear.default.obi_waist = "Sekhmet Corset"
if state.CastingMode.value == 'Proc' then
classes.CustomClass = 'Proc'
end
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)
end
-- 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)
if spellMap == 'Cure' and spell.target.type == 'SELF' and sets.self_healing then
equip(sets.self_healing)
end
if spell.skill == 'Elemental Magic' then
if spell.element == world.day_element or spell.element == world.weather_element then
equip({waist="Hachirin-No-Obi"})
add_to_chat(8,'----- Obi Equipped. -----')
end
end
if spell.skill == 'Elemental Magic' and spell.name == 'Impact' then
if spell.element == world.day_element or spell.element == world.weather_element then
equip({waist="Oneiros Rope"})
add_to_chat(8,'----- TP Equipped. -----')
end
end
if spell.skill == 'Elemental Magic' then
if state.EquipBodyAF == 'Amalric Body' then
equip(sets.midcast['Elemental Magic'].HighTierNuke,{body="Amalric Doublet +1"})
end
end
end
function job_aftercast(spell, action, spellMap, eventArgs)
-- Lock feet after using Mana Wall.
if not spell.interrupted then
if spell.english == 'Mana Wall' then
enable('feet')
equip(sets.buff['Mana Wall'])
disable('feet')
end
end
if spell.english == 'Sleep' or spell.english == 'Sleepga' then
send_command('@wait 50;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
send_command('@wait 80;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Break' or spell.english == 'Breakga' then
send_command('@wait 20;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
end
end
-------------------------------------------------------------------------------------------------------------------
-- Customization hooks for idle and melee sets, after they've been automatically constructed.
-------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------
-- General hooks for other events.
-------------------------------------------------------------------------------------------------------------------
-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
-- Unlock feet when Mana Wall buff is lost.
if buff == "Mana Wall" and not gain then
enable('feet')
handle_equipping_gear(player.status)
end
end
-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
if spell.skill == 'Elemental Magic' and default_spell_map ~= 'ElementalEnfeeble' then
if lowTierNukes:contains(spell.english) then
return 'LowTierNuke'
else
return 'HighTierNuke'
end
end
if spell.skill == 'Enfeebling Magic' then
if spell.type == 'WhiteMagic' then
return 'MndEnfeebles'
else
return 'IntEnfeebles'
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Handle notifications of general user state change.
--function job_state_change(stateField, newValue)
if stateField == 'Offense Mode' then
if newValue == 'Normal' then
disable('main','sub')
else
enable('main','sub')
end
elseif stateField == 'Reset' then
if state.OffenseMode == 'None' then
enable('main','sub')
end
end
--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)
local meleeString = ''
if state.OffenseMode == 'Normal' then
meleeString = 'Melee: Weapons locked, '
end
local defenseString = ''
if state.Defense.Active then
local defMode = state.Defense.PhysicalMode
if state.Defense.Type == 'Magical' then
defMode = state.Defense.MagicalMode
end
defenseString = 'Defense: '..state.Defense.Type..' '..defMode..', '
end
add_to_chat(122,meleeString..'Casting ['..state.CastingMode..'], Idle ['..state.IdleMode..'], '..defenseString..
'Kiting: '..on_off_names[state.Kiting])
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
function job_precast(spell, action, spellMap, eventArgs)
if spell.type == 'Cure' then
refine_cure(spell, action, spellMap, eventArgs)
end
end
-- Function to get the custom class to use for nukes.
function get_nuke_class(spell, action, spellMap)
if Impact[spell.english] then
return 'Impact'
end
end
function customize_idle_set(idleSet)
-- if player.tp > 2950 then
-- idleSet = set_combine(idleSet, sets.TPdown)
-- end
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
return idleSet
end
function refine_various_spells(spell, action, spellMap, eventArgs)
aspirs = S{'Aspir','Aspir II','Aspir III'}
sleeps = S{'Sleep II','Sleep'}
sleepgas = S{'Sleepga II','Sleepga'}
nukes = S{'Fire', 'Blizzard', 'Aero', 'Stone', 'Thunder', 'Water',
'Fire II', 'Blizzard II', 'Aero II', 'Stone II', 'Thunder II', 'Water II',
'Fire III', 'Blizzard III', 'Aero III', 'Stone III', 'Thunder III', 'Water III',
'Fire IV', 'Blizzard IV', 'Aero IV', 'Stone IV', 'Thunder IV', 'Water IV',
'Fire V', 'Blizzard V', 'Aero V', 'Stone V', 'Thunder V', 'Water V',
'Fire VI', 'Blizzard VI', 'Aero VI', 'Stone VI', 'Thunder VI', 'Water VI',
'Firaga', 'Blizzaga', 'Aeroga', 'Stonega', 'Thundaga', 'Waterga',
'Firaga II', 'Blizzaga II', 'Aeroga II', 'Stonega II', 'Thundaga II', 'Waterga II',
'Firaga III', 'Blizzaga III', 'Aeroga III', 'Stonega III', 'Thundaga III', 'Waterga III',
'Firaja', 'Blizzaja', 'Aeroja', 'Stoneja', 'Thundaja', 'Waterja',
}
if not sleepgas:contains(spell.english) and not sleeps:contains(spell.english) and not aspirs:contains(spell.english) and not nukes:contains(spell.english) then
return
end
local newSpell = spell.english
local spell_recasts = windower.ffxi.get_spell_recasts()
local cancelling = 'All '..spell.english..' spells are on cooldown. Cancelling spell casting.'
if spell_recasts[spell.recast_id] > 0 then
if aspirs:contains(spell.english) then
if spell.english == 'Aspir' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
elseif spell.english == 'Aspir II' then
newSpell = 'Aspir'
elseif spell.english == 'Aspir III' then
newSpell = 'Aspir II'
end
elseif sleeps:contains(spell.english) then
if spell.english == 'Sleep' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
elseif spell.english == 'Sleep II' then
newSpell = 'Sleep'
end
elseif sleepgas:contains(spell.english) then
if spell.english == 'Sleepga' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
elseif spell.english == 'Sleepga II' then
newSpell = 'Sleepga'
end
elseif nukes:contains(spell.english) then
if spell.english == 'Fire' then
eventArgs.cancel = true
return
elseif spell.english == 'Fire VI' then
newSpell = 'Fire V'
elseif spell.english == 'Fire IV' then
newSpell = 'Fire III'
elseif spell.english == 'Fire II' then
newSpell = 'Fire'
elseif spell.english == 'Firaja' then
newSpell = 'Firaga III'
elseif spell.english == 'Firaga II' then
newSpell = 'Firaga'
end
if spell.english == 'Blizzard' then
eventArgs.cancel = true
return
elseif spell.english == 'Blizzard VI' then
newSpell = 'Blizzard V'
elseif spell.english == 'Blizzard IV' then
newSpell = 'Blizzard III'
elseif spell.english == 'Blizzard II' then
newSpell = 'Blizzard'
elseif spell.english == 'Blizzaja' then
newSpell = 'Blizzaga III'
elseif spell.english == 'Blizzaga II' then
newSpell = 'Blizzaga'
end
if spell.english == 'Aero' then
eventArgs.cancel = true
return
elseif spell.english == 'Aero VI' then
newSpell = 'Aero V'
elseif spell.english == 'Aero IV' then
newSpell = 'Aero III'
elseif spell.english == 'Aero II' then
newSpell = 'Aero'
elseif spell.english == 'Aeroja' then
newSpell = 'Aeroga III'
elseif spell.english == 'Aeroga II' then
newSpell = 'Aeroga'
end
if spell.english == 'Stone' then
eventArgs.cancel = true
return
elseif spell.english == 'Stone VI' then
newSpell = 'Stone V'
elseif spell.english == 'Stone IV' then
newSpell = 'Stone III'
elseif spell.english == 'Stone II' then
newSpell = 'Stone'
elseif spell.english == 'Stoneja' then
newSpell = 'Stonega III'
elseif spell.english == 'Stonega II' then
newSpell = 'Stonega'
end
if spell.english == 'Thunder' then
eventArgs.cancel = true
return
elseif spell.english == 'Thunder VI' then
newSpell = 'Thunder V'
elseif spell.english == 'Thunder IV' then
newSpell = 'Thunder III'
elseif spell.english == 'Thunder II' then
newSpell = 'Thunder'
elseif spell.english == 'Thundaja' then
newSpell = 'Thundaga III'
elseif spell.english == 'Thundaga II' then
newSpell = 'Thundaga'
end
if spell.english == 'Water' then
eventArgs.cancel = true
return
elseif spell.english == 'Water VI' then
newSpell = 'Water V'
elseif spell.english == 'Water IV' then
newSpell = 'Water III'
elseif spell.english == 'Water II' then
newSpell = 'Water'
elseif spell.english == 'Waterja' then
newSpell = 'Waterga III'
elseif spell.english == 'Waterga II' then
newSpell = 'Waterga'
end
end
end
if newSpell ~= spell.english then
send_command('@input /ma "'..newSpell..'" '..tostring(spell.target.raw))
eventArgs.cancel = true
return
end
end
function job_precast(spell, action, spellMap, eventArgs)
refine_various_spells(spell, action, spellMap, eventArgs)
end
Based on my testing this triggers your Body change.
Changes:
user_setup
state.EquipBodyAF = M{['description']='Body', 'BodyAF', 'AmalricBody'}
-- removed the options as it seems that this tries to use vars from the mote-include.lua and changed it to a custom variable.
-- Changing the part 'Body' will change the description
job_post_midcast
if state.EquipBodyAF.value == 'AmalricBody' then
-- changed value (no space), and added the .value
Hope that works for you :D
Edit: And the link to the pastebin....(Bit easier to read)
http://pastebin.com/ucFmTkeG
Carbuncle.Doryll
Server: Carbuncle
Game: FFXI
By Carbuncle.Doryll 2016-03-09 03:13:03
Thanks a lot !!! That's really great now !
Sylph.Mozhat
Server: Sylph
Game: FFXI
Posts: 58
By Sylph.Mozhat 2016-03-09 13:03:51
I have a question about smn "sets.midcast.Pet."
On the function user_setup(),
what state."NAME"Mode:options('None', 'PhyAcc', 'MagAcc')
would you use to toggle the sets.midcast.Pet.?
This lua uses mote_include_version = 2.
There's no miscast.set in the event section.
-- Custom spell mapping.
function job_get_spell_map(spell)
if spell.type == 'BloodPactRage' then
if magicalRagePacts:contains(spell.english) then
return 'MagicalBloodPactRage'
else
return 'PhysicalBloodPactRage'
end
elseif spell.type == 'BloodPactWard' and spell.target.type == 'MONSTER' then
return 'DebuffBloodPactWard'
end
end
Can anyone help me with this?
I want to make a midcast pet ACC sets for phy and magical on the 135-145 lv. content.
Since no one will help here,
The toggles on this lua are
gs c pact [PactType]
Attempts to use the indicated pact type for the current avatar.
PactType can be one of:
cure
curaga
buffOffense
buffDefense
buffSpecial
debuff1
debuff2
sleep
nuke2
nuke4
bp70
bp75 (merits and lvl 75-80 pacts)
astralflow
How do you toggle JAs or how would you make a JA toggle
Keep in mind BloodPacks are JAs
This SMN lua has
sets.midcast.Pet.DebuffBloodPactWard.Acc = sets.midcast.Pet.DebuffBloodPactWard
&
sets.midcast.Pet.MagicalBloodPactRage.Acc = sets.midcast.Pet.MagicalBloodPactRage
on it, but I have not seen anywhere, where to make this work, on the smn lua or the libs folder.
Plz help
By BilunSalaes 2016-03-10 07:43:21
I did a quick search but didn't find it. I also went to the google and didn't find it. So, would someone post a few lines for Corsair that will swap to our Empy AF3 chest piece when triple shot is active, and our other item of choice when it's not? Thank you.
If it exists, I'm sorry I didn't find it. What I found when I googled was an updated gearswap that was specifically missing this component.
By dustinfoley 2016-03-11 08:46:11
I did a quick search but didn't find it. I also went to the google and didn't find it. So, would someone post a few lines for Corsair that will swap to our Empy AF3 chest piece when triple shot is active, and our other item of choice when it's not? Thank you.
If it exists, I'm sorry I didn't find it. What I found when I googled was an updated gearswap that was specifically missing this component.
This is the modified version i of equiping the adoulin neck from the previous page.
(Assuming you want it locked) Put in your "buff_change" event
Code --Auto put Empy body on with ts active
if buff == "Triple Shot" then
if gain then
equip({Body="BLAHBLAHBLAH"})
disable('body')
else
enable('body')
end
end
By BilunSalaes 2016-03-11 14:13:05
I did a quick search but didn't find it. I also went to the google and didn't find it. So, would someone post a few lines for Corsair that will swap to our Empy AF3 chest piece when triple shot is active, and our other item of choice when it's not? Thank you.
If it exists, I'm sorry I didn't find it. What I found when I googled was an updated gearswap that was specifically missing this component.
This is the modified version i of equiping the adoulin neck from the previous page.
(Assuming you want it locked) Put in your "buff_change" event
Code --Auto put Empy body on with ts active
if buff == "Triple Shot" then
if gain then
equip({Body="BLAHBLAHBLAH"})
disable('body')
else
enable('body')
end
end
I will try this tonight when I get home. Thank you.
Carbuncle.Doryll
Server: Carbuncle
Game: FFXI
By Carbuncle.Doryll 2016-03-11 17:10:49
How about something like this?
you would still need to change my MB stuff (which doesn't work yet as I want it to):
Quote: if state.MagicBurst == "tmp" or state.MagicBurst == "Perma" then
Hello, I tried to work with your code to have what i want (equip or not the AF body). It seems that doesn't work :/
Maybe i wrote something false, or i miss something, i'm a noob on coding^^ -- Initialization function that defines sets and variables to be used.
-------------------------------------------------------------------------------------------------------------------
-- IMPORTANT: Make sure to also get the Mote-Include.lua file (and its supplementary files) to go with this.
-- 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.
function job_setup()
end
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
-- Options: Override default values
state.OffenseMode:options('Normal', 'None')
state.CastingMode:options('Normal', 'MagicBurst')
state.EquipBodyAF:options('BodyAF', 'AmalricBody')
state.IdleMode:options('Normal', 'PDT')
state.PhysicalDefenseMode:options('PDT')
state.MagicalDefenseMode:options('MDT')
state.MagicBurst = M(false, 'Magic Burst')
lowTierNukes = S{'Stone', 'Water', 'Aero', 'Fire', 'Blizzard', 'Thunder',
'Stone II', 'Water II', 'Aero II', 'Fire II', 'Blizzard II', 'Thunder II',
'Stone III', 'Water III', 'Aero III', 'Fire III', 'Blizzard III', 'Thunder III',
'Stonega', 'Waterga', 'Aeroga', 'Firaga', 'Blizzaga', 'Thundaga',
'Stonega II', 'Waterga II', 'Aeroga II', 'Firaga II', 'Blizzaga II', 'Thundaga II'}
-- Default macro set/book
set_macro_page(8, 4)
end
-- Called when this job file is unloaded (eg: job change)
function file_unload()
if binds_on_unload then
binds_on_unload()
end
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
sets.lockstyle = {main={ name="Lathi", augments={'MP+80','INT+20','"Mag.Atk.Bns."+20',}},
sub="Niobid Strap",
ammo="Strobilus",
head={ name="Amalric Coif +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
body={ name="Amalric Doublet +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
hands={ name="Amalric Gages +1", augments={'INT+12','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
legs={ name="Amalric Slops +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
feet={ name="Amalric Nails +1", augments={'Mag. Acc.+20','"Mag.Atk.Bns."+20','"Conserve MP"+7',}},
neck="Twilight Torque",
waist="Fucho-no-Obi",
left_ear="Etiolation Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Defending Ring",
right_ring="Mephitas's Ring +1",
back={ name="Bane Cape", augments={'Elem. magic skill +9','Dark magic skill +7','"Mag.Atk.Bns."+3',}},}
---- Precast Sets ----
-- Precast sets to enhance JAs
sets.precast.JA['Mana Wall'] = {feet="Wicce Sabots +1"}
sets.precast.JA.Manafont = {body="Archmage's Coat +1"}
-- equip to maximize HP (for Tarus) and minimize MP loss before using convert
sets.precast.JA.Convert = {}
-- Fast cast sets for spells
sets.precast.FC = {
head={name="Amalric Coif +1", priority=1},neck={name="Orunmila's Torque", priority=3},ear1="Etiolation Earring",ear2="Loquacious Earring",hands={ name="Merlinic Dastanas", augments={'Mag. Acc.+4','"Fast Cast"+7','"Mag.Atk.Bns."+12',}},waist="Witful Belt",body={ name="Merlinic Jubbah", augments={'Mag. Acc.+21','"Fast Cast"+7','CHR+1','"Mag.Atk.Bns."+14',}},back="Perimede Cape",ammo="Impatiens",
ring1={name="Lebeche Ring", priority=4},ring2="Rahab Ring",
legs={name="Psycloth Lappas", priority=2},feet={ name="Merlinic Crackows", augments={'Mag. Acc.+21','"Fast Cast"+7','INT+2',}}}
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {ear2="Barkarole Earring"})
sets.precast.FC.Death = set_combine(sets.precast.FC, {ear2="Barkarole Earring",ring1="Rahab Ring",Ring2={name="Mephitas's Ring +1", priority=4}})
sets.precast.FC.Cure = set_combine(sets.precast.FC, {head={name="Amalric Coif +1", priority=1},hands="Vanya Cuffs",back={name="Pahtli Cape", priority=2},legs="Vanya Slops",feet="Vanya Clogs",ear1="Etiolation Earring",ear2="Mendicant's Earring",neck="Orunmila's Torque",waist="Acerbic sash +1",ammo="Strobilus"})
sets.precast.FC.Curaga = sets.precast.FC.Cure
sets.precast.FC.Impact = set_combine(sets.precast.FC, {ring1="Prolix Ring",ammo="Sapience Orb",ear1="Enchanter Earring +1",back="Swith Cape +1",head=empty,body="Twilight Cloak"})
sets.precast.FC.Stoneskin = set_combine(sets.precast.FC['Enhancing Magic'], {hands="Carapacho Cuffs",legs={name="Psycloth Lappas", priority=1},ring1={name="Lebeche Ring", priority=2}})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {ammo="Pemphredo Tathlum",
head="Hagondes Hat +1",neck="Mizukage-no-Kubikazari",ear1="Crematio Earring",ear2="Friomisi Earring",
body="Amalric Doublet +1",hands="Amalric Gages +1",ring1="Shiva Ring +1",ring2="Shiva Ring +1",
back="Bane Cape",waist="Yamabuki-no-obi",legs="Hagondes Pants +1",feet={ name="Merlinic Crackows", augments={'Mag. Acc.+23 "Mag.Atk.Bns."+23','INT+8','Mag. Acc.+14','"Mag.Atk.Bns."+14',}}}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Myrkr'] = {ammo="Strobilus",
head="Amalric Coif +1",neck="Dualism Collar +1",ear1="Etiolation Earring",ear2="Influx Earring",
body="Weatherspoon robe +1",hands="Otomi Gloves",ring1="Mephitas's Ring +1",ring2="Mephitas's Ring",
back="Bane Cape",waist="Shinjutsu-no-obi +1",legs="Amalric Slops +1",feet="Psycloth Boots"}
sets.precast.WS['Vidohunir'] = {ammo="Pemphredo Tathlum",
head="Pixie Hairpin +1",neck="Mizukage-no-Kubikazari",ear1="Friomisi Earring",ear2="Barkarole Earring",
body="Amalric Doublet +1",hands="Amalric Gages +1",ring1="Archon Ring",ring2="Shiva Ring +1",
back="Toro Cape",waist="Yamabuki-no-obi",legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','Magic burst mdg.+3%','INT+15','Mag. Acc.+6','"Mag.Atk.Bns."+12',}},feet={ name="Merlinic Crackows", augments={'Mag. Acc.+23 "Mag.Atk.Bns."+23','INT+8','Mag. Acc.+14','"Mag.Atk.Bns."+14',}},}
---- Midcast Sets ----
sets.midcast.FastRecast = {
head="Amalric Coif +1",ammo="Impatiens",ear1="Etiolation Earring",ear2="Loquacious Earring",
body="Amalric Doublet +1",hands="Otomi Gloves",ring1="Lebeche Ring",
back="Perimede Cape",waist="Cetl Belt",legs="Psycloth Lappas",feet="Battlecast gaiters"}
sets.midcast.Cure = {ammo="Strobilus",
head="Vanya Hood",neck="Phalaina Locket",ear1="Roundel Earring",ear2="Mendicant's Earring",
body="Vrikodara Jupon",hands="Vanya Cuffs",ring1="Lebeche ring",ring2={name="Mephitas's Ring +1", priority=1},
back="Solemnity Cape",waist={name="Shinjutsu-no-Obi +1", priority=2},legs="Vanya Slops",feet="Vanya Clogs"}
sets.self_healing = {ammo={name="Strobilus", priority=3},
head="Vanya Hood",neck="Phalaina Locket",ear1="Roundel Earring",ear2="Mendicant's Earring",
body="Vrikodara Jupon",hands={name="Otomi Gloves", priority=2},ring1="Asklepian ring",ring2="Kunaji Ring",
back="Solemnity Cape",waist="Gishdubar Sash",legs={name="Psycloth Lappas", priority=1},feet="Medium's Sabots"}
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast['Enhancing Magic'] = {
head="Telchine Cap",ear1={name="Etiolation Earring", priority=4},ear2="Andoaa Earring",ammo="Strobilus",
neck="Incanter's Torque",body="Telchine Chasuble",ring1={name="mephitas's ring", priority=2},ring2={name="mephitas's ring +1", priority=1},
back={name="Fi Follet Cape +1", priority=3},hands="Telchine Gloves",waist="Olympus Sash",
legs="Telchine Braconi",feet="Telchine Pigaches"}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {hands={name="Otomi Gloves", priority=3},back={name="Fi Follet Cape +1", priority=4},neck="Stone Gorget",ear1="Earthcry Earring",legs="Shedir Seraweels",waist="Siegel Sash",ring1={name="mephitas's ring", priority=2},ring2={name="mephitas's ring +1", priority=1}})
sets.midcast.Aquaveil = set_combine(sets.midcast['Enhancing Magic'], {head="Amalric Coif +1",waist="Emphatikos Rope",legs="Shedir Seraweels"})
sets.midcast.Refresh = set_combine(sets.midcast.Aquaveil, {head="Amalric Coif +1",Body="Telchine Chasuble",hands="Telchine Gloves",legs="Telchine Braconi",waist="Gishdubar Sash",feet="Telchine Pigaches"})
sets.midcast.Haste = set_combine(sets.midcast.Aquaveil, {head="Telchine Cap",Body="Telchine Chasuble",hands="Telchine Gloves",legs="Telchine Braconi",feet="Telchine Pigaches"})
sets.midcast.MndEnfeebles = {ammo="Quartz Tathlum +1",
head="Befouled Crown",neck="Incanter's Torque",ear1="Dignitary's Earring",ear2="Barkarole Earring",
body="Vanya Robe",hands="Lurid Mitts",ring1={name="Sangoma Ring", priority=2},ring2="Globidonta Ring",
back="Altruistic Cape",waist="Rumination sash",legs={name="Psycloth Lappas", priority=1},feet={name="Medium's Sabots", priority=3}}
sets.midcast.IntEnfeebles = sets.midcast.MndEnfeebles
sets.midcast['Dark Magic'] = {ammo="Pemphredo Tathlum",
head="Amalric Coif +1",neck="Incanter's Torque",ear1="Dark Earring",ear2="Barkarole Earring",
body="Psycloth Vest",hands="Archmage's Gloves +1",ring1="Archon Ring",ring2="Evanescence Ring",
back={name="Bane Cape", priority=2},waist="Cetl Belt",legs="Spaekona's Tonban +1",feet="Wicce Sabots +1"}
sets.midcast.Drain = {ammo="Strobilus",
head="Pixie Hairpin +1",neck="Incanter's Torque",ear1="Hirudinea Earring",ear2="Barkarole Earring",
body="Psycloth Vest",hands={ name="Merlinic Dastanas", augments={'Mag. Acc.+12','"Drain" and "Aspir" potency +11','"Mag.Atk.Bns."+7',}},ring1="Archon Ring",ring2="Evanescence Ring",
back={name="Bane Cape", priority=1},waist="Fucho-no-obi",legs="Spaekona's Tonban +1",feet="Wicce Sabots +1"}
sets.midcast.Aspir = sets.midcast.Drain
sets.midcast['Aspir III'] = sets.midcast.Drain
-- Elemental Magic sets are default for handling low-tier nukes.
sets.midcast['Elemental Magic'] = {ammo="Dosis Tathlum",
head={ name="Merlinic Hood", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','INT+10','Mag. Acc.+5','"Mag.Atk.Bns."+14',}},neck="Sanctity Necklace",ear1="Friomisi Earring",ear2="Crematio Earring",
body={name="Amalric Doublet +1", priority=1},hands="Amalric Gages +1",ring1="Shiva Ring +1",ring2="Shiva Ring +1",
back={name="Bane Cape", priority=2},waist="Yamabuki-no-obi",legs={name="Amalric Slops +1", priority=2},feet="Amalric Nails +1"}
sets.midcast['Elemental Magic'].MagicBurst = {ammo="Pemphredo Tathlum",
head={ name="Merlinic Hood", augments={'Mag. Acc.+19 "Mag.Atk.Bns."+19','Magic burst mdg.+5%','INT+15','Mag. Acc.+6',}},neck="Mizukage-no-Kubikazari",ear1="Friomisi Earring",ear2="Barkarole Earring",
body={name="Amalric Doublet +1", priority=1},hands="Amalric Gages +1",ring1="Shiva Ring +1",ring2="Mujin Band",
back="Seshaw Cape +1",waist="Yamabuki-no-obi",legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic burst mdg.+9%','INT+13','Mag. Acc.+1',}},feet={ name="Merlinic Crackows", augments={'Mag. Acc.+16 "Mag.Atk.Bns."+16','Magic burst mdg.+8%','INT+10','"Mag.Atk.Bns."+12',}}}
sets.midcast['Elemental Magic'].HighTierNuke = set_combine( sets.midcast['Elemental Magic'], {feet={ name="Merlinic Crackows", augments={'Mag. Acc.+23 "Mag.Atk.Bns."+23','INT+8','Mag. Acc.+14','"Mag.Atk.Bns."+14',}},head={ name="Merlinic Hood", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','INT+10','Mag. Acc.+5','"Mag.Atk.Bns."+14',}},body="Spaekona's Coat +1",waist="Yamabuki-no-obi",neck="Mizukage-no-Kubikazari",ammo="Pemphredo Tathlum",back="Toro Cape",legs="Amalric Slops +1",ear2="Barkarole Earring"} )
sets.midcast['Elemental Magic'].HighTierNuke.MagicBurst = set_combine( sets.midcast['Elemental Magic'].HighTierNuke, {body="Amalric Doublet +1",feet={ name="Merlinic Crackows", augments={'Mag. Acc.+16 "Mag.Atk.Bns."+16','Magic burst mdg.+8%','INT+10','"Mag.Atk.Bns."+12',}},head={ name="Merlinic Hood", augments={'Mag. Acc.+19 "Mag.Atk.Bns."+19','Magic burst mdg.+5%','INT+15','Mag. Acc.+6',}},ammo="Pemphredo Tathlum",ear1="Friomisi Earring",back="Seshaw Cape +1",ring1="Shiva Ring +1",Ring2="Mujin Band",legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic burst mdg.+9%','INT+13','Mag. Acc.+1',}}} )
sets.midcast.Impact = {
ammo="Seraphic Ampulla",
head=empty,
body="Twilight Cloak",
hands={ name="Helios Gloves", augments={'"Mag.Atk.Bns."+24','"Occult Acumen"+10','INT+7 MND+7',}},
legs="Perdition Slops",
feet={ name="Helios Boots", augments={'Pet: Attack+26 Pet: Rng.Atk.+26','"Occult Acumen"+7',}},
neck="Gaudryi Necklace",
waist="Oneiros Rope",
left_ear="Dedition Earring",
right_ear="Tripudio Earring",
left_ring="K'ayres Ring",
right_ring="Rajas Ring",
back="Toro Cape",}
sets.midcast.Impact.MagicBurst = sets.midcast.Impact
sets.midcast.Meteor = {ammo="Pemphredo Tathlum",
head={ name="Merlinic Hood", augments={'Mag. Acc.+20 "Mag.Atk.Bns."+20','INT+10','Mag. Acc.+5','"Mag.Atk.Bns."+14',}},neck="Mizukage-no-Kubikazari",ear1="Friomisi Earring",ear2="Barkarole Earring",
body="Amalric Doublet +1",hands="Amalric Gages +1",ring1="Shiva Ring +1",ring2="Shiva Ring +1",
back="Toro Cape",waist="Yamabuki-no-obi",legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','Magic burst mdg.+3%','INT+15','Mag. Acc.+6','"Mag.Atk.Bns."+12',}},feet={ name="Merlinic Crackows", augments={'Mag. Acc.+23 "Mag.Atk.Bns."+23','INT+8','Mag. Acc.+14','"Mag.Atk.Bns."+14',}}}
sets.midcast.Comet = {ammo="Pemphredo Tathlum",
head="Pixie Hairpin +1",neck="Mizukage-no-Kubikazari",ear1="Friomisi Earring",ear2="Barkarole Earring",
body="Spaekona's Coat +1",hands="Amalric Gages +1",ring1="Archon Ring",ring2="Shiva Ring +1",
back="Toro Cape",waist="Yamabuki-no-obi",legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+18 "Mag.Atk.Bns."+18','Magic burst mdg.+3%','INT+15','Mag. Acc.+6','"Mag.Atk.Bns."+12',}},feet={ name="Merlinic Crackows", augments={'Mag. Acc.+23 "Mag.Atk.Bns."+23','INT+8','Mag. Acc.+14','"Mag.Atk.Bns."+14',}}}
sets.midcast.Comet.MagicBurst = {ammo="Pemphredo Tathlum",
head="Pixie Hairpin +1",neck="Mizukage-no-Kubikazari",ear1="Static Earring",ear2="Barkarole Earring",
body="Spaekona's Coat +1",hands="Amalric Gages +1",ring1="Archon Ring",ring2="Mujin Band",
back="Seshaw Cape +1",waist="Yamabuki-no-obi",legs="Wicce Chausses +1",feet={ name="Merlinic Crackows", augments={'Mag. Acc.+16 "Mag.Atk.Bns."+16','Magic burst mdg.+8%','INT+10','"Mag.Atk.Bns."+12',}}}
sets.midcast.Death = set_combine( sets.midcast.Comet, {body="Amalric Doublet +1",legs="Amalric Slops +1"})
sets.midcast.Death.MagicBurst = set_combine( sets.midcast.Comet.MagicBurst, {body={name="Amalric Doublet +1", priority=1},legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+24 "Mag.Atk.Bns."+24','Magic burst mdg.+9%','INT+13','Mag. Acc.+1',}}})
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {ammo="Strobilus",
head="Amalric Coif +1",neck="Dualism Collar +1",ear1="Etiolation Earring",ear2="Influx Earring",
body="Amalric Doublet +1",hands="Serpentes Cuffs",ring1="Sangoma Ring",ring2="Mephitas's Ring",
waist="Shinjutsu-no-obi +1",legs="Assiduity Pants +1",feet="Serpentes Sabots"}
-- Idle sets
-- Normal refresh idle set
sets.idle = {ammo="Strobilus",
head="Befouled Crown",neck="Twilight Torque",ear1={name="Etiolation Earring", priority=3},ear2="Moonshade Earring",
body={name="Amalric Doublet +1", priority=1},hands="Shrieker's Cuffs",ring1="Defending ring",ring2="Mephitas's Ring +1",
back="Bane Cape",waist={name="Shinjutsu-no-obi +1", priority=2},legs="Assiduity Pants +1",feet="Crier's Gaiters"}
-- Idle mode that keeps PDT gear on, but doesn't prevent normal gear swaps for precast/etc.
sets.idle.PDT = {
ammo="Strobilus",
head={ name="Merlinic Hood", augments={'Mag. Acc.+21 "Mag.Atk.Bns."+21','Phys. dmg. taken -4%',}},
body={ name="Merlinic Jubbah", augments={'Mag. Acc.+22','Phys. dmg. taken -2%',}},
hands={ name="Merlinic Dastanas", augments={'"Mag.Atk.Bns."+24','Phys. dmg. taken -4%','CHR+13',}},
legs={ name="Merlinic Shalwar", augments={'Mag. Acc.+19','Damage taken-3%','MND+6',}},
feet={ name="Merlinic Crackows", augments={'Phys. dmg. taken -4%','CHR+3','Mag. Acc.+3','"Mag.Atk.Bns."+4',}},
neck="Twilight Torque",
waist="Shinjutsu-no-Obi +1",
left_ear="Etiolation Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Defending Ring",
right_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Magic dmg. taken -6%',}},
back="Umbra Cape",}
-- Idle mode scopes:
-- Idle mode when weak.
sets.idle.Weak = {ammo="Strobilus",
head="Befouled Crown",neck="Dualism Collar +1",ear1="Etiolation Earring",ear2="Moonshade Earring",
body="Amalric Doublet +1",hands="Otomi Gloves",ring1="Mephitas's Ring +1",ring2="Mephitas's Ring",
back="Bane Cape",waist="Shinjutsu-no-obi +1",legs="Assiduity Pants +1",feet="Psycloth Boots"}
-- Town gear.
sets.idle.Town = {main={ name="Lathi", augments={'MP+80','INT+20','"Mag.Atk.Bns."+20',}},
sub="Thrace Strap",
ammo="Pemphredo Tathlum",
head={ name="Amalric Coif +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
body="Amalric Doublet +1",
hands={ name="Amalric Gages +1", augments={'INT+12','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
legs="Amalric Slops +1",
feet="Crier's Gaiters",
neck="Incanter's Torque",
waist="Hachirin-no-Obi",
left_ear="Etiolation Earring",
right_ear={ name="Moonshade Earring", augments={'MP+25','Latent effect: "Refresh"+1',}},
left_ring="Defending Ring",
right_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Magic dmg. taken -6%',}},
back="Seshaw Cape +1"}
-- Defense sets
sets.defense.PDT = {}
sets.defense.MDT = {}
sets.Kiting = {feet="Crier's Gaiters"}
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Mana Wall'] = {feet="Wicce Sabots +1"}
sets.TPdown = {neck="Chrysopoeia torque"}
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 = {
ammo="Strobilus",
head={ name="Amalric Coif +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
body={ name="Merlinic Jubbah", augments={'Mag. Acc.+22','Phys. dmg. taken -2%',}},
hands={ name="Merlinic Dastanas", augments={'"Mag.Atk.Bns."+24','Phys. dmg. taken -4%','CHR+13',}},
legs={ name="Amalric Slops +1", augments={'MP+80','Mag. Acc.+20','"Mag.Atk.Bns."+20',}},
feet={ name="Merlinic Crackows", augments={'Phys. dmg. taken -4%','CHR+3','Mag. Acc.+3','"Mag.Atk.Bns."+4',}},
neck="Dualism Collar +1",
waist="Shinjutsu-no-Obi +1",
left_ear="Bladeborn Earring",
right_ear="Steelflash Earring",
left_ring="Defending Ring",
right_ring={ name="Dark Ring", augments={'Phys. dmg. taken -6%','Magic dmg. taken -6%',}},
back="Umbra 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 spellMap == 'Cure' or spellMap == 'Curaga' then
gear.default.obi_waist = "Goading Belt"
elseif spell.skill == 'Elemental Magic' then
gear.default.obi_waist = "Sekhmet Corset"
if state.CastingMode.value == 'Proc' then
classes.CustomClass = 'Proc'
end
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)
end
-- 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)
if spellMap == 'Cure' and spell.target.type == 'SELF' and sets.self_healing then
equip(sets.self_healing)
end
if spell.skill == 'Elemental Magic' then
if spell.element == world.day_element or spell.element == world.weather_element then
equip({waist="Hachirin-No-Obi"})
add_to_chat(8,'----- Obi Equipped. -----')
end
end
if spell.skill == 'Elemental Magic' and spell.name == 'Impact' then
if spell.element == world.day_element or spell.element == world.weather_element then
equip({waist="Oneiros Rope"})
add_to_chat(8,'----- TP Equipped. -----')
end
end
if spell.skill == 'Elemental Magic' then
if state.EquipBodyAF == 'Amalric Body' then
equip(sets.midcast['Elemental Magic'].HighTierNuke,{body="Amalric Doublet +1"})
end
end
end
function job_aftercast(spell, action, spellMap, eventArgs)
-- Lock feet after using Mana Wall.
if not spell.interrupted then
if spell.english == 'Mana Wall' then
enable('feet')
equip(sets.buff['Mana Wall'])
disable('feet')
end
end
if spell.english == 'Sleep' or spell.english == 'Sleepga' then
send_command('@wait 50;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Sleep II' or spell.english == 'Sleepga II' then
send_command('@wait 80;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
elseif spell.english == 'Break' or spell.english == 'Breakga' then
send_command('@wait 20;input /echo ------- '..spell.english..' is wearing off in 10 seconds -------')
end
end
-------------------------------------------------------------------------------------------------------------------
-- Customization hooks for idle and melee sets, after they've been automatically constructed.
-------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------
-- General hooks for other events.
-------------------------------------------------------------------------------------------------------------------
-- Called when a player gains or loses a buff.
-- buff == buff gained or lost
-- gain == true if the buff was gained, false if it was lost.
function job_buff_change(buff, gain)
-- Unlock feet when Mana Wall buff is lost.
if buff == "Mana Wall" and not gain then
enable('feet')
handle_equipping_gear(player.status)
end
end
-- Custom spell mapping.
function job_get_spell_map(spell, default_spell_map)
if spell.skill == 'Elemental Magic' and default_spell_map ~= 'ElementalEnfeeble' then
if lowTierNukes:contains(spell.english) then
return 'LowTierNuke'
else
return 'HighTierNuke'
end
end
if spell.skill == 'Enfeebling Magic' then
if spell.type == 'WhiteMagic' then
return 'MndEnfeebles'
else
return 'IntEnfeebles'
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Handle notifications of general user state change.
--function job_state_change(stateField, newValue)
if stateField == 'Offense Mode' then
if newValue == 'Normal' then
disable('main','sub')
else
enable('main','sub')
end
elseif stateField == 'Reset' then
if state.OffenseMode == 'None' then
enable('main','sub')
end
end
--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)
local meleeString = ''
if state.OffenseMode == 'Normal' then
meleeString = 'Melee: Weapons locked, '
end
local defenseString = ''
if state.Defense.Active then
local defMode = state.Defense.PhysicalMode
if state.Defense.Type == 'Magical' then
defMode = state.Defense.MagicalMode
end
defenseString = 'Defense: '..state.Defense.Type..' '..defMode..', '
end
add_to_chat(122,meleeString..'Casting ['..state.CastingMode..'], Idle ['..state.IdleMode..'], '..defenseString..
'Kiting: '..on_off_names[state.Kiting])
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
function job_precast(spell, action, spellMap, eventArgs)
if spell.type == 'Cure' then
refine_cure(spell, action, spellMap, eventArgs)
end
end
-- Function to get the custom class to use for nukes.
function get_nuke_class(spell, action, spellMap)
if Impact[spell.english] then
return 'Impact'
end
end
function customize_idle_set(idleSet)
-- if player.tp > 2950 then
-- idleSet = set_combine(idleSet, sets.TPdown)
-- end
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
return idleSet
end
function refine_various_spells(spell, action, spellMap, eventArgs)
aspirs = S{'Aspir','Aspir II','Aspir III'}
sleeps = S{'Sleep II','Sleep'}
sleepgas = S{'Sleepga II','Sleepga'}
nukes = S{'Fire', 'Blizzard', 'Aero', 'Stone', 'Thunder', 'Water',
'Fire II', 'Blizzard II', 'Aero II', 'Stone II', 'Thunder II', 'Water II',
'Fire III', 'Blizzard III', 'Aero III', 'Stone III', 'Thunder III', 'Water III',
'Fire IV', 'Blizzard IV', 'Aero IV', 'Stone IV', 'Thunder IV', 'Water IV',
'Fire V', 'Blizzard V', 'Aero V', 'Stone V', 'Thunder V', 'Water V',
'Fire VI', 'Blizzard VI', 'Aero VI', 'Stone VI', 'Thunder VI', 'Water VI',
'Firaga', 'Blizzaga', 'Aeroga', 'Stonega', 'Thundaga', 'Waterga',
'Firaga II', 'Blizzaga II', 'Aeroga II', 'Stonega II', 'Thundaga II', 'Waterga II',
'Firaga III', 'Blizzaga III', 'Aeroga III', 'Stonega III', 'Thundaga III', 'Waterga III',
'Firaja', 'Blizzaja', 'Aeroja', 'Stoneja', 'Thundaja', 'Waterja',
}
if not sleepgas:contains(spell.english) and not sleeps:contains(spell.english) and not aspirs:contains(spell.english) and not nukes:contains(spell.english) then
return
end
local newSpell = spell.english
local spell_recasts = windower.ffxi.get_spell_recasts()
local cancelling = 'All '..spell.english..' spells are on cooldown. Cancelling spell casting.'
if spell_recasts[spell.recast_id] > 0 then
if aspirs:contains(spell.english) then
if spell.english == 'Aspir' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
elseif spell.english == 'Aspir II' then
newSpell = 'Aspir'
elseif spell.english == 'Aspir III' then
newSpell = 'Aspir II'
end
elseif sleeps:contains(spell.english) then
if spell.english == 'Sleep' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
elseif spell.english == 'Sleep II' then
newSpell = 'Sleep'
end
elseif sleepgas:contains(spell.english) then
if spell.english == 'Sleepga' then
add_to_chat(122,cancelling)
eventArgs.cancel = true
return
elseif spell.english == 'Sleepga II' then
newSpell = 'Sleepga'
end
elseif nukes:contains(spell.english) then
if spell.english == 'Fire' then
eventArgs.cancel = true
return
elseif spell.english == 'Fire VI' then
newSpell = 'Fire V'
elseif spell.english == 'Fire IV' then
newSpell = 'Fire III'
elseif spell.english == 'Fire II' then
newSpell = 'Fire'
elseif spell.english == 'Firaja' then
newSpell = 'Firaga III'
elseif spell.english == 'Firaga II' then
newSpell = 'Firaga'
end
if spell.english == 'Blizzard' then
eventArgs.cancel = true
return
elseif spell.english == 'Blizzard VI' then
newSpell = 'Blizzard V'
elseif spell.english == 'Blizzard IV' then
newSpell = 'Blizzard III'
elseif spell.english == 'Blizzard II' then
newSpell = 'Blizzard'
elseif spell.english == 'Blizzaja' then
newSpell = 'Blizzaga III'
elseif spell.english == 'Blizzaga II' then
newSpell = 'Blizzaga'
end
if spell.english == 'Aero' then
eventArgs.cancel = true
return
elseif spell.english == 'Aero VI' then
newSpell = 'Aero V'
elseif spell.english == 'Aero IV' then
newSpell = 'Aero III'
elseif spell.english == 'Aero II' then
newSpell = 'Aero'
elseif spell.english == 'Aeroja' then
newSpell = 'Aeroga III'
elseif spell.english == 'Aeroga II' then
newSpell = 'Aeroga'
end
if spell.english == 'Stone' then
eventArgs.cancel = true
return
elseif spell.english == 'Stone VI' then
newSpell = 'Stone V'
elseif spell.english == 'Stone IV' then
newSpell = 'Stone III'
elseif spell.english == 'Stone II' then
newSpell = 'Stone'
elseif spell.english == 'Stoneja' then
newSpell = 'Stonega III'
elseif spell.english == 'Stonega II' then
newSpell = 'Stonega'
end
if spell.english == 'Thunder' then
eventArgs.cancel = true
return
elseif spell.english == 'Thunder VI' then
newSpell = 'Thunder V'
elseif spell.english == 'Thunder IV' then
newSpell = 'Thunder III'
elseif spell.english == 'Thunder II' then
newSpell = 'Thunder'
elseif spell.english == 'Thundaja' then
newSpell = 'Thundaga III'
elseif spell.english == 'Thundaga II' then
newSpell = 'Thundaga'
end
if spell.english == 'Water' then
eventArgs.cancel = true
return
elseif spell.english == 'Water VI' then
newSpell = 'Water V'
elseif spell.english == 'Water IV' then
newSpell = 'Water III'
elseif spell.english == 'Water II' then
newSpell = 'Water'
elseif spell.english == 'Waterja' then
newSpell = 'Waterga III'
elseif spell.english == 'Waterga II' then
newSpell = 'Waterga'
end
end
end
if newSpell ~= spell.english then
send_command('@input /ma "'..newSpell..'" '..tostring(spell.target.raw))
eventArgs.cancel = true
return
end
end
function job_precast(spell, action, spellMap, eventArgs)
refine_various_spells(spell, action, spellMap, eventArgs)
end
Based on my testing this triggers your Body change.
Changes:
user_setup
state.EquipBodyAF = M{['description']='Body', 'BodyAF', 'AmalricBody'}
-- removed the options as it seems that this tries to use vars from the mote-include.lua and changed it to a custom variable.
-- Changing the part 'Body' will change the description
job_post_midcast
if state.EquipBodyAF.value == 'AmalricBody' then
-- changed value (no space), and added the .value
Hope that works for you :D
Edit: And the link to the pastebin....(Bit easier to read)
http://pastebin.com/ucFmTkeG
Hi again,
I tried to add some sets to this rules, but that doesn't work,
if spell.skill == 'Elemental Magic' then
if state.EquipBodyAF.value == 'AmalricBody' then
equip(sets.midcast['Elemental Magic'].HighTierNuke,{body="Amalric Doublet +1"})
equip(sets.midcast['Elemental Magic'].HighTierNuke.MagicBurst,{body="Amalric Doublet +1"})
equip(sets.midcast.Meteor,{body="Amalric Doublet +1"})
equip(sets.midcast.Comet,{body="Amalric Doublet +1"})
equip(sets.midcast.Comet.MagicBurst,{body="Amalric Doublet +1"})
end
end
Last line take priority and all my nuke sets(in AmalricBody mode) use "sets.midcast.Comet.MagicBurst".
I think i need add a "command" before each line, but i don't know which one.
Ragnarok.Flippant
Server: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2016-03-11 19:10:55
Yeah, you're literally telling it to equip all those sets at once, in which case each latter will overwrite the former.
I don't use Mote's files, but I assume it would cascade properly if you just use:
Code if spell.skill == 'Elemental Magic' then
if state.EquipBodyAF.value == 'AmalricBody' then
equip({body="Amalric Doublet +1"})
end
end
This would simply equip the body for every Elemental Magic spell at the last moment.
Carbuncle.Doryll
Server: Carbuncle
Game: FFXI
By Carbuncle.Doryll 2016-03-12 02:44:52
Thank you... that was not complicated. :)
Asura.Sechs
Server: Asura
Game: FFXI
Posts: 10086
By Asura.Sechs 2016-03-12 08:18:24
edit:
fixed it, was a sorting issue.
Server: Asura
Game: FFXI
Posts: 27
By Asura.Halestrum 2016-03-12 21:30:21
Recently Returned to ffxi and am returning to gearswap most of the time it works correctly for all jobs but occasionally it will spam an error
"Lua Runtime Error: Gearswap/refresh.lua:235: attempt to index field '?' (a nil value)"
I havent actually ever touched this file so i'm unsure as why it worked fine before my break and why it gives problems now, I can post a copy of that lua if it helps or is there something i have to update?
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.
|
|