Advertisement
Guest User

Untitled

a guest
Nov 19th, 2013
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.17 KB | None | 0 0
  1. #TouhouDanmakufu
  2. #Title[tailsnon1]
  3. #Text[Object1]
  4. #Image[.\image.png]
  5. #Background[User(.\bg.png, 1, 1)]
  6. #BGM[.\bgm.mp3]
  7. #PlayLevel[Overdrive]
  8. #Player[FREE]
  9. #ScriptVersion[2]
  10.  
  11. script_enemy_main{
  12. let MY = GetCurrentScriptDirectory~"supershot.txt";
  13. let frame=0;
  14. let frame2=0;
  15. let frame3=90;
  16. let frame4=180;
  17. let frame5=270;
  18. let t=350;let a=0;
  19. let cir=0;
  20. let X=GetCenterX;
  21. let Y=50;
  22. let y=0;
  23. let angle=0;
  24. let angle3=-160;let an=0;
  25. let angle5=160;
  26. let angle4=-270;
  27. let angle2=0;
  28. let cat = GetCurrentScriptDirectory~"cat.png";
  29. let sonic = GetCurrentScriptDirectory~"tdstand.png";
  30. let cut = GetCurrentScriptDirectory~"A.png";
  31. let yy =GetCenterY;
  32. let xx=GetClipMaxX+100;
  33. #include_function ".\function_cutin.txt"
  34. #include_function ".\AnimationLib.dnh"
  35. let j=GetCurrentScriptDirectory~"tdmove.png";
  36. let j2=GetCurrentScriptDirectory~"tdmove.png";
  37. let j3=GetCurrentScriptDirectory~"j3.png";let a=10;
  38. let j4=GetCurrentScriptDirectory~"j4.png";
  39. let m=0; let w=180;let bg=GetCurrentScriptDirectory~"amybg.jpg";let bg3=GetCurrentScriptDirectory~"tailsbg.jpg";
  40. let bg2=GetCurrentScriptDirectory~"sircle.jpg"; let x222=0; let x333=11; let x444=0;
  41. let dir=90;#include_function ".\function_cutin.txt"
  42. let w=60;let angle=0;let angle2=220;
  43. @Initialize{
  44. SetLife(3000);SetTimer(40);
  45. LoadGraphic(cut);
  46. LoadGraphic(sonic);
  47. LoadGraphic(bg);
  48. LoadGraphic(j2);
  49. LoadGraphic(bg2);
  50. LoadGraphic(bg3);
  51. //LoadGraphic(sonic2);
  52. LoadUserShotData(MY);
  53. blast1;
  54.  
  55. //////////////
  56.  
  57. CreateAnimation("boss", "Standing",2);
  58. SetAnimationFrame("boss", "Standing",0, GetCurrentScriptDirectory~"b1.png", 2, 0, 0, 27, 33);
  59. SetAnimationFrame("boss", "Standing",1, GetCurrentScriptDirectory~"b2.png", 2, 0, 0, 26, 34);
  60.  
  61.  
  62. ///////////////////////
  63.  
  64.  
  65.  
  66. main;
  67. cutin("NAZRIN","Killer Sign | Instant Kill |","cut",0,0,200,340);
  68.  
  69. }
  70. @MainLoop{yield;SetCollisionA(GetX, GetY, 32);
  71. SetCollisionB(GetX, GetY, 16);
  72. an+=10;
  73.  
  74.  
  75.  
  76. x222+=1; x333+=x444; x444+=0.002;
  77. }
  78. @DrawLoop{
  79.  
  80.  
  81. if(y>15){y--;}
  82. SetTexture(bg);
  83. y+=3;
  84. SetGraphicRect(0,0,4000*2,4000*2);
  85. SetGraphicScale(1.5,1.5);
  86. SetAlpha(255);SetGraphicAngle(0, 0, 0);
  87. DrawGraphic(GetCenterX+y/2,GetCenterY-y/2);
  88. //////////////
  89. if(GetSpeed() == 0){Animate("boss","Standing",true);
  90. }
  91. /////////////
  92.  
  93. SetTexture(cut);SetGraphicAngle(0, 0, 0);
  94. SetGraphicRect(0,0,880,1128);
  95. SetGraphicScale(0.5,0.5); SetGraphicAngle(0, 0, 0);
  96. DrawGraphic(xx,xx); SetAlpha(255);
  97. if(GetSpeed() > 0){
  98. SetGraphicAngle(0, 0, 0);
  99. SetTexture(j2);SetAlpha(255);
  100. SetGraphicRect(0,0,23,35);
  101. SetGraphicScale(1.5,1.5);
  102. DrawGraphic(GetX,GetY);}
  103.  
  104.  
  105.  
  106. SetTexture(bg2);
  107. SetGraphicAngle(0, 0, -x333);
  108. SetGraphicRect(0,0,900,900);
  109. SetGraphicScale(0.3,0.3);
  110. SetAlpha(130);
  111. DrawGraphic(GetX,GetY);
  112.  
  113. if(x333>10){x444=3;}
  114.  
  115. if(xx>GetCenterX){xx-=50;}
  116. if(xx<GetCenterX){xx-=0.3;}
  117. if(xx<190){xx-=50;}
  118. }
  119. @Finalize{
  120. }
  121. @Background{
  122. }
  123. task main{
  124. SetMovePosition03(GetCenterX,GetCenterY,10,3);
  125. PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_cat00.wav");
  126. wait(120);
  127.  
  128.  
  129.  
  130. loop(300){
  131. a+=20;
  132. bullet4;
  133. bullet5;
  134. wait(30);
  135. SetMovePosition03(GetCenterX-rand(-200,200),GetCenterY-rand(-100,100),10,3);
  136. wait(60);
  137.  
  138.  
  139. }
  140. }
  141.  
  142.  
  143. task kill{
  144. TimeStop(60,1,1,1);
  145. SetMovePosition03(GetPlayerX-50,GetPlayerY,10,6);
  146. wait(60);
  147. CreateShot01(GetX,GetY,3,GetAngleToPlayer,230,10);
  148. }
  149. task laser{
  150.  
  151. fire3;
  152. wait(60);
  153.  
  154.  
  155. }
  156.  
  157.  
  158. task fire3{
  159. bullet4;}
  160.  
  161.  
  162. let angle=135;
  163. task bullet4{
  164.  
  165.  
  166.  
  167. let obj26=Obj_Create(OBJ_SHOT);
  168. Obj_SetX(obj26,GetX);
  169. Obj_SetY(obj26,GetY);
  170. Obj_SetSpeed(obj26,4);
  171. Obj_SetAngle(obj26,angle+a);
  172. ObjShot_SetBombResist(obj26,true);
  173. ObjShot_SetGraphic(obj26,249);
  174.  
  175. while(!Obj_BeDeleted(obj26)){yield;
  176. Obj_SetAutoDelete(obj26,true);
  177.  
  178. CreateShotA(2,Obj_GetX(obj26)+rand(-5,5),Obj_GetY(obj26)+rand(-5,5),0);
  179.  
  180.  
  181. SetShotDataA(2,0,0,angle2,0,0,1,242);
  182.  
  183. SetShotKillTime(2,20);
  184.  
  185. FireShot(2);
  186.  
  187.  
  188. if(Obj_GetX(obj26)<GetClipMinX){
  189. Obj_SetAngle(obj26,180-Obj_GetAngle(obj26));}
  190.  
  191. if(Obj_GetX(obj26)>GetClipMaxX){
  192. Obj_SetAngle(obj26,180-Obj_GetAngle(obj26));
  193.  
  194. }}}
  195.  
  196.  
  197. task bullet5{
  198.  
  199.  
  200.  
  201. let obj216=Obj_Create(OBJ_SHOT);
  202. Obj_SetX(obj216,GetX);
  203. Obj_SetY(obj216,GetY);
  204. Obj_SetSpeed(obj216,4);
  205. Obj_SetAngle(obj216,180+angle+a);
  206. ObjShot_SetBombResist(obj216,true);
  207. ObjShot_SetGraphic(obj216,249);
  208.  
  209. while(!Obj_BeDeleted(obj216)){yield;
  210.  
  211. Obj_SetAutoDelete(obj216,true);
  212.  
  213. CreateShotA(21,Obj_GetX(obj216)+rand(-5,5),Obj_GetY(obj216)+rand(-5,5),0);
  214.  
  215.  
  216. SetShotDataA(21,0,0,angle2,0,0,1,242);
  217.  
  218. SetShotKillTime(21,20);
  219.  
  220. FireShot(21);
  221.  
  222.  
  223. if(Obj_GetX(obj216)>GetClipMaxX){
  224. Obj_SetAngle(obj216, 180-Obj_GetAngle(obj216));}
  225.  
  226. if(Obj_GetX(obj216)<GetClipMinX){
  227. Obj_SetAngle(obj216, 180-Obj_GetAngle(obj216));
  228.  
  229.  
  230.  
  231. }}}
  232.  
  233.  
  234. /////
  235.  
  236.  
  237.  
  238. task blast1{
  239. wait(360);
  240. loop(88888){
  241. loop(10){
  242. CreateShotA(2221,GetX,GetY,5);
  243.  
  244.  
  245. SetShotDataA(2221,0,3,angle3,14,0,1,42);
  246. SetShotDataA(2221,60,3,angle3,6,0,1,42);
  247. SetShotDataA(2221,120,3,angle3,1,0,1,42);
  248.  
  249. angle3+=360/10;
  250. FireShot(2221);
  251. }
  252. PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_kira01.wav");
  253. blastbullet;
  254. wait(120);
  255.  
  256.  
  257. }
  258.  
  259. }
  260.  
  261.  
  262.  
  263.  
  264.  
  265. task blastbullet{
  266.  
  267.  
  268.  
  269. let obj2216=Obj_Create(OBJ_SHOT);
  270. Obj_SetX(obj2216,GetX);
  271. Obj_SetY(obj2216,GetY);
  272. Obj_SetSpeed(obj2216,4);
  273. Obj_SetAngle(obj2216,GetAngleToPlayer);
  274. ObjShot_SetBombResist(obj2216,true);
  275. ObjShot_SetGraphic(obj2216,248);
  276.  
  277. while(!Obj_BeDeleted(obj2216)){yield;
  278.  
  279.  
  280.  
  281.  
  282. Obj_SetAutoDelete(obj2216,true);
  283.  
  284.  
  285. CreateShotA(221,Obj_GetX(obj2216)+rand(-15,15),Obj_GetY(obj2216)+rand(-15,15),0);
  286.  
  287.  
  288. SetShotDataA(221,0,0,angle2,0,0,1,239);
  289.  
  290. SetShotKillTime(221,60);
  291.  
  292. FireShot(221);
  293.  
  294.  
  295. }}
  296.  
  297.  
  298. task bullet3{
  299.  
  300. wait(300);
  301.  
  302. let obj24=Obj_Create(OBJ_SHOT);
  303. Obj_SetX(obj24,GetX);
  304. Obj_SetY(obj24,GetY);
  305. Obj_SetSpeed(obj24,4);
  306. Obj_SetAngle(obj24,90+an);
  307. ObjShot_SetBombResist(obj24,true);
  308. ObjShot_SetGraphic(obj24,249);
  309.  
  310. while(!Obj_BeDeleted(obj24)){yield;
  311.  
  312. if(Obj_GetX(obj24)<GetPlayerX+50){
  313. if(Obj_GetX(obj24)>GetPlayerX-50){
  314. if(Obj_GetY(obj24)<GetPlayerY+50){
  315. if(Obj_GetY(obj24)>GetPlayerY-50){
  316. Obj_SetSpeed(obj24,1);
  317. ObjShot_SetGraphic(obj24,202);
  318. wait(10);
  319. ObjShot_SetGraphic(obj24,204);
  320. wait(10);
  321. ObjShot_SetGraphic(obj24,202);
  322. wait(10);
  323. ObjShot_SetGraphic(obj24,204);
  324. wait(10);
  325. ObjShot_SetGraphic(obj24,202);
  326. wait(10);
  327. ObjShot_SetGraphic(obj24,204);
  328. wait(10);PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan02.wav");
  329. loop(20){
  330. CreateShot01(Obj_GetX(obj24),Obj_GetY(obj24),1,angle2+rand(0,360),RED21,10);
  331. angle2+=360/20;
  332. }
  333. loop(20){
  334. CreateShot01(Obj_GetX(obj24),Obj_GetY(obj24),2,angle2+rand(0,360),RED21,10);
  335. angle2+=360/20;
  336. }
  337. loop(20){
  338. CreateShot01(Obj_GetX(obj24),Obj_GetY(obj24),3,angle2+rand(0,360),RED21,10);
  339. angle2+=360/20;
  340. }
  341. loop(20){
  342. CreateShot01(Obj_GetX(obj24),Obj_GetY(obj24),4,angle2+rand(0,360),RED21,10);
  343. angle2+=360/20;
  344. }
  345.  
  346. Obj_Delete(obj24);
  347. }}}}}}
  348.  
  349. /////
  350.  
  351.  
  352.  
  353.  
  354.  
  355. task bullet2{
  356.  
  357. wait(600);
  358. let obj23=Obj_Create(OBJ_SHOT);
  359. Obj_SetX(obj23,GetX);
  360. Obj_SetY(obj23,GetY);
  361. Obj_SetSpeed(obj23,4);
  362. Obj_SetAngle(obj23,180+an);
  363. ObjShot_SetBombResist(obj23,true);
  364. ObjShot_SetGraphic(obj23,202);
  365. angle2+=20;
  366. while(!Obj_BeDeleted(obj23)){yield;
  367.  
  368. if(Obj_GetX(obj23)<GetPlayerX+50){
  369. if(Obj_GetX(obj23)>GetPlayerX-50){
  370. if(Obj_GetY(obj23)<GetPlayerY+50){
  371. if(Obj_GetY(obj23)>GetPlayerY-50){
  372. Obj_SetSpeed(obj23,1);
  373. ObjShot_SetGraphic(obj23,202);
  374. wait(10);
  375. ObjShot_SetGraphic(obj23,204);
  376. wait(10);
  377. ObjShot_SetGraphic(obj23,202);
  378. wait(10);
  379. ObjShot_SetGraphic(obj23,204);
  380. wait(10);
  381. ObjShot_SetGraphic(obj23,202);
  382. wait(10);
  383. ObjShot_SetGraphic(obj23,204);
  384. wait(10);PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan02.wav");
  385. loop(20){
  386. CreateShot01(Obj_GetX(obj23),Obj_GetY(obj23),1,angle2+rand(0,360),RED21,10);
  387. angle2+=360/20;
  388. }
  389. loop(20){
  390. CreateShot01(Obj_GetX(obj23),Obj_GetY(obj23),2,angle2+rand(0,360),RED21,10);
  391. angle2+=360/20;
  392. }
  393. loop(20){
  394. CreateShot01(Obj_GetX(obj23),Obj_GetY(obj23),3,angle2+rand(0,360),RED21,10);
  395. angle2+=360/20;
  396. }
  397. loop(20){
  398. CreateShot01(Obj_GetX(obj23),Obj_GetY(obj23),4,angle2+rand(0,360),RED21,10);
  399. angle2+=360/20;
  400. }
  401.  
  402. Obj_Delete(obj23);
  403. }}}}}}
  404.  
  405. /////
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417. task bullet{
  418. let obj2=Obj_Create(OBJ_SHOT);
  419. Obj_SetX(obj2,GetX);
  420. Obj_SetY(obj2,GetY);
  421. Obj_SetSpeed(obj2,4);
  422. Obj_SetAngle(obj2,270+an);
  423. ObjShot_SetBombResist(obj2,true);
  424. ObjShot_SetGraphic(obj2,202);
  425. angle2+=20;
  426. while(!Obj_BeDeleted(obj2)){yield;
  427.  
  428. if(Obj_GetX(obj2)<GetPlayerX+50){
  429. if(Obj_GetX(obj2)>GetPlayerX-50){
  430. if(Obj_GetY(obj2)<GetPlayerY+50){
  431. if(Obj_GetY(obj2)>GetPlayerY-50){
  432. Obj_SetSpeed(obj2,1);
  433. ObjShot_SetGraphic(obj2,202);
  434. wait(10);
  435. ObjShot_SetGraphic(obj2,204);
  436. wait(10);
  437. ObjShot_SetGraphic(obj2,202);
  438. wait(10);
  439. ObjShot_SetGraphic(obj2,204);
  440. wait(10);
  441. ObjShot_SetGraphic(obj2,202);
  442. wait(10);
  443. ObjShot_SetGraphic(obj2,204);
  444. wait(10);PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_tan02.wav");
  445. loop(20){
  446. CreateShot01(Obj_GetX(obj2),Obj_GetY(obj2),1,angle2+rand(0,360),RED21,10);
  447. angle2+=360/20;
  448. }
  449. loop(20){
  450. CreateShot01(Obj_GetX(obj2),Obj_GetY(obj2),2,angle2+rand(0,360),RED21,10);
  451. angle2+=360/20;
  452. }
  453. loop(20){
  454. CreateShot01(Obj_GetX(obj2),Obj_GetY(obj2),3,angle2+rand(0,360),RED21,10);
  455. angle2+=360/20;
  456. }
  457. loop(20){
  458. CreateShot01(Obj_GetX(obj2),Obj_GetY(obj2),4,angle2+rand(0,360),RED21,10);
  459. angle2+=360/20;
  460. }
  461.  
  462. Obj_Delete(obj2);
  463. }}}}}}
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473. task radar{wait(180);
  474.  
  475. loop(888){
  476. PlaySE(GetCurrentScriptDirectory ~ ".\radar.wav");
  477. wait(90);
  478. }}
  479. task lasers{
  480.  
  481. loop(10){
  482.  
  483.  
  484.  
  485.  
  486. CreateLaserB(10,500,50,RED01,20);
  487.  
  488. SetLaserDataB(10,0,0,20,0,angle+180,-0.4,angle+180,-0.4);
  489.  
  490.  
  491. angle+=36;
  492.  
  493. SetShotKillTime(10,60);
  494.  
  495. FireShot(10);
  496. wait(10);
  497. }
  498.  
  499. }
  500. function wait(n) {loop(n){yield;} }
  501.  
  502.  
  503. task charge{PlaySE(GetCurrentScriptDirectory ~ ".\Sounds\se_ch00.wav");Concentration01(60);wait(60);}
  504. ///////////////
  505.  
  506.  
  507.  
  508.  
  509. }
  510.  
  511.  
  512. }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement