|
Gearswap Support Thread
By Dodik 2023-08-07 11:12:50
Selindrile's luas use the folder per character approach. Much cleaner.
By drakefs 2023-08-07 15:37:31
Thats not specific to Selindrile luas. GS, by default, loads data\<characterName>\<job>.lua, data\<chatacterName_job>.lua or data\<job>.lua (in that order).
I too, prefer character folders.
[+]
Serveur: Phoenix
Game: FFXI
Posts: 37
By Phoenix.Darwinion 2023-08-24 05:37:17
How would I go about writing code to equip Sroda ring if there are trusts in the party, but equip something different if no trusts?
In not even sure if this is possible.
By drakefs 2023-08-24 12:31:14
in a motes based lua: Code
function user_setup()
trustList = S{'Apururu','Qultada','etc'}
end
function customize_melee_set(meleeSet)
if (windower.ffxi.get_party().p5 and trustList:contains(windower.ffxi.get_party().p5.name)) or
(windower.ffxi.get_party().p4 and trustList:contains(windower.ffxi.get_party().p4.name)) or
(windower.ffxi.get_party().p3 and trustList:contains(windower.ffxi.get_party().p3.name)) or
(windower.ffxi.get_party().p2 and trustList:contains(windower.ffxi.get_party().p2.name)) or
(windower.ffxi.get_party().p1 and trustList:contains(windower.ffxi.get_party().p1.name)) then
meleeSet = set_combine(meleeSet, {right_ring = "Sroda Ring"})
end
return meleeSet
end
Note, this will not work for WS, you will need to modify the equipSet at the end of the precast (use job_post_precast()).
in a non-motes based lua, same code but you will need to define the trustList elsewhere and use the if logic at the end of your precast and aftercast for physical WS and TP sets:
Code
function get_sets()
trustList = S{'Apururu','Qultada','etc'}
end
function aftercast()
if-then-stuff()...
if (windower.ffxi.get_party().p5 and trustList:contains(windower.ffxi.get_party().p5.name)) or
(windower.ffxi.get_party().p4 and trustList:contains(windower.ffxi.get_party().p4.name)) or
(windower.ffxi.get_party().p3 and trustList:contains(windower.ffxi.get_party().p3.name)) or
(windower.ffxi.get_party().p2 and trustList:contains(windower.ffxi.get_party().p2.name)) or
(windower.ffxi.get_party().p1 and trustList:contains(windower.ffxi.get_party().p1.name)) then
equip(right_ring = "Sroda Ring")
end
You can also try asking in the windower discord if there is a an easier way to determine if a trust is in your party.
EDIT: added a check to see if party member exist to suppress errors.
By AegParm 2023-08-28 11:33:57
Using Sel's BRD lua--whenever I use //warp from the Myhome lua, gearswap takes the warp ring off after 1 or 2 seconds and the warp doesn't happen. I see Myhome disables the ring slot slot, but Sel's gs seems to override it. Anyway to make Sel's gs and Myhome play nicely together?
By drakefs 2023-08-28 11:45:53
I believe this is more of a motes issue (somehow ignoring disabled slots). You need to find out what is overriding it before you can attempt to fix it.
Generally the offenders are
Code function customize_idle_set(idleSet)
and
Code function customize_melee_set(meleeSet)
When you find the code causing the issue, you just need to make sure that you have logic in place to equip the ring along with whatever else it is trying to equip.
Serveur: Cerberus
Game: FFXI
Posts: 1809
By Cerberus.Shadowmeld 2023-08-28 12:23:12
Sel’s luas have built in functionality for all the teleport/warp items already. You shouldn’t need myhome or smeagol or anthing
[+]
Serveur: Bismarck
Game: FFXI
Posts: 4
By Bismarck.Serpentarius 2023-08-28 13:02:44
For some reason my idle states aren't updating gear, but only on certain job luas. I use the same lua template for all of my jobs. Ive cross referenced my working luas with those that don't and can't seem to pinpoint the discrepancy.
I have two issues:
sets.idle.Regen will not properly update the idleset when toggled.
Auto Kite doesn't work properly. I can toggle kiting mode on, but the logic for 'check moving' isn't working (and has never worked).
Also, if anyone has any tips on how I can clean up this lua with potentially redundant or unneeded rules/etc that'd be cool too!
Thanks
Code function get_sets()
mote_include_version = 2
include('Mote-Include.lua')
include('Mote-Utility.lua')
include('Mote-Mappings.lua')
include('Mote-SelfCommands.lua')
include('Mote-Globals.lua')
end
function job_setup()
state.IgnoreTargetting = M(false, 'Ignore Targetting')
state.TreasureHunter = M(false, "TreasureHunter")
no_swap_gear = S{"Warp Ring", "Dim. Ring (Dem)", "Dim. Ring (Holla)", "Dim. Ring (Mea)",
"Trizek Ring", "Echad Ring", "Facility Ring", "Capacity Ring",
"Dev. Bul. Pouch", "Chr. Bul. Pouch", "Liv. Bul. Pouch"}
elemental_ws = S{"Aeolian Edge", "Leaden Salute", "Wildfire"}
-- For th_action_check():
-- JA IDs for actions that always have TH: Provoke, Animated Flourish
info.default_ja_ids = S{35, 204}
-- Unblinkable JA IDs for actions that always have TH: Quick/Box/Stutter Step, Desperate/Violent Flourish
info.default_u_ja_ids = S{201, 202, 203, 205, 207}
lockstyleset = 3
end
function user_setup()
state.OffenseMode:options('Normal', 'LowAcc', 'MidAcc', 'HighAcc', 'STP')
state.HybridMode:options('Normal', 'Evasion')
state.RangedMode:options('STP', 'Normal', 'Acc', 'HighAcc', 'Critical')
state.WeaponskillMode:options('Normal', 'Acc')
state.IdleMode:options('Normal', 'Evasion')
state.WeaponSet = M{['description']='Normal', 'Gandring', 'GandringTPBonus', 'Aeneas', 'AeneasTPBonus', 'Evisceration', "Aeolian", 'Naegling'}
state.CP = M(false, "Capacity Points Mode")
state.WeaponLock = M(false, 'Weapon Lock')
state.PhysicalDefenseMode = M{['description'] = 'Physical Defense Mode', 'PDT', 'EVA'}
state.RP = M(false, "Reinforcement Points Mode")
send_command('bind %q gs c toggle TreasureHunter')
send_command('bind %c gs c toggle CP')
send_command('bind %e gs c cycleback WeaponSet')
send_command('bind %r gs c cycle WeaponSet')
send_command('bind %w gs c toggle WeaponLock')
send_command('bind %t gs c toggle RP')
send_command('bind f10 gs c cycle OffenseMode')
send_command('bind f11 gs c cycle CastingMode')
send_command('bind f12 gs c cycle HybridMode')
send_command('bind %delete gs c set DefenseMode Physical')
send_command('bind ^delete gs c cycle PhysicalDefenseMode')
send_command('bind %end gs c set DefenseMode Magical')
send_command('bind ^end gs c reset DefenseMode')
send_command('bind pageup gs c update user')
send_command('bind pagedown gs c cycle IdleMode')
send_command('bind ^pagedown gs c toggle Kiting')
send_command('bind ^numlock gs c cycle WeaponskillMode')
send_command('bind ^numlock gs c cycle WeaponskillMode')
send_command('bind ^numpad0 input /ws "Savage Blade" <t>')
send_command('bind ^numpad1 input /ws "Evisceration" <t>')
send_command('bind ^numpad2 input /ws "["Rudra\'s Storm"]" <t>')
send_command('bind ^numpad3 input /ws "Exenterator" <t>')
send_command('bind ^numpad4 input /ws "Aeolian Edge" <t>')
send_command('bind ^numpad5 input /ws "Mandalic Stab" <t>')
send_command('bind ^numpad6 input /ws "Shark Bite" <t>')
send_command('bind ^numpad7 input /ws "Energy Drain" <t>')
send_command('bind ^numpad9 input /ws "Savage Blade" <t>')
state.Auto_Kite = M(false, 'Auto_Kite')
Haste = 0
DW_needed = 0
DW = false
moving = false
update_combat_form()
end
function user_unload()
send_command ('unbind %`')
send_command('unbind %c')
send_command('unbind %q')
send_command('unbind ^numlock')
send_command('unbind ^numpad1')
send_command('unbind ^numpad2')
send_command('unbind ^numpad3')
send_command('unbind ^numpad4')
send_command('unbind ^numpad5')
send_command('unbind ^numpad6')
send_command('unbind ^numpad7')
send_command('unbind ^numpad9')
end
--Sets
function init_gear_sets()
------------------------------------------------------------------------------------------------
---------------------------------------- Precast Sets ------------------------------------------
------------------------------------------------------------------------------------------------
sets.precast.Waltz = {waist="Gishdubar Sash"}
sets.precast.Waltz['Healing Waltz'] = {}
sets.precast.FC = {
ammo="Sapience Orb",
right_ring="Prolix Ring",--2
}
sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {})
------------------------------------------------------------------------------------------------
------------------------------------- Weapon Skill Sets ----------------------------------------
------------------------------------------------------------------------------------------------
sets.precast.WS = {}
sets.precast.WS.Acc = set_combine(sets.precast.WS, {})
sets.precast.WS['Evisceration'] = {
ammo="Yetshila",
head="Skulker's Bonnet +3",
body="Gleti's Cuirass",
hands="Gleti's Gauntlets",
legs="Gleti's Breeches",
feet="Gleti's Boots",
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
right_ear="Odr Earring",
left_ring="Regal Ring",
right_ring="Gere Ring",
back={ name="Toutatis's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Weapon skill damage +10%',}},
}
sets.precast.WS['Evisceration'].Acc = set_combine(sets.precast.WS['Evisceration'], {})
sets.precast.WS['Exenterator'] = {
ammo="Seething Bomblet +1",
head="Gleti's Mask",
body="Gleti's Cuirass",
hands="Gleti's Gauntlets",
legs="Meg. Chausses +2",
feet={ name="Herculean Boots", augments={'Accuracy+20 Attack+20','"Triple Atk."+3','Accuracy+10',}},
neck="Fotia Gorget",
waist="Fotia Belt",
left_ear="Sherida Earring",
right_ear="Telos Earring",
left_ring="Ilabrat Ring",
right_ring="Regal Ring",
back={ name="Toutatis's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Weapon skill damage +10%',}},
}
sets.precast.WS['Exenterator'].Acc = set_combine(sets.precast.WS['Exenterator'], {})
sets.precast.WS['Rudra\'s Storm'] = {
ammo="Coiste Bodhar",
head="Skulker's Bonnet +3",
body="Nyame Mail",
hands="Gleti's Gauntlets",
legs="Gleti's Breeches",
feet="Nyame Sollerets",
neck="Assassin's Gorget +2",
waist="Grunfeld Rope",
left_ear="Sherida Earring",
right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
left_ring="Ilabrat Ring",
right_ring="Regal Ring",
back={ name="Toutatis's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Weapon skill damage +10%',}},
}
sets.precast.WS['Rudra\'s Storm'].Acc = set_combine(sets.precast.WS['Rudra\'s Storm'], {})
sets.precast.WS['Mandalic Stab'] = set_combine(sets.precast.WS['Rudra\'s Storm'], {})
sets.precast.WS['Mandalic Stab'].Acc = set_combine(sets.precast.WS['Mandalic Stab'], {})
sets.precast.WS['Savage Blade'] = {
ammo="Coiste Bodhar",
head="Nyame Helm",
body="Nyame Mail",
hands="Nyame Gauntlets",
legs="Nyame Flanchard",
feet="Malignance Boots",
neck="Assassin's Gorget +2",
waist="Sailfi Belt +1",
left_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
right_ear="Skulker's Earring +1",
left_ring="Regal Ring",
right_ring="Beithir Ring",
back={ name="Toutatis's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Weapon skill damage +10%',}},
}
sets.precast.WS['Savage Blade'].Acc = set_combine(sets.precast.WS['Savage Blade'], {})
sets.precast.WS['Aeolian Edge'] = {
ammo="Ghastly Tathlum +1",
head="Nyame Helm",
body="Nyame Mail",
hands="Nyame Gauntlets",
legs="Nyame Flanchard",
feet="Nyame Sollerets",
neck="Baetyl Pendant",
waist="Orpheus's Sash",
left_ear="Moonshade Earring",
right_ear="Friomisi Earring",
left_ring="Karieyh Ring",
right_ring="Dingir Ring",
back={ name="Toutatis's Cape", augments={'INT+20','Mag. Acc+20 /Mag. Dmg.+20','INT+10','Weapon skill damage +10%','Damage taken-5%',}},
}
sets.precast.WS['Sanguine Blade'] = {
head="Pixie Hairpin +1",
body={ name="Herculean Vest", augments={'Mag. Acc.+19 "Mag.Atk.Bns."+19','Crit.hit rate+4','INT+8','Mag. Acc.+12','"Mag.Atk.Bns."+11',}},
hands="Meg. Gloves +2",
legs="Meg. Chausses +2",
feet="Meg. Jam. +2",
neck="Sanctity Necklace",
waist="Resolute Belt",
left_ear="Friomisi Earring",
right_ear="Hecate's Earring",
left_ring="Dingir Ring",
right_ring="Archon Ring",
back={ name="Toutatis's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','Weapon skill damage +10%',}},
}
------------------------------------------------------------------------------------------------
---------------------------------------- Midcast Sets ------------------------------------------
------------------------------------------------------------------------------------------------
sets.midcast.FastRecast = sets.precast.FC
sets.midcast.SpellInterrupt = {
hands="Rawhide Gloves",--15
}
sets.midcast.Cure = {}
sets.midcast.Utsusemi = sets.midcast.SpellInterrupt
------------------------------------------------------------------------------------------------
----------------------------------------- Idle Sets --------------------------------------------
------------------------------------------------------------------------------------------------
sets.resting = {}
sets.idle = {
ammo="Yamarang",
head="Malignance Chapeau",
body="Malignance Tabard",
hands="Malignance Gloves",
legs="Malignance Tights",
feet="Skulk. Poulaines +3",
neck="Assassin's Gorget +2",
waist="Svelt. Gouriz +1",
left_ear="Eabani Earring",
right_ear="Infused Earring",
left_ring="Vengeful Ring",
right_ring="Defending Ring",
back={ name="Toutatis's Cape", augments={'AGI+20','Eva.+20 /Mag. Eva.+20','Evasion+10','"Dual Wield"+10','Damage taken-5%',}},
}
sets.idle.Evasion = {
ammo="Yamarang",
head="Malignance Chapeau",
body="Malignance Tabard",
hands="Malignance Gloves",
legs="Malignance Tights",
feet="Skulk. Poulaines +3",
neck="Assassin's Gorget +2",
waist="Svelt. Gouriz +1",
left_ear="Eabani Earring",
right_ear="Infused Earring",
left_ring="Vengeful Ring",
right_ring="Defending Ring",
back={ name="Toutatis's Cape", augments={'AGI+20','Eva.+20 /Mag. Eva.+20','Evasion+10','"Dual Wield"+10','Damage taken-5%',}},
}
sets.idle.Town = set_combine(sets.idle, {})
------------------------------------------------------------------------------------------------
---------------------------------------- Defense Sets ------------------------------------------
------------------------------------------------------------------------------------------------
sets.defense.PDT = sets.idle.DT
sets.defense.Evasion = {
ammo="Yamarang",
head="Malignance Chapeau",
body="Malignance Tabard",
hands="Malignance Gloves",
legs={ name="Nyame Flanchard", augments={'Path: B',}},
feet="Skulk. Poulaines +3",
neck="Assassin's Gorget +2",
waist="Svelt. Gouriz +1",
left_ear="Eabani Earring",
right_ear="Infused Earring",
left_ring="Vengeful Ring",
right_ring="Defending Ring",
back={ name="Toutatis's Cape", augments={'AGI+20','Eva.+20 /Mag. Eva.+20','Evasion+10','"Dual Wield"+10','Damage taken-5%',}},
}
sets.defense.MDT = set_combine(sets.idle, {
head="Nyame Helm",
neck="Warder's Charm +1",
body="Nyame Mail",
hands="Nyame Gauntlets",
legs="Nyame Flanchard",
feet="Nyame Sollerets",
left_ring="Shadow Ring",
})
sets.Kiting = {feet="Jute Boots +1"}
------------------------------------------------------------------------------------------------
---------------------------------------- Engaged Sets ------------------------------------------
------------------------------------------------------------------------------------------------
sets.engaged = {
ammo="Coiste Bodhar",
head="Skulker's Bonnet +3",
body="Malignance Tabard",
hands="Malignance Gloves",
legs="Malignance Tights",
feet="Plunderer's Poulaines +3",
neck="Assassin's Gorget +2",
waist="Reiki Yotai",
left_ear="Sherida Earring",
right_ear="Skulker's Earring +1",
left_ring="Hetairoi Ring",
right_ring="Gere Ring",
back={ name="Toutatis's Cape", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Store TP"+10','Damage taken-5%',}},
}
sets.engaged.LowAcc = set_combine(sets.engaged, {})
sets.engaged.MidAcc = set_combine(sets.engaged.LowAcc, {})
sets.engaged.HighAcc = set_combine(sets.engaged.MidAcc, {
neck="Sanctity Necklace",
left_ear="Telos Earring",
waist="Hurch'lan Sash"
})
-- * DNC Subjob DW Trait: +15%
-- * NIN Subjob DW Trait: +25%
-- No Magic Haste (74% DW to cap)
sets.engaged.DW = {} -- 48%
sets.engaged.DW.LowAcc = set_combine(sets.engaged.DW, {})
sets.engaged.DW.MidAcc = set_combine(sets.engaged.DW.LowAcc, {})
sets.engaged.DW.HighAcc = set_combine(sets.engaged.DW.MidAcc, {})
sets.engaged.DW.STP = set_combine(sets.engaged.DW, {})
------------------------------------------------------------------------------------------------
---------------------------------------- Hybrid Sets -------------------------------------------
------------------------------------------------------------------------------------------------
sets.engaged.Hybrid = set_combine(sets.engaged, {
ammo="Seething Bomblet +1",
head="Malignance Chapeau",
body="Malignance Tabard",
hands="Malignance Gloves",
legs="Meghanada Chausses +2",
feet="Skulk. Poulaines +3",
neck="Loricate Torque +1",
waist="Reiki Yotai",
left_ear="Dignitary's Earring",
right_ear="Skulker's Earring +1",
left_ring="Moonbeam Ring",
right_ring="Gere Ring",
})
sets.engaged.DT = set_combine(sets.engaged, sets.engaged.Hybrid)
sets.engaged.STP = set_combine(sets.engaged, {
ammo="Yamarang",
head="Malignance Chapeau",
feet="Malignance Boots",
})
sets.engaged.Evasion = set_combine(sets.engaged, {
ammo="Yamarang",
head="Malignance Chapeau",
body="Malignance Tabard",
hands="Malignance Gloves",
legs="Malignance Tights",
feet="Skulk. Poulaines +3",
neck="Assassin's Gorget +2",
waist="Svelt. Gouriz +1",
left_ear="Eabani Earring",
right_ear="Infused Earring",
left_ring="Vengeful Ring",
right_ring="Defending Ring",
back={ name="Toutatis's Cape", augments={'AGI+20','Eva.+20 /Mag. Eva.+20','Evasion+10','"Dual Wield"+10','Damage taken-5%',}},
})
sets.engaged.LowAcc.DT = set_combine(sets.engaged.LowAcc, sets.engaged.Hybrid)
sets.engaged.MidAcc.DT = set_combine(sets.engaged.MidAcc, sets.engaged.Hybrid)
sets.engaged.HighAcc.DT = set_combine(sets.engaged.HighAcc, sets.engaged.Hybrid)
sets.engaged.STP.DT = set_combine(sets.engaged.STP, sets.engaged.Hybrid)
sets.engaged.DW.DT = set_combine(sets.engaged.DW, sets.engaged.Hybrid)
sets.engaged.DW.LowAcc.DT = set_combine(sets.engaged.DW.LowAcc, sets.engaged.Hybrid)
sets.engaged.DW.MidAcc.DT = set_combine(sets.engaged.DW.MidAcc, sets.engaged.Hybrid)
sets.engaged.DW.HighAcc.DT = set_combine(sets.engaged.DW.HighAcc, sets.engaged.Hybrid)
sets.engaged.DW.STP.DT = set_combine(sets.engaged.DW.STP, sets.engaged.Hybrid)
------------------------------------------------------------------------------------------------
---------------------------------------- Special Sets ------------------------------------------
------------------------------------------------------------------------------------------------
sets.buff.Doom = {
neck="Nicander's Necklace", --20
left_ring="Purity Ring",
--ring2={name="Eshmun's Ring", bag="wardrobe4"}, --20
waist="Gishdubar Sash", --10
}
--sets.FullTP = {ear1="Crematio Earring"}
sets.Obi = {waist="Hachirin-no-Obi"}
sets.CP = {back="Mecistopins Mantle"}
sets.RP = {neck="Assassin's Gorget +2"}
sets.Aeneas = {main="Aeneas", sub="Gleti's Knife"}
sets.AeneasTPBonus = {main="Aeneas", sub="Centovente"}
sets.Evisceration = {main="Tauret", sub="Gleti's Knife"}
sets.Naegling = {main="Naegling", sub="Centovente"}
sets.Aeolian = {main="Aeneas", sub="Malevolence"}
sets.Trial = {main="Kartika", sub="Gleti's Knife"}
sets.Gandring = {main="Gandring", sub="Gleti's Knife"}
sets.GandringTPBonus = {main="Gandring", sub="Centovente"}
--Chaac belt, Sandung, Lucky egg
sets.TreasureHunter = {hands="Plunderer's Armlets +1", feet="Skulker's Poulaines +3"}
end
-----------------------------------
--Casting (spells, JAs, etc) 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 == 'Utsusemi' then
if buffactive['Copy Image (3)'] or buffactive['Copy Image (4+)'] then
cancel_spell()
add_to_chat(123, '**!! '..spell.english..' Canceled: [3+ IMAGES] !!**')
eventArgs.handled = true
return
elseif buffactive['Copy Image'] or buffactive['Copy Image (2)'] then
send_command('cancel 66; cancel 444; cancel Copy Image; cancel Copy Image (2)')
end
end
end
function job_post_precast(spell, action, spellMap, eventArgs)
if spell.type == 'WeaponSkill' then
if elemental_ws:contains(spell.name) then
-- Matching double weather (w/o day conflict).
if spell.element == world.weather_element and (get_weather_intensity() == 2 and spell.element ~= elements.weak_to[world.day_element]) then
equip({waist="Hachirin-no-Obi"})
-- Target distance under 1.7 yalms.
elseif spell.target.distance < (1.7 + spell.target.model_size) then
equip({waist="Orpheus's Sash"})
-- Matching day and weather.
elseif spell.element == world.day_element and spell.element == world.weather_element then
equip({waist="Hachirin-no-Obi"})
-- Target distance under 8 yalms.
elseif spell.target.distance < (8 + spell.target.model_size) then
equip({waist="Orpheus's Sash"})
-- Match day or weather.
elseif spell.element == world.day_element or spell.element == world.weather_element then
equip({waist="Hachirin-no-Obi"})
end
end
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_aftercast(spell, action, spellMap, eventArgs)
if player.status ~= 'Engaged' and state.WeaponLock.value == false then
check_weaponset()
end
end
-----------------------------------
--Buff changes
-----------------------------------
function job_buff_change(buff,gain)
if buff == "doom" then
if gain then
equip(sets.buff.Doom)
-- send_command('@input /p ♪ Doomed ♪.')
disable('neck','ring1','ring2','waist')
else
enable('neck','ring1','ring2','waist')
handle_equipping_gear(player.status)
end
end
end
-- Handle notifications of general user state change.
function job_state_change(stateField, newValue, oldValue)
if state.WeaponLock.value == true then
disable('ranged')
else
enable('ranged')
end
check_weaponset()
end
-- Called by the 'update' self-command, for common needs.
-- Set eventArgs.handled to true if we don't want automatic equipping of gear.
function job_handle_equipping_gear(playerStatus, eventArgs)
check_gear()
update_combat_form()
check_moving()
end
function job_update(cmdParams, eventArgs)
handle_equipping_gear(player.status)
end
function update_combat_form()
if DW == true then
state.CombatForm:set('DW')
elseif DW == false then
state.CombatForm:reset()
end
end
-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
check_weaponset()
if state.TreasureHunter.current == 'on' then
equip(sets.TreasureHunter)
disable('hands', 'feet')
else
enable('hands', 'feet')
end
return meleeSet
end
function get_custom_wsmode(spell, action, spellMap)
local wsmode
if spell.skill == 'Marksmanship' then
if state.RangedMode.value == 'Acc' or state.RangedMode.value == 'HighAcc' then
wsmode = 'Acc'
end
else
if state.OffenseMode.value == 'Acc' or state.OffenseMode.value == 'HighAcc' then
wsmode = 'Acc'
end
end
return wsmode
end
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if state.CP.current == 'on' then
equip(sets.CP)
disable('back')
else
enable('back')
end
if state.RP.current == 'on' then
equip(sets.RP)
disable('neck')
else
enable('neck')
end
if state.TreasureHunter.current == 'on' or 'off' then
enable('hands', 'body', 'feet')
end
if state.Auto_Kite.value == true then
idleSet = set_combine(idleSet, sets.Kiting)
end
return idleSet
end
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
local cf_msg = ''
if state.CombatForm.has_value then
cf_msg = ' (' ..state.CombatForm.value.. ')'
end
local m_msg = state.OffenseMode.value
if state.HybridMode.value ~= 'Normal' then
m_msg = m_msg .. '/' ..state.HybridMode.value
end
local ws_msg = state.WeaponskillMode.value
local d_msg = 'None'
if state.DefenseMode.value ~= 'None' then
d_msg = state.DefenseMode.value .. state[state.DefenseMode.value .. 'DefenseMode'].value
end
local i_msg = state.IdleMode.value
local msg = ''
if state.Kiting.value then
msg = msg .. ' Kiting: On |'
end
add_to_chat(002, '| ' ..string.char(31,210).. 'Melee' ..cf_msg.. ': ' ..string.char(31,001)..m_msg.. string.char(31,002).. ' |'
..string.char(31,207).. ' WS: ' ..string.char(31,001)..ws_msg.. string.char(31,002).. ' |'
..string.char(31,060).. ' QD' ..qd_msg.. ': ' ..string.char(31,001)..e_msg.. string.char(31,002).. ' |'
..string.char(31,004).. ' Defense: ' ..string.char(31,001)..d_msg.. string.char(31,002).. ' |'
..string.char(31,008).. ' Idle: ' ..string.char(31,001)..i_msg.. string.char(31,002).. ' |'
..string.char(31,002)..msg)
--)
eventArgs.handled = true
end
-------------------------------------------------------------------------------------------------------------------
-- Utility functions specific to this job.
-------------------------------------------------------------------------------------------------------------------
--Read incoming packet to differentiate between Haste/Flurry I and II
windower.register_event('action',
function(act)
--check if you are a target of spell
local actionTargets = act.targets
playerId = windower.ffxi.get_player().id
isTarget = false
for _, target in ipairs(actionTargets) do
if playerId == target.id then
isTarget = true
end
end
if isTarget == true then
if act.category == 4 then
local param = act.param
if param == 845 and flurry ~= 2 then
--add_to_chat(122, 'Flurry Status: Flurry I')
flurry = 1
elseif param == 846 then
--add_to_chat(122, 'Flurry Status: Flurry II')
flurry = 2
end
end
end
end)
function job_self_command(cmdParams, eventArgs)
gearinfo(cmdParams, eventArgs)
end
function gearinfo(cmdParams, eventArgs)
if cmdParams[1] == 'gearinfo' then
if type(tonumber(cmdParams[2])) == 'number' then
if tonumber(cmdParams[2]) ~= DW_needed then
DW_needed = tonumber(cmdParams[2])
DW = true
end
elseif type(cmdParams[2]) == 'string' then
if cmdParams[2] == 'false' then
DW_needed = 0
DW = false
end
end
if type(tonumber(cmdParams[3])) == 'number' then
if tonumber(cmdParams[3]) ~= Haste then
Haste = tonumber(cmdParams[3])
end
end
if type(cmdParams[4]) == 'string' then
if cmdParams[4] == 'true' then
moving = true
elseif cmdParams[4] == 'false' then
moving = false
end
end
if not midaction() then
job_update()
end
end
end
function special_ammo_check()
-- Stop if Animikii/Hauksbok equipped
if no_shoot_ammo:contains(player.equipment.ammo) then
cancel_spell()
-- add_to_chat(123, '** Action Canceled: [ '.. player.equipment.ammo .. ' equipped!! ] **')
return
end
end
-- Check for various actions that we've specified in user code as being used with TH gear.
-- This will only ever be called if TreasureMode is not 'None'.
-- Category and Param are as specified in the action event packet.
function th_action_check(category, param)
if category == 2 or -- any ranged attack
--category == 4 or -- any magic action
(category == 3 and param == 30) or -- Aeolian Edge
(category == 6 and info.default_ja_ids:contains(param)) or -- Provoke, Animated Flourish
(category == 14 and info.default_u_ja_ids:contains(param)) -- Quick/Box/Stutter Step, Desperate/Violent Flourish
then return true
end
end
function check_moving()
if state.DefenseMode.value == 'None' and state.Kiting.value == false then
if state.Auto_Kite.value == false and moving then
state.Auto_Kite:set(true)
elseif state.Auto_Kite.value == true and moving == false then
state.Auto_Kite:set(false)
end
end
end
function check_gear()
if no_swap_gear:contains(player.equipment.left_ring) then
disable("ring1")
else
enable("ring1")
end
if no_swap_gear:contains(player.equipment.right_ring) then
disable("ring2")
else
enable("ring2")
end
if no_swap_gear:contains(player.equipment.waist) then
disable("waist")
else
enable("waist")
end
end
function check_weaponset()
if state.OffenseMode.value == 'LowAcc' or state.OffenseMode.value == 'MidAcc' or state.OffenseMode.value == 'HighAcc' then
equip(sets[state.WeaponSet.current].Acc)
else
equip(sets[state.WeaponSet.current])
end
end
windower.register_event('zone change',
function()
if no_swap_gear:contains(player.equipment.left_ring) then
enable("ring1")
equip(sets.idle)
end
if no_swap_gear:contains(player.equipment.right_ring) then
enable("ring2")
equip(sets.idle)
end
if no_swap_gear:contains(player.equipment.waist) then
enable("waist")
equip(sets.idle)
end
end)
function select_default_macro_book()
set_macro_page(1, 3)
end
function set_lockstyle()
send_command('wait 2; input /lockstyleset ' .. lockstyleset)
end
Asura.Sechs
Serveur: Asura
Game: FFXI
Posts: 10135
By Asura.Sechs 2023-08-28 13:58:34
Where do you check for being dead or alive? In Status_change I guess?
Can anybody provide an example of a code that checks for your character being dead or alive?
Thanks!
By AegParm 2023-08-28 18:37:36
Thank you everyone!
Cerberus.Shadowmeld said: »Sel’s luas have built in functionality for all the teleport/warp items already. You shouldn’t need myhome or smeagol or anthing
This was ultimately the easiest solve. Have included a line to unload myhome when swapping to this gearswap.
By drakefs 2023-08-28 18:59:27
First, you only need the Code include('Mote-Include.lua')
the others are loaded through that lua.
Code if state.DefenseMode.value == 'None' and state.Kiting.value == false then
runs only if Kiting is turned off, should probably checking to be true. EDIT: Looking further at this, Auto-Kite should changing while kiting is off and kiting should be an override to keep movement speed gear equipped 100% of the time.
I didn't see where this set is defined.
As for Sechs' question:
Where do you check for being dead or alive? In Status_change I guess?
One of the status changes that trigger said function is indeed
also
returns dead while dead.
[+]
Serveur: Bismarck
Game: FFXI
Posts: 4
By Bismarck.Serpentarius 2023-08-28 19:05:23
Whoops, uploaded the wrong lua! The idleset issue persists in the afforementioned thf lua with relation to sets.idle.Evasion. This is the other lua that's having issues with sets.idle.Regen:
Code [spoiler]--Includes
function get_sets()
mote_include_version = 2
include('Mote-Include.lua')
include('Mote-Utility.lua')
include('Mote-Mappings.lua')
include('Mote-SelfCommands.lua')
include('Mote-Globals.lua')
end
--Job Setup (states, definitions etc)
function job_setup()
state.IgnoreTargetting = M(false, 'Ignore Targetting')
no_swap_gear = S{"Warp Ring", "Dim. Ring (Dem)", "Dim. Ring (Holla)", "Dim. Ring (Mea)",
"Trizek Ring", "Echad Ring", "Facility Ring", "Capacity Ring"}
-- For th_action_check():
-- JA IDs for actions that always have TH: Provoke, Animated Flourish
info.default_ja_ids = S{35, 204}
-- Unblinkable JA IDs for actions that always have TH: Quick/Box/Stutter Step, Desperate/Violent Flourish
info.default_u_ja_ids = S{201, 202, 203, 205, 207}
lockstyleset = 4
end
--User stuff (more states, keybindings, gear definitions)
function user_setup()
state.OffenseMode:options('Normal', 'LowAcc', 'MidAcc', 'HighAcc', 'STP')
state.HybridMode:options('Normal', 'DT', 'SubtleBlow')
state.WeaponskillMode:options('Normal', 'PDL')
state.IdleMode:options('Normal', 'Regen')
state.WeaponSet = M{['description']='Normal', 'Liberator', 'Anguta', 'Zantetsuken', 'Naegling', 'Lycurgos', 'Trial'}
state.CP = M(false, "Capacity Points Mode")
state.RP = M(false, "Reinforcement Points Mode")
state.WeaponLock = M(false, 'Weapon Lock')
state.TreasureHunter = M(false, "TreasureHunter")
send_command('bind %c gs c toggle CP')
send_command('bind %t gs c toggle RP')
send_command('bind %e gs c cycleback WeaponSet')
send_command('bind %r gs c cycle WeaponSet')
send_command('bind %w gs c toggle WeaponLock')
send_command('bind f10 gs c cycle OffenseMode')
send_command('bind f11 gs c cycle CastingMode')
send_command('bind f12 gs c cycle HybridMode')
send_command('bind %delete gs c set DefenseMode Physical')
send_command('bind ^delete gs c cycle PhysicalDefenseMode')
send_command('bind %end gs c set DefenseMode Magical')
send_command('bind ^end gs c reset DefenseMode')
send_command('bind pageup gs c update user')
send_command('bind pagedown gs c cycle IdleMode')
send_command('bind ^pagedown gs c toggle Kiting')
send_command('bind %q gs c toggle TreasureHunter')
send_command('bind ^numlock gs c cycle WeaponskillMode')
send_command('bind ^numlock gs c cycle WeaponskillMode')
send_command('bind ^numpad0 input /ws "Torcleaver" <t>')
send_command('bind ^numpad1 input /ws "Insurgency" <t>')
send_command('bind ^numpad2 input /ws "Entropy" <t>')
send_command('bind ^numpad3 input /ws "Crossreaper" <t>')
send_command('bind ^numpad4 input /ws "Armor Break" <t>')
send_command('bind ^numpad6 input /ws "Quietus" <t>')
--send_command('bind ^numpad6 input /ws "" <t>')
--send_command('bind ^numpad7 input /ws "" <t>')
--send_command('bind ^numpad8 input /ws "" <t>'))
--send_command('bind ^numpad9 input /ws "" <t>')
--send_command('bind %t gs c cycle treasuremode')
state.Auto_Kite = M(false, 'Auto_Kite')
Haste = 0
DW_needed = 0
DW = false
moving = false
update_combat_form()
end
--Unbinds keybindings on jobchange
function user_unload()
send_command ('unbind %`')
send_command('unbind %c')
send_command('unbind %q')
send_command('unbind ^numlock')
send_command('unbind ^numpad1')
send_command('unbind ^numpad2')
--send_command('unbind ^numpad7')
--send_command('unbind ^numpad8')
--send_command('unbind ^numpad9')
--send_command('unbind %t')
end
--Sets
function init_gear_sets()
------------------------------------------------------------------------------------------------
---------------------------------------- Precast Sets ------------------------------------------
------------------------------------------------------------------------------------------------
sets.precast.FC = {
ammo="Sapience Orb",--2
head="Carmine Mask +1",--14
body="Sacro Breastplate",--10
hands="Leyline Gloves",--8
legs={ name="Odyssean Cuisses", augments={'"Fast Cast"+6','STR+10','Accuracy+5',}},--6
feet={ name="Odyssean Greaves", augments={'Mag. Acc.+10','"Fast Cast"+4','INT+10',}},--9
neck="Voltsurge Torque",--4
waist="Resolute Belt",
left_ear="Malignance Earring",--4
right_ear="Loquac. Earring",--2
left_ring="Prolix Ring",--2
right_ring="Kishar Ring",--4
back={ name="Ankou's Mantle", augments={'"Fast Cast"+10',}},
}
sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {})
sets.precast.LastResort = {back="Ankou's Mantle"}
------------------------------------------------------------------------------------------------
------------------------------------- Weapon Skill Sets ----------------------------------------
------------------------------------------------------------------------------------------------
sets.precast.WS = {
ammo="Knobkierrie",
head="Hjarrandi Helm",
neck="Fotia Gorget",
left_ear="Moonshade Earring",
right_ear="Heathen's Earring",
body="Hjarrandi Breastplate",
hands="Nyame Gauntlets",
left_ring="Karieyh Ring",
right_ring="Regal Ring",
waist="Fotia Belt",
legs="Ig. Flanchard +3",
feet="Heath. Sollerets +2",
back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},
}
sets.precast.WS.PDL = set_combine(sets.precast.WS, {})
sets.precast.WS['Torcleaver'] = {
ammo="Knobkierrie",
head="Nyame Helm",
body="Nyame Mail",
hands="Nyame Gauntlets",
legs="Nyame Flanchard",
feet="Heath. Sollerets +2",
neck="Fotia Gorget",
waist="Sailfi Belt +1",
left_ear="Heathen's Earring",
right_ear="Moonshade Earring",
right_ring="Regal Ring",
left_ring="Niqmaddu Ring",
back={ name="Ankou's Mantle", augments={'VIT+20','Accuracy+20 Attack+20','VIT+10','Weapon skill damage +10%',}},
}
sets.precast.WS.PDL = set_combine(sets.precast.WS['Torcleaver'], {})
sets.precast.WS['Entropy'] = {
ammo="Knobkierrie",
head="Heath. Bur. +3",
neck="Fotia Gorget",
left_ear="Moonshade Earring",
right_ear="Heathen's Earring",
--right_ear="Moonshade Earring",
body="Dagon Breastplate",
hands="Nyame Gauntlets",
left_ring="Karieyh Ring",
right_ring="Regal Ring",
waist="Fotia Belt",
legs="Ig. Flanchard +3",
feet="Heath. Sollerets +2",
back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},
}
sets.precast.WS['Entropy'].PDL = set_combine(sets.precast.WS['Entropy'], {})
sets.precast.WS['Quietus'] = {
ammo="Knobkierrie",
head="Heath. Bur. +3",
neck="Fotia Gorget",
left_ear="Moonshade Earring",
right_ear="Heathen's Earring",
body="Dagon Breastplate",
hands="Nyame Gauntlets",
left_ring="Karieyh Ring",
right_ring="Regal Ring",
waist="Fotia Belt",
legs="Ig. Flanchard +3",
feet="Heath. Sollerets +2",
back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},
}
sets.precast.WS['Quietus'].PDL = set_combine(sets.precast.WS['Quietus'], {})
sets.precast.WS['Insurgency'] = {
ammo="Knobkierrie",
head="Heath. Bur. +3",
neck="Caro Necklace",
left_ear="Moonshade Earring",
right_ear="Heathen's Earring",
body="Nyame Mail",
hands="Sakpata's Gauntlets",
left_ring="Niqmaddu Ring",
right_ring="Regal Ring",
waist="Sailfi Belt +1",
legs="Ig. Flanchard +3",
feet="Heath. Sollerets +2",
back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},
}
sets.precast.WS['Insurgency'].PDL = set_combine(sets.precast.WS['Insurgency'], {})
sets.precast.WS['Cross Reaper'] = {
ammo="Knobkierrie",
head="Heath. Bur. +3",
neck="Caro Necklace",
left_ear="Moonshade Earring",
right_ear="Heathen's Earring",
body="Nyame Mail",
hands="Nyame Gauntlets",
left_ring="Karieyh Ring",
right_ring="Niqmaddu Ring",
waist="Sailfi Belt +1",
legs="Nyame Flanchard",
feet="Heath. Sollerets +2",
back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},
}
sets.precast.WS['Cross Reaper'].PDL = set_combine(sets.precast.WS['Cross Reaper'], {})
sets.precast.WS['Savage Blade'] = set_combine(sets.precast.WS, {
waist="Sailfi Belt +1",
})
sets.precast.WS['Savage Blade'].PDL = set_combine(sets.precast.WS['Savage Blade'], {})
sets.precast.WS['Swift Blade'] = set_combine(sets.precast.WS['Savage Blade'], {})
sets.precast.WS['Swift Blade'].PDL = set_combine(sets.precast.WS['Swift Blade'], {})
sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS['Savage Blade'], {})
sets.precast.WS['Requiescat'].PDL = set_combine(sets.precast.WS['Requiescat'], {})
sets.precast.WS['Sanguine Blade'] = {}
sets.precast.WS['Armor Break'] = {
ammo="Knobkierrie",
head="Nyame Helm",
body="Nyame Mail",
hands="Nyame Gauntlets",
legs="Nyame Flanchard",
feet="Nyame Sollerets",
neck="Erra Pendant",
waist="Eschan Stone",
left_ear="Gwati Earring",
right_ear="Thrud Earring",
--right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
left_ring="Evanescence Ring",
right_ring="Stikini Ring",
back={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Dbl.Atk."+10','Damage taken-5%',}},
}
------------------------------------------------------------------------------------------------
---------------------------------------- Midcast Sets ------------------------------------------
------------------------------------------------------------------------------------------------
sets.midcast.FastRecast = sets.precast.FC
sets.midcast.SpellInterrupt = {
ammo="Staunch Tathlum",
head="Nyame Helm",
body="Nyame Mail",
hands="Nyame Gauntlets",
legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
feet="Nyame Sollerets",
neck="Loricate Torque +1",
waist="Resolute Belt",
left_ear="Loquac. Earring",
right_ear="Eabani Earring",
left_ring="Shadow Ring",
right_ring="Defending Ring",
back="Mubvum. Mantle",
}
sets.midcast.Utsusemi = sets.midcast.SpellInterrupt
sets.midcast.BlackMagic = {
ammo="Pemphredo Tathlum",
head={ name="Nyame Helm", augments={'Path: B',}},
body={ name="Nyame Mail", augments={'Path: B',}},
hands="Fallen's Finger Gauntlets +3",
legs={ name="Nyame Flanchard", augments={'Path: B',}},
feet="Heath. Sollerets +2",
neck="Baetyl Pendant",
waist="Orpheus's Sash",
left_ear="Friomisi Earring",
right_ear="Malignance Earring",
left_ring="Locus Ring",
right_ring={ name="Metamor. Ring +1", augments={'Path: A',}},
}
sets.midcast.DarkMagic = set_combine(sets.midcast.SpellInterrupt, {
ammo="Pemphredo Tathlum",
head="Ignominy Burgeonet +3",
body="Nyame Mail",
hands="Fallen's Finger Gauntlets +3",
legs="Heath. Flanchard +3",
feet="Ratri Sollerets",
neck="Erra Pendant",
waist="Casso Sash",
left_ear="Mani Earring",
right_ear="Dark Earring",
left_ring="Stikini Ring",
right_ring="Evanescence Ring",
back="Merciful Cape",
})
--body="Carmine Scale Mail +1",
--Enhanced absorb, dark magic, macc
sets.midcast.Absorb = set_combine(sets.midcast.DarkMagic, {
ammo="Pemphredo Tathlum",
head="Ignominy Burgeonet +3",
--body="Carmine Scale Mail +1",
body="Nyame Mail",
hands="Pavor Gauntlets",
legs="Heath. Flanchard +3",
feet="Ratri Sollerets",
neck="Erra Pendant",
waist="Casso Sash",
left_ear="Mani Earring",
left_ear="Malignance Earring",
right_ear="Dark Earring",
left_ring="Stikini Ring",
right_ring="Evanescence Ring",
back="Chuparrosa Mantle",--dur, pot
})
--Enhanced drain, dark magic, macc
sets.midcast.Drain = set_combine(sets.midcast.SpellInterrupt, {
ammo="Pemphredo Tathlum",
head="Nyame Helm",
bodu="Nyame Mail",
--body="Carmine Scale Mail +1",
hands="Fallen's Finger Gauntlets +3",
legs="Heath. Flanchard +3",
feet="Heathen's Sollerets +2",
--feet="Heathen's Sollerets +3",
neck="Erra Pendant",
waist="Orpheus's Sash",
left_ear="Malignance Earring",
right_ear="Hirudinea Earring",
left_ring="Archon Ring",
right_ring="Evanescence Ring",
back="Niht Mantle",
})
--Purely HP+
sets.midcast.Spikes = set_combine(sets.midcast.SpellInterrupt, {
head="Hjarrandi Helm",
body="Hjarrandi Breast.",
hands="Regal Cpt. Gloves",
legs="Sakpata's Cuisses",
feet="Sakpata's Leggings",
neck="Sanctity Necklace",
waist="Eschan Stone",
left_ear="Tuisto Earring",
right_ear="Eabani Earring",
left_ring="Moonlight Ring",
right_ring="Moonlight Ring",
back="Reiki Cloak",
})
------------------------------------------------------------------------------------------------
----------------------------------------- Idle Sets --------------------------------------------
------------------------------------------------------------------------------------------------
sets.resting = {}
sets.idle = {
ammo="Staunch Tathlum",
head="Hjarrandi Helm",
body="Sacro Breastplate",
hands="Sakpata's Gauntlets",
legs="Sakpata's Cuisses",
feet="Sakpata's Leggings",
neck="Loricate Torque +1",
waist="Asklepian Belt",
left_ear="Tuisto Earring",
right_ear="Eabani Earring",
left_ring="Moonlight Ring",
right_ring="Moonlight Ring",
back="Reiki Cloak",
}
sets.idle.Regen = set_combine(sets.idle, {
head="Crepuscular Helm",
body="Sacro Breastplate",
legs="Volte Brayettes",
neck="Bathy Choker +1",
left_ear="Infused Earring",
left_ring="Sheltered Ring",
})
sets.idle.Town = set_combine(sets.idle, {
})
------------------------------------------------------------------------------------------------
---------------------------------------- Defense Sets ------------------------------------------
------------------------------------------------------------------------------------------------
sets.defense.PDT = sets.idle.DT
sets.defense.MDT = {}
sets.Kiting = {body="Sakpata's Breastplate", legs="Carmine Cuisses +1", neck="Loricate Torque +1",}
------------------------------------------------------------------------------------------------
---------------------------------------- Engaged Sets ------------------------------------------
------------------------------------------------------------------------------------------------
sets.engaged = {
ammo="Coiste Bodhar",
head="Flam. Zucchetto +2",
body="Sakpata's Breastplate",
hands="Sakpata's Gauntlets",
legs="Ig. Flanchard +3",
feet="Flam. Gambieras +2",
neck="Abyssal Beads +2",
waist="Sailfi Belt +1",
left_ear="Schere Earring",
right_ear="Brutal Earring",
left_ring="Hetairoi Ring",
right_ring="Niqmaddu Ring",
back={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Dbl.Atk."+10','Damage taken-5%',}},
}
sets.engaged.AM3 = {
ammo={ name="Coiste Bodhar", augments={'Path: A',}},
head="Flam. Zucchetto +2",
body={ name="Valorous Mail", augments={'"Store TP"+8','DEX+7','Accuracy+14',}},
hands={ name="Sakpata's Gauntlets", augments={'Path: A',}},
legs={ name="Odyssean Cuisses", augments={'"Store TP"+7','DEX+2','Accuracy+15',}},
feet={ name="Valorous Greaves", augments={'Attack+5','"Store TP"+6','VIT+5','Accuracy+3',}},
neck={ name="Abyssal Beads +2", augments={'Path: A',}},
waist={ name="Sailfi Belt +1", augments={'Path: A',}},
left_ear="Crepuscular Earring",
right_ear="Telos Earring",
left_ring="Moonlight Ring",
right_ring="Moonlight Ring",
back={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Store TP"+10','Damage taken-5%',}},
}
sets.engaged.Aftermath = set_combine(sets.engaged, {
})
sets.engaged.LowAcc = set_combine(sets.engaged, {})
sets.engaged.MidAcc = set_combine(sets.engaged.LowAcc, {})
sets.engaged.HighAcc = set_combine(sets.engaged.MidAcc, {})
sets.engaged.STP = set_combine(sets.engaged, {})
sets.engaged.DW = {}
sets.engaged.DW.LowAcc = set_combine(sets.engaged.DW, {})
sets.engaged.DW.MidAcc = set_combine(sets.engaged.DW.LowAcc, {})
sets.engaged.DW.HighAcc = set_combine(sets.engaged.DW.MidAcc, {})
sets.engaged.DW.STP = set_combine(sets.engaged.DW, {})
------------------------------------------------------------------------------------------------
---------------------------------------- Hybrid Sets -------------------------------------------
------------------------------------------------------------------------------------------------
sets.engaged.Hybrid = set_combine(sets.engaged, {
ammo="Staunch Tathlum",
head="Hjarrandi Helm",
hands="Sakpata's Gauntlets",
legs="Sakpata's Cuisses",
feet="Sakpata's Leggings",
neck="Loricate Torque +1",
right_ring="Defending Ring",
})
sets.engaged.SubtleBlow = {
ammo="Seething Bomblet +1",
head="Sakpata's Helm",
body="Dagon Breastplate",
hands="Sakpata's Gauntlets",
legs="Sakpata's Cuisses",
feet="Sakpata's Leggings",
neck="Bathy Choker +1",
waist="Ioskeha Belt +1",
left_ear="Digni. Earring",
right_ear="Telos Earring",
left_ring="Rajas Ring",
right_ring="Niqmaddu Ring",
back={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Dbl.Atk."+10','Damage taken-5%',}},
--Need Chirich
}
sets.engaged.DT = set_combine(sets.engaged, sets.engaged.Hybrid)
sets.engaged.LowAcc.DT = set_combine(sets.engaged.LowAcc, sets.engaged.Hybrid)
sets.engaged.MidAcc.DT = set_combine(sets.engaged.MidAcc, sets.engaged.Hybrid)
sets.engaged.HighAcc.DT = set_combine(sets.engaged.HighAcc, sets.engaged.Hybrid)
sets.engaged.STP.DT = set_combine(sets.engaged.STP, sets.engaged.Hybrid)
sets.engaged.DW.DT = set_combine(sets.engaged.DW, sets.engaged.Hybrid)
sets.engaged.DW.LowAcc.DT = set_combine(sets.engaged.DW.LowAcc, sets.engaged.Hybrid)
sets.engaged.DW.MidAcc.DT = set_combine(sets.engaged.DW.MidAcc, sets.engaged.Hybrid)
sets.engaged.DW.HighAcc.DT = set_combine(sets.engaged.DW.HighAcc, sets.engaged.Hybrid)
sets.engaged.DW.STP.DT = set_combine(sets.engaged.DW.STP, sets.engaged.Hybrid)
------------------------------------------------------------------------------------------------
---------------------------------------- Special Sets ------------------------------------------
------------------------------------------------------------------------------------------------
sets.buff.Doom = {
neck="Nicander's Necklace", --20
left_ring="Purity Ring",
--ring2={name="Eshmun's Ring", bag="wardrobe4"}, --20
waist="Gishdubar Sash", --10
}
sets.Liberator = {main="Liberator", sub="Utu Grip"}
sets.Lycurgos = {main="Lycurgos", sub="Utu Grip"}
sets.Zantetsuken = {main="Zantetsuken X", sub="Utu Grip"}
sets.Naegling = {main="Naegling", sub="Blurred Shield"}
sets.Anguta = {main="Anguta", sub="Utu Grip"}
sets.Trial = {main="Albion", sub="Utu Grip"}
--sets.Trial = {main="Death Sickle", sub="Utu Grip"}
sets.Obi = {waist="Hachirin-no-Obi"}
sets.CP = {back="Mecistopins Mantle"}
sets.RP = {neck="Abyssal Beads +2"}
sets.TreasureHunter = {body="Volte Jupon", hands="Volte Bracers", waist="Chaac Belt"}
end
-----------------------------------
--Casting (spells, JAs, etc) 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 == 'Utsusemi' then
if buffactive['Copy Image (3)'] or buffactive['Copy Image (4+)'] then
cancel_spell()
add_to_chat(123, '**!! '..spell.english..' Canceled: [3+ IMAGES] !!**')
eventArgs.handled = true
return
elseif buffactive['Copy Image'] or buffactive['Copy Image (2)'] then
send_command('cancel 66; cancel 444; cancel Copy Image; cancel Copy Image (2)')
end
end
if spell.english == 'Last Resort' then
equip(sets.precast.LastResort)
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_aftercast(spell, action, spellMap, eventArgs)
if player.status ~= 'Engaged' and state.WeaponLock.value == false then
check_weaponset()
end
end
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Dark Magic' then
if spell.english:contains('Absorb') then
equip(sets.midcast.Absorb)
elseif spell.english:contains('Drain') then
equip(sets.midcast.Drain)
elseif spell.english:contains('Spikes') then
equip(sets.midcast.Spikes)
else
equip(sets.midcast.DarkMagic)
end
end
if spell.skill == 'Black Magic' then
equip(sets.midcast.BlackMagic)
end
if spell.english:contains('Utsusemi') then
equip(sets.midcast.Utsusemi)
end
end
-----------------------------------
--Buff changes
-----------------------------------
function job_buff_change(buff,gain)
if buff == "doom" then
if gain then
equip(sets.buff.Doom)
--send_command('@input /p ♪ Doomed ♪.')
disable('neck','ring1','ring2','waist')
else
enable('neck','ring1','ring2','waist')
handle_equipping_gear(player.status)
end
end
if buff:startswith('Aftermath') and player.equipment.main == 'Liberator' then
classes.CustomMeleeGroups:clear()
if (buff == "Aftermath: Lv.3" and gain) or buffactive['Aftermath: Lv.3'] then
classes.CustomMeleeGroups:append('AM3')
end
end
end
-- Called by the 'update' self-command, for common needs.
-- Set eventArgs.handled to true if we don't want automatic equipping of gear.
function job_handle_equipping_gear(playerStatus, eventArgs)
check_gear()
update_combat_form()
check_moving()
end
function job_update(cmdParams, eventArgs)
handle_equipping_gear(player.status)
end
function update_combat_form()
if DW == true then
state.CombatForm:set('DW')
elseif DW == false then
state.CombatForm:reset()
end
end
function check_weaponset()
equip(sets[state.WeaponSet.current])
end
-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
check_weaponset()
if state.TreasureHunter.current == 'on' then
equip(sets.TreasureHunter)
disable('body', 'hands', 'waist')
else
enable('body', 'hands', 'waist')
end
return meleeSet
end
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if state.CP.current == 'on' then
equip(sets.CP)
disable('back')
else
enable('back')
end
if state.RP.current == 'on' then
equip(sets.RP)
disable('neck')
else
enable('neck')
end
if state.TreasureHunter.current == 'on' or 'off' then
enable('body', 'hands', 'waist')
end
if state.Auto_Kite.value == true then
idleSet = set_combine(idleSet, sets.Kiting)
end
return idleSet
end
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
local cf_msg = ''
if state.CombatForm.has_value then
cf_msg = ' (' ..state.CombatForm.value.. ')'
end
local m_msg = state.OffenseMode.value
if state.HybridMode.value ~= 'Normal' then
m_msg = m_msg .. '/' ..state.HybridMode.value
end
local ws_msg = state.WeaponskillMode.value
local d_msg = 'None'
if state.DefenseMode.value ~= 'None' then
d_msg = state.DefenseMode.value .. state[state.DefenseMode.value .. 'DefenseMode'].value
end
local i_msg = state.IdleMode.value
local msg = ''
if state.Kiting.value then
msg = msg .. ' Kiting: On |'
end
add_to_chat(002, '| ' ..string.char(31,210).. 'Melee' ..cf_msg.. ': ' ..string.char(31,001)..m_msg.. string.char(31,002).. ' |'
..string.char(31,207).. ' WS: ' ..string.char(31,001)..ws_msg.. string.char(31,002).. ' |'
..string.char(31,060).. ' QD' ..qd_msg.. ': ' ..string.char(31,001)..e_msg.. string.char(31,002).. ' |'
..string.char(31,004).. ' Defense: ' ..string.char(31,001)..d_msg.. string.char(31,002).. ' |'
..string.char(31,008).. ' Idle: ' ..string.char(31,001)..i_msg.. string.char(31,002).. ' |'
..string.char(31,002)..msg)
eventArgs.handled = true
end
function gearinfo(cmdParams, eventArgs)
if cmdParams[1] == 'gearinfo' then
if type(tonumber(cmdParams[2])) == 'number' then
if tonumber(cmdParams[2]) ~= DW_needed then
DW_needed = tonumber(cmdParams[2])
DW = true
end
elseif type(cmdParams[2]) == 'string' then
if cmdParams[2] == 'false' then
DW_needed = 0
DW = false
end
end
if type(tonumber(cmdParams[3])) == 'number' then
if tonumber(cmdParams[3]) ~= Haste then
Haste = tonumber(cmdParams[3])
end
end
if type(cmdParams[4]) == 'string' then
if cmdParams[4] == 'true' then
moving = true
elseif cmdParams[4] == 'false' then
moving = false
end
end
if not midaction() then
job_update()
end
end
end
function check_moving()
if state.DefenseMode.value == 'None' and state.Kiting.value == false then
if state.Auto_Kite.value == false and moving then
state.Auto_Kite:set(true)
elseif state.Auto_Kite.value == true and moving == false then
state.Auto_Kite:set(false)
end
end
end
function check_gear()
if no_swap_gear:contains(player.equipment.left_ring) then
disable("ring1")
else
enable("ring1")
end
if no_swap_gear:contains(player.equipment.right_ring) then
disable("ring2")
else
enable("ring2")
end
if no_swap_gear:contains(player.equipment.waist) then
disable("waist")
else
enable("waist")
end
end
function job_state_change(stateField, newValue, oldValue)
if state.WeaponLock.value == true then
disable('main')
else
enable('main')
enable('sub')
end
check_weaponset()
end
windower.register_event('zone change',
function()
if no_swap_gear:contains(player.equipment.left_ring) then
enable("ring1")
equip(sets.idle)
end
if no_swap_gear:contains(player.equipment.right_ring) then
enable("ring2")
equip(sets.idle)
end
if no_swap_gear:contains(player.equipment.waist) then
enable("waist")
equip(sets.idle)
end
end)
function select_default_macro_book()
set_macro_page(1, 2)
end
function set_lockstyle()
send_command('wait 2; input /lockstyleset ' .. lockstyleset)
end [/spoiler]
Asura.Aragan
Serveur: Asura
Game: FFXI
By Asura.Aragan 2023-08-28 19:35:29
U need add this code u miss it in
function customize_idle_set(idleSet) Code
if state.IdleMode.current == 'Regen' then
idleSet = set_combine(idleSet, sets.idle.Regen)
end
By drakefs 2023-08-28 20:52:49
U need add this code u miss it in
function customize_idle_set(idleSet) Code
if state.IdleMode.current == 'Regen' then
idleSet = set_combine(idleSet, sets.idle.Regen)
end
A motes based lua should not need to do that.
By drakefs 2023-08-28 22:46:11
Bismarck.Serpentarius said: »The idleset issue persists in the afforementioned thf lua with relation to sets.idle.Evasion. This is the other lua that's having issues with sets.idle.Regen:
I cleaned up the includes and commented out a msg line (referencing QD, which wast not in the lua elsewhere). However, the lua is wroking as expected. sets.idle.Regen is equipping when I set Idle mode to Regen, for me. Make sure you are not in a town when testing (becuase sets.idle.Town will override every idle set).
Code function get_sets()
mote_include_version = 2
include('Mote-Include.lua')
end
--Job Setup (states, definitions etc)
function job_setup()
state.IgnoreTargetting = M(false, 'Ignore Targetting')
no_swap_gear = S{"Warp Ring", "Dim. Ring (Dem)", "Dim. Ring (Holla)", "Dim. Ring (Mea)",
"Trizek Ring", "Echad Ring", "Facility Ring", "Capacity Ring"}
-- For th_action_check():
-- JA IDs for actions that always have TH: Provoke, Animated Flourish
info.default_ja_ids = S{35, 204}
-- Unblinkable JA IDs for actions that always have TH: Quick/Box/Stutter Step, Desperate/Violent Flourish
info.default_u_ja_ids = S{201, 202, 203, 205, 207}
lockstyleset = 4
end
--User stuff (more states, keybindings, gear definitions)
function user_setup()
state.OffenseMode:options('Normal', 'LowAcc', 'MidAcc', 'HighAcc', 'STP')
state.HybridMode:options('Normal', 'DT', 'SubtleBlow')
state.WeaponskillMode:options('Normal', 'PDL')
state.IdleMode:options('Normal', 'Regen')
state.WeaponSet = M{['description']='Normal', 'Liberator', 'Anguta', 'Zantetsuken', 'Naegling', 'Lycurgos', 'Trial'}
state.CP = M(false, "Capacity Points Mode")
state.RP = M(false, "Reinforcement Points Mode")
state.WeaponLock = M(false, 'Weapon Lock')
state.TreasureHunter = M(false, "TreasureHunter")
send_command('bind %c gs c toggle CP')
send_command('bind %t gs c toggle RP')
send_command('bind %e gs c cycleback WeaponSet')
send_command('bind %r gs c cycle WeaponSet')
send_command('bind %w gs c toggle WeaponLock')
send_command('bind f10 gs c cycle OffenseMode')
send_command('bind f11 gs c cycle CastingMode')
send_command('bind f12 gs c cycle HybridMode')
send_command('bind %delete gs c set DefenseMode Physical')
send_command('bind ^delete gs c cycle PhysicalDefenseMode')
send_command('bind %end gs c set DefenseMode Magical')
send_command('bind ^end gs c reset DefenseMode')
send_command('bind pageup gs c update user')
send_command('bind pagedown gs c cycle IdleMode')
send_command('bind ^pagedown gs c toggle Kiting')
send_command('bind %q gs c toggle TreasureHunter')
send_command('bind ^numlock gs c cycle WeaponskillMode')
send_command('bind ^numlock gs c cycle WeaponskillMode')
send_command('bind ^numpad0 input /ws "Torcleaver" <t>')
send_command('bind ^numpad1 input /ws "Insurgency" <t>')
send_command('bind ^numpad2 input /ws "Entropy" <t>')
send_command('bind ^numpad3 input /ws "Crossreaper" <t>')
send_command('bind ^numpad4 input /ws "Armor Break" <t>')
send_command('bind ^numpad6 input /ws "Quietus" <t>')
--send_command('bind ^numpad6 input /ws "" <t>')
--send_command('bind ^numpad7 input /ws "" <t>')
--send_command('bind ^numpad8 input /ws "" <t>'))
--send_command('bind ^numpad9 input /ws "" <t>')
--send_command('bind %t gs c cycle treasuremode')
state.Auto_Kite = M(false, 'Auto_Kite')
Haste = 0
DW_needed = 0
DW = false
moving = false
update_combat_form()
end
--Unbinds keybindings on jobchange
function user_unload()
send_command ('unbind %`')
send_command('unbind %c')
send_command('unbind %q')
send_command('unbind ^numlock')
send_command('unbind ^numpad1')
send_command('unbind ^numpad2')
--send_command('unbind ^numpad7')
--send_command('unbind ^numpad8')
--send_command('unbind ^numpad9')
--send_command('unbind %t')
end
--Sets
function init_gear_sets()
------------------------------------------------------------------------------------------------
---------------------------------------- Precast Sets ------------------------------------------
------------------------------------------------------------------------------------------------
sets.precast.FC = {
ammo="Sapience Orb",--2
head="Carmine Mask +1",--14
body="Sacro Breastplate",--10
hands="Leyline Gloves",--8
legs={ name="Odyssean Cuisses", augments={'"Fast Cast"+6','STR+10','Accuracy+5',}},--6
feet={ name="Odyssean Greaves", augments={'Mag. Acc.+10','"Fast Cast"+4','INT+10',}},--9
neck="Voltsurge Torque",--4
waist="Resolute Belt",
left_ear="Malignance Earring",--4
right_ear="Loquac. Earring",--2
left_ring="Prolix Ring",--2
right_ring="Kishar Ring",--4
back={ name="Ankou's Mantle", augments={'"Fast Cast"+10',}},
}
sets.precast.FC.Utsusemi = set_combine(sets.precast.FC, {})
sets.precast.LastResort = {back="Ankou's Mantle"}
------------------------------------------------------------------------------------------------
------------------------------------- Weapon Skill Sets ----------------------------------------
------------------------------------------------------------------------------------------------
sets.precast.WS = {
ammo="Knobkierrie",
head="Hjarrandi Helm",
neck="Fotia Gorget",
left_ear="Moonshade Earring",
right_ear="Heathen's Earring",
body="Hjarrandi Breastplate",
hands="Nyame Gauntlets",
left_ring="Karieyh Ring",
right_ring="Regal Ring",
waist="Fotia Belt",
legs="Ig. Flanchard +3",
feet="Heath. Sollerets +2",
back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},
}
sets.precast.WS.PDL = set_combine(sets.precast.WS, {})
sets.precast.WS['Torcleaver'] = {
ammo="Knobkierrie",
head="Nyame Helm",
body="Nyame Mail",
hands="Nyame Gauntlets",
legs="Nyame Flanchard",
feet="Heath. Sollerets +2",
neck="Fotia Gorget",
waist="Sailfi Belt +1",
left_ear="Heathen's Earring",
right_ear="Moonshade Earring",
right_ring="Regal Ring",
left_ring="Niqmaddu Ring",
back={ name="Ankou's Mantle", augments={'VIT+20','Accuracy+20 Attack+20','VIT+10','Weapon skill damage +10%',}},
}
sets.precast.WS.PDL = set_combine(sets.precast.WS['Torcleaver'], {})
sets.precast.WS['Entropy'] = {
ammo="Knobkierrie",
head="Heath. Bur. +3",
neck="Fotia Gorget",
left_ear="Moonshade Earring",
right_ear="Heathen's Earring",
--right_ear="Moonshade Earring",
body="Dagon Breastplate",
hands="Nyame Gauntlets",
left_ring="Karieyh Ring",
right_ring="Regal Ring",
waist="Fotia Belt",
legs="Ig. Flanchard +3",
feet="Heath. Sollerets +2",
back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},
}
sets.precast.WS['Entropy'].PDL = set_combine(sets.precast.WS['Entropy'], {})
sets.precast.WS['Quietus'] = {
ammo="Knobkierrie",
head="Heath. Bur. +3",
neck="Fotia Gorget",
left_ear="Moonshade Earring",
right_ear="Heathen's Earring",
body="Dagon Breastplate",
hands="Nyame Gauntlets",
left_ring="Karieyh Ring",
right_ring="Regal Ring",
waist="Fotia Belt",
legs="Ig. Flanchard +3",
feet="Heath. Sollerets +2",
back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},
}
sets.precast.WS['Quietus'].PDL = set_combine(sets.precast.WS['Quietus'], {})
sets.precast.WS['Insurgency'] = {
ammo="Knobkierrie",
head="Heath. Bur. +3",
neck="Caro Necklace",
left_ear="Moonshade Earring",
right_ear="Heathen's Earring",
body="Nyame Mail",
hands="Sakpata's Gauntlets",
left_ring="Niqmaddu Ring",
right_ring="Regal Ring",
waist="Sailfi Belt +1",
legs="Ig. Flanchard +3",
feet="Heath. Sollerets +2",
back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},
}
sets.precast.WS['Insurgency'].PDL = set_combine(sets.precast.WS['Insurgency'], {})
sets.precast.WS['Cross Reaper'] = {
ammo="Knobkierrie",
head="Heath. Bur. +3",
neck="Caro Necklace",
left_ear="Moonshade Earring",
right_ear="Heathen's Earring",
body="Nyame Mail",
hands="Nyame Gauntlets",
left_ring="Karieyh Ring",
right_ring="Niqmaddu Ring",
waist="Sailfi Belt +1",
legs="Nyame Flanchard",
feet="Heath. Sollerets +2",
back={ name="Ankou's Mantle", augments={'STR+20','Accuracy+20 Attack+20','STR+10','Weapon skill damage +10%',}},
}
sets.precast.WS['Cross Reaper'].PDL = set_combine(sets.precast.WS['Cross Reaper'], {})
sets.precast.WS['Savage Blade'] = set_combine(sets.precast.WS, {
waist="Sailfi Belt +1",
})
sets.precast.WS['Savage Blade'].PDL = set_combine(sets.precast.WS['Savage Blade'], {})
sets.precast.WS['Swift Blade'] = set_combine(sets.precast.WS['Savage Blade'], {})
sets.precast.WS['Swift Blade'].PDL = set_combine(sets.precast.WS['Swift Blade'], {})
sets.precast.WS['Requiescat'] = set_combine(sets.precast.WS['Savage Blade'], {})
sets.precast.WS['Requiescat'].PDL = set_combine(sets.precast.WS['Requiescat'], {})
sets.precast.WS['Sanguine Blade'] = {}
sets.precast.WS['Armor Break'] = {
ammo="Knobkierrie",
head="Nyame Helm",
body="Nyame Mail",
hands="Nyame Gauntlets",
legs="Nyame Flanchard",
feet="Nyame Sollerets",
neck="Erra Pendant",
waist="Eschan Stone",
left_ear="Gwati Earring",
right_ear="Thrud Earring",
--right_ear={ name="Moonshade Earring", augments={'Accuracy+4','TP Bonus +250',}},
left_ring="Evanescence Ring",
right_ring="Stikini Ring",
back={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Dbl.Atk."+10','Damage taken-5%',}},
}
------------------------------------------------------------------------------------------------
---------------------------------------- Midcast Sets ------------------------------------------
------------------------------------------------------------------------------------------------
sets.midcast.FastRecast = sets.precast.FC
sets.midcast.SpellInterrupt = {
ammo="Staunch Tathlum",
head="Nyame Helm",
body="Nyame Mail",
hands="Nyame Gauntlets",
legs={ name="Carmine Cuisses +1", augments={'Accuracy+20','Attack+12','"Dual Wield"+6',}},
feet="Nyame Sollerets",
neck="Loricate Torque +1",
waist="Resolute Belt",
left_ear="Loquac. Earring",
right_ear="Eabani Earring",
left_ring="Shadow Ring",
right_ring="Defending Ring",
back="Mubvum. Mantle",
}
sets.midcast.Utsusemi = sets.midcast.SpellInterrupt
sets.midcast.BlackMagic = {
ammo="Pemphredo Tathlum",
head={ name="Nyame Helm", augments={'Path: B',}},
body={ name="Nyame Mail", augments={'Path: B',}},
hands="Fallen's Finger Gauntlets +3",
legs={ name="Nyame Flanchard", augments={'Path: B',}},
feet="Heath. Sollerets +2",
neck="Baetyl Pendant",
waist="Orpheus's Sash",
left_ear="Friomisi Earring",
right_ear="Malignance Earring",
left_ring="Locus Ring",
right_ring={ name="Metamor. Ring +1", augments={'Path: A',}},
}
sets.midcast.DarkMagic = set_combine(sets.midcast.SpellInterrupt, {
ammo="Pemphredo Tathlum",
head="Ignominy Burgeonet +3",
body="Nyame Mail",
hands="Fallen's Finger Gauntlets +3",
legs="Heath. Flanchard +3",
feet="Ratri Sollerets",
neck="Erra Pendant",
waist="Casso Sash",
left_ear="Mani Earring",
right_ear="Dark Earring",
left_ring="Stikini Ring",
right_ring="Evanescence Ring",
back="Merciful Cape",
})
--body="Carmine Scale Mail +1",
--Enhanced absorb, dark magic, macc
sets.midcast.Absorb = set_combine(sets.midcast.DarkMagic, {
ammo="Pemphredo Tathlum",
head="Ignominy Burgeonet +3",
--body="Carmine Scale Mail +1",
body="Nyame Mail",
hands="Pavor Gauntlets",
legs="Heath. Flanchard +3",
feet="Ratri Sollerets",
neck="Erra Pendant",
waist="Casso Sash",
left_ear="Mani Earring",
left_ear="Malignance Earring",
right_ear="Dark Earring",
left_ring="Stikini Ring",
right_ring="Evanescence Ring",
back="Chuparrosa Mantle",--dur, pot
})
--Enhanced drain, dark magic, macc
sets.midcast.Drain = set_combine(sets.midcast.SpellInterrupt, {
ammo="Pemphredo Tathlum",
head="Nyame Helm",
bodu="Nyame Mail",
--body="Carmine Scale Mail +1",
hands="Fallen's Finger Gauntlets +3",
legs="Heath. Flanchard +3",
feet="Heathen's Sollerets +2",
--feet="Heathen's Sollerets +3",
neck="Erra Pendant",
waist="Orpheus's Sash",
left_ear="Malignance Earring",
right_ear="Hirudinea Earring",
left_ring="Archon Ring",
right_ring="Evanescence Ring",
back="Niht Mantle",
})
--Purely HP+
sets.midcast.Spikes = set_combine(sets.midcast.SpellInterrupt, {
head="Hjarrandi Helm",
body="Hjarrandi Breast.",
hands="Regal Cpt. Gloves",
legs="Sakpata's Cuisses",
feet="Sakpata's Leggings",
neck="Sanctity Necklace",
waist="Eschan Stone",
left_ear="Tuisto Earring",
right_ear="Eabani Earring",
left_ring="Moonlight Ring",
right_ring="Moonlight Ring",
back="Reiki Cloak",
})
------------------------------------------------------------------------------------------------
----------------------------------------- Idle Sets --------------------------------------------
------------------------------------------------------------------------------------------------
sets.resting = {}
sets.idle = {
ammo="Staunch Tathlum",
head="Hjarrandi Helm",
body="Sacro Breastplate",
hands="Sakpata's Gauntlets",
legs="Sakpata's Cuisses",
feet="Sakpata's Leggings",
neck="Loricate Torque +1",
waist="Asklepian Belt",
left_ear="Tuisto Earring",
right_ear="Eabani Earring",
left_ring="Moonlight Ring",
right_ring="Moonlight Ring",
back="Reiki Cloak",
}
sets.idle.Regen = set_combine(sets.idle, {
head="Crepuscular Helm",
body="Sacro Breastplate",
legs="Volte Brayettes",
neck="Bathy Choker +1",
left_ear="Infused Earring",
left_ring="Sheltered Ring",
})
sets.idle.Town = set_combine(sets.idle, {
})
------------------------------------------------------------------------------------------------
---------------------------------------- Defense Sets ------------------------------------------
------------------------------------------------------------------------------------------------
sets.defense.PDT = sets.idle.DT
sets.defense.MDT = {}
sets.Kiting = {body="Sakpata's Breastplate", legs="Carmine Cuisses +1", neck="Loricate Torque +1",}
------------------------------------------------------------------------------------------------
---------------------------------------- Engaged Sets ------------------------------------------
------------------------------------------------------------------------------------------------
sets.engaged = {
ammo="Coiste Bodhar",
head="Flam. Zucchetto +2",
body="Sakpata's Breastplate",
hands="Sakpata's Gauntlets",
legs="Ig. Flanchard +3",
feet="Flam. Gambieras +2",
neck="Abyssal Beads +2",
waist="Sailfi Belt +1",
left_ear="Schere Earring",
right_ear="Brutal Earring",
left_ring="Hetairoi Ring",
right_ring="Niqmaddu Ring",
back={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Dbl.Atk."+10','Damage taken-5%',}},
}
sets.engaged.AM3 = {
ammo={ name="Coiste Bodhar", augments={'Path: A',}},
head="Flam. Zucchetto +2",
body={ name="Valorous Mail", augments={'"Store TP"+8','DEX+7','Accuracy+14',}},
hands={ name="Sakpata's Gauntlets", augments={'Path: A',}},
legs={ name="Odyssean Cuisses", augments={'"Store TP"+7','DEX+2','Accuracy+15',}},
feet={ name="Valorous Greaves", augments={'Attack+5','"Store TP"+6','VIT+5','Accuracy+3',}},
neck={ name="Abyssal Beads +2", augments={'Path: A',}},
waist={ name="Sailfi Belt +1", augments={'Path: A',}},
left_ear="Crepuscular Earring",
right_ear="Telos Earring",
left_ring="Moonlight Ring",
right_ring="Moonlight Ring",
back={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Store TP"+10','Damage taken-5%',}},
}
sets.engaged.Aftermath = set_combine(sets.engaged, {
})
sets.engaged.LowAcc = set_combine(sets.engaged, {})
sets.engaged.MidAcc = set_combine(sets.engaged.LowAcc, {})
sets.engaged.HighAcc = set_combine(sets.engaged.MidAcc, {})
sets.engaged.STP = set_combine(sets.engaged, {})
sets.engaged.DW = {}
sets.engaged.DW.LowAcc = set_combine(sets.engaged.DW, {})
sets.engaged.DW.MidAcc = set_combine(sets.engaged.DW.LowAcc, {})
sets.engaged.DW.HighAcc = set_combine(sets.engaged.DW.MidAcc, {})
sets.engaged.DW.STP = set_combine(sets.engaged.DW, {})
------------------------------------------------------------------------------------------------
---------------------------------------- Hybrid Sets -------------------------------------------
------------------------------------------------------------------------------------------------
sets.engaged.Hybrid = set_combine(sets.engaged, {
ammo="Staunch Tathlum",
head="Hjarrandi Helm",
hands="Sakpata's Gauntlets",
legs="Sakpata's Cuisses",
feet="Sakpata's Leggings",
neck="Loricate Torque +1",
right_ring="Defending Ring",
})
sets.engaged.SubtleBlow = {
ammo="Seething Bomblet +1",
head="Sakpata's Helm",
body="Dagon Breastplate",
hands="Sakpata's Gauntlets",
legs="Sakpata's Cuisses",
feet="Sakpata's Leggings",
neck="Bathy Choker +1",
waist="Ioskeha Belt +1",
left_ear="Digni. Earring",
right_ear="Telos Earring",
left_ring="Rajas Ring",
right_ring="Niqmaddu Ring",
back={ name="Ankou's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','DEX+10','"Dbl.Atk."+10','Damage taken-5%',}},
--Need Chirich
}
sets.engaged.DT = set_combine(sets.engaged, sets.engaged.Hybrid)
sets.engaged.LowAcc.DT = set_combine(sets.engaged.LowAcc, sets.engaged.Hybrid)
sets.engaged.MidAcc.DT = set_combine(sets.engaged.MidAcc, sets.engaged.Hybrid)
sets.engaged.HighAcc.DT = set_combine(sets.engaged.HighAcc, sets.engaged.Hybrid)
sets.engaged.STP.DT = set_combine(sets.engaged.STP, sets.engaged.Hybrid)
sets.engaged.DW.DT = set_combine(sets.engaged.DW, sets.engaged.Hybrid)
sets.engaged.DW.LowAcc.DT = set_combine(sets.engaged.DW.LowAcc, sets.engaged.Hybrid)
sets.engaged.DW.MidAcc.DT = set_combine(sets.engaged.DW.MidAcc, sets.engaged.Hybrid)
sets.engaged.DW.HighAcc.DT = set_combine(sets.engaged.DW.HighAcc, sets.engaged.Hybrid)
sets.engaged.DW.STP.DT = set_combine(sets.engaged.DW.STP, sets.engaged.Hybrid)
------------------------------------------------------------------------------------------------
---------------------------------------- Special Sets ------------------------------------------
------------------------------------------------------------------------------------------------
sets.buff.Doom = {
neck="Nicander's Necklace", --20
left_ring="Purity Ring",
--ring2={name="Eshmun's Ring", bag="wardrobe4"}, --20
waist="Gishdubar Sash", --10
}
sets.Liberator = {main="Liberator", sub="Utu Grip"}
sets.Lycurgos = {main="Lycurgos", sub="Utu Grip"}
sets.Zantetsuken = {main="Zantetsuken X", sub="Utu Grip"}
sets.Naegling = {main="Naegling", sub="Blurred Shield"}
sets.Anguta = {main="Anguta", sub="Utu Grip"}
sets.Trial = {main="Albion", sub="Utu Grip"}
--sets.Trial = {main="Death Sickle", sub="Utu Grip"}
sets.Obi = {waist="Hachirin-no-Obi"}
sets.CP = {back="Mecistopins Mantle"}
sets.RP = {neck="Abyssal Beads +2"}
sets.TreasureHunter = {body="Volte Jupon", hands="Volte Bracers", waist="Chaac Belt"}
end
-----------------------------------
--Casting (spells, JAs, etc) 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 == 'Utsusemi' then
if buffactive['Copy Image (3)'] or buffactive['Copy Image (4+)'] then
cancel_spell()
add_to_chat(123, '**!! '..spell.english..' Canceled: [3+ IMAGES] !!**')
eventArgs.handled = true
return
elseif buffactive['Copy Image'] or buffactive['Copy Image (2)'] then
send_command('cancel 66; cancel 444; cancel Copy Image; cancel Copy Image (2)')
end
end
if spell.english == 'Last Resort' then
equip(sets.precast.LastResort)
end
end
-- Set eventArgs.handled to true if we don't want any automatic gear equipping to be done.
function job_aftercast(spell, action, spellMap, eventArgs)
if player.status ~= 'Engaged' and state.WeaponLock.value == false then
check_weaponset()
end
end
function job_post_midcast(spell, action, spellMap, eventArgs)
if spell.skill == 'Dark Magic' then
if spell.english:contains('Absorb') then
equip(sets.midcast.Absorb)
elseif spell.english:contains('Drain') then
equip(sets.midcast.Drain)
elseif spell.english:contains('Spikes') then
equip(sets.midcast.Spikes)
else
equip(sets.midcast.DarkMagic)
end
end
if spell.skill == 'Black Magic' then
equip(sets.midcast.BlackMagic)
end
if spell.english:contains('Utsusemi') then
equip(sets.midcast.Utsusemi)
end
end
-----------------------------------
--Buff changes
-----------------------------------
function job_buff_change(buff,gain)
if buff == "doom" then
if gain then
equip(sets.buff.Doom)
--send_command('@input /p ♪ Doomed ♪.')
disable('neck','ring1','ring2','waist')
else
enable('neck','ring1','ring2','waist')
handle_equipping_gear(player.status)
end
end
if buff:startswith('Aftermath') and player.equipment.main == 'Liberator' then
classes.CustomMeleeGroups:clear()
if (buff == "Aftermath: Lv.3" and gain) or buffactive['Aftermath: Lv.3'] then
classes.CustomMeleeGroups:append('AM3')
end
end
end
-- Called by the 'update' self-command, for common needs.
-- Set eventArgs.handled to true if we don't want automatic equipping of gear.
function job_handle_equipping_gear(playerStatus, eventArgs)
check_gear()
update_combat_form()
check_moving()
end
function job_update(cmdParams, eventArgs)
handle_equipping_gear(player.status)
end
function update_combat_form()
if DW == true then
state.CombatForm:set('DW')
elseif DW == false then
state.CombatForm:reset()
end
end
function check_weaponset()
equip(sets[state.WeaponSet.current])
end
-- Modify the default melee set after it was constructed.
function customize_melee_set(meleeSet)
check_weaponset()
if state.TreasureHunter.current == 'on' then
equip(sets.TreasureHunter)
disable('body', 'hands', 'waist')
else
enable('body', 'hands', 'waist')
end
return meleeSet
end
-- Modify the default idle set after it was constructed.
function customize_idle_set(idleSet)
if state.CP.current == 'on' then
equip(sets.CP)
disable('back')
else
enable('back')
end
if state.RP.current == 'on' then
equip(sets.RP)
disable('neck')
else
enable('neck')
end
if state.TreasureHunter.current == 'on' or 'off' then
enable('body', 'hands', 'waist')
end
if state.Auto_Kite.value == true then
idleSet = set_combine(idleSet, sets.Kiting)
end
return idleSet
end
-- Set eventArgs.handled to true if we don't want the automatic display to be run.
function display_current_job_state(eventArgs)
local cf_msg = ''
if state.CombatForm.has_value then
cf_msg = ' (' ..state.CombatForm.value.. ')'
end
local m_msg = state.OffenseMode.value
if state.HybridMode.value ~= 'Normal' then
m_msg = m_msg .. '/' ..state.HybridMode.value
end
local ws_msg = state.WeaponskillMode.value
local d_msg = 'None'
if state.DefenseMode.value ~= 'None' then
d_msg = state.DefenseMode.value .. state[state.DefenseMode.value .. 'DefenseMode'].value
end
local i_msg = state.IdleMode.value
local msg = ''
if state.Kiting.value then
msg = msg .. ' Kiting: On |'
end
add_to_chat(002, '| ' ..string.char(31,210).. 'Melee' ..cf_msg.. ': ' ..string.char(31,001)..m_msg.. string.char(31,002).. ' |'
..string.char(31,207).. ' WS: ' ..string.char(31,001)..ws_msg.. string.char(31,002).. ' |'
--..string.char(31,060).. ' QD' ..qd_msg.. ': ' ..string.char(31,001)..e_msg.. string.char(31,002).. ' |'
..string.char(31,004).. ' Defense: ' ..string.char(31,001)..d_msg.. string.char(31,002).. ' |'
..string.char(31,008).. ' Idle: ' ..string.char(31,001)..i_msg.. string.char(31,002).. ' |'
..string.char(31,002)..msg)
eventArgs.handled = true
end
function gearinfo(cmdParams, eventArgs)
if cmdParams[1] == 'gearinfo' then
if type(tonumber(cmdParams[2])) == 'number' then
if tonumber(cmdParams[2]) ~= DW_needed then
DW_needed = tonumber(cmdParams[2])
DW = true
end
elseif type(cmdParams[2]) == 'string' then
if cmdParams[2] == 'false' then
DW_needed = 0
DW = false
end
end
if type(tonumber(cmdParams[3])) == 'number' then
if tonumber(cmdParams[3]) ~= Haste then
Haste = tonumber(cmdParams[3])
end
end
if type(cmdParams[4]) == 'string' then
if cmdParams[4] == 'true' then
moving = true
elseif cmdParams[4] == 'false' then
moving = false
end
end
if not midaction() then
job_update()
end
end
end
function check_moving()
if state.DefenseMode.value == 'None' and state.Kiting.value == false then
if state.Auto_Kite.value == false and moving then
state.Auto_Kite:set(true)
elseif state.Auto_Kite.value == true and moving == false then
state.Auto_Kite:set(false)
end
end
end
function check_gear()
if no_swap_gear:contains(player.equipment.left_ring) then
disable("ring1")
else
enable("ring1")
end
if no_swap_gear:contains(player.equipment.right_ring) then
disable("ring2")
else
enable("ring2")
end
if no_swap_gear:contains(player.equipment.waist) then
disable("waist")
else
enable("waist")
end
end
function job_state_change(stateField, newValue, oldValue)
if state.WeaponLock.value == true then
disable('main')
else
enable('main')
enable('sub')
end
check_weaponset()
end
windower.register_event('zone change',
function()
if no_swap_gear:contains(player.equipment.left_ring) then
enable("ring1")
equip(sets.idle)
end
if no_swap_gear:contains(player.equipment.right_ring) then
enable("ring2")
equip(sets.idle)
end
if no_swap_gear:contains(player.equipment.waist) then
enable("waist")
equip(sets.idle)
end
end)
function select_default_macro_book()
set_macro_page(1, 2)
end
function set_lockstyle()
send_command('wait 2; input /lockstyleset ' .. lockstyleset)
end
Serveur: Bismarck
Game: FFXI
Posts: 4
By Bismarck.Serpentarius 2023-08-29 08:09:45
Thanks! sets.idle.Town was the culprit - didn't even consider that A) it would override other idlesets and B) I was testing these in town. Hah.
I'm still having issues with autokite though. I tried editing out the manual override for sets.Kiting.value to see if I could proc the moving check but the lua isn't picking up that I'm moving OR simply isn't procing the swap while moving.
By drakefs 2023-08-29 10:30:57
Bismarck.Serpentarius said: »I'm still having issues with autokite though
Auto Kite requires Gearinfo. Gearinfo sends commands to GS to updates the state of
that is being used for logic to set auto_kite Code function check_moving()
if state.DefenseMode.value == 'None' and state.Kiting.value == false then
if state.Auto_Kite.value == false and moving then
state.Auto_Kite:set(true)
elseif state.Auto_Kite.value == true and moving == false then
state.Auto_Kite:set(false)
end
end
end
does indeed work but without gearinfo running, moving is always false.
Serveur: Bismarck
Game: FFXI
Posts: 4
By Bismarck.Serpentarius 2023-08-29 13:24:34
Ive tried with gearinfo running and not running. When I inherited a second character, the autokite function was working initially for that character but has since stopped working.
I also tried using a fresh version of Arislan's Nin lua and still couldnt get it to function. Do I just need to find an updated version of gearinfo or something?
By drakefs 2023-08-29 13:44:34
I do not use gearinfo, so no clue what is required to make that work correctly but this is how I tested where the function was stopping
Code function check_moving()
add_to_chat(123, 'Check Movement')
if state.Kiting.value then
add_to_chat(121, 'Kite True')
else
add_to_chat(121, 'Kite False')
end
if state.Auto_Kite.value then
add_to_chat(122, 'A-Kite True')
else
add_to_chat(122, 'A-Kite False')
end
if moving then
add_to_chat(120, 'Moving')
else
add_to_chat(120, 'Not Moving')
end
if state.DefenseMode.value == 'None' and state.Kiting.value == false then
if not state.Auto_Kite.value and moving then
state.Auto_Kite:set(true)
add_to_chat(123, 'Auto-Kite on')
elseif state.Auto_Kite.value == true and moving == false then
state.Auto_Kite:set(false)
add_to_chat(123, 'Auto-Kite off')
end
end
end
Asura.Sechs
Serveur: Asura
Game: FFXI
Posts: 10135
By Asura.Sechs 2023-08-29 17:17:27
As for Sechs' question:
Where do you check for being dead or alive? In Status_change I guess?
One of the status changes that trigger said function is indeed
also
returns dead while dead. After trying this out a few times and seeing how it wasn't working, I had a flash in my mind, remembering I actually discussed this already in this thread some time ago.
And it seems I wasn't entirely wrong
Basically Gearswap filters out some statuses, among which Dead and Engaged-Dead. If the "new" in the Status_Change function happens to be one of those, it won't be processed by the function.
I wonder why Byrth felt the need to make Gearswap.lua like that.
There has to be a reason, like Dead or Engaged-Dead producing some errors or bad behaviours and so he decided to filter them out?
By drakefs 2023-08-29 18:08:01
Interesting, I would suggest asking Byrth or asking in the windower discord. If ya get an answer, let me know.
Asura.Sechs
Serveur: Asura
Game: FFXI
Posts: 10135
By Asura.Sechs 2023-08-30 14:23:19
Interesting, I would suggest asking Byrth or asking in the windower discord. If ya get an answer, let me know. I think the reason is probably for the player's safety.
Without such a "protection", Gearswap could in theory swap your gear when you're dead, which normally can't happen, and it could be suspicious and make you get reported or... I dunno, I think that might be the reason.
Fenrir.Jinxs
Serveur: Fenrir
Game: FFXI
Posts: 541
By Fenrir.Jinxs 2023-08-30 14:28:10
There was a discussion recently about a unm in pashow. It gives you both a costume and an amnesia effect you can with enough magic evasion avoid the amnesia.
When I tried to ws which apparently you should not be able to I hard crashed my game.
Apparently you are not supposed to be able to ws in costume and maybe even change gear.
Asura.Sechs
Serveur: Asura
Game: FFXI
Posts: 10135
By Asura.Sechs 2023-09-08 13:28:45
Not properly a direct Gearswap question, but hoping to find help in here.
So I recently found out that if you use a set_combine with a set that's defined after the one you're currently creating, Gearswap won't give you an error and the Lua will be correctly loaded, but the set won't be really combined.
Example: Code set.example = set_combine(set.test, {stuff})
...
...
set.test = {stuff2}
Basically set.example will only have "stuff" inside, and the content of the combined set (stuff2) will be ignored.
Hopefully I explained the issue!
Now, my real problem is another.
Basically I know that in my luas I have AT LEAST one example like this and I want to fix it, but... I have no bloody clue in which Lua it could be and I'm lazy and don't wanna read all of them from line 0 to the end.
Can anybody think of a system where I could "find" this thing in all of my luas?
Serveur: Cerberus
Game: FFXI
Posts: 1809
By Cerberus.Shadowmeld 2023-09-08 14:52:00
you've defined set.test somewhere or it would have given you a null error. it would just use as a base, whatever was in set.test where it was originally defined, and then later update the set.test to whatever stuff2 is.
The easiest fix is to move the set.test = {stuff2} above the other declaration. I don't know how to help you how to find where this is happening.
Carbuncle.Maletaru
Serveur: Carbuncle
Game: FFXI
Posts: 2676
By Carbuncle.Maletaru 2023-09-08 15:18:21
If you're looking for a specific string in all your lua files, open up Powershell, navigate (cd) to the directory where your files are contained, and run this:
Get-ChildItem -Recurse | Select-String "TEXTYOUWANTTOFIND" -List | Select Path
[+]
Asura.Sechs
Serveur: Asura
Game: FFXI
Posts: 10135
By Asura.Sechs 2023-09-08 15:33:57
Cerberus.Shadowmeld said: »you've defined set.test somewhere or it would have given you a null error. it would just use as a base, whatever was in set.test where it was originally defined, and then later update the set.test to whatever stuff2 is.
The easiest fix is to move the set.test = {stuff2} above the other declaration. I don't know how to help you how to find where this is happening. No man, that's what I thought but appearently it doesn't work like this.
I've had my BLU lua set like that for the longest time, and I noticed only today that the first set was considering only the stuff within {} and completely ignoring the items inside the set I combined it to, only because this set was defined after.
Once I moved the first set after the second, everything started working perfectly.
But either way I wasn't getting a syntax error while loading the Lua, the set simply wasn't working and I wasn't aware of it, this means that for a long time I had that specific set crippled and I didn't know.
Asura.Sechs
Serveur: Asura
Game: FFXI
Posts: 10135
By Asura.Sechs 2023-09-10 08:18:37
Cerberus.Shadowmeld said: »spell.action_type == 'Item' and spell.english == "Holy Water" then
-- Do the thing joolee!
end Tried this and it's not working.
Where is the resource file for action_types? I couldn't find it. I can only see the res file for Job Abilities, for Spells and for Items.
But the Items file res has a different formats, its data has "category", "flags" and "type" but how do I check for all this stuff?
I don't think spell.something like in your if is gonna work.
I also tried to remove the "and spell.english == "Holy Water" to focus on the main condition and tested for spell.action spell.prefix , spell.category, spell.id
Filling the various fields with the correct data retrieved from the items.lua table.
None of this seems to be working, the "if" never succeeds the check.
Asura.Sechs
Serveur: Asura
Game: FFXI
Posts: 10135
By Asura.Sechs 2023-09-10 08:37:50
Ok so I think I found the issue... the code DOES work if you use the item from a command (like /item "Holy Water" <me>) but it does NOT work if you use it from the menu.
Uhmmm there must be a reason for that.
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.
|
|