HLP - help functions
Helper functions, generally used for safety checks, and specific operations.
Functions
Hlp_GetInstanceID
Hlp_GetInstanceID
Returns the internal ID of an instance, usefull for comparison
Parameters
var instance inst
- any instance
Return value
The function returns internal ID of the instance
Hlp_GetNpc
Hlp_GetNpc
Finds an NPC object by its instance name
Parameters
var int instancename
- instance name of the NPC
Return value
The function returns link to NPC object
Hlp_IsItem
Hlp_IsItem
Checks if item object is a specified instance
Parameters
var C_ITEM itm
- C_ITEM instance of the itemvar int instancename
- instance name of the item
Return value
The function returns TRUE if the item is the specified instance, FALSE otherwise
Hlp_IsValidItem
Hlp_IsValidItem
Checks if item is in the game world
Parameters
var C_ITEM itm
- instance of the item
Return value
The function returns TRUE if the item is in the game world, FALSE otherwise
Hlp_IsValidNpc
Hlp_IsValidNpc
Checks if the NPC exists in the game world
Parameters
var C_NPC npc
- instance of the NPC
Return value
The function returns TRUE if the NPC exists, FALSE otherwise
Hlp_Random
Hlp_Random
Generates a random value
Parameters
var int bound
- maximum value
Return value
The function returns random value form 0 to bound
Hlp_StrCmp
Hlp_StrCmp
Compares two strings (not case-sensitive)
Parameters
var string s1
- first stringvar string s2
- second string
Return value
The function returns TRUE if the strings are equal, FALSE otherwise
Deprecated
Hlp_CutscenePlayed
zParserExtender
zParserExtender implements quite a few new HLP external functions.