NWNX:EE  8193.36.12
nwnx.nss
Go to the documentation of this file.
1 
6 const string NWNX_Core = "NWNX_Core";
7 
11 void NWNX_CallFunction(string pluginName, string functionName);
14 void NWNX_PushArgumentInt(int value);
16 void NWNX_PushArgumentFloat(float value);
18 void NWNX_PushArgumentObject(object value);
20 void NWNX_PushArgumentString(string value);
22 void NWNX_PushArgumentEffect(effect value);
24 void NWNX_PushArgumentItemProperty(itemproperty value);
26 void NWNX_PushArgumentJson(json value);
39 itemproperty NWNX_GetReturnValueItemProperty();
42 
47 int NWNX_PluginExists(string sPlugin);
48 
50 const string NWNX_PUSH = "NWNXEE!ABIv2!X!Y!PUSH";
51 const string NWNX_POP = "NWNXEE!ABIv2!X!Y!POP";
53 
54 void NWNX_CallFunction(string pluginName, string functionName)
55 {
56  PlaySound("NWNXEE!ABIv2!" + pluginName + "!" + functionName + "!CALL");
57 }
58 
59 void NWNX_PushArgumentInt(int value)
60 {
61  SetLocalInt(OBJECT_INVALID, NWNX_PUSH, value);
62 }
63 
64 void NWNX_PushArgumentFloat(float value)
65 {
66  SetLocalFloat(OBJECT_INVALID, NWNX_PUSH, value);
67 }
68 
69 void NWNX_PushArgumentObject(object value)
70 {
71  SetLocalObject(OBJECT_INVALID, NWNX_PUSH, value);
72 }
73 
74 void NWNX_PushArgumentString(string value)
75 {
76  SetLocalString(OBJECT_INVALID, NWNX_PUSH, value);
77 }
78 
79 void NWNX_PushArgumentEffect(effect value)
80 {
81  TagEffect(value, NWNX_PUSH);
82 }
83 
84 void NWNX_PushArgumentItemProperty(itemproperty value)
85 {
86  TagItemProperty(value, NWNX_PUSH);
87 }
88 
89 void NWNX_PushArgumentJson(json value)
90 {
91  SetLocalJson(OBJECT_INVALID, NWNX_PUSH, value);
92 }
93 
95 {
96  return GetLocalInt(OBJECT_INVALID, NWNX_POP);
97 }
98 
100 {
101  return GetLocalFloat(OBJECT_INVALID, NWNX_POP);
102 }
103 
105 {
106  return GetLocalObject(OBJECT_INVALID, NWNX_POP);
107 }
108 
110 {
111  return GetLocalString(OBJECT_INVALID, NWNX_POP);
112 }
113 
115 {
116  effect e;
117  return TagEffect(e, NWNX_POP);
118 }
119 
121 {
122  itemproperty ip;
123  return TagItemProperty(ip, NWNX_POP);
124 }
125 
127 {
128  return GetLocalJson(OBJECT_INVALID, NWNX_POP);
129 }
130 
131 int NWNX_PluginExists(string sPlugin)
132 {
133  string sFunc = "PluginExists";
134  NWNX_PushArgumentString(sPlugin);
135  NWNX_CallFunction(NWNX_Core, sFunc);
136  return NWNX_GetReturnValueInt();
137 }
NWNX_GetReturnValueInt
int NWNX_GetReturnValueInt()
Returns the specified type from the c++ side.
Definition: nwnx.nss:94
NWNX_GetReturnValueEffect
effect NWNX_GetReturnValueEffect()
Returns the specified type from the c++ side.
Definition: nwnx.nss:114
NWNX_GetReturnValueJson
json NWNX_GetReturnValueJson()
Returns the specified type from the c++ side.
Definition: nwnx.nss:126
NWNX_GetReturnValueItemProperty
itemproperty NWNX_GetReturnValueItemProperty()
Returns the specified type from the c++ side.
Definition: nwnx.nss:120
NWNX_GetReturnValueFloat
float NWNX_GetReturnValueFloat()
Returns the specified type from the c++ side.
Definition: nwnx.nss:99
NWNX_CallFunction
void NWNX_CallFunction(string pluginName, string functionName)
Scripting interface to NWNX.
Definition: nwnx.nss:54
NWNX_GetReturnValueString
string NWNX_GetReturnValueString()
Returns the specified type from the c++ side.
Definition: nwnx.nss:109
NWNX_PushArgumentString
void NWNX_PushArgumentString(string value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:74
NWNX_POP
const string NWNX_POP
Definition: nwnx.nss:51
NWNX_PushArgumentObject
void NWNX_PushArgumentObject(object value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:69
NWNX_PushArgumentInt
void NWNX_PushArgumentInt(int value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:59
NWNX_PushArgumentEffect
void NWNX_PushArgumentEffect(effect value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:79
NWNX_PushArgumentJson
void NWNX_PushArgumentJson(json value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:89
NWNX_GetReturnValueObject
object NWNX_GetReturnValueObject()
Returns the specified type from the c++ side.
Definition: nwnx.nss:104
NWNX_PluginExists
int NWNX_PluginExists(string sPlugin)
Determines if the given plugin exists and is enabled.
Definition: nwnx.nss:131
NWNX_PushArgumentFloat
void NWNX_PushArgumentFloat(float value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:64
NWNX_PushArgumentItemProperty
void NWNX_PushArgumentItemProperty(itemproperty value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:84