@Override
  public void onRepaint(Graphics g1) {
    Graphics2D g = (Graphics2D) g1;

    final Color color1 = new Color(213, 214, 175);
    final Color color2 = new Color(0, 0, 0);
    final Color color3 = new Color(1, 1, 1);

    final BasicStroke stroke1 = new BasicStroke(1);

    final Font font1 = new Font("Verdana", 3, 18);
    final Font font2 = new Font("Verdana", 1, 12);

    if (Game.isLoggedIn()) {
      currentWcExp = Skills.getExperience(Skills.WOODCUTTING);
      woodcuttingExpGained = currentWcExp - startWoodcuttingExp;
      int xpHour = (int) (3600000.0 / (runTime.getElapsed()) * woodcuttingExpGained);

      g.setColor(color1);
      g.fillRect(8, 394, 487, 114);
      g.setColor(color2);
      g.setStroke(stroke1);
      g.drawRect(8, 394, 487, 114);
      g.setFont(font1);
      g.setColor(color3);
      g.drawString("AnDraynorWillowChopper v0.3", 219, 421);
      g.setFont(font2);
      g.drawString("Status: " + Status, 18, 433);
      g.drawString("Run Time: " + runTime.toElapsedString(), 18, 452);
      g.drawString("Xp gained: " + woodcuttingExpGained + "(" + xpHour + ")/hr", 19, 472);
      g.drawString("WoodCutting Level: " + Skills.getLevel(Skills.WOODCUTTING), 18, 491);
    }
  }
예제 #2
0
  public static void evokeCombat(Graphics g1, boolean hide, int skill) {

    final Color color1 = new Color(0, 0, 0);
    final Color color2 = new Color(255, 0, 0);

    final BasicStroke stroke1 = new BasicStroke(1);

    final Font font1 = new Font("Arial", 0, 10);
    final Font font2 = new Font("Arial", 0, 18);

    if (!hide) {
      Graphics2D g = (Graphics2D) g1;
      g.setColor(color1);
      g.fillRect(1, 1, 162, 180);
      g.setStroke(stroke1);
      g.drawRect(1, 1, 162, 180);
      g.setFont(font1);
      g.setColor(color2);
      g.drawString("Current Level: " + Skills.getLevel(skill), 5, 48);
      g.drawString("Levels Gained: " + sd.level(skill), 5, 65);
      g.drawString("Experiance / hour: " + getXpHr(skill), 5, 82);
      g.drawString("TTL: " + getTtl(skill), 6, 100);
      g.setFont(font2);
      g.drawString("Monk Killer", 6, 26);
      g.setFont(font1);
      g.drawString("Run Time: " + runTime.toElapsedString(), 6, 116);
      g.drawString("Monks Killed: " + monksKilled, 6, 133);
      g.drawString("Bones looted: " + bonesLooted, 6, 150);
      g.setFont(font2);
      g.drawString("By: Kirinsoul!", 5, 176);
    }
  }