Показать сообщение отдельно
Непрочитано 11.10.2008, 00:00   #1
Изгнанные

Автор темы (Топик Стартер) Полезные sql запросы

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. Нубы в лудшем 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, 4, 56, 312, 265, 30, 41, 30, 121, 68000, -56682, -113730, -690, 0, "1.04", "0.89856", 7, "27.5", "1.04", "0.89856", 8, "25.5", 1105, 1102, 177, 257, 625);
Nastia вне форума Ответить с цитированием
Сказали спасибо: