Lunarethic

Untitled

Oct 24th, 2013
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.52 KB | None | 0 0
  1. #TouhouDanmakufu
  2. #Title[FrostBite "Glass Reflection"]
  3. #Text[Cirno's Spell Card]
  4. #BGM[script\cirno\Pokemon X and Y Gym.mp3]
  5. #PlayLevel[Lunatic]
  6. #Player[FREE]
  7. #ScriptVersion[2]
  8.  
  9. script_enemy_main {
  10.  
  11. let CSD = GetCurrentScriptDirectory;
  12.  
  13. let boss = CSD ~ "anm.png";
  14. let cut = CSD ~ "cirnocutin.png";
  15. let bg = CSD ~ "ice.png";
  16. let lay = CSD ~ "snow.png";
  17. let slide = 0;
  18. let sfx1 = CSD ~ "sfx/ShotA.wav";
  19. let sfx2 = CSD ~ "sfx/ShotB.wav";
  20. let concenfx = CSD ~ "sfx/Concen.wav";
  21. let spell = CSD ~ "sfx/Spell.wav";
  22.  
  23. let f = 0;
  24. let f2 = 0;
  25.  
  26. @Initialize {
  27. SetMovePosition01(GetCenterX, GetClipMinY + 120, 5);
  28. wait(60);
  29. LoadSE(spell);
  30. PlaySE(spell);
  31. SetLife(2000);
  32. SetTimer(90);
  33. SetScore(48000000);
  34. SetShotAutoDeleteClip(64,64,64,64);
  35. LoadGraphic(boss);
  36. LoadGraphic(cut);
  37. LoadGraphic(bg);
  38. LoadGraphic(lay);
  39. LoadSE(sfx1);
  40.  
  41.  
  42. CutIn(YOUMU, "FrostBite"\""Glass Reflection"\",cut,0,0,566,775);
  43.  
  44. mainTask;
  45.  
  46. }
  47.  
  48. @MainLoop {
  49. SetCollisionA(GetX,GetY,24);
  50. SetCollisionB(GetX,GetY,16);
  51. yield;
  52. }
  53.  
  54. @DrawLoop {
  55.  
  56. SetTexture(boss);
  57. SetRenderState(ALPHA);
  58. SetAlpha(255);
  59. SetGraphicScale(1,1);
  60. SetGraphicAngle(0,0,0);
  61.  
  62. if(int(GetSpeedX())==0){
  63. if(f<10){ SetGraphicRect(0,0,64,64); }
  64. if(f>=10 && f<20){ SetGraphicRect(64,0,128,64); }
  65. if(f>=20 && f<30){ SetGraphicRect(128,0,192,64); }
  66. if(f>=30 && f<40){ SetGraphicRect(192,0,256,64); }
  67. f2=0;
  68. }
  69.  
  70. if(GetSpeedX()>0){
  71. if(f2<5){ SetGraphicRect(0,64,64,128); }
  72. if(f2>=5 && f2<10){ SetGraphicRect(64,64,128,128); }
  73. if(f2>=10 && f2<15){ SetGraphicRect(128,64,192,128); }
  74. if(f2>=15){ SetGraphicRect(192,64,256,128); }
  75. f2++;
  76. }
  77.  
  78. if(GetSpeedX()<0){
  79. SetGraphicAngle(180,0,0);
  80. if(f2<5){ SetGraphicRect(0,64,64,128); }
  81. if(f2>=5 && f2<10){ SetGraphicRect(64,64,128,128); }
  82. if(f2>=10 && f2<15){ SetGraphicRect(128,64,192,128); }
  83. if(f2>=15){ SetGraphicRect(192,64,256,128); }
  84. f2++;
  85. }
  86.  
  87. DrawGraphic(GetX,GetY);
  88.  
  89. f++;
  90. if(f==40){f=0;}
  91.  
  92. }
  93.  
  94. @BackGround {
  95.  
  96. SetTexture(bg);
  97. SetRenderState(ALPHA);
  98. SetAlpha(255);
  99. SetGraphicRect(0,0,1600,1118);
  100. SetGraphicScale(1,1);
  101. SetGraphicAngle(0,0,0);
  102. DrawGraphic(GetCenterX,GetCenterY);
  103.  
  104. SetTexture(lay);
  105. SetRenderState(ADD);
  106. SetGraphicRect(0,0,20000,20000);
  107. SetGraphicScale(1,1);
  108. SetGraphicAngle(0,0,0);
  109. DrawGraphic(GetCenterX+slide,GetCenterY+slide);
  110.  
  111. slide+=2;
  112.  
  113. }
  114.  
  115. @Finalize {
  116. DeleteGraphic(boss);
  117. DeleteGraphic(bg);
  118. DeleteGraphic(cut);
  119. DeleteSE(spell);
  120.  
  121. }
  122.  
  123.  
  124. task mainTask{
  125. wait(60);
  126. yield;
  127. circle;
  128. move;
  129. concen;
  130. barrage;
  131. }
  132.  
  133. task concen{
  134. PlaySE(concenfx);
  135. Concentration01(60);
  136. Concentration02(60);
  137. }
  138.  
  139. task move{
  140. loop{
  141. wait(120);
  142. SetMovePositionRandom01(80,80,20,100,150,350,200);
  143. wait(60);
  144.  
  145. yield;
  146. }
  147. }
  148.  
  149. task circle{
  150. let x = 0;
  151. let dir = 0;
  152. wait(120);
  153. loop(5){
  154. PlaySE(sfx1);
  155. while(x<36){
  156. CreateShotA(1,GetEnemyX,GetEnemyY,1);
  157. SetShotDataA(1,0,1,dir,2,-0.5,8,AQUA02);
  158. FireShot(1);
  159.  
  160. dir+=360/36;
  161. x++;
  162. }
  163. x = 0;
  164. dir = 0;
  165. wait(5);
  166.  
  167. yield;
  168.  
  169.  
  170. }
  171. }
  172.  
  173. task barrage{
  174. let x = 0;
  175. let dir = 0;
  176. wait(300);
  177. loop(5){
  178. PlaySE(sfx2);
  179. while(x<36){
  180. CreateShotA(1,GetEnemyX,GetEnemyY,1);
  181. SetShotDataA(1,0,1,dir,0,-0.5,8,BLUE31);
  182. FireShot(1);
  183.  
  184. dir+=360/36;
  185. x++;
  186. }
  187. x = 0;
  188. dir = 0;
  189. wait(5);
  190. yield;
  191.  
  192. }
  193. }
  194.  
  195. //Wait Function
  196. function wait(w){
  197. loop(w) {yield;}
  198. }
  199.  
  200.  
  201.  
  202. }
Advertisement
Add Comment
Please, Sign In to add comment