NWNX:EE  8193.36.12
nwnx_rename.nss
Go to the documentation of this file.
1 #include "nwnx"
6 
7 const string NWNX_Rename = "NWNX_Rename";
8 
16 
26 void NWNX_Rename_SetPCNameOverride(object oTarget, string sNewName, string sPrefix = "" , string sSuffix = "" ,
27  int iPlayerNameState = NWNX_RENAME_PLAYERNAME_DEFAULT, object oObserver = OBJECT_INVALID);
28 
34 string NWNX_Rename_GetPCNameOverride(object oTarget, object oObserver = OBJECT_INVALID);
35 
42 void NWNX_Rename_ClearPCNameOverride(object oTarget, object oObserver = OBJECT_INVALID, int clearAll = FALSE);
43 
45 
46 void NWNX_Rename_SetPCNameOverride(object oTarget, string sNewName, string sPrefix = "" , string sSuffix = "" ,
47  int iPlayerNameState = NWNX_RENAME_PLAYERNAME_DEFAULT, object oObserver = OBJECT_INVALID)
48 {
49  string sFunc = "SetPCNameOverride";
50 
51  NWNX_PushArgumentObject(oObserver);
52  NWNX_PushArgumentInt(iPlayerNameState);
53  NWNX_PushArgumentString(sSuffix);
54  NWNX_PushArgumentString(sPrefix);
55  NWNX_PushArgumentString(sNewName);
56  NWNX_PushArgumentObject(oTarget);
57 
58  NWNX_CallFunction(NWNX_Rename, sFunc);
59 }
60 string NWNX_Rename_GetPCNameOverride(object oTarget, object oObserver = OBJECT_INVALID)
61 {
62  string sFunc = "GetPCNameOverride";
63 
64  NWNX_PushArgumentObject(oObserver);
65  NWNX_PushArgumentObject(oTarget);
66 
67  NWNX_CallFunction(NWNX_Rename, sFunc);
69 }
70 
71 void NWNX_Rename_ClearPCNameOverride(object oTarget, object oObserver = OBJECT_INVALID, int clearAll = FALSE)
72 {
73  string sFunc = "ClearPCNameOverride";
74 
75  NWNX_PushArgumentInt(clearAll);
76  NWNX_PushArgumentObject(oObserver);
77  NWNX_PushArgumentObject(oTarget);
78 
79  NWNX_CallFunction(NWNX_Rename, sFunc);
80 }
NWNX_RENAME_PLAYERNAME_OBFUSCATE
const int NWNX_RENAME_PLAYERNAME_OBFUSCATE
Generate random string for Community Name.
Definition: nwnx_rename.nss:13
NWNX_Rename_SetPCNameOverride
void NWNX_Rename_SetPCNameOverride(object oTarget, string sNewName, string sPrefix="", string sSuffix="", int iPlayerNameState=NWNX_RENAME_PLAYERNAME_DEFAULT, object oObserver=OBJECT_INVALID)
Set a PC's character name and community name on the player list.
Definition: nwnx_rename.nss:46
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_RENAME_PLAYERNAME_OVERRIDE
const int NWNX_RENAME_PLAYERNAME_OVERRIDE
Use character name specified.
Definition: nwnx_rename.nss:14
NWNX_Rename_ClearPCNameOverride
void NWNX_Rename_ClearPCNameOverride(object oTarget, object oObserver=OBJECT_INVALID, int clearAll=FALSE)
Clears an overridden PC Name.
Definition: nwnx_rename.nss:71
NWNX_PushArgumentObject
void NWNX_PushArgumentObject(object value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:69
NWNX_Rename_GetPCNameOverride
string NWNX_Rename_GetPCNameOverride(object oTarget, object oObserver=OBJECT_INVALID)
Gets a PC's name as overridden.
Definition: nwnx_rename.nss:60
NWNX_PushArgumentInt
void NWNX_PushArgumentInt(int value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:59
NWNX_RENAME_PLAYERNAME_DEFAULT
const int NWNX_RENAME_PLAYERNAME_DEFAULT
Don't rename.
Definition: nwnx_rename.nss:12
NWNX_RENAME_PLAYERNAME_ANONYMOUS
const int NWNX_RENAME_PLAYERNAME_ANONYMOUS
Use the value of the NWNX_RENAME_ANONYMOUS_NAME environment variable.
Definition: nwnx_rename.nss:15