Bu-mp.
|
I Followed one tutorial.. but the "Buttons" doesn't work... if i want click the "Top kills" or "top deaths" doesn't switch :/ etc... link --> http://www.rune-server.org/runescape...ighscores.html
my ClickingButtons.java (Server Sided)
and the RSinterface.java (Client sided)Code:case 27117: c.getPA().getHighscores("kills"); c.getPA().sendFrame126("RandomFail Highscores: Kills", 27102); break; case 27116: c.getPA().getHighscores("pkp"); c.getPA().sendFrame126("RandomFail Highscores: PKP", 27102); break; case 27120: c.getPA().getHighscores("deaths"); c.getPA().sendFrame126("RandomFail Highscores: Deaths", 27102); break; case 27121: c.getPA().getHighscores("total"); c.getPA().sendFrame126("RandomFail Highscores: Total", 27102); break;
the playerassist.java (server sided)Code:public static void highscoresList(RSFont[] tda) { RSInterface tab = addScreenInterface(27100); addSprite(27101, 7, "Equipment/CUSTOM"); addText(27102, "RandomFail Highscores", tda, 2, 0x00FFFF, true, false); addText(27103, "", tda, 1, 0xFFFFFF, true, false); addText(27104, "", tda, 1, 0xFFFFFF, true, false); addText(27105, "", tda, 1, 0xFFFFFF, true, false); addText(27106, "", tda, 1, 0xFFFFFF, true, false); addText(27107, "", tda, 1, 0xFFFFFF, true, false); addText(27108, "", tda, 1, 0xFFFFFF, true, false); addText(27109, "", tda, 1, 0xFFFFFF, true, false); addText(27110, "", tda, 1, 0xFFFFFF, true, false); addText(27111, "", tda, 1, 0xFFFFFF, true, false); addText(27112, "", tda, 1, 0xFFFFFF, true, false); addText(27113, "", tda, 1, 0xFFFFFF, true, false); addText(27114, "", tda, 1, 0xFFFFFF, true, false); addButton(27115, 8, "Equipment/CUSTOM", "Close"); addButton(27116, 4, "Blood", "Top Kills"); addButton(27117, 4, "Blood", "Top PKP"); addButton(27120, 4, "Blood", "Top Deaths"); addButton(27121, 4, "Blood", "Top Total"); addText(27118, "Top Kills",tda,1, 65280, true, false); addText(27119, "Top PK Points",tda,1, 65280, true, false); addText(27122, "Top Deaths",tda,1, 65280, true, false); addText(27123, "Top Total",tda,1, 65280, true, false); tab.totalChildren(23); tab.child(0, 27101, 4, 16); tab.child(1, 27102, 214, 26); tab.child(2, 27103, 214, 58); tab.child(3, 27104, 214, 78); tab.child(4, 27105, 214, 98); tab.child(5, 27106, 214, 120); tab.child(6, 27107, 214, 140); tab.child(7, 27108, 214, 160); tab.child(8, 27109, 214, 180); tab.child(9, 27110, 214, 200); tab.child(10, 27111, 214, 220); tab.child(11, 27112, 214, 240); tab.child(12, 27113, 214, 240); tab.child(13, 27114, 214, 240); tab.child(14, 27115, 472, 26); tab.child(15, 27116, 20, 259); tab.child(16, 27117, 400, 259); tab.child(17, 27118, 445, 270); tab.child(18, 27119, 65, 270); tab.child(19, 27121, 120, 259); tab.child(20, 27120, 300, 259); tab.child(21, 27123, 165, 270); tab.child(22, 27122, 345, 270); }
Ingamehiscore.javaCode:public int getTotalLevel() { int totalLevel = 0; for (int i = 0; i < 21; i++) { totalLevel += getLevelForXP(c.playerXP[i]); } return totalLevel; } public void getHighscores(String type) { ArrayList<InGameHighscores> hs = new ArrayList<InGameHighscores>(); if (type.equalsIgnoreCase("kills")) { InGameHighscores.type = "Kills"; for (int j = 0; j < PlayerHandler.players.length; j++) { if (PlayerHandler.players[j] != null) { Client c2 = (Client) PlayerHandler.players[j]; hs.add(new InGameHighscores(Misc.optimizeText(c2.playerName), c2.KC)); } } } if (type.equalsIgnoreCase("pkp")) { InGameHighscores.type = "Points"; for (int j = 0; j < PlayerHandler.players.length; j++) { if (PlayerHandler.players[j] != null) { Client c2 = (Client) PlayerHandler.players[j]; hs.add(new InGameHighscores(Misc.optimizeText(c2.playerName), c2.pkPoints)); } } } if (type.equalsIgnoreCase("deaths")) { InGameHighscores.type = "Deaths"; for (int j = 0; j < PlayerHandler.players.length; j++) { if (PlayerHandler.players[j] != null) { Client c2 = (Client) PlayerHandler.players[j]; hs.add(new InGameHighscores(Misc.optimizeText(c2.playerName), c2.DC)); } } } if (type.equalsIgnoreCase("total")) { InGameHighscores.type = "Total Level"; for (int j = 0; j < PlayerHandler.players.length; j++) { if (PlayerHandler.players[j] != null) { Client c2 = (Client) PlayerHandler.players[j]; hs.add(new InGameHighscores(Misc.optimizeText(c2.playerName), c2.getPA().getTotalLevel())); } } } Collections.sort(hs); for (int i = 1; i <= hs.size(); i++) { c.getPA().sendFrame126("@or1@Rank " + i + ": @gre@" + hs.get((hs.size() - i)), 27103 + i); } c.getPA().showInterface(27100); c.flushOutStream(); hs.clear(); }
- ThanksCode:package server.model.players; /** * Made on 7-jan-2011 * @author Satan666 */ public class InGameHighscores implements Comparable { String name = ""; public static String type = ""; int score = 0; public InGameHighscores(String name, int score) { this.name = name; this.score = score; } @Override public String toString() { return String.format("%s @or1@- %s: @gre@%d",name,type,score); } public int compareTo(Object o1) { if (this.score == ((InGameHighscores) o1).score) { return 0; } else if ((this.score) > ((InGameHighscores) o1).score) { return 1; } else { return -1; } } }
Bu-mp.
some1 help plz... >_<
bump..... Evk*
Try that lol..Code:case 66221: c.getPA().getHighscores("kills"); c.getPA().sendFrame126("RandomFail Highscores: Kills", 27102); break; case 66220: c.getPA().getHighscores("pkp"); c.getPA().sendFrame126("RandomFail Highscores: PKP", 27102); break; case 66224: c.getPA().getHighscores("deaths"); c.getPA().sendFrame126("RandomFail Highscores: Deaths", 27102); break; case 66225: c.getPA().getHighscores("total"); c.getPA().sendFrame126("RandomFail Highscores: Total", 27102); break;
which source are you using?
Bump...
Bump Still :F
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |