From e5a60b63dde0fb1177adcc2260cf42eb8e61105c Mon Sep 17 00:00:00 2001 From: CarlPoppa Date: Sat, 18 Oct 2025 23:03:15 +0100 Subject: [PATCH 1/3] Add ping AOB scan --- pkg/memory/offset.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/memory/offset.go b/pkg/memory/offset.go index 60268c3..fdd15f3 100644 --- a/pkg/memory/offset.go +++ b/pkg/memory/offset.go @@ -19,6 +19,7 @@ type Offset struct { KeyBindingsSkillsOffset uintptr TZ uintptr Quests uintptr + Ping uintptr } func calculateOffsets(process *Process) Offset { @@ -99,6 +100,12 @@ func calculateOffsets(process *Process) Offset { questOffset := uintptr(binary.LittleEndian.Uint32(bytes)) questDataOffset := questOffset + 1 + // Ping + pattern = process.FindPattern(memory, "\x48\x8B\x0D\xCC\xCC\xCC\xCC\x49\x2B\xC7", "xxx????xxx") + bytes = process.ReadBytesFromMemory(pattern+3, 4) + relativeOffset = int32(binary.LittleEndian.Uint32(bytes)) + pingOffset := pattern - process.moduleBaseAddressPtr + 7 + uintptr(relativeOffset) + return Offset{ GameData: gameDataOffset, UnitTable: unitTableOffset, @@ -114,5 +121,6 @@ func calculateOffsets(process *Process) Offset { KeyBindingsSkillsOffset: keyBindingsSkillsOffset, TZ: tzOffset, Quests: questDataOffset, + Ping: pingOffset, } } From fafcbc8728be1bcb55868f5cbed40d9ca1fcc21b Mon Sep 17 00:00:00 2001 From: CarlPoppa Date: Sat, 18 Oct 2025 23:03:47 +0100 Subject: [PATCH 2/3] Add ping to game_reader --- pkg/memory/game_reader.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/memory/game_reader.go b/pkg/memory/game_reader.go index 9679c44..500cb7b 100644 --- a/pkg/memory/game_reader.go +++ b/pkg/memory/game_reader.go @@ -111,6 +111,7 @@ func (gd *GameReader) GetData() data.Data { LastGameName: gd.LastGameName(), LastGamePassword: gd.LastGamePass(), FPS: gd.FPS(), + Ping: gd.Ping(), }, Monsters: monsters, Corpses: gd.Corpses(pu.Position, hover), @@ -441,6 +442,12 @@ func (gd *GameReader) FPS() int { return int(gd.ReadUInt(gd.moduleBaseAddressPtr+gd.offset.FPS, Uint32)) } +func (gd *GameReader) Ping() int { + ptrToStructPtr := gd.moduleBaseAddressPtr + gd.offset.Ping + structPtrAddr := gd.ReadUInt(ptrToStructPtr, Uint64) + return int(gd.ReadUInt(uintptr(structPtrAddr+36), Uint32)) +} + func (gd *GameReader) HasMerc() bool { return gd.ReadUInt(gd.Process.moduleBaseAddressPtr+gd.offset.UI+0x8, Uint8) != 0 } From 28d41070ce7c5e4d0069071652e2d529f8008317 Mon Sep 17 00:00:00 2001 From: CarlPoppa Date: Sat, 18 Oct 2025 23:03:59 +0100 Subject: [PATCH 3/3] Add ping to OnlineGame --- pkg/data/data.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/data/data.go b/pkg/data/data.go index 203fc7c..dc6f832 100644 --- a/pkg/data/data.go +++ b/pkg/data/data.go @@ -66,6 +66,7 @@ type OnlineGame struct { LastGameName string LastGamePassword string FPS int + Ping int } type Panel struct {