Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package game.player.content.minigames;
- import core.Server;
- import game.player.Client;
- public class RFD {
- private int[][] WAVES = {
- {3493},
- {3494},
- {3495},
- {3496},
- {3497},
- {3491}
- };
- private int[][] COORDINATES = {
- {1900,5354,2},
- {1900,5354,2},
- {1900,5354,2},
- {1900,5354,2},
- {1900,5354,2},
- {1900,5354,2}
- };
- public void spawnNextWave(Client c) { //spawns next wave
- if (c != null) {
- if (c.rfdWave > WAVES.length) {
- c.rfdWave = 0;
- return;
- }
- if (c.rfdWave < 0){
- return;
- }
- int npcAmount = WAVES[c.rfdWave].length;
- for (int j = 0; j < npcAmount; j++) {
- int npc = WAVES[c.rfdWave][j];
- int X = COORDINATES[j][0];
- int Y = COORDINATES[j][1];
- int H = c.heightLevel;
- int hp = getHp(npc);
- int max = getMax(npc);
- int atk = getAtk(npc);
- int def = getDef(npc);
- Server.npcHandler.spawnNpc(c, npc, X, Y, H, 0, hp, max, atk, def, true, true);
- }
- c.RFDToKill = npcAmount; //amount to kill left
- c.RFDKilled = 0; //an int'ish thing that controls the monsters youve killed
- }
- }
- public int getHp(int npc) {
- switch (npc) { //after a switch, you add codes that use case
- case 3493:
- return 150;
- case 3494:
- return 150;
- case 3495:
- return 150;
- case 3496:
- return 150;
- case 3497:
- return 240;
- case 3491:
- return 80;
- }
- return 100;
- }
- public int getMax(int npc) {
- switch (npc) { //after a switch, you add codes that use case
- case 3493:
- return 9;
- case 3494:
- return 12;
- case 3495:
- return 15;
- case 3496:
- return 13;
- case 3491:
- return 16;
- case 3497:
- return 20;
- }
- return 5;
- }
- public int getAtk(int npc) {
- switch (npc) { //after a switch, you add codes that use case
- case 3493:
- return 225;
- case 3494:
- return 250;
- case 3495:
- return 300;
- case 3496:
- return 329;
- case 3497:
- case 3491:
- return 400;
- }
- return 100;
- }
- public int getDef(int npc) {
- switch (npc) { //after a switch, you add codes that use case
- case 3493:
- return 300;
- case 3494:
- return 350;
- case 3495:
- return 400;
- case 3496:
- return 520;
- case 3491:
- case 3497:
- return 600;
- }
- return 100;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement