35 lines
796 B
Plaintext
35 lines
796 B
Plaintext
|
//This script must go into the OnEnter event of the Inventory Room Area
|
||
|
//It prevents anyone from entering unless they are suppose to!
|
||
|
//NOTE: If the PC loggs out, then loggs back in they will be teleported out!
|
||
|
|
||
|
//Put this script OnEnter
|
||
|
void main()
|
||
|
{
|
||
|
|
||
|
object oPC = GetEnteringObject();
|
||
|
object oTarget;
|
||
|
object oSpawn;
|
||
|
location lTarget;
|
||
|
int nClear = GetLocalInt(oPC, "INVROOMUSER");
|
||
|
|
||
|
//Allow DMs in here....
|
||
|
if (!GetIsPC(oPC)) return;
|
||
|
|
||
|
|
||
|
//If the PC is the User, let them in (stop the script)
|
||
|
if (nClear == 1)
|
||
|
{ return; }
|
||
|
|
||
|
//Otherwise, teleport them out immediately!
|
||
|
|
||
|
object oTarget2 = GetWaypointByTag("home");
|
||
|
|
||
|
location lTarget2 = GetLocation(oTarget);
|
||
|
|
||
|
if (oTarget2==OBJECT_INVALID) { return; }
|
||
|
|
||
|
AssignCommand(oPC, ClearAllActions());
|
||
|
AssignCommand(oPC, ActionJumpToObject(oTarget2));
|
||
|
|
||
|
}
|