bun-memory 1.1.29 → 1.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/example/trigger-bot.ts +17 -0
- package/package.json +1 -1
package/README.md
CHANGED
package/example/trigger-bot.ts
CHANGED
|
@@ -38,6 +38,23 @@ if (ClientPtr === undefined) {
|
|
|
38
38
|
throw new TypeError('ClientPtr must not be undefined.');
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
// Get client.dll…
|
|
42
|
+
const client = cs2.modules['client.dll'];
|
|
43
|
+
|
|
44
|
+
if (client === undefined) {
|
|
45
|
+
throw new Error('client must not be undefined…');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Byte pattern for AddNametag
|
|
49
|
+
const needle = '40555356488dac24????????4881ec????????488bda488bf14885c9';
|
|
50
|
+
|
|
51
|
+
// Find a byte pattern in memory (supports wildcards: ** and ??)…
|
|
52
|
+
const addNametag = cs2.pattern(needle, client.base, client.size);
|
|
53
|
+
|
|
54
|
+
if (addNametag !== -1n) {
|
|
55
|
+
console.log(`Found at 0x${addNametag.toString(16)}`); // Found at 0x7ffc8964e490
|
|
56
|
+
}
|
|
57
|
+
|
|
41
58
|
// Create a cache for class name strings… 🫠…
|
|
42
59
|
const Cache_Names = new Map<bigint, string>();
|
|
43
60
|
|