Jump to content

L2jOrion.com - Interlude Server Files

Take a moment to join us, we are waiting for you.

Sign in to follow this  
donataz

Useful SQL commands in MariaDB

Recommended Posts

Just finished setting up my own server and ran into some SQLΒ commands that were very helpful. Improvise and change what you need how you need it and want it.Β 
Most of them are prettyΒ self explanatory but I'l do my best to explain

Β 

UPDATE buff_templates
SET itemid = 57; 

Updates table buff_templates and sets in each itemid to ADENA. Using same logic other tables and rows can be updated, inserted changed.

Β 

INSERT INTO `droplist` VALUES ('22105', '8085', '8', '15', '8', '1000000');

I used this to insert into specific raidboss a drop in this case (premium coin). values can be edited.

Β 

UPDATE `buff_templates` 
SET `useitem`='0' 
WHERE `itemId`='6393';

In this example we replace certain values where they can be found. If we have any itemID 6393 the sql swappedΒ  useitem to 0 which means not to use item. Its easy to edit this to change different stuff around without having to do it manualy by one. setting where condition only replaces it where it finds it and does not touche other rows.

Β 

UPDATE `droplist` SET `chance`='7500' 
WHERE `itemId`='6393' 
AND chance='15000';

This is the one I use more frequently when I want to chance lets say drop chance for 1 item, but the item has been inserted into many RB's. We set the Where condition to find the item, we set the new chance , and the last row AND chance only finds where the item has this specific chance to drop. I have inserted the same item into other raidboses with different chance and did not want to change that.Β 
I will update more as I go on.Β 

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

Γ—