NWNX:EE  8193.36.12
nwnx_item.nss
Go to the documentation of this file.
1 #include "nwnx"
6 
7 const string NWNX_Item = "NWNX_Item";
8 
13 void NWNX_Item_SetWeight(object oItem, int weight);
14 
22 void NWNX_Item_SetBaseGoldPieceValue(object oItem, int gold);
23 
29 void NWNX_Item_SetAddGoldPieceValue(object oItem, int gold);
30 
34 int NWNX_Item_GetBaseGoldPieceValue(object oItem);
35 
39 int NWNX_Item_GetAddGoldPieceValue(object oItem);
40 
46 void NWNX_Item_SetBaseItemType(object oItem, int nBaseItem);
47 
77 void NWNX_Item_SetItemAppearance(object oItem, int nType, int nIndex, int nValue, int bUpdateCreatureAppearance = FALSE);
78 
83 string NWNX_Item_GetEntireItemAppearance(object oItem);
84 
88 void NWNX_Item_RestoreItemAppearance(object oItem, string sApp);
89 
93 int NWNX_Item_GetBaseArmorClass(object oItem);
94 
98 int NWNX_Item_GetMinEquipLevel(object oItem);
99 
106 int NWNX_Item_MoveTo(object oItem, object oTarget, int bHideAllFeedback = FALSE);
107 
114 void NWNX_Item_SetMinEquipLevelModifier(object oItem, int nModifier, int bPersist = TRUE);
115 
118 int NWNX_Item_GetMinEquipLevelModifier(object oItem);
119 
126 void NWNX_Item_SetMinEquipLevelOverride(object oItem, int nOverride, int bPersist = TRUE);
127 
130 int NWNX_Item_GetMinEquipLevelOverride(object oItem);
131 
132 
134 
135 void NWNX_Item_SetWeight(object oItem, int w)
136 {
137  string sFunc = "SetWeight";
138 
141 
142  NWNX_CallFunction(NWNX_Item, sFunc);
143 }
144 
145 void NWNX_Item_SetBaseGoldPieceValue(object oItem, int g)
146 {
147  string sFunc = "SetBaseGoldPieceValue";
148 
151 
152  NWNX_CallFunction(NWNX_Item, sFunc);
153 }
154 
155 void NWNX_Item_SetAddGoldPieceValue(object oItem, int g)
156 {
157  string sFunc = "SetAddGoldPieceValue";
158 
161 
162  NWNX_CallFunction(NWNX_Item, sFunc);
163 }
164 
166 {
167  string sFunc = "GetBaseGoldPieceValue";
168 
170 
171  NWNX_CallFunction(NWNX_Item, sFunc);
172  return NWNX_GetReturnValueInt();
173 }
174 
176 {
177  string sFunc = "GetAddGoldPieceValue";
178 
180 
181  NWNX_CallFunction(NWNX_Item, sFunc);
182  return NWNX_GetReturnValueInt();
183 }
184 
185 void NWNX_Item_SetBaseItemType(object oItem, int nBaseItem)
186 {
187  string sFunc = "SetBaseItemType";
188 
189  NWNX_PushArgumentInt(nBaseItem);
191 
192  NWNX_CallFunction(NWNX_Item, sFunc);
193 }
194 
195 void NWNX_Item_SetItemAppearance(object oItem, int nType, int nIndex, int nValue, int bUpdateCreatureAppearance = FALSE)
196 {
197  string sFunc = "SetItemAppearance";
198 
199  NWNX_PushArgumentInt(bUpdateCreatureAppearance);
200  NWNX_PushArgumentInt(nValue);
201  NWNX_PushArgumentInt(nIndex);
202  NWNX_PushArgumentInt(nType);
204 
205  NWNX_CallFunction(NWNX_Item, sFunc);
206 
207 }
208 
210 {
211  string sFunc = "GetEntireItemAppearance";
212 
214 
215  NWNX_CallFunction(NWNX_Item, sFunc);
216  return NWNX_GetReturnValueString();
217 }
218 
219 void NWNX_Item_RestoreItemAppearance(object oItem, string sApp)
220 {
221  string sFunc = "RestoreItemAppearance";
222 
225 
226  NWNX_CallFunction(NWNX_Item, sFunc);
227 }
228 
230 {
231  string sFunc = "GetBaseArmorClass";
232 
234 
235  NWNX_CallFunction(NWNX_Item, sFunc);
236  return NWNX_GetReturnValueInt();
237 }
238 
239 int NWNX_Item_GetMinEquipLevel(object oItem)
240 {
241  string sFunc = "GetMinEquipLevel";
242 
244 
245  NWNX_CallFunction(NWNX_Item, sFunc);
246  return NWNX_GetReturnValueInt();
247 }
248 
249 int NWNX_Item_MoveTo(object oItem, object oTarget, int bHideAllFeedback = FALSE)
250 {
251  string sFunc = "MoveTo";
252 
253  NWNX_PushArgumentInt(bHideAllFeedback);
254  NWNX_PushArgumentObject(oTarget);
256 
257  NWNX_CallFunction(NWNX_Item, sFunc);
258 
259  return NWNX_GetReturnValueInt();
260 }
261 
262 void NWNX_Item_SetMinEquipLevelModifier(object oItem, int nModifier, int bPersist = TRUE)
263 {
264  string sFunc = "SetMinEquipLevelModifier";
265 
266  NWNX_PushArgumentInt(bPersist);
267  NWNX_PushArgumentInt(nModifier);
269 
270  NWNX_CallFunction(NWNX_Item, sFunc);
271 }
272 
274 {
275  string sFunc = "GetMinEquipLevelModifier";
276 
278 
279  NWNX_CallFunction(NWNX_Item, sFunc);
280  return NWNX_GetReturnValueInt();
281 }
282 
283 void NWNX_Item_SetMinEquipLevelOverride(object oItem, int nOverride, int bPersist = TRUE)
284 {
285  string sFunc = "SetMinEquipLevelOverride";
286 
287  NWNX_PushArgumentInt(bPersist);
288  NWNX_PushArgumentInt(nOverride);
290 
291  NWNX_CallFunction(NWNX_Item, sFunc);
292 }
293 
295 {
296  string sFunc = "GetMinEquipLevelOverride";
297 
299 
300  NWNX_CallFunction(NWNX_Item, sFunc);
301  return NWNX_GetReturnValueInt();
302 }
NWNX_GetReturnValueInt
int NWNX_GetReturnValueInt()
Returns the specified type from the c++ side.
Definition: nwnx.nss:94
NWNX_Item_SetBaseItemType
void NWNX_Item_SetBaseItemType(object oItem, int nBaseItem)
Set an item's base item type.
Definition: nwnx_item.nss:185
NWNX_Item_MoveTo
int NWNX_Item_MoveTo(object oItem, object oTarget, int bHideAllFeedback=FALSE)
Move oItem to oTarget.
Definition: nwnx_item.nss:249
NWNX_Item_SetMinEquipLevelOverride
void NWNX_Item_SetMinEquipLevelOverride(object oItem, int nOverride, int bPersist=TRUE)
Set an override to the Minimum Level to Equip (Item Level Restriction).
Definition: nwnx_item.nss:283
NWNX_Item_GetBaseGoldPieceValue
int NWNX_Item_GetBaseGoldPieceValue(object oItem)
Get an item's base value in gold pieces.
Definition: nwnx_item.nss:165
NWNX_Item_GetBaseArmorClass
int NWNX_Item_GetBaseArmorClass(object oItem)
Get an item's base armor class.
Definition: nwnx_item.nss:229
NWNX_Item_GetMinEquipLevelOverride
int NWNX_Item_GetMinEquipLevelOverride(object oItem)
Gets the applied override to the Minimum Level to Equip (Item Level Restriction).
Definition: nwnx_item.nss:294
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_Item_SetBaseGoldPieceValue
void NWNX_Item_SetBaseGoldPieceValue(object oItem, int gold)
Set an item's base value in gold pieces.
Definition: nwnx_item.nss:145
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_Item_GetMinEquipLevelModifier
int NWNX_Item_GetMinEquipLevelModifier(object oItem)
Gets the applied modifier to the Minimum Level to Equip (Item Level Restriction).
Definition: nwnx_item.nss:273
NWNX_Item_GetEntireItemAppearance
string NWNX_Item_GetEntireItemAppearance(object oItem)
Return a string containing the entire appearance for an item.
Definition: nwnx_item.nss:209
NWNX_Item_RestoreItemAppearance
void NWNX_Item_RestoreItemAppearance(object oItem, string sApp)
Restores an item's appearance using the value retrieved through NWNX_Item_GetEntireItemAppearance().
Definition: nwnx_item.nss:219
NWNX_Item_SetAddGoldPieceValue
void NWNX_Item_SetAddGoldPieceValue(object oItem, int gold)
Set an item's additional value in gold pieces.
Definition: nwnx_item.nss:155
NWNX_Item_SetWeight
void NWNX_Item_SetWeight(object oItem, int weight)
Set an item's weight.
Definition: nwnx_item.nss:135
NWNX_Item_GetAddGoldPieceValue
int NWNX_Item_GetAddGoldPieceValue(object oItem)
Get an item's additional value in gold pieces.
Definition: nwnx_item.nss:175
NWNX_Item_SetMinEquipLevelModifier
void NWNX_Item_SetMinEquipLevelModifier(object oItem, int nModifier, int bPersist=TRUE)
Set a modifier to the Minimum Level to Equip (Item Level Restriction).
Definition: nwnx_item.nss:262
NWNX_Item_SetItemAppearance
void NWNX_Item_SetItemAppearance(object oItem, int nType, int nIndex, int nValue, int bUpdateCreatureAppearance=FALSE)
Make a single change to the appearance of an item.
Definition: nwnx_item.nss:195
NWNX_Item_GetMinEquipLevel
int NWNX_Item_GetMinEquipLevel(object oItem)
Get an item's minimum level required to equip.
Definition: nwnx_item.nss:239