Jump to content

[Guide]How to Import NPC normally


Recommended Posts

First of all Hello Maxcheaters.

Serveral days Users Contact to me and Ask to help add Gmshop,Global GK,Buffer and etc.

So i tired to explain.

Also forum is full with topics with chronicle npcs requests...

I decided to open topic about how to import NPC normally.

 

Let's Start.

 

i took L2J-Teon.

for example we download some GMShop

first of all we must add sql file yes?

Go Navicat

Right Click on l2jdb and select Execute Batch File

Select GMshop-s sql and press Start.

We Got Error

[Err] 1136 - Column count doesn't match value count at row 1

What we must do?

 

1.Just Click On table npc and then Export Wizard

 

59132782.png

 

2.We must select export format. Select SQL script file(*.sql)

 

15428436.png

 

3.Below Export to Click ...

 

68364004.png

 

4.Save File to desktop

 

42001186.png

 

5.Click 3 times Next and then Start

 

26262611.png

 

6.If you see this all is ok

 

[Msg] [Exp] Table Type - SQL script file
[Msg] [Exp] Getting and Exporting data ...
[Msg] [Exp] Export table [npc]
[Msg] [Exp] Export to - C:\Documents and Settings\Leki\Desktop\npc.sql
[Msg] [Exp] Finished - Successfully

 

7.Now go to desktop and open npc.sql with Notepad.

 

30344604.png

 

8.Now you must choose how your gmshop must like? ID you can view Here

 

9.Say you choose Mew the Cat(14177)

 

10.Press Ctrl+F and write 14177

 

11.You see Mew the Cat's SQL script copy it

 

INSERT INTO npc
   (`id`, `idTemplate`, `name`, `serverSideName`, `title`, `serverSideTitle`, `class`, `collision_radius`, `collision_height`, `level`, `sex`, `type`, `attackrange`, `hp`, `mp`, `hpreg`, `mpreg`, `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`, `absorb_level`, `absorb_type`, `ss`, `bss`, `ss_rate`, `AI`)
VALUES
   (14177, 14177, 'Mew the Cat', 0, '', 0, 'Monster.cutie_cat', 8.00, 15.00, 78, 'female', 'L2Npc', 40, 7085, 2057, 13.43, 3.09, 40, 43, 30, 21, 20, 25, 0, 0, 1715, 555, 1069, 520, 278, 0, 333, 0, 0, 0, 52, 154, NULL, 0, 0, 0, 'LAST_HIT', 0, 0, 0, 'fighter');

 

12.Now you must change some things...

 

INSERT INTO npc

  (`id`, `idTemplate`, `name`, `serverSideName`, `title`, `serverSideTitle`, `class`, `collision_radius`, `collision_height`, `level`, `sex`, `type`, `attackrange`, `hp`, `mp`, `hpreg`, `mpreg`, `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`, `absorb_level`, `absorb_type`, `ss`, `bss`, `ss_rate`, `AI`)

VALUES

  (NPC_ID, 14177, 'NPC_NAME', 1, 'NPC_TITLE', 1, 'Monster.cutie_cat', 8.00, 15.00, 78, 'female', 'NPC_TYPE', 40, 7085, 2057, 13.43, 3.09, 40, 43, 30, 21, 20, 25, 0, 0, 1715, 555, 1069, 520, 278, 0, 333, 0, 0, 0, 52, 154, NULL, 0, 0, 0, 'LAST_HIT', 0, 0, 0, 'fighter');

 

*NPC_TYPE

GMShop - L2Merchant

Gatekeeper - L2Teleporter

Monster - L2Monster

Raid Boss - L2RaidBoss

Grand Boss  - L2GrandBoss

Minion - L2Minion

Other Npc - L2Npc

 

Save it in *.sql file and execute :)

 

That all :) Thanks for writing i hope i help :)

 

Credits for Guide to me :)

 

P.s  I hope some1 will give me karma

Link to comment
Share on other sites

  • 3 weeks later...

[Err] 1062 - Duplicate entry '1' for key 1

[Err] INSERT INTO `npc` VALUES (1, 1, 'Thomas D. Turkey', 0, 'Misguided Holiday Scrooge', 0, 'LineageMonster4.br_crazy_turkey', 20.00, 30.00, 70, 'male', 'L2Npc', 40, 3862, 1494, 0.00, 0.00, 40, 43, 30, 21, 20, 20, 0, 0, 1303, 471, 607, 382, 253, 0, 333, 0, 0, 0, 0, 30, 132, 0, 0, 'LAST_HIT', 'false');

[Msg] Finished - Unsuccessfully

--------------------------------------------

 

And this info i have (i step by step in your guide)

Link to comment
Share on other sites

  • 3 weeks later...

[Err] 1062 - Duplicate entry '1' for key 1

[Err] INSERT INTO `npc` VALUES (1, 1, 'Thomas D. Turkey', 0, 'Misguided Holiday Scrooge', 0, 'LineageMonster4.br_crazy_turkey', 20.00, 30.00, 70, 'male', 'L2Npc', 40, 3862, 1494, 0.00, 0.00, 40, 43, 30, 21, 20, 20, 0, 0, 1303, 471, 607, 382, 253, 0, 333, 0, 0, 0, 0, 30, 132, 0, 0, 'LAST_HIT', 'false');

[Msg] Finished - Unsuccessfully

--------------------------------------------

 

And this info i have (i step by step in your guide)

 

He forgot to mention in his guide you need to change the NPC ID.

 

The NPC_ID is the first number after VALUES, in your case its 1, change it to any number that is not already in use, for instance 77701.

 

Then you will be working.

Link to comment
Share on other sites

Good guide that you can do it for make an .sql file for one mod/npc/armor/weapon/item that you make and you dont know to create .sql file for each project (l2j server dont have the same .sql files like the l2j teon that you use for example).

Link to comment
Share on other sites

  • 8 months later...

[Err] 1146 - Table 'l2jdb.npc' doesn't exist

[Err] INSERT INTO `npc` VALUES (1, 1, 'Thomas D. Turkey', 0, 'Misguided Holiday Scrooge', 0, 'LineageMonster4.br_crazy_turkey', 25.00, 35.00, 80, 'male', 'L2Npc', 40, 680.000000000000000, 2000.000000000000000, 0.000000000000000, 0.900000000000000, 40, 43, 30, 21, 20, 20, 0, 0, 8.47458, 60000.00000, 5.78704, 200000.00000, 253, 1, 0, 333, 0, 0, 0, 19.50000, 160.00000, 1, 1, 0, 1);

[Msg] Finished - Unsuccessfully

--------------------------------------------------

 

Can you help me?

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
Reply to this topic...

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



  • Posts

    • Well, sorry not sorry for resurrecting old topic, but I believe it's ultimately stupid to implement license checks like Vilmis did 🙂   private static String url = "jdbc:mysql://185.80.128.233/" + getData("Zm9ydW1fZGI="); private static String username = getData("bXJjb3B5cmlnaHQ="); private static String password = getData("Y29weXJpZ2h0XzEyMw=="); con = GlobalDB.getInstance().getConnection(); PreparedStatement statement; statement = con.prepareStatement("SELECT field_6 from core_pfields_content WHERE member_id = ?"); statement.setInt(1, Config.FORUM_USER_ID); ResultSet rset = statement.executeQuery();   This awesome way of coding things leaves us with base64-encoded credentials and DB exposed and accessible globally 😉 Btw he checks his licensing data from some plugin generated table his forum uses. Vilmis took action and ensured that mrcopyright user would have only needed accesses and rights for this operation. But he forgot to ensure that his INFORMATION_SCHEMA database would not be exposed and readable... That leads us to fully readable server variables like version used (10.1.26-MariaDB-0+deb9u1 - pretty ancient DB and OS, I'd assume). From here you can go south and do some kinky stuff, if you want and have knowledge for that. But who cares, right?   Ooh, table core_pfields_content field_6 is IP address which is checked by FORUM_USER_ID. Yep, you can query all IP addresses there (124 of them right now) and also do whatever you want with them! 🙂  The most fun part? Files source has been shared what, more than 2 years ago?  Vilmis still uses very same credentials and never changed it after sources exposure - who cares. Although, "sources" may be way too strong word here. If anyone still use paid Orion versions, I'd suggest packing your shit and leaving immediately, or at least fix this incompetent fool caused problems. It's obvious Vilmis don't care or maybe doesn't even know from the first place how to solve this problem (hint hint - tiny PHP Rest API microservice which would do absolutely the same but without exposing sensitive data?). By doing that, he exposes his infrastructure and YOUR data, and he does that for more than 2 years now 🙂 Developer of century!    
    • rename the l2.bin into l2.exe
    • L2LIVE.PRO- Dynamic Mid-rates Essence Seven Signs GRAND OPENING - July 5, 20:00 GMT+3 (EEST) TEST SERVER IS OPEN - COME AND CHECK IT OUT TODAY! Join our community and be part of it at: https://www.l2live.pro https://discord.gg/k3NMgR4Dmu   Server description * EXP/SP: Dynamic (x1- x100 based on your level, *before* Sayha and EXP buffs * Adena: x50 / Item Drop: x10 / Fishing EXP increased / Attribute EXP increased * Simplified gameplay to stay in the loop while not spending hours and hours farming * Starter Pack containing very useful items for beginners * MP replenishing potions with auto-consumption * No overpowered donations L2LIVE shop * All spellbook coupons, pet spellbook coupons and master books are sold via Game Assistant * Additionally you can buy SP pouches, enchanted talismans, pet training guides and various other consumables for Adena and L-Coin * More items such as cloaks, more talismans, agathions, belts, pendants, enchantment scrolls of various grades, evolution stones, etc will be added! Shop server as a shortcut, and all retail-like ways of earning items are still here! L-Coins * Drops with small change and in random amounts from Lv60+ monsters  * All raidbosses drop random amount of L-Coin Pouches generating up to 420 Lcoin per unit. **Grand Olympiad and Events** * Grand Olympiad is held week day * Format is 1v1, unlimited weekly fights  * Heroes are declared weekly at Sunday * There are three automated events - TvT, CTF and Deathmatch, running at evenings * Orc Fortress, Battle with Balok, Keber Hunter, Archievements Box, Daily Gift Calendar provisional events are active too Custom user commands * .offlineplay command, your character will keep playing till death or server restart * .offlineshop command, keeps your shop sitting until all items are purchased * .apon / .apoff - enable/disable HP/MP autoconsume And lots of other small improvements are waiting for you!   Join our community and be part of it at: https://www.l2live.pro https://discord.gg/k3NMgR4Dmu
  • Topics

×
×
  • Create New...