hook
The hook
namespace contains functions that directly interact with daochook.
Functions exposed by this namespace are accessed via the prefix: hook.
Functions
get_hook_path
Returns the path to where daochook is installed.
1string hook.get_hook_path();
Parameter Name | Type | Description |
---|
None. | | |
Returns |
---|
(string) The path where daochook is installed. |
get_hook_base
Returns the base address of daochook in the current process.
1number hook.get_hook_base();
Parameter Name | Type | Description |
---|
None. | | |
Returns |
---|
(number) The base address of daochook in the current process. |
get_game_path
Returns the path to where the game client is installed.
1string hook.get_game_path();
Parameter Name | Type | Description |
---|
None. | | |
Returns |
---|
(string) The path where the game client is installed. |
get_game_base
Returns the base address of game.dll
in the current process.
1number hook.get_game_base();
Parameter Name | Type | Description |
---|
None. | | |
Returns |
---|
(number) The base address of the game.dll module in the current process. |
get_game_size
Returns the size of the game.dll
module.
1number hook.get_game_size();
Parameter Name | Type | Description |
---|
None. | | |
Returns |
---|
(number) The size of the game.dll module. |
get_game_hwnd
Returns the window handle of the main game window.
1number hook.get_game_hwnd();
Parameter Name | Type | Description |
---|
None. | | |
Returns |
---|
(number) The window handle of main game window. |
get_d3d9
Returns the games IDirect3D9*
device pointer.
1userdata hook.get_d3d9();
Parameter Name | Type | Description |
---|
None. | | |
Returns |
---|
(userdata) The games IDirect3D9* device pointer. |
get_d3d9dev
Returns the games IDirect3DDevice9*
device pointer.
1userdata hook.get_d3d9dev();
Parameter Name | Type | Description |
---|
None. | | |
Returns |
---|
(userdata) The games IDirect3DDevice9* device pointer. |
get_use_ambient_override
Returns the current state of the ambient override feature.
1boolean hook.get_use_ambient_override();
Parameter Name | Type | Description |
---|
None. | | |
Returns |
---|
(boolean) The current state of the feature. |
set_use_ambient_override
Sets the ambient override feature on or off.
1hook.set_use_ambient_override(flag);
Parameter Name | Type | Description |
---|
flag | boolean | Flag that states if the feature should be enabled or disabled. |
get_ambient_color
Returns the ambient color override value.
1number hook.get_ambient_color();
Parameter Name | Type | Description |
---|
None. | | |
Returns |
---|
(number) The ambient color that will be used when the feature is enabled. |
set_ambient_color
Sets the ambient color value to be used when the ambient color override feature is enabled.
1hook.set_ambient_color(r, g, b);
Parameter Name | Type | Description |
---|
r | number | The red color amount. (0 to 255) |
g | number | The green color amount. (0 to 255) |
b | number | The blue color amount. (0 to 255) |
get_use_fillmode_override
Returns the current state of the fillmode override feature.
1boolean hook.get_use_fillmode_override();
Parameter Name | Type | Description |
---|
None. | | |
Returns |
---|
(boolean) The current state of the feature. |
set_use_fillmode_override
Sets the fillmode override feature on or off.
1hook.set_use_fillmode_override(flag);
Parameter Name | Type | Description |
---|
flag | boolean | Flag that states if the feature should be enabled or disabled. |
get_use_fog_override
Returns the current state of the fog override feature.
1boolean hook.get_use_fog_override();
Parameter Name | Type | Description |
---|
None. | | |
Returns |
---|
(boolean) The current state of the feature. |
set_use_fog_override
Sets the fog override feature on or off.
1hook.set_use_fog_override(flag);
Parameter Name | Type | Description |
---|
flag | boolean | Flag that states if the feature should be enabled or disabled. |
get_use_zbuffer_override
Returns the current state of the zbuffer override feature.
1boolean hook.get_use_zbuffer_override();
Parameter Name | Type | Description |
---|
None. | | |
Returns |
---|
(boolean) The current state of the feature. |
set_use_zbuffer_override
Sets the zbuffer override feature on or off.
1hook.set_use_zbuffer_override(flag);
Parameter Name | Type | Description |
---|
flag | boolean | Flag that states if the feature should be enabled or disabled. |
Configuration Manager
Functions exposed for this manager are accessed via the prefix: hook.cfg.
load
Loads a configuration file into the cache.
1boolean hook.cfg.load(alias, file);
Parameter Name | Type | Description |
---|
alias | string | The configuration cache alias. |
file | string | The file path to the configurations. |
Returns |
---|
(boolean) True on success, false otherwise. |
save
Saves a configuration cache block to a file.
1boolean hook.cfg.save(alias);
2boolean hook.cfg.save(alias, file);
Parameter Name | Type | Description |
---|
alias | string | The configuration cache alias. |
file | string | [Optional] The override file path to save the configurations to. |
Returns |
---|
(boolean) True on success, false otherwise. |
remove
Removes a configuration block from the cache.
Parameter Name | Type | Description |
---|
alias | string | The alias of the configuration cache to remove. |
get_sections
Returns the sections within a configuration block.
1string|nil hook.cfg.get_sections(alias);
Parameter Name | Type | Description |
---|
alias | string | The configuration cache alias. |
Returns |
---|
(string | nil) String containing the section names on success, nil otherwise. |
get_section_keys
Returns the section keys within a configuration section.
1string|nil hook.cfg.get_section_keys(alias, section);
Parameter Name | Type | Description |
---|
alias | string | The configuration cache alias. |
section | string | The configuration section name. |
Returns |
---|
(string | nil) String containing the section keys on success, nil otherwise. |
get_string
Returns a string value from a configuration.
1string|nil hook.cfg.get_string(alias, section, key);
Parameter Name | Type | Description |
---|
alias | string | The configuration cache alias. |
section | string | The configuration section name. |
key | string | The configuration key. |
Returns |
---|
(string) The configuration value on success, nil otherwise. |
set_value
Sets a configuration value.
1hook.cfg.set_value(alias, section, key, value);
Parameter Name | Type | Description |
---|
alias | string | The configuration cache alias. |
section | string | The configuration section name. |
key | string | The configuration key. |
value | string | The value to set. |
get_values
Returns a configuration files values.
1table|nil hook.cfg.get_values(alias);
Parameter Name | Type | Description |
---|
alias | string | The configuration cache alias. |
Returns |
---|
(table | nil) Table containing the entire configuration file information on success, nil otherwise. |
get_bool
Returns a configuration value (bool)
1boolean hook.cfg.get_bool(alias, section, key, default_value);
Parameter Name | Type | Description |
---|
alias | string | The configuration cache alias. |
section | string | The section that owns the desired value. |
key | string | The key of the value to obtain. |
default_value | boolean | The default value to use if the given key does not exist. |
Returns |
---|
(boolean) The configuration value on success, default_value otherwise. |
get_uint8
Returns a configuration value (uint8)
1number hook.cfg.get_uint8(alias, section, key, default_value);
Parameter Name | Type | Description |
---|
alias | string | The configuration cache alias. |
section | string | The section that owns the desired value. |
key | string | The key of the value to obtain. |
default_value | number | The default value to use if the given key does not exist. |
Returns |
---|
(number) The configuration value on success, default_value otherwise. |
get_uint16
Returns a configuration value (uint16)
1number hook.cfg.get_uint16(alias, section, key, default_value);
Parameter Name | Type | Description |
---|
alias | string | The configuration cache alias. |
section | string | The section that owns the desired value. |
key | string | The key of the value to obtain. |
default_value | number | The default value to use if the given key does not exist. |
Returns |
---|
(number) The configuration value on success, default_value otherwise. |
get_uint32
Returns a configuration value (uint32)
1number hook.cfg.get_uint32(alias, section, key, default_value);
Parameter Name | Type | Description |
---|
alias | string | The configuration cache alias. |
section | string | The section that owns the desired value. |
key | string | The key of the value to obtain. |
default_value | number | The default value to use if the given key does not exist. |
Returns |
---|
(number) The configuration value on success, default_value otherwise. |
get_uint64
Returns a configuration value (uint64)
1number hook.cfg.get_uint64(alias, section, key, default_value);
Parameter Name | Type | Description |
---|
alias | string | The configuration cache alias. |
section | string | The section that owns the desired value. |
key | string | The key of the value to obtain. |
default_value | number | The default value to use if the given key does not exist. |
Returns |
---|
(number) The configuration value on success, default_value otherwise. |
get_int8
Returns a configuration value (int8)
1number hook.cfg.get_int8(alias, section, key, default_value);
Parameter Name | Type | Description |
---|
alias | string | The configuration cache alias. |
section | string | The section that owns the desired value. |
key | string | The key of the value to obtain. |
default_value | number | The default value to use if the given key does not exist. |
Returns |
---|
(number) The configuration value on success, default_value otherwise. |
get_int16
Returns a configuration value (int16)
1number hook.cfg.get_int16(alias, section, key, default_value);
Parameter Name | Type | Description |
---|
alias | string | The configuration cache alias. |
section | string | The section that owns the desired value. |
key | string | The key of the value to obtain. |
default_value | number | The default value to use if the given key does not exist. |
Returns |
---|
(number) The configuration value on success, default_value otherwise. |
get_int32
Returns a configuration value (int32)
1number hook.cfg.get_int32(alias, section, key, default_value);
Parameter Name | Type | Description |
---|
alias | string | The configuration cache alias. |
section | string | The section that owns the desired value. |
key | string | The key of the value to obtain. |
default_value | number | The default value to use if the given key does not exist. |
Returns |
---|
(number) The configuration value on success, default_value otherwise. |
get_int64
Returns a configuration value (int64)
1number hook.cfg.get_int64(alias, section, key, default_value);
Parameter Name | Type | Description |
---|
alias | string | The configuration cache alias. |
section | string | The section that owns the desired value. |
key | string | The key of the value to obtain. |
default_value | number | The default value to use if the given key does not exist. |
Returns |
---|
(number) The configuration value on success, default_value otherwise. |
get_float
Returns a configuration value (float)
1number hook.cfg.get_float(alias, section, key, default_value);
Parameter Name | Type | Description |
---|
alias | string | The configuration cache alias. |
section | string | The section that owns the desired value. |
key | string | The key of the value to obtain. |
default_value | number | The default value to use if the given key does not exist. |
Returns |
---|
(number) The configuration value on success, default_value otherwise. |
get_double
Returns a configuration value (double)
1number hook.cfg.get_double(alias, section, key, default_value);
Parameter Name | Type | Description |
---|
alias | string | The configuration cache alias. |
section | string | The section that owns the desired value. |
key | string | The key of the value to obtain. |
default_value | number | The default value to use if the given key does not exist. |
Returns |
---|
(number) The configuration value on success, default_value otherwise. |
Pointer Manager
Functions exposed for this manager are accessed via the prefix: hook.pointers.
load
Loads a file that contains pointer related configurations into the pointer cache.
1boolean hook.pointers.load(file);
Parameter Name | Type | Description |
---|
file | string | The file path to the configurations. |
Returns |
---|
(boolean) True on success, false otherwise. |
add
Adds a pointer to the pointer cache.
1number hook.pointers.add(name, pointer);
Parameter Name | Type | Description |
---|
name | string | The name of the pointer. |
pointer | number | The existing pointer value. |
Returns |
---|
(number) The pointer value passed in pointer . |
1number hook.pointers.add(name, module_name, pattern, offset, count);
Parameter Name | Type | Description |
---|
name | string | The name of the pointer. |
module_name | string | The name of the module to scan for the pointer within. |
pattern | string | The pattern of data to scan for. |
offset | number | The offset to add to the address where the pattern was found. |
count | number | The count of the result to use if the pattern is found more than once. |
Returns |
---|
(number) The pointer value passed in pointer . |
get
Returns a pointer from the pointer cache.
1number hook.pointers.get(name);
Parameter Name | Type | Description |
---|
name | string | The name of the pointer. |
Returns |
---|
(number) The pointer value if valid, 0 otherwise. |