Author Topic: [TIP] Optimize Network Traffic & Cleanup HTML's  (Read 1083 times)

Offline Rootware

  • Inner Circle
  • Orfen
  • *
  • Posts: 2.113
  • Awards Customer crew on duty ! Searched by gold diggers, loved by Mama Tryskell. Bring good advices or reports.
[TIP] Optimize Network Traffic & Cleanup HTML's
« on: November 10, 2013, 08:37:11 PM »
Today, purely by chance found a very interesting thing. Not need adding to html the full name of item. Just need add him ID.

ITEM NAMES

Look this:

Adena -> 9
Recipe: Chain Mail Shirt -> ࢜
Recipe: Stormbringer -> ࣺ
Blessed Spiritshot: D-Grade -> ཬ

and all items support this record.

Standart record:
Code: [Select]
						replyMSG.append("<td fixwidth=165>" + ItemTable.getInstance().getTemplate(itemId).getName() + "</td>");

Optimized record:
Code: [Select]
						replyMSG.append("<td fixwidth=165>&#" + itemId + ";</td>");



CASTLE NAMES

Gludio Castle -> &%1;
Dion Castle -> &%2;

or short record

Gludio -> &^1;
Dion -> &^2;

and etc.

where, - 1,2, ... is ID from castlename-e.dat



STRINGS NAMES

&$1; &$2; ....

all strings name from sysstring-e.dat by ID.



NPC NAMES

&@18041; and etc...

18041 - is NPC ID from npcname-e.dat



P.S. 100% works only inside <body> tags.
« Last Edit: September 11, 2015, 06:07:57 PM by Tryskell »
Code: [Select]
<html><head><body>Трискел:<br>
Трискел не говорит с дураками, которые не знают свою профессию!
</body></html>

Offline Tryskell

  • The cute dwarf
  • Administrator
  • Core
  • *
  • Posts: 3.763
  • Awards You don't like me, but I got the power. Forever dwarf.
Re: Optimize Network Traffic & Cleanup HTML's
« Reply #1 on: November 10, 2013, 11:51:56 PM »
Nice find ;o

I knew than numerous things are accessible from client (items names are one of them, like you show), but I didn't know how to use it. There are more lists ^^.
Code: [Select]
<html><body>Triskel:<br>
Triskel does not speak with foolish fellows who do not know their profession!
</body></html>

Offline Rootware

  • Inner Circle
  • Orfen
  • *
  • Posts: 2.113
  • Awards Customer crew on duty ! Searched by gold diggers, loved by Mama Tryskell. Bring good advices or reports.
Re: Optimize Network Traffic & Cleanup HTML's
« Reply #2 on: November 12, 2013, 07:47:20 PM »
First post updated.
Code: [Select]
<html><head><body>Трискел:<br>
Трискел не говорит с дураками, которые не знают свою профессию!
</body></html>

Offline Hasha

  • Inner Circle
  • Ant Queen
  • *
  • Posts: 1.826
  • Super Trooper
  • Awards Searched by gold diggers, loved by Mama Tryskell. If your ideas were electricity, you could probably power a city. Bring good advices or reports. H for Hasha
Re: Optimize Network Traffic & Cleanup HTML's
« Reply #3 on: November 12, 2013, 08:53:47 PM »
Good job Root, nice catch :)
Hasha, DreamLand core/datapack developer.

"Genius is an idiot, who does't know that problem cannot be solved and he solves it."
"Knowledge gives the feeling of beeing smart to dumb people and beeing dumb to smart people."
"Nobody remains virgin, live fucks everyone."
"Time wasted with a joy is not wasted time."
Dreams: "When they come true, you don't know what to do."