generated from Jaysyn/ModuleTemplate
33 lines
858 B
Plaintext
33 lines
858 B
Plaintext
/* 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);
|
|
}
|