int GetTime()
{
  int nYear = GetCalendarYear();
  int nMonth = GetCalendarMonth();
  int nDay = GetCalendarDay();
  int nHour = GetTimeHour();
  int nTime = nYear*12*28*24 + (nMonth-1)*28*24 + (nDay-1)*24 + nHour;
  return nTime;
}

void main()
{
  object oPC = GetEnteringObject();
  if (GetIsPC(oPC))
  {
    FloatingTextStringOnCreature("It is safe to rest here.",oPC);
    SetLocalInt(oPC,"LastRest",GetTime() - 12);
  }
}
