All about HTML

Note: HTML in Lineage II doesn't support all the tags that html has and some syntax differs alot from the W3C standards.

How to assign a HTML to an NPC
First of all, you should know where to put your HTML files so the NPC can show them to the players.

Here is a list of directories where you should put your files for different types of NPCs.

Of course, these directories apply only to HTMLs that are not controlled by scripts; for example, quest HTMLs go in the corresponding "scripts/quests/questName" directory.

These files follow some basic rules:

So if you want to make an NPC with a main dialog and two additional pages, this would be a good example:
 * the initial HTML shown by the NPC when you click on him is named "npcId.htm";
 * all the normal dialog options are named "npcId-num.htm" and are accessible from the main HTML via the following bypass: "bypass -h npc_%objectId%_Chat num".

12345.htm: Name of the NPC: Some text, bla bla bla More text, bla bla First additional page Second additional page

12345-1.htm:

Name of the NPC: This is the first additional dialog More text, bla bla Second additional page Go back

12345-2.htm:

Name of the NPC: This is the second additional dialog More text, bla bla First additional page Go back

Additionally, if you want some text to appear in the title of the dialog window (the upper bar which you hold to drag the window), you can add this before the BODY tag:

Some text in title

So our HTML example could be made like this:

Some text in title Name of the NPC: Some text, bla bla bla More text, bla bla First additional page Second additional page

There is a lot more of stuff you can put in the HTMLs though. For a much more comprehensible list, visit this thread: TODO find the thread with the long list of all tags and their examples.

HTML Formatting
The formatting used in L2J is usually the following:
 * opening and closing HTML and BODY tags on the same line, in a separate line from all other content (sometimes the name of the NPC goes in the same line as opening BODY tag, but that's not good style);
 * no indentation (it's ok for your custom HTMLs but not for L2J as it only adds more characters and the default HTMLs are simple enough to not require indentation);
 * a new line after every BR tag;
 * no newlines in the middle of text (if there are no BR tags then must be no newlines).