1.0.5 • Published 1 year ago
cheatjs v1.0.5
cheatjs
basic module to aid with external game hacking when using node
albeit abandoned for quite a while, slowly this library will continue development
(I am aware how inefficient and impractical actual application of this would be)
Features
- feature management
- memory management
- process management
- basic settings
Classes
Keys
// map class of virtual keycodes
const f1 = cheat.Keys.VK_F1 // 0x70
Feature & Setting
// skeleton class for features
// basic impl
const bhop = new cheat.Feature("bhop", cheat.Keys.VK_F1)
// toggle features
bhop.toggle()
// add settings to a feature
// NumberSetting(name, value, min, max, increment)
bhop.registerSetting(new cheat.NumberSetting("speed", 1, 1, 10, 1))
// get a setting by its name
const speedSetting = bhop.settingByName("speed")
speedSetting.value = speedSetting.max
// get an array of setting names within a feature
const bhopSettingNames = bhop.settingNames // ["speed"]
For a better example of feature implementation, check here
CheatManager
// used for management of the cheat itself
const cm = new cheat.CheatManager()
// add a feature to the manager
cm.registerFeature(bhop)
// get a feature object from the manager
const bunnyhop = cm.getFeatureByName('bhop') || cm.getFeatureByKey(cheat.Keys.VK_F1)
ProcessManager
// used for management of the process you are modifying
const pm = new cheat.ProcessManager()
// attach to the process (csgo as an example)
pm.attach(`csgo.exe`)
// get modules within a process (modules within csgo used as example)
pm.findModule(`client.dll`)
pm.findModule(`engine.dll`)
// process data stored within the class
const handle = pm.process.handle
MemoryManager
const dwLocalPlayer = 0 // example offset
const dwForceJump = 0 // example offset
// used for reading and writing process memory
const mm = new cheat.MemoryManager(pm.process.handle)
// get "client" module address from process manager
let client = await pm.getModule(`client`)
// read memory (address, data type)
await mm.rpm(client + dwLocalPlayer, 'int')
// write memory (address, buffer, data type)
await mm.wpm(client + dwForceJump, '5', 'int')