Advertisement
Guest User

Untitled

a guest
Feb 26th, 2013
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 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. DrawGraphic(GetPlayerX,GetPlayerY);
  29. }
  30.  
  31. @Missed{
  32. yield;
  33. }
  34.  
  35. @SpellCard{
  36.  
  37. }
  38.  
  39. @Finalize{
  40.  
  41. }
  42.  
  43. @MainLoop {
  44.  
  45. if((GetKeyState(VK_SHOT)==KEY_PUSH || GetKeyState(VK_SHOT)==KEY_HOLD) && count == -1){
  46. count = 0;
  47. }
  48.  
  49. if(GetKeyState(VK_SLOWMOVE)==KEY_PUSH || GetKeyState(VK_SLOWMOVE)==KEY_HOLD) {
  50. if(count == 5){
  51. PlaySE(CSD ~ "fireshot.wav");
  52. NAShot(GetPlayerX,GetPlayerY-20,20,270,1,3);
  53. NAShot(GetPlayerX,GetPlayerY-20,20,275,1,4);
  54. NAShot(GetPlayerX,GetPlayerY-20,20,280,1,5);
  55. NAShot(GetPlayerX,GetPlayerY-20,20,260,1,4);
  56. NAShot(GetPlayerX,GetPlayerY-20,20,265,1,3);
  57.  
  58. count = -1;
  59. }
  60. }
  61.  
  62. else {
  63. if(count == 5){
  64. PlaySE(CSD ~ "fireshot.wav");
  65. NAShot(GetPlayerX,GetPlayerY-20,20,270,1,4);
  66. NAShot(GetPlayerX,GetPlayerY-20,20,260,1,5);
  67. NAShot(GetPlayerX,GetPlayerY-20,20,280,1,4);
  68.  
  69. count = -1;
  70. }
  71. }
  72.  
  73. if(count >=0) {
  74. count++;
  75. }
  76.  
  77. SetIntersectionCircle(GetPlayerX,GetPlayerY,1);
  78. yield;
  79. }
  80.  
  81.  
  82.  
  83. task NAShot(x,y,speed,dir,graphic,dmg) {
  84. let obj = Obj_Create(OBJ_SHOT);
  85.  
  86. Obj_SetPosition(obj,x,y);
  87. Obj_SetSpeed(obj,speed);
  88. Obj_SetAngle(obj,dir);
  89. Obj_SetAlpha(obj,155);
  90. ObjShot_SetGraphic(obj,graphic);
  91. ObjShot_SetDamage(obj,dmg);
  92. ObjShot_SetPenetration(obj,1);
  93. }
  94.  
  95.  
  96. function wait(w) { loop(w) { yield; } }
  97.  
  98. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement