Thread: Barrow digging problem

Results 1 to 10 of 10
  1. #1 Barrow digging problem 
    Member
    Join Date
    Aug 2010
    Posts
    35
    Thanks given
    1
    Thanks received
    0
    Rep Power
    0
    I'm making barrows that you need to dig on top of hill and u teleport into the crypt, but its onlt the Verac and Ahrim that works! All the others dont make u tele!

    EDIT: This is for 562!

    Heres the codes:

    Player.java
    Code:
    public boolean inVerac() {
    if(getLocation().getX() >= 3553 && getLocation().getX() <= 3560 && getLocation().getY() >= 3295 && getLocation().getY() <= 3301) {
    return true;
    } else {
    return false;
    }
    }
    public boolean inAhrim() {
    if(getLocation().getX() >= 3563 && getLocation().getX() <= 3567 && getLocation().getY() >= 3285 && getLocation().getY() <= 3291) {
    return true;
    } else {
    return false;
    }
    }
    public boolean inDharok() {
    if(getLocation().getX() >= 3573 && getLocation().getX() <= 3578 && getLocation().getY() >= 3301 && getLocation().getY() <= 3295) {
    return true;
    } else {
    return false;
    }
    }
    public boolean inGuthan() {
    if(getLocation().getX() >= 3573 && getLocation().getX() <= 3579 && getLocation().getY() >= 3285 && getLocation().getY() <= 3280) {
    return true;
    } else {
    return false;
    }
    }
    public boolean inKaril() {
    if(getLocation().getX() >= 3562 && getLocation().getX() <= 3569 && getLocation().getY() >= 3278 && getLocation().getY() <= 3273) {
    return true;
    } else {
    return false;
    }
    }
    public boolean inTorag() {
    if(getLocation().getX() >= 3550 && getLocation().getX() <= 3555 && getLocation().getY() >= 3285 && getLocation().getY() <= 3280) {
    return true;
    } else {
    return false;
    }
    }
    ItemPacketHandler.java
    Code:
    case 952:
    player.animate(831);
    if(player.inAhrim()) {
    player.animate(-1);
    player.tele(3557, 9703, 3);
    player.getActionSender().sendMessage("You've broken into a crypt.");
    } else if(player.inVerac()) {
    player.animate(-1);
    player.tele(3578, 9706, 3);
    player.getActionSender().sendMessage("You've broken into a crypt.");
    } else if(player.inTorag()) {
    player.animate(-1);
    player.tele(3568, 9683, 3);
    player.getActionSender().sendMessage("You've broken into a crypt.");
    } else if(player.inDharok()) {
    player.animate(-1);
    player.tele(3556, 9718, 3);
    player.getActionSender().sendMessage("You've broken into a crypt.");
    } else if(player.inGuthan()) {
    player.animate(-1);
    player.tele(3534, 9704, 3);
    player.getActionSender().sendMessage("You've broken into a crypt.");
    } else if(player.inKaril()) {
    player.animate(-1);
    player.tele(3546, 9684, 3);
    player.getActionSender().sendMessage("You've broken into a crypt.");
    }
    break;
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Oct 2008
    Age
    29
    Posts
    949
    Thanks given
    16
    Thanks received
    14
    Rep Power
    72
    maybe the coords are wrong
    Reply With Quote  
     

  3. #3  
    Member
    Join Date
    Aug 2010
    Posts
    35
    Thanks given
    1
    Thanks received
    0
    Rep Power
    0
    Well... I rewrited the coords 2 times and I did exactly the same as I did with the verac and Ahrim, but they donn't work!
    Reply With Quote  
     

  4. #4  
    Registered Member
    bracket's Avatar
    Join Date
    Aug 2009
    Posts
    5,278
    Thanks given
    1,059
    Thanks received
    1,465
    Rep Power
    5000
    remove the return's?
    Reply With Quote  
     

  5. #5  
    Member
    Join Date
    Aug 2010
    Posts
    35
    Thanks given
    1
    Thanks received
    0
    Rep Power
    0
    Quote Originally Posted by owner pkin View Post
    remove the return's?
    why is that going to help? Ahrim and Verac still got the returns and they work.
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jul 2008
    Posts
    26
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    No your method is wrong....
    Try it like this:

    Code:
    public boolean inVerac() {
    if(getLocation().getX() >= 3553 && getLocation().getX() <= 3560 && getLocation().getY() >= 3295 && getLocation().getY() <= 3301) {
    return true;
    else
    return false;
    }
    public boolean inAhrim() {
    if(getLocation().getX() >= 3563 && getLocation().getX() <= 3567 && getLocation().getY() >= 3285 && getLocation().getY() <= 3291) {
    return true;
    else
    return false;
    }
    public boolean inDharok() {
    if(getLocation().getX() >= 3573 && getLocation().getX() <= 3578 && getLocation().getY() >= 3301 && getLocation().getY() <= 3295) {
    return true;
    else
    return false;
    }
    public boolean inGuthan() {
    if(getLocation().getX() >= 3573 && getLocation().getX() <= 3579 && getLocation().getY() >= 3285 && getLocation().getY() <= 3280) {
    return true;
    else
    return false;
    }
    public boolean inKaril() {
    if(getLocation().getX() >= 3562 && getLocation().getX() <= 3569 && getLocation().getY() >= 3278 && getLocation().getY() <= 3273) {
    return true;
    else
    return false;
    }
    public boolean inTorag() {
    if(getLocation().getX() >= 3550 && getLocation().getX() <= 3555 && getLocation().getY() >= 3285 && getLocation().getY() <= 3280) {
    return true;
    else
    return false;
    }
    Reply With Quote  
     

  7. #7  
    Member
    Join Date
    Aug 2010
    Posts
    35
    Thanks given
    1
    Thanks received
    0
    Rep Power
    0
    Just remove some brackets? Well... That will result in errors.
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Jul 2008
    Posts
    26
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    ohh wait, what I have is this and it works perfectly:
    Code:
    	public boolean dharok() {
    		if(getLocation().getX() >= 3571 && getLocation().getX() <= 3579 && getLocation().getY() >= 3294 && getLocation().getY() <= 3302)
    	return true;
    		else
    	return false;
    }
    
    	public boolean guthan() {
    		if(getLocation().getX() >= 3573 && getLocation().getX() <= 3581 && getLocation().getY() >= 3277 && getLocation().getY() <= 3286)
    	return true;
    		else
    	return false;
    }
    
    	public boolean karil() {
    		if(getLocation().getX() >= 3562 && getLocation().getX() <= 3569 && getLocation().getY() >= 3569 && getLocation().getY() <= 3280)
    	return true;
    		else
    	return false;
    }
    
    	public boolean torag() {
    		if(getLocation().getX() >= 3550 && getLocation().getX() <= 3557 && getLocation().getY() >= 3279 && getLocation().getY() <= 3287)
    	return true;
    		else
    	return false;
    }
    
    	public boolean verac() {
    		if(getLocation().getX() >= 3553 && getLocation().getX() <= 3560 && getLocation().getY() >= 3293 && getLocation().getY() <= 3301)
    	return true;
    		else
    	return false;
    }
    
    	public boolean ahrim() {
    		if(getLocation().getX() >= 3561 && getLocation().getX() <= 3568 && getLocation().getY() >= 3284 && getLocation().getY() <= 3293)
    	return true;
    		else
    	return false;
    }
    Reply With Quote  
     

  9. #9  
    Banned

    Join Date
    May 2010
    Age
    28
    Posts
    1,023
    Thanks given
    199
    Thanks received
    87
    Rep Power
    0
    I have it like this and it works perfectly.

    Code:
    public boolean inVerac() {
            if (getLocation().getX() >= 3553 && getLocation().getX() <= 3560 && getLocation().getY() >= 3295 && getLocation().getY() <= 3301) {
                return true;
            } else {
                return false;
            }
        }
    
        public boolean inDharok() {
            if (getLocation().getX() >= 3572 && getLocation().getX() <= 3578 && getLocation().getY() >= 3294 && getLocation().getY() <= 3301) {
                return true;
            } else {
                return false;
            }
        }
    
        public boolean inAhrim() {
            if (getLocation().getX() >= 3561 && getLocation().getX() <= 3569 && getLocation().getY() >= 3286 && getLocation().getY() <= 3291) {
                return true;
            } else {
                return false;
            }
        }
    
        public boolean inGuthan() {
            if (getLocation().getX() >= 3574 && getLocation().getX() <= 3580 && getLocation().getY() >= 3280 && getLocation().getY() <= 3285) {
                return true;
            } else {
                return false;
            }
        }
    
        public boolean inKaril() {
            if (getLocation().getX() >= 3562 && getLocation().getX() <= 3568 && getLocation().getY() >= 3274 && getLocation().getY() <= 3279) {
                return true;
            } else {
                return false;
            }
        }
    
        public boolean inTorag() {
            if (getLocation().getX() >= 3551 && getLocation().getX() <= 3556 && getLocation().getY() >= 3280 && getLocation().getY() <= 3285) {
                return true;
            } else {
                return false;
            }
        }
    Code:
    case 952:
                        if (player.inVerac()) {
                            player.animate(830);
                            player.tele(3578, 9706, 3);
                            player.getActionSender().sendMessage("You've broken into a crypt.");
                        } else if (player.inDharok()) {
                            player.animate(830);
                            player.tele(3556, 9718, 3);
                            player.getActionSender().sendMessage("You've broken into a crypt.");
                        } else if (player.inAhrim()) {
                            player.animate(830);
                            player.tele(3557, 9703, 3);
                            player.getActionSender().sendMessage("You've broken into a crypt.");
                        } else if (player.inGuthan()) {
                            player.animate(830);
                            player.tele(3534, 9704, 3);
                            player.getActionSender().sendMessage("You've broken into a crypt.");
                        } else if (player.inKaril()) {
                            player.animate(830);
                            player.tele(3546, 9684, 3);
                            player.getActionSender().sendMessage("You've broken into a crypt.");
                        } else if (player.inTorag()) {
                            player.animate(830);
                            player.tele(3556, 9718, 3);
                            player.getActionSender().sendMessage("You've broken into a crypt.");
                        }
                        break;
    Reply With Quote  
     

  10. #10  
    Member
    Join Date
    Aug 2010
    Posts
    35
    Thanks given
    1
    Thanks received
    0
    Rep Power
    0
    Okay cybetworm, Ill try ur cordinates, but your itempackethandler is just the same so I wont try that
    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

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