Jump to content
  • 0

Change the maximum size value of htm.


Question

Posted

Hello guys, i've seen this question somewhere before here but i can't find it so i made a new topic.

I have a problem with the html size of Community Board, if the size of the htm file is small something like 6,7 kb Community Board will open normally but if i was trying some things and the htm file became bigger about 14kb and now my community board won't show up when i'm clicking to open it, if i change to the old htm file it will be fine.

So my question here is, anyone know how to change this value and where? So i can increase the size and put longer htm files in size?

Thanks in advance!

14 answers to this question

Recommended Posts

  • 0
Posted

on server packets i think ShowBoard.java put here source of this file.

on html message (dialog) max size 8kb because if it will be bigger then it can crash l2.

on show board maybe same?

  • 0
Posted (edited)
1 hour ago, wongerlt said:

on server packets i think ShowBoard.java put here source of this file.

on html message (dialog) max size 8kb because if it will be bigger then it can crash l2.

on show board maybe same?

Here is the ShowBoard.java

/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
package net.sf.l2j.gameserver.network.serverpackets;

import java.util.List;

public class ShowBoard extends L2GameServerPacket
{
	private static final String _S__6E_SHOWBOARD = "[S] 7b ShowBoard";

	private String _htmlCode;
	private String _id;
	private List<String> _arg;

	public ShowBoard(String htmlCode, String id)
	{
		_id = id;
		_htmlCode = htmlCode; // html code must not exceed 8192 bytes
	}

	public ShowBoard(List<String> arg)
	{
		_id = "1002";
		_htmlCode = null;
		_arg = arg;

	}

	private byte[] get1002()
	{
		int len = _id.getBytes().length * 2 + 2;
		for (String arg : _arg)
		{
			len += (arg.getBytes().length + 4) * 2;
		}
		byte data[] = new byte[len];
		int i = 0;
		for (int j = 0; j < _id.getBytes().length; j++, i += 2)
		{
			data[i] = _id.getBytes()[j];
			data[i + 1] = 0;
		}
		data[i++] = 8;
		data[i++] = 0;
		for (String arg : _arg)
		{
			for (int j = 0; j < arg.getBytes().length; j++, i += 2)
			{
				data[i] = arg.getBytes()[j];
				data[i + 1] = 0;
			}
			data[i++] = 0x20;
			data[i++] = 0x0;
			data[i++] = 0x8;
			data[i++] = 0x0;
		}
		return data;
	}

	@Override
	protected final void writeImpl()
	{
		writeC(0x7b);
		writeC(0x01); //c4 1 to show community 00 to hide
		writeS("bypass _bbshome"); // top
		writeS("bypass _bbsgetfav"); // favorite
		writeS("bypass _bbsloc"); // region
		writeS("bypass _bbsclan"); // clan
		writeS("bypass _bbsmemo"); // memo
		writeS("bypass _bbsmail"); // mail
		writeS("bypass _bbsfriends"); // friends
		writeS("bypass bbs_add_fav"); // add fav.
		if (!_id.equals("1002"))
		{
			// getBytes is a very costly operation, and should only be called once
			byte htmlBytes[] = null;
			if (_htmlCode != null)
				htmlBytes = _htmlCode.getBytes();
			
			byte idBytes[] = _id.getBytes();
			
			byte data[] = new byte[2 + 2 + 2 + idBytes.length * 2 + 2
				* ((_htmlCode != null) ? htmlBytes.length : 0)];
			int i = 0;
			for (int j = 0; j < idBytes.length; j++, i += 2)
			{
				data[i] = _id.getBytes()[j];
				data[i + 1] = 0;
			}
			data[i++] = 8;
			data[i++] = 0;
			if (_htmlCode != null)
			{
				for (int j = 0; j < htmlBytes.length; i += 2, j++)
				{
					data[i] = htmlBytes[j];
					data[i + 1] = 0;
				}
			}
			data[i++] = 0;
			data[i] = 0;
			//writeS(_htmlCode); // current page
			writeB(data);
		}
		else
		{
			writeB(get1002());
		}
	}

	/* (non-Javadoc)
	 * @see net.sf.l2j.gameserver.serverpackets.ServerBasePacket#getType()
	 */
	@Override
	public String getType()
	{
		return _S__6E_SHOWBOARD;
	}
}

