Thread: Dominion Tower Help [PI]

Results 1 to 2 of 2
  1. #1 Dominion Tower Help [PI] 
    Registered Member
    Join Date
    Feb 2011
    Posts
    220
    Thanks given
    1
    Thanks received
    12
    Rep Power
    5
    I just added Dominion Tower and no errors, I start the minigame and the first wave comes, but when I kill the first wave, the next wave doesn't come up?

    Anyone know how to fix, heres my DT.java..

    Code:
    package server.model.minigames;
    
    import server.model.players.Client;
    import server.Server;
    
    /**
     * @author Sanity
     */
    
    public class DominionTower {
    	private final int[][] WAVES =    {{677,677},{677,677,677,677},{3064},{934},{667},{1472}};
    	private int[][] coordinates = {{3161,9756},{3161,9760},{3163,9756},{3163,9760},{3161,9758}};
    	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);
    				Server.npcHandler.spawnNpc(c, npc, X, Y, H, 0, hp, max, atk, def, true, false);				
    			}
    			c.dominionToKill = npcAmount;
    			c.dominionKilled = 0;
    		}
    	}
    	
    	public int getHp(int npc) {
    		switch (npc) {
    			case 677:
    			return 200;
    			case 667:
    			return 300;
    			case 3064:
    			return 200;
    			case 934: 
    			return 300;
    			case 1472:
    			return 350;	
    		}
    		return 100;
    	}
    	
    	public int getMax(int npc) {
    		switch (npc) {		
    		}
    		return 5;
    	}
    	
    	public int getAtk(int npc) {
    		switch (npc) {	
    		}
    		return 100;
    	}
    	
    	public int getDef(int npc) {
    		switch (npc) {		
    		}
    		return 100;
    	}
    	
    
    }
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Feb 2011
    Posts
    220
    Thanks given
    1
    Thanks received
    12
    Rep Power
    5
    I think I know the problem, the second wave isn't starting at the height level, the place where the minigame is, at heightlevel 4..
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. slayer tower [PI]
    By Mickt3 in forum Help
    Replies: 17
    Last Post: 02-10-2011, 12:13 AM
  2. slayer tower
    By justinmeeler in forum Help
    Replies: 3
    Last Post: 07-23-2010, 06:20 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •