Function nick5() merged with nick class.

This commit is contained in:
lopar
2018-11-05 22:15:13 +02:00
parent 7514cd121a
commit 073d56fc6b
124 changed files with 232 additions and 245 deletions

View File

@@ -871,7 +871,7 @@ class fbattle
function razmen_log($type, $kuda, $chem, $uron, $kto, $c1, $pokomy, $c2, $hp, $maxhp)
{
$this->write_stat(nick5($kto, $c1) . "|++|" . nick5($pokomy, $c2) . "|++|" . $type . "|++|" . $uron . "|++|" . $kuda . "|++|" . $chem);
$this->write_stat(nick::id($kto)->short() . "|++|" . nick::id($pokomy)->short() . "|++|" . $type . "|++|" . $uron . "|++|" . $kuda . "|++|" . $chem);
if ($this->enemyhar['sex'] && $kto == $this->enemyhar['id']) {
$sex1 = false;
@@ -1000,7 +1000,7 @@ class fbattle
$textuvorot = array(" <font color=green><B>уклонился</B></font> от удара ", " <font color=green><B>увернулся</B></font> от удара ", " <font color=green><B>отскочил</B></font> от удара ");
}
return '<span class=date>' . date("[H:i:s]") . '</span> ' . nick5($kto, $c1) . ' ' . $textfail[rand(0, count($textfail) - 1)] . ' ' . $hark2[rand(0, count($hark2) - 1)] . ' ' . nick5($pokomy, $c2) . ' ' . $textuvorot[rand(0, count($textuvorot) - 1)] . ' ' . $textchem[rand(0, count($textchem) - 1)] . ' ' . $kuda . '.<BR>';
return '<span class=date>' . date("[H:i:s]") . '</span> ' . nick::id($kto)->short() . ' ' . $textfail[rand(0, count($textfail) - 1)] . ' ' . $hark2[rand(0, count($hark2) - 1)] . ' ' . nick::id($pokomy)->short() . ' ' . $textuvorot[rand(0, count($textuvorot) - 1)] . ' ' . $textchem[rand(0, count($textchem) - 1)] . ' ' . $kuda . '.<BR>';
break;
//блок
case "block":
@@ -1009,7 +1009,7 @@ class fbattle
} else {
$textblock = array(" заблокировал удар ", " остановил удар ", " отбил удар ");
}
return '<span class=date>' . date("[H:i:s]") . '</span> ' . nick5($kto, $c1) . ' ' . $textfail[rand(0, count($textfail) - 1)] . ' ' . $hark2[rand(0, count($hark2) - 1)] . ' ' . nick5($pokomy, $c2) . ' ' . $textblock[rand(0, count($textblock) - 1)] . ' ' . $textchem[rand(0, count($textchem) - 1)] . ' ' . $kuda . '.<BR>';
return '<span class=date>' . date("[H:i:s]") . '</span> ' . nick::id($kto)->short() . ' ' . $textfail[rand(0, count($textfail) - 1)] . ' ' . $hark2[rand(0, count($hark2) - 1)] . ' ' . nick::id($pokomy)->short() . ' ' . $textblock[rand(0, count($textblock) - 1)] . ' ' . $textchem[rand(0, count($textchem) - 1)] . ' ' . $kuda . '.<BR>';
break;
//крит
case "krit":
@@ -1018,7 +1018,7 @@ class fbattle
} else {
$textkrit = array(", напугав всех, неслышно подойдя сзади ударил", ", сказав \"БУ!\", ласково ударил", ", расслабившись, ударил", ", показав сразу два пальца, ударил", ", напугав всех, укусил", ", проклиная этот сайт, ударил");
}
return '<span class=date>' . date("[H:i:s]") . '</span> ' . nick5($pokomy, $c2) . ' ' . $textud[rand(0, count($textud) - 1)] . ' ' . $hark[rand(0, count($hark) - 1)] . ' ' . nick5($kto, $c1) . ' ' . $textkrit[rand(0, count($textkrit) - 1)] . ' ' . $kuda . '.<b><font color=red>-' . $uron . '</font></b> [' . $hp . '/' . $maxhp . ']' . '<BR>';
return '<span class=date>' . date("[H:i:s]") . '</span> ' . nick::id($pokomy)->short() . ' ' . $textud[rand(0, count($textud) - 1)] . ' ' . $hark[rand(0, count($hark) - 1)] . ' ' . nick::id($kto)->short() . ' ' . $textkrit[rand(0, count($textkrit) - 1)] . ' ' . $kuda . '.<b><font color=red>-' . $uron . '</font></b> [' . $hp . '/' . $maxhp . ']' . '<BR>';
break;
//крит
case "krita":
@@ -1027,7 +1027,7 @@ class fbattle
} else {
$textkrit = array(", напугав всех, неслышно подойдя сзади, пробив блок, ударил", ", сказав \"БУ!\", ласково, пробив блок, ударил", ", расслабившись, пробив блок, ударил", ", показав сразу два пальца, пробив блок, ударил", ", напугав всех, пробив блок, укусил", ", проклиная этот сайт, пробив блок, ударил");
}
return '<span class=date>' . date("[H:i:s]") . '</span> ' . nick5($pokomy, $c2) . ' ' . $textud[rand(0, count($textud) - 1)] . ' ' . $hark[rand(0, count($hark) - 1)] . ' ' . nick5($kto, $c1) . ' ' . $textkrit[rand(0, count($textkrit) - 1)] . ' ' . $kuda . '.<b><font color=red>-' . $uron . '</font> </b>[' . $hp . '/' . $maxhp . ']' . '<BR>';
return '<span class=date>' . date("[H:i:s]") . '</span> ' . nick::id($pokomy)->short() . ' ' . $textud[rand(0, count($textud) - 1)] . ' ' . $hark[rand(0, count($hark) - 1)] . ' ' . nick::id($kto)->short() . ' ' . $textkrit[rand(0, count($textkrit) - 1)] . ' ' . $kuda . '.<b><font color=red>-' . $uron . '</font> </b>[' . $hp . '/' . $maxhp . ']' . '<BR>';
break;
// попадание
case "udar":
@@ -1036,7 +1036,7 @@ class fbattle
} else {
$textudar = array(", разбежавшись, рубанул", " отчаянно проткнул ", " нехотя уколол ", " не подумав, рубанул ", ", улыбаясь, саданул укол ", " приложил удар ", " ударил ", " сдуру вмазал ");
}
return '<span class=date>' . date("[H:i:s]") . '</span> ' . nick5($pokomy, $c2) . ' ' . $textud[rand(0, count($textud) - 1)] . ' ' . $hark[rand(0, count($hark) - 1)] . ' ' . nick5($kto, $c1) . '' . $textudar[rand(0, count($textudar) - 1)] . ' ' . $textchem[rand(0, count($textchem) - 1)] . ' ' . $kuda . ' <b>-' . $uron . '</b> [' . $hp . '/' . $maxhp . ']' . '<BR>';
return '<span class=date>' . date("[H:i:s]") . '</span> ' . nick::id($pokomy)->short() . ' ' . $textud[rand(0, count($textud) - 1)] . ' ' . $hark[rand(0, count($hark) - 1)] . ' ' . nick::id($kto)->short() . '' . $textudar[rand(0, count($textudar) - 1)] . ' ' . $textchem[rand(0, count($textchem) - 1)] . ' ' . $kuda . ' <b>-' . $uron . '</b> [' . $hp . '/' . $maxhp . ']' . '<BR>';
break;
}
}
@@ -1133,7 +1133,7 @@ class fbattle
// if(in_array($k,$war)) {
unset($this->battle[$k]);
$this->add_log('<span class=date>' . date("H:i") . '</span> ' . nick5($k, 'b') . ' проиграл бой!<BR>');
$this->add_log('<span class=date>' . date("H:i") . '</span> ' . nick::id($k)->short() . ' проиграл бой!<BR>');
mysql_query('UPDATE `users` SET `hp` = 0, `fullhptime` = ' . time() . ' WHERE `id` = \'' . $k . '\' LIMIT 1;');
foreach ($this->battle as $kak => $vav) {
@@ -1338,7 +1338,7 @@ class fbattle
$flag = 1;
foreach ($this->t1 as $k => $v) {
mysql_query('UPDATE `battle` SET `win` = 1 WHERE `id` = ' . $this->user['battle'] . ' LIMIT 1');
$this->t1[$k] = nick5($v, " ");
$this->t1[$k] = nick::id($v)->short();
$this->exp[$v] = $this->exp[$v] * $opitas / 1;
$this->exp[$v] = round($this->exp[$v]);
@@ -1697,7 +1697,7 @@ class fbattle
$flag = 2;
foreach ($this->t2 as $k => $v) {
mysql_query('UPDATE `battle` SET `win` = 2 WHERE `id` = "' . $this->user['battle'] . '" LIMIT 1');
$this->t2[$k] = nick5($v, "");
$this->t2[$k] = nick::id($v)->short();
if ($this->battle_data['aren_of'] == 1 && $this->t2[$k] && $v < _BOTSEPARATOR_) {
mysql_query('INSERT INTO `logs_arena` (`battle`, `user`, `uid`, `damage`, `team`) VALUES ("' . $this->user['battle'] . '", "' . $this->t1[$k] . '", "' . $v . '", "' . $this->damage[$v] . '", "2")');