
Untitled
By: a guest on
May 12th, 2012 | syntax:
None | size: 1.17 KB | hits: 22 | expires: Never
public boolean isatbank1() {
if (DraynorBank.contains(getMyPlayer().getLocation())) {
return true;
} else {
if (DraynorBank.getNearestTile(getMyPlayer().getLocation())
.isValid()) {
return walking.walkTileMM(DraynorBank
.getNearestTile(getMyPlayer().getLocation()));
} else {
return false;
}
}
}
public void bank(){
if(!bank.isOpen()){
bank.open();
for(int i = 0; i<10 && !bank.isOpen();i++){
sleep(random(500,800));
}
}else{
if(inventory.getCount()>1){
bank.depositAllExcept(GP);
for(int i = 0; i<10 && inventory.getCount()>1;i++){
sleep(random(500,800));
}
}
if(inventory.getCount(GP)<60){
bank.depositAllExcept(GP);
for(int i = 0; i<10 && inventory.getCount()!=0;i++){
sleep(random(500,800));
}
bank.withdraw(GP, 5000);
for(int i = 0; i<10 && !inventory.contains(GP);i++){
sleep(random(500,800));
}
}else{
bank.depositAllExcept(GP);
for(int i = 0; i<10 && inventory.getCount()>1;i++){
sleep(random(500,800));
}
}
}
bank.close();
for(int i = 0; i < 10 && bank.isOpen();i++){
sleep(random(500,800));
}
}