Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void repaint(Graphics graphics) {
- if (!hidePaint) {
- long runtime = this.getTotalRuntime();
- long seconds = (runtime / 1000) % 60;
- long minutes = (runtime / (1000*60) % 60);
- long hours = (runtime / (1000 * 60 * 60)) % 24;
- int currentLevel = ctx.skills.realLevel(Constants.SKILLS_FISHING);
- int currentExp = ctx.skills.experience(Constants.SKILLS_FISHING);
- int expGained = currentExp-startExp;
- int expToNextLevel = ctx.skills.experienceAt(currentLevel + 1) - ctx.skills.experience(Constants.SKILLS_FISHING);
- int expPerHour = (int) ((expGained) * 3600000D / (System.currentTimeMillis() - startTime));
- String timeLeft = getTimeToNextLevel(expToNextLevel,expPerHour);
- Graphics2D g = (Graphics2D)graphics;
- final BufferedImage bg = downloadImage("http://i.imgur.com/tDyUr3Q.png");
- Component messageBox = ctx.widgets.component(162, 0);
- int x = messageBox.screenPoint().x;
- int y = messageBox.screenPoint().y;
- int height = messageBox.height();
- int width = messageBox.width();
- g.drawImage(bg, x, y, null);
- //g.drawImage(fishIcon, width - 100, y - 5, null);
- g.drawImage(cursor, ctx.input.getLocation().x, ctx.input.getLocation().y, null);
- int ypos = 430;
- int ygap = 20;
- g.drawString("Running: "+String.format("%02d:%02d:%02d", hours, minutes, seconds), 10, ypos);
- ypos = ypos + ygap;
- g.drawString("Exp/Hour "+expPerHour, 10, ypos);
- ypos = ypos + ygap;
- g.drawString("Current FSH level "+((int)(currentLevel)), 10, ypos);
- ypos = ypos + ygap;
- g.drawString("FSH levels gained "+((int)(currentLevel - startLevel)), 10, ypos);
- ypos = ypos + ygap;
- g.drawString("EXP to next FSH level "+((int)(expToNextLevel)), 10, ypos);
- g.drawString("Time to next FSH level "+timeLeft, 200, ypos);
- ypos = ypos + ygap;
- g.drawString("Status "+Status, 10, ypos);
- ypos = ypos + ygap;
- g.drawString("Fish Caught "+fishCaught, 10, ypos);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement