Advertisement
Guest User

Divine Spear "Frozen Spear"

a guest
Jun 30th, 2013
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  1. #TouhouDanmakufu
  2. #Title[Divine Spear "Frozen Spear"]
  3. #Text[The Great Remilia Ripoff!]
  4. #Player[FREE]
  5. #ScriptVersion[2]
  6.  
  7. script_enemy_main{
  8.  
  9. let CSD = GetCurrentScriptDirectory;
  10.  
  11. let imgBoss = CSD ~ "system\cirnoboss.png";
  12. let cut = CSD ~ "system\cirnocut.png";
  13. let bg = CSD ~ "system\lake.png";
  14.  
  15. let time = 0;
  16.  
  17. let f = 0;
  18. let f2 = 0;
  19.  
  20. @Initialize{
  21. SetLife(1000);
  22. SetTimer(60);
  23. SetScore(100000);
  24. SetMovePosition01(GetCenterX,GetCenterY-120,10);
  25.  
  26. LoadGraphic(imgBoss);
  27. LoadGraphic(cut);
  28. LoadGraphic(bg);
  29.  
  30. CutIn(YOUMU, "Divine Spear "\""Frozen Spear"\",cut,0,0,300,384);
  31.  
  32. mainTask;
  33.  
  34. }
  35.  
  36. @DrawLoop{
  37.  
  38. SetTexture(imgBoss);
  39. SetRenderState(ALPHA);
  40. SetAlpha(255);
  41. SetGraphicRect(0,0,64,64);
  42. SetGraphicScale(0.7,0.7);
  43. SetGraphicAngle(0,0,0);
  44.  
  45.  
  46.  
  47. if(int(GetSpeedX())==0){
  48. if(f<10){ SetGraphicRect(0,0,64,64); }
  49. if(f>=10 && f<20){ SetGraphicRect(64,0,128,64); }
  50. if(f>=20 && f<30){ SetGraphicRect(128,0,192,64); }
  51. if(f>=30 && f<40){ SetGraphicRect(192,0,256,64); }
  52. f2=0;
  53. }
  54.  
  55. if(GetSpeedX()>0){
  56. if(f2<5){ SetGraphicRect(0,64,64,128); }
  57. if(f2>=5 && f<10){ SetGraphicRect(64,64,128,128); }
  58. if(f2>=10 && f<15){ SetGraphicRect(128,64,192,128); }
  59. if(f2>=15){ SetGraphicRect(192,64,256,128); }
  60. f2++;
  61.  
  62. }
  63.  
  64. if(GetSpeedX()<0){
  65. SetGraphicAngle(180,0,0); // mirror
  66. if(f2<5){ SetGraphicRect(0,64,64,128); }
  67. if(f2>=5 && f<10){ SetGraphicRect(64,64,128,128); }
  68. if(f2>=10 && f<15){ SetGraphicRect(128,64,192,128); }
  69. if(f2>=15){ SetGraphicRect(192,64,256,128); }
  70. f2++;
  71.  
  72. }
  73.  
  74. DrawGraphic(GetX,GetY);
  75. f++;
  76. if(f==40){f=0;}
  77. }
  78.  
  79.  
  80. @MainLoop{
  81. SetCollisionA(GetX,GetY,32);
  82. SetCollisionB(GetX,GetY,16);
  83. time++;
  84.  
  85. if(time==90){
  86. CreateLaserA(4,GetEnemyX,GetEnemyY,400,20,BLUE32,60);
  87. SetLaserDataA(4,0,GetAngleToPlayer,0,0,0,0);
  88. SetShotKillTime(4,150);
  89.  
  90.  
  91. Concentration02(60);
  92. FireShot(4);
  93. time = 0;
  94. }
  95.  
  96. }
  97.  
  98. @BackGround{
  99.  
  100. SetTexture(bg);
  101. SetRenderState(ALPHA);
  102. SetAlpha(255);
  103. SetGraphicRect(0,0,512,512);
  104. SetGraphicScale(1,1);
  105. SetGraphicAngle(0,0,0);
  106. DrawGraphic(GetCenterX,GetCenterY);
  107.  
  108.  
  109. }
  110.  
  111. @Finalize{
  112. DeleteGraphic(imgBoss);
  113. DeleteGraphic(cut);
  114. DeleteGraphic(bg);
  115. }
  116.  
  117.  
  118. task mainTask{
  119. yield;
  120. fire;
  121. }
  122.  
  123.  
  124. task fire{
  125.  
  126. loop{
  127. CreateShotA(2,448,rand(16,480),0);
  128. CreateShotA(3,32,rand(16,480),0);
  129. SetShotDataA(2,0,1,180,0,0,5,BLUE12);
  130. SetShotDataA(3,0,1,0+rand(-20,20),0,0,5,BLUE12);
  131. SetShotDataA(2,300,1,180+rand(-20,20),0,0.5,5,BLUE12);
  132. SetShotDataA(3,300,1,0,0,0.5,5,BLUE12);
  133. FireShot(2);
  134. FireShot(3);
  135. wait(10);
  136. }
  137.  
  138. }
  139.  
  140.  
  141. function wait(w) { loop(w) { yield; } }
  142.  
  143.  
  144. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement