|
Gearswap Support Thread
Sylph.Ashiya
サーバ: Sylph
Game: FFXI
Posts: 144
By Sylph.Ashiya 2015-06-19 10:53:22
Quote: Both examples are perfectly fine, but first thing... You should be using //gs showswaps to determine if gear is changing.
The first example assumes you're using Mote's includes, but I don't know that you are without seeing your entire lua. (on pastebin) If you are using Mote's includes, then I would go with this option.
The second example won't do anything at all by adding the code to your lua. He's giving you a function that does what you need, but you still need to call it. pastebin your lua and i'll show you how to add it. (if you don't use mote's)
I figured the first would be better anyways, and also, didn't know there was a command to determine if gear is changing. Good to know :) I am using Montenten's lua files btw!
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'}
-- Augmented Gear --
gear.NukeHead={ name="Helios Band", augments={'"Mag.Atk.Bns."+24','"Drain" and "Aspir" potency +4','Mag. crit. hit dmg. +5%',}}
gear.NukeHands={ name="Helios Gloves", augments={'"Mag.Atk.Bns."+11','"Drain" and "Aspir" potency +10','INT+7 MND+7',}}
gear.NukeFeet = {name="Helios Boots", augments={'"Mag.Atk.Bns."+25','"Occult Acumen"+10','Mag. crit. hit dmg. +5%'}}
gear.DrainFeet = {name="Helios Boots", augments={'"Drain" and "Aspir" potency +10'}}
-- Additional local binds
send_command('bind ^` input /ma Stun <t>')
send_command('bind @` gs c activate MagicBurst')
select_default_macro_book()
end
-- Called when this job file is unloaded (eg: job change)
function user_unload()
send_command('unbind ^`')
send_command('unbind @`')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
---- Precast Sets ----
-- Precast sets to enhance JAs
sets.precast.JA['Mana Wall'] = {feet="Goetia Sabots +1"}
sets.precast.JA.Manafont = {body="Sorcerer's Coat +2"}
-- equip to maximize HP (for Tarus) and minimize MP loss before using convert
sets.precast.JA.Convert = {}
-- Fast cast sets for spells
sets.precast.FC = {main="Marin Staff",sub="Achaq Grip",ammo="Impatiens",
head="Nahtirah Hat",ear1="Loquac. Earring",body="Anhur Robe",hands="Hagondes Cuffs +1",
ring1="Prolix Ring",back="Bane Cape",waist="Witful Belt",legs="Artsieq Hose",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, {neck="Wicce Petasos"})
sets.precast.FC.Cure = set_combine(sets.precast.FC, {back="Pahtli Cape"})
sets.precast.FC.Curaga = sets.precast.FC.Cure
---- Midcast Sets ----
sets.midcast.FastRecast = {main="Marin Staff",sub="Achaq Grip",ammo="Impatiens",
head="Nahtirah Hat",ear1="Loquac.Earring",body="Anhur Robe",hands="Hagondes Cuffs +1",
ring1="Prolix Ring",back="Ogapepo Cape",waist="Witful Belt",legs="Artsieq Hose",feet="Regal Pumps +1"}
sets.midcast.Cure = {main="Tamaxchi",sub="Sors Shield",ammo="Psilomene",
head="Telchine Cap",neck="Phalaina Locket",ear1="Beatifiq Earring",ear2="Lifestorm Earring",body="Telchine Chasuble",
ring1="Sirona's Ring",ring2="Aquasoul Ring",back="Vates Cape +1",waist="Bishop's Sash",legs="Nares Trews",feet="Regal Pumps +1"}
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast['Enhancing Magic'] = {main="Earth Staff",sub="Fulcio Grip",ammo="Psilomene",
head="Telchine Cap",neck="Twilight Torque",body="Telchine Chasuble",hands="Hagondes Cuffs +1",
ring2="Dark Ring",back="Cheviot Cape",legs="Telchine Braconi",feet="Telchine Pigaches"}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {neck="Stone Gorget",ear1="Earthcry Earring",
waist="Siegel Sash",legs="Haven Hose"})
sets.midcast['Enfeebling Magic'] = {main="Baqil Staff",sub="Mephitis Grip",ammo="Kalboron Stone",
head="Kaabnax Hat",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Helios Jacket",hands="Hagondes Cuffs +1",ring1="Sangoma Ring",ring2="Balrahn's Ring",
back="Bane Cape",waist="Demonry Sash",legs="Wicce Sabots",feet="Artsieq Boots"}
sets.midcast.ElementalEnfeeble = sets.midcast['Enfeebling Magic']
sets.midcast['Dark Magic'] = {main="Baqil Staff",sub="Mephitis Grip",ammo="Kalboron Stone",
head="Kaabnax Hat",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Helios Jacket",hands="Archmage's Gloves",ring1="Sangoma Ring",ring2="Balrahn's Ring",
back="Bane Cape",waist="Demonry Sash",legs="Artsieq Hose",feet="Wicce Sabots"}
-- Drain/Aspir & Stun Sets
sets.midcast.Drain = {head="Helios Band",body="Helios Jacket",hands="Helios Gloves",
waist="Fucho-no-obi",feet=gear.DrainFeet}
sets.midcast.Aspir = sets.midcast.Drain
sets.midcast.Stun = {main="Apamajas II",sub="Mephitis Grip",ammo="Impatiens",
head="Kaabnax Hat",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Helios Jacket",hands="Arch. Gloves",ring1="Sangoma Ring",ring2="Balrahn's Ring",
back="Ogapepo Cape",waist="Witful Belt",legs="Artsieq Hose",feet="Wicce Sabots"}
-- Elemental Magic sets
sets.midcast['Elemental Magic'] = {main="Keraunos",sub="Wizzan Grip",ammo="Witchstone",
head="Helios Band",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Hagondes Coat +1",hands="Helios Gloves",ring1="Shiva Ring",ring2="Shiva Ring",
back="Toro Cape",waist="Oneiros Sash",legs="Telchine Braconi",feet=gear.NukeFeet}
sets.midcast['Elemental Magic'].Resistant = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="Helios Band",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Hagondes Coat +1",hands="Helios Gloves",ring1="Sangoma Ring",ring2="Shiva Ring",
back="Toro Cape",waist="Oneiros Sash",legs="Telchine Braconi",feet=gear.NukeFeet}
sets.midcast['Elemental Magic'].LowTierNuke = {main="Keraunos",sub="Wizzan Grip",ammo="Witchstone",
head="Kaabnax Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Hagondes Coat +1",hands="Otomi Gloves",ring1="Shiva Ring",ring2="Shiva Ring",
back="Bane Cape",waist="Sekhmet Corset",legs="Telchine Braconi",feet="Umbani Boots"}
sets.midcast['Elemental Magic'].HighTierNuke = set_combine(sets.midcast['Elemental Magic'], {})
sets.midcast['Elemental Magic'].HighTierNuke.Resistant = set_combine(sets.midcast['Elemental Magic'], {sub="Mephitis Grip"})
sets.midcast['Elemental Magic'].LowTierNuke.Resistant = set_combine(sets.midcast['Elemental Magic'], {sub="Mephitis Grip"})
-- Minimal damage gear for procs.
sets.midcast['Elemental Magic'].Proc = {}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main="Chatoyant Staff",sub="Achaq Grip",ammo="Mana Ampulla",head="Orvail Corona +1",waist="Austerity Belt"}
-- Idle sets
sets.idle = {main="Bolelabunga",sub="Genbu's Shield",ammo="Impatiens",
head="Wicce Petasos",neck="Twilight Torque",ear1="Loquac. Earring",ear2="Friomisi Earring",body="Hagondes Coat +1",
hands="Serpentes Cuffs",ring1="Prolix Ring",ring2="Dark Ring",back="Cheviot Cape",legs="Nares Trews",feet="Serpentes Sabots"}
sets.idle.Town = {main="Keraunos",sub="Wizzan Grip",ammo="Witchstone",
head="Wicce Petasos",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Hagondes Coat +1",hands="Helios Gloves",ring1="Shiva Ring",ring2="Shiva Ring",
back="Toro Cape",waist="Hachirin-no-obi",legs="Telchine Braconi",feet=gear.NukeFeet}
sets.idle.Weak = {main="Bolelabunga",sub="Genbu's Shield",ammo="Impatiens",
head="Wicce Petasos",neck="Twilight Torque",ear1="Loquac. Earring",ear2="Friomisi Earring",body="Hagondes Coat +1",
hands="Serpentes Cuffs",ring1="Prolix Ring",ring2="Dark Ring",back="Cheviot Cape",legs="Nares Trews",feet="Serpentes Sabots"}
-- Defense sets
sets.defense.PDT = {main="Earth Staff",sub="Achaq Grip",
neck="Twilight Torque",body="Hagondes Coat +1",hands="Hagondes Cuffs +1",ring2="Dark Ring",back="Cheviot Cape"}
sets.Kiting = {}
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 = {hands="Archmage's Gloves"}
-- 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 = {}
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 = "Bishop Sash"
elseif spell.skill == 'Elemental Magic' then
gear.default.obi_waist = "Sekhmet Corset"
if state.CastingMode.value == 'Proc' then
classes.CustomClass = 'Proc'
end
end
end
-- Hachirin-No-Obi
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' then
if spell.element == world.day_element or spell.element == world.weather_element then
equip(sets.midcast['Elemental Magic'], {waist="Hachirin-No-Obi"})
end
elseif spell.skill == 'Healing Magic' then
if spell.name:startswith('Cure') and world.day_element == 'Light' or world.weather_element == 'Light' then
equip(sets.midcast.Cure, {waist="Hachirin-No-Obi"})
end
end
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()
-- Default macro set/book
if player.sub_job == 'WHM' then
set_macro_page(1, 3)
elseif player.sub_job == 'RDM' then
set_macro_page(4, 3)
elseif player.sub_job == 'SCH' then
set_macro_page(7, 3)
elseif player.sub_job == 'NIN' then
set_macro_page(10, 3)
else
set_macro_page(1, 3)
end
end
Edit: Yeah, it's not working. I did fire V during firesday with no weather.
サーバ: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2015-06-20 04:17:48
Quote: Both examples are perfectly fine, but first thing... You should be using //gs showswaps to determine if gear is changing.
The first example assumes you're using Mote's includes, but I don't know that you are without seeing your entire lua. (on pastebin) If you are using Mote's includes, then I would go with this option.
The second example won't do anything at all by adding the code to your lua. He's giving you a function that does what you need, but you still need to call it. pastebin your lua and i'll show you how to add it. (if you don't use mote's)
I figured the first would be better anyways, and also, didn't know there was a command to determine if gear is changing. Good to know :) I am using Montenten's lua files btw!
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'}
-- Augmented Gear --
gear.NukeHead={ name="Helios Band", augments={'"Mag.Atk.Bns."+24','"Drain" and "Aspir" potency +4','Mag. crit. hit dmg. +5%',}}
gear.NukeHands={ name="Helios Gloves", augments={'"Mag.Atk.Bns."+11','"Drain" and "Aspir" potency +10','INT+7 MND+7',}}
gear.NukeFeet = {name="Helios Boots", augments={'"Mag.Atk.Bns."+25','"Occult Acumen"+10','Mag. crit. hit dmg. +5%'}}
gear.DrainFeet = {name="Helios Boots", augments={'"Drain" and "Aspir" potency +10'}}
-- Additional local binds
send_command('bind ^` input /ma Stun <t>')
send_command('bind @` gs c activate MagicBurst')
select_default_macro_book()
end
-- Called when this job file is unloaded (eg: job change)
function user_unload()
send_command('unbind ^`')
send_command('unbind @`')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
---- Precast Sets ----
-- Precast sets to enhance JAs
sets.precast.JA['Mana Wall'] = {feet="Goetia Sabots +1"}
sets.precast.JA.Manafont = {body="Sorcerer's Coat +2"}
-- equip to maximize HP (for Tarus) and minimize MP loss before using convert
sets.precast.JA.Convert = {}
-- Fast cast sets for spells
sets.precast.FC = {main="Marin Staff",sub="Achaq Grip",ammo="Impatiens",
head="Nahtirah Hat",ear1="Loquac. Earring",body="Anhur Robe",hands="Hagondes Cuffs +1",
ring1="Prolix Ring",back="Bane Cape",waist="Witful Belt",legs="Artsieq Hose",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, {neck="Wicce Petasos"})
sets.precast.FC.Cure = set_combine(sets.precast.FC, {back="Pahtli Cape"})
sets.precast.FC.Curaga = sets.precast.FC.Cure
---- Midcast Sets ----
sets.midcast.FastRecast = {main="Marin Staff",sub="Achaq Grip",ammo="Impatiens",
head="Nahtirah Hat",ear1="Loquac.Earring",body="Anhur Robe",hands="Hagondes Cuffs +1",
ring1="Prolix Ring",back="Ogapepo Cape",waist="Witful Belt",legs="Artsieq Hose",feet="Regal Pumps +1"}
sets.midcast.Cure = {main="Tamaxchi",sub="Sors Shield",ammo="Psilomene",
head="Telchine Cap",neck="Phalaina Locket",ear1="Beatifiq Earring",ear2="Lifestorm Earring",body="Telchine Chasuble",
ring1="Sirona's Ring",ring2="Aquasoul Ring",back="Vates Cape +1",waist="Bishop's Sash",legs="Nares Trews",feet="Regal Pumps +1"}
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast['Enhancing Magic'] = {main="Earth Staff",sub="Fulcio Grip",ammo="Psilomene",
head="Telchine Cap",neck="Twilight Torque",body="Telchine Chasuble",hands="Hagondes Cuffs +1",
ring2="Dark Ring",back="Cheviot Cape",legs="Telchine Braconi",feet="Telchine Pigaches"}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'], {neck="Stone Gorget",ear1="Earthcry Earring",
waist="Siegel Sash",legs="Haven Hose"})
sets.midcast['Enfeebling Magic'] = {main="Baqil Staff",sub="Mephitis Grip",ammo="Kalboron Stone",
head="Kaabnax Hat",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Helios Jacket",hands="Hagondes Cuffs +1",ring1="Sangoma Ring",ring2="Balrahn's Ring",
back="Bane Cape",waist="Demonry Sash",legs="Wicce Sabots",feet="Artsieq Boots"}
sets.midcast.ElementalEnfeeble = sets.midcast['Enfeebling Magic']
sets.midcast['Dark Magic'] = {main="Baqil Staff",sub="Mephitis Grip",ammo="Kalboron Stone",
head="Kaabnax Hat",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Helios Jacket",hands="Archmage's Gloves",ring1="Sangoma Ring",ring2="Balrahn's Ring",
back="Bane Cape",waist="Demonry Sash",legs="Artsieq Hose",feet="Wicce Sabots"}
-- Drain/Aspir & Stun Sets
sets.midcast.Drain = {head="Helios Band",body="Helios Jacket",hands="Helios Gloves",
waist="Fucho-no-obi",feet=gear.DrainFeet}
sets.midcast.Aspir = sets.midcast.Drain
sets.midcast.Stun = {main="Apamajas II",sub="Mephitis Grip",ammo="Impatiens",
head="Kaabnax Hat",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Helios Jacket",hands="Arch. Gloves",ring1="Sangoma Ring",ring2="Balrahn's Ring",
back="Ogapepo Cape",waist="Witful Belt",legs="Artsieq Hose",feet="Wicce Sabots"}
-- Elemental Magic sets
sets.midcast['Elemental Magic'] = {main="Keraunos",sub="Wizzan Grip",ammo="Witchstone",
head="Helios Band",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Hagondes Coat +1",hands="Helios Gloves",ring1="Shiva Ring",ring2="Shiva Ring",
back="Toro Cape",waist="Oneiros Sash",legs="Telchine Braconi",feet=gear.NukeFeet}
sets.midcast['Elemental Magic'].Resistant = {main="Keraunos",sub="Mephitis Grip",ammo="Witchstone",
head="Helios Band",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Hagondes Coat +1",hands="Helios Gloves",ring1="Sangoma Ring",ring2="Shiva Ring",
back="Toro Cape",waist="Oneiros Sash",legs="Telchine Braconi",feet=gear.NukeFeet}
sets.midcast['Elemental Magic'].LowTierNuke = {main="Keraunos",sub="Wizzan Grip",ammo="Witchstone",
head="Kaabnax Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Hagondes Coat +1",hands="Otomi Gloves",ring1="Shiva Ring",ring2="Shiva Ring",
back="Bane Cape",waist="Sekhmet Corset",legs="Telchine Braconi",feet="Umbani Boots"}
sets.midcast['Elemental Magic'].HighTierNuke = set_combine(sets.midcast['Elemental Magic'], {})
sets.midcast['Elemental Magic'].HighTierNuke.Resistant = set_combine(sets.midcast['Elemental Magic'], {sub="Mephitis Grip"})
sets.midcast['Elemental Magic'].LowTierNuke.Resistant = set_combine(sets.midcast['Elemental Magic'], {sub="Mephitis Grip"})
-- Minimal damage gear for procs.
sets.midcast['Elemental Magic'].Proc = {}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main="Chatoyant Staff",sub="Achaq Grip",ammo="Mana Ampulla",head="Orvail Corona +1",waist="Austerity Belt"}
-- Idle sets
sets.idle = {main="Bolelabunga",sub="Genbu's Shield",ammo="Impatiens",
head="Wicce Petasos",neck="Twilight Torque",ear1="Loquac. Earring",ear2="Friomisi Earring",body="Hagondes Coat +1",
hands="Serpentes Cuffs",ring1="Prolix Ring",ring2="Dark Ring",back="Cheviot Cape",legs="Nares Trews",feet="Serpentes Sabots"}
sets.idle.Town = {main="Keraunos",sub="Wizzan Grip",ammo="Witchstone",
head="Wicce Petasos",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Friomisi Earring",
body="Hagondes Coat +1",hands="Helios Gloves",ring1="Shiva Ring",ring2="Shiva Ring",
back="Toro Cape",waist="Hachirin-no-obi",legs="Telchine Braconi",feet=gear.NukeFeet}
sets.idle.Weak = {main="Bolelabunga",sub="Genbu's Shield",ammo="Impatiens",
head="Wicce Petasos",neck="Twilight Torque",ear1="Loquac. Earring",ear2="Friomisi Earring",body="Hagondes Coat +1",
hands="Serpentes Cuffs",ring1="Prolix Ring",ring2="Dark Ring",back="Cheviot Cape",legs="Nares Trews",feet="Serpentes Sabots"}
-- Defense sets
sets.defense.PDT = {main="Earth Staff",sub="Achaq Grip",
neck="Twilight Torque",body="Hagondes Coat +1",hands="Hagondes Cuffs +1",ring2="Dark Ring",back="Cheviot Cape"}
sets.Kiting = {}
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 = {hands="Archmage's Gloves"}
-- 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 = {}
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 = "Bishop Sash"
elseif spell.skill == 'Elemental Magic' then
gear.default.obi_waist = "Sekhmet Corset"
if state.CastingMode.value == 'Proc' then
classes.CustomClass = 'Proc'
end
end
end
-- Hachirin-No-Obi
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' then
if spell.element == world.day_element or spell.element == world.weather_element then
equip(sets.midcast['Elemental Magic'], {waist="Hachirin-No-Obi"})
end
elseif spell.skill == 'Healing Magic' then
if spell.name:startswith('Cure') and world.day_element == 'Light' or world.weather_element == 'Light' then
equip(sets.midcast.Cure, {waist="Hachirin-No-Obi"})
end
end
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()
-- Default macro set/book
if player.sub_job == 'WHM' then
set_macro_page(1, 3)
elseif player.sub_job == 'RDM' then
set_macro_page(4, 3)
elseif player.sub_job == 'SCH' then
set_macro_page(7, 3)
elseif player.sub_job == 'NIN' then
set_macro_page(10, 3)
else
set_macro_page(1, 3)
end
end
Edit: Yeah, it's not working. I did fire V during firesday with no weather. You have two job_post_midcast functions, which basically confuses GearSwap. However, some time after Mote left, someone updated Mote-Mappings.lua to include Hachirin-no-Obi, so this is all totally unnecessary. If you just use the standard coding of gear.ElementalObi in your set and gear.default_obi_waist, it will throw it on for the spell.
Now, also in the Mote-Mappings.lua, there are lists for elements.weak_to and elements.strong_to, which is basically the second thing you copied. I'm not sure the exact coding, as I haven't used it myself, but the basic foundation is there already.
サーバ: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2015-06-20 04:35:37
I'm not sure the exact coding, as I haven't used it myself, but the basic foundation is there already. As I said, I'm not sure if this will work, but I believe it will. It might be able to be cleaned up, but it should make all the necessary checks. Code function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' then
if state.MagicBurst.value then
equip(sets.magic_burst)
end
-- Obi rules
if world.day_element == elements.weak_to[spell.element] then -- Check for weak day
if world.weather_element == elements.strong_to[spell.element] then -- If strong weather...
if world.weather_id % 2 == 1 or world.weather_id == 1 then -- If single or double weather...
equip({waist=gear.ElementalObi}) -- Use obi with at least single weather
else -- If strong weather isn't there
equip({waist=gear.default_obi_waist}) -- Use default nuking waist to bolster damage
end
end
elseif world.weather_element == elements.weak_to[spell.english] then -- Check for weak weather
if world.weather_id % 2 == 1 then -- If double weak weather...
equip({waist=gear.default_obi_waist}) -- Use default nuking waist
elseif world.weather_id == 1 then -- If single weak weather...
if world.day_element == elements.strong_to[spell.element] then -- If strong day...
equip({waist=gear.ElementalObi}) -- Use obi to cancel weak day
else -- If day doesn't match...
equip({waist=gear.default_obi_waist}) -- Use default nuking waist
end
end
end
end
end Edit: Changed % 2 values as noted by Vow.
By beaumb 2015-06-20 11:54:30
So I'm getting a weird error on Bokura's WHM lua.
GearSwap: Lua runtime error: gearswap/flow.lua:295:
Gearswap has detected an error in the user function self_command:
... Files (x86)Windower4/addons/GearSwap/data/WHM.lua:505: attempt to concatenate field '?' (a nil value)
This error only happens when hitting any (SC1,SC2,etc.) macro. All the normal ones work fine (C1,C7,etc.)
I have this same exact lua running on 2 different computers and it works fine on one and not the other. I downloaded both at the same time and made no changes so it can't be a problem with them.
I'm still super new to Gearswap so if this is a stupid question I'm sorry but I can't for the life of me figure it out.
Thanks in advance. :)
サーバ: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2015-06-20 13:28:58
I don't have a copy of Bokura's WHM.lua hanging around, so would you link it please?
Leviathan.Vow
サーバ: Leviathan
Game: FFXI
Posts: 125
By Leviathan.Vow 2015-06-20 15:52:47
I'm not sure the exact coding, as I haven't used it myself, but the basic foundation is there already. As I said, I'm not sure if this will work, but I believe it will. It might be able to be cleaned up, but it should make all the necessary checks. Code function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' then
if state.MagicBurst.value then
equip(sets.magic_burst)
end
-- Obi rules
if world.day_element == elements.weak_to[spell.element] then -- Check for weak day
if world.weather_element == elements.strong_to[spell.element] then -- If strong weather...
if world.weather_id % 2 == 1 or world.weather_id % 2 == 2 then -- If single or double weather...
equip({waist=gear.ElementalObi}) -- Use obi with at least single weather
else -- If strong weather isn't there
equip({waist=gear.default_obi_waist}) -- Use default nuking waist to bolster damage
end
end
elseif world.weather_element == elements.weak_to[spell.english] then -- Check for weak weather
if world.weather_id % 2 == 2 then -- If double weak weather...
equip({waist=gear.default_obi_waist}) -- Use default nuking waist
elseif world.weather_id % 2 == 1 then -- If single weak weather...
if world.day_element == elements.strong_to[spell.element] then -- If strong day...
equip({waist=gear.ElementalObi}) -- Use obi to cancel weak day
else -- If day doesn't match...
equip({waist=gear.default_obi_waist}) -- Use default nuking waist
end
end
end
end
end
The variable world.weather_id does not indicate intensity.
Also: n % 2 will only return 0 or 1.
This should work, but you should check it anyway: Code local weather_intensity = gearswap.res.weather[world.weather_id].intensity
local day_contribution = world.day_element == spell.element and 1
or elements.weak_to[world.day_element] == spell.element and -1
or 0
local weather_contribution = world.weather_element == 'None' and 0
or world.weather_element == spell.element and weather_intensity
or elements.weak_to[world.weather_element] == spell.element and -weather_intensity
or 0
if day_contribution + weather_contribution > 0 then
--conditions for obi are met
end
I'm not sure if it will work correctly for Storm II spells.
Sylph.Ashiya
サーバ: Sylph
Game: FFXI
Posts: 144
By Sylph.Ashiya 2015-06-20 20:59:03
You have two job_post_midcast functions, which basically confuses GearSwap. However, some time after Mote left, someone updated Mote-Mappings.lua to include Hachirin-no-Obi, so this is all totally unnecessary. If you just use the standard coding of gear.ElementalObi in your set and gear.default_obi_waist, it will throw it on for the spell.
Now, also in the Mote-Mappings.lua, there are lists for elements.weak_to and elements.strong_to, which is basically the second thing you copied. I'm not sure the exact coding, as I haven't used it myself, but the basic foundation is there already.
Ah, I took a look and finally understood what you meant(somewhat), I went through the motes as you mentioned. I noticed on Mote-Include.Lua the gear.ElementalObi didn't have Hachirin listed and was blank, so I went ahead and added it in. Now my other question is do I need to change this part: Code elements.obi_of = {['Light']='Korin Obi', ['Dark']='Anrin Obi', ['Fire']='Karin Obi', ['Ice']='Hyorin Obi', ['Wind']='Furin Obi',
['Earth']='Dorin Obi', ['Lightning']='Rairin Obi', ['Water']='Suirin Obi'}
In Mote-Mappings.Lua or will it still work? Even though they are listed by their seperate obi's?
サーバ: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2015-06-20 21:36:23
You have two job_post_midcast functions, which basically confuses GearSwap. However, some time after Mote left, someone updated Mote-Mappings.lua to include Hachirin-no-Obi, so this is all totally unnecessary. If you just use the standard coding of gear.ElementalObi in your set and gear.default_obi_waist, it will throw it on for the spell.
Now, also in the Mote-Mappings.lua, there are lists for elements.weak_to and elements.strong_to, which is basically the second thing you copied. I'm not sure the exact coding, as I haven't used it myself, but the basic foundation is there already.
Ah, I took a look and finally understood what you meant(somewhat), I went through the motes as you mentioned. I noticed on Mote-Include.Lua the gear.ElementalObi didn't have Hachirin listed and was blank, so I went ahead and added it in. Now my other question is do I need to change this part: Code elements.obi_of = {['Light']='Korin Obi', ['Dark']='Anrin Obi', ['Fire']='Karin Obi', ['Ice']='Hyorin Obi', ['Wind']='Furin Obi',
['Earth']='Dorin Obi', ['Lightning']='Rairin Obi', ['Water']='Suirin Obi'}
In Mote-Mappings.Lua or will it still work? Even though they are listed by their seperate obi's? Just replace all the single-element obis with Hachirin-no-Obi in Mote-Mappings, i.e. Code elements.obi_of = {['Light']='Hachirin-no-Obi', ['Dark']='Hachirin-no-Obi', ['Fire']='Hachirin-no-Obi', ['Ice']='Hachirin-no-Obi',
['Wind']='Hachirin-no-Obi',['Earth']='Hachirin-no-Obi', ['Lightning']='Hachirin-no-Obi', ['Water']='Hachirin-no-Obi'}
Sylph.Ashiya
サーバ: Sylph
Game: FFXI
Posts: 144
By Sylph.Ashiya 2015-06-20 22:28:48
Alrighty! Thanks a bunch! :)
By beaumb 2015-06-20 22:36:49
Nevermind. Apparently it was because I didn't have the Shortcuts addon on that computer. No idea how that was the cause but at least it works now. xD
Asura.Rinuko
サーバ: Asura
Game: FFXI
Posts: 144
By Asura.Rinuko 2015-06-22 05:58:03
Currently using this for blm
https://raw.githubusercontent.com/Kinematics/GearSwap-Jobs/master/BLM.lua
I want at <51% mp it equips Uggalepih Pendant. What and where do i add it?
Cerberus.Tidis
サーバ: Cerberus
Game: FFXI
Posts: 3927
By Cerberus.Tidis 2015-06-22 06:52:39
While I'm sure someone will eventually help you with this, can you not get one of the better neck pieces? Or are they unattainable right now?
Asura.Rinuko
サーバ: Asura
Game: FFXI
Posts: 144
By Asura.Rinuko 2015-06-22 07:30:27
While I'm sure someone will eventually help you with this, can you not get one of the better neck pieces? Or are they unattainable right now? I dont know. Reason I want to use that piece is that I'm not lv99 yet (currently 93ish) so if there is any better piece that is not to hard to obtain, i'm open to suggestions
Cerberus.Tidis
サーバ: Cerberus
Game: FFXI
Posts: 3927
By Cerberus.Tidis 2015-06-22 07:54:42
Understandable, I just assumed you were 99 already, the better neck pieces are:
Stoicheion Medal
Eddy Necklace
Deviant Necklace
As for the function for equipping Ugly Pendant, I can't help, I wish I could but I don't know enough about GS, functionally it would be very similar to the pre-existing function that equips the refresh obi when your MP is below 51% but it's the last little bit I can't work out with it.
Asura.Rinuko
サーバ: Asura
Game: FFXI
Posts: 144
By Asura.Rinuko 2015-06-22 08:57:23
Ahh, Stoicheion Medal looks interesting. Gonna get that untill i can get some 99 nuke piece
サーバ: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2015-06-22 17:40:21
I can't post it properly from my phone, but I will post it tonight if no one gets to it first.
サーバ: Asura
Game: FFXI
Posts: 363
By Asura.Vafruvant 2015-06-22 23:12:17
Ahh, Stoicheion Medal looks interesting. Gonna get that untill i can get some 99 nuke piece If you're interested in Stoicheion, you can just put that in your set and call it a wrap. If you still wanted Uggalepih, here's how to do it: Code function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' then
if state.MagicBurst.value then
equip(sets.magic_burst)
end
if player.mpp < 51 then
equip({neck="Uggalepih Pendant"})
end
end
end That combines your existing check for magic bursting with equipping the pendant.
[+]
Asura.Rinuko
サーバ: Asura
Game: FFXI
Posts: 144
By Asura.Rinuko 2015-06-25 04:13:09
Ahh, Stoicheion Medal looks interesting. Gonna get that untill i can get some 99 nuke piece If you're interested in Stoicheion, you can just put that in your set and call it a wrap. If you still wanted Uggalepih, here's how to do it: Code function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' then
if state.MagicBurst.value then
equip(sets.magic_burst)
end
if player.mpp < 51 then
equip({neck="Uggalepih Pendant"})
end
end
end That combines your existing check for magic bursting with equipping the pendant. I'm guessing i can use the same function for sorcerer's ring if that still a thing among today blm?
Carbuncle.Akivatoo
サーバ: Carbuncle
Game: FFXI
Posts: 263
By Carbuncle.Akivatoo 2015-06-25 05:28:31
Saevus Pendant +1 for lower tier nuke
By zaxtiss 2015-06-25 18:26:58
Ahh, Stoicheion Medal looks interesting. Gonna get that untill i can get some 99 nuke piece If you're interested in Stoicheion, you can just put that in your set and call it a wrap. If you still wanted Uggalepih, here's how to do it: Code function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' then
if state.MagicBurst.value then
equip(sets.magic_burst)
end
if player.mpp < 51 then
equip({neck="Uggalepih Pendant"})
end
end
end That combines your existing check for magic bursting with equipping the pendant. I'm guessing i can use the same function for sorcerer's ring if that still a thing among today blm?
i thought GS couldn't check for Magic bursts can anyone post an example of a non motes function to do that? i dont use any of his GS files would be greatful would make so much more use out of some of my gear
Seraph.Jacaut
サーバ: Seraph
Game: FFXI
Posts: 383
By Seraph.Jacaut 2015-06-26 14:28:37
can someone point to a spot that will explain how to set GS up with multiple augmented items. i tried http://www.ffxiah.com/forum/topic/45821/pup-gearswap/ but i dont know where to put the info in exactly. i put it in where the other gear augments were but i just kept getting nil value errors. im stoopid when it comes to this kinda stuff so thanks in advance ^^
Lakshmi.Byrth
VIP
サーバ: Lakshmi
Game: FFXI
Posts: 6184
By Lakshmi.Byrth 2015-06-26 14:31:22
Equip the gear you are interested in, then use //gs export
Go to the windower/addons/gearswap/export/ folder and open the created Lua file using a text editor. The piece of gear should be in there with the corresponding augment table.
Seraph.Jacaut
サーバ: Seraph
Game: FFXI
Posts: 383
By Seraph.Jacaut 2015-06-26 14:58:35
Equip the gear you are interested in, then use //gs export
Go to the windower/addons/gearswap/export/ folder and open the created Lua file using a text editor. The piece of gear should be in there with the corresponding augment table.
I got that far, its getting it into my .lua that i dont understand. i did exactly what that thread said to do, and it kept saying "taeon chapeau nil value" or something along those lines
サーバ: Fenrir
Game: FFXI
Posts: 354
By Fenrir.Divinian 2015-06-26 15:26:31
In the "data" folder that stores your .lua job files, there should also be an "export" folder. Go into it and you should see a .lua file named by your character name and date/time. Open that up with notepad++ and you can then cut/paste the augmented item from the export file into your .lua job file.
Edit: oh and I always take the whole line, i.e. hands={blahblah, MAB +9001}, cut, then paste the whole line in my .lua, just to make sure I didn't make any mistakes or change any weird squiggles.
Asura.Rinuko
サーバ: Asura
Game: FFXI
Posts: 144
By Asura.Rinuko 2015-06-26 16:10:36
Ahh, Stoicheion Medal looks interesting. Gonna get that untill i can get some 99 nuke piece If you're interested in Stoicheion, you can just put that in your set and call it a wrap. If you still wanted Uggalepih, here's how to do it: Code function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' then
if state.MagicBurst.value then
equip(sets.magic_burst)
end
if player.mpp < 51 then
equip({neck="Uggalepih Pendant"})
end
end
end That combines your existing check for magic bursting with equipping the pendant. I'm guessing i can use the same function for sorcerer's ring if that still a thing among today blm? So I got the Sorcerer's Ring to work on < 76% hp
This may seem silly but in one of my older sc xml i had a command inout whenever I /heal (exemple input --- Resting gear ---) and likewise when got back up and it switched into idle/pdt set. - Is this possible in lua?
Current blm lua: http://pastebin.com/TZZKn4eE
Seraph.Jacaut
サーバ: Seraph
Game: FFXI
Posts: 383
By Seraph.Jacaut 2015-06-26 18:25:09
In the "data" folder that stores your .lua job files, there should also be an "export" folder. Go into it and you should see a .lua file named by your character name and date/time. Open that up with notepad++ and you can then cut/paste the augmented item from the export file into your .lua job file.
Edit: oh and I always take the whole line, i.e. hands={blahblah, MAB +9001}, cut, then paste the whole line in my .lua, just to make sure I didn't make any mistakes or change any weird squiggles.
gahhh okay got it working with head, but when i do my feet at the end of a set it says expected to close'{' at line 169 ) near ')' and thats jibberish to me
last line looks like
feet={ name="Taeon Boots", augments={'"Mag.Atk.Bns."+9','"Triple Atk."+2',}})
Bismarck.Speedyjim
サーバ: Bismarck
Game: FFXI
Posts: 516
By Bismarck.Speedyjim 2015-06-27 00:03:51
In the "data" folder that stores your .lua job files, there should also be an "export" folder. Go into it and you should see a .lua file named by your character name and date/time. Open that up with notepad++ and you can then cut/paste the augmented item from the export file into your .lua job file.
Edit: oh and I always take the whole line, i.e. hands={blahblah, MAB +9001}, cut, then paste the whole line in my .lua, just to make sure I didn't make any mistakes or change any weird squiggles.
gahhh okay got it working with head, but when i do my feet at the end of a set it says expected to close'{' at line 169 ) near ')' and thats jibberish to me
last line looks like
feet={ name="Taeon Boots", augments={'"Mag.Atk.Bns."+9','"Triple Atk."+2',}}) That should mean that you missing an open bracket somewhere, so the ")" at line 169 isn't closing anything.
Kindly link your lua and somebody will find it.
Bismarck.Speedyjim
サーバ: Bismarck
Game: FFXI
Posts: 516
By Bismarck.Speedyjim 2015-06-27 00:05:40
Looking for help with my MNK.lua as it isn't equipping my Bhikku Cyclas +1 when Impetus is up. Any help is appreciated. My gear sets are in a sidecar.
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')
include('organizer-lib')
end
-- Setup vars that are user-independent. state.Buff vars initialized here will automatically be tracked.
function job_setup()
state.Buff.Footwork = buffactive.Footwork or false
state.Buff.Impetus = buffactive.Impetus or false
state.FootworkWS = M(false, 'Footwork on WS')
info.impetus_hit_count = 0
windower.raw_register_event('action', on_action_for_impetus)
end
-------------------------------------------------------------------------------------------------------------------
-- User setup functions for this job. Recommend that these be overridden in a sidecar file.
-------------------------------------------------------------------------------------------------------------------
-- Setup vars that are user-dependent. Can override this function in a sidecar file.
function user_setup()
state.OffenseMode:options('Normal', 'SomeAcc', 'FullAcc', 'Fodder')
state.WeaponskillMode:options('Normal', 'SomeAcc', 'FullAcc', 'Fodder')
state.HybridMode:options('Normal', 'PDT', 'Counter')
state.PhysicalDefenseMode:options('PDT', 'HP')
update_combat_form()
update_melee_groups()
select_default_macro_book()
gear.ws_feet = {name="Qaaxo Leggings", augments={'Attack+15','STR+12','"Mag.Atk.Bns."+15'}}
gear.acc_feet = {name="Qaaxo Leggings", augments={'Accuracy+15','STR+7','Phys. dmg. taken -3'}}
send_command('bind delete input /ws Victory Smite <t>')
send_command('bind Home input /ja Chakra <me>')
send_command('bind End input /ja Boost <me>')
end
function user_unload()
send_command('unbind `')
send_command('unbind ^-')
send_command('unbind ^=')
send_command('unbind delete')
send_command('unbind end')
send_command('unbind home')
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks for standard casting events.
-------------------------------------------------------------------------------------------------------------------
function pretarget(spell,action)
end
-- 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)
-- Don't gearswap for weaponskills when Defense is on.
if spell.type == 'WeaponSkill' and state.DefenseMode.current ~= 'None' then
eventArgs.handled = true
end
if spell.english == 'Berserk' then
if buffactive.Berserk then -- Change Berserk To Aggressor If Berserk Is On --
cancel_spell()
send_command('input /ja Aggressor <me>')
end
end
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 precast() is done.
function job_post_precast(spell, action, spellMap, eventArgs)
if spell.type == 'WeaponSkill' and state.DefenseMode.current ~= 'None' then
if state.Buff.Impetus and (spell.english == "Ascetic's Fury" or spell.english == "Victory Smite") then
-- Need 6 hits at capped dDex, or 9 hits if dDex is uncapped, for Tantra to tie or win.
if (state.OffenseMode.current == 'Fodder' and info.impetus_hit_count > 5) or (info.impetus_hit_count > 8) then
equip(sets.impetus_body)
end
elseif state.Buff.Footwork and (spell.english == "Dragon's Kick" or spell.english == "Tornado Kick") then
equip(sets.footwork_kick_feet)
end
-- Replace Moonshade Earring if we're at cap TP
if player.tp == 3000 then
equip(sets.precast.MaxTP)
end
end
end
function job_aftercast(spell, action, spellMap, eventArgs)
if spell.type == 'WeaponSkill' and not spell.interrupted and state.FootworkWS and state.Buff.Footwork then
send_command('cancel Footwork')
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)
-- Set Footwork as combat form any time it's active and Hundred Fists is not.
if buff == 'Footwork' and gain and not buffactive['hundred fists'] then
state.CombatForm:set('Footwork')
elseif buff == "Hundred Fists" and not gain and buffactive.footwork then
state.CombatForm:set('Footwork')
else
state.CombatForm:reset()
end
-- Hundred Fists and Impetus modify the custom melee groups
if buff == "Hundred Fists" or buff == "Impetus" then
classes.CustomMeleeGroups:clear()
if (buff == "Hundred Fists" and gain) or buffactive['hundred fists'] then
classes.CustomMeleeGroups:append('HF')
end
if (buff == "Impetus" and gain) or buffactive.impetus then
classes.CustomMeleeGroups:append('Impetus')
end
end
-- Update gear if any of the above changed
if buff == "Hundred Fists" or buff == "Impetus" or buff == "Footwork" then
handle_equipping_gear(player.status)
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
function customize_idle_set(idleSet)
if player.hpp < 75 then
idleSet = set_combine(idleSet, sets.ExtraRegen)
end
return idleSet
end
-- Called by the 'update' self-command.
function job_update(cmdParams, eventArgs)
update_combat_form()
update_melee_groups()
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
function update_combat_form()
if buffactive.footwork and not buffactive['hundred fists'] then
state.CombatForm:set('Footwork')
else
state.CombatForm:reset()
end
end
function update_melee_groups()
classes.CustomMeleeGroups:clear()
if buffactive['hundred fists'] then
classes.CustomMeleeGroups:append('HF')
end
if buffactive.impetus then
classes.CustomMeleeGroups:append('Impetus')
end
end
-- Select default macro book on initial load or subjob change.
function select_default_macro_book()
-- Default macro set/book
if player.sub_job == 'DNC' then
set_macro_page(2, 5)
elseif player.sub_job == 'NIN' then
set_macro_page(1, 5)
elseif player.sub_job == 'THF' then
set_macro_page(1, 5)
elseif player.sub_job == 'RUN' then
set_macro_page(1, 5)
else
set_macro_page(1, 5)
end
end
-------------------------------------------------------------------------------------------------------------------
-- Custom event hooks.
-------------------------------------------------------------------------------------------------------------------
-- Keep track of the current hit count while Impetus is up.
function on_action_for_impetus(action)
if state.Buff.Impetus then
-- count melee hits by player
if action.actor_id == player.id then
if action.category == 1 then
for _,target in pairs(action.targets) do
for _,action in pairs(target.actions) do
-- Reactions (bitset):
-- 1 = evade
-- 2 = parry
-- 4 = block/guard
-- 8 = hit
-- 16 = JA/weaponskill?
-- If action.reaction has bits 1 or 2 set, it missed or was parried. Reset count.
if (action.reaction % 4) > 0 then
info.impetus_hit_count = 0
else
info.impetus_hit_count = info.impetus_hit_count + 1
end
end
end
elseif action.category == 3 then
-- Missed weaponskill hits will reset the counter. Can we tell?
-- Reaction always seems to be 24 (what does this value mean? 8=hit, 16=?)
-- Can't tell if any hits were missed, so have to assume all hit.
-- Increment by the minimum number of weaponskill hits: 2.
for _,target in pairs(action.targets) do
for _,action in pairs(target.actions) do
-- This will only be if the entire weaponskill missed or was parried.
if (action.reaction % 4) > 0 then
info.impetus_hit_count = 0
else
info.impetus_hit_count = info.impetus_hit_count + 2
end
end
end
end
elseif action.actor_id ~= player.id and action.category == 1 then
-- If mob hits the player, check for counters.
for _,target in pairs(action.targets) do
if target.id == player.id then
for _,action in pairs(target.actions) do
-- Spike effect animation:
-- 63 = counter
-- ?? = missed counter
if action.has_spike_effect then
-- spike_effect_message of 592 == missed counter
if action.spike_effect_message == 592 then
info.impetus_hit_count = 0
elseif action.spike_effect_animation == 63 then
info.impetus_hit_count = info.impetus_hit_count + 1
end
end
end
end
end
end
--add_to_chat(123,'Current Impetus hit count = ' .. tostring(info.impetus_hit_count))
else
info.impetus_hit_count = 0
end
end Code -- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
-- Precast Sets
-- Precast sets to enhance JAs on use
sets.precast.JA['Hundred Fists'] = {legs="Hesychast's Hose +1"}
sets.precast.JA['Boost'] = {hands="Anchorite's Gloves +1"}
sets.precast.JA['Dodge'] = {feet="Anchorite's Gaiters +1"}
sets.precast.JA['Focus'] = {head="Anchorite's Crown"}
sets.precast.JA['Counterstance'] = {feet="Melee Gaiters +2"}
sets.precast.JA['Footwork'] = {}
sets.precast.JA['Formless Strikes'] = {body="Hesychast's Cyclas"}
sets.precast.JA['Mantra'] = {feet="Mel. Gaiters +2"}
organizer_items = {
Tinhaspa="Tinhaspa",
Ohrmazd="Ohrmazd"}
sets.precast.JA['Chi Blast'] = {
head="Uk'uxkaj Cap",body="Anchorite's Cyclas +1",hands="Hesychast's Gloves +1",
back="Tuilha Cape",legs="Bhikku Hose +1",feet="Anchorite's Gaiters +1"}
sets.precast.JA['Chakra'] = {ammo="Iron Gobbet",
head="Ejekamal Mask",ear1="Soil Pearl",ear2="Soil Pearl",
body="Anchorite's Cyclas +1",hands="Hesychast's Gloves +1",ring1="Terrasoul Ring",ring2="Terrasoul Ring",
back="Iximulew Cape",waist="Caudata Belt",legs="Kaabnax Trousers",feet="Sokushitsu Sune-Ate"}
-- Waltz set (chr and vit)
sets.precast.Waltz = {ammo="Iron Gobbet",
head="Uk'uxkaj Cap",
body="Anchorite's Cyclas +1",hands="Anchorite's Gloves +1",ring1="Terrasoul Ring",ring2="Asklepian Ring",
back="Iximulew Cape",waist="Caudata Belt",legs="Nahtirah Trousers",feet="Daihanshi Habaki"}
-- Don't need any special gear for Healing Waltz.
sets.precast.Waltz['Healing Waltz'] = {}
sets.precast.Step = {}
sets.precast.Flourish1 = {}
-- Fast cast sets for spells
sets.precast.FC = {ammo="Impatiens",body="Dread Jupon",ear2="Loquacious Earring"}
sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {neck="Magoraga Beads"})
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {ammo="Thew Bomblet",
head="Uk'uxkaj Cap",neck=gear.ElementalGorget,ear1="Moonshade Earring",ear2="Brutal Earring",
body="Bhikku Cyclas +1",hands="Anchorite's Gloves +1",ring1="Pyrosoul Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Windbuffet Belt +1",legs="Quiahuiz Trousers",
feet=gear.ws_feet}
sets.precast.WSSomeAcc = {ammo="Honed Tathlum",head="Whirlpool Mask"}
sets.precast.WSFullAcc = set_combine(sets.precast.WSSomeAcc, {body="Taeon Tabard",hands="Hesychast's Gloves +1",
back="Letalis Mantle",waist="Caudata Belt",legs="Bhikku Hose +1"})
sets.precast.MaxTP = {ear1="Trux Earring",ear2="Brutal Earring"}
sets.precast.WS.Acc = set_combine(sets.precast.WS, sets.precast.WSAcc)
sets.precast.WS.Mod = set_combine(sets.precast.WS, sets.precast.WSMod)
-- Specific weaponskill sets.
sets.precast.WS['Raging Fists'] = set_combine(sets.precast.WS, {
ammo="Potestas Bomblet",neck="Justiciar's Torque",body="Taeon Tabard",hands="Taeon Gloves",
ring1="Rajas Ring",back="Buquwik Cape",waist="Prosilio Belt +1"})
sets.precast.WS["Victory Smite"] = set_combine(sets.precast.WS, {neck="Rancor Collar",body="Taeon Tabard",hands="Taeon Gloves",
back="Buquwik Cape",waist="Prosilio Belt +1",legs="Bhikku Hose +1"})
sets.precast.WS['Shijin Spiral'] = set_combine(sets.precast.WS, {
ear2="Trux Earring",ring1="Rajas Ring",legs="Manibozho Brais",feet="Daihanshi Habaki"})
sets.precast.WS["Raging Fists"].SomeAcc = set_combine(sets.precast.WS["Raging Fists"], {
ammo="Honed Tathlum",hands="Hes. Gloves +1"})
sets.precast.WS["Victory Smite"].SomeAcc = set_combine(sets.precast.WS["Victory Smite"], {ammo="Honed Tathlum"})
sets.precast.WS["Shijin Spiral"].SomeAcc = set_combine(sets.precast.WS["Shijin Spiral"], {ammo="Honed Tathlum",hands="Hesychast's Gloves +1"})
sets.precast.WS["Raging Fists"].FullAcc = set_combine(sets.precast.WS["Victory Smite"].SomeAcc, {
body="Taeon Tabard",waist="Thunder Belt",legs="Manibozho Brais"})
sets.precast.WS["Victory Smite"].FullAcc = set_combine(sets.precast.WS["Victory Smite"].SomeAcc, {
head="Whirlpool Mask",neck="Light Gorget",body="Taeon Tabard",hands="Hes. Gloves +1",back="Letalis Mantle",legs="Bhikku Hose +1"})
sets.precast.WS["Shijin Spiral"].FullAcc = set_combine(sets.precast.WS["Victory Smite"].SomeAcc, {
head="Whirlpool Mask",neck="Light Gorget",body="Taeon Tabard",ring2="Mars's Ring",waist="Anguinus Belt"})
sets.precast.WS['Cataclysm'] = {
head="Uk'uxkaj Cap",neck="Stoicheion Medal",ear1="Friomisi Earring",ear2="Novio Earring",
body="Anchorite's Cyclas +1",hands="Anchorite's Gloves +1",ring1="Acumen Ring",ring2="Rajas Ring",
back="Toro Cape",waist="Thunder Belt",legs="Nahtirah Trousers",feet=gear.ws_feet}
-- Midcast Sets
sets.midcast.FastRecast = {
head="Ejekamal Mask",hands="Anchorite's Gloves +1",
waist="Black Belt",legs="Quiahuiz Trousers",feet="Otronif Boots +1"}
-- Specific spells
sets.midcast.Utsusemi = {
head="Ejekamal Mask",ear2="Loquacious Earring",
body="Anchorite's Cyclas +1",hands="Anchorite's Gloves +1",
waist="Black Belt",legs="Quiahuiz Trousers",feet="Otronif Boots +1"}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {head="Ocelomeh Headpiece +1",neck="Wiglen Gorget",
body="Hesychast's Cyclas",ring1="Sheltered Ring",ring2="Paguroidea Ring"}
-- Idle sets
sets.idle = {ammo="Iron Gobbet",
head="Felistris Mask",neck="Wiglen Gorget",ear1="Moonshade Earring",ear2="Brutal Earring",
body="Hesychast's Cyclas",hands="Otronif Gloves +1",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Repulse Mantle",waist="Black Belt",legs="Otronif Brais +1",feet="Herald's Gaiters"}
sets.idle.Town = {ammo="Potestas Bomblet",
head="Felistris Mask",neck="Asperity Necklace",ear1="Trux Earring",ear2="Brutal Earring",
body="Bhikku Cyclas +1",hands="Anchorite's Gloves +1",ring1="Rajas Ring",ring2="Epona's Ring",
back="Letalis Mantle",waist="Windbuffet Belt +1",legs="Bhikku Hose +1",feet="Herald's Gaiters"}
sets.idle.Weak = set_combine(sets.idle,{})
-- Defense sets
sets.defense.PDT = {ammo="Iron Gobbet",
head="Otronif Mask",neck="Wiglen Gorget",
body="Otronif Harness +1",hands="Otronif Gloves +1",ring1="Patricius Ring",ring2=gear.DarkRing.physical,
back="Shadow Mantle",waist="Black Belt",legs="Otronif Brais +1",feet=gear.acc_feet}
sets.defense.HP = {}
sets.defense.MDT = {ammo="Demonry Stone",
head="Felistris Mask",neck="Twilight Torque",ear1="Mujin Stud",ear2="Sanare Earring",
body="Anchorite's Cyclas +1",hands="Otronif Gloves +1",ring1="Shadow Ring",ring2=gear.DarkRing.magical,
back="Engulfer Cape +1",waist="Black Belt",legs="Nahtirah Trousers",feet="Daihanshi Habaki"}
sets.Kiting = {feet="Herald's Gaiters"}
sets.ExtraRegen = {head="Ocelomeh Headpiece +1"}
-- 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 sets
sets.engaged = {ammo="Potestas Bomblet",
head="Felistris Mask",neck="Asperity Necklace",ear1="Trux Earring",ear2="Brutal Earring",
body="Bhikku Cyclas +1",hands="Taeon Gloves",ring1="Rajas Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Windbuffet Belt +1",legs="Bhikku Hose +1",feet="Sokushitsu Sune-Ate"}
sets.engaged.SomeAcc = set_combine(sets.engaged, {ammo="Honed Tathlum",
ear1="Bladeborn Earring",ear2="Steelflash Earring",back="Letalis Mantle"})
sets.engaged.FullAcc = set_combine(sets.engaged.SomeAcc, {
head="Whirlpool Mask",neck="Iqabi Necklace",body="Bhikku Cyclas +1",back="Anchoret's Mantle",ring1="Patricius Ring",
waist="Anguinus Belt",feet=gear.acc_feet})
-- Mod set for trivial mobs (Thaumas Coat)
sets.engaged.Fodder = set_combine(sets.engaged, {body="Thaumas Coat"})
-- Defensive melee hybrid sets
sets.engaged.PDT = {ammo="Potestas Bomblet",
head="Felistris Mask",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Otronif Harness +1",hands="Otronif Gloves +1",ring1="Patricius Ring",ring2="Epona's Ring",
back="Shadow Mantle",waist="Black Belt",legs="Otronif Brais +1",feet="Otronif Boots +1"}
sets.engaged.SomeAcc.PDT = {ammo="Honed Tathlum",
head="Whirlpool Mask",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Qaaxo Harness",hands="Hesychast's Gloves +1",ring1="Patricius Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Anguinus Belt",legs="Otronif Brais +1",feet="Otronif Boots +1"}
sets.engaged.FullAcc.PDT = {ammo="Honed Tathlum",
head="Whirlpool Mask",neck="Twilight Torque",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Otronif Harness +1",hands="Otronif Gloves +1",ring1="Patricius Ring",ring2="Epona's Ring",
back="Anchoret's Mantle",waist="Anguinus Belt",legs="Otronif Brais +1",feet=gear.acc_feet}
-- Hundred Fists/Impetus melee set mods
sets.engaged.HF = set_combine(sets.engaged)
sets.engaged.SomeAcc.HF = set_combine(sets.engaged.SomeAcc)
sets.engaged.FullAcc.HF = set_combine(sets.engaged.FullAcc)
-- Footwork combat form
--[[sets.engaged.Footwork = {ammo="Thew Bomblet",
head="Felistris Mask",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Qaaxo Harness",hands="Hesychast's Gloves +1",ring1="Rajas Ring",ring2="Epona's Ring",
back="Atheling Mantle",waist="Windbuffet Belt +1",legs="Hesychast's Hose +1",feet="Anchorite's Gaiters +1"}
sets.engaged.Footwork.Acc = {ammo="Honed Tathlum",
head="Whirlpool Mask",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Otronif Harness +1",hands="Hesychast's Gloves +1",ring1="Rajas Ring",ring2="Epona's Ring",
back="Letalis Mantle",waist="Anguinus Belt",legs="Hesychast's Hose +1",feet="Anchorite's Gaiters +1"}]]--
-- Quick sets for post-precast adjustments, listed here so that the gear can be Validated.
sets.impetus_body = {body="Bhikku Cyclas +1"}
sets.footwork_kick_feet = {feet="Anchorite's Gaiters +1"}
end
Asura.Rinuko
サーバ: Asura
Game: FFXI
Posts: 144
By Asura.Rinuko 2015-06-27 04:00:19
Seems like my gs wont switch back to idle set today. (Worked yesterday before all crashes)
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 = {}
-- Additional local binds
send_command('bind ^` input /ma Stun <t>')
send_command('bind @` gs c activate MagicBurst')
select_default_macro_book()
end
-- Called when this job file is unloaded (eg: job change)
function user_unload()
send_command('unbind ^`')
send_command('unbind @`')
end
-- Define sets and vars used by this job file.
function init_gear_sets()
--------------------------------------
-- Start defining the sets
--------------------------------------
---- Precast Sets ----
-- Precast sets to enhance JAs
sets.precast.JA['Mana Wall'] = {feet="Goetia Sabots +2"}
sets.precast.JA.Manafont = {body="Sorcerer's Coat +2"}
-- equip to maximize HP (for Tarus) and minimize MP loss before using
convert
sets.precast.JA.Convert = {}
-- Fast cast sets for spells
sets.precast.FC = {ear2="Loquacious Earring", back="Swith Cape"}
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC,
{hands="Carapacho Cuffs"})
sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC,
{neck="Stoicheion Medal"})
sets.precast.FC.Cure = set_combine(sets.precast.FC)
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 = {}
-- Specific weaponskill sets. Uses the base set if an appropriate
WSMod version isn't found.
sets.precast.WS['Vidohunir'] = {}
---- Midcast Sets ----
sets.midcast.FastRecast = {
ear2="Loquacious Earring", back="Swith Cape"}
sets.midcast.Cure = {main="chatoyant staff"}
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast['Enhancing Magic'] = {hands="Carapacho Cuffs"}
sets.midcast.Stoneskin = set_combine(sets.midcast['Enhancing Magic'],
{hands="Carapacho Cuffs"})
sets.midcast['Enfeebling Magic'] = {body="wizard's coat"}
sets.midcast.ElementalEnfeeble = sets.midcast['Enfeebling Magic']
sets.midcast['Dark Magic'] = {legs="wizard's tonban"}
sets.midcast.Drain = {legs="wizard's tonban"}
sets.midcast.Aspir = sets.midcast.Drain
sets.midcast.Stun = sets.precast.FC
sets.midcast.BardSong = {}
-- Elemental Magic sets
sets.midcast['Elemental Magic'] = {main="teiwaz", sub="wize strap",
ammo="snow sachet", head="wayfarer circlet", neck="stoicheion medal",
ear1="hecate's earring", ear2="moldavite earring", body="wayfarer robe",
hands="wayfarer cuffs", ring1="shiva ring", ring2="shiva ring",
back="goetia mantle", waist="cognition belt", legs="wayfarer slops",
feet="wayfarer clogs"}
sets.midcast['Elemental Magic'].Resistant = {main="teiwaz", sub="wize
strap", ammo="snow sachet", head="wayfarer circlet", neck="stoicheion
medal", ear1="hecate's earring", ear2="moldavite earring", body="wayfarer
robe", hands="wayfarer cuffs", ring1="shiva ring", ring2="shiva ring",
back="goetia mantle", waist="cognition belt", legs="wayfarer slops",
feet="wayfarer clogs"}
sets.midcast['Elemental Magic'].HighTierNuke = set_combine
(sets.midcast['Elemental Magic'], {sub="Wizzan Grip"})
sets.midcast['Elemental Magic'].HighTierNuke.Resistant = set_combine
(sets.midcast['Elemental Magic'], {sub="Wizzan Grip"})
-- Minimal damage gear for procs.
sets.midcast['Elemental Magic'].Proc = {}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main="Chatoyant Staff",body="errant hpl.", neck="beak
necklace", ear1="magnetic earring", waist="hierarch belt"}
-- Idle sets
-- Normal refresh idle set
sets.idle = {main="Terra's Staff", body="dalmatica", head="wayfarer
circlet", neck="stoicheion medal", ear1="hecate's earring",
ear2="moldavite earring", hands="wayfarer cuffs", ring1="shiva ring",
ring2="shiva ring", back="goetia mantle", waist="cognition belt",
legs="wayfarer slops", feet="wayfarer clogs"}
-- Idle mode that keeps PDT gear on, but doesn't prevent normal gear
swaps for precast/etc.
sets.idle.PDT = {main="Terra's Staff"}
-- Idle mode scopes:
-- Idle mode when weak.
sets.idle.Weak = {}
-- Town gear.
sets.idle.Town = {}
-- Defense sets
sets.defense.PDT = {main="Terra's Staff"}
sets.defense.MDT = {}
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="Goetia Sabots +2"}
sets.magic_burst = {neck="Mizukage-no-Kubikazari", ring1="Sorcerer's
Ring"}
-- 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 = {}
end
--------------------------------------------------------------------------
-----------------------------------------
-- Job-specific hooks for standard casting events.
--------------------------------------------------------------------------
-----------------------------------------
-- Set eventArgs.handled to true if we don't want any automatic gear
equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped
on precast.
function job_precast(spell, action, spellMap, eventArgs)
if spellMap == 'Cure' or spellMap == 'Curaga' then
gear.default.obi_waist = "Goading Belt"
elseif spell.skill == 'Elemental Magic' then
gear.default.obi_waist = "Sekhmet Corset"
if state.CastingMode.value == 'Proc' then
classes.CustomClass = 'Proc'
end
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear
equipping to be done.
function job_midcast(spell, action, spellMap, eventArgs)
end
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Elemental Magic' then
if state.MagicBurst.value then
equip(sets.magic_burst)
end
if player.hpp < 76 then
equip({ring1="Sorcerer's Ring"})
end
end
end
function job_aftercast(spell, action, spellMap, eventArgs)
-- Lock feet after using Mana Wall.
if not spell.interrupted then
if spell.english == 'Mana Wall' then
enable('feet')
equip(sets.buff['Mana Wall'])
disable('feet')
elseif spell.skill == 'Elemental Magic' then
state.MagicBurst:reset()
end
end
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
edit: Testing in battle, seem only skip switching back to idle when in town
サーバ: Asura
Game: FFXI
Posts: 415
By Asura.Cambion 2015-06-27 05:00:22
last line looks like
feet={ name="Taeon Boots", augments={'"Mag.Atk.Bns."+9','"Triple Atk."+2',}})
There are 5 brackets in that line. I assume it should always be an even number.
Copy/Paste from my own lua:
hands={ name="Taeon Gloves", augments={'"Waltz" potency +5%',}}
Looks like the very last ) of yours shouldn't be there.
Unless it's part of a set_combine? in which case we need to see more than what you gave us.
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.
|
|