Advertisement
Guest User

h

a guest
Apr 2nd, 2013
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.06 KB | None | 0 0
  1. TouhouDanmakufu
  2. #Title[Filled Bullet Tester 11]
  3. #Text[Herp Derp]
  4. #Player[FREE]
  5. #ScriptVersion[2]
  6. #BackGround[User(.\system\rainbowbg.png,1,1)]
  7.  
  8. script_enemy_main{
  9.  
  10. let CSD = GetCurrentScriptDirectory;
  11. let bg1 = CSD ~ "system\Ayabg.png";
  12. let imgBoss = CSD ~ "system\okuu_main.png";
  13. let cut = CSD ~ "system\okuucutin.png";
  14. #include_function ".\system\function_cutin.txt";
  15.  
  16. let f = 0;
  17. let f2 = 0;
  18. let r = 50;
  19. let dir = 0;
  20. let angle = 0;
  21. let angle2 = 0;
  22. let count = 0;
  23. let count2 = 0;
  24. let count3 = 0;
  25. let r = 50;
  26. let r2 = 35;
  27. let slide = 0;
  28.  
  29. @Initialize{
  30. SetLife(10000);
  31. SetScore(300000);
  32. SetTimer(450);
  33. SetMovePosition03(GetCenterX,GetCenterY-120,20,3);
  34. LoadGraphic(imgBoss);
  35. LoadGraphic(bg1);
  36. LoadGraphic(cut);
  37. LoadUserShotData(GetCurrentScriptDirectory ~ "system\ShotSheet1.txt");
  38. cutin("NAZRIN","sumfin",cut,0,0,397,696);
  39. }
  40.  
  41. @MainLoop{
  42. SetCollisionA(GetX,GetY,32);
  43. SetCollisionB(GetX,GetY,32);
  44.  
  45. ExtendPlayer(3);
  46.  
  47. count++;
  48. count2++;
  49. count3++;
  50. angle2--;
  51. angle++;
  52.  
  53. if(count == 60){
  54. loop(8){
  55. CreateShotA(3,GetEnemyX+r*cos(angle),GetEnemyY+r*sin(angle2),10);
  56. SetShotDataA(3,0,3,angle*2,0,0,0,85);
  57. SetShotDataA(3,5,3,angle*2,0,0,0,86);
  58. SetShotDataA(3,10,3,angle*2,0,0,0,87);
  59. SetShotDataA(3,15,3,angle*2,0,0,0,88);
  60. SetShotDataA(3,20,3,angle*2,0,0,0,89);
  61. SetShotDataA(3,25,3,angle*2,0,0,0,90);
  62. SetShotDataA(3,30,3,angle*2,0,0,0,91);
  63. SetShotDataA(3,35,3,angle*2,0,0,0,92);
  64. SetShotDataA(3,40,3,angle*2,0,0,0,93);
  65. SetShotDataA(3,45,3,angle*2,0,0.2,1,94);
  66. SetShotDataA(3,55,1,angle*2,0,0,0,93);
  67. SetShotDataA(3,65,1,angle*2,0,0,0,92);
  68. SetShotDataA(3,75,1,angle*2,0,0,0,91);
  69. SetShotDataA(3,85,1,angle*2,0,0,0,90);
  70. SetShotDataA(3,95,1,angle*2,0,0,0,89);
  71. SetShotDataA(3,105,1,angle*2,0,0,0,88);
  72. SetShotDataA(3,115,1,angle*2,0,0,0,87);
  73. SetShotDataA(3,125,1,angle*2,0,0,0,86);
  74. SetShotDataA(3,135,1,angle*2,0,0,0,85);
  75. SetShotDataA(3,145,1,angle*2,0,0,0,86);
  76. SetShotDataA(3,155,1,angle*2,0,0,0,87);
  77. SetShotDataA(3,165,1,angle*2,0,0,0,88);
  78. SetShotDataA(3,175,1,angle*2,0,0,0,89);
  79. SetShotDataA(3,185,1,angle*2,0,0,0,90);
  80. SetShotDataA(3,195,1,angle*2,0,0,0,91);
  81. SetShotDataA(3,205,1,angle*2,0,0,0,92);
  82. SetShotDataA(3,215,1,angle*2,0,0,0,93);
  83. SetShotDataA(3,225,1,angle*2,0,0,0,94);
  84.  
  85. FireShot(3);
  86. PlaySE(CSD~"sound\shot1.wav");
  87. angle2 += 360/8;
  88. angle -= 360*4;
  89. }
  90. count = 57;
  91. }
  92.  
  93. if(count2 == 600){
  94. CreateShotA(4,GetEnemyX+r2*cos(angle),GetEnemyY+r2*sin(angle),10);
  95. SetShotDataA(4,0,4,angle*7,0,0,0,12);
  96. CreateShotA(5,GetEnemyX+r2*cos(angle2),GetEnemyY+r2*sin(angle2),10);
  97. SetShotDataA(5,0,4,angle2*7,0,0,0,11);
  98. FireShot(5);
  99. FireShot(4);
  100. count2 = 598;
  101. }
  102.  
  103. if(count3 == 300){
  104. SetMovePosition03(rand_int(GetClipMinX+20,GetClipMaxX-20),rand_int(GetClipMinY+20,GetClipMinY+100),20,3);
  105. count3 = 0;
  106. }
  107.  
  108. }
  109.  
  110. @DrawLoop{
  111.  
  112. //data for the boss
  113. SetTexture(imgBoss);
  114. SetRenderState(ALPHA);
  115. SetAlpha(255);
  116.  
  117. if(int(GetSpeedX())==0){
  118. if(f<10){ SetGraphicRect(0,0,128,128); }
  119. if(f>=10 && f<20) { SetGraphicRect(128,0,256,128); }
  120. if(f>=20 && f<30) { SetGraphicRect(0,256,128,384); }
  121. f2=0;
  122. }
  123.  
  124. if(GetSpeedX()>0){
  125. if(f2<5){ SetGraphicRect(256,256,384,384); }
  126. if(f2>=5 && f2<10) { SetGraphicRect(256,384,384,512); }
  127. f2++;
  128.  
  129. }
  130.  
  131. if(GetSpeedX()<0){
  132. if(f2<5){ SetGraphicRect(256,0,384,128); }
  133. if(f2>=5 && f2<10) { SetGraphicRect(256,128,384,256); }
  134. f2++;
  135. }
  136.  
  137. SetGraphicScale(1,1);
  138. SetGraphicAngle(0,0,0);
  139. DrawGraphic(GetX,GetY);
  140.  
  141. f++;
  142. if(f==40) {f=0;}
  143. }
  144.  
  145. @BackGround{
  146.  
  147. SetTexture(bg1);
  148. SetGraphicRect(0,0,384,448);
  149. SetGraphicScale(1,1);
  150. SetGraphicAngle(0,0,0);
  151. DrawGraphic(GetCenterX,GetCenterY);
  152.  
  153. }
  154.  
  155. @Finalize{
  156.  
  157. // delete the image from memory
  158. DeleteGraphic(imgBoss);
  159. DeleteGraphic(bg1);
  160. DeleteGraphic(cut);
  161.  
  162. }
  163.  
  164. //wait function
  165. function wait(w){loop(w){yield;}
  166. }
  167. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement