Thread: Ruse, interfaces with a high id don't show up

Results 1 to 6 of 6
  1. #1 Ruse, interfaces with a high id don't show up 
    Banned

    Join Date
    Jun 2013
    Posts
    500
    Thanks given
    119
    Thanks received
    69
    Discord
    View profile
    Rep Power
    0
    Whenever I try make an interface with a high id(72080, 75503 both used in these cases) Nothing shows up but I can't click, is there something that prevents interfaces rendering past a certain id? Have had a look but I can't seem too find anything
    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Sep 2016
    Posts
    161
    Thanks given
    76
    Thanks received
    70
    Discord
    View profile
    Rep Power
    404
    Yes. RSInterfaces.java. Wherever you unpack the interfaces. There is an array of interfaces and the ids need to be in the bounds of that array.
    Code:
    public static void unpack(CacheArchive streamLoader,
    		TextDrawingArea textDrawingAreas[], CacheArchive streamLoader_1) {
    	fonts = textDrawingAreas;
    	spriteCache = new MemCache(50000);
    	Stream stream = new Stream(streamLoader.getDataForName("data"));
    	int parentId = -1;
    	int totalInterfaces = stream.readUnsignedShort();
    	interfaceCache = new RSInterface[85000];
    Normally you read the totalInterfaces in use that for the length. You can also length as you want.
    Reply With Quote  
     

  3. #3  
    Banned

    Join Date
    Jun 2013
    Posts
    500
    Thanks given
    119
    Thanks received
    69
    Discord
    View profile
    Rep Power
    0
    Quote Originally Posted by knd6060 View Post
    Yes. RSInterfaces.java. Wherever you unpack the interfaces. There is an array of interfaces and the ids need to be in the bounds of that array.
    Code:
    public static void unpack(CacheArchive streamLoader,
    		TextDrawingArea textDrawingAreas[], CacheArchive streamLoader_1) {
    	fonts = textDrawingAreas;
    	spriteCache = new MemCache(50000);
    	Stream stream = new Stream(streamLoader.getDataForName("data"));
    	int parentId = -1;
    	int totalInterfaces = stream.readUnsignedShort();
    	interfaceCache = new RSInterface[85000];
    Normally you read the totalInterfaces in use that for the length. You can also length as you want.

    Thanks for the quick reply, spoken too Suic and he's told me the issue, it's because the packet that sends interface is an unsigned short so I'm gonna have too change that
    Reply With Quote  
     

  4. #4  
    nice


    Join Date
    Jul 2014
    Posts
    665
    Thanks given
    288
    Thanks received
    341
    Discord
    View profile
    Rep Power
    2952
    Quote Originally Posted by knd6060 View Post
    Yes. RSInterfaces.java. Wherever you unpack the interfaces. There is an array of interfaces and the ids need to be in the bounds of that array.
    Code:
    public static void unpack(CacheArchive streamLoader,
    		TextDrawingArea textDrawingAreas[], CacheArchive streamLoader_1) {
    	fonts = textDrawingAreas;
    	spriteCache = new MemCache(50000);
    	Stream stream = new Stream(streamLoader.getDataForName("data"));
    	int parentId = -1;
    	int totalInterfaces = stream.readUnsignedShort();
    	interfaceCache = new RSInterface[85000];
    Normally you read the totalInterfaces in use that for the length. You can also length as you want.
    thats wrong, if u read his post, he clearly says that nothing shows up, this has nothing to do with the interfaceCache array length / the id hes using, because he'd be getting an arrayindexoutofbounds exception if he used an id greater than the array's length when loading the client.
    issue is that hes sending the interface as unsigned short(or any of it's components), which supports values up to 2^16
    Reply With Quote  
     

  5. #5  
    Registered Member
    Grant_'s Avatar
    Join Date
    Aug 2014
    Posts
    493
    Thanks given
    93
    Thanks received
    109
    Rep Power
    136
    Quote Originally Posted by ZenithPS View Post
    Whenever I try make an interface with a high id(72080, 75503 both used in these cases) Nothing shows up but I can't click, is there something that prevents interfaces rendering past a certain id? Have had a look but I can't seem too find anything
    There are very very few cases where you need to extend even beyond 30k to find open interfaces. The occasion being for whatever reason need a space of 1k+ widgets. Everyone thinks it's just a shot in the dark guessing game hoping you either don't overwrite an interface or extend past what the packet can send as the interface value. Utilize this method below, which after loading up all previous interfaces will iterate to find the space you need to use. You will be very surprised to see just how much unused space there is within that array.

    Code:
    public static int findOpenInterface(int amount) {
    		int start = 0;
    		int found = 0;
    		for(int v = 0; v < interfaceCache.length; v++) {
    			if (interfaceCache[v] == null) {
    				start++;
    				if (amount == start) {
    					found = v;
    					break;
    				}
    			} else {
    				start = 0;
    			}
    		}
    		return found;
    	}
    Reply With Quote  
     

  6. Thankful user:


  7. #6  
    Banned

    Join Date
    Jun 2013
    Posts
    500
    Thanks given
    119
    Thanks received
    69
    Discord
    View profile
    Rep Power
    0
    Quote Originally Posted by Grant_ View Post
    There are very very few cases where you need to extend even beyond 30k to find open interfaces. The occasion being for whatever reason need a space of 1k+ widgets. Everyone thinks it's just a shot in the dark guessing game hoping you either don't overwrite an interface or extend past what the packet can send as the interface value. Utilize this method below, which after loading up all previous interfaces will iterate to find the space you need to use. You will be very surprised to see just how much unused space there is within that array.

    Code:
    public static int findOpenInterface(int amount) {
    		int start = 0;
    		int found = 0;
    		for(int v = 0; v < interfaceCache.length; v++) {
    			if (interfaceCache[v] == null) {
    				start++;
    				if (amount == start) {
    					found = v;
    					break;
    				}
    			} else {
    				start = 0;
    			}
    		}
    		return found;
    	}
    Thank you, have already made changes but I'll use this too fill in the missing gaps too make life easier anyways
    Reply With Quote  
     


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. GWD Killcount Interface with Zaros Killcount ID?
    By GeneralReposti in forum Requests
    Replies: 6
    Last Post: 05-24-2018, 05:22 AM
  2. Replies: 1
    Last Post: 04-22-2011, 05:11 AM
  3. Replies: 4
    Last Post: 07-24-2010, 09:15 AM
  4. Replies: 2
    Last Post: 09-07-2009, 08:29 PM
  5. Silab Items just don't show up.
    By Jeremy [Pwnage] in forum Help
    Replies: 0
    Last Post: 06-14-2009, 10:29 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
  •