WoR_PRC8/_module/nss/sha_gtr_eye1.nss
Jaysyn904 b5e28e52f4 Initial commit
Initial commit [1.18]
2025-04-03 11:49:34 -04:00

46 lines
1.1 KiB
Plaintext

string SetupPCNames()
{
int PCCount = GetLocalInt(GetPCSpeaker(), "PLAYERS_SHIFTED");
object oPC = GetFirstPC();
int Shift = 0;
while(GetIsObjectValid(oPC))
{
if(!GetIsDM(oPC))
{
if(Shift == PCCount)
{
Shift++;
break;
}
Shift++;
}
oPC = GetNextPC();
}
SetLocalInt(GetPCSpeaker(), "PLAYERS_SHIFTED", Shift);
SetLocalObject(GetPCSpeaker(), "PLAYER_TARGETED", oPC);
string Name = GetName(oPC);
string NameOfArea = GetName(GetArea(oPC));
if(Name != "")
{ return Name + " [ " + NameOfArea + " ]"; }
return Name;
}
int StartingConditional()
{
int iResult = TRUE;
string NameOfTarget = SetupPCNames();
if(NameOfTarget == "")
{
SetCustomToken(6869, "[ There are no more players ]");
SetLocalInt(GetPCSpeaker(), "BROWSE_NEXT", 100);
DeleteLocalInt(GetPCSpeaker(), "PLAYERS_SHIFTED");
DeleteLocalObject(GetPCSpeaker(), "PLAYER_TARGETED");
return iResult;
}
SetCustomToken(6869, NameOfTarget);
return iResult;
}