BananaCupcake

Untitled

Aug 6th, 2017
64
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #TouhouDanmakufu[Single]
  2. #ScriptVersion[3]
  3. #Title["Test words"]
  4. #Text["???"]
  5.  
  6. #include "script/default_system/Shot/ZUNShot_Const.txt"
  7.  
  8.  
  9.  
  10. let objBoss;
  11. let objScene=GetEnemyBossSceneObjectID();
  12. let size = 0;
  13. let type = 0;
  14. let GetEnemyX = 0;
  15. let GetEnemyY = 0;
  16. InstallFont(GetCurrentScriptDirectory() ~ "font/Revue.ttf");
  17.  
  18. @Event{
  19. alternative(GetEventType())
  20. case(EV_REQUEST_LIFE){
  21. SetScriptResult(2500);
  22. }
  23. case(EV_REQUEST_TIMER){
  24. SetScriptResult(60);
  25. }
  26. case(EV_REQUEST_SPELL_SCORE){
  27. SetScriptResult(1000000);
  28. }
  29. }
  30.  
  31. @Initialize{
  32. objBoss = ObjEnemy_Create(OBJ_ENEMY_BOSS);
  33. ObjEnemy_Regist(objBoss);
  34. ObjMove_SetDestAtFrame(objBoss, GetCenterX, 60, 60);
  35. ObjEnemyBossScene_StartSpell(objScene);
  36. TDrawLoop;
  37. TFinalize;
  38. MainTask;
  39. RenderBG;
  40. }
  41.  
  42. @MainLoop{
  43. ObjEnemy_SetIntersectionCircleToShot(objBoss, ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 32);
  44. ObjEnemy_SetIntersectionCircleToPlayer(objBoss, ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 24);
  45.  
  46.  
  47. yield;
  48. }
  49. task MainTask{
  50. wait(120);
  51. movement;
  52. magiccircle(objBoss,size,type);
  53. fireA;
  54. fireB;
  55. txt;
  56. }
  57.  
  58. task magiccircle(objBoss,size,type){
  59. let obj=ObjPrim_Create(OBJ_SPRITE_2D);
  60. let img=GetCurrentScriptDirectory()~"img/eff.png";
  61. let spin = 0;
  62. let s = 0;
  63. LoadTexture(img);
  64. ObjPrim_SetTexture(objBoss,img);
  65. ObjSprite2D_SetSourceRect(obj,128,80,256,208);
  66. ObjSprite2D_SetDestCenter(obj);
  67. ObjRender_SetScaleXYZ(obj,size,size,size);
  68. ObjRender_SetAlpha(obj,192);
  69. Obj_SetRenderPriority(obj,0.3);
  70. while(!Obj_IsDeleted(obj)){
  71. spin += 3;
  72. ObjRender_SetAngleXYZ(obj,0,0,-spin*2);
  73. ObjRender_SetPosition(obj,ObjMove_GetX(objBoss),ObjMove_GetY(objBoss),2);
  74. if(type==true){
  75. ObjRender_SetScaleXYZ(obj,size+0.2*sin(spin),size+0.2*sin(spin),2);
  76. }
  77. ObjMove_SetPosition(obj,ObjMove_GetX(objBoss), ObjMove_GetY(objBoss));
  78. yield;
  79. }
  80. Obj_Delete(obj);
  81. }
  82.  
  83. task txt{
  84. let objText = ObjText_Create();
  85. ObjText_SetText(objText, "Sin Sign - Hall of Death");
  86. ObjText_SetFontSize(objText, 10);
  87. ObjText_SetFontType(objText, "Russell Square Regular");
  88. ObjText_SetFontBold(objText, true);
  89. ObjText_SetFontColorTop(objText, 255, 255, 255);
  90. ObjText_SetFontColorBottom(objText, 255, 255, 255);
  91. ObjText_SetFontBorderType(objText, BORDER_FULL);
  92. ObjText_SetFontBorderColor(objText, 104, 64, 192);
  93. ObjText_SetFontBorderWidth(objText, 1);
  94. ObjText_SetHorizontalAlignment(objText, ALIGNMENT_LEFT);
  95. ObjText_SetMaxWidth(objText, 300);
  96. ObjRender_SetX(objText, -100 - -300);
  97. }
  98.  
  99. task RenderBG{
  100. let path1 = GetCurrentScriptDirectory() ~ "Muenzuka.png";
  101. let obj1 = ObjPrim_Create(OBJ_SPRITE_2D);
  102. ObjRender_SetBlendType(obj1, BLEND_ALPHA);
  103. Obj_SetRenderPriority(obj1, 0.21);
  104. ObjPrim_SetTexture(obj1, path1);
  105. ObjSprite2D_SetSourceRect(obj1, 0, 0, 512, 512);
  106. ObjSprite2D_SetDestRect(obj1, -256, -256, 256, 256);
  107. ObjRender_SetPosition(obj1, 384/2, 448/2, 1);
  108. let frame = 0;
  109. let alpha = 0;
  110. yield;
  111. }
  112.  
  113. task movement{
  114. while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){
  115. ObjMove_SetDestAtFrame(objBoss, rand(GetCenterX + 90, GetCenterX - 90), rand(GetCenterY - 60, GetCenterY - 120), 60);
  116. wait(240);
  117. }
  118. }
  119. task fireA{
  120. while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){
  121. let angleT = rand(0, 360);
  122. loop(80){
  123. loop(3){
  124. let obj = CreateShotA2(ObjMove_GetX(objBoss) + 120*cos(angleT * 3), ObjMove_GetY(objBoss) + 90*sin(angleT * 5), 10, angleT * 3, 0.001, 2, 318, 10);
  125. angleT += 360/50;
  126. }
  127. angleT += 8;
  128. yield;
  129. }
  130. }
  131. }
  132. task fireB{
  133. while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){
  134. let angleT = GetAngleToPlayer(objBoss);
  135. loop(13){
  136. ascent(i in 0..1){
  137. CreateShotA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 2.5 - i/3, angleT, 329, 5);
  138. }
  139. angleT += 360/8;
  140. }
  141. wait(100);
  142. }
  143. }
  144. task TDrawLoop {
  145. let imgBoss = GetCurrentScriptDirectory() ~ "shikieiki.png.png";
  146. ObjPrim_SetTexture(objBoss, imgBoss);
  147. ObjSprite2D_SetSourceRect(objBoss, 0, 0, 148, 125);
  148. ObjSprite2D_SetDestCenter(objBoss);
  149. }
  150. task TFinalize {
  151. while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){yield;}
  152. if(ObjEnemyBossScene_GetInfo(objScene, INFO_PLAYER_SHOOTDOWN_COUNT)
  153. +ObjEnemyBossScene_GetInfo(objScene, INFO_PLAYER_SPELL_COUNT) == 0){
  154. AddScore(ObjEnemyBossScene_GetInfo(objScene, INFO_SPELL_SCORE));
  155. }
  156. Obj_Delete(objBoss);
  157. DeleteShotAll(TYPE_ALL,TYPE_IMMEDIATE);
  158. SetAutoDeleteObject(true);
  159. CloseScript(GetOwnScriptID());
  160. return;
  161. }
  162. function GetCenterX(){
  163. return GetStgFrameWidth() / 2;
  164. }
  165. function GetCenterY(){
  166. return GetStgFrameHeight() / 2;
  167. }
  168. function wait(n){
  169. loop(n){yield;}
  170. }
RAW Paste Data