Jump to content

[Guide]Working On SQL For Newbies


Recommended Posts

I think it will be usefull for newbies.. Ok Lets Start

 

1.Changing Starting Zone

DELETE FROM char_templates WHERE ClassId=0; 
DELETE FROM char_templates WHERE ClassId=10; 
DELETE FROM char_templates WHERE ClassId=18; 
DELETE FROM char_templates WHERE ClassId=25; 
DELETE FROM char_templates WHERE ClassId=31; 
DELETE FROM char_templates WHERE ClassId=38; 
DELETE FROM char_templates WHERE ClassId=44; 
DELETE FROM char_templates WHERE ClassId=49; 
DELETE FROM char_templates WHERE ClassId=53; 

INSERT INTO `char_templates` VALUES 
(0, 'Human Fighter', 0, 40, 43, 30, 21, 11, 25, 4, 80, 6, 41, 300, 333, 33, 44, 33, 115, 81900, 140425, -124265, -1929, 0, 1.10, 1.188000, 9.0, 23.0, 1.10, 1.188000, 8.0, 23.5, 1147, 1146, 10, 2369, 5588), 
(10, 'Human Mage', 0, 22, 27, 21, 41, 20, 39, 3, 54, 6, 41, 300, 333, 28, 40, 28, 120, 62500, 140425, -124265, -1929, 0, 1.01, 0.872640, 7.5, 22.8, 1.01, 0.872640, 6.5, 22.5, 425, 461, 6, 5588, 0), 
(18, 'Elf Fighter', 1, 36, 36, 35, 23, 14, 26, 4, 80, 6, 41, 300, 333, 36, 46, 36, 125, 73000, 140425, -124265, -1929, 0, 1.15, 1.242000, 7.5, 24.0, 1.15, 1.242000, 7.5, 23.0, 1147, 1146, 10, 2369, 5588), 
(25, 'Elf Mage', 1, 21, 25, 24, 37, 23, 40, 3, 54, 6, 41, 300, 333, 30, 41, 30, 122, 62400, 140425, -124265, -1929, 0, 1.04, 0.898560, 7.5, 24.0, 1.04, 0.898560, 7.5, 23.0, 425, 461, 6, 5588, 0), 
(31, 'DE Fighter', 2, 41, 32, 34, 25, 12, 26, 4, 80, 6, 41, 300, 333, 35, 45, 35, 122, 69000, 140425, -124265, -1929, 0, 1.14, 1.231200, 7.5, 24.0, 1.14, 1.231200, 7.0, 23.5, 1147, 1146, 10, 2369, 5588), 
(38, 'DE Mage', 2, 23, 24, 23, 44, 19, 37, 3, 54, 6, 41, 300, 333, 29, 41, 29, 122, 61000, 140425, -124265, -1929, 0, 1.14, 1.231200, 7.5, 24.0, 1.03, 0.889920, 7.0, 23.5, 425, 461, 6, 5588, 0), 
(44, 'Orc Fighter', 3, 40, 47, 26, 18, 12, 27, 4, 80, 6, 41, 300, 333, 31, 42, 31, 117, 87000, 140425, -124265, -1929, 0, 1.06, 1.144800, 11.0, 28.0, 1.06, 1.144800, 7.0, 27.0, 1147, 1146, 2368, 2369, 5588), 
(49, 'Orc Mage', 3, 27, 31, 24, 31, 15, 42, 3, 54, 6, 41, 300, 333, 30, 41, 30, 121, 68000, 140425, -124265, -1929, 0, 1.04, 0.898560, 7.0, 27.5, 1.04, 0.898560, 8.0, 25.5, 425, 461, 2368, 5588, 0), 
(53, 'Dwarf Fighter', 4, 39, 45, 29, 20, 10, 27, 4, 80, 6, 41, 300, 333, 33, 43, 33, 115, 83000, 140425, -124265, -1929, 1, 1.09, 1.487196, 9.0, 18.0, 1.09, 1.487196, 5.0, 19.0, 1147, 1146, 10, 2370, 5588);

 

2.Auto Restart Game Server

INSERT INTO global_tasks (task,type,last_activation,param1,param2,param3) VALUES ('restart','TYPE_GLOBAL_TASK','0','1','04:50:00','600');

 

3.Make Drop Only Adena

DELETE FROM `droplist` WHERE (`itemId`!='57') AND (`category`='-1')

 

4.Items For 1 Adena In the shop

update etcitem set price=5 where price > 1;   
update weapon set price=5 where price > 1;   
update armor set price=5 where price > 1;

 

5.Deleting From Spawn Mobs MOre than 51 lvl

DELETE spawnlist FROM spawnlist, npc WHERE spawnlist.npc_templateid=npc.idTemplate AND npc.level<51 AND npc.type="L2Monster"

 

6.Jewell Drop From Raid Boss

INSERT INTO droplist VALUES ('29001', '6660', '1', '1', '12', '300000'); 
INSERT INTO droplist VALUES ('29006', '6662', '1', '1', '8', '300000'); 
INSERT INTO droplist VALUES ('29014', '6661', '1', '1', '9', '300000'); 
INSERT INTO droplist VALUES ('29022', '6659', '1', '1', '13', '1000000'); 
INSERT INTO droplist VALUES ('29020', '6658', '1', '1', '2', '1000000'); 
INSERT INTO droplist VALUES ('29019', '6656', '1', '1', '31', '1000000'); 
INSERT INTO droplist VALUES ('29028', '6657', '1', '1', '34', '1000000');

 

7.Deleting Items Drop From Mobs

DELETE FROM droplist WHERE itemId='1864'; 
DELETE FROM droplist WHERE itemId='1865'; 
DELETE FROM droplist WHERE itemId='1866'; 
DELETE FROM droplist WHERE itemId='1867'; 
DELETE FROM droplist WHERE itemId='1868'; 
DELETE FROM droplist WHERE itemId='1869'; 
DELETE FROM droplist WHERE itemId='1870'; 
DELETE FROM droplist WHERE itemId='1871'; 
DELETE FROM droplist WHERE itemId='1872'; 
DELETE FROM droplist WHERE itemId='1873'; 
DELETE FROM droplist WHERE itemId='1874'; 
DELETE FROM droplist WHERE itemId='1875'; 
DELETE FROM droplist WHERE itemId='1876'; 
DELETE FROM droplist WHERE itemId='1877'; 
DELETE FROM droplist WHERE itemId='1878'; 
DELETE FROM droplist WHERE itemId='1879';

Link to comment
Share on other sites

Great work bro!! Keep sharing this great shares...

 

this is not a share, it's a kind of examples-guide.

Stop spamming -.-'

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.



×
×
  • Create New...