Guest User

Untitled

a guest
Oct 20th, 2012
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.46 KB | None | 0 0
  1. #“Ś•ű’e–‹•—[Single]
  2. #ScriptVersion[3]
  3. #Title["10"]
  4. #Text["10"]
  5. #Background["script/default_system/Default_Background_IceMountain.txt"]
  6.  
  7. #include"script/default_system/Default_ShotConst.txt"
  8.  
  9. let objEnemy;
  10. let objPlayer;
  11. let frame = 0;
  12.  
  13. @Event{
  14. alternative(GetEventType())
  15. case(EV_REQUEST_LIFE){
  16. SetScriptResult(1500);
  17. }
  18. }
  19.  
  20. @Initialize{
  21. objPlayer = GetPlayerObjectID();
  22.  
  23. objEnemy = ObjEnemy_Create(OBJ_ENEMY_BOSS);
  24. ObjEnemy_Regist(objEnemy);
  25.  
  26. let imgExRumia = GetCurrentScriptDirectory ~ "ExRumia.png";
  27. ObjPrim_SetTexture(objEnemy, imgExRumia);
  28. ObjSprite2D_SetSourceRect(objEnemy, 64, 1, 127, 64);
  29. ObjSprite2D_SetDestCenter(objEnemy);
  30.  
  31. let cx = GetStgFrameWidth() / 2;
  32. ObjMove_SetDestAtFrame(objEnemy, cx, 120, 60);
  33.  
  34. PatternX();
  35. PatternY();
  36. Shield();
  37. }
  38.  
  39. @MainLoop{
  40. let ex = ObjMove_GetX(objEnemy);
  41. let ey = ObjMove_GetY(objEnemy);
  42. ObjEnemy_SetIntersectionCircleToShot(objEnemy, ex, ey, 32);
  43. ObjEnemy_SetIntersectionCircleToPlayer(objEnemy, ex, ey, 24);
  44.  
  45. frame++;
  46.  
  47. if(ObjEnemy_GetInfo(objEnemy, INFO_LIFE) <= 0){
  48. Obj_Delete(objEnemy);
  49. CloseScript(GetOwnScriptID());
  50. return;
  51. }
  52. yield;
  53. }
  54.  
  55. function wait(n){
  56. loop(n){yield;}
  57. }
  58.  
  59. task PatternX(){
  60. wait(60);
  61. loop{
  62. let difficult=2;
  63. let Meiling=0;
  64. if(difficult==1){Meiling=2;}
  65. if(difficult==2){Meiling=4;}
  66. if(difficult==3){Meiling=6;}
  67. if(difficult==4){Meiling=9;}
  68.  
  69. let random1=rand(70, 110);
  70. let random2=rand(81, 88);
  71. let random3=rand(80, 100);
  72. let random4=rand(85, 95);
  73. let wallx=0;
  74. while(wallx<=GetStgFrameWidth){
  75. let obj=CreateShotA1(wallx, 0, 2, random1, random2, 15);
  76. ObjMove_AddPatternA2(obj, 60, NO_CHANGE, NO_CHANGE, 0.02, 0, 5);
  77. ObjMove_AddPatternA2(obj, 120, NO_CHANGE, random3, 0.02, 0, 5);
  78. ObjMove_AddPatternA2(obj, 180, NO_CHANGE, random4, 0.02, 0, 5);
  79. wallx+=GetStgFrameWidth/Meiling;
  80. }
  81. wait(10);
  82. }
  83. }
  84.  
  85. task PatternY(){
  86. wait(60);
  87. loop{
  88. let difficult=2;
  89. let Patchy=0;
  90. if(difficult==1){Patchy=60;}
  91. if(difficult==2){Patchy=30;}
  92. if(difficult==3){Patchy=25;}
  93. if(difficult==4){Patchy=20;}
  94.  
  95. let ex = ObjMove_GetX(objEnemy);
  96. let ey = ObjMove_GetY(objEnemy);
  97.  
  98. let random=rand(-30, +30);
  99. let angle=0+random;
  100. while(angle<=360+random){
  101. CreateShotA1(ex, ey, 2, angle, rand(9, 16), 15);
  102. angle+=60
  103. }
  104. wait(Patchy);
  105. }
  106. }
  107.  
  108. task Shield(){
  109. ObjEnemy_SetDamageRate(objEnemy, 0, 0);
  110. wait(60);
  111. ObjEnemy_SetDamageRate(objEnemy, 100, 100);
  112. }
Advertisement
Add Comment
Please, Sign In to add comment