Mewkyuu

Untitled

Jul 31st, 2011
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.36 KB | None | 0 0
  1. #TouhouDanmakufu
  2. #Title[Kaguya non-spell 3]
  3. #Text[Not everyone can see...]
  4. #Player[FREE]
  5. #ScriptVersion[2]
  6. #BGM[bgm\Kaguya.mp3]
  7.  
  8. script_enemy_main{
  9.  
  10. let CSD = GetCurrentScriptDirectory;
  11.  
  12. CreateEnemyFromScript("Familiar2", GetCenterX, GetCenterY-250, 0, 0, NULL);
  13. CreateEnemyFromScript("Familiar3", GetCenterX, GetCenterY-250, 0, 0, NULL);
  14. CreateEnemyFromScript("Familiar4", GetCenterX, GetCenterY-250, 0, 0, NULL);
  15. let imgBoss = CSD ~ "system\boss_Kaguya.png";
  16. let cut = CSD ~ "system\Roguscut.png";
  17. let bg = CSD ~ "system\Purple.png";
  18. let lay = CSD ~ "system\Planet2.png";
  19.  
  20. let frame = 0;
  21. let frame2 = 0;
  22. let angle = 0;
  23. let angleAcc = 0;
  24. let radius = -50;
  25. let ang=0;
  26. let g_angle=0;
  27. let length=0;
  28. let count=80;
  29. let flg=0;
  30.  
  31. #include_function ".\system\lib_anime_Kaguya.txt"
  32.  
  33. let slide = 0;
  34.  
  35. @Initialize{
  36. SetLife(3500);
  37. SetTimer(100);
  38. SetScore(10000000);
  39. SetMovePosition01(GetCenterX-110,GetCenterY-110,5);
  40. LoadGraphic(imgBoss);
  41. LoadGraphic(cut);
  42. LoadGraphic(bg);
  43. LoadGraphic(lay);
  44. InitializeAction();
  45. }
  46.  
  47. @MainLoop{
  48. SetCollisionA(GetX,GetY,32);
  49. SetCollisionB(GetX,GetY,16);
  50. yield;
  51. }
  52.  
  53.  
  54. @DrawLoop{
  55. DrawBoss(imgBoss);
  56. }
  57.  
  58. @BackGround{
  59. SetTexture(bg);
  60. SetRenderState(ALPHA);
  61. SetAlpha(225);
  62. SetGraphicRect(0,0,512,512);
  63. SetGraphicScale(1,1);
  64. SetGraphicAngle(0,0,0);
  65. DrawGraphic(GetCenterX,GetCenterY);
  66.  
  67. SetTexture(lay);
  68. SetRenderState(ADD);
  69. SetGraphicRect(0,0,80000,80000);
  70. SetGraphicScale(1,1);
  71. SetGraphicAngle(0,0,0);
  72. DrawGraphic(GetCenterX+slide,GetCenterY+slide);
  73.  
  74. slide+=2;
  75.  
  76. }
  77.  
  78. @Finalize{
  79. // delete the image from memory
  80. DeleteGraphic(imgBoss);
  81. DeleteGraphic(cut);
  82. DeleteGraphic(bg);
  83.  
  84. }
  85.  
  86. task mainTask{
  87. wait(120);
  88. yield;
  89. }
  90.  
  91. task movement{
  92. loop{
  93. SetMovePosition01(GetCenterX-80,80,3);
  94. SetAction(ACT_MOVE,60);
  95. wait(90);
  96. SetMovePosition01(GetCenterX+80,80,3);
  97. SetAction(ACT_MOVE,60);
  98. wait(90);
  99. SetMovePosition01(GetCenterX,GetCenterY,3);
  100. SetAction(ACT_MOVE,60);
  101. wait(90);
  102. SetMovePosition01(GetCenterX-100,120,3);
  103. SetAction(ACT_MOVE,60);
  104. wait(90);
  105. SetMovePosition01(GetCenterX+100,120,3);
  106. SetAction(ACT_MOVE,60);
  107. wait(90);
  108. yield;
  109. }
  110. }
  111.  
  112. // wait function
  113. function wait(w){
  114. loop(w){yield;}
  115. }
  116.  
  117.  
  118.  
  119.  
  120. }
  121.  
  122. -----------------------------------------------------------------------------------------------------------------
  123.  
  124. script_enemy Familiar1
  125. {
  126. let x=GetX();
  127. let y=GetY();
  128. let arg=GetArgument();
  129. let enemyspeed=GetSpeed();
  130. let shotgra=GetAngle();
  131. let minX=GetClipMinX();
  132. let maxX=GetClipMaxX();
  133. let minY=GetClipMinY();
  134. let maxY=GetClipMaxY();
  135. let cenX=GetCenterX();
  136. let cenY=GetCenterY();
  137. let seal=GetCurrentScriptDirectory~".\system\seal.png";
  138.  
  139. let g_angle=0;
  140. let length=0;
  141. let count=80;
  142. let flg=0;
  143.  
  144. @Initialize
  145. {
  146. SetX(x);
  147. SetY(y);
  148.  
  149. LoadGraphic(seal);
  150. SetLife(100);
  151.  
  152. mainTask;
  153. }
  154. @MainLoop
  155. {
  156. yield;
  157. }
  158.  
  159. task mainTask{
  160. wait(120);
  161. fire154;
  162. wait(90);
  163. yield;
  164. }
  165.  
  166. task fire154{
  167. let x = 0;
  168. let dir = 90;
  169.  
  170. while(x<16){
  171. superbulletac(GetX+50*cos(dir),GetY+50*sin(dir),0.6,dir+180,WHITE02,0);
  172. dir+=60;
  173. x++;
  174. }
  175. }
  176.  
  177. task fire155{
  178. let x = 0;
  179. let dir = 90;
  180.  
  181. while(x<16){
  182. superbulletac(GetEnemyX+50*cos(dir),GetEnemyY+50*sin(dir),0.6,dir+180,WHITE02,0);
  183. dir+=60;
  184. x++;
  185. }
  186. }
  187.  
  188. task superbulletac(x,y,v,dir,graphic,delay){
  189.  
  190. let obj = Obj_Create(OBJ_SHOT);
  191.  
  192. Obj_SetPosition(obj,x,y);
  193. Obj_SetSpeed(obj,v);
  194. Obj_SetAngle(obj,dir);
  195. ObjShot_SetGraphic(obj,graphic);
  196. ObjShot_SetDelay(obj,delay);
  197. ObjShot_SetBombResist(obj,true);
  198.  
  199. while(!Obj_BeDeleted(obj)){
  200.  
  201. wait(80);
  202. Obj_SetSpeed(obj,0.5);
  203. Obj_SetAngle(obj,dir+90);
  204. ObjShot_SetGraphic(obj,WHITE02);
  205. loop(10){
  206. CreateLaser01(Obj_GetX(obj),Obj_GetY(obj),3,dir,80,20,RED04,0);
  207. dir+=360/10;
  208. }
  209. loop(10){
  210. CreateShot01(Obj_GetX(obj),Obj_GetY(obj),3,dir+10,RED04,0);
  211. dir+=360/10;
  212. }
  213. wait(30);
  214. loop(5){
  215. CreateShot01(Obj_GetX(obj),Obj_GetY(obj),3,dir+20,BLUE02,0);
  216. dir+=360/5;
  217. }
  218. wait(30);
  219. loop(10){
  220. CreateShot01(Obj_GetX(obj),Obj_GetY(obj),3,dir+30,GREEN05,0);
  221. dir+=360/10;
  222. }
  223. wait(30);
  224. loop(10){
  225. CreateShot01(Obj_GetX(obj),Obj_GetY(obj),3,dir+90,YELLOW01,0);
  226. dir+=360/10;
  227. }
  228. wait(30);
  229. loop(10){
  230. CreateShot01(Obj_GetX(obj),Obj_GetY(obj),3,dir+90,BLUE02,0);
  231. dir+=360/10;
  232. }
  233. wait(30);
  234. loop(30){
  235. CreateShot01(Obj_GetX(obj),Obj_GetY(obj),1,dir+180,GREEN11,0);
  236. dir+=360/30;
  237. }
  238. wait(30);
  239. loop(30){
  240. CreateShot01(Obj_GetX(obj),Obj_GetY(obj),1,dir+180,YELLOW11,0);
  241. dir+=360/30;
  242. }
  243. wait(60);
  244. Obj_Delete(obj);
  245. wait(30);
  246. yield;
  247. }
  248. superbulletac(x,y,v,dir,graphic,delay);
  249.  
  250.  
  251. function wait(n){loop(n){yield;}}
  252. function GetGapX(x,gapLength,gapAngle){return x+gapLength*cos(gapAngle);}
  253. function GetGapY(y,gapLength,gapAngle){return y+gapLength*sin(gapAngle);}
  254.  
  255. @DrawLoop
  256. {
  257. SetTexture(seal);
  258. SetGraphicRect(1,1,64,64);
  259. SetAlpha(128);
  260. SetGraphicAngle(0,0,0+g_angle);
  261. DrawGraphic(GetX(),GetY());
  262. SetGraphicAngle(0,0,0);
  263. g_angle+=2;
  264. }
  265.  
  266. @Finalize
  267. {
  268. }
  269.  
  270. }
  271.  
  272. -----------------------------------------------------------------------------------------------------------------
  273.  
  274. script_enemy Familiar2
  275. {
  276.  
  277. let CSD = GetCurrentScriptDirectory;
  278. let x=GetX();
  279. let y=GetY();
  280. let arg=GetArgument();
  281. let enemyspeed=GetSpeed();
  282. let shotgra=GetAngle();
  283. let minX=GetClipMinX();
  284. let maxX=GetClipMaxX();
  285. let minY=GetClipMinY();
  286. let maxY=GetClipMaxY();
  287. let cenX=GetCenterX();
  288. let cenY=GetCenterY();
  289. let seal=GetCurrentScriptDirectory~".\system\boss_mokou.png";
  290. let imgBoss = CSD ~ "system\boss_mokou.png";
  291.  
  292. let frame = 0;
  293. let frame2 = 0;
  294. let angle = 0;
  295. let angleAcc = 0;
  296. let radius = -50;
  297. let ang=0;
  298. let g_angle=0;
  299. let length=0;
  300. let count=80;
  301. let flg=0;
  302.  
  303. #include_function ".\system\lib_anime_Mokou.txt"
  304.  
  305. @Initialize
  306. {
  307. SetX(x);
  308. SetY(y);
  309.  
  310. SetMovePosition01(GetCenterX+110,GetCenterY-110,5);
  311. LoadGraphic(seal);
  312. LoadGraphic(imgBoss);
  313. InitializeAction();
  314. SetLife(5000);
  315.  
  316. mainTask;
  317. }
  318.  
  319. task mainTask{
  320. wait(120);
  321. movement;
  322. yield;
  323. }
  324.  
  325. task movement{
  326. loop{
  327. SetMovePosition01(GetCenterX-110,100,3);
  328. SetAction(ACT_MOVE,60);
  329. wait(90);
  330. SetMovePosition01(GetCenterX+110,100,3);
  331. SetAction(ACT_MOVE,60);
  332. wait(90);
  333. yield;
  334. }
  335. }
  336.  
  337. @MainLoop{
  338. SetCollisionA(GetX,GetY,32);
  339. SetCollisionB(GetX,GetY,16);
  340. yield;
  341. }
  342.  
  343.  
  344. @DrawLoop
  345. {
  346. DrawBoss(imgBoss);
  347. }
  348.  
  349. @Finalize
  350. {
  351. }
  352.  
  353. // wait function
  354. function wait(w){
  355. loop(w){yield;}
  356. }
  357.  
  358.  
  359.  
  360.  
  361.  
  362. }
  363.  
  364. -----------------------------------------------------------------------------------------------------------------
  365.  
  366. script_enemy Familiar3
  367. {
  368.  
  369. let CSD = GetCurrentScriptDirectory;
  370. let x=GetX();
  371. let y=GetY();
  372. let arg=GetArgument();
  373. let enemyspeed=GetSpeed();
  374. let shotgra=GetAngle();
  375. let minX=GetClipMinX();
  376. let maxX=GetClipMaxX();
  377. let minY=GetClipMinY();
  378. let maxY=GetClipMaxY();
  379. let cenX=GetCenterX();
  380. let cenY=GetCenterY();
  381. let seal=GetCurrentScriptDirectory~".\system\seal.png";
  382. let imgBoss = CSD ~ "system\seal.png";
  383.  
  384. let frame = 0;
  385. let frame2 = 0;
  386. let angle = 0;
  387. let angleAcc = 0;
  388. let radius = -50;
  389. let ang=0;
  390. let g_angle=0;
  391. let length=0;
  392. let count=80;
  393. let flg=0;
  394.  
  395. @Initialize
  396. {
  397. SetX(x);
  398. SetY(y);
  399.  
  400. SetMovePosition01(GetCenterX+110,GetCenterY-110,5);
  401. LoadGraphic(seal);
  402. SetLife(5000);
  403.  
  404. mainTask;
  405. }
  406.  
  407. @MainLoop{
  408. frame++;
  409. frame2++;
  410.  
  411. if(frame==120){
  412.  
  413. loop(3){
  414. CreateShot01(GetX + radius*cos(angle), GetY + radius*sin(angle), 1.5, angle, RED02, 12);
  415. angle += 360/3;
  416. }
  417. angle += angleAcc;
  418. angleAcc += 0.1;
  419. frame = 119;
  420. }
  421.  
  422. if(frame2>=-200 && frame2 <=110){
  423. radius++;
  424. }
  425. if(frame2>=111 && frame2 <= 360){
  426. radius--;
  427. }
  428. if(frame2==360){
  429. frame2=-141;
  430. }
  431.  
  432. }
  433.  
  434. task mainTask{
  435. wait(120);
  436. movement;
  437. yield;
  438. }
  439.  
  440. task movement{
  441. loop{
  442. SetMovePosition01(GetCenterX-110,100,3);
  443. wait(90);
  444. SetMovePosition01(GetCenterX+110,100,3);
  445. wait(90);
  446. yield;
  447. }
  448. }
  449.  
  450.  
  451. function wait(n){loop(n){yield;}}
  452. function GetGapX(x,gapLength,gapAngle){return x+gapLength*cos(gapAngle);}
  453. function GetGapY(y,gapLength,gapAngle){return y+gapLength*sin(gapAngle);}
  454.  
  455. @DrawLoop
  456. {
  457. SetTexture(seal);
  458. SetGraphicRect(1,1,64,64);
  459. SetAlpha(128);
  460. SetGraphicAngle(0,0,0+g_angle);
  461. DrawGraphic(GetX(),GetY());
  462. SetGraphicAngle(0,0,0);
  463. g_angle+=2;
  464. }
  465.  
  466. @Finalize
  467. {
  468. }
  469.  
  470. // wait function
  471. function wait(w){
  472. loop(w){yield;}
  473. }
  474.  
  475.  
  476.  
  477.  
  478. }
  479.  
  480. -----------------------------------------------------------------------------------------------------------------
  481.  
  482. script_enemy Familiar4
  483. {
  484.  
  485. let CSD = GetCurrentScriptDirectory;
  486. let x=GetX();
  487. let y=GetY();
  488. let arg=GetArgument();
  489. let enemyspeed=GetSpeed();
  490. let shotgra=GetAngle();
  491. let minX=GetClipMinX();
  492. let maxX=GetClipMaxX();
  493. let minY=GetClipMinY();
  494. let maxY=GetClipMaxY();
  495. let cenX=GetCenterX();
  496. let cenY=GetCenterY();
  497. let seal=GetCurrentScriptDirectory~".\system\seal.png";
  498. let imgBoss = CSD ~ "system\seal.png";
  499.  
  500. let frame = 0;
  501. let frame2 = 0;
  502. let angle = 0;
  503. let angleAcc = 0;
  504. let radius = -50;
  505. let ang=0;
  506. let g_angle=0;
  507. let length=0;
  508. let count=80;
  509. let flg=0;
  510.  
  511. @Initialize
  512. {
  513. SetX(x);
  514. SetY(y);
  515.  
  516. SetMovePosition01(GetCenterX-110,GetCenterY-110,5);
  517. LoadGraphic(seal);
  518. SetLife(5000);
  519. }
  520.  
  521. @MainLoop{
  522. frame++;
  523. frame2++;
  524.  
  525. if(frame==132){
  526.  
  527. loop(16){
  528. CreateShot01(GetX + radius*cos(angle), GetY + radius*sin(angle), 1.5, angle, PURPLE01, 12);
  529. angle += 360/16;
  530. }
  531. angle += angleAcc;
  532. angleAcc += 0.6;
  533. frame = 119;
  534. }
  535.  
  536. if(frame2>=-200 && frame2 <=110){
  537. radius++;
  538. }
  539. if(frame2>=111 && frame2 <= 360){
  540. radius--;
  541. }
  542. if(frame2==360){
  543. frame2=-141;
  544. }
  545.  
  546. }
  547.  
  548.  
  549. function wait(n){loop(n){yield;}}
  550. function GetGapX(x,gapLength,gapAngle){return x+gapLength*cos(gapAngle);}
  551. function GetGapY(y,gapLength,gapAngle){return y+gapLength*sin(gapAngle);}
  552.  
  553. @DrawLoop
  554. {
  555. SetTexture(seal);
  556. SetGraphicRect(1,1,64,64);
  557. SetAlpha(128);
  558. SetGraphicAngle(0,0,0+g_angle);
  559. DrawGraphic(GetX(),GetY());
  560. SetGraphicAngle(0,0,0);
  561. g_angle+=2;
  562. }
  563.  
  564. @Finalize
  565. {
  566. }
  567.  
  568. // wait function
  569. function wait3(w){
  570. loop(w){yield;}
  571. }
  572.  
  573.  
  574.  
  575.  
  576. }
Advertisement
Add Comment
Please, Sign In to add comment