
script_enemy_main
{    
    let imgEnemy ="script\DanMUku\Stage6\Image\noobman.png";
    let count = -50;
    let x=GetX;

 function Wait(let frames){
   loop(frames){yield;}
 }

   @Initialize
   {
            LoadUserShotData("lib\MUtir\MUtir.txt");
            LoadGraphic(imgEnemy);
            SetLife(1);
            SetTimer(9999);
            SetInvincibility(100);
            SetEnemyMarker(true);
            SetMovePosition02(GetCenterX, GetCenterY-100, 50);   
	    CreateEventFromScript("name");
           
   }
   
   @MainLoop
   {
	if (!OnEvent) {
		AddLife(-1);
	}

count++;
yield;
   }
   @Finalize
   {
      DeleteGraphic(imgEnemy);
   }
   
   @DrawLoop
   {
            SetGraphicScale(1,1);
            SetColor(255,255,255);
            SetRenderState(ALPHA);
            SetTexture(imgEnemy);
	if (GetSpeed>0) {	
	            SetGraphicRect(28,0,55,34);
	}
	else {
		    SetGraphicRect(0,0,27,34);
	}

            DrawGraphic(GetX,GetY);

	DrawText("Noob Man", GetClipMinX+10, GetClipMinY+15, 12, 255);
   }

}

script_event name{

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

@MainLoop{
 SetChar(LEFT, "script\DanMUku\Joueur\KorA\Kordialogue.png");                   
SetGraphicRect(LEFT, 0, 0, 121, 214);           
MoveChar(LEFT, BACK);
SetChar(RIGHT, "script\DanMUku\Stage6\Image\noobcutin.png");
SetGraphicRect(RIGHT, 0, 0, 121, 214);
MoveChar(RIGHT, FRONT);
TextOutA("\c[RED] Hi Kor.");
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] Noob Man?");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
TextOutA("\c[RED] So you came back.");
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] Yes.");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
TextOutA("\c[RED] You must have understood by now.");
SetNameFromText (RIGHT, TEXT_WHITE, "Noob Man", "The Responsible");
TextOutA("\c[RED] I was the one who took MU from you.\nWell, with some help from Fully.");
DeleteName(RIGHT);
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] What about the rest of the moderation team?");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
TextOutA("\c[RED] Locked up.\n Misplaced loyalty.");
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] Let's free them.");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
TextOutA("\c[RED] I can't do that.");
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] Your tower is collapsing. I already \nbeat Fully and your subordinates.");
TextOutA("\c[BLUE] You already lost.");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
TextOutA("\c[RED] No, I can still win.\n If I defeat you now.");
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] Do you really think you can?");
TextOutA("\c[BLUE] Fully couldn't, even with this machine of his.");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
TextOutA("\c[RED] I'm much stronger than I was when you left..");
PlayMusic("script\DanMUku\Stage6\NoobMan.mp3");
TextOutA("\c[RED] Will you be able to avoid \nmy most powerful attacks?");
MoveChar(RIGHT, BACK);
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] You have an orchestra in there!!?");
MoveChar(LEFT, BACK);
MoveChar(RIGHT, FRONT);
TextOutA("\c[RED] No, just good loudspeaker.");
TextOutA("\c[RED] It is time for our showdown.");
MoveChar(LEFT, FRONT);
TextOutA("\c[BLUE] MU will come back to me! \n \c[RED]                   MU will stay mine!");
End;
}

 @Finalize{
  DeleteGraphic("script\DanMUku\Joueur\KorA\Kordialogue.png");
  DeleteGraphic("script\DanMUku\Stage3\Image\luidicutin.png");
 }
}
