Guest User

Untitled

a guest
Dec 11th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.17 KB | None | 0 0
  1. private final void drawPlayerInfoMenu(boolean flag) {
  2. int x = ((GameImage) (gameGraphics)).menuDefaultWidth - 199;
  3. int y = 36;
  4. gameGraphics.drawPicture(x - 49, 3, SPRITE_MEDIA_START + 3);
  5. char c = '\304';
  6. char c1 = '\u0113';
  7. int l;
  8. int kl;
  9. int k = l = kl = GameImage.convertRGBToLong(160, 160, 160);
  10. if (infoPage == 0)
  11. k = GameImage.convertRGBToLong(220, 220, 220);
  12. else if (infoPage == 1)
  13. l = GameImage.convertRGBToLong(220, 220, 220);
  14. else if (infoPage == 2)
  15. kl = GameImage.convertRGBToLong(220, 220, 220);
  16. drawBoxAlpha(x, y, c / 3, 24, k, 128);
  17. drawBoxAlpha( x + c / 3, y, c / 3, 24, l, 128);
  18. drawBoxAlpha( x + (c / 3 * 2), y, c / 3, 24, kl, 128);
  19. drawBoxAlpha(x, y + 24, c, c1 - 24, GameImage.convertRGBToLong(220, 220, 220), 128);
  20. drawLineX(x, y + 24, c, 0);
  21. drawLineY(x + c / 3, y, 24, 0);
  22. drawLineY(x + (c / 3 * 2), y, 24, 0);
  23. drawText("Stats", x + c / 6 + 2, y + 16, 4, 0);
  24. drawText("Info", x + c / 7 + c / 3 + 4, y + 16, 4, 0);
  25. drawText("Quests", x + c / 7 + (c / 3 * 2) + 4, y + 16, 4, 0);
  26.  
  27. if (infoPage == 0)
  28. drawStatMenu(x, 72);
  29. if (infoPage == 1)
  30. drawInfoMenu(x + 5, 72);
  31. if (infoPage == 2)
  32. drawQuestMenu();
  33. if (!flag)
  34. return;
  35. x = super.mouseX - (((GameImage) (gameGraphics)).menuDefaultWidth - 199);
  36. y = super.mouseY - 36;
  37. if (x >= 0 && y >= 0 && x < c && y < c1) {
  38. if (y <= 24 && mouseButtonClick == 1) {
  39. if (x < 64) {
  40. infoPage = 0;
  41. return;
  42. }
  43. if (x > 64 && x < 128) {
  44. infoPage = 1;
  45. return;
  46. }
  47. if (x > 128) {
  48. infoPage = 2;
  49. return;
  50. }
  51. }
  52. }
  53. mouseButtonClick = 0;
  54. }
  55.  
  56. private final void drawStatMenu(int x, int y) {
  57. char c = '\304';
  58. int retain = y;
  59. int k1 = -1;
  60. drawString("Skills", x + 5, y, 3, 0xffff00);
  61. y += 13;
  62. int color = 0xffffff;
  63. for (int currentStat = 0; currentStat < 9; currentStat++) {
  64. color = 0xffffff;
  65. if (super.mouseX > x + 3 && super.mouseY >= y - 11 && super.mouseY < y + 2 && super.mouseX < x + 90) {
  66. color = 0xff0000;
  67. k1 = currentStat;
  68. }
  69. drawString(skillArray[currentStat] + ":@yel@" + playerStatCurrent[currentStat] + "/" + playerStatBase[currentStat], x + 5, y, 1, color);
  70. y += 13;
  71. }
  72. drawString("Fatigue: @yel@" + fatigue + "%", x + 5, y, 1, 0xffffff);
  73. y = retain;
  74.  
  75. for (int currentStat = 9; currentStat < 18; currentStat++) {
  76. color = 0xffffff;
  77. if (super.mouseX >= x + 90 && super.mouseY >= y - 10 && super.mouseY < y + 2 && super.mouseX < x + 196) {
  78. color = 0xff0000;
  79. k1 = currentStat;
  80. }
  81. drawString(skillArray[currentStat] + ":@yel@" + playerStatCurrent[currentStat] + "/" + playerStatBase[currentStat], (x + c / 2) - 5, y, 1, color);
  82. y += 13;
  83. }
  84.  
  85. // Runecrafting
  86. if (playerStatBase[18] > 1) {
  87. color = 0xffffff;
  88. if (super.mouseX >= x + 90 && super.mouseY >= y - 10 && super.mouseY < y + 2 && super.mouseX < x + 196) {
  89. color = 0xff0000;
  90. k1 = 18;
  91. }
  92. drawString(skillArray[18] + ":@yel@" + playerStatCurrent[18] + "/" + playerStatBase[18], (x + c / 2) - 5, y, 1, color);
  93. y += 13;
  94. }
  95. // Runecrafting
  96.  
  97. color = 0xffffff;
  98. drawString("Quest Points:@yel@" + questPoints, (x + c / 2) - 5, y, 1, color);
  99.  
  100. // Runecrafting
  101. if (playerStatBase[18] > 1)
  102. y += 21;
  103. else //y += 34;
  104. y += 34;
  105. // Runecrafting
  106.  
  107. drawString("Equipment Status", x + 5, y, 3, 0xffff00);
  108. y += 12;
  109. for (int j2 = 0; j2 < 3; j2++) {
  110. drawString(equipmentStatusName[j2] + ":@yel@" + equipmentStatus[j2], x + 5, y, 1, 0xffffff);
  111. drawString(equipmentStatusName[j2 + 3] + ":@yel@" + equipmentStatus[j2 + 3], x + c / 2 + 25, y, 1, 0xffffff);
  112. y += 13;
  113. }
  114. y += 6;
  115. drawLineX(x, y - 15, c, 0);
  116. if (k1 != -1) {
  117. drawString(skillArrayLong[k1] + " skill", x + 5, y, 1, 0xffff00);
  118. y += 12;
  119. int k2 = experienceArray[0];
  120. for (int i3 = 0; i3 < 98; i3++)
  121. if (playerStatExperience[k1] >= experienceArray[i3])
  122. k2 = experienceArray[i3 + 1];
  123.  
  124. drawString("Total xp: " + insertCommas("" + playerStatExperience[k1]), x + 5, y, 1, 0xffffff);
  125. y += 12;
  126. drawString("Next level at: " + insertCommas("" + k2), x + 5, y, 1, 0xffffff);
  127. //y += 12;
  128. //drawString("Required XP: " + insertCommas("" + (k2 - playerStatExperience[k1])), x + 5, y, 1, 0xffffff);
  129. } else {
  130. drawString("Overall levels", x + 5, y, 1, 0xffff00);
  131. y += 12;
  132. int skillTotal = 0;
  133. long expTotal = 0;
  134. for (int j3 = 0; j3 < 19; j3++) {
  135. skillTotal += playerStatBase[j3];
  136. expTotal += playerStatExperience[j3];
  137. }
  138. drawString("Skill total: " + insertCommas("" + skillTotal), x + 5, y, 1, 0xffffff);
  139. y += 12;
  140. //drawString("Total XP: " + insertCommas("" + expTotal), x + 5, y, 1, 0xffffff);
  141. //y += 12;
  142. drawString("Combat level: " + ourPlayer.level, x + 5, y, 1, 0xffffff);
  143. }
  144. }
  145.  
  146. private final void drawQuestMenu() {
  147. questMenu.resetListTextCount(questMenuHandle);
  148. int ctr = 0;
  149. for (String s : quests) {
  150. questMenu.drawMenuListText(questMenuHandle, ctr, s);
  151. ctr++;
  152. }
  153. questMenu.drawMenu();
  154. int i = super.mouseX - (((GameImage) (gameGraphics)).menuDefaultWidth - 199);
  155. int j = super.mouseY - 61;
  156. if (i >= 0 && j >= 0 && i < 196 && j < 260)
  157. questMenu.updateActions(super.mouseX, super.mouseY, super.lastMouseDownButton, super.mouseDownButton);
  158. }
  159.  
  160. private final void drawInfoMenu(int x, int y) {
  161. drawString("Player Information:", x, y, 3, 0xffff00);
  162. y += 13;
  163. drawString("Character:@yel@ " + ourPlayer.name, x, y, 1, 0xffffff);
  164. y += 13;
  165. double prayerBonus = 1.0;
  166. if (prayerOn[1])
  167. prayerBonus = 1.05;
  168. else if (prayerOn[4])
  169. prayerBonus = 1.1;
  170. else if (prayerOn[10])
  171. prayerBonus = 1.15;
  172. int modeBonus = 0;
  173. if (combatStyle == 0)
  174. modeBonus = 1;
  175. else if (combatStyle == 1)
  176. modeBonus = 3;
  177. int maxHit = (int)((((playerStatCurrent[2] * prayerBonus) + modeBonus) * ((((double) equipmentStatus[2] * 0.00175D) + 0.1D)) + 1.05D) * 0.95D);
  178. drawString("Max Hit: @yel@" + maxHit, x, y, 1, 0xffffff);
  179. y += 13;
  180. drawString("Coordinates: @yel@X: " + (sectionX + areaX) + ", " + "Y: " +(sectionY + areaY), x, y, 1, 0xffffff);
  181. y += 13;
  182. drawString("XP Gained:@yel@ " + insertCommas("" + expGained), x, y, 1, 0xffffff);
  183. y += 13;
  184. drawString("Kills: @yel@" + kills, x, y, 1, 0xffffff);
  185. y += 13;
  186. drawString("Deaths: @yel@" + deaths, x, y, 1, 0xffffff);
  187. y += 13;
  188. drawString("Players Near: @yel@" + playerCount, x, y, 1, 0xffffff);
  189. y += 13;
  190. drawString("Subscription Time: " + (subscriptionLeftDays == 0 ? "@red@N/A" : "@yel@" + subscriptionLeftDays + " Day" + (subscriptionLeftDays == 1 ? null : "s")), x, y, 1, 0xffffff);
  191. if (!lastLoggedInAddress.equals("0.0.0.0")) {
  192. y += 13;
  193. drawString("Last IP:@yel@ " + lastLoggedInAddress, x, y, 1, 0xffffff);
  194. }
  195. y += 21;
  196. drawString("Client Information:", x, y, 3, 0xffff00);
  197. y += 13;
  198. drawString("FPS:@yel@ " + FPS, x, y, 1, 0xffffff);
  199. //drawString("Internal IP:@yel@ " + localhost, x, y, 1, 0xffffff);
  200. if (timeSince(startTime) != null) {
  201. y += 13;
  202. drawString("Uptime:@yel@ " + timeSince(startTime), x, y, 1, 0xffffff);
  203. }
  204. /*y += 13;
  205. int usedMemory = (int)(Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / (1024 * 1024);
  206. double totalMemory = Runtime.getRuntime().totalMemory() / (1024 * 1024);
  207. DecimalFormat df = new DecimalFormat("0.00");
  208. double usedPercentage = new Double(df.format((usedMemory / totalMemory) * 100)).doubleValue();
  209.  
  210. drawString("Memory Usage:@yel@ " + usedMemory + "mB (" + usedPercentage + "%)", x, y, 1, 0xffffff);*/
  211. y += 21;
  212. drawString("Server Information:", x, y, 3, 0xffff00);
  213. y += 13;
  214. drawString("Player ID:@yel@ " + ourPlayer.serverIndex, x, y, 1, 0xffffff);
  215. if (timeSince(serverStartTime) != null) {
  216. y += 13;
  217. drawString("Uptime:@yel@ " + timeSince(serverStartTime), x, y, 1, 0xffffff);
  218. }
  219. y += 13;
  220. drawString("Players Online: @yel@" + playersOnline, x, y, 1, 0xffffff);
  221. }
Add Comment
Please, Sign In to add comment