generated from Jaysyn/ModuleTemplate
Initial Commit
Initial Commit.
This commit is contained in:
32
_module/nss/tp_character.nss
Normal file
32
_module/nss/tp_character.nss
Normal file
@@ -0,0 +1,32 @@
|
||||
/* tp_character
|
||||
* by dluan on jan 2003 */
|
||||
|
||||
void main()
|
||||
{
|
||||
DeleteLocalInt(OBJECT_SELF, "TP_TYPE");
|
||||
SetCustomToken(2000, "Select a character.");
|
||||
|
||||
object oPlayer = GetFirstPC();
|
||||
int nCount = 0;
|
||||
while (GetIsObjectValid(oPlayer) && nCount < 6) {
|
||||
if (oPlayer != OBJECT_SELF) {
|
||||
nCount++;
|
||||
SetCustomToken(2000+nCount, GetName(oPlayer));
|
||||
SetLocalObject(OBJECT_SELF, "TP_CUSTOM"+IntToString(nCount), oPlayer);
|
||||
}
|
||||
oPlayer = GetNextPC();
|
||||
}
|
||||
|
||||
if (!nCount) {
|
||||
SetCustomToken(2001, "No character could be found.");
|
||||
SetLocalInt(OBJECT_SELF, "TP_ITEM", 1);
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetIsObjectValid(oPlayer)) {
|
||||
SetCustomToken(2006, "Next.");
|
||||
SetLocalObject(OBJECT_SELF, "TP_CHAR", oPlayer);
|
||||
}
|
||||
|
||||
SetLocalInt(OBJECT_SELF, "TP_ITEM", nCount);
|
||||
}
|
||||
Reference in New Issue
Block a user