I can't see anything related to the size, i also checked the HtmCache.java as well changed a value but still nothing

Edited by Designatix
correction
  • 0
Posted
27 minutes ago, Designatix said:

Here is the ShowBoard.java


/*
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 */
package net.sf.l2j.gameserver.network.serverpackets;

import java.util.List;

public class ShowBoard extends L2GameServerPacket
{
	private static final String _S__6E_SHOWBOARD = "[S] 7b ShowBoard";

	private String _htmlCode;
	private String _id;
	private List<String> _arg;

	public ShowBoard(String htmlCode, String id)
	{
		_id = id;
		_htmlCode = htmlCode; // html code must not exceed 8192 bytes
	}

	public ShowBoard(List<String> arg)
	{
		_id = "1002";
		_htmlCode = null;
		_arg = arg;

	}

	private byte[] get1002()
	{
		int len = _id.getBytes().length * 2 + 2;
		for (String arg : _arg)
		{
			len += (arg.getBytes().length + 4) * 2;
		}
		byte data[] = new byte[len];
		int i = 0;
		for (int j = 0; j < _id.getBytes().length; j++, i += 2)
		{
			data[i] = _id.getBytes()[j];
			data[i + 1] = 0;
		}
		data[i++] = 8;
		data[i++] = 0;
		for (String arg : _arg)
		{
			for (int j = 0; j < arg.getBytes().length; j++, i += 2)
			{
				data[i] = arg.getBytes()[j];
				data[i + 1] = 0;
			}
			data[i++] = 0x20;
			data[i++] = 0x0;
			data[i++] = 0x8;
			data[i++] = 0x0;
		}
		return data;
	}

	@Override
	protected final void writeImpl()
	{
		writeC(0x7b);
		writeC(0x01); //c4 1 to show community 00 to hide
		writeS("bypass _bbshome"); // top
		writeS("bypass _bbsgetfav"); // favorite
		writeS("bypass _bbsloc"); // region
		writeS("bypass _bbsclan"); // clan
		writeS("bypass _bbsmemo"); // memo
		writeS("bypass _bbsmail"); // mail
		writeS("bypass _bbsfriends"); // friends
		writeS("bypass bbs_add_fav"); // add fav.
		if (!_id.equals("1002"))
		{
			// getBytes is a very costly operation, and should only be called once
			byte htmlBytes[] = null;
			if (_htmlCode != null)
				htmlBytes = _htmlCode.getBytes();
			
			byte idBytes[] = _id.getBytes();
			
			byte data[] = new byte[2 + 2 + 2 + idBytes.length * 2 + 2
				* ((_htmlCode != null) ? htmlBytes.length : 0)];
			int i = 0;
			for (int j = 0; j < idBytes.length; j++, i += 2)
			{
				data[i] = _id.getBytes()[j];
				data[i + 1] = 0;
			}
			data[i++] = 8;
			data[i++] = 0;
			if (_htmlCode != null)
			{
				for (int j = 0; j < htmlBytes.length; i += 2, j++)
				{
					data[i] = htmlBytes[j];
					data[i + 1] = 0;
				}
			}
			data[i++] = 0;
			data[i] = 0;
			//writeS(_htmlCode); // current page
			writeB(data);
		}
		else
		{
			writeB(get1002());
		}
	}

	/* (non-Javadoc)
	 * @see net.sf.l2j.gameserver.serverpackets.ServerBasePacket#getType()
	 */
	@Override
	public String getType()
	{
		return _S__6E_SHOWBOARD;
	}
}

I can't see anything related to the size, i also checked the HtmCache.java as well changed a value but still nothing

then debug packets , and check that client get it or no. if no then try find where cheking size

  • 0
Posted
33 minutes ago, wongerlt said:

then debug packets , and check that client get it or no. if no then try find where cheking size

how i can do this? XD

  • 0
Posted
6 minutes ago, wongerlt said:

or just try optimize ur html file. example, delete all spaces, lines and etc.

put here ur html

I'm trying to put l2mythras community index to mine (i'm using gf) here is the code

