maybe the coords are wrong
|
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
ItemPacketHandler.javaCode: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; } }
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;
maybe the coords are wrong
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!
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; }
Just remove some brackets? Well... That will result in errors.
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; }
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;
Okay cybetworm, Ill try ur cordinates, but your itempackethandler is just the same so I wont try that
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |