
script_enemy_main
{    
   let imgEnemy="script\DanMUku\Stage5\Image\fully.png";
   let count=0;
    let z = 0;
    let w = 0.5;

   @Initialize
   {
            LoadGraphic(imgEnemy);
            SetLife(1);
            SetEnemyMarker(true);
            SetInvincibility(150);
            CreateEnemyFromScript("j64", 100, 0, 1, 90, 0);
            CreateEventFromScript("name");
   }
   
   @MainLoop
   {
	if (!OnEvent) {
		AddLife(-1);
	}

	if (count==180){
		SetMovePosition02(GetCenterX, GetCenterY - 100, 60);
	}


      count++;
   }
   
   @Finalize
   {
      DeleteGraphic(imgEnemy);
   }
   
   @DrawLoop
   {
            SetColor(255,255,255);
            SetRenderState(ALPHA);
            SetAlpha(255);
            SetTexture(imgEnemy);
            SetGraphicRect(0, 0, 35, 46);
            DrawGraphic(GetX,GetY+z);
     if(z==10){w=-0.5;}
     if(z==-10){w=0.5;}
	z+=w;

   }
}

script_event name{

  let j64 = "script\DanMUku\Stage4\Image\j64cutin.png";
  let fully = "script\DanMUku\Stage5\Image\fullycutin.png";

@Initialize{
  LoadGraphic("script\DanMUku\Joueur\KorA\Kordialogue.png");
  LoadGraphic(j64);
  LoadGraphic(fully);
 }


@MainLoop{   
 SetChar(LEFT, fully);                   
SetGraphicRect(LEFT, 0, 0, 121, 214);        
SetChar(RIGHT, j64);
SetGraphicRect(RIGHT, 0, 0, 121, 214);
MoveChar(LEFT, FRONT);
TextOutA("\c[RED] First class J64, report.");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
TextOutA("\c[GREEN] The target is just behind me.\nMission accomplished, my general.");
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[RED] Perfect! Commandant!\nClose the door!");
 SetChar(LEFT, "script\DanMUku\Joueur\KorA\Kordialogue.png");                   
SetGraphicRect(LEFT, 0, 0, 121, 214); 
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] It was a trap.");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
TextOutA("\c[GREEN] Yes! Got you! Ha ha!");
 SetChar(RIGHT, fully);                   
SetGraphicRect(RIGHT, 0, 0, 121, 214); 
TextOutA("\c[RED] First class J64, join \nCommandant Machin in the control room.");
SetStep(1);
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] Huh, Machin is here?");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
TextOutA("\c[RED] Yes, you got him good, \nbut we managed to fix him.");
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] So now, will you explain \nwhy we are enemies?");

MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
SetNameFromText (RIGHT, TEXT_GREEN, "Full_Korbe", "General of the revolution");
TextOutA("\c[RED] You abandoned MU.\n So I decided to take control of it.");
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] Abandon is a big word. I left, what? \nA couple weeks? Maybe a month?");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
DeleteName(RIGHT);
TextOutA("\c[RED] Almost two years, Kor.");

MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] Wow! Time flies!");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
TextOutA("\c[RED] ...");
DeleteName(RIGHT);
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] Still, what about the monsters?\n Why attacking the members?");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
TextOutA("\c[RED] The revolution brought about a lot of activity. \nFor a time.");
TextOutA("\c[RED] But I knew it wouldn't last.");
TextOutA("\c[RED] So I built a wall and summoned \nmonsters to keep them from leaving.");
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] You... locked up the members?");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
TextOutA("\c[RED] Just a tiny bit.");
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
PlayMusic("script\DanMUku\Stage5\Fully.mp3");
TextOutA("\c[BLUE] A battle it's gonne be, then.");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
TextOutA("\c[RED] I was waiting for that. \nCommandant, turn on the machine!");
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] The what?");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
TextOutA("\c[RED] I trapped you here, just next \nto Seud's power increasing machine.");
TextOutA("\c[RED] As long as we are here, \nI'll be stronger!\nAnd you can't leave!");
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] I will be able to, \nas soon as I beat you.");
End;


}

 @Finalize{
  DeleteGraphic("player\korHosik\Kordialogue.png");
  DeleteGraphic(fully);
 }
}

script_enemy j64{


    let imgEnemy ="script\DanMUku\Stage4\Image\j64.png";
    let count=0;
    let z = 0;
    let w = 0.5;
    let fini=false;

@Initialize{
    SetLife(1);
    LoadGraphic(imgEnemy);

 }
@MainLoop{

	if (count==120){
		SetSpeed(0);
	}

	if (fini==false&&GetEventStep==1) {
		SetAngle(200);
		SetSpeed(3);
		fini=true;
	}

	count++;
 }
@DrawLoop{
            SetColor(255,255,255);
            SetRenderState(ALPHA);
            SetAlpha(255);
            SetTexture(imgEnemy);
            SetGraphicRect(0, 0, 35, 43);
            DrawGraphic(GetX,GetY+z);
     if(z==10){w=-0.5;}
     if(z==-10){w=0.5;}
z+=w;

 }
@Finalize{
     DeleteGraphic(imgEnemy);
 }

}

