Guest User

Untitled

a guest
Feb 26th, 2013
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.79 KB | None | 0 0
  1. #TouhouDanmakufu[Player]
  2. #Menu[N Harmonia Type A (Reshiram)]
  3. #Text[Let's burn down evil feelings]
  4. #Replay[HarmoniaA]
  5. #Image[.\HarmoniaASelect.png]
  6. #ScriptVersion[2]
  7.  
  8. script_player_main{
  9.  
  10. let CSD = GetCurrentScriptDirectory;
  11. let Ntex = CSD ~ "NAPlayer.png";
  12. let f = 0;
  13. let f2 = 0;
  14. let count = -1;
  15.  
  16. @Initialize{
  17. LoadGraphic(Ntex);
  18. SetPlayerLifeImage(Ntex,0,0,64,64);
  19. SetSpeed(3,1);
  20. LoadPlayerShotData(CSD ~ "NAShot.txt");
  21.  
  22. }
  23.  
  24. @DrawLoop{
  25. SetTexture(Ntex);
  26. SetAlpha(255);
  27. SetGraphicScale(1,1);
  28.  
  29. if(GetKeyState(VK_LEFT)==KEY_PUSH) || GetKeyState(VK_LEFT)==KEY_HOLD) {
  30. SetGraphicAngle(0,0,0);
  31. if(f2<5) { SetGraphicRect(0,0,64,64); }
  32. if(f2>=5 && f2<10) { SetGraphicRect(0,0,64,64); }
  33. if(f2>=10 && f2<15) { SetGraphicRect(0,0,64,64); }
  34. if(f2>=15) { SetGraphicRect(0,0,64,64); }
  35. f2++;
  36. }
  37.  
  38. else if(GetKeyState(VK_RIGHT)==KEY_PUSH) || GetKeyState(VK_RIGHT)==KEY_HOLD) {
  39. SetGraphicAngle(0,0,0);
  40. if(f2<5) { SetGraphicRect(0,0,64,64); }
  41. if(f2>=5 && f2<10) { SetGraphicRect(0,0,64,64); }
  42. if(f2>=10 && f2<15) { SetGraphicRect(0,0,64,64); }
  43. if(f2>=15) { SetGraphicRect(0,0,64,64); }
  44. f2++;
  45. }
  46.  
  47. else {
  48. if(f<15) { SetGraphicRect(0,0,64,64); }
  49. if(f>=15 && f<30) {SetGraphicRect(0,0,64,64); }
  50. if(f>=15 && f<45) {SetGraphicRect(0,0,64,64); }
  51. if(f>=15 && f<60) {SetGraphicRect(0,0,64,64); }
  52. f2 = 0;
  53. }
  54. DrawGraphic(GetPlayerX,GetPlayerY);
  55.  
  56. f+=3;
  57. f2+=3;
  58. if(f==60){ f = 0; }
  59. }
  60.  
  61. @Missed{
  62. yield;
  63. }
  64.  
  65. @SpellCard{
  66.  
  67. }
  68.  
  69. @Finalize{
  70.  
  71. }
  72.  
  73. @MainLoop {
  74.  
  75. if((GetKeyState(VK_SHOT)==KEY_PUSH || GetKeyState(VK_SHOT)==KEY_HOLD) && count == -1){
  76. count = 0;
  77. }
  78.  
  79. if(GetKeyState(VK_SLOWMOVE)==KEY_PUSH || GetKeyState(VK_SLOWMOVE)==KEY_HOLD) {
  80. if(count == 5){
  81. PlaySE(CSD ~ "fireshot.wav");
  82. NAShot(GetPlayerX,GetPlayerY-20,20,270,1,3);
  83. NAShot(GetPlayerX,GetPlayerY-20,20,275,1,4);
  84. NAShot(GetPlayerX,GetPlayerY-20,20,280,1,5);
  85. NAShot(GetPlayerX,GetPlayerY-20,20,260,1,4);
  86. NAShot(GetPlayerX,GetPlayerY-20,20,265,1,3);
  87.  
  88. count = -1;
  89. }
  90. }
  91.  
  92. else {
  93. if(count == 5){
  94. PlaySE(CSD ~ "fireshot.wav");
  95. NAShot(GetPlayerX,GetPlayerY-20,20,270,1,4);
  96. NAShot(GetPlayerX,GetPlayerY-20,20,260,1,5);
  97. NAShot(GetPlayerX,GetPlayerY-20,20,280,1,4);
  98.  
  99. count = -1;
  100. }
  101. }
  102.  
  103. if(count >=0) {
  104. count++;
  105. }
  106.  
  107. SetIntersectionCircle(GetPlayerX,GetPlayerY,1);
  108. yield;
  109. }
  110.  
  111.  
  112.  
  113. task NAShot(x,y,speed,dir,graphic,dmg) {
  114. let obj = Obj_Create(OBJ_SHOT);
  115.  
  116. Obj_SetPosition(obj,x,y);
  117. Obj_SetSpeed(obj,speed);
  118. Obj_SetAngle(obj,dir);
  119. Obj_SetAlpha(obj,155);
  120. ObjShot_SetGraphic(obj,graphic);
  121. ObjShot_SetDamage(obj,dmg);
  122. ObjShot_SetPenetration(obj,1);
  123. }
  124.  
  125.  
  126. function wait(w) { loop(w) { yield; } }
  127.  
  128. }
Advertisement
Add Comment
Please, Sign In to add comment