<html noscrollbar>
<title>Community Board</title>
<body><br>
<table width=610>
<tr>
<center><td align=center valign=top>
<table border=0 cellpadding=0 cellspacing=0 width=769 height=492 background="L2RedemptionCB.dragon">
<tr>
<td valign="top" align="center">
<table width=610 height=468>
<tr>
<td width=610>
<table border=0 cellspacing=0 cellpadding=0 width=610>
<tr>
<td height=10></td>
</tr>
<tr>
<td width=260>
<table width=260 height=180>
<tr>
<td valign="top" align="center">
<table border=0 width=260 height=240 cellspacing=4 cellpadding=3 background="l2ui_ct1.ComboBox_DF_Dropmenu_Bg">
<tr>
<td width=220 align=left valign=top>
<table width=260 height=25 background="l2ui_ct1.Windows_DF_Drawer_Bg">
<tr>
<td width=228 align=center valign=center>
<font color="FF6633">Character Information</font>
</td>
</tr>
</table>
<table width=260 height=25 bgcolor=000000>
<tr>
<td width=90 align=right valign=center>
<font color="B59A75">Name</font>
</td>
<td width=4 align=center valign=center>
:
</td>
<td width=90 align=left valign=center>
<font color="669900"><?player_name?></font>
</td>
</tr>
</table>
<table width=260 height=25 bgcolor=333333>
<tr>
<td width=90 align=right valign=center>
<font color="B59A75">Class</font>
</td>
<td width=4 align=center valign=center>
:
</td>
<td width=90 align=left valign=center>
<font color="FFFFFF"><?player_class?></font>
</td>
</tr>
</table>
<table width=260 height=25 bgcolor=000000>
<tr>
<td width=90 align=right valign=center>
<font color="B59A75">Level</font>
</td>
<td width=4 align=center valign=center>
:
</td>
<td width=90 align=left valign=center>
<font color="FFFFFF"><?player_level?></font>
</td>
</tr>
</table>
<table width=260 height=25 bgcolor=333333>
<tr>
<td width=90 align=right valign=center>
<font color="B59A75">Clan</font>
</td>
<td width=4 align=center valign=center>
:
</td>
<td width=90 align=left valign=center>
<font color="FFFFFF"><?player_clan?></font>
</td>
</tr>
</table>
<table width=260 height=25 bgcolor=000000>
<tr>
<td width=90 align=right valign=center>
<font color="B59A75">Nobless</font>
</td>
<td width=4 align=center valign=center>
:
</td>
<td width=90 align=left valign=center>
<font color="FFFFFF"><?player_noobless?></font>
</td>
</tr>
</table>
<table width=260 height=25 bgcolor=000000>
<tr>
<td width=90 align=right valign=center>
<font color="B59A75">Your IP</font>
</td>
<td width=4 align=center valign=center>
:
</td>
<td width=90 align=left valign=center>
<font color="FFFFFF"><?player_ip?></font>
</td>
</tr>
</table>
<table width=260 height=25 bgcolor=333333>
<tr>
<td width=90 align=right valign=center>
<font color="B59A75">Online Time</font>
</td>
<td width=4 align=center valign=center>
:
</td>
<td width=90 align=left valign=center>
<font color="FFFFFF"><?online_time?></font>
</td>
</tr>
</table>
<table width=260 height=25 bgcolor=333333>
<tr>
<td width=90 align=right valign=center>
<font color="B59A75">Premium Account</font>
</td>
<td width=4 align=center valign=center>
:
</td>
<td width=90 align=left valign=center>
<font color="FFFFFF"><?player_premium?></font>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width=456>
<table width=456 height=180>
<tr>
<td valign="top" align="center">
<table border=0 width=456 height=240 cellspacing=4 cellpadding=3 background="l2ui_ct1.ComboBox_DF_Dropmenu_Bg">
<tr>
<td width=220 align=left valign=top>
<table width=456 height=23 background="l2ui_ct1.Windows_DF_Drawer_Bg">
<tr>
<td width=416 align=center valign=center>
<font name="CreditTextNormal" color="FF6633">Welcome to L2Mythras</font>
</td>
</tr>
</table>
<table width=456 height=25 bgcolor=000000>
<tr>
<td width=456 align=left valign=center>
 <font>Hello <font name="CreditTextNormal" color=669900><?player_name?></font>, and welcome to our grand new project<br1>
 <br>
Enjoy playing on our server and if you have any suggestion, visit our forum.</font>
</td>
</tr>
</table>
<table width=456 height=23 background="l2ui_ct1.Windows_DF_Drawer_Bg">
<tr>>
<td width=416 align=center valign=center>
<font name="CreditTextNormal" color="FF6633">Server Rates</font>
</td>
</tr>
</table>
<table width=456 height=25 bgcolor=000000>
<tr>
<td width=456 align=center valign=center>
<table align=center width=456 border=0>
<tr>
<td width=50 align=right><font color=B59A75>XP</font></td>
<td width=5>:</td>
<td width=50><font name="CreditTextNormal" color=FFFFFF>x55</font></td>
<td width=50 align=right><font color=B59A75>SP</font></td>
<td width=5>:</td>
<td width=50><font name="CreditTextNormal" color=FFFFFF>x55</font></td>
<td width=50 align=right><font color=B59A75>Adena</font></td>
<td width=5>:</td>
<td width=50><font name="CreditTextNormal" color=FFFFFF>x50</font></td>
</tr>
<tr>
<td width=50 align=right><font color=B59A75>Drop</font></td>
<td width=5>:</td>
<td width=50><font name="CreditTextNormal" color=FFFFFF>x25</font></td>
<td width=50 align=right><font color=B59A75>Spoil</font></td>
<td width=5>:</td>
<td width=50><font name="CreditTextNormal" color=FFFFFF>x25</font></td>
<td width=50 align=right><font color=B59A75>Quest</font></td>
<td width=5>:</td>
<td width=50><font name="CreditTextNormal" color=FFFFFF>x4</font></td>
</tr>
<tr>
<td width=50 align=right><font color=B59A75>Siege</font></td>
<td width=5>:</td>
<td width=50><font name="CreditTextNormal" color=FFFFFF>x10</font></td>
<td width=50 align=right><font color=B59A75>Manor</font></td>
<td width=5>:</td>
<td width=50><font name="CreditTextNormal" color=FFFFFF>x10</font></td>
<td width=50 align=right><font color=B59A75>Fish</font></td>
<td width=5>:</td>
<td width=50><font name="CreditTextNormal" color=FFFFFF>x10</font></td>
</tr>
<tr>
<td width=50 align=right><font color=B59A75>ClanRep</font></td>
<td width=5>:</td>
<td width=50><font name="CreditTextNormal" color=FFFFFF>x10</font></td>
<td width=50 align=right><font color=B59A75>Hellbound</font></td>
<td width=5>:</td>
<td width=50><font name="CreditTextNormal" color=FFFFFF>x10</font></td>
<td width=50 align=right><font color=B59A75>RaidBoss</font></td>
<td width=5>:</td>
<td width=50><font name="CreditTextNormal" color=FFFFFF>x5</font></td>
</tr>
</table>
</td>
</tr>
</table>
<table width=456 height=23 background="l2ui_ct1.Windows_DF_Drawer_Bg">
<tr>
<td width=416 align=center valign=center>
<font name="CreditTextNormal" color="FF6633">Server info</font>
</td>
</tr>
</table>
<table width=456 height=23 bgcolor=000000>
<tr>
<td align=center valign=center width=150>
<font color="B59A75" name="CreditTextNormal">Time: </font><font name="CreditTextNormal"> <?time?> </font>
</td>
<td align=center valign=center width=150>
<font color="B59A75" name="CreditTextNormal">Online Now: </font><font name="CreditTextNormal"> <?online?> </font>
</td>
<td align=center valign=center width=150>
<font color="B59A75" name="CreditTextNormal">Offtraders: </font><font name="CreditTextNormal"> <?offtrade?> </font>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border=0 cellspacing=0 cellpadding=0 width=456>
<tr>
<td height=18></td>
</tr>
<tr>
<td width=260>
<table width=260 height=92>
<tr>
<td valign="top" align="center">
<table border=0 width=260 height=92 cellspacing=4 cellpadding=3 background="l2ui_ct1.ComboBox_DF_Dropmenu_Bg">
<tr>
<td width=220 align=left valign=top>
<table width=260 height=23 background="l2ui_ct1.Windows_DF_Drawer_Bg">
<tr>
<td width=228 align=center valign=center>
<font color="FF6633">Social Information</font>
</td>
</tr>
</table>
<table width=260 height=25 bgcolor=000000>
<tr>
<td width=260 height=55 align=center valign=center>
<table width=260 height=25>
<tr>
<td width=53 align=center valign=top>
<table border=0 cellspacing=0 cellpadding=0 width=32 height=32 background="Icon.skillraid">
<tr>
<td width=32 height=32 align=center valign=top>
<button action="url !2265" width=34 height=34 back="L2UI_CT1.ItemWindow_DF_Frame_Down" fore="L2UI_CT1.ItemWindow_DF_Frame"/>
</td>
</tr>
</table>
Facebook
</td>
<td width=53 align=center valign=top>
<table border=0 cellspacing=0 cellpadding=0 width=32 height=32 background="Icon.skillraid">
<tr>
<td width=32 height=32 align=center valign=top>
<button action="url !2266" width=34 height=34 back="L2UI_CT1.ItemWindow_DF_Frame_Down" fore="L2UI_CT1.ItemWindow_DF_Frame"/>
</td>
</tr>
</table>
Website
</td>
<td width=53 align=center valign=top>
<table border=0 cellspacing=0 cellpadding=0 width=32 height=32 background="Icon.skillraid">
<tr>
<td width=32 height=32 align=center valign=top>
<button action="url !2267" width=34 height=34 back="L2UI_CT1.ItemWindow_DF_Frame_Down" fore="L2UI_CT1.ItemWindow_DF_Frame"/>
</td>
</tr>
</table>
Forum
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width=456>
<table width=456 height=92>
<tr>
<td valign="top" align="center">
<table border=0 width=455 height=92 cellspacing=4 cellpadding=3 background="l2ui_ct1.ComboBox_DF_Dropmenu_Bg">
<tr>
<td width=220 align=left valign=top>
<table width=455 height=23 background="l2ui_ct1.Windows_DF_Drawer_Bg">
<tr>
<td width=416 align=center valign=center>
<font color="FF6633">Questions</font>
</td>
</tr>
</table>
<table width=454 height=25 bgcolor=000000>
<tr>
<td width=455 align=left valign=center>
Do you have any questions? Use the buttons to check information about server rates, configuration, raids & instances, 
donations and more.<br1>
If you still confused, please, go to our forums: <font color=LEVEL>www.L2Mythras.Eu/forum</font>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border=0 cellspacing=0 cellpadding=0 width=736>
<tr>
<td height=18></td>
</tr>
<tr>
<td width=736>
<table width=736 height=60>
<tr>
<td valign="top" align="center">
<table border=0 width=745 height=98 cellspacing=4 cellpadding=3 background="l2ui_ct1.ComboBox_DF_Dropmenu_Bg">
<tr>
<td width=736 align=center valign=center>
<table width=740 height=23 background="l2ui_ct1.Windows_DF_Drawer_Bg">
<tr>
<td width=704 align=center valign=center>
<font color="FF6633">Navigation</font>
</td>
</tr>
</table>
<table width=755 height=60 bgcolor=000000>
<tr>
<td width=110 align=center valign=top>
<table border=0 cellspacing=0 cellpadding=0 width=32 height=32 background="Icon.skill5243">
<tr>
<td width=32 height=32 align=center valign=top>
<button action="bypass _bbspage:Serverinfo" width=34 height=34 back="L2UI_CT1.ItemWindow_DF_Frame_Down" fore="L2UI_CT1.ItemWindow_DF_Frame"/>
</td>
</tr>
</table>
Server Info
</td>
<td width=110 align=center valign=top>
<table border=0 cellspacing=0 cellpadding=0 width=32 height=32 background="Icon.skill5861">
<tr>
<td width=32 height=32 align=center valign=top>
<button action="bypass _bbspage:RB" width=34 height=34 back="L2UI_CT1.ItemWindow_DF_Frame_Down" fore="L2UI_CT1.ItemWindow_DF_Frame"/>
</td>
</tr>
</table>
RaidBoss
</td>
<td width=110 align=center valign=top>
<table border=0 cellspacing=0 cellpadding=0 width=32 height=32 background="branchsys2.br_vitality_day_i00">
<tr>
<td width=32 height=32 align=center valign=top>
<button action="bypass -h scripts_services.Premium:see" width=34 height=34 back="L2UI_CT1.ItemWindow_DF_Frame_Down" fore="L2UI_CT1.ItemWindow_DF_Frame"/>
</td>
</tr>
</table>
Premium Account
</td>
<td width=110 align=center valign=top>
<table border=0 cellspacing=0 cellpadding=0 width=32 height=32 background="Icon.skill1526">
<tr>
<td width=32 height=32 align=center valign=top>
<button action="bypass _bbspage:Command" width=34 height=34 back="L2UI_CT1.ItemWindow_DF_Frame_Down" fore="L2UI_CT1.ItemWindow_DF_Frame"/>
</td>
</tr>
</table>
Commands
</td>
<td width=110 align=center valign=top>
<table border=0 cellspacing=0 cellpadding=0 width=32 height=32 background="Icon.skill5762">
<tr>
<td width=32 height=32 align=center valign=top>
<button action="bypass _bbspage:Donate/donate" width=34 height=34 back="L2UI_CT1.ItemWindow_DF_Frame_Down" fore="L2UI_CT1.ItemWindow_DF_Frame"/>
</td>
</tr>
</table>
Donation Store
</td>
<td width=110 align=center valign=top>
<table border=0 cellspacing=0 cellpadding=0 width=32 height=32 background="Icon.skill5739">
<tr>
<td width=32 height=32 align=center valign=top>
<button action="bypass _bbspage:HowToDonate" width=34 height=34 back="L2UI_CT1.ItemWindow_DF_Frame_Down" fore="L2UI_CT1.ItemWindow_DF_Frame"/>
</td>
</tr>
</table>
How to Donate
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border=0 cellspacing=0 cellpadding=0 width=755>
<tr>
<td height=18></td>
</tr>
<tr>
<td width=755>
<table width=755 height=20>
<tr>
<td valign="top" align="center">
<table border=0 width=755 height=20 cellspacing=4 cellpadding=3 background="l2ui_ct1.ComboBox_DF_Dropmenu_Bg">
<tr>
<td width=755 align=left valign=top>
<table width=745 height=25 bgcolor=0e0d0d>
<tr>
<td width=736 align=center valign=center>
<font color="LEVEL">Server Last Restarted at:</font> <?server_uptime?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td></center>
</tr>
</table>
</body></html>

 

  • 0
Posted

beside crap quality of your quoted source (where you could find way better in few sec just by googling), you can see even reason of your problem right in your quote:

_htmlCode = htmlCode; // html code must not exceed 8192 bytes

L2 client assemble html string from exactly 3 showBoard packets before rendering whole window update in game,
so all you have to do with your crap source, is to chunk your string to 8kb parts and pass them to ShowBoard with IDs: 101,102,103

Im entirety amused how clueless you look to be, and yet bother with some altB htmls. Should we expect new 100% retail like server in upcoming week? :D

  • 0
Posted (edited)
public static void separateAndSend(final String html, final L2PcInstance acha)
	{
		if (html == null)
			return;
		
		if (html.length() < 4090)
		{
			acha.sendPacket(new ShowBoard(html, "101"));
			acha.sendPacket(new ShowBoard(null, "102"));
			acha.sendPacket(new ShowBoard(null, "103"));
			
		}
		else if (html.length() < 8180)
		{
			acha.sendPacket(new ShowBoard(html.substring(0, 4090), "101"));
			acha.sendPacket(new ShowBoard(html.substring(4090, html.length()), "102"));
			acha.sendPacket(new ShowBoard(null, "103"));
			
		}
		else if (html.length() < 12270)
		{
			acha.sendPacket(new ShowBoard(html.substring(0, 4090), "101"));
			acha.sendPacket(new ShowBoard(html.substring(4090, 8180), "102"));
			acha.sendPacket(new ShowBoard(html.substring(8180, html.length()), "103"));
			
		}
	}

so max 12270 bytes on c6(maybe it just mistake in source), and on h5 i see 24540 bytes max.

Edited by wongerlt
  • 0
Posted
13 hours ago, AlmostGood said:

beside crap quality of your quoted source (where you could find way better in few sec just by googling), you can see even reason of your problem right in your quote:


_htmlCode = htmlCode; // html code must not exceed 8192 bytes

L2 client assemble html string from exactly 3 showBoard packets before rendering whole window update in game,
so all you have to do with your crap source, is to chunk your string to 8kb parts and pass them to ShowBoard with IDs: 101,102,103

Im entirety amused how clueless you look to be, and yet bother with some altB htmls. Should we expect new 100% retail like server in upcoming week? :D

lel i'm so blind ;p

about the source and my server it's not a project about to go live, it's a project i'm trying to build in order to learn more and more about development and trying to make my own codes/ideas so yes i'm clueless but i'm trying to learn :) Also it's l2j gracia final source so as you already know it's outdated as hell but it's a client i like and since it's crap it's better for me to make tests and trying to learn ;p

And btw thanks for your reply

12 hours ago, wongerlt said:

public static void separateAndSend(final String html, final L2PcInstance acha)
	{
		if (html == null)
			return;
		
		if (html.length() < 4090)
		{
			acha.sendPacket(new ShowBoard(html, "101"));
			acha.sendPacket(new ShowBoard(null, "102"));
			acha.sendPacket(new ShowBoard(null, "103"));
			
		}
		else if (html.length() < 8180)
		{
			acha.sendPacket(new ShowBoard(html.substring(0, 4090), "101"));
			acha.sendPacket(new ShowBoard(html.substring(4090, html.length()), "102"));
			acha.sendPacket(new ShowBoard(null, "103"));
			
		}
		else if (html.length() < 12270)
		{
			acha.sendPacket(new ShowBoard(html.substring(0, 4090), "101"));
			acha.sendPacket(new ShowBoard(html.substring(4090, 8180), "102"));
			acha.sendPacket(new ShowBoard(html.substring(8180, html.length()), "103"));
			
		}
	}

