35 lines
601 B
Plaintext
35 lines
601 B
Plaintext
string sDeny;
|
|
|
|
void main()
|
|
{
|
|
|
|
object oPC = GetEnteringObject();
|
|
object oToken = GetItemPossessedBy(oPC, "underworld");
|
|
|
|
if (!GetIsPC(oPC)) return;
|
|
|
|
int nXP = GetXP(oPC);
|
|
if (nXP==0 && oToken == OBJECT_INVALID)
|
|
{
|
|
sDeny="Welcome to the Underworld, please speak with the Lich to enter the Underworld.";
|
|
|
|
SendMessageToPC(oPC, sDeny);
|
|
|
|
return;
|
|
}
|
|
|
|
//If it's not a NEW PC, then jump them..
|
|
object oTarget;
|
|
location lTarget;
|
|
oTarget = GetWaypointByTag("home");
|
|
|
|
|
|
if (oTarget==OBJECT_INVALID) return;
|
|
|
|
AssignCommand(oPC, ClearAllActions());
|
|
|
|
AssignCommand(oPC, JumpToObject(oTarget));
|
|
|
|
|
|
}
|