Code needed - sebyg666/GearInfo GitHub Wiki
You will need all of this code somewhere in your Kinematics lua
function user_setup()
state.Auto_Kite = M(false, 'Auto_Kite')
Haste = 0
DW_needed = 0
DW = false
moving = false
update_combat_form()
determine_haste_group()
end
function job_handle_equipping_gear(playerStatus, eventArgs)
update_combat_form()
determine_haste_group(}
check_moving()
end
function customize_idle_set(idleSet)
if state.Auto_Kite.value == true then
idleSet = set_combine(idleSet, sets.Kiting)
end
return idleSet
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_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
You can define more or less groups here. Don't forget when constructing sets that the order you append the name is also the order of the set naming
sets.engaged[state.CombatForm][state.CombatWeapon][state.OffenseMode][state.DefenseMode][classes.CustomMeleeGroups (any number)]
sets.engaged['DW']['Apocalypse']['High acc'].DT['H: 820']['DW: 5-0']
function determine_haste_group()
classes.CustomMeleeGroups:clear()
-- Choose gearset based on DW needed
if Haste >= 908 then
classes.CustomMeleeGroups:append('H: 908+')
elseif Haste > 855 and Haste < 908 then
classes.CustomMeleeGroups:append('H: 856')
elseif Haste > 819 and Haste < 856 then
classes.CustomMeleeGroups:append('H: 819')
end
if DW == true then
if DW_needed <= 5 then
classes.CustomMeleeGroups:append('DW: 5-0')
elseif DW_needed > 5 and DW_needed < 12 then
classes.CustomMeleeGroups:append('DW: 6-11')
elseif DW_needed > 11 and DW_needed < 22 then
classes.CustomMeleeGroups:append('DW: 12-21')
elseif DW_needed > 21 and DW_needed < 37 then
classes.CustomMeleeGroups:append('DW: 22-36')
elseif DW_needed > 36 then
classes.CustomMeleeGroups:append('DW: 37+')
end
end
end
I split these 2 functions up because i prefer putting the Gearinfo function in my globals, that way all my files have access, offcourse you can just combine the 2 functions.
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
end
end