|
Black Mage Gear Swap questions
By Shiva.Wanoyano 2016-06-17 12:41:17
if spell.english == 'Mana Wall' then
enable('feet', 'back')
equip(sets.buff['Mana Wall'])
disable('feet', 'back')
is this chunk of coding not working for neone else or just me?
It's not disabling the ft or back
Fenrir.Snaps
Server: Fenrir
Game: FFXI
Posts: 1139
By Fenrir.Snaps 2016-06-17 12:54:55
That's going to disable your feet/back for everything else. I don't know if that's what you want to do or not, but I don't recommend it. I think it's a shitty solution to the problem. What I do is this.
Code function job_buff_change(buff, gain)
if buff == "Mana Wall" then
handle_equipping_gear(player.status)
end
end
function customize_idle_set(idleSet)
if buffactive['Mana Wall'] then
return set_combine(idleSet, {feet='Wicce Sabots +1', back="Taranus's Cape"})
else
return idleSet
end
end
function customize_melee_set(meleeSet)
if buffactive['Mana Wall'] then
return set_combine(meleeSet, {feet='Wicce Sabots +1', back="Taranus's Cape"})
else
return meleeSet
end
end
Any time you have mana wall up your manawall gear will be put into your idle/melee sets only.
By Shiva.Wanoyano 2016-06-17 14:10:47
well i was trying to fulltime the back and feet during manawall.
ya i got the buffactive under customize idleset that makes it work atleast under idle but the disable(back,ft) part is not disabling, might just try it later later using console commands
Necro Bump Detected!
[37 days between previous and next post]
Server: Asura
Game: FFXI
Posts: 1326
By Asura.Azagarth 2016-07-24 20:04:00
I am new to blm, but am looking to get a lua that will do everything blm needs, plus have rules of obi and sets for death.
Could anyone hook me up with this please?
Asura.Ramsy
Server: Asura
Game: FFXI
Posts: 281
By Asura.Ramsy 2016-08-10 19:46:04
I am new to blm, but am looking to get a lua that will do everything blm needs, plus have rules of obi and sets for death.
Could anyone hook me up with this please? Looking for the same ^^
Odin.Lygre
Server: Odin
Game: FFXI
Posts: 89
By Odin.Lygre 2016-08-10 21:59:27
Code -- This is lua is built using Mote's modified includes,
-- which you can find in my GearSwap/libs folder here: https://github.com/Lygre/addons/tree/mac-blm/GearSwap/libs
---- Macro/Keybind/Toggles/SelfCommands you may need
-- Magic Burst: /console gs c toggle MagicBurst
-- AF Body: /console gs c toggle ConsMP
-- AOE for auto nuke: /console gs c toggle AOE
--- This is makes the nuke() function use AOE nukes or not
-- Element for auto nuke: /console gs c element (Earth, Wind, Ice, Fire, Water, Lightning) - case sensitive
--- Selects an element for nuke() to use
-- Auto Nuke: /console gs c nuke
-- Death Mode: /console gs c toggle DeatCast
--- Saved Death Mode toggle for last
--- This one toggle will handle everything for Death
--- This includes idle/engaged, casting other spells/self-buffs
--- The only other thing you have to do is the Magic Burst toggle,
--- as it decides whether the handler will put your Death-specific MB set on over your
--- regular one.
--- It also remembers what casting mode you were in when you turned Death Mode on
--- and return to it upon exiting Death Mode
-------------------------------------------------------------------------------------------------------------------
-- 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.
-------------------------------------------------------------------------------------------------------------------
-- 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 job_setup()
state.OffenseMode:options('None', 'Locked')
state.CastingMode:options('Normal', 'Mid', 'Resistant', 'CMP','DeatMB')
state.IdleMode:options('Normal', 'PDT')
MagicBurstIndex = 0
state.MagicBurst = M(false, 'Magic Burst')
state.ConsMP = M(false, 'AF Body')
state.DeatCast = M(false, 'Death Mode')
element_table = L{'Earth','Wind','Ice','Fire','Water','Lightning'}
state.AOE = M(false, 'AOE')
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'}
degrade_array = {
['Fire'] = {'Fire','Fire II','Fire III','Fire IV','Fire V','Fire VI'},
['Firega'] = {'Firaga','Firaga II','Firaga III','Firaja'},
['Ice'] = {'Blizzard','Blizzard II','Blizzard III','Blizzard IV','Blizzard V','Blizzard VI'},
['Icega'] = {'Blizzaga','Blizzaga II','Blizzaga III','Blizzaja'},
['Wind'] = {'Aero','Aero II','Aero III','Aero IV','Aero V','Aero VI'},
['Windga'] = {'Aeroga','Aeroga II','Aeroga III','Aeroja'},
['Earth'] = {'Stone','Stone II','Stone III','Stone IV','Stone V','Stone VI'},
['Earthga'] = {'Stonega','Stonega II','Stonega III','Stoneja'},
['Lightning'] = {'Thunder','Thunder II','Thunder III','Thunder IV','Thunder V','Thunder VI'},
['Lightningga'] = {'Thundaga','Thundaga II','Thundaga III','Thundaja'},
['Water'] = {'Water', 'Water II','Water III', 'Water IV','Water V','Water VI'},
['Waterga'] = {'Waterga','Waterga II','Waterga III','Waterja'},
['Aspirs'] = {'Aspir','Aspir II','Aspir III'},
['Sleepgas'] = {'Sleepga','Sleepga II'}
}
-- Additional local binds
send_command('bind ^` gs c toggle MagicBurst')
send_command('bind !` gs c toggle ConsMP')
send_command('bind @` gs c toggle DeatCast')
organizer_items = {aeonic="Khatvanga"}
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'] = {back="Taranus's cape",feet="Wicce 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 = {}
sets.precast.FC['Enhancing Magic'] = set_combine(sets.precast.FC, {waist="Siegel Sash"})
sets.precast.FC['Enfeebling Magic'] = sets.precast.FC
sets.precast.FC['Elemental Magic'] = set_combine(sets.precast.FC, {ear1="Barkarole earring"})
sets.precast.FC['Healing Magic'] = set_combine(sets.precast.FC, {body="Heka's Kalasiris",legs="Doyen pants", back="Pahtli Cape"})
--Death sets
-- Default Idle set while Death Mode is on
sets.DeatCastIdle = {}
-- Default FC set when Death Mode is on and no matching DeatMB subtable is found for specific spell
---More specific FC sets under Death Mode could be implemented, but I really saw no point.
sets.precast.FC.DeatMB = {}
-- Base midcast table for actually casting 'Death'
sets.midcast['Death'] = {}
-- Set to be imposed on top of above base Death set when Death Mode and Magic Burst Mode are both on
sets.MB_death = {}
-- Weaponskill sets
-- Default set for any weaponskill that isn't any more specifically defined
sets.precast.WS = {}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Myrkr'] = {}
---- Midcast Sets ----
sets.midcast.FastRecast = {}
sets.midcast['Healing Magic'] = {}
sets.midcast['Enhancing Magic'] = {}
sets.midcast.Refresh = {}
sets.midcast.Haste = {}
sets.midcast.Phalanx = {}
sets.midcast.Aquaveil = {}
sets.midcast.Stoneskin = {}
sets.midcast['Enfeebling Magic'] = {}
sets.midcast['Enfeebling Magic'].Mid = set_combine(sets.midcast['Enfeebling Magic'],{})
sets.midcast['Enfeebling Magic'].Resistant = set_combine(sets.midcast['Enfeebling Magic'].Mid, { })
sets.midcast.ElementalEnfeeble = sets.midcast['Enfeebling Magic']
sets.midcast['Dark Magic'] = {}
sets.midcast.Drains = set_combine(sets.midcast['Dark Magic'], {})
sets.midcast.Aspirs = sets.midcast.Drains
sets.midcast.Stun = {}
-- Elemental Magic sets
sets.midcast['Elemental Magic'] = {}
sets.midcast['Elemental Magic'].Mid = set_combine(sets.midcast['Elemental Magic'], {})
sets.midcast['Elemental Magic'].Resistant = set_combine(sets.midcast['Elemental Magic'].Mid, {})
sets.midcast['Elemental Magic'].CMP = set_combine(sets.midcast['Elemental Magic'], {})
sets.midcast['Elemental Magic'].HighTierNuke = set_combine(sets.midcast['Elemental Magic'], {})
sets.midcast['Elemental Magic'].HighTierNuke.Mid = set_combine(sets.midcast['Elemental Magic'].HighTierNuke, {})
sets.midcast['Elemental Magic'].HighTierNuke.Resistant = set_combine(sets.midcast['Elemental Magic'].HighTierNuke.Mid, {})
sets.midcast['Elemental Magic'].HighTierNuke.CMP = set_combine(sets.midcast['Elemental Magic'].HighTierNuke, {})
sets.midcast.Impact = {head=empty,body="Twilight Cloak"}
--Death Midcast subtables
---The foremost set for each magic skill exists to fall back on while Death Mode is on, and no more specifically defined set
---exists for the spell
----To add more specific sets, as seen below on line 163, define a specific set for either the spell's name or corresponding spellMap
----(This set can be the empty set '{}', if you don't care to use it outside of Death Mode or something)
----e.g. sets.midcast.Tornado = {}
----Then define another set subtable, e.g. sets.midcast.Tornado.DeatMB = {what-have-you}
sets.midcast.FastRecast.DeatMB = sets.precast.FC.DeatMB
---Death Enhancing Magic
sets.midcast['Enhancing Magic'].DeatMB = set_combine(sets.precast.FC.DeatMB, {})
----Death Refresh specific
sets.midcast.Refresh.DeatMB = set_combine(sets.midcast['Enhancing Magic'].DeatMB, {head="Amalric Coif"})
---Death Enfeebling Magic
sets.midcast['Enfeebling Magic'].DeatMB = set_combine(sets.precast.FC.DeatMB, {})
---Death Dark Magic
sets.midcast['Dark Magic'].DeatMB = set_combine(sets.precast.FC.DeatMB, {})
----Death Aspirs spellMap specific
sets.midcast.Aspirs.DeatMB = set_combine(sets.precast.FC.DeatMB, {})
---Death Elemental Magic
sets.midcast['Elemental Magic'].DeatMB = set_combine(sets.precast.FC.DeatMB, {})
---Death Healing Magic
sets.midcast['Healing Magic'].DeatMB = set_combine(sets.precast.FC.DeatMB, {})
--Set to be overlaid on top of the default midcast set for the spell you're casting when Magic Burst mode is toggled on
--(excluding when Death Mode is on.[see: sets.MB_death])
sets.magic_burst = {}
--Set to be equipped when Day/Weather match current spell element
sets.Obi = {waist='Hachirin-no-Obi'}
-- Resting sets
sets.resting = {}
-- Idle sets
-- Normal refresh idle set
sets.idle = { }
-- Idle mode that keeps PDT gear on, but doesn't prevent normal gear swaps for precast/etc.
sets.idle.PDT = {}
-- Town gear.
sets.idle.Town = sets.idle
sets.TreasureHunter = {waist="Chaac Belt"}
-- Set for Conserve MP toggle, puts AF body on
sets.ConsMP = {body="Spaekona's coat +1"}
-- Defense sets
sets.defense.PDT = {}
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'] = {back="Taranus's cape",feet="Wicce Sabots +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 group
--!!!!!Commented out until I make rule to handle engaged set during death mode (will use customize_melee_set)
--[[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)
enable('feet','back')
if state.DeatCast.value then
if spell.action_type == 'Magic' then
classes.CustomClass = 'DeatMB'
end
elseif spell.type == 'BlackMagic' and spell.target.type == 'MONSTER' then
refine_various_spells(spell, action, spellMap, eventArgs)
end
end
function job_post_precast(spell, action, spellMap, eventArgs)
if state.DeatCast.value then
return
elseif spell.english == "Impact" then
equip({head=empty,body="Twilight Cloak"})
elseif spellMap == 'Cure' or spellMap == 'Curaga' then
gear.default.obi_waist = "Hachirin-no-obi"
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)
if state.DeatCast.value then
if spell.action_type == 'Magic' then
if spell.english == 'Death' then
equip(sets.midcast['Death'])
else
classes.CustomClass = 'DeatMB'
state.CastingMode:set('DeatMB')
end
end
end
end
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.action_type == 'Magic' and state.MagicBurst.value then
if state.DeatCast.value then
if spell.english == 'Death' then
equip(sets.MB_death)
elseif spell.skill == 'Elemental Magic' then
if state.MagicBurst.value and sets.magic_burst then
local equipSet = sets.magic_burst
if equipSet[spell.english] then
equipSet = equipSet[spell.english]
end
if equipSet[spellMap] then
equipSet = equipSet[spellMap]
end
if equipSet[state.CastingMode.value] then
equipSet = equipSet[state.CastingMode.value]
end
equip(equipSet)
end
end
end
end
if spell.element == world.day_element or spell.element == world.weather_element then
if string.find(spell.english,'helix') then
equip(sets.midcast.Helix)
else
equip(sets.Obi)
end
end
if spell.skill == 'Elemental Magic' and state.ConsMP.value and not state.DeatCast.value then
equip(sets.ConsMP)
end
end
function job_aftercast(spell, action, spellMap, eventArgs)
-- Lock feet after using Mana Wall.
if buffactive['Mana Wall'] and not state.DeatCast.value then
enable('feet','back')
equip(sets.buff['Mana Wall'])
disable('feet','back')
end
if not spell.interrupted then
if spell.english == "Sleep II" or spell.english == "Sleepga II" then -- Sleep II Countdown --
send_command('wait 60;input /echo Sleep Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep Effect: [WEARING OFF IN 5 SEC.]')
elseif spell.english == "Sleep" or spell.english == "Sleepga" then -- Sleep & Sleepga Countdown --
send_command('wait 30;input /echo Sleep Effect: [WEARING OFF IN 30 SEC.];wait 15;input /echo Sleep Effect: [WEARING OFF IN 15 SEC.];wait 10;input /echo Sleep Effect: [WEARING OFF IN 5 SEC.]')
elseif spell.english == "Break" then -- Break Countdown --
send_command('wait 25;input /echo Break Effect: [WEARING OFF IN 5 SEC.]')
elseif spell.english == "Paralyze" then -- Paralyze Countdown --
send_command('wait 115;input /echo Paralyze Effect: [WEARING OFF IN 5 SEC.]')
elseif spell.english == "Slow" then -- Slow Countdown --
send_command('wait 115;input /echo Slow Effect: [WEARING OFF IN 5 SEC.]')
end
end
end
function nuke(spell, action, spellMap, eventArgs)
if player.target.type == 'MONSTER' then
if state.AOE.value then
send_command('input /ma "'..degrade_array[element_table:append('ga')][#degrade_array[element_table:append('ga')]]..'" '..tostring(player.target.name))
else
send_command('input /ma "'..degrade_array[element_table][#degrade_array[element_table]]..'" '..tostring(player.target.name))
end
else
add_to_chat(5,'A Monster is not targetted.')
end
end
function job_self_command(commandArgs, eventArgs)
if commandArgs[1] == 'element' then
if commandArgs[2] then
if element_table:contains(commandArgs[2]) then
element_table = commandArgs[2]
add_to_chat(5, 'Current Nuke element ['..element_table..']')
else
add_to_chat(5,'Incorrect Element value')
return
end
else
add_to_chat(5,'No element specified')
end
elseif commandArgs[1] == 'nuke' then
nuke()
end
end
function refine_various_spells(spell, action, spellMap, eventArgs)
local aspirs = S{'Aspir','Aspir II','Aspir III'}
local sleeps = S{'Sleep','Sleep II'}
local sleepgas = S{'Sleepga','Sleepga II'}
local newSpell = spell.english
local spell_recasts = windower.ffxi.get_spell_recasts()
local cancelling = 'All '..spell.english..' spells are on cooldown. Cancelling spell casting.'
local spell_index
if spell_recasts[spell.recast_id] > 0 then
if spell.skill == 'Elemental Magic' then
local ele = tostring(spell.element):append('ga')
--local ele2 = string.sub(ele,1,-2)
if table.find(degrade_array[ele],spell.name) then
spell_index = table.find(degrade_array[ele],spell.name)
if spell_index > 1 then
newSpell = degrade_array[ele][spell_index - 1]
add_to_chat(8,spell.name..' Canceled: ['..player.mp..'/'..player.max_mp..'MP::'..player.mpp..'%] Casting '..newSpell..' instead.')
send_command('@input /ma '..newSpell..' '..tostring(spell.target.raw))
eventArgs.cancel = true
end
else
spell_index = table.find(degrade_array[spell.element],spell.name)
if spell_index > 1 then
newSpell = degrade_array[spell.element][spell_index - 1]
add_to_chat(8,spell.name..' Canceled: ['..player.mp..'/'..player.max_mp..'MP::'..player.mpp..'%] Casting '..newSpell..' instead.')
send_command('@input /ma '..newSpell..' '..tostring(spell.target.raw))
eventArgs.cancel = true
end
end
elseif aspirs:contains(spell.name) then
spell_index = table.find(degrade_array['Aspirs'],spell.name)
if spell_index > 1 then
newSpell = degrade_array['Aspirs'][spell_index - 1]
add_to_chat(8,spell.name..' Canceled: ['..player.mp..'/'..player.max_mp..'MP::'..player.mpp..'%] Casting '..newSpell..' instead.')
send_command('@input /ma '..newSpell..' '..tostring(spell.target.raw))
eventArgs.cancel = true
end
elseif sleepgas:contains(spell.name) then
spell_index = table.find(degrade_array['Sleepgas'],spell.name)
if spell_index > 1 then
newSpell = degrade_array['Sleepgas'][spell_index - 1]
add_to_chat(8,spell.name..' Canceled: ['..player.mp..'/'..player.max_mp..'MP::'..player.mpp..'%] Casting '..newSpell..' instead.')
send_command('@input /ma '..newSpell..' '..tostring(spell.target.raw))
eventArgs.cancel = true
end
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','back')
handle_equipping_gear(player.status)
end
if buff == "Commitment" and not gain then
equip({ring2="Capacity Ring"})
if player.equipment.right_ring == "Capacity Ring" then
disable("ring2")
else
enable("ring2")
end
end
end
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
if stateField == 'Offense Mode' then
if newValue == 'Locked' then
disable('main','sub','range')
else
enable('main','sub','range')
end
end
if stateField == 'Death Mode' then
if newValue == true then
state.OffenseMode:set('Locked')
predeathcastmode = state.CastingMode.value
--[[Insert 'equip(<set consisting of Death weapon and sub, to have them automatically lock when changing into Death mode>)']]
elseif newValue == false then
state.CastingMode:set(predeathcastmode)
end
end
end
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements standard library decisions.
-------------------------------------------------------------------------------------------------------------------
--[[function job_update(cmdParams, eventArgs)
job_display_current_state(eventArgs)
eventArgs.handled = true
end]]
function display_current_job_state(eventArgs)
eventArgs.handled = true
local msg = ''
if state.OffenseMode.value ~= 'None' then
msg = msg .. 'Combat ['..state.OffenseMode.value..']'
if state.CombatForm.has_value then
msg = msg .. ' (' .. state.CombatForm.value .. ')'
end
msg = msg .. ', '
end
--[[if state.HybridMode.value ~= 'Normal' then
msg = msg .. '/' .. state.HybridMode.value
end]]
msg = msg .. 'Casting ['..state.CastingMode.value..'], Idle ['..state.IdleMode.value..']'
if state.MagicBurst.value then
msg = msg .. ', MB [ON]'
else
msg = msg .. ', MB [OFF]'
end
if state.ConsMP.value then
msg = msg .. ', AF Body [ON]'
else
msg = msg .. ', AF Body [OFF]'
end
if state.DeatCast.value then
msg = msg .. ', Death Mode [ON]'
else
msg = msg .. ', Death Mode [OFF]'
end
if state.DefenseMode.value ~= 'None' then
msg = msg .. ', ' .. 'Defense: ' .. state.DefenseMode.value .. ' (' .. state[state.DefenseMode.value .. 'DefenseMode'].value .. ')'
end
if state.Kiting.value then
msg = msg .. ', Kiting [ON]'
end
if state.PCTargetMode.value ~= 'default' then
msg = msg .. ', Target PC: '..state.PCTargetMode.value
end
if state.SelectNPCTargets.value == true then
msg = msg .. ', Target NPCs'
end
add_to_chat(122, msg)
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
end
-- Modify the default idle set after it was constructed.
--- This is where I handle Death Mode Idle set construction, rather than weave it into the Idle state var
function customize_idle_set(idleSet)
if state.DeatCast.value then
idleSet = set_combine(idleSet, sets.DeatCastIdle)
end
if player.mpp < 51 then
idleSet = set_combine(idleSet, sets.latent_refresh)
end
if buffactive['Mana Wall'] then
idleSet = set_combine(idleSet, sets.buff['Mana Wall'])
end
return idleSet
end
--- This is where I handle Death Mode Melee set modifications
function customize_melee_set(meleeSet)
if state.DeatCast.value then
meleeSet = set_combine(meleeSet, sets.DeatCastIdle)
end
if buffactive['Mana Wall'] then
meleeSet = set_combine(meleeSet, sets.buff['Mana Wall'])
end
return meleeSet
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, 19)
end
Server: Asura
Game: FFXI
Posts: 32
By Asura.Umisame 2016-08-31 04:42:09
Hello im using Feary's Lua and seems it does not work good for me, it changes too fast from fastcast to nuke equip and then to idle equip, i have 60% fast cast and it isnt working. I saw that there is a cast_delay() for precast, it works for FC but then i dont get full dmg from midcast nuke equip. Is there a way to fix this?
Edit: Nvm, it working fine seems it changes very fast but fast cast takes effect.
By aigulfe 2016-09-29 12:08:27
Having an issue where Myrkr is putting me into the wrong idle mode and wondered if this had been an issue for anyone else. I put burst mode and death mode on so I'm supposed to idle in my death idle set. And I do for pretty much everything. But when I myrkr, something happens that doesn't even show up in showswaps. It puts on my myrkr set, hits the WS, puts my death idle set on and all of this shows in showswaps. No problem thus far. Then the MP return message pops up and.... im in my normal idle gear even though showswaps doesnt reflect any of that. Any ideas? There's nothing I can find as the cause of this.
Server: Leviathan
Game: FFXI
Posts: 3753
By Leviathan.Celebrindal 2016-09-29 12:29:36
Ate you engaged for Myrkr? I know some BLMs actually engage to use (not necessary, btw)and it could be defaulting to your "engaged" set over your Death idle.
By aigulfe 2016-09-29 13:05:07
nah, i used to do that but now I just target the mob and hit the macro. and even when i dont target a mob at all just to test it, it puts me back at 1935 ish
Ragnarok.Flippant
Server: Ragnarok
Game: FFXI
Posts: 660
By Ragnarok.Flippant 2016-09-29 13:59:30
Having an issue where Myrkr is putting me into the wrong idle mode and wondered if this had been an issue for anyone else. I put burst mode and death mode on so I'm supposed to idle in my death idle set. And I do for pretty much everything. But when I myrkr, something happens that doesn't even show up in showswaps. It puts on my myrkr set, hits the WS, puts my death idle set on and all of this shows in showswaps. No problem thus far. Then the MP return message pops up and.... im in my normal idle gear even though showswaps doesnt reflect any of that. Any ideas? There's nothing I can find as the cause of this.
I don't know what message you're referring to or what file you're using (if it's one that's been posted here), but the only way I imagine showswaps isn't showing something is if you're using in-game commands to swap gear.
By aigulfe 2016-09-29 14:06:47
^^ think you may have helped me fix it. I'm semi new to gs (as Im sure you figured lol) and my myrkr macro still had an old /equipset line after it... when I first tried this lua out, I wasnt sure if myrkr was functioning right because my MP return seemed low and tried to disable it in the lua and equip gear the old way. Then I added it back in and.... didnt update macro. i'll have to go test it rq.
Server: Asura
Game: FFXI
Posts: 115
By Asura.Pintseyes 2016-09-29 16:37:42
nah, i used to do that but now I just target the mob and hit the macro. and even when i dont target a mob at all just to test it, it puts me back at 1935 ish
You don't have to target anything, myrkr is a <me> macro meaning the target is nothing or self.
By olson2189 2016-10-05 14:32:23
What have most people been doing to turn on death sets? It seems like there's quite a few different ways to do it. As a disclaimer, I'm using Mote's luas as a starting point, and what I'm thinking is: create a 'death' mode with a keybind to toggle on and off (as opposed to simply adding a death castingmode). Then from there, handle the gear equipping entirely in the precast, midcast, and aftercast functions by checking whether or not death mode is on. I've seen some people using custom classes, and I don't fully understand those, but it seems like I should be able to accomplish it as I described above.
Fenrir.Snaps
Server: Fenrir
Game: FFXI
Posts: 1139
By Fenrir.Snaps 2016-10-05 15:33:50
I use a high mp casting mode and a high mp idle mode and define the following sets.
sets.idle.HighMP
sets.precast.FC.HighMP
sets.midcast.Death.HighMP
There are a few other sets I define for HighMP as I don't like gimping my MP if I need to cast Stoneskin or whatever.
So I recently returned and started using gear swap and everything seems to be working minus putting on my nuking gear midcast before my elemental magic goes off. It seems to work for spells like frost and rasp but not for actual nukes. Any help would be appreciated
this is my .xml
-------------------------------------------------------------------------------------------------------------------
-- 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()
-- 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
options.CastingModes = {'Normal', 'Resistant', 'Proc'}
options.OffenseModes = {'None', 'Normal'}
options.DefenseModes = {'Normal'}
options.WeaponskillModes = {'Normal'}
options.IdleModes = {'Normal', 'PDT'}
options.RestingModes = {'Normal'}
options.PhysicalDefenseModes = {'PDT'}
options.MagicalDefenseModes = {'MDT'}
state.Defense.PhysicalMode = 'PDT'
state.OffenseMode = 'None'
-- Default macro set/book
set_macro_page(1, 15)
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
--------------------------------------
---- 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 = {
head="Kaabanax Hat",neck="Jeweled Collar",ear2="Loquacious Earring",
body="Anhur Robe",ring1="Prolix Ring",
back="Swith Cape",waist="Witful Belt",legs="Wayfarer Slops",feet="Chelona Boots"}
sets.precast.FC.EnhancingMagic = set_combine(sets.precast.FC, {waist="Siegel Sash"})
sets.precast.FC.ElementalMagic = set_combine(sets.precast.FC, {head="Goetia Petasos +2"})
sets.precast.FC.Cure = set_combine(sets.precast.FC, {body="Anhur Robe", 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 = {}
-- Specific weaponskill sets. Uses the base set if an appropriate WSMod version isn't found.
sets.precast.WS['Vidohunir'] = {}
---- Midcast Sets ----
sets.midcast.FastRecast = {
head="Nahtirah Hat",ear2="Loquacious Earring",
body="Vanir Cotehardie",hands="Bokwus Gloves",ring1="Prolix Ring",
back="Swith Cape",waist="Witful Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
sets.midcast.Cure = {main="Chatoyant Staff",
head="Nahtirah Hat",neck="Colossus's Torque",ear1="Lifestorm Earring",ear2="Loquacious Earring",
body="Anhur Robe",hands="Bokwus Gloves",ring1="Ephedra Ring",ring2="Sirona's Ring",
back="Pahtli Cape",waist=gear.ElementalObi,legs="Nares Trews",feet="Hagondes Sabots"}
sets.midcast.Curaga = sets.midcast.Cure
sets.midcast.EnhancingMagic = {
head="Umuthi Hat",neck="Colossus's Torque",
body="Anhur Robe",hands="Ayao's Gages",
waist="Siegal Sash",legs="Portent Pants"}
sets.midcast.Stoneskin = set_combine(sets.midcast.EnhancingMagic, {waist="Siegel Sash"})
sets.midcast.EnfeeblingMagic = {main="Eminent Staff",sub="Mephitis Grip",ammo="Sturm's Report",
head="Kaabanax Hat",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Wayfarer Robe",hands="Yaoyotl Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
back="Bane Cape",waist="Demonry Sash",legs="Wayfarer Slops",feet="Wayfarer Clogs"}
sets.midcast.ElementalEnfeeble = sets.midcast.EnfeeblingMagic
sets.midcast.DarkMagic = {main="Eminent Staff",sub="Mephitis Grip",ammo="Sturm's Report",
head="Kaabanax Hat",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Wayfarer Robe",hands="Yaoyotl Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
back="Bane Cape",waist="Demonry Sash",legs="Wayfarer Slops",feet="Goetia Sabots +2"}
sets.midcast.Drain = {main="Eminent Staff",sub="Mephitis Grip",ammo="Sturm's Report",
head="Nahtirah Hat",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Excelsis Ring",ring2="Sangoma Ring",
back="Bane Cape",waist="Demonry Sash",legs="Wayfarer Slops",feet="Goetia Sabots +2"}
sets.midcast.Aspir = sets.midcast.Drain
sets.midcast.Stun = {main="Atinian Staff",sub="Mephitis Grip",ammo="Sturm's Report",
head="Kaabanax Hat",neck="Eddy Necklace",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Wayfarer Robe",hands="Yaoyotl Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
back="Bane Cape",waist="Witful Belt",legs="Wayfarer Slops",feet="Wayfarer Clogs"}
sets.midcast.BardSong = {main="Atinian Staff",sub="Mephitis Grip",ammo="Sturm's Report",
head="Nahtirah Hat",neck="Weike Torque",ear1="Psystorm Earring",ear2="Lifestorm Earring",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Strendu Ring",ring2="Sangoma Ring",
back="Refraction Cape",legs="Bokwus Slops",feet="Bokwus Boots"}
-- Elemental Magic sets are default for handling low-tier nukes.
sets.midcast.ElementalMagic = {main="Eminent Staff",sub="Mephitis Grip",ammo="Witchstone",
head="Kaabanax Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Moldavite Earring",
body="Wayfarer Robe",hands="Yaoyotl Gloves",ring1="Locus Ring",ring2="Spiral Ring",
back="Bane Cape",waist="Oneiros Sash",legs="Wayfarer Slops",feet="Wayfarer Clogs"}
sets.midcast.ElementalMagic.Resistant = {main="Eminent Staff",sub="Mephitis Grip",ammo="Witchstone",
head="Kaabanax Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Moldavite Earring",
body="Wayfarer Robe",hands="Yaoyotl Gloves",ring1="Locus Ring",ring2="Spiral Ring",
back="Bane Cape",waist="Oneiros Sash",legs="Wayfarer Slops",feet="Wayfarer Clogs"}
-- Idle set when doing procs. Fast cast gear, minimal nuke gear. Won't change out of this for nukes.
sets.midcast.ElementalMagic.Proc = {main="Eminent Staff",sub="Mephitis Grip",ammo="Witchstone",
head="Kaabanax Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Moldavite Earring",
body="Wayfarer Robe",hands="Yaoyotl Gloves",ring1="Locus Ring",ring2="Spiral Ring",
back="Bane Cape",waist="Oneiros Sash",legs="Wayfarer Slops",feet="Wayfarer Clogs"}
-- Custom classes for high-tier nukes.
sets.midcast.HighTierNuke = {main="Eminent Staff",sub="Mephitis Grip",ammo="Witchstone",
head="Kaabanax Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Moldavite Earring",
body="Wayfarer Robe",hands="Yaoyotl Gloves",ring1="Locus Ring",ring2="Spiral Ring",
back="Bane Cape",waist="Oneiros Sash",legs="Wayfarer Slops",feet="Wayfarer Clogs"}
sets.midcast.HighTierNuke.Resistant = {main="Eminent Staff",sub="Mephitis Grip",ammo="Witchstone",
head="Kaabanax Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Moldavite Earring",
body="Wayfarer Robe",hands="Yaoyotl Gloves",ring1="Locus Ring",ring2="Spiral Ring",
back="Bane Cape",waist="Oneiros Sash",legs="Wayfarer Slops",feet="Wayfarer Clogs"}
-- Custom classes for high-tier nukes in Adoulin areas (need more general magic accuracy).
sets.midcast.AdoulinHighTierNuke = {main="Eminent Staff",sub="Mephitis Grip",ammo="Witchstone",
head="Kaabanax Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Moldavite Earring",
body="Wayfarer Robe",hands="Yaoyotl Gloves",ring1="Locus Ring",ring2="Spiral Ring",
back="Bane Cape",waist="Oneiros Sash",legs="Wayfarer Slops",feet="Wayfarer Clogs"}
sets.midcast.AdoulinHighTierNuke.Resistant = {main="Eminent Staff",sub="Mephitis Grip",ammo="Witchstone",
head="Kaabanax Hat",neck="Eddy Necklace",ear1="Hecate's Earring",ear2="Moldavite Earring",
body="Wayfarer Robe",hands="Yaoyotl Gloves",ring1="Locus Ring",ring2="Spiral Ring",
back="Bane Cape",waist="Oneiros Sash",legs="Wayfarer Slops",feet="Wayfarer Clogs"}
-- Sets to return to when not performing an action.
-- Resting sets
sets.resting = {main="Chatoyant Staff",ammo="Clarus Stone",
head="Kaabanax Hat",neck="Grandiose Chain",
body="Goetia Coat +2",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
waist="Hierarchy Belt",legs="Nares Trews",feet="Serpentes Sabots"}
-- Idle sets
-- Normal refresh idle set
sets.idle = {main="Owleyes", sub="Sors Shield",ammo="Witchstone",
head="Kaabanax Hat",neck="Wiglen Gorget",ear1="Ethereal Earring",ear2="Loquacious Earring",
body="Goetia Coat +2",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Iximulew Cape",waist="Hierarch Belt",legs="Nares Trews",feet="Serpentes Sabots"}
-- Idle mode that keeps PDT gear on, but doesn't prevent normal gear swaps for precast/etc.
sets.idle.PDT = {main="Owleyes", sub="Sors Shield",ammo="Witchstone",
head="Kaabanax Hat",neck="Wiglen Gorget",ear1="Ethereal Earring",ear2="Loquacious Earring",
body="Goetia Coat +2",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Iximulew Cape",waist="Hierarch Belt",legs="Nares Trews",feet="Serpentes Sabots"}
-- Idle mode scopes:
-- Idle mode when weak.
sets.idle.Weak = {main="Owleyes", sub="Sors Shield",ammo="Witchstone",
head="Kaabanax Hat",neck="Wiglen Gorget",ear1="Ethereal Earring",ear2="Loquacious Earring",
body="Goetia Coat +2",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Iximulew Cape",waist="Hierarch Belt",legs="Nares Trews",feet="Serpentes Sabots"}
-- Town gear.
sets.idle.Town = {main="Owleyes", sub="Sors Shield",ammo="Witchstone",
head="Kaabanax Hat",neck="Wiglen Gorget",ear1="Ethereal Earring",ear2="Loquacious Earring",
body="Goetia Coat +2",hands="Serpentes Cuffs",ring1="Sheltered Ring",ring2="Paguroidea Ring",
back="Iximulew Cape",waist="Hierarch Belt",legs="Nares Trews",feet="Serpentes Sabots"}
-- Defense sets
sets.defense.PDT = {main="Earth Staff",sub="Wizzan Grip",
head="Nahtirah Hat",neck="Twilight Torque",
body="Hagondes Coat",hands="Yaoyotl Gloves",ring1="Dark Ring",ring2="Dark Ring",
back="Umbra Cape",waist="Hierarch Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
sets.defense.MDT = {ammo="Demonry Stone",
head="Nahtirah Hat",neck="Twilight Torque",
body="Vanir Cotehardie",hands="Yaoyotl Gloves",ring1="Dark Ring",ring2="Shadow Ring",
back="Tuilha Cape",waist="Hierarch Belt",legs="Bokwus Slops",feet="Hagondes Sabots"}
sets.Kiting = {feet="Herald's Gaiters"}
-- Buff sets: Gear that needs to be worn to actively enhance a current player buff.
sets.buff['Mana Wall'] = {feet="Goetia Sabots +2"}
-- Engaged sets
-- Variations for TP weapon and (optional) offense/defense modes. Code will fall back on previous
-- sets if more refined versions aren't defined.
-- If you create a set with both offense and defense modes, the offense mode should be first.
-- EG: sets.engaged.Dagger.Accuracy.Evasion
-- Normal melee group
sets.engaged = {
head="Zelus Tiara",neck="Asperity Necklace",ear1="Bladeborn Earring",ear2="Steelflash Earring",
body="Hagondes Coat",hands="Bokwus Gloves",ring1="Rajas Ring",ring2="K'ayres Ring",
back="Umbra Cape",waist="Goading Belt",legs="Hagondes Pants",feet="Hagondes Sabots"}
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'}
end
-------------------------------------------------------------------------------------------------------------------
-- Job-specific hooks that are called to process player actions at specific points in time.
-------------------------------------------------------------------------------------------------------------------
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
-- Set eventArgs.useMidcastGear to true if we want midcast gear equipped on precast.
function job_precast(spell, action, spellMap, eventArgs)
if spellMap == 'Cure' or spellMap == 'Curaga' then
gear.default.obi_waist = "Goading Belt"
elseif spell.skill == 'Elemental Magic' then
gear.default.obi_waist = "Sekhmet Corset"
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)
if spell.action_type == 'Magic' then
-- Default base equipment layer is fast recast.
equip(sets.midcast.FastRecast)
if spell.skill == 'Elemental Magic' then
if state.CastingMode == 'Proc' then
add_to_chat(15,'Proc mode, no damage gear for midcast.')
eventArgs.handled = true
else
classes.CustomClass = get_nuke_class(spell, action, spellMap)
end
end
end
end
function job_aftercast(spell, action, spellMap, eventArgs)
-- Lock feet after using Mana Wall.
if not spell.interrupted and spell.english == 'Mana Wall' and player.equipment.feet == "Goetia Sabots +2" then
disable('feet')
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
-------------------------------------------------------------------------------------------------------------------
-- User code that supplements self-commands.
-------------------------------------------------------------------------------------------------------------------
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue)
if stateField == 'OffenseMode' 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 to get the custom class to use for nukes.
function get_nuke_class(spell, action, spellMap)
if lowTierNukes[spell.english] then
-- low tier nukes use the default set
return nil
else
return 'HighTierNuke'
end
end
|
|