
script_enemy_main
{    
   let imgEnemy="script\DanMUku\Stage5\Image\seud.png";
   let count=0;
   let fini=0;
   let x=GetX;
   @Initialize
   {
            LoadGraphic(imgEnemy);
            SetLife(1);
            SetEnemyMarker(true);
            SetInvincibility(150);
            SetMovePosition02(GetCenterX, GetCenterY - 100, 60);
            CreateEventFromScript("name");
   }
   
   @MainLoop
   {
	if (!OnEvent) {
		AddLife(-1);
	}
      count++;
   }
   
   @Finalize
   {
      DeleteGraphic(imgEnemy);
   }
   
   @DrawLoop
   {
	if(x>GetX){
		SetGraphicAngle(180,0,0);
	}
	if(x<GetX){
		SetGraphicAngle(0,0,0);
	}
      x=GetX;
      SetColor(255,255,255);
            SetRenderState(ALPHA);
            SetTexture(imgEnemy);
            SetGraphicRect(0,0,23,42);
            DrawGraphic(GetX,GetY);
   }
}

script_event name{

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

@MainLoop{
 SetChar(LEFT, "script\DanMUku\Joueur\KorA\Kordialogue.png");                   
SetGraphicRect(LEFT, 0, 0, 121, 214);           
SetChar(RIGHT, "script\DanMUku\Stage5\Image\seudcutin.png");
SetGraphicRect(RIGHT, 0, 0, 121, 214);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] Oh, Seud. \n Are you my enemy?");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
SetNameFromText (RIGHT, TEXT_PURPLE, "Seud", "Chief engineer");
TextOutA("\c[RED] Who showed you the tower?");
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] I have no idea what \nyou are talking about.");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
TextOutA("\c[RED] Don't be a smartass.\nThe tower is invisible.");
DeleteName(RIGHT);
TextOutA("\c[RED] The Suggestive Optical Barrier makes \nit impossible to see it \nif you don't already know it's here.");
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] So, that was it, huh.");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
TextOutA("\c[RED] So?");
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] Why would I tell you anything?");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
TextOutA("\c[RED] Well, I saw you follow J64.\nI guess it's him.");
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] What?");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
TextOutA("\c[RED] In any case, you annoy us.\nI will rid us of you.");
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] That's exactly what I was going to say.");
End;
}

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