generated from Jaysyn/ModuleTemplate
Initial Commit
Initial Commit.
This commit is contained in:
21
_module/nss/night_encounter.nss
Normal file
21
_module/nss/night_encounter.nss
Normal file
@@ -0,0 +1,21 @@
|
||||
/* enc_nightonly
|
||||
Ensure, an encounter only appears during night
|
||||
hours (as defined in the module properties)
|
||||
Make sure, the encounter is INACTIVE by DEFAULT!
|
||||
*/
|
||||
void main()
|
||||
{
|
||||
object oEnc = OBJECT_SELF;
|
||||
if(GetIsNight())
|
||||
{
|
||||
if (GetLocalInt(OBJECT_SELF, "TIMER") == FALSE)
|
||||
{
|
||||
SetLocalInt(OBJECT_SELF, "TIMER", TRUE);
|
||||
DelayCommand(1500.0, DeleteLocalInt(OBJECT_SELF, "TIMER"));
|
||||
SetEncounterActive(TRUE, oEnc);
|
||||
/* make sure, the encounter is inactive by default! */
|
||||
DelayCommand(2.0f, SetEncounterActive(FALSE, oEnc));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user