Advertisement
mrextremez

RFD

May 16th, 2014
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.27 KB | None | 0 0
  1. package game.player.content.minigames;
  2.  
  3. import core.Server;
  4. import game.player.Client;
  5.  
  6. public class RFD {
  7.  
  8. private int[][] WAVES = {
  9. {3493},
  10. {3494},
  11. {3495},
  12. {3496},
  13. {3497},
  14. {3491}
  15. };
  16.  
  17. private int[][] COORDINATES = {
  18. {1900,5354,2},
  19. {1900,5354,2},
  20. {1900,5354,2},
  21. {1900,5354,2},
  22. {1900,5354,2},
  23. {1900,5354,2}
  24. };
  25.  
  26. public void spawnNextWave(Client c) { //spawns next wave
  27. if (c != null) {
  28. if (c.rfdWave > WAVES.length) {
  29. c.rfdWave = 0;
  30. return;
  31. }
  32. if (c.rfdWave < 0){
  33. return;
  34. }
  35. int npcAmount = WAVES[c.rfdWave].length;
  36. for (int j = 0; j < npcAmount; j++) {
  37. int npc = WAVES[c.rfdWave][j];
  38. int X = COORDINATES[j][0];
  39. int Y = COORDINATES[j][1];
  40. int H = c.heightLevel;
  41. int hp = getHp(npc);
  42. int max = getMax(npc);
  43. int atk = getAtk(npc);
  44. int def = getDef(npc);
  45. Server.npcHandler.spawnNpc(c, npc, X, Y, H, 0, hp, max, atk, def, true, true);
  46. }
  47. c.RFDToKill = npcAmount; //amount to kill left
  48. c.RFDKilled = 0; //an int'ish thing that controls the monsters youve killed
  49. }
  50. }
  51.  
  52. public int getHp(int npc) {
  53. switch (npc) { //after a switch, you add codes that use case
  54. case 3493:
  55. return 150;
  56. case 3494:
  57. return 150;
  58. case 3495:
  59. return 150;
  60. case 3496:
  61. return 150;
  62. case 3497:
  63. return 240;
  64. case 3491:
  65. return 80;
  66. }
  67. return 100;
  68. }
  69.  
  70. public int getMax(int npc) {
  71. switch (npc) { //after a switch, you add codes that use case
  72. case 3493:
  73. return 9;
  74. case 3494:
  75. return 12;
  76. case 3495:
  77. return 15;
  78. case 3496:
  79. return 13;
  80. case 3491:
  81. return 16;
  82. case 3497:
  83. return 20;
  84. }
  85. return 5;
  86. }
  87.  
  88. public int getAtk(int npc) {
  89. switch (npc) { //after a switch, you add codes that use case
  90. case 3493:
  91. return 225;
  92. case 3494:
  93. return 250;
  94. case 3495:
  95. return 300;
  96. case 3496:
  97. return 329;
  98. case 3497:
  99. case 3491:
  100. return 400;
  101. }
  102. return 100;
  103. }
  104.  
  105. public int getDef(int npc) {
  106. switch (npc) { //after a switch, you add codes that use case
  107. case 3493:
  108. return 300;
  109. case 3494:
  110. return 350;
  111. case 3495:
  112. return 400;
  113. case 3496:
  114. return 520;
  115. case 3491:
  116. case 3497:
  117. return 600;
  118. }
  119. return 100;
  120. }
  121.  
  122.  
  123. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement