Thread: [Ruse] Updated Price Checker Interface

Results 1 to 3 of 3
  1. #1 [Ruse] Updated Price Checker Interface 
    no

    Join Date
    Aug 2016
    Posts
    576
    Thanks given
    95
    Thanks received
    78
    Rep Power
    210
    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);// was 10 so + 10
    	rsi.child(1, 18247, 472, 21);
    	addText(18350, "Total value:", tda, 0, 0xFFFFFF, false, true);
    	rsi.child(2, 18350, 225, 295); // Open Text
    	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
    Best excuse for scamming i've gotten yet

    Reply With Quote  
     

  2. Thankful user:


  3. #2  
    Developer

    Holy Symbol's Avatar
    Join Date
    Dec 2011
    Age
    21
    Posts
    1,738
    Thanks given
    1,024
    Thanks received
    224
    Rep Power
    195
    Thanks
    Spoiler for big sig:


    Reply With Quote  
     

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


Thread Information
Users Browsing this Thread

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

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
  •