33 lines
932 B
Plaintext
33 lines
932 B
Plaintext
#include "x0_i0_petrify"
|
|
|
|
|
|
void main()
|
|
{
|
|
object oMod=GetModule();
|
|
object oSelf = OBJECT_SELF;
|
|
int oTime = GetLocalInt(oSelf, "nightday");
|
|
location lLocation = GetLocation(oSelf);
|
|
effect eLight = EffectVisualEffect(VFX_DUR_LIGHT_YELLOW_20);
|
|
string sSound = GetTag(oSelf);
|
|
object oTarget =GetObjectByTag(sSound);
|
|
|
|
if (GetIsDay()==TRUE)
|
|
{
|
|
AssignCommand(oSelf, PlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
|
|
RemoveEffectOfType(oSelf, GetEffectType(eLight));
|
|
oTarget = GetObjectByTag("fire");
|
|
SoundObjectStop(oTarget);
|
|
SpeakString("day");
|
|
|
|
}
|
|
if ((GetIsNight()==TRUE)||(GetIsDusk()==TRUE)||(GetIsDawn()==TRUE))
|
|
{
|
|
|
|
AssignCommand(oSelf, PlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLight, oSelf);
|
|
oTarget = GetObjectByTag("fire");
|
|
SoundObjectPlay(oTarget);
|
|
SpeakString("dawn/dusk/night");
|
|
}
|
|
}
|