Полезные sql запросы - Страница 5 - Форум администраторов игровых серверов
Форум администраторов игровых серверов StormWall - Защита от DDos атак
Регистрация Мнения Справка Сообщество Календарь
Вернуться   Форум администраторов игровых серверов > MMO > Lineage II > Тех-документация

Тех-документация Статьи по редактированию, компиляции и настройки ява серверов Lineage 2

Ответ
Опции темы
Непрочитано 03.09.2009, 08:40   #41
Пользователь

По умолчанию Ответ: Полезные sql запросы

брал за пример вот это
UPDATE `raidboss_spawnlist` SET `respawn_min_delay` = '3600';
UPDATE `raidboss_spawnlist` SET `respawn_max_delay` = '7200';
тут в кавычках ))
без кавычек таже ошибка....
Navakasi вне форума Ответить с цитированием
Непрочитано 18.10.2009, 20:09   #42
Пользователь

По умолчанию Re: Полезные sql запросы

У тебя 2 раза прописан set,что я думаю недопустимо. Если плясать от этого, пробуй вот так вот:
Код:
UPDATE `spawnlist` SET `respawn_delay` = '60' where `npc_templateid`='21207';
Работоспособность не гарантирую, ибо сам учусь...
nikoteen вне форума Ответить с цитированием
Непрочитано 24.10.2009, 20:19   #43
Аватар для lKingHell
Пользователь

По умолчанию Re: Полезные sql запросы

insert into droplist (mobId, itemid,min,max, chance) select id, 55555,'1','3', 100000 from npc where level > 40;

55555 - ид вещи которую хочешь добавить

1 - количество
3 - макс количество
100000 - шанс

А какой запрос на удаление 1 вещи?
lKingHell вне форума Ответить с цитированием
Непрочитано 07.11.2009, 03:37   #44
Новичок

По умолчанию Re: Полезные sql запросы

Напишите плз запрос чтоб дать определённому чару итем заточенный на +5.
И точно такой же только не дать, а удалить .
Заранее спасибо

Добавлено через 11 часов 26 минут
ну что, ктонить поможет с запросами, выручайте плз..

Добавлено через 21 час 53 минуты
апаю, ребят выручайте)

Последний раз редактировалось cokolenko; 08.11.2009 в 01:30. Причина: Добавлено сообщение
cokolenko вне форума Ответить с цитированием
Непрочитано 17.12.2009, 22:19   #45
Аватар для Kress
Пользователь

По умолчанию Re: Полезные sql запросы

помогите с sql запросом на добавление определенного итема всем персонажам?
заранее спасибо.
Kress вне форума Ответить с цитированием
Непрочитано 26.12.2009, 14:54   #46
Аватар для Kress
Пользователь

По умолчанию Re: Полезные sql запросы

вопрос актуален
Kress вне форума Ответить с цитированием
Непрочитано 22.01.2010, 02:19   #47
Аватар для arivano
Пользователь

По умолчанию Re: Полезные sql запросы

Кто напомнит ветку, где был скрипт на чистку базы от устаревших аккаунтов, персов и всего, что с ними связано? Какой день пытаюсь найти, но поиск не помогает.
arivano вне форума Отправить сообщение для arivano с помощью ICQ Отправить сообщение для arivano с помощью Skype™ Ответить с цитированием
Непрочитано 24.01.2010, 02:22   #48
Новичок

По умолчанию Re: Полезные sql запросы

а как сделать чтоб каждый новый перс был сразу нублесом?
MindX вне форума Ответить с цитированием
Непрочитано 24.01.2010, 17:24   #49
Изгнанные

По умолчанию Re: Полезные sql запросы

Код:
#select round(avg(`hp`)) from npc where type = "L2Monster" and level <= 80 and hp <> 2444 group by `level`;

