Thread: Can't add more text Strings?

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1 Can't add more text Strings? 
    Registered Member
    Join Date
    Mar 2019
    Posts
    57
    Thanks given
    3
    Thanks received
    2
    Rep Power
    13
    Test, Test2, and Test3 do not appear on quest tab interface.

    Using interface 29400

    The following code is QuestTab.java

    Code:
    package com.vencillio.rs2.content.interfaces.impl;
    
    import com.vencillio.VencillioConstants;
    import com.vencillio.Server;
    import com.vencillio.core.util.Utility;
    import com.vencillio.rs2.content.interfaces.InterfaceHandler;
    import com.vencillio.rs2.entity.World;
    import com.vencillio.rs2.entity.player.Player;
    import com.vencillio.rs2.entity.player.net.out.impl.SendColor;
    
    /**
     * Handles the quest tab text
     * @author Daniel
     *
     */
    public class QuestTab extends InterfaceHandler {
    	
    	public QuestTab(Player player) {
    		super(player);
    		color(16, 0xC71C1C);
    		color(17, 0xC71C1C);
    	}
    	
    	public void color(int id, int color) {
    		player.send(new SendColor(startingLine() + id, color));
    	}
    	
    	private final String[] text = {
    			"@or1@        [ @lre@Game Information @or1@]",
    			"@or2@Online Player(s): @whi@" + World.getActivePlayers(),		
    			"@or2@Online Staff(s): @whi@" + World.getStaff(),
    			"@or2@Online Player Record: @whi@" + VencillioConstants.MOST_ONLINE,
    			"@or2@Time: @whi@"+ Utility.getCurrentServerTime(),
    			"@or2@Date: @whi@"+ Server.vencillioDate(),
    			"@or2@Uptime: @whi@"+ Server.getUptime(),
    			"@or2@Votes: @whi@" + Utility.format(VencillioConstants.CURRENT_VOTES),
    			"@or2@Last Voter: @whi@" + Utility.formatPlayerName(VencillioConstants.LAST_VOTER) ,
    			"@or2@Vesion: @whi@" + VencillioConstants.VERSION,
    			"",
    			"@or1@        [ @lre@Player Information @or1@]",		
    			"@or2@Username: @whi@" + Utility.capitalizeFirstLetter(player.getUsername()),
    			"@or2@Rank: " + player.determineIcon(player) + player.determineRank(player) ,
    			"@or2@Money spent: @whi@$" + Utility.format(player.getMoneySpent()),
    			"@or2@Credits: @whi@" + Utility.format(player.getCredits()),			
    			"@or2@Log Panel [</col>View@or2@]",
    			"@or2@Kill Counts",
    			"",
    			"@or1@        [ @lre@TEST @or1@]",
    			"@or2@        [ @lre@TEST2 @or1@]",
    			"@or2@        [ @lre@TEST3 @or1@]",
    			"",
    			"",
    	};
    
    	@Override
    	protected String[] text() {
    		return text;
    	}
    
    	@Override
    	protected int startingLine() {
    		return 29501;
    	}
    
    }
    The following code is InterfaceHandler.java

    Code:
    package com.vencillio.rs2.content.interfaces;
    
    import com.vencillio.rs2.entity.player.Player;
    import com.vencillio.rs2.entity.player.net.out.impl.SendString;
    
    /**
     * Handles the interfaces
     * 
     * @author Daniel
     *
     */
    public abstract class InterfaceHandler {
    
    	public InterfaceHandler(Player player) {
    		this.player = player;
    	}
    
    	protected Player player;
    
    	protected abstract String[] text();
    
    	protected abstract int startingLine();
    
    	public static void writeText(InterfaceHandler interfacetext) {
    		int line = interfacetext.startingLine();
    		for (int i1 = 0; i1 < interfacetext.text().length; i1++) {
    			interfacetext.player.send(new SendString(interfacetext.text()[i1], line++));
    		}
    	}
    }
    I can also provide the following if needed.

    SendString.java
    OutgoingPacket.java
    Reply With Quote  
     

  2. #2  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    interface 29400 is a custom interface, have a look at the values set for it client sided. Then have a look if it even got support for more text.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Mar 2019
    Posts
    57
    Thanks given
    3
    Thanks received
    2
    Rep Power
    13
    Quote Originally Posted by arch337 View Post
    interface 29400 is a custom interface, have a look at the values set for it client sided. Then have a look if it even got support for more text.
    I just changed the int on these from 330 to 1550 and 28 to 100. Is this how you would have done it?
    Code:
    scrollInterface.scrollMax = 1550;
    		int amountOfLines = 100;
    Reply With Quote  
     

  4. #4  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    Quote Originally Posted by DDS Rofl View Post
    I just changed the int on these from 330 to 1550 and 28 to 100. Is this how you would have done it?
    Code:
    scrollInterface.scrollMax = 1550;
    		int amountOfLines = 100;
    I would of read the code before changing these values. Then decided if I should change them or not.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Mar 2019
    Posts
    57
    Thanks given
    3
    Thanks received
    2
    Rep Power
    13
    Quote Originally Posted by arch337 View Post
    I would of read the code before changing these values. Then decided if I should change them or not.
    I don't understand this code that's why i'm asking xD

    Code:
    public static void questTab(TextDrawingArea[] vencillio) {
    		RSInterface tab = addTabInterface(29400);
    		addSprite(29401, 82);
    		addSprite(29402, 38);
    		addText(29403, "Warlord", vencillio, 2, 0xF7AA25, true, true);
    		addText(29407, "Www.warlords317.com", vencillio, 2, 0xF7AA25, true, true);
    		addHoverButton(29404, 84, 25, 25, "Achievement diary", -1, 29405, 1);
    		addHoveredButton(29405, 85, 25, 25, 29406);
    		addHoverButton(29410, 351, 15, 15, "Refresh", -1, 29411, 1);
    		addHoveredButton(29411, 352, 15, 15, 29412);				
    		addHoverText(29413, "", "", vencillio, 0, 0x47B320, false, true, 50);
    		tab.scrollMax = 0;
    		tab.totalChildren(11);
    		tab.child(0, 29401, -4, 34);
    		tab.child(1, 29402, -0, 34);
    		tab.child(2, 29402, -0, 229);
    		tab.child(3, 29403, 92, 9);
    		tab.child(4, 29404, 160, 4);
    		tab.child(5, 29405, 160, 4);
    		tab.child(6, 29407, 92, 239);
    		tab.child(7, 29500, 10, 36);
    		tab.child(8, 29410, 160, 36);
    		tab.child(9, 29411, 160, 36);
    		tab.child(10, 29413, 8, 22);
    		RSInterface scrollInterface = addTabInterface(29500);
    		scrollInterface.parentID = 29400;
    		scrollInterface.scrollPosition = 0;
    		scrollInterface.atActionType = 0;
    		scrollInterface.contentType = 0;
    		scrollInterface.width = 165;
    		scrollInterface.height = 193;
    		scrollInterface.scrollMax = 1550;
    		int x = 7, y = 9;
    		int amountOfLines = 100;
    		scrollInterface.totalChildren(amountOfLines);
    		for (int i = 0; i < amountOfLines; i++) {
    			addHoverText(29501 + i, "", "", vencillio, 0, 0x47B320, false, true, 168);
    			scrollInterface.child(i, 29501 + i, x, y);
    			y += 18;
    		}
    Reply With Quote  
     

  6. #6  
    WhiteDownMb | HYBRID JEFE
    Brett the Don's Avatar
    Join Date
    Dec 2009
    Posts
    2,117
    Thanks given
    349
    Thanks received
    556
    Rep Power
    2540
    Start looking at the ids in (hoverbutton, addtext, addsprite)

    then look at the child(ids) which they match, now go to child method and look at what each value means.

    That's where you should start, and even start reading each method.

    All of humanity's problems stem from man's
    inability to sit quietly in a room by himself




    Reply With Quote  
     

  7. Thankful user:


  8. #7  
    Registered Member
    Join Date
    Mar 2019
    Posts
    57
    Thanks given
    3
    Thanks received
    2
    Rep Power
    13
    Quote Originally Posted by Brett the Don View Post
    Start looking at the ids in (hoverbutton, addtext, addsprite)

    then look at the child(ids) which they match, now go to child method and look at what each value means.

    That's where you should start, and even start reading each method.
    Thank you that really does help but i'm still confused on how i would figure out what the child method means.

    Code:
    tab.child(0, 29401, -4, 34);
    0 is the line, 29401 is the first child ID, but i don't understand any of the last 2 integers in tab.child

    for example: -4, 34
    Reply With Quote  
     

  9. #8  
    WhiteDownMb | HYBRID JEFE
    Brett the Don's Avatar
    Join Date
    Dec 2009
    Posts
    2,117
    Thanks given
    349
    Thanks received
    556
    Rep Power
    2540
    Quote Originally Posted by DDS Rofl View Post
    Thank you that really does help but i'm still confused on how i would figure out what the child method means.

    Code:
    tab.child(0, 29401, -4, 34);
    0 is the line, 29401 is the first child ID, but i don't understand any of the last 2 integers in tab.child

    for example: -4, 34
    right click "child" and click go to declaration it then will bring you to the method. and show you what those two ints are.

    I can tell you but then you wouldn't learn and not be able to figure something else out on your own. (Not meant in any mean way)

    All of humanity's problems stem from man's
    inability to sit quietly in a room by himself




    Reply With Quote  
     

  10. #9  
    Registered Member
    Join Date
    Mar 2019
    Posts
    57
    Thanks given
    3
    Thanks received
    2
    Rep Power
    13
    Quote Originally Posted by Brett the Don View Post
    right click "child" and click go to declaration it then will bring you to the method. and show you what those two ints are.

    I can tell you but then you wouldn't learn and not be able to figure something else out on your own. (Not meant in any mean way)
    I get what you mean but i'm assuming you're talking about an Eclipse plugin?
    Reply With Quote  
     

  11. #10  
    WhiteDownMb | HYBRID JEFE
    Brett the Don's Avatar
    Join Date
    Dec 2009
    Posts
    2,117
    Thanks given
    349
    Thanks received
    556
    Rep Power
    2540
    Quote Originally Posted by DDS Rofl View Post
    I get what you mean but i'm assuming you're talking about an Eclipse plugin?
    Not at all, pm me your discord and ill show you

    All of humanity's problems stem from man's
    inability to sit quietly in a room by himself




    Reply With Quote  
     

Page 1 of 2 12 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. How can I add more rank icons?
    By Versatile in forum Help
    Replies: 5
    Last Post: 05-11-2016, 02:11 PM
  2. Replies: 3
    Last Post: 03-04-2016, 12:28 PM
  3. Replies: 11
    Last Post: 03-21-2013, 10:29 AM
  4. Replies: 7
    Last Post: 12-27-2012, 11:55 AM
  5. Replies: 2
    Last Post: 11-13-2011, 09:29 AM
Tags for this Thread

View Tag Cloud

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •