

script_enemy_main
{    

    let imgEnemy="script\DanMUku\Stage2\Image\WaruigiN.png";
    let z = 0;
    let w = 0.5;
   @Initialize
   {

      LoadGraphic(imgEnemy);
      LoadMusic("script\DanMUku\Stage2\War.mp3");
            SetLife(1);
            SetEnemyMarker(true);
            SetInvincibility(150);
            SetMovePosition02(GetCenterX, GetCenterY - 100, 120);
            CreateEventFromScript("name");
   }
   
   @MainLoop
   {
	if (!OnEvent) {
		AddLife(-1);
	}
   }
   @Finalize
   {
      DeleteGraphic(imgEnemy);
   }
   
   @DrawLoop
   {
            SetColor(255,255,255);
            SetRenderState(ALPHA);
            SetTexture(imgEnemy);
            SetGraphicRect(0,0,40,40);
            DrawGraphic(GetX,GetY+z);
     if(z==10){w=-0.5;}
     if(z==-10){w=0.5;}
z+=w;
	DrawText("War'", GetClipMinX+10, GetClipMinY+15, 12, 255);
   }

}

script_event name{

@Initialize{
  LoadGraphic("script\DanMUku\Joueur\KorA\Kordialogue.png");
  LoadGraphic("script\DanMUku\Stage2\Image\Warcutin.png");
 }

@MainLoop{
 SetChar(LEFT, "script\DanMUku\Joueur\KorA\Kordialogue.png");                 
SetGraphicRect(LEFT, 0, 0, 121, 214);           
MoveChar(LEFT, BACK);
SetChar(RIGHT, "script\DanMUku\Stage2\Image\Warcutin.png");
SetGraphicRect(RIGHT, 0, 0, 121, 214);
MoveChar(RIGHT, FRONT);
SetNameFromText (RIGHT, TEXT_PURPLE, "Waruigi", "Obstrusive night watchman");
TextOutA("\c[RED] Oh, is that you Kor? \n It's not exactly the right time.");
DeleteName(RIGHT);
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] Yeah, right, I should have\n come in the middle of the day");
TextOutA("\c[BLUE] so everyone could\n clearly see me coming.");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
TextOutA("\c[RED] Stop joking around Kor.");
TextOutA("\c[RED] MU is in turmoil. \n The situation is grave.");
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] Don't worry, \n I'm going to resolve that.");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
TextOutA("\c[RED] You don't understand. \n MU is in danger.");
TextOutA("\c[RED] Retaking the power by force \n is only going to make things worse.");
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] What do you want me to do? Hiding\n until everything is fine and dandy?");
TextOutA("\c[BLUE] I can't let them keep \n MU any longer.");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
PlayMusic("script\DanMUku\Stage2\War.mp3");
TextOutA("\c[RED] In that case, \nyou force me to stop you...");
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] So we have to fight?");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
TextOutA("\c[RED] For the good of the community!");
End;
}

 @Finalize{
  DeleteGraphic("player\korHosik\Kordialogue.png");
  DeleteGraphic("script\DanMUku\Stage1\Image\Machincutin.png");
 }
}