update npc set pdef = 0.066 * level * level + 1.2129 * level + 40.586  where type in ("L2Monster", "L2Minion");
update npc set mdef = 0.0549 * level * level + 1.1337 * level + 31.743  where type in ("L2Monster", "L2Minion");
update npc set patk = 0.00001 * level * level * level * level + 0.003 * level * level * level + 0.01 * level * level + 1.2 * level + 8 where type in ("L2Monster", "L2Minion");
update npc set matk = 0.0026 * level * level * level - 0.0248 * level * level + 0.1133 * level + 6.4115 where type in ("L2Monster", "L2Minion");
update npc set hp = 0.0164 * level * level * level - 0.0001 * level * level * level * level - 0.0524 * level * level + 20.905 * level + 33.974 where type in ("L2Monster", "L2Minion");

update npc set pdef = pdef * 4 where type = "L2Minion" and id in (select minion_id from minions where boss_id in (select id from npc_copy where type = "L2RaidBoss"));
update npc set mdef = mdef * 4 where type = "L2Minion" and id in (select minion_id from minions where boss_id in (select id from npc_copy where type = "L2RaidBoss"));
update npc set patk = patk * 4 where type = "L2Minion" and id in (select minion_id from minions where boss_id in (select id from npc_copy where type = "L2RaidBoss"));
update npc set matk = matk * 4 where type = "L2Minion" and id in (select minion_id from minions where boss_id in (select id from npc_copy where type = "L2RaidBoss"));

update npc set hp = hp * 4 where type = "L2Minion" and id in (select minion_id from minions where boss_id in (select id from npc_copy where type = "L2RaidBoss"));

update npc set pdef = 4 * (0.066 * level * level + 1.2129 * level + 40.586)  where type = "L2RaidBoss";
update npc set mdef = 4 * (0.0549 * level * level + 1.1337 * level + 31.743)  where type = "L2RaidBoss";

update npc set pdef = 4 * (0.066 * level * level + 1.2129 * level + 40.586)  where type = "L2SiegeBoss";
update npc set mdef = 4 * (0.0549 * level * level + 1.1337 * level + 31.743)  where type = "L2SiegeBoss";
update npc set patk = 4 * (0.00001 * level * level * level * level + 0.003 * level * level * level + 0.01 * level * level + 1.2 * level + 8) where type = "L2SiegeBoss";
update npc set matk = 4 * (0.0026 * level * level * level - 0.0248 * level * level + 0.1133 * level + 6.4115) where type = "L2SiegeBoss";

update npc set pdef = 4 * (0.066 * level * level + 1.2129 * level + 40.586)  where type = "L2ReflectionBoss";
update npc set mdef = 4 * (0.0549 * level * level + 1.1337 * level + 31.743)  where type = "L2ReflectionBoss";
update npc set patk = (0.00001 * level * level * level * level + 0.003 * level * level * level + 0.01 * level * level + 1.2 * level + 8) where type = "L2ReflectionBoss";
update npc set matk = (0.0026 * level * level * level - 0.0248 * level * level + 0.1133 * level + 6.4115) where type = "L2ReflectionBoss";

-- Дефолтные параметры

update npc set `sex` = 'male' where `sex` = '';
update npc set `type` = 'L2Npc' where `type` = '';
update npc set `ai_type` = 'npc' where `ai_type` = '';

update npc set `attackrange` = 40 where `attackrange` = 0;
update npc set `hp` = 2444 where `hp` = 0;
update npc set `mp` = 2444 where `mp` = 0;

update npc set `base_hp_regen` = 7.500 where `base_hp_regen` = 0;
update npc set `base_mp_regen` = 2.700 where `base_mp_regen` = 0;

update npc set `str` = 40 where `str` = 0;
update npc set `con` = 30 where `con` = 0;
update npc set `dex` = 30 where `dex` = 0;
update npc set `int` = 21 where `int` = 0;
update npc set `wit` = 20 where `wit` = 0;
update npc set `men` = 20 where `men` = 0;

update npc set `patk` = 500 where `patk` = 0;
update npc set `pdef` = 500 where `pdef` = 0;
update npc set `matk` = 500 where `matk` = 0;
update npc set `mdef` = 500 where `mdef` = 0;

update npc set `atkspd` = 253 where `atkspd` = 0;
update npc set `matkspd` = 500 where `matkspd` = 0;
update npc set `walkspd` = 80 where `walkspd` = 0;
update npc set `runspd` = 120 where `runspd` = 0;

update npc set `corpse_time` = 7 where `corpse_time` = 0;
update npc set `base_rand_dam` = 30 where `base_rand_dam` = 0;
update npc set `base_critical` = 4 where `base_critical` = 0;
update npc set `physical_hit_modify` = 4 where `physical_hit_modify` = 0;
update npc set `hit_time_factor` = 0.6 where `hit_time_factor` = 0;

update npc set con=30, men=20 where type not in (
"L2SpecialMonster",
"L2RaidBoss",
"QueenAnt",
"QueenAntLarva",
"L2Boss",
"Orfen",
"Antharas",
"L2ReflectionBoss",
"L2SiegeBoss",
"L2Commander"
"L2Pet",
);

update npc set 
	runspd = (select runspd from npc2 where id = npc.id) 
where 
(
	runspd = '' or 
	runspd is null or 
	#runspd = 'NULL' or 
	runspd = 0
)
and id not in
(
	select id from npc2 where 
		runspd = '' or 
		runspd is null or 
		#runspd = 'NULL' or 
		runspd = 0
);

Для импорта мобовских скиллов от SF:

select distinct skillid, count(skillid) as count from npcskills_sf where 
 npcid not in (select id from npc where type in ("L2Npc", "L2Pet")) and
 skillid not in (select id from skills where operate_type = 12 or operate_type = 13) and 
 skillid not in (select skillid from npcskills where npcid = npcskills_sf.npcid) and
 skillid not in (4578) 
group by skillid order by count desc

insert into npcskills (select * from npcskills_sf where 
 npcid not in (select id from npc where type in ("L2Npc", "L2Pet")) and
 skillid not in (select id from skills where operate_type = 12 or operate_type = 13) and 
 skillid not in (select skillid from npcskills where npcid = npcskills_sf.npcid) and
 skillid not in (4578))

исключения из общих правил:

"L2SpecialMonster",
"L2RaidBoss",
"QueenAnt",
"QueenAntLarva",
"L2Boss",
"Orfen",
"Antharas",
"L2ReflectionBoss",
"L2SiegeBoss",
"L2Commander",
"L2Pet"
GoodShadow вне форума Отправить сообщение для GoodShadow с помощью ICQ Отправить сообщение для GoodShadow с помощью Skype™ Ответить с цитированием
Непрочитано 31.01.2010, 12:45   #50
Аватар для arivano
Пользователь

По умолчанию Re: Полезные sql запросы

Имеется скрипт следующего вида:
Код:
DELETE FROM characters WHERE lastAccess < 1254286800;
DELETE FROM accounts WHERE lastactive < 1254286800;
Как подсчитать необходимое значение поля lastactive?
По описанию это какой-то UNIX формат времени.
Пользовался сайтом http://www.unixtimestamp.com/index.php , но там выдает число на несколько порядков меньше, чем записаны в таблице, в результате базу почистить так и не удается.
Сервер работает под L2JServer.
arivano вне форума Отправить сообщение для arivano с помощью ICQ Отправить сообщение для arivano с помощью Skype™ Ответить с цитированием
Сказали спасибо:
Ответ


Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.

Быстрый переход


© 2007–2024 «Форум администраторов игровых серверов»
Защита сайта от DDoS атак — StormWall
Работает на Булке неизвестной версии с переводом от zCarot
Текущее время: 06:40. Часовой пояс GMT +3.

Вверх