Changed folder name.

Changed folder name.
This commit is contained in:
Jaysyn904
2022-10-07 21:08:37 -04:00
parent 1c33c2843e
commit 8d97886c3f
7060 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
//Created by Genisys/Guile 5/20/08
//This is a triple check script where we check who is clicking
//if the locations are valid and if not send them somewhere else.
//Put this script OnClick or OnFailToOpen
void main()
{
object oPC = GetClickingObject();
object oTarget;
location lTarget;
//If it's a PC port them home (town)
if(GetIsPC(oPC))
{
oTarget = GetWaypointByTag("home");
lTarget = GetLocation(oTarget);
//This location is valid, but this is here for saftey measures.
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}
//Otherwise it must be a dm or creature, so...
else
{
lTarget = GetLocalLocation(oPC, "ls_stored_loc");
//If the DM didn't use the door, then port them to town.
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID)
{
oTarget = GetWaypointByTag("home");
lTarget = GetLocation(oTarget);
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}
//Teleport the DM to town (because they used the door)
else
{
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}
}
}