AOC_PRC8/_module/nss/dynamic_bell.nss
Jaysyn904 5e558169a0 Initial Commit
Initial Commit
2025-04-03 11:24:16 -04:00

24 lines
582 B
Plaintext

#include "x0_i0_petrify"
void main()
{
object oLamp = OBJECT_SELF;
effect eLight = EffectVisualEffect(VFX_DUR_LIGHT_YELLOW_20);
int oTime = GetLocalInt(oLamp, "timeofday");
int oTime2 = GetLocalInt(oLamp, "timeofday2");
if (((GetIsDay()==TRUE)||(GetIsDawn()==TRUE))&&(oTime!=1))
{
SoundObjectPlay(GetObjectByTag("bell"));
SetLocalInt(oLamp, "timeofday", 1);
SetLocalInt(oLamp, "timeofday2", 0);
}
if (((GetIsNight()==TRUE)||(GetIsDusk()==TRUE))&&(oTime2!=1))
{
SoundObjectPlay(GetObjectByTag("bell"));
SetLocalInt(oLamp, "timeofday2", 1);
SetLocalInt(oLamp, "timeofday", 0);
}
}