Windower/Lua
気になる†
sparks_packet_id = 0x110
function get_sparks()
local sparks_packet = windower.packets.last_incoming(sparks_packet_id)
if sparks_packet == nil then
return 0
else
return get_sparks_value_from_packet(sparks_packet)
end
end
function get_sparks_value_from_packet(packet)
local parsed = packets.parse('incoming', packet)
local total_sparks = 0
if parsed['_unknown1'] == 1 then --This field is used to determine if your sparks are over 65,536. If so, the 'Sparks Total' field is only the value above that.
total_sparks = 65536
end
total_sparks = total_sparks + parsed['Sparks Total']
return total_sparks
end
駄目だった。古いかも?†
windower.register_event('incoming chunk',function(id,data,modified,injected,blocked)
if id == 0x110 then -- Update Current Sparks via 110
local header, value1, value2, Unity1, Unity2, Unknown = data:unpack('II')
current_sparks = value1
end
end)