Ministry

Untitled

Apr 28th, 2011
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.42 KB | None | 0 0
  1. public void onRepaint(Graphics g1) {
  2.                 if (game.isLoggedIn() && !game.isWelcomeScreen())
  3.             {
  4.         millis = System.currentTimeMillis() - startTime;
  5.         hours = millis / (1000 * 60 * 60);
  6.         millis -= hours * (1000 * 60 * 60);
  7.         minutes = millis / (1000 * 60);
  8.         millis -= minutes * (1000 * 60);
  9.         seconds = millis / 1000;
  10.         currLevel = skills.getCurrentLevel(Skills.PRAYER);
  11.                 currXP = skills.getCurrentExp(Skills.PRAYER);
  12.         lvlsGained = currLevel - startLevel;
  13.                 expGained = currXP - startExp;
  14.                 expToLevel = skills.getExpToNextLevel(Skills.PRAYER);
  15.                 expHour = (int) ((expGained) * 3600000D / (System.currentTimeMillis() - startTime));
  16.  
  17.                   final int percentBar = (int) (skills.getPercentToNextLevel(skills.PRAYER)*0.52);
  18.  
  19.                   if ((minutes > 0 || hours > 0 || seconds > 0) && expGained > 0) {
  20.             sXP = (float) expGained
  21.                                 / (float) (seconds + minutes * 60 + hours * 60 * 60);
  22.                 }
  23.                 mXP = sXP * 60;
  24.                 hXP = mXP * 60;
  25.  
  26.                   if (sXP > 0) {
  27.                 STL = (int) (expToLevel / sXP);
  28.                 }
  29.                 if (STL >= 60) {
  30.                     MTL = STL / 60;
  31.                     STL -= MTL * 60;
  32.                 } else {
  33.                     MTL = 0;
  34.                 }
  35.                 if (MTL >= 60) {
  36.                     HTL = MTL / 60;
  37.                     MTL -= HTL * 60;
  38.                 } else {
  39.                     HTL = 0;
  40.                 }
  41.                 if (clicked != null) {
  42.                         final int mx = (int)mouse.getLocation().getX();
  43.                         final int my = (int)mouse.getLocation().getY();
  44.  
  45.                         final long mpt = System.currentTimeMillis() - mouse.getPressTime();
  46.                         if (mouse.getPressTime() == -1 || mpt >= 300)
  47.                                @@@ g.drawImage @@@(normal, mx - 10, my - 6, null);
  48.                         if (mpt < 300)
  49.                               @@@ g.drawImage @@@(clicked, mx - 10, my - 6, null);
  50.                       }
  51.    if(showPaint) {
  52.         Graphics2D g = (Graphics2D)g1;
  53.         g.setRenderingHints(antialiasing);
  54.         g.setColor(color1);
  55.         g.fillRect(279, 351, 214, 104);
  56.         g.setStroke(stroke1);
  57.         g.drawRect(279, 351, 214, 104);
  58.         g.setColor(color2);
  59.         g.fillRect(276, 348, 214, 104);
  60.         g.setColor(color1);
  61.         g.drawRect(276, 348, 214, 104);
  62.         g.setFont(font1);
  63.         g.drawString("Grave Digger", 312, 364);
  64.         g.setFont(font2);
  65.         g.drawString("v1.2", 424, 366);
  66.         g.setFont(font3);
  67.         g.drawString("Bones Burried  : " + bonesburied , 282, 382);
  68.         g.drawString("Exp Gained : " + expGained, 282, 394);
  69.         g.drawString("Current Level : " + currLevel, 280, 408);
  70.         g.drawString("Runtime : " +hours + ":" + minutes + ":" + seconds, 282, 436);
  71.         g.drawString("Time TNL: " + HTL + ":" + MTL + ":" + STL, 282, 422);
  72.         g.drawImage(Zomzom, 444, 392, null);
  73.         g.setFont(font4);
  74.         g.setColor(color3);
  75.         g.drawString("© Ministry", 444, 448);
  76.         g.drawImage(pBar, 461, 480, null);
  77.         g.setColor(color4);
  78.         g.fillRoundRect(461, 480, percentBar, 22, 5, 5);
  79.         g.setColor(color6);
  80.         g.fillRoundRect(461, 480, 52, 22, 5, 5);
  81.         g.setFont(font3);
  82.         g.setColor(color5);
  83.         g.drawString( percentTNL + " %", 490, 497);
  84.         g.drawImage(Himg, 496, 345, null);
  85.         }
  86.              if (!showPaint)
  87.      { @@@ g.drawImage @@@@ (Simg, 496, 345, null);  }
  88.                }
  89.     }
Advertisement
Add Comment
Please, Sign In to add comment