Exemplo n.º 1
0
 @Override
 public int loop() {
   final Node stateNode = script.state();
   if (Game.getClientState() != Game.INDEX_MAP_LOADED) {
     return 2000;
   }
   if (client != Bot.client()) {
     WidgetCache.purge();
     Bot.context().getEventManager().addListener(this);
     client = Bot.client();
   }
   if (stateNode != null && Game.isLoggedIn()) {
     script.set(stateNode);
     final Node setNode = script.get();
     if (setNode != null) {
       getContainer().submit(setNode);
       setNode.join();
     }
   }
   return 250;
 }
Exemplo n.º 2
0
  @Override
  public void onRepaint(Graphics g1) {
    Graphics2D g = (Graphics2D) g1;

    if (Game.getClientState() != 11) return;

    if (!start) {
      g.drawImage(background, paintX, paintY, null);
      drawBoxes(g);
      return;
    }
    if (!hide) {
      // paint once started with xp bar in here
    }

    if (lost) {
      g.drawString(state + "! Please restart script", 200, 200);
    }

    g.setColor(Color.black);
    g.drawString(state, 200, 200);
  }
Exemplo n.º 3
0
 @Override
 public boolean validate() {
   return Cons.WalkOut && Game.getClientState() != 12 && !Cons.Attacking;
 }