Skip to content

engine:process

set

Type

function

Description

This is NOT intended to be used to check if a process is open. This function will make FC2 attach to a target process. Thereby opening its hacking library to the process. You need to call this before calling other functions in this module. The only exception is for Constellation4, as it automatically attaches to a process already.

This function accepts either a process name or a process ID. If there are multiple processes open with the same name, it is best to use process ID instead. You can use process:list to get a list of all processes and their IDs.

Parameters

  • string/number process name/process id

Returns

  • number processid

get_module

Type

function

Description

This will load the information about a module into memory. This will allow you to use the module for hacking purposes.

Parameters

  • string name

Returns

  • module

get_base

Type

function

Description

Gets the base address of a process.

Returns

  • address

read

Type

function

Parameters

  • MEM_ type
  • number address
  • number size (only if MEM_STRING specified)

Returns

  • MEM_ value

write

Type

function

Parameters

  • MEM_ type
  • number address
  • value

monitor

Type

function

Description

This will make FC2 monitor the status of a process. Multiple processes can be monitored at once. This is useful to check if a process closed.

Parameters

  • string name

get_name

Type

function

Returns

  • string name of process

get_game

Type

function

Returns

  • GAME_ID

inject

Type

function

Description

This will inject a DLL into the target process. You must use process:set to set the target process before calling this. The directory must be the full path. If you simply supply a file name, this function will not work.

INJECTION_METHOD_MANUAL_MAP will launch fantasy.injector with the required arguments automatically.

Parameters

  • string full .dll directory
  • INJECTION_METHOD injection type

Returns

  • boolean

list

Type

function

Description

Lists all running processes.

Returns

  • table
    • string name
    • number id

get_modules

Type

function

Returns

  • table table of module class instances.

is_service_running

Type

function

Parameters

  • string

Returns

  • boolean