// 
int Rule = 5;
int RoundTime = 999;
int PlayerSpawn = 0;
int PlayerSpawnDir = 90;
int PlayerWeapon = 99;
int PlayerWeapon2 = 0;
int PlayerHP = 1600;

int trg0 = 0;
int trg1 = 0;
int trg2 = 0;
int trg3 = 0;
int trg4 = 0;
int trg5 = 0;
int trg6 = 0;
int trg7 = 0;
int trg8 = 0;
int trg9 = 0;
int trg10 = 0;
int trg11 = 0;
int timer0 = 0;
int timer1 = 0;
int timer2 = 0;
int timer3 = 0;
int timer4 = 0;
int timer5 = 0;
int now;


OnStart()
{
	AddNPC("1");
}


OnUpdate()
{
	int player = GetChar("player");
	if (player < 0)
	{
		return 0;
	}
	
	int c;
	int c2;
	int c3;
	int now = GetGameTime();

	if (trg0 == 0)
	{
		c = GetChar("ÀäÑà"); 
		
		if (c>=0 && GetHP(c)<=GetMaxHP(c)/2)
		{
				Perform(c, "use", 15);
			
			trg0 = 1;
                        timer0 = now + 3;
		}
	}
	if (trg0 == 1)	
	{	
		c = GetChar("ÀäÑà"); 
		if (c>=0 && GetHP(c)<=GetMaxHP(c)/2 && now > timer0)
		{
				Perform(c, "use", 15);
			
			trg0 = 2;
                        timer1 = now + 3;
		}
	}
	if (trg0 == 2)	
	{	
		c = GetChar("ÀäÑà"); 
		if (c>=0 && GetHP(c)<=GetMaxHP(c)/2 && now > timer1)
		{
				Perform(c, "use", 15);
			
			trg0 = 1;
                        timer0 = now + 3;
		}
	}

	if (trg1 == 0)
	{
		c = GetChar("ÀäÑà"); 
		
		if (c>=0)
		{
			PlayerPerform("use", 14);
			
			trg1 = 1;
		}
	}


}


