Files
HeroesStone_PRC8/_module/nss/tp_location.nss
Jaysyn904 1eefc84201 Initial Commit
Initial Commit.
2025-09-14 15:40:46 -04:00

33 lines
900 B
Plaintext

/* tp_location
* by dluan on jan 2003 */
void main()
{
SetLocalInt(OBJECT_SELF, "TP_TYPE", 1);
SetCustomToken(2000, "Select a location.");
object oArea;
string sArea = GetLocalString(GetModule(), "TP_TAGAREA_001");
int nCount = 0;
while (sArea != "" && nCount < 6) {
nCount++;
oArea = GetObjectByTag(sArea);
SetCustomToken(2000+nCount, GetName(oArea));
SetLocalObject(OBJECT_SELF, "TP_CUSTOM"+IntToString(nCount), oArea);
sArea = GetLocalString(GetModule(), "TP_TAGAREA_00"+IntToString(nCount+1));
}
if (!nCount) {
SetCustomToken(2001, "No location could be found.");
SetLocalInt(OBJECT_SELF, "TP_ITEM", 1);
return;
}
if (sArea != "") {
SetCustomToken(2006, "Next.");
SetLocalInt(OBJECT_SELF, "TP_AREA", nCount);
}
SetLocalInt(OBJECT_SELF, "TP_ITEM", nCount);
}