game/_incl_data/class/Magic/sunduk_bd.php

55 lines
2.5 KiB
PHP
Raw Normal View History

2023-03-31 18:42:06 +00:00
<?php
2023-12-01 19:27:28 +00:00
use User\ItemsModel;
if (!defined('GAME')) {
die();
}
//воин
$itmadd = [
//суперсвиток
0 => [911, 1172, 2143, 2144, 1173],
//простые свитки
1 => [3043, 2545, 2709, 874, 2391],
//гарантированные
2 => [3044],
];
// 1000 екр. - 3-4 суперсвитка 0/20, 4 простых 0/100 + Эссенция Здоровья 0/3 + новогодний эликсир 0/10
$i4 = [
$itmadd[0][rand(0, count($itmadd[0]) - 1)],
$itmadd[0][rand(0, count($itmadd[0]) - 1)],
$itmadd[0][rand(0, count($itmadd[0]) - 1)],
$itmadd[1][rand(0, count($itmadd[1]) - 1)],
$itmadd[1][rand(0, count($itmadd[1]) - 1)],
$itmadd[1][rand(0, count($itmadd[1]) - 1)],
$itmadd[1][rand(0, count($itmadd[1]) - 1)],
];
$i3 = [];
if ($u->info['level'] > 8) {
$i3[0] = ItemsModel::addItem(2143, $this->info['id'], '|nosale=1|notr=1|sudba=' . $this->info['login'], null, ($u->info['level'] * 2 - 10));
$i3[1] = ItemsModel::addItem(2144, $this->info['id'], '|nosale=1|notr=1|sudba=' . $this->info['login'], null, ($u->info['level'] * 2 - 10));
}
$i3[3] = ItemsModel::addItem(4020, $this->info['id'], '|nosale=1|notr=1|sudba=' . $this->info['login'], null, ($u->info['level'] * 2 - 10));
$i3[4] = ItemsModel::addItem(4035, $this->info['id'], '|nosale=1|notr=1|sudba=' . $this->info['login'], null, ($u->info['level'] * 2 - 10));
$i3[5] = ItemsModel::addItem(3101, $this->info['id'], '|nosale=1|notr=1|sudba=' . $this->info['login'], null, ($u->info['level'] * 2 - 10));
$i3[6] = ItemsModel::addItem(4041, $this->info['id'], '|nosale=1|notr=1|sudba=' . $this->info['login'], null, ($u->info['level'] * 2 - 10));
$i3[7] = ItemsModel::addItem(4541, $this->info['id'], '|nosale=1|notr=1|sudba=' . $this->info['login'], null, 1);
$i3[8] = ItemsModel::addItem(4542, $this->info['id'], '|nosale=1|notr=1|sudba=' . $this->info['login'], null, 1);
$i3[9] = ItemsModel::addItem(3048, $this->info['id'], '|nosale=1|notr=1|sudba=' . $this->info['login'], null, 1);
$i3[10] = ItemsModel::addItem(3041, $this->info['id'], '|nosale=1|notr=1|sudba=' . $this->info['login'], null, 1);
mysql_query(
'UPDATE `items_users` SET `gift` = "Ангел",`gtxt1` = "С Днем Рождения! Поздравляем! Удачи в боях и жизни!" WHERE
`id` = "' . $i3[8] . '" OR `id` = "' . $i3[9] . '" OR `id` = "' . $i3[10] . '"
LIMIT 1'
);
if ($io == '') {
$io = 'Какие-то предметы добавлены к Вам в инвентарь...';
}
unset($itmadd, $i3, $i4);