Thread: Loading High scores client sided from a website

Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1 Loading High scores client sided from a website 
    Registered Member
    Eternal Darknes's Avatar
    Join Date
    Jul 2007
    Age
    27
    Posts
    384
    Thanks given
    0
    Thanks received
    0
    Rep Power
    95
    Umm Here is the methods to declare...

    Code:
    	public void openInterface(int i, int j)
    	{
    		if(i == 1)
    		{
    			method60(j, (byte)6);
    			anInt857 = j;
    			aBoolean1149 = false;
    		}
    		if(i == 2)
    		{
    			method60(j, (byte)6);
    			anInt1018 = j;
    			aBoolean1149 = false;
    		}
    	}
    	
    	public static String[][] HSdata = new String[30][4];
    	
    	public static String buildURL(int skill, int page){
    			return "http://forums.suba-studios.com/index.php?action=hiscores&skill="+skill+"&page="+page;
    	}
    	public static BufferedReader read(String url){
    		try{
    			return new BufferedReader(new InputStreamReader(new URL(url).openStream()));
    		} catch (IOException ioexception) {
    			return null;
    		}
    	}
    	
    	public static void writeHSArray(int asdf, int fdsa){
    		try{
    			BufferedReader reader = read(""+buildURL(asdf, fdsa));
    			String line = reader.readLine();
    
    			for(int z = 0; z < HSdata.length; z++) {
    				if(line.startsWith("<td style=\"text-align:")){
    					for(int z2 = 0; z2 < 4; z2++) {
    						HSdata[z][z2] = line;
    						line = reader.readLine(); 
    					}
    				}else{
    					line = reader.readLine(); 
    					z -= 1;
    				}
    			}
    		} catch (IOException ioexception) {
    			return;
    		}
    	}
    	
    	public static void cleanHSarray(int asdf, int fdsa){
    			writeHSArray(asdf,fdsa);
    			for(int z = 0; z < HSdata.length; z++) {
    				for(int z2 = 0; z2 < 4; z2++) {
    					String curline = HSdata[z][z2];
    					HSdata[z][z2] = HSdata[z][z2].replaceAll("<td style=\"text-align: center;\">", " ");
    					HSdata[z][z2] = HSdata[z][z2].replaceAll("<td style=\"text-align: left;\">", " ");
    					HSdata[z][z2] = HSdata[z][z2].replaceAll("</td>", "");
    					//HSdata[z][z2].replaceAll("", "");
    					//HSdata[z][z2].replaceAll("", "");
    				}
    			}
    			
    	}
    	public String getSkillnameByID(int skill){
    		String[] skillName = {
    			"TotalLevel","TotalLevel","TotalLevel","TotalLevel","Strength","Hitpoints",
    			"Ranged","Prayer","Magic","Cooking","Woodcutting",
    			"Fletching","Fishing","Firemaking","Crafting","Smithing",
    			"Herblore","Agility","Thieving","Slayer","Farming",
    			"Runecraft","PKing","NULL"
    		};
    		for(int z = 0; z < 24; z++){
    			if(z == skill){
    				return skillName[z];
    			}
    		}
    		return "NULL";
    	}
    	public void displayHS(int skill, int page){
    		cleanHSarray(skill,page);
    		Class9.aClass9Array210[8144].aString248 = "Highscores: Level: "+getSkillnameByID(skill)+" || Page: "+page;
    		Class9.aClass9Array210[8145].aString248 = "";
    		Class9.aClass9Array210[8148].aString248 = "";
    		if(getSkillnameByID(skill).equals("TotalLevel")){
    			Class9.aClass9Array210[8147].aString248 = "Rank ||    Name    || Total level || total XP";
    		}else{
    			Class9.aClass9Array210[8147].aString248 = "Rank ||    Name    || Total level || XP";
    		}
    		openInterface(1, 8134);
    		for(int z = 0; z < HSdata.length; z++) {
    			Class9.aClass9Array210[8149+z].aString248 = HSdata[z][0]+" || "+HSdata[z][1]+" || "+HSdata[z][2]+" || "+HSdata[z][3];
    		}
    	}


    you will need to format it to work for what ever website you are loading it from.
    [Only registered and activated users can see links. ]

    Not allowed
    Reply With Quote  
     

  2. #2  
    I'm Back

    Stewie's Avatar
    Join Date
    Jul 2008
    Age
    26
    Posts
    7,989
    Thanks given
    1,877
    Thanks received
    1,491
    Rep Power
    5000
    Saw this on mopar, goodjob. rep+


    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  3. #3  
    Donator


    Join Date
    May 2008
    Posts
    1,235
    Thanks given
    31
    Thanks received
    25
    Rep Power
    279
    good job
    Reply With Quote  
     

  4. #4  
    Sub
    Sub is offline
    sυввч

    Sub's Avatar
    Join Date
    Aug 2007
    Age
    21
    Posts
    4,325
    Thanks given
    1,082
    Thanks received
    346
    Discord
    View profile
    Rep Power
    2755
    cool. gj
    Reply With Quote  
     

  5. #5  
    I'm Back

    Stewie's Avatar
    Join Date
    Jul 2008
    Age
    26
    Posts
    7,989
    Thanks given
    1,877
    Thanks received
    1,491
    Rep Power
    5000
    Still need help with your mapback?


    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  6. #6  
    Registered Member
    Eternal Darknes's Avatar
    Join Date
    Jul 2007
    Age
    27
    Posts
    384
    Thanks given
    0
    Thanks received
    0
    Rep Power
    95
    Quote Originally Posted by Stewie_ View Post
    Still need help with your mapback?
    Yes lol... I can't get the compass to position right...
    [Only registered and activated users can see links. ]

    Not allowed
    Reply With Quote  
     

  7. #7  
    I'm Back

    Stewie's Avatar
    Join Date
    Jul 2008
    Age
    26
    Posts
    7,989
    Thanks given
    1,877
    Thanks received
    1,491
    Rep Power
    5000
    hahaha.
    aight I'll help tomorrow, but for now read my post that I put on mopar in my tutorial. or something.


    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  8. #8  
    Community Veteran

    Cascade's Avatar
    Join Date
    Oct 2006
    Posts
    1,023
    Thanks given
    12
    Thanks received
    27
    Rep Power
    912
    Code:
    public static String buildURL(int skill, int page){
    Why not just return a URL?
    Reply With Quote  
     

  9. #9  
    Registered Member
    Eternal Darknes's Avatar
    Join Date
    Jul 2007
    Age
    27
    Posts
    384
    Thanks given
    0
    Thanks received
    0
    Rep Power
    95
    Quote Originally Posted by Cascade View Post
    Code:
    public static String buildURL(int skill, int page){
    Why not just return a URL?
    It does just return a URL?
    [Only registered and activated users can see links. ]

    Not allowed
    Reply With Quote  
     

  10. #10  
    I'm Back

    Stewie's Avatar
    Join Date
    Jul 2008
    Age
    26
    Posts
    7,989
    Thanks given
    1,877
    Thanks received
    1,491
    Rep Power
    5000
    Hey Eternal, try this mapback instead of the one you have in your cache:


    [Only registered and activated users can see links. ]
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

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


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •