Updated TLK for PRC8 update
Updated TLK for PRC8 update. Added placeable house blueprints. Updated NWNxEE. Full compile.
This commit is contained in:
@@ -35,6 +35,13 @@ struct NWNX_Util_WorldTime
|
||||
int nTimeOfDay; ///< The time of day
|
||||
};
|
||||
|
||||
/// @brief A high resolution timestamp
|
||||
struct NWNX_Util_HighResTimestamp
|
||||
{
|
||||
int seconds; ///< Seconds since epoch
|
||||
int microseconds; ///< Microseconds
|
||||
};
|
||||
|
||||
/// @brief Gets the name of the currently executing script.
|
||||
/// @note If depth is > 0, it will return the name of the script that called this one via ExecuteScript().
|
||||
/// @param depth to seek the executing script.
|
||||
@@ -51,6 +58,14 @@ string NWNX_Util_GetAsciiTableString();
|
||||
/// @return The hashed string as an integer.
|
||||
int NWNX_Util_Hash(string str);
|
||||
|
||||
/// @brief Gets the last modified timestamp (mtime) of the module file in seconds.
|
||||
/// @return The mtime of the module file.
|
||||
int NWNX_Util_GetModuleMtime();
|
||||
|
||||
/// @brief Gets the module short file name.
|
||||
/// @return The module file as a string.
|
||||
string NWNX_Util_GetModuleFile();
|
||||
|
||||
/// @brief Gets the value of customTokenNumber.
|
||||
/// @param customTokenNumber The token number to query.
|
||||
/// @return The string representation of the token value.
|
||||
@@ -61,7 +76,6 @@ string NWNX_Util_GetCustomToken(int customTokenNumber);
|
||||
/// @return The converted itemproperty.
|
||||
itemproperty NWNX_Util_EffectToItemProperty(effect e);
|
||||
|
||||
///
|
||||
/// @brief Convert an itemproperty type to an effect type.
|
||||
/// @param ip The itemproperty to convert to an effect.
|
||||
/// @return The converted effect.
|
||||
@@ -72,12 +86,6 @@ effect NWNX_Util_ItemPropertyToEffect(itemproperty ip);
|
||||
/// @return The new string without any color codes.
|
||||
string NWNX_Util_StripColors(string str);
|
||||
|
||||
/// @brief Determines if the supplied resref exists.
|
||||
/// @param resref The resref to check.
|
||||
/// @param type The @ref resref_types "Resref Type".
|
||||
/// @return TRUE/FALSE
|
||||
int NWNX_Util_IsValidResRef(string resref, int type = NWNX_UTIL_RESREF_TYPE_CREATURE);
|
||||
|
||||
/// @brief Retrieves an environment variable.
|
||||
/// @param sVarname The environment variable to query.
|
||||
/// @return The value of the environment variable.
|
||||
@@ -97,12 +105,6 @@ void NWNX_Util_SetMinutesPerHour(int minutes);
|
||||
/// @return The url encoded string.
|
||||
string NWNX_Util_EncodeStringForURL(string str);
|
||||
|
||||
/// @anchor twoda_row_count
|
||||
/// @brief Gets the row count for a 2da.
|
||||
/// @param str The 2da to check (do not include the .2da).
|
||||
/// @return The amount of rows in the 2da.
|
||||
int NWNX_Util_Get2DARowCount(string str);
|
||||
|
||||
/// @brief Get the first resref of nType.
|
||||
/// @param nType A @ref resref_types "Resref Type".
|
||||
/// @param sRegexFilter Lets you filter out resrefs using a regexfilter.
|
||||
@@ -116,11 +118,6 @@ string NWNX_Util_GetFirstResRef(int nType, string sRegexFilter = "", int bModule
|
||||
/// @return The next resref found or "" if none is found.
|
||||
string NWNX_Util_GetNextResRef();
|
||||
|
||||
/// @brief Get the ticks per second of the server.
|
||||
/// @remark Useful to dynamically detect lag and adjust behavior accordingly.
|
||||
/// @return The ticks per second.
|
||||
int NWNX_Util_GetServerTicksPerSecond();
|
||||
|
||||
/// @brief Get the last created object.
|
||||
/// @param nObjectType Does not take the NWScript OBJECT_TYPE_* constants.
|
||||
/// Use NWNX_Consts_TranslateNWScriptObjectType() to get their NWNX equivalent.
|
||||
@@ -137,12 +134,6 @@ object NWNX_Util_GetLastCreatedObject(int nObjectType, int nNthLast = 1);
|
||||
/// @return "" on success, or the compilation error.
|
||||
string NWNX_Util_AddScript(string sFileName, string sScriptData, int bWrapIntoMain = FALSE, string sAlias = "NWNX");
|
||||
|
||||
/// @brief Gets the contents of a .nss script file as a string.
|
||||
/// @param sScriptName The name of the script to get the contents of.
|
||||
/// @param nMaxLength The max length of the return string, -1 to get everything
|
||||
/// @return The script file contents or "" on error.
|
||||
string NWNX_Util_GetNSSContents(string sScriptName, int nMaxLength = -1);
|
||||
|
||||
/// @brief Adds a nss file to the UserDirectory/nwnx folder, or to the location of sAlias.
|
||||
/// @note Will override existing nss files that are in the module
|
||||
/// @param sFileName The script filename without extension, 16 or less characters.
|
||||
@@ -241,91 +232,125 @@ void NWNX_Util_SetDawnHour(int nDawnHour);
|
||||
/// @param nDuskHour The new dusk hour
|
||||
void NWNX_Util_SetDuskHour(int nDuskHour);
|
||||
|
||||
/// @return Returns the number of microseconds since midnight on January 1, 1970.
|
||||
struct NWNX_Util_HighResTimestamp NWNX_Util_GetHighResTimeStamp();
|
||||
|
||||
/// @return Return name of a terminal, "" if not a TTY
|
||||
string NWNX_Util_GetTTY();
|
||||
|
||||
/// @brief Set the currently running script event.
|
||||
/// @param nEventID The ID of the event.
|
||||
void NWNX_Util_SetCurrentlyRunningEvent(int nEventID);
|
||||
|
||||
/// @brief Calculate the levenshtein distance of two strings
|
||||
/// @param sString The string to compare with.
|
||||
/// @param sCompareTo The string to compare sString to.
|
||||
/// @return The number of characters different between the compared strings.
|
||||
int NWNX_Util_GetStringLevenshteinDistance(string sString, string sCompareTo);
|
||||
|
||||
/// @brief Sends a full object update of oObjectToUpdate to all clients
|
||||
/// @param oObjectToUpdate The object to update
|
||||
/// @param oPlayer The player for which the objects needs to update, OBJECT_INVALID for all players
|
||||
void NWNX_Util_UpdateClientObject(object oObjectToUpdate, object oPlayer = OBJECT_INVALID);
|
||||
|
||||
/// @brief Clean a resource directory, deleting all files of nResType.
|
||||
/// @param sAlias A resource directory alias, NWNX or one defined in the custom resource directory file.
|
||||
/// @param nResType The type of file to delete or 0xFFFF for all types.
|
||||
/// @return TRUE if successful, FALSE on error.
|
||||
int NWNX_Util_CleanResourceDirectory(string sAlias, int nResType = 0xFFFF);
|
||||
|
||||
/// @brief Return the filename of the tlk file.
|
||||
/// @return The name
|
||||
string NWNX_Util_GetModuleTlkFile();
|
||||
|
||||
/// @}
|
||||
|
||||
string NWNX_Util_GetCurrentScriptName(int depth = 0)
|
||||
{
|
||||
string sFunc = "GetCurrentScriptName";
|
||||
NWNX_PushArgumentInt(NWNX_Util, sFunc, depth);
|
||||
NWNX_PushArgumentInt(depth);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueString(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueString();
|
||||
}
|
||||
|
||||
string NWNX_Util_GetAsciiTableString()
|
||||
{
|
||||
string sFunc = "GetAsciiTableString";
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueString(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueString();
|
||||
}
|
||||
|
||||
int NWNX_Util_Hash(string str)
|
||||
{
|
||||
string sFunc = "Hash";
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, str);
|
||||
NWNX_PushArgumentString(str);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueInt(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueInt();
|
||||
}
|
||||
|
||||
int NWNX_Util_GetModuleMtime()
|
||||
{
|
||||
NWNX_CallFunction(NWNX_Util, "GetModuleMtime");
|
||||
return NWNX_GetReturnValueInt();
|
||||
}
|
||||
|
||||
string NWNX_Util_GetModuleFile()
|
||||
{
|
||||
NWNX_CallFunction(NWNX_Util, "GetModuleFile");
|
||||
return NWNX_GetReturnValueString();
|
||||
}
|
||||
|
||||
string NWNX_Util_GetCustomToken(int customTokenNumber)
|
||||
{
|
||||
string sFunc = "GetCustomToken";
|
||||
NWNX_PushArgumentInt(NWNX_Util, sFunc, customTokenNumber);
|
||||
NWNX_PushArgumentInt(customTokenNumber);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueString(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueString();
|
||||
}
|
||||
|
||||
itemproperty NWNX_Util_EffectToItemProperty(effect e)
|
||||
{
|
||||
string sFunc = "EffectTypeCast";
|
||||
NWNX_PushArgumentEffect(NWNX_Util, sFunc, e);
|
||||
NWNX_PushArgumentEffect(e);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueItemProperty(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueItemProperty();
|
||||
}
|
||||
|
||||
effect NWNX_Util_ItemPropertyToEffect(itemproperty ip)
|
||||
{
|
||||
string sFunc = "EffectTypeCast";
|
||||
NWNX_PushArgumentItemProperty(NWNX_Util, sFunc, ip);
|
||||
NWNX_PushArgumentItemProperty(ip);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueEffect(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueEffect();
|
||||
}
|
||||
|
||||
string NWNX_Util_StripColors(string str)
|
||||
{
|
||||
string sFunc = "StripColors";
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, str);
|
||||
NWNX_PushArgumentString(str);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueString(NWNX_Util, sFunc);
|
||||
}
|
||||
|
||||
int NWNX_Util_IsValidResRef(string resref, int type = NWNX_UTIL_RESREF_TYPE_CREATURE)
|
||||
{
|
||||
string sFunc = "IsValidResRef";
|
||||
NWNX_PushArgumentInt(NWNX_Util, sFunc, type);
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, resref);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueInt(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueString();
|
||||
}
|
||||
|
||||
string NWNX_Util_GetEnvironmentVariable(string sVarname)
|
||||
{
|
||||
string sFunc = "GetEnvironmentVariable";
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, sVarname);
|
||||
NWNX_PushArgumentString(sVarname);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueString(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueString();
|
||||
}
|
||||
|
||||
int NWNX_Util_GetMinutesPerHour()
|
||||
{
|
||||
string sFunc = "GetMinutesPerHour";
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueInt(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueInt();
|
||||
}
|
||||
|
||||
void NWNX_Util_SetMinutesPerHour(int minutes)
|
||||
{
|
||||
string sFunc = "SetMinutesPerHour";
|
||||
NWNX_PushArgumentInt(NWNX_Util, sFunc, minutes);
|
||||
NWNX_PushArgumentInt(minutes);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
}
|
||||
|
||||
@@ -333,30 +358,22 @@ string NWNX_Util_EncodeStringForURL(string sURL)
|
||||
{
|
||||
string sFunc = "EncodeStringForURL";
|
||||
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, sURL);
|
||||
NWNX_PushArgumentString(sURL);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
|
||||
return NWNX_GetReturnValueString(NWNX_Util, sFunc);
|
||||
}
|
||||
|
||||
int NWNX_Util_Get2DARowCount(string str)
|
||||
{
|
||||
string sFunc = "Get2DARowCount";
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, str);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueInt(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueString();
|
||||
}
|
||||
|
||||
string NWNX_Util_GetFirstResRef(int nType, string sRegexFilter = "", int bModuleResourcesOnly = TRUE)
|
||||
{
|
||||
string sFunc = "GetFirstResRef";
|
||||
|
||||
NWNX_PushArgumentInt(NWNX_Util, sFunc, bModuleResourcesOnly);
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, sRegexFilter);
|
||||
NWNX_PushArgumentInt(NWNX_Util, sFunc, nType);
|
||||
NWNX_PushArgumentInt(bModuleResourcesOnly);
|
||||
NWNX_PushArgumentString(sRegexFilter);
|
||||
NWNX_PushArgumentInt(nType);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
|
||||
return NWNX_GetReturnValueString(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueString();
|
||||
}
|
||||
|
||||
string NWNX_Util_GetNextResRef()
|
||||
@@ -365,82 +382,62 @@ string NWNX_Util_GetNextResRef()
|
||||
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
|
||||
return NWNX_GetReturnValueString(NWNX_Util, sFunc);
|
||||
}
|
||||
|
||||
int NWNX_Util_GetServerTicksPerSecond()
|
||||
{
|
||||
string sFunc = "GetServerTicksPerSecond";
|
||||
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
|
||||
return NWNX_GetReturnValueInt(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueString();
|
||||
}
|
||||
|
||||
object NWNX_Util_GetLastCreatedObject(int nObjectType, int nNthLast = 1)
|
||||
{
|
||||
string sFunc = "GetLastCreatedObject";
|
||||
|
||||
NWNX_PushArgumentInt(NWNX_Util, sFunc, nNthLast);
|
||||
NWNX_PushArgumentInt(NWNX_Util, sFunc, nObjectType);
|
||||
NWNX_PushArgumentInt(nNthLast);
|
||||
NWNX_PushArgumentInt(nObjectType);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
|
||||
return NWNX_GetReturnValueObject(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueObject();
|
||||
}
|
||||
|
||||
string NWNX_Util_AddScript(string sFileName, string sScriptData, int bWrapIntoMain = FALSE, string sAlias = "NWNX")
|
||||
{
|
||||
string sFunc = "AddScript";
|
||||
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, sAlias);
|
||||
NWNX_PushArgumentInt(NWNX_Util, sFunc, bWrapIntoMain);
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, sScriptData);
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, sFileName);
|
||||
NWNX_PushArgumentString(sAlias);
|
||||
NWNX_PushArgumentInt(bWrapIntoMain);
|
||||
NWNX_PushArgumentString(sScriptData);
|
||||
NWNX_PushArgumentString(sFileName);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
|
||||
return NWNX_GetReturnValueString(NWNX_Util, sFunc);
|
||||
}
|
||||
|
||||
string NWNX_Util_GetNSSContents(string sScriptName, int nMaxLength = -1)
|
||||
{
|
||||
string sFunc = "GetNSSContents";
|
||||
|
||||
NWNX_PushArgumentInt(NWNX_Util, sFunc, nMaxLength);
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, sScriptName);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
|
||||
return NWNX_GetReturnValueString(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueString();
|
||||
}
|
||||
|
||||
int NWNX_Util_AddNSSFile(string sFileName, string sContents, string sAlias = "NWNX")
|
||||
{
|
||||
string sFunc = "AddNSSFile";
|
||||
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, sAlias);
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, sContents);
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, sFileName);
|
||||
NWNX_PushArgumentString(sAlias);
|
||||
NWNX_PushArgumentString(sContents);
|
||||
NWNX_PushArgumentString(sFileName);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
|
||||
return NWNX_GetReturnValueInt(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueInt();
|
||||
}
|
||||
|
||||
int NWNX_Util_RemoveNWNXResourceFile(string sFileName, int nType, string sAlias = "NWNX")
|
||||
{
|
||||
string sFunc = "RemoveNWNXResourceFile";
|
||||
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, sAlias);
|
||||
NWNX_PushArgumentInt(NWNX_Util, sFunc, nType);
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, sFileName);
|
||||
NWNX_PushArgumentString(sAlias);
|
||||
NWNX_PushArgumentInt(nType);
|
||||
NWNX_PushArgumentString(sFileName);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
|
||||
return NWNX_GetReturnValueInt(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueInt();
|
||||
}
|
||||
|
||||
void NWNX_Util_SetInstructionLimit(int nInstructionLimit)
|
||||
{
|
||||
string sFunc = "SetInstructionLimit";
|
||||
|
||||
NWNX_PushArgumentInt(NWNX_Util, sFunc, nInstructionLimit);
|
||||
NWNX_PushArgumentInt(nInstructionLimit);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
}
|
||||
|
||||
@@ -450,14 +447,14 @@ int NWNX_Util_GetInstructionLimit()
|
||||
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
|
||||
return NWNX_GetReturnValueInt(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueInt();
|
||||
}
|
||||
|
||||
void NWNX_Util_SetInstructionsExecuted(int nInstructions)
|
||||
{
|
||||
string sFunc = "SetInstructionsExecuted";
|
||||
|
||||
NWNX_PushArgumentInt(NWNX_Util, sFunc, nInstructions);
|
||||
NWNX_PushArgumentInt(nInstructions);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
}
|
||||
|
||||
@@ -467,41 +464,39 @@ int NWNX_Util_GetInstructionsExecuted()
|
||||
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
|
||||
return NWNX_GetReturnValueInt(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueInt();
|
||||
}
|
||||
|
||||
int NWNX_Util_RegisterServerConsoleCommand(string sCommand, string sScriptChunk)
|
||||
{
|
||||
string sFunc = "RegisterServerConsoleCommand";
|
||||
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, sScriptChunk);
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, sCommand);
|
||||
NWNX_PushArgumentString(sScriptChunk);
|
||||
NWNX_PushArgumentString(sCommand);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
|
||||
return NWNX_GetReturnValueInt(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueInt();
|
||||
}
|
||||
|
||||
void NWNX_Util_UnregisterServerConsoleCommand(string sCommand)
|
||||
{
|
||||
string sFunc = "UnregisterServerConsoleCommand";
|
||||
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, sCommand);
|
||||
NWNX_PushArgumentString(sCommand);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
}
|
||||
|
||||
int NWNX_Util_PluginExists(string sPlugin)
|
||||
{
|
||||
string sFunc = "PluginExists";
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, sPlugin);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueInt(NWNX_Util, sFunc);
|
||||
WriteTimestampedLogEntry("WARNING: NWNX_Util_PluginExists is deprecated. You should migrate to NWNX_PluginExists.");
|
||||
return NWNX_PluginExists(sPlugin);
|
||||
}
|
||||
|
||||
string NWNX_Util_GetUserDirectory()
|
||||
{
|
||||
string sFunc = "GetUserDirectory";
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueString(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueString();
|
||||
}
|
||||
|
||||
int NWNX_Util_GetScriptReturnValue()
|
||||
@@ -510,7 +505,7 @@ int NWNX_Util_GetScriptReturnValue()
|
||||
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
|
||||
return NWNX_GetReturnValueInt(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueInt();
|
||||
}
|
||||
|
||||
object NWNX_Util_CreateDoor(string sResRef, location locLocation, string sNewTag = "", int nAppearanceType = -1)
|
||||
@@ -519,24 +514,24 @@ object NWNX_Util_CreateDoor(string sResRef, location locLocation, string sNewTag
|
||||
|
||||
vector vPosition = GetPositionFromLocation(locLocation);
|
||||
|
||||
NWNX_PushArgumentInt(NWNX_Util, sFunc, nAppearanceType);
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, sNewTag);
|
||||
NWNX_PushArgumentFloat(NWNX_Util, sFunc, GetFacingFromLocation(locLocation));
|
||||
NWNX_PushArgumentFloat(NWNX_Util, sFunc, vPosition.z);
|
||||
NWNX_PushArgumentFloat(NWNX_Util, sFunc, vPosition.y);
|
||||
NWNX_PushArgumentFloat(NWNX_Util, sFunc, vPosition.x);
|
||||
NWNX_PushArgumentObject(NWNX_Util, sFunc, GetAreaFromLocation(locLocation));
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, sResRef);
|
||||
NWNX_PushArgumentInt(nAppearanceType);
|
||||
NWNX_PushArgumentString(sNewTag);
|
||||
NWNX_PushArgumentFloat(GetFacingFromLocation(locLocation));
|
||||
NWNX_PushArgumentFloat(vPosition.z);
|
||||
NWNX_PushArgumentFloat(vPosition.y);
|
||||
NWNX_PushArgumentFloat(vPosition.x);
|
||||
NWNX_PushArgumentObject(GetAreaFromLocation(locLocation));
|
||||
NWNX_PushArgumentString(sResRef);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
|
||||
return NWNX_GetReturnValueObject(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueObject();
|
||||
}
|
||||
|
||||
void NWNX_Util_SetItemActivator(object oObject)
|
||||
{
|
||||
string sFunc = "SetItemActivator";
|
||||
|
||||
NWNX_PushArgumentObject(NWNX_Util, sFunc, oObject);
|
||||
NWNX_PushArgumentObject(oObject);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
}
|
||||
|
||||
@@ -544,12 +539,12 @@ struct NWNX_Util_WorldTime NWNX_Util_GetWorldTime(float fAdjustment = 0.0f)
|
||||
{
|
||||
string sFunc = "GetWorldTime";
|
||||
|
||||
NWNX_PushArgumentFloat(NWNX_Util, sFunc, fAdjustment);
|
||||
NWNX_PushArgumentFloat(fAdjustment);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
|
||||
struct NWNX_Util_WorldTime strWorldTime;
|
||||
strWorldTime.nTimeOfDay = NWNX_GetReturnValueInt(NWNX_Util, sFunc);
|
||||
strWorldTime.nCalendarDay = NWNX_GetReturnValueInt(NWNX_Util, sFunc);
|
||||
strWorldTime.nTimeOfDay = NWNX_GetReturnValueInt();
|
||||
strWorldTime.nCalendarDay = NWNX_GetReturnValueInt();
|
||||
|
||||
return strWorldTime;
|
||||
}
|
||||
@@ -558,9 +553,9 @@ void NWNX_Util_SetResourceOverride(int nResType, string sOldName, string sNewNam
|
||||
{
|
||||
string sFunc = "SetResourceOverride";
|
||||
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, sNewName);
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, sOldName);
|
||||
NWNX_PushArgumentInt(NWNX_Util, sFunc, nResType);
|
||||
NWNX_PushArgumentString(sNewName);
|
||||
NWNX_PushArgumentString(sOldName);
|
||||
NWNX_PushArgumentInt(nResType);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
}
|
||||
|
||||
@@ -568,28 +563,28 @@ string NWNX_Util_GetResourceOverride(int nResType, string sName)
|
||||
{
|
||||
string sFunc = "GetResourceOverride";
|
||||
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, sName);
|
||||
NWNX_PushArgumentInt(NWNX_Util, sFunc, nResType);
|
||||
NWNX_PushArgumentString(sName);
|
||||
NWNX_PushArgumentInt(nResType);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
|
||||
return NWNX_GetReturnValueString(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueString();
|
||||
}
|
||||
|
||||
int NWNX_Util_GetScriptParamIsSet(string sParamName)
|
||||
{
|
||||
string sFunc = "GetScriptParamIsSet";
|
||||
|
||||
NWNX_PushArgumentString(NWNX_Util, sFunc, sParamName);
|
||||
NWNX_PushArgumentString(sParamName);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
|
||||
return NWNX_GetReturnValueInt(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueInt();
|
||||
}
|
||||
|
||||
void NWNX_Util_SetDawnHour(int nDawnHour)
|
||||
{
|
||||
string sFunc = "SetDawnHour";
|
||||
|
||||
NWNX_PushArgumentInt(NWNX_Util, sFunc, nDawnHour);
|
||||
NWNX_PushArgumentInt(nDawnHour);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
}
|
||||
|
||||
@@ -597,6 +592,68 @@ void NWNX_Util_SetDuskHour(int nDuskHour)
|
||||
{
|
||||
string sFunc = "SetDuskHour";
|
||||
|
||||
NWNX_PushArgumentInt(NWNX_Util, sFunc, nDuskHour);
|
||||
NWNX_PushArgumentInt(nDuskHour);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
}
|
||||
|
||||
struct NWNX_Util_HighResTimestamp NWNX_Util_GetHighResTimeStamp()
|
||||
{
|
||||
struct NWNX_Util_HighResTimestamp t;
|
||||
string sFunc = "GetHighResTimeStamp";
|
||||
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
t.microseconds = NWNX_GetReturnValueInt();
|
||||
t.seconds = NWNX_GetReturnValueInt();
|
||||
return t;
|
||||
}
|
||||
|
||||
string NWNX_Util_GetTTY()
|
||||
{
|
||||
string sFunc = "GetTTY";
|
||||
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueString();
|
||||
}
|
||||
|
||||
void NWNX_Util_SetCurrentlyRunningEvent(int nEventID)
|
||||
{
|
||||
string sFunc = "SetCurrentlyRunningEvent";
|
||||
|
||||
NWNX_PushArgumentInt(nEventID);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
}
|
||||
|
||||
int NWNX_Util_GetStringLevenshteinDistance(string sString, string sCompareTo)
|
||||
{
|
||||
string sFunc = "LevenshteinDistance";
|
||||
|
||||
NWNX_PushArgumentString(sCompareTo);
|
||||
NWNX_PushArgumentString(sString);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueInt();
|
||||
}
|
||||
|
||||
void NWNX_Util_UpdateClientObject(object oObjectToUpdate, object oPlayer = OBJECT_INVALID)
|
||||
{
|
||||
string sFunc = "UpdateClientObject";
|
||||
|
||||
NWNX_PushArgumentObject(oPlayer);
|
||||
NWNX_PushArgumentObject(oObjectToUpdate);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
}
|
||||
|
||||
int NWNX_Util_CleanResourceDirectory(string sAlias, int nResType = 0xFFFF)
|
||||
{
|
||||
string sFunc = "CleanResourceDirectory";
|
||||
NWNX_PushArgumentInt(nResType);
|
||||
NWNX_PushArgumentString(sAlias);
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueInt();
|
||||
}
|
||||
|
||||
string NWNX_Util_GetModuleTlkFile()
|
||||
{
|
||||
string sFunc = "GetModuleTlkFile";
|
||||
NWNX_CallFunction(NWNX_Util, sFunc);
|
||||
return NWNX_GetReturnValueString();
|
||||
}
|
||||
|
Reference in New Issue
Block a user