Jump to content

[share]npc HTML limits


Guma!

Recommended Posts

for those who have problem with very long html

 

can be configured:

 

 

Index: /TrunK/L2JBrasil_CORE/java/com/it/br/Config.java
===================================================================
--- /TrunK/L2JBrasil_CORE/java/com/it/br/Config.java (revision 674)
+++ /TrunK/L2JBrasil_CORE/java/com/it/br/Config.java (revision 687)
@@ -917,4 +917,5 @@
    public static boolean   ALLOW_TITLE_FOR_NEW_CHARS; 
    public static String    TITLE_FOR_NEW_CHARS;
+   public static int       NPC_HTML_LIMIT;
    public static boolean   CASTLE_SHIELD; 
    public static boolean   CLANHALL_SHIELD; 
@@ -1288,5 +1289,5 @@
               ALT_NEW_SPAWN_Y = Integer.parseInt(L2JBrasil.getProperty("CustomSpawnY", ""));  
               ALT_NEW_SPAWN_Z = Integer.parseInt(L2JBrasil.getProperty("CustomSpawnZ", ""));  
+              NPC_HTML_LIMIT  = Integer.parseInt(L2JBrasil.getProperty("NpcHtmlLimit", "8192")); 
               TITLE_FOR_NEW_CHARS = L2JBrasil.getProperty("SetNewCharTitle", "L2JBrasil");
               SHOW_WELCOME_HTML_ON_PLAYER_LOGIN = Boolean.parseBoolean(L2JBrasil.getProperty("ShowWelcomeinfo", "False"));
Index: /TrunK/L2JBrasil_CORE/java/com/it/br/gameserver/serverpackets/NpcHtmlMessage.java
===================================================================
--- /TrunK/L2JBrasil_CORE/java/com/it/br/gameserver/serverpackets/NpcHtmlMessage.java (revision 623)
+++ /TrunK/L2JBrasil_CORE/java/com/it/br/gameserver/serverpackets/NpcHtmlMessage.java (revision 687)
@@ -169,5 +169,5 @@
	public void setHtml(String text)
	{
-        if(text.length() > 8192)
+        if(text.length() > Config.NPC_HTML_LIMIT)
		{
			_log.warning("Html is too long! this will crash the client!");
Index: /TrunK/L2JBrasil_CORE/config/L2JBrasil.properties
===================================================================
--- /TrunK/L2JBrasil_CORE/config/L2JBrasil.properties (revision 674)
+++ /TrunK/L2JBrasil_CORE/config/L2JBrasil.properties (revision 687)
@@ -271,2 +271,5 @@
ClanLevel8Members = 80
ClanLevel9Members = 100
+
+#html limitations size allowed 
+NpcHtmlLimit = 8192

Link to comment
Share on other sites

has some npc q is very long .. html

as the drop of the mob, but of course you can reduce the drops ..

 

but if you even want a html faser with several lines can be configured with this option

 

I know several here do not need it, but those who already use compiled  pack is good.

Link to comment
Share on other sites

Index: /TrunK/L2JBrasil_CORE/java/com/it/br/gameserver/serverpackets/NpcHtmlMessage.java

===================================================================

--- /TrunK/L2JBrasil_CORE/java/com/it/br/gameserver/serverpackets/NpcHtmlMessage.java (revision 623)

+++ /TrunK/L2JBrasil_CORE/java/com/it/br/gameserver/serverpackets/NpcHtmlMessage.java (revision 687)

@@ -169,5 +169,5 @@

public void setHtml(String text)

{

-        if(text.length() > 8192)

+        if(text.length() > Config.NPC_HTML_LIMIT)

{

_log.warning("Html is too long! this will crash the client!");

 

if it is > 8192 client will be crash ! :|

 

don't spam

Eh,it's very good

especially for the rbs.

 

Link to comment
Share on other sites

yep i some time ago made that and like xAddytzu that rly crash client then that isnt recommendet,for rbs drop better thing is edite that script, add something like pages, 1page = 10items and you dont get any errors ;]

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...