Thread: [Ruse] Updated Price Checker Interface

Results 1 to 7 of 7
  1. #1 [Ruse] Updated Price Checker Interface 
    Extreme Donator


    Join Date
    Aug 2016
    Posts
    597
    Thanks given
    109
    Thanks received
    96
    Rep Power
    254
    The original interface only supports 20 items and the client code is unnecessarily long (120 lines). This updated version supports all 28 inventory spots along with a button to add your entire inventory at once (30 lines)

    Code:
    private void priceCheckerInterface() {
    	RSInterface rsi = addTabInterface(42000);
    	addSpriteLoader(18245, 654);
    	addCloseButton(18247, 18535, 18536);
    	addItemOnInterface(18246, 4393, new String[] {"Remove 1", "Remove 5", "Remove 10", "Remove All", "Remove X"});
    	rsi.totalChildren(61);
    	rsi.child(0, 18245, 10, 20);
    	rsi.child(1, 18247, 472, 21);
    	addText(18350, "Total value:", tda, 0, 0xFFFFFF, false, true);
    	rsi.child(2, 18350, 225, 295); 
    	addText(18351, "0", tda, 0, 0xFFFFFF, true, true);
    	rsi.child(3, 18351, 251, 306);
    	
    	int x = 40;
    	int child = 4;
    	for(int i = 0; i < 28; i++) {
    		if(i == 7 || i == 14 || i == 21) 
    			x = 40;
    		int y = i < 7 ? 50 : i >= 7 && i < 14 ? 100 : i >= 14 && i < 21 ? 150 : 200;
    		int yy = i < 7 ? 80 : i >= 7 && i < 14 ? 130 : i >= 14 && i < 21 ? 180 : 230;
    		addItemOnInterface(18500 + i, 4393, new String[] {"Remove 1", "Remove 5", "Remove 10", "Remove All", "Remove X"});
    		addText(18352 + i, "", tda, 0, 0xFFFFFF, false, true);
    		rsi.child(child, 18500 + i, x, y);
    		child++;
    		rsi.child(child, 18352 + i, x + 5, yy);
    		child++;
    		x += 65;
    	}
    	addButtonWSpriteLoader(18537, 444, "Inventory", Client.cacheSprite[444].myWidth, Client.cacheSprite[444].myHeight);
    	rsi.child(child, 18537, 440, 294);
    }
    What you're adding
    Attached image
    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    Developer

    Holy Symbol's Avatar
    Join Date
    Dec 2011
    Age
    25
    Posts
    1,763
    Thanks given
    1,093
    Thanks received
    239
    Rep Power
    365
    Thanks
    Spoiler for big sig:


    Reply With Quote  
     

  4. #3  
    Registered Member
    Join Date
    Jul 2018
    Posts
    7
    Thanks given
    0
    Thanks received
    1
    Rep Power
    0
    not working "tda not found"
    Reply With Quote  
     

  5. #4  
    Extreme Donator


    Join Date
    Aug 2016
    Posts
    597
    Thanks given
    109
    Thanks received
    96
    Rep Power
    254
    Quote Originally Posted by WebTurva View Post
    not working "tda not found"
    tda is the variable for TextDrawingArea. It might be called something else on your client, but if it's ruse I doubt it. You can add it in the parameters and it will probably fix it

    Code:
    private void priceCheckerInterface(TextDrawingArea[] tda) {
    Reply With Quote  
     

  6. #5  
    Im an albatraoz

    Nand0's Avatar
    Join Date
    Feb 2010
    Age
    31
    Posts
    948
    Thanks given
    233
    Thanks received
    128
    Rep Power
    241
    do you happen to have the sprites?
    i cba browsing a dump haha



    Looking for blazing fast and affordable vps or web hosting?
    AllGeniusHost



    Reply With Quote  
     

  7. #6  
    Community Veteran

    Dexter Morgan's Avatar
    Join Date
    Nov 2008
    Age
    28
    Posts
    4,419
    Thanks given
    1,184
    Thanks received
    757
    Rep Power
    3098
    That method you got there creates an item container of 1x1 so you'll have to send 28 item containers instead of 1 container by 7 x 4
    Reply With Quote  
     

  8. Thankful users:


  9. #7  
    Banned
    Join Date
    Aug 2010
    Posts
    208
    Thanks given
    7
    Thanks received
    13
    Rep Power
    0
    Quote Originally Posted by Dexter Morgan View Post
    That method you got there creates an item container of 1x1 so you'll have to send 28 item containers instead of 1 container by 7 x 4
    What exactly does this mean? Also, does this pose any issues while using pricechecker ingame or does this only effect memory use and/or efficiency.

    Attached image
    https://imgur.com/QEZWqIs

    -As you can see it still only allow you to place 20 items on the interface even though there is room for 28.
    -Not all of the spots show prices and most of them are scrambled anyhow
    -Removing / adding x1, x5, x10, ALL, and X are all scrambled and don't work properly
    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. Price checker interface[NON-RENAMED]
    By Programmer Jeff in forum Snippets
    Replies: 43
    Last Post: 11-15-2010, 05:31 AM
  2. [interface]Price checker interface
    By Greg in forum Tutorials
    Replies: 9
    Last Post: 07-17-2010, 03:37 PM
  3. Price checker interface[NON-RENAMED]
    By Programmer Jeff in forum Tutorials
    Replies: 39
    Last Post: 07-11-2009, 12:39 AM
  4. PRice checker interface
    By Richard1992 in forum Show-off
    Replies: 14
    Last Post: 05-09-2009, 07:02 PM
  5. New price-checker interface
    By pkerscape21 in forum Show-off
    Replies: 26
    Last Post: 04-20-2009, 10:05 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •