Jaysyn904 5e558169a0 Initial Commit
Initial Commit
2025-04-03 11:24:16 -04:00

27 lines
860 B
Plaintext

#include "x0_i0_petrify"
void main()
{
int oHour = GetTimeHour();
int oSec = GetTimeSecond();
int oMin = GetTimeMinute();
int oMil = GetTimeMillisecond();
object oPC = GetLastPCRested();
effect eSnore = EffectVisualEffect(VFX_IMP_SLEEP);
effect eBlind = EffectBlindness();
if (GetLastRestEventType() == REST_EVENTTYPE_REST_STARTED)
{
oHour = oHour+8;
SetTime(oHour, oMin, oSec, oMil);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSnore, oPC, 10.0);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBlind, oPC, 30.0);
DelayCommand(8.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSnore, oPC, 10.0));
}
int nLastRestType=GetLastRestEventType();
if (nLastRestType == REST_EVENTTYPE_REST_FINISHED ||nLastRestType == REST_EVENTTYPE_REST_CANCELLED )
{
RemoveEffectOfType(oPC, GetEffectType(eBlind));
FloatingTextStringOnCreature("You slept for 8 hours", oPC);
}
}