[Guide]Make your Own Npc L2J 

Newbie Spellweaver
Joined
Nov 17, 2006
Messages
43
Reaction score
0
Location
Greece
To make ur own npc u must know the basics (how to make htmls and other thinks...)
You must follow my step to success if u have problem tell me
I will make my custom gatekeeper for example:


1. Go to your L2j Database

2. Go to your NPC Table

3. Search and find one npc that you like his template

4. After that make a text file and put this :
INSERT INTO `npc` (`id`, `name`, `class`, `collision_radius`, `collision_height`, `level`, `sex`, `type`, `attackrange`, `hp`, `mp`, `str`, `con`, `dex`, `int`, `wit`, `men`, `exp`, `sp`, `patk`, `pdef`, `matk`, `mdef`, `atkspd`, `aggro`, `matkspd`, `rhand`, `lhand`, `armor`, `walkspd`, `runspd`, `faction_id`, `faction_range`, `isUndead`) VALUES (put an id that not exist, 'put npc name', 'put npc class for example GK : NPC.a_teleporter_FHuman', 10, 24, 70, 'male or female', 'his type for example GK: L2Teleporter', 40, 3862, 1494, 40, 43, 30, 21, 20, 10, 5879, 590, 1444, 514, 760, 381, 253, 0, 253, 0, 0, 0, 80, 120, NULL, NULL, 0);
5. Then execute from navicat the text

6. Now go C:/yourserver/gameserver/data/html/thetypethatuputontext for example L2Teleporter (so file Teleporter) and there make a html file

7. Rename the file to the Id of ur npc for example 4444.html

8. Now open and make anything u want for example if u want a gk that go only frinteza type this (u must open in as text not html):
<html>
<body>
<center><tr><td><font color="FF40FF">-= Chose Your npc Name =-</font></tr></td><br>
 <tr><td><font color="FF0066">______________________________</font></tr></td><br>
<tr><td><font color="FF40FF">Chose Your npc Name</font></tr></td><br>
<tr><td>Welcome, Traveler you can go Frintezza</tr></td><br>
<tr><td>for 10.000 adena.</tr></td>
<br>
<tr><td><a action="bypass -h npc_%objectId%_Chat 30"><font color="8000C0">Frintezza room</font></a></tr>
<br>
 
<tr><td><font color="FF0066">______________________________</font></tr></td>
</body>
</html>
9. Now u have only to create a file that it have the id and the npc_%objectId%_Chat that u put and make in C:/yourserver/gameserver/data/html/thetypethatuputontext (the green number) for example 4444_30.html and type in this:
<html>
<body>
<center><tr><td><font color="800080">-= Frintezza =-</font></tr></td><br>
 <tr><td><font color="FF0066">______________________________</font></tr></td><br><br>
<tr><td><a action="bypass -h npc_%objectId%_goto 9054" msg="811;Frintezza Room"><font color="FF0000">Frintezza Room</font></a></td></tr>
<tr><td><br></td></tr>
<tr><td><br></td></tr>
 
<tr><td><font color="FF0066">______________________________</font></tr></td><br>
<a action="bypass -h npc_%objectId%_Chat 0"><font color="FFF080">Back</font></a>
</body>
</html>

10. Now u have to make a text file with this inside and u put it at C:/yourserver/sql/yourtextname
insert into teleport values
('Frintezza Room , 9054, 174238, -86405 -5109, 10000, 0);

11. Execute in navicat that text to insert the value

12. Now u have only to go in ur server and spawn it
That's all plz tell me if I do something wrong because I am not too good :D
By Blackeye (asedese,h3Xx I have many nicknames -_-)
 
Last edited:
Re: [Guide]Make ur Own Npc

Thats not Right , do u have create only in the server database a NPC and has Spawn this?

Than u see a big Withe rabbit^^

U must add it in the npcname-e.dat and npcgrp.dat in the client ,too ;)
 
Re: [Guide]Make ur Own Npc

Yes I forgot it :D
Basic it isn't necesery because it use an template that exist from the beggining
 
Yes I like it it's cool......(:))

(Pote tha mpeis msn more se vrika merikes lyseis)
Sorry for my foreign languange to this forum,but I'm fro same country with h3xx...
 
And you put new teleport places....

Let me see you are newbie?? No so you don't need my guides...

the fact is not your guide. this is a simple thing and they don't know it.
it is obvious that to make a new npc you should do that in your guide. so let them to think a bit not just to take a ready guide. they running a server and they should be good admins not to write new update @#^@#^ by Xxx without give the right credits!
 
Hello.

Thank you very much for the guide. i'm a noob in such things - starting to learn them, and this guide help me VERY much. Thank you agian!

//ziza
 
well actually ...
some basicly things u just forgott to tell

if u use an template id (an id from another npc) u don't see an rabbit ... (so no client edits)
then u can give the npc a name and a title but u have to set the server side names and title value to 1
...

for making a shop / or even a gm shop
u have to set the type tp "L2Merchant"
put a html file into data/html/merchant and call a link to a shop id
<html><body>Shop Buddy::<br>
Hey Dude , du u want to but something? Or just Sell something?<br>
<a action="bypass -h npc_%objectId%_Buy 400001">Buy</a><br>
<a action="bypass -h npc_%objectId%_Sell">Sell</a><br>
</body></html>
400001 is here ur personal shop id .. and u have to insert this too in the merchant_shopids table..
Code:
INSERT INTO `merchant_shopids` (`npc_id`,`shop_id`) VALUES (`ur npc id`,`400001`);

so erm ... if u reload server and now klick on the npc to buy something ull receive an empty buyin' list
just shift-klick on the npc to edit the buylist and be happy =D

well thats just how it wors & maybe to expand the guide here
 
Back