Jump to content
  • 0

Change the maximum size value of htm.


Psyancy

Question

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!

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

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?

Link to comment
Share on other sites

  • 0
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
Link to comment
Share on other sites

  • 0
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

Link to comment
Share on other sites

  • 0
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

Link to comment
Share on other sites

  • 0
Just now, wongerlt said:

best way is with phx :D

gr8 xd i never used any of these ;p

Isn't any other way changing this?

Link to comment
Share on other sites

  • 0
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>

 

Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

  • 0
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
Link to comment
Share on other sites

  • 0
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

Link to comment
Share on other sites

  • 0

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
Link to comment
Share on other sites

  • 0
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 :)

Link to comment
Share on other sites

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
Answer this question...

×   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.



×
×
  • 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