42 lines
1.5 KiB
Plaintext
42 lines
1.5 KiB
Plaintext
const string JVM_VAR_OUTPAR = "JVM_OUT";
|
|
const string JVM_VAR_INPAR = "JVM_IN";
|
|
|
|
const string JVM_EVENT_SPAWN_DOSPAWN = "1";
|
|
const string JVM_EVENT_SPAWN_RELOAD = "2"; // Reload encounter data!
|
|
const string JVM_EVENT_CONV_ONELINER = "3";
|
|
const string JVM_EVENT_CONV_TEXTAPPEARS = "4";
|
|
const string JVM_EVENT_CONV_ACTIONPERFORMED = "5";
|
|
const string JVM_EVENT_CONV_STARTCONVERSATION = "6";
|
|
const string JVM_EVENT_CONV_LEAVECONVERSATION = "7";
|
|
const string JVM_EVENT_CONV_RELOAD = "8"; // Reload conversations!
|
|
const string JVM_EVENT_SQL_EXECUTE = "10"; // Execute SQL statement
|
|
const string JVM_EVENT_SQL_FETCH = "11"; // Move pointer to next row. Returns the fetched row, or "" if none
|
|
|
|
|
|
// Send NWNX JVM plugin event
|
|
string NWNX_JVM(string ev, object caller = OBJECT_SELF, string parameter = "");
|
|
|
|
string NWNX_JVM(string ev, object caller = OBJECT_SELF, string parameter = "")
|
|
{
|
|
SendMessageToPC(GetFirstPC(), "Event "+ev+" - "+parameter);
|
|
|
|
|
|
// SendMessageToPC(GetFirstPC(), "Event"+IntToString(JVM_EVENT_SQL_EXECUTE)+" - "+statement);
|
|
|
|
|
|
|
|
string returnValue;
|
|
DeleteLocalString(caller, JVM_VAR_OUTPAR);
|
|
|
|
SetLocalString(caller, JVM_VAR_INPAR, parameter);
|
|
|
|
SetLocalString(GetModule(), "NWNX!JVM!EVENT", ObjectToString(caller) + " " + ev);
|
|
returnValue = GetLocalString(caller, JVM_VAR_OUTPAR);
|
|
DeleteLocalString(caller, JVM_VAR_OUTPAR);
|
|
DeleteLocalString(caller, JVM_VAR_INPAR);
|
|
return returnValue;
|
|
}
|
|
|
|
|
|
//void main(){}
|