Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void onRepaint(Graphics g1) {
- if (game.isLoggedIn() && !game.isWelcomeScreen())
- {
- millis = System.currentTimeMillis() - startTime;
- hours = millis / (1000 * 60 * 60);
- millis -= hours * (1000 * 60 * 60);
- minutes = millis / (1000 * 60);
- millis -= minutes * (1000 * 60);
- seconds = millis / 1000;
- currLevel = skills.getCurrentLevel(Skills.PRAYER);
- currXP = skills.getCurrentExp(Skills.PRAYER);
- lvlsGained = currLevel - startLevel;
- expGained = currXP - startExp;
- expToLevel = skills.getExpToNextLevel(Skills.PRAYER);
- expHour = (int) ((expGained) * 3600000D / (System.currentTimeMillis() - startTime));
- final int percentBar = (int) (skills.getPercentToNextLevel(skills.PRAYER)*0.52);
- if ((minutes > 0 || hours > 0 || seconds > 0) && expGained > 0) {
- sXP = (float) expGained
- / (float) (seconds + minutes * 60 + hours * 60 * 60);
- }
- mXP = sXP * 60;
- hXP = mXP * 60;
- if (sXP > 0) {
- STL = (int) (expToLevel / sXP);
- }
- if (STL >= 60) {
- MTL = STL / 60;
- STL -= MTL * 60;
- } else {
- MTL = 0;
- }
- if (MTL >= 60) {
- HTL = MTL / 60;
- MTL -= HTL * 60;
- } else {
- HTL = 0;
- }
- if (clicked != null) {
- final int mx = (int)mouse.getLocation().getX();
- final int my = (int)mouse.getLocation().getY();
- final long mpt = System.currentTimeMillis() - mouse.getPressTime();
- if (mouse.getPressTime() == -1 || mpt >= 300)
- @@@ g.drawImage @@@(normal, mx - 10, my - 6, null);
- if (mpt < 300)
- @@@ g.drawImage @@@(clicked, mx - 10, my - 6, null);
- }
- if(showPaint) {
- Graphics2D g = (Graphics2D)g1;
- g.setRenderingHints(antialiasing);
- g.setColor(color1);
- g.fillRect(279, 351, 214, 104);
- g.setStroke(stroke1);
- g.drawRect(279, 351, 214, 104);
- g.setColor(color2);
- g.fillRect(276, 348, 214, 104);
- g.setColor(color1);
- g.drawRect(276, 348, 214, 104);
- g.setFont(font1);
- g.drawString("Grave Digger", 312, 364);
- g.setFont(font2);
- g.drawString("v1.2", 424, 366);
- g.setFont(font3);
- g.drawString("Bones Burried : " + bonesburied , 282, 382);
- g.drawString("Exp Gained : " + expGained, 282, 394);
- g.drawString("Current Level : " + currLevel, 280, 408);
- g.drawString("Runtime : " +hours + ":" + minutes + ":" + seconds, 282, 436);
- g.drawString("Time TNL: " + HTL + ":" + MTL + ":" + STL, 282, 422);
- g.drawImage(Zomzom, 444, 392, null);
- g.setFont(font4);
- g.setColor(color3);
- g.drawString("© Ministry", 444, 448);
- g.drawImage(pBar, 461, 480, null);
- g.setColor(color4);
- g.fillRoundRect(461, 480, percentBar, 22, 5, 5);
- g.setColor(color6);
- g.fillRoundRect(461, 480, 52, 22, 5, 5);
- g.setFont(font3);
- g.setColor(color5);
- g.drawString( percentTNL + " %", 490, 497);
- g.drawImage(Himg, 496, 345, null);
- }
- if (!showPaint)
- { @@@ g.drawImage @@@@ (Simg, 496, 345, null); }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment