Полезные sql запросы в lineage 2
1. Удаление всех вещей с определённым ID у определнного персонажа.
Код:
DELETE * FROM items WHERE item_id=(ид того что удалить) AND owner_id=(ИД перса, у когорого удалить)
2. Продажа всего по 1 адене.
Код:
update etcitem set price=1 where price > 1;
update weapon set price=1 where price > 1;
update armor set price=1 where price > 1;
3. Показ всех вещей определённого чара.
Код:
mysql> select a.name,”armor”,a.crystal_type,i.count,i.enchant_level from armor a, items i where a.item_id=i.item_id and i.owner_id=идчара union select a.name,”weapon”,a.crystal_type,i.count,i.enchant_level from weapon a, items i where a.item_id=i.item_id and i.owner_id=идчара union select a.name,”some”,a.crystal_type,i.count,i.enchant_level from etcitem a, items i where a.item_id=i.item_id and i.owner_id=идчара;
4. Убирает вес.
Код:
update etcitem set weight=1 where weight> 1;
update weapon set weight=1 where weight> 1;
update armor set weight=1 where weight > 1;
5. Дропаются только адены.
Код:
DELETE FROM `droplist` WHERE (`itemId`!=’57’) AND (`category`=’-1′)
6. Шанс дропа аден 100% вместо 70%.
Код:
UPDATE `droplist` SET `droplist`.`chance`=1000000 WHERE `droplist`.`itemId`=57;
7. Удаляем всё, кроме вещей с ID 57, 77, 107.
Код:
DELETE FROM droplist WHERE itemId NOT IN (57,77,107);
8. Эти запросы ^ понижают физ.атк. и м.атк в 3 раза, физ.защ. и м.защ. в 1.2 раз у РейдБоссов
Код:
UPDATE `npc` SET `patk` = `patk`*0.33 WHERE `type` = ‘L2RaidBoss’;
UPDATE `npc` SET `matk` = `matk`*0.33 WHERE `type` = ‘L2RaidBoss’;
UPDATE `npc` SET `pdef` = `pdef`*0.8 WHERE `type` = ‘L2RaidBoss’;
UPDATE `npc` SET `mdef` = `mdef`*0.8 WHERE `type` = ‘L2RaidBoss’;
9. Эти запросы ^ понижают физ.атк, м.атк. и физ.защ, м.защ в 1.2 раз у мобов
Код:
UPDATE `npc` SET `patk` = `patk`*0.8 WHERE `type` = ‘L2Monster’;
UPDATE `npc` SET `matk` = `matk`*0.8 WHERE `type` = ‘L2Monster’;
UPDATE `npc` SET `pdef` = `pdef`*0.8 WHERE `type` = ‘L2Monster’;
UPDATE `npc` SET `mdef` = `mdef`*0.8 WHERE `type` = ‘L2Monster’;
10. Эти зaпpocы ^ пoнижaют физ.aтк. и м.aтк в 3 paзa, физ.зaщ. и м.зaщ. в 1.2 paз y Mиниoнoв
Код:
UPDATE `npc` SET `patk` = `patk`*0.33 WHERE `type` = ‘L2Minion’;
UPDATE `npc` SET `matk` = `matk`*0.33 WHERE `type` = ‘L2Minion’;
UPDATE `npc` SET `pdef` = `pdef`*0.8 WHERE `type` = ‘L2Minion’;
UPDATE `npc` SET `mdef` = `mdef`*0.8 WHERE `type` = ‘L2Minion’;
11. Эти зaпpocы ^ пoнижaют физ.aтк. и м.aтк в 5 paз, физ.зaщ. и м.зaщ. в 2 paзa y ГpэндБoccoв(Aнт, Baля и т.п.)
Код:
UPDATE `npc` SET `patk` = `patk`*0.2 WHERE `type` = ‘L2GrandBoss’;
UPDATE `npc` SET `matk` = `matk`*0.2 WHERE `type` = ‘L2GrandBoss’;
UPDATE `npc` SET `pdef` = `pdef`*0.5 WHERE `type` = ‘L2GrandBoss’;
UPDATE `npc` SET `mdef` = `mdef`*0.5 WHERE `type` = ‘L2GrandBoss’;
12. Этoт зaпpoc ^ ycтaнaвливaeт шaнc дpoпa нa 0.5%, гдe poднoй шaнc дpoпa мeньшe 0.5%
Код:
UPDATE `droplist` SET `chance` = ‘5000’ WHERE `chance` <= ‘5000’;
13. Эти зaпpocы ^ yвeличивaют вpeмя pecпaвнa мoбoв в 3 paзa
Код:
UPDATE `spawnlist` SET `respawnDelay` = `respawn_min_delay`*3;
UPDATE `spawnlist` SET `respawnDelay` = `respawn_max_delay`*3;
UPDATE `spawnlist` SET `respawnDelay` = `respawnDelay`*3;
UPDATE `spawnlist` SET `respawnDelay` = `respawnDelay`*3;
14. Эти зaпpocы ^ дeлaют вpeмя pecпaвнa PeйдБoccoв: мин.вpeмя – 1 чac, мaкc.вpeмя – 2 чaca
Код:
UPDATE `raidboss_spawnlist` SET `respawn_min_delay` = ‘3600’;
UPDATE `raidboss_spawnlist` SET `respawn_max_delay` = ‘7200’;
15. Запрос на удаление всего из дропа, кроме аден и других неболших
полезностей (лайф_стоны, заточки, рб_бижа, вещи на клан_скилы с рб,
всякие банки с острова дино, ключи, камни_аа и еще всякого…)
Код:
DELETE FROM `droplist` WHERE `itemId` NOT IN (57,6662,6656,6660,6659,6658,6657,8191,6360,6361,6362,8627,8633,8723,8724,8725,8726,8727,8728,8729,8730,8731,8732,8733,8734,8735,8736,8737,8738,8739,8740,8741,8742,8743,8744,8745,8746,8747,8748,8749,8750,8751,8752,8753,8754,8755,8756,8757,8758,8759,8760,8761,8762,959,955,951,947,729,960,956,952,948,730,6577,6575,6573,6571,6569,6578,6576,6574,6572,6570,8166,8165,8164,8163,8162,8161,8176,8169,8168,8167,8175,8160,8159,8158,8172,8171,8170,1419,6665,6666,6667,6668,6669,6670,6671,6672,6661);
16. Нубы в лудшем No grade…
Код:
REPLACE INTO char_templates VALUES (0, “Human Fighter”, 0, 40, 43, 30, 21, 11, 25, 4, 72, 3, 47, 330, 213, 33, 44, 33, 115, 81900, -71338, 258271, -3104, 0, “1.1”, “1.188”, 9, 23, “1.1”, “1.188”, 8, “23.5”, 33, 27, 219, 68, 625);
REPLACE INTO char_templates VALUES (18, “Elf Fighter”, 1, 36, 36, 35, 23, 14, 26, 4, 72, 3, 47, 345, 249, 36, 46, 36, 125, 73000, 45978, 41196, -3440, 0, “1.15”, “1.242”, “7.5”, 24, “1.15”, “1.242”, “7.5”, 23, 33, 27, 219, 68, 625);
REPLACE INTO char_templates VALUES (31, “DE Fighter”, 2, 41, 32, 34, 25, 12, 26, 4, 72, 3, 47, 342, 226, 35, 45, 35, 122, 69000, 28377, 10916, -4224, 0, “1.14”, “1.2312”, “7.5”, 24, “1.14”, “1.2312”, 7, “23.5”, 33, 27, 219, 68, 625);
REPLACE INTO char_templates VALUES (44,’Orc Fighter’, 3, 40, 47, 26, 18, 12, 27, 4, 72, 2, 48, 318, 226, 31, 42, 31, 117, 87000, -58192, -113408, -650, 0, “1.06”, “1.144800”, 11.0, 28.0,1.06, “1.144800”, 7.0, 27.0, 33, 27, 219, 257, 625);
REPLACE INTO char_templates VALUES (53, “Dwarf Fighter”, 4, 39, 45, 29, 20, 10, 27, 4, 72, 3, 48, 327, 203, 33, 43, 33, 115, 83000, 108512, -174026, -400, 1, “1.09”, “1.487196”, 9, 18, “1.09”, “1.487196”, 5, 19, 33, 27, 219, 68, 625);
REPLACE INTO char_templates VALUES (10, “Human Mage”, 0, 22, 27, 21, 41, 20, 39, 2, 48, 7, 54, 303, 333, 28, 40, 28, 120, 62500, -90890, 248027, -3570, 0, “1.01”, “0.87264”, “7.5”, “22.8”, “1.01”, “0.87264”, “6.5”, “22.5”, 1105, 1102, 177, 68, 625);
REPLACE INTO char_templates VALUES (25, “Elf Mage”, 1, 21, 25, 24, 37, 23, 40, 2, 48, 6, 54, 312, 386, 30, 41, 30, 122, 62400, 46182, 41198, -3440, 0, “1.04”, “0.89856”, “7.5”, 24, “1.04”, “0.89856”, “7.5”, 23, 1105, 1102, 177, 68, 625);
REPLACE INTO char_templates VALUES (38, “DE Mage”, 2, 23, 24, 23, 44, 19, 37, 2, 48, 7, 53, 309, 316, 29, 41, 29, 122, 61000, 28295, 11063, -4224, 0, “1.14”, “1.2312”, “7.5”, 24, “1.03”, “0.88992”, 7, “23.5”, 1105, 1102, 177, 68, 625);
REPLACE INTO char_templates VALUES (49, “Orc Mage”, 3, 27, 31, 24, 31, 15, 42, 2, 48
Пользователи
170 сообщений
Мужчина
Статус: Offline
Удаление всех вещей с определённым ID у определнного персонажа.
Code
DELETE * FROM items WHERE item_id=(ид того что удалить) AND owner_id=(ИД перса, у когорого удалить)
Снижение цен во всех магазинах до 1 адены:
Code
update etcitem set price=1 where price > 1;
update weapon set price=1 where price > 1;
update armor set price=1 where price > 1;
Показ всех вещей определённого чара:
Code
mysql> select a.name,”armor”,a.crystal_type,i.count,i.enchant_level from armor a, items i where a.item_id=i.item_id and i.owner_id=идчара union select a.name,”weapon”,a.crystal_type,i.count,i.enchant_level from weapon a, items i where a.item_id=i.item_id and i.owner_id=идчара union select a.name,”some”,a.crystal_type,i.count,i.enchant_level from etcitem a, items i where a.item_id=i.item_id and i.owner_id=идчара;
Убирает вес:
Code
update etcitem set weight=1 where weight> 1;
update weapon set weight=1 where weight> 1;
update armor set weight=1 where weight > 1;
Дропаются только адены:
Code
DELETE FROM `droplist` WHERE (`itemId`!=’57’) AND (`category`=’-1′)
Шанс дропа аден 100% вместо 70%
Code
UPDATE `droplist` SET `droplist`.`chance`=1000000 WHERE `droplist`.`itemId`=57;
Удаляем всё, кроме вещей с ID 57, 77, 107
Code
DELETE FROM droplist WHERE itemId NOT IN (57,77,107);
Скрипт для очистки базы ява сервера:
суть простая, удаляются чары и все вещи и прочее ниже определенного времени или не заходившие с какого то времени.
Code
UPDATE characters SET online=0;
DELETE FROM characters WHERE lastAccess < 1191211200;
DELETE FROM accounts WHERE lastactive < 1191211200;
DELETE FROM characters WHERE level < 75;
DELETE FROM characters WHERE account_name NOT IN (SELECT login FROM accounts);
DELETE FROM accounts WHERE login NOT IN (SELECT account_name FROM characters);
DELETE FROM clan_data WHERE leader_id NOT IN (SELECT obj_Id FROM characters);
DELETE FROM clan_privs WHERE clan_id NOT IN (SELECT clan_id FROM clan_data);
DELETE FROM clan_subpledges WHERE clan_id NOT IN (SELECT clan_id FROM clan_data);
DELETE FROM clan_wars WHERE clan1 NOT IN (SELECT clan_id FROM clan_data);
DELETE FROM clan_wars WHERE clan2 NOT IN (SELECT clan_id FROM clan_data);
DELETE FROM auction_bid WHERE bidderId NOT IN (SELECT clan_id FROM clan_data);
DELETE FROM clanhall_functions WHERE hall_id NOT IN (SELECT ID FROM clanhall WHERE ownerId <> ‘0’);
UPDATE clanhall SET paidUntil=’0′ WHERE ownerId NOT IN (SELECT clan_id FROM clan_data);
UPDATE clanhall SET ownerId=’0′ WHERE ownerId NOT IN (SELECT clan_id FROM clan_data);
DELETE FROM account_data WHERE account_name NOT IN (SELECT login FROM accounts);
DELETE FROM account_data WHERE account_name NOT IN (SELECT account_name FROM characters);
DELETE FROM account_data WHERE value NOT IN (SELECT obj_Id FROM characters);
DELETE FROM items WHERE loc <> ‘clanwh’ and owner_id NOT IN (SELECT obj_Id FROM characters);
DELETE FROM items WHERE loc = ‘clanwh’ and owner_id NOT IN (SELECT clan_id FROM clan_data);
DELETE FROM character_skills WHERE char_obj_id NOT IN (SELECT obj_Id FROM characters);
DELETE FROM character_skills_save WHERE char_obj_id NOT IN (SELECT obj_Id FROM characters);
DELETE FROM character_shortcuts WHERE char_obj_id NOT IN (SELECT obj_Id FROM characters);
DELETE FROM character_recipebook WHERE char_id NOT IN (SELECT obj_Id FROM characters);
DELETE FROM character_quests WHERE char_id NOT IN (SELECT obj_Id FROM characters);
DELETE FROM character_macroses WHERE char_obj_id NOT IN (SELECT obj_Id FROM characters);
DELETE FROM character_hennas WHERE char_obj_id NOT IN (SELECT obj_Id FROM characters);
DELETE FROM character_friends WHERE char_id NOT IN (SELECT obj_Id FROM characters);
DELETE FROM character_subclasses WHERE char_obj_id NOT IN (SELECT obj_Id FROM characters);
DELETE FROM couples WHERE player1Id NOT IN (SELECT obj_Id FROM characters);
DELETE FROM couples WHERE player2Id NOT IN (SELECT obj_Id FROM characters);
DELETE FROM pets where item_obj_id not in (SELECT object_id FROM items);
DELETE FROM seven_signs WHERE char_obj_id NOT IN (SELECT obj_Id FROM characters);
DELETE FROM forums WHERE forum_owner_id <> ‘0’ AND forum_owner_id NOT IN (SELECT clan_id FROM clan_data);
Удаление дропа ресурсов со всех мобов. Он безопасен, удаляет дроп варнишей, молдов, скинов и прочего
Code
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′;
DELETE FROM droplist WHERE itemId=’1880′;
DELETE FROM droplist WHERE itemId=’1881′;
DELETE FROM droplist WHERE itemId=’1882′;
DELETE FROM droplist WHERE itemId=’1883′;
DELETE FROM droplist WHERE itemId=’1884′;
DELETE FROM droplist WHERE itemId=’1885′;
DELETE FROM droplist WHERE itemId=’1886′;
DELETE FROM droplist WHERE itemId=’1887′;
DELETE FROM droplist WHERE itemId=’1888′;
DELETE FROM droplist WHERE itemId=’1889′;
DELETE FROM droplist WHERE itemId=’1890′;
DELETE FROM droplist WHERE itemId=’1891′;
DELETE FROM droplist WHERE itemId=’1892′;
DELETE FROM droplist WHERE itemId=’1893′;
DELETE FROM droplist WHERE itemId=’1894′;
DELETE FROM droplist WHERE itemId=’1895′;
Добавлено (23.02.2010, 15:01)
———————————————
+ Дополнения.
Вытаскивает чара из под текстур
Code
UPDATE characters SET z=-3464, y=148505, x=83036 WHERE char_name=’ник чара’;
Удаление кланштрафа у всего сервера
Code
UPDATE characters SET deleteclan=0;
Установка определенного времени спавна РейдБосов с определенным диапазоном ЛВ.
respawn_delay=259200 – время
level BETWEEN 70 AND 90 – диапазон уровней рейдбосов
Code
UPDATE raidboss_spawnlist SET respawn_delay=259200 WHERE Boss_Id IN (SELECT id FROM npc WHERE type=’L2RaidBoss’ AND level BETWEEN 70 AND 90);
Добавлено (23.02.2010, 15:09)
———————————————
+ Обновление…
Скрипт авто рестарта вашего гейм сервера:
(Настраиваем под себя, ’05:55:00′ – время рестарта по серверу,’300′ – (5 минут) за это время игроки будут предупреждены и начнется отсчет)
Code
INSERT INTO global_tasks (task,type,last_activation,param1,param2,param3) VALUES (‘restart’,’TYPE_GLOBAL_TASK’,’0′,’1′,’05:55:00′,’300′);
Добавляем всем нашим новичькам скилл, к примеру возьмем скилл Weight Limit:
Code
INSERT INTO skill_trees VALUES (0, 150, 1, “Weight Limit”, 0, 1);
INSERT INTO skill_trees VALUES (10, 150, 1, “Weight Limit”, 0, 1);
INSERT INTO skill_trees VALUES (18, 150, 1, “Weight Limit”, 0, 1);
INSERT INTO skill_trees VALUES (25, 150, 1, “Weight Limit”, 0, 1);
INSERT INTO skill_trees VALUES (31, 150, 1, “Weight Limit”, 0, 1);
INSERT INTO skill_trees VALUES (38, 150, 1, “Weight Limit”, 0, 1);
INSERT INTO skill_trees VALUES (44, 150, 1, “Weight Limit”, 0, 1);
INSERT INTO skill_trees VALUES (49, 150, 1, “Weight Limit”, 0, 1);
INSERT INTO skill_trees VALUES (53, 150, 1, “Weight Limit”, 0, 1);
Запрос на изменение всех мобов на не агров
Для разных сборок возможно надо будет ручками поправлять, но суть одна и таже.
Code
UPDATE npc SET agro=’0′ WHERE type=’L2Monster’;
Добавлено (23.02.2010, 15:14)
———————————————
+ Обновление…
Этoт зaпpoc ycтaнaвливaeт шaнc дpoпa нa 0.5%, гдe poднoй шaнc дpoпa мeньшe 0.5%
Code
UPDATE `droplist` SET `chance` = ‘5000’ WHERE `chance` <= ‘5000’;
Эти зaпpocы yвeличивaют вpeмя pecпaвнa мoбoв в 3 paзa
Code
UPDATE `spawnlist` SET `respawnDelay` = `respawn_min_delay`*3;
UPDATE `spawnlist` SET `respawnDelay` = `respawn_max_delay`*3;
UPDATE `spawnlist` SET `respawnDelay` = `respawnDelay`*3;
UPDATE `spawnlist` SET `respawnDelay` = `respawnDelay`*3;
Эти зaпpocы дeлaют вpeмя pecпaвнa PeйдБoccoв: мин.вpeмя – 1 чac, мaкc.вpeмя – 2 чaca
Code
UPDATE `raidboss_spawnlist` SET `respawn_min_delay` = ‘3600’;
UPDATE `raidboss_spawnlist` SET `respawn_max_delay` = ‘7200’;
www.Ready2War.ru – Частная коллекция уникальных дополнений для серверов LineAge 2 (все хроники)
Ищем модераторов и журналистов!
Адаптируем SQL файл для своей сборки | |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
| |||||
|