Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.85 KB | None | 0 0
  1. #TouhouDanmakufu
  2. #Title[123]
  3. #Text[1]
  4. #Player[FREE]
  5. #ScriptVersion[2]
  6.  
  7. script_enemy_main{
  8.  
  9. let csd = GetCurrentScriptDirectory;
  10.  
  11. let imgBoss = csd ~ "stuff\OkuuBoss.png";
  12. let cut = csd ~ "stuff\Okuucut.png";
  13. let bg = csd ~ "stuff\Okuu.png";
  14.  
  15. let f = 0;
  16. let f2 = 0;
  17.  
  18.  
  19.  
  20. let ShotImage = csd~"\supershot\supershot.txt";
  21.  
  22.  
  23.  
  24. @Initialize{
  25. LoadUserShotData(ShotImage);
  26. SetTimer(90);
  27. SetScore(100000);
  28.  
  29. SetLife(5000);
  30. SetMovePosition01(GetCenterX,GetCenterY-120,5);
  31.  
  32.  
  33.  
  34.  
  35. LoadGraphic(imgBoss);
  36. LoadGraphic(cut);
  37. LoadGraphic(bg);
  38.  
  39. CutIn(YOUMU,"Blast Fusion - Lazer Scapole - ",cut,0,0,425,512,);
  40.  
  41.  
  42.  
  43.  
  44.  
  45. mainTask;
  46.  
  47. }
  48. @MainLoop{
  49.  
  50. SetCollisionA(GetX,GetY,32);
  51. SetCollisionB(GetX,GetY,16);
  52.  
  53. yield;
  54.  
  55.  
  56.  
  57. }
  58. @DrawLoop{
  59.  
  60. SetTexture(imgBoss);
  61. SetRenderState(ALPHA);
  62. SetAlpha(255);
  63. SetGraphicScale(1,1);
  64. SetGraphicAngle(0,0,0);
  65.  
  66.  
  67.  
  68. if(int(GetSpeedX())==0){
  69. if(f<10){ SetGraphicRect(0,0,96,96); }
  70. if(f>=10 && f<20){ SetGraphicRect(96,0,192,96);}
  71. if(f>=20 && f<30){ SetGraphicRect(192,0,288,96);}
  72. if(f>=30 && f<40){ SetGraphicRect(288,0,384,96);}
  73.  
  74. }
  75.  
  76. if(GetSpeedX()>0){
  77.  
  78. }
  79.  
  80. if(GetSpeedX()<0){
  81.  
  82. }
  83.  
  84. DrawGraphic(GetX,GetY);
  85.  
  86. f++;
  87. if(f==40){f=0;}
  88.  
  89.  
  90.  
  91.  
  92.  
  93. }
  94. @BackGround{
  95. SetTexture(bg);
  96. SetRenderState(ALPHA);
  97. SetAlpha(255);
  98. SetGraphicRect(0,0,512,512);
  99. SetGraphicScale(1,1);
  100. SetGraphicAngle(0, 0, z); z++;
  101. DrawGraphic(GetCenterX,GetCenterY);
  102.  
  103.  
  104. }
  105. @Finalize{
  106. DeleteGraphic(imgBoss);
  107. DeleteGraphic(cut);
  108. DeleteGraphic(bg);
  109.  
  110. }
  111.  
  112.  
  113. task mainTask{
  114. yield;
  115. wait(200);
  116.  
  117. movement;
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126. }
  127.  
  128.  
  129. task movement{
  130. loop{
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141. wait(3);
  142. SetMovePosition01(GetCenterX,121,0.1);
  143. wait(3);
  144. SetMovePosition01(GetCenterX,123,0.1);
  145. wait(3);
  146. SetMovePosition01(GetCenterX,125,0.1);
  147. wait(3);
  148. SetMovePosition01(GetCenterX,127,0.1);
  149. wait(3);
  150. SetMovePosition01(GetCenterX,129,0.1);
  151. wait(3);
  152. SetMovePosition01(GetCenterX,131,0.1);
  153. wait(10);
  154. SetMovePosition01(GetCenterX,131,0.1);
  155. wait(3);
  156. SetMovePosition01(GetCenterX,129,0.1);
  157. wait(3);
  158. SetMovePosition01(GetCenterX,127,0.1);
  159. wait(3);
  160. SetMovePosition01(GetCenterX,125,0.1);
  161. wait(3);
  162. SetMovePosition01(GetCenterX,123,0.1);
  163. wait(3);
  164. SetMovePosition01(GetCenterX,121,0.1);
  165. wait(10);
  166. yield;
  167. }
  168.  
  169.  
  170.  
  171. task bullet{
  172.  
  173.  
  174. loop{
  175.  
  176.  
  177. wait(5);
  178. fire2;
  179. fire;
  180. loop(10){fire;}
  181. wait(60);
  182.  
  183.  
  184.  
  185. yield;
  186.  
  187.  
  188. }
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198. }
  199. }
  200.  
  201.  
  202. task fire2{
  203.  
  204.  
  205.  
  206.  
  207.  
  208. CreateLaser01(GetEnemyX,GetEnemyY,5,rand(0,180),300,10,7,0);
  209. CreateLaser01(GetEnemyX,GetEnemyY,5,rand(0,180),300,10,7,0);
  210. CreateLaser01(GetEnemyX,GetEnemyY,5,rand(0,180),300,10,7,0);
  211. CreateLaser01(GetEnemyX,GetEnemyY,5,rand(0,180),300,10,7,0);
  212. CreateLaser01(GetEnemyX,GetEnemyY,5,rand(0,180),300,10,7,0);
  213. CreateLaser01(GetEnemyX,GetEnemyY,5,rand(0,180),300,10,7,0);
  214. CreateLaser01(GetEnemyX,GetEnemyY,5,rand(0,180),300,10,7,0);
  215. CreateLaser01(GetEnemyX,GetEnemyY,5,rand(0,180),300,10,7,0);
  216. CreateLaser01(GetEnemyX,GetEnemyY,5,rand(0,180),300,10,7,0);
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224. wait(1);
  225.  
  226. yield;
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235. }
  236. task fire{
  237.  
  238. let x= 0;
  239. let dir = 0;
  240.  
  241.  
  242.  
  243.  
  244. loop{
  245.  
  246.  
  247.  
  248.  
  249. while(x<10){
  250.  
  251.  
  252.  
  253.  
  254.  
  255. CreateShotA(1,GetEnemyX,GetEnemyY,0);
  256. SetShotDataA(1,0,5,dir,0,0,0,5);
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263. FireShot(1);
  264.  
  265. dir+=360/10;
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272. x++;
  273.  
  274. }
  275. x = 0;
  276. wait(10);
  277. yield;
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328. }
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335. }
  336.  
  337.  
  338.  
  339. function wait(w){
  340. loop(w){yield;}
  341. }
  342.  
  343.  
  344. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement