Gearswap Command

Eorzea Time
 
 
 
Language: JP EN FR DE
Version 3.1
New Items
users online
Forum » FFXI » Jobs » White Mage » Gearswap command
Gearswap command
Offline
Posts: 8
By Austille 2018-05-01 08:35:44
Link | Quote | Reply
 
Hello!

I was looking up gearswap commands and noticed that there is a player.speed reference that is available. I thought that I could use this to create a function that would allow me to use refresh gear (ie Serpentes Sabots) while standing still and Herald's Gaiters while on the move.

Any suggestions on a command to make this work?
 Asura.Kaotik
Offline
Server: Asura
Game: FFXI
user: Kaotic
Posts: 25
By Asura.Kaotik 2018-05-01 09:24:10
Link | Quote | Reply
 
I haven't personally done anything with the speed reference, so I'm not 100% sure of what it returns. It could be what you think and return what your current speed is, or it could simply be what speed your character can run at (i.e. a static amount, that wouldn't update when you are standing still). Maybe somebody else can comment on that to confirm, or I can toy around with it later tonight.

The other thing I'm not sure on with gearswap is how often it updates, if its set to only look for certain packets (for example, when you engage, disengage, weaponskill, spellcast, etc..), you may find yourself in a situation that it only changes your feet when something like that occurs. Just not something I've ever had much reason to test.

If it does update, I would try something like:
Code
if player.speed > 0 then
     sets.idle = {feet = 'Herald's Gaiters'}
else
     sets.idle = {feet = 'Serpentes Sabots'}
end


You would take out your current sets.idle and replace it with that, fill in all your other gear appropriately. One thing of note, neither of these pieces are ilvl, so they don't have the stat vomit or meva that the updated gear has. So if you get hit by an AoE it's gonna hurt, not sure I'd chance it for the miniscule gain.
 Asura.Verbannt
Offline
Server: Asura
Game: FFXI
user: Akton
Posts: 166
By Asura.Verbannt 2018-05-01 11:18:09
Link | Quote | Reply
 
Gamergiving and I worked on this more than 3 years ago using an original argument that someone else made using windower info and math to see if someone was moving, changes were made as to not brute force the equip, and to identify if you could use the SoA movement body, as before it equipped but every time you stopped it would not update.

If you want to dig through my pld lua it is in there, also its in the blm lua in the same github library but with different arguments to prevent mana wall feet from being taken off.

https://github.com/Akton99/Gearswap-Lua/blob/master/Verbannt_PLD
Offline
Posts: 8
By Austille 2018-05-01 11:34:42
Link | Quote | Reply
 
I'll give it a scrub to see if I can find it. Thanks!
Offline
Posts: 8
By Austille 2018-05-01 11:40:19
Link | Quote | Reply
 
i think the combo I can see is..

sets.MoveSpeed = {
legs = "Carmine Cuisses +1",
}

and

mov = {counter=0}
if player and player.index and windower.ffxi.get_mob_by_index(player.index) then
mov.x = windower.ffxi.get_mob_by_index(player.index).x
mov.y = windower.ffxi.get_mob_by_index(player.index).y
mov.z = windower.ffxi.get_mob_by_index(player.index).z
end

moving = false
windower.raw_register_event('prerender',function()
mov.counter = mov.counter + 1;
if mov.counter>15 then
local pl = windower.ffxi.get_mob_by_index(player.index)
if pl and pl.x and mov.x then
dist = math.sqrt( (pl.x-mov.x)^2 + (pl.y-mov.y)^2 + (pl.z-mov.z)^2 )
if dist > 1 and not moving then
state.Moving.value = true
send_command('gs c update')
send_command('gs equip sets.MoveSpeed')
if world.area:contains("Adoulin") then
send_command('gs equip sets.Adoulin')
end
moving = true

elseif dist < 1 and moving then
state.Moving.value = false
send_command('gs c update')
moving = false
end
end
if pl and pl.x then
mov.x = pl.x
mov.y = pl.y
mov.z = pl.z
end
mov.counter = 0
end
end)

function update_defense_mode()
if player.equipment.main == 'Kheshig Blade' and not classes.CustomDefenseGroups:contains('Kheshig Blade') then
classes.CustomDefenseGroups:append('Kheshig Blade')
end

if player.sub_job == 'NIN' or player.sub_job == 'DNC' then
if player.equipment.sub and not player.equipment.sub:contains('Shield') and
player.equipment.sub ~= 'Aegis' and player.equipment.sub ~= 'Ochain' then
state.CombatForm:set('DW')
else
state.CombatForm:reset()
end
end
end
Offline
Posts: 8
By Austille 2018-05-01 11:41:29
Link | Quote | Reply
 
I'll try it out to see how it works in a few
Offline
Posts: 8
By Austille 2018-05-01 20:07:30
Link | Quote | Reply
 
function job_setup()
state.Moving = M(false, "moving")
end

sets.MoveSpeed = {
feet = "Herald's Gaiters",}

mov = {counter=0}
if player and player.index and windower.ffxi.get_mob_by_index(player.index) then
mov.x = windower.ffxi.get_mob_by_index(player.index).x
mov.y = windower.ffxi.get_mob_by_index(player.index).y
mov.z = windower.ffxi.get_mob_by_index(player.index).z
end

moving = false
windower.raw_register_event('prerender',function()
mov.counter = mov.counter + 1;
if mov.counter>15 then
local pl = windower.ffxi.get_mob_by_index(player.index)
if pl and pl.x and mov.x then
dist = math.sqrt( (pl.x-mov.x)^2 + (pl.y-mov.y)^2 + (pl.z-mov.z)^2 )
if dist > 1 and not moving then
state.Moving.value = true
send_command('gs c update')
send_command('gs equip sets.MoveSpeed')
moving = true

elseif dist < 1 and moving then
state.Moving.value = false
send_command('gs c update')
moving = false
end
end
if pl and pl.x then
mov.x = pl.x
mov.y = pl.y
mov.z = pl.z
end
mov.counter = 0
end
end)
Offline
Posts: 8
By Austille 2018-05-01 20:08:06
Link | Quote | Reply
 
those were all 3 parts needed to get it to work. Thanks again Verbannt for the source code!
 Asura.Verbannt
Offline
Server: Asura
Game: FFXI
user: Akton
Posts: 166
By Asura.Verbannt 2018-05-01 21:08:24
Link | Quote | Reply
 
np glad it helps.