NWNX:EE  8193.36.12
nwnx_admin.nss
Go to the documentation of this file.
1 #include "nwnx"
6 
7 const string NWNX_Administration = "NWNX_Administration";
8 
13 const int NWNX_ADMINISTRATION_OPTION_ALL_KILLABLE = 0; // DOES NOT DO ANYTHING
14 const int NWNX_ADMINISTRATION_OPTION_NON_PARTY_KILLABLE = 1; // DOES NOT DO ANYTHING
15 const int NWNX_ADMINISTRATION_OPTION_REQUIRE_RESURRECTION = 2; // DOES NOT DO ANYTHING
16 const int NWNX_ADMINISTRATION_OPTION_LOSE_STOLEN_ITEMS = 3; // DOES NOT DO ANYTHING
17 const int NWNX_ADMINISTRATION_OPTION_LOSE_ITEMS = 4; // DOES NOT DO ANYTHING
18 const int NWNX_ADMINISTRATION_OPTION_LOSE_EXP = 5; // DOES NOT DO ANYTHING
19 const int NWNX_ADMINISTRATION_OPTION_LOSE_GOLD = 6; // DOES NOT DO ANYTHING
20 const int NWNX_ADMINISTRATION_OPTION_LOSE_GOLD_NUM = 7; // DOES NOT DO ANYTHING
21 const int NWNX_ADMINISTRATION_OPTION_LOSE_EXP_NUM = 8; // DOES NOT DO ANYTHING
22 const int NWNX_ADMINISTRATION_OPTION_LOSE_ITEMS_NUM = 9; // DOES NOT DO ANYTHING
23 const int NWNX_ADMINISTRATION_OPTION_PVP_SETTING = 10; // 0 = No PVP, 1 = Party PVP, 2 = Full PVP
24 const int NWNX_ADMINISTRATION_OPTION_PAUSE_AND_PLAY = 11; // TRUE/FALSE
25 const int NWNX_ADMINISTRATION_OPTION_ONE_PARTY_ONLY = 12; // TRUE/FALSE
29 const int NWNX_ADMINISTRATION_OPTION_DISALLOW_SHOUTING = 16; // TRUE/FALSE
33 const int NWNX_ADMINISTRATION_OPTION_VALIDATE_SPELLS = 20; // TRUE/FALSE
34 const int NWNX_ADMINISTRATION_OPTION_EXAMINE_EFFECTS = 21; // TRUE/FALSE
36 const int NWNX_ADMINISTRATION_OPTION_USE_MAX_HITPOINTS = 23; // TRUE/FALSE
43 
48 const int NWNX_ADMINISTRATION_DEBUG_COMBAT = 0; // TRUE/FALSE
49 const int NWNX_ADMINISTRATION_DEBUG_SAVING_THROW = 1; // TRUE/FALSE
50 const int NWNX_ADMINISTRATION_DEBUG_MOVEMENT_SPEED = 2; // TRUE/FALSE
51 const int NWNX_ADMINISTRATION_DEBUG_HIT_DIE = 3; // TRUE/FALSE
53 
57 
60 void NWNX_Administration_SetPlayerPassword(string password);
61 
64 
68 
71 void NWNX_Administration_SetDMPassword(string password);
72 
75 
83 void NWNX_Administration_DeletePlayerCharacter(object oPC, int bPreserveBackup = TRUE, string sKickMessage = "");
84 
87 void NWNX_Administration_AddBannedIP(string ip);
88 
92 
95 void NWNX_Administration_AddBannedCDKey(string key);
96 
100 
104 void NWNX_Administration_AddBannedPlayerName(string playerName);
105 
108 void NWNX_Administration_RemoveBannedPlayerName(string playerName);
109 
113 
116 void NWNX_Administration_SetModuleName(string name);
117 
120 void NWNX_Administration_SetServerName(string name);
121 
124 
128 int NWNX_Administration_GetPlayOption(int option);
129 
133 void NWNX_Administration_SetPlayOption(int option, int value);
134 
145 int NWNX_Administration_DeleteTURD(string playerName, string characterName);
146 
151 
155 void NWNX_Administration_SetDebugValue(int type, int state);
156 
160 
164 
167 void NWNX_Administration_SetMinLevel(int nLevel);
168 
172 
176 void NWNX_Administration_SetMaxLevel(int nLevel);
177 
179 
181 {
182  string sFunc = "GetPlayerPassword";
183 
184  NWNX_CallFunction(NWNX_Administration, sFunc);
185  return NWNX_GetReturnValueString();
186 }
187 
189 {
190  string sFunc = "SetPlayerPassword";
191 
192  NWNX_PushArgumentString(password);
193  NWNX_CallFunction(NWNX_Administration, sFunc);
194 }
195 
197 {
198  string sFunc = "ClearPlayerPassword";
199 
200  NWNX_CallFunction(NWNX_Administration, sFunc);
201 }
202 
204 {
205  string sFunc = "GetDMPassword";
206 
207  NWNX_CallFunction(NWNX_Administration, sFunc);
208  return NWNX_GetReturnValueString();
209 }
210 
212 {
213  string sFunc = "SetDMPassword";
214 
215  NWNX_PushArgumentString(password);
216  NWNX_CallFunction(NWNX_Administration, sFunc);
217 }
218 
220 {
221  string sFunc = "ShutdownServer";
222 
223  NWNX_CallFunction(NWNX_Administration, sFunc);
224 }
225 
226 void NWNX_Administration_DeletePlayerCharacter(object oPC, int bPreserveBackup = TRUE, string sKickMessage = "")
227 {
228  string sFunc = "DeletePlayerCharacter";
229 
230  NWNX_PushArgumentString(sKickMessage);
231  NWNX_PushArgumentInt(bPreserveBackup);
233  NWNX_CallFunction(NWNX_Administration, sFunc);
234 }
235 
237 {
238  string sFunc = "AddBannedIP";
239 
241  NWNX_CallFunction(NWNX_Administration, sFunc);
242 }
244 {
245  string sFunc = "RemoveBannedIP";
246 
248  NWNX_CallFunction(NWNX_Administration, sFunc);
249 }
251 {
252  string sFunc = "AddBannedCDKey";
253 
255  NWNX_CallFunction(NWNX_Administration, sFunc);
256 }
258 {
259  string sFunc = "RemoveBannedCDKey";
260 
262  NWNX_CallFunction(NWNX_Administration, sFunc);
263 }
265 {
266  string sFunc = "AddBannedPlayerName";
267 
268  NWNX_PushArgumentString(playerName);
269  NWNX_CallFunction(NWNX_Administration, sFunc);
270 }
272 {
273  string sFunc = "RemoveBannedPlayerName";
274 
275  NWNX_PushArgumentString(playerName);
276  NWNX_CallFunction(NWNX_Administration, sFunc);
277 }
279 {
280  string sFunc = "GetBannedList";
281 
282  NWNX_CallFunction(NWNX_Administration, sFunc);
283  return NWNX_GetReturnValueString();
284 }
285 
287 {
288  string sFunc = "SetModuleName";
289 
291  NWNX_CallFunction(NWNX_Administration, sFunc);
292 }
293 
295 {
296  string sFunc = "SetServerName";
297 
299  NWNX_CallFunction(NWNX_Administration, sFunc);
300 }
301 
303 {
304  string sFunc = "GetServerName";
305  NWNX_CallFunction(NWNX_Administration, sFunc);
306  return NWNX_GetReturnValueString();
307 }
308 
310 {
311  string sFunc = "GetPlayOption";
312 
313  NWNX_PushArgumentInt(option);
314  NWNX_CallFunction(NWNX_Administration, sFunc);
315 
316  return NWNX_GetReturnValueInt();
317 }
318 
319 void NWNX_Administration_SetPlayOption(int option, int value)
320 {
321  string sFunc = "SetPlayOption";
322 
323  NWNX_PushArgumentInt(value);
324  NWNX_PushArgumentInt(option);
325  NWNX_CallFunction(NWNX_Administration, sFunc);
326 }
327 
328 int NWNX_Administration_DeleteTURD(string playerName, string characterName)
329 {
330  string sFunc = "DeleteTURD";
331 
332  NWNX_PushArgumentString(characterName);
333  NWNX_PushArgumentString(playerName);
334  NWNX_CallFunction(NWNX_Administration, sFunc);
335 
336  return NWNX_GetReturnValueInt();
337 }
338 
340 {
341  string sFunc = "GetDebugValue";
342 
343  NWNX_PushArgumentInt(type);
344  NWNX_CallFunction(NWNX_Administration, sFunc);
345 
346  return NWNX_GetReturnValueInt();
347 }
348 
349 void NWNX_Administration_SetDebugValue(int type, int state)
350 {
351  string sFunc = "SetDebugValue";
352 
353  NWNX_PushArgumentInt(state);
354  NWNX_PushArgumentInt(type);
355  NWNX_CallFunction(NWNX_Administration, sFunc);
356 }
357 
359 {
360  string sFunc = "ReloadRules";
361 
362  NWNX_CallFunction(NWNX_Administration, sFunc);
363 }
364 
366 {
367  string sFunc = "GetMinLevel";
368  NWNX_CallFunction(NWNX_Administration, sFunc);
369  return NWNX_GetReturnValueInt();
370 }
371 
373 {
374  string sFunc = "SetMinLevel";
375  NWNX_PushArgumentInt(nLevel);
376  NWNX_CallFunction(NWNX_Administration, sFunc);
377 }
378 
380 {
381  string sFunc = "GetMaxLevel";
382  NWNX_CallFunction(NWNX_Administration, sFunc);
383  return NWNX_GetReturnValueInt();
384 }
385 
387 {
388  string sFunc = "SetMaxLevel";
389  NWNX_PushArgumentInt(nLevel);
390  NWNX_CallFunction(NWNX_Administration, sFunc);
391 }
NWNX_ADMINISTRATION_OPTION_ONE_PARTY_ONLY
const int NWNX_ADMINISTRATION_OPTION_ONE_PARTY_ONLY
Definition: nwnx_admin.nss:25
NWNX_Administration_RemoveBannedPlayerName
void NWNX_Administration_RemoveBannedPlayerName(string playerName)
Removes the ban on the provided playername.
Definition: nwnx_admin.nss:271
NWNX_ADMINISTRATION_OPTION_LOSE_EXP_NUM
const int NWNX_ADMINISTRATION_OPTION_LOSE_EXP_NUM
Definition: nwnx_admin.nss:21
NWNX_GetReturnValueInt
int NWNX_GetReturnValueInt()
Returns the specified type from the c++ side.
Definition: nwnx.nss:94
NWNX_ADMINISTRATION_OPTION_LOSE_GOLD
const int NWNX_ADMINISTRATION_OPTION_LOSE_GOLD
Definition: nwnx_admin.nss:19
NWNX_Administration_GetPlayerPassword
string NWNX_Administration_GetPlayerPassword()
Gets the current player password.
Definition: nwnx_admin.nss:180
NWNX_ADMINISTRATION_OPTION_RESTORE_SPELLS_USES
const int NWNX_ADMINISTRATION_OPTION_RESTORE_SPELLS_USES
Definition: nwnx_admin.nss:37
NWNX_Administration_SetDMPassword
void NWNX_Administration_SetDMPassword(string password)
Sets the password for DMs to login.
Definition: nwnx_admin.nss:211
NWNX_Administration_GetDebugValue
int NWNX_Administration_GetDebugValue(int type)
Get an Administration Debug Type value.
Definition: nwnx_admin.nss:339
NWNX_Administration_RemoveBannedIP
void NWNX_Administration_RemoveBannedIP(string ip)
Removes the ban on the provided IP.
Definition: nwnx_admin.nss:243
NWNX_ADMINISTRATION_OPTION_SHOW_PLAYER_JOIN_MESSAGES
const int NWNX_ADMINISTRATION_OPTION_SHOW_PLAYER_JOIN_MESSAGES
Definition: nwnx_admin.nss:41
NWNX_ADMINISTRATION_OPTION_LOSE_ITEMS_NUM
const int NWNX_ADMINISTRATION_OPTION_LOSE_ITEMS_NUM
Definition: nwnx_admin.nss:22
NWNX_ADMINISTRATION_OPTION_CDKEY_BANLIST_ALLOWLIST
const int NWNX_ADMINISTRATION_OPTION_CDKEY_BANLIST_ALLOWLIST
Definition: nwnx_admin.nss:28
NWNX_ADMINISTRATION_OPTION_BACKUP_SAVED_CHARACTERS
const int NWNX_ADMINISTRATION_OPTION_BACKUP_SAVED_CHARACTERS
Definition: nwnx_admin.nss:31
NWNX_Administration_SetMinLevel
void NWNX_Administration_SetMinLevel(int nLevel)
Set the servers minimum level.
Definition: nwnx_admin.nss:372
NWNX_ADMINISTRATION_OPTION_HIDE_HITPOINTS_GAINED
const int NWNX_ADMINISTRATION_OPTION_HIDE_HITPOINTS_GAINED
Definition: nwnx_admin.nss:39
NWNX_ADMINISTRATION_OPTION_PVP_SETTING
const int NWNX_ADMINISTRATION_OPTION_PVP_SETTING
Definition: nwnx_admin.nss:23
NWNX_ADMINISTRATION_OPTION_VALIDATE_SPELLS
const int NWNX_ADMINISTRATION_OPTION_VALIDATE_SPELLS
Definition: nwnx_admin.nss:33
NWNX_Administration_SetServerName
void NWNX_Administration_SetServerName(string name)
Set the server's name as shown to the serverlist.
Definition: nwnx_admin.nss:294
NWNX_ADMINISTRATION_OPTION_ITEM_LEVEL_RESTRICTIONS
const int NWNX_ADMINISTRATION_OPTION_ITEM_LEVEL_RESTRICTIONS
Definition: nwnx_admin.nss:27
NWNX_Administration_ClearPlayerPassword
void NWNX_Administration_ClearPlayerPassword()
Clears the player password required to login.
Definition: nwnx_admin.nss:196
NWNX_CallFunction
void NWNX_CallFunction(string pluginName, string functionName)
Scripting interface to NWNX.
Definition: nwnx.nss:54
NWNX_ADMINISTRATION_OPTION_SHOW_DM_JOIN_MESSAGE
const int NWNX_ADMINISTRATION_OPTION_SHOW_DM_JOIN_MESSAGE
Definition: nwnx_admin.nss:30
NWNX_Administration_DeletePlayerCharacter
void NWNX_Administration_DeletePlayerCharacter(object oPC, int bPreserveBackup=TRUE, string sKickMessage="")
Deletes the player character from the servervault.
Definition: nwnx_admin.nss:226
NWNX_Administration_ReloadRules
void NWNX_Administration_ReloadRules()
Reload all rules (2da stuff etc).
Definition: nwnx_admin.nss:358
NWNX_GetReturnValueString
string NWNX_GetReturnValueString()
Returns the specified type from the c++ side.
Definition: nwnx.nss:109
NWNX_ADMINISTRATION_OPTION_RESET_ENCOUNTER_SPAWN_POOL
const int NWNX_ADMINISTRATION_OPTION_RESET_ENCOUNTER_SPAWN_POOL
Definition: nwnx_admin.nss:38
NWNX_PushArgumentString
void NWNX_PushArgumentString(string value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:74
NWNX_ADMINISTRATION_OPTION_USE_MAX_HITPOINTS
const int NWNX_ADMINISTRATION_OPTION_USE_MAX_HITPOINTS
Definition: nwnx_admin.nss:36
NWNX_ADMINISTRATION_DEBUG_SAVING_THROW
const int NWNX_ADMINISTRATION_DEBUG_SAVING_THROW
Definition: nwnx_admin.nss:49
NWNX_Administration_SetDebugValue
void NWNX_Administration_SetDebugValue(int type, int state)
Set an Administration Debug Type to a value.
Definition: nwnx_admin.nss:349
NWNX_Administration_GetMinLevel
int NWNX_Administration_GetMinLevel()
Get the servers minimum level.
Definition: nwnx_admin.nss:365
NWNX_Administration_GetMaxLevel
int NWNX_Administration_GetMaxLevel()
Get the servers maximum level.
Definition: nwnx_admin.nss:379
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_ADMINISTRATION_OPTION_NON_PARTY_KILLABLE
const int NWNX_ADMINISTRATION_OPTION_NON_PARTY_KILLABLE
Definition: nwnx_admin.nss:14
NWNX_Administration_GetBannedList
string NWNX_Administration_GetBannedList()
Get a list of all banned IPs/Keys/names as a string.
Definition: nwnx_admin.nss:278
NWNX_Administration_AddBannedPlayerName
void NWNX_Administration_AddBannedPlayerName(string playerName)
Bans the provided playername.
Definition: nwnx_admin.nss:264
NWNX_ADMINISTRATION_OPTION_ALL_KILLABLE
const int NWNX_ADMINISTRATION_OPTION_ALL_KILLABLE
Definition: nwnx_admin.nss:13
NWNX_ADMINISTRATION_OPTION_PAUSE_AND_PLAY
const int NWNX_ADMINISTRATION_OPTION_PAUSE_AND_PLAY
Definition: nwnx_admin.nss:24
NWNX_Administration_GetDMPassword
string NWNX_Administration_GetDMPassword()
Gets the current DM password.
Definition: nwnx_admin.nss:203
NWNX_ADMINISTRATION_OPTION_LOSE_GOLD_NUM
const int NWNX_ADMINISTRATION_OPTION_LOSE_GOLD_NUM
Definition: nwnx_admin.nss:20
NWNX_Administration_ShutdownServer
void NWNX_Administration_ShutdownServer()
Signals the server to immediately shut down.
Definition: nwnx_admin.nss:219
NWNX_ADMINISTRATION_OPTION_EXAMINE_CHALLENGE_RATING
const int NWNX_ADMINISTRATION_OPTION_EXAMINE_CHALLENGE_RATING
Definition: nwnx_admin.nss:35
NWNX_Administration_DeleteTURD
int NWNX_Administration_DeleteTURD(string playerName, string characterName)
Delete the TURD of playerName + characterName.
Definition: nwnx_admin.nss:328
NWNX_Administration_RemoveBannedCDKey
void NWNX_Administration_RemoveBannedCDKey(string key)
Removes the ban on the provided Public CD Key.
Definition: nwnx_admin.nss:257
NWNX_ADMINISTRATION_OPTION_REQUIRE_RESURRECTION
const int NWNX_ADMINISTRATION_OPTION_REQUIRE_RESURRECTION
Definition: nwnx_admin.nss:15
NWNX_Administration_SetMaxLevel
void NWNX_Administration_SetMaxLevel(int nLevel)
Set the servers maximum level.
Definition: nwnx_admin.nss:386
NWNX_Administration_SetPlayerPassword
void NWNX_Administration_SetPlayerPassword(string password)
Sets the password for players to login.
Definition: nwnx_admin.nss:188
NWNX_ADMINISTRATION_DEBUG_HIT_DIE
const int NWNX_ADMINISTRATION_DEBUG_HIT_DIE
Definition: nwnx_admin.nss:51
NWNX_ADMINISTRATION_OPTION_LOSE_ITEMS
const int NWNX_ADMINISTRATION_OPTION_LOSE_ITEMS
Definition: nwnx_admin.nss:17
NWNX_Administration_AddBannedIP
void NWNX_Administration_AddBannedIP(string ip)
Bans the provided IP.
Definition: nwnx_admin.nss:236
NWNX_ADMINISTRATION_DEBUG_COMBAT
const int NWNX_ADMINISTRATION_DEBUG_COMBAT
Definition: nwnx_admin.nss:48
NWNX_ADMINISTRATION_OPTION_LOSE_STOLEN_ITEMS
const int NWNX_ADMINISTRATION_OPTION_LOSE_STOLEN_ITEMS
Definition: nwnx_admin.nss:16
NWNX_ADMINISTRATION_OPTION_EXAMINE_EFFECTS
const int NWNX_ADMINISTRATION_OPTION_EXAMINE_EFFECTS
Definition: nwnx_admin.nss:34
NWNX_Administration_AddBannedCDKey
void NWNX_Administration_AddBannedCDKey(string key)
Bans the provided Public CD Key.
Definition: nwnx_admin.nss:250
NWNX_Administration_GetServerName
string NWNX_Administration_GetServerName()
Returns the server's name as shown to the serverlist.
Definition: nwnx_admin.nss:302
NWNX_Administration_SetModuleName
void NWNX_Administration_SetModuleName(string name)
Set the module's name as shown to the serverlist.
Definition: nwnx_admin.nss:286
NWNX_ADMINISTRATION_OPTION_ENFORCE_LEGAL_CHARACTERS
const int NWNX_ADMINISTRATION_OPTION_ENFORCE_LEGAL_CHARACTERS
Definition: nwnx_admin.nss:26
NWNX_Administration_SetPlayOption
void NWNX_Administration_SetPlayOption(int option, int value)
Set an Administration Options to a value.
Definition: nwnx_admin.nss:319
NWNX_ADMINISTRATION_OPTION_DISALLOW_SHOUTING
const int NWNX_ADMINISTRATION_OPTION_DISALLOW_SHOUTING
Definition: nwnx_admin.nss:29
NWNX_ADMINISTRATION_OPTION_AUTO_FAIL_SAVE_ON_1
const int NWNX_ADMINISTRATION_OPTION_AUTO_FAIL_SAVE_ON_1
Definition: nwnx_admin.nss:32
NWNX_ADMINISTRATION_OPTION_LOSE_EXP
const int NWNX_ADMINISTRATION_OPTION_LOSE_EXP
Definition: nwnx_admin.nss:18
NWNX_ADMINISTRATION_OPTION_PLAYER_PARTY_CONTROL
const int NWNX_ADMINISTRATION_OPTION_PLAYER_PARTY_CONTROL
Definition: nwnx_admin.nss:40
NWNX_ADMINISTRATION_DEBUG_MOVEMENT_SPEED
const int NWNX_ADMINISTRATION_DEBUG_MOVEMENT_SPEED
Definition: nwnx_admin.nss:50
NWNX_Administration_GetPlayOption
int NWNX_Administration_GetPlayOption(int option)
Get an Administration Option value.
Definition: nwnx_admin.nss:309