Jump to content

Recommended Posts

Posted (edited)
 

Greetings colleagues, I have decided to start the adventure of creating an L2 server. I'm doing fine but I've come to a problem that I don't know how to solve. It is related to the Community board, I have taken one that is in the forum but I cannot install it. From what I've been researching and it's not enough to have the HTML and the client file. You have to modify the java files... I have come to the conclusion that I have to modify something in this route game\data\scripts\handlers\communityboard

 

I dont want codes only a simple guide how to do it. IF someone can help me. Thanks you

 

 

 

imagen_2022-09-06_221757536.png

imagen_2022-09-06_222149692.png

Edited by cronol
Posted

All I see is picture of some HTML's and the header of homeboard.java.. the rest I have to assume is that you want to get those HTML's and whatever they are holding, into your Community Board. This isn't StackOverflow, even if you ask straight about certain problem, you still may not get your answer - let alone not giving out any clues.

Posted

Sorry if I haven't explained myself well.
For example I have downloaded the files from the L2 Essence community board. They have the html of the community board and the .utx with the textures for the client.
Now my question is how do I import the html. copying and pasting into the html folder doesn't work... from what I've researched you need to edit the files and add the offsets and the java side
My question is exactly what .java do I have to modify.

Posted (edited)
46 minutes ago, cronol said:

Sorry if I haven't explained myself well.
For example I have downloaded the files from the L2 Essence community board. They have the html of the community board and the .utx with the textures for the client.
Now my question is how do I import the html. copying and pasting into the html folder doesn't work... from what I've researched you need to edit the files and add the offsets and the java side
My question is exactly what .java do I have to modify.

 

A community board (and any other npc related actions) are consisted of 2 parts: 1) Html files, which basically contain the design and layout of the elements inside your community board and 2) The logic, which is inside the .java files you mentioned.

 

By default, when you open the community board it loads the home page. In order to change this to your custom community board, you need to modify RequestBypassToServer.java and RequestShowBoard.java. However, depending on the files you use (I guess you use l2j?) the modifications you need to do may differ. Usually, when you find a shared feature in here there is a tutorial on how to install it.

 

In order to help you further, you need to provide the link to the community board you want to install, as well as tell us which pack you are using so we can have a look inside.

 

-

 

If you are trying to open a server publicly, I suggest you either pay a developer to do all these things for you because they usually know what they're doing and adding a shared community board should be done in like 1-2 minutes, or you can start studying java yourself and try to understand the methods l2j packs use and how it all works together, which would take a lot of time. If you just want to install the community board, we can help you for sure, but say for example you want to add something else in the community board; things are not so easy then and people won't give you ready codes for free.

Edited by An4rchy
Posted
12 minutes ago, An4rchy said:

Ok, i have for example files from this 

I have copied the html in the path game\data\html\CommunityBoard and systextures on the client

 

I don't want to modify anything just deploy it as it is on my server.

I don't have either of these 2 files in script folder RequestBypassToServer.java and RequestShowBoard.java

 

 

Posted

The community board you're trying to add is basically just the design. The logic needs to be coded/added from scratch.

 

Basically even if you manage to add this community board to show properly when you press alt+b, nothing will work on it. Just buttons you can't press, cause there's no logic.

 

Choose another community board with logic already implemented.

Posted (edited)
14 hours ago, Dubxsion said:

 

narrator.jpg

Good colleague, I have tried what you have recommended but it is giving me problems, could you help me to find the fault.

 

Captura1.png

Captura.png

Edited by cronol
Images
Posted

Alright, you are making an effort which is a great start, however you are not paying attention to the lines you are adding, nor the ones I've marked above.

I would strongly advise you to do your work inside any IDE (not a Notepad++). Otherwise you have no live code analyzer to point you where you messed up.

First stage is displaying your HTML, which in your case is issued with:

String html = HtmlCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/home.html");
CommunityBoardHandler.separateAndSend(html, activeChar);


Your new bypass is *_bbcustom* <- there's no semi-colon and it is used for other purposes, yours is straight bypass command so stick to that. You are also not keeping the structure of the code by missing start/end of your code scope "{ }"

 

Get an IDE for the structure and try and read the lines, otherwise you ain't getting anywhere.
 

Posted (edited)

Ok, now i dont have any error on homeboard.java but is not working... when i press button to main

HOMEBOARD.JAVA

 

On home.html i have this coded

 

<tr><td align="left"><button value="Main" action="bypass _testpage1;" width=200 height=31 back="L2UI_CT1.OlympiadWnd_DF_Info_Down" fore="L2UI_CT1.OlympiadWnd_DF_Info"></td></tr>

 

