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

    • 14 unique events, 80 euro.   don’t miss the chance! Discord: @fivoszzz
    • I hope you can use them to eat the 100usd you stole from me.  Regards. -------------------------------------------------------------------   have a proposal to solve the problem. why don't all those who bought an extension from L2Devs, compare what they bought, with what I published and verify who is the scammer? then they compare the files they bought with my SVN.  Those who bought from L2Devs @UnknownSoldier Mariano Canteros (Argentina) come on, do the comparison and verify who is the scammer  gg
    • I don’t care what kind of relationship you have with other admins, developers, etc. You disappeared for a whole month and didn’t answer my messages. And at the same time, you answer other people and visit forums  When the dispute started, you hauled your ass here really fast, didnt you? Thats called being a rat.  If you had kept your promise, we could talk like normal people. I have nothing more to say to you.. CYA  
    • corruption made this server become empty from 3rd day,only few randoms playing.
    • ▬▬▬▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ ▓▓▓▓▓▓▓▓▓▒▒▒░░░ REVERSECODE-TEAM ░░░▒▒▒▓▓▓▓▓▓▓▓▓▓▓ ▬▬▬▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ l2off-gracia-final [PTS] L2server.exe x64  added support  windows 10  !!! added protocol  20 support !!! added protocol  87 support !!! added protocol 152 support !!! all support protocol 20,83,87,152 fix key start server !!! fix .txt !!! fix .bak !!! fix Malloc - ??? fix Bit flag !!!  fix spam no error airship move !!! VIDEO TEST PROTOCOL  87 LINK - https://goo.su/Mhazfmz < VIDEO TEST PROTOCOL 152 LINK - https://goo.su/8rPanR  < ▬▬▬▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▬▬▬▬▬▬▬▬▬▬▬▬▬ஜ۩۞۩ஜ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬  the work will continue - THIS EXAMPLE ! ✯✯✯✯✯✯✯✯✯✯✯✯ UPDATE ✯✯✯✯✯✯✯✯✯✯✯✯✯✯ LINEAGE2 ESSENCE HIGH-ELVES 464 EU  [Date 23.04.2024][LANG:EUROPE-ORIGINAL] Clean System Patch Lineage 2 L2exe + Core.dll + Engine.dll unpacked*super clean 100% [unpacked REVERSECODE-TEAM ] [ Kill game guard ][ Kill FROST ] [ Kill AwesomiumProcess ] [SELL WTS PM ME ]       VIDEO GAME TEST LINK - https://goo.su/lFp327N   <   VIDEO DEVMODE LINK -  https://goo.su/yjAVk   < DEVMODE - works tested 100% pv+sv+nv ✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯ ✯✯✯✯✯✯✯✯✯✯✯✯ UPDATE ✯✯✯✯✯✯✯✯✯✯✯✯✯✯ LINEAGE2 MAIN SHIELD OF THE KINGDOM 474-EU [Date 30.07.2024][LANG:EUROPE-ORIGINAL] Clean System Patch Lineage 2 L2exe + Core.dll + Engine.dll unpacked*super clean 100% [LobbyMapChange added config Switch.ini] [unpacked REVERSECODE-TEAM ] [ Kill game guard ][ Kill FROST ] [ Kill AwesomiumProcess ][ LCID FIX ] [SELL WTS PM ME ]   VIDEO DEVMODE LINK - https://goo.su/jxQmAk   < DEVMODE - works tested 100% pv+sv+nv ✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯  VIDEO DEVMODE LINK -  https://goo.su/43WKOD < DEVMODE - works tested 100% pv+sv+nv ✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯ ✯✯✯✯✯✯✯✯✯✯✯✯ UPDATE ✯✯✯✯✯✯✯✯✯✯✯✯✯✯ LINEAGE2 [MAIN] SUPERION 502 EU [UPDATE 13.01.2025][LANG:EUROPE-ORIGINAL] Clean System Patch Lineage 2 L2exe + Core.dll + Engine.dll unpacked*super clean 100% [unpacked REVERSECODE-TEAM ] [ Kill game guard ][ Kill FROST ] [ Kill AwesomiumProcess ] [SELL WTS PM ME ] VIDEO TEST LINK - https://goo.su/jmFi8H8  ✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯ ✯✯✯✯✯✯✯✯✯✯✯✯ UPDATE ✯✯✯✯✯✯✯✯✯✯✯✯✯✯ LINEAGE2 ESSENCE TYPE-PTS2 WARG 507 EU [Date 26.03.2025][LANG:EUROPE-ORIGINAL] Clean System Patch Lineage 2 Core.dll + Engine.dll unpacked*super clean 100% [unpacked REVERSECODE-TEAM ] [ Kill game guard ][ Kill FROST ] [ Kill AwesomiumProcess ][patched] [SELL WTS PM ME ] VIDEO GAME TEST LINK - https://goo.su/0rTsCUJ  <  VIDEO DEVMODE LINK -   https://goo.su/F1qrx   < [DEVMODE full fixed x3 classic,aden,main,all commands work] adapting to the new version DEVMODE full fixed x3 classic,aden,main works tested 100% pv+sv+nv All buttons and all commands work.  VIDEO SPECIAL DEVMODE LINK - - https://goo.su/85YbU   < ✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯ ✯✯✯✯✯✯✯✯✯✯✯ UPDATE ✯✯✯✯✯✯✯✯✯✯✯✯✯✯ [MAIN] LINEAGE2 Cold Witch 516 KR  [UPDATE 01.04.2025][LANG:KOREAN-ORIGINAL] Clean System Patch Lineage 2 Core.dll + Engine.dll unpacked*super clean 100% [unpacked  RED-TEAM REVERSECODE-TEAM ] [ Kill game guard ][ Kill FROST ] [ Kill AwesomiumProcess ] [SELL WTS PM ME ][DEVMODE-BETA] VIDEO GAME TEST LINK  - https://goo.su/yotKnWL  < VIDEO DEVMODE TEST GAME  - https://goo.su/08UnUHN < DEVMODE - works tested 100% pv+sv+nv ✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯ ✯✯✯✯✯✯✯✯✯✯✯✯ UPDATE ✯✯✯✯✯✯✯✯✯✯✯✯✯✯ LINEAGE2 ESSENCE WOLF 507 EU [UPDATE 29.04.2025][LANG:EUROPE-ORIGINAL] [patched] Clean System Patch Lineage 2  Core.dll + Engine.dll unpacked*super clean 100% [unpacked REVERSECODE-TEAM ] [ Kill game guard ][ Kill FROST ] [ Kill AwesomiumProcess ] [SELL WTS PM ME ] VIDEO~OFFICIAL 4GAME TEST - https://goo.su/UrZhe < VIDEO~ADMIN NEVER DIE ^_^ - https://goo.su/sL5Eok < DEVMODE VIDEO MAPS WOLF - https://goo.su/xhgEfI  < ✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯ in my profile there is a link to my discord group  we write all the questions there - if you are interested in something ✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯  REVERSECODE-TEAM  Service Creating Full Clean Patched Systems  Unreal Scripts / Reverse Enginering / Game Client Modifications Portfolio Discord Group https://discord.gg/56EuZyFJj2   ✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯✯ DO NOT LEAVE POSTS IN THIS SECTION  IF YOU HAVE ANY QUESTIONS, CONTACT US IN THE DISCORD AND ASK YOUR QUESTIONS ( prices are shown in green text in the first post ) Anyone who leaves a message in this section will be denied services and the post will be deleted. [  A large selection of Products In our group at the link in the Discord   ]          
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock