Thread: Custom option Interface

Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1 Custom option Interface 
    Donator

    Jason's Avatar
    Join Date
    Aug 2009
    Posts
    6,092
    Thanks given
    2,402
    Thanks received
    2,823
    Rep Power
    4550
    Updated graphics a bit cause of all those haters'

    Media:
    [SPOIL]
    Updated

    Simple hovering

    [/SPOIL]

    Client Sided

    [SPOIL]
    RSInterface.java
    Code:
    	public static void teleportInterface(RSFont[] TDA) {
    	RSInterface tab = addTab(28300);
    	addSprite(28301, 8, "Interfaces/Teleport/IMAGE");
    	addText(28302, "Title", 0xFFA500, false, true, 52,TDA, 1);
    	addText(28303, "Option 1", 0xFFA500, false, true, 52,TDA, 1);
    	addText(28304, "Option 2", 0xFFA500, false, true, 52,TDA, 1);
    	addText(28305, "Option 3", 0xFFA500, false, true, 52,TDA, 1);
    	addText(28306, "Option 4", 0xFFA500, false, true, 52,TDA, 1);
    	addHoverButton(28307, "Interfaces/Teleport/IMAGE", 2, 22, 22, "Click to teleport to location", 0, 28308, 1);
    	addHoveredButton(28308, "Interfaces/Teleport/IMAGE", 3, 22, 22, 28350);
    	addHoverButton(28309, "Interfaces/Teleport/IMAGE", 2, 22, 22, "Click to teleport to location", 0, 28310, 1);
    	addHoveredButton(28310, "Interfaces/Teleport/IMAGE", 3, 22, 22, 28351);
    	addHoverButton(28311, "Interfaces/Teleport/IMAGE", 2, 22, 22, "Click to teleport to location", 0, 28312, 1);
    	addHoveredButton(28312, "Interfaces/Teleport/IMAGE", 3, 22, 22, 28352);
    	addHoverButton(28313, "Interfaces/Teleport/IMAGE", 2, 22, 22, "Click to teleport to location", 0, 28314, 1);
    	addHoveredButton(28314, "Interfaces/Teleport/IMAGE", 3, 22, 22, 28353);
    	addHoverButton(28315, "Interfaces/Teleport/IMAGE", 4, 16, 15, "Click to close window", 0, 28316, 1);
    	addHoveredButton(28316, "Interfaces/Teleport/IMAGE", 5, 16, 15, 28354);
    	addHoverButton(28317, "Interfaces/Teleport/IMAGE", 6, 16, 16, "Click to return to the previous window", 0, 28318, 1);
    	addHoveredButton(28318, "Interfaces/Teleport/IMAGE", 7, 16, 16, 28355);
    	tab.totalChildren(18);
    	tab.child(0, 28301, 85, 80);
    	tab.child(1, 28302, 215, 86);
    	tab.child(2, 28303, 222, 129);
    	tab.child(3, 28304, 222, 153);
    	tab.child(4, 28305, 222, 177);
    	tab.child(5, 28306, 222, 201);
    	tab.child(6, 28307, 374, 127);
    	tab.child(7, 28308, 374, 127);
    	tab.child(8, 28309, 374, 151);
    	tab.child(9, 28310, 374, 151);
    	tab.child(10, 28311, 374, 175);
    	tab.child(11, 28312, 374, 175);
    	tab.child(12, 28313, 374, 199);
    	tab.child(13, 28314, 374, 199);
    	tab.child(14, 28315, 419, 83);
    	tab.child(15, 28316, 419, 83);
    	tab.child(16, 28317, 88, 83);
    	tab.child(17, 28318, 88, 83);
    	}
    Still in RSInterface, under
    Code:
    aClass44 = archive;
    add
    Code:
    teleportInterface(rsFonts);
    [/SPOIL]

    Server sided

    [SPOIL]
    Declare in your player class
    Code:
    teleInterface
    Add this to ClickingButtons or create a new class to handle just this interface since there is a decent amount of code.

    Code:
    			case 110147:
    				switch(c.teleInterface) {
    					case 1:
    					c.getPA().startTeleport(2605, 3153, 0, "modern");
    					c.sendMessage("You teleport to Penance Assault.");
    					break;
    					
    					case 2:
    						c.teleInterface = 3;
    						c.getPA().updateTeleInterface();
    						c.getPA().showInterface(28300);
    					break;
    					
    					case 3:
    					c.getPA().startTeleport(3080, 3488,0, "modern");
    					c.sendMessage("Welcome to the city of Edgeville.");
    					break;
    				}
    			break;
    			
    			case 110149:
    				switch(c.teleInterface) {
    					case 1:
    						c.getPA().startTeleport(2870, 3546, 0, "modern");
    						c.sendMessage("You teleport to the Warrior Guild.");
    					break;
    					case 2:
    						c.getPA().startTeleport(2712, 9564, 0, "modern");
    						c.sendMessage("Welcome to the training area");
    					break;
    					case 3:
    						c.getPA().startTeleport(2980, 3597, 0, "modern");
    						c.sendMessage("You teleport to West Dragons.");
    					break;
    				}
    			break;
    			
    			case 110151:
    				switch(c.teleInterface) {
    					case 2:
    						c.teleInterface = 1;
    						c.getPA().updateTeleInterface();
    						c.getPA().showInterface(28300);
    					break;
    					case 3:
    						c.getPA().startTeleport(3353, 3646, 0, "modern");
    						c.sendMessage("You teleport to East Dragons.");
    					break;
    				}
    			break;
    			
    			case 110153:
    				switch(c.teleInterface) {
    					case 2:
    						c.getPA().startTeleport(3183, 3439, 0, "modern");
    						c.sendMessage("Welcome to the shopping center.");
    					break;
    					case 3:
    						c.getPA().startTeleport(3246, 3430, 0, "modern");
    						c.sendMessage("Welcome to the city of Varrock.");
    					break;
    				}
    			break;
    			
    			case 110155:
    				c.getPA().removeAllWindows();
    			break;
    			
    			case 110157:
    				if(c.teleInterface == 1) {
    					c.teleInterface = 2;
    				} else if(c.teleInterface == 3) {
    					c.teleInterface = 2;
    				}
    				c.getPA().updateTeleInterface();
    			break;
    Now in your PlayerAssistant class add this method

    Code:
    	public void updateTeleInterface() { //@Gohan
    	       /*
    		*  Teleport string names
    		*/
    		String[][] name = {
    		{"@blu@Minigames", "Penance Assault", "Warrior Guild"},
    		{"@blu@Select an option", "Player Killing", "Training", "Mini Games", "Shop Center"},
    		{"@blu@Player Killing", "Edgeville", "West Dragons", "East Dragons", "Varrock"},
    		{""}};
    		switch(c.teleInterface) {
    		case 1: // Minigames
    				c.getPA().sendFrame126(name[0][0], 28302);
    				c.getPA().sendFrame126(name[0][1], 28303);
    				c.getPA().sendFrame126(name[0][2], 28304);
    				c.getPA().sendFrame126("", 28305);
    				c.getPA().sendFrame126("", 28306);
    				break;
    		case 2: // Pking, Training, Minigames, Shop Center
    				c.getPA().sendFrame126(name[1][0], 28302);
    				c.getPA().sendFrame126(name[1][1], 28303);
    				c.getPA().sendFrame126(name[1][2], 28304);
    				c.getPA().sendFrame126(name[1][3], 28305);
    				c.getPA().sendFrame126(name[1][4], 28306);
    				break;
    		case 3: // Player Killing
    				c.getPA().sendFrame126(name[2][0], 28302);
    				c.getPA().sendFrame126(name[2][1], 28303);
    				c.getPA().sendFrame126(name[2][2], 28304);
    				c.getPA().sendFrame126(name[2][3], 28305);
    				c.getPA().sendFrame126(name[2][4], 28306);
    				break;
    		}
    	}
    [/SPOIL]
    Updated[1/21/12]
    Sprites
    Mirror link

    I'm pretty sure thats all of it, I could have forgotton something just post errors and i'll fix. It's been working for a bit now and i've had no problems with it. Have fun and I hope you enjoy it.
    Reply With Quote  
     

  2. #2  
    The One And Only

    01053's Avatar
    Join Date
    Apr 2011
    Age
    28
    Posts
    2,887
    Thanks given
    417
    Thanks received
    885
    Rep Power
    856
    Looks horrible but nice I guess.


    Reply With Quote  
     

  3. #3  
    Donator

    Jason's Avatar
    Join Date
    Aug 2009
    Posts
    6,092
    Thanks given
    2,402
    Thanks received
    2,823
    Rep Power
    4550
    Quote Originally Posted by 01053 View Post
    Looks horrible but nice I guess.
    I agree, it does look quite sloppy. Any ideas on how to improve?
    Reply With Quote  
     

  4. #4  
    The One And Only

    01053's Avatar
    Join Date
    Apr 2011
    Age
    28
    Posts
    2,887
    Thanks given
    417
    Thanks received
    885
    Rep Power
    856
    Quote Originally Posted by Gohan View Post
    I agree, it does look quite sloppy. Any ideas on how to improve?
    Use better sprites make the background smaller so there isn't alot of blank space and use better sprites for the buttons part like ticks ect. Good luck


    Reply With Quote  
     

  5. #5  
    Donator

    Jason's Avatar
    Join Date
    Aug 2009
    Posts
    6,092
    Thanks given
    2,402
    Thanks received
    2,823
    Rep Power
    4550
    Quote Originally Posted by 01053 View Post
    Use better sprites make the background smaller so there isn't alot of blank space and use better sprites for the buttons part like ticks ect. Good luck
    What do you mean better sprites? they're ripped straight from a 634. I agree the buttons shoud be changed, and what do you mean by ticks?
    Reply With Quote  
     

  6. #6  
    Donator


    Join Date
    Mar 2011
    Posts
    2,350
    Thanks given
    1,193
    Thanks received
    824
    Rep Power
    856
    He means the hover/click over the little circles.

    OT: Good job, I like the idea just not the interface itself.
    Reply With Quote  
     

  7. #7  
    Donator

    Jason's Avatar
    Join Date
    Aug 2009
    Posts
    6,092
    Thanks given
    2,402
    Thanks received
    2,823
    Rep Power
    4550
    Quote Originally Posted by Jerba View Post
    He means the hover/click over the little circles.

    OT: Good job, I like the idea just not the interface itself.
    Alright, I'll clean it up today and re-do it since there wasn't much effor put into the graphical aspect of it.

    EDIT: Finished editing sprites positions, and made some graphical updates with the two swords mimicking one of RuneScape's old dialogue Interfaces (Not literally). Hope this is a little better for you.
    Reply With Quote  
     

  8. #8  
    Donator

    Jason's Avatar
    Join Date
    Aug 2009
    Posts
    6,092
    Thanks given
    2,402
    Thanks received
    2,823
    Rep Power
    4550
    Bumpcicle
    Reply With Quote  
     

  9. #9  
    Registered Member
    heavenlydreams's Avatar
    Join Date
    Aug 2011
    Age
    30
    Posts
    434
    Thanks given
    8
    Thanks received
    27
    Rep Power
    114
    Quote Originally Posted by Gohan View Post
    I agree, it does look quite sloppy. Any ideas on how to improve?
    Should but some pictures ya know?
    OT: Nice job on the interface hope you can release more
    “Is it a crime to fight for what is mine?”
    ― Tupac Shakur

    I don't have no fear of death. My only fear is coming back reincarnated.
    ― Tupac Shakur

    Reply With Quote  
     

  10. Thankful user:


  11. #10  
    Registered Member
    Join Date
    Jan 2012
    Posts
    26
    Thanks given
    1
    Thanks received
    0
    Rep Power
    11
    cant find aclass44 = archive in RSInterface.java, i am useing galkons refactored client. any ideas?
    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: 2
    Last Post: 10-05-2011, 11:42 PM
  2. Replies: 0
    Last Post: 01-20-2011, 02:06 AM
  3. Replies: 7
    Last Post: 12-26-2010, 12:54 PM
  4. Replies: 6
    Last Post: 01-10-2010, 05:36 PM
  5. New Option Interface
    By Proffessor Oak in forum Show-off
    Replies: 20
    Last Post: 12-08-2009, 06:43 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
  •