// Broiled Isle
int Rule = 10;
int RoundTime = 10;
int PlayerSpawn = 34;
int PlayerSpawnDir = 180;
int PlayerWeapon = 6;
int PlayerWeapon2 = 0;
int PlayerHP = 1000;

int trg0 = 0;
int trg1 = 0;
int trg2 = 0;
int trg3 = 0;
int trg4 = 0;

OnStart()
{
	AddNPC("npc14_01");
	AddNPC("npc14_02");
}


OnUpdate()
{
	int player = GetChar("player");
	if (player < 0)
	{
		return 0;
	}
	
	int c;
	int c2;
	
	if (trg0 == 0)
	{
		c = GetChar("Blade sentry");
		c2 = GetChar("Spear sentry");
		
		if (c>=0 && c2>=0)
		{		
			ChangeBehavior(c, "patrol", 0);
			Perform(c, "say", "All right, but I don't like your cold joke©q©q");
			Perform(c, "pause", 12);
			Perform(c, "say", "fucking cold!");
			Perform(c, "say", "©q©q©q©q©q©q©q");
			Perform(c, "aggress");
			Perform(c, "say", "Cold? It's fucking hot, I just want some drinkŁĄ");
			Perform(c, "pause", 12);
			Perform(c, "say", "But why boss send us here for guardingŁĄ=.=");
			Perform(c, "faceto", c2);			
			
			ChangeBehavior(c2, "patrol", 16, 18, 19, 20, 21);
			Perform(c2, "say", "-  -ŁĄ");
			Perform(c2, "pause", 8);
			Perform(c2, "say", "But maybe we are sent to an ice world next timeĄ«");
			Perform(c2, "say", "©q©q©q©qI'd better go back guardingĄ«");
			Perform(c2, "aggress", 10);
			Perform(c2, "say", "Hey, I am just making a cold joke to cool you down, get it?Ą«");
			Perform(c2, "pause", 8);
			Perform(c2, "say", "Then send us to this cold placeŁĄ");
			Perform(c2, "say", "I guess he found us lazy in guarding last timeŁĄ");
			Perform(c2, "pause", 8);
			Perform(c2, "faceto", c);
			
			trg0 = 1;
		}
	}
	

	if (trg1 == 0)
	{
		c = GetChar("Blade sentry");
		if (c>=0 && GetEnemy(c)==player )
		{
			StopPerform(c);
			c2 = GetChar("Spear sentry");
			StopPerform(c2);
			
			Perform(c, "say", "I am just hot now, and you come here for a deathŁĄ");
			trg1 = 1;
		}
	}	
	if (trg1 == 1)
	{
		c = GetChar("Blade sentry");
		if (c>=0 && GetEnemy(c)!=player)
		{
			Perform(c, "say", "Where is he? I think he is almost falling into the magma,ha haŁĄ");
			trg1 = 2;
		}	
	}	
	if (trg1 == 2)
	{
		c = GetChar("Blade sentry");
		if (c>=0 && GetEnemy(c)==player)
		{
			Perform(c, "say", "I find you now, where can you goŁĄ");
			trg1 = 3;
		}
	}		
	if (trg1 == 3)
	{
		c = GetChar("Blade sentry");
		if (c>=0 && GetEnemy(c)!=player)
		{
			Perform(c, "aggress");
			Perform(c, "say", "Hide again! What a sookŁĄ");
			trg1 = 4;
		}	
	}
	
	if (trg2 == 0)
	{
		c = GetChar("Spear sentry");
		if (c>=0 && GetEnemy(c)==player)
		{
			StopPerform(c);		
			c2 = GetAnyChar("Blade sentry");
			StopPerform(c2);
			
			if (c2>=0 && GetHP(c2)>0)
			{
				ChangeBehavior(c2, "follow", c);
				Perform(c, "say", "Come on, Bread, someone's hereŁĄŁĄ");
			} else
			{
				ChangeBehavior(c, "follow", player);
				Perform(c, "attack");
				Perform(c, "say", "Where is Bread? You kill him? ShitŁĄ");				
			}
				
			Perform(c, "guard", 4);
			Perform(c, "say", "Who the hell are you! Prepare your lifeŁĄ");
			Perform(c, "faceto", player);
				
			trg2 = 1;			
		}
	}
	if (trg2 == 1)
	{
		c = GetChar("Spear sentry");
		if (c>=0 && GetEnemy(c)!=player)
		{
			Perform(c, "say", "Shit! Next time I find you, you dieŁĄ");
			trg2 = 2;			
		}
	}	
	if (trg2 == 2)
	{
		c = GetChar("Spear sentry");
		if (c>=0 && GetEnemy(c)==player)
		{
			Perform(c, "attack");
			Perform(c, "say", "You can never get out of my sight,ha haŁĄ");
			trg2 = 3;			
		}
	}	
	if (trg2 == 3)
	{
		c = GetChar("Spear sentry");
		if (c>=0 && GetEnemy(c)!=player)
		{
			Perform(c, "aggress");
			Perform(c, "say", "Run again! Dawn itŁĄ");
			trg2 = 4;			
		}
	}	
	
	if (trg3 == 0)
	{
		c = GetAnyChar("Blade sentry");
		if (c>=0 && GetHP(c)<=0)
		{
			Say(c, "You are not that easy©q©q©q©q©q©q©qshit!©q©q©q");			
			trg3 = 1;
		}						
	}
	if (trg3 == 1)
	{
		c = GetChar("Spear sentry");
		if (c>=0 && GetEnemy(c)==player)
		{
			ChangeBehavior(c, "kill", player);
			Perform(c, "say", "You kill my friend, you dieŁĄ");				
			Perform(c, "faceto", player);
			trg3 = 2;
			trg2 = 4;
		}							
	}
	
	if (trg4 == 0)
	{
		c = GetAnyChar("Spear sentry");
		if (c>=0 && GetHP(c)<=0)
		{		
			Say(c, "Bread, revenge for me©q©q©q");
			trg4 = 1;
		}						
	}
	if (trg4 == 1)
	{
		c = GetChar("Blade sentry");
		if (c>=0 && GetEnemy(c)==player)
		{			
			ChangeBehavior(c, "kill", player);
			Perform(c, "say", "Go hell! GuyŁĄ");				
			Perform(c, "faceto", player);
			trg4 = 2;
			trg1 = 4;
		}					
	}
}