Выпилен сброс статов

This commit is contained in:
lopar 2018-03-22 22:15:54 +02:00
parent 2e5ac60789
commit bb38897507

127
bank.php
View File

@ -200,133 +200,6 @@ if (!$_SESSION['bankid']) {
$_GET['dropm'] = 0;
}
if ($_GET['dropst']) {
$travma = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner`='" . $user['id'] . "' AND (`type`=11 OR `type`=12 OR `type`=13 OR `type`=14) ORDER BY `type` DESC LIMIT 1;"));
if ($travma['type']) {
$mywarn = "Невозможно сбрасывать статы находясь в травме!";
} else {
undressall($user['id']);
$user1 = mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id`='" . $user['id'] . "' LIMIT 1;"));
$svstats = $user1['sila'] + $user1['lovk'] + $user1['inta'] + $user1['vinos'] + $user1['intel'] + $user1['mudra'] - 12 - $user1['level'];
if ($svstats <= $bank['ekr']) {
$exps = ["20" => [15],
"45" => [16],
"75" => [17],
"110" => [18],
"160" => [21],
"215" => [22],
"280" => [23],
"350" => [24],
"410" => [25],
"530" => [28],
"670" => [29],
"830" => [30],
"950" => [31],
"1100" => [32],
"1300" => [33],
"1450" => [36],
"1650" => [37],
"1850" => [38],
"2050" => [39],
"2200" => [40],
"2500" => [41],
"2900" => [46],
"3350" => [47],
"3800" => [48],
"4200" => [49],
"4600" => [50],
"5000" => [51],
"6000" => [54],
"7000" => [55],
"8000" => [56],
"9000" => [57],
"10000" => [58],
"11000" => [59],
"12000" => [60],
"12500" => [61],
"14000" => [64],
"15500" => [65],
"17000" => [66],
"19000" => [67],
"21000" => [68],
"23000" => [69],
"26000" => [70],
"30000" => [71],
"60000" => [76],
"75000" => [77],
"150000" => [78],
"175000" => [79],
"200000" => [80],
"225000" => [81],
"250000" => [82],
"260000" => [83],
"280000" => [84],
"300000" => [85],
"1500000" => [86],
"1750000" => [87],
"2000000" => [88],
"2175000" => [89],
"2300000" => [90],
"2400000" => [91],
"2500000" => [92],
"2600000" => [93],
"2800000" => [94],
"3000000" => [95],
"6000000" => [96],
"6500000" => [97],
"7500000" => [98],
"8500000" => [99],
"9000000" => [100],
"9250000" => [101],
"9500000" => [102],
"9750000" => [103],
"9900000" => [104],
"10000000" => [105],
"13000000" => [106],
"14000000" => [107],
"15000000" => [108],
"16000000" => [109],
"17000000" => [110],
"17500000" => [111],
"18000000" => [112],
"19000000" => [113],
"19500000" => [114]];
echo "<pre>";
$ss = mysql_query("SELECT `id`,`nextup`,`level` FROM `users` WHERE `level` > 0 AND `level` < 8 AND id='" . $user['id'] . "';");
$errdo = 0;
while ($ssd = mysql_fetch_array($ss)) {
undressall($ssd['id']);
if (!mysql_query("UPDATE `users` SET `sila`='3',`lovk`='3',`inta`='3',`vinos`='" . (3 + $ssd['level']) . "',`intel`='0',`fkrit`='0',`fakrit`='0',`fuvorot`='0',`fauvorot`='0',`stats`='" . ($exps[$ssd['nextup']][0] - 12) . "' WHERE `id`='" . $ssd['id'] . "';")) $errdo = 1;
}
if ($errdo == 0) {
mysql_query("UPDATE `bank` SET `ekr`=`ekr`-'" . $svstats . "' WHERE `id`='" . $_SESSION['bankid'] . "' LIMIT 1;");
mysql_query("INSERT INTO `delo` (`id`,`author`,`pers`,`text`,`type`,`date`) VALUES ('','0','" . $_SESSION['uid'] . "','" . $user['login'] . " перераспределил статы, заплатив " . $svstats . " екр. со счета №" . $_SESSION['bankid'] . " в банке. ',1,'" . time() . "');");
$bank = mysql_fetch_array(mysql_query("SELECT * FROM `bank` WHERE `id`='" . $_SESSION['bankid'] . "';"));
$mywarn = "Все прошло удачно. Вы можете перераспределить статы.";
} else {
$mywarn = "Произошла ошибка! Обратитесь к палладинам.";
}
$vinos = $user1['level'] + 3;
$hp = $vinos * 6;
if (mysql_query("UPDATE `users` SET `stats`='" . $svstats . "',lovk=3,sila=3,inta=3,vinos='" . $vinos . "',hp='" . $hp . "',maxhp='" . $hp . "',intel=0,mudra=0 WHERE `id`='" . $user['id'] . "' LIMIT 1;")) {
mysql_query("UPDATE `bank` SET `ekr`=`ekr`-'" . $svstats . "' WHERE `id`='" . $_SESSION['bankid'] . "' LIMIT 1;");
mysql_query("INSERT INTO `delo` (`id`,`author`,`pers`,`text`,`type`,`date`) VALUES ('','0','" . $_SESSION['uid'] . "','" . $user['login'] . " перераспределил статы, заплатив " . $svstats . " екр. со счета №" . $_SESSION['bankid'] . " в банке. ',1,'" . time() . "');");
$bank = mysql_fetch_array(mysql_query("SELECT * FROM `bank` WHERE `id`='" . $_SESSION['bankid'] . "';"));
$mywarn = "Все прошло удачно. Вы можете перераспределить статы.";
} else {
$mywarn = "Произошла ошибка!";
}
} else {
$mywarn = "У вас недостаточно денег на валютном счету для выполнения операции";
}
}
$_GET['dropst'] = 0;
}
### Чеки
/**
*