2023-03-31 18:42:06 +00:00
|
|
|
|
<?php
|
2022-06-06 21:30:34 +00:00
|
|
|
|
/*
|
2023-01-10 16:29:32 +00:00
|
|
|
|
1 Шлем
|
|
|
|
|
2 Наручи
|
|
|
|
|
3 Меч
|
|
|
|
|
4 Рубаха
|
|
|
|
|
5 Броня
|
|
|
|
|
6 Плащ
|
|
|
|
|
7 Пояс
|
|
|
|
|
8 Серги
|
|
|
|
|
9 Амулет
|
|
|
|
|
10 Кольцо
|
|
|
|
|
11 Печатки
|
2022-06-06 21:30:34 +00:00
|
|
|
|
12 --
|
2023-01-10 16:29:32 +00:00
|
|
|
|
13 Перчатки
|
|
|
|
|
14 Щит
|
2022-06-06 21:30:34 +00:00
|
|
|
|
15 --
|
2023-01-10 16:29:32 +00:00
|
|
|
|
16 Штаны
|
|
|
|
|
17 Ботинки
|
2022-06-06 21:30:34 +00:00
|
|
|
|
|
|
|
|
|
items_main items_users
|
|
|
|
|
|
|
|
|
|
SELECT `iu`.*, `im`.*
|
|
|
|
|
FROM `items_users` AS `iu`
|
|
|
|
|
LEFT JOIN `items_main` AS `im`
|
|
|
|
|
ON `iu`.`item_id`=`im`.`id`
|
|
|
|
|
WHERE `iu`.`data` LIKE '%frompisher=1%' AND `iu`.`uid` = "3" AND `iu`.`delete` = "0" AND `iu`.`inOdet` = "0" AND `im`.`inslot` >0 AND `im`.`inslot` <18;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$u->info['money1'];
|
|
|
|
|
*/
|
2023-12-01 21:05:11 +00:00
|
|
|
|
$itmm = mysql_query(
|
|
|
|
|
'SELECT `iu`.`id` AS iid, `iu`.*, `im`.*
|
2022-06-06 21:30:34 +00:00
|
|
|
|
FROM `items_users` AS `iu`
|
|
|
|
|
LEFT JOIN `items_main` AS `im`
|
|
|
|
|
ON `iu`.`item_id`=`im`.`id`
|
2023-12-01 21:05:11 +00:00
|
|
|
|
WHERE `iu`.`data` LIKE "%frompisher=1%" AND `iu`.`uid` = "' . $u->info['id'] . '" AND `iu`.`delete` = "0" AND `iu`.`inOdet` = "0" AND `im`.`inslot` >0 AND `im`.`inslot` <18'
|
|
|
|
|
);
|
|
|
|
|
$sell = 0;
|
|
|
|
|
$selli = 0;
|
|
|
|
|
while ($itm = mysql_fetch_array($itmm)) {
|
|
|
|
|
$sell += $itm['price1'];
|
|
|
|
|
mysql_query('UPDATE `items_users` SET `delete`="' . time() . '" WHERE `id` = "' . $itm['iid'] . '" LIMIT 1');
|
|
|
|
|
$selli++;
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}
|
2023-12-01 21:05:11 +00:00
|
|
|
|
if ($sell > 0) {
|
|
|
|
|
$u->addKr($sell);
|
|
|
|
|
|
|
|
|
|
$txt .= '<br>Забрала у тебя <b style="color: #009999;">' . $selli . '</b> вещей.';
|
|
|
|
|
$txt .= '<br>Держи <b style="color: #009999;">' . $sell . '</b> кр. малец.';
|
|
|
|
|
$txt .= '<br>Приноси еще - люблю я такие вещички!';
|
|
|
|
|
Delo::add(
|
|
|
|
|
1,
|
|
|
|
|
'Babka.' . $u->info['city'],
|
|
|
|
|
$u->info['id'],
|
|
|
|
|
'"<span style="color: green; ">Babka.' . $u->info['city'] . '</span>": Продал бабке "<b>' . $selli . '</b>" предметов за <b>' . $sell . '</b> кр.',
|
|
|
|
|
(int)$sell
|
|
|
|
|
);
|
|
|
|
|
mysql_query('UPDATE `users_achiv` SET `bv`= `bv`+' . $selli . ' WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
|
|
|
|
|
} else {
|
|
|
|
|
$txt .= '<br><b style="color: crimson;">Нечего не принес бабушке!</b>';
|
2022-06-06 21:30:34 +00:00
|
|
|
|
}
|
|
|
|
|
|
2023-12-01 21:05:11 +00:00
|
|
|
|
unlink($sell, $itmm, $itm);
|