Guest User

Untitled

a guest
Jul 3rd, 2011
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.65 KB | None | 0 0
  1. #TouhouDanmakufu
  2. #Title[Omniscience Sign - Kami's All-Seeing Eye ]
  3. #Text[lol i dunno]
  4. #Player[FREE]
  5. #ScriptVersion[2]
  6.  
  7. script_enemy_main {
  8.  
  9. let CSD = GetCurrentScriptDirectory;
  10.  
  11. let imgBoss = CSD ~ "system\keinesprites.png";
  12. let cut = CSD ~ "system\keinecut.png";
  13. let bg = CSD ~ "system\summer.png";
  14. let eye = CSD ~ "system\eye.png";
  15.  
  16. let f = 0;
  17. let f2 = 0;
  18.  
  19. function wait(t){loop(t){yield;}}
  20.  
  21.  
  22. @Initialize {
  23. SetLife(4000);
  24. SetEnemyMarker(true);
  25. MagicCircle(true);
  26. SetTimer(60);
  27. LoadGraphic(imgBoss);
  28. LoadGraphic(cut);
  29. LoadGraphic(bg);
  30. LoadGraphic(eye);
  31. SetMovePosition01(GetX, GetY, 5);
  32. LoadUserShotData(CSD~"supershot.txt");
  33. PlayMusic(CSD~"bgm.mp3");
  34.  
  35. CutIn(YOUMU, "Omniscience Sign - Kami's All-Seeing Eye", cut, 0, 0, 256, 512);
  36.  
  37. mainTask;
  38.  
  39. }
  40.  
  41. @MainLoop {
  42. SetCollisionA(GetX, GetY, 32);
  43. SetCollisionB(GetX, GetY, 24);
  44. yield;
  45.  
  46. }
  47.  
  48. @DrawLoop {SetTexture(imgBoss);
  49. SetRenderState(ALPHA);
  50. SetAlpha(255);
  51. SetGraphicScale(1,1);
  52. SetGraphicAngle(0,0,0);
  53.  
  54.  
  55. if(int(GetSpeedX())==0){
  56. if(f<10){ SetGraphicRect(0,0,65,80); }
  57. if(f>=10 && f<20){ SetGraphicRect(65,0,130,80); }
  58. if(f>=20 && f<30){ SetGraphicRect(130,0,195,80); }
  59. if(f>=30 && f<40){ SetGraphicRect(195,0,260,80); }
  60. f2=0;
  61. }
  62.  
  63. if(GetSpeedX()>0){
  64. if(f2<5){ SetGraphicRect(0,80,65,130); }
  65. if(f2>=5 && f2<10){ SetGraphicRect(65,80,130,130); }
  66. if(f2>=10 && f2<15){ SetGraphicRect(130,80,195,130); }
  67. if(f2>=15){ SetGraphicRect(195,80,260,130); }
  68. f2++;
  69. }
  70.  
  71. if(GetSpeedX()<0){
  72. SetGraphicAngle(180,0,0);
  73. if(f2<5){ SetGraphicRect(0,80,65,130); }
  74. if(f2>=5 && f2<10){ SetGraphicRect(65,80,130,130); }
  75. if(f2>=10 && f2<15){ SetGraphicRect(130,80,195,130); }
  76. if(f2>=15){ SetGraphicRect(195,80,260,130); }
  77. f2++;
  78.  
  79. }
  80.  
  81. DrawGraphic(GetX,GetY);
  82.  
  83. f++;
  84. if(f==40){f=0;}
  85.  
  86. }
  87.  
  88. @Finalize {
  89. DeleteGraphic(imgBoss);
  90. DeleteGraphic(cut);
  91. DeleteGraphic(bg);
  92. PlaySE(CSD~"sound\se_cardget.wav");
  93.  
  94. }
  95.  
  96. task mainTask{
  97.  
  98. wait(10);
  99. Fire1;
  100. yield;
  101. Fire2;
  102. yield;
  103. EYE;
  104. yield;
  105.  
  106. }
  107.  
  108. task EYE{
  109.  
  110. let counter = 0;
  111.  
  112. let obj = Obj_Create(OBJ_EFFECT);
  113.  
  114. while(counter<=120){
  115.  
  116. ObjEffect_SetRenderState(obj,ALPHA);
  117. ObjEffect_SetTexture(obj,eye);
  118.  
  119. Obj_SetPosition(obj,GetCenterX,GetCenterY);
  120. ObjEffect_SetScale(obj,1,1);
  121. ObjEffect_SetLayer(obj,1);
  122.  
  123. ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLESTRIP);
  124. ObjEffect_CreateVertex(obj,4);
  125.  
  126. ObjEffect_SetVertexXY(obj, 0, -28, -36);
  127. ObjEffect_SetVertexXY(obj, 1, 28, -36);
  128. ObjEffect_SetVertexXY(obj, 2, -28, 36);
  129. ObjEffect_SetVertexXY(obj, 3, 28, 36);
  130.  
  131. ObjEffect_SetVertexUV(obj, 0, 13, 4);
  132. ObjEffect_SetVertexUV(obj, 1, 69, 4);
  133. ObjEffect_SetVertexUV(obj, 2, 13, 77);
  134. ObjEffect_SetVertexUV(obj, 3, 69, 77);
  135.  
  136. while(!Obj_BeDeleted(obj)) {
  137.  
  138. if(counter==120){ Obj_Delete(obj); }
  139. counter++;
  140. yield;
  141.  
  142. }
  143. }
  144.  
  145. while(counter>=120){
  146.  
  147. ObjEffect_SetRenderState(obj,ALPHA);
  148. ObjEffect_SetTexture(obj,eye);
  149.  
  150. Obj_SetPosition(obj,GetCenterX,GetCenterY);
  151. ObjEffect_SetScale(obj,1,1);
  152. ObjEffect_SetLayer(obj,1);
  153.  
  154. ObjEffect_SetPrimitiveType(obj, PRIMITIVE_TRIANGLESTRIP);
  155. ObjEffect_CreateVertex(obj,4);
  156.  
  157. ObjEffect_SetVertexXY(obj, 0, -28, -36);
  158. ObjEffect_SetVertexXY(obj, 1, 28, -36);
  159. ObjEffect_SetVertexXY(obj, 2, -28, 36);
  160. ObjEffect_SetVertexXY(obj, 3, 28, 36);
  161.  
  162. ObjEffect_SetVertexUV(obj, 0, 13, 85);
  163. ObjEffect_SetVertexUV(obj, 1, 69, 85);
  164. ObjEffect_SetVertexUV(obj, 2, 13, 159);
  165. ObjEffect_SetVertexUV(obj, 3, 69, 159);
  166.  
  167. yield;
  168.  
  169.  
  170.  
  171. }
  172. }
  173.  
  174.  
  175.  
  176. task Fire1{
  177.  
  178.  
  179. loop{
  180.  
  181. PlaySE(CSD~"sound\Shot1.wav");
  182. CreateShotA(1, GetX, GetY, 0);
  183. SetShotDataA(1, 0, 6, 45, 1, 0, 0.2, 230);
  184. ascent(i in 1..50){
  185. CreateShotA(3, 0, 0, 0);
  186. SetShotDataA_XY(3, 0, rand(2, 4), rand(4, -4), 0, 0, 0, 4, 67);
  187. AddShot(i*3, 1, 3, 0);
  188.  
  189. }
  190.  
  191. CreateShotA(6, GetX, GetY, 4);
  192. SetShotDataA(6, 0, 6, 135, -1, 0, 0.2, 204);
  193.  
  194. CreateShotA(7, GetX, GetY, 4);
  195. SetShotDataA(7, 0, 6, 45, 1, 0, 0.2, 204);
  196.  
  197. CreateShotA(2, GetX, GetY, 0);
  198. SetShotDataA(2, 0, 6, 135, -1, 0, 0.2, 230);
  199. ascent(i in 1..50){
  200. CreateShotA(4, 0, 0, 0);
  201. SetShotDataA_XY(4, 0, rand(-2, -4), rand(4, -4), 0, 0, 0, 4, 67);
  202. AddShot(i*3, 2, 4, 0);
  203. }
  204.  
  205.  
  206.  
  207.  
  208.  
  209. FireShot(1);
  210. FireShot(2);
  211. FireShot(6);
  212. FireShot(7);
  213. wait(8);
  214.  
  215. yield;
  216. }
  217. loop{yield;}
  218. }
  219.  
  220.  
  221. task Fire2{
  222.  
  223. loop{
  224. PlaySE(CSD~"sound\BulletWave.wav");
  225. ascent(i in 1..7){
  226. CreateShot11(0, rand(0, 600), rand(0, 1.5), 0, 64, 120);
  227. CreateShot11(450, rand(0, 600), rand(-1.5, 0), 0, 64, 120);
  228.  
  229.  
  230. wait(2.8);
  231.  
  232. yield;
  233. }
  234.  
  235.  
  236. }
  237. loop{yield;}
  238.  
  239. }
  240. }
Advertisement
Add Comment
Please, Sign In to add comment