In CN no redirect...

home.html

 

Edited by cronol
Posted (edited)
57 minutes ago, cronol said:

Ok, no i dont have any error on homeboard.java but is not working... when i pre

HOMEBOARD.JAVA

 

On home.html i have this coded

 

<tr><td align="left"><button value="Main" action="bypass _testpage1;" width=200 height=31 back="L2UI_CT1.OlympiadWnd_DF_Info_Down" fore="L2UI_CT1.OlympiadWnd_DF_Info"></td></tr>

 

In CN no redirect...

home.html

 

equals -> startswith/contains

bypass _testpage1;

ok but like if you want to redirect your page from home to custom/index then you can change what is already there under bbshome....

Edited by eMommy
Posted

I don't know what to do... I'm a bit stuck. When compiling the code it doesn't give me problems but it doesn't work either 🙂

 

public final class HomeBoard implements IParseBoardHandler {
	// SQL Queries
	private static final String COUNT_FAVORITES = "SELECT COUNT(*) AS favorites FROM `bbs_favorites` WHERE `playerId`=?";
	
	private static final String[] COMMANDS = {
		"_bbshome",
		"_bbstop",
        "_testpage1"
	};
	
	@Override
	public String[] getCommunityBoardCommands() {
		return COMMANDS;
	}
	
	@Override
	public boolean parseCommunityBoardCommand(String command, L2PcInstance activeChar) {
		if (command.equals("_bbshome") || command.equals("_bbstop")) {
			CommunityBoardHandler.getInstance().addBypass(activeChar, "Home", command);
			
			String html = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/home.html");
                        
			html = html.replaceAll("%fav_count%", Integer.toString(getFavoriteCount(activeChar)));
			html = html.replaceAll("%region_count%", Integer.toString(getRegionCount(activeChar)));
			html = html.replaceAll("%clan_count%", Integer.toString(ClanTable.getInstance().getClanCount()));
			CommunityBoardHandler.separateAndSend(html, activeChar);
                        
		}
                if (command.contains ("_testpage1")) {
			CommunityBoardHandler.getInstance().addBypass(activeChar, "testpage1", command);
			
                    String testpage1 = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/custom/index.html");
                    
                }
                
                else if (command.startsWith("_bbstop;")) {
			final String path = command.replace("_bbstop;", "");
			if ((path.length() > 0) && path.endsWith(".html")) {
				final String html = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/" + path);
				CommunityBoardHandler.separateAndSend(html, activeChar);
			}
		}
                return true;
	}

 

Posted (edited)

The errors are showing if your syntax is incorrect and if you are issuing wrong commands with missing elements etc, the list is limitless.

 

As I have told you in the previous post, try to read the lines and get the idea behind them. You have the starting point of getting it done, that's great but there's literally no function in your code that gets it running.

 

CommunityBoardHandler.separateAndSend(html, activeChar);

 

^ there's a hint...

PS: also look at your html side, you are still adding the semi-colon...

action="bypass _testpage1;"
Edited by Dubxsion
Posted
public final class HomeBoard implements IParseBoardHandler {
    // SQL Queries
    private static final String COUNT_FAVORITES = "SELECT COUNT(*) AS favorites FROM `bbs_favorites` WHERE `playerId`=?";
    
    private static final String[] COMMANDS = {
        "_bbshome",
        "_bbstop",
        "_testpage1"
    };
    
    @Override
    public String[] getCommunityBoardCommands() {
        return COMMANDS;
    }
    
