Thread: [718 and 742] custom interface making issue

Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1 [718 and 742] custom interface making issue 
    Registered Member KingKenobi's Avatar
    Join Date
    Aug 2018
    Posts
    100
    Thanks given
    25
    Thanks received
    10
    Rep Power
    36
    So I made my first interface but I some issue with making the hidden component appear when you click on the menu on the left.
    Attached image
    Comp 21 is the menu on the left.
    Attached image
    All the comp in 21 should give access to comp (22, 69, 94, 118, 144, 169)

    I don't know if anyone can help me?

    Attached image
    Attached image
    Reply With Quote  
     

  2. #2  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,788
    Thanks given
    706
    Thanks received
    702
    Rep Power
    570
    Can you clarify the question? I'm not sure what you mean by "All the comp in 21 should give access to comp (22, 69, 94, 118, 144, 169)". Are you trying to say that depending on which option you select on the left menu, different components appear in the 2 right columns?
    Project thread
    Reply With Quote  
     

  3. #3  
    Registered Member KingKenobi's Avatar
    Join Date
    Aug 2018
    Posts
    100
    Thanks given
    25
    Thanks received
    10
    Rep Power
    36
    Quote Originally Posted by clem585 View Post
    Can you clarify the question? I'm not sure what you mean by "All the comp in 21 should give access to comp (22, 69, 94, 118, 144, 169)". Are you trying to say that depending on which option you select on the left menu, different components appear in the 2 right columns?
    Yea not really clear I want then you press on the left that it open a diff comp en the right kind of like the old inter 813
    Like having category on the left that open teleport menu on the right. I already have the component made. I just need to link then to the left menu
    Attached image
    Reply With Quote  
     

  4. #4  
    Onyxia

    Sagacity's Avatar
    Join Date
    Dec 2012
    Age
    27
    Posts
    727
    Thanks given
    335
    Thanks received
    98
    Rep Power
    160
    This is code-wise, you must create some kind of pagination variable (player.setTemporaryAtributtes("PAGE"), 0) cause this must be stored per player, and having a normal variable would cause issues per-player, that way you must use a Temporary Atributte, then whenever you click a button on the left-panel (which you called as that) you must change the screen state to another one (for example page 1) (player.setTemporaryAtributtes("PAGE"), 1), which will change the button's behavior to do another action instead of the action which happens when you're on the page 0, do u understand? Its not that difficult. You can see some of my open-source snippets of some interfaces I made throughout my career, These codes are no way the best, but will give you idea and inspiration on how to proceed with paginated based interfaces backends.

    Here is the link: https://github.com/wyvern800/rsps-snippets
    Where I use pagination (Tab.java): https://github.com/wyvern800/RSPS-Sn...r/achievements

    Check out my 667/718 Interfaces services, I have more than 25 vouches and will be happy to help you out for affordable prices
    Attached image
    Reply With Quote  
     

  5. #5  
    Registered Member KingKenobi's Avatar
    Join Date
    Aug 2018
    Posts
    100
    Thanks given
    25
    Thanks received
    10
    Rep Power
    36
    IDK if I miss out something... The hidden component doesn't even show up and not click get register in debug... the buttons don't work at all

    ButtonHandler.java
    Code:
    if (interfaceId == 1370) {
    			if (Settings.DEBUG) {
    				System.out.println(packetId + " and comp id: " + componentId + " and slot id: " + slotId);
    			}
    			int selection = InterfaceManager.getPlayerInterfaceSelectedNew();
    			if (selection == 1) {
    				BossTeleportsNew.handleInterface(player, componentId);
    			}
    		}
    InterfaceManager.java
    Code:
        public static int getPlayerInterfaceSelectedNew() {
            return playerSelected1370;
        }
    
        public static int setPlayerInterfaceSelectedNew(int value) {
            return playerSelected1370 = value;
        }
    
        public static int playerSelected1370 = 0;

    The interface code ( Note finished but should be working. Only showing text component works)
    Code:
    /**
     * @author kingkenobi.
     */
    public class BossTeleportsNew {
    
    
    	public static void sendInterface(Player player) {
    		player.getInterfaceManager().closeChatBoxInterface();
    		player.getInterfaceManager().sendInterface(1370);
    		
    		/** Logo side Sprite **/
    		player.getPackets().sendIComponentSprite(1370, 23, 1364);
    		player.getPackets().sendIComponentSprite(1370, 24, 1364);
    		/** Left side hidden button **/
    		/* 2e */player.getPackets().sendHideIComponent(1370, 35, true);
    		/* 3e */player.getPackets().sendHideIComponent(1370, 37, true);
    		/* 4e */player.getPackets().sendHideIComponent(1370, 39, true);
    		/* 5e */player.getPackets().sendHideIComponent(1370, 41, true);
    		/* 6e */player.getPackets().sendHideIComponent(1370, 43, true);
    		
    		/** Main Text **/
    		player.getPackets().sendIComponentText(1370, 194, Colors.yellow + "Boss Teleport");
    		player.getPackets().sendIComponentText(1370, 195, Colors.yellow + "Where would you like to go?");
    		
    		
    		/** Left Menu **/		
    		player.getPackets().sendIComponentText(1370, 34, Colors.yellow + "Tier I");
    		player.getPackets().sendIComponentText(1370, 36, Colors.yellow + "Tier II"); 
    		player.getPackets().sendIComponentText(1370, 38, Colors.yellow + "Tier III"); 
    		player.getPackets().sendIComponentText(1370, 40, Colors.yellow + "Tier IV"); 
    		player.getPackets().sendIComponentText(1370, 42, Colors.yellow + "Tier V"); 
    		player.getPackets().sendIComponentText(1370, 44, Colors.yellow + "Tier VI"); 
    		
    		/** First Menu on right **/
    		/** Comp 22 **/
    		player.getPackets().sendIComponentText(1370, 46, Colors.yellow + "first interface");
    		player.getPackets().sendIComponentText(1370, 48, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 50, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 52, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 54, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 56, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 58, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 60, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 62, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 64, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 66, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 68, Colors.yellow + "");
    		
    		/** First Menu on right **/
    		/** Comp 69 **/
    		player.getPackets().sendIComponentText(1370, 71, Colors.yellow + "Second");
    		player.getPackets().sendIComponentText(1370, 73, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 75, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 77, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 79, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 81, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 83, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 85, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 87, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 89, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 91, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 93, Colors.yellow + "");
    
    		/** First Menu on right **/
    		/** Comp 94 **/
    		player.getPackets().sendIComponentText(1370, 96, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 98, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 100, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 102, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 104, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 106, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 108, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 110, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 112, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 114, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 116, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 118, Colors.yellow + "");
    
    		/** First Menu on right **/
    		/** Comp 119 **/
    		player.getPackets().sendIComponentText(1370, 121, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 123, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 125, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 127, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 129, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 131, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 133, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 135, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 137, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 139, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 141, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 143, Colors.yellow + "");
    
    		/** First Menu on right **/
    		/** Comp 144 **/
    		player.getPackets().sendIComponentText(1370, 146, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 148, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 150, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 152, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 154, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 156, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 158, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 160, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 162, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 164, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 166, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 168, Colors.yellow + "");
    
    		/** First Menu on right **/
    		/** Comp 169 **/
    		player.getPackets().sendIComponentText(1370, 170, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 172, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 174, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 176, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 178, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 180, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 182, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 184, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 186, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 188, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 190, Colors.yellow + "");
    		player.getPackets().sendIComponentText(1370, 192, Colors.yellow + "");
    
    
    	}
    
    	/**
    	 * Handles the actual interfaces buttons.
    	 * 
    	 *   @Param player
    	 *            The players interface to handle.
    	 *   @Param componentId
    	 *            The players interface pressed component ID.
    	 */
    	public static void handleInterface(Player player, int componentId) {
    		InterfaceManager.setPlayerInterfaceSelectedNew(1);
    		player.getInterfaceManager().closeChatBoxInterface();
    	
    		
            /** Left Menu **/
    		if (componentId == 33 || componentId == 34) {
    		    player.getPackets().sendGameMessage("Button working");
                        player.getPackets().sendHideIComponent(1370, 22, true);
    		}
    		if (componentId == 36 || componentId == 35) {
    		    player.getPackets().sendGameMessage("Button working");
                        player.getPackets().sendHideIComponent(1370, 69, true);
    		}
    		if (componentId == 36 || componentId == 37) {	
    		}
    		if (componentId == 38 || componentId == 39) {	
    		}
    		if (componentId == 40 || componentId == 41) {	
    		}
    		if (componentId == 42 || componentId == 43) {	
    		}
    		
    		/* First Right Menu */
    		if (componentId == 45 || componentId == 46) {
    			
    		}
    		if (componentId == 47 || componentId == 48) {
    			
    		}
    		if (componentId == 49 || componentId == 50) {
    			
    		}
    		if (componentId == 51 || componentId == 52) {
    			
    		}
    		if (componentId == 53 || componentId == 54) {
    			
    		}
    		if (componentId == 55 || componentId == 56) {
    			
    		}
    		if (componentId == 57 || componentId == 58) {
    			
    		}
    		if (componentId == 59 || componentId == 60) {
    			
    		}
    		if (componentId == 61 || componentId == 62) {
    			
    		}
    		if (componentId == 63 || componentId == 64) {
    			
    		}
    		if (componentId == 65 || componentId == 66) {
    			
    		}
    		if (componentId == 67 || componentId == 68) {
    			
    		}
    		if (componentId == 69 || componentId == 70) {
    			
    		}
    		
    		
    		
    	}
    	public static void teleportPlayer(Player player, final int placeX, final int placeY, final int placePlane,
    			String controller) {
    		Magic.vineTeleport(player, new WorldTile(placeX, placeY, placePlane));
    		final WorldTile teleTile = new WorldTile(placeX, placeY, placePlane);
    		if (!player.getControlerManager().processMagicTeleport(teleTile))
    			return;
    		player.lock(4);
    		player.stopAll();
    		player.setNextGraphics(new Graphics(1229));
    		player.setNextAnimation(new Animation(7082));
    
    		WorldTasksManager.schedule(new WorldTask() {
    
    			@Override
    			public void run() {
    				player.setNextAnimation(new Animation(7084));
    				player.setNextGraphics(new Graphics(1228));
    				player.setNextWorldTile(teleTile);
    				player.getControlerManager().magicTeleported(Magic.MAGIC_TELEPORT);
    				player.checkMovement(placeX, placeY, placePlane);
    				if (player.getControlerManager().getControler() == null)
    					Magic.teleControlersCheck(player, teleTile);
    				if (controller != null)
    					player.getControlerManager().startControler(controller);
    				player.unlock();
    				stop();
    			}
    		}, 4);
    	}
    }
    Attached image
    Reply With Quote  
     

  6. #6  
    Registered Member Fallore's Avatar
    Join Date
    Jan 2019
    Age
    28
    Posts
    49
    Thanks given
    9
    Thanks received
    15
    Rep Power
    40
    The answer has been given by sagacity.

    If you just want hidden components to show up, write code in the buttonhandler to make the hidden components visible while clicking on a certain component.
    Else just do what sagacity said, temporary attributes.

    There are more ways of doing this with scripts as well.
    Reply With Quote  
     

  7. #7  
    Registered Member KingKenobi's Avatar
    Join Date
    Aug 2018
    Posts
    100
    Thanks given
    25
    Thanks received
    10
    Rep Power
    36
    Code:
    if (componentId == 33 || componentId == 34) {
    		    player.getPackets().sendGameMessage("Button working");
                        player.getPackets().sendHideIComponent(1370, 22, true);
    		}
    		if (componentId == 36 || componentId == 35) {
    		    player.getPackets().sendGameMessage("Button working");
                        player.getPackets().sendHideIComponent(1370, 69, true);
    		}
    Thats what i did but there is no respond from the button

    Even on Debug I don't get anything
    buttonhandler.java
    Code:
    	if (interfaceId == 1370) {
    			if (Settings.DEBUG) {
    				System.out.println(packetId + " and comp id: " + componentId + " and slot id: " + slotId);
    			}
    			int selection = InterfaceManager.getPlayerInterfaceSelectedNew();
    			if (selection == 1) {
    				BossTeleportsNew.handleInterface(player, componentId);
    			}
    		}
    Attached image
    Reply With Quote  
     

  8. #8  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,788
    Thanks given
    706
    Thanks received
    702
    Rep Power
    570
    Quote Originally Posted by KingKenobi View Post
    Code:
    if (componentId == 33 || componentId == 34) {
    		    player.getPackets().sendGameMessage("Button working");
                        player.getPackets().sendHideIComponent(1370, 22, true);
    		}
    		if (componentId == 36 || componentId == 35) {
    		    player.getPackets().sendGameMessage("Button working");
                        player.getPackets().sendHideIComponent(1370, 69, true);
    		}
    Thats what i did but there is no respond from the button

    Even on Debug I don't get anything
    buttonhandler.java
    Code:
    	if (interfaceId == 1370) {
    			if (Settings.DEBUG) {
    				System.out.println(packetId + " and comp id: " + componentId + " and slot id: " + slotId);
    			}
    			int selection = InterfaceManager.getPlayerInterfaceSelectedNew();
    			if (selection == 1) {
    				BossTeleportsNew.handleInterface(player, componentId);
    			}
    		}
    What are your unlock settings for your components? There's a 32-bit int associated with every component, usually called "unlockSettings". You need to turn on certain bits in order for the server to receive a packet when the user clicks. Otherwise, all the clicks are ignored.
    Project thread
    Reply With Quote  
     

  9. #9  
    Registered Member KingKenobi's Avatar
    Join Date
    Aug 2018
    Posts
    100
    Thanks given
    25
    Thanks received
    10
    Rep Power
    36
    Not too sure what you mean with the settings of component you mean script?
    Where can i see the bit int the component use?

    Attached image
    Attached image

    Quote Originally Posted by clem585 View Post
    What are your unlock settings for your components? There's a 32-bit int associated with every component, usually called "unlockSettings". You need to turn on certain bits in order for the server to receive a packet when the user clicks. Otherwise, all the clicks are ignored.
    Code:
    		int interfaceHash = stream.readIntV2();
    		int interfaceId = interfaceHash >> 16;	
    		if (Utils.getInterfaceDefinitionsSize() <= interfaceId) {
    final int componentId = interfaceHash & 0xffff;
    i guess it's using 16?

    And if I want to change it for the new interface how can I do it?
    Attached image
    Reply With Quote  
     

  10. #10  
    van 't stad

    Shnek's Avatar
    Join Date
    Oct 2013
    Posts
    1,065
    Thanks given
    343
    Thanks received
    297
    Rep Power
    109
    When you use my editor, you don't need to enable any component settings. Using the hide packet should 100% work. If it doesn't work maybe check if your packet is actually working
    Attached image

    Do not use the vps from ovh, blocking vps without reason and no customer support
    Reply With Quote  
     

  11. Thankful user:


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: 18
    Last Post: 03-03-2022, 09:37 PM
  2. Replies: 136
    Last Post: 07-13-2014, 01:49 AM
  3. Replies: 5
    Last Post: 06-09-2014, 04:54 PM
  4. Replies: 32
    Last Post: 01-26-2014, 01:39 AM
  5. Making and adding custom interfaces
    By finalspeced in forum Help
    Replies: 0
    Last Post: 09-25-2010, 02:28 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
  •