Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.87 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.  
  15. let f = 0;
  16. let f2 = 0;
  17.  
  18. function wait(t){loop(t){yield;}}
  19.  
  20.  
  21. @Initialize {
  22. SetLife(5000);
  23. SetEnemyMarker(true);
  24. MagicCircle(true);
  25. SetTimer(60);
  26. LoadGraphic(imgBoss);
  27. LoadGraphic(cut);
  28. LoadGraphic(bg);
  29. SetMovePosition01(GetX, GetY, 5);
  30.  
  31. CutIn(YOUMU, "Omniscience Sign - Kami's All-Seeing Eye", cut, 0, 0, 256, 512);
  32.  
  33. mainTask;
  34.  
  35. }
  36.  
  37. @MainLoop {
  38. SetCollisionA(GetX, GetY, 32);
  39. SetCollisionB(GetX, GetY, 24);
  40. yield;
  41.  
  42. }
  43.  
  44. @DrawLoop {SetTexture(imgBoss);
  45. SetRenderState(ALPHA);
  46. SetAlpha(255);
  47. SetGraphicScale(1,1);
  48. SetGraphicAngle(0,0,0);
  49.  
  50.  
  51. if(int(GetSpeedX())==0){
  52. if(f<10){ SetGraphicRect(0,0,65,80); }
  53. if(f>=10 && f<20){ SetGraphicRect(65,0,130,80); }
  54. if(f>=20 && f<30){ SetGraphicRect(130,0,195,80); }
  55. if(f>=30 && f<40){ SetGraphicRect(195,0,260,80); }
  56. f2=0;
  57. }
  58.  
  59. if(GetSpeedX()>0){
  60. if(f2<5){ SetGraphicRect(0,80,65,130); }
  61. if(f2>=5 && f2<10){ SetGraphicRect(65,80,130,130); }
  62. if(f2>=10 && f2<15){ SetGraphicRect(130,80,195,130); }
  63. if(f2>=15){ SetGraphicRect(195,80,260,130); }
  64. f2++;
  65. }
  66.  
  67. if(GetSpeedX()<0){
  68. SetGraphicAngle(180,0,0);
  69. if(f2<5){ SetGraphicRect(0,80,65,130); }
  70. if(f2>=5 && f2<10){ SetGraphicRect(65,80,130,130); }
  71. if(f2>=10 && f2<15){ SetGraphicRect(130,80,195,130); }
  72. if(f2>=15){ SetGraphicRect(195,80,260,130); }
  73. f2++;
  74.  
  75. }
  76.  
  77. DrawGraphic(GetX,GetY);
  78.  
  79. f++;
  80. if(f==40){f=0;}
  81.  
  82. }
  83.  
  84. @Finalize {
  85. DeleteGraphic(imgBoss);
  86. DeleteGraphic(cut);
  87. DeleteGraphic(bg);
  88.  
  89. }
  90.  
  91. task mainTask{
  92. wait(10);
  93. Fire;
  94. yield;
  95.  
  96. }
  97.  
  98. task Fire{
  99.  
  100.  
  101. loop{
  102.  
  103.  
  104. CreateShotA(1, GetX, GetY, 0);
  105. SetShotDataA(1, 0, 6, 45, 1, 0, 0.2, AQUA03);
  106. ascent(i in 1..40){
  107. CreateShotA(3, 0, 0, 0);
  108. SetShotDataA_XY(3, 0, rand(2, 4), rand(4, -4), 0, 0, 0, 4, BLUE31);
  109. AddShot(i*3, 1, 3, 0);
  110.  
  111. }
  112.  
  113. CreateShotA(6, GetX, GetY, 120);
  114. SetShotDataA(6, 0, 6, 25, 1, 0, 0.2, RED03);
  115.  
  116. CreateShotA(7, GetX, GetY, 120);
  117. SetShotDataA(7, 0, 6, 155, -1, 0, -0.2, RED03);
  118.  
  119. CreateShotA(2, GetX, GetY, 0);
  120. SetShotDataA(2, 0, 6, 135, -1, 0, 0.2, AQUA03);
  121. ascent(i in 1..40){
  122. CreateShotA(4, 0, 0, 0);
  123. SetShotDataA_XY(4, 0, rand(-2, -4), rand(4, -4), 0, 0, 0, 4, BLUE31);
  124. AddShot(i*3, 2, 4, 0);
  125. }
  126.  
  127. ascent(i in 1..5){
  128. CreateShot11(0, rand(0, 600), rand(0, 1.5), 0, PURPLE31, 120);
  129. CreateShot11(450, rand(0, 600), rand(-1.5, 0), 0, PURPLE31, 120);
  130.  
  131.  
  132. }
  133.  
  134.  
  135.  
  136. FireShot(1);
  137. FireShot(2);
  138. FireShot(6);
  139. FireShot(7);
  140. wait(8);
  141.  
  142. yield;
  143. }
  144. loop{yield;}
  145. }
  146. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement