Memory

Functions

base

Returns the base address of the game.

function memory.base(): integer

size

Returns the size (in memory) of the game.

function memory.size(): integer

alloc

Allocates memory.

---@param size integer
function memory.alloc(size): memory_allocated

scan

Scans memory for a signature.

---@param signature string
---@param module? string
function memory.scan(signature, module?): memory_address

Types

pointer_int

TypeName
integervalue
---@param count? integer
function pointer_int(count?): pointer_int

function pointer_int:free(): nil
function pointer_int:address(): memory_address

pointer_bool

TypeName
boolvalue
---@param count? integer
function pointer_bool(count?): pointer_bool

function pointer_bool:free(): nil
function pointer_bool:address(): memory_address

pointer_float

TypeName
numbervalue
---@param count? integer
function pointer_float(count?): pointer_float

function pointer_float:free(): nil
function pointer_float:address(): memory_address

pointer_scr_value

TypeName
scr_valuevalue
---@param count? integer
function pointer_scr_value(count?): pointer_scr_value

function pointer_scr_value:free(): nil
function pointer_scr_value:address(): memory_address

memory_address

TypeName
integervalue
integerint8
integeras_int8
integerint16
integeras_int16
integerint32
integeras_int32
integerint64
integeras_int64
integeruint8
integeras_uint8
integeruint16
integeras_uint16
integeruint32
integeras_uint32
integeruint64
integeras_uint64
numberfloat
numberas_float
numberdouble
numberas_double
boolbool
boolas_bool
memory_addressptr
memory_addressas_ptr
scr_vec3scr_vec3
scr_vec3as_scr_vec3
vec2vec2
vec2as_vec2
vec3vec3
vec3as_vec3
stringstr
stringas_str
---@param count? integer
function memory_address:nop(count?): nil

---@param offset integer
function memory_address:add(offset): memory_address

---@param offset integer
function memory_address:sub(offset): memory_address

---@param op_size? integer
---@param insn_size? integer
function memory_address:rip(op_size?, insn_size?): memory_address

scr_value

TypeName
integerint32
integeruint32
integeruint64
numberfloat
boolbool
stringstr

memory_allocated

function memory_allocated:free(): nil