so max 12270 bytes on c6(maybe it just mistake in source), and on h5 i see 24540 bytes max.

Yeah i've check this on some h5 sources i got and there was a part like this one, but i didn't try to implent it on my source. I'm gonna check it thanks

  • 0
Posted (edited)

Limits are defined by the client, on IL it's way shorter than postIL clients, but it's still limited. Nothing you can do about.

Consider to review it.

Edited by Tryskell
  • 0
Posted
14 hours ago, Tryskell said:

Limits are defined by the client, on IL it's way shorter than postIL clients, but it's still limited. Nothing you can do about.

Consider to review it.

Yes i think about that because every thing i tried by server side trying to increase the site didn't worked at all, so i guess it's controlled by client side.

 

13 hours ago, tazerman2 said:

maybe you can make better that code like small with 1-2 less table maybe i can do if you want help

Yeah if you could help me on this would be just perfect :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Dragic is a trusted guy—buy with confidence. The feature list looks incredibly solid, and you've clearly put a ton of work into this pack. Good luck with the sale, mate!
    • Im Selling my Interlude server L2wish only The Data and Core of L2wish based on lucera2 files with source code reconstructed which i did a long time ago. Im not selling the servername copyrights logos launcher etc only server data and source code, including Essence Interface reworked with interface source also.      EXP/SP: x75  Adena: x20  Drop: x20  Spoil: x20  Seal Stones: x5  Fangs of Stakato: x5  Raid Boss EXP/SP: x75  Raid Boss Drop: x1  Epic Boss Drop: x1  Manor: x5  Safe Enchant: +3  Max Enchant: Unlimited   Normal Scroll S/A Grade: 50%   Blessed Scroll S/A Grade: 55%    Normal Scroll B/C/D Grade: 50%    Blessed Scroll B/C/D Grade 55%  Max clans in ally (2)  3rd Class Cost (700 Halisha's Mark from Shrine of Loyalty)  NPC Buffer with 3h buff duration  GM Shop until B-Grade  Mana Potions  (1000 Power Delay 10 Seconds)  Auto-learn skills   Buff Slots (22+4 extra with Divine Inspiration)  Autopickup  Auction House in NPC at all towns  Offline Stores  Max Clients per PC (2)  Retail Geodata and Pathnodes  Reworked movement  Shift + Click Droplist on Monsters  Alt + Click Remove Buffs  Global Shout & Trade Chat  Special akamanah and zariche transformation  Seven Sings (Open)  Olympiad Weekly Circle  Olympiad Non-class  (5 min participants to begin)  Olympiad Class based (5 min participants to begin)  Tyrannosaurus drop Top LS chance 20% 5 Minutes Respawn  Flames of Invincibility cast 5 sec / duration 30 sec  Premium Account System  Auto Farm system using 10th Skill Bar.  IMPROVED RING OF CORE +1 STR +1 INT • INCREASE M. ATK. AND P. ATK.  IMPROVED EARRING OF ORFEN +1 WIT • INCREASE CASTING SPEED.  Subclass Quest           Part I: Kill Cabrio (Aden-Seal of Shilen) Talk to the box and bring the item to Subclass Quest           NPC.           Part II: Go for Hallate TOI 3, Kernon TOI 8 and Golkonda TOI 11, (Regardless of the order)           kill them, talk to the boxes and bring the sticks to Subclass Quest NPC to redeem your           subclass item.    Vote Reward System with Vote Coins and 12 Hours Vote Rune.  Vote Rune increases your P. Def and M. Def by 6%, P. Attack and M. Attack by 4%, Movement Speed by 4%.  Duration 12 Hours   Quest Name Drop  Relics of the Old Empire x4-8  Gather The Flames x3  Alliance with the Ketra Orcs x5  Alliance with the Varka Silenos x5  War with Ketra Orcs x10  War with the Varka Silenos x10  The Finest Food x5  A Powerful Primeval Creature x5  Rise and Fall of the Elroki Tribe x8  Legacy of Insolence x6-50%  Exploration of Giants Cave Part 1 x3  Exploration of Giants Cave Part 2 x3   Seekers of the Holy Grail x10   Guardians of the Holy Grail x10  Hunt of the Golden Ram Mercenary Force x10  The Zero Hour x5  Delicious Top Choice Meat x1  Heart in Search of Power x1  Whisper of Dreams 1/2 x3  In Search Of Fragments Of The Dimension x1 Raid Boss Name LvL Respawn  Frintezza    80 Respawn 48 Hours + - 30 Min  • Frintezza’s Necklace drop chance is 100%  Valakas    80 Respawn 240 Hours + - 30 Min  Sleep time 30 Minutes • Necklace of Valakas drop chance is 100%  Antharas    80 Respawn 192 Hours + - 30 Min  Sleep time 30 Minutes • Earring of Antharas drop chance is 100%  Baium    80 Respawn 120 Hours + - 30 Min  Sleep time 30 Minutes • Ring of Baium drop chance is 100%  Zaken    80 Respawn 48 Hours + - 30 Min  Door Open 22:00 in the night • Zaken’s Earring drop chance is 100%  Orfen    80 Every 24 Hours -+ 20 Minutes  • Earring of Orfen drop chance is 30%  Core    80 Every 26 Hours -+ 20 Minutes   • Ring of Core drop chance is 30%  Ant Queen    80 Every 28 Hours -+ 20 Minutes • Ring of Queen Ant drop chance is 30%  Splendor Barakiel    80 Spawn 6 Hours + - 15 Min Random  Subclass - Cabrio    80 Spawn 6 Hours + - 15 Min Random  Subclass - Hallate    80 Spawn 6 Hours + - 15 Min Random  Subclass - Kernon    80 Spawn 6 Hours + - 15 Min Random  Subclass - Golkonda    80 Spawn 6 Hours + - 15 Min Random   Ketra's Hero Hekaton    80 Spawn 22 Hours + - 15 Min Random   Ketra's Commander Tayr    80 Spawn 22 Hours + - 15 Min Random  Varka's Hero Shadith    80 Spawn 22 Hours + - 15 Min Random   Varka's Commander    80 Spawn 22 Hours + - 15 Min Random   Command Description .getreward Get vote reward from Hopzone. .rune Your Rune Informations. .menu Personal Menu Options. .raid Shows Normal Raids & Respawn. .epic Shows Epic Raids & Respawn. .rewards Get your Achievments. .offline Offline Shops. .relog Clearing your cache fps.     Source code reconstructed from my Lucera2 project.           Contact me for more informations, trollers will be not answered and don't expect a low price or a price drop. This project was running with 500+ real players.
    • TG Support: https://t.me/buyingproxysup | Channel: https://t.me/buyingproxycom Discord support: #buyingproxy | Server: Join the BuyingProxy Discord Server!  Create your free account here
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..