Thread: "Custom Hiscore buttons"

Page 1 of 3 123 LastLast
Results 1 to 10 of 25
  1. #1 "Custom Hiscore buttons" 
    Registered Member
    Join Date
    Jun 2011
    Age
    29
    Posts
    329
    Thanks given
    21
    Thanks received
    8
    Rep Power
    9
    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)
    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;
    and the RSinterface.java (Client 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);
    	}
    the playerassist.java (server sided)
    Code:
     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();
        }
    Ingamehiscore.java
    Code:
    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;
            }
        }
    }
    - Thanks
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Jun 2011
    Age
    29
    Posts
    329
    Thanks given
    21
    Thanks received
    8
    Rep Power
    9
    Bu-mp.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jun 2011
    Age
    29
    Posts
    329
    Thanks given
    21
    Thanks received
    8
    Rep Power
    9
    some1 help plz... >_<
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    Jun 2011
    Age
    29
    Posts
    329
    Thanks given
    21
    Thanks received
    8
    Rep Power
    9
    bump..... Evk*
    Reply With Quote  
     

  5. #5  
    The One And Only

    01053's Avatar
    Join Date
    Apr 2011
    Age
    28
    Posts
    2,887
    Thanks given
    417
    Thanks received
    885
    Rep Power
    856
    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;
    Try that lol..


    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jun 2011
    Age
    29
    Posts
    329
    Thanks given
    21
    Thanks received
    8
    Rep Power
    9
    Quote Originally Posted by 'Phantom View Post
    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;
    Try that lol..
    no worked... that's why i changed the case.. and no still work
    Reply With Quote  
     

  7. #7  
    ~! Legit ~!

    Join Date
    Nov 2010
    Posts
    1,973
    Thanks given
    183
    Thanks received
    211
    Rep Power
    237
    which source are you using?
    [email protected]
    Spoiler for My Vouches:
    Quote Originally Posted by mattsforeal View Post
    I paid $5 went first, he fixed my problem and it worked. 100% legit would do it again.
    Quote Originally Posted by Mythic View Post
    Vouch for him, very smooth and fast trade, purchased his last 4m. Have fun with your new membership
    Quote Originally Posted by Harlan View Post
    Vouch, trustworthy guy.
    Quote Originally Posted by iPhisher™ View Post
    Vouch for Super-Man, he is a very legit and trustable guy.
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Jun 2011
    Age
    29
    Posts
    329
    Thanks given
    21
    Thanks received
    8
    Rep Power
    9
    Quote Originally Posted by Super-Man View Post
    which source are you using?
    PI "orginal", ofcourse and Nick's client
    Reply With Quote  
     

  9. #9  
    Registered Member
    Join Date
    Jun 2011
    Age
    29
    Posts
    329
    Thanks given
    21
    Thanks received
    8
    Rep Power
    9
    Bump...
    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Jun 2011
    Age
    29
    Posts
    329
    Thanks given
    21
    Thanks received
    8
    Rep Power
    9
    Bump Still :F
    Reply With Quote  
     

Page 1 of 3 123 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 60
    Last Post: 10-01-2012, 02:13 PM
  2. Replies: 5
    Last Post: 04-14-2011, 08:14 AM
  3. Replies: 12
    Last Post: 11-26-2010, 01:53 AM
  4. "hed","head","headicon" command like ::emote Rep++
    By «I Gf I» ©£ in forum Help
    Replies: 12
    Last Post: 10-06-2009, 05:30 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •