query('UPDATE `online` SET `real_time` = ?i WHERE `id` = ?i', time(), $user['id']); if ($user['battle'] != 0) { header('location: fbattle.php'); die(); } function sum_mf($u) { $sum = db::c()->query('SELECT SUM(`add_proc_mf`) AS `mf` FROM `inventory` WHERE `dressed` = 1 AND `add_proc_mf` > 0 AND `owner` = ?i', $u); if ($sum->fetch_assoc() > 0) return $sum; else return 0; } function sum_dmg($u) { $sum = db::c()->query('SELECT SUM(`add_proc_uron`) AS `mf` FROM `inventory` WHERE `dressed` = 1 AND `add_proc_uron` > 0 AND `owner` = ?i', $u); if ($sum->fetch_assoc() > 0) return $sum; else return 0; } function sum_bron($u) { $sum = db::c()->query('SELECT SUM(`add_proc_bron`) AS `mf` FROM `inventory` WHERE `dressed` = 1 AND `add_proc_bron` > 0 AND `owner` = ?i', $u); if ($sum->fetch_assoc() > 0) return $sum; else return 0; } function bron_ads($a1, $a2, $a3, $a4, $col) { return ['a1' => round(($a1 / 100) * $col), 'a2' => round(($a2 / 100) * $col), 'a3' => round(($a3 / 100) * $col), 'a4' => round(($a4 / 100) * $col)]; } function max_mf() { $r = ''; $mfs = countmf(); if (($mfs['fkrit'] > $mfs['fakrit']) && ($mfs['fkrit'] > $mfs['fuvorot']) && ($mfs['fkrit'] > $mfs['fauvorot'])) { $r = 'fkrit'; } elseif (($mfs['fakrit'] > $mfs['fkrit']) && ($mfs['fakrit'] > $mfs['fuvorot']) && ($mfs['fakrit'] > $mfs['fauvorot'])) { $r = 'fakrit'; } elseif (($mfs['fuvorot'] > $mfs['fkrit']) && ($mfs['fuvorot'] > $mfs['fakrit']) && ($mfs['fuvorot'] > $mfs['fauvorot'])) { $r = 'fuvorot'; } elseif (($mfs['fauvorot'] > $mfs['fkrit']) && ($mfs['fauvorot'] > $mfs['fakrit']) && ($mfs['fauvorot'] > $mfs['fuvorot'])) { $r = 'fauvorot'; } return $r; } function stack($it_id) { global $user; $it_id = (int)$it_id; $stack = mysql_query("SELECT * FROM `inventory` WHERE `id` = '" . $it_id . "' AND `owner` = " . $user['id'] . " LIMIT 1"); if (mysql_num_rows($stack) == 1) { $stack = mysql_fetch_array($stack); $similar = mysql_fetch_array(mysql_query("SELECT SUM(`koll`) FROM `inventory` WHERE `owner` = '" . $user['id'] . "' AND `id` != '" . $stack['id'] . "' AND `name` = '" . $stack['name'] . "' AND `present` = '" . $stack['present'] . "' AND `duration` = '" . $stack['duration'] . "' AND `maxdur` = '" . $stack['maxdur'] . "' AND `laba` = '" . $stack['laba'] . "' AND `gmeshok` = '" . $stack['gmeshok'] . "' AND `dressed` = 0 AND `goden` = 0 AND `setsale` = 0 AND `koll` >= 1 AND `isrep` = '" . $stack['isrep'] . "' AND FORMAT(`cost`/`koll`, 2) = FORMAT(" . ($stack['cost'] / $stack['koll']) . ", 2) AND FORMAT(`point`/`koll`, 2) = FORMAT(" . ($stack['point'] / $stack['koll']) . ", 2) AND FORMAT(`bcost`/`koll`, 2) = FORMAT(" . ($stack['bcost'] / $stack['koll']) . ", 2)")); if ($similar[0] >= 1) { mysql_query("UPDATE `inventory` SET `cost` = (`cost`+`cost`/`koll`*" . $similar[0] . "), `point` = (`point`+`point`/`koll`*" . $similar[0] . "), `bcost` = (`bcost`+`bcost`/`koll`*" . $similar[0] . "), `massa` = (`massa`+`massa`/`koll`*" . $similar[0] . "), `koll` = (`koll`+" . $similar[0] . "), `gmeshok` = (`gmeshok`+`gmeshok`*" . $similar[0] . ") WHERE `id` = '" . $stack['id'] . "' LIMIT 1"); mysql_query("DELETE FROM `inventory` WHERE `owner` = '" . $user['id'] . "' AND `id` != '" . $stack['id'] . "' AND `name` = '" . $stack['name'] . "' AND `present` = '" . $stack['present'] . "' AND `duration` = '" . $stack['duration'] . "' AND `maxdur` = '" . $stack['maxdur'] . "' AND `dressed` = 0 AND `goden` = 0 AND `koll` >= 1 AND `setsale` = 0 AND `gmeshok` = '" . $stack['gmeshok'] . "' AND `laba` = '" . $stack['laba'] . "' AND `isrep` = '" . $stack['isrep'] . "' AND FORMAT(`cost`/`koll`, 2)=FORMAT(" . $stack['cost'] / $stack['koll'] . ", 2) AND FORMAT(`point`/`koll`, 2) = FORMAT(" . ($stack['point'] / $stack['koll']) . ", 2) AND FORMAT(`bcost`/`koll`, 2) = FORMAT(" . ($stack['bcost'] / $stack['koll']) . ", 2) "); } } } function unstack($it_id, $it_count) { global $user; $it_id = (int)$it_id; $it_count = (int)$it_count; $it_count = abs($it_count); $dress = mysql_fetch_array(mysql_query("SELECT * FROM `inventory` WHERE `owner` = " . $user['id'] . " AND `id` = '" . mysql_real_escape_string($it_id) . "' LIMIT 1")); if (isset($dress['id'])) { if ($it_count <= $dress['koll'] && $it_count > 0) { if ($dress['koll'] == $it_count) { mysql_query('DELETE FROM `inventory` WHERE `id` = "' . $dress['id'] . '" AND `owner` = "' . $user['id'] . '" LIMIT 1'); } else { mysql_query("UPDATE `inventory` SET `cost` = (`cost`-`cost`/`koll`*" . $it_count . "), `point` = (`point`-`point`/`koll`*" . $it_count . "), `bcost` = (`bcost`-`bcost`/`koll`*" . $it_count . "), `massa` = (`massa`-`massa`/`koll`*" . $it_count . "), `koll` = (`koll`-" . $it_count . ") WHERE `id` = '$dress[id]' AND `owner` = '$user[id]' LIMIT 1"); } mysql_query("INSERT INTO `inventory` (`name`, `upgrade`, `modif`, `podgon`, `duration`, `maxdur`, `cost`, `bcost`, `point`, `nlevel`, `nsila`, `nlovk`, `ninta`, `nvinos`, `nintel`, `nmudra`, `nnoj`, `ntopor`, `ndubina`, `nmech`, `nalign`, `minu`, `maxu`, `gsila`, `glovk`, `ginta`, `gintel`, `ghp`, `mfkrit`, `mfakrit`, `mfuvorot`, `mfauvorot`, `gnoj`, `gtopor`, `gdubina`, `gmech`, `img`, `text`, `owner`, `dressed`, `bron1`, `bron2`, `bron3`, `bron4`, `dategoden`, `magic`, `type`, `present`, `sharped`, `massa`, `goden`, `needident`, `nfire`, `nwater`, `nair`, `nearth`, `nlight`, `ngray`, `ndark`, `gfire`, `gwater`, `gair`, `gearth`, `glight`, `ggray`, `gdark`, `free_bron`, `free_stat`, `free_mf`, `letter`, `isrep`, `update`, `setsale`, `prototype`, `otdel`, `bs`, `gmp`, `includemagic`, `includemagicdex`, `includemagicmax`, `includemagicname`, `includemagicuses`, `includemagiccost`, `gmeshok`, `tradesale`, `podzem`, `x_mis`, `artefact`, `destinyinv`, `encicl`, `foronetrip`, `koll`) VALUES ('" . $dress['name'] . "', '" . $dress['upgrade'] . "', '" . $dress['modif'] . "', '" . $dress['podgon'] . "', '" . $dress['duration'] . "', '" . $dress['maxdur'] . "', '" . ($dress['cost'] / $dress['koll'] * $it_count) . "', '" . ($dress['bcost'] / $dress['koll'] * $it_count) . "', '" . ($dress['point'] / $dress['koll'] * $it_count) . "', '" . $dress['nlevel'] . "', '" . $dress['nsila'] . "', '" . $dress['nlovk'] . "', '" . $dress['ninta'] . "', '" . $dress['nvinos'] . "', '" . $dress['nintel'] . "', '" . $dress['nmudra'] . "', '" . $dress['nnoj'] . "', '" . $dress['ntopor'] . "', '" . $dress['ndubina'] . "', '" . $dress['nmech'] . "', '" . $dress['nalign'] . "', '" . $dress['minu'] . "', '" . $dress['maxu'] . "', '" . $dress['gsila'] . "', '" . $dress['glovk'] . "', '" . $dress['ginta'] . "', '" . $dress['gintel'] . "', '" . $dress['ghp'] . "', '" . $dress['mfkrit'] . "', '" . $dress['mfakrit'] . "', '" . $dress['mfuvorot'] . "', '" . $dress['mfauvorot'] . "', '" . $dress['gnoj'] . "', '" . $dress['gtopor'] . "', '" . $dress['gdubina'] . "', '" . $dress['gmech'] . "', '" . $dress['img'] . "', '" . $dress['text'] . "', '" . $dress['owner'] . "', '" . $dress['dressed'] . "', '" . $dress['bron1'] . "', '" . $dress['bron2'] . "', '" . $dress['bron3'] . "', '" . $dress['bron4'] . "', '" . $dress['dategoden'] . "', '" . $dress['magic'] . "', '" . $dress['type'] . "', '" . $dress['present'] . "', '" . $dress['sharped'] . "', '" . ($dress['massa'] / $dress['koll'] * $it_count) . "', '" . $dress['goden'] . "', '" . $dress['needident'] . "', '" . $dress['nfire'] . "', '" . $dress['nwater'] . "', '" . $dress['nair'] . "', '" . $dress['nearth'] . "', '" . $dress['nlight'] . "', '" . $dress['ngray'] . "', '" . $dress['ndark'] . "', '" . $dress['gfire'] . "', '" . $dress['gwater'] . "', '" . $dress['gair'] . "', '" . $dress['gearth'] . "', '" . $dress['glight'] . "', '" . $dress['ggray'] . "', '" . $dress['gdark'] . "', '" . $dress['free_bron'] . "', '" . $dress['free_bron'] . "', '" . $dress['free_mf'] . "', '" . $dress['letter'] . "', '" . $dress['isrep'] . "', '" . $dress['update'] . "', '" . $dress['setsale'] . "', '" . $dress['prototype'] . "', '" . $dress['otdel'] . "', '" . $dress['bs'] . "', '" . $dress['gmp'] . "', '" . $dress['includemagic'] . "', '" . $dress['includemagicdex'] . "', '" . $dress['includemagicmax'] . "', '" . $dress['includemagicname'] . "', '" . $dress['ggrincludemagicusesay'] . "', '" . $dress['includemagiccost'] . "', '" . ($dress['gmeshok'] / $dress['koll'] * $it_count) . "', '" . $dress['tradesale'] . "', '" . $dress['podzem'] . "', '" . $dress['x_mis'] . "', '" . $dress['artefact'] . "', '" . $dress['destinyinv'] . "', '" . $dress['encicl'] . "', '" . $dress['foronetrip'] . "', '" . $it_count . "')"); return mysql_insert_id(); } } } function del_efs($uid, $id, $type) { global $user; $arr = [2, 3, 4, 5, 8, 10, 11, 12, 13, 14, 20]; if ($uid == $user['id']) { if ($id != null) { if (!in_array($type, $arr)) { db::c()->query('DELETE FROM `effects` WHERE `owner` = ?i AND `id` = ?i', $uid, $id); if ($type == 1022) { db::c()->query('UPDATE `users` SET `invis` = ?i WHERE `id` = ?i', 0, $uid); $user['invis'] = 0; } err('Эффект удалён.'); } else { err('Данный эффект нельзя удалить.'); } } } } function countmf() { //TODO пересчитать модификаторы global $user; function GetWeaponType($idwep) { if ($idwep == 0 || $idwep == null || $idwep == '') { return "kulak"; } $wep = db::c()->query('SELECT `otdel`, `minu` FROM `inventory` WHERE `id` = ?i', $idwep)->fetch_row(); if ($wep[0] == '1') { return "noj"; } elseif ($wep[0] == '12') { return "dubina"; } elseif ($wep[0] == '11') { return "topor"; } elseif ($wep[0] == '13') { return "mech"; } elseif ($wep[1] > 0) { return "buket"; } else { return "kulak"; } } $zo = db::c()->query('SELECT `id` FROM `effects` WHERE `type` = 201 AND `owner` = ?i', $user['id'])->fetch_row(); $sokr = db::c()->query('SELECT `id` FROM `effects` WHERE `type` = 202 AND `owner` = ?i', $user['id'])->fetch_row(); if (isset($sokr[0])) { $bmfud += 5; } else { $bmfud = 0; } if (isset($zo[0]) > 0) { $bmfbron += 25; } else { $bmfbron = 0; } $mf = []; $user_dress = db::c()->query('SELECT SUM(`minu`), SUM(`maxu`), SUM(`mfkrit`), SUM(`mfakrit`), SUM(`mfuvorot`), SUM(`mfauvorot`), SUM(`bron1`), SUM(`bron2`), SUM(`bron3`), SUM(`bron4`) FROM `inventory` WHERE `dressed` = 1 AND `owner` = ?i', $user['id'])->fetch_row(); $user_dress[6] = $bmfbron; $user_dress[7] = $bmfbron; $user_dress[8] = $bmfbron; $user_dress[9] = $bmfbron; $user_dress[6] += $user['ubron1']; $user_dress[7] += $user['ubron2']; $user_dress[8] += $user['ubron3']; $user_dress[9] += $user['ubron4']; $mykrit = $user_dress[2] + ($user['inta'] * 2.95); $myakrit = $user_dress[3] + ($user['inta'] * 2.75); $myuvorot = $user_dress[4] + ($user['lovk'] * 5); $myauvorot = $user_dress[5] + ($user['lovk'] * 4); $mf['me'] = ['udar' => (floor($user['sila'] / 3) + 1 + $user_dress[0]), 'maxudar' => (floor($user['sila'] / 3) + 4 + $user_dress[1])]; if ($mf['me']['udar'] < 0) { $mf['me']['udar'] = 0; } $weap_b = 0; switch (GetWeaponType($user['weap'])) { case "noj": $weap_b += $user['noj']; break; case "dubina": $weap_b += $user['dubina']; break; case "topor": $weap_b += $user['topor']; break; case "mech": $weap_b += $user['mec']; break; } return ['minu' => $mf['me']['udar'] + $bmfud + $weap_b, 'maxu' => $mf['me']['maxudar'] + $bmfud + $weap_b, 'fkrit' => round($mykrit, 0), 'fakrit' => round($myakrit, 0), 'fuvorot' => round($myuvorot, 0), 'fauvorot' => round($myauvorot, 0), 'bron1' => $user_dress[6], 'bron2' => $user_dress[7], 'bron3' => $user_dress[8], 'bron4' => $user_dress[9]]; } // одеть предмет function dressitem($id) { global $user; $item = db::c()->query('SELECT * FROM `inventory` WHERE `duration` < `maxdur` AND `id` = ?i AND `owner` = ?i AND `dressed` = 0', $id, $user['id'])->fetch_assoc(); switch ($item['type']) { case 1: $slot1 = 'sergi'; break; case 2: $slot1 = 'kulon'; break; case 3: $slot1 = 'weap'; break; case 4: $slot1 = 'bron'; break; case 5: $slot1 = 'r1'; break; case 6: $slot1 = 'r2'; break; case 7: $slot1 = 'r3'; break; case 8: $slot1 = 'helm'; break; case 9: $slot1 = 'perchi'; break; case 10: $slot1 = 'shit'; break; case 11: $slot1 = 'boots'; break; case 12: $slot1 = 'm1'; break; case 22: $slot1 = 'rybax'; break; case 23: $slot1 = 'plaw'; break; } if ($item['type'] == 5) { if (!$user['r1']) $slot1 = 'r1'; elseif (!$user['r2']) $slot1 = 'r2'; elseif (!$user['r3']) $slot1 = 'r3'; else { $slot1 = 'r1'; dropitem(5); } } elseif ($item['type'] == 12) { if (!$user['m1']) $slot1 = 'm1'; elseif (!$user['m2']) $slot1 = 'm2'; elseif (!$user['m3']) $slot1 = 'm3'; elseif (!$user['m4']) $slot1 = 'm4'; elseif (!$user['m5']) $slot1 = 'm5'; elseif (!$user['m6']) $slot1 = 'm6'; elseif (!$user['m7']) $slot1 = 'm7'; elseif (!$user['m8']) $slot1 = 'm8'; elseif (!$user['m9']) $slot1 = 'm9'; elseif (!$user['m10']) $slot1 = 'm10'; else { $slot1 = 'm1'; dropitem(12); } } else dropitem($item['type']); if (!($item['type'] == 12 && $user['level'] < 4)) { if (db::c()->query('UPDATE `users` AS `u`, `inventory` AS `i` SET `u`.?f = ?i, `i`.`dressed` = 1, `u`.`sila` = `u`.`sila` + `i`.`gsila`, `u`.`lovk` = `u`.`lovk` + `i`.`glovk`, `u`.`inta` = `u`.`inta` + `i`.`ginta`, `u`.`intel` = `u`.`intel` + `i`.`gintel`, `u`.`maxhp` = `u`.`maxhp` + `i`.`ghp`, `u`.`noj` = `u`.`noj` + `i`.`gnoj`, `u`.`topor` = `u`.`topor` + `i`.`gtopor`, `u`.`dubina` = `u`.`dubina` + `i`.`gdubina`, `u`.`mec` = `u`.`mec` + `i`.`gmech`, `u`.`mfire` = `u`.`mfire` + `i`.`gfire`, `u`.`mwater` = `u`.`mwater` + `i`.`gwater`, `u`.`mair` = `u`.`mair` + `i`.`gair`, `u`.`mearth` = `u`.`mearth` + `i`.`gearth`, `u`.`mlight` = `u`.`mlight` + `i`.`glight`, `u`.`mgray` = `u`.`mgray` + `i`.`ggray`, `u`.`mdark` = `u`.`mdark` + `i`.`gdark`, `u`.`ubron1` = `u`.`ubron1` + `i`.`bron1`, `u`.`ubron2` = `u`.`ubron2` + `i`.`bron2`, `u`.`ubron3` = `u`.`ubron3` + `i`.`bron3`, `u`.`ubron4` = `u`.`ubron4` + `i`.`bron4`, `u`.`fkrit` = `u`.`fkrit` + `i`.`mfkrit`, `u`.`fakrit` = `u`.`fakrit` + `i`.`mfakrit`, `u`.`fuvorot` = `u`.`fuvorot` + `i`.`mfuvorot`, `u`.`fauvorot` = `u`.`fauvorot` + `i`.`mfauvorot`, `u`.`uminu` = `u`.`uminu` + `i`.`minu`, `u`.`umaxu` = `u`.`umaxu` + `i`.`maxu` WHERE `i`.`needident` = 0 AND `i`.`id` = ?i AND `i`.`dressed` = 0 AND `i`.owner = ?i AND (20 + `u`.`sila`) >= `i`.`nsila` AND (20 + `u`.`lovk`) >= `i`.`nlovk` AND (20 + `u`.`inta`) >= `i`.`ninta` AND `u`.`vinos` >= `i`.`nvinos` AND (20 + `u`.`intel`) >= `i`.`nintel` AND `u`.`mudra` >= `i`.`nmudra` AND `u`.`level` >= `i`.`nlevel` AND (("?s" OR (?i = `i`.`nalign`)) OR (`i`.`nalign` = 0)) AND `u`.`noj` >= `i`.`nnoj` AND `u`.`topor` >= `i`.`ntopor` AND `u`.`dubina` >= `i`.`ndubina` AND `u`.`mec` >= `i`.`nmech` AND `u`.`mfire` >= `i`.`nfire` AND `u`.`mwater` >= `i`.`nwater` AND `u`.`mair` >= `i`.`nair` AND `u`.`mearth` >= `i`.`nearth` AND `u`.`mlight` >= `i`.`nlight` AND `u`.`mgray` >= `i`.`ngray` AND `u`.`mdark` >= `i`.`ndark` AND `i`.`setsale` = 0 AND `u`.`id` = ?i', $slot1, $id, $id, $user['id'], $al, $user['align'], $user['id'])) $user[$slot1] = $item['id']; return true; } } /** * Отображение персонажа в main.php * * @param $id */ function showpersinv($id) { $user = db::c()->query('SELECT * FROM `users` WHERE `id` = ?i', $id)->fetch_assoc(); $dressed = []; $r = db::c()->query('SELECT * FROM `inventory` WHERE `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i', $user['helm'], $user['weap'], $user['plaw'], $user['bron'], $user['rybax'], $user['sergi'], $user['kulon'], $user['r1'], $user['r2'], $user['r3'], $user['perchi'], $user['shit'], $user['boots'], $user['m1'], $user['m2'], $user['m3'], $user['m4'], $user['m5'], $user['m6'], $user['m7'], $user['m8'], $user['m9'], $user['m10']); while ($rec = $r->fetch_assoc()) { $dressed[$rec['id']] = $rec; } ?>
3) { ?>
0) { $dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['m1'])->fetch_assoc(); $mess = 'Снять ' . $dress['name'] . '
Прочность ' . $dress['duration'] . '/' . $dress['maxdur']; echo ''; } else { $mess = 'Пустой слот магия'; echo ''; } if ($user['m2'] > 0) { $dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['m2'])->fetch_assoc(); $mess = 'Снять ' . $dress['name'] . '
Прочность ' . $dress['duration'] . '/' . $dress['maxdur']; echo ''; } else { $mess = 'Пустой слот магия'; echo ''; } if ($user['m3'] > 0) { $dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['m3'])->fetch_assoc(); $mess = 'Снять ' . $dress['name'] . '
Прочность ' . $dress['duration'] . '/' . $dress['maxdur']; echo ''; } else { $mess = 'Пустой слот магия'; echo ''; } if ($user['m4'] > 0) { $dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['m4'])->fetch_assoc(); $mess = 'Снять ' . $dress['name'] . '
Прочность ' . $dress['duration'] . '/' . $dress['maxdur']; echo ''; } else { $mess = 'Пустой слот магия'; echo ''; } if ($user['m5'] > 0) { $dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['m5'])->fetch_assoc(); $mess = 'Снять ' . $dress['name'] . '
Прочность ' . $dress['duration'] . '/' . $dress['maxdur']; echo ''; } else { $mess = 'Пустой слот магия'; echo ''; } ?>
0) { $dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['m6'])->fetch_assoc(); $mess = 'Снять ' . $dress['name'] . '
Прочность ' . $dress['duration'] . '/' . $dress['maxdur']; echo ''; } else { $mess = 'Пустой слот магия'; echo ''; } if ($user['m7'] > 0) { $dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['m7'])->fetch_assoc(); $mess = 'Снять ' . $dress['name'] . '
Прочность ' . $dress['duration'] . '/' . $dress['maxdur']; echo ''; } else { $mess = 'Пустой слот магия'; echo ''; } if ($user['m8'] > 0) { $dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['m8'])->fetch_assoc(); $mess = 'Снять ' . $dress['name'] . '
Прочность ' . $dress['duration'] . '/' . $dress['maxdur']; echo ''; } else { $mess = 'Пустой слот магия'; echo ''; } if ($user['m9'] > 0) { $dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['m9'])->fetch_assoc(); $mess = 'Снять ' . $dress['name'] . '
Прочность ' . $dress['duration'] . '/' . $dress['maxdur']; echo ''; } else { $mess = 'Пустой слот магия'; echo ''; } if ($user['m10'] > 0) { $dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['m10'])->fetch_assoc(); $mess = 'Снять ' . $dress['name'] . '
Прочность ' . $dress['duration'] . '/' . $dress['maxdur']; echo ''; } else { $mess = 'Пустой слот магия'; echo ''; } ?>
0) { $dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['sergi'])->fetch_assoc(); $mess = 'Снять ' . $dress['name'] . '
Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . ''; echo ''; } else { echo 'Пустой слот Серьги\' />'; } ?>
0) { $dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['kulon'])->fetch_assoc(); $mess = 'Снять ' . $dress['name'] . '
Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . ''; echo ''; } else { echo 'Пустой слот Ожерелье\' />'; } ?>
0) { $dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['weap'])->fetch_assoc(); $mess = 'Снять ' . $dress['name'] . '
Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . ''; echo ''; } else { echo 'Пустой слот Оружие\' />'; } ?>
0 || $user['rybax'] > 0 || $user['plaw'] > 0) { if ($user['plaw']) { $d = $user['plaw']; $n = 23; } elseif ($user['bron']) { $d = $user['bron']; $n = 4; } elseif ($user['rybax']) { $d = $user['rybax']; $n = 22; } $dress = $dressed[$d]; $mess = 'Снять ' . $dress['name'] . '
Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . ''; echo ''; } else { echo 'Пустой слот Броня\' />'; } ?>
0) { $dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['r1'])->fetch_assoc(); $mess = 'Снять ' . $dress['name'] . '
Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . ''; echo ''; } else { echo 'Пустой слот Кольцо\' />'; } ?>
0) { $dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['r2'])->fetch_assoc(); $mess = 'Снять ' . $dress['name'] . '
Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . ''; echo ''; } else { echo 'Пустой слот Кольцо\' />'; } ?>
0) { $dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['r3'])->fetch_assoc(); $mess = 'Снять ' . $dress['name'] . '
Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . ''; echo ''; } else { echo 'Пустой слот Кольцо\' />'; } ?>
<?= $user['login'] ?>
0) { $dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['helm'])->fetch_assoc(); $mess = 'Снять ' . $dress['name'] . '
Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . ''; echo ''; } else { echo 'Пустой слот Шлем\' />'; } ?>
0) { $dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['perchi'])->fetch_assoc(); $mess = 'Снять ' . $dress['name'] . '
Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . ''; echo ''; } else { echo 'Пустой слот Перчатки\' />'; } ?>
0) { $dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['shit'])->fetch_assoc(); $mess = 'Снять ' . $dress['name'] . '
Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . ''; echo ''; } else { echo 'Пустой слот Щит\' />'; } ?>
0) { $dress = db::c()->query('SELECT `name`,`duration`,`maxdur`,`img` FROM `inventory` WHERE `id` = ?i', $user['boots'])->fetch_assoc(); $mess = 'Снять ' . $dress['name'] . '
Прочность ' . $dress['duration'] . '/' . $dress['maxdur'] . '
'; echo ''; } else { echo 'Пустой слот Обувь\' />'; } ?>
query('SELECT `sila`, `lovk`, `inta`, `intel`, `noj`, `mec`, `topor`, `dubina`, `mfire`, `mwater`, `mair`, `mearth`, `mlight`, `mgray`, `mdark`, `hp`, `maxhp` FROM `users` WHERE `id` = ?i', $user['id'])->fetch_assoc(); foreach ($u1 as $k => $v) { $user[$k] = $v; } } unset($_SESSION['stackall']); if (isset($_GET["stack"])) { $_GET["stack"] = (int)$_GET["stack"]; $rec = db::c()->query('SELECT `id` FROM `inventory` WHERE `id` = ?i AND `owner` = ?i AND `setsale` = 0', $_GET['stack'], $user['id'])->fetch_assoc(); if (isset($rec['id'])) { stack($rec['id']); unset($rec); } } if (isset($_GET['unstack'])) { unstack((int)$_GET['unstack'], (int)$_POST["qty"]); } function setShadow($image) { global $user; $shadows = [ 'm01', 'm02', 'm03', 'm04', 'm05', 'm06', 'm07', 'm08', 'm09', 'm10', 'f01', 'f02', 'f03', 'f04', 'f05', 'f06', 'f07', 'f08', 'f09', 'f10', 'person' ]; if (in_array($image, $shadows)) { $i = $image . '.png'; db::c()->query('UPDATE `users` SET `shadow` = "?s" WHERE `id` = ?i', $i, $user['id']); } else err('Ошибка!'); } $obraz = filter_input(INPUT_GET, 'obraz'); if ($obraz && ($user['shadow'] == 'g0.gif' || $user['shadow'] == 'man0.gif')) { setShadow($obraz); } if (isset($_GET['del'])) { if ($_GET['del'] == 1) { if ($_GET['efid'] > 0) { $pl = mysql_fetch_array(mysql_query('SELECT `id`, `type` FROM `effects` WHERE `owner` = "' . $user['id'] . '" AND `id` = "' . (int)$_GET['efid'] . '" LIMIT 1')); if (isset($pl['id'])) { del_efs($user['id'], $pl['id'], $pl['type']); } else { echo 'Эффект не найден ...'; } } } } if (isset($_GET['modif_bron'])) { $brons = $_GET['modif_bron']; $ids = $_GET['ids']; $cur = mysql_fetch_assoc(mysql_query("SELECT `id`, `free_bron`, `bron1`, `bron2`, `bron3`, `bron4` FROM `inventory` WHERE `owner` = '" . $user['id'] . "' AND `id` = '" . mysql_real_escape_string($ids) . "' LIMIT 1")); if (isset($cur['id'])) { if ($cur['free_bron'] > 0 && $cur[$brons] > 0) { mysql_query("UPDATE `inventory` SET `free_bron` = (`free_bron`-1), `" . $brons . "` = (`" . $brons . "`+1) WHERE `owner` = '" . $user['id'] . "' AND `id` = '" . mysql_real_escape_string($ids) . "' LIMIT 1"); echo "Параметр брони увеличен!"; } } } if (isset($_GET['modif_stat'])) { $stats = $_GET['modif_stat']; $ids = $_GET['ids']; $cur = mysql_fetch_assoc(mysql_query("SELECT `id`, `free_stat`, `gsila`, `glovk`, `ginta`, `gintel` FROM `inventory` WHERE `owner` = '" . $user['id'] . "' AND `id` = '" . mysql_real_escape_string($ids) . "' LIMIT 1")); if (isset($cur['id'])) { if ($cur['free_stat'] > 0 && $cur[$stats] > 0) { mysql_query("UPDATE `inventory` SET `free_stat` = (`free_stat`-1), `" . $stats . "` = (`" . $stats . "`+1) WHERE `owner` = '" . $user['id'] . "' AND `id` = '" . mysql_real_escape_string($ids) . "' LIMIT 1"); echo "Параметр увеличен!"; } } } if (isset($_GET['modif_mf'])) { $mfs = $_GET['modif_mf']; $ids = $_GET['ids']; $cur = mysql_fetch_assoc(mysql_query("SELECT `id`, `free_mf`, `mfkrit`, `mfakrit`, `mfuvorot`, `mfauvorot` FROM `inventory` WHERE `owner` = '" . $user['id'] . "' AND `id` = '" . mysql_real_escape_string($ids) . "' LIMIT 1")); if (isset($cur['id'])) { if ($cur['free_mf'] > 0 && $cur[$mfs] > 0) { mysql_query("UPDATE `inventory` SET `free_mf` = (`free_mf`-1), `" . $mfs . "` = (`" . $mfs . "`+1) WHERE `owner` = '" . $user['id'] . "' AND `id` = '" . mysql_real_escape_string($ids) . "' LIMIT 1"); echo "Параметр увеличен!"; } } } $d = db::c()->query('SELECT SUM(`massa`) AS `summ` FROM `inventory` WHERE `owner` = ?i AND `dressed` = 0 AND `setsale` = 0', $user['id'])->fetch_assoc(); if ($d['summ'] > get_meshok() && $_GET['got']) { err('У вас переполнен рюкзак, вы не можете передвигаться...'); $_GET['got'] = 0; } $eff = db::c()->query('SELECT `id` FROM `effects` WHERE `owner` = ?i AND (`type` = 14 OR `type` = 13) LIMIT 1', $user['id'])->fetch_assoc(); if (isset($eff['id']) && $_GET['got']) { err('У вас тяжелая травма, вы не можете передвигатся...'); $_GET['got'] = 0; } function gone_rooms($room) { global $user; $array = [ 1 => [], 2 => [], 3 => [], 4 => [], 5 => ['min_level' => 1, 'max_level' => 3], 6 => ['min_level' => 1, 'max_level' => 3], 7 => ['min_level' => 1, 'max_level' => 3], 8 => ['min_level' => 4, 'max_level' => 21], 9 => ['min_level' => 4, 'max_level' => 6], 10 => ['min_level' => 7, 'max_level' => 9], 11 => ['min_level' => 10, 'max_level' => 12], 12 => ['min_level' => 13, 'max_level' => 15], 13 => ['min_level' => 16, 'max_level' => 19], 14 => ['min_level' => 19, 'max_level' => 21], 15 => ['paladin' => 1], 16 => ['paladin' => 1], 17 => ['align' => 3], 18 => ['align' => 3], 19 => ['sex' => 2], 36 => ['align' => 2], 54 => ['align' => 6], 55 => ['align' => 6], 56 => ['align' => 2] ]; $error = 0; $param = $array[$room]; if ($room == 57) { err("Комнаты не существует..."); $error = 1; } if (isset($param['min_level'])) { if ($user['level'] < $param['min_level']) { err("Вы не можете попасть в эту комнату. Уровень маловат..."); $error = 1; } } if (isset($param['max_level'])) { if ($user['level'] > $param['max_level']) { err("Вы не можете попасть в эту комнату. Уровень высоковат..."); $error = 1; } } if (isset($param['align_int'])) { if ((int)$user['align'] != $param['align_int']) { err("Вы не можете попасть в эту комнату. Склонность не та..."); $error = 1; } } if (isset($param['align'])) { if ($user['align'] != $param['align']) { err("Вы не можете попасть в эту комнату. Склонность не та..."); $error = 1; } } if (isset($param['paladin'])) { if ($user['align'] <= 1 || $user['align'] >= 2) { err("Вы не можете попасть в эту комнату. Склонность не та..."); $error = 1; } } if ($error == 0 OR $user['admin'] == 1) { db::c()->query('UPDATE `users`, `online` SET `users`.`room` = ?i, `online`.`room` = ?i WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $room, $room, $user['id']); header('Location: main.php'); } } if (isset($_GET['got'])) gone_rooms($_GET['room']); if (input::post('setshadow')) { ?>

Выбрать образ персонажа

Внимание! Образ персонажа выбирается только один раз.
Общие образы

Выбрать образ персонажа

Клановые образы
query('SELECT * FROM `online` WHERE `real_time` >= ?i', (time() - 60)); while ($v = $online->fetch_assoc()) { $or[$v['room']]++; } ?>
full() ?>
Карта миров
(Сейчас в игре: getNumRows() ?> чел.)
Обновить
Поединки
Инвентарь
Состояние
Подсказка
Вернуться
Выйти на Центральную площадь
Комната для новичков 1
(Уровень 0)
Войти
 ()
Комната для новичков 2
(Уровень 0)
Войти
 ()
Комната для новичков 3
(Уровень 0)
Войти
 ()
Комната для новичков 4
(Уровень 0)
Войти
 ()
Зал воинов 1
(Уровень 1-3)
Войти
 ()
Зал воинов 2
(Уровень 1-3)
Войти
 ()
Зал воинов 3
(Уровень 1-3)
Войти
 ()
Торговый зал
(Уровень 4-21)
Войти
 ()
Рыцарский зал
(Уровень 4-6)
Войти
 ()
Башня рыцарей-магов
(Уровень 7-9)
Войти
 ()
Колдовской мир
(Уровень 10-12)
Войти
 ()
Этаж духов
(Уровень 13-15)
Войти
 ()
Астральные этажи
(Уровень 16-19)
Войти
 ()
Огненный мир
(Уровень 19-21)
Войти
 ()
Зал Паладинов
Войти
 ()
Совет Белого Братства
Войти
 ()
Зал Тьмы
Войти
 ()
Зал Стихий
Войти
 ()
Зал Света
Войти
 ()
Будуар
(Уровень 1-21)
Войти
 ()
Царство Тьмы
Войти
 ()
Царство Стихий
Войти
 ()
Царство Света
Войти
 ()
Зал Клановых Войн
(Уровень 4-21)
Войти
 (0)
query('SELECT `id`, `koll` FROM `inventory` WHERE `id` = ?i AND `owner` = ?i', input::get('dress'), $_SESSION['uid']); if ($q->getNumRows()) { $q = $q->fetch_assoc(); if ($q['koll'] > 1) { $id = unstack($q['id'], 1); dressitem($id); } else { dressitem(input::get('dress')); } updstats(); } else err('Ошибка: предмет не найден!'); } if (input::get('destruct')) { $q = db::c()->query('SELECT `id`, `dressed`, `name`, `duration`, `maxdur` FROM `inventory` WHERE `owner` = ?i AND `id` = ?i', $_SESSION['uid'], input::get('destruct')); if ($q->getNumRows()) { $q = $q->fetch_assoc(); if (empty($q['dressed'])) { destructitem($q['id']); addToDelo($user['login'] . " выбросил предмет " . $q['name'] . " id:(cap" . $q['id'] . ")"); err('Предмет ' . $q['name'] . ' выброшен.'); } else err('Ошибка: нельзя выбросить одетый предмет!'); } else err('Ошибка: предмет не найден!'); } if (input::get('use')) { $q = db::c()->query('SELECT `id`, `koll` FROM `inventory` WHERE `id` = ?i AND `owner` = ?i', input::get('use'), $_SESSION['uid']); if ($q->getNumRows()) { $q = $q->fetch_assoc(); if ($q['koll'] > 1) { $id = unstack($q['id'], 1); usemagic($id, $_POST['target']); } else { usemagic($_GET['use'], $_POST['target']); } } else err('Ошибка: предмет не найден!'); } if (input::get('undress')) { undressall($_SESSION['uid']); updstats(); } if (input::get('delcomplect')) { db::c()->query('DELETE FROM `komplekt` WHERE `name` = "?s" AND `owner` = ?i', input::get('delcomplect'), $_SESSION['uid']); } if (input::get('complect')) { $hp = $user['hp']; undressall($_SESSION['uid']); $q = db::c()->query('SELECT `items` FROM `komplekt` WHERE `name` = "?s" AND `owner` = ?i', input::get('complect'), $_SESSION['uid'])->fetch_assoc(); $items_in_set = []; $items_in_set = explode(';', $q['items']); foreach ($items_in_set as $iis) dressitem($iis); db::c()->query('UPDATE `users` SET `hp` = ?i WHERE `id` = ?i', $hp, $_SESSION['uid']); // Если здоровье становится выше максимума - выравниваем: db::c()->query('UPDATE `users` SET `hp` = `maxhp` WHERE `hp` > `maxhp` AND `id` = ?i', $_SESSION['uid']); $user = (new users_row($_SESSION['uid']))->result(); # Нахера перевыгружать О_о)?! } ref_drop(); if (input::get('savecomplect')) { if (preg_match('/^[- \p{L}\d]+$/u', input::get('savecomplect'))) { $q = db::c()->query('SELECT `id` FROM `komplekt` WHERE `name` = "?s" AND `owner` = ?i', input::get('savecomplect'), $_SESSION['uid'])->getNumRows(); if (empty($q)) { $items = []; $q2 = db::c()->query('SELECT `id` FROM `inventory` WHERE `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i OR `id` = ?i', $user['sergi'], $user['kulon'], $user['perchi'], $user['weap'], $user['bron'], $user['rybax'], $user['r1'], $user['r2'], $user['r3'], $user['helm'], $user['shit'], $user['m1'], $user['m2'], $user['m3'], $user['m4'], $user['m5'], $user['m6'], $user['m7'], $user['m8'], $user['m9'], $user['m10'], $user['boots'], $user['plaw']); while ($res = $q2->fetch_assoc()) $items[] = $res['id']; $t_items = implode(";", $items); db::c()->query('INSERT INTO `komplekt` (`name`, `owner`, `items`) VALUES ("?s",?i,"?s")', input::get('savecomplect'), $_SESSION['uid'], $t_items); err('Комплект ' . $name . ' сохранён.'); } else err('Ошибка: такое название комплекта уже используется!'); } else err('Ошибка: запрещённые символы!'); } if (!in_array(input::get('mZeAjax'), ['mZeInventory', 'mZeFilter'])): ?>
Снять все
Запомнить комплект
query("SELECT `name` FROM komplekt WHERE `owner` = ?i", $user['id']); while ($u_k = $u_all_kompl->fetch_assoc()) { $k_name = $u_k['name']; echo " Надеть \"" . $k_name . "\"
"; } ?>


Уровень:
Опыт: ()
Побед:
Поражений:
Ничьих:
Деньги: кр.
Репутация: реп.
Сила:
Ловкость:
Интуиция:
Выносливость:
Интеллект:
Мудрость:
Возможных увеличений:

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]; } ?> Урон: - (' . $add_dmg . '%)'; } ?>
Мф. крит. удара: (' . $add_mf . '%)'; } ?>
Мф. против крит. удара: (' . $add_mf . '%)'; } ?>
Мф. увертывания: (' . $add_mf . '%)'; } ?>
Мф. против увертывания: (' . $add_mf . '%)'; } ?>
Владение оружием:
Кинжалами:
Мечами:
Дубинами:
Топорами:

Владение магией:
Магия огня:
Магия воды:
Магия воздуха:
Магия земли:
Магия света:
Магия серости:
Магия тьмы:
Возможных увеличений:

Броня головы: (' . $add_bron . '%)'; } ?>
Броня корпуса: (' . $add_bron . '%)'; } ?>
Броня пояса: (' . $add_bron . '%)'; } ?>
Броня ног: (' . $add_bron . '%)'; } ?>
= 25 || $user['lovk'] >= 25 || $user['inta'] >= 25 || $user['vinos'] >= 25 || $user['intel'] >= 25)) { if ($user['sila'] >= 25) { $sila['fauvorot'] = 10; $sila['fakrit'] = 10; } if ($user['sila'] >= 50) { $sila['fauvorot'] = 20; $sila['fakrit'] = 25; } if ($user['sila'] >= 75) { $sila['fauvorot'] = 30; $sila['fakrit'] = 40; } if ($user['sila'] >= 100) { $sila['fauvorot'] = 40; $sila['fakrit'] = 50; $sila['uminu'] = 2; $sila['umaxu'] = 2; } if ($user['sila'] >= 125) { $sila['fauvorot'] = 60; $sila['fakrit'] = 75; $sila['uminu'] = 5; $sila['umaxu'] = 5; } if ($user['sila'] >= 150) { $sila['fauvorot'] = 90; $sila['fakrit'] = 110; $sila['uminu'] = 8; $sila['umaxu'] = 8; } if ($user['sila'] >= 175) { $sila['fauvorot'] = 120; $sila['fakrit'] = 150; $sila['uminu'] = 12; $sila['umaxu'] = 12; } if ($user['sila'] >= 200) { $sila['fauvorot'] = 150; $sila['fakrit'] = 200; $sila['uminu'] = 15; $sila['umaxu'] = 15; } if ($user['lovk'] >= 25) { $lovk['fuvorot'] = 10; $lovk['fauvorot'] = 10; $lovk['fakrit'] = 20; } if ($user['lovk'] >= 50) { $lovk['fuvorot'] = 20; $lovk['fauvorot'] = 25; $lovk['fakrit'] = 40; } if ($user['lovk'] >= 75) { $lovk['fuvorot'] = 30; $lovk['fauvorot'] = 30; $lovk['fakrit'] = 60; } if ($user['lovk'] >= 100) { $lovk['fuvorot'] = 40; $lovk['fauvorot'] = 40; $lovk['fakrit'] = 75; $lovk['uminu'] = 5; $lovk['umaxu'] = 5; } if ($user['lovk'] >= 125) { $lovk['fuvorot'] = 40; $lovk['fauvorot'] = 70; $lovk['fakrit'] = 90; $lovk['uminu'] = 6; $lovk['umaxu'] = 6; } if ($user['lovk'] >= 150) { $lovk['fuvorot'] = 40; $lovk['fauvorot'] = 150; $lovk['fakrit'] = 120; $lovk['uminu'] = 8; $lovk['umaxu'] = 8; } if ($user['lovk'] >= 175) { $lovk['fuvorot'] = 40; $lovk['fauvorot'] = 200; $lovk['fakrit'] = 140; $lovk['uminu'] = 10; $lovk['umaxu'] = 10; } if ($user['lovk'] >= 200) { $lovk['fuvorot'] = 40; $lovk['fauvorot'] = 250; $lovk['fakrit'] = 160; $lovk['uminu'] = 15; $lovk['umaxu'] = 15; } if ($user['inta'] >= 25) { $inta['fkrit'] = 10; $inta['fauvorot'] = 10; $inta['fakrit'] = 15; } if ($user['inta'] >= 50) { $inta['fkrit'] = 25; $inta['fauvorot'] = 25; $inta['fakrit'] = 25; } if ($user['inta'] >= 75) { $inta['fkrit'] = 60; $inta['fauvorot'] = 30; $inta['fakrit'] = 30; } if ($user['inta'] >= 100) { $inta['fkrit'] = 40; $inta['fauvorot'] = 40; $inta['fakrit'] = 75; } if ($user['inta'] >= 125) { $inta['fkrit'] = 40; $inta['fauvorot'] = 50; $inta['fakrit'] = 100; $inta['uminu'] = 1; $inta['umaxu'] = 1; } if ($user['inta'] >= 150) { $inta['fkrit'] = 60; $inta['fauvorot'] = 40; $inta['fakrit'] = 130; $inta['uminu'] = 5; $inta['umaxu'] = 5; } if ($user['inta'] >= 175) { $inta['fkrit'] = 40; $inta['fauvorot'] = 80; $inta['fakrit'] = 170; $inta['uminu'] = 10; $inta['umaxu'] = 10; } if ($user['inta'] >= 200) { $inta['fkrit'] = 40; $inta['fauvorot'] = 120; $inta['fakrit'] = 200; $inta['uminu'] = 15; $inta['umaxu'] = 15; } if ($user['vinos'] >= 25) { $vinos['fkrit'] = 10; $vinos['fauvorot'] = 10; $vinos['fakrit'] = 15; } if ($user['vinos'] >= 50) { $vinos['fkrit'] = 25; $vinos['fauvorot'] = 25; $vinos['fakrit'] = 25; } if ($user['vinos'] >= 75) { $vinos['fkrit'] = 60; $vinos['fauvorot'] = 30; $vinos['fakrit'] = 30; } if ($user['vinos'] >= 100) { $vinos['fkrit'] = 40; $vinos['fauvorot'] = 40; $vinos['fakrit'] = 75; } if ($user['vinos'] >= 125) { $vinos['fkrit'] = 40; $vinos['fauvorot'] = 50; $vinos['fakrit'] = 100; $vinos['uminu'] = 1; $vinos['umaxu'] = 1; } if ($user['vinos'] >= 150) { $vinos['fkrit'] = 60; $vinos['fauvorot'] = 40; $vinos['fakrit'] = 130; $vinos['uminu'] = 5; $vinos['umaxu'] = 5; } if ($user['vinos'] >= 175) { $vinos['fkrit'] = 40; $vinos['fauvorot'] = 80; $vinos['fakrit'] = 170; $vinos['uminu'] = 10; $vinos['umaxu'] = 10; } if ($user['vinos'] >= 200) { $vinos['fkrit'] = 40; $vinos['fauvorot'] = 120; $vinos['fakrit'] = 200; $vinos['uminu'] = 15; $vinos['umaxu'] = 15; } if ($user['vinos'] >= $user['sila'] && $user['vinos'] >= $user['lovk'] && $user['vinos'] >= $user['inta']) { $i_uminu = $vinos['uminu']; $i_fkrit = $vinos['fkrit']; $i_fauvorot = $vinos['fauvorot']; $i_fakrit = $vinos['fakrit']; } if ($user['inta'] >= $user['sila'] && $user['inta'] >= $user['lovk'] && $user['inta'] >= $user['vinos']) { $i_uminu = $inta['uminu']; $i_fkrit = $inta['fkrit']; $i_fauvorot = $inta['fauvorot']; $i_fakrit = $inta['fakrit']; } if ($user['lovk'] >= $user['sila'] && $user['lovk'] >= $user['inta'] && $user['lovk'] >= $user['vinos']) { $i_uminu = $lovk['uminu']; $i_fkrit = $lovk['fkrit']; $i_fauvorot = $lovk['fauvorot']; $i_fakrit = $lovk['fakrit']; } if ($user['sila'] >= $user['lovk'] && $user['sila'] >= $user['inta'] && $user['sila'] >= $user['vinos']) { $i_uminu = $sila['uminu']; $i_fkrit = $sila['fkrit']; $i_fauvorot = $sila['fauvorot']; $i_fakrit = $sila['fakrit']; } if ($i_fkrit > 0) { echo "Мф. крит: +" . $i_fkrit . "
"; } if ($i_fakrit > 0) { echo "Мф. анти крит: +" . $i_fakrit . "
"; } if ($i_fauvorot > 0) { echo "Мф. анти уворот: +" . $i_fauvorot . "
"; } if ($i_uminu > 0) { echo "Урон: +" . $i_uminu; } } ?>
">Амуниция ">Заклинания ">Ресурсы ">Подарки ">Квестовые вещи ">Прочее
Рюкзак (масса : )
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 ""; 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 ""; ?>
Мешок денег (Масса: 0)
кр.
"; $ii->printImage(); $ii->printControls(); echo ""; $ii->printInfo(); echo "
Пусто
query('SELECT SUM(`massa`) AS `summ` FROM `inventory` WHERE `owner` = ?i AND `dressed` = 0 AND `setsale` = 0', $user['id'])->fetch_assoc(); if ($d['summ'] > get_meshok() && $_GET['got']) { err('У вас переполнен рюкзак, вы не можете передвигаться...'); $_GET['got'] = 0; } $eff = db::c()->query('SELECT `id` FROM `effects` WHERE `owner` = ?i AND (`type` = 14 OR `type` = 13) LIMIT 1', $user['id'])->fetch_assoc(); if (isset($eff['id']) && $_GET['got']) { err('У вас тяжелая травма, вы не можете передвигатся...'); $_GET['got'] = 0; } if (isset($_GET['goto'])) { if ($_GET['goto'] == 'plo') { if ($user['zayavka'] == 0) { db::c()->query('UPDATE `users`,`online` SET `users`.`room` = 20,`online`.`room` = 20 WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $_SESSION['uid']); die("


Переходим на Центральную площадь... "); } else { err('Подали заявку на бой и убегаете из клуба? Нехорошо...'); } } } if (isset($_GET['use'])) { usemagic($_GET['use'], $_POST['target']); } $online = db::c()->query('SELECT 1 FROM `online` WHERE `real_time` >= ?i', (time() - 60)); ?>
 
  • Поединки
  • Настройки / инвентарь
  • Состояние
  • Карта миров
  • Выйти на Центральную площадь
  • Обновить экран