    @Override
    public boolean parseCommunityBoardCommand(String command, L2PcInstance activeChar) {
        if (command.equals("_bbshome") || command.equals("_bbstop")) {
            CommunityBoardHandler.getInstance().addBypass(activeChar, "Home", command);
            
            String html = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/home.html");
                        
            html = html.replaceAll("%fav_count%", Integer.toString(getFavoriteCount(activeChar)));
            html = html.replaceAll("%region_count%", Integer.toString(getRegionCount(activeChar)));
            html = html.replaceAll("%clan_count%", Integer.toString(ClanTable.getInstance().getClanCount()));
            CommunityBoardHandler.separateAndSend(html, activeChar);
                        
        }
               if (command.startsWith ("_testpage1")) {
            CommunityBoardHandler.getInstance().addBypass(activeChar, "testpage1", command);
            CommunityBoardHandler.separateAndSend(HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/custom/index.html"), activeChar);
                    
                }
                
                else if (command.startsWith("_bbstop;")) {
            final String path = command.replace("_bbstop;", "");
            if ((path.length() > 0) && path.endsWith(".html")) {
                final String html = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/" + path);
                CommunityBoardHandler.separateAndSend(html, activeChar);
            }
        }
                return true;
    }

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Posts

    • Hello cheaters, As a team of avid developers and enthusiasts of Lineage 2, we are excited to present the L2 Control Hub, a groundbreaking plugin designed by myself and my collaborator, StinkyMadness. This innovative tool equips server administrators with powerful automation capabilities directly within the game's community board. L2 Control Hub simplifies the creation and management of automations, enabling you to customize your server operations without the need to modify the source code.   Key Features of L2 Control Hub: Robust Automation Triggers: Select from a plethora of triggers currently available, with continuous additions in the works to enhance your control options. Dynamic Conditions and Actions: Tailor your server operations with an extensive range of conditions and actions, ensuring flexible and precise control over game events and player interactions. Customizable Variables: Easily integrate server-specific variables from your database to further personalize and streamline your automations. Utilize these variables across various automation scenarios to cater to your specific server requirements. JavaScript Integration: Execute custom JavaScript codes that interact seamlessly with Java classes, bringing advanced functionalities to your server's ecosystem.   Explore L2 Control Hub in Action: We've prepared a series of video tutorials to demonstrate the capabilities of L2 Control Hub: Control Hub - Create a Simple Flow with 1 Condition and 1 Action: Get started with basic automations. Control Hub - Multiple Conditions with Multiple Actions: Explore more complex automations for detailed server management. Control Hub - Using Variables: Discover how to implement and use custom variables for tailored automations. Control Hub - Using JavaScript: Experience the power of custom scripts in enhancing your server functionality.   L2 Control Hub is currently about 70% complete, and we are actively developing and refining features. We invite you to join our ➡️ Discord community ⬅️ to engage with the development process, provide feedback, and be the first to test new features. Additionally, any updates or changes to the plugin are seamlessly delivered to all customers directly from our web server, ensuring your system is always up-to-date without the need for manual downloads.   Your game, your rules, automated. Join us in redefining server management in Lineage 2 and elevate your gaming community with unmatched automation capabilities. For more details, contact us directly to get started with L2 Control Hub.   Currently, the plugin is developed using aCis sources. We will continue with these sources until we finalize all the necessary details before proceeding to integrate with the more prominent sources available.       The L2 Control Hub is designed to extend beyond mere functional additions to your server. We are in the process of implementing a suite of advanced mechanisms, such as a vote manager capable of interfacing with any Lineage 2 voting site without requiring configuration, live statistics to provide admins with real-time insights, and an event engine that can generate any desired event within seconds. All these features will be seamlessly integrated into the module, enhancing your server management experience significantly.     Please note that L2 Control Hub will be a premium tool, reflecting the extensive features and benefits it offers. While we are finalizing the pricing structure, rest assured that we aim to deliver great value for your investment. We will announce the cost details soon on our platforms to ensure everyone is well-informed and can plan accordingly. Join us to take your server management to the next level with L2 Control Hub.     
    • The link soucer and system are off, reup please, thanks very much @HypeH
    • DISCORD : utchiha_market telegram : https://t.me/utchiha_market SELLIX STORE : https://utchihamkt.mysellix.io/ Join our server for more products : https://discord.gg/hood-services https://campsite.bio/utchihaamkt  
    • Hola, Busco proveedores de adena en Reborn signature. Trabajo serio, Web de ventas Seria. Adena-Shop. Discord: susi007317   Hello, I am looking for adena suppliers in Reborn signature. Serious work, Serious sales Web. Adena-Shop. Discord: susi007317
    • Need Discord with rare badge? VISIT US AND SHOP WITH US! NEW STOCK Aged, Early Supporter Discord Accounts I sell HQ Aged and Early, Discord Accounts that are inactive and not flagged by discord at cheap prices If you want to contact me, you can add me on discord: worldcoldwar Features: Format - age : email : pass : token Not flagged and undetected by discord HQ % With OGE Emails, password etc can be changed Unverified Early Supporter 24M Boost Badge HypeSquad Events Early Verified Bot Developer Early Supporters SHOP LINK: https://rexus.mysellix.io/  For PayPal payments, please open a ticket. If you experience any problems with cryptocurrency payments, please open a ticket as well. THIS IS A TEST STOCK MORE COMING SOON
  • Topics

×
×
  • Create New...