Skip to content

memory

These functions are used to directly access game memory. Using these functions can result in game crashes or unwanted results.

For the virtual functions. See the FFI documentation.

moonlight.memory.signature

Parameters

  • string name
  • string signature

Remarks

  • See core/sig.lua

moonlight.memory.pointer

Parameters

  • number address
  • optional boolean dereferences

Returns

  • number Pointer to new address.

moonlight.memory.pattern

Parameters

  • string module
  • string pattern

Returns

  • number

moonlight.memory.netvar

Parameters

  • string netvar_tree

Returns

  • number

Remarks

  • Use dump.txt found in your moonlight folder.
  • See the many examples in the default scripts on how to use this.
  • This is made easier with lib_netvar: https://fantasy.cat/forums/index.php?threads/lib_netvar-netvars-made-easy.4637/

moonlight.memory.set_integer

Parameters

  • number memory_address
  • number value

moonlight.memory.set_boolean

Parameters

  • number memory_address
  • boolean value

moonlight.memory.set_float

Parameters

  • number memory_address
  • number value

moonlight.memory.set_vector

Parameters

  • number memory_address
  • number x
  • number y
  • number z

moonlight.memory.get_integer

Parameters

  • number memory_address

Returns

  • number

moonlight.memory.get_boolean

Parameters

  • number memory_address

Returns

  • boolean

moonlight.memory.get_float

Parameters

  • number memory_address

Returns

  • number

moonlight.memory.get_string

Parameters

  • number memory_address

Returns

  • string

moonlight.memory.get_vector

Parameters

  • number memory_address

Returns

  • table

number x

number y

number z


moonlight.memory.get_virtual_function_integer

Parameters

  • number memory_address
  • number index

Returns

  • number

Remarks

  • Use FFI instead. See the FFI documentation page.

moonlight.memory.get_virtual_function_float

Parameters

  • number memory_address
  • number index

Returns

  • number

Remarks

  • Use FFI instead. See the FFI documentation page.

moonlight.memory.get_virtual_function_string

Parameters

  • number memory_address
  • number index

Returns

  • string

Remarks

  • Use FFI instead. See the FFI documentation page.

moonlight.memory.get_virtual_function_vector

Parameters

  • number memory_address
  • number index

Returns

  • table

number x

number y

number z

Remarks

  • Use FFI instead. See the FFI documentation page.