Changed folder name.
Changed folder name.
This commit is contained in:
41
_module/nss/day_night_check.nss
Normal file
41
_module/nss/day_night_check.nss
Normal file
@@ -0,0 +1,41 @@
|
||||
//Script Name: day_night_check
|
||||
//////////////////////////////////////////
|
||||
//Created By: Genisys (Guile)
|
||||
//Created On: 8/19/08
|
||||
/////////////////////////////////////////
|
||||
/*
|
||||
This script checks the time of day,
|
||||
and if it's day, the door unlocks,
|
||||
otherwise it tells the PC's why
|
||||
they cannot enter.
|
||||
*/
|
||||
////////////////////////////////////////
|
||||
|
||||
|
||||
//Put this script in the OnFailToOpen Event of the Day / Night Door
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetClickingObject();
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
if (GetIsDay())
|
||||
{
|
||||
SetLocked(OBJECT_SELF, FALSE);
|
||||
|
||||
ActionOpenDoor(OBJECT_SELF);
|
||||
|
||||
DelayCommand(15.1, ActionCloseDoor(OBJECT_SELF));
|
||||
}
|
||||
else if (GetIsNight())
|
||||
{
|
||||
ActionSpeakString("This door is barred from the inside and is unoppenable.");
|
||||
}
|
||||
else
|
||||
{
|
||||
//Debug Message to DMs (This should NEVER Happen)
|
||||
SendMessageToAllDMs("Error on Day / Night Door Script, you need to check the (day_night_check) script");
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user