showpersinv($user['id']) ?>
|
Уровень: = $user['level'] ?>
Опыт: = $user['exp'] ?> (= $user['nextup'] ?>)
Побед: = $user['win'] ?>
Поражений: = $user['lose'] ?>
Ничьих: = $user['nich'] ?>
Деньги: = $user['money'] ?> кр.
Репутация: = $user['doblest'] ?> реп.
Сила: = $user['sila'] ?>
Ловкость: = $user['lovk'] ?>
Интуиция: = $user['inta'] ?>
Выносливость: = $user['vinos'] ?>
Интеллект: = $user['intel'] ?>
Мудрость: = $user['mudra'] ?>
Возможных увеличений: = $user['stats'] ?>
$mf = countmf();
$min_dmg = 0;
$max_dmg = 0;
$item_mf = db::c()->query('SELECT `id` FROM `inventory` WHERE `owner` = ?i AND `dressed` = 1 AND `add_proc_mf` > 0', $_SESSION['uid'])->fetch_assoc();
$item_damage = db::c()->query('SELECT `id` FROM `inventory` WHERE `owner` = ?i AND `dressed` = 1 AND `add_proc_uron` > 0', $_SESSION['uid'])->fetch_assoc();
$item_bron = db::c()->query('SELECT `id` FROM `inventory` WHERE `owner` = ?i AND `dressed` = 1 AND `add_proc_bron` > 0', $_SESSION['uid'])->fetch_assoc();
if (isset($item_mf['id'])) {
$max_mf = max_mf();
$add_mf = sum_mf($user['id']);
if ($max_mf == 'fkrit') {
$var_mf = round(($mf['fkrit'] / 100) * $add_mf);
$mf['fkrit'] += $var_mf;
} elseif ($max_mf == 'fakrit') {
$var_mf = round(($mf['fakrit'] / 100) * $add_mf);
$mf['fakrit'] += $var_mf;
} elseif ($max_mf == 'fuvorot') {
$var_mf = round(($mf['fuvorot'] / 100) * $add_mf);
$mf['fuvorot'] += $var_mf;
} elseif ($max_mf == 'fauvorot') {
$var_mf = round(($mf['fauvorot'] / 100) * $add_mf);
$mf['fauvorot'] += $var_mf;
}
}
if (isset($item_damage['id'])) {
$add_dmg = sum_dmg($user['id']);
$min_dmg = round(($mf['minu'] / 100) * $add_dmg);
$max_dmg = round(($mf['maxu'] / 100) * $add_dmg);
}
if (isset($item_bron['id'])) {
$add_bron = sum_bron($user['id']);
$var_brons = bron_ads($mf['bron1'], $mf['bron2'], $mf['bron3'], $mf['bron4'], $add_bron);
} else {
$var_brons = ['a1' => 0, 'a2' => 0, 'a3' => 0, 'a4' => 0];
}
?>
Урон: = $mf['minu'] + $min_dmg ?>
- = $mf['maxu'] + $max_dmg ?> if (isset($item_damage['id'])) {
echo '(' . $add_dmg . '%)';
} ?>
Шанс крита: = $mf['fkrit'] ?> if (isset($item_mf['id']) && $max_mf == 'fkrit') {
echo '(' . $add_mf . '%)';
} ?>
Шанс антикрита: = $mf['fakrit'] ?> if (isset($item_mf['id']) && $max_mf == 'fakrit') {
echo '(' . $add_mf . '%)';
} ?>
Шанс уворота: = $mf['fuvorot'] ?> if (isset($item_mf['id']) && $max_mf == 'fuvorot') {
echo '(' . $add_mf . '%)';
} ?>
Шанс антиуворота: = $mf['fauvorot'] ?> if (isset($item_mf['id']) && $max_mf == 'fauvorot') {
echo '(' . $add_mf . '%)';
} ?>
Владение оружием:
Кинжалами: = $user['noj'] ?>
Мечами: = $user['mec'] ?>
Дубинами: = $user['dubina'] ?>
Топорами: = $user['topor'] ?>
Владение магией:
Магия огня: = $user['mfire'] ?>
Магия воды: = $user['mwater'] ?>
Магия воздуха: = $user['mair'] ?>
Магия земли: = $user['mearth'] ?>
Магия света: = $user['mlight'] ?>
Магия серости: = $user['mgray'] ?>
Магия тьмы: = $user['mdark'] ?>
Возможных увеличений: = $user['master'] ?>
Броня головы: = $mf['bron1'] + $var_brons['a1'] ?> if (isset($item_bron['id'])) {
echo '(' . $add_bron . '%)';
} ?>
Броня корпуса: = $mf['bron2'] + $var_brons['a2'] ?> if (isset($item_bron['id'])) {
echo '(' . $add_bron . '%)';
} ?>
Броня пояса: = $mf['bron3'] + $var_brons['a3'] ?> if (isset($item_bron['id'])) {
echo '(' . $add_bron . '%)';
} ?>
Броня ног: = $mf['bron4'] + $var_brons['a4'] ?> if (isset($item_bron['id'])) {
echo '(' . $add_bron . '%)';
} ?>
= 25) {
$bonus['fauvorot'] += round($user['sila'] / 3);
$bonus['fakrit'] += round($user['sila'] / 3);
}
// if (($user['sila']) >=100) {
// $bonus['uminu'] += round($user['sila'] / 25);
// $bonus['umaxu'] += round($bonus['uminu'] + $user['sila'] / 100);
// }
if (($user['lovk']) >= 25) {
$bonus['fuvorot'] += round($user['lovk'] / 2);
$bonus['fauvorot'] += round($user['lovk'] / 3);
}
if (($user['inta']) >= 25) {
$bonus['fkrit'] += round($user['inta'] / 2);
$bonus['fakrit'] += round($user['inta'] / 3);
}
if ($user['sila'] >= 25 || $user['lovk'] >= 25 || $user['inta'] >= 25 || $user['vinos'] >= 25) {
echo 'Бонусы за статы: ';
if (!empty($bonus['fkrit'])) {
echo "Шанс крита: +" . $bonus['fkrit'] . " ";
}
if (!empty($bonus['fakrit'])) {
echo "Шанс антикрита: +" . $bonus['fakrit'] . " ";
}
if (!empty($bonus['fuvorot'])) {
echo "Шанс уворота: +" . $bonus['fuvorot'] . " ";
}
if (!empty($bonus['fauvorot'])) {
echo "Шанс антиуворота: +" . $bonus['fauvorot'] . " ";
}
// if (!empty($bonus['uminu'])) echo "Бонус урона: +" . $bonus['uminu'] . "-" . $bonus['umaxu'];
}
?>
|
|
Рюкзак (масса : = getItemsMassaInfo() ?>)
|
|
Мешок денег (Масса: 0) = $user['money'] ?> кр. |
query('SELECT `inventory`.*,
`magic`.`name` AS `magic_name`,
`magic`.`chanse` AS `magic_chanse`,
`magic`.`time` AS `magic_time`,
`magic`.`file` AS `magic_file`,
`magic`.`targeted` AS `magic_targeted`,
`magic`.`needcharge` AS `magic_needcharge`,
`magic`.`img` AS `magic_img` FROM `inventory` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE `owner` = ?i AND `dressed` = 0 AND (`type` < 12 OR `type` = 22 OR `type` = 23 OR `type` = 24) AND `setsale` = 0 ORDER BY `update` DESC', $user['id']);
}
if ($_SESSION['razdel'] == 1) {
$data = db::c()->query('SELECT `inventory`.*,
`magic`.`name` AS `magic_name`,
`magic`.`chanse` AS `magic_chanse`,
`magic`.`time` AS `magic_time`,
`magic`.`file` AS `magic_file`,
`magic`.`targeted` AS `magic_targeted`,
`magic`.`needcharge` AS `magic_needcharge`,
`magic`.`img` AS `magic_img` FROM `inventory` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE `owner` = ?i AND `dressed` = 0 AND `type` = 12 AND `setsale` = 0 ORDER BY `update` DESC', $user['id']);
}
if ($_SESSION['razdel'] == 2) {
$data = db::c()->query('SELECT `inventory`.*,
`magic`.`name` AS `magic_name`,
`magic`.`chanse` AS `magic_chanse`,
`magic`.`time` AS `magic_time`,
`magic`.`file` AS `magic_file`,
`magic`.`targeted` AS `magic_targeted`,
`magic`.`needcharge` AS `magic_needcharge`,
`magic`.`img` AS `magic_img` FROM `inventory` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE `owner` = ?i AND `dressed` = 0 AND (`type` > 12 OR `type` != 22 OR `type` != 23 OR `type` != 24) AND `setsale` = 0 ORDER BY `update` DESC', $user['id']);
}
if ($_SESSION['razdel'] == 3) {
$data = db::c()->query('SELECT `inventory`.*,
`magic`.`name` AS `magic_name`,
`magic`.`chanse` AS `magic_chanse`,
`magic`.`time` AS `magic_time`,
`magic`.`file` AS `magic_file`,
`magic`.`targeted` AS `magic_targeted`,
`magic`.`needcharge` AS `magic_needcharge`,
`magic`.`img` AS `magic_img` FROM `inventory` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE `owner` = ?i AND `dressed` = 0 AND `type` >= 80 AND `type` <= 89 AND `setsale` = 0 ORDER BY `update` ASC', $user['id']);
}
if ($_SESSION['razdel'] == 4) {
$data = db::c()->query('SELECT `inventory`.*,
`magic`.`name` AS `magic_name`,
`magic`.`chanse` AS `magic_chanse`,
`magic`.`time` AS `magic_time`,
`magic`.`file` AS `magic_file`,
`magic`.`targeted` AS `magic_targeted`,
`magic`.`needcharge` AS `magic_needcharge`,
`magic`.`img` AS `magic_img` FROM `inventory` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE `owner` = ?i AND `dressed` = 0 AND `type` = 200 AND `setsale` = 0 ORDER BY `update` ASC', $user['id']);
}
if ($_SESSION['razdel'] == 5) {
$data = db::c()->query('SELECT `inventory`.*,
`magic`.`name` AS `magic_name`,
`magic`.`chanse` AS `magic_chanse`,
`magic`.`time` AS `magic_time`,
`magic`.`file` AS `magic_file`,
`magic`.`targeted` AS `magic_targeted`,
`magic`.`needcharge` AS `magic_needcharge`,
`magic`.`img` AS `magic_img` FROM `inventory` LEFT JOIN `magic` ON `magic` = `magic`.`id` WHERE `owner` = ?i AND `dressed` = 0 AND `type` = 199 AND `setsale` = 0 ORDER BY `update` ASC', $user['id']);
}
$groupNum = [];
$viewInventory = [];
$getItems = [];
$row = [];
$iteminfo = [];
#while ($row = $data->fetch_assoc()) showitem($row, null, "edit=1&razdel=$_SESSION[razdel]");
#while ($row = $data->fetch_assoc()) showitem($row);
while ($row = $data->fetch_assoc()) {
$iteminfo[] = new InventoryItem($row);
}
foreach ($iteminfo as $ii) {
echo "";
$ii->printImage();
$ii->printControls();
echo " | ";
echo "";
$ii->printInfo();
echo " | ";
}
if ($viewInventory and $getItems) {
foreach ($viewInventory as $viewCategiryes) {
echo $viewCategiryes['header'];
foreach ($viewCategiryes['ids'] as $viewItem) {
echo $getItems[$viewItem];
}
echo $viewCategiryes['fooder'];
}
}
if ($data->getNumRows() == 0) {
echo "Пусто | ";
}
?>
|
|