#include <entity>
#include <general>

main()
{
	if (FirstRun())
	{	
		SetString("door5", 0, "door5a");
	}
	
	// Set the NPCs speech depending on the time of day
	new TimeOfDay = GetHourCount();
	if ( TimeOfDay >= 21 || TimeOfDay < 6) // Night-Time
	{
		MessageMap("npc2", 0, "It's night time, are you scared of the dark young lad?", true, 1);
		MessageMap("npc2", 1, "well?..` |Ye.. Yeah Kinda` |No, course not!", true, 2, 3);
		MessageMap("npc2", 2, "You had better go inside and wait for morning then", false, 0);
		MessageMap("npc2", 3, "What a brave young man you are!", false, 0);
	}
	
	if ( TimeOfDay >= 6 && TimeOfDay < 11) // morning
		MessageMap("npc2", 0, "What a beatiful morning, looks like it's gonna be a great day!", false, 0);
		
	if ( TimeOfDay >= 11 && TimeOfDay < 21) // afternoon
		MessageMap("npc2", 0, "I love these lazy summer afternoons, don't you?", false, 0);
}