Thread: Money Vault (First Interface I've Ever Made)

Page 1 of 3 123 LastLast
Results 1 to 10 of 26
  1. #1 Money Vault (First Interface I've Ever Made) 
    Registered Member Sheddy's Avatar
    Join Date
    Jul 2009
    Age
    31
    Posts
    1,053
    Thanks given
    56
    Thanks received
    89
    Rep Power
    69
    IF YOU DID THIS BEFORE 9/28/2013 REDO IT FOR HOVERBUTTON SUPPORT!

    This was the first interface, I have ever made from scratch. It needs some work, I'm still trying to find out how to drawClickedButtons but I think it's pretty nice for my first one.

    What You're Adding:

    Download these Sprites [REUPLOADED 8/18/14]
    MoneyVault.zip - 141 KB

    Okay now for the tutorial:

    First, In RSInterface.java add this Interface
    Code:
    public static void moneyTab(TextDrawingArea[] TDA) {
    		RSInterface intmoneyTab = addTab(8000);
    		 intmoneyTab.children = new int[11];
    		intmoneyTab.childX = new int[11];
    		intmoneyTab.childY = new int[11];
    		intmoneyTab.children[0] = 8001;
    		intmoneyTab.childX[0] = 0;
    		intmoneyTab.childY[0] = 0;
    		//Main sprite
    		addSprite(8001, 0, "Interfaces/MoneyVault/sidebar");
    		
    		intmoneyTab.children[1] = 8002;
    		intmoneyTab.childX[1] = 87;
    		intmoneyTab.childY[1] = 75;
    		addText(8002, "1", TDA, 0, 16750623, true, true);
    		
    		intmoneyTab.children[2] = 8003;
    		intmoneyTab.childX[2] = 130;
    		intmoneyTab.childY[2] = 92;
    		addHoverButton(8003, "Interfaces/MoneyVault/deposit", 0, 32, 32, "Deposit to Vault", 1803, 8004, 1);
    		
    		intmoneyTab.children[3] = 8004;
    		intmoneyTab.childX[3] = 130;
    		intmoneyTab.childY[3] = 92;
    		addHoveredButton(8004, "Interfaces/MoneyVault/deposit", 1, 32, 32, 8005);
    		
    		intmoneyTab.children[4] = 8006;
    		intmoneyTab.childX[4] = 17;
    		intmoneyTab.childY[4] = 204;
    		addHoverButton(8006, "Interfaces/MoneyVault/taxBag", 0, 32, 32, "Purchase a Tax Bag", -1, 8007, 1); //TODO: Change the tooltip text
    		
    		intmoneyTab.children[5] = 8007;
    		intmoneyTab.childX[5] = 17;
    		intmoneyTab.childY[5] = 204;
    		addHoveredButton(8007, "Interfaces/MoneyVault/taxBag", 1, 32, 32, 8008); //TODO: Change the tooltip text
    	
    		intmoneyTab.children[6] = 8009;
    		intmoneyTab.childX[6] = 130;
    		intmoneyTab.childY[6] = 204;
    		addHoverButton(8009, "Interfaces/MoneyVault/yellBubble", 0, 32, 32, "Purchase Yell Tickets", -1, 8010, 1); 
    		
    		intmoneyTab.children[7] = 8010;
    		intmoneyTab.childX[7] = 130;
    		intmoneyTab.childY[7] = 204;
    		addHoveredButton(8010, "Interfaces/MoneyVault/yellBubble", 1, 32, 32, 8011); 
    	
    		intmoneyTab.children[8] = 8012;
    		intmoneyTab.childX[8] = 20;
    		intmoneyTab.childY[8] = 94;
    		addHoverButton(8012, "Interfaces/MoneyVault/withDraw", 0, 32, 32, "Withdraw from Vault", 1804, 8013, 1);
    		
    		intmoneyTab.children[9] = 8013;
    		intmoneyTab.childX[9] = 20;
    		intmoneyTab.childY[9] = 94;
    		addHoveredButton(8013, "Interfaces/MoneyVault/withDraw", 1, 32, 32, 8014);
    		
    		intmoneyTab.children[10] = 8016;
    		intmoneyTab.childX[10] = 87;
    		intmoneyTab.childY[10] = 135;
    		addText(8016, "Balance", TDA, 0, 16750623, true, true);
    	}
    Also in RSInterface, add under "aClass44 = archive;"
    Code:
    moneyTab(textDrawingAreas);
    Now open Client.java and Search for
    Code:
    if(friendsListAction == 2 && friendsCount > 0) {
    under that If statement add these
    Code:
    if(interfaceButtonAction == 502 && promptInput.length() > 0) {
    						inputString = "::deposit "+promptInput;
    						System.out.println(inputString);
    						sendPacket(103);
    					}
    					if(interfaceButtonAction == 503 && promptInput.length() > 0) {
    						inputString = "::withdraw "+promptInput;
    						System.out.println(inputString);
    						sendPacket(103);
    					}
    Now still in Client.java search for
    Code:
    private boolean promptUserForInput(
    in that with the rest of these add these:
    Code:
    if(j == 1803) {
    			inputTaken = true;
    			messagePromptRaised = true;
    			amountOrNameInput = "";
    			inputDialogState = 0;
    			interfaceButtonAction = 502;
    			aString1121 = "Enter Amount to Deposit";
    		}
    		if(j == 1804) {
    			inputTaken = true;
    			messagePromptRaised = true;
    			amountOrNameInput = "";
    			inputDialogState = 0;
    			interfaceButtonAction = 503;
    			aString1121 = "Enter Amount to Withdraw";
    		}
    IF NEEDED: Declare this Int and Method
    Code:
    static int interfaceButtonAction = 0;
    	
    	void sendPacket(int packet) {
    			if (packet == 103) {
    			stream.createFrame(103);
    			stream.writeWordBigEndian(inputString.length() - 1);
    			stream.writeString(inputString.substring(2));
    			inputString = "";
    			promptInput = "";
    			interfaceButtonAction = 0;
    		}
    	}
    Thanks for viewing my post, I will be posting the Server - Sided part of this as soon as possible.

    Edit:

    Server Sided:
    http://www.rune-server.org/runescape...ml#post4174668
    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    Banned

    Join Date
    Apr 2013
    Posts
    1,456
    Thanks given
    341
    Thanks received
    148
    Rep Power
    0
    Hahhaah nice gonna use this insted of the money pouch as it has bugs and what are the last 2 buttons for ?


    Edit : Here is The tab icon i use
    Reply With Quote  
     

  4. #3  
    Registered Member
    Zivik's Avatar
    Join Date
    Oct 2007
    Age
    28
    Posts
    4,421
    Thanks given
    891
    Thanks received
    1,527
    Rep Power
    3285
    Quote Originally Posted by TheIronDoorProject View Post
    Hahhaah nice gonna use this insted of the money pouch as it has bugs and what are the last 2 buttons for ?


    Edit : Here is The tab icon i use
    Looking at the code, one is used for puchasing tax bags, and the other for purchasing yell tickets.

    OT: Good release, might use and make it into something else.

    Spoiler for Release:
    Quote Originally Posted by Downsx View Post
    This was the first interface, I have ever made from scratch. It needs some work, I'm still trying to find out how to drawClickedButtons but I think it's pretty nice for my first one.

    What You're Adding:

    Download these Sprites
    Download Money.Vault.zip @ UppIT

    Okay now for the tutorial:

    First, In RSInterface.java add this Interface
    Code:
    public static void moneyTab(TextDrawingArea[] TDA) {
    		RSInterface intmoneyTab = addTab(8000);
    		 intmoneyTab.children = new int[7];
    		intmoneyTab.childX = new int[7];
    		intmoneyTab.childY = new int[7];
    		intmoneyTab.children[0] = 8001;
    		intmoneyTab.childX[0] = 0;
    		intmoneyTab.childY[0] = 0;
    		//Main sprite
    		addSprite(8001, 0, "Interfaces/MoneyVault/sidebar");
    		//Control 8002 (0)
    		intmoneyTab.children[1] = 8002;
    		intmoneyTab.childX[1] = 87;
    		intmoneyTab.childY[1] = 75;
    		//Image
    		addText(8002, "1", TDA, 0, 16750623, true, true);
    		//Control 8003 (1)
    		intmoneyTab.children[2] = 8003;
    		intmoneyTab.childX[2] = 130;
    		intmoneyTab.childY[2] = 92;
    		//Button
    		addHoverButton(8003, "Interfaces/MoneyVault/deposit", 0, 32, 32, "Deposit to Vault", 1803, 8004, 1);
    		//Control 8005 (3)
    		intmoneyTab.children[3] = 8005;
    		intmoneyTab.childX[3] = 17;
    		intmoneyTab.childY[3] = 204;
    		//Button
    		addButton(8005, 0, "Interfaces/MoneyVault/taxBag", 32, 32, "Purchase a Tax Bag", 1); //TODO: Change the tooltip text
    		//Control 8006 (4)
    		intmoneyTab.children[4] = 8006;
    		intmoneyTab.childX[4] = 130;
    		intmoneyTab.childY[4] = 204;
    		//Button
    		addButton(8006, 0, "Interfaces/MoneyVault/yellBubble", 32, 32, "Purchase Yell Tickets", 1); //TODO: Change the tooltip text
    		//Control 8007 (5)
    		intmoneyTab.children[5] = 8007;
    		intmoneyTab.childX[5] = 20;
    		intmoneyTab.childY[5] = 94;
    		//Button
    		addHoverButton(8007, "Interfaces/MoneyVault/withDraw", 0, 32, 32, "Withdraw from Vault", 1804, 8007, 1);
    		//Control 8009 (7)
    		intmoneyTab.children[6] = 8009;
    		intmoneyTab.childX[6] = 87;
    		intmoneyTab.childY[6] = 135;
    		//Text
    		addText(8009, "Balance", TDA, 0, 16750623, true, true);
    		//Added 7 controls.
    		}
    Also in RSInterface, add under "aClass44 = archive;"
    Code:
    moneyTab(textDrawingAreas);
    Now open Client.java and Search for
    Code:
    if(friendsListAction == 2 && friendsCount > 0) {
    under that If statement add these
    Code:
    if(interfaceButtonAction == 502 && promptInput.length() > 0) {
    						inputString = "::deposit "+promptInput;
    						System.out.println(inputString);
    						sendPacket(103);
    					}
    					if(interfaceButtonAction == 503 && promptInput.length() > 0) {
    						inputString = "::withdraw "+promptInput;
    						System.out.println(inputString);
    						sendPacket(103);
    					}
    Now still in Client.java search for
    Code:
    private boolean promptUserForInput(
    in that with the rest of these add these:
    Code:
    if(j == 1803) {
    			inputTaken = true;
    			messagePromptRaised = true;
    			amountOrNameInput = "";
    			inputDialogState = 0;
    			interfaceButtonAction = 502;
    			aString1121 = "Enter Amount to Deposit";
    		}
    		if(j == 1804) {
    			inputTaken = true;
    			messagePromptRaised = true;
    			amountOrNameInput = "";
    			inputDialogState = 0;
    			interfaceButtonAction = 503;
    			aString1121 = "Enter Amount to Withdraw";
    		}
    IF NEEDED: Declare this Int and Method
    Code:
    static int interfaceButtonAction = 0;
    	
    	void sendPacket(int packet) {
    			if (packet == 103) {
    			stream.createFrame(103);
    			stream.writeWordBigEndian(inputString.length() - 1);
    			stream.writeString(inputString.substring(2));
    			inputString = "";
    			promptInput = "";
    			interfaceButtonAction = 0;
    		}
    	}
    Thanks for viewing my post, I will be posting the Server - Sided part of this as soon as possible.

    Edit:

    Server Sided:
    http://www.rune-server.org/runescape...ml#post4174668
    Reply With Quote  
     

  5. #4  
    Registered Member Sheddy's Avatar
    Join Date
    Jul 2009
    Age
    31
    Posts
    1,053
    Thanks given
    56
    Thanks received
    89
    Rep Power
    69
    Thanks for all the positive feedback guys!

    Quote Originally Posted by TheIronDoorProject View Post
    Hahhaah nice gonna use this insted of the money pouch as it has bugs and what are the last 2 buttons for ?


    Edit : Here is The tab icon i use
    Thanks for the Tab Icon, and It's used for Buying Tax Bags (Used as 1B Placeholders) and Yell Tickets (To Yell) you can change to whatever you want if you have better Idea's let me know and I'll release single buttons.
    Reply With Quote  
     

  6. #5  
    Banned

    Join Date
    Apr 2013
    Posts
    1,456
    Thanks given
    341
    Thanks received
    148
    Rep Power
    0
    Quote Originally Posted by Downsx View Post
    Thanks for all the positive feedback guys!



    Thanks for the Tab Icon, and It's used for Buying Tax Bags (Used as 1B Placeholders) and Yell Tickets (To Yell) you can change to whatever you want if you have better Idea's let me know and I'll release single buttons.
    Maybe make it so you can Quickchat how much Cash you have in the Vault would not be hard
    Reply With Quote  
     

  7. #6  
    Registered Member Sheddy's Avatar
    Join Date
    Jul 2009
    Age
    31
    Posts
    1,053
    Thanks given
    56
    Thanks received
    89
    Rep Power
    69
    Quote Originally Posted by TheIronDoorProject View Post
    Maybe make it so you can Quickchat how much Cash you have in the Vault would not be hard
    That would be nice, but I don't know if it'd be that useful considering it only holds max cash. Might look into it though.
    Reply With Quote  
     

  8. #7  
    Registered Member
    Morphine's Avatar
    Join Date
    Jul 2011
    Posts
    1,814
    Thanks given
    495
    Thanks received
    262
    Rep Power
    136
    wow nice. I like that.
    Reply With Quote  
     

  9. #8  
    Donator


    Join Date
    Aug 2010
    Posts
    3,174
    Thanks given
    1,724
    Thanks received
    2,002
    Rep Power
    3837
    For it being your first try and everything, it seems you put a fair amount of effort into it. So, good job.
    Reply With Quote  
     

  10. #9  
    Banned

    Join Date
    Apr 2013
    Posts
    1,456
    Thanks given
    341
    Thanks received
    148
    Rep Power
    0
    My Add Text wont work


    Lol dm
    Reply With Quote  
     

  11. #10  
    Banned
    Join Date
    Aug 2013
    Posts
    70
    Thanks given
    264
    Thanks received
    6
    Rep Power
    0
    It's nice but you know it's going to throw a nullpointer right . Then the client will look like this
    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: 1
    Last Post: 08-21-2012, 11:23 AM
  2. Rate My Best Brush I've Ever Made
    By Burkey in forum Showcase
    Replies: 14
    Last Post: 02-16-2008, 02:55 AM
  3. Replies: 16
    Last Post: 12-26-2007, 03:06 PM
  4. first photoshoped picture ive ever made:D
    By lattmjolk1 in forum Showcase
    Replies: 3
    Last Post: 11-09-2007, 11:25 PM
  5. All Of My Begginer Siggs I've ever Made
    By Numbers in forum Showcase
    Replies: 0
    Last Post: 06-07-2007, 07:46 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
  •