Сообщений: 87
Тем: 28
Зарегистрирован: Jul 2009
Репутация:
0
брал за пример вот это
UPDATE `raidboss_spawnlist` SET `respawn_min_delay` = '3600';
UPDATE `raidboss_spawnlist` SET `respawn_max_delay` = '7200';
тут в кавычках ))
без кавычек таже ошибка....
Сообщений: 4
Тем: 1
Зарегистрирован: Oct 2009
Репутация:
1
У тебя 2 раза прописан set,что я думаю недопустимо. Если плясать от этого, пробуй вот так вот:
Код: UPDATE `spawnlist` SET `respawn_delay` = '60' where `npc_templateid`='21207';
Работоспособность не гарантирую, ибо сам учусь...
Сообщений: 97
Тем: 8
Зарегистрирован: Oct 2009
Репутация:
-5
insert into droplist (mobId, itemid,min,max, chance) select id, 55555,'1','3', 100000 from npc where level > 40;
55555 - ид вещи которую хочешь добавить
1 - количество
3 - макс количество
100000 - шанс
А какой запрос на удаление 1 вещи?
Сообщений: 2
Тем: 1
Зарегистрирован: Nov 2009
Репутация:
533
11-07-2009, 03:37 AM
(Сообщение последний раз редактировалось: 11-08-2009, 01:30 AM cokolenko.)
Напишите плз запрос чтоб дать определённому чару итем заточенный на +5.
И точно такой же только не дать, а удалить .
Заранее спасибо
Добавлено через 11 часов 26 минут
ну что, ктонить поможет с запросами, выручайте плз..
Добавлено через 21 час 53 минуты
апаю, ребят выручайте)
Сообщений: 22
Тем: 9
Зарегистрирован: Feb 2009
Репутация:
0
помогите с sql запросом на добавление определенного итема всем персонажам?
заранее спасибо.
Сообщений: 22
Тем: 9
Зарегистрирован: Feb 2009
Репутация:
0
Сообщений: 51
Тем: 5
Зарегистрирован: May 2008
Репутация:
0
Кто напомнит ветку, где был скрипт на чистку базы от устаревших аккаунтов, персов и всего, что с ними связано? Какой день пытаюсь найти, но поиск не помогает.
Сообщений: 2
Тем: 1
Зарегистрирован: Jan 2010
Репутация:
0
а как сделать чтоб каждый новый перс был сразу нублесом?
Сообщений: 509
Тем: 30
Зарегистрирован: Nov 2009
Код: #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"
Сообщений: 51
Тем: 5
Зарегистрирован: May 2008
Репутация:
0
Имеется скрипт следующего вида:
Код: DELETE FROM characters WHERE lastAccess < 1254286800;
DELETE FROM accounts WHERE lastactive < 1254286800;
Как подсчитать необходимое значение поля lastactive?
По описанию это какой-то UNIX формат времени.
Пользовался сайтом http://www.unixtimestamp.com/index.php , но там выдает число на несколько порядков меньше, чем записаны в таблице, в результате базу почистить так и не удается.
Сервер работает под L2JServer.
|