Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void bank() {
- log.log("Banking...");
- scriptState = BANK;
- if( players.getMyPlayer().distanceTo( bankTile) > 6 ) {
- //walking.walkPath( wellToBank, true );
- walking.walkToMM( bankTile );
- }
- PhysicalObject bankObject = null;
- //bankObject = sleepUntilObjectValid( 8, bank.BANK_BOOTH_IDS );
- bankObject = objects.getClosestObject( 8, bank.BANK_BOOTH_IDS );
- }
- // The above works fucking perfectly. No errors. Eclipse complies. But look below
- public PhysicalObject sleepUntilObjectValid( int range, int... objects ) {
- KTimer timer = new KTimer( 6000 );
- PhysicalObject object = null;
- while( !timer.isDone() ) {
- object = objects.getClosestObject( range, objects );
- // Oops, doesn't work anymore (above)
- // what happens is that it doesn't inherit any methods from object so basically when I type objects. it only lists some shit like getClass(), wait() and notify()
- // WHAT HTE FUCK
- if( object != null ) {
- return object;
- }
- sleep(100, 200);
- }
- return null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement