Jump to content

Usefull SQL script for L2J SQL Server


Recommended Posts

divider-png.png

Update Account and Characters

Make Admin Accesslevel

UPDATE 'characters' SET accesslevel = 200 WHERE char_name = 'Character Name' AND account_name = 'Account Name' 

Empty Characters table and Account tables

TRUNCATE TABLE characters
TRUNCATE TABLE accounts

 

 

divider-png.png

Make a Character Hero offline

the character you want to become must be offline


INSERT INTO heroes
( charId, char_name, class_id, count, played )
-- CHANGE ONLY THE (CHAR NAME)
SELECT charId, char_name, classid, 1, 2 FROM characters WHERE char_name = 'CHAR NAME';

Just change only the CHAR NAME and execute it!

 

 

divider-png.png

Update Your Custom NPC table

this will enable you to make your custom_npc overpowered

Make patk column int limit to 11 (max)

ALTER TABLE `custom_npc` CHANGE `patk` `patk` DECIMAL( 11, 0 ) NULL DEFAULT NULL 

Increase P.Atk of your Anti PK Guard

UPDATE custom_npc SET patk = 99999999999 WHERE type = 'L2Guard'

even gm with full +65535 guns/armor can't survive!

 

divider-png.png

Update Newbie Custom Spawn

1st. login as admin go to where ever you want the custom spawn will be and logout

2nd. open characters table, copy your location (x, y, z)

3rd. run this script to update custom spawn.

UPDATE char_templates SET x = 'YOUR CHAR X LOC', y = 'YOUR CHAR Y LOC', z = 'YOUR CHAR Z LOC'

 

 

divider-png.png

Add Custom ITEM to Characters Creation

During every creation of the new characters, they will avail what ever item you will add here


UPDATE char_creation_items SET classId = -1, itemId = 'ITEMID', amount = 1, equipped = "false";
UPDATE char_creation_items SET classId = 0, itemId = 'ITEMID', amount = 1, equipped = "false";
UPDATE char_creation_items SET classId = 10, itemId = 'ITEMID', amount = 1, equipped = "false";
UPDATE char_creation_items SET classId = 18, itemId = 'ITEMID', amount = 1, equipped = "false";
UPDATE char_creation_items SET classId = 25, itemId = 'ITEMID', amount = 1, equipped = "false";
UPDATE char_creation_items SET classId = 31, itemId = 'ITEMID', amount = 1, equipped = "false";
UPDATE char_creation_items SET classId = 38, itemId = 'ITEMID', amount = 1, equipped = "false";
UPDATE char_creation_items SET classId = 44, itemId = 'ITEMID', amount = 1, equipped = "false";
UPDATE char_creation_items SET classId = 49, itemId = 'ITEMID', amount = 1, equipped = "false";
UPDATE char_creation_items SET classId = 53, itemId = 'ITEMID', amount = 1, equipped = "false";
UPDATE char_creation_items SET classId = 123, itemId = 'ITEMID', amount = 1, equipped = "false";

this script will update all class during creation and they will have an item that you provided

 

 

divider-png.png

Add Custom Drop Items to specific Mobs

This script will execute additional drop items to specific mobs you desire

I use Tyrannosaurus the ID = 22215 and ITEM drop will be Infinity Bow ID = 6619


UPDATE droplist SET mobId = 22215, itemId = 6619, min = 1, max = 1, category = 1, chance = 7000

 

NOTE: Make sure you will backup your live data before doing this scripts

 

 

 


 

 

-- ~~ UPDATE ~~ --

Request by: Shilen

divider-png.png

Make Droplist for GrandBoss the same

NPC type:  L2GrandBoss

 


INSERT INTO droplist
( mobId, itemId, min, max, category, chance)
SELECT id, '[ YOUR DESIRED ITEM ]', 1, 1, 1, 10000 FROM npc WHERE type = "L2GrandBoss"

 

For custom_npc


INSERT INTO custom_droplist
( mobId, itemId, min, max, category, chance)
SELECT id, '[ YOUR DESIRED ITEM ]', 1, 1, 1, 10000 FROM custom_npc WHERE type = "L2GrandBoss"

 

thats all for now! I'll keep updating this thread soon!

 

good luck

 

Link to comment
Share on other sites

Great share bro...I need 1 sql script to make all rbs to have the same drops...Can you send it to me or share it here?

as you request! updated!

Link to comment
Share on other sites

 

 

You rock bro!!Thank you very much!!!I was need it very much!!+1 from me for your work and for helping ppl from community!

 

thanks for karma bro! if you have any problem with SQL syntax since L2 servers have some differences in comes of table's head and columns, just PM me or post your ERROR acquired here..

 

P. S. I use L2JFree CT2.2 Server.

Link to comment
Share on other sites

  • 3 months later...
  • 6 months later...
  • 1 month later...

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.



×
×
  • Create New...