Thread: [PI] Barrows fucked up..

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 [PI] Barrows fucked up.. 
    Registered Member
    Join Date
    Jun 2010
    Age
    22
    Posts
    2,531
    Thanks given
    544
    Thanks received
    582
    Rep Power
    411
    My barrows is fucked up, whenever i click a coffin, it says "you have already searched this sarcophagus" When i havent, i even check char file for barrows killcount, etc..

    Anyone know the problem?

    Quote Originally Posted by Runeter View Post
    Show me your code for barrows?
    Barrows class:

    Code:
    package server.model.minigames;
    
    import server.model.players.Client;
    import server.util.Misc;
    
    public class Barrows {
    
    	public static final int[][] COFFIN_AND_BROTHERS = {
    	{6823, 2030},
    	{6772, 2029},
    	{6822, 2028},
    	{6773, 2027},
    	{6771, 2026},
    	{6821, 2025}
    	
    	};
    	
    	/**
    	* Picking the random coffin
    	**/
    	public static int getRandomCoffin() {
    		return Misc.random(COFFIN_AND_BROTHERS.length-1);
    	}
    	
    	/**
    	* Selects the coffin and shows the interface if coffin id matches random coffin
    	**/
    	public static boolean selectCoffin(Client c, int coffinId) {
    		if(c.randomCoffin == 0) {
    			c.randomCoffin = getRandomCoffin();
    		}
    		
    		if(COFFIN_AND_BROTHERS[c.randomCoffin][0] == coffinId) {
    			c.getDH().sendDialogues(1, -1);
    			return true;
    		}
    		return false;
    	}
    	
    	
    }
    Action handler, first click object:

    Code:
    		case 6707: // verac
    			c.getPA().movePlayer(3556, 3298, 0);
    			break;
    			
    		case 6823:
    			if(server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if(c.barrowsNpcs[0][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2030, c.getX(), c.getY()-1, -1, 0, 120, 25, 200, 200, true, true);
    				c.barrowsNpcs[0][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    
    		case 6706: // torag 
    			c.getPA().movePlayer(3553, 3283, 0);
    			break;
    			
    		case 6772:
    			if(server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if(c.barrowsNpcs[1][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2029, c.getX()+1, c.getY(), -1, 0, 120, 20, 200, 200, true, true);
    				c.barrowsNpcs[1][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    			
    			
    		case 6705: // karil stairs
    			c.getPA().movePlayer(3565, 3276, 0);
    			break;
    		case 6822:
    			if(server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if(c.barrowsNpcs[2][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2028, c.getX(), c.getY()-1, -1, 0, 90, 17, 200, 200, true, true);
    				c.barrowsNpcs[2][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    			
    		case 6704: // guthan stairs
    			c.getPA().movePlayer(3578, 3284, 0);
    			break;
    		case 6773:
    			if(server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if(c.barrowsNpcs[3][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2027, c.getX(), c.getY()-1, -1, 0, 120, 23, 200, 200, true, true);
    				c.barrowsNpcs[3][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    			
    		case 6703: // dharok stairs
    			c.getPA().movePlayer(3574, 3298, 0);
    			break;
    		case 6771:
    			if(server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if(c.barrowsNpcs[4][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2026, c.getX(), c.getY()-1, -1, 0, 120, 45, 250, 250, true, true);
    				c.barrowsNpcs[4][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    			
    		case 6702: // ahrim stairs
    			c.getPA().movePlayer(3565, 3290, 0);
    			break;
    		case 6821:
    			if(server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if(c.barrowsNpcs[5][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2025, c.getX(), c.getY()-1, -1, 0, 90, 19, 200, 200, true, true);
    				c.barrowsNpcs[5][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    KilledBarrow:

    Code:
    	private void killedBarrow(int i) {
    		Client c = (Client)Server.playerHandler.players[npcs[i].killedBy];
    		if(c != null) {
    			for(int o = 0; o < c.barrowsNpcs.length; o++){
    				if(npcs[i].npcType == c.barrowsNpcs[o][0]) {
    					c.barrowsNpcs[o][1] = 2; // 2 for dead
    					c.barrowsKillCount++;	
    
    				}
    			}
    		}
    	}
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Aug 2009
    Posts
    608
    Thanks given
    1
    Thanks received
    17
    Rep Power
    6
    You have to click the npc > reset my barrows
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jun 2010
    Age
    22
    Posts
    2,531
    Thanks given
    544
    Thanks received
    582
    Rep Power
    411
    Quote Originally Posted by jakehop22 View Post
    You have to click the npc > reset my barrows
    That does not work..
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Aug 2009
    Posts
    608
    Thanks given
    1
    Thanks received
    17
    Rep Power
    6
    Hmmmmmmmm.......... Try using soulsplit or another pi barrows base.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Jun 2010
    Age
    22
    Posts
    2,531
    Thanks given
    544
    Thanks received
    582
    Rep Power
    411
    Quote Originally Posted by jakehop22 View Post
    Hmmmmmmmm.......... Try using soulsplit or another pi barrows base.
    I tried ripping of barrows from 3 different sources. O.O

    I ripped the KilledBarrow, the actionHandler stuff, barrows class, SpawnNpc..
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jun 2010
    Age
    22
    Posts
    2,531
    Thanks given
    544
    Thanks received
    582
    Rep Power
    411
    Bump
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Aug 2009
    Posts
    551
    Thanks given
    12
    Thanks received
    2
    Rep Power
    41
    alex cant u make like 3 of ea barrow npc in 1 tomb after u killed 1 u cant att another 1
    orso
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Dec 2009
    Posts
    46
    Thanks given
    0
    Thanks received
    2
    Rep Power
    5
    Show me your code for barrows?
    Reply With Quote  
     

  9. #9  
    .
    Valerian's Avatar
    Join Date
    Jan 2009
    Age
    24
    Posts
    3,929
    Thanks given
    445
    Thanks received
    418
    Rep Power
    3991
    Quote Originally Posted by Runeter View Post
    Show me your code for barrows?
    herp derp
    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Jun 2010
    Age
    22
    Posts
    2,531
    Thanks given
    544
    Thanks received
    582
    Rep Power
    411
    Quote Originally Posted by Runeter View Post
    Show me your code for barrows?
    Barrows class:

    Code:
    package server.model.minigames;
    
    import server.model.players.Client;
    import server.util.Misc;
    
    public class Barrows {
    
    	public static final int[][] COFFIN_AND_BROTHERS = {
    	{6823, 2030},
    	{6772, 2029},
    	{6822, 2028},
    	{6773, 2027},
    	{6771, 2026},
    	{6821, 2025}
    	
    	};
    	
    	/**
    	* Picking the random coffin
    	**/
    	public static int getRandomCoffin() {
    		return Misc.random(COFFIN_AND_BROTHERS.length-1);
    	}
    	
    	/**
    	* Selects the coffin and shows the interface if coffin id matches random coffin
    	**/
    	public static boolean selectCoffin(Client c, int coffinId) {
    		if(c.randomCoffin == 0) {
    			c.randomCoffin = getRandomCoffin();
    		}
    		
    		if(COFFIN_AND_BROTHERS[c.randomCoffin][0] == coffinId) {
    			c.getDH().sendDialogues(1, -1);
    			return true;
    		}
    		return false;
    	}
    	
    	
    }
    Action handler, first click object:

    Code:
    		case 6707: // verac
    			c.getPA().movePlayer(3556, 3298, 0);
    			break;
    			
    		case 6823:
    			if(server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if(c.barrowsNpcs[0][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2030, c.getX(), c.getY()-1, -1, 0, 120, 25, 200, 200, true, true);
    				c.barrowsNpcs[0][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    
    		case 6706: // torag 
    			c.getPA().movePlayer(3553, 3283, 0);
    			break;
    			
    		case 6772:
    			if(server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if(c.barrowsNpcs[1][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2029, c.getX()+1, c.getY(), -1, 0, 120, 20, 200, 200, true, true);
    				c.barrowsNpcs[1][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    			
    			
    		case 6705: // karil stairs
    			c.getPA().movePlayer(3565, 3276, 0);
    			break;
    		case 6822:
    			if(server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if(c.barrowsNpcs[2][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2028, c.getX(), c.getY()-1, -1, 0, 90, 17, 200, 200, true, true);
    				c.barrowsNpcs[2][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    			
    		case 6704: // guthan stairs
    			c.getPA().movePlayer(3578, 3284, 0);
    			break;
    		case 6773:
    			if(server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if(c.barrowsNpcs[3][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2027, c.getX(), c.getY()-1, -1, 0, 120, 23, 200, 200, true, true);
    				c.barrowsNpcs[3][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    			
    		case 6703: // dharok stairs
    			c.getPA().movePlayer(3574, 3298, 0);
    			break;
    		case 6771:
    			if(server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if(c.barrowsNpcs[4][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2026, c.getX(), c.getY()-1, -1, 0, 120, 45, 250, 250, true, true);
    				c.barrowsNpcs[4][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    			
    		case 6702: // ahrim stairs
    			c.getPA().movePlayer(3565, 3290, 0);
    			break;
    		case 6821:
    			if(server.model.minigames.Barrows.selectCoffin(c, objectType)) {
    				return;
    			}
    			if(c.barrowsNpcs[5][1] == 0) {
    				Server.npcHandler.spawnNpc(c, 2025, c.getX(), c.getY()-1, -1, 0, 90, 19, 200, 200, true, true);
    				c.barrowsNpcs[5][1] = 1;
    			} else {
    				c.sendMessage("You have already searched in this sarcophagus.");
    			}
    			break;
    KilledBarrow:

    Code:
    	private void killedBarrow(int i) {
    		Client c = (Client)Server.playerHandler.players[npcs[i].killedBy];
    		if(c != null) {
    			for(int o = 0; o < c.barrowsNpcs.length; o++){
    				if(npcs[i].npcType == c.barrowsNpcs[o][0]) {
    					c.barrowsNpcs[o][1] = 2; // 2 for dead
    					c.barrowsKillCount++;	
    
    				}
    			}
    		}
    	}
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

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

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •