The memory namespace contains functions that interact with the game clients memory.
You can access these functions via:
ashita.memory.
Obtains the base address of a module.
number ashita.memory.get_base(name);
Obtains the size of a module.
number ashita.memory.get_size(name);
Unprotects an area of memory, setting its page access to 'PAGE_EXECUTE_READWRITE'.
bool ashita.memory.unprotect(addr, size);
Allocates an area of memory.
number ashita.memory.alloc(size);
Deallocates an area of memory.
bool ashita.memory.dealloc(addr, size);
Scans memory for a given pattern.
number ashita.memory.find(baseAddress, size, pattern, offset, usage);
number ashita.memory.find(moduleName, size, pattern, offset, usage);
Reads a value from memory at the given address.
number ashita.memory.read_uint8(addr);
Reads a value from memory at the given address.
number ashita.memory.read_uint16(addr);
Reads a value from memory at the given address.
number ashita.memory.read_uint32(addr);
Reads a value from memory at the given address.
number ashita.memory.read_uint64(addr);
Reads a value from memory at the given address.
number ashita.memory.read_int8(addr);
Reads a value from memory at the given address.
number ashita.memory.read_int16(addr);
Reads a value from memory at the given address.
number ashita.memory.read_int32(addr);
Reads a value from memory at the given address.
number ashita.memory.read_int64(addr);
Reads a value from memory at the given address.
number ashita.memory.read_float(addr);
Reads a value from memory at the given address.
number ashita.memory.read_double(addr);
Reads a value from memory at the given address.
number ashita.memory.read_array(addr, size);
Reads a value from memory at the given address.
number ashita.memory.read_string(addr, size);
Writes a value to memory at the given address.
void ashita.memory.write_uint8(addr, value);
Writes a value to memory at the given address.
void ashita.memory.write_uint16(addr, value);
Writes a value to memory at the given address.
void ashita.memory.write_uint32(addr, value);
Writes a value to memory at the given address.
void ashita.memory.write_uint64(addr, value);
Writes a value to memory at the given address.
void ashita.memory.write_int8(addr, value);
Writes a value to memory at the given address.
void ashita.memory.write_int16(addr, value);
Writes a value to memory at the given address.
void ashita.memory.write_int32(addr, value);
Writes a value to memory at the given address.
void ashita.memory.write_int64(addr, value);
Writes a value to memory at the given address.
void ashita.memory.write_float(addr, value);
Writes a value to memory at the given address.
void ashita.memory.write_double(addr, value);
Writes a value to memory at the given address.
void ashita.memory.write_array(addr, value);
Writes a value to memory at the given address.
void ashita.memory.write_string(addr, value);