Удаление старого кода отвечающего за лечение травм.

This commit is contained in:
lopar 2020-09-16 18:50:38 +03:00
parent df35ebe524
commit 8d4062eb84
12 changed files with 26 additions and 345 deletions

View File

@ -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");

View File

View File

@ -1,44 +0,0 @@
<?php
$us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `date` >= ".(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 "Персонаж &quot;{$_POST['target']}&quot; исцелен!";
addch("<img src=i/magic/cure1.gif> ".$angel." &quot;{$user['login']}&quot; ".$action." от легких травм &quot;{$_POST['target']}&quot;");
$outok=1;
deltravma($owntravma['id']);
addActions(time(), 'heal_'.$owntravma['id'], 0, $user['id']);
} else {
echo "Свиток рассыпался в ваших руках...";
$bet=1;
}

View File

@ -1,49 +0,0 @@
<?php
$us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `date` >= ".(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 "Персонаж &quot;{$_POST['target']}&quot; исцелен!";
addch("<img src=i/magic/cure2.gif> ".$angel." &quot;{$user['login']}&quot; ".$action." от ".$travm." травм &quot;{$_POST['target']}&quot;");
$outok=1;
} else {
echo "Свиток рассыпался в ваших руках...";
$bet=1;
}

View File

@ -1,52 +0,0 @@
<?php
$us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `date` >= ".(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 "Персонаж &quot;{$_POST['target']}&quot; исцелен!";
addch("<img src=i/magic/cure3.gif> ".$angel." &quot;{$user['login']}&quot; ".$action." от ".$travm." травм &quot;{$_POST['target']}&quot;");
$outok=1;
} else {
echo "Свиток рассыпался в ваших руках...";
$bet=1;
}

View File

@ -1,49 +0,0 @@
<?php
$us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `date` >= ".(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 "Персонаж &quot;{$_POST['target']}&quot; исцелен!";
addch("<img src=i/magic/cure3.gif> ".$angel." &quot;{$user['login']}&quot; ".$action." от ".$travm." травм &quot;{$_POST['target']}&quot;");
}

View File

@ -1,34 +0,0 @@
<?php
$us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `date` >= ".(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("<img src=i/magic/cure3.gif> $angel &quot;{$user['login']}&quot; ".$action." от травм &quot;{$_POST['target']}&quot;");
while ($owntravma=mysql_fetch_array($travma)) {
deltravma($owntravma['id']);
addActions(time(), 'heal_'.$owntravma['id'], 0, $user['id']);
}
$outok=1;
} else {
echo "Что-то тут не то...";
}

View File

@ -1,43 +0,0 @@
<?php
$us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `date` >= ".(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 "Персонаж &quot;{$_POST['target']}&quot; исцелен!";
addch("<img src=i/magic/cure1.gif> ".$angel." &quot;{$user['login']}&quot; ".$action." от неизлечимых травм &quot;{$_POST['target']}&quot;");
$outok=1;
deltravma($owntravma['id']);
} else {
echo "Свиток рассыпался в ваших руках...";
$bet=1;
}

View File

@ -1,21 +0,0 @@
<?php
$us = mysql_fetch_array(mysql_query("SELECT *, (SELECT `id` FROM `online` WHERE `date` >= ".(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("<img src=i/sh/cure3.gif><b>{$user['login']}</b> излечил себя от травм.");
mysql_query('UPDATE `effects` SET `time` = "'.time().'" WHERE `id` = "'.$effect['id'].'" LIMIT 1');
echo "<font color=red><b>Персонаж \"{$_POST['target']}\" Был излечен от травм</b></font>";
$vip['travmoff'] -= 1;
mysql_query('UPDATE `abils_vip` SET `travmoff` = "'.$vip['travmoff'].'" WHERE `id` = "'.$vip['id'].'" LIMIT 1');
}

View File

@ -1,20 +0,0 @@
<?php
$us = mysql_fetch_array(mysql_query("SELECT *, (SELECT `id` FROM `online` WHERE `date` >= ".(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("<img src=i/sh/cure3.gif><b>{$user['login']}</b> излечил $us[login] от травм.");
mysql_query('UPDATE `effects` SET `time` = "'.time().'" WHERE `id` = "'.$effect['id'].'" LIMIT 1');
echo "<font color=red><b>Персонаж \"{$_POST['target']}\" Был излечен от травм</b></font>";
$vip['travmoff'] -= 1;
mysql_query('UPDATE `abils_klan` SET `travmoff` = "'.$vip['travmoff'].'" WHERE `klan` = "'.$vip['klan'].'" LIMIT 1');
}

View File

@ -1,20 +0,0 @@
<?php
$us = mysql_fetch_array(mysql_query("SELECT *, (SELECT `id` FROM `online` WHERE `date` >= ".(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("<img src=i/sh/cure3.gif><b>{$user['login']}</b> излечил $us[login] от травм.");
mysql_query('UPDATE `effects` SET `time` = "'.time().'" WHERE `id` = "'.$effect['id'].'" LIMIT 1');
echo "<font color=red><b>Персонаж \"{$_POST['target']}\" Был излечен от травм</b></font>";
$vip['travmoff'] -= 1;
mysql_query('UPDATE `abils_user` SET `travmoff` = "'.$vip['travmoff'].'" WHERE `id` = "'.$vip['id'].'" LIMIT 1');
}

View File

@ -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) {