Advertisement
Guest User

Untitled

a guest
Jan 20th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. public void repaint(Graphics graphics) {
  2. if (!hidePaint) {
  3. long runtime = this.getTotalRuntime();
  4. long seconds = (runtime / 1000) % 60;
  5. long minutes = (runtime / (1000*60) % 60);
  6. long hours = (runtime / (1000 * 60 * 60)) % 24;
  7.  
  8. int currentLevel = ctx.skills.realLevel(Constants.SKILLS_FISHING);
  9. int currentExp = ctx.skills.experience(Constants.SKILLS_FISHING);
  10. int expGained = currentExp-startExp;
  11. int expToNextLevel = ctx.skills.experienceAt(currentLevel + 1) - ctx.skills.experience(Constants.SKILLS_FISHING);
  12. int expPerHour = (int) ((expGained) * 3600000D / (System.currentTimeMillis() - startTime));
  13. String timeLeft = getTimeToNextLevel(expToNextLevel,expPerHour);
  14.  
  15. Graphics2D g = (Graphics2D)graphics;
  16.  
  17. final BufferedImage bg = downloadImage("http://i.imgur.com/tDyUr3Q.png");
  18.  
  19. Component messageBox = ctx.widgets.component(162, 0);
  20. int x = messageBox.screenPoint().x;
  21. int y = messageBox.screenPoint().y;
  22. int height = messageBox.height();
  23. int width = messageBox.width();
  24.  
  25. g.drawImage(bg, x, y, null);
  26. //g.drawImage(fishIcon, width - 100, y - 5, null);
  27. g.drawImage(cursor, ctx.input.getLocation().x, ctx.input.getLocation().y, null);
  28.  
  29. int ypos = 430;
  30. int ygap = 20;
  31. g.drawString("Running: "+String.format("%02d:%02d:%02d", hours, minutes, seconds), 10, ypos);
  32. ypos = ypos + ygap;
  33. g.drawString("Exp/Hour "+expPerHour, 10, ypos);
  34. ypos = ypos + ygap;
  35. g.drawString("Current FSH level "+((int)(currentLevel)), 10, ypos);
  36. ypos = ypos + ygap;
  37. g.drawString("FSH levels gained "+((int)(currentLevel - startLevel)), 10, ypos);
  38. ypos = ypos + ygap;
  39. g.drawString("EXP to next FSH level "+((int)(expToNextLevel)), 10, ypos);
  40.  
  41. g.drawString("Time to next FSH level "+timeLeft, 200, ypos);
  42.  
  43. ypos = ypos + ygap;
  44. g.drawString("Status "+Status, 10, ypos);
  45. ypos = ypos + ygap;
  46. g.drawString("Fish Caught "+fishCaught, 10, ypos);
  47. }
  48. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement