コード例 #1
0
 @Override
 public boolean validate() {
   /*    console.log("here");
   console.log(Player.getAnimation() <= 0);
   console.log(!(Player.isMoving()));*/
   return (Player.getAnimation() <= 0) && !(Player.isMoving());
 }
コード例 #2
0
ファイル: Store.java プロジェクト: NilsGhes/RuneScape
 /**
  * Waits a certain amount of time for the store screen to open
  *
  * @param ms amount of time to wait in ms
  * @return True if store opened within time limit
  */
 private boolean waitStoreOpen(int ms) {
   long t = System.currentTimeMillis();
   while (Timing.timeFromMark(t) < ms) {
     if (isStoreOpen()) {
       return true;
     } else if (Player.isMoving()) {
       t = System.currentTimeMillis();
     }
     General.sleep(ms / 20, ms / 10);
   }
   return false;
 }