Changed folder name.
Changed folder name.
This commit is contained in:
34
_module/nss/invroom_onenter.nss
Normal file
34
_module/nss/invroom_onenter.nss
Normal file
@@ -0,0 +1,34 @@
|
||||
//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));
|
||||
|
||||
}
|
Reference in New Issue
Block a user