Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package server.model.minigames;
- import server.model.npcs.NPCHandler;
- import server.model.players.Client;
- /**
- * @author _Austin_
- */
- public class FightCaves {
- private final int[][] WAVES = { { 2745 } };
- private int[][] coordinates = { { 2410, 5090 } };
- public void spawnNextWave(Client c) {
- if (c != null) {
- if (c.waveId >= WAVES.length) {
- c.waveId = 0;
- return;
- }
- if (c.waveId < 0) {
- return;
- }
- int npcAmount = WAVES[c.waveId].length;
- for (int j = 0; j < npcAmount; j++) {
- int npc = WAVES[c.waveId][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);
- NPCHandler.newNPC(2745, X, Y, H, 0, hp, max, atk, def, 0,
- c.playerId);
- }
- c.tzhaarToKill = npcAmount;
- c.tzhaarKilled = 0;
- }
- }
- public static boolean isCaveNpcs(int i) {
- if (NPCHandler.npcs[i].npcType == 2627
- || NPCHandler.npcs[i].npcType == 2630
- || NPCHandler.npcs[i].npcType == 2631
- || NPCHandler.npcs[i].npcType == 2741
- || NPCHandler.npcs[i].npcType == 2743
- || NPCHandler.npcs[i].npcType == 2745) {
- return true;
- }
- return false;
- }
- public int getHp(int npc) {
- switch (npc) {
- case 2627:
- return 10;
- case 2630:
- return 20;
- case 2631:
- return 40;
- case 2741:
- return 80;
- case 2743:
- return 150;
- case 2745:
- return 250;
- }
- return 100;
- }
- public int getMax(int npc) {
- switch (npc) {
- case 2627:
- return 4;
- case 2630:
- return 7;
- case 2631:
- return 17;
- case 2741:
- return 28;
- case 2743:
- return 54;
- case 2745:
- return 97;
- }
- return 5;
- }
- public int getAtk(int npc) {
- switch (npc) {
- case 2627:
- return 50;
- case 2630:
- return 70;
- case 2631:
- return 130;
- case 2741:
- return 250;
- case 2743:
- return 450;
- case 2745:
- return 650;
- }
- return 100;
- }
- public int getDef(int npc) {
- switch (npc) {
- case 2627:
- return 30;
- case 2630:
- return 100;
- case 2631:
- return 150;
- case 2741:
- return 200;
- case 2743:
- return 300;
- case 2745:
- return 500;
- }
- return 100;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment