31 lines
918 B
Plaintext
31 lines
918 B
Plaintext
#include "x0_i0_petrify"
|
|
|
|
void main()
|
|
{
|
|
object oMod=GetModule();
|
|
object oSelf = OBJECT_SELF;
|
|
int oTime = GetLocalInt(oSelf, "nightday");
|
|
int oTime2 =GetLocalInt(oSelf, "nightday2");
|
|
location lLocation = GetLocation(oSelf);
|
|
effect eLight = EffectVisualEffect(VFX_DUR_LIGHT_YELLOW_20);
|
|
string sSound = GetTag(oSelf);
|
|
object oTarget =GetObjectByTag(sSound);
|
|
|
|
if (((GetIsDay()==TRUE)||(GetIsDawn()==TRUE))&&(oTime!=1))
|
|
{
|
|
RemoveEffectOfType(oSelf, GetEffectType(eLight));
|
|
PlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE);
|
|
SetLocalInt(oSelf, "nightday", 1);
|
|
SetLocalInt(oSelf, "nightday2", 0);
|
|
}
|
|
if (((GetIsNight()==TRUE)||(GetIsDusk()==TRUE))&&(oTime2!=1))
|
|
|
|
{
|
|
|
|
PlayAnimation(ANIMATION_PLACEABLE_ACTIVATE);
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLight, oSelf);
|
|
SetLocalInt(oSelf, "nightday2", 1);
|
|
SetLocalInt(oSelf, "nightday", 0);
|
|
}
|
|
}
|