From 8d4062eb84268f9b39ee8179fb5b65e2d386aee5 Mon Sep 17 00:00:00 2001 From: lopar Date: Wed, 16 Sep 2020 18:50:38 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D1=81=D1=82=D0=B0=D1=80=D0=BE=D0=B3=D0=BE=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=B4=D0=B0=20=D0=BE=D1=82=D0=B2=D0=B5=D1=87=D0=B0=D1=8E?= =?UTF-8?q?=D1=89=D0=B5=D0=B3=D0=BE=20=D0=B7=D0=B0=20=D0=BB=D0=B5=D1=87?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=82=D1=80=D0=B0=D0=B2=D0=BC.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/admin.php | 12 ++++--- magic/blank.php | 0 magic/ct1.php | 44 -------------------------- magic/ct2.php | 49 ----------------------------- magic/ct3.php | 52 ------------------------------- magic/ct3_100.php | 49 ----------------------------- magic/ct_all.php | 34 -------------------- magic/ct_nele4.php | 43 ------------------------- magic/travmoff.php | 21 ------------- magic/usability_klan/travmoff.php | 20 ------------ magic/usability_user/travmoff.php | 20 ------------ user_abilities.php | 27 ++++++++++------ 12 files changed, 26 insertions(+), 345 deletions(-) delete mode 100644 magic/blank.php delete mode 100644 magic/ct1.php delete mode 100644 magic/ct2.php delete mode 100644 magic/ct3.php delete mode 100644 magic/ct3_100.php delete mode 100644 magic/ct_all.php delete mode 100644 magic/ct_nele4.php delete mode 100644 magic/travmoff.php delete mode 100644 magic/usability_klan/travmoff.php delete mode 100644 magic/usability_user/travmoff.php diff --git a/admin/admin.php b/admin/admin.php index a6f39de..8c368ba 100644 --- a/admin/admin.php +++ b/admin/admin.php @@ -460,13 +460,16 @@ switch ($_POST['use']) { /* Подключаем строго тот свито include("../magic/al_neut_power.php"); break; case "ct1": - include("../magic/ct1.php"); + //Заменён на CureInjury.php class. Придумать вызов. + //include("../magic/ct1.php"); break; case "ct2": - include("../magic/ct2.php"); + //Заменён на CureInjury.php class. Придумать вызов. + //include("../magic/ct2.php"); break; case "ct3": - include("../magic/ct3.php"); + //Заменён на CureInjury.php class. Придумать вызов. + //include("../magic/ct3.php"); break; case "sleep": include("../magic/sleep.php"); @@ -526,7 +529,8 @@ switch ($_POST['use']) { /* Подключаем строго тот свито include("../magic/unmarry.php"); break; case "ct_all": - include("../magic/ct_all.php"); + //Заменён на CureInjury.php class. Придумать вызов. + //include("../magic/ct_all.php"); break; case "check": include("../magic/check.php"); diff --git a/magic/blank.php b/magic/blank.php deleted file mode 100644 index e69de29..0000000 diff --git a/magic/ct1.php b/magic/ct1.php deleted file mode 100644 index a9da4b3..0000000 --- a/magic/ct1.php +++ /dev/null @@ -1,44 +0,0 @@ -= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); -$owntravma = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = ".$us['id']." AND `type`=11;")); -$magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '19' ;")); -$outok=0; -if ($user['intel'] >= 4) { - $int=$magic['chanse'] + ($user['intel'] - 4)*3; - if ($int>98){$int=99;} - } -else {$int=0;} - - - -if ($user['battle'] > 0) { - echo "Не в бою..."; -} elseif ($us['battle'] > 0) { - echo "Персонаж в бою..."; -} elseif (!$owntravma['id']) { - echo "У персонажа нет легких травм..."; -} elseif ($user['room'] != $us['room']) { - echo "Персонаж в другой комнате!"; -} elseif (!$us['online']) { - echo "Персонаж не в игре!"; -} elseif (rand(1,100) < $int) { - - if ($user['sex'] == 1) {$action="исцелил";} - else {$action="исцелила";} - if ($user['align'] > '2' && $user['align'] < '3') { - $angel="Ангел"; - } - elseif ($user['align'] > '1' && $user['align'] < '2') { - $angel="Персонаж"; - } - $bet=1; - echo "Персонаж "{$_POST['target']}" исцелен!"; - addch(" ".$angel." "{$user['login']}" ".$action." от легких травм "{$_POST['target']}""); - $outok=1; - deltravma($owntravma['id']); - addActions(time(), 'heal_'.$owntravma['id'], 0, $user['id']); -} else { - echo "Свиток рассыпался в ваших руках..."; - $bet=1; - } diff --git a/magic/ct2.php b/magic/ct2.php deleted file mode 100644 index 8da2fc0..0000000 --- a/magic/ct2.php +++ /dev/null @@ -1,49 +0,0 @@ -= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); -$owntravmadb = mysql_query("SELECT * FROM `effects` WHERE `owner` = ".$us['id']." AND (`type`=12 OR `type`=11) ;"); -$ownt = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = ".$us['id']." AND (`type`=12 OR `type`=11) LIMIT 1;")); -$magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '20' ;")); -$outok=0; -if ($user['intel'] >= 6) { - $int=$magic['chanse'] + ($user['intel'] - 6)*3; - if ($int>98){$int=99;} - } -else {$int=0;} - - -if ($user['battle'] > 0) { - echo "Не в бою..."; -} elseif ($us['battle'] > 0) { - echo "Персонаж в бою..."; -} elseif (!$ownt['type']) { - echo "У персонажа нет средних или легких травм..."; -} elseif ($user['room'] != $us['room']) { - echo "Персонаж в другой комнате!"; -} elseif (!$us['online']) { - echo "Персонаж не в игре!"; -} elseif (rand(1,100) < $int) { - - if ($user['sex'] == 1) {$action="исцелил";} - else {$action="исцелила";} - if ($user['align'] > '2' && $user['align'] < '3') { - $angel="Ангел"; - } - elseif ($user['align'] > '1' && $user['align'] < '2') { - $angel="Персонаж"; - } - $travm="легких"; - $bet=1; - while ($owntravma = mysql_fetch_array($owntravmadb)) { - if ($owntravma['type'] == 12) {$travm="средних";} - deltravma($owntravma['id']); - addActions(time(), 'heal_'.$owntravma['id'], 0, $user['id']); - } - echo "Персонаж "{$_POST['target']}" исцелен!"; - addch(" ".$angel." "{$user['login']}" ".$action." от ".$travm." травм "{$_POST['target']}""); - $outok=1; - -} else { - echo "Свиток рассыпался в ваших руках..."; - $bet=1; - } diff --git a/magic/ct3.php b/magic/ct3.php deleted file mode 100644 index 47c925b..0000000 --- a/magic/ct3.php +++ /dev/null @@ -1,52 +0,0 @@ -= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); -$owntravmadb = mysql_query("SELECT * FROM `effects` WHERE `owner` = ".$us['id']." AND (`type`=12 OR `type`=11 OR `type`=13) ;"); -$ownt = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = ".$us['id']." AND (`type`=12 OR `type`=11 OR `type`=13) LIMIT 1 ;")); -$magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '21' ;")); -$outok=0; -if ($user['intel'] >= 8) { - $int=$magic['chanse'] + ($user['intel'] - 8)*3; - if ($int>98){$int=99;} -} -else {$int=0;} - - -if ($user['battle'] > 0) { - echo "Не в бою..."; -} elseif ($us['battle'] > 0) { - echo "Персонаж в бою..."; -} elseif (!$ownt['type']) { - echo "У персонажа нет тяжелых, средних или легких травм..."; -} elseif ($user['room'] != $us['room']) { - echo "Персонаж в другой комнате!"; -} elseif (!$us['online']) { - echo "Персонаж не в игре!"; -} elseif (rand(1,100) < $int) { - - if ($user['sex'] == 1) {$action="исцелил";} - else {$action="исцелила";} - if ($user['align'] > '2' && $user['align'] < '3') { - $angel="Ангел"; - } - elseif ($user['align'] > '1' && $user['align'] < '2') { - $angel="Персонаж"; - } - - $travm="легких"; - $bet=1; - while ($owntravma = mysql_fetch_array($owntravmadb)) { - if ($owntravma['type'] == 13) {$travm="тяжелых";} - elseif ($owntravma['type'] == 12 && $travm != "тяжелых") {$travm="средних";} - deltravma($owntravma['id']); - addActions(time(), 'heal_'.$owntravma['id'], 0, $user['id']); - } - echo "Персонаж "{$_POST['target']}" исцелен!"; - addch(" ".$angel." "{$user['login']}" ".$action." от ".$travm." травм "{$_POST['target']}""); - $outok=1; - - -} else { - echo "Свиток рассыпался в ваших руках..."; - $bet=1; -} diff --git a/magic/ct3_100.php b/magic/ct3_100.php deleted file mode 100644 index 0bcdc64..0000000 --- a/magic/ct3_100.php +++ /dev/null @@ -1,49 +0,0 @@ -= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); -$owntravmadb = mysql_query("SELECT * FROM `effects` WHERE `owner` = ".$us['id']." AND (`type`=12 OR `type`=11 OR `type`=13 OR `type`=14) ;"); -$ownt = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = ".$us['id']." AND (`type`=12 OR `type`=11 OR `type`=13 OR `type`=14) LIMIT 1 ;")); -$magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '50' ;")); - -if ($user['intel'] >= 8) { - $int=$magic['chanse'] + ($user['intel'] - 8)*3; - if ($int>98){$int=99;} -} -else {$int=0;} - - -if ($user['battle'] > 0) { - echo "Не в бою..."; -} elseif ($us['battle'] > 0) { - echo "Персонаж в бою..."; -} elseif (!$ownt['type']) { - echo "У персонажа нет травм..."; -} elseif ($user['room'] != $us['room']) { - echo "Персонаж в другой комнате!"; -} elseif (!$us['online']) { - echo "Персонаж не в игре!"; -} else { - - if ($user['sex'] == 1) {$action="исцелил";} - else {$action="исцелила";} - if ($user['align'] > '2' && $user['align'] < '3') { - $angel="Ангел"; - } - elseif ($user['align'] > '1' && $user['align'] < '2') { - $angel="Персонаж"; - } - - $travm="легких"; - $bet=1; - while ($owntravma = mysql_fetch_array($owntravmadb)) { - if ($owntravma['type'] == 13) {$travm="тяжелых";} - elseif ($owntravma['type'] == 12 && $travm != "тяжелых") {$travm="средних";} - elseif ($owntravma['type'] == 14 && $travm != "тяжелых" && $travm != "средних") {$travm="неизлечимых";} - deltravma($owntravma['id']); - addActions(time(), 'heal_'.$owntravma['id'], 0, $user['id']); - } - echo "Персонаж "{$_POST['target']}" исцелен!"; - addch(" ".$angel." "{$user['login']}" ".$action." от ".$travm." травм "{$_POST['target']}""); - - -} diff --git a/magic/ct_all.php b/magic/ct_all.php deleted file mode 100644 index 65cc49c..0000000 --- a/magic/ct_all.php +++ /dev/null @@ -1,34 +0,0 @@ -= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); -$travma = mysql_query("SELECT * FROM `effects` WHERE `owner` = '".$us['id']."' AND (`type`='11' OR `type`='12' OR `type`='13' OR `type`='14');"); -if ($user['battle'] > 0) { - echo "Не в бою..."; -} elseif ($us['battle'] > 0) { - echo "Персонаж в бою..."; -} elseif (!$travma) { - echo "У персонажа нет травм..."; -} elseif ($user['room'] != $us['room']) { - echo "Персонаж в другой комнате!"; -} elseif (!$us['online']) { - echo "Персонаж не в игре!"; -} elseif ($user['align'] > 0 && $user['align'] < 9) { - - if ($user['sex'] == 1) {$action="исцелил";} - else {$action="исцелила";} - if ($user['align'] > '2' && $user['align'] < '3') { - $angel="Ангел"; - } - elseif ($user['align'] > '1' && $user['align'] < '2') { - $angel="Персонаж"; - } - - addch(" $angel "{$user['login']}" ".$action." от травм "{$_POST['target']}""); - while ($owntravma=mysql_fetch_array($travma)) { - deltravma($owntravma['id']); - addActions(time(), 'heal_'.$owntravma['id'], 0, $user['id']); - } - $outok=1; - -} else { - echo "Что-то тут не то..."; - } diff --git a/magic/ct_nele4.php b/magic/ct_nele4.php deleted file mode 100644 index 6c3caf4..0000000 --- a/magic/ct_nele4.php +++ /dev/null @@ -1,43 +0,0 @@ -= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;")); -$owntravma = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = ".$us['id']." AND `type`=14;")); -$magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '139' ;")); -$outok=0; -if ($user['intel'] >= 4) { - $int=$magic['chanse'] + ($user['intel'] - 4)*3; - if ($int>98){$int=99;} - } -else {$int=0;} - - - -if ($user['battle'] > 0) { - echo "Не в бою..."; -} elseif ($us['battle'] > 0) { - echo "Персонаж в бою..."; -} elseif (!$owntravma['id']) { - echo "У персонажа нет легких травм..."; -} elseif ($user['room'] != $us['room']) { - echo "Персонаж в другой комнате!"; -} elseif (!$us['online']) { - echo "Персонаж не в игре!"; -} elseif (rand(1,100) < $int) { - - if ($user['sex'] == 1) {$action="исцелил";} - else {$action="исцелила";} - if ($user['align'] > '2' && $user['align'] < '3') { - $angel="Ангел"; - } - elseif ($user['align'] > '1' && $user['align'] < '2') { - $angel="Персонаж"; - } - $bet=1; - echo "Персонаж "{$_POST['target']}" исцелен!"; - addch(" ".$angel." "{$user['login']}" ".$action." от неизлечимых травм "{$_POST['target']}""); - $outok=1; - deltravma($owntravma['id']); -} else { - echo "Свиток рассыпался в ваших руках..."; - $bet=1; - } diff --git a/magic/travmoff.php b/magic/travmoff.php deleted file mode 100644 index f31e74e..0000000 --- a/magic/travmoff.php +++ /dev/null @@ -1,21 +0,0 @@ -= ".(time()-60)." AND `id` = `users`.`id`) AS `online` FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['target'])."' LIMIT 1")); -$effect = mysql_fetch_array(mysql_query("SELECT `id` FROM `effects` WHERE `owner` = '{$us['id']}' AND `time` > '".time()."' AND (`type` = '11' OR `type` = '12' OR `type` = '13') ORDER BY `id` DESC LIMIT 1")); -$vip = mysql_fetch_array(mysql_query('SELECT `id`, `uid`, `travmoff` FROM `abils_vip` WHERE `uid` = "'.$user['id'].'" LIMIT 1')); - -if($_POST['target'] != $user['login']) { - echo 'Вы можете излечить только себя'; -} elseif($vip['travmoff'] <= 0) { - echo 'Магия была исчерпана ...'; -} elseif($user['battle'] > 0) { - echo "Не в бою..."; -} elseif(!isset($effect['id'])) { - echo "Нет тех травм, которые Вы можете излечить"; -} else { - if($user['invis'] == 1) { $user['login'] = 'невидимка'; } - addch("{$user['login']} излечил себя от травм."); - mysql_query('UPDATE `effects` SET `time` = "'.time().'" WHERE `id` = "'.$effect['id'].'" LIMIT 1'); - echo "Персонаж \"{$_POST['target']}\" Был излечен от травм"; - $vip['travmoff'] -= 1; - mysql_query('UPDATE `abils_vip` SET `travmoff` = "'.$vip['travmoff'].'" WHERE `id` = "'.$vip['id'].'" LIMIT 1'); -} diff --git a/magic/usability_klan/travmoff.php b/magic/usability_klan/travmoff.php deleted file mode 100644 index 9e7a87f..0000000 --- a/magic/usability_klan/travmoff.php +++ /dev/null @@ -1,20 +0,0 @@ -= ".(time()-60)." AND `id` = `users`.`id`) AS `online` FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['target'])."' LIMIT 1")); -$effect = mysql_fetch_array(mysql_query("SELECT `id` FROM `effects` WHERE `owner` = '{$us['id']}' AND `time` > '".time()."' AND `type` = '13' ORDER BY `id` DESC LIMIT 1")); -$vip = mysql_fetch_array(mysql_query('SELECT `id`, `klan`, `travmoff` FROM `abils_klan` WHERE `klan` = "'.$user['klan'].'" LIMIT 1')); - -if($vip['travmoff'] <= 0) { - echo 'Магия была исчерпана ...'; -} elseif($user['battle'] > 0) { - echo "Не в бою..."; -} elseif(!isset($effect['id'])) { - echo "Нет тех травм, которые Вы можете излечить"; -} else { - if($user['invis'] == 1) { $user['login'] = 'невидимка'; } - if($us['invis']== 1) { $us['login'] = 'невидимка'; } - addch("{$user['login']} излечил $us[login] от травм."); - mysql_query('UPDATE `effects` SET `time` = "'.time().'" WHERE `id` = "'.$effect['id'].'" LIMIT 1'); - echo "Персонаж \"{$_POST['target']}\" Был излечен от травм"; - $vip['travmoff'] -= 1; - mysql_query('UPDATE `abils_klan` SET `travmoff` = "'.$vip['travmoff'].'" WHERE `klan` = "'.$vip['klan'].'" LIMIT 1'); -} diff --git a/magic/usability_user/travmoff.php b/magic/usability_user/travmoff.php deleted file mode 100644 index bf9416e..0000000 --- a/magic/usability_user/travmoff.php +++ /dev/null @@ -1,20 +0,0 @@ -= ".(time()-60)." AND `id` = `users`.`id`) AS `online` FROM `users` WHERE `login` = '".mysql_real_escape_string($_POST['target'])."' LIMIT 1")); -$effect = mysql_fetch_array(mysql_query("SELECT `id` FROM `effects` WHERE `owner` = '{$us['id']}' AND `time` > '".time()."' AND `type` = '13' ORDER BY `id` DESC LIMIT 1")); -$vip = mysql_fetch_array(mysql_query('SELECT `id`, `uid`, `travmoff` FROM `abils_user` WHERE `uid` = "'.$user['id'].'" LIMIT 1')); - -if($vip['travmoff'] <= 0) { - echo 'Магия была исчерпана ...'; -} elseif($user['battle'] > 0) { - echo "Не в бою..."; -} elseif(!isset($effect['id'])) { - echo "Нет тех травм, которые Вы можете излечить"; -} else { - if($user['invis'] == 1) { $user['login'] = 'невидимка'; } - if($us['invis']== 1) { $us['login'] = 'невидимка'; } - addch("{$user['login']} излечил $us[login] от травм."); - mysql_query('UPDATE `effects` SET `time` = "'.time().'" WHERE `id` = "'.$effect['id'].'" LIMIT 1'); - echo "Персонаж \"{$_POST['target']}\" Был излечен от травм"; - $vip['travmoff'] -= 1; - mysql_query('UPDATE `abils_user` SET `travmoff` = "'.$vip['travmoff'].'" WHERE `id` = "'.$vip['id'].'" LIMIT 1'); -} diff --git a/user_abilities.php b/user_abilities.php index b5176f4..35d1955 100644 --- a/user_abilities.php +++ b/user_abilities.php @@ -78,35 +78,41 @@ if (in_array($_POST['use'], array_keys($moj))) { break; case "ct1": if ($abil[0] > 0 && $user->align == 6) { - include("./magic/ct1.php"); + //Заменён на CureInjury.php class. Придумать вызов. + //include("./magic/ct1.php"); if ($outok == 1) { $abil[0] -= 1; db::c()->query('UPDATE users SET abil = "?s" WHERE id = ?i', serialize($abil), $user->id); } } elseif ($user->align != 6) { - include("./magic/ct1.php"); + //Заменён на CureInjury.php class. Придумать вызов. + //include("./magic/ct1.php"); } break; case "ct2": if ($abil[1] > 0 && $user->align == 6) { - include("./magic/ct2.php"); + //Заменён на CureInjury.php class. Придумать вызов. + //include("./magic/ct2.php"); if ($outok == 1) { $abil[1] -= 1; db::c()->query('UPDATE users SET abil = "?s" WHERE id = ?i', serialize($abil), $user->id); } } elseif ($user->align != 6) { - include("./magic/ct2.php"); + //Заменён на CureInjury.php class. Придумать вызов. + //include("./magic/ct2.php"); } break; case "ct3": if ($abil[2] > 0 && $user->align == 6) { - include("./magic/ct3.php"); + //Заменён на CureInjury.php class. Придумать вызов. + //include("./magic/ct3.php"); if ($outok == 1) { $abil[2] -= 1; db::c()->query('UPDATE users SET abil = "?s" WHERE id = ?i', serialize($abil), $user->id); } } elseif ($user->align != 6) { - include("./magic/ct3.php"); + //Заменён на CureInjury.php class. Придумать вызов. + //include("./magic/ct3.php"); } break; @@ -153,7 +159,8 @@ if (in_array($_POST['use'], array_keys($moj))) { include("./magic/unmarry.php"); break; case "ct_all": - include("./magic/ct_all.php"); + //Заменён на CureInjury.php class. Придумать вызов. + //include("./magic/ct_all.php"); break; case "check": include("./magic/check.php"); @@ -671,7 +678,8 @@ if (isset($_GET['used'])) { } elseif ($_GET['used'] == 6) { //include('magic/usability_user/heal50.php'); } elseif ($_GET['used'] == 7) { - include('magic/usability_user/travmoff.php'); + //Заменён на CureInjury.php class. Придумать вызов. + //include('magic/usability_user/travmoff.php'); } elseif ($_GET['used'] == 8) { include('magic/usability_user/attack.php'); } elseif ($_GET['used'] == 9) { @@ -703,7 +711,8 @@ if (isset($_GET['useds'])) { } elseif ($_GET['useds'] == 6) { //include('magic/usability_klan/heal50.php'); } elseif ($_GET['useds'] == 7) { - include('magic/usability_klan/travmoff.php'); + //Заменён на CureInjury.php class. Придумать вызов. + //include('magic/usability_klan/travmoff.php'); } elseif ($_GET['useds'] == 8) { include('magic/usability_klan/attack.php'); } elseif ($_GET['useds'] == 9) {