Advertisement
Guest User

Untitled

a guest
Apr 17th, 2012
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. public void bank() {
  2. log.log("Banking...");
  3. scriptState = BANK;
  4.  
  5. if( players.getMyPlayer().distanceTo( bankTile) > 6 ) {
  6. //walking.walkPath( wellToBank, true );
  7. walking.walkToMM( bankTile );
  8. }
  9.  
  10. PhysicalObject bankObject = null;
  11.  
  12. //bankObject = sleepUntilObjectValid( 8, bank.BANK_BOOTH_IDS );
  13.  
  14. bankObject = objects.getClosestObject( 8, bank.BANK_BOOTH_IDS );
  15. }
  16.  
  17. // The above works fucking perfectly. No errors. Eclipse complies. But look below
  18.  
  19. public PhysicalObject sleepUntilObjectValid( int range, int... objects ) {
  20. KTimer timer = new KTimer( 6000 );
  21. PhysicalObject object = null;
  22.  
  23. while( !timer.isDone() ) {
  24. object = objects.getClosestObject( range, objects );
  25. // Oops, doesn't work anymore (above)
  26. // 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()
  27. // WHAT HTE FUCK
  28.  
  29. if( object != null ) {
  30. return object;
  31. }
  32. sleep(100, 200);
  33. }
  34. return null;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement