Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private final void drawPlayerInfoMenu(boolean flag) {
- int x = ((GameImage) (gameGraphics)).menuDefaultWidth - 199;
- int y = 36;
- gameGraphics.drawPicture(x - 49, 3, SPRITE_MEDIA_START + 3);
- char c = '\304';
- char c1 = '\u0113';
- int l;
- int kl;
- int k = l = kl = GameImage.convertRGBToLong(160, 160, 160);
- if (infoPage == 0)
- k = GameImage.convertRGBToLong(220, 220, 220);
- else if (infoPage == 1)
- l = GameImage.convertRGBToLong(220, 220, 220);
- else if (infoPage == 2)
- kl = GameImage.convertRGBToLong(220, 220, 220);
- drawBoxAlpha(x, y, c / 3, 24, k, 128);
- drawBoxAlpha( x + c / 3, y, c / 3, 24, l, 128);
- drawBoxAlpha( x + (c / 3 * 2), y, c / 3, 24, kl, 128);
- drawBoxAlpha(x, y + 24, c, c1 - 24, GameImage.convertRGBToLong(220, 220, 220), 128);
- drawLineX(x, y + 24, c, 0);
- drawLineY(x + c / 3, y, 24, 0);
- drawLineY(x + (c / 3 * 2), y, 24, 0);
- drawText("Stats", x + c / 6 + 2, y + 16, 4, 0);
- drawText("Info", x + c / 7 + c / 3 + 4, y + 16, 4, 0);
- drawText("Quests", x + c / 7 + (c / 3 * 2) + 4, y + 16, 4, 0);
- if (infoPage == 0)
- drawStatMenu(x, 72);
- if (infoPage == 1)
- drawInfoMenu(x + 5, 72);
- if (infoPage == 2)
- drawQuestMenu();
- if (!flag)
- return;
- x = super.mouseX - (((GameImage) (gameGraphics)).menuDefaultWidth - 199);
- y = super.mouseY - 36;
- if (x >= 0 && y >= 0 && x < c && y < c1) {
- if (y <= 24 && mouseButtonClick == 1) {
- if (x < 64) {
- infoPage = 0;
- return;
- }
- if (x > 64 && x < 128) {
- infoPage = 1;
- return;
- }
- if (x > 128) {
- infoPage = 2;
- return;
- }
- }
- }
- mouseButtonClick = 0;
- }
- private final void drawStatMenu(int x, int y) {
- char c = '\304';
- int retain = y;
- int k1 = -1;
- drawString("Skills", x + 5, y, 3, 0xffff00);
- y += 13;
- int color = 0xffffff;
- for (int currentStat = 0; currentStat < 9; currentStat++) {
- color = 0xffffff;
- if (super.mouseX > x + 3 && super.mouseY >= y - 11 && super.mouseY < y + 2 && super.mouseX < x + 90) {
- color = 0xff0000;
- k1 = currentStat;
- }
- drawString(skillArray[currentStat] + ":@yel@" + playerStatCurrent[currentStat] + "/" + playerStatBase[currentStat], x + 5, y, 1, color);
- y += 13;
- }
- drawString("Fatigue: @yel@" + fatigue + "%", x + 5, y, 1, 0xffffff);
- y = retain;
- for (int currentStat = 9; currentStat < 18; currentStat++) {
- color = 0xffffff;
- if (super.mouseX >= x + 90 && super.mouseY >= y - 10 && super.mouseY < y + 2 && super.mouseX < x + 196) {
- color = 0xff0000;
- k1 = currentStat;
- }
- drawString(skillArray[currentStat] + ":@yel@" + playerStatCurrent[currentStat] + "/" + playerStatBase[currentStat], (x + c / 2) - 5, y, 1, color);
- y += 13;
- }
- // Runecrafting
- if (playerStatBase[18] > 1) {
- color = 0xffffff;
- if (super.mouseX >= x + 90 && super.mouseY >= y - 10 && super.mouseY < y + 2 && super.mouseX < x + 196) {
- color = 0xff0000;
- k1 = 18;
- }
- drawString(skillArray[18] + ":@yel@" + playerStatCurrent[18] + "/" + playerStatBase[18], (x + c / 2) - 5, y, 1, color);
- y += 13;
- }
- // Runecrafting
- color = 0xffffff;
- drawString("Quest Points:@yel@" + questPoints, (x + c / 2) - 5, y, 1, color);
- // Runecrafting
- if (playerStatBase[18] > 1)
- y += 21;
- else //y += 34;
- y += 34;
- // Runecrafting
- drawString("Equipment Status", x + 5, y, 3, 0xffff00);
- y += 12;
- for (int j2 = 0; j2 < 3; j2++) {
- drawString(equipmentStatusName[j2] + ":@yel@" + equipmentStatus[j2], x + 5, y, 1, 0xffffff);
- drawString(equipmentStatusName[j2 + 3] + ":@yel@" + equipmentStatus[j2 + 3], x + c / 2 + 25, y, 1, 0xffffff);
- y += 13;
- }
- y += 6;
- drawLineX(x, y - 15, c, 0);
- if (k1 != -1) {
- drawString(skillArrayLong[k1] + " skill", x + 5, y, 1, 0xffff00);
- y += 12;
- int k2 = experienceArray[0];
- for (int i3 = 0; i3 < 98; i3++)
- if (playerStatExperience[k1] >= experienceArray[i3])
- k2 = experienceArray[i3 + 1];
- drawString("Total xp: " + insertCommas("" + playerStatExperience[k1]), x + 5, y, 1, 0xffffff);
- y += 12;
- drawString("Next level at: " + insertCommas("" + k2), x + 5, y, 1, 0xffffff);
- //y += 12;
- //drawString("Required XP: " + insertCommas("" + (k2 - playerStatExperience[k1])), x + 5, y, 1, 0xffffff);
- } else {
- drawString("Overall levels", x + 5, y, 1, 0xffff00);
- y += 12;
- int skillTotal = 0;
- long expTotal = 0;
- for (int j3 = 0; j3 < 19; j3++) {
- skillTotal += playerStatBase[j3];
- expTotal += playerStatExperience[j3];
- }
- drawString("Skill total: " + insertCommas("" + skillTotal), x + 5, y, 1, 0xffffff);
- y += 12;
- //drawString("Total XP: " + insertCommas("" + expTotal), x + 5, y, 1, 0xffffff);
- //y += 12;
- drawString("Combat level: " + ourPlayer.level, x + 5, y, 1, 0xffffff);
- }
- }
- private final void drawQuestMenu() {
- questMenu.resetListTextCount(questMenuHandle);
- int ctr = 0;
- for (String s : quests) {
- questMenu.drawMenuListText(questMenuHandle, ctr, s);
- ctr++;
- }
- questMenu.drawMenu();
- int i = super.mouseX - (((GameImage) (gameGraphics)).menuDefaultWidth - 199);
- int j = super.mouseY - 61;
- if (i >= 0 && j >= 0 && i < 196 && j < 260)
- questMenu.updateActions(super.mouseX, super.mouseY, super.lastMouseDownButton, super.mouseDownButton);
- }
- private final void drawInfoMenu(int x, int y) {
- drawString("Player Information:", x, y, 3, 0xffff00);
- y += 13;
- drawString("Character:@yel@ " + ourPlayer.name, x, y, 1, 0xffffff);
- y += 13;
- double prayerBonus = 1.0;
- if (prayerOn[1])
- prayerBonus = 1.05;
- else if (prayerOn[4])
- prayerBonus = 1.1;
- else if (prayerOn[10])
- prayerBonus = 1.15;
- int modeBonus = 0;
- if (combatStyle == 0)
- modeBonus = 1;
- else if (combatStyle == 1)
- modeBonus = 3;
- int maxHit = (int)((((playerStatCurrent[2] * prayerBonus) + modeBonus) * ((((double) equipmentStatus[2] * 0.00175D) + 0.1D)) + 1.05D) * 0.95D);
- drawString("Max Hit: @yel@" + maxHit, x, y, 1, 0xffffff);
- y += 13;
- drawString("Coordinates: @yel@X: " + (sectionX + areaX) + ", " + "Y: " +(sectionY + areaY), x, y, 1, 0xffffff);
- y += 13;
- drawString("XP Gained:@yel@ " + insertCommas("" + expGained), x, y, 1, 0xffffff);
- y += 13;
- drawString("Kills: @yel@" + kills, x, y, 1, 0xffffff);
- y += 13;
- drawString("Deaths: @yel@" + deaths, x, y, 1, 0xffffff);
- y += 13;
- drawString("Players Near: @yel@" + playerCount, x, y, 1, 0xffffff);
- y += 13;
- drawString("Subscription Time: " + (subscriptionLeftDays == 0 ? "@red@N/A" : "@yel@" + subscriptionLeftDays + " Day" + (subscriptionLeftDays == 1 ? null : "s")), x, y, 1, 0xffffff);
- if (!lastLoggedInAddress.equals("0.0.0.0")) {
- y += 13;
- drawString("Last IP:@yel@ " + lastLoggedInAddress, x, y, 1, 0xffffff);
- }
- y += 21;
- drawString("Client Information:", x, y, 3, 0xffff00);
- y += 13;
- drawString("FPS:@yel@ " + FPS, x, y, 1, 0xffffff);
- //drawString("Internal IP:@yel@ " + localhost, x, y, 1, 0xffffff);
- if (timeSince(startTime) != null) {
- y += 13;
- drawString("Uptime:@yel@ " + timeSince(startTime), x, y, 1, 0xffffff);
- }
- /*y += 13;
- int usedMemory = (int)(Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / (1024 * 1024);
- double totalMemory = Runtime.getRuntime().totalMemory() / (1024 * 1024);
- DecimalFormat df = new DecimalFormat("0.00");
- double usedPercentage = new Double(df.format((usedMemory / totalMemory) * 100)).doubleValue();
- drawString("Memory Usage:@yel@ " + usedMemory + "mB (" + usedPercentage + "%)", x, y, 1, 0xffffff);*/
- y += 21;
- drawString("Server Information:", x, y, 3, 0xffff00);
- y += 13;
- drawString("Player ID:@yel@ " + ourPlayer.serverIndex, x, y, 1, 0xffffff);
- if (timeSince(serverStartTime) != null) {
- y += 13;
- drawString("Uptime:@yel@ " + timeSince(serverStartTime), x, y, 1, 0xffffff);
- }
- y += 13;
- drawString("Players Online: @yel@" + playersOnline, x, y, 1, 0xffffff);
- }
Add Comment
Please, Sign In to add comment