JCTechnic

Danmakufu Halp

Feb 26th, 2013
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.01 KB | None | 0 0
  1. #TouhouDanmakufu[Player]
  2. #Menu[Neko type]
  3. #Text[Being Neguka is suffering...]
  4. #ReplayName[LeNekz]
  5. #Image[.\NekoSelect.png]
  6. #ScriptVersion[2]
  7.  
  8. script_player_main {
  9.  
  10. let CSD = GetCurrentScriptDirectory;
  11.  
  12. let nekotex = CSD ~"NekoPlayer.png";
  13. let nekolife = CSD ~"NekoLife.png";
  14. let f = 0;
  15. let f2 = 0;
  16. let count = -1;
  17.  
  18. @Initialize {
  19. SetSpeed(5,2);
  20. SetPlayerLifeImage(nekolife,0,0,42,50);
  21. LoadGraphic(nekolife);
  22. LoadGraphic(nekotex);
  23. LoadPlayerShotData(CSD ~ "NekoBullet.txt");
  24. }
  25. @DrawLoop {
  26. // Neko
  27. SetTexture(nekotex);
  28. SetAlpha(255);
  29. SetGraphicScale(1,1);
  30.  
  31. if (GetKeyState(VK_LEFT)==KEY_PUSH || GetKeyState(VK_LEFT)==KEY_HOLD){
  32. SetGraphicAngle(0,0,0);
  33. if(f2<5) { SetGraphicRect(0,0,19,39); }
  34. if(f2>=5 && f2<10) { SetGraphicRect(20,0,39,39); }
  35. if(f2>=10 && f2<15) { SetGraphicRect(40,0,59,39); }
  36. if(f2>=15 && f2<20) { SetGraphicRect(60,0,79,39); }
  37. if(f2>=20 && f2<25) { SetGraphicRect(80,0,99,39); }
  38. if(f2>=25 && f2<30) { SetGraphicRect(100,0,119,39); }
  39. if(f2>=30 && f2<35) { SetGraphicRect(120,0,139,39); }
  40. if(f2>=35 && f2<40) { SetGraphicRect(140,0,159,39); }
  41. if(f2>=40 && f2<45) { SetGraphicRect(0,40,19,79); }
  42. if(f2>=45 && f2<50) { SetGraphicRect(20,40,39,79); }
  43. if(f2>=50 && f2<55) { SetGraphicRect(40,40,59,79); }
  44. if(f2>=55 && f2<60) { SetGraphicRect(60,40,79,79); }
  45. if(f2>=60 && f2<65) { SetGraphicRect(80,40,99,79); }
  46. if(f2>=65 && f2<70) { SetGraphicRect(100,40,119,79); }
  47. if(f2>=70 && f2<75) { SetGraphicRect(120,40,139,79); }
  48. if(f2>=75 && f2<80) { SetGraphicRect(140,40,159,79); }
  49. if(f2>=80 && f2<85) { SetGraphicRect(0,80,19,119); }
  50. if(f2>=85 && f2<90) { SetGraphicRect(20,80,39,119); }
  51. if(f2>=90 && f2<110) { SetGraphicRect(40,80,59,119); }
  52. if(f2>=110 && f2<115) { SetGraphicRect(120,80,139,119); }
  53. if(f2>=115 && f2<120) { SetGraphicRect(140,80,159,119); }
  54. f2++;
  55. if(f2==120) {f2=0;}
  56.  
  57. }
  58. else if (GetKeyState(VK_RIGHT)==KEY_PUSH || GetKeyState(VK_RIGHT)==KEY_HOLD){
  59. SetGraphicAngle(180,0,0);
  60. if(f2<5) { SetGraphicRect(0,0,19,39); }
  61. if(f2>=5 && f2<10) { SetGraphicRect(20,0,39,39); }
  62. if(f2>=10 && f2<15) { SetGraphicRect(40,0,59,39); }
  63. if(f2>=15 && f2<20) { SetGraphicRect(60,0,79,39); }
  64. if(f2>=20 && f2<25) { SetGraphicRect(80,0,99,39); }
  65. if(f2>=25 && f2<30) { SetGraphicRect(100,0,119,39); }
  66. if(f2>=30 && f2<35) { SetGraphicRect(120,0,139,39); }
  67. if(f2>=35 && f2<40) { SetGraphicRect(140,0,159,39); }
  68. if(f2>=40 && f2<45) { SetGraphicRect(0,40,19,79); }
  69. if(f2>=45 && f2<50) { SetGraphicRect(20,40,39,79); }
  70. if(f2>=50 && f2<55) { SetGraphicRect(40,40,59,79); }
  71. if(f2>=55 && f2<60) { SetGraphicRect(60,40,79,79); }
  72. if(f2>=60 && f2<65) { SetGraphicRect(80,40,99,79); }
  73. if(f2>=65 && f2<70) { SetGraphicRect(100,40,119,79); }
  74. if(f2>=70 && f2<75) { SetGraphicRect(120,40,139,79); }
  75. if(f2>=75 && f2<80) { SetGraphicRect(140,40,159,79); }
  76. if(f2>=80 && f2<85) { SetGraphicRect(0,60,39,119); }
  77. if(f2>=80 && f2<85) { SetGraphicRect(0,80,19,119); }
  78. if(f2>=85 && f2<90) { SetGraphicRect(20,80,39,119); }
  79. if(f2>=90 && f2<110) { SetGraphicRect(40,80,59,119); }
  80. if(f2>=110 && f2<115) { SetGraphicRect(120,80,139,119); }
  81. if(f2>=115 && f2<120) { SetGraphicRect(140,80,159,119); }
  82. f2++;
  83. if(f2==120) {f2=0;}
  84.  
  85. }
  86. else {
  87. if(f<15) { SetGraphicRect(0,0,19,39); }
  88. if(f>=15 && f<30) { SetGraphicRect(20,0,39,39); }
  89. if(f>=30 && f<45) { SetGraphicRect(40,0,59,39); }
  90. if(f>=45 && f<60) { SetGraphicRect(60,0,79,39); }
  91. if(f>=60 && f<75) { SetGraphicRect(80,0,99,39); }
  92. if(f>=75 && f<90) { SetGraphicRect(100,0,119,39); }
  93. if(f>=90 && f<105) { SetGraphicRect(120,0,139,39); }
  94. if(f>=105 && f<120) { SetGraphicRect(140,0,159,39); }
  95. if(f>=120 && f<135) { SetGraphicRect(0,40,19,79); }
  96. if(f>=135 && f<150) { SetGraphicRect(20,40,39,79); }
  97. if(f>=150 && f<165) { SetGraphicRect(40,40,59,79); }
  98. if(f>=165 && f<180) { SetGraphicRect(60,40,79,79); }
  99. if(f>=180 && f<195) { SetGraphicRect(80,40,99,79); }
  100. if(f>=195 && f<210) { SetGraphicRect(100,40,119,79); }
  101. if(f>=210 && f<225) { SetGraphicRect(120,40,139,79); }
  102. if(f>=225 && f<240) { SetGraphicRect(140,40,159,79); }
  103. if(f>=240 && f<255) { SetGraphicRect(0,80,19,119); }
  104. if(f>=255 && f<270) { SetGraphicRect(20,80,39,119); }
  105. if(f2>=270 && f2<300) { SetGraphicRect(40,80,59,119); }
  106. if(f2>=300 && f2<315) { SetGraphicRect(120,80,139,119); }
  107. if(f>=315 && f<330) { SetGraphicRect(140,80,159,119); }
  108. f++;
  109.  
  110. }
  111.  
  112. DrawGraphic(GetPlayerX, GetPlayerY);
  113.  
  114. f+=3;
  115. f2+=3;
  116. if(f>=330) { f= 0; }
  117. }
  118. @Missed {
  119.  
  120. yield;
  121. }
  122. @SpellCard {
  123.  
  124. }
  125. @Finalize {
  126.  
  127. }
  128. @MainLoop {
  129.  
  130. //When Z is pressed count set to 0
  131. if((GetKeyState(VK_SHOT)==KEY_PUSH || GetKeyState(VK_SHOT)==KEY_HOLD) && count == -1) {
  132. count = 0;
  133. }
  134. //When Slow
  135. if (GetKeyState(VK_SLOWMOVE)==KEY_PUSH || GetKeyState(VK_SLOWMOVE)==KEY_HOLD) {
  136. if(count ==5) {
  137. yield;
  138. goodshot(GetPlayerX, GetPlayerY, 15, 270, 1, 5);
  139. goodshot(GetPlayerX, GetPlayerY, 15, 250, 1, 5);
  140. goodshot(GetPlayerX, GetPlayerY, 15, 290, 1, 5);
  141. PlaySE(CSD ~ "ShotSFX.wav");
  142. count = -1;
  143. }
  144.  
  145. }
  146. //When Regular
  147. else {
  148. if(count ==5) {
  149. yield;
  150. goodshot(GetPlayerX, GetPlayerY, 15, 270, 1, 5);
  151. PlaySE(CSD ~ "ShotSFX.wav");
  152. count = -1;
  153. }
  154.  
  155. }
  156.  
  157. //if count is 0 or greater, start counting for each frame
  158. if (count >=0) {
  159. count++;
  160. }
  161. SetIntersectionCircle(GetPlayerX, GetPlayerY, 0);
  162. yield;
  163. }
  164.  
  165.  
  166. // NekoShot
  167. task goodshot(x,y,speed,dir,graphic,dmg) {
  168. let obj = Obj_Create(OBJ_SHOT);
  169.  
  170. Obj_SetPosition(obj,x,y);
  171. Obj_SetSpeed(obj,speed);
  172. Obj_SetAngle(obj,dir);
  173. Obj_SetAlpha(obj,155);
  174. ObjShot_SetGraphic(obj,graphic);
  175. ObjShot_SetDamage(obj,dmg);
  176. ObjShot_SetPenetration(obj,1);
  177. }
  178. function wait(w) { loop(w) { yield; }
  179. }
  180.  
  181. [---------------this is the bullet code-----------------]
  182. #playerShotData
  183. ShotImage =".\kyuubshot.png"
  184.  
  185. ShotData { id = 1 rect=(0,0,111,111) render=ALPHA alpha=255}
Advertisement
Add Comment
Please, Sign In to add comment