Реализация ChatMessageDTO.
This commit is contained in:
parent
d9ec810f7f
commit
99b90a198b
@ -1704,10 +1704,16 @@ class Battle
|
||||
'INSERT INTO `eff_users` (`no_Ace`,`id_eff`,`overType`,`uid`,`name`,`data`,`timeUse`) VALUES ("1","31","23","' . $u->info['id'] . '","Касание Хаоса","nofastfinisheff=1","' . time(
|
||||
) . '")'
|
||||
);
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $u->info['city'] . "','" . $u->info['room'] . "','','" . $u->info['login'] . "','Вы создали предмет "Образец"x" . (($this->info['izlomObr'] - $this->info['izlomObrNow']) * 7) . "','" . time(
|
||||
) . "','6','0')"
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setTo($u->info['login']);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setText(
|
||||
'Вы создали предмет "Образец" x' . (($this->info['izlomObr'] - $this->info['izlomObrNow']) * 7)
|
||||
);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
|
||||
$i01 = 1;
|
||||
while ($i01 <= (($this->info['izlomObr'] - $this->info['izlomObrNow'])) * 7) {
|
||||
$u->addItem(1226, $u->info['id'], '|sudba=' . $u->info['login']);
|
||||
@ -1738,6 +1744,7 @@ class Battle
|
||||
public function finishBattle($t, $v, $nl, $tl)
|
||||
{
|
||||
global $magic, $u, $q, $c;
|
||||
$chat = new Chat();
|
||||
mysql_query('LOCK TABLES users,stats,battle,battle_last,battle_end,chat WRITE');
|
||||
$frtu = false;
|
||||
$test = mysql_fetch_array(
|
||||
@ -2116,6 +2123,10 @@ class Battle
|
||||
|
||||
$i = 0;
|
||||
while ($i < count($this->users)) {
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setCity($this->users[$i]['city']);
|
||||
$cmsg->setIsAlert(true);
|
||||
if ($this->users[$i]['no_ip'] == 'trupojor') {
|
||||
$mon = mysql_fetch_array(
|
||||
mysql_query(
|
||||
@ -2128,15 +2139,14 @@ class Battle
|
||||
mysql_query(
|
||||
'UPDATE `stats` SET `hpNow` = "' . $this->stats[$i]['hpAll'] . '",`mpNow` = "' . $this->stats[$i]['mpAll'] . '" WHERE `id` = "' . $this->users[$i]['id'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query(
|
||||
'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("<font color=red>Внимание!</font> ' . mysql_real_escape_string(
|
||||
str_replace(
|
||||
'{b}',
|
||||
'<strong>' . $this->users[$i]['login'] . '</strong> [' . $this->users[$i]['level'] . ']<a target=_blank href=info/' . $this->users[$i]['id'] . ' ><img width=12 height=11 src=https://img.new-combats.com/i/inf_capitalcity.gif ></a>',
|
||||
$mon['nich_text']
|
||||
)
|
||||
) . ' ","' . $this->users[$i]['city'] . '","","6","1","' . time() . '")'
|
||||
$cmsg->setText(
|
||||
str_replace(
|
||||
'{b}',
|
||||
'<strong>' . $this->users[$i]['login'] . '</strong> [' . $this->users[$i]['level'] . ']<a target=_blank href=info/' . $this->users[$i]['id'] . ' ><img width=12 height=11 src=https://img.new-combats.com/i/inf_capitalcity.gif ></a>',
|
||||
$mon['nich_text']
|
||||
)
|
||||
);
|
||||
$chat->sendMsg($cmsg);
|
||||
} elseif ($this->info['team_win'] != $this->users[$i]['team']) {
|
||||
//Выиграли
|
||||
$j = 0;
|
||||
@ -2171,18 +2181,14 @@ class Battle
|
||||
mysql_query(
|
||||
'UPDATE `stats` SET `res_x` = "' . $truptimelast . '" WHERE `id` = "' . $this->users[$i]['id'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query(
|
||||
'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("<font color=red>Внимание!</font> ' . mysql_real_escape_string(
|
||||
str_replace(
|
||||
'{b}',
|
||||
'<strong>' . $this->users[$i]['login'] . '</strong> [' . $this->users[$i]['level'] . ']<a target=_blank href=info/' . $this->users[$i]['id'] . ' ><img width=12 height=11 src=https://img.new-combats.com/i/inf_capitalcity.gif ></a>',
|
||||
str_replace(
|
||||
'{u}', $usrwin,
|
||||
$mon['win_text']
|
||||
)
|
||||
)
|
||||
) . ' ","' . $this->users[$i]['city'] . '","","6","1","' . time() . '")'
|
||||
$cmsg->setText(
|
||||
str_replace(
|
||||
'{b}',
|
||||
'<strong>' . $this->users[$i]['login'] . '</strong> [' . $this->users[$i]['level'] . ']<a target=_blank href=info/' . $this->users[$i]['id'] . ' ><img width=12 height=11 src=https://img.new-combats.com/i/inf_capitalcity.gif ></a>',
|
||||
str_replace('{u}', $usrwin, $mon['win_text'])
|
||||
)
|
||||
);
|
||||
$chat->sendMsg($cmsg);
|
||||
unset($usrwin);
|
||||
} else {
|
||||
//Проиграли
|
||||
@ -2194,15 +2200,14 @@ class Battle
|
||||
mysql_query(
|
||||
'UPDATE `stats` SET `hpNow` = "' . $this->stats[$i]['hpAll'] . '",`mpNow` = "' . $this->stats[$i]['mpAll'] . '" WHERE `id` = "' . $this->users[$i]['id'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query(
|
||||
'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("<font color=red>Внимание!</font> ' . mysql_real_escape_string(
|
||||
str_replace(
|
||||
'{b}',
|
||||
'<strong>' . $this->users[$i]['login'] . '</strong> [' . $this->users[$i]['level'] . ']<a target=_blank href=info/' . $this->users[$i]['id'] . ' ><img width=12 height=11 src=https://img.new-combats.com/i/inf_capitalcity.gif ></a>',
|
||||
$mon['lose_text']
|
||||
)
|
||||
) . ' ","' . $this->users[$i]['city'] . '","","6","1","' . time() . '")'
|
||||
$cmsg->setText(
|
||||
str_replace(
|
||||
'{b}',
|
||||
'<strong>' . $this->users[$i]['login'] . '</strong> [' . $this->users[$i]['level'] . ']<a target=_blank href=info/' . $this->users[$i]['id'] . ' ><img width=12 height=11 src=https://img.new-combats.com/i/inf_capitalcity.gif ></a>',
|
||||
$mon['lose_text']
|
||||
)
|
||||
);
|
||||
$chat->sendMsg($cmsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2240,19 +2245,21 @@ class Battle
|
||||
'UPDATE `users_achiv` SET `pg`= `pg`+1 WHERE `id` = "' . $pld['id'] . '" LIMIT 1'
|
||||
);
|
||||
|
||||
if ($this->users[$i]['team'] == $this->info['team_win']) {
|
||||
if (rand(1, 100) <= 5) {
|
||||
$u->addItem(10020, $pld['id'], '');
|
||||
$pld['battle_text'] .= ' и <strong>Жетон Успеха</strong>. ';
|
||||
}
|
||||
if ($this->users[$i]['team'] == $this->info['team_win'] && rand(1, 100) <= 5) {
|
||||
$u->addItem(10020, $pld['id'], '');
|
||||
$pld['battle_text'] .= ' и <strong>Жетон Успеха</strong>. ';
|
||||
}
|
||||
} else {
|
||||
$pld['battle_text'] .= ' Вы ничего не получили. <strong>Нужно набить больше 500 урона урона</strong> .';
|
||||
}
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($pld['city']);
|
||||
$cmsg->setRoom($pld['room']);
|
||||
$cmsg->setTo($pld['login']);
|
||||
$cmsg->setText($pld['battle_text']);
|
||||
$cmsg->setType(6);
|
||||
$chat->sendMsg($cmsg);
|
||||
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $pld['city'] . "','" . $pld['room'] . "','','" . $pld['login'] . "','" . $pld['battle_text'] . "','-1','6','0')"
|
||||
);
|
||||
mysql_query(
|
||||
'DELETE FROM `stats` WHERE `id` = "' . $this->users[$i]['id'] . '" LIMIT 1'
|
||||
);
|
||||
@ -2291,7 +2298,6 @@ class Battle
|
||||
'UPDATE `stats` SET `zv` = "0",`team` = "0",`exp` = `exp` + `battle_exp`,`battle_exp` = "0",`battle_yron` = "0",`enemy` = "0", `timeGo` = "' . time(
|
||||
) . '" WHERE `id` = "' . $this->users[$i]['id'] . '" LIMIT 1'
|
||||
);
|
||||
//mysql_query('UPDATE `stats` SET `zv` = "0",`team` = "0",`exp` = `exp` + `battle_exp`,`battle_exp` = "0",`timeGo` = "'.time().'" WHERE `id` = "'.$this->users[$i]['id'].'" LIMIT 1');
|
||||
mysql_query('DELETE FROM `eff_users` WHERE `uid` = "' . $this->users[$i]['id'] . '" LIMIT 100');
|
||||
} elseif ($this->users[$i]['bot'] > 0) {
|
||||
$this->users[$i]['battle'] = 0;
|
||||
@ -2376,6 +2382,13 @@ class Battle
|
||||
'SELECT * FROM `dungeon_bots` WHERE `dn` = "' . $this->info['dn_id'] . '" AND `for_dn` = "0" AND `x` = "' . $this->info['x'] . '" AND `delete` = "0" AND `y`= "' . $this->info['y'] . '" LIMIT 100'
|
||||
);
|
||||
while ($tbot = mysql_fetch_array($j1)) {
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setDn($this->info['dn_id']);
|
||||
$cmsg->setCity($this->users[0]['city']);
|
||||
$cmsg->setRoom($this->users[0]['room']);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
|
||||
$j2 = 0;
|
||||
while ($j2 < $tbot['colvo']) {
|
||||
if (isset($tbot['id2'])) {
|
||||
@ -2397,8 +2410,7 @@ class Battle
|
||||
)
|
||||
);
|
||||
}
|
||||
if (isset($questDrop['id'])) { // Если квест есть, предмет имеет шанс выпасть
|
||||
} elseif (isset($itmz[2]) && $itmz[2] != '') {
|
||||
if (!isset($questDrop['id']) && isset($itmz[2]) && $itmz[2] != '') {
|
||||
$itmz[1] = 0;
|
||||
} // Если предмет квестовый, а квеста у игрока нет, то предмет выпадет с вероятностью 0
|
||||
unset($questDrop);
|
||||
@ -2414,11 +2426,10 @@ class Battle
|
||||
);
|
||||
$itmnm = $itmnm['name'];
|
||||
|
||||
$rtxt = 'У <strong>' . $tbot2['login'] . '</strong> был предмет "' . $itmnm . '" и кто угодно может поднять его';
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`dn`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`,`new`) VALUES ('" . $this->info['dn_id'] . "','" . $this->users[0]['city'] . "','" . $this->users[0]['room'] . "','','','" . $rtxt . "','" . time(
|
||||
) . "','6','0','1','1')"
|
||||
$cmsg->setText(
|
||||
'У <strong>' . $tbot2['login'] . '</strong> был предмет "' . $itmnm . '" и кто угодно может поднять его'
|
||||
);
|
||||
$chat->sendMsg($cmsg);
|
||||
|
||||
$ins = mysql_query(
|
||||
'INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`) VALUES (
|
||||
@ -2441,64 +2452,60 @@ class Battle
|
||||
}
|
||||
//
|
||||
//Квест 1-15 сентября,
|
||||
if (date('m') == 9 && date('d') < 15) {
|
||||
if ($this->get_chanse(99) == true) {
|
||||
//Не выпало
|
||||
} elseif ($this->info['dungeon'] == 12 || $this->info['dungeon'] == 101) {
|
||||
$tou = 0; //какому юзеру предназначено
|
||||
/* выделяем случайного юзера из команды */
|
||||
$itmz = [
|
||||
rand(4745, 4751),
|
||||
100,
|
||||
];
|
||||
//
|
||||
$itmnm = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `name` FROM `items_main` WHERE `id` = "' . $itmz[0] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
$itmnm = $itmnm['name'];
|
||||
|
||||
$rtxt = 'У <strong>' . $tbot2['login'] . '</strong> был предмет "' . $itmnm . '" и кто угодно может поднять его';
|
||||
if (
|
||||
date('m') == 9 &&
|
||||
date('d') < 15 &&
|
||||
!$this->get_chanse(99) &&
|
||||
($this->info['dungeon'] == 12 || $this->info['dungeon'] == 101)
|
||||
) {
|
||||
$tou = 0; //какому юзеру предназначено
|
||||
/* выделяем случайного юзера из команды */
|
||||
$itmz = [
|
||||
rand(4745, 4751),
|
||||
100,
|
||||
];
|
||||
//
|
||||
$itmnm = mysql_fetch_array(
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`dn`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`,`new`) VALUES ('" . $this->info['dn_id'] . "','" . $this->users[0]['city'] . "','" . $this->users[0]['room'] . "','','','" . $rtxt . "','" . time(
|
||||
) . "','6','0','1','1')"
|
||||
);
|
||||
'SELECT `name` FROM `items_main` WHERE `id` = "' . $itmz[0] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
$itmnm = $itmnm['name'];
|
||||
|
||||
$ins = mysql_query(
|
||||
'INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`) VALUES (
|
||||
$cmsg->setText(
|
||||
'У <strong>' . $tbot2['login'] . '</strong> был предмет "' . $itmnm . '" и кто угодно может поднять его'
|
||||
);
|
||||
$chat->sendMsg($cmsg);
|
||||
|
||||
$ins = mysql_query(
|
||||
'INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`) VALUES (
|
||||
"' . $this->info['dn_id'] . '",
|
||||
"' . $tou . '",
|
||||
"' . $itmz[0] . '",
|
||||
"' . time() . '",
|
||||
"' . $this->info['x'] . '",
|
||||
"' . $this->info['y'] . '")'
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
//
|
||||
//Странички саныча,
|
||||
|
||||
if (rand(1, 100) <= 99) {
|
||||
//Не выпало
|
||||
} elseif ($this->info['dungeon'] == 12 || $this->info['dungeon'] == 3 ||
|
||||
$this->info['dungeon'] == 101 || $this->info['dungeon'] == 16 ||
|
||||
$this->info['dungeon'] == 9 || $this->info['dungeon'] == 10 ||
|
||||
$this->info['dungeon'] == 13 || $this->info['dungeon'] == 106) {
|
||||
$tou = 0; //какому юзеру предназначено
|
||||
// выделяем случайного юзера из команды
|
||||
$itmz = rand(3143, 3192);
|
||||
$itmz = mt_rand(3143, 3192);
|
||||
//
|
||||
$itmnm = mysql_fetch_array(
|
||||
mysql_query('SELECT `name` FROM `items_main` WHERE `id` = "' . $itmz . '" LIMIT 1')
|
||||
);
|
||||
$itmnm = $itmnm['name'];
|
||||
|
||||
$rtxt = 'У <strong>' . $tbot2['login'] . '</strong> был предмет "' . $itmnm . '" и кто угодно может поднять его';
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`dn`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`,`new`) VALUES ('" . $this->info['dn_id'] . "','" . $this->users[0]['city'] . "','" . $this->users[0]['room'] . "','','','" . $rtxt . "','" . time(
|
||||
) . "','6','0','1','1')"
|
||||
);
|
||||
$cmsg->setText('У <strong>' . $tbot2['login'] . '</strong> был предмет "' . $itmnm . '" и кто угодно может поднять его');
|
||||
$chat->sendMsg($cmsg);
|
||||
|
||||
$ins = mysql_query(
|
||||
'INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`) VALUES (
|
||||
@ -2538,21 +2545,18 @@ class Battle
|
||||
$i = $this->uids[$u->info['id']];
|
||||
|
||||
if ($this->info['team_win'] >= 0) {
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($this->users[$i]['city']);
|
||||
$cmsg->setRoom($this->users[$i]['room']);
|
||||
$cmsg->setType(6);
|
||||
|
||||
if ($this->stats[$i]['pbe'] > 0) {
|
||||
//Бонус покупателя
|
||||
$this->expCoef += $this->stats[$i]['pbe'];
|
||||
}
|
||||
|
||||
if ($this->info['razdel'] == 5) {
|
||||
if ($c['m'] >= 6 && $c['m'] <= 8) {
|
||||
//Летний период
|
||||
$this->expCoef += 5;
|
||||
} elseif ($c['w'] == 0 || $c['w'] == 6) {
|
||||
//Выходные дни
|
||||
$this->expCoef += 5;
|
||||
}
|
||||
if ($this->info['razdel'] == 5 && ($c['m'] >= 6 && $c['m'] <= 8 || $c['w'] == 0 || $c['w'] == 6)) {
|
||||
$this->expCoef += 5;
|
||||
}
|
||||
|
||||
$this->stats[$i]['exp'] += $this->expCoef;
|
||||
@ -2724,10 +2728,8 @@ class Battle
|
||||
//Поломка предметов
|
||||
if ($act01 == 1) {
|
||||
//победа
|
||||
if ($this->users[$i]['dnow'] == 0) {
|
||||
if ($this->users[$i]['hpNow'] < 1) {
|
||||
$lom = 0.05;
|
||||
}
|
||||
if ($this->users[$i]['dnow'] == 0 && $this->users[$i]['hpNow'] < 1) {
|
||||
$lom = 0.05;
|
||||
}
|
||||
} elseif ($act01 == 2) {
|
||||
//поражение
|
||||
@ -2769,12 +2771,9 @@ class Battle
|
||||
}
|
||||
unset($ulan);
|
||||
//
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`
|
||||
) VALUES (
|
||||
'1','" . $this->users[$i]['city'] . "','" . $this->users[$i]['room'] . "','','" . $this->users[$i]['login'] . "'
|
||||
,'Ваш питомец "" . $a004['name'] . "" получил опыт: <strong>" . $aexp . "</strong>','-1','6','0')"
|
||||
);
|
||||
$cmsg->setTo($this->users[$i]['login']);
|
||||
$cmsg->setText("Ваш питомец «{$a004['name']}» получил опыт: <strong>$aexp</strong>");
|
||||
$chat->sendMsg($cmsg);
|
||||
//
|
||||
$upd = mysql_query(
|
||||
'UPDATE `users_animal` SET `exp` = `exp` + ' . $aexp . ' WHERE `id` = "' . $this->users[$i]['animal'] . '" AND `level` < ' . $this->users[$i]['level'] . ' LIMIT 1'
|
||||
@ -3675,17 +3674,18 @@ class Battle
|
||||
'UPDATE `items_users` SET `delete` = "' . time(
|
||||
) . '" WHERE `uid` = "' . $u->info['id'] . '" AND `item_id` = "1189" OR `item_id` = "4447" OR `item_id` = "1174") LIMIT 1000'
|
||||
);
|
||||
|
||||
if ($this->users[$i]['sex'] == 0) {
|
||||
$rtxt = '<strong>' . $this->users[$i]['login'] . '</strong> трагически погиб без права на воскрешение и покидает подземелье' . $nld;
|
||||
} else {
|
||||
$rtxt = '<strong>' . $this->users[$i]['login'] . '</strong> трагически погибла без права на воскрешение и покидает подземелье' . $nld;
|
||||
}
|
||||
}
|
||||
if ($rtxt != '') {
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`dn`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`,`new`) VALUES ('" . $this->info['dn_id'] . "','" . $this->users[$i]['city'] . "','" . $this->users[$i]['room'] . "','','','" . $rtxt . "','" . time(
|
||||
) . "','6','0','1','1')"
|
||||
);
|
||||
if (!empty($rtxt)) {
|
||||
$cmsg->setDn($this->info['dn_id']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setTypeTime(1);
|
||||
$chat->sendMsg($cmsg);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3704,9 +3704,9 @@ class Battle
|
||||
);
|
||||
if ($this->info['turnir'] == 0) {
|
||||
//пишем в чат
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $this->users[$i]['city'] . "','" . $this->users[$i]['room'] . "','','" . $this->users[$i]['login'] . "','" . $this->users[$i]['battle_text'] . "','-1','6','0')"
|
||||
);
|
||||
$cmsg->setTo($this->users[$i]['login']);
|
||||
$cmsg->setText($this->users[$i]['battle_text']);
|
||||
$chat->sendMsg($cmsg);
|
||||
} else {
|
||||
mysql_query(
|
||||
'UPDATE `turnirs` SET `winner` = "' . $this->info['team_win'] . '" WHERE `id` = "' . $this->info['turnir'] . '" LIMIT 1'
|
||||
@ -3759,6 +3759,13 @@ class Battle
|
||||
public function addGlobalItems($bid, $uid, $itm, $eff, $ico, $exp, $cr, $ecr)
|
||||
{
|
||||
global $u;
|
||||
$chat = new Chat();
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setCity($this->users[$this->uids[$uid]]['city']);
|
||||
$cmsg->setRoom($this->users[$this->uids[$uid]]['room']);
|
||||
$cmsg->setTo($this->users[$this->uids[$uid]]['login']);
|
||||
$cmsg->setColor('#cb0000');
|
||||
//
|
||||
//Выпадение дропа на ЦП
|
||||
if ($bid == 1008) {
|
||||
@ -4055,11 +4062,9 @@ class Battle
|
||||
$cr
|
||||
) . ') WHERE `id` = "' . mysql_real_escape_string($uid) . '" LIMIT 1'
|
||||
);
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $this->users[$this->uids[$uid]]['city'] . "','" . $this->users[$this->uids[$uid]]['room'] . "','','" . $this->users[$this->uids[$uid]]['login'] . "','<font color=#cb0000><strong>Вы получили кредиты:</strong> " . mysql_real_escape_string(
|
||||
$cr
|
||||
) . " <strong>кр.</strong></font>','-1','6','0')"
|
||||
);
|
||||
|
||||
$cmsg->setText("<strong>Вы получили кредиты: $cr кр.</strong>");
|
||||
$chat->sendMsg($cmsg);
|
||||
}
|
||||
//
|
||||
if ($ecr != '' && $ecr > 0 && $this->stats[$this->uids[$uid]]['hpNow'] > 0) {
|
||||
@ -4070,20 +4075,16 @@ class Battle
|
||||
) . ') WHERE `id` = "' . $this->users[$this->uids[$uid]]['id'] . '" LIMIT 1'
|
||||
);
|
||||
if (!$resulttp) {
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $this->users[$this->uids[$uid]]['city'] . "','" . $this->users[$this->uids[$uid]]['room'] . "','','" . $this->users[$this->uids[$uid]]['login'] . "','<font color=#cb0000><strong>Трупожор был пуст!!!</strong></font>','-1','6','0')"
|
||||
);
|
||||
$cmsg->setText("<strong>Трупожор был пуст!</strong>");
|
||||
$chat->sendMsg($cmsg);
|
||||
$u->addDelo(
|
||||
4, $this->users[$this->uids[$uid]]['id'],
|
||||
'"<font color="olive">System.battle</font>": (В бою трупожор), ПУСТ!!! ', time(),
|
||||
$this->users[$this->uids[$uid]]['city'], 'System.battle', 0, 0
|
||||
);
|
||||
} else {
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $this->users[$this->uids[$uid]]['city'] . "','" . $this->users[$this->uids[$uid]]['room'] . "','','" . $this->users[$this->uids[$uid]]['login'] . "','<font color=#cb0000><strong>Вы получили Евро-кредиты:</strong> " . mysql_real_escape_string(
|
||||
$ecr
|
||||
) . " <strong>екр.</strong></font>','-1','6','0')"
|
||||
);
|
||||
$cmsg->setText("<strong>Вы получили еврокредиты: $ecr екр.</strong>");
|
||||
$chat->sendMsg($cmsg);
|
||||
$u->addDelo(
|
||||
4, $this->users[$this->uids[$uid]]['id'],
|
||||
'"<font color="olive">System.battle</font>": Персонаж получил <strong>' . $ecr . ' ЕКР</strong> (В бою трупожор), сейчас: <strong>' . $this->users[$this->uids[$uid]]['money2'] . ' ЕКР</strong>',
|
||||
@ -4179,11 +4180,8 @@ class Battle
|
||||
}
|
||||
if ($txt != '') {
|
||||
$txt = ltrim($txt, ', ');
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $this->users[$this->uids[$uid]]['city'] . "','" . $this->users[$this->uids[$uid]]['room'] . "','','" . $this->users[$this->uids[$uid]]['login'] . "','<font color=#cb0000><strong>Вы совершили подвиг:</strong> " . mysql_real_escape_string(
|
||||
$txt
|
||||
) . "</font>','-1','6','0')"
|
||||
);
|
||||
$cmsg->setText("<strong>Вы совершили подвиг:</strong> $txt");
|
||||
$chat->sendMsg($cmsg);
|
||||
}
|
||||
}
|
||||
if ($itm != '') {
|
||||
@ -4219,11 +4217,8 @@ class Battle
|
||||
}
|
||||
if ($txt != '') {
|
||||
$txt = ltrim($txt, ', ');
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $this->users[$this->uids[$uid]]['city'] . "','" . $this->users[$this->uids[$uid]]['room'] . "','','" . $this->users[$this->uids[$uid]]['login'] . "','<font color=#cb0000><strong>Вы получили предметы:</strong> " . mysql_real_escape_string(
|
||||
$txt
|
||||
) . "</font>','-1','6','0')"
|
||||
);
|
||||
$cmsg->setText("<strong>Вы получили предметы:</strong> $txt");
|
||||
$chat->sendMsg($cmsg);
|
||||
}
|
||||
}
|
||||
//
|
||||
|
@ -422,7 +422,14 @@ class BotLogic
|
||||
}
|
||||
|
||||
$text = ' [login:' . self::$bot['login'] . '] принял' . $sa . ' вашу заявку на бой.[reflesh_main_zv_priem:' . self::$bot['id'] . ']';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $uz1['city'] . "','','','" . $uz1['login'] . "','" . $text . "','" . time() . "','6','0')");
|
||||
$chatMessageDto = new ChatMessage();
|
||||
$chatMessageDto->setCity($uz1['city']);
|
||||
$chatMessageDto->setTo($uz1['login']);
|
||||
$chatMessageDto->setText($text);
|
||||
$chatMessageDto->setType(6);
|
||||
$chat = new Chat();
|
||||
$chat->sendMsg($chatMessageDto);
|
||||
|
||||
mysql_query('UPDATE `stats` SET `zv` = "' . $zv['id'] . '",`team` = "2" WHERE `id` = "' . self::$bot['id'] . '" LIMIT 1');
|
||||
mysql_query('UPDATE `users` SET `ipreg` = "8",`timeMain` = "' . self::rnd() . '" WHERE `id` = "' . self::$bot['id'] . '" LIMIT 1');
|
||||
|
||||
@ -622,7 +629,13 @@ class BotLogic
|
||||
self::$bot['battle'] = $btl_id;
|
||||
|
||||
//Отправляем сообщение в чат всем бойцам
|
||||
mysql_query("INSERT INTO `chat` (`city`,`room`,`to`,`time`,`type`,`toChat`,`sound`) VALUES ('" . $u->info['city'] . "','" . $u->info['room'] . "','" . $uz2['login'] . "','" . time() . "','11','0','117')");
|
||||
$chatDto = new ChatMessage();
|
||||
$chatDto->setCity($u->info['city']);
|
||||
$chatDto->setRoom($u->info['room']);
|
||||
$chatDto->setTo($uz2['login']);
|
||||
$chatDto->setType(11);
|
||||
$chatDto->setSound(117);
|
||||
(new Chat())->sendMsg($chatDto);
|
||||
}
|
||||
|
||||
} elseif ($pr == 0) {
|
||||
@ -633,7 +646,13 @@ class BotLogic
|
||||
$sa = 'а';
|
||||
}
|
||||
$text = ' [login:' . self::$bot['login'] . '] отказал' . $sa . ' вам в поединке.';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $uz2['city'] . "','','','" . $uz2['login'] . "','" . $text . "','" . time() . "','6','0')");
|
||||
$chatDto = new ChatMessage();
|
||||
$chatDto->setCity($uz2['city']);
|
||||
$chatDto->setTo($uz2['login']);
|
||||
$chatDto->setText($text);
|
||||
$chatDto->setType(6);
|
||||
(new Chat())->sendMsg($chatDto);
|
||||
|
||||
mysql_query('UPDATE `stats` SET `zv` = "0",`team` = "1" WHERE `id` = "' . $uz2['id'] . '" LIMIT 1');
|
||||
mysql_query('UPDATE `zayvki` SET `otk` = ( `otk` + 1 ),`bcs` = "' . (time() + rand(30, rand(60, 180))) . '" WHERE `id` = "' . $zv['id'] . '" LIMIT 1');
|
||||
}
|
||||
@ -667,7 +686,12 @@ class BotLogic
|
||||
}
|
||||
|
||||
$text = ' [login:' . self::$bot['login'] . '] отозвал' . $sa . ' свой запрос на бой.';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $uz1['city'] . "','','','" . $uz1['login'] . "','" . $text . "','" . time() . "','6','0')");
|
||||
$chatDto = new ChatMessage();
|
||||
$chatDto->setCity($uz1['city']);
|
||||
$chatDto->setTo($uz1['login']);
|
||||
$chatDto->setText($text);
|
||||
$chatDto->setType(6);
|
||||
(new Chat())->sendMsg($chatDto);
|
||||
}
|
||||
|
||||
mysql_query('UPDATE `zayvki` SET `otk` = ( `otk` + 1 ),`bcs` = "' . (time() + rand(30, rand(60, 180))) . '" WHERE `id` = "' . $zv['id'] . '" LIMIT 1');
|
||||
@ -1002,10 +1026,7 @@ class BotLogic
|
||||
//Вспомогательные функции
|
||||
static function e($t)
|
||||
{
|
||||
|
||||
mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("core #' . date('d.m.Y') . ' %' . date('H:i:s') . ' (Критическая ошибка): <b>' . mysql_real_escape_string($t) . '</b>","capitalcity",
|
||||
"LEL","6","1","-1")');
|
||||
|
||||
(new Chat())->debug($t, true);
|
||||
}
|
||||
|
||||
static function rnd()
|
||||
|
@ -85,29 +85,64 @@ class Chat
|
||||
]);
|
||||
}
|
||||
|
||||
public function debug($text)
|
||||
public function debug($text, $isLegacyErrorMessage = false)
|
||||
{
|
||||
if ($isLegacyErrorMessage) {
|
||||
$text = 'core' . date('#d.m.Y %H:i:s:') . "<b>$text</b>";
|
||||
}
|
||||
Db::sql('insert into chat (new, text, time, type, color, `to`, login) values (1,?,unix_timestamp(),3,?,?,?)', [
|
||||
trim($text), 'crimson', 'Merlin', 'debugger'
|
||||
]);
|
||||
}
|
||||
|
||||
public function send($color, $room, $city, $from, $to, $text, $time, $type, $toChat, $spam, $sound, $new = 0)
|
||||
public function sendMsg(ChatMessage $chatMessage): void
|
||||
{
|
||||
mysql_query("INSERT INTO `chat` (`new`,`sound`,`color`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`spam`) VALUES ('" . $new . "','" . $sound . "','" . $color . "','" . $city . "','" . $room . "','" . $from . "','" . $to . "','" . $text . "','" . $time . "','" . $type . "','" . $toChat . "','" . $spam . "')");
|
||||
return mysql_insert_id();
|
||||
}
|
||||
|
||||
public function jsmsg($id, $time, $to, $from, $type, $ch, $e, $see, $js = 0, $cl = '#000000', $typeTime = NULL)
|
||||
{
|
||||
$tm = date('H:i', $time);
|
||||
if ($typeTime == 1) {
|
||||
$tm = date('d.m.Y H:i', $time);
|
||||
}
|
||||
$rt = 'top.addMessage(\'' . $id . '\',\'' . $tm . '\',\'' . $to . ' \',\'' . $from . '\',\'' . $type . '\',\'' . $ch . '\'," ' . $e . ' ",\'' . $see . '\',\'' . $cl . '\');';
|
||||
if ($js == 1) {
|
||||
$rt = '<script>' . $rt . '</script>';
|
||||
}
|
||||
return $rt;
|
||||
$q = 'insert into chat(
|
||||
new,
|
||||
sound,
|
||||
color,
|
||||
city,
|
||||
room,
|
||||
login,
|
||||
`to`,
|
||||
text,
|
||||
time,
|
||||
type,
|
||||
toChat,
|
||||
spam,
|
||||
invis,
|
||||
da,
|
||||
`delete`,
|
||||
global,
|
||||
molch,
|
||||
nosee,
|
||||
typeTime,
|
||||
dn,
|
||||
frv
|
||||
) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)';
|
||||
$args = [
|
||||
$chatMessage->getNew(),
|
||||
$chatMessage->getSound(),
|
||||
$chatMessage->getColor(),
|
||||
$chatMessage->getCity(),
|
||||
$chatMessage->getRoom(),
|
||||
$chatMessage->getLogin(),
|
||||
$chatMessage->getTo(),
|
||||
$chatMessage->getText(),
|
||||
$chatMessage->getTime(),
|
||||
$chatMessage->getType(),
|
||||
$chatMessage->getToChat(),
|
||||
$chatMessage->getSpam(),
|
||||
$chatMessage->getInvis(),
|
||||
$chatMessage->getDa(),
|
||||
$chatMessage->getDelete(),
|
||||
$chatMessage->getGlobal(),
|
||||
$chatMessage->getMolch(),
|
||||
$chatMessage->getNosee(),
|
||||
$chatMessage->getTypeTime(),
|
||||
$chatMessage->getDn(),
|
||||
$chatMessage->getFireworks(),
|
||||
];
|
||||
Db::sql($q, $args);
|
||||
}
|
||||
}
|
||||
|
403
_incl_data/class/ChatMessage.php
Normal file
403
_incl_data/class/ChatMessage.php
Normal file
@ -0,0 +1,403 @@
|
||||
<?php
|
||||
|
||||
#todo êàæåòñÿ ÷àñòü ïîëåé âðîäå city, room, color, invis íàïðÿìèê çàâèñèò îò login (îòïðàâèòåëü)
|
||||
#todo åñëè ýòî òàê, ÷àñòüþ ñåòòåðîâ ìîæíî áóäåò ïîæåðòâîâàòü.
|
||||
|
||||
class ChatMessage
|
||||
{
|
||||
private int $new = 1;
|
||||
private string $city = 'capitalcity';
|
||||
private int $room = 0;
|
||||
private string $login = '';
|
||||
private string $to = '';
|
||||
private string $text;
|
||||
private int $time = 0;
|
||||
private int $type = 0;
|
||||
private int $toChat = 0;
|
||||
private int $typeTime = 0;
|
||||
private string $color = '#000';
|
||||
private int $sound = 0;
|
||||
private int $spam = 0;
|
||||
private bool $isAlert = false;
|
||||
private int $invis = 0;
|
||||
private int $da = 0;
|
||||
private int $nosee = 0;
|
||||
private int $delete = 0;
|
||||
private int $molch = 0;
|
||||
private int $global = 0;
|
||||
private int $dn = 0;
|
||||
/**
|
||||
* Ôååðâåðêè, ÷¸ðò ïîäåðè!
|
||||
* _incl_data\class\magic\feerverks.php
|
||||
* @var string|null
|
||||
*/
|
||||
private ?string $fireworks = null;
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getDn(): int
|
||||
{
|
||||
return $this->dn;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $dn
|
||||
*/
|
||||
public function setDn(int $dn): void
|
||||
{
|
||||
$this->dn = $dn;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getGlobal(): int
|
||||
{
|
||||
return $this->global;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $global
|
||||
*/
|
||||
public function setGlobal(int $global): void
|
||||
{
|
||||
$this->global = $global;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getDelete(): int
|
||||
{
|
||||
return $this->delete;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $delete
|
||||
*/
|
||||
public function setDelete(int $delete): void
|
||||
{
|
||||
$this->delete = $delete;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getMolch(): int
|
||||
{
|
||||
return $this->molch;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $molch
|
||||
*/
|
||||
public function setMolch(int $molch): void
|
||||
{
|
||||
$this->molch = $molch;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getNosee(): int
|
||||
{
|
||||
return $this->nosee;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $nosee
|
||||
*/
|
||||
public function setNosee(int $nosee): void
|
||||
{
|
||||
$this->nosee = $nosee;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getInvis(): int
|
||||
{
|
||||
return $this->invis;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $invis
|
||||
*/
|
||||
public function setInvis(int $invis): void
|
||||
{
|
||||
$this->invis = $invis;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getDa(): int
|
||||
{
|
||||
return $this->da;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $da
|
||||
*/
|
||||
public function setDa(int $da): void
|
||||
{
|
||||
$this->da = $da;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getSpam(): int
|
||||
{
|
||||
return $this->spam;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $spam
|
||||
*/
|
||||
public function setSpam(int $spam): void
|
||||
{
|
||||
$this->spam = $spam;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getSound(): int
|
||||
{
|
||||
return $this->sound;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $sound
|
||||
*/
|
||||
public function setSound(int $sound): void
|
||||
{
|
||||
$this->sound = $sound;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getNew(): int
|
||||
{
|
||||
return $this->new;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getCity(): string
|
||||
{
|
||||
return $this->city;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getRoom(): int
|
||||
{
|
||||
return $this->room;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getLogin(): string
|
||||
{
|
||||
return $this->login;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getTo(): string
|
||||
{
|
||||
return $this->to;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getText(): string
|
||||
{
|
||||
if ($this->isAlert) {
|
||||
return '<span style="color: red">Âíèìàíèå!</span> ' . $this->text;
|
||||
}
|
||||
return $this->text;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getTime(): int
|
||||
{
|
||||
if (!$this->time) {
|
||||
$this->time = time();
|
||||
}
|
||||
return $this->time;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getType(): int
|
||||
{
|
||||
return $this->type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getToChat(): int
|
||||
{
|
||||
return $this->toChat;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getTypeTime(): int
|
||||
{
|
||||
return $this->typeTime;
|
||||
}
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getColor(): string
|
||||
{
|
||||
return $this->color;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $new
|
||||
*/
|
||||
public function setNew(int $new): void
|
||||
{
|
||||
if ($new !== 1) {
|
||||
$this->new = $new;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $city
|
||||
*/
|
||||
public function setCity(string $city): void
|
||||
{
|
||||
$this->city = $city;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $room
|
||||
*/
|
||||
public function setRoom(int $room): void
|
||||
{
|
||||
$this->room = $room;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $login
|
||||
*/
|
||||
public function setLogin(string $login): void
|
||||
{
|
||||
$this->login = $login;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $to
|
||||
*/
|
||||
public function setTo(string $to): void
|
||||
{
|
||||
$this->to = $to;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $text
|
||||
*/
|
||||
public function setText(string $text): void
|
||||
{
|
||||
$this->text = $text;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $time
|
||||
*/
|
||||
public function setTime(int $time): void
|
||||
{
|
||||
$this->time = $time;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $type
|
||||
*/
|
||||
public function setType(int $type): void
|
||||
{
|
||||
$this->type = $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $toChat
|
||||
*/
|
||||
public function setToChat(int $toChat): void
|
||||
{
|
||||
$this->toChat = $toChat;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $typeTime
|
||||
*/
|
||||
public function setTypeTime(int $typeTime): void
|
||||
{
|
||||
$this->typeTime = $typeTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $color
|
||||
*/
|
||||
public function setColor(string $color): void
|
||||
{
|
||||
$this->color = $color;
|
||||
}
|
||||
|
||||
/**
|
||||
* Äîáàâëÿåò ê ñîîáùåíèþ êðàñíûé ïðåôèêñ "Âíèìàíèå!".
|
||||
* @param bool $isAlert
|
||||
*/
|
||||
public function setIsAlert(bool $isAlert): void
|
||||
{
|
||||
$this->isAlert = $isAlert;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string|null
|
||||
*/
|
||||
public function getFireworks(): ?string
|
||||
{
|
||||
return $this->fireworks;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|null $fireworks
|
||||
*/
|
||||
public function setFireworks(?string $fireworks): void
|
||||
{
|
||||
$this->fireworks = $fireworks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Çàãëóøêà äëÿ îïöèîíàëüíîé ïåðåäà÷è ïàðàìåòðîâ.
|
||||
* @param string $json
|
||||
* @return void
|
||||
*/
|
||||
public function setParamsFromJson(string $json): void
|
||||
{
|
||||
$params = json_decode($json, true);
|
||||
foreach ($params as $param => $value) {
|
||||
if (property_exists($this, $param)) {
|
||||
$this->$param = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1008,10 +1008,7 @@ class FightRequest
|
||||
//обновляем заявку, что бой начался
|
||||
$this->u->info['battle'] = $btl_id;
|
||||
//Отправляем сообщение в чат всем бойцам
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`city`,`room`,`to`,`time`,`type`,`toChat`,`sound`) VALUES ('" . $this->u->info['city'] . "','" . $this->u->info['room'] . "','" . $this->u->info['login'] . "','" . time(
|
||||
) . "','11','0','117')"
|
||||
);
|
||||
$this->sendSysChatSound();
|
||||
die('<script>location="main.php?battle_id=' . $btl_id . '";</script>');
|
||||
} else {
|
||||
$this->error = 'Cannot start battle (no prototype "ABD0Clone")';
|
||||
@ -1019,6 +1016,30 @@ class FightRequest
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Звуковой пинг в чат?
|
||||
* @todo убрать колхоз с условиями когда станет ясно как оно работает.
|
||||
* @return void
|
||||
*/
|
||||
private function sendSysChatSound(string $to = '', int $room = 0)
|
||||
{
|
||||
$cmsg = new ChatMessage();
|
||||
if (empty($to)) {
|
||||
$cmsg->setTo($this->u->info['login']);
|
||||
} else {
|
||||
$cmsg->setTo($to);
|
||||
}
|
||||
if (empty($room)) {
|
||||
$cmsg->setRoom($this->u->info['room']);
|
||||
} else {
|
||||
$cmsg->setRoom($room);
|
||||
}
|
||||
$cmsg->setCity($this->u->info['city']);
|
||||
$cmsg->setType(11);
|
||||
$cmsg->setSound(117);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
}
|
||||
|
||||
//тренеровочный бой
|
||||
public function addBotClone($uid)
|
||||
{
|
||||
@ -1077,21 +1098,11 @@ class FightRequest
|
||||
'UPDATE `stats` SET `team`="1",`enNow` = "' . $this->u->info['enNow'] . '" WHERE `id` = "' . $this->u->info['id'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query('UPDATE `stats` SET `team`="2" WHERE `id` = "' . $bot . '" LIMIT 1');
|
||||
//Если бой кулачный, то снимаем вещи
|
||||
if ($btl['type'] == 1) {
|
||||
mysql_query(
|
||||
'UPDATE `items_users` SET `inOdet`="0" WHERE `uid` = "' . $this->u->info['id'] . '" AND `inOdet`!=0'
|
||||
);
|
||||
mysql_query('UPDATE `items_users` SET `inOdet`="0" WHERE `uid` = "' . $bot . '" AND `inOdet`!=0');
|
||||
}
|
||||
|
||||
//обновляем заявку, что бой начался
|
||||
$this->u->info['battle'] = $btl_id;
|
||||
//Отправляем сообщение в чат всем бойцам
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`city`,`room`,`to`,`time`,`type`,`toChat`,`sound`) VALUES ('" . $this->u->info['city'] . "','" . $this->u->info['room'] . "','" . $this->u->info['login'] . "','" . time(
|
||||
) . "','11','0','117')"
|
||||
);
|
||||
$this->sendSysChatSound();
|
||||
die('<script>location="main.php?battle_id=' . $btl_id . '";</script>');
|
||||
} else {
|
||||
$this->error = 'Cannot start battle (no prototype "ABD0Clone")';
|
||||
@ -1339,11 +1350,7 @@ class FightRequest
|
||||
);
|
||||
$this->u->info['battle'] = $btl_id;
|
||||
//Отправляем сообщение в чат всем бойцам
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`city`,`room`,`to`,`time`,`type`,`toChat`,`sound`) VALUES ('" . $this->u->info['city'] . "','-1','" . $vars[0] . "','" . time(
|
||||
) . "','11','0','117')"
|
||||
);
|
||||
|
||||
$this->sendSysChatSound($vars[0], -1);
|
||||
}
|
||||
} elseif ($z['razdel'] >= 1 && $z['razdel'] <= 3) {
|
||||
//начало PvP
|
||||
@ -1439,10 +1446,7 @@ class FightRequest
|
||||
$this->u->info['battle'] = $btl_id;
|
||||
|
||||
//Отправляем сообщение в чат всем бойцам
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`city`,`room`,`to`,`time`,`type`,`toChat`,`sound`) VALUES ('" . $this->u->info['city'] . "','" . $this->u->info['room'] . "','" . $uz['login'] . "','" . time(
|
||||
) . "','11','0','117')"
|
||||
);
|
||||
$this->sendSysChatSound($uz['login']);
|
||||
die('<script>location="main.php?battle_id=' . $btl_id . '";</script>');
|
||||
} else {
|
||||
$this->error = 'Ошибка создания битвы.';
|
||||
@ -1469,6 +1473,9 @@ class FightRequest
|
||||
)
|
||||
);
|
||||
if (isset($enemy['id'])) {
|
||||
$chat = new Chat();
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setType(6);
|
||||
if ($this->u->info['team'] == 1) {
|
||||
//выкидываем из заявки + пишем сообщение в чат
|
||||
$upd = mysql_query(
|
||||
@ -1482,11 +1489,11 @@ class FightRequest
|
||||
if ($this->u->info['sex'] == 2) {
|
||||
$sa = 'а';
|
||||
}
|
||||
$text = ' [login:' . $this->u->info['login'] . '] отказал' . $sa . ' вам в поединке.';
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $enemy['city'] . "','','','" . $enemy['login'] . "','" . $text . "','" . time(
|
||||
) . "','6','0')"
|
||||
);
|
||||
|
||||
$cmsg->setText(' [login:' . $this->u->info['login'] . '] отказал' . $sa . ' вам в поединке.');
|
||||
$cmsg->setCity($enemy['city']);
|
||||
$cmsg->setTo($enemy['login']);
|
||||
$chat->sendMsg($cmsg);
|
||||
}
|
||||
} elseif ($this->u->info['id'] == $enemy['id'] && $zi['start'] == 0) {
|
||||
//выкидываем из заявки + пишем сообщение в чат
|
||||
@ -1506,11 +1513,11 @@ class FightRequest
|
||||
if ($this->u->info['sex'] == 2) {
|
||||
$sa = 'а';
|
||||
}
|
||||
$text = ' [login:' . $this->u->info['login'] . '] отозвал' . $sa . ' свой запрос на бой.';
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $uz['city'] . "','','','" . $uz['login'] . "','" . $text . "','" . time(
|
||||
) . "','6','0')"
|
||||
);
|
||||
|
||||
$cmsg->setText(' [login:' . $this->u->info['login'] . '] отозвал' . $sa . ' свой запрос на бой.');
|
||||
$cmsg->setCity($uz['city']);
|
||||
$cmsg->setTo($uz['login']);
|
||||
$chat->sendMsg($cmsg);
|
||||
}
|
||||
$this->u->info['zv'] = 0;
|
||||
$this->u->info['team'] = 0;
|
||||
@ -1550,19 +1557,19 @@ class FightRequest
|
||||
if (in_array($r, [1, 4, 5, 8, 10])) {
|
||||
$this->zv_see = 1;
|
||||
if ($this->u->room['FR'] == 0 && $this->u->room['zvsee'] == 0) {
|
||||
echo '<br><br><br><b><font color="black"><center>Подать заявку можно только в комнатах бойцовского клуба</center></font></b>';
|
||||
echo '<br><br><br><b><center>Подать заявку можно только в комнатах бойцовского клуба</center></b>';
|
||||
$this->zv_see = 0;
|
||||
} elseif ($r == 1 && $this->u->info['level'] > 0) {
|
||||
echo '<br><br><br><b><font color="black"><center>Вы уже выросли из ползунков ;)</center></font></b>';
|
||||
echo '<br><br><br><b><center>Вы уже выросли из ползунков ;)</center></b>';
|
||||
$this->zv_see = 0;
|
||||
} elseif ($r > 1 && $r < 6 && $this->u->info['level'] < 1) {
|
||||
echo '<br><br><br><b><font color="black"><center>Вы еще не выросли из ползунков ;)</center></font></b>';
|
||||
echo '<br><br><br><b><center>Вы еще не выросли из ползунков ;)</center></b>';
|
||||
$this->zv_see = 0;
|
||||
} elseif ($r > 3 && $r < 6 && $this->u->info['level'] < 2) {
|
||||
echo '<br><br><br><b><font color="black"><center>В ' . $this->z1n[$r] . ' бои только со второго уровня.</center></font></b>';
|
||||
echo '<br><br><br><b><center>В ' . $this->z1n[$r] . ' бои только со второго уровня.</center></b>';
|
||||
$this->zv_see = 0;
|
||||
} elseif ($r == 8 && $this->u->info['level'] < 1) {
|
||||
echo '<br><br><br><b><font color="black"><center>Принимать участие в турнире только с первого уровня.</center></font></b>';
|
||||
echo '<br><br><br><b><center>Принимать участие в турнире только с первого уровня.</center></b>';
|
||||
$this->zv_see = 0;
|
||||
} elseif ($r == 10) {
|
||||
if (\Insallah\Tournament::IS_ENABLED) {
|
||||
@ -2804,11 +2811,14 @@ function MM_jumpMenu(targ,selObj,restore){ //v3.0
|
||||
if ($this->u->info['sex'] == 2) {
|
||||
$sa = 'а';
|
||||
}
|
||||
$text = ' [login:' . $this->u->info['login'] . '] принял' . $sa . ' вашу заявку на бой.[reflesh_main_zv_priem:' . $this->u->info['id'] . ']';
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $uz1['city'] . "','','','" . $uz1['login'] . "','" . $text . "','" . time(
|
||||
) . "','6','0')"
|
||||
);
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setText(' [login:' . $this->u->info['login'] . '] принял' . $sa . ' вашу заявку на бой.[reflesh_main_zv_priem:' . $this->u->info['id'] . ']');
|
||||
$cmsg->setCity($uz1['city']);
|
||||
$cmsg->setTo($uz1['login']);
|
||||
$cmsg->setType(6);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
|
||||
$zi = $z;
|
||||
$this->u->info['zv'] = $z['id'];
|
||||
$this->u->info['team'] = 2;
|
||||
|
@ -15,11 +15,7 @@ class Filter
|
||||
|
||||
public function e($t)
|
||||
{
|
||||
mysql_query(
|
||||
'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("#' . date('d.m.Y') . ' %' . date(
|
||||
'H:i:s'
|
||||
) . ': <b>' . mysql_real_escape_string($t) . '</b>","capitalcity","Игромир","6","1","-1")'
|
||||
);
|
||||
(new Chat())->debug($t, true);
|
||||
}
|
||||
|
||||
public function setOnline($online, $uid)
|
||||
|
@ -205,8 +205,14 @@ class GameDealer
|
||||
|
||||
$r .= ' <b>' . $user['login'] . '</b>, на Ваш банковский счет №' . $bank . ' зачислено ' . $xml->amount . ' Ekr. Благодарим Вас за покупку!';
|
||||
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $user['city'] . "','" . $user['room'] . "','','" . $user['login'] . "','" . $r . "','-1','5','0')");
|
||||
|
||||
$chatDto = new ChatMessage();
|
||||
$chatDto->setCity($user['city']);
|
||||
$chatDto->setRoom($user['room']);
|
||||
$chatDto->setTo($user['login']);
|
||||
$chatDto->setText($r);
|
||||
$chatDto->setType(5);
|
||||
$chatDto->setTime(-1);
|
||||
(new Chat())->sendMsg($chatDto);
|
||||
} else {
|
||||
$this->BACK = [['gdanswer', [['status', '-1'], ['desc', 'У пользователя отсутствует банк'], ['id', $this->c['id']]]]];
|
||||
$this->add('-1', 'У персонажа отсутствует банк:pay:' . $xml->nick . ':' . $xml->projectid . ':' . $xml->sign . ':' . $xml->amount . ':' . $xml->payid . ':' . $bank['id'], $xml->amount);
|
||||
|
@ -312,11 +312,15 @@ class TournamentModel
|
||||
*/
|
||||
public static function sysMessage(string $message): void
|
||||
{
|
||||
if (!empty($message)) {
|
||||
$db = new Db();
|
||||
$message = "<span style='font-weight: bold; color: forestgreen;'>$message</span>";
|
||||
$db::sql('insert into chat (time, type, text, new, da) values (unix_timestamp(), 6, ?, 1, 1)', [$message]);
|
||||
if (empty($message)) {
|
||||
return;
|
||||
}
|
||||
$cmsg = new \ChatMessage();
|
||||
$cmsg->setDa(1);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setText($message);
|
||||
$cmsg->setColor('forestgreen');
|
||||
(new \Chat())->sendMsg($cmsg);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -168,6 +168,10 @@ class GameConnector
|
||||
if (empty($message)) {
|
||||
return;
|
||||
}
|
||||
Db::sql('insert into chat (`time`, type, `text`, new, da) values (unix_timestamp(), 6, ?, 1, 1)', [$message]);
|
||||
$cmsg = new \ChatMessage();
|
||||
$cmsg->setDa(1);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setText($message);
|
||||
(new \Chat())->sendMsg($cmsg);
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -873,7 +873,15 @@ class Quests
|
||||
//Отправляем сообщение в чат
|
||||
mysql_query('UPDATE `actions` SET `vals` = "win" , `time` = "' . time() . '" WHERE `id` = "' . $action['id'] . '" AND `vals` = "go" LIMIT 1');
|
||||
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $u->info['city'] . "','" . $u->info['room'] . "','','" . $u->info['login'] . "','" . $r . "','-1','5','0')");
|
||||
|
||||
$chatDto = new ChatMessage();
|
||||
$chatDto->setCity($u->info['city']);
|
||||
$chatDto->setRoom($u->info['room']);
|
||||
$chatDto->setTo($u->info['login']);
|
||||
$chatDto->setText($r);
|
||||
$chatDto->setType(5);
|
||||
$chatDto->setTime(-1);
|
||||
(new Chat())->sendMsg($chatDto);
|
||||
|
||||
return $r;
|
||||
}
|
||||
@ -989,7 +997,14 @@ class Quests
|
||||
}
|
||||
$r = '<small>' . $r . '</small>';
|
||||
//Отправляем сообщение в чат
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $u->info['city'] . "','" . $u->info['room'] . "','','" . $u->info['login'] . "','" . $r . "','-1','5','0')");
|
||||
$chatDto = new ChatMessage();
|
||||
$chatDto->setCity($u->info['city']);
|
||||
$chatDto->setRoom($u->info['room']);
|
||||
$chatDto->setTo($u->info['login']);
|
||||
$chatDto->setText($r);
|
||||
$chatDto->setType(5);
|
||||
$chatDto->setTime(-1);
|
||||
(new Chat())->sendMsg($chatDto);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,10 @@ class Tournir
|
||||
private function start()
|
||||
{
|
||||
$this->info = Db::getRow('select * from turnirs where id = ?', [$this->u->info['inTurnirnew']]);
|
||||
$this->user = Db::getRow('select * from users_turnirs where turnir = ? and bot = ?', [$this->u->info['inTurnirnew'], $this->u->info['id']]);
|
||||
$this->user = Db::getRow(
|
||||
'select * from users_turnirs where turnir = ? and bot = ?',
|
||||
[$this->u->info['inTurnirnew'], $this->u->info['id']]
|
||||
);
|
||||
}
|
||||
|
||||
private function startTurnir()
|
||||
@ -32,7 +35,10 @@ class Tournir
|
||||
} else {
|
||||
Db::sql('update turnirs set status = 3 where id = ?', [$this->info['id']]);
|
||||
//Создание поединка
|
||||
Db::sql('insert into battle (city, time_start, timeout, type, turnir) values (?,unix_timestamp(),60,1,?)', [$this->u->info['city'], $this->info['id']]);
|
||||
Db::sql(
|
||||
'insert into battle (city, time_start, timeout, type, turnir) values (?,unix_timestamp(),60,1,?)',
|
||||
[$this->u->info['city'], $this->info['id']]
|
||||
);
|
||||
$uri = Db::lastInsertId();
|
||||
//Закидываем персонажей в поединок
|
||||
Db::sql('update users set battle = ? where inUser = 0 and inTurnirnew = ?', [$uri, $this->info['id']]);
|
||||
@ -43,59 +49,86 @@ class Tournir
|
||||
|
||||
private function finishTurnir()
|
||||
{
|
||||
$this->info = mysql_fetch_array(mysql_query('SELECT * FROM `turnirs` WHERE `id` = "' . $this->u->info['inTurnirnew'] . '" LIMIT 1'));
|
||||
if ($this->info['status'] == 3) {
|
||||
$win = '';
|
||||
$lose = '';
|
||||
$sp = mysql_query('SELECT * FROM `users_turnirs` WHERE `turnir` = "' . $this->info['id'] . '" ORDER BY `points` DESC');
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
mysql_query('DELETE FROM `users_turnirs` WHERE `turnir` = "' . $this->info['id'] . '"');
|
||||
$inf = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "' . $pl['uid'] . '" LIMIT 1'));
|
||||
$bot = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "' . $pl['bot'] . '" LIMIT 1'));
|
||||
if (isset($inf['id'], $bot['id'])) {
|
||||
//выдаем призы и т.д
|
||||
mysql_query('DELETE FROM `users` WHERE `id` = "' . $bot['id'] . '" LIMIT 1');
|
||||
mysql_query('DELETE FROM `stats` WHERE `id` = "' . $bot['id'] . '" LIMIT 1');
|
||||
mysql_query('DELETE FROM `items_users` WHERE `uid` = "' . $bot['id'] . '" LIMIT 1000');
|
||||
mysql_query('DELETE FROM `eff_users` WHERE `uid` = "' . $bot['id'] . '" LIMIT 1000');
|
||||
}
|
||||
$chat = new Chat();
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setType(6);
|
||||
|
||||
if ($pl['team'] == $this->info['winner'] && $this->info['winner'] != 0) {
|
||||
$inf['add_expp'] = [0, 1, 5, 10, 15, 25, 35, 70, 100, 150, 200, 300, 500, 700, 1000];
|
||||
|
||||
//получаем опыт (с 0 по 12 лвл)
|
||||
$inf['add_expn'] = [10, 30, 55, 62, 92, 180, 350, 1350, 4500, 7000, 21000, 30000, 35000];
|
||||
$inf['add_expn'] = $inf['add_expn'][$inf['level']];
|
||||
|
||||
mysql_query('UPDATE `users` SET `win` = `win` + 1,`win_t` = `win_t` + 1 WHERE `id` = "' . $inf['id'] . '" LIMIT 1');
|
||||
mysql_query('UPDATE `stats` SET `exp` = `exp` + ' . $inf['add_expn'] . ' WHERE `id` = "' . $inf['id'] . '" LIMIT 1');
|
||||
$win .= '<b>' . $inf['login'] . '</b>, ';
|
||||
|
||||
$r = 'Турнир завершен. Вы являетесь победителем турнира, получено опыта: <b>' . $inf['add_expn'] . '</b>.';
|
||||
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','" . $inf['room'] . "','','" . $inf['login'] . "','" . $r . "','" . time() . "','6','0')");
|
||||
} elseif ($pl['team'] != $this->info['winner'] && $this->info['winner'] != 0) {
|
||||
mysql_query('UPDATE `users` SET `lose` = `lose` + 1,`lose_t` = `lose_t` + 1 WHERE `id` = "' . $inf['id'] . '" LIMIT 1');
|
||||
|
||||
$lose .= '<b>' . $inf['login'] . '</b>, ';
|
||||
} else {
|
||||
mysql_query('UPDATE `users` SET `nich` = `nich` + 1 WHERE `id` = "' . $inf['id'] . '" LIMIT 1');
|
||||
}
|
||||
mysql_query('DELETE FROM `users_turnirs` WHERE `uid` = "' . $inf['id'] . '" LIMIT 1');
|
||||
}
|
||||
mysql_query('UPDATE `users` SET `inUser` = "0",`inTurnirnew` = "0" WHERE `inTurnirnew` = "' . $this->info['id'] . '" LIMIT ' . $this->info['users_in']);
|
||||
mysql_query('UPDATE `turnirs` SET `chat` = 4 , `winner` = -1,`users_in` = 0,`status` = 0,`winner` = -1,`step` = 0,`time` = "' . (time() + $this->info['time2']) . '",`count` = `count` + 1 WHERE `id` = ' . $this->info['id'] . ' LIMIT 1');
|
||||
|
||||
if ($win != '') {
|
||||
$win = rtrim($win, ', ');
|
||||
$lose = rtrim($lose, ', ');
|
||||
$win = 'Победители турнира: ' . $win . '. Проигравшая сторона: ' . $lose . '. Следующий турнир начнется через ' . $this->u->timeOut($this->info['time2']) . ' (' . date('d.m.Y H:i', (time() + $this->info['time2'])) . ').';
|
||||
} else {
|
||||
$win = 'Победители турнира отсутствует. Следующий турнир начнется через ' . $this->u->timeOut($this->info['time2']) . ' (' . date('d.m.Y H:i', (time() + $this->info['time2'])) . ').';
|
||||
}
|
||||
$r = '<font color=black><b>Турнир завершен.</b></font> ' . $win;
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','','','','" . $r . "','" . time() . "','6','0')");
|
||||
$this->info = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `turnirs` WHERE `id` = ' . $this->u->info['inTurnirnew'])
|
||||
);
|
||||
if ($this->info['status'] != 3) {
|
||||
return;
|
||||
}
|
||||
$win = '';
|
||||
$lose = '';
|
||||
$sp = mysql_query(
|
||||
'SELECT * FROM `users_turnirs` WHERE `turnir` = "' . $this->info['id'] . '" ORDER BY `points` DESC'
|
||||
);
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
mysql_query('DELETE FROM `users_turnirs` WHERE `turnir` = "' . $this->info['id'] . '"');
|
||||
$inf = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "' . $pl['uid'] . '" LIMIT 1'));
|
||||
$bot = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "' . $pl['bot'] . '" LIMIT 1'));
|
||||
if (isset($inf['id'], $bot['id'])) {
|
||||
//выдаем призы и т.д
|
||||
mysql_query('DELETE FROM `users` WHERE `id` = "' . $bot['id'] . '" LIMIT 1');
|
||||
mysql_query('DELETE FROM `stats` WHERE `id` = "' . $bot['id'] . '" LIMIT 1');
|
||||
mysql_query('DELETE FROM `items_users` WHERE `uid` = "' . $bot['id'] . '" LIMIT 1000');
|
||||
mysql_query('DELETE FROM `eff_users` WHERE `uid` = "' . $bot['id'] . '" LIMIT 1000');
|
||||
}
|
||||
|
||||
if ($pl['team'] == $this->info['winner'] && $this->info['winner'] != 0) {
|
||||
$inf['add_expp'] = [0, 1, 5, 10, 15, 25, 35, 70, 100, 150, 200, 300, 500, 700, 1000];
|
||||
|
||||
//получаем опыт (с 0 по 12 лвл)
|
||||
$inf['add_expn'] = [10, 30, 55, 62, 92, 180, 350, 1350, 4500, 7000, 21000, 30000, 35000];
|
||||
$inf['add_expn'] = $inf['add_expn'][$inf['level']];
|
||||
|
||||
mysql_query(
|
||||
'UPDATE `users` SET `win` = `win` + 1,`win_t` = `win_t` + 1 WHERE `id` = "' . $inf['id'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query(
|
||||
'UPDATE `stats` SET `exp` = `exp` + ' . $inf['add_expn'] . ' WHERE `id` = "' . $inf['id'] . '" LIMIT 1'
|
||||
);
|
||||
$win .= '<b>' . $inf['login'] . '</b>, ';
|
||||
|
||||
$cmsg->setRoom($inf['room']);
|
||||
$cmsg->setTo($inf['login']);
|
||||
$cmsg->setText("Турнир завершен. Вы являетесь победителем турнира, получено опыта: <b>{$inf['add_expn']}</b>.");
|
||||
$chat->sendMsg($cmsg);
|
||||
|
||||
} elseif ($pl['team'] != $this->info['winner'] && $this->info['winner'] != 0) {
|
||||
mysql_query(
|
||||
'UPDATE `users` SET `lose` = `lose` + 1,`lose_t` = `lose_t` + 1 WHERE `id` = "' . $inf['id'] . '" LIMIT 1'
|
||||
);
|
||||
|
||||
$lose .= '<b>' . $inf['login'] . '</b>, ';
|
||||
} else {
|
||||
mysql_query('UPDATE `users` SET `nich` = `nich` + 1 WHERE `id` = "' . $inf['id'] . '" LIMIT 1');
|
||||
}
|
||||
mysql_query('DELETE FROM `users_turnirs` WHERE `uid` = "' . $inf['id'] . '" LIMIT 1');
|
||||
}
|
||||
mysql_query(
|
||||
'UPDATE `users` SET `inUser` = 0,`inTurnirnew` = 0 WHERE `inTurnirnew` = "' . $this->info['id'] . '" LIMIT ' . $this->info['users_in']
|
||||
);
|
||||
mysql_query(
|
||||
'UPDATE `turnirs` SET `chat` = 4 , `winner` = -1,`users_in` = 0,`status` = 0,`winner` = -1,`step` = 0,`time` = "' . (time(
|
||||
) + $this->info['time2']) . '",`count` = `count` + 1 WHERE `id` = ' . $this->info['id'] . ' LIMIT 1'
|
||||
);
|
||||
|
||||
if ($win != '') {
|
||||
$win = rtrim($win, ', ');
|
||||
$lose = rtrim($lose, ', ');
|
||||
$win = 'Победители турнира: ' . $win . '. Проигравшая сторона: ' . $lose . '. Следующий турнир начнется через ' . $this->u->timeOut(
|
||||
$this->info['time2']
|
||||
) . ' (' . date('d.m.Y H:i', (time() + $this->info['time2'])) . ').';
|
||||
} else {
|
||||
$win = 'Победители турнира отсутствует. Следующий турнир начнется через ' . $this->u->timeOut(
|
||||
$this->info['time2']
|
||||
) . ' (' . date('d.m.Y H:i', (time() + $this->info['time2'])) . ').';
|
||||
}
|
||||
|
||||
$cmsg->setText('<b>Турнир завершен.</b> ' . $win);
|
||||
$chat->sendMsg($cmsg);
|
||||
}
|
||||
|
||||
private function locationSee()
|
||||
@ -130,9 +163,21 @@ class Tournir
|
||||
if (!$asg[$ast[$i]]) {
|
||||
$noitm++;
|
||||
}
|
||||
$itm = mysql_fetch_array(mysql_query('SELECT `id`,`inSlot`,`price1` FROM `items_main` WHERE `id` = "' . mysql_real_escape_string($ast[$i]) . '" LIMIT 1'));
|
||||
$itm = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`inSlot`,`price1` FROM `items_main` WHERE `id` = "' . mysql_real_escape_string(
|
||||
$ast[$i]
|
||||
) . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($itm['id'])) {
|
||||
$itm2 = mysql_fetch_array(mysql_query('SELECT `iid`,`price_1` FROM `items_shop` WHERE `item_id` = "' . mysql_real_escape_string($ast[$i]) . '" AND `kolvo` > 0 LIMIT 1'));
|
||||
$itm2 = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `iid`,`price_1` FROM `items_shop` WHERE `item_id` = "' . mysql_real_escape_string(
|
||||
$ast[$i]
|
||||
) . '" AND `kolvo` > 0 LIMIT 1'
|
||||
)
|
||||
);
|
||||
if ($itm2['price_1'] > $itm['price1']) {
|
||||
$itm['price1'] = $itm2['price_1'];
|
||||
}
|
||||
@ -198,8 +243,12 @@ class Tournir
|
||||
$i++;
|
||||
}
|
||||
|
||||
mysql_query('UPDATE `users_turnirs` SET `points` = "' . $this->user['points'] . '",`items` = "0" WHERE `bot` = "' . $this->u->info['id'] . '" LIMIT 1');
|
||||
mysql_query('UPDATE `stats` SET `ability` = "100",`skills` = "10" WHERE `id` = "' . $this->u->info['id'] . '" LIMIT 1');
|
||||
mysql_query(
|
||||
'UPDATE `users_turnirs` SET `points` = "' . $this->user['points'] . '",`items` = "0" WHERE `bot` = "' . $this->u->info['id'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query(
|
||||
'UPDATE `stats` SET `ability` = "100",`skills` = "10" WHERE `id` = "' . $this->u->info['id'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query('UPDATE `users` SET `level` = "12" WHERE `id` = "' . $this->u->info['id'] . '" LIMIT 1');
|
||||
mysql_query('UPDATE `turnirs` SET `step` = "0" WHERE `id` = "' . $this->info['id'] . '" LIMIT 1');
|
||||
|
||||
@ -213,7 +262,9 @@ class Tournir
|
||||
} elseif ($this->info['step'] == 0) {
|
||||
//распределяем команды
|
||||
$po = [0, 0];
|
||||
$sp = mysql_query('SELECT * FROM `users_turnirs` WHERE `turnir` = "' . $this->info['id'] . '" AND `points` > 3 ORDER BY `points` DESC LIMIT ' . $this->info['users_in']);
|
||||
$sp = mysql_query(
|
||||
'SELECT * FROM `users_turnirs` WHERE `turnir` = "' . $this->info['id'] . '" AND `points` > 3 ORDER BY `points` DESC LIMIT ' . $this->info['users_in']
|
||||
);
|
||||
$tmr = rand(1, 2);
|
||||
if ($tmr == 1) {
|
||||
$tmr = [2, 1];
|
||||
@ -221,8 +272,12 @@ class Tournir
|
||||
$tmr = [1, 2];
|
||||
}
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$inf = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "' . $pl['uid'] . '" LIMIT 1'));
|
||||
$bot = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "' . $pl['bot'] . '" LIMIT 1'));
|
||||
$inf = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `users` WHERE `id` = "' . $pl['uid'] . '" LIMIT 1')
|
||||
);
|
||||
$bot = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `users` WHERE `id` = "' . $pl['bot'] . '" LIMIT 1')
|
||||
);
|
||||
if (isset($inf['id'], $bot['id'])) {
|
||||
if ($po[1] == $po[2]) {
|
||||
$tm = rand(1, 2);
|
||||
@ -234,18 +289,28 @@ class Tournir
|
||||
//$tm = $tmr[$tm];
|
||||
$bot['team'] = $tm;
|
||||
$po[$bot['team']] += $pl['points'];
|
||||
mysql_query('UPDATE `stats` SET `team` = "' . $bot['team'] . '" WHERE `id` = "' . $bot['id'] . '" LIMIT 1');
|
||||
mysql_query('UPDATE `users_turnirs` SET `team` = "' . $bot['team'] . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1');
|
||||
mysql_query(
|
||||
'UPDATE `stats` SET `team` = "' . $bot['team'] . '" WHERE `id` = "' . $bot['id'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query(
|
||||
'UPDATE `users_turnirs` SET `team` = "' . $bot['team'] . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1'
|
||||
);
|
||||
}
|
||||
}
|
||||
mysql_query('UPDATE `turnirs` SET `step` = "1" WHERE `id` = "' . $this->info['id'] . '" LIMIT 1');
|
||||
}
|
||||
|
||||
$sp = mysql_query('SELECT * FROM `users_turnirs` WHERE `turnir` = "' . $this->info['id'] . '" LIMIT ' . $this->info['users_in']);
|
||||
$sp = mysql_query(
|
||||
'SELECT * FROM `users_turnirs` WHERE `turnir` = "' . $this->info['id'] . '" LIMIT ' . $this->info['users_in']
|
||||
);
|
||||
$po = [0, 0];
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$inf = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "' . $pl['uid'] . '" LIMIT 1'));
|
||||
$bot = mysql_fetch_array(mysql_query('SELECT `u`.*,`st`.* FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON `u`.`id` = `st`.`id` WHERE `u`.`id` = "' . $pl['bot'] . '" LIMIT 1'));
|
||||
$bot = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `u`.*,`st`.* FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON `u`.`id` = `st`.`id` WHERE `u`.`id` = "' . $pl['bot'] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($inf['id'], $bot['id'])) {
|
||||
$po[$bot['team']] += $pl['points'];
|
||||
//${'tm'.$bot['team']} .= '<b>'.$bot['login'].'</b> ['.$bot['level'].']<br>';
|
||||
@ -264,10 +329,14 @@ class Tournir
|
||||
.CSSteam8 { font-weight: bold; color: #842B61; cursor:pointer; }
|
||||
.CSSteam9 { font-weight: bold; color: navy; cursor:pointer; }
|
||||
.CSSvs { font-weight: bold; }</style>';
|
||||
$r .= '<h3>«' . $this->name[$this->info['type']] . '»</h3><br>Начало турнира через ' . $this->u->timeOut($this->info['time'] - time()) . '! ';
|
||||
$r .= '<h3>«' . $this->name[$this->info['type']] . '»</h3><br>Начало турнира через ' . $this->u->timeOut(
|
||||
$this->info['time'] - time()
|
||||
) . '! ';
|
||||
|
||||
if (isset($_GET['hpregenNowTurnir']) && ($this->u->stats['hpNow'] < $this->u->stats['hpAll'] || $this->u->stats['mpNow'] < $this->u->stats['mpAll'])) {
|
||||
mysql_query('UPDATE `stats` SET `hpNow` = "' . $this->u->stats['hpAll'] . '",`mpNow` = "' . $this->u->stats['mpAll'] . '" WHERE `id` = "' . $this->u->info['id'] . '" LIMIT 1');
|
||||
mysql_query(
|
||||
'UPDATE `stats` SET `hpNow` = "' . $this->u->stats['hpAll'] . '",`mpNow` = "' . $this->u->stats['mpAll'] . '" WHERE `id` = "' . $this->u->info['id'] . '" LIMIT 1'
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->user['points'] < 3) {
|
||||
@ -293,9 +362,11 @@ class Tournir
|
||||
//Выдаем предметы для выбора
|
||||
$ai = '';
|
||||
|
||||
$sp = mysql_query('SELECT `a`.*,`b`.* FROM `items_shop` AS `a` LEFT JOIN `items_main` AS `b` ON (`a`.`item_id` = `b`.`id`) WHERE `a`.`sid` = 1 AND
|
||||
$sp = mysql_query(
|
||||
'SELECT `a`.*,`b`.* FROM `items_shop` AS `a` LEFT JOIN `items_main` AS `b` ON (`a`.`item_id` = `b`.`id`) WHERE `a`.`sid` = 1 AND
|
||||
(`a`.`r` != 5 AND `a`.`r` != 9 AND `a`.`r` <= 18 AND `a`.`kolvo` > 0 AND `cantBuy` = 0 AND `a`.`level` < 9 AND `b`.`level` < 9) AND
|
||||
`b`.`class` != 6');
|
||||
`b`.`class` != 6'
|
||||
);
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
if (!isset($noitm[$pl['item_id']])) {
|
||||
$aso[$pl['inslot']][count($aso[$pl['inslot']])] = $pl;
|
||||
@ -320,8 +391,6 @@ class Tournir
|
||||
$ai .= $com[$i]['id'] . ',';
|
||||
$com[$i] = $aso[$i][rand(0, count($aso[$i]) - 1)];
|
||||
$ai .= $com[$i]['id'] . ',';
|
||||
//$com[$i] = $aso[$i][rand(0,count($aso[$i])-1)];
|
||||
//$ai .= $com[$i]['id'].',';
|
||||
}
|
||||
}
|
||||
if ($com[$i]['id'] > 0 && $i != 10) {
|
||||
@ -335,7 +404,9 @@ class Tournir
|
||||
|
||||
$ai .= '0';
|
||||
$this->user['items'] = $ai;
|
||||
mysql_query('UPDATE `users_turnirs` SET `items` = "' . $ai . '" WHERE `id` = "' . $this->user['id'] . '" LIMIT 1');
|
||||
mysql_query(
|
||||
'UPDATE `users_turnirs` SET `items` = "' . $ai . '" WHERE `id` = "' . $this->user['id'] . '" LIMIT 1'
|
||||
);
|
||||
}
|
||||
|
||||
//Выводим предметы чтобы надеть их
|
||||
@ -344,7 +415,11 @@ class Tournir
|
||||
$ia = [];
|
||||
while ($i < count($ai)) {
|
||||
if ($ai[$i] > 0) {
|
||||
$pli = mysql_fetch_array(mysql_query('SELECT `id`,`inSlot`,`name`,`type`,`img`,`level` FROM `items_main` WHERE `id` = "' . $ai[$i] . '" LIMIT 1'));
|
||||
$pli = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`inSlot`,`name`,`type`,`img`,`level` FROM `items_main` WHERE `id` = "' . $ai[$i] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
$ia[$pli['inSlot']][count($ia[$pli['inSlot']])] = $pli;
|
||||
unset($pli);
|
||||
}
|
||||
|
@ -968,99 +968,105 @@ class User
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
if ($id['users'] - $id['users_finish'] < 2) {
|
||||
$win = [];
|
||||
$sp = mysql_query(
|
||||
'SELECT `id`,`bsid`,`money`,`finish`,`time`,`inBot`,`uid` FROM `bs_zv` WHERE `bsid` = "' . $id['id'] . '" AND `finish` = "0" AND `time` = "' . $id['time_start'] . '" ORDER BY `money` DESC LIMIT 100'
|
||||
if ($id['users'] - $id['users_finish'] >= 2) {
|
||||
return;
|
||||
}
|
||||
$win = [];
|
||||
$sp = mysql_query(
|
||||
'SELECT `id`,`bsid`,`money`,`finish`,`time`,`inBot`,`uid` FROM `bs_zv` WHERE `bsid` = "' . $id['id'] . '" AND `finish` = "0" AND `time` = "' . $id['time_start'] . '" ORDER BY `money` DESC LIMIT 100'
|
||||
);
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$ur = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`login`,`room`,`name`,`sex`,`inUser`,`twink`,`lose`,`nich`,`win` FROM `users` WHERE `id` = "' . $pl['uid'] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$ur = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`login`,`room`,`name`,`sex`,`inUser`,`twink`,`lose`,`nich`,`win` FROM `users` WHERE `id` = "' . $pl['uid'] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
$ub = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`login`,`room`,`name`,`sex`,`inUser`,`twink`,`lose`,`nich`,`win` FROM `users` WHERE `id` = "' . $ur['inUser'] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($ur['id']) && isset($ub['id']) && $ub['lose'] <= 0 && $ub['nich'] <= 0) {
|
||||
$win = $ub;
|
||||
$winr = $ur;
|
||||
}
|
||||
$ub = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`login`,`room`,`name`,`sex`,`inUser`,`twink`,`lose`,`nich`,`win` FROM `users` WHERE `id` = "' . $ur['inUser'] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($ur['id']) && isset($ub['id']) && $ub['lose'] <= 0 && $ub['nich'] <= 0) {
|
||||
$win = $ub;
|
||||
$winr = $ur;
|
||||
}
|
||||
}
|
||||
|
||||
/* завершаем БС */
|
||||
if (isset($win['id']) && $win['lose'] == 0 && $win['nich'] == 0 && $win['id'] > 0) {
|
||||
//есть победитель
|
||||
$bsep = 0;
|
||||
if ($winr['level'] < 6) {
|
||||
$bsep = 2500;
|
||||
} elseif ($winr['level'] < 7) {
|
||||
$bsep = 5000;
|
||||
} elseif ($winr['level'] < 8) {
|
||||
$bsep = 15000;
|
||||
} elseif ($winr['level'] < 9) {
|
||||
$bsep = 25000;
|
||||
} else {
|
||||
$bsep = 50000;
|
||||
}
|
||||
/* Выдаем приз */
|
||||
$mn = (round($id['money'] / 100 * 85));
|
||||
mysql_query(
|
||||
'UPDATE `users` SET `money` = `money` + "' . $mn . '" WHERE `id` = "' . $winr['id'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query(
|
||||
'UPDATE `stats` SET `exp` = `exp` + "' . $bsep . '" WHERE `id` = "' . $winr['id'] . '" LIMIT 1'
|
||||
);
|
||||
/* чат */
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','0','','" . $winr['login'] . "','Поздравляем! Вы победили в турнире "Башня Смерти"! Получено опыта: " . $bsep . ", деньги: " . $mn . " кр.','-1','6','0')"
|
||||
);
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','0','','','<font color=red>Внимание!</font> Завершился турнир "Башня Смерти", победитель турнира: <strong>" . $winr['login'] . "</strong>! Поздравляем!','-1','5','0')"
|
||||
);
|
||||
$this->addDelo(
|
||||
1, $uid,
|
||||
'"<font color=#C65F00>WinTournament.' . $this->info['city'] . '</font>" (Башня Смерти): Получено "<strong>' . $mn . '</strong> кр."',
|
||||
time(), $this->info['city'], 'WinTournament.' . $this->info['city'] . '', 0, 0
|
||||
);
|
||||
$chat = new Chat();
|
||||
$cmsg = new ChatMessage();
|
||||
|
||||
/* завершаем БС */
|
||||
if (isset($win['id']) && $win['lose'] == 0 && $win['nich'] == 0 && $win['id'] > 0) {
|
||||
//есть победитель
|
||||
$bsep = 0;
|
||||
if ($winr['level'] < 6) {
|
||||
$bsep = 2500;
|
||||
} elseif ($winr['level'] < 7) {
|
||||
$bsep = 5000;
|
||||
} elseif ($winr['level'] < 8) {
|
||||
$bsep = 15000;
|
||||
} elseif ($winr['level'] < 9) {
|
||||
$bsep = 25000;
|
||||
} else {
|
||||
//нет победителя
|
||||
//Выдаем травму
|
||||
|
||||
/* чат */
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','0','','','<font color=red>Внимание!</font> Завершился турнир "Башня Смерти", победитель турнира: отсутствует.','-1','5','0')"
|
||||
);
|
||||
$bsep = 50000;
|
||||
}
|
||||
|
||||
$sp = mysql_query(
|
||||
'SELECT `id`,`bsid`,`money`,`finish`,`time`,`inBot`,`uid` FROM `bs_zv` WHERE `bsid` = "' . $id['id'] . '" AND `time` = "' . $id['time_start'] . '" ORDER BY `money` DESC LIMIT 100'
|
||||
/* Выдаем приз */
|
||||
$mn = (round($id['money'] / 100 * 85));
|
||||
mysql_query(
|
||||
'UPDATE `users` SET `money` = `money` + "' . $mn . '" WHERE `id` = "' . $winr['id'] . '" LIMIT 1'
|
||||
);
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$ur = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`login`,`room`,`name`,`sex`,`inUser`,`lose`,`nich`,`win` FROM `users` WHERE `id` = "' . $pl['uid'] . '" LIMIT 1'
|
||||
)
|
||||
mysql_query(
|
||||
'UPDATE `stats` SET `exp` = `exp` + "' . $bsep . '" WHERE `id` = "' . $winr['id'] . '" LIMIT 1'
|
||||
);
|
||||
/* чат */
|
||||
$cmsg->setTo($winr['login']);
|
||||
$cmsg->setText("Поздравляем! Вы победили в турнире "Башня Смерти"! Получено опыта: $bsep, деньги: $mn кр.");
|
||||
$cmsg->setType(6);
|
||||
$chat->sendMsg($cmsg);
|
||||
|
||||
$cmsg->setTo('');
|
||||
$cmsg->setIsAlert(true);
|
||||
$cmsg->setText("Завершился турнир "Башня Смерти", победитель турнира: <strong>{$winr['login']}</strong>! Поздравляем!");
|
||||
$cmsg->setType(5);
|
||||
$chat->sendMsg($cmsg);
|
||||
|
||||
$this->addDelo(
|
||||
1, $uid,
|
||||
'"<span style="color: #C65F00; ">WinTournament.' . $this->info['city'] . '</span>" (Башня Смерти): Получено "<strong>' . $mn . '</strong> кр."',
|
||||
time(), $this->info['city'], 'WinTournament.' . $this->info['city'] . '', 0, 0
|
||||
);
|
||||
} else {
|
||||
/* чат */
|
||||
$cmsg->setIsAlert(true);
|
||||
$cmsg->setType(5);
|
||||
$cmsg->setText('Завершился турнир «Башня Смерти», победитель турнира: отсутствует.');
|
||||
}
|
||||
|
||||
$sp = mysql_query(
|
||||
'SELECT `id`,`bsid`,`money`,`finish`,`time`,`inBot`,`uid` FROM `bs_zv` WHERE `bsid` = "' . $id['id'] . '" AND `time` = "' . $id['time_start'] . '" ORDER BY `money` DESC LIMIT 100'
|
||||
);
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$ur = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`login`,`room`,`name`,`sex`,`inUser`,`lose`,`nich`,`win` FROM `users` WHERE `id` = "' . $pl['uid'] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
$ub = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`login`,`room`,`name`,`sex`,`inUser`,`lose`,`nich`,`win` FROM `users` WHERE `id` = "' . $ur['inUser'] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($ub['id'])) {
|
||||
//del
|
||||
mysql_query('DELETE FROM `users` WHERE `id` = "' . $ub['id'] . '" LIMIT 1');
|
||||
mysql_query('DELETE FROM `stats` WHERE `id` = "' . $ub['id'] . '" LIMIT 1');
|
||||
mysql_query('DELETE FROM `items_users` WHERE `uid` = "' . $ub['id'] . '" LIMIT 500');
|
||||
mysql_query('DELETE FROM `eff_users` WHERE `uid` = "' . $ub['id'] . '" LIMIT 500');
|
||||
//upd
|
||||
mysql_query(
|
||||
'UPDATE `bs_zv` SET `finish` = "' . time() . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1'
|
||||
);
|
||||
$ub = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`login`,`room`,`name`,`sex`,`inUser`,`lose`,`nich`,`win` FROM `users` WHERE `id` = "' . $ur['inUser'] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($ub['id'])) {
|
||||
//del
|
||||
mysql_query('DELETE FROM `users` WHERE `id` = "' . $ub['id'] . '" LIMIT 1');
|
||||
mysql_query('DELETE FROM `stats` WHERE `id` = "' . $ub['id'] . '" LIMIT 1');
|
||||
mysql_query('DELETE FROM `items_users` WHERE `uid` = "' . $ub['id'] . '" LIMIT 500');
|
||||
mysql_query('DELETE FROM `eff_users` WHERE `uid` = "' . $ub['id'] . '" LIMIT 500');
|
||||
//upd
|
||||
mysql_query(
|
||||
'UPDATE `bs_zv` SET `finish` = "' . time() . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query('UPDATE `users` SET `inUser` = "0" WHERE `id` = "' . $pl['uid'] . '" LIMIT 1');
|
||||
}
|
||||
mysql_query('UPDATE `users` SET `inUser` = 0 WHERE `id` = "' . $pl['uid'] . '" LIMIT 1');
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -9063,10 +9069,15 @@ LIMIT 1'
|
||||
}
|
||||
}
|
||||
if (isset($u['id']) && ($e['type1'] < 11 || ($e['type1'] > 16 && $e['type1'] < 23)) && $e['noch'] == 0) {
|
||||
$text = 'Закончилось действие эффекта "<strong>' . $e['name'] . '</strong>"';
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`new`) VALUES ('" . $u['city'] . "','" . $u['room'] . "','','" . $u['login'] . "','" . $text . "','-1','6','0',1)"
|
||||
);
|
||||
$text = "Закончилось действие эффекта «<strong>{$e['name']}</strong>»";
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u['city']);
|
||||
$cmsg->setRoom($u['room']);
|
||||
$cmsg->setTo($u['login']);
|
||||
$cmsg->setText($text);
|
||||
$cmsg->setType(6);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
|
||||
if ($u['battle'] > 0) {
|
||||
$lastHOD = mysql_fetch_array(
|
||||
mysql_query(
|
||||
@ -11187,27 +11198,59 @@ LIMIT 1'
|
||||
return $rt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Уродец, дублирующий Chat то тут то там.
|
||||
* Сидишь, никого не трогаешь, правишь и вдруг класс User тебя с размаху мордой в грязь!
|
||||
* Привет пачка вызовов буквально отовсюду, потому что класс User это же так удобно, класс User он же везде...
|
||||
* @param string $color
|
||||
* @param int $room
|
||||
* @param string $city
|
||||
* @param string $from
|
||||
* @param string $to
|
||||
* @param string $text
|
||||
* @param int $time
|
||||
* @param int $type
|
||||
* @param int $toChat
|
||||
* @param int $spam
|
||||
* @param int $sound
|
||||
* @param int $new
|
||||
* @param int $typeTime
|
||||
* @param int $global
|
||||
* @deprecated
|
||||
* @todo убрать нахуй заменив нативными вызовами.
|
||||
*/
|
||||
public function send(
|
||||
$color,
|
||||
$room,
|
||||
$city,
|
||||
$from,
|
||||
$to,
|
||||
$text,
|
||||
$time,
|
||||
$type,
|
||||
$toChat,
|
||||
$spam,
|
||||
$sound,
|
||||
$new = 1,
|
||||
$typeTime = 0,
|
||||
$global = 0
|
||||
string $color,
|
||||
int $room,
|
||||
string $city,
|
||||
string $from,
|
||||
string $to,
|
||||
string $text,
|
||||
int $time,
|
||||
int $type,
|
||||
int $toChat,
|
||||
int $spam,
|
||||
int $sound,
|
||||
int $new = 1,
|
||||
int $typeTime = 0,
|
||||
int $global = 0
|
||||
) {
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`global`,`typeTime`,`new`,`sound`,`color`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`spam`) VALUES
|
||||
('" . $global . "','" . $typeTime . "','" . $new . "','" . $sound . "','" . $color . "','" . $city . "','" . $room . "','" . $from . "','" . $to . "','" . $text . "','" . $time . "','" . $type . "','" . $toChat . "','" . $spam . "')"
|
||||
);
|
||||
return mysql_insert_id();
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setColor($color);
|
||||
$cmsg->setCity($city);
|
||||
$cmsg->setRoom($room);
|
||||
$cmsg->setLogin($from);
|
||||
$cmsg->setTo($to);
|
||||
$cmsg->setText($text);
|
||||
$cmsg->setTime($time);
|
||||
$cmsg->setType($type);
|
||||
$cmsg->setToChat($toChat);
|
||||
$cmsg->setSpam($spam);
|
||||
$cmsg->setSound($sound);
|
||||
$cmsg->setNew($new);
|
||||
$cmsg->setTypeTime($typeTime);
|
||||
$cmsg->setGlobal($global);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
}
|
||||
|
||||
//получаем уровень
|
||||
|
@ -26,17 +26,6 @@ if( isset($s[1]) && $s[1] == '101/sunduk2' ) {
|
||||
"'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'",""
|
||||
)');
|
||||
|
||||
/*
|
||||
//откуда тут сущности? обломятся!
|
||||
if( rand(0,100) < 10 ) {
|
||||
//Сущность сапог
|
||||
$this->pickitem($obj,4279,0);
|
||||
}
|
||||
if( rand(0,100) < 10 ) {
|
||||
//Сущность щита
|
||||
$this->pickitem($obj,4269,0);
|
||||
}
|
||||
*/
|
||||
if( $this->pickitem($obj,$vad['items'],0) ) {
|
||||
$r = 'Вы обнаружили предметы...';
|
||||
}else{
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,45 +1,67 @@
|
||||
<?
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
<?php
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
|
||||
if( $itm['magic_inci'] == 'chains' && $itm['iznosNOW'] < $itm['iznosMAX']) {
|
||||
$usr = mysql_fetch_array(mysql_query('SELECT `st`.`x`,`st`.`y`,`st`.`timeGo`,`st`.`clone`,`u`.`bot_id`,`u`.`type_pers`,`u`.`inTurnir`,`st`.`zv`,`st`.`bot`,`st`.`hpNow`,`u`.`login`,`st`.`dnow`,`u`.`id`,`u`.`align`,`u`.`admin`,`u`.`clan`,`u`.`level`,`u`.`room`,`u`.`online`,`u`.`battle`,`st`.`team` FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON (`u`.`id` = `st`.`id`) WHERE `u`.`city` = "'.$u->info['city'].'" AND (`u`.`login`="'.mysql_real_escape_string($_GET['login']).'" OR `u`.`login`="'.mysql_real_escape_string($jl).'") LIMIT 1'));
|
||||
if(isset($usr['id']) && $usr['online'] > time()-520 ) {
|
||||
//Путы на 1-10 мин
|
||||
if( $u->info['room'] != $usr['room'] ) {
|
||||
$u->error = 'Персонаж находится в другой комнате';
|
||||
}else{
|
||||
if( $u->info['room'] >= 362 && $u->info['room'] <= 366 && ( $u->info['x'] != $usr['x'] || $u->info['y'] != $usr['y'] ) ) {
|
||||
$u->error = 'Персонаж находится в другой комнате';
|
||||
}elseif( $usr['timeGo'] > time()+120 ) {
|
||||
$u->error = 'Персонаж "'.$usr['login'].'" уже обездвижен';
|
||||
}else{
|
||||
$rmin = rand(1,10);
|
||||
if( $usr['timeGo'] < time() ) {
|
||||
$usr['timeGo'] = time();
|
||||
}
|
||||
$usr['timeGo'] += $rmin*60;
|
||||
$putu = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `img2` = "chains.gif" AND `delete` = "0" AND `uid` = "'.$usr['id'].'" LIMIT 1'));
|
||||
if(!isset($putu['id'])) {
|
||||
mysql_query('INSERT INTO `eff_users` (`user_use`,`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`,`img2`) VALUES (
|
||||
"'.$u->info['login'].'","2","'.$usr['id'].'","Путы","puti='.$usr['timeGo'].'","1","'.$usr['timeGo'].'","chains.gif"
|
||||
) ');
|
||||
}else{
|
||||
mysql_query('UPDATE `eff_users` SET `timeUse` = "'.$usr['timeGo'].'" WHERE `id` = "'.$putu['id'].'" LIMIT 1');
|
||||
}
|
||||
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1');
|
||||
mysql_query('UPDATE `stats` SET `timeGo` = "'.$usr['timeGo'].'",`timeGoL` = "'.$usr['timeGo'].'" WHERE `id` = "'.$usr['id'].'" LIMIT 1');
|
||||
if( $u->info['id'] != $usr['id'] ) {
|
||||
$rtxt = '[img[items/chains.gif]] Персонаж "'.$u->info['login'].'" использовал "'.$itm['name'].'" на "'.$usr['login'].'" и обеждвижил еще на '.$rmin.' мин.';
|
||||
mysql_query("INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`,`new`) VALUES ('".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1','1')");
|
||||
}
|
||||
$u->error = 'Вы успешно использовали "'.$itm['name'].'" на '.$usr['login'].', на '.$rmin.' мин.';
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$u->error = 'Персонаж не найден в этом городе';
|
||||
}
|
||||
if ($itm['magic_inci'] == 'chains' && $itm['iznosNOW'] < $itm['iznosMAX']) {
|
||||
$usr = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `st`.`x`,`st`.`y`,`st`.`timeGo`,`st`.`clone`,`u`.`bot_id`,`u`.`type_pers`,`u`.`inTurnir`,`st`.`zv`,`st`.`bot`,`st`.`hpNow`,`u`.`login`,`st`.`dnow`,`u`.`id`,`u`.`align`,`u`.`admin`,`u`.`clan`,`u`.`level`,`u`.`room`,`u`.`online`,`u`.`battle`,`st`.`team` FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON (`u`.`id` = `st`.`id`) WHERE `u`.`city` = "' . $u->info['city'] . '" AND (`u`.`login`="' . mysql_real_escape_string(
|
||||
$_GET['login']
|
||||
) . '" OR `u`.`login`="' . mysql_real_escape_string($jl) . '") LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($usr['id']) && $usr['online'] > time() - 520) {
|
||||
//Путы на 1-10 мин
|
||||
if ($u->info['room'] != $usr['room']) {
|
||||
$u->error = 'Персонаж находится в другой комнате';
|
||||
} else {
|
||||
if ($u->info['room'] >= 362 && $u->info['room'] <= 366 && ($u->info['x'] != $usr['x'] || $u->info['y'] != $usr['y'])) {
|
||||
$u->error = 'Персонаж находится в другой комнате';
|
||||
} elseif ($usr['timeGo'] > time() + 120) {
|
||||
$u->error = 'Персонаж "' . $usr['login'] . '" уже обездвижен';
|
||||
} else {
|
||||
$rmin = rand(1, 10);
|
||||
if ($usr['timeGo'] < time()) {
|
||||
$usr['timeGo'] = time();
|
||||
}
|
||||
$usr['timeGo'] += $rmin * 60;
|
||||
$putu = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `eff_users` WHERE `img2` = "chains.gif" AND `delete` = "0" AND `uid` = "' . $usr['id'] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (!isset($putu['id'])) {
|
||||
mysql_query(
|
||||
'INSERT INTO `eff_users` (`user_use`,`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`,`img2`) VALUES (
|
||||
"' . $u->info['login'] . '","2","' . $usr['id'] . '","Путы","puti=' . $usr['timeGo'] . '","1","' . $usr['timeGo'] . '","chains.gif"
|
||||
) '
|
||||
);
|
||||
} else {
|
||||
mysql_query(
|
||||
'UPDATE `eff_users` SET `timeUse` = "' . $usr['timeGo'] . '" WHERE `id` = "' . $putu['id'] . '" LIMIT 1'
|
||||
);
|
||||
}
|
||||
mysql_query(
|
||||
'UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = ' . $itm['id'] . ' LIMIT 1'
|
||||
);
|
||||
mysql_query(
|
||||
'UPDATE `stats` SET `timeGo` = "' . $usr['timeGo'] . '",`timeGoL` = "' . $usr['timeGo'] . '" WHERE `id` = "' . $usr['id'] . '" LIMIT 1'
|
||||
);
|
||||
if ($u->info['id'] != $usr['id']) {
|
||||
$rtxt = '[img[items/chains.gif]] Персонаж "' . $u->info['login'] . '" использовал "' . $itm['name'] . '" на "' . $usr['login'] . '" и обеждвижил еще на ' . $rmin . ' мин.';
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
}
|
||||
$u->error = 'Вы успешно использовали "' . $itm['name'] . '" на ' . $usr['login'] . ', на ' . $rmin . ' мин.';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$u->error = 'Персонаж не найден в этом городе';
|
||||
}
|
||||
}
|
||||
?>
|
@ -1,70 +1,89 @@
|
||||
<?
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
<?php
|
||||
//Феерверк
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
if ($itm['magic_inci'] != 'feerverks') {
|
||||
return;
|
||||
}
|
||||
if ($u->room['id'] != '9') {
|
||||
$u->error = 'Вы не на Центральной Площади';
|
||||
} elseif (isset($lif['id'])) {
|
||||
$u->error = 'Запускать феерверки возможно не чаще одного раза в 10 сек.';
|
||||
} else {
|
||||
$chat = new Chat();
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(2);
|
||||
|
||||
if( $itm['magic_inci'] == 'feerverks' ) {
|
||||
//Феерверк
|
||||
if( $u->room['id'] != '9' ) {
|
||||
$u->error = 'Вы не на Центральной Площади';
|
||||
}else{
|
||||
//$lif = mysql_fetch_array(mysql_query('SELECT `id` FROM `feerverks` WHERE `uid` = "'.$u->info['id'].'" AND `time` > "'.(time()-10).'" LIMIT 1'));
|
||||
if( !isset($lif['id']) ) {
|
||||
$po = $u->lookStats($itm['data']);
|
||||
$fid = 'fw04';
|
||||
if( isset($po['feerverk_eff']) ) {
|
||||
$fid = $po['feerverk_eff'];
|
||||
}
|
||||
mysql_query('INSERT INTO `feerverks` (`room`,`uid`,`time`,`fid`) VALUES ("'.$u->info['room'].'","'.$u->info['id'].'","'.time().'","'.$fid.'")');
|
||||
//
|
||||
if( $u->info['sex'] == 0 ) {
|
||||
$text = '[img[items/'.$itm['img'].']] <b>'.$u->info['login'].'</b> запустил фейерверк!';
|
||||
}else{
|
||||
$text = '[img[items/'.$itm['img'].']] <b>'.$u->info['login'].'</b> запустила фейерверк!';
|
||||
}
|
||||
//
|
||||
if( $po['feerverk_sound'] == 1 ) {
|
||||
$po['feerverk_sound'] = rand(8,10);
|
||||
}
|
||||
//
|
||||
mysql_query("INSERT INTO `chat` (`frv`,`sound`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`new`,`typeTime`) VALUES (
|
||||
'".$fid."','0','".$u->info['city']."','".$u->info['room']."','','','".$text."','".time()."','6','0','1','2')");
|
||||
//
|
||||
if( rand(0,100) < 10 ) {
|
||||
// У персонажа легкая травма - "Ожог от фейерверка" еще 3 мин. 43 сек.
|
||||
// 22.02.14 21:14 лосенка пострадала от фейерверка! :fingal:
|
||||
$spf = mysql_query('SELECT `id`,`login`,`sex` FROM `users` WHERE `online` > "'.(time()-120).'" AND `invis` = "0" AND `battle` = "0" AND `room` = "'.$u->info['room'].'" ORDER BY `online` DESC LIMIT 100');
|
||||
$fusr = array();
|
||||
while( $plf = mysql_fetch_array($spf) ) {
|
||||
//Иммунитет от травм, либо травма
|
||||
$nou = mysql_fetch_array(mysql_query('SELECT `id` FROM `eff_users` WHERE ( `id_eff` = "4" OR `id_eff` = "263" ) AND `uid` = "'.$plf['id'].'" AND `delete` = "0" LIMIT 1'));
|
||||
if( !isset($nou['id'])) {
|
||||
$fusr[] = $plf;
|
||||
}
|
||||
}
|
||||
unset($spf,$plf,$nou);
|
||||
$fusr = $fusr[rand(0, ( count($fusr) - 1 ) )];
|
||||
if( isset($fusr['id']) ) {
|
||||
//Пострадавший от фейерверка
|
||||
$ins = mysql_query('INSERT INTO `eff_users` (`overType`,`timeUse`,`hod`,`name`,`data`,`uid`, `id_eff`, `img2`, `timeAce`, `v1`) VALUES ("0","'.time().'","-1","Ожог от фейерверка","add_s'.rand(1,3).'=-'.rand(1,3).'|add_s'.rand(1,3).'=-'.rand(1,3).'","'.$fusr['id'].'", "4", "eff_travma1.gif","300", "1")');
|
||||
if( $fusr['sex'] == 0 ) {
|
||||
$text = '[img[items/travma.gif]] <b>'.$fusr['login'].'</b> пострадал от фейерверка! :fingal:';
|
||||
}else{
|
||||
$text = '[img[items/travma.gif]] <b>'.$fusr['login'].'</b> пострадала от фейерверка! :fingal:';
|
||||
}
|
||||
mysql_query("INSERT INTO `chat` (`sound`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`new`,`typeTime`) VALUES ('0','".$u->info['city']."','".$u->info['room']."','','','".$text."','".time()."','6','0','1','2')");
|
||||
}
|
||||
unset($fusr);
|
||||
}
|
||||
unset($text,$lif,$po);
|
||||
//
|
||||
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1');
|
||||
//
|
||||
$u->error = 'Вы успешно запустили феерверк "'.$itm['name'].'"!';
|
||||
}else{
|
||||
$u->error = 'Запускать феерверки возможно не чаще одного раза в 10 сек.';
|
||||
}
|
||||
}
|
||||
$po = $u->lookStats($itm['data']);
|
||||
$fid = 'fw04';
|
||||
if (isset($po['feerverk_eff'])) {
|
||||
$fid = $po['feerverk_eff'];
|
||||
}
|
||||
mysql_query(
|
||||
'INSERT INTO `feerverks` (`room`,`uid`,`time`,`fid`) VALUES ("' . $u->info['room'] . '","' . $u->info['id'] . '","' . time(
|
||||
) . '","' . $fid . '")'
|
||||
);
|
||||
//
|
||||
$a = $u->info['sex'] == 1 ? 'a' : ''; //окончание рода М\Ж в словах
|
||||
|
||||
//
|
||||
if ($po['feerverk_sound'] == 1) {
|
||||
$po['feerverk_sound'] = mt_rand(8, 10);
|
||||
}
|
||||
//
|
||||
$cmsg->setText("[img[items/{$itm['img']}]] <b>{$u->info['login']}</b> запустил$a фейерверк!");
|
||||
$cmsg->setFireworks($fid);
|
||||
$chat->sendMsg($cmsg);
|
||||
//
|
||||
if (rand(0, 100) < 10) {
|
||||
// У персонажа легкая травма - "Ожог от фейерверка" еще 3 мин. 43 сек.
|
||||
// 22.02.14 21:14 лосенка пострадала от фейерверка! :fingal:
|
||||
$spf = mysql_query(
|
||||
'SELECT `id`,`login`,`sex` FROM `users` WHERE `online` > "' . (time(
|
||||
) - 120) . '" AND `invis` = 0 AND `battle` = 0 AND `room` = "' . $u->info['room'] . '" ORDER BY `online` DESC LIMIT 100'
|
||||
);
|
||||
$fusr = [];
|
||||
while ($plf = mysql_fetch_array($spf)) {
|
||||
//Иммунитет от травм, либо травма
|
||||
$nou = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id` FROM `eff_users` WHERE ( `id_eff` = 4 OR `id_eff` = 263 ) AND `uid` = "' . $plf['id'] . '" AND `delete` = 0 LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (!isset($nou['id'])) {
|
||||
$fusr[] = $plf;
|
||||
}
|
||||
}
|
||||
unset($spf, $plf, $nou);
|
||||
$fusr = $fusr[rand(0, (count($fusr) - 1))];
|
||||
if (isset($fusr['id'])) {
|
||||
//Пострадавший от фейерверка
|
||||
$ins = mysql_query(
|
||||
'INSERT INTO `eff_users` (`overType`,`timeUse`,`hod`,`name`,`data`,`uid`, `id_eff`, `img2`, `timeAce`, `v1`) VALUES (
|
||||
0,
|
||||
unix_timestamp(),
|
||||
-1,
|
||||
"Ожог от фейерверка",
|
||||
"add_s' . mt_rand(1, 3) . '=-' . mt_rand(1, 3) . '|add_s' . mt_rand(1, 3) . '=-' . mt_rand(1, 3) . '",
|
||||
"' . $fusr['id'] . '",
|
||||
4,
|
||||
"eff_travma1.gif",
|
||||
300,
|
||||
1)'
|
||||
);
|
||||
$a = $fusr['sex'] == 1 ? 'a' : ''; //окончание рода М\Ж в словах
|
||||
$cmsg->setFireworks(null);
|
||||
$cmsg->setText("[img[items/travma.gif]] <b>{$fusr['login']}</b> пострадал$a от фейерверка! :fingal:");
|
||||
}
|
||||
unset($fusr);
|
||||
}
|
||||
unset($lif, $po);
|
||||
//
|
||||
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = ' . $itm['id'] . ' LIMIT 1');
|
||||
//
|
||||
$u->error = 'Вы успешно запустили феерверк "' . $itm['name'] . '"!';
|
||||
}
|
||||
?>
|
@ -1,28 +1,31 @@
|
||||
<?
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
<?php
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
if($u->info['login'] == $usr['login']) {
|
||||
$u->error = 'Нельзя использовать на себя!';
|
||||
}elseif($usr['room']==217 || $usr['room']==218 || $usr['room']==219) {
|
||||
$u->error = 'Персонаж '.$u->microLogin($usr['id'],1).' находится в Общежитии!';
|
||||
}elseif($usr['dnow'] > 0 ) {
|
||||
$u->error = 'Персонаж '.$u->microLogin($usr['id'],1).' находится в Подземелье';
|
||||
}elseif($usr['real']==1) {
|
||||
$u->error = 'Перемещать можно только реальных игроков!';
|
||||
}elseif($usr['bot'] > 0) {
|
||||
$u->error = 'Вы не можете поймать бота ;)';
|
||||
}elseif($usr['battle'] > 0) {
|
||||
$u->error = 'Персонаж '.$u->microLogin($usr['id'],1).' находится в поединке';
|
||||
}elseif($usr['room']==274) {
|
||||
$u->error = 'Персонаж '.$u->microLogin($usr['id'],1).' находится в Заточении!';
|
||||
}elseif($usr['online']<time()-520) {
|
||||
$u->error = 'Персонаж не в сети';
|
||||
}else{
|
||||
mysql_query('UPDATE `users` SET `room` = "'.$u->info['room'].'" WHERE `id` = "'.$usr['id'].'" LIMIT 1');
|
||||
$u->error = 'Успешно!';
|
||||
$txt = '[img[items/noose.gif]] Персонаж '.$u->info['login'].' поймал персонажа '.$usr['login'].' с помощью заклятия Арканы';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$txt."','".time()."','6','0','1')");
|
||||
if ($u->info['login'] == $usr['login']) {
|
||||
$u->error = 'Нельзя использовать на себя!';
|
||||
} elseif ($usr['room'] == 217 || $usr['room'] == 218 || $usr['room'] == 219) {
|
||||
$u->error = 'Персонаж ' . $u->microLogin($usr['id'], 1) . ' находится в Общежитии!';
|
||||
} elseif ($usr['dnow'] > 0) {
|
||||
$u->error = 'Персонаж ' . $u->microLogin($usr['id'], 1) . ' находится в Подземелье';
|
||||
} elseif ($usr['real'] == 1) {
|
||||
$u->error = 'Перемещать можно только реальных игроков!';
|
||||
} elseif ($usr['bot'] > 0) {
|
||||
$u->error = 'Вы не можете поймать бота ;)';
|
||||
} elseif ($usr['battle'] > 0) {
|
||||
$u->error = 'Персонаж ' . $u->microLogin($usr['id'], 1) . ' находится в поединке';
|
||||
} elseif ($usr['room'] == 274) {
|
||||
$u->error = 'Персонаж ' . $u->microLogin($usr['id'], 1) . ' находится в Заточении!';
|
||||
} elseif ($usr['online'] < time() - 520) {
|
||||
$u->error = 'Персонаж не в сети';
|
||||
} else {
|
||||
mysql_query('UPDATE `users` SET `room` = "' . $u->info['room'] . '" WHERE `id` = "' . $usr['id'] . '" LIMIT 1');
|
||||
$u->error = 'Успешно!';
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
$cmsg->setText("[img[items/noose.gif]] Персонаж {$u->info['login']} поймал персонажа {$usr['login']} с помощью заклятия Арканы");
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
}
|
||||
?>
|
@ -1,31 +1,57 @@
|
||||
<?
|
||||
if(!defined('GAME')) {
|
||||
die();
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
//выбираем эффект жертвы
|
||||
$eff = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `name` LIKE "%Жажда Жизни +%" AND `uid` = "'.$usr['id'].'" AND `delete` = "0" LIMIT 1'));
|
||||
$eff = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `eff_users` WHERE `name` LIKE "%Жажда Жизни +%" AND `uid` = "' . $usr['id'] . '" AND `delete` = "0" LIMIT 1'
|
||||
)
|
||||
);
|
||||
//эффект свой
|
||||
$eff_users = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `name` LIKE "%Жажда Жизни +%" AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" LIMIT 1'));
|
||||
$eff_users = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `eff_users` WHERE `name` LIKE "%Жажда Жизни +%" AND `uid` = "' . $u->info['id'] . '" AND `delete` = "0" LIMIT 1'
|
||||
)
|
||||
);
|
||||
//эффект защиты от вора
|
||||
$no_vor = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = "459" AND `uid` = "'.$usr['id'].'" AND `delete` = "0" LIMIT 1'));
|
||||
if($u->info['login']==$usr['login']) {
|
||||
$u->error = 'Глупец, ты не можешь украсть сам у себя ;)';
|
||||
}elseif(isset($no_vor['id'])) {
|
||||
$u->error = 'Персонаж '.$usr['login'].' не дремлет, будьте осторожны';
|
||||
}elseif($usr['battle'] > 0 ) {
|
||||
$u->error = 'Персонаж '.$usr['login'].' в поединке!';
|
||||
}elseif(!isset($eff['id'])) {
|
||||
$u->error = 'На персонаже '.$usr['login'].' нету эффекта "Жажда Жизни"';
|
||||
}elseif($eff_users['name'] && $eff_users['delete'] ==0) {
|
||||
$u->error = 'У вас есть Жажда Жизни!';
|
||||
}else{
|
||||
//воруем эффект
|
||||
mysql_query('UPDATE `eff_users` SET `uid` = "'.$u->info['id'].'" WHERE `uid` = "'.$usr['id'].'" AND `name` = "'.$eff['name'].'" LIMIT 1');
|
||||
$u->error = 'Вы украли эффект '.$eff['name'].' у персонажа '.$usr['login'].'!';
|
||||
//отправляем системку
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','0','','".$usr['login']."',' Персонаж <b>".$u->info['login']." </b>украл у вас эффект ".$eff['name']." .','-1','6','0')");
|
||||
$txt = '<font color=red>Внимание!</font> <b>'.$u->info['login'].'</b> украл эффект <b>'.$eff['name'].'</b> у персонажа <b>'.$usr['login'].'</b>';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$txt."','".time()."','6','0','1')");
|
||||
$u->deleteItem($itm['id']); //удаляем свиток
|
||||
$no_vor = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `eff_users` WHERE `id_eff` = "459" AND `uid` = "' . $usr['id'] . '" AND `delete` = "0" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if ($u->info['login'] == $usr['login']) {
|
||||
$u->error = 'Глупец, ты не можешь украсть сам у себя ;)';
|
||||
} elseif (isset($no_vor['id'])) {
|
||||
$u->error = 'Персонаж ' . $usr['login'] . ' не дремлет, будьте осторожны';
|
||||
} elseif ($usr['battle'] > 0) {
|
||||
$u->error = 'Персонаж ' . $usr['login'] . ' в поединке!';
|
||||
} elseif (!isset($eff['id'])) {
|
||||
$u->error = 'На персонаже ' . $usr['login'] . ' нету эффекта "Жажда Жизни"';
|
||||
} elseif ($eff_users['name'] && $eff_users['delete'] == 0) {
|
||||
$u->error = 'У вас есть Жажда Жизни!';
|
||||
} else {
|
||||
//воруем эффект
|
||||
mysql_query(
|
||||
'UPDATE `eff_users` SET `uid` = "' . $u->info['id'] . '" WHERE `uid` = "' . $usr['id'] . '" AND `name` = "' . $eff['name'] . '" LIMIT 1'
|
||||
);
|
||||
$u->error = 'Вы украли эффект ' . $eff['name'] . ' у персонажа ' . $usr['login'] . '!';
|
||||
//отправляем системку
|
||||
$chatDto = new ChatMessage();
|
||||
$chatDto->setTo($usr['login']);
|
||||
$chatDto->setText("Персонаж <b>{$u->info['login']}</b> украл у вас эффект {$eff['name']}.");
|
||||
$chatDto->setType(6);
|
||||
$chatDto->setTime(-1);
|
||||
(new Chat())->sendMsg($chatDto);
|
||||
|
||||
$chatDto = new ChatMessage();
|
||||
$chatDto->setCity($u->info['city']);
|
||||
$chatDto->setRoom($u->info['room']);
|
||||
$chatDto->setText("<b>{$u->info['login']}</b> украл эффект <b>{$eff['name']}</b> у персонажа <b>{$usr['login']}</b>.");
|
||||
$chatDto->setType(6);
|
||||
$chatDto->setTypeTime(1);
|
||||
$chatDto->setIsAlert(true);
|
||||
(new Chat())->sendMsg($chatDto);
|
||||
|
||||
$u->deleteItem($itm['id']); //удаляем свиток
|
||||
}
|
||||
?>
|
@ -1,32 +1,56 @@
|
||||
<?
|
||||
if(!defined('GAME')) {
|
||||
die();
|
||||
<?php
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
//выбираем эффект жертвы $usr
|
||||
$eff = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = "306" AND `uid` = "'.$usr['id'].'" AND `delete` = "0" LIMIT 1'));
|
||||
$eff = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `eff_users` WHERE `id_eff` = "306" AND `uid` = "' . $usr['id'] . '" AND `delete` = "0" LIMIT 1'
|
||||
)
|
||||
);
|
||||
//эффект свой
|
||||
$eff_users = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = "306" AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" LIMIT 1'));
|
||||
$eff_users = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `eff_users` WHERE `id_eff` = "306" AND `uid` = "' . $u->info['id'] . '" AND `delete` = "0" LIMIT 1'
|
||||
)
|
||||
);
|
||||
//эффект защиты от вора
|
||||
$no_vor = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = "459" AND `uid` = "'.$usr['id'].'" AND `delete` = "0" LIMIT 1'));
|
||||
if($u->info['login']==$usr['login']) {
|
||||
$u->error = 'Глупец, ты не можешь украсть сам у себя ;)';
|
||||
}elseif(isset($no_vor['id'])) {
|
||||
$u->error = 'Персонаж '.$usr['login'].' не дремлет, будьте осторожны';
|
||||
}elseif($usr['battle'] > 0 ) {
|
||||
$u->error = 'Персонаж '.$usr['login'].' в поединке!';
|
||||
}elseif(!isset($eff['id'])) {
|
||||
$u->error = 'На персонаже '.$usr['login'].' нету эффекта "Нектар Великана"';
|
||||
}elseif($eff_users['name'] && $eff_users['delete'] ==0) {
|
||||
$u->error = 'У вас есть Нектар Великана!';
|
||||
}else{
|
||||
//воруем эффект
|
||||
mysql_query('UPDATE `eff_users` SET `uid` = "'.$u->info['id'].'" WHERE `uid` = "'.$usr['id'].'" AND `name` = "'.$eff['name'].'" LIMIT 1');
|
||||
$u->error = 'Вы украли эффект '.$eff['name'].' у персонажа '.$usr['login'].'!';
|
||||
//отправляем системку
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','0','','".$usr['login']."',' Персонаж <b>".$u->info['login']." </b>украл у вас эффект ".$eff['name']." .','-1','6','0')");
|
||||
$txt = '<font color=red>Внимание!</font> <b>'.$u->info['login'].'</b> украл эффект <b>'.$eff['name'].'</b> у персонажа <b>'.$usr['login'].'</b>';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$txt."','".time()."','6','0','1')");
|
||||
$no_vor = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `eff_users` WHERE `id_eff` = "459" AND `uid` = "' . $usr['id'] . '" AND `delete` = "0" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if ($u->info['login'] == $usr['login']) {
|
||||
$u->error = 'Глупец, ты не можешь украсть сам у себя ;)';
|
||||
} elseif (isset($no_vor['id'])) {
|
||||
$u->error = 'Персонаж ' . $usr['login'] . ' не дремлет, будьте осторожны';
|
||||
} elseif ($usr['battle'] > 0) {
|
||||
$u->error = 'Персонаж ' . $usr['login'] . ' в поединке!';
|
||||
} elseif (!isset($eff['id'])) {
|
||||
$u->error = 'На персонаже ' . $usr['login'] . ' нету эффекта "Нектар Великана"';
|
||||
} elseif ($eff_users['name'] && $eff_users['delete'] == 0) {
|
||||
$u->error = 'У вас есть Нектар Великана!';
|
||||
} else {
|
||||
//воруем эффект
|
||||
mysql_query(
|
||||
'UPDATE `eff_users` SET `uid` = "' . $u->info['id'] . '" WHERE `uid` = "' . $usr['id'] . '" AND `name` = "' . $eff['name'] . '" LIMIT 1'
|
||||
);
|
||||
$u->error = 'Вы украли эффект ' . $eff['name'] . ' у персонажа ' . $usr['login'] . '!';
|
||||
//отправляем системку
|
||||
|
||||
$chat = new Chat();
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setTo($usr['login']);
|
||||
$cmsg->setText("Персонаж <b>{$u->info['login']}</b> украл у вас эффект {$eff['name']}.");
|
||||
$cmsg->setType(6);
|
||||
$chat->sendMsg($cmsg);
|
||||
$cmsg->setTo('');
|
||||
$cmsg->setText("<b>{$u->info['login']}</b> украл эффект {$eff['name']} у персонажа <b>{$usr['login']}</b>.");
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setTypeTime(1);
|
||||
$cmsg->setIsAlert(true);
|
||||
$chat->sendMsg($cmsg);
|
||||
//уменьшаем износ
|
||||
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1');
|
||||
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = ' . $itm['id'] . ' LIMIT 1');
|
||||
}
|
||||
?>
|
@ -1,32 +1,56 @@
|
||||
<?
|
||||
if(!defined('GAME')) {
|
||||
die();
|
||||
<?php
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
//выбираем эффект жертвы $usr
|
||||
$eff = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = "308" AND `uid` = "'.$usr['id'].'" AND `delete` = "0" LIMIT 1'));
|
||||
$eff = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `eff_users` WHERE `id_eff` = "308" AND `uid` = "' . $usr['id'] . '" AND `delete` = "0" LIMIT 1'
|
||||
)
|
||||
);
|
||||
//эффект свой
|
||||
$eff_users = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = "308" AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" LIMIT 1'));
|
||||
$eff_users = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `eff_users` WHERE `id_eff` = "308" AND `uid` = "' . $u->info['id'] . '" AND `delete` = "0" LIMIT 1'
|
||||
)
|
||||
);
|
||||
//эффект защиты от вора
|
||||
$no_vor = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = "459" AND `uid` = "'.$usr['id'].'" AND `delete` = "0" LIMIT 1'));
|
||||
if($u->info['login']==$usr['login']) {
|
||||
$u->error = 'Глупец, ты не можешь украсть сам у себя ;)';
|
||||
}elseif(isset($no_vor['id'])) {
|
||||
$u->error = 'Персонаж '.$usr['login'].' не дремлет, будьте осторожны';
|
||||
}elseif($usr['battle'] > 0 ) {
|
||||
$u->error = 'Персонаж '.$usr['login'].' в поединке!';
|
||||
}elseif(!isset($eff['id'])) {
|
||||
$u->error = 'На персонаже '.$usr['login'].' нету эффекта "Нектар Змеи"';
|
||||
}elseif($eff_users['name'] && $eff_users['delete'] ==0) {
|
||||
$u->error = 'У вас есть Нектар Змеи!';
|
||||
}else{
|
||||
//воруем эффект
|
||||
mysql_query('UPDATE `eff_users` SET `uid` = "'.$u->info['id'].'" WHERE `uid` = "'.$usr['id'].'" AND `name` = "'.$eff['name'].'" LIMIT 1');
|
||||
$u->error = 'Вы украли эффект '.$eff['name'].' у персонажа '.$usr['login'].'!';
|
||||
//отправляем системку
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','0','','".$usr['login']."',' Персонаж <b>".$u->info['login']." </b>украл у вас эффект ".$eff['name']." .','-1','6','0')");
|
||||
$txt = '<font color=red>Внимание!</font> <b>'.$u->info['login'].'</b> украл эффект <b>'.$eff['name'].'</b> у персонажа <b>'.$usr['login'].'</b>';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$txt."','".time()."','6','0','1')");
|
||||
$no_vor = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `eff_users` WHERE `id_eff` = "459" AND `uid` = "' . $usr['id'] . '" AND `delete` = "0" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if ($u->info['login'] == $usr['login']) {
|
||||
$u->error = 'Глупец, ты не можешь украсть сам у себя ;)';
|
||||
} elseif (isset($no_vor['id'])) {
|
||||
$u->error = 'Персонаж ' . $usr['login'] . ' не дремлет, будьте осторожны';
|
||||
} elseif ($usr['battle'] > 0) {
|
||||
$u->error = 'Персонаж ' . $usr['login'] . ' в поединке!';
|
||||
} elseif (!isset($eff['id'])) {
|
||||
$u->error = 'На персонаже ' . $usr['login'] . ' нету эффекта "Нектар Змеи"';
|
||||
} elseif ($eff_users['name'] && $eff_users['delete'] == 0) {
|
||||
$u->error = 'У вас есть Нектар Змеи!';
|
||||
} else {
|
||||
//воруем эффект
|
||||
mysql_query(
|
||||
'UPDATE `eff_users` SET `uid` = "' . $u->info['id'] . '" WHERE `uid` = "' . $usr['id'] . '" AND `name` = "' . $eff['name'] . '" LIMIT 1'
|
||||
);
|
||||
$u->error = 'Вы украли эффект ' . $eff['name'] . ' у персонажа ' . $usr['login'] . '!';
|
||||
//отправляем системку
|
||||
|
||||
$chat = new Chat();
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setTo($usr['login']);
|
||||
$cmsg->setText("Персонаж <b>{$u->info['login']}</b> украл у вас эффект {$eff['name']}.");
|
||||
$cmsg->setType(6);
|
||||
$chat->sendMsg($cmsg);
|
||||
$cmsg->setTo('');
|
||||
$cmsg->setText("<b>{$u->info['login']}</b> украл эффект {$eff['name']} у персонажа <b>{$usr['login']}</b>.");
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setTypeTime(1);
|
||||
$cmsg->setIsAlert(true);
|
||||
$chat->sendMsg($cmsg);
|
||||
//уменьшаем износ
|
||||
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1');
|
||||
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = ' . $itm['id'] . ' LIMIT 1');
|
||||
}
|
||||
?>
|
@ -1,32 +1,56 @@
|
||||
<?
|
||||
if(!defined('GAME')) {
|
||||
die();
|
||||
<?php
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
//выбираем эффект жертвы $usr
|
||||
$eff = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = "307" AND `uid` = "'.$usr['id'].'" AND `delete` = "0" LIMIT 1'));
|
||||
$eff = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `eff_users` WHERE `id_eff` = "307" AND `uid` = "' . $usr['id'] . '" AND `delete` = "0" LIMIT 1'
|
||||
)
|
||||
);
|
||||
//эффект свой
|
||||
$eff_users = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = "307" AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" LIMIT 1'));
|
||||
$eff_users = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `eff_users` WHERE `id_eff` = "307" AND `uid` = "' . $u->info['id'] . '" AND `delete` = "0" LIMIT 1'
|
||||
)
|
||||
);
|
||||
//эффект защиты от вора
|
||||
$no_vor = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = "459" AND `uid` = "'.$usr['id'].'" AND `delete` = "0" LIMIT 1'));
|
||||
if($u->info['login']==$usr['login']) {
|
||||
$u->error = 'Глупец, ты не можешь украсть сам у себя ;)';
|
||||
}elseif(isset($no_vor['id'])) {
|
||||
$u->error = 'Персонаж '.$usr['login'].' не дремлет, будьте осторожны';
|
||||
}elseif($usr['battle'] > 0 ) {
|
||||
$u->error = 'Персонаж '.$usr['login'].' в поединке!';
|
||||
}elseif(!isset($eff['id'])) {
|
||||
$u->error = 'Нет эффекта на персонаже...';
|
||||
}elseif($eff_users['name'] && $eff_users['delete'] ==0) {
|
||||
$u->error = 'На персонаже '.$usr['login'].' нету эффекта "Нектар Предчувствия"';
|
||||
}else{
|
||||
//воруем эффект
|
||||
mysql_query('UPDATE `eff_users` SET `uid` = "'.$u->info['id'].'" WHERE `uid` = "'.$usr['id'].'" AND `name` = "'.$eff['name'].'" LIMIT 1');
|
||||
$u->error = 'Вы украли эффект '.$eff['name'].' у персонажа '.$usr['login'].'!';
|
||||
//отправляем системку
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','0','','".$usr['login']."',' Персонаж <b>".$u->info['login']." </b>украл у вас эффект ".$eff['name']." .','-1','6','0')");
|
||||
$txt = '<font color=red>Внимание!</font> <b>'.$u->info['login'].'</b> украл эффект <b>'.$eff['name'].'</b> у персонажа <b>'.$usr['login'].'</b>';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$txt."','".time()."','6','0','1')");
|
||||
$no_vor = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `eff_users` WHERE `id_eff` = "459" AND `uid` = "' . $usr['id'] . '" AND `delete` = "0" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if ($u->info['login'] == $usr['login']) {
|
||||
$u->error = 'Глупец, ты не можешь украсть сам у себя ;)';
|
||||
} elseif (isset($no_vor['id'])) {
|
||||
$u->error = 'Персонаж ' . $usr['login'] . ' не дремлет, будьте осторожны';
|
||||
} elseif ($usr['battle'] > 0) {
|
||||
$u->error = 'Персонаж ' . $usr['login'] . ' в поединке!';
|
||||
} elseif (!isset($eff['id'])) {
|
||||
$u->error = 'Нет эффекта на персонаже...';
|
||||
} elseif ($eff_users['name'] && $eff_users['delete'] == 0) {
|
||||
$u->error = 'На персонаже ' . $usr['login'] . ' нету эффекта "Нектар Предчувствия"';
|
||||
} else {
|
||||
//воруем эффект
|
||||
mysql_query(
|
||||
'UPDATE `eff_users` SET `uid` = "' . $u->info['id'] . '" WHERE `uid` = "' . $usr['id'] . '" AND `name` = "' . $eff['name'] . '" LIMIT 1'
|
||||
);
|
||||
$u->error = 'Вы украли эффект ' . $eff['name'] . ' у персонажа ' . $usr['login'] . '!';
|
||||
//отправляем системку
|
||||
|
||||
$chat = new Chat();
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setTo($usr['login']);
|
||||
$cmsg->setText("Персонаж <b>{$u->info['login']}</b> украл у вас эффект {$eff['name']}.");
|
||||
$cmsg->setType(6);
|
||||
$chat->sendMsg($cmsg);
|
||||
$cmsg->setTo('');
|
||||
$cmsg->setText("<b>{$u->info['login']}</b> украл эффект {$eff['name']} у персонажа <b>{$usr['login']}</b>.");
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setTypeTime(1);
|
||||
$cmsg->setIsAlert(true);
|
||||
$chat->sendMsg($cmsg);
|
||||
//уменьшаем износ
|
||||
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1');
|
||||
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = ' . $itm['id'] . ' LIMIT 1');
|
||||
}
|
||||
?>
|
@ -1,32 +1,56 @@
|
||||
<?
|
||||
if(!defined('GAME')) {
|
||||
die();
|
||||
<?php
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
//выбираем эффект жертвы $usr
|
||||
$eff = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = "309" AND `uid` = "'.$usr['id'].'" AND `delete` = "0" LIMIT 1'));
|
||||
$eff = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `eff_users` WHERE `id_eff` = "309" AND `uid` = "' . $usr['id'] . '" AND `delete` = "0" LIMIT 1'
|
||||
)
|
||||
);
|
||||
//эффект свой
|
||||
$eff_users = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = "309" AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" LIMIT 1'));
|
||||
$eff_users = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `eff_users` WHERE `id_eff` = "309" AND `uid` = "' . $u->info['id'] . '" AND `delete` = "0" LIMIT 1'
|
||||
)
|
||||
);
|
||||
//эффект защиты от вора
|
||||
$no_vor = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = "459" AND `uid` = "'.$usr['id'].'" AND `delete` = "0" LIMIT 1'));
|
||||
if($u->info['login']==$usr['login']) {
|
||||
$u->error = 'Глупец, ты не можешь украсть сам у себя ;)';
|
||||
}elseif(isset($no_vor['id'])) {
|
||||
$u->error = 'Персонаж '.$usr['login'].' не дремлет, будьте осторожны';
|
||||
}elseif($usr['battle'] > 0 ) {
|
||||
$u->error = 'Персонаж '.$usr['login'].' в поединке!';
|
||||
}elseif(!isset($eff['id'])) {
|
||||
$u->error = 'На персонаже '.$usr['login'].' нету эффекта "Нектар Разума"';
|
||||
}elseif($eff_users['name'] && $eff_users['delete'] ==0) {
|
||||
$u->error = 'У вас есть Нектар Разума';
|
||||
}else{
|
||||
//воруем эффект
|
||||
mysql_query('UPDATE `eff_users` SET `uid` = "'.$u->info['id'].'" WHERE `uid` = "'.$usr['id'].'" AND `name` = "'.$eff['name'].'" LIMIT 1');
|
||||
$u->error = 'Вы украли эффект '.$eff['name'].' у персонажа '.$usr['login'].'!';
|
||||
//отправляем системку
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','0','','".$usr['login']."',' Персонаж <b>".$u->info['login']." </b>украл у вас эффект ".$eff['name']." .','-1','6','0')");
|
||||
$txt = '<font color=red>Внимание!</font> <b>'.$u->info['login'].'</b> украл эффект <b>'.$eff['name'].'</b> у персонажа <b>'.$usr['login'].'</b>';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$txt."','".time()."','6','0','1')");
|
||||
$no_vor = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `eff_users` WHERE `id_eff` = "459" AND `uid` = "' . $usr['id'] . '" AND `delete` = "0" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if ($u->info['login'] == $usr['login']) {
|
||||
$u->error = 'Глупец, ты не можешь украсть сам у себя ;)';
|
||||
} elseif (isset($no_vor['id'])) {
|
||||
$u->error = 'Персонаж ' . $usr['login'] . ' не дремлет, будьте осторожны';
|
||||
} elseif ($usr['battle'] > 0) {
|
||||
$u->error = 'Персонаж ' . $usr['login'] . ' в поединке!';
|
||||
} elseif (!isset($eff['id'])) {
|
||||
$u->error = 'На персонаже ' . $usr['login'] . ' нету эффекта "Нектар Разума"';
|
||||
} elseif ($eff_users['name'] && $eff_users['delete'] == 0) {
|
||||
$u->error = 'У вас есть Нектар Разума';
|
||||
} else {
|
||||
//воруем эффект
|
||||
mysql_query(
|
||||
'UPDATE `eff_users` SET `uid` = "' . $u->info['id'] . '" WHERE `uid` = "' . $usr['id'] . '" AND `name` = "' . $eff['name'] . '" LIMIT 1'
|
||||
);
|
||||
$u->error = 'Вы украли эффект ' . $eff['name'] . ' у персонажа ' . $usr['login'] . '!';
|
||||
//отправляем системку
|
||||
|
||||
$chat = new Chat();
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setTo($usr['login']);
|
||||
$cmsg->setText("Персонаж <b>{$u->info['login']}</b> украл у вас эффект {$eff['name']}.");
|
||||
$cmsg->setType(6);
|
||||
$chat->sendMsg($cmsg);
|
||||
$cmsg->setTo('');
|
||||
$cmsg->setText("<b>{$u->info['login']}</b> украл эффект {$eff['name']} у персонажа <b>{$usr['login']}</b>.");
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setTypeTime(1);
|
||||
$cmsg->setIsAlert(true);
|
||||
$chat->sendMsg($cmsg);
|
||||
//уменьшаем износ
|
||||
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1');
|
||||
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = ' . $itm['id'] . ' LIMIT 1');
|
||||
}
|
||||
?>
|
@ -1,32 +1,56 @@
|
||||
<?
|
||||
if(!defined('GAME')) {
|
||||
die();
|
||||
<?php
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
//выбираем эффект жертвы $usr
|
||||
$eff = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = "35" AND `uid` = "'.$usr['id'].'" AND `delete` = "0" LIMIT 1'));
|
||||
$eff = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `eff_users` WHERE `id_eff` = "35" AND `uid` = "' . $usr['id'] . '" AND `delete` = "0" LIMIT 1'
|
||||
)
|
||||
);
|
||||
//эффект свой
|
||||
$eff_users = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = "35" AND `uid` = "'.$u->info['id'].'" AND `delete` = "0" LIMIT 1'));
|
||||
$eff_users = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `eff_users` WHERE `id_eff` = "35" AND `uid` = "' . $u->info['id'] . '" AND `delete` = "0" LIMIT 1'
|
||||
)
|
||||
);
|
||||
//эффект защиты от вора
|
||||
$no_vor = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `id_eff` = "459" AND `uid` = "'.$usr['id'].'" AND `delete` = "0" LIMIT 1'));
|
||||
if($u->info['login']==$usr['login']) {
|
||||
$u->error = 'Глупец, ты не можешь украсть сам у себя ;)';
|
||||
}elseif(isset($no_vor['id'])) {
|
||||
$u->error = 'Персонаж '.$usr['login'].' не дремлет, будьте осторожны';
|
||||
}elseif($usr['battle'] > 0 ) {
|
||||
$u->error = 'Персонаж '.$usr['login'].' в поединке!';
|
||||
}elseif(!isset($eff['id'])) {
|
||||
$u->error = 'На персонаже '.$usr['login'].' нету эффекта "Звездное Сияние"';
|
||||
}elseif($eff_users['name'] && $eff_users['delete'] ==0) {
|
||||
$u->error = 'У вас есть Звездное Сияние';
|
||||
}else{
|
||||
//воруем эффект
|
||||
mysql_query('UPDATE `eff_users` SET `uid` = "'.$u->info['id'].'" WHERE `uid` = "'.$usr['id'].'" AND `name` = "'.$eff['name'].'" LIMIT 1');
|
||||
$u->error = 'Вы украли эффект '.$eff['name'].' у персонажа '.$usr['login'].'!';
|
||||
//отправляем системку
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','0','','".$usr['login']."',' Персонаж <b>".$u->info['login']." </b>украл у вас эффект ".$eff['name']." .','-1','6','0')");
|
||||
$txt = '<font color=red>Внимание!</font> <b>'.$u->info['login'].'</b> украл эффект <b>'.$eff['name'].'</b> у персонажа <b>'.$usr['login'].'</b>';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$txt."','".time()."','6','0','1')");
|
||||
$no_vor = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `eff_users` WHERE `id_eff` = "459" AND `uid` = "' . $usr['id'] . '" AND `delete` = "0" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if ($u->info['login'] == $usr['login']) {
|
||||
$u->error = 'Глупец, ты не можешь украсть сам у себя ;)';
|
||||
} elseif (isset($no_vor['id'])) {
|
||||
$u->error = 'Персонаж ' . $usr['login'] . ' не дремлет, будьте осторожны';
|
||||
} elseif ($usr['battle'] > 0) {
|
||||
$u->error = 'Персонаж ' . $usr['login'] . ' в поединке!';
|
||||
} elseif (!isset($eff['id'])) {
|
||||
$u->error = 'На персонаже ' . $usr['login'] . ' нету эффекта "Звездное Сияние"';
|
||||
} elseif ($eff_users['name'] && $eff_users['delete'] == 0) {
|
||||
$u->error = 'У вас есть Звездное Сияние';
|
||||
} else {
|
||||
//воруем эффект
|
||||
mysql_query(
|
||||
'UPDATE `eff_users` SET `uid` = "' . $u->info['id'] . '" WHERE `uid` = "' . $usr['id'] . '" AND `name` = "' . $eff['name'] . '" LIMIT 1'
|
||||
);
|
||||
$u->error = 'Вы украли эффект ' . $eff['name'] . ' у персонажа ' . $usr['login'] . '!';
|
||||
//отправляем системку
|
||||
|
||||
$chat = new Chat();
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setTo($usr['login']);
|
||||
$cmsg->setText("Персонаж <b>{$u->info['login']}</b> украл у вас эффект {$eff['name']}.");
|
||||
$cmsg->setType(6);
|
||||
$chat->sendMsg($cmsg);
|
||||
$cmsg->setTo('');
|
||||
$cmsg->setText("<b>{$u->info['login']}</b> украл эффект {$eff['name']} у персонажа <b>{$usr['login']}</b>.");
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setTypeTime(1);
|
||||
$cmsg->setIsAlert(true);
|
||||
$chat->sendMsg($cmsg);
|
||||
//уменьшаем износ
|
||||
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1');
|
||||
mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = ' . $itm['id'] . ' LIMIT 1');
|
||||
}
|
||||
?>
|
@ -1,331 +1,285 @@
|
||||
<?
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
<?php
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
|
||||
$add_zb = 0;
|
||||
$add_nas = 0;
|
||||
|
||||
$refer = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`banned`,`admin`,`level` FROM `users` WHERE `id` = "'.mysql_real_escape_string($this->info['host_reg']).'" LIMIT 1'));
|
||||
|
||||
|
||||
if($tr['var_id'] == 1) {
|
||||
// Набор [0]
|
||||
$add_zb = 5;
|
||||
|
||||
$add_nas = 1;
|
||||
|
||||
//Накидка
|
||||
$i3 = $this->addItem(3200,$this->info['id'],'|nosale=1|noremont=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Эликсир
|
||||
$i3 = $this->addItem(2418,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Новый сундук
|
||||
$i3 = $this->addItem(3201,$this->info['id']);
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
if($io == '') {
|
||||
$io = 'Снабжение воспитанника: 1 уровень, Накидка воспитанника, Эликсир Восстановления';
|
||||
}
|
||||
|
||||
}elseif($tr['var_id'] == 2) {
|
||||
// Набор [1]
|
||||
$add_zb = 10;
|
||||
|
||||
$add_nas = 1;
|
||||
|
||||
//Рубаха 3209
|
||||
$i3 = $this->addItem(3209,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Штаны 3210
|
||||
$i3 = $this->addItem(3210,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Эликсир
|
||||
$i3 = $this->addItem(2418,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Новый сундук
|
||||
$i3 = $this->addItem(3202,$this->info['id']);
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
if($io == '') {
|
||||
$io = 'Снабжение воспитанника: 2 уровень, Рубаха воспитанника, Штаны воспитанника, Эликсир Восстановления';
|
||||
}
|
||||
|
||||
}elseif($tr['var_id'] == 3) {
|
||||
// Набор [2]
|
||||
$add_zb = 20;
|
||||
|
||||
$add_nas = 1;
|
||||
|
||||
//Перчатки 3211
|
||||
$i3 = $this->addItem(3211,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Наручи 3212
|
||||
$i3 = $this->addItem(3212,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Эликсир
|
||||
$i3 = $this->addItem(2418,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Новый сундук
|
||||
$i3 = $this->addItem(3203,$this->info['id']);
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
if($io == '') {
|
||||
$io = 'Снабжение воспитанника: 3 уровень, Наручи воспитанника, Перчатки воспитанника, Эликсир Восстановления';
|
||||
}
|
||||
|
||||
}elseif($tr['var_id'] == 4) {
|
||||
// Набор [3]
|
||||
$add_zb = 30;
|
||||
|
||||
$add_nas = 1;
|
||||
|
||||
//Сапоги 3213
|
||||
$i3 = $this->addItem(3213,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Шлем 3214
|
||||
$i3 = $this->addItem(3214,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Пояс 3215
|
||||
$i3 = $this->addItem(3215,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Эликсир
|
||||
$i3 = $this->addItem(2418,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Новый сундук
|
||||
$i3 = $this->addItem(3204,$this->info['id']);
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
if($io == '') {
|
||||
$io = 'Снабжение воспитанника: 4 уровень, Сапоги воспитанника, Шапка воспитанника, Пояс воспитанника, Эликсир Восстановления';
|
||||
}
|
||||
|
||||
}elseif($tr['var_id'] == 5) {
|
||||
// Набор [4]
|
||||
$add_zb = 40;
|
||||
|
||||
$add_nas = 1;
|
||||
|
||||
//Серьги 3216
|
||||
$i3 = $this->addItem(3216,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Амулет 3217
|
||||
$i3 = $this->addItem(3217,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Кольца 3218
|
||||
$i3 = $this->addItem(3218,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
$i3 = $this->addItem(3218,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
$i3 = $this->addItem(3218,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Эликсир
|
||||
$i3 = $this->addItem(2418,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Новый сундук
|
||||
$i3 = $this->addItem(3205,$this->info['id']);
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
if($io == '') {
|
||||
$io = 'Снабжение воспитанника: 5 уровень, Серьги воспитанника, Амулет воспитанника, Кольцо воспитанника (х3), Эликсир Восстановления';
|
||||
}
|
||||
|
||||
}elseif($tr['var_id'] == 6) {
|
||||
// Набор [5]
|
||||
$add_zb = 50;
|
||||
|
||||
$add_nas = 1;
|
||||
|
||||
//Броня 4002
|
||||
$i3 = $this->addItem(4002,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Учебник воспитанника 4004
|
||||
$i3 = $this->addItem(4004,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Сумка воспитанника 4003
|
||||
$i3 = $this->addItem(4003,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Образы
|
||||
mysql_query('DELETE FROM `obraz` WHERE `uid` = "'.$this->info['id'].'" AND `img` = "ref_obr1.gif" LIMIT 2');
|
||||
mysql_query('INSERT INTO `obraz` (`sex`,`img`,`level`,`uid`,`usr_add`) VALUES ("0","ref_obr1.gif","5","'.$this->info['id'].'","'.time().'")');
|
||||
mysql_query('INSERT INTO `obraz` (`sex`,`img`,`level`,`uid`,`usr_add`) VALUES ("1","ref_obr1.gif","5","'.$this->info['id'].'","'.time().'")');
|
||||
|
||||
//Новый сундук
|
||||
$i3 = $this->addItem(3206,$this->info['id']);
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
if($io == '') {
|
||||
$io = 'Снабжение воспитанника: 6 уровень, Броня воспитанника, Образ воспитанника, Учебник воспитанника, Сумка воспитанника';
|
||||
}
|
||||
|
||||
}elseif($tr['var_id'] == 7) {
|
||||
// Набор [6]
|
||||
$add_zb = 60;
|
||||
|
||||
$add_nas = 2;
|
||||
|
||||
//Учебник воспитанника 4004
|
||||
$i3 = $this->addItem(4004,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Сумка воспитанника 4003
|
||||
$i3 = $this->addItem(4003,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Нападалка
|
||||
$i3 = $this->addItem(865,$this->info['id'],'|nosale=1',NULL,50);
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Новый сундук
|
||||
$i3 = $this->addItem(3207,$this->info['id']);
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
if($io == '') {
|
||||
$io = 'Снабжение воспитанника: 7 уровень, Учебник воспитанника, Сумка воспитанника, Нападение';
|
||||
}
|
||||
|
||||
}elseif($tr['var_id'] == 8) {
|
||||
// Набор [7]
|
||||
$add_zb = 70;
|
||||
|
||||
$add_nas = 3;
|
||||
|
||||
//Учебник воспитанника 4004
|
||||
$i3 = $this->addItem(4004,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Сумка воспитанника 4003
|
||||
$i3 = $this->addItem(4003,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Нападалка
|
||||
$i3 = $this->addItem(865,$this->info['id'],'|nosale=1',NULL,50);
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Восстановление
|
||||
$i3 = $this->addItem(2712,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
$i3 = $this->addItem(2712,$this->info['id'],'|nosale=1');
|
||||
if($i3 > 0) {
|
||||
mysql_query('UPDATE `items_users` SET `gift` = "Наставник" WHERE `id` = "'.$i3.'" LIMIT 1');
|
||||
}
|
||||
|
||||
//Образы
|
||||
mysql_query('DELETE FROM `obraz` WHERE `uid` = "'.$this->info['id'].'" AND `img` = "ref_obr2.gif" LIMIT 2');
|
||||
mysql_query('INSERT INTO `obraz` (`sex`,`img`,`level`,`uid`,`usr_add`) VALUES ("0","ref_obr2.gif","7","'.$this->info['id'].'","'.time().'")');
|
||||
mysql_query('INSERT INTO `obraz` (`sex`,`img`,`level`,`uid`,`usr_add`) VALUES ("1","ref_obr2.gif","7","'.$this->info['id'].'","'.time().'")');
|
||||
|
||||
if($io == '') {
|
||||
$io = 'Учебник воспитанника, Сумка воспитанника, Нападение, Образ воспитанника, Восстановление энергии 900HP (х2)';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if($add_zb > 0 && $this->info['level'] < 8) {
|
||||
$this->info['money4'] += $add_zb;
|
||||
mysql_query('UPDATE `users` SET `money4` = "'.$this->info['money4'].'" WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','0','','".$this->info['login']."',' В "Снабжение воспитанника" Вы обнаружили зубы: <small>".$this->zuby($add_zb,1)."</small>. ','-1','6','0')");
|
||||
}
|
||||
|
||||
if($add_nas > 0 && $this->info['level'] < 8 && isset($refer['id'])) {
|
||||
$ino = 0;
|
||||
while($ino < $add_nas) {
|
||||
$this->addItem(4005,$refer['id']);
|
||||
$ino++;
|
||||
}
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','0','','".$refer['login']."',' Ваш воспитанник "".$this->info['login']."" приносит жетоны <b>Талант Наставника</b> (<small>x".(0+$add_nas)."</small>). ','-1','6','0')");
|
||||
}
|
||||
|
||||
unset($i3,$add_zb,$refer,$add_nas);
|
||||
?>
|
||||
$add_zb = 0;
|
||||
$add_nas = 0;
|
||||
|
||||
$refer = mysql_fetch_array(
|
||||
mysql_query('SELECT `id`,`login`,`banned`,`admin`,`level` FROM `users` WHERE `id` = ' . (int)$this->info['host_reg'])
|
||||
);
|
||||
|
||||
function setMentorGiftStatus($id) {
|
||||
if (empty($id)) {
|
||||
return;
|
||||
}
|
||||
mysql_query("update `items_users` set gift = 'Наставник' where id = $id");
|
||||
}
|
||||
|
||||
if ($tr['var_id'] == 1) {
|
||||
// Набор [0]
|
||||
$add_zb = 5;
|
||||
$add_nas = 1;
|
||||
|
||||
//Накидка
|
||||
$i3 = $this->addItem(3200, $this->info['id'], '|nosale=1|noremont=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Эликсир
|
||||
$i3 = $this->addItem(2418, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Новый сундук
|
||||
$i3 = $this->addItem(3201, $this->info['id']);
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
if ($io == '') {
|
||||
$io = 'Снабжение воспитанника: 1 уровень, Накидка воспитанника, Эликсир Восстановления';
|
||||
}
|
||||
|
||||
} elseif ($tr['var_id'] == 2) {
|
||||
// Набор [1]
|
||||
$add_zb = 10;
|
||||
$add_nas = 1;
|
||||
|
||||
//Рубаха 3209
|
||||
$i3 = $this->addItem(3209, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Штаны 3210
|
||||
$i3 = $this->addItem(3210, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Эликсир
|
||||
$i3 = $this->addItem(2418, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Новый сундук
|
||||
$i3 = $this->addItem(3202, $this->info['id']);
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
if ($io == '') {
|
||||
$io = 'Снабжение воспитанника: 2 уровень, Рубаха воспитанника, Штаны воспитанника, Эликсир Восстановления';
|
||||
}
|
||||
|
||||
} elseif ($tr['var_id'] == 3) {
|
||||
// Набор [2]
|
||||
$add_zb = 20;
|
||||
$add_nas = 1;
|
||||
|
||||
//Перчатки 3211
|
||||
$i3 = $this->addItem(3211, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Наручи 3212
|
||||
$i3 = $this->addItem(3212, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Эликсир
|
||||
$i3 = $this->addItem(2418, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Новый сундук
|
||||
$i3 = $this->addItem(3203, $this->info['id']);
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
if ($io == '') {
|
||||
$io = 'Снабжение воспитанника: 3 уровень, Наручи воспитанника, Перчатки воспитанника, Эликсир Восстановления';
|
||||
}
|
||||
|
||||
} elseif ($tr['var_id'] == 4) {
|
||||
// Набор [3]
|
||||
$add_zb = 30;
|
||||
$add_nas = 1;
|
||||
|
||||
//Сапоги 3213
|
||||
$i3 = $this->addItem(3213, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Шлем 3214
|
||||
$i3 = $this->addItem(3214, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Пояс 3215
|
||||
$i3 = $this->addItem(3215, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Эликсир
|
||||
$i3 = $this->addItem(2418, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Новый сундук
|
||||
$i3 = $this->addItem(3204, $this->info['id']);
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
if ($io == '') {
|
||||
$io = 'Снабжение воспитанника: 4 уровень, Сапоги воспитанника, Шапка воспитанника, Пояс воспитанника, Эликсир Восстановления';
|
||||
}
|
||||
|
||||
} elseif ($tr['var_id'] == 5) {
|
||||
// Набор [4]
|
||||
$add_zb = 40;
|
||||
$add_nas = 1;
|
||||
|
||||
//Серьги 3216
|
||||
$i3 = $this->addItem(3216, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Амулет 3217
|
||||
$i3 = $this->addItem(3217, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Кольца 3218
|
||||
$i3 = $this->addItem(3218, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
$i3 = $this->addItem(3218, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
$i3 = $this->addItem(3218, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Эликсир
|
||||
$i3 = $this->addItem(2418, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Новый сундук
|
||||
$i3 = $this->addItem(3205, $this->info['id']);
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
if ($io == '') {
|
||||
$io = 'Снабжение воспитанника: 5 уровень, Серьги воспитанника, Амулет воспитанника, Кольцо воспитанника (х3), Эликсир Восстановления';
|
||||
}
|
||||
|
||||
} elseif ($tr['var_id'] == 6) {
|
||||
// Набор [5]
|
||||
$add_zb = 50;
|
||||
$add_nas = 1;
|
||||
|
||||
//Броня 4002
|
||||
$i3 = $this->addItem(4002, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Учебник воспитанника 4004
|
||||
$i3 = $this->addItem(4004, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Сумка воспитанника 4003
|
||||
$i3 = $this->addItem(4003, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Образы
|
||||
mysql_query('DELETE FROM `obraz` WHERE `uid` = "' . $this->info['id'] . '" AND `img` = "ref_obr1.gif" LIMIT 2');
|
||||
mysql_query(
|
||||
'INSERT INTO `obraz` (`sex`,`img`,`level`,`uid`,`usr_add`) VALUES ("0","ref_obr1.gif","5","' . $this->info['id'] . '","' . time(
|
||||
) . '")'
|
||||
);
|
||||
mysql_query(
|
||||
'INSERT INTO `obraz` (`sex`,`img`,`level`,`uid`,`usr_add`) VALUES ("1","ref_obr1.gif","5","' . $this->info['id'] . '","' . time(
|
||||
) . '")'
|
||||
);
|
||||
|
||||
//Новый сундук
|
||||
$i3 = $this->addItem(3206, $this->info['id']);
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
if ($io == '') {
|
||||
$io = 'Снабжение воспитанника: 6 уровень, Броня воспитанника, Образ воспитанника, Учебник воспитанника, Сумка воспитанника';
|
||||
}
|
||||
|
||||
} elseif ($tr['var_id'] == 7) {
|
||||
// Набор [6]
|
||||
$add_zb = 60;
|
||||
$add_nas = 2;
|
||||
|
||||
//Учебник воспитанника 4004
|
||||
$i3 = $this->addItem(4004, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Сумка воспитанника 4003
|
||||
$i3 = $this->addItem(4003, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Нападалка
|
||||
$i3 = $this->addItem(865, $this->info['id'], '|nosale=1', null, 50);
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Новый сундук
|
||||
$i3 = $this->addItem(3207, $this->info['id']);
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
if ($io == '') {
|
||||
$io = 'Снабжение воспитанника: 7 уровень, Учебник воспитанника, Сумка воспитанника, Нападение';
|
||||
}
|
||||
|
||||
} elseif ($tr['var_id'] == 8) {
|
||||
// Набор [7]
|
||||
$add_zb = 70;
|
||||
$add_nas = 3;
|
||||
|
||||
//Учебник воспитанника 4004
|
||||
$i3 = $this->addItem(4004, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Сумка воспитанника 4003
|
||||
$i3 = $this->addItem(4003, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Нападалка
|
||||
$i3 = $this->addItem(865, $this->info['id'], '|nosale=1', null, 50);
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Восстановление
|
||||
$i3 = $this->addItem(2712, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
$i3 = $this->addItem(2712, $this->info['id'], '|nosale=1');
|
||||
setMentorGiftStatus($i3);
|
||||
|
||||
//Образы
|
||||
mysql_query('DELETE FROM `obraz` WHERE `uid` = "' . $this->info['id'] . '" AND `img` = "ref_obr2.gif" LIMIT 2');
|
||||
mysql_query(
|
||||
'INSERT INTO `obraz` (`sex`,`img`,`level`,`uid`,`usr_add`) VALUES ("0","ref_obr2.gif","7","' . $this->info['id'] . '","' . time(
|
||||
) . '")'
|
||||
);
|
||||
mysql_query(
|
||||
'INSERT INTO `obraz` (`sex`,`img`,`level`,`uid`,`usr_add`) VALUES ("1","ref_obr2.gif","7","' . $this->info['id'] . '","' . time(
|
||||
) . '")'
|
||||
);
|
||||
|
||||
if ($io == '') {
|
||||
$io = 'Учебник воспитанника, Сумка воспитанника, Нападение, Образ воспитанника, Восстановление энергии 900HP (х2)';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($add_zb > 0 && $this->info['level'] < 8) {
|
||||
$this->info['money4'] += $add_zb;
|
||||
mysql_query(
|
||||
'UPDATE `users` SET `money4` = "' . $this->info['money4'] . '" WHERE `id` = "' . $this->info['id'] . '" LIMIT 1'
|
||||
);
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setTo($this->info['login']);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setText(
|
||||
"В "Снабжение воспитанника" Вы обнаружили зубы: <small>" . $this->zuby($add_zb, 1) . "</small>."
|
||||
);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
}
|
||||
|
||||
if ($add_nas > 0 && $this->info['level'] < 8 && isset($refer['id'])) {
|
||||
$ino = 0;
|
||||
while ($ino < $add_nas) {
|
||||
$this->addItem(4005, $refer['id']);
|
||||
$ino++;
|
||||
}
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setTo($refer['login']);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setText(
|
||||
"Ваш воспитанник "" . $this->info['login'] . "" приносит жетоны <b>Талант Наставника</b> (<small>x" . ($add_nas) . "</small>)."
|
||||
);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
}
|
||||
|
||||
unset($i3, $add_zb, $refer, $add_nas);
|
||||
|
@ -1,84 +1,87 @@
|
||||
<?
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
if($u->info['admin']>0 || ($u->info['align']>=3 && $u->info['align']<4))
|
||||
{
|
||||
$uu = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['logingo']).'" LIMIT 1'));
|
||||
$ust = $u->getStats($uu['id'],0);
|
||||
if(isset($uu['id']))
|
||||
{
|
||||
if($uu['id'] == $u->info['id'])
|
||||
{
|
||||
$uer = 'Вы не можете кусать самого себя';
|
||||
}elseif($u->info['battle']>0)
|
||||
{
|
||||
$uer = 'Вы не можете кусать в бою';
|
||||
}elseif($ust['hpNow']<($ust['hpAll']/100*15))
|
||||
{
|
||||
$uer = 'Вы не можете укусить этого персонажа, жертва слишком слаба';
|
||||
}elseif($uu['level']>$u->info['level'])
|
||||
{
|
||||
$uer = 'Вы не можете кусать персонажей старше вас по уровню';
|
||||
}elseif(date('H',time())>6 && date('H',time())<21 && $u->info['admin']==0)
|
||||
{
|
||||
$uer = 'Вампиры не могут кусаться днем';
|
||||
}elseif($u->stats['hpNow'] >= ($u->stats['hpAll']/100*67) && $u->info['admin']==0)
|
||||
{
|
||||
$uer = 'Вы не нужнаетесь в этом, ваше здоровье восстановится само ...';
|
||||
}elseif(floor($uu['align'])==3 && $u->info['admin']==0)
|
||||
{
|
||||
$uer = 'Вы не можете кусать темных';
|
||||
}elseif($uu['online']<time()-120)
|
||||
{
|
||||
$uer = 'Персонаж сейчас оффлайн';
|
||||
}elseif($uu['room']!=$u->info['room'])
|
||||
{
|
||||
$uer = 'Вы должны находится в одной локации с жертвой';
|
||||
}elseif($uu['battle']>0)
|
||||
{
|
||||
$uer = 'Персонаж находится в бою';
|
||||
}else{
|
||||
$sx = '';
|
||||
if($u->info['sex']==1)
|
||||
{
|
||||
$sx = 'а';
|
||||
}
|
||||
$itm1 = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `uid` = "'.$uu['id'].'" AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 AND `iznosNow` >= 1 AND `item_id` = 1164 LIMIT 1'));
|
||||
if(isset($itm1['id']))
|
||||
{
|
||||
$uer = 'Не удалось выпить энергию "'.$uu['login'].'", у '.$uu.' был при себе "'.$itm1['name'].'".<br>';
|
||||
}else{
|
||||
$itm2 = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `uid` = "'.$uu['id'].'" AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 AND `iznosNow` >= 1 AND `item_id` = 1163 LIMIT 1'));
|
||||
if(isset($itm2['id']))
|
||||
{
|
||||
$sx = 'него';
|
||||
if($uu['sex']==1)
|
||||
{
|
||||
$sx = 'неё';
|
||||
}
|
||||
$uer = 'Не удалось выпить энергию "'.$uu['login'].'", у '.$uu.' был при себе "'.$itm2['name'].'".<br>';
|
||||
$rtxt = '[img[items/chesnok2.gif]] Вампир "'.$u->info['login'].'" неудачно укусил'.$sx.' т.к. у "'.$uu['login'].'" был при себе чеснок';
|
||||
}else{
|
||||
$rtxt = '[img[items/vampir.gif]] Вампир "'.$u->info['login'].'" укусил'.$sx.' и выпил'.$sx.' всю жизненную энергию персонажа "'.$uu['login'].'"';
|
||||
$u->stats['hpNow'] += $ust['hpNow'];
|
||||
if($u->stats['hpNow']>$u->stats['hpAll'])
|
||||
{
|
||||
$u->stats['hpNow'] = $u->stats['hpAll'];
|
||||
}
|
||||
mysql_query('UPDATE `stats` SET `hpNow` = "'.$u->stats['hpAll'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
mysql_query('UPDATE `stats` SET `hpNow` = "0" WHERE `id` = "'.$uu['id'].'" LIMIT 1');
|
||||
mysql_query("INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES ('".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','11','0','1')");
|
||||
$uer = 'Вы успешно выпили всю кровь у персонажа "'.$uu['login'].'".<br>';
|
||||
}
|
||||
}
|
||||
unset($itm1,$itm2);
|
||||
}
|
||||
}else{
|
||||
$uer = 'Персонаж не найден в этом городе';
|
||||
}
|
||||
}else{
|
||||
$uer = 'У Вас нет прав на использование данного навыка';
|
||||
if ($u->info['admin'] > 0 || ($u->info['align'] >= 3 && $u->info['align'] < 4)) {
|
||||
$uu = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `users` WHERE `login` = "' . mysql_real_escape_string($_POST['logingo']) . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
$ust = $u->getStats($uu['id'], 0);
|
||||
if (isset($uu['id'])) {
|
||||
if ($uu['id'] == $u->info['id']) {
|
||||
$uer = 'Вы не можете кусать самого себя';
|
||||
} elseif ($u->info['battle'] > 0) {
|
||||
$uer = 'Вы не можете кусать в бою';
|
||||
} elseif ($ust['hpNow'] < ($ust['hpAll'] / 100 * 15)) {
|
||||
$uer = 'Вы не можете укусить этого персонажа, жертва слишком слаба';
|
||||
} elseif ($uu['level'] > $u->info['level']) {
|
||||
$uer = 'Вы не можете кусать персонажей старше вас по уровню';
|
||||
} elseif (date('H', time()) > 6 && date('H', time()) < 21 && $u->info['admin'] == 0) {
|
||||
$uer = 'Вампиры не могут кусаться днем';
|
||||
} elseif ($u->stats['hpNow'] >= ($u->stats['hpAll'] / 100 * 67) && $u->info['admin'] == 0) {
|
||||
$uer = 'Вы не нужнаетесь в этом, ваше здоровье восстановится само ...';
|
||||
} elseif (floor($uu['align']) == 3 && $u->info['admin'] == 0) {
|
||||
$uer = 'Вы не можете кусать темных';
|
||||
} elseif ($uu['online'] < time() - 120) {
|
||||
$uer = 'Персонаж сейчас оффлайн';
|
||||
} elseif ($uu['room'] != $u->info['room']) {
|
||||
$uer = 'Вы должны находится в одной локации с жертвой';
|
||||
} elseif ($uu['battle'] > 0) {
|
||||
$uer = 'Персонаж находится в бою';
|
||||
} else {
|
||||
$sx = '';
|
||||
if ($u->info['sex'] == 1) {
|
||||
$sx = 'а';
|
||||
}
|
||||
$itm1 = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `items_users` WHERE `uid` = "' . $uu['id'] . '" AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 AND `iznosNow` >= 1 AND `item_id` = 1164 LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($itm1['id'])) {
|
||||
$uer = 'Не удалось выпить энергию "' . $uu['login'] . '", у ' . $uu . ' был при себе "' . $itm1['name'] . '".<br>';
|
||||
} else {
|
||||
$itm2 = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `items_users` WHERE `uid` = "' . $uu['id'] . '" AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 AND `iznosNow` >= 1 AND `item_id` = 1163 LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($itm2['id'])) {
|
||||
$sx = 'него';
|
||||
if ($uu['sex'] == 1) {
|
||||
$sx = 'неё';
|
||||
}
|
||||
$uer = 'Не удалось выпить энергию "' . $uu['login'] . '", у ' . $uu . ' был при себе "' . $itm2['name'] . '".<br>';
|
||||
$rtxt = '[img[items/chesnok2.gif]] Вампир "' . $u->info['login'] . '" неудачно укусил' . $sx . ' т.к. у "' . $uu['login'] . '" был при себе чеснок';
|
||||
} else {
|
||||
$rtxt = '[img[items/vampir.gif]] Вампир "' . $u->info['login'] . '" укусил' . $sx . ' и выпил' . $sx . ' всю жизненную энергию персонажа "' . $uu['login'] . '"';
|
||||
$u->stats['hpNow'] += $ust['hpNow'];
|
||||
if ($u->stats['hpNow'] > $u->stats['hpAll']) {
|
||||
$u->stats['hpNow'] = $u->stats['hpAll'];
|
||||
}
|
||||
mysql_query(
|
||||
'UPDATE `stats` SET `hpNow` = "' . $u->stats['hpAll'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query('UPDATE `stats` SET `hpNow` = "0" WHERE `id` = "' . $uu['id'] . '" LIMIT 1');
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setType(11);
|
||||
$cmsg->setTypeTime(1);
|
||||
$cmsg->setText($rtxt);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
|
||||
$uer = 'Вы успешно выпили всю кровь у персонажа "' . $uu['login'] . '".<br>';
|
||||
}
|
||||
}
|
||||
unset($itm1, $itm2);
|
||||
}
|
||||
} else {
|
||||
$uer = 'Персонаж не найден в этом городе';
|
||||
}
|
||||
} else {
|
||||
$uer = 'У Вас нет прав на использование данного навыка';
|
||||
}
|
||||
?>
|
@ -1,25 +1,28 @@
|
||||
<?
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
<?php
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
if($ple['file_finish']=='bloodring2_end' && $this->users[$i]['team'] == $this->info['team_win'])
|
||||
{
|
||||
if($this->info['razdel'] == 5) {
|
||||
$i1k = 0;
|
||||
if($ple['x'] > 6) {
|
||||
$ple['x'] = 6;
|
||||
}
|
||||
while($i1k < $ple['x']) {
|
||||
$u->addItem(3136,$this->users[$i]['id'],'|sudba='.$this->users[$i]['login']);
|
||||
$i1k++;
|
||||
}
|
||||
if($ple['x'] > 1) {
|
||||
$ple['xz'] = ' (x'.$ple['x'].')';
|
||||
}else{
|
||||
$ple['xz'] = '';
|
||||
}
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','".$this->users[$i]['city']."','0','','".$this->users[$i]['login']."','Вы получили предмет "<b>Кровавый Рубин</b>".$ple['xz'].""','-1','6','0')");
|
||||
}
|
||||
if ($ple['file_finish'] == 'bloodring2_end' && $this->users[$i]['team'] == $this->info['team_win']) {
|
||||
if ($this->info['razdel'] == 5) {
|
||||
$i1k = 0;
|
||||
if ($ple['x'] > 6) {
|
||||
$ple['x'] = 6;
|
||||
}
|
||||
while ($i1k < $ple['x']) {
|
||||
$u->addItem(3136, $this->users[$i]['id'], '|sudba=' . $this->users[$i]['login']);
|
||||
$i1k++;
|
||||
}
|
||||
if ($ple['x'] > 1) {
|
||||
$ple['xz'] = ' (x' . $ple['x'] . ')';
|
||||
} else {
|
||||
$ple['xz'] = '';
|
||||
}
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($this->users[$i]['city']);
|
||||
$cmsg->setTo($this->users[$i]['login']);
|
||||
$cmsg->setText("Вы получили предмет "<b>Кровавый Рубин</b>{$ple['xz']}".");
|
||||
$cmsg->setType(6);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
}
|
||||
}
|
||||
?>
|
@ -12,7 +12,14 @@
|
||||
mysql_query('UPDATE `stats` SET `hpNow`= 0 WHERE `id` = "'.$u->info['id'].'"');
|
||||
|
||||
$rtxt='Накормила, спать уложила, всю жизненную энергию выпила и на цп выбросила '.$u->info['login'].'!';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `ip`, `vals`, `val`) VALUES ("'.$u->info['id'].'","'.time().'","capitalcity","421","day_korm"," ","","'.$u->info['exp'].'")');
|
||||
}
|
||||
else
|
||||
|
@ -246,22 +246,26 @@ function timeOut($ttm)
|
||||
return $out;
|
||||
}
|
||||
|
||||
function e($t)
|
||||
function e(string $text, string $to = '', int $time = 0)
|
||||
{
|
||||
$text = mysql_real_escape_string($text);
|
||||
if (empty($time)) {
|
||||
$time = time();
|
||||
}
|
||||
mysql_query(
|
||||
'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("<font color=#cb0000>' . mysql_real_escape_string(
|
||||
$t
|
||||
) . '</font>","capitalcity","","6","1","' . time() . '")'
|
||||
"INSERT INTO `chat` (`text`,`to`,`type`,`new`,`time`,`color`) VALUES (
|
||||
$text,
|
||||
$to,
|
||||
6,
|
||||
1,
|
||||
$time,
|
||||
'#cb0000')"
|
||||
);
|
||||
}
|
||||
|
||||
function e2($t)
|
||||
{
|
||||
mysql_query(
|
||||
'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("<font color=#cb0000>' . mysql_real_escape_string(
|
||||
$t
|
||||
) . '</font>","capitalcity","Мусорщик","6","1","-1")'
|
||||
);
|
||||
e($t, 'Мусорщик', -1);
|
||||
}
|
||||
|
||||
//Персонаж 1 нападает на 2
|
||||
|
184
aunitpay.php
184
aunitpay.php
@ -2,35 +2,35 @@
|
||||
|
||||
function getResponseError($message)
|
||||
{
|
||||
return json_encode(
|
||||
[
|
||||
'error' => [
|
||||
'message' => $message,
|
||||
],
|
||||
]
|
||||
);
|
||||
return json_encode(
|
||||
[
|
||||
'error' => [
|
||||
'message' => $message,
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
function getResponseSuccess($message)
|
||||
{
|
||||
return json_encode(
|
||||
[
|
||||
'result' => [
|
||||
'message' => $message,
|
||||
],
|
||||
]
|
||||
);
|
||||
return json_encode(
|
||||
[
|
||||
'result' => [
|
||||
'message' => $message,
|
||||
],
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
date_default_timezone_set('Europe/Moscow');
|
||||
$c = [
|
||||
/* MySQL База данных */
|
||||
'db_name' => 'pay_operations', //Таблица в которую заносятся данные
|
||||
'db_host' => 'localhost',
|
||||
'db_user' => 'newcom1_abk',
|
||||
'db_pass' => '4nWYsIM[c?}P',
|
||||
'db_base' => 'newcom1_abk',
|
||||
/* Настройки платежей
|
||||
/* MySQL База данных */
|
||||
'db_name' => 'pay_operations', //Таблица в которую заносятся данные
|
||||
'db_host' => 'localhost',
|
||||
'db_user' => 'newcom1_abk',
|
||||
'db_pass' => '4nWYsIM[c?}P',
|
||||
'db_base' => 'newcom1_abk',
|
||||
/* Настройки платежей
|
||||
'ip_list' => array('127,0,0,1,188.166.34.68,136.243.38.147,136.243.38.149,136.243.38.150,136.243.38.151,136.243.38.189,88.198.88.98'), //Указывать через запятую (Разрешенные IP)
|
||||
'key' => 'qtzl0igb', //gamedealer key
|
||||
'id' => '65643' //ID проекта*/
|
||||
@ -39,32 +39,26 @@ $c = [
|
||||
|
||||
function connect_db($c)
|
||||
{
|
||||
$db = mysql_connect($c['db_host'], $c['db_user'], $c['db_pass']) or die('Ошибка подключения к MySQL серверу!');
|
||||
mysql_select_db($c['db_base'], $db) or die('Ошибка подключения к базе данных!');
|
||||
mysql_query('SET NAMES utf8mb4');
|
||||
}
|
||||
|
||||
function getFormSignature($account, $currency, $sum, $secretKey)
|
||||
{
|
||||
$hashStr = $account . '{up}' . $currency . '{up}' . $sum . '{up}' . $secretKey;
|
||||
return hash('sha256', $hashStr);
|
||||
$db = mysql_connect($c['db_host'], $c['db_user'], $c['db_pass']) or die('Ошибка подключения к MySQL серверу!');
|
||||
mysql_select_db($c['db_base'], $db) or die('Ошибка подключения к базе данных!');
|
||||
mysql_query('SET NAMES utf8mb4');
|
||||
}
|
||||
|
||||
|
||||
$request = $_GET;
|
||||
if (empty($request['method'])
|
||||
|| empty($request['params'])
|
||||
|| !is_array($request['params'])
|
||||
|| empty($request['params'])
|
||||
|| !is_array($request['params'])
|
||||
) {
|
||||
echo getResponseError('Invalid request');
|
||||
die();
|
||||
echo getResponseError('Invalid request');
|
||||
die();
|
||||
}
|
||||
$method = $request['method'];
|
||||
$params = $request['params'];
|
||||
if ($_GET['method'] == "check") {
|
||||
|
||||
echo getResponseSuccess('CHECK is successful');
|
||||
die();
|
||||
echo getResponseSuccess('CHECK is successful');
|
||||
die();
|
||||
|
||||
}
|
||||
//MERCHANT_ORDER_ID=142&P_PHONE=380688028300&P_EMAIL=evhenii_kula%40mail.ru&CUR_ID=94&AMOUNT=90&MERCHANT_ID=65643&SIGN=c0fc70d5446614597d44ff13f2c7a6a5&intid=29728441
|
||||
@ -95,73 +89,61 @@ https://адрес_вашего_обработчика?
|
||||
params[test]=0
|
||||
*/
|
||||
if ($_GET['method'] == "pay") {
|
||||
connect_db($c);
|
||||
$nick = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `pay_operation` WHERE `id` = "' . $params['account'] . '" LIMIT 1')
|
||||
);
|
||||
if (!isset($nick['good'])) {
|
||||
echo getResponseError('Bad order');
|
||||
die();
|
||||
}
|
||||
$user = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "' . $nick['uid'] . '" LIMIT 1'));
|
||||
if (isset ($params['account'])) {
|
||||
if ($nick['good'] != 0) {
|
||||
echo getResponseError('Already Used');
|
||||
die();
|
||||
} else {
|
||||
connect_db($c);
|
||||
$nick = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `pay_operation` WHERE `id` = "' . $params['account'] . '" LIMIT 1')
|
||||
);
|
||||
if (!isset($nick['good'])) {
|
||||
echo getResponseError('Bad order');
|
||||
die();
|
||||
}
|
||||
$user = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "' . $nick['uid'] . '" LIMIT 1'));
|
||||
if (isset ($params['account'])) {
|
||||
if ($nick['good'] != 0) {
|
||||
echo getResponseError('Already Used');
|
||||
} else {
|
||||
mysql_query(
|
||||
'UPDATE `users` SET `money2` = `money2` + ' . $nick['ekr'] . ' WHERE `id` = "' . $nick['uid'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query(
|
||||
'UPDATE `pay_operation` SET `good` = "' . time() . '" WHERE `id` = "' . $params['account'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query(
|
||||
'UPDATE `users` SET `catch` = `catch` + ' . $nick['ekr'] . ' WHERE `id` = "' . $nick['uid'] . '" LIMIT 1'
|
||||
);
|
||||
|
||||
mysql_query(
|
||||
'UPDATE `users` SET `money2` = `money2` + ' . $nick['ekr'] . ' WHERE `id` = "' . $nick['uid'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query(
|
||||
'UPDATE `pay_operation` SET `good` = "' . time() . '" WHERE `id` = "' . $params['account'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query(
|
||||
'UPDATE `users` SET `catch` = `catch` + ' . $nick['ekr'] . ' WHERE `id` = "' . $nick['uid'] . '" LIMIT 1'
|
||||
);
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($user['city']);
|
||||
$cmsg->setRoom($user['room']);
|
||||
$cmsg->setLogin('Банкир');
|
||||
$cmsg->setTo($user['login']);
|
||||
$cmsg->setText("На Ваш игровой счет зачислено {$nick['ekr']} екр. Благодарим Вас за покупку!");
|
||||
$cmsg->setType(5);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
|
||||
$r = '<span class=date>' . date(
|
||||
'd.m.Y H:i'
|
||||
) . '</span> Алхимик <img src=https://img.new-combats.com/i/align/align50.gif width=12 height=15 /><u><b>Администратор</b> / Автоматическая оплата</u> сообщает: ';
|
||||
if ($user['sex'] == 1) {
|
||||
$r .= 'Уважаемая';
|
||||
} else {
|
||||
$r .= 'Уважаемый';
|
||||
}
|
||||
$r .= ' <b>' . $user['login'] . '</b>, на Ваш игровой счет зачислено ' . $nick['ekr'] . ' Еврокредитов. Благодарим Вас за покупку!';
|
||||
if ($nick['ref'] != 0) {
|
||||
$refecr = round(($nick['ekr'] / 10));
|
||||
mysql_query(
|
||||
'UPDATE `users` SET `money2` = `money2` + ' . $refecr . ' WHERE `id` = "' . $nick['ref'] . '" LIMIT 1'
|
||||
);
|
||||
$referal = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `users` WHERE `id` = "' . $nick['ref'] . '" LIMIT 1')
|
||||
);
|
||||
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $user['city'] . "','" . $user['room'] . "','','" . $user['login'] . "','" . $r . "','-1','5','0')"
|
||||
);
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($referal['city']);
|
||||
$cmsg->setRoom($referal['room']);
|
||||
$cmsg->setLogin('Банкир');
|
||||
$cmsg->setTo($referal['login']);
|
||||
$cmsg->setText("На Ваш игровой счет зачислено $refecr екр, благодаря вашему рефералу {$user['login']}!");
|
||||
$cmsg->setType(5);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
}
|
||||
echo getResponseSuccess('PAY is successful');
|
||||
}
|
||||
|
||||
if ($nick['ref'] != 0) {
|
||||
$refecr = round(($nick['ekr'] / 10));
|
||||
mysql_query(
|
||||
'UPDATE `users` SET `money2` = `money2` + ' . $refecr . ' WHERE `id` = "' . $nick['ref'] . '" LIMIT 1'
|
||||
);
|
||||
$referal = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `users` WHERE `id` = "' . $nick['ref'] . '" LIMIT 1')
|
||||
);
|
||||
$r = '<span class=date>' . date(
|
||||
'd.m.Y H:i'
|
||||
) . '</span> Алхимик <img src=https://img.new-combats.com/i/align/align50.gif width=12 height=15 /><u><b>Администратор</b> / Реферальный заработок</u> сообщает: ';
|
||||
if ($referal['sex'] == 1) {
|
||||
$r .= 'Уважаемая';
|
||||
} else {
|
||||
$r .= 'Уважаемый';
|
||||
}
|
||||
$r .= ' <b>' . $referal['login'] . '</b>, на Ваш игровой счет зачислено ' . $refecr . ' Еврокредитов. Благодоря вашему рефералу!' . $user['login'] . '';
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $referal['city'] . "','" . $referal['room'] . "','','" . $referal['login'] . "','" . $r . "','-1','5','0')"
|
||||
);
|
||||
}
|
||||
|
||||
echo getResponseSuccess('PAY is successful');
|
||||
die();
|
||||
}
|
||||
|
||||
} else {
|
||||
echo getResponseError('No order');
|
||||
die();
|
||||
}
|
||||
} else {
|
||||
echo getResponseError('No order');
|
||||
}
|
||||
die();
|
||||
}
|
||||
|
189
autopay.php
189
autopay.php
@ -1,103 +1,96 @@
|
||||
|
||||
<?php
|
||||
date_default_timezone_set('Europe/Moscow');
|
||||
$c = array(
|
||||
/* MySQL База данных */
|
||||
'db_name' => 'pay_operations', //Таблица в которую заносятся данные
|
||||
'db_host' => 'localhost',
|
||||
'db_user' => 'newcom1_abk',
|
||||
'db_pass' => '4nWYsIM[c?}P',
|
||||
'db_base' => 'newcom1_abk',
|
||||
/* Настройки платежей
|
||||
'ip_list' => array('127,0,0,1,188.166.34.68,136.243.38.147,136.243.38.149,136.243.38.150,136.243.38.151,136.243.38.189,88.198.88.98'), //Указывать через запятую (Разрешенные IP)
|
||||
'key' => 'qtzl0igb', //gamedealer key
|
||||
'id' => '65643' //ID проекта*/
|
||||
);
|
||||
|
||||
$c = [
|
||||
/* MySQL База данных */
|
||||
'db_name' => 'pay_operations', //Таблица в которую заносятся данные
|
||||
'db_host' => 'localhost',
|
||||
'db_user' => 'newcom1_abk',
|
||||
'db_pass' => '4nWYsIM[c?}P',
|
||||
'db_base' => 'newcom1_abk',
|
||||
/* Настройки платежей
|
||||
'ip_list' => array('127,0,0,1,188.166.34.68,136.243.38.147,136.243.38.149,136.243.38.150,136.243.38.151,136.243.38.189,88.198.88.98'), //Указывать через запятую (Разрешенные IP)
|
||||
'key' => 'qtzl0igb', //gamedealer key
|
||||
'id' => '65643' //ID проекта*/
|
||||
];
|
||||
|
||||
|
||||
function connect_db($c)
|
||||
{
|
||||
$db = mysql_connect($c['db_host'], $c['db_user'], $c['db_pass']) or die('Ошибка подключения к MySQL серверу!');
|
||||
mysql_select_db($c['db_base'], $db) or die('Ошибка подключения к базе данных!');
|
||||
mysql_query('SET NAMES utf8mb4');
|
||||
}
|
||||
|
||||
//MERCHANT_ORDER_ID=142&P_PHONE=380688028300&P_EMAIL=evhenii_kula%40mail.ru&CUR_ID=94&AMOUNT=90&MERCHANT_ID=65643&SIGN=c0fc70d5446614597d44ff13f2c7a6a5&intid=29728441
|
||||
/*
|
||||
MERCHANT_ORDER_ID
|
||||
P_PHONE
|
||||
P_EMAIL
|
||||
CUR_ID
|
||||
AMOUNT
|
||||
MERCHANT_ID
|
||||
SIGN
|
||||
intid
|
||||
*/
|
||||
|
||||
connect_db($c);
|
||||
$nick = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `pay_operation` WHERE `id` = "' . $_POST['MERCHANT_ORDER_ID'] . '" LIMIT 1')
|
||||
);
|
||||
$user = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "' . $nick['uid'] . '" LIMIT 1'));
|
||||
if (isset ($_POST['MERCHANT_ORDER_ID'])) {
|
||||
if ($nick['good'] != 0) {
|
||||
echo "Уже начисленно";
|
||||
} else {
|
||||
|
||||
mysql_query(
|
||||
'UPDATE `users` SET `money2` = `money2` + ' . $nick['ekr'] . ' WHERE `id` = "' . $nick['uid'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query(
|
||||
'UPDATE `pay_operation` SET `good` = "' . time(
|
||||
) . '" WHERE `id` = "' . $_POST['MERCHANT_ORDER_ID'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query(
|
||||
'UPDATE `users` SET `catch` = `catch` + ' . $nick['ekr'] . ' WHERE `id` = "' . $nick['uid'] . '" LIMIT 1'
|
||||
);
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($user['city']);
|
||||
$cmsg->setRoom($user['room']);
|
||||
$cmsg->setLogin('Банкир');
|
||||
$cmsg->setTo($user['login']);
|
||||
$cmsg->setText("На Ваш игровой счет зачислено {$nick['ekr']} екр. Благодарим Вас за покупку!");
|
||||
$cmsg->setType(5);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
|
||||
if ($nick['ref'] != 0) {
|
||||
$refecr = round(($nick['ekr'] / 10));
|
||||
mysql_query(
|
||||
'UPDATE `users` SET `money2` = `money2` + ' . $refecr . ' WHERE `id` = "' . $nick['ref'] . '" LIMIT 1'
|
||||
);
|
||||
$referal = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `users` WHERE `id` = "' . $nick['ref'] . '" LIMIT 1')
|
||||
);
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($referal['city']);
|
||||
$cmsg->setRoom($referal['room']);
|
||||
$cmsg->setLogin('Банкир');
|
||||
$cmsg->setTo($referal['login']);
|
||||
$cmsg->setText("На Ваш игровой счет зачислено $refecr екр, благодаря вашему рефералу {$user['login']}!");
|
||||
$cmsg->setType(5);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
}
|
||||
|
||||
echo "Покупател: " . $user['login'] . " | ID: " . $nick['uid'] . " | Сумма: " . $nick['ekr'] . " | ID операции: " . $_POST['MERCHANT_ORDER_ID'] . "<br>";
|
||||
if (isset ($referal['id'])) {
|
||||
echo "Реферал(тот кто привел): " . $referal['login'] . " | ID: " . $referal['id'] . " | Сумма: " . $refecr . "<br>";
|
||||
} else {
|
||||
echo "Пользователь реферал не найден!!";
|
||||
}
|
||||
|
||||
function connect_db($c) {
|
||||
$db = mysql_connect($c['db_host'],$c['db_user'],$c['db_pass']) or die('Ошибка подключения к MySQL серверу!');
|
||||
mysql_select_db($c['db_base'],$db) or die('Ошибка подключения к базе данных!');
|
||||
mysql_query('SET NAMES utf8mb4');
|
||||
}
|
||||
|
||||
//MERCHANT_ORDER_ID=142&P_PHONE=380688028300&P_EMAIL=evhenii_kula%40mail.ru&CUR_ID=94&AMOUNT=90&MERCHANT_ID=65643&SIGN=c0fc70d5446614597d44ff13f2c7a6a5&intid=29728441
|
||||
/*
|
||||
MERCHANT_ORDER_ID
|
||||
P_PHONE
|
||||
P_EMAIL
|
||||
CUR_ID
|
||||
AMOUNT
|
||||
MERCHANT_ID
|
||||
SIGN
|
||||
intid
|
||||
*/
|
||||
|
||||
connect_db($c);
|
||||
$nick = mysql_fetch_array(mysql_query('SELECT * FROM `pay_operation` WHERE `id` = "'.$_POST['MERCHANT_ORDER_ID'].'" LIMIT 1'));
|
||||
$user = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$nick['uid'].'" LIMIT 1'));
|
||||
if (isset ($_POST['MERCHANT_ORDER_ID']))
|
||||
{
|
||||
if ($nick['good']!=0)
|
||||
{
|
||||
echo "Уже начисленно";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
mysql_query('UPDATE `users` SET `money2` = `money2` + '.$nick['ekr'].' WHERE `id` = "'.$nick['uid'].'" LIMIT 1');
|
||||
mysql_query('UPDATE `pay_operation` SET `good` = "'.time().'" WHERE `id` = "'.$_POST['MERCHANT_ORDER_ID'].'" LIMIT 1');
|
||||
mysql_query('UPDATE `users` SET `catch` = `catch` + '.$nick['ekr'].' WHERE `id` = "'.$nick['uid'].'" LIMIT 1');
|
||||
|
||||
//mysql_query('INSERT INTO `'.$c['db_name'].'` (`time`,`type`,`ip`,`value`,`money`,`project`) VALUES ("'.time().'","'.mysql_real_escape_string($type).'","'.$_SERVER['HTTP_X_REAL_IP'].'","'.mysql_real_escape_string($value).'","'.mysql_real_escape_string($money).'","'.mysql_real_escape_string($this->id).'")');
|
||||
|
||||
$r = '<span class=date>'.date('d.m.Y H:i').'</span> Алхимик <img src=https://img.new-combats.com/i/align/align50.gif width=12 height=15 /><u><b>Администратор</b> / Автоматическая оплата</u> сообщает: ';
|
||||
if($user['sex'] == 1)
|
||||
{
|
||||
$r .= 'Уважаемая';
|
||||
}
|
||||
else
|
||||
{
|
||||
$r .= 'Уважаемый';
|
||||
}
|
||||
$r .= ' <b>'.$user['login'].'</b>, на Ваш игровой счет зачислено '.$nick['ekr'].' Еврокредитов. Благодарим Вас за покупку!';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','".$user['city']."','".$user['room']."','','".$user['login']."','".$r."','-1','5','0')");
|
||||
|
||||
|
||||
if ($nick['ref'] !=0)
|
||||
{
|
||||
$refecr=round(($nick['ekr']/10));
|
||||
mysql_query('UPDATE `users` SET `money2` = `money2` + '.$refecr.' WHERE `id` = "'.$nick['ref'].'" LIMIT 1');
|
||||
$referal = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$nick['ref'].'" LIMIT 1'));
|
||||
$r = '<span class=date>'.date('d.m.Y H:i').'</span> Алхимик <img src=https://img.new-combats.com/i/align/align50.gif width=12 height=15 /><u><b>Администратор</b> / Реферальный заработок</u> сообщает: ';
|
||||
if($referal['sex'] == 1)
|
||||
{
|
||||
$r .= 'Уважаемая';
|
||||
}
|
||||
else
|
||||
{
|
||||
$r .= 'Уважаемый';
|
||||
}
|
||||
$r .= ' <b>'.$referal['login'].'</b>, на Ваш игровой счет зачислено '.$refecr.' Еврокредитов. Благодоря вашему рефералу!'.$user['login'].'';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','".$referal['city']."','".$referal['room']."','','".$referal['login']."','".$r."','-1','5','0')");
|
||||
|
||||
|
||||
}
|
||||
|
||||
echo "Покупател: ".$user['login']." | ID: ".$nick['uid']." | Сумма: ".$nick['ekr']." | ID операции: ".$_POST['MERCHANT_ORDER_ID']."<br>";
|
||||
if (isset ($referal['id']))
|
||||
{
|
||||
echo "Реферал(тот кто привел): ".$referal['login']." | ID: ".$referal['id']." | Сумма: ".$refecr."<br>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Пользователь реферал не найден!!";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Покупатель не указан!";
|
||||
}
|
||||
} else {
|
||||
echo "Покупатель не указан!";
|
||||
}
|
||||
?>
|
||||
|
14
bandit.php
14
bandit.php
@ -142,12 +142,14 @@ if (isset($_GET['bet'])) {
|
||||
$gid = mysql_insert_id();
|
||||
//
|
||||
if ($win > 0) {
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $u->info['city'] . "','390','','','<small>[<b><font color=0066ff>Крупье</font></b>] Игрок <b>" . mysql_real_escape_string(
|
||||
$u->info['login']
|
||||
) . "</b> выиграл <b>" . ($s * $win) . ".00</b> екр., ставка: " . $s . ".00 екр., игра №" . $gid . "</small>','" . time(
|
||||
) . "','6','0')"
|
||||
);
|
||||
$prize = $s * $win;
|
||||
$chatDto = new ChatMessage();
|
||||
$chatDto->setCity($u->info['city']);
|
||||
$chatDto->setRoom(390);
|
||||
$chatDto->setLogin('<span style="color: #0066FF">Крупье</span>');
|
||||
$chatDto->setText("<small>Игрок {$u->info['login']} выиграл $prize екр, ставка $s екр, игра №$gid</small>");
|
||||
$chatDto->setType(6);
|
||||
(new Chat())->sendMsg($chatDto);
|
||||
}
|
||||
//
|
||||
$r .= 'cash=' . floor($u->bank['money2']);
|
||||
|
30
enter.php
30
enter.php
@ -315,10 +315,13 @@ if (!isset($u['id'])) {
|
||||
if ($u['online'] < time() - 520) {
|
||||
$sp = Db::getRows('select room, city, login from users where online > unix_timestamp() - 600 and id in (select user from friends where friend = ?)', [$u['id']]);
|
||||
foreach ($sp as $usr) {
|
||||
$chat->send(
|
||||
'', $usr['room'], $usr['city'], '', $usr['login'], 'Вас приветствует: <b>' . $u['login'] . '</b>.',
|
||||
time(), 6, 0, 0, 0, 1
|
||||
);
|
||||
$chatDto = new ChatMessage();
|
||||
$chatDto->setRoom($usr['room']);
|
||||
$chatDto->setCity($usr['city']);
|
||||
$chatDto->setTo($usr['login']);
|
||||
$chatDto->setText('Вас приветствует: <b>' . $u['login'] . '</b>.');
|
||||
$chatDto->setType(6);
|
||||
$chat->sendMsg($chatDto);
|
||||
}
|
||||
}
|
||||
|
||||
@ -335,20 +338,11 @@ if (!isset($u['id'])) {
|
||||
$u['auth'] != '0' &&
|
||||
$u['ip'] != IP
|
||||
) {
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES
|
||||
('1',
|
||||
'capitalcity',
|
||||
'0',
|
||||
'',
|
||||
'" . $u['login'] . "',
|
||||
'В предыдущий раз этим персонажем заходили с другого компьютера " .
|
||||
date('d.m.Y H:i', $u['online']) . ". (Предыдущий ip: %" . $u['ip'] . ")',
|
||||
'-1',
|
||||
'6',
|
||||
'0'
|
||||
)"
|
||||
);
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setTo($u['login']);
|
||||
$cmsg->setText('В предыдущий раз этим персонажем заходили с другого компьютера ' . date('d.m.Y H:i', $u['online']) . "(Предыдущий ip: %{$u['ip']})");
|
||||
$cmsg->setType(6);
|
||||
$chat->sendMsg($cmsg);
|
||||
}
|
||||
$apu = "`auth` = '" . md5($u['login'] . 'AUTH' . IP) . "',";
|
||||
setcookie('auth', md5($u['login'] . 'AUTH' . IP), time() + 60 * 60 * 24 * 365, '', 'new-combats.com');
|
||||
|
@ -515,20 +515,22 @@ class forum
|
||||
//Если автор предыдущего сообщения не текущий юзер - отправляем в чат сообщение о новом ответе
|
||||
if ($lst['uid'] + 1 != $this->user['id']) {
|
||||
$fnt = '<b>' . date('d.m.Y H:i') . '</b> На форуме опубликован новый ответ в обсуждении, в котором вы принимали участие. <a href=https://new-combats.com/forum?read=' . $topic . ' target=_blank \>Читать далее</a>';
|
||||
$ins = '';
|
||||
$ll = [];
|
||||
$sp = mysql_query('SELECT `u`.`city`,`u`.`id`,`u`.`login`,`f`.`uid`,`f`.`login` FROM `forum_msg` AS `f` LEFT JOIN `users` AS `u` ON `f`.`uid` = `u`.`id` WHERE `f`.`delete` = "0" AND (`f`.`topic` = "' . mysql_real_escape_string($topic) . '" OR (`f`.`topic` = "-1" AND `f`.`id` = "' . mysql_real_escape_string($topic) . '")) LIMIT 1');
|
||||
$sp = mysql_query('SELECT `u`.`city`,`u`.`id`,`u`.`login`,`f`.`uid`,`f`.`login` FROM `forum_msg` AS `f` LEFT JOIN `users` AS `u` ON `f`.`uid` = `u`.`id` WHERE `f`.`delete` = 0 AND (`f`.`topic` = ' . (int)$topic . ' OR (`f`.`topic` = -1 AND `f`.`id` = ' . (int)$topic . ')) LIMIT 1');
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
if (!isset($ll[$pl['uid']]) && $pl['uid'] != $this->user['id']) {
|
||||
$ins .= '("' . $pl['city'] . '","1","' . $pl['login'] . '","6","-1","' . $fnt . '"),';
|
||||
$ll[$pl['uid']] = true;
|
||||
if (isset($ll[$pl['uid']]) || $pl['uid'] == $this->user['id']) {
|
||||
continue;
|
||||
}
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($pl['city']);
|
||||
$cmsg->setTo($pl['login']);
|
||||
$cmsg->setText($fnt);
|
||||
$cmsg->setType(6);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
|
||||
$ll[$pl['uid']] = true;
|
||||
}
|
||||
unset($ll);
|
||||
$ins = trim($ins, ',');
|
||||
if ($ins != '') {
|
||||
mysql_query('INSERT INTO `chat` (`city`,`new`,`to`,`type`,`time`,`text`) VALUES ' . $ins . '');
|
||||
}
|
||||
}
|
||||
}
|
||||
$fid = mysql_insert_id();
|
||||
|
@ -78,17 +78,18 @@ if (isset($f->user['id'])) {
|
||||
);
|
||||
|
||||
} elseif (isset($_POST['add_top'])) {
|
||||
//if($f->gd[$f->fm['id']]==3 || $f->gd[$f->fm['id']]==4 || $f->user['admin']>0)
|
||||
//{
|
||||
$add = $f->addnewtop(
|
||||
$_POST['title'], $_POST['text'], $_POST['icon'], time(), $f->user['login'], $f->user['id'],
|
||||
$_POST['add_top'], -1
|
||||
);
|
||||
if ($add > 0) {
|
||||
$fnt = 'На форуме, в разделе "Новости" опубликована новая статья "<b>' . $_POST['title'] . '</b>". <a href=https://' . $c['host'] . '/forum?read=' . $add . ' target=_blank \>Читать далее</a>';
|
||||
mysql_query('INSERT INTO `chat` (`type`,`time`,`text`) VALUES ("45","' . time() . '","' . $fnt . '")');
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setText($fnt);
|
||||
$cmsg->setType(45);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
}
|
||||
//}
|
||||
|
||||
} elseif (isset($_POST['add_otv'])) {
|
||||
$addTo = mysql_fetch_array(
|
||||
mysql_query(
|
||||
@ -98,12 +99,9 @@ if (isset($f->user['id'])) {
|
||||
)
|
||||
);
|
||||
if (isset($addTo['id'])) {
|
||||
//if($f->gd[$addTo['fid']]==2 || $f->gd[$addTo['fid']]==4 || $f->user['admin']>0)
|
||||
//{
|
||||
$add = $f->addnewtop(
|
||||
'', $_POST['text2'], 0, time(), $f->user['login'], $f->user['id'], $addTo['fid'], $addTo['id']
|
||||
);
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -130,12 +128,18 @@ if (isset($_GET['read']) && $f->mod == 1) {
|
||||
}
|
||||
}
|
||||
|
||||
$dost = [0 => 'всем пользователям', 1 => 'только чтение', 2 => 'только для Ангелов', 3 => 'только для Паладинов', 4 => 'только для Тарманов'];
|
||||
$dost = [
|
||||
0 => 'всем пользователям',
|
||||
1 => 'только чтение',
|
||||
2 => 'только для Ангелов',
|
||||
3 => 'только для Паладинов',
|
||||
4 => 'только для Тарманов',
|
||||
];
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
|
||||
<link rel="canonical" href="https://new-combats.com/forum"/>
|
||||
<title>Форум браузерной онлайн игры Новый «Бойцовский клуб»</title>
|
||||
<meta name="description"
|
||||
@ -154,7 +158,7 @@ $dost = [0 => 'всем пользователям', 1 => 'только чтен
|
||||
<script src="https://<?= $c['host'] ?>/js/interface.js"></script>
|
||||
<script src="https://<?= $c['host'] ?>/js/jqueryrotate.js"></script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://<?= $c['host'] ?>/css/windows.css"/>
|
||||
<link rel="stylesheet" href="https://<?= $c['host'] ?>/css/windows.css"/>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
html {
|
||||
@ -169,10 +173,7 @@ $dost = [0 => 'всем пользователям', 1 => 'только чтен
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin-left: 0px;
|
||||
margin-top: 0px;
|
||||
margin-right: 0px;
|
||||
margin-bottom: 0px;
|
||||
margin: 0;
|
||||
background-color: #3D3D3B;
|
||||
font-size: 10pt;
|
||||
font-family: Verdana, Helvetica, Arial, Tahoma, sans-serif;
|
||||
@ -471,9 +472,9 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
'<tr>' +
|
||||
'<td colspan="2"><table width="100%">' +
|
||||
'<tr>' +
|
||||
<? if($f->user['admin'] > 0 ) { ?>
|
||||
<?php if($f->user['admin'] > 0 ) { ?>
|
||||
'<td><div align="left"><input name="adminname_adm" id="adminname_adm" type="checkbox" value="1" /><label for="adminname_adm"> От имени Администрации проекта.</label></div><br><br /></td>' +
|
||||
<? } ?>
|
||||
<?php } ?>
|
||||
'<td width="120" align="right"><input type="submit" class="btn" value="Добавить" name="add2_adm" />' +
|
||||
'<input type="hidden" id="add_otv_adm" name="add_otv_adm" value="' + id + '" /></td>' +
|
||||
'</tr>' +
|
||||
@ -501,7 +502,7 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
<td width="1" bgcolor="#F2E5B1"> </td>
|
||||
<td valign="top" bgcolor="#F2E5B1" align="left">
|
||||
<!-- -->
|
||||
<?= !empty($f->error) && $f->r != -2? '<b style="color: red">' . $f->error . '</b>' : ''?>
|
||||
<?= !empty($f->error) && $f->r != -2 ? '<b style="color: red">' . $f->error . '</b>' : '' ?>
|
||||
<?php
|
||||
|
||||
if ($f->user['admin'] > 0 && isset($_GET['aem'])) {
|
||||
@ -509,7 +510,7 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
<div style="margin:30px;">
|
||||
<p><a href="javascript:void(0);" onClick="history.back();">Вернуться назад</a></p>
|
||||
<br>
|
||||
<?
|
||||
<?php
|
||||
$ed = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `forum_msg` WHERE `id` = "' . ((int)$_GET['aem']) . '" LIMIT 1')
|
||||
);
|
||||
@ -523,7 +524,7 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?
|
||||
<?php
|
||||
} elseif (isset($_GET['search'])) {
|
||||
//Ищем на форуме
|
||||
if (isset($_POST['search'])) {
|
||||
@ -556,7 +557,7 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div align="center"><?
|
||||
<div align="center"><?php
|
||||
if (!$f->user) {
|
||||
echo 'Вы не авторизованы<br><a href="https://' . $c['host'] . '/">Войти на персонажа</a>';
|
||||
} else {
|
||||
@ -564,7 +565,7 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
$u->info['id'], 1
|
||||
) . '<br><br>';
|
||||
} ?>
|
||||
<?
|
||||
<?php
|
||||
if (($f->user['align'] > 1 && $f->user['align'] < 2) || ($f->user['align'] > 3 && $f->user['align'] < 4) || $f->user['admin'] > 0) {
|
||||
echo '<br><a href="?r=' . $_GET['r'] . '&mod_use&rnd=' . $code . '">«Модерирование» [' . $mod . ']</a>';
|
||||
}
|
||||
@ -584,7 +585,7 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?
|
||||
<?php
|
||||
echo $f->menu; ?>
|
||||
<div class="line1"></div>
|
||||
</td>
|
||||
@ -605,7 +606,7 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
<tr>
|
||||
<td>
|
||||
<div align="center">
|
||||
<?
|
||||
<?php
|
||||
echo '<H3>Результаты поиска по запросу: "' . $word . '". Найдено записей ' . $limw . ' шт.</H3><br>'; ?></div>
|
||||
<div align="left"></div>
|
||||
</td>
|
||||
@ -614,13 +615,13 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<?
|
||||
<?php
|
||||
$p_list = $f->paginator(1);
|
||||
?>
|
||||
<td>
|
||||
<div align="left"><img
|
||||
src="https://new-combats.com/forum_script/img/news.gif"
|
||||
width="16" height="16"> Страницы: <?
|
||||
width="16" height="16"> Страницы: <?php
|
||||
echo $p_list; ?></div>
|
||||
</td>
|
||||
<td width="250">
|
||||
@ -637,7 +638,7 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<div align="left">
|
||||
<?
|
||||
<?php
|
||||
$f->forumData(); ?>
|
||||
</div>
|
||||
</td>
|
||||
@ -646,7 +647,7 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
<td>
|
||||
<div align="left" style="margin-top:5px;"><img
|
||||
src="https://new-combats.com/forum_script/img/news.gif"
|
||||
width="16" height="16"> Страницы: <?
|
||||
width="16" height="16"> Страницы: <?php
|
||||
echo $p_list; ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
@ -658,7 +659,7 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?
|
||||
<?php
|
||||
} elseif ($f->r >= 1) {
|
||||
//смотрим разделы
|
||||
?>
|
||||
@ -672,7 +673,7 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div align="center"><?
|
||||
<div align="center"><?php
|
||||
if ($f->user == false) {
|
||||
echo 'Вы не авторизованы<br><a href="https://' . $c['host'] . '/">Войти на персонажа</a>';
|
||||
} else {
|
||||
@ -680,7 +681,7 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
$u->info['id'], 1
|
||||
) . '<br><br>';
|
||||
} ?>
|
||||
<?
|
||||
<?php
|
||||
if (($f->user['align'] > 1 && $f->user['align'] < 2) || ($f->user['align'] > 3 && $f->user['align'] < 4) || $f->user['admin'] > 0) {
|
||||
echo '<br><a href="?r=' . $_GET['r'] . '&mod_use&rnd=' . $code . '">«Модерирование» [' . $mod . ']</a>';
|
||||
}
|
||||
@ -700,7 +701,7 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?
|
||||
<?php
|
||||
echo $f->menu; ?>
|
||||
<div class="line1"></div>
|
||||
</td>
|
||||
@ -721,7 +722,7 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
<tr>
|
||||
<td>
|
||||
<div align="center">
|
||||
<?
|
||||
<?php
|
||||
echo '<H3>Конференция "' . $f->fm['name'] . '"</H3><br><br>' . $f->fm['opisan']; ?></div>
|
||||
<div align="left"></div>
|
||||
</td>
|
||||
@ -730,13 +731,13 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<?
|
||||
<?php
|
||||
$p_list = $f->paginator(1);
|
||||
?>
|
||||
<td>
|
||||
<div align="left"><img
|
||||
src="https://new-combats.com/forum_script/img/news.gif"
|
||||
width="16" height="16"> Страницы: <?
|
||||
width="16" height="16"> Страницы: <?php
|
||||
echo $p_list; ?></div>
|
||||
</td>
|
||||
<td width="250">
|
||||
@ -753,7 +754,7 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<div align="left">
|
||||
<?
|
||||
<?php
|
||||
$f->forumData(); ?>
|
||||
</div>
|
||||
</td>
|
||||
@ -762,7 +763,7 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
<td>
|
||||
<div align="left" style="margin-top:5px;"><img
|
||||
src="https://new-combats.com/forum_script/img/news.gif"
|
||||
width="16" height="16"> Страницы: <?
|
||||
width="16" height="16"> Страницы: <?php
|
||||
echo $p_list; ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
@ -771,15 +772,15 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<?
|
||||
<?php
|
||||
if (isset($f->user['id'])) { ?>
|
||||
<div style="border:1px solid #FFFFFF; margin:21px;">
|
||||
<?
|
||||
<?php
|
||||
if ($f->gd[$f->fm['id']] != 2 && $f->gd[$f->fm['id']] != 4 && $f->user['admin'] == 0) {
|
||||
echo '<center><br>Вы не можете создавать топики в этой конференции<br><br></center>';
|
||||
} elseif ($f->lst['time'] < time() - 60) { ?>
|
||||
<form method="post"
|
||||
action="https://new-combats.com/forum?r=<?
|
||||
action="https://new-combats.com/forum?r=<?php
|
||||
echo $f->r . '&rnd=' . $code . ''; ?>">
|
||||
<table align="center">
|
||||
<tr>
|
||||
@ -816,7 +817,7 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
<td colspan="2">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td><?
|
||||
<td><?php
|
||||
if ($f->user['admin'] > 0) {
|
||||
echo '<div align="left"><input name="adminname" id="adminname" type="checkbox" value="1" /><label for="adminname"> От имени Администрации проекта.</label></div><br>';
|
||||
}
|
||||
@ -895,11 +896,11 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
value="Добавить"
|
||||
name="add"/>
|
||||
<input type="hidden" id="key"
|
||||
name="key" value="<?
|
||||
name="key" value="<?php
|
||||
echo $f->user['nextAct']; ?>"/>
|
||||
<input type="hidden"
|
||||
id="add_top"
|
||||
name="add_top" value="<?
|
||||
name="add_top" value="<?php
|
||||
echo $f->fm['id']; ?>"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -907,14 +908,14 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?
|
||||
<?php
|
||||
} else {
|
||||
echo '<br><center>Временное ограничение на создание топиков.<br> Осталось подождать ' . round(
|
||||
$f->lst['time'] + 61 - time()
|
||||
) . ' сек.</center><br>';
|
||||
} ?>
|
||||
</div>
|
||||
<?
|
||||
<?php
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
@ -923,7 +924,7 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?
|
||||
<?php
|
||||
} elseif ($f->r == -1) {
|
||||
//оставляем комментарий
|
||||
?>
|
||||
@ -939,7 +940,7 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
<tr>
|
||||
<td>
|
||||
<div align="center">
|
||||
<?
|
||||
<?php
|
||||
$url1 = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`title` FROM `forum_msg` WHERE `fid` = "' . $f->see['fid'] . '" AND `topic` = "-1" AND `delete` = "0" AND `id` > ' . $f->see['id'] . ' ORDER BY `id` ASC LIMIT 1'
|
||||
@ -963,8 +964,8 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
}
|
||||
|
||||
?>
|
||||
<DIV align="center"><?= $url1 ?> | <A href="?r=<?
|
||||
echo $f->fm['id']; ?>" title="Конференция "<?
|
||||
<DIV align="center"><?= $url1 ?> | <A href="?r=<?php
|
||||
echo $f->fm['id']; ?>" title="Конференция "<?php
|
||||
echo $f->fm['name']; ?>""><b>форум</b></A> | <?= $url2 ?><BR>
|
||||
</DIV>
|
||||
</div>
|
||||
@ -974,30 +975,30 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<?
|
||||
<?php
|
||||
$p_list = $f->paginator(2);
|
||||
?>
|
||||
<td>Страницы: <?
|
||||
<td>Страницы: <?php
|
||||
echo $p_list; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-top:11px; padding-bottom:11px;" align="left">
|
||||
<div style="float:left"><h4><img
|
||||
src="https://new-combats.com/forum_script/img/icon<?
|
||||
echo $f->see['ico']; ?>.gif"> <a href="?r=<?
|
||||
echo $f->fm['id'] . '&rnd=' . $code; ?>"><b><?
|
||||
echo $f->fm['name']; ?></b></a> > <?
|
||||
src="https://new-combats.com/forum_script/img/icon<?php
|
||||
echo $f->see['ico']; ?>.gif"> <a href="?r=<?php
|
||||
echo $f->fm['id'] . '&rnd=' . $code; ?>"><b><?php
|
||||
echo $f->fm['name']; ?></b></a> > <?php
|
||||
echo $f->see['title']; ?></h4></div>
|
||||
<?
|
||||
<?php
|
||||
if (($f->user['align'] > 1.5 || $f->user['align'] > 3.05 || $f->user['admin'] > 0) && $f->mod == 1) { ?>
|
||||
<div style="float:right;">
|
||||
Доступ: <?
|
||||
Доступ: <?php
|
||||
echo $dost[$f->see['nocom']]; ?><br>
|
||||
<select name="jumpTopic" id="jumpTopic"
|
||||
onChange="MM_jumpMenu('parent',this,0)">
|
||||
<option selected="selected">--------- переместить ---------
|
||||
</option>
|
||||
<?
|
||||
<?php
|
||||
$rtn = '';
|
||||
$sp = mysql_query('SELECT * FROM `forum_menu`');
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
@ -1011,97 +1012,94 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
<select name="actionTopic" id="actionTopic"
|
||||
onChange="MM_jumpMenu('parent',this,0)">
|
||||
<option selected>----------- действия -----------</option>
|
||||
<?
|
||||
<?php
|
||||
if ($f->see['nocom'] == 0) { ?>
|
||||
<option value="?read=<?
|
||||
<option value="?read=<?php
|
||||
echo $_GET['read'] . '&nocomment=1&rnd=' . $code . ''; ?>">
|
||||
Запретить оставлять ответы
|
||||
</option>
|
||||
<?
|
||||
<?php
|
||||
} ?>
|
||||
<option value="?read=<?
|
||||
<option value="?read=<?php
|
||||
echo $_GET['read'] . '&delete=1&rnd=' . $code . ''; ?>">удалить
|
||||
топик
|
||||
</option>
|
||||
<?
|
||||
<?php
|
||||
if ($f->see['fixed'] == 0) { ?>
|
||||
<option value="?read=<?
|
||||
<option value="?read=<?php
|
||||
echo $_GET['read'] . '&fixed=1&rnd=' . $code . ''; ?>">
|
||||
Зафиксировать топик
|
||||
</option>
|
||||
<?
|
||||
<?php
|
||||
} else { ?>
|
||||
<option value="?read=<?
|
||||
<option value="?read=<?php
|
||||
echo $_GET['read'] . '&fixed=1&rnd=' . $code . ''; ?>">
|
||||
Убрать фиксацию топика
|
||||
</option>
|
||||
<?
|
||||
<?php
|
||||
}
|
||||
if ($f->see['nocom'] == 0) {
|
||||
if ($f->user['admin'] > 0) {
|
||||
?>
|
||||
<option value="?read=<?
|
||||
<option value="?read=<?php
|
||||
echo $_GET['read'] . '&onlyadmin=1&rnd=' . $code . ''; ?>">
|
||||
только для Ангелов
|
||||
</option>
|
||||
<?
|
||||
<?php
|
||||
}
|
||||
if (($f->user['align'] > 1.5 && $f->user['align'] < 2) || $f->user['admin'] > 0) {
|
||||
?>
|
||||
<option value="?read=<?
|
||||
<option value="?read=<?php
|
||||
echo $_GET['read'] . '&onlymoder=1&rnd=' . $code . ''; ?>">
|
||||
только для Паладинов
|
||||
</option>
|
||||
<?
|
||||
<?php
|
||||
}
|
||||
if (($f->user['align'] > 3.05 && $f->user['align'] < 4) || $f->user['admin'] > 0) {
|
||||
?>
|
||||
<option value="?read=<?
|
||||
<option value="?read=<?php
|
||||
echo $_GET['read'] . '&onlymoder=2&rnd=' . $code . ''; ?>">
|
||||
только для Тарманов
|
||||
</option>
|
||||
<?
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
<option value="?read=<?
|
||||
<option value="?read=<?php
|
||||
echo $_GET['read'] . '&onlyall=1&rnd=' . $code . ''; ?>">
|
||||
разрешить оставлять ответ
|
||||
</option>
|
||||
<?
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
<?
|
||||
<?php
|
||||
} ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?
|
||||
<td><?php
|
||||
$f->seeTopic(); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-top:3px; padding-bottom:3px;" align="left">Страницы: <?
|
||||
<td style="padding-top:3px; padding-bottom:3px;" align="left">Страницы: <?php
|
||||
echo $p_list; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-top:3px; padding-bottom:3px;" align="left"><?
|
||||
<td style="padding-top:3px; padding-bottom:3px;" align="left"><?php
|
||||
if (isset($f->user['id']) || !isset($f->user['id'])) { ?>
|
||||
<div style="border:1px solid #EFEFEF; margin:21px;">
|
||||
<?
|
||||
<?php
|
||||
if ($f->see['nocom'] > 0) {
|
||||
echo '<center><br><font color="red"><b>Обсуждение закрыто</b></font><br><br></center>';
|
||||
} elseif ($f->see['goodAdd'] != 1 || $f->pravasee() != 1) {
|
||||
echo '<center><br>Вы не можете оставлять ответы в этом топике.<br>Попробуйте через ' . round(
|
||||
$f->lst['time'] + 62 - time()
|
||||
) . ' сек.<br><br></center>';
|
||||
}/*elseif($f->gd[$f->see['fid']]!=3 && $f->gd[$f->see['fid']]!=4 && $f->user['admin']==0)
|
||||
{
|
||||
echo '<center><br>Вы не можете оставлять ответы в этом топике<br><br></center>';
|
||||
}*/ elseif ($f->lst['time'] < time() - 60) { ?>
|
||||
} elseif ($f->lst['time'] < time() - 60) { ?>
|
||||
<form method="post"
|
||||
action="https://new-combats.com/forum?read=<?
|
||||
action="https://new-combats.com/forum?read=<?php
|
||||
echo $f->see['id'] . '&rnd=' . $code . ''; ?>">
|
||||
<table align="center">
|
||||
<tr>
|
||||
@ -1127,7 +1125,7 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
<td colspan="2">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td><?
|
||||
<td><?php
|
||||
if ($f->user['admin'] > 0) {
|
||||
echo '<div align="left"><input name="adminname" id="adminname" type="checkbox" value="1" /><label for="adminname"> От имени Администрации проекта.</label></div><br>';
|
||||
}
|
||||
@ -1137,10 +1135,10 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
value="Добавить"
|
||||
name="add2"/>
|
||||
<input type="hidden" id="key2"
|
||||
name="key2" value="<?
|
||||
name="key2" value="<?php
|
||||
echo $f->user['nextAct']; ?>"/>
|
||||
<input type="hidden" id="add_otv"
|
||||
name="add_otv" value="<?
|
||||
name="add_otv" value="<?php
|
||||
echo $f->see['id']; ?>"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1148,12 +1146,12 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?
|
||||
<?php
|
||||
} else {
|
||||
echo '<br><center>Временное ограничение на добавление ответов.</center><br>';
|
||||
} ?>
|
||||
</div>
|
||||
<?
|
||||
<?php
|
||||
} ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
@ -1161,18 +1159,19 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
<td width="118" valign="top"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<?
|
||||
<?php
|
||||
} elseif ($f->r == -2) {
|
||||
//МЕГА-выводим ошибку
|
||||
?>
|
||||
<table width="100%" height="500" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td valign="middle" align="center"><strong>Ошибка:</strong> <?
|
||||
echo $f->error; ?><br><a href="https://new-combats.com/forum?rnd=<?
|
||||
echo $code; ?>">Вернуться на форум</a></td>
|
||||
<td valign="middle" align="center">
|
||||
<strong>Ошибка:</strong> <?= $f->error ?><br>
|
||||
<a href="https://new-combats.com/forum?rnd=<?= $code ?>">Вернуться на форум</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?
|
||||
<?php
|
||||
} ?>
|
||||
<!-- -->
|
||||
</td>
|
||||
@ -1185,11 +1184,11 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
|
||||
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="10%" scope="col">
|
||||
<DIV> <?
|
||||
<DIV> <?php
|
||||
echo $c['counters']; ?> </DIV>
|
||||
</td>
|
||||
<td width="80%" scope="col">
|
||||
<div align="center"><?
|
||||
<div align="center"><?php
|
||||
echo $c['copyright']; ?></div>
|
||||
</td>
|
||||
<td width="10%" scope="col"> </td>
|
||||
|
@ -7,111 +7,126 @@ $dataSet = $_POST;
|
||||
//foreach ($dataSet as $key => $val) {
|
||||
// $answer .= $key.' => '.$val.PHP_EOL;
|
||||
//}
|
||||
$c = array(
|
||||
/* MySQL База данных */
|
||||
'db_name' => 'pay_operations', //Таблица в которую заносятся данные
|
||||
'db_host' => 'localhost',
|
||||
'db_user' => 'newcom1_abk',
|
||||
'db_pass' => '4nWYsIM[c?}P',
|
||||
'db_base' => 'newcom1_abk',
|
||||
/* Настройки платежей
|
||||
'ip_list' => array('127,0,0,1,188.166.34.68,136.243.38.147,136.243.38.149,136.243.38.150,136.243.38.151,136.243.38.189,88.198.88.98'), //Указывать через запятую (Разрешенные IP)
|
||||
'key' => 'qtzl0igb', //gamedealer key
|
||||
'id' => '65643' //ID проекта*/
|
||||
);
|
||||
function connect_db($c) {
|
||||
$db = mysql_connect($c['db_host'],$c['db_user'],$c['db_pass']) or die('Ошибка подключения к MySQL серверу!');
|
||||
mysql_select_db($c['db_base'],$db) or die('Ошибка подключения к базе данных!');
|
||||
mysql_query('SET NAMES utf8mb4');
|
||||
}
|
||||
$c = [
|
||||
/* MySQL База данных */
|
||||
'db_name' => 'pay_operations', //Таблица в которую заносятся данные
|
||||
'db_host' => 'localhost',
|
||||
'db_user' => 'newcom1_abk',
|
||||
'db_pass' => '4nWYsIM[c?}P',
|
||||
'db_base' => 'newcom1_abk',
|
||||
/* Настройки платежей
|
||||
'ip_list' => array('127,0,0,1,188.166.34.68,136.243.38.147,136.243.38.149,136.243.38.150,136.243.38.151,136.243.38.189,88.198.88.98'), //Указывать через запятую (Разрешенные IP)
|
||||
'key' => 'qtzl0igb', //gamedealer key
|
||||
'id' => '65643' //ID проекта*/
|
||||
];
|
||||
function connect_db($c)
|
||||
{
|
||||
$db = mysql_connect($c['db_host'], $c['db_user'], $c['db_pass']) or die('Ошибка подключения к MySQL серверу!');
|
||||
mysql_select_db($c['db_base'], $db) or die('Ошибка подключения к базе данных!');
|
||||
mysql_query('SET NAMES utf8mb4');
|
||||
}
|
||||
|
||||
$needle = $dataSet['ik_sign'];
|
||||
unset($dataSet['ik_sign']);// удаляем из данных строку подписи
|
||||
ksort($dataSet, SORT_STRING); // сортируем по ключам в алфавитном порядке элементы массива
|
||||
$test_key = '8RRwZKMHllBKtux6'; // В данном случае используется тестовый ключ
|
||||
array_push($dataSet, $test_key); // добавляем в конец массива ключ
|
||||
$signString = implode(':', $dataSet); // конкатенируем значения через символ ":"
|
||||
$sign = base64_encode(md5($signString, true)); // берем MD5 хэш в бинарном виде по сформированной строке и кодируем в BASE64
|
||||
$sign = base64_encode(
|
||||
md5($signString, true)
|
||||
); // берем MD5 хэш в бинарном виде по сформированной строке и кодируем в BASE64
|
||||
if ($needle == $sign) {
|
||||
$answer .= 'Sign successfully'.PHP_EOL;
|
||||
$answer .= 'Sign successfully' . PHP_EOL;
|
||||
echo 'OK';
|
||||
|
||||
connect_db($c);
|
||||
$nick = mysql_fetch_array(mysql_query('SELECT * FROM `pay_operation` WHERE `id` = "'.$dataSet['ik_pm_no'].'" LIMIT 1'));
|
||||
$user = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$nick['uid'].'" LIMIT 1'));
|
||||
if (isset ($dataSet['ik_pm_no']))
|
||||
{
|
||||
if ($nick['good']!=0)
|
||||
{
|
||||
echo "Уже начисленно";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
mysql_query('UPDATE `users` SET `money2` = `money2` + '.$nick['ekr'].' WHERE `id` = "'.$nick['uid'].'" LIMIT 1');
|
||||
mysql_query('UPDATE `pay_operation` SET `good` = "'.time().'" WHERE `id` = "'.$dataSet['ik_pm_no'].'" LIMIT 1');
|
||||
mysql_query('UPDATE `users` SET `catch` = `catch` + '.$nick['ekr'].' WHERE `id` = "'.$nick['uid'].'" LIMIT 1');
|
||||
|
||||
//mysql_query('INSERT INTO `'.$c['db_name'].'` (`time`,`type`,`ip`,`value`,`money`,`project`) VALUES ("'.time().'","'.mysql_real_escape_string($type).'","'.$_SERVER['HTTP_X_REAL_IP'].'","'.mysql_real_escape_string($value).'","'.mysql_real_escape_string($money).'","'.mysql_real_escape_string($this->id).'")');
|
||||
|
||||
$r = '<span class=date>'.date('d.m.Y H:i').'</span> Алхимик <img src=https://img.new-combats.com/i/align/align50.gif width=12 height=15 /><u><b>Администратор</b> / Автоматическая оплата</u> сообщает: ';
|
||||
if($user['sex'] == 1)
|
||||
{
|
||||
$r .= 'Уважаемая';
|
||||
}
|
||||
else
|
||||
{
|
||||
$r .= 'Уважаемый';
|
||||
}
|
||||
$r .= ' <b>'.$user['login'].'</b>, на Ваш игровой счет зачислено '.$nick['ekr'].' Еврокредитов. Благодарим Вас за покупку!';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','".$user['city']."','".$user['room']."','','".$user['login']."','".$r."','-1','5','0')");
|
||||
|
||||
|
||||
if ($nick['ref'] !=0)
|
||||
{
|
||||
$refecr=round(($nick['ekr']/10));
|
||||
mysql_query('UPDATE `users` SET `money2` = `money2` + '.$refecr.' WHERE `id` = "'.$nick['ref'].'" LIMIT 1');
|
||||
$referal = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$nick['ref'].'" LIMIT 1'));
|
||||
$r = '<span class=date>'.date('d.m.Y H:i').'</span> Алхимик <img src=https://img.new-combats.com/i/align/align50.gif width=12 height=15 /><u><b>Администратор</b> / Реферальный заработок</u> сообщает: ';
|
||||
if($referal['sex'] == 1)
|
||||
{
|
||||
$r .= 'Уважаемая';
|
||||
}
|
||||
else
|
||||
{
|
||||
$r .= 'Уважаемый';
|
||||
}
|
||||
$r .= ' <b>'.$referal['login'].'</b>, на Ваш игровой счет зачислено '.$refecr.' Еврокредитов. Благодоря вашему рефералу!'.$user['login'].'';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','".$referal['city']."','".$referal['room']."','','".$referal['login']."','".$r."','-1','5','0')");
|
||||
|
||||
|
||||
}
|
||||
|
||||
echo "Покупател: ".$user['login']." | ID: ".$nick['uid']." | Сумма: ".$nick['ekr']." | ID операции: ".$dataSet['ik_pm_no']."<br>";
|
||||
if (isset ($referal['id']))
|
||||
{
|
||||
echo "Реферал(тот кто привел): ".$referal['login']." | ID: ".$referal['id']." | Сумма: ".$refecr."<br>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Пользователь реферал не найден!!";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Покупатель не указан!";
|
||||
}
|
||||
connect_db($c);
|
||||
$nick = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `pay_operation` WHERE `id` = "' . $dataSet['ik_pm_no'] . '" LIMIT 1')
|
||||
);
|
||||
$user = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "' . $nick['uid'] . '" LIMIT 1'));
|
||||
if (isset ($dataSet['ik_pm_no'])) {
|
||||
if ($nick['good'] != 0) {
|
||||
echo "Уже начисленно";
|
||||
} else {
|
||||
|
||||
mysql_query(
|
||||
'UPDATE `users` SET `money2` = `money2` + ' . $nick['ekr'] . ' WHERE `id` = "' . $nick['uid'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query(
|
||||
'UPDATE `pay_operation` SET `good` = "' . time(
|
||||
) . '" WHERE `id` = "' . $dataSet['ik_pm_no'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query(
|
||||
'UPDATE `users` SET `catch` = `catch` + ' . $nick['ekr'] . ' WHERE `id` = "' . $nick['uid'] . '" LIMIT 1'
|
||||
);
|
||||
|
||||
//mysql_query('INSERT INTO `'.$c['db_name'].'` (`time`,`type`,`ip`,`value`,`money`,`project`) VALUES ("'.time().'","'.mysql_real_escape_string($type).'","'.$_SERVER['HTTP_X_REAL_IP'].'","'.mysql_real_escape_string($value).'","'.mysql_real_escape_string($money).'","'.mysql_real_escape_string($this->id).'")');
|
||||
|
||||
$r = '<span class=date>' . date(
|
||||
'd.m.Y H:i'
|
||||
) . '</span> Алхимик <img src=https://img.new-combats.com/i/align/align50.gif width=12 height=15 /><u><b>Администратор</b> / Автоматическая оплата</u> сообщает: ';
|
||||
if ($user['sex'] == 1) {
|
||||
$r .= 'Уважаемая';
|
||||
} else {
|
||||
$r .= 'Уважаемый';
|
||||
}
|
||||
$r .= ' <b>' . $user['login'] . '</b>, на Ваш игровой счет зачислено ' . $nick['ekr'] . ' Еврокредитов. Благодарим Вас за покупку!';
|
||||
$chatDto = new ChatMessage();
|
||||
$chatDto->setCity($user['city']);
|
||||
$chatDto->setRoom($user['room']);
|
||||
$chatDto->setTo($user['login']);
|
||||
$chatDto->setText($r);
|
||||
$chatDto->setTime(-1);
|
||||
$chatDto->setType(5);
|
||||
(new Chat())->sendMsg($chatDto);
|
||||
|
||||
|
||||
if ($nick['ref'] != 0) {
|
||||
$refecr = round(($nick['ekr'] / 10));
|
||||
mysql_query(
|
||||
'UPDATE `users` SET `money2` = `money2` + ' . $refecr . ' WHERE `id` = "' . $nick['ref'] . '" LIMIT 1'
|
||||
);
|
||||
$referal = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `users` WHERE `id` = "' . $nick['ref'] . '" LIMIT 1')
|
||||
);
|
||||
$r = '<span class=date>' . date(
|
||||
'd.m.Y H:i'
|
||||
) . '</span> Алхимик <img src=https://img.new-combats.com/i/align/align50.gif width=12 height=15 /><u><b>Администратор</b> / Реферальный заработок</u> сообщает: ';
|
||||
if ($referal['sex'] == 1) {
|
||||
$r .= 'Уважаемая';
|
||||
} else {
|
||||
$r .= 'Уважаемый';
|
||||
}
|
||||
$r .= ' <b>' . $referal['login'] . '</b>, на Ваш игровой счет зачислено ' . $refecr . ' Еврокредитов. Благодоря вашему рефералу!' . $user['login'];
|
||||
$chatDto = new ChatMessage();
|
||||
$chatDto->setCity($referal['city']);
|
||||
$chatDto->setRoom($referal['room']);
|
||||
$chatDto->setTo($referal['login']);
|
||||
$chatDto->setText($r);
|
||||
$chatDto->setTime(-1);
|
||||
$chatDto->setType(5);
|
||||
(new Chat())->sendMsg($chatDto);
|
||||
}
|
||||
|
||||
echo "Покупател: " . $user['login'] . " | ID: " . $nick['uid'] . " | Сумма: " . $nick['ekr'] . " | ID операции: " . $dataSet['ik_pm_no'] . "<br>";
|
||||
if (isset ($referal['id'])) {
|
||||
echo "Реферал(тот кто привел): " . $referal['login'] . " | ID: " . $referal['id'] . " | Сумма: " . $refecr . "<br>";
|
||||
} else {
|
||||
echo "Пользователь реферал не найден!!";
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
echo "Покупатель не указан!";
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
$answer .= 'Sign do not match'.PHP_EOL;
|
||||
$answer .= 'Sign do not match' . PHP_EOL;
|
||||
echo 'Something bad';
|
||||
}
|
||||
$answer .= 'IK sing :'.$needle.PHP_EOL;
|
||||
$answer .= 'locally formed :'.$sign.PHP_EOL;
|
||||
$answer .= 'IK sing :' . $needle . PHP_EOL;
|
||||
$answer .= 'locally formed :' . $sign . PHP_EOL;
|
||||
file_put_contents('answer.txt', $answer);
|
||||
|
||||
//35.233.69.55, 34.77.232.58, 35.240.117.224
|
||||
?>
|
@ -23,11 +23,7 @@ if (!isset($CRON_CORE)) {
|
||||
|
||||
function e($t)
|
||||
{
|
||||
mysql_query(
|
||||
'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("core #' . date('d.m.Y') . ' %' . date(
|
||||
'H:i:s'
|
||||
) . ' (Критическая ошибка): <b>' . mysql_real_escape_string($t) . '</b>","capitalcity","INFINITY","6","1","-1")'
|
||||
);
|
||||
(new Chat())->debug($t, true);
|
||||
}
|
||||
|
||||
if (isset($_GET['cron_core'])) {
|
||||
|
@ -1,228 +1,224 @@
|
||||
<?php
|
||||
|
||||
function e($t) {
|
||||
mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("core #'.date('d.m.Y').' %'.date('H:i:s').' (Критическая ошибка): <b>'.mysql_real_escape_string($t).'</b>","capitalcity","INFINITY","6","1","-1")');
|
||||
}
|
||||
|
||||
$_POST['id'] = 'reflesh';
|
||||
//
|
||||
|
||||
if(isset($_POST['atack'],$_POST['block']) || (isset($_POST['id']) && $_POST['id']=='reflesh') || isset($_POST['usepriem']) || isset($_POST['useitem']))
|
||||
{
|
||||
|
||||
session_start();
|
||||
$tm = microtime();
|
||||
$tm = explode(' ',$tm);
|
||||
$tm = $tm[0]+$tm[1];
|
||||
|
||||
unset($tm);
|
||||
$js = '';
|
||||
|
||||
if( $u->info['battle'] == 0 ) {
|
||||
$btl_last = mysql_fetch_array(mysql_query('SELECT `id`,`battle` FROM `battle_users` WHERE `uid` = "'.$u->info['id'].'" AND `finish` = "0" LIMIT 1'));
|
||||
if( isset($btl_last['id']) && $u->info['battle'] == 0 ) {
|
||||
echo '<script>document.getElementById(\'teams\').style.display=\'none\';var battleFinishData = "'.$u->info['battle_text'].'";</script>';
|
||||
$u->info['battle'] = $btl_last['id'];
|
||||
$u->info['battle_lsto'] = true;
|
||||
mysql_query('UPDATE `stats` SET `battle_text` = "",`last_b`="0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
mysql_query('UPDATE `battle_users` SET `finish` = 1 WHERE `uid` = "'.$u->info['id'].'"');
|
||||
echo '<script>alert("Поединок для вас завершился.");location.href="main.php?finish=1";</script>';
|
||||
}
|
||||
}
|
||||
|
||||
if(!isset($CRON_CORE)) {
|
||||
if(!isset($u->info['id']) || ($u->info['joinIP']==1 && $u->info['ip']!=$_SERVER['HTTP_X_REAL_IP']))
|
||||
{
|
||||
die($c['exit']);
|
||||
}
|
||||
}
|
||||
|
||||
function json_fix_cyr($json_str) {
|
||||
return $json_str;
|
||||
}
|
||||
|
||||
//$u->stats = $u->getStats($u->info['id'],0);
|
||||
|
||||
if(!isset($CRON_CORE)) {
|
||||
if($u->info['online']<time()-30)
|
||||
{
|
||||
mysql_query("UPDATE `users` SET `online`='".time()."',`timeMain`='".time()."' WHERE `id`='".$u->info['id']."' LIMIT 1");
|
||||
}
|
||||
}
|
||||
|
||||
$btl->is = $u->is;
|
||||
$btl->items = $u->items;
|
||||
$btl->info = $btl->battleInfo($u->info['battle']);
|
||||
|
||||
if(!isset($btl->info['id']))
|
||||
{
|
||||
if($u->info['battle']==-1)
|
||||
{
|
||||
//завершаем поединок
|
||||
$upd = mysql_query('UPDATE `users` SET `battle` = "0",`online` = "'.time().'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
if(!$upd)
|
||||
{
|
||||
if(!isset($CRON_CORE)) {
|
||||
die('Ошибка завершения поединка.');
|
||||
}
|
||||
}else{
|
||||
echo '<script>location="main.php";</script>';
|
||||
}
|
||||
}else{
|
||||
mysql_query('UPDATE `users` SET `battle` = "0" WHERE `battle` = "'.$u->info['battle'].'" LIMIT 100');
|
||||
if(!isset($CRON_CORE)) {
|
||||
die('<script>location="main.php";</script>');
|
||||
}
|
||||
}
|
||||
}else{
|
||||
//получаем массив с игроками в бою
|
||||
$btl->teamsTake();
|
||||
|
||||
if(isset($_POST['useitem']) && $btl->testUsersLive() == true) {
|
||||
$magic->useItems((int)$_POST['useitem']);
|
||||
if($u->error!='') {
|
||||
echo '<font color=red><center><b>'.$u->error.'</b></center></font>';
|
||||
}
|
||||
}
|
||||
|
||||
//заносим удары,приемы,эффекты и т.д.
|
||||
//удар
|
||||
if(isset($_POST['atack']) && isset($_POST['block']))
|
||||
{
|
||||
$btl->addAtack();
|
||||
}
|
||||
//прием
|
||||
if(isset($_POST['usepriem']) && $btl->testUsersLive() == true)
|
||||
{
|
||||
$priem->pruse($_POST['usepriem']);
|
||||
}
|
||||
//используем заклятие / пирожки
|
||||
|
||||
|
||||
//проводим действия (удары, использование приемов, если есть возможность нанести удар или использовать прием)
|
||||
//if(!isset($_POST['usepriem'])) {
|
||||
$btl->testActions();
|
||||
//}
|
||||
//авто-смена противника, либо просто смена противника
|
||||
if($u->stats['hpNow']>=1)
|
||||
{
|
||||
//ручная смена
|
||||
if(isset($_POST['smn']) && $_POST['smn']!='none')
|
||||
{
|
||||
/* ---------------- */
|
||||
$uidz = mysql_fetch_array(mysql_query('SELECT `id`,`inUser` FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['smn']).'" AND `battle` = "'.$u->info['battle'].'" LIMIT 1'));
|
||||
if($uidz['inUser']>0)
|
||||
{
|
||||
$uidz['id'] = $uidz['inUser'];
|
||||
}
|
||||
$rsm = $btl->smena($uidz['id'],false);
|
||||
if($rsm!=1)
|
||||
{
|
||||
echo '<font color=red><center><b>'.$rsm.'</b></center></font>';
|
||||
}
|
||||
unset($rsm);
|
||||
$js .= 'smena_login = \'none\';';
|
||||
}
|
||||
//авто-смена
|
||||
if($u->info['enemy']==0 || $btl->stats[$btl->uids[$u->info['enemy']]]['hpNow']<=0 || isset($btl->ga[$u->info['id']][$u->info['enemy']]))
|
||||
{
|
||||
$btl->autoSmena();
|
||||
}
|
||||
}else{
|
||||
$btl->mainStatus = 3;
|
||||
}
|
||||
//получаем данные о поединке
|
||||
|
||||
//получаем данные о логе боя
|
||||
|
||||
//Если бой сыгран - завершаем
|
||||
if(!isset($_POST['usepriem'])) {
|
||||
if($btl->info['team_win']==-1)
|
||||
{
|
||||
$btl->testFinish();
|
||||
}else{
|
||||
$btl->testFinish();
|
||||
}
|
||||
}
|
||||
if($btl->info['team_win']==-1)
|
||||
{
|
||||
$js .= $btl->genTeams($u->info['id']);
|
||||
}else{
|
||||
$btl->mainStatus = 3;
|
||||
$btl->e = $u->btl_txt;
|
||||
}
|
||||
|
||||
if(!isset($CRON_CORE)) {
|
||||
$js .= $btl->myInfo($u->info['id'],1);
|
||||
//выводим данные
|
||||
if($btl->e!='')
|
||||
{
|
||||
echo '<font color="red"><center><b>'.$btl->e.'</b></center></font>';
|
||||
}
|
||||
if(isset($btl->ga[$u->info['id']][$u->info['enemy']]))
|
||||
{
|
||||
if($u->info['hpNow']>=1) {
|
||||
$btl->mainStatus = 2;
|
||||
}
|
||||
}else{
|
||||
if($u->info['enemy']!=0 && $btl->info['team_win']==-1 && $u->info['hpNow']>=1)
|
||||
{
|
||||
$js .= $btl->myInfo($u->info['enemy'],2);
|
||||
}
|
||||
}
|
||||
if($btl->info['izlom']>0)
|
||||
{
|
||||
$js .= 'volna('.(1+$btl->info['izlomRoundSee']).');';
|
||||
}
|
||||
$i = 1;
|
||||
while($i<=7)
|
||||
{
|
||||
if($btl->users[$btl->uids[$u->info['id']]]['tactic'.$i]<0)
|
||||
{
|
||||
$btl->users[$btl->uids[$u->info['id']]]['tactic'.$i] = 0;
|
||||
}
|
||||
if($btl->users[$btl->uids[$u->info['id']]]['tactic'.$i]>25 && $i<7)
|
||||
{
|
||||
$btl->users[$btl->uids[$u->info['id']]]['tactic'.$i] = 25;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$atk1 = 0;
|
||||
if(!isset($CRON_CORE)) {$rsys = '';}
|
||||
if($rsys != '') {
|
||||
$js .= $rsys;
|
||||
}
|
||||
unset($rsys);
|
||||
if(isset($btl->ga[$u->info['enemy']][$u->info['id']]))
|
||||
{
|
||||
$atk1 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
$rehtml = '';
|
||||
if(!isset($CRON_CORE)) {
|
||||
$js .= '$("#priems").html("'.$priem->seeMy(2).'");';
|
||||
$jslog = $btl->lookmLog();
|
||||
$jslog .= $btl->lookLog();
|
||||
if( $jslog != '' ) {
|
||||
$js .= 'top.btlclearlog();'.$jslog;
|
||||
}
|
||||
unset($jslog);
|
||||
//}
|
||||
$rehtml .= '<script type="text/javascript">var battle = '.(0+$btl->info['id']).';top.cb_statusTest();eatk='.$atk1.';
|
||||
function e($t)
|
||||
{
|
||||
(new Chat())->debug($t, true);
|
||||
}
|
||||
|
||||
$_POST['id'] = 'reflesh';
|
||||
//
|
||||
|
||||
if (isset($_POST['atack'], $_POST['block']) || isset($_POST['usepriem']) || isset($_POST['useitem'])) {
|
||||
|
||||
session_start();
|
||||
$tm = microtime();
|
||||
$tm = explode(' ', $tm);
|
||||
$tm = $tm[0] + $tm[1];
|
||||
|
||||
unset($tm);
|
||||
$js = '';
|
||||
|
||||
if ($u->info['battle'] == 0) {
|
||||
$btl_last = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`battle` FROM `battle_users` WHERE `uid` = "' . $u->info['id'] . '" AND `finish` = "0" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($btl_last['id']) && $u->info['battle'] == 0) {
|
||||
echo '<script>document.getElementById(\'teams\').style.display=\'none\';var battleFinishData = "' . $u->info['battle_text'] . '";</script>';
|
||||
$u->info['battle'] = $btl_last['id'];
|
||||
$u->info['battle_lsto'] = true;
|
||||
mysql_query(
|
||||
'UPDATE `stats` SET `battle_text` = "",`last_b`="0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query('UPDATE `battle_users` SET `finish` = 1 WHERE `uid` = "' . $u->info['id'] . '"');
|
||||
echo '<script>alert("Поединок для вас завершился.");location.href="main.php?finish=1";</script>';
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($CRON_CORE)) {
|
||||
if (!isset($u->info['id']) || ($u->info['joinIP'] == 1 && $u->info['ip'] != $_SERVER['HTTP_X_REAL_IP'])) {
|
||||
die($c['exit']);
|
||||
}
|
||||
}
|
||||
|
||||
function json_fix_cyr($json_str)
|
||||
{
|
||||
return $json_str;
|
||||
}
|
||||
|
||||
|
||||
if (!isset($CRON_CORE)) {
|
||||
if ($u->info['online'] < time() - 30) {
|
||||
mysql_query(
|
||||
"UPDATE `users` SET `online`='" . time() . "',`timeMain`='" . time(
|
||||
) . "' WHERE `id`='" . $u->info['id'] . "' LIMIT 1"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$btl->is = $u->is;
|
||||
$btl->items = $u->items;
|
||||
$btl->info = $btl->battleInfo($u->info['battle']);
|
||||
|
||||
if (!isset($btl->info['id'])) {
|
||||
if ($u->info['battle'] == -1) {
|
||||
//завершаем поединок
|
||||
$upd = mysql_query(
|
||||
'UPDATE `users` SET `battle` = "0",`online` = "' . time(
|
||||
) . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'
|
||||
);
|
||||
if (!$upd) {
|
||||
if (!isset($CRON_CORE)) {
|
||||
die('Ошибка завершения поединка.');
|
||||
}
|
||||
} else {
|
||||
echo '<script>location="main.php";</script>';
|
||||
}
|
||||
} else {
|
||||
mysql_query('UPDATE `users` SET `battle` = "0" WHERE `battle` = "' . $u->info['battle'] . '" LIMIT 100');
|
||||
if (!isset($CRON_CORE)) {
|
||||
die('<script>location="main.php";</script>');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//получаем массив с игроками в бою
|
||||
$btl->teamsTake();
|
||||
|
||||
if (isset($_POST['useitem']) && $btl->testUsersLive() == true) {
|
||||
$magic->useItems((int)$_POST['useitem']);
|
||||
if ($u->error != '') {
|
||||
echo '<font color=red><center><b>' . $u->error . '</b></center></font>';
|
||||
}
|
||||
}
|
||||
|
||||
//заносим удары,приемы,эффекты и т.д.
|
||||
//удар
|
||||
if (isset($_POST['atack']) && isset($_POST['block'])) {
|
||||
$btl->addAtack();
|
||||
}
|
||||
//прием
|
||||
if (isset($_POST['usepriem']) && $btl->testUsersLive() == true) {
|
||||
$priem->pruse($_POST['usepriem']);
|
||||
}
|
||||
//используем заклятие / пирожки
|
||||
|
||||
|
||||
//проводим действия (удары, использование приемов, если есть возможность нанести удар или использовать прием)
|
||||
$btl->testActions();
|
||||
//авто-смена противника, либо просто смена противника
|
||||
if ($u->stats['hpNow'] >= 1) {
|
||||
//ручная смена
|
||||
if (isset($_POST['smn']) && $_POST['smn'] != 'none') {
|
||||
/* ---------------- */
|
||||
$uidz = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`inUser` FROM `users` WHERE `login` = "' . mysql_real_escape_string(
|
||||
$_POST['smn']
|
||||
) . '" AND `battle` = "' . $u->info['battle'] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if ($uidz['inUser'] > 0) {
|
||||
$uidz['id'] = $uidz['inUser'];
|
||||
}
|
||||
$rsm = $btl->smena($uidz['id'], false);
|
||||
if ($rsm != 1) {
|
||||
echo '<font color=red><center><b>' . $rsm . '</b></center></font>';
|
||||
}
|
||||
unset($rsm);
|
||||
$js .= 'smena_login = \'none\';';
|
||||
}
|
||||
//авто-смена
|
||||
if ($u->info['enemy'] == 0 || $btl->stats[$btl->uids[$u->info['enemy']]]['hpNow'] <= 0 || isset($btl->ga[$u->info['id']][$u->info['enemy']])) {
|
||||
$btl->autoSmena();
|
||||
}
|
||||
} else {
|
||||
$btl->mainStatus = 3;
|
||||
}
|
||||
//получаем данные о поединке
|
||||
|
||||
//получаем данные о логе боя
|
||||
|
||||
//Если бой сыгран - завершаем
|
||||
if (!isset($_POST['usepriem'])) {
|
||||
$btl->testFinish();
|
||||
}
|
||||
if ($btl->info['team_win'] == -1) {
|
||||
$js .= $btl->genTeams($u->info['id']);
|
||||
} else {
|
||||
$btl->mainStatus = 3;
|
||||
$btl->e = $u->btl_txt;
|
||||
}
|
||||
|
||||
if (!isset($CRON_CORE)) {
|
||||
$js .= $btl->myInfo($u->info['id'], 1);
|
||||
//выводим данные
|
||||
if ($btl->e != '') {
|
||||
echo '<font color="red"><center><b>' . $btl->e . '</b></center></font>';
|
||||
}
|
||||
if (isset($btl->ga[$u->info['id']][$u->info['enemy']])) {
|
||||
if ($u->info['hpNow'] >= 1) {
|
||||
$btl->mainStatus = 2;
|
||||
}
|
||||
} else {
|
||||
if ($u->info['enemy'] != 0 && $btl->info['team_win'] == -1 && $u->info['hpNow'] >= 1) {
|
||||
$js .= $btl->myInfo($u->info['enemy'], 2);
|
||||
}
|
||||
}
|
||||
if ($btl->info['izlom'] > 0) {
|
||||
$js .= 'volna(' . (1 + $btl->info['izlomRoundSee']) . ');';
|
||||
}
|
||||
$i = 1;
|
||||
while ($i <= 7) {
|
||||
if ($btl->users[$btl->uids[$u->info['id']]]['tactic' . $i] < 0) {
|
||||
$btl->users[$btl->uids[$u->info['id']]]['tactic' . $i] = 0;
|
||||
}
|
||||
if ($btl->users[$btl->uids[$u->info['id']]]['tactic' . $i] > 25 && $i < 7) {
|
||||
$btl->users[$btl->uids[$u->info['id']]]['tactic' . $i] = 25;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$atk1 = 0;
|
||||
if (!isset($CRON_CORE)) {
|
||||
$rsys = '';
|
||||
}
|
||||
if ($rsys != '') {
|
||||
$js .= $rsys;
|
||||
}
|
||||
unset($rsys);
|
||||
if (isset($btl->ga[$u->info['enemy']][$u->info['id']])) {
|
||||
$atk1 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
$rehtml = '';
|
||||
if (!isset($CRON_CORE)) {
|
||||
$js .= '$("#priems").html("' . $priem->seeMy(2) . '");';
|
||||
$jslog = $btl->lookmLog();
|
||||
$jslog .= $btl->lookLog();
|
||||
if ($jslog != '') {
|
||||
$js .= 'top.btlclearlog();' . $jslog;
|
||||
}
|
||||
unset($jslog);
|
||||
//}
|
||||
$rehtml .= '<script type="text/javascript">var battle = ' . (0 + $btl->info['id']) . ';top.cb_statusTest();eatk=' . $atk1 . ';
|
||||
if(document.getElementById("nabito")!=undefined)
|
||||
{
|
||||
document.getElementById("nabito").innerHTML = "'.(floor($btl->users[$btl->uids[$u->info['id']]]['battle_yron'])).'";
|
||||
document.getElementById("nabito").innerHTML = "' . (floor(
|
||||
$btl->users[$btl->uids[$u->info['id']]]['battle_yron']
|
||||
)) . '";
|
||||
}
|
||||
if(document.getElementById("expmaybe")!=undefined)
|
||||
{
|
||||
document.getElementById("expmaybe").innerHTML = "'.(floor($btl->users[$btl->uids[$u->info['id']]]['battle_exp'])).'";
|
||||
document.getElementById("expmaybe").innerHTML = "' . (floor(
|
||||
$btl->users[$btl->uids[$u->info['id']]]['battle_exp']
|
||||
)) . '";
|
||||
}
|
||||
if(document.getElementById("timer_out")!=undefined)
|
||||
{
|
||||
document.getElementById("timer_out").innerHTML = "'.round(($btl->info['timeout']/60),2).'";
|
||||
document.getElementById("timer_out").innerHTML = "' . round(($btl->info['timeout'] / 60), 2) . '";
|
||||
}
|
||||
$(\'#pers_magic\').html("'.$u->btlMagicList().'");
|
||||
$(\'#pers_magic\').html("' . $u->btlMagicList() . '");
|
||||
g_iCount = 30;
|
||||
noconnect = 15;
|
||||
connect = 1;
|
||||
@ -234,32 +230,32 @@
|
||||
{
|
||||
document.getElementById("reflesh_btn").disabled = "";
|
||||
}
|
||||
za = '.(0+$btl->stats[$btl->uids[$u->info['id']]]['zona']).'; genZoneAtack();
|
||||
zb = '.(0+$btl->testZonbVis()).'; genZoneBlock();
|
||||
za = ' . (0 + $btl->stats[$btl->uids[$u->info['id']]]['zona']) . '; genZoneAtack();
|
||||
zb = ' . (0 + $btl->testZonbVis()) . '; genZoneBlock();
|
||||
refleshPoints();
|
||||
tactic(1,'.(0+$btl->users[$btl->uids[$u->info['id']]]['tactic1']).');
|
||||
tactic(2,'.(0+$btl->users[$btl->uids[$u->info['id']]]['tactic2']).');
|
||||
tactic(3,'.(0+$btl->users[$btl->uids[$u->info['id']]]['tactic3']).');
|
||||
tactic(4,'.(0+$btl->users[$btl->uids[$u->info['id']]]['tactic4']).');
|
||||
tactic(5,'.(0+$btl->users[$btl->uids[$u->info['id']]]['tactic5']).');
|
||||
tactic(6,'.(0+floor($btl->users[$btl->uids[$u->info['id']]]['tactic6'])).');
|
||||
smnpty='.(0+$u->info['smena']).';
|
||||
mainstatus('.$btl->mainStatus.');
|
||||
tactic(7,"'.(0+$btl->users[$btl->uids[$u->info['id']]]['tactic7']).'");
|
||||
tactic(1,' . (0 + $btl->users[$btl->uids[$u->info['id']]]['tactic1']) . ');
|
||||
tactic(2,' . (0 + $btl->users[$btl->uids[$u->info['id']]]['tactic2']) . ');
|
||||
tactic(3,' . (0 + $btl->users[$btl->uids[$u->info['id']]]['tactic3']) . ');
|
||||
tactic(4,' . (0 + $btl->users[$btl->uids[$u->info['id']]]['tactic4']) . ');
|
||||
tactic(5,' . (0 + $btl->users[$btl->uids[$u->info['id']]]['tactic5']) . ');
|
||||
tactic(6,' . (0 + floor($btl->users[$btl->uids[$u->info['id']]]['tactic6'])) . ');
|
||||
smnpty=' . (0 + $u->info['smena']) . ';
|
||||
mainstatus(' . $btl->mainStatus . ');
|
||||
tactic(7,"' . (0 + $btl->users[$btl->uids[$u->info['id']]]['tactic7']) . '");
|
||||
smena_alls = "0";
|
||||
ggcode="'.$code.'";
|
||||
'.$js.'
|
||||
ggcode="' . $code . '";
|
||||
' . $js . '
|
||||
</script>';
|
||||
|
||||
echo ($rehtml);
|
||||
|
||||
if( $btl->cached == true ) {
|
||||
$btl->clear_cache_start();
|
||||
}
|
||||
|
||||
unset($atk1);
|
||||
}
|
||||
echo '<script>ggcode="'.$code.'";if(t057!=null){clearTimeout(t057);}</script>';
|
||||
}
|
||||
|
||||
echo($rehtml);
|
||||
|
||||
if ($btl->cached == true) {
|
||||
$btl->clear_cache_start();
|
||||
}
|
||||
|
||||
unset($atk1);
|
||||
}
|
||||
echo '<script>ggcode="' . $code . '";if(t057!=null){clearTimeout(t057);}</script>';
|
||||
}
|
||||
}
|
||||
?>
|
@ -1,223 +1,226 @@
|
||||
<?php
|
||||
|
||||
function e($t) {
|
||||
mysql_query('INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("core #'.date('d.m.Y').' %'.date('H:i:s').' (Критическая ошибка): <b>'.mysql_real_escape_string($t).'</b>","capitalcity","INFINITY","6","1","-1")');
|
||||
}
|
||||
|
||||
$_POST['id'] = 'reflesh';
|
||||
//
|
||||
|
||||
if(isset($_POST['atack'],$_POST['block']) || (isset($_POST['id']) && $_POST['id']=='reflesh') || isset($_POST['usepriem']) || isset($_POST['useitem']))
|
||||
{
|
||||
|
||||
session_start();
|
||||
$js = '';
|
||||
|
||||
if( $u->info['battle'] == 0 ) {
|
||||
$btl_last = mysql_fetch_array(mysql_query('SELECT `id`,`battle` FROM `battle_users` WHERE `uid` = "'.$u->info['id'].'" AND `finish` = "0" LIMIT 1'));
|
||||
if( isset($btl_last['id']) && $u->info['battle'] == 0 ) {
|
||||
echo '<script>document.getElementById(\'teams\').style.display=\'none\';var battleFinishData = "'.$u->info['battle_text'].'";</script>';
|
||||
$u->info['battle'] = $btl_last['id'];
|
||||
$u->info['battle_lsto'] = true;
|
||||
mysql_query('UPDATE `stats` SET `battle_text` = "",`last_b`="0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
mysql_query('UPDATE `battle_users` SET `finish` = 1 WHERE `uid` = "'.$u->info['id'].'"');
|
||||
echo '<script>alert("Поединок для вас завершился.");location.href="main.php?finish=1";</script>';
|
||||
}
|
||||
}
|
||||
|
||||
if(!isset($CRON_CORE)) {
|
||||
if(!isset($u->info['id']) || ($u->info['joinIP']==1 && $u->info['ip']!=$_SERVER['HTTP_X_REAL_IP']))
|
||||
{
|
||||
die($c['exit']);
|
||||
}
|
||||
}
|
||||
|
||||
function json_fix_cyr($json_str) {
|
||||
return $json_str;
|
||||
}
|
||||
|
||||
//$u->stats = $u->getStats($u->info['id'],0);
|
||||
|
||||
if(!isset($CRON_CORE)) {
|
||||
if($u->info['online']<time()-30)
|
||||
{
|
||||
mysql_query("UPDATE `users` SET `online`='".time()."',`timeMain`='".time()."' WHERE `id`='".$u->info['id']."' LIMIT 1");
|
||||
}
|
||||
}
|
||||
|
||||
$btl->is = $u->is;
|
||||
$btl->items = $u->items;
|
||||
$btl->info = $btl->battleInfo($u->info['battle']);
|
||||
function e($t)
|
||||
{
|
||||
(new Chat())->debug($t, true);
|
||||
}
|
||||
|
||||
if(!isset($btl->info['id']))
|
||||
{
|
||||
if($u->info['battle']==-1)
|
||||
{
|
||||
//завершаем поединок
|
||||
$upd = mysql_query('UPDATE `users` SET `battle` = "0",`online` = "'.time().'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
if(!$upd)
|
||||
{
|
||||
if(!isset($CRON_CORE)) {
|
||||
die('Ошибка завершения поединка.');
|
||||
}
|
||||
}else{
|
||||
echo '<script>location="main.php";</script>';
|
||||
}
|
||||
}else{
|
||||
mysql_query('UPDATE `users` SET `battle` = "0" WHERE `battle` = "'.$u->info['battle'].'" LIMIT 100');
|
||||
if(!isset($CRON_CORE)) {
|
||||
die('<script>location="main.php";</script>');
|
||||
}
|
||||
}
|
||||
}else{
|
||||
//получаем массив с игроками в бою
|
||||
$btl->teamsTake();
|
||||
|
||||
if(isset($_POST['useitem']) && $btl->testUsersLive() == true) {
|
||||
$magic->useItems((int)$_POST['useitem']);
|
||||
if($u->error!='') {
|
||||
echo '<font color=red><center><b>'.$u->error.'</b></center></font>';
|
||||
}
|
||||
}
|
||||
|
||||
//заносим удары,приемы,эффекты и т.д.
|
||||
//удар
|
||||
if(isset($_POST['atack']) && isset($_POST['block']))
|
||||
{
|
||||
$btl->addAtack();
|
||||
}
|
||||
//прием
|
||||
if(isset($_POST['usepriem']) && $btl->testUsersLive() == true)
|
||||
{
|
||||
$priem->pruse($_POST['usepriem']);
|
||||
}
|
||||
//используем заклятие / пирожки
|
||||
|
||||
|
||||
//проводим действия (удары, использование приемов, если есть возможность нанести удар или использовать прием)
|
||||
//if(!isset($_POST['usepriem'])) {
|
||||
$btl->testActions();
|
||||
//}
|
||||
//авто-смена противника, либо просто смена противника
|
||||
if($u->stats['hpNow']>=1)
|
||||
{
|
||||
//ручная смена
|
||||
if(isset($_POST['smn']) && $_POST['smn']!='none')
|
||||
{
|
||||
/* ---------------- */
|
||||
$uidz = mysql_fetch_array(mysql_query('SELECT `id`,`inUser` FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['smn']).'" AND `battle` = "'.$u->info['battle'].'" LIMIT 1'));
|
||||
if($uidz['inUser']>0)
|
||||
{
|
||||
$uidz['id'] = $uidz['inUser'];
|
||||
}
|
||||
$rsm = $btl->smena($uidz['id'],false);
|
||||
if($rsm!=1)
|
||||
{
|
||||
echo '<font color=red><center><b>'.$rsm.'</b></center></font>';
|
||||
}
|
||||
unset($rsm);
|
||||
$js .= 'smena_login = \'none\';';
|
||||
}
|
||||
//авто-смена
|
||||
if($u->info['enemy']==0 || $btl->stats[$btl->uids[$u->info['enemy']]]['hpNow']<=0 || isset($btl->ga[$u->info['id']][$u->info['enemy']]))
|
||||
{
|
||||
$btl->autoSmena();
|
||||
}
|
||||
}else{
|
||||
$btl->mainStatus = 3;
|
||||
}
|
||||
//получаем данные о поединке
|
||||
|
||||
//получаем данные о логе боя
|
||||
|
||||
//Если бой сыгран - завершаем
|
||||
if(!isset($_POST['usepriem'])) {
|
||||
if($btl->info['team_win']==-1)
|
||||
{
|
||||
$btl->testFinish();
|
||||
}else{
|
||||
$btl->testFinish();
|
||||
}
|
||||
}
|
||||
if($btl->info['team_win']==-1)
|
||||
{
|
||||
$js .= $btl->genTeams($u->info['id']);
|
||||
}else{
|
||||
$btl->mainStatus = 3;
|
||||
$btl->e = $u->btl_txt;
|
||||
}
|
||||
|
||||
if(!isset($CRON_CORE)) {
|
||||
$js .= $btl->myInfo($u->info['id'],1);
|
||||
//выводим данные
|
||||
if($btl->e!='')
|
||||
{
|
||||
echo '<font color="red"><center><b>'.$btl->e.'</b></center></font>';
|
||||
}
|
||||
if(isset($btl->ga[$u->info['id']][$u->info['enemy']]))
|
||||
{
|
||||
if($u->info['hpNow']>=1) {
|
||||
$btl->mainStatus = 2;
|
||||
}
|
||||
}else{
|
||||
if($u->info['enemy']!=0 && $btl->info['team_win']==-1 && $u->info['hpNow']>=1)
|
||||
{
|
||||
$js .= $btl->myInfo($u->info['enemy'],2);
|
||||
}
|
||||
}
|
||||
if($btl->info['izlom']>0)
|
||||
{
|
||||
$js .= 'volna('.(1+$btl->info['izlomRoundSee']).');';
|
||||
}
|
||||
$i = 1;
|
||||
while($i<=7)
|
||||
{
|
||||
if($btl->users[$btl->uids[$u->info['id']]]['tactic'.$i]<0)
|
||||
{
|
||||
$btl->users[$btl->uids[$u->info['id']]]['tactic'.$i] = 0;
|
||||
}
|
||||
if($btl->users[$btl->uids[$u->info['id']]]['tactic'.$i]>25 && $i<7)
|
||||
{
|
||||
$btl->users[$btl->uids[$u->info['id']]]['tactic'.$i] = 25;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$atk1 = 0;
|
||||
if(!isset($CRON_CORE)) {$rsys = '';}
|
||||
if($rsys != '') {
|
||||
$js .= $rsys;
|
||||
}
|
||||
unset($rsys);
|
||||
if(isset($btl->ga[$u->info['enemy']][$u->info['id']]))
|
||||
{
|
||||
$atk1 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
$rehtml = '';
|
||||
if(!isset($CRON_CORE)) {
|
||||
$js .= '$("#priems").html("'.$priem->seeMy(2).'");';
|
||||
//if(!isset($_POST['usepriem'])) {
|
||||
$jslog = $btl->lookLog();
|
||||
if( $jslog != '' ) {
|
||||
$js .= 'top.btlclearlog();'.$jslog;
|
||||
}
|
||||
unset($jslog);
|
||||
//}
|
||||
$rehtml .= '<script type="text/javascript">var battle = '.(0+$btl->info['id']).';top.cb_statusTest();eatk='.$atk1.';
|
||||
$_POST['id'] = 'reflesh';
|
||||
//
|
||||
|
||||
if (isset($_POST['atack'], $_POST['block']) || (isset($_POST['id']) && $_POST['id'] == 'reflesh') || isset($_POST['usepriem']) || isset($_POST['useitem'])) {
|
||||
|
||||
session_start();
|
||||
$js = '';
|
||||
|
||||
if ($u->info['battle'] == 0) {
|
||||
$btl_last = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`battle` FROM `battle_users` WHERE `uid` = "' . $u->info['id'] . '" AND `finish` = "0" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($btl_last['id']) && $u->info['battle'] == 0) {
|
||||
echo '<script>document.getElementById(\'teams\').style.display=\'none\';var battleFinishData = "' . $u->info['battle_text'] . '";</script>';
|
||||
$u->info['battle'] = $btl_last['id'];
|
||||
$u->info['battle_lsto'] = true;
|
||||
mysql_query(
|
||||
'UPDATE `stats` SET `battle_text` = "",`last_b`="0" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query('UPDATE `battle_users` SET `finish` = 1 WHERE `uid` = "' . $u->info['id'] . '"');
|
||||
echo '<script>alert("Поединок для вас завершился.");location.href="main.php?finish=1";</script>';
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($CRON_CORE)) {
|
||||
if (!isset($u->info['id']) || ($u->info['joinIP'] == 1 && $u->info['ip'] != $_SERVER['HTTP_X_REAL_IP'])) {
|
||||
die($c['exit']);
|
||||
}
|
||||
}
|
||||
|
||||
function json_fix_cyr($json_str)
|
||||
{
|
||||
return $json_str;
|
||||
}
|
||||
|
||||
//$u->stats = $u->getStats($u->info['id'],0);
|
||||
|
||||
if (!isset($CRON_CORE)) {
|
||||
if ($u->info['online'] < time() - 30) {
|
||||
mysql_query(
|
||||
"UPDATE `users` SET `online`='" . time() . "',`timeMain`='" . time(
|
||||
) . "' WHERE `id`='" . $u->info['id'] . "' LIMIT 1"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$btl->is = $u->is;
|
||||
$btl->items = $u->items;
|
||||
$btl->info = $btl->battleInfo($u->info['battle']);
|
||||
|
||||
if (!isset($btl->info['id'])) {
|
||||
if ($u->info['battle'] == -1) {
|
||||
//завершаем поединок
|
||||
$upd = mysql_query(
|
||||
'UPDATE `users` SET `battle` = "0",`online` = "' . time(
|
||||
) . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'
|
||||
);
|
||||
if (!$upd) {
|
||||
if (!isset($CRON_CORE)) {
|
||||
die('Ошибка завершения поединка.');
|
||||
}
|
||||
} else {
|
||||
echo '<script>location="main.php";</script>';
|
||||
}
|
||||
} else {
|
||||
mysql_query('UPDATE `users` SET `battle` = "0" WHERE `battle` = "' . $u->info['battle'] . '" LIMIT 100');
|
||||
if (!isset($CRON_CORE)) {
|
||||
die('<script>location="main.php";</script>');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//получаем массив с игроками в бою
|
||||
$btl->teamsTake();
|
||||
|
||||
if (isset($_POST['useitem']) && $btl->testUsersLive() == true) {
|
||||
$magic->useItems((int)$_POST['useitem']);
|
||||
if ($u->error != '') {
|
||||
echo '<font color=red><center><b>' . $u->error . '</b></center></font>';
|
||||
}
|
||||
}
|
||||
|
||||
//заносим удары,приемы,эффекты и т.д.
|
||||
//удар
|
||||
if (isset($_POST['atack']) && isset($_POST['block'])) {
|
||||
$btl->addAtack();
|
||||
}
|
||||
//прием
|
||||
if (isset($_POST['usepriem']) && $btl->testUsersLive() == true) {
|
||||
$priem->pruse($_POST['usepriem']);
|
||||
}
|
||||
//используем заклятие / пирожки
|
||||
|
||||
|
||||
//проводим действия (удары, использование приемов, если есть возможность нанести удар или использовать прием)
|
||||
//if(!isset($_POST['usepriem'])) {
|
||||
$btl->testActions();
|
||||
//}
|
||||
//авто-смена противника, либо просто смена противника
|
||||
if ($u->stats['hpNow'] >= 1) {
|
||||
//ручная смена
|
||||
if (isset($_POST['smn']) && $_POST['smn'] != 'none') {
|
||||
/* ---------------- */
|
||||
$uidz = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`inUser` FROM `users` WHERE `login` = "' . mysql_real_escape_string(
|
||||
$_POST['smn']
|
||||
) . '" AND `battle` = "' . $u->info['battle'] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if ($uidz['inUser'] > 0) {
|
||||
$uidz['id'] = $uidz['inUser'];
|
||||
}
|
||||
$rsm = $btl->smena($uidz['id'], false);
|
||||
if ($rsm != 1) {
|
||||
echo '<font color=red><center><b>' . $rsm . '</b></center></font>';
|
||||
}
|
||||
unset($rsm);
|
||||
$js .= 'smena_login = \'none\';';
|
||||
}
|
||||
//авто-смена
|
||||
if ($u->info['enemy'] == 0 || $btl->stats[$btl->uids[$u->info['enemy']]]['hpNow'] <= 0 || isset($btl->ga[$u->info['id']][$u->info['enemy']])) {
|
||||
$btl->autoSmena();
|
||||
}
|
||||
} else {
|
||||
$btl->mainStatus = 3;
|
||||
}
|
||||
//получаем данные о поединке
|
||||
|
||||
//получаем данные о логе боя
|
||||
|
||||
//Если бой сыгран - завершаем
|
||||
if (!isset($_POST['usepriem'])) {
|
||||
if ($btl->info['team_win'] == -1) {
|
||||
$btl->testFinish();
|
||||
} else {
|
||||
$btl->testFinish();
|
||||
}
|
||||
}
|
||||
if ($btl->info['team_win'] == -1) {
|
||||
$js .= $btl->genTeams($u->info['id']);
|
||||
} else {
|
||||
$btl->mainStatus = 3;
|
||||
$btl->e = $u->btl_txt;
|
||||
}
|
||||
|
||||
if (!isset($CRON_CORE)) {
|
||||
$js .= $btl->myInfo($u->info['id'], 1);
|
||||
//выводим данные
|
||||
if ($btl->e != '') {
|
||||
echo '<font color="red"><center><b>' . $btl->e . '</b></center></font>';
|
||||
}
|
||||
if (isset($btl->ga[$u->info['id']][$u->info['enemy']])) {
|
||||
if ($u->info['hpNow'] >= 1) {
|
||||
$btl->mainStatus = 2;
|
||||
}
|
||||
} else {
|
||||
if ($u->info['enemy'] != 0 && $btl->info['team_win'] == -1 && $u->info['hpNow'] >= 1) {
|
||||
$js .= $btl->myInfo($u->info['enemy'], 2);
|
||||
}
|
||||
}
|
||||
if ($btl->info['izlom'] > 0) {
|
||||
$js .= 'volna(' . (1 + $btl->info['izlomRoundSee']) . ');';
|
||||
}
|
||||
$i = 1;
|
||||
while ($i <= 7) {
|
||||
if ($btl->users[$btl->uids[$u->info['id']]]['tactic' . $i] < 0) {
|
||||
$btl->users[$btl->uids[$u->info['id']]]['tactic' . $i] = 0;
|
||||
}
|
||||
if ($btl->users[$btl->uids[$u->info['id']]]['tactic' . $i] > 25 && $i < 7) {
|
||||
$btl->users[$btl->uids[$u->info['id']]]['tactic' . $i] = 25;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$atk1 = 0;
|
||||
if (!isset($CRON_CORE)) {
|
||||
$rsys = '';
|
||||
}
|
||||
if ($rsys != '') {
|
||||
$js .= $rsys;
|
||||
}
|
||||
unset($rsys);
|
||||
if (isset($btl->ga[$u->info['enemy']][$u->info['id']])) {
|
||||
$atk1 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
$rehtml = '';
|
||||
if (!isset($CRON_CORE)) {
|
||||
$js .= '$("#priems").html("' . $priem->seeMy(2) . '");';
|
||||
//if(!isset($_POST['usepriem'])) {
|
||||
$jslog = $btl->lookLog();
|
||||
if ($jslog != '') {
|
||||
$js .= 'top.btlclearlog();' . $jslog;
|
||||
}
|
||||
unset($jslog);
|
||||
//}
|
||||
$rehtml .= '<script type="text/javascript">var battle = ' . (0 + $btl->info['id']) . ';top.cb_statusTest();eatk=' . $atk1 . ';
|
||||
if(document.getElementById("nabito")!=undefined)
|
||||
{
|
||||
document.getElementById("nabito").innerHTML = "'.(floor($btl->users[$btl->uids[$u->info['id']]]['battle_yron'])).'";
|
||||
document.getElementById("nabito").innerHTML = "' . (floor(
|
||||
$btl->users[$btl->uids[$u->info['id']]]['battle_yron']
|
||||
)) . '";
|
||||
}
|
||||
if(document.getElementById("expmaybe")!=undefined)
|
||||
{
|
||||
document.getElementById("expmaybe").innerHTML = "'.(floor($btl->users[$btl->uids[$u->info['id']]]['battle_exp'])).'";
|
||||
document.getElementById("expmaybe").innerHTML = "' . (floor(
|
||||
$btl->users[$btl->uids[$u->info['id']]]['battle_exp']
|
||||
)) . '";
|
||||
}
|
||||
if(document.getElementById("timer_out")!=undefined)
|
||||
{
|
||||
document.getElementById("timer_out").innerHTML = "'.round(($btl->info['timeout']/60),2).'";
|
||||
document.getElementById("timer_out").innerHTML = "' . round(($btl->info['timeout'] / 60), 2) . '";
|
||||
}
|
||||
$(\'#pers_magic\').html("'.$u->btlMagicList().'");
|
||||
$(\'#pers_magic\').html("' . $u->btlMagicList() . '");
|
||||
g_iCount = 30;
|
||||
noconnect = 15;
|
||||
connect = 1;
|
||||
@ -229,32 +232,31 @@
|
||||
{
|
||||
document.getElementById("reflesh_btn").disabled = "";
|
||||
}
|
||||
za = '.(0+$btl->stats[$btl->uids[$u->info['id']]]['zona']).'; genZoneAtack();
|
||||
zb = '.(0+$btl->testZonbVis()).'; genZoneBlock();
|
||||
za = ' . (0 + $btl->stats[$btl->uids[$u->info['id']]]['zona']) . '; genZoneAtack();
|
||||
zb = ' . (0 + $btl->testZonbVis()) . '; genZoneBlock();
|
||||
refleshPoints();
|
||||
tactic(1,'.(0+$btl->users[$btl->uids[$u->info['id']]]['tactic1']).');
|
||||
tactic(2,'.(0+$btl->users[$btl->uids[$u->info['id']]]['tactic2']).');
|
||||
tactic(3,'.(0+$btl->users[$btl->uids[$u->info['id']]]['tactic3']).');
|
||||
tactic(4,'.(0+$btl->users[$btl->uids[$u->info['id']]]['tactic4']).');
|
||||
tactic(5,'.(0+$btl->users[$btl->uids[$u->info['id']]]['tactic5']).');
|
||||
tactic(6,'.(0+floor($btl->users[$btl->uids[$u->info['id']]]['tactic6'])).');
|
||||
smnpty='.(0+$u->info['smena']).';
|
||||
mainstatus('.$btl->mainStatus.');
|
||||
tactic(7,"'.(0+$btl->users[$btl->uids[$u->info['id']]]['tactic7']).'");
|
||||
tactic(1,' . (0 + $btl->users[$btl->uids[$u->info['id']]]['tactic1']) . ');
|
||||
tactic(2,' . (0 + $btl->users[$btl->uids[$u->info['id']]]['tactic2']) . ');
|
||||
tactic(3,' . (0 + $btl->users[$btl->uids[$u->info['id']]]['tactic3']) . ');
|
||||
tactic(4,' . (0 + $btl->users[$btl->uids[$u->info['id']]]['tactic4']) . ');
|
||||
tactic(5,' . (0 + $btl->users[$btl->uids[$u->info['id']]]['tactic5']) . ');
|
||||
tactic(6,' . (0 + floor($btl->users[$btl->uids[$u->info['id']]]['tactic6'])) . ');
|
||||
smnpty=' . (0 + $u->info['smena']) . ';
|
||||
mainstatus(' . $btl->mainStatus . ');
|
||||
tactic(7,"' . (0 + $btl->users[$btl->uids[$u->info['id']]]['tactic7']) . '");
|
||||
smena_alls = "0";
|
||||
ggcode="'.$code.'";
|
||||
'.$js.'
|
||||
ggcode="' . $code . '";
|
||||
' . $js . '
|
||||
</script>';
|
||||
|
||||
echo ($rehtml);
|
||||
|
||||
if( $btl->cached == true ) {
|
||||
$btl->clear_cache_start();
|
||||
}
|
||||
|
||||
unset($atk1);
|
||||
}
|
||||
echo '<script>ggcode="'.$code.'";if(t057!=null){clearTimeout(t057);}</script>';
|
||||
}
|
||||
|
||||
echo($rehtml);
|
||||
|
||||
if ($btl->cached == true) {
|
||||
$btl->clear_cache_start();
|
||||
}
|
||||
|
||||
unset($atk1);
|
||||
}
|
||||
echo '<script>ggcode="' . $code . '";if(t057!=null){clearTimeout(t057);}</script>';
|
||||
}
|
||||
}
|
||||
?>
|
@ -11,13 +11,7 @@ require_once('../../_incl_data/class/__db_connect.php');
|
||||
|
||||
function e($t)
|
||||
{
|
||||
mysql_query(
|
||||
'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("core #' . date('d.m.Y') . ' %' . date(
|
||||
'H:i:s'
|
||||
) . ' (Критическая ошибка): <b>' . mysql_real_escape_string(
|
||||
$t
|
||||
) . '</b>","capitalcity","-NIGHTmare-","6","1","-1")'
|
||||
);
|
||||
(new Chat())->debug($t, true);
|
||||
}
|
||||
|
||||
if (isset($_GET['cron_core'])) {
|
||||
|
@ -9,11 +9,7 @@ if (!isset($CRON_CORE)) {
|
||||
|
||||
function e($t)
|
||||
{
|
||||
mysql_query(
|
||||
'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("core #' . date('d.m.Y') . ' %' . date(
|
||||
'H:i:s'
|
||||
) . ' (Критическая ошибка): <b>' . mysql_real_escape_string($t) . '</b>","capitalcity","INFINITY","6","1","-1")'
|
||||
);
|
||||
(new Chat())->debug($t, true);
|
||||
}
|
||||
|
||||
if (isset($_GET['cron_core'])) {
|
||||
|
11
lotowork.php
11
lotowork.php
@ -138,10 +138,13 @@ if (!isset($user) || $user['id'] != $u->info['id']) {
|
||||
$_SERVER['HTTP_X_REAL_IP']
|
||||
) . '","loto")'
|
||||
);
|
||||
mysql_query(
|
||||
'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("<font color=#000000>Игрок <b>' . $user['login'] . '</b> выиграл в бесплатной рулетке <b>' . $inf['name'] . '</b>!</font>","capitalcity","","6","1","' . time(
|
||||
) . '")'
|
||||
);
|
||||
|
||||
$chat = new Chat();
|
||||
$chatMessageDto = new ChatMessage();
|
||||
$chatMessageDto->setText("Игрок <b>{$user['login']}</b> выиграл в бесплатной рулетке <b>{$inf['name']}</b>!");
|
||||
$chatMessageDto->setType(6);
|
||||
$chat->sendMsg($chatMessageDto);
|
||||
|
||||
echo $droplist['id']; //
|
||||
}
|
||||
}
|
||||
|
@ -24,74 +24,34 @@ if (!isset($user) || $user['id'] != $u->info['id']) {
|
||||
{
|
||||
$droplistt = mysql_query('SELECT * FROM `loto` WHERE `type` = "t6"');
|
||||
$y = mysql_fetch_array(mysql_query('SELECT COUNT(`type`) AS `COUNT` FROM `loto` WHERE `type` = "t6"'));
|
||||
$rndt = rand(0, $y['COUNT'] - 1);
|
||||
$i = 0;
|
||||
while ($pl = mysql_fetch_array($droplistt)) {
|
||||
if ($i == $rndt) {
|
||||
$droplist = $pl;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
} elseif (($nrnd - 1) <= 7) // t5
|
||||
{
|
||||
$droplistt = mysql_query('SELECT * FROM `loto` WHERE `type` = "t5"');
|
||||
$y = mysql_fetch_array(mysql_query('SELECT COUNT(`type`) AS `COUNT` FROM `loto` WHERE `type` = "t5"'));
|
||||
$rndt = rand(0, $y['COUNT'] - 1);
|
||||
$i = 0;
|
||||
while ($pl = mysql_fetch_array($droplistt)) {
|
||||
if ($i == $rndt) {
|
||||
$droplist = $pl;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
} elseif (($nrnd - 1 - 7) <= 10) // t4
|
||||
{
|
||||
$droplistt = mysql_query('SELECT * FROM `loto` WHERE `type` = "t4"');
|
||||
$y = mysql_fetch_array(mysql_query('SELECT COUNT(`type`) AS `COUNT` FROM `loto` WHERE `type` = "t4"'));
|
||||
$rndt = rand(0, $y['COUNT'] - 1);
|
||||
$i = 0;
|
||||
while ($pl = mysql_fetch_array($droplistt)) {
|
||||
if ($i == $rndt) {
|
||||
$droplist = $pl;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
} elseif (($nrnd - 1 - 7 - 10) <= 15) // t3
|
||||
{
|
||||
$droplistt = mysql_query('SELECT * FROM `loto` WHERE `type` = "t3"');
|
||||
$y = mysql_fetch_array(mysql_query('SELECT COUNT(`type`) AS `COUNT` FROM `loto` WHERE `type` = "t3"'));
|
||||
$rndt = rand(0, $y['COUNT'] - 1);
|
||||
$i = 0;
|
||||
while ($pl = mysql_fetch_array($droplistt)) {
|
||||
if ($i == $rndt) {
|
||||
$droplist = $pl;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
} elseif (($nrnd - 1 - 7 - 10 - 15) <= 25) // t2
|
||||
{
|
||||
$droplistt = mysql_query('SELECT * FROM `loto` WHERE `type` = "t2"');
|
||||
$y = mysql_fetch_array(mysql_query('SELECT COUNT(`type`) AS `COUNT` FROM `loto` WHERE `type` = "t2"'));
|
||||
$rndt = rand(0, $y['COUNT'] - 1);
|
||||
$i = 0;
|
||||
while ($pl = mysql_fetch_array($droplistt)) {
|
||||
if ($i == $rndt) {
|
||||
$droplist = $pl;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
} else // t1
|
||||
{
|
||||
$droplistt = mysql_query('SELECT * FROM `loto` WHERE `type` = "t1"');
|
||||
$y = mysql_fetch_array(mysql_query('SELECT COUNT(`type`) AS `COUNT` FROM `loto` WHERE `type` = "t1"'));
|
||||
$rndt = rand(0, $y['COUNT'] - 1);
|
||||
$i = 0;
|
||||
while ($pl = mysql_fetch_array($droplistt)) {
|
||||
if ($i == $rndt) {
|
||||
$droplist = $pl;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$rndt = rand(0, $y['COUNT'] - 1);
|
||||
$i = 0;
|
||||
while ($pl = mysql_fetch_array($droplistt)) {
|
||||
if ($i == $rndt) {
|
||||
$droplist = $pl;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
if (!isset($droplist['id'])) {
|
||||
echo 'Error';
|
||||
@ -102,10 +62,10 @@ if (!isset($user) || $user['id'] != $u->info['id']) {
|
||||
$u->info['money2'] = $u->info['money2'] - 5;
|
||||
mysql_query('UPDATE `users` SET `money2`= `money2` - 5 WHERE `id` = "' . $u->info['id'] . '"');
|
||||
if ($droplist['type'] == "t6" || $droplist['type'] == "t5") {
|
||||
mysql_query(
|
||||
'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("<font color=#000000>Игрок <b>' . $user['login'] . '</b> выиграл в платной рулетке <b>' . $inf['name'] . '</b>!</font>","capitalcity","","6","1","' . time(
|
||||
) . '")'
|
||||
);
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setText("Игрок {$user['login']} выиграл в платной рулетке <b>{$inf['name']}</b>!");
|
||||
$cmsg->setType(6);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
}
|
||||
echo $droplist['id']; // это закоментить
|
||||
/*//этот блок разкоментить
|
||||
|
11
main.php
11
main.php
@ -236,10 +236,13 @@ if (isset($_GET['atak_user']) && $u->info['battle'] == 0 && $_GET['atak_user'] !
|
||||
}
|
||||
|
||||
if ($goodt > 0) {
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'" . $u->info['city'] . "','" . $u->info['room'] . "','','','" . $rtxt . "','" . time(
|
||||
) . "','6','0','1')"
|
||||
);
|
||||
$chatDto = new ChatMessage();
|
||||
$chatDto->setCity($u->info['city']);
|
||||
$chatDto->setRoom($u->info['room']);
|
||||
$chatDto->setText($rtxt);
|
||||
$chatDto->setType(6);
|
||||
$chatDto->setTypeTime(1);
|
||||
(new Chat())->sendMsg($chatDto);
|
||||
}
|
||||
unset($goodt);
|
||||
header('location: main.php');
|
||||
|
21
main_bot.php
21
main_bot.php
@ -13,11 +13,7 @@ if (!in_array(UserIp::get(), ['', '127.0.0.1', '91.228.152.24', $_SERVER['SERVER
|
||||
|
||||
function e($t)
|
||||
{
|
||||
mysql_query(
|
||||
'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("core #' . date('d.m.Y') . ' %' . date(
|
||||
'H:i:s'
|
||||
) . ' (Критическая ошибка): <b>' . mysql_real_escape_string($t) . '</b>","capitalcity","TABU","6","1","-1")'
|
||||
);
|
||||
(new Chat())->debug($t, true);
|
||||
}
|
||||
|
||||
if (isset($_GET['cron_core'])) {
|
||||
@ -111,14 +107,13 @@ if (isset($_GET['atak_user']) && $u->info['battle'] == 0 && $_GET['atak_user'] !
|
||||
$magic->atackUser($u->info['id'], $ua['id'], $ua['team'], $ua['battle'], $ua['bbexp'], 50);
|
||||
|
||||
$rtxt = '[img[items/pal_button8.gif]] "' . $u->info['login'] . '" совершил' . $sx . ' нападение по метке на персонажа "' . $ua['login'] . '".';
|
||||
Db::sql(
|
||||
'insert into chat (new, type, typeTime, time, city, room, text) values (1,6,1,unix_timestamp(),?,?,?)',
|
||||
[
|
||||
$u->info['city'],
|
||||
$u->info['room'],
|
||||
$rtxt,
|
||||
]
|
||||
);
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
|
||||
header('location: main.php');
|
||||
die();
|
||||
|
@ -55,7 +55,14 @@ if( isset($_GET['nightatack'])) {
|
||||
}else{
|
||||
$rtxt = '[img[items/pal_button8.gif]] "'.$u->info['login'].'" совершил'.$sx.' нападение на персонажа "'.$ua['login'].'".';
|
||||
}
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
|
||||
header('location: main.php');
|
||||
die();
|
||||
|
@ -1,172 +1,236 @@
|
||||
<?
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
<?php
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
|
||||
class turnir {
|
||||
|
||||
public $info,$user,$name = array(
|
||||
0 => 'Выжить любой ценой',
|
||||
1 => 'Каждый сам за себя',
|
||||
2 => 'Захват ключа'
|
||||
);
|
||||
|
||||
public function start() {
|
||||
global $c,$u;
|
||||
$this->info = mysql_fetch_array(mysql_query('SELECT * FROM `turnirs` WHERE `id` = "'.$u->info['inTurnir'].'" LIMIT 1'));
|
||||
$this->user = mysql_fetch_array(mysql_query('SELECT * FROM `users_turnirs` WHERE `turnir` = "'.$u->info['inTurnir'].'" AND `bot` = "'.$u->info['id'].'" LIMIT 1'));
|
||||
}
|
||||
|
||||
public function startTurnir() {
|
||||
global $c,$u;
|
||||
$row = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `users` WHERE `win` = "0" AND `lose` = "0" AND `nich` = "0"'));
|
||||
if($row[0] > 0 && $this->info['status'] != 3) {
|
||||
//Создание поединка
|
||||
mysql_query('INSERT INTO `battle` (`city`,`time_start`,`timeout`,`type`,`turnir`) VALUES ("'.$u->info['city'].'","'.time().'","60","1","'.$this->info['id'].'")');
|
||||
$uri = mysql_insert_id();
|
||||
//Закидываем персонажей в поединок
|
||||
mysql_query('UPDATE `users` SET `battle` = "'.$uri.'" WHERE `inUser` = "0" AND `inTurnir` = "'.$this->info['id'].'"');
|
||||
//Обозначаем завершение турнира при выходе
|
||||
mysql_query('UPDATE `turnirs` SET `status` = "3" WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
|
||||
die('Перейтиде в раздел "поединки"...');
|
||||
}else{
|
||||
if($this->info['status'] == 3) {
|
||||
$this->finishTurnir();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function finishTurnir() {
|
||||
global $c,$u;
|
||||
$this->info = mysql_fetch_array(mysql_query('SELECT * FROM `turnirs` WHERE `id` = "'.$u->info['inTurnir'].'" LIMIT 1'));
|
||||
//mysql_query('UPDATE `users` SET `inUser` = 0, `inTurnir` = 0 WHERE `inTurnir` = '.$this->info['id'].' AND `inUser` > 0 LIMIT '.$this->info['users_in']);
|
||||
if($this->info['status'] == 3) {
|
||||
$win = '';
|
||||
|
||||
$sp = mysql_query('SELECT * FROM `users_turnirs` WHERE `turnir` = "'.$this->info['id'].'" ORDER BY `points` DESC LIMIT '.$this->info['users_in']);
|
||||
while($pl = mysql_fetch_array($sp)) {
|
||||
$inf = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$pl['uid'].'" LIMIT 1'));
|
||||
$bot = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$pl['bot'].'" LIMIT 1'));
|
||||
if(isset($inf['id'],$bot['id'])) {
|
||||
//выдаем призы и т.д
|
||||
mysql_query('DELETE FROM `users` WHERE `id` = "'.$bot['id'].'" LIMIT 1');
|
||||
mysql_query('DELETE FROM `stats` WHERE `id` = "'.$bot['id'].'" LIMIT 1');
|
||||
mysql_query('DELETE FROM `items_users` WHERE `uid` = "'.$bot['id'].'" LIMIT 1000');
|
||||
mysql_query('DELETE FROM `eff_users` WHERE `uid` = "'.$bot['id'].'" LIMIT 1000');
|
||||
}
|
||||
|
||||
if($bot['win'] > 0 && $bot['lose'] < 1) {
|
||||
$win .= '<b>'.$inf['login'].'</b>, ';
|
||||
}
|
||||
}
|
||||
mysql_query('UPDATE `users` SET `inUser` = "0",`inTurnir` = "0" WHERE `inTurnir` = "'.$this->info['id'].'" LIMIT '.$this->info['users_in']);
|
||||
mysql_query('UPDATE `turnirs` SET `users_in` = 0,`status` = 0,`winner` = -1,`step` = 0,`time` = "'.(time()+$this->info['time2']).'",`count` = `count` + 1 WHERE `id` = '.$this->info['id'].' LIMIT 1');
|
||||
|
||||
if($win != '') {
|
||||
$win = rtrim($win,', ');
|
||||
$win = 'Победители турнира: '.$win.'. Следующий турнир начнется через '.$u->timeOut($this->info['time2']).' ('.date('d.m.Y H:i',(time()+$this->info['time2'])).').';
|
||||
}else{
|
||||
$win = 'Победители турнира отсутствует. Следующий турнир начнется через '.$u->timeOut($this->info['time2']).' ('.date('d.m.Y H:i',(time()+$this->info['time2'])).').';
|
||||
}
|
||||
$r = '<font color=black><b>Турнир «'.$this->name[$this->info['type']].' ['.$this->info['level'].'] №'.$this->info['count'].'» завершился!</b></font> '.$win;
|
||||
mysql_query('DELETE FROM `users_turnirs` WHERE `turnir` = "'.$this->info['id'].'" LIMIT '.$this->info['users_in']);
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','','','','<small>".$r."</small>','".time()."','6','0')");
|
||||
}
|
||||
}
|
||||
|
||||
public function locationSee() {
|
||||
global $c,$u;
|
||||
|
||||
$r = '';
|
||||
|
||||
$tm1 = '';
|
||||
|
||||
$tm2 = '';
|
||||
|
||||
if($this->info['step'] != 3 && $this->info['step'] != 0) {
|
||||
//получение комплекта
|
||||
if(isset($_GET['gocomplect']) && $this->user['points'] < 2) {
|
||||
|
||||
$aso = array();
|
||||
$noitm = array(
|
||||
869 => 1
|
||||
);
|
||||
$sp = mysql_query('SELECT `id`,`price1`,`inslot`,`price2` FROM `items_main` WHERE `inslot` > 0 AND `inslot` <= 26 AND `inslot` != 25 AND `inslot` != 24 AND `inslot` != 23 AND `inslot` != 16 AND `inslot` != 17 AND `inslot` != 2 AND `price2` = 0');
|
||||
while($pl = mysql_fetch_array($sp)) {
|
||||
if(!isset($noitm[$pl['id']])) {
|
||||
$aso[$pl['inslot']][count($aso[$pl['inslot']])] = $pl;
|
||||
}
|
||||
}
|
||||
|
||||
$i = 0; $com = array();
|
||||
while($i <= 17) {
|
||||
if($i == 16) {
|
||||
//левая рука
|
||||
|
||||
}elseif($i == 17) {
|
||||
//правая рука
|
||||
|
||||
}else{
|
||||
//обмундирование
|
||||
$com[$i] = $aso[$i][rand(0,count($aso[$i]))];
|
||||
}
|
||||
if($com[$i]['id'] > 0) {
|
||||
$u->addItem($com[$i]['id'],$u->info['id']);
|
||||
$this->user['points'] += $com[$i]['price1'];
|
||||
}
|
||||
echo ','.$com[$i];
|
||||
$i++;
|
||||
}
|
||||
mysql_query('UPDATE `users_turnirs` SET `points` = "'.$this->user['points'].'" WHERE `bot` = "'.$u->info['id'].'" LIMIT 1');
|
||||
$this->info['step'] == 0;
|
||||
}
|
||||
}
|
||||
|
||||
if($this->info['step'] == 3) {
|
||||
$this->finishTurnir();
|
||||
}elseif($this->info['step'] == 0) {
|
||||
//распределяем команды
|
||||
$po = array(0,0);
|
||||
$sp = mysql_query('SELECT * FROM `users_turnirs` WHERE `turnir` = "'.$this->info['id'].'" ORDER BY `points` DESC LIMIT '.$this->info['users_in']);
|
||||
$tmr = rand(1,2);
|
||||
if($tmr == 1) {
|
||||
$tmr = array(2,1);
|
||||
}else{
|
||||
$tmr = array(1,2);
|
||||
}
|
||||
while($pl = mysql_fetch_array($sp)) {
|
||||
$inf = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$pl['uid'].'" LIMIT 1'));
|
||||
$bot = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$pl['bot'].'" LIMIT 1'));
|
||||
if(isset($inf['id'],$bot['id'])) {
|
||||
if($po[1] == $po[2]) {
|
||||
$tm = rand(1,2);
|
||||
}elseif($po[1] > $po[2]) {
|
||||
$tm = 2;
|
||||
}else{
|
||||
$tm = 1;
|
||||
}
|
||||
//$tm = $tmr[$tm];
|
||||
$bot['team'] = $tm;
|
||||
$po[$bot['team']] += $pl['points'];
|
||||
mysql_query('UPDATE `stats` SET `team` = "'.$bot['team'].'" WHERE `id` = "'.$bot['id'].'" LIMIT 1');
|
||||
mysql_query('UPDATE `users_turnirs` SET `team` = "'.$bot['team'].'" WHERE `id` = "'.$pl['id'].'" LIMIT 1');
|
||||
}
|
||||
}
|
||||
mysql_query('UPDATE `turnirs` SET `step` = "1",`time` = "'.(time() + $this->info['time3']).'" WHERE `id` = "'.$this->info['id'].'" LIMIT 1');
|
||||
}
|
||||
|
||||
$sp = mysql_query('SELECT * FROM `users_turnirs` WHERE `turnir` = "'.$this->info['id'].'" LIMIT '.$this->info['users_in']);
|
||||
$po = array(0,0);
|
||||
while($pl = mysql_fetch_array($sp)) {
|
||||
$inf = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "'.$pl['uid'].'" LIMIT 1'));
|
||||
$bot = mysql_fetch_array(mysql_query('SELECT `u`.*,`st`.* FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON `u`.`id` = `st`.`id` WHERE `u`.`id` = "'.$pl['bot'].'" LIMIT 1'));
|
||||
if(isset($inf['id'],$bot['id'])) {
|
||||
$po[$bot['team']] += $pl['points'];
|
||||
${'tm'.$bot['team']} .= '<b>'.$bot['login'].'</b> ['.$bot['level'].'], ';
|
||||
}
|
||||
}
|
||||
$r .= '<style>/* цвета команд */
|
||||
class turnir
|
||||
{
|
||||
|
||||
public $info, $user, $name = [
|
||||
0 => 'Выжить любой ценой',
|
||||
1 => 'Каждый сам за себя',
|
||||
2 => 'Захват ключа',
|
||||
];
|
||||
|
||||
public function start()
|
||||
{
|
||||
global $c, $u;
|
||||
$this->info = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `turnirs` WHERE `id` = "' . $u->info['inTurnir'] . '" LIMIT 1')
|
||||
);
|
||||
$this->user = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `users_turnirs` WHERE `turnir` = "' . $u->info['inTurnir'] . '" AND `bot` = "' . $u->info['id'] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function startTurnir()
|
||||
{
|
||||
global $c, $u;
|
||||
$row = mysql_fetch_array(
|
||||
mysql_query('SELECT COUNT(*) FROM `users` WHERE `win` = "0" AND `lose` = "0" AND `nich` = "0"')
|
||||
);
|
||||
if ($row[0] > 0 && $this->info['status'] != 3) {
|
||||
//Создание поединка
|
||||
mysql_query(
|
||||
'INSERT INTO `battle` (`city`,`time_start`,`timeout`,`type`,`turnir`) VALUES ("' . $u->info['city'] . '","' . time(
|
||||
) . '","60","1","' . $this->info['id'] . '")'
|
||||
);
|
||||
$uri = mysql_insert_id();
|
||||
//Закидываем персонажей в поединок
|
||||
mysql_query(
|
||||
'UPDATE `users` SET `battle` = "' . $uri . '" WHERE `inUser` = "0" AND `inTurnir` = "' . $this->info['id'] . '"'
|
||||
);
|
||||
//Обозначаем завершение турнира при выходе
|
||||
mysql_query('UPDATE `turnirs` SET `status` = "3" WHERE `id` = "' . $this->info['id'] . '" LIMIT 1');
|
||||
die('Перейтиде в раздел "поединки"...');
|
||||
} else {
|
||||
if ($this->info['status'] == 3) {
|
||||
$this->finishTurnir();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function finishTurnir()
|
||||
{
|
||||
global $c, $u;
|
||||
$this->info = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `turnirs` WHERE `id` = "' . $u->info['inTurnir'] . '" LIMIT 1')
|
||||
);
|
||||
//mysql_query('UPDATE `users` SET `inUser` = 0, `inTurnir` = 0 WHERE `inTurnir` = '.$this->info['id'].' AND `inUser` > 0 LIMIT '.$this->info['users_in']);
|
||||
if ($this->info['status'] == 3) {
|
||||
$win = '';
|
||||
|
||||
$sp = mysql_query(
|
||||
'SELECT * FROM `users_turnirs` WHERE `turnir` = "' . $this->info['id'] . '" ORDER BY `points` DESC LIMIT ' . $this->info['users_in']
|
||||
);
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$inf = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `users` WHERE `id` = "' . $pl['uid'] . '" LIMIT 1')
|
||||
);
|
||||
$bot = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `users` WHERE `id` = "' . $pl['bot'] . '" LIMIT 1')
|
||||
);
|
||||
if (isset($inf['id'], $bot['id'])) {
|
||||
//выдаем призы и т.д
|
||||
mysql_query('DELETE FROM `users` WHERE `id` = "' . $bot['id'] . '" LIMIT 1');
|
||||
mysql_query('DELETE FROM `stats` WHERE `id` = "' . $bot['id'] . '" LIMIT 1');
|
||||
mysql_query('DELETE FROM `items_users` WHERE `uid` = "' . $bot['id'] . '" LIMIT 1000');
|
||||
mysql_query('DELETE FROM `eff_users` WHERE `uid` = "' . $bot['id'] . '" LIMIT 1000');
|
||||
}
|
||||
|
||||
if ($bot['win'] > 0 && $bot['lose'] < 1) {
|
||||
$win .= '<b>' . $inf['login'] . '</b>, ';
|
||||
}
|
||||
}
|
||||
mysql_query(
|
||||
'UPDATE `users` SET `inUser` = "0",`inTurnir` = "0" WHERE `inTurnir` = "' . $this->info['id'] . '" LIMIT ' . $this->info['users_in']
|
||||
);
|
||||
mysql_query(
|
||||
'UPDATE `turnirs` SET `users_in` = 0,`status` = 0,`winner` = -1,`step` = 0,`time` = "' . (time(
|
||||
) + $this->info['time2']) . '",`count` = `count` + 1 WHERE `id` = ' . $this->info['id'] . ' LIMIT 1'
|
||||
);
|
||||
|
||||
if ($win != '') {
|
||||
$win = rtrim($win, ', ');
|
||||
$win = 'Победители турнира: ' . $win . '. Следующий турнир начнется через ' . $u->timeOut(
|
||||
$this->info['time2']
|
||||
) . ' (' . date('d.m.Y H:i', (time() + $this->info['time2'])) . ').';
|
||||
} else {
|
||||
$win = 'Победители турнира отсутствует. Следующий турнир начнется через ' . $u->timeOut(
|
||||
$this->info['time2']
|
||||
) . ' (' . date('d.m.Y H:i', (time() + $this->info['time2'])) . ').';
|
||||
}
|
||||
$r = '<b>Турнир «' . $this->name[$this->info['type']] . ' [' . $this->info['level'] . '] №' . $this->info['count'] . '» завершился!</b> ' . $win;
|
||||
mysql_query(
|
||||
'DELETE FROM `users_turnirs` WHERE `turnir` = "' . $this->info['id'] . '" LIMIT ' . $this->info['users_in']
|
||||
);
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setText($r);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
}
|
||||
}
|
||||
|
||||
public function locationSee()
|
||||
{
|
||||
global $c, $u;
|
||||
|
||||
$r = '';
|
||||
|
||||
$tm1 = '';
|
||||
|
||||
$tm2 = '';
|
||||
|
||||
if ($this->info['step'] != 3 && $this->info['step'] != 0) {
|
||||
//получение комплекта
|
||||
if (isset($_GET['gocomplect']) && $this->user['points'] < 2) {
|
||||
|
||||
$aso = [];
|
||||
$noitm = [
|
||||
869 => 1,
|
||||
];
|
||||
$sp = mysql_query(
|
||||
'SELECT `id`,`price1`,`inslot`,`price2` FROM `items_main` WHERE `inslot` > 0 AND `inslot` <= 26 AND `inslot` != 25 AND `inslot` != 24 AND `inslot` != 23 AND `inslot` != 16 AND `inslot` != 17 AND `inslot` != 2 AND `price2` = 0'
|
||||
);
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
if (!isset($noitm[$pl['id']])) {
|
||||
$aso[$pl['inslot']][count($aso[$pl['inslot']])] = $pl;
|
||||
}
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
$com = [];
|
||||
while ($i <= 17) {
|
||||
if ($i == 16) {
|
||||
//левая рука
|
||||
|
||||
} elseif ($i == 17) {
|
||||
//правая рука
|
||||
|
||||
} else {
|
||||
//обмундирование
|
||||
$com[$i] = $aso[$i][rand(0, count($aso[$i]))];
|
||||
}
|
||||
if ($com[$i]['id'] > 0) {
|
||||
$u->addItem($com[$i]['id'], $u->info['id']);
|
||||
$this->user['points'] += $com[$i]['price1'];
|
||||
}
|
||||
echo ',' . $com[$i];
|
||||
$i++;
|
||||
}
|
||||
mysql_query(
|
||||
'UPDATE `users_turnirs` SET `points` = "' . $this->user['points'] . '" WHERE `bot` = "' . $u->info['id'] . '" LIMIT 1'
|
||||
);
|
||||
$this->info['step'] == 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->info['step'] == 3) {
|
||||
$this->finishTurnir();
|
||||
} elseif ($this->info['step'] == 0) {
|
||||
//распределяем команды
|
||||
$po = [0, 0];
|
||||
$sp = mysql_query(
|
||||
'SELECT * FROM `users_turnirs` WHERE `turnir` = "' . $this->info['id'] . '" ORDER BY `points` DESC LIMIT ' . $this->info['users_in']
|
||||
);
|
||||
$tmr = rand(1, 2);
|
||||
if ($tmr == 1) {
|
||||
$tmr = [2, 1];
|
||||
} else {
|
||||
$tmr = [1, 2];
|
||||
}
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$inf = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `users` WHERE `id` = "' . $pl['uid'] . '" LIMIT 1')
|
||||
);
|
||||
$bot = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `users` WHERE `id` = "' . $pl['bot'] . '" LIMIT 1')
|
||||
);
|
||||
if (isset($inf['id'], $bot['id'])) {
|
||||
if ($po[1] == $po[2]) {
|
||||
$tm = rand(1, 2);
|
||||
} elseif ($po[1] > $po[2]) {
|
||||
$tm = 2;
|
||||
} else {
|
||||
$tm = 1;
|
||||
}
|
||||
//$tm = $tmr[$tm];
|
||||
$bot['team'] = $tm;
|
||||
$po[$bot['team']] += $pl['points'];
|
||||
mysql_query(
|
||||
'UPDATE `stats` SET `team` = "' . $bot['team'] . '" WHERE `id` = "' . $bot['id'] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query(
|
||||
'UPDATE `users_turnirs` SET `team` = "' . $bot['team'] . '" WHERE `id` = "' . $pl['id'] . '" LIMIT 1'
|
||||
);
|
||||
}
|
||||
}
|
||||
mysql_query(
|
||||
'UPDATE `turnirs` SET `step` = "1",`time` = "' . (time(
|
||||
) + $this->info['time3']) . '" WHERE `id` = "' . $this->info['id'] . '" LIMIT 1'
|
||||
);
|
||||
}
|
||||
|
||||
$sp = mysql_query(
|
||||
'SELECT * FROM `users_turnirs` WHERE `turnir` = "' . $this->info['id'] . '" LIMIT ' . $this->info['users_in']
|
||||
);
|
||||
$po = [0, 0];
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$inf = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `id` = "' . $pl['uid'] . '" LIMIT 1'));
|
||||
$bot = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `u`.*,`st`.* FROM `users` AS `u` LEFT JOIN `stats` AS `st` ON `u`.`id` = `st`.`id` WHERE `u`.`id` = "' . $pl['bot'] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($inf['id'], $bot['id'])) {
|
||||
$po[$bot['team']] += $pl['points'];
|
||||
${'tm' . $bot['team']} .= '<b>' . $bot['login'] . '</b> [' . $bot['level'] . '], ';
|
||||
}
|
||||
}
|
||||
$r .= '<style>/* цвета команд */
|
||||
.CSSteam0 { font-weight: bold; cursor:pointer; }
|
||||
.CSSteam1 { font-weight: bold; color: #6666CC; cursor:pointer; }
|
||||
.CSSteam2 { font-weight: bold; color: #B06A00; cursor:pointer; }
|
||||
@ -178,35 +242,37 @@ class turnir {
|
||||
.CSSteam8 { font-weight: bold; color: #842B61; cursor:pointer; }
|
||||
.CSSteam9 { font-weight: bold; color: navy; cursor:pointer; }
|
||||
.CSSvs { font-weight: bold; }</style>';
|
||||
$r .= '<h3>«'.$this->name[$this->info['type']].'»</h3><br>Начало турнира через '.$u->timeOut($this->info['time'] - time()).'! ';
|
||||
|
||||
if($this->user['points'] < 3) {
|
||||
//Еще не получили обмундирование
|
||||
if($this->user['points'] < 2) {
|
||||
$r .= '<INPUT class=\'btn_grey\' onClick="location=\'main.php?gocomplect=1\';" TYPE=button name=tmp value="Получить обмундирование">';
|
||||
}else{
|
||||
$r .= ' <INPUT class=\'btn_grey\' onClick="location=\'main.php\';" TYPE=button name=tmp value="Я готов';
|
||||
if($u->info['sex'] == 1) {
|
||||
$r .= 'а';
|
||||
}
|
||||
$r .= '!">';
|
||||
}
|
||||
}else{
|
||||
$r .= '<small><b>Вы участвуете в турнире!</b></small>';
|
||||
}
|
||||
$r .= '<div style="float:right"><INPUT onClick="location=\'main.php\';" TYPE=button name=tmp value="Обновить"></div><hr>';
|
||||
$r .= '<b class="CSSteam1">Команда №1</b>: '.rtrim($tm1,', ');
|
||||
$r .= '<br><b class="CSSteam2">Команда №2</b>: '.rtrim($tm2,', ');
|
||||
|
||||
if( ($this->info['time'] - time() < 0) && $this->info['step'] == 1) {
|
||||
//начинаем турнир
|
||||
$this->startTurnir();
|
||||
}
|
||||
|
||||
echo $r;
|
||||
}
|
||||
|
||||
$r .= '<h3>«' . $this->name[$this->info['type']] . '»</h3><br>Начало турнира через ' . $u->timeOut(
|
||||
$this->info['time'] - time()
|
||||
) . '! ';
|
||||
|
||||
if ($this->user['points'] < 3) {
|
||||
//Еще не получили обмундирование
|
||||
if ($this->user['points'] < 2) {
|
||||
$r .= '<INPUT class=\'btn_grey\' onClick="location=\'main.php?gocomplect=1\';" TYPE=button name=tmp value="Получить обмундирование">';
|
||||
} else {
|
||||
$r .= ' <INPUT class=\'btn_grey\' onClick="location=\'main.php\';" TYPE=button name=tmp value="Я готов';
|
||||
if ($u->info['sex'] == 1) {
|
||||
$r .= 'а';
|
||||
}
|
||||
$r .= '!">';
|
||||
}
|
||||
} else {
|
||||
$r .= '<small><b>Вы участвуете в турнире!</b></small>';
|
||||
}
|
||||
$r .= '<div style="float:right"><INPUT onClick="location=\'main.php\';" TYPE=button name=tmp value="Обновить"></div><hr>';
|
||||
$r .= '<b class="CSSteam1">Команда №1</b>: ' . rtrim($tm1, ', ');
|
||||
$r .= '<br><b class="CSSteam2">Команда №2</b>: ' . rtrim($tm2, ', ');
|
||||
|
||||
if (($this->info['time'] - time() < 0) && $this->info['step'] == 1) {
|
||||
//начинаем турнир
|
||||
$this->startTurnir();
|
||||
}
|
||||
|
||||
echo $r;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$tur = new turnir;
|
||||
$tur->start();
|
||||
?>
|
@ -1,339 +1,394 @@
|
||||
<?
|
||||
echo "
|
||||
<script language='JavaScript'>
|
||||
var elem = document.getElementById('se-pre-con');
|
||||
elem.parentNode.removeChild(elem);
|
||||
</script>
|
||||
";
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
<?php
|
||||
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
|
||||
?>
|
||||
<script type="text/javascript" language="javascript" src='https://img.new-combats.com/js/commoninf.js'></script>
|
||||
<style>
|
||||
.modpow {
|
||||
background-color:#ddd5bf;
|
||||
}
|
||||
.mt {
|
||||
background-color:#b1a993;
|
||||
padding-left:10px;
|
||||
padding-right:10px;
|
||||
padding-top:5px;
|
||||
padding-bottom:5px;
|
||||
}
|
||||
.md {
|
||||
padding:10px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function openMod(title,dat)
|
||||
{
|
||||
var d = document.getElementById('useMagic');
|
||||
if(d!=undefined)
|
||||
{
|
||||
document.getElementById('modtitle').innerHTML = '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top">'+title+'</td><td width="30" valign="top"><div align="right"><a title="Закрыть окно" onClick="closeMod(); return false;" href="#">x</a></div></td></tr></table>';
|
||||
document.getElementById('moddata').innerHTML = dat;
|
||||
d.style.display = '';
|
||||
}
|
||||
}
|
||||
<script>
|
||||
let elem = document.getElementById('se-pre-con');
|
||||
elem.parentNode.removeChild(elem);
|
||||
|
||||
function closeMod()
|
||||
{
|
||||
var d = document.getElementById('useMagic');
|
||||
if(d!=undefined)
|
||||
{
|
||||
document.getElementById('modtitle').innerHTML = '';
|
||||
document.getElementById('moddata').innerHTML = '';
|
||||
d.style.display = 'none';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div id="useMagic" style="display:none; position:absolute; border:solid 1px #776f59; left: 50px; top: 186px;" class="modpow">
|
||||
<div class="mt" id="modtitle"></div><div class="md" id="moddata"></div></div>
|
||||
<table align=left><tr><td><img src="https://img.new-combats.com/i/alchemy1.gif"></td></tr></table><table align=right><tr><td><INPUT TYPE="button" onclick="location.href='main.php?alhp=1';" class="btn" value="Обновить" title="Обновить"> <INPUT TYPE="button" onclick="location.href='main.php';" class="btn" value="Вернуться" title="Вернуться"></table>
|
||||
<center><SCRIPT>drwfl("<?=$u->info['login']?>",<?=$u->info['id']?>,"<?=$u->info['level']?>",50,"")</SCRIPT></center>
|
||||
<?
|
||||
function openMod(title, dat) {
|
||||
var d = document.getElementById('useMagic');
|
||||
if (d != undefined) {
|
||||
document.getElementById('modtitle').innerHTML = '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top">' + title + '</td><td width="30" valign="top"><div align="right"><a title="Закрыть окно" onClick="closeMod(); return false;" href="#">x</a></div></td></tr></table>';
|
||||
document.getElementById('moddata').innerHTML = dat;
|
||||
d.style.display = '';
|
||||
}
|
||||
}
|
||||
|
||||
function closeMod() {
|
||||
var d = document.getElementById('useMagic');
|
||||
if (d != undefined) {
|
||||
document.getElementById('modtitle').innerHTML = '';
|
||||
document.getElementById('moddata').innerHTML = '';
|
||||
d.style.display = 'none';
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript" language="javascript" src='https://img.new-combats.com/js/commoninf.js'></script>
|
||||
<style>
|
||||
.modpow {
|
||||
background-color: #ddd5bf;
|
||||
}
|
||||
|
||||
.mt {
|
||||
background-color: #b1a993;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.md {
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="useMagic" style="display:none; position:absolute; border:solid 1px #776f59; left: 50px; top: 186px;"
|
||||
class="modpow">
|
||||
<div class="mt" id="modtitle"></div>
|
||||
<div class="md" id="moddata"></div>
|
||||
</div>
|
||||
<table align=left>
|
||||
<tr>
|
||||
<td><img src="https://img.new-combats.com/i/alchemy1.gif"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align=right>
|
||||
<tr>
|
||||
<td><INPUT TYPE="button" onclick="location.href='main.php?alhp=1';" class="btn" value="Обновить"
|
||||
title="Обновить"> <INPUT TYPE="button" onclick="location.href='main.php';" class="btn"
|
||||
value="Вернуться" title="Вернуться">
|
||||
</table>
|
||||
<center>
|
||||
<SCRIPT>drwfl("<?=$u->info['login']?>", <?=$u->info['id']?>, "<?=$u->info['level']?>", 50, "")</SCRIPT>
|
||||
</center>
|
||||
<?php
|
||||
$pl = mysql_fetch_array(mysql_query('SELECT * FROM `bank_table` ORDER BY `time` DESC LIMIT 1'));
|
||||
$ba = mysql_fetch_array(mysql_query("SELECT * FROM `bank_alh` WHERE `uid` = '".mysql_real_escape_string($u->info['id'])."' LIMIT 1"));
|
||||
if(isset($ba['id'])) {
|
||||
?>
|
||||
<table width=320>
|
||||
<tr>
|
||||
<td>
|
||||
<h4>На алхимических счетах:</h4>
|
||||
<b><?=$ba['ekr']?></b> ЕКР
|
||||
<hr />
|
||||
<?
|
||||
$ucur = round(round(($pl['cur']/$pl['USD']),4)/100*(100-$ba['procent']),2);
|
||||
?>
|
||||
Персональный курс: <b><?=$ucur?></b> $ = 1 Еврокредит.
|
||||
<hr />
|
||||
<form method="post" action="main.php?alhp=1">
|
||||
<?
|
||||
if(isset($_POST['buy_ekr'])) {
|
||||
$uba = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['buy_ekr']).'" LIMIT 1'));
|
||||
$uba['uid'] = $uba['id'];
|
||||
if(isset($uba['id'])) {
|
||||
echo 'Покупатель: '.$u->microLogin($uba['uid'],1).'<br>';
|
||||
}else{
|
||||
echo '<font color=red>Персонаж заблокирован, либо не найден.</font><hr>';
|
||||
unset($_POST['buy_ekr']);
|
||||
}
|
||||
echo '<hr>';
|
||||
if(isset($uba['id'])) {
|
||||
|
||||
$_POST['buy4ekr'] = round($_POST['buy4ekr'],2);
|
||||
|
||||
$bns = array(
|
||||
array( 0 , 0 , 0 ),
|
||||
array( 10 , 1 , 0 ),
|
||||
array( 50 , 2 , 0 ),
|
||||
array( 100 , 3 , 0 ),
|
||||
array( 200 , 4 , 0 ),
|
||||
array( 300 , 5 , 0 ),
|
||||
array( 400 , 6 , 0 ),
|
||||
array( 500 , 7 , 0 ),
|
||||
array( 600 , 8 , 0 ),
|
||||
array( 700 , 9 , 0 ),
|
||||
array( 800 , 10 , 0 ),
|
||||
array( 900 , 11 , 0 ),
|
||||
array( 1000 , 13 , 1 ),
|
||||
array( 1100 , 15 , 2 ),
|
||||
array( 1200 , 17 , 3 ),
|
||||
array( 1300 , 19 , 4 ),
|
||||
array( 1500 , 21 , 5 ),
|
||||
array( 1700 , 23 , 6 ),
|
||||
array( 2000 , 25 , 7 ),
|
||||
array( 2500 , 27 , 8 ),
|
||||
array( 3000 , 30 , 9 )
|
||||
);
|
||||
|
||||
$bns2 = array(
|
||||
array(0,0),
|
||||
array(10,10),
|
||||
array(20,10),
|
||||
array(30,10),
|
||||
array(40,10),
|
||||
array(50,10),
|
||||
array(60,10),
|
||||
array(70,10),
|
||||
array(80,10),
|
||||
array(90,10),
|
||||
array(100,20)
|
||||
);
|
||||
|
||||
$ball = mysql_fetch_array(mysql_query('SELECT SUM(`ekr`) FROM `pay_operation` WHERE `uid` = "'.$uba['id'].'" AND `good` > 0 LIMIT 1'));
|
||||
$ball = 0+$ball[0];
|
||||
|
||||
$i = 0;
|
||||
while( $i < count($bns) ) {
|
||||
if( isset($bns[$i][0]) && $ball > $bns[$i][0] ) {
|
||||
$b1 = $i;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
//if( isset($backdoor) ) {
|
||||
$i = 0;
|
||||
while( $i < count($bns2) ) {
|
||||
if( isset($bns2[$i][0]) && $_POST['buy4ekr'] >= $bns2[$i][0] ) {
|
||||
$b2 = $i;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
//}
|
||||
|
||||
//Бонус опытовый, первичный и накопительный
|
||||
$out_ekr = $_POST['buy4ekr'];
|
||||
$out_ekr0 = $_POST['buy4ekr'];
|
||||
//
|
||||
$out_ekr += round($out_ekr0/100*$bns[$b1][1],2);
|
||||
$i = 0;
|
||||
while( $i < count($bns2) ) {
|
||||
if( isset($bns2[$i][0]) && $out_ekr >= $bns2[$i][0] ) {
|
||||
$b2_2 = $i;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$out_ekr += round($out_ekr0/100*$bns2[$b2_2][1],2);
|
||||
if($ball == 0) {
|
||||
$out_ekr += round($out_ekr0/100*20,2);
|
||||
}
|
||||
$ba = mysql_fetch_array(
|
||||
mysql_query("SELECT * FROM `bank_alh` WHERE `uid` = '" . mysql_real_escape_string($u->info['id']) . "' LIMIT 1")
|
||||
);
|
||||
if (isset($ba['id'])) {
|
||||
?>
|
||||
<table width=320>
|
||||
<tr>
|
||||
<td>
|
||||
<h4>На алхимических счетах:</h4>
|
||||
<b><?= $ba['ekr'] ?></b> ЕКР
|
||||
<hr/>
|
||||
<?php
|
||||
$ucur = round(round(($pl['cur'] / $pl['USD']), 4) / 100 * (100 - $ba['procent']), 2);
|
||||
?>
|
||||
Персональный курс: <b><?= $ucur ?></b> $ = 1 Еврокредит.
|
||||
<hr/>
|
||||
<form method="post" action="main.php?alhp=1">
|
||||
<?php
|
||||
if (isset($_POST['buy_ekr'])) {
|
||||
$uba = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `users` WHERE `login` = "' . mysql_real_escape_string(
|
||||
$_POST['buy_ekr']
|
||||
) . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
$uba['uid'] = $uba['id'];
|
||||
if (isset($uba['id'])) {
|
||||
echo 'Покупатель: ' . $u->microLogin($uba['uid'], 1) . '<br>';
|
||||
} else {
|
||||
echo '<font color=red>Персонаж заблокирован, либо не найден.</font><hr>';
|
||||
unset($_POST['buy_ekr']);
|
||||
}
|
||||
echo '<hr>';
|
||||
if (isset($uba['id'])) {
|
||||
|
||||
if(isset($_POST['buy4ekr']) && $_POST['buy4ekr'] < 0.01) {
|
||||
echo '<font color=red>Минимальная сумма продажи: 0.01 екр.</font><hr>';
|
||||
unset($_POST['buy4ekr']);
|
||||
}elseif($_POST['buy4ekr'] > $ba['ekr']) {
|
||||
echo '<font color=red>Недостаточно средств на счете</font><hr>';
|
||||
unset($_POST['buy4ekr']);
|
||||
}
|
||||
if(isset($_POST['buygoodluck'])) {
|
||||
echo '<script>alert("Продажа на сумму '.$_POST['buy4ekr'].' екр. была совершена успешно!");location.href="main.php?alhp=1";</script>';
|
||||
$ba['ekr'] -= $_POST['buy4ekr'];
|
||||
$ba['USD'] += round($_POST['buy4ekr']*$ucur,2);
|
||||
mysql_query('UPDATE `bank_alh` SET `ekr` = "'.mysql_real_escape_string($ba['ekr']).'",`USD` = "'.mysql_real_escape_string($ba['USD']).'" WHERE `id` = "'.$ba['id'].'" LIMIT 1');
|
||||
|
||||
mysql_query('UPDATE `users` SET `money2` = `money2` + '.mysql_real_escape_string($out_ekr).' WHERE `id` = "'.$uba['id'].'" LIMIT 1');
|
||||
|
||||
|
||||
|
||||
$money = round($_POST['buy4ekr']*$pl['cur'],2);
|
||||
$money = round($money/100*(100-$ba['procent']),2);
|
||||
|
||||
$user = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`city`,`sex`,`room`,`host_reg` FROM `users` WHERE `id` = "'.mysql_real_escape_string($uba['uid']).'" LIMIT 1'));
|
||||
|
||||
mysql_query('INSERT INTO `pay_operation` (`uid`,`ekr`,`time`,`good`,`var`,`ref`,`ref2`) VALUES (
|
||||
"'.$uba['id'].'","'.mysql_real_escape_string($_POST['buy4ekr']).'","'.time().'","'.time().'","buy_ekr_alh'.$u->info['id'].'","'.$uba['host_reg'].'","0"
|
||||
)');
|
||||
|
||||
/*
|
||||
echo '['.$user['host_reg'].']';
|
||||
if( $user['host_reg'] > 0 && $_POST['buy4ekr'] >= 1 ) {
|
||||
$refer = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`city`,`sex`,`room`,`host_reg` FROM `users` WHERE `id` = "'.mysql_real_escape_string($user['host_reg']).'" LIMIT 1'));
|
||||
if( isset($refer['id']) ) {
|
||||
$r = '<span class=date>'.date('d.m.Y H:i').'</span> <img src=https://img.new-combats.com/i/align/align50.gif width=12 height=15 /><u><b>Банк</b> «Старого Бойцовского клуба» / Алхимик <b>'.$u->info['login'].'</b></u> сообщает: ';
|
||||
if($refer['sex'] == 1) {
|
||||
$r .= 'Уважаемая';
|
||||
}else{
|
||||
$r .= 'Уважаемый';
|
||||
}
|
||||
$ubaref = mysql_fetch_array(mysql_query('SELECT * FROM `bank` WHERE `uid` = "'.$refer['id'].'" ORDER BY `id` DESC LIMIT 1'));
|
||||
if( isset($ubaref['id']) ) {
|
||||
mysql_query('UPDATE `bank` SET `money2` = "'.mysql_real_escape_string($ubaref['money2']+round($_POST['buy4ekr']*0.05,2)).'" WHERE `id` = "'.$ubaref['id'].'" LIMIT 1');
|
||||
}
|
||||
$r .= ' <b>'.$refer['login'].'</b>, Ваш воспитанник "'.$user['login'].'" приобрел Ekr. и на Ваш банковский счет №'.(0+$ubaref['id']).' зачислено '.round($_POST['buy4ekr']*0.05,2).' Ekr. ';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','".$refer['city']."','".$refer['room']."','','".$refer['login']."','".$r."','-1','5','0')");
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
$r = '<span class=date>'.date('d.m.Y H:i').'</span> <img src=https://img.new-combats.com/i/align/align50.gif width=12 height=15 /><u> Алхимик <b>'.$u->info['login'].'</b></u> сообщает: ';
|
||||
|
||||
if($user['sex'] == 1) {
|
||||
$r .= 'Уважаемая';
|
||||
}else{
|
||||
$r .= 'Уважаемый';
|
||||
}
|
||||
|
||||
$bnss = '';
|
||||
|
||||
if( ($out_ekr-round((int)$_POST['buy4ekr'],2)) > 0 ) {
|
||||
$bnss = ' (+'.($out_ekr-round((int)$_POST['buy4ekr'],2)).' ЕКР бонус!)';
|
||||
}
|
||||
|
||||
$r .= ' <b>'.$user['login'].'</b>, на Ваш счет зачислено '.$_POST['buy4ekr'].' ЕКР'.$bnsss.'. Благодарим Вас за покупку!';
|
||||
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','".$user['city']."','".$user['room']."','','".$user['login']."','".$r."','-1','5','0')");
|
||||
|
||||
$text_msg = 'Алхимик <b>'.$u->info['login'].'</b> совершил продажу <b>'.$_POST['buy4ekr'].'</b> ЕКР. (скидка '.$ba['procent'].'% , задолжность '.$ba['USD'].'$). Покупатель: '.$u->microLogin($uba['uid'],1).'.</b>.';
|
||||
|
||||
$balance = mysql_fetch_array(mysql_query('SELECT SUM(`money`) FROM `balance_money` WHERE `cancel` = 0'));
|
||||
$balance = $balance[0]+$money;
|
||||
mysql_query('INSERT INTO `balance_money` (`time`,`ip`,`money`,`comment2`,`balance`,`cancel`) VALUES ("'.time().'","'.$u->info['ip'].'","'.mysql_real_escape_string((int)$money).'","'.mysql_real_escape_string($text_msg).'","'.$balance.'","'.time().'")');
|
||||
|
||||
//Рейтинг по вкладам
|
||||
$ub = array();
|
||||
$ui = array();
|
||||
$sp = mysql_query('SELECT * FROM `pay_operation` WHERE `good` > 0 ORDER BY `id` DESC');
|
||||
while( $pl = mysql_fetch_array($sp) ) {
|
||||
if(!isset($ub[$pl['uid']])) {
|
||||
$ui[] = $pl['uid'];
|
||||
}
|
||||
$ub[$pl['uid']][date('d.m.Y',$pl['good'])] = $pl['ekr'];
|
||||
}
|
||||
$i = 0;
|
||||
while( $i < count($ui) ) {
|
||||
if(isset($ui[$i])) {
|
||||
$j = 1;
|
||||
$k = 0;
|
||||
$nj = 0;
|
||||
while( $j <= 1000 ) {
|
||||
$dt = date('d.m.Y',time() - (86400 * $j));
|
||||
if( isset($ub[$ui[$i]][$dt]) ) {
|
||||
$k++;
|
||||
$nj = 0;
|
||||
}elseif( $j > 0 && $nj >= 6 ) {
|
||||
$j = 1000;
|
||||
}else{
|
||||
$nj++;
|
||||
}
|
||||
$j++;
|
||||
}
|
||||
mysql_query('DELETE FROM `users_paybonus` WHERE `id` = "'.$ui[$i].'" LIMIT 1');
|
||||
mysql_query('INSERT INTO `users_paybonus` (`id`,`level`) VALUES (
|
||||
"'.$ui[$i].'","'.$k.'"
|
||||
)');
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
//
|
||||
|
||||
}else{
|
||||
echo 'Сумма екр.:';
|
||||
if(!isset($_POST['buy4ekr'])) {
|
||||
echo ' <input name="buy4ekr" style="width:50px;" value="0.00" /> <input class="btn btn-danger" value="Далее" type="submit" /><br>';
|
||||
}else{
|
||||
echo ' <b>'.round((int)$_POST['buy4ekr'],2).'</b> ЕКР + <b>'.($out_ekr-round((int)$_POST['buy4ekr'],2)).'</b> ЕКР бонус.<input name="buy4ekr" type="hidden" value="'.$_POST['buy4ekr'].'" />';
|
||||
echo ' <br><br><input type="submit" name="buygoodluck" class="btn btn-success" value="Совершить продажу">';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<? if(isset($_POST['buy_ekr'])){ ?><input name="buy_ekr" type="hidden" value="<?=$_POST['buy_ekr']?>" /> <? }else{ ?>Перести екр. персонажу: <input name="buy_ekr" style="width:50px;" value="<?=$_POST['buy_ekr']?>" /> <input class="btn btn-danger" value="Далее" type="submit" /><? } ?>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?
|
||||
$_POST['buy4ekr'] = round($_POST['buy4ekr'], 2);
|
||||
|
||||
$bns = [
|
||||
[0, 0, 0],
|
||||
[10, 1, 0],
|
||||
[50, 2, 0],
|
||||
[100, 3, 0],
|
||||
[200, 4, 0],
|
||||
[300, 5, 0],
|
||||
[400, 6, 0],
|
||||
[500, 7, 0],
|
||||
[600, 8, 0],
|
||||
[700, 9, 0],
|
||||
[800, 10, 0],
|
||||
[900, 11, 0],
|
||||
[1000, 13, 1],
|
||||
[1100, 15, 2],
|
||||
[1200, 17, 3],
|
||||
[1300, 19, 4],
|
||||
[1500, 21, 5],
|
||||
[1700, 23, 6],
|
||||
[2000, 25, 7],
|
||||
[2500, 27, 8],
|
||||
[3000, 30, 9],
|
||||
];
|
||||
|
||||
$bns2 = [
|
||||
[0, 0],
|
||||
[10, 10],
|
||||
[20, 10],
|
||||
[30, 10],
|
||||
[40, 10],
|
||||
[50, 10],
|
||||
[60, 10],
|
||||
[70, 10],
|
||||
[80, 10],
|
||||
[90, 10],
|
||||
[100, 20],
|
||||
];
|
||||
|
||||
$ball = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT SUM(`ekr`) FROM `pay_operation` WHERE `uid` = "' . $uba['id'] . '" AND `good` > 0 LIMIT 1'
|
||||
)
|
||||
);
|
||||
$ball = 0 + $ball[0];
|
||||
|
||||
$i = 0;
|
||||
while ($i < count($bns)) {
|
||||
if (isset($bns[$i][0]) && $ball > $bns[$i][0]) {
|
||||
$b1 = $i;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
|
||||
//if( isset($backdoor) ) {
|
||||
$i = 0;
|
||||
while ($i < count($bns2)) {
|
||||
if (isset($bns2[$i][0]) && $_POST['buy4ekr'] >= $bns2[$i][0]) {
|
||||
$b2 = $i;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
//}
|
||||
|
||||
//Бонус опытовый, первичный и накопительный
|
||||
$out_ekr = $_POST['buy4ekr'];
|
||||
$out_ekr0 = $_POST['buy4ekr'];
|
||||
//
|
||||
$out_ekr += round($out_ekr0 / 100 * $bns[$b1][1], 2);
|
||||
$i = 0;
|
||||
while ($i < count($bns2)) {
|
||||
if (isset($bns2[$i][0]) && $out_ekr >= $bns2[$i][0]) {
|
||||
$b2_2 = $i;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
$out_ekr += round($out_ekr0 / 100 * $bns2[$b2_2][1], 2);
|
||||
if ($ball == 0) {
|
||||
$out_ekr += round($out_ekr0 / 100 * 20, 2);
|
||||
}
|
||||
|
||||
if (isset($_POST['buy4ekr']) && $_POST['buy4ekr'] < 0.01) {
|
||||
echo '<font color=red>Минимальная сумма продажи: 0.01 екр.</font><hr>';
|
||||
unset($_POST['buy4ekr']);
|
||||
} elseif ($_POST['buy4ekr'] > $ba['ekr']) {
|
||||
echo '<font color=red>Недостаточно средств на счете</font><hr>';
|
||||
unset($_POST['buy4ekr']);
|
||||
}
|
||||
if (isset($_POST['buygoodluck'])) {
|
||||
echo '<script>alert("Продажа на сумму ' . $_POST['buy4ekr'] . ' екр. была совершена успешно!");location.href="main.php?alhp=1";</script>';
|
||||
$ba['ekr'] -= $_POST['buy4ekr'];
|
||||
$ba['USD'] += round($_POST['buy4ekr'] * $ucur, 2);
|
||||
mysql_query(
|
||||
'UPDATE `bank_alh` SET `ekr` = "' . mysql_real_escape_string(
|
||||
$ba['ekr']
|
||||
) . '",`USD` = "' . mysql_real_escape_string(
|
||||
$ba['USD']
|
||||
) . '" WHERE `id` = "' . $ba['id'] . '" LIMIT 1'
|
||||
);
|
||||
|
||||
mysql_query(
|
||||
'UPDATE `users` SET `money2` = `money2` + ' . mysql_real_escape_string(
|
||||
$out_ekr
|
||||
) . ' WHERE `id` = "' . $uba['id'] . '" LIMIT 1'
|
||||
);
|
||||
|
||||
|
||||
$money = round($_POST['buy4ekr'] * $pl['cur'], 2);
|
||||
$money = round($money / 100 * (100 - $ba['procent']), 2);
|
||||
|
||||
$user = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`login`,`city`,`sex`,`room`,`host_reg` FROM `users` WHERE `id` = "' . mysql_real_escape_string(
|
||||
$uba['uid']
|
||||
) . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
|
||||
mysql_query(
|
||||
'INSERT INTO `pay_operation` (`uid`,`ekr`,`time`,`good`,`var`,`ref`,`ref2`) VALUES (
|
||||
"' . $uba['id'] . '","' . mysql_real_escape_string($_POST['buy4ekr']) . '","' . time(
|
||||
) . '","' . time() . '","buy_ekr_alh' . $u->info['id'] . '","' . $uba['host_reg'] . '","0"
|
||||
)'
|
||||
);
|
||||
|
||||
$r = '<span class=date>' . date(
|
||||
'd.m.Y H:i'
|
||||
) . '</span> <img src=https://img.new-combats.com/i/align/align50.gif width=12 height=15 /><u> Алхимик <b>' . $u->info['login'] . '</b></u> сообщает: ';
|
||||
|
||||
if ($user['sex'] == 1) {
|
||||
$r .= 'Уважаемая';
|
||||
} else {
|
||||
$r .= 'Уважаемый';
|
||||
}
|
||||
|
||||
$bnss = '';
|
||||
|
||||
if (($out_ekr - round((int)$_POST['buy4ekr'], 2)) > 0) {
|
||||
$bnss = ' (+' . ($out_ekr - round((int)$_POST['buy4ekr'], 2)) . ' ЕКР бонус!)';
|
||||
}
|
||||
|
||||
$r .= ' <b>' . $user['login'] . '</b>, на Ваш счет зачислено ' . $_POST['buy4ekr'] . ' ЕКР' . $bnsss . '. Благодарим Вас за покупку!';
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($user['city']);
|
||||
$cmsg->setRoom($user['room']);
|
||||
$cmsg->setTo($user['login']);
|
||||
$cmsg->setType(5);
|
||||
$cmsg->setText($r);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
|
||||
$text_msg = 'Алхимик <b>' . $u->info['login'] . '</b> совершил продажу <b>' . $_POST['buy4ekr'] . '</b> ЕКР. (скидка ' . $ba['procent'] . '% , задолжность ' . $ba['USD'] . '$). Покупатель: ' . $u->microLogin(
|
||||
$uba['uid'], 1
|
||||
) . '.</b>.';
|
||||
|
||||
$balance = mysql_fetch_array(
|
||||
mysql_query('SELECT SUM(`money`) FROM `balance_money` WHERE `cancel` = 0')
|
||||
);
|
||||
$balance = $balance[0] + $money;
|
||||
mysql_query(
|
||||
'INSERT INTO `balance_money` (`time`,`ip`,`money`,`comment2`,`balance`,`cancel`) VALUES ("' . time(
|
||||
) . '","' . $u->info['ip'] . '","' . mysql_real_escape_string(
|
||||
(int)$money
|
||||
) . '","' . mysql_real_escape_string($text_msg) . '","' . $balance . '","' . time(
|
||||
) . '")'
|
||||
);
|
||||
|
||||
//Рейтинг по вкладам
|
||||
$ub = [];
|
||||
$ui = [];
|
||||
$sp = mysql_query('SELECT * FROM `pay_operation` WHERE `good` > 0 ORDER BY `id` DESC');
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
if (!isset($ub[$pl['uid']])) {
|
||||
$ui[] = $pl['uid'];
|
||||
}
|
||||
$ub[$pl['uid']][date('d.m.Y', $pl['good'])] = $pl['ekr'];
|
||||
}
|
||||
$i = 0;
|
||||
while ($i < count($ui)) {
|
||||
if (isset($ui[$i])) {
|
||||
$j = 1;
|
||||
$k = 0;
|
||||
$nj = 0;
|
||||
while ($j <= 1000) {
|
||||
$dt = date('d.m.Y', time() - (86400 * $j));
|
||||
if (isset($ub[$ui[$i]][$dt])) {
|
||||
$k++;
|
||||
$nj = 0;
|
||||
} elseif ($j > 0 && $nj >= 6) {
|
||||
$j = 1000;
|
||||
} else {
|
||||
$nj++;
|
||||
}
|
||||
$j++;
|
||||
}
|
||||
mysql_query(
|
||||
'DELETE FROM `users_paybonus` WHERE `id` = "' . $ui[$i] . '" LIMIT 1'
|
||||
);
|
||||
mysql_query(
|
||||
'INSERT INTO `users_paybonus` (`id`,`level`) VALUES (
|
||||
"' . $ui[$i] . '","' . $k . '"
|
||||
)'
|
||||
);
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
//
|
||||
|
||||
} else {
|
||||
echo 'Сумма екр.:';
|
||||
if (!isset($_POST['buy4ekr'])) {
|
||||
echo ' <input name="buy4ekr" style="width:50px;" value="0.00" /> <input class="btn btn-danger" value="Далее" type="submit" /><br>';
|
||||
} else {
|
||||
echo ' <b>' . round(
|
||||
(int)$_POST['buy4ekr'], 2
|
||||
) . '</b> ЕКР + <b>' . ($out_ekr - round(
|
||||
(int)$_POST['buy4ekr'], 2
|
||||
)) . '</b> ЕКР бонус.<input name="buy4ekr" type="hidden" value="' . $_POST['buy4ekr'] . '" />';
|
||||
echo ' <br><br><input type="submit" name="buygoodluck" class="btn btn-success" value="Совершить продажу">';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php if (isset($_POST['buy_ekr'])) { ?><input name="buy_ekr" type="hidden"
|
||||
value="<?= $_POST['buy_ekr'] ?>" /> <?php } else { ?>Перести екр. персонажу:
|
||||
<input name="buy_ekr" style="width:50px;" value="<?= $_POST['buy_ekr'] ?>"/> <input
|
||||
class="btn btn-danger" value="Далее" type="submit"/><?php } ?>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
|
||||
echo "<br><h4><div align=left>Необходимые средства в работе алхимика</div></h4>";
|
||||
|
||||
$p['m1'] = 1;
|
||||
$srok = array(15=>'15 минут',30=>'30 минут',60=>'один час',180=>'три часа',360=>'шесть часов',720=>'двенадцать часов',1440=>'одни сутки',4320=>'трое суток');
|
||||
|
||||
if(isset($_GET['usemod']))
|
||||
{
|
||||
if(isset($_POST['usem1']))
|
||||
{
|
||||
require_once('moder/usem1.php');
|
||||
}elseif(isset($_POST['teleport']))
|
||||
{
|
||||
//require_once('moder/teleport.php');
|
||||
}
|
||||
}
|
||||
if(isset($_POST['tologin'],$_POST['message'])) {
|
||||
$u->send('',1,$infcity,'',htmlspecialchars($_POST['tologin'],NULL),'<font color=darkblue>Сообщение телеграфом от </font> <b>'.$u->info['login'].'</b>: '.$_POST['message'].'',-1,6,0,0,0,1);
|
||||
$srok = [15 => '15 минут', 30 => '30 минут', 60 => 'один час', 180 => 'три часа', 360 => 'шесть часов', 720 => 'двенадцать часов', 1440 => 'одни сутки', 4320 => 'трое суток'];
|
||||
|
||||
if (isset($_GET['usemod'])) {
|
||||
if (isset($_POST['usem1'])) {
|
||||
require_once('moder/usem1.php');
|
||||
}
|
||||
}
|
||||
if (isset($_POST['tologin'], $_POST['message'])) {
|
||||
$u->send(
|
||||
'', 1, $infcity, '', htmlspecialchars($_POST['tologin'], null),
|
||||
'<font color=darkblue>Сообщение телеграфом от </font> <b>' . $u->info['login'] . '</b>: ' . $_POST['message'] . '',
|
||||
-1, 6, 0, 0, 0, 1
|
||||
);
|
||||
}
|
||||
?>
|
||||
<table>
|
||||
<a href="#" onClick="openMod('<b>Заклятие молчания</b>','<form action=\'main.php?<? echo alhp.'&usemod='.$code; ?>\' method=\'post\'>Логин персонажа: <input type=\'text\' style=\'width:144px;\' id=\'logingo\' name=\'logingo\'><br>Время заклятия: <select style=\'margin-left:2px;\' name=\'time\'><option value=\'1440\'>Сутки</option></select> <input type=\'submit\' name=\'usem1\' value=\'Исп-ть\'></form>');"><img src="https://img.new-combats.com/i/items/sleep.gif" title="Заклятие молчания" /></a>
|
||||
|
||||
<br><h4>Телеграф</h4><!--Вы можете отправить короткое сообщение любому персонажу, даже если он находится в offline или другом городе.-->
|
||||
<form method=post style="margin:5px;">Логин персонажа <input type=text size=20 name="tologin"> сообщение <input type=text size=80 name="message"> <input type=submit class="btn btn-success" value="отправить"></form>
|
||||
<?
|
||||
<table>
|
||||
<a href="#"
|
||||
onClick="openMod('<b>Заклятие молчания</b>','<form action=\'main.php?<?php echo alhp . '&usemod=' . $code; ?>\' method=\'post\'>Логин персонажа: <input type=\'text\' style=\'width:144px;\' id=\'logingo\' name=\'logingo\'><br>Время заклятия: <select style=\'margin-left:2px;\' name=\'time\'><option value=\'1440\'>Сутки</option></select> <input type=\'submit\' name=\'usem1\' value=\'Исп-ть\'></form>');"><img
|
||||
src="https://img.new-combats.com/i/items/sleep.gif" title="Заклятие молчания"/></a>
|
||||
|
||||
<br><h4>Телеграф</h4>
|
||||
<form method=post style="margin:5px;">Логин персонажа <input type=text size=20 name="tologin"> сообщение <input
|
||||
type=text size=80 name="message"> <input type=submit class="btn btn-success"
|
||||
value="отправить"></form>
|
||||
<?php
|
||||
echo '<br><h2>Список реальщиков:</h2><br>';
|
||||
$sp = mysql_query('SELECT * FROM `pay_operation` WHERE `good` > 0 GROUP BY `uid`');
|
||||
while( $pl = mysql_fetch_array($sp) ) {
|
||||
$onl = mysql_fetch_array(mysql_query('SELECT `id`,`online` FROM `users` WHERE `id` = "'.$pl['uid'].'" LIMIT 1'));
|
||||
$lg = $u->microLogin($pl['uid'],1);
|
||||
if( $lg != '<b><i>Невидимка</i></b> [??]<a target="_blank" href="https://new-combats.com/info/0"><img src="https://img.new-combats.com/i/inf_capitalcity.gif" /></a>' ) {
|
||||
if($onl['online'] > time()-240) {
|
||||
$lg = '<font color=green>'.$lg.'</font>';
|
||||
}else{
|
||||
$lg .= ' (был тут '.date('d.m.Y H:i',$onl['online']).')';
|
||||
}
|
||||
if( $u->info['admin'] > 0 ) {
|
||||
$sum = mysql_fetch_array(mysql_query('SELECT SUM(`ekr`) FROM `pay_operation` WHERE `good` > 0 AND `uid` = "'.$pl['uid'].'" LIMIT 1'));
|
||||
$sum = 0+$sum[0];
|
||||
echo $lg.' - '.$sum.' ЕКР.<br>';
|
||||
}else{
|
||||
echo $lg.'<br>';
|
||||
}
|
||||
}
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$onl = mysql_fetch_array(
|
||||
mysql_query('SELECT `id`,`online` FROM `users` WHERE `id` = "' . $pl['uid'] . '" LIMIT 1')
|
||||
);
|
||||
$lg = $u->microLogin($pl['uid'], 1);
|
||||
if ($lg != '<b><i>Невидимка</i></b> [??]<a target="_blank" href="https://new-combats.com/info/0"><img src="https://img.new-combats.com/i/inf_capitalcity.gif" /></a>') {
|
||||
if ($onl['online'] > time() - 240) {
|
||||
$lg = '<font color=green>' . $lg . '</font>';
|
||||
} else {
|
||||
$lg .= ' (был тут ' . date('d.m.Y H:i', $onl['online']) . ')';
|
||||
}
|
||||
if ($u->info['admin'] > 0) {
|
||||
$sum = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT SUM(`ekr`) FROM `pay_operation` WHERE `good` > 0 AND `uid` = "' . $pl['uid'] . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
$sum = 0 + $sum[0];
|
||||
echo $lg . ' - ' . $sum . ' ЕКР.<br>';
|
||||
} else {
|
||||
echo $lg . '<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
@ -17,10 +17,7 @@ $ba = mysql_fetch_array(mysql_query("SELECT * FROM `bank_alh` WHERE `uid` = " .
|
||||
|
||||
.mt {
|
||||
background-color: #b1a993;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
padding-top: 5px;
|
||||
padding-bottom: 5px;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.md {
|
||||
@ -57,17 +54,17 @@ if (isset($ba['id'])): ?>
|
||||
if (isset($uba['login'])) {
|
||||
echo 'Переводим кр персонажу: ' . $u->microLogin($uba['id'], 1) . '<br>';
|
||||
} else {
|
||||
echo '<font color=red>Банковский счет заблокирован, либо не найден.</font><hr>';
|
||||
echo '<span style="color: red; ">Банковский счет заблокирован, либо не найден.</span><hr>';
|
||||
unset($_POST['buy_cr']);
|
||||
}
|
||||
echo '<hr>';
|
||||
if (isset($uba['login'])) {
|
||||
$_POST['buk_cr'] = round($_POST['buk_cr'], 2);
|
||||
if (isset($_POST['buk_cr']) && $_POST['buk_cr'] < 1) {
|
||||
echo '<font color=red>Минимальная сумма перевода: 1 кр.</font><hr>';
|
||||
echo '<span style="color: red; ">Минимальная сумма перевода: 1 кр.</span><hr>';
|
||||
unset($_POST['buk_cr']);
|
||||
} elseif ($_POST['buk_cr'] > $ba['cr']) {
|
||||
echo '<font color=red>Недостаточно средств на счете</font><hr>';
|
||||
echo '<span style="color: red; ">Недостаточно средств на счете</span><hr>';
|
||||
unset($_POST['buk_cr']);
|
||||
}
|
||||
if (isset($_POST['buygoodluck'])) {
|
||||
@ -121,8 +118,13 @@ if (!$u->info['bukmeker'] && !$u->info['admin']) {
|
||||
return;
|
||||
}
|
||||
if (!empty($_POST['systemM'])) {
|
||||
$r = "<strong>Внимание: <span style='color: darkgreen;'>{$_POST['sysMes']}</span> [Букмекерская Контора]</strong>";
|
||||
mysql_query("INSERT INTO `chat` (`new`,`text`,`time`,`type`) VALUES ('1','" . $r . "', unix_timestamp(),'6')");
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setLogin('Букмекерская контора');
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setText($_POST['sysMes']);
|
||||
$cmsg->setIsAlert(true);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
|
||||
echo "<br><b style='color: red;'>Системное сообщение отправлено.</b>";
|
||||
}
|
||||
?>
|
||||
|
@ -73,10 +73,13 @@ if (isset($_GET['nightatack'])) {
|
||||
$rtxt = '[img[items/pal_button8.gif]] "' . $u->info['login'] . '" совершил' . $sx . ' нападение на персонажа "' . $ua['login'] . '".';
|
||||
}
|
||||
if ($goodt > 0) {
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'" . $u->info['city'] . "','" . $u->info['room'] . "','','','" . $rtxt . "','" . time(
|
||||
) . "','6','0','1')"
|
||||
);
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
$cmsg->setText($rtxt);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
}
|
||||
unset($goodt);
|
||||
header('location: main.php');
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,346 +0,0 @@
|
||||
<?php
|
||||
if(!defined('GAME') || !isset($_GET['referals']))
|
||||
{
|
||||
die();
|
||||
}
|
||||
|
||||
die('Раздел в разработке...');
|
||||
|
||||
$tal = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `items_users` WHERE `uid` = "'.$u->info['id'].'" AND `item_id` = "4005" AND `delete` < 1234567890'));
|
||||
|
||||
$rfs = array();
|
||||
$rfs['count'] = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `users` WHERE `host_reg` = "'.$u->info['id'].'" AND `mail` != "No E-Mail" LIMIT 1000'));
|
||||
$rfs['count'] = 0+$rfs['count'][0];
|
||||
$rfs['c'] = 1;
|
||||
$rfs['data'] = explode('|',$u->info['ref_data']);
|
||||
if(isset($_POST['r_bank']) || isset($_POST['r_type']))
|
||||
{
|
||||
$bnk = mysql_fetch_array(mysql_query('SELECT * FROM `bank` WHERE `id` = "'.mysql_real_escape_string($_POST['r_bank']).'" AND `uid` = "'.$u->info['id'].'" AND `block` = "0" LIMIT 1'));
|
||||
if(!isset($bnk['id']))
|
||||
{
|
||||
|
||||
}else{
|
||||
if($_POST['r_type']==1){ $_POST['r_type'] = 1; }else{ $_POST['r_type'] = 2; }
|
||||
$u->info['ref_data'] = $bnk['id'].'|'.$_POST['r_type'];
|
||||
$rfs['data'] = explode('|',$u->info['ref_data']);
|
||||
mysql_query('UPDATE `stats` SET `ref_data` = "'.mysql_real_escape_string($u->info['ref_data']).'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
}
|
||||
}
|
||||
$rfs['see'] = '';
|
||||
$sp = mysql_query('SELECT `s`.`active`,`u`.`online`,`u`.`id`,`u`.`level`,`u`.`login` FROM `users` AS `u` LEFT JOIN `stats` AS `s` ON `u`.`id` = `s`.`id` WHERE `u`.`host_reg` = "'.$u->info['id'].'" AND `u`.`mail` != "No E-Mail" ORDER BY `u`.`level` DESC LIMIT '.$rfs['count']);
|
||||
while($pl = mysql_fetch_array($sp))
|
||||
{
|
||||
$rfs['c2'] = ' <img onclick="top.chat.addto(\''.$pl['login'].'\',\'private\')" style="display:inline-block;cursor:pointer;" src="https://img.new-combats.com/i/lock.gif" width="20" height="15"> '.$u->microLogin($pl['id'],1).'';
|
||||
if($pl['level']>7)
|
||||
{
|
||||
$rfs['c2'] = '<font color="green">'.$rfs['c2'].'</font>';
|
||||
}
|
||||
if($pl['online'] >time()-520) {
|
||||
$rfs['c2'] .= '<font color="green"> <small>ONLINE</small></font>';
|
||||
}
|
||||
$rfs['see'] .= $rfs['c2'].'<br>';
|
||||
$rfs['c']++;
|
||||
}
|
||||
if($rfs['see']=='')
|
||||
{
|
||||
$rfs['see'] = '<center><b>К сожалению, у Вас нет воспитанников. Пригласите друзей сейчас!</b></center>';
|
||||
}
|
||||
if(isset($_GET['nastanew'])) {
|
||||
$_GET['nastanew'] = htmlspecialchars($_GET['nastanew'],NULL);
|
||||
$upr = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`online`,`admin`,`banned`,`level`,`host_reg` FROM `users` WHERE `login` = "'.mysql_real_escape_string($_GET['nastanew']).'" ORDER BY `id` ASC LIMIT 1'));
|
||||
if(isset($upr['id']) && $upr['inUser'] == 0) {
|
||||
$ch1 = mysql_fetch_array(mysql_query('SELECT * FROM `chat` WHERE `type` = 90 AND `to` = "'.$upr['login'].'" AND `time` > '.(time()-3600).' AND `login` = "'.$u->info['login'].'" LIMIT 1'));
|
||||
if(isset($ch1['id'])) {
|
||||
$u->error = 'Вы уже отправляли приглашение персонажу "'.$upr['login'].'". (Не чаще одного раза в час)';
|
||||
}elseif($upr['login'] == $u->info['login']) {
|
||||
$u->error = 'Хитро :) Наверное долго думали над этим?';
|
||||
}elseif($upr['level'] > 9 && $u->info['admin'] == 0) {
|
||||
$u->error = 'Нельзя стать наставником персонажа старше 9-го уровня';
|
||||
}elseif($upr['id'] == $u->info['host_reg']) {
|
||||
$u->error = 'Нельзя стать воспитанником своего наставника';
|
||||
}elseif($upr['online'] > time()-520) {
|
||||
if(is_int($upr['host_reg']) || $upr['host_reg'] > 0) {
|
||||
$u->error = 'У персонажа "'.$upr['login'].'" уже есть наставник.';
|
||||
}else{
|
||||
$u->error = 'Вы выслали приглашение персонажу "'.$upr['login'].'" стать вашим воспитанником.';
|
||||
mysql_query('INSERT INTO `chat` (`login`,`to`,`type`,`new`,`time`) VALUES ("'.$u->info['login'].'","'.$upr['login'].'","90","1","'.time().'")');
|
||||
}
|
||||
}else{
|
||||
$u->error = 'Персонаж "'.$upr['login'].'" должен быть в онлайне.';
|
||||
}
|
||||
}else{
|
||||
$u->error = 'Персонаж с логином "'.$_GET['nastanew'].'" не найден.';
|
||||
}
|
||||
}elseif(isset($_GET['nastayes'])) {
|
||||
$_GET['nastayes'] = htmlspecialchars($_GET['nastayes'],NULL);
|
||||
$upr = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`online`,`admin`,`banned`,`level`,`host_reg` FROM `users` WHERE `login` = "'.mysql_real_escape_string($_GET['nastayes']).'" LIMIT 1'));
|
||||
if(isset($upr['id'])) {
|
||||
$ch1 = mysql_fetch_array(mysql_query('SELECT * FROM `chat` WHERE `type` = 90 AND `to` = "'.$u->info['login'].'" AND `delete` > 0 AND `login` = "'.$upr['login'].'" LIMIT 1'));
|
||||
if(isset($ch1['id'])) {
|
||||
$myna = mysql_fetch_array(mysql_query('SELECT `id` FROM `users` WHERE `id` = "'.mysql_real_escape_string($u->info['host_reg']).'" LIMIT 1'));
|
||||
if(isset($myna['id'])) {
|
||||
$u->error = 'У вас уже есть наставник.';
|
||||
}else{
|
||||
$u->error = 'Персонаж "'.$_GET['nastayes'].'" стал вашим наставником!';
|
||||
mysql_query('UPDATE `users` SET `host_reg` = "'.$upr['id'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','0','','".$upr['login']."',' Персонаж "".$u->info['login']."" подтвердил что он ваш воспитанник. Вы получаете <b>Талант Наставника</b> (<small>x1</small>).','-1','6','0')");
|
||||
$u->addItem(4005,$upr['id']);
|
||||
}
|
||||
}else{
|
||||
$u->error = 'Персонаж "'.$_GET['nastayes'].'" не отправлял вам заявок наставника.';
|
||||
}
|
||||
}else{
|
||||
$u->error = 'Персонаж "'.$_GET['nastayes'].'" не отправлял вам заявок наставника.';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<table cellspacing="0" cellpadding="2" width="100%">
|
||||
<tr>
|
||||
<td style="vertical-align: top; "><table cellspacing="0" cellpadding="2" width="100%">
|
||||
<tr>
|
||||
<td align="left">
|
||||
<?
|
||||
if($u->error != '') {
|
||||
echo '<font color=red>'.$u->error.'</font><br>';
|
||||
}
|
||||
?>
|
||||
<input type="button" onclick="top.nastavniknew()" class="btn btn-success" value="Предложить наставничество">
|
||||
|
||||
<center><b>Ссылка для друзей:<br> <input class="btn btn-danger" value="new-combats.com/r<?=$u->info['id']?>" /></center></b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellspacing="0" cellpadding="2" width="100%">
|
||||
<tr>
|
||||
<td align="center"><h4>Как заработать игровую валюту и реальные деньги в БК:</h4></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<? if( true == false ) { ?>
|
||||
<u><font color="#003388"><b>Активация подарочных ваучеров</b>:</font></u><br />
|
||||
<form style="padding:10px;" method="post" action="main.php?referals">
|
||||
Номер:
|
||||
<input type="text" value="" name="va_num" />
|
||||
Пароль:
|
||||
<input type="password" name="va_psw" value="" />
|
||||
<button type="submit" class="btnnew"><small>Активировать</small></button>
|
||||
<br />
|
||||
Ссылка на ваучер:
|
||||
<input style="width:280px" type="text" name="va_url" value="" />
|
||||
<br />
|
||||
</form>
|
||||
<small><b>Правила размещения ваучера:</b> <br />
|
||||
- Ваучер должен быть размещен в социальных сетях, либо других сайтах с подробной информацией по его использованию <br />
|
||||
- Он должен находиться на указанном адресе не менее суток <br />
|
||||
- Награду за ваучер возможно получить в течении 24 ч. (Защита от "накрутки") <br />
|
||||
- Для создания собственного ваучера перейдите по ссылке: <a href="#">В разработке</a> </small> <br />
|
||||
<br />
|
||||
<? } ?>
|
||||
<?
|
||||
$rpgtop = mysql_fetch_array(mysql_query('SELECT * FROM `an_data` WHERE `var` = "rpgtop" AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
|
||||
if(!isset($rpgtop['id'])) {
|
||||
if(isset($_GET['testtoprpg'])) {
|
||||
|
||||
$html = file_get_contents('https://rpgtop.su/comm/t1/25443/1.htm');
|
||||
$html = strripos($html,'*ID'.$u->info['id'].'*');
|
||||
|
||||
if($html == false) {
|
||||
$html = file_get_contents('https://rpgtop.su/comm/t2/25443/1.htm');
|
||||
$html = strripos($html,'*ID'.$u->info['id'].'*');
|
||||
}
|
||||
|
||||
if($html == true) {
|
||||
echo '<div><b><font color=red>Спасибо что проголосовали за наш проект! Свитки добавлены к вам в инвентарь.</font></b></div>';
|
||||
mysql_query('INSERT INTO `an_data` (`uid`,`time`,`var`) VALUES (
|
||||
"'.$u->info['id'].'","'.time().'","rpgtop"
|
||||
)');
|
||||
$rpgtop['id'] = mysql_insert_id();
|
||||
// Звездное сияние (+10) и ЖЖ6
|
||||
$u->addItem(1463,$u->info['id'],'|nosale=1|notransfer=1|sudba=1|noremont=1');
|
||||
$u->addItem(3101,$u->info['id'],'|nosale=1|notransfer=1|sudba=1|noremont=1');
|
||||
//
|
||||
}else{
|
||||
echo '<div><b><font color=red>Ваш отзыв не найден в положительных.</font></b></div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!isset($rpgtop['id'])) {
|
||||
?>
|
||||
<!-- <u><font color="#003388"><b>Награда</b> за положительный отзыв на сайте <a href="https://rpgtop.su/comm/25443/1.htm" target="_blank">rpgtop.su</a>:</font></u><br />
|
||||
1. Перейдите по ссылке <a href="https://rpgtop.su/comm/25443/1.htm" target="_blank">https://rpgtop.su/comm/25443/1.htm</a><br>
|
||||
2. Оставьте положительный отзыв и в конце допишите текст в ковычках: " <b> *ID<?=$u->info['id']?>* </b> " (вместе с звездочками)<br>
|
||||
3. Нажмите на кнопку "Проверить мой отзыв"<br>
|
||||
4. При успешном подтверждении вы получите <a href="https://new-combats.com/item/1463" target="_blank"><img src="https://img.new-combats.com/i/items/spell_starshine.gif" height="20"> Звездное Сияние</a> и <a href="https://new-combats.com/item/3101" target="_blank"><img src="https://img.new-combats.com/i/items/spell_powerHPup6.gif" height="20"> Жажда Жизни +6</a><br>
|
||||
<input onclick="location.href='https://new-combats.com/main.php?referals&testtoprpg';" type="button" class="btnnew" value="Проверить мой отзыв"><br><br>-->
|
||||
<?
|
||||
}
|
||||
?>
|
||||
<u><font color="#003388"><b>Кредиты</b> можно получить:</font></u> <br />
|
||||
- набирая опыт в боях и поднимаясь по апам и уровням в соответствии с <a href="https://new-combats.com/exp.php" target="_blank">Таблицей Опыта</a> (доступно на любом уровне)<br />
|
||||
- в Пещерах: продав ресурсы в Магазин<br />
|
||||
- с помощью <b>Реферальной системы</b>, которая описана ниже (доступно на любом уровне)<br />
|
||||
- лечением и другими магическими услугами (доступно с 4 уровня)<br />
|
||||
- торговлей (доступно с 4 уровня)<br />
|
||||
- в Башне Смерти: обналичив у Архивариуса найденный в башне чек (доступно с 5 уровня)<br />
|
||||
<br />
|
||||
<br />
|
||||
<u><font color="#003388"><b>Еврокредиты</b> можно получить:</font></u><br />
|
||||
- с помощью <b>Реферальной системы</b>, которая описана ниже (доступно на любом уровне)<br />
|
||||
- купив еврокредиты у официальных дилеров БК или через систему автооплаты<br />
|
||||
<br />
|
||||
<br />
|
||||
<u><font color="#003388"><b>Реальные деньги</b> можно получить:</font></u><br />
|
||||
- с помощью <b>Партнерской программы БК</b>.<br />
|
||||
<br />
|
||||
<br />
|
||||
<b>Реферальная система</b> - это возможность Вашего <b>дополнительного заработка</b> в игре. При открытии счета в банке, Вы автоматически получаете личную <b>реферальную ссылку</b>, которую можете раздать своим друзьям и знакомым.<br />
|
||||
<br />
|
||||
<b>Каждый персонаж</b>, зарегистрировавшийся в БК по Вашей реферальной ссылке, по достижению им <b>1го</b> уровня начнет приносить Вам <b>дополнительный заработок</b>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><p> </p>
|
||||
<ul>
|
||||
В реферальной системе отображаются персонажи прошедшие регистрацию
|
||||
Выплаты производятся по банковскому счету указаному в настройках системы
|
||||
</ul></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
<td style="width: 5%; vertical-align: top; "> </td>
|
||||
<td style="width: 30%; vertical-align: top; "><table width="100%" cellpadding="2" cellspacing="0">
|
||||
<tr>
|
||||
<td style="width: 25%; vertical-align: top; text-align: right; "><input class="btn" type='button' value='Обновить' style='width: 100px' onclick='location="main.php?referals"' />
|
||||
|
||||
<input type="button" value="Вернуться" style='width: 100px' class="btn" onclick='location="main.php"' /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="middle"><br />
|
||||
<? if( $u->info['host_reg'] > 0 ) {
|
||||
echo 'Ваш наставник: '.$u->microLogin($u->info['host_reg'],1).'<hr />';
|
||||
$nas = mysql_fetch_array(mysql_query('SELECT `id`,`banned`,`room`,`login`,`align`,`level`,`city`,`room`,`online` FROM `users` WHERE `id` = "'.mysql_real_escape_string($u->info['host_reg']).'" LIMIT 1'));
|
||||
if(isset($nas['id'])) {
|
||||
$itm0 = mysql_fetch_array(mysql_query('SELECT COUNT(`id`) FROM `items_users` WHERE `uid` = "'.$u->info['id'].'" AND `item_id` = 4004 AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1'));
|
||||
$itm0 = $itm0[0];
|
||||
}
|
||||
if(isset($nas['id']) && $itm0 > 0) {
|
||||
if(isset($_GET['read_pr'])) {
|
||||
$itm0--;
|
||||
}
|
||||
echo 'Вы можете изучить приемы наставника:<br><small>Осталось <b>'.$itm0.'</b> <u>Учебников воспитанника</u>.</small><br>';
|
||||
if($nas['banned'] > 0 || $nas['align'] == 2) {
|
||||
echo '<font color=red><b>Ваш наставник в хаосе или заблокирован.</b></font>';
|
||||
}elseif($nas['room'] != $u->info['room'] && $nas['online'] > time()-520 ) {
|
||||
echo '<font color=red><b>Вы должны находиться с наставником в одной комнате</b></font>';
|
||||
}else{
|
||||
$priz = '';
|
||||
$sp = mysql_query('SELECT * FROM `actions` WHERE `uid` = "'.$nas['id'].'" AND `vars` LIKE "%read%" AND `vals` > 1042 ORDER BY `vals` ASC');
|
||||
while($pl = mysql_fetch_array($sp)) {
|
||||
$tstsp = mysql_fetch_array(mysql_query('SELECT `id` FROM `actions` WHERE `uid` = "'.$u->info['id'].'" AND `vars` LIKE "%read%" AND `vals` = "'.$pl['vals'].'" LIMIT 1'));
|
||||
if(!isset($tstsp['id'])) {
|
||||
$prm = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.$pl['vals'].'" LIMIT 1'));
|
||||
if(isset($prm['id'])) {
|
||||
if(isset($_GET['read_pr']) && $_GET['read_pr'] == $prm['id']) {
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','0','','".$u->info['login']."','Вы успешно изучили прием <b>".$prm['name']."</b> при помощи Учебника воспитанника. ','".time()."','6','0')");
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','capitalcity','0','','".$nas['login']."',' Ваш воспитанник "".$u->info['login']."" изучил прием <b>".$prm['name']."</b> при помощи Учебника воспитанника. <br><b>Вы получили Талант Наставника x3</b>','-1','6','0')");
|
||||
$u->addItem(4005,$nas['id']);
|
||||
$u->addItem(4005,$nas['id']);
|
||||
$u->addItem(4005,$nas['id']);
|
||||
mysql_query('INSERT INTO `actions` (`uid`,`time`,`city`,`room`,`vars`,`ip`,`vals`,`val`) VALUES (
|
||||
"'.$u->info['id'].'","'.time().'","'.$u->info['city'].'","'.$u->info['room'].'","read","'.$u->info['ip'].'",
|
||||
"'.$prm['id'].'",""
|
||||
)');
|
||||
mysql_query('DELETE FROM `items_users` WHERE `uid` = "'.$u->info['id'].'" AND `item_id` = 4004 AND `delete` = 0 AND `inShop` = 0 AND `inTransfer` = 0 LIMIT 1');
|
||||
echo '<font color=red><b>Прием "'.$prm['name'].'" был успешно изучен!</b></font><br>';
|
||||
}else{
|
||||
$priz .= '<a href="?referals&read_pr='.$prm['id'].'"><img width="40" height="25" title="Изучить "'.$prm['name'].'"" src="https://img.new-combats.com/i/eff/'.$prm['img'].'"></a> ';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if($priz == '') {
|
||||
echo '<font color=red><b>У наставника нет изученных приемов которые Вы могли бы получить</b></font>';
|
||||
}else{
|
||||
echo $priz;
|
||||
}
|
||||
}
|
||||
echo '<hr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div style="display:inline-block;width:300px;" align="left">
|
||||
<? $bsees = '<option value="0">Выберите счет</option>';
|
||||
$sp = mysql_query('SELECT * FROM `bank` WHERE `uid` = "'.$u->info['id'].'" AND `block` = "0" LIMIT 1');
|
||||
while($pl = mysql_fetch_array($sp))
|
||||
{
|
||||
if($rfs['data'][0]==$pl['id'])
|
||||
{
|
||||
$bsees .= '<option selected="selected" value="'.$pl['id'].'">№ '.$pl['id'].'</option>';
|
||||
}else{
|
||||
$bsees .= '<option value="'.$pl['id'].'">№ '.$pl['id'].'</option>';
|
||||
}
|
||||
}
|
||||
$r = '<b><small>За достижения реферала вы получите</small></b>:<br>';
|
||||
$sp = mysql_query('SELECT * FROM `referal_bous` WHERE `type` = "1"');
|
||||
while($pl = mysql_fetch_array($sp)) {
|
||||
if($pl['add_bank'] > 0 || $pl['add_money'] > 0) {
|
||||
$r .= '<span style="display:inline-block;width:90px;">'.$pl['level'].' уровень</span> - ';
|
||||
if($pl['add_money'] > 0) {
|
||||
$r .= '<span style="display:inline-block;width:90px;"> '.$pl['add_money'].' кр.</span>';
|
||||
}
|
||||
if($pl['add_bank'] > 0) {
|
||||
$r .= '<span style="display:inline-block;width:90px;"> '.$pl['add_bank'].' ekr.</span>';
|
||||
}
|
||||
$r .= '<br>';
|
||||
}
|
||||
}
|
||||
echo $r;
|
||||
/*
|
||||
?>
|
||||
<br />
|
||||
<b>Получить награду за beta-тест</b><br />
|
||||
Введите логин и пароль с beta-теста:<br />
|
||||
<?
|
||||
if(isset($_POST['betalogin'])) {
|
||||
$beta = mysql_fetch_array(mysql_query('SELECT * FROM `beta_testers` WHERE `login` = "'.mysql_real_escape_string($_POST['betalogin']).'" LIMIT 1'));
|
||||
$beta2 = mysql_fetch_array(mysql_query('SELECT * FROM `beta_testers` WHERE `active` = "'.$u->info['id'].'" LIMIT 1'));
|
||||
if(!isset($beta['id'])) {
|
||||
echo '<font color=red><b>Логин beta-тестера не найден</b></font>';
|
||||
}elseif(md5($_POST['betapass']) != $beta['pass']) {
|
||||
echo '<font color=red><b>Укажите пароль который был во время beta-теста</b></font>';
|
||||
}elseif(isset($beta2['id'])) {
|
||||
echo '<font color=red><b>Вы уже получали вознаграждение!</b></font>';
|
||||
}else{
|
||||
echo '<font color=red><b>Вы успешно получили вознаграждение, значок beta-тестера.</b></font>';
|
||||
//значок в инфо
|
||||
mysql_query('INSERT INTO `users_ico` (
|
||||
`uid`,`time`,`text`,`img`,`type`,`x`
|
||||
) VALUES (
|
||||
"'.$u->info['id'].'","'.time().'","<b>beta-тестер</b><br>Благодарность от Администрации проекта.","icn123.gif","1","1"
|
||||
)');
|
||||
//
|
||||
mysql_query('UPDATE `beta_testers` SET `active` = "'.$u->info['id'].'" WHERE `id` = "'.$beta['id'].'" LIMIT 1');
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div align="center">
|
||||
<form style="width:144px;" method="post" action="main.php?referals=1">
|
||||
<input style="width:144px;" name="betalogin" value="" type="text" /><br />
|
||||
<input style="width:144px;" name="betapass" value="" type="password" /><br />
|
||||
<input style="width:144px;" type="submit" class="btnnew" value="Забрать вознаграждение!" />
|
||||
</form>
|
||||
</div><? */ ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><h4>Ваши воспитанники online:</h4></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?=$rfs['see']?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="middle"> </td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
@ -1,570 +0,0 @@
|
||||
<?
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
}
|
||||
|
||||
$old_battle = true;
|
||||
|
||||
require_once('jx/battle/log_text.php');
|
||||
|
||||
if( $old_battle == true ) {
|
||||
|
||||
if(isset($btl_last['id']) && $u->info['battle'] == 0) {
|
||||
$u->info['battle'] = $btl_last['battle'];
|
||||
//die();
|
||||
}
|
||||
|
||||
if($u->info['battle'] == 0 || isset($_GET['bend']))
|
||||
{
|
||||
//header('location: main.php');
|
||||
die();
|
||||
}
|
||||
|
||||
/*if( $u->info['admin'] > 0 ) {
|
||||
echo '<script>var server_fight = "_vip";</script>';
|
||||
}else{*/
|
||||
echo '<script>var server_fight = "";</script>';
|
||||
//}
|
||||
?>
|
||||
<script src="https://new-combats.com/js/jquery.js" type="text/javascript"></script>
|
||||
|
||||
<script src="https://new-combats.com/batl_1.js" type="text/javascript"></script>
|
||||
|
||||
<link href="https://new-combats.com/btl_1.css" rel="stylesheet" type="text/css">
|
||||
<script>
|
||||
function maginfo(z,p,m,obj) {
|
||||
var r = '';
|
||||
r += '<b>'+$(obj).attr('magelogin')+'</b><br><br>';
|
||||
r += 'Мощь: '+m+', ';
|
||||
r += 'Защита: '+z+', ';
|
||||
r += 'Подавление: '+p+'';
|
||||
return r;
|
||||
}
|
||||
<?
|
||||
if(isset($btl_last['id']) && ( $u->info['battle'] == 0 || $u->info['battle'] == $btl_last['battle']) ) {
|
||||
echo 'var battleFinishData = "'.$u->info['battle_text'].'";';
|
||||
//$u->info['battle_text'] = '';
|
||||
if( isset($_GET['finish'])) {
|
||||
mysql_query('UPDATE `stats` SET `battle_text` = "",`last_b`="0" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
mysql_query('UPDATE `battle_users` SET `finish` = 1 WHERE `uid` = "'.$u->info['id'].'"');
|
||||
header('location: main.php');
|
||||
die();
|
||||
}
|
||||
}else{
|
||||
echo 'var battleFinishData = -1;';
|
||||
}
|
||||
?>
|
||||
var noErTmr;
|
||||
var smnpty = <?=(0+$u->info['smena'])?>;
|
||||
setInterval('top.c.noEr = 0;',250);
|
||||
function mbsum(event)
|
||||
{
|
||||
//Enter
|
||||
if(event.keyCode==13 && top.c.noEr==0){
|
||||
if( document.getElementById('mainpanel').style.display == 'none' ) {
|
||||
reflesh();
|
||||
}else{
|
||||
atack();
|
||||
}
|
||||
top.c.noEr = 1; clearTimeout(top.c.noErTmr); /*top.c.noErTmr = setTimeout('top.c.noEr = 0;',1000);*/
|
||||
}
|
||||
//space
|
||||
if(event.keyCode==32 && top.c.noEr==0){ reflesh(); top.c.noEr = 1; clearTimeout(top.c.noErTmr); /*top.c.noErTmr = setTimeout('top.c.noEr = 0;',1000);*/ }
|
||||
//numes
|
||||
if(event.keyCode==49) {
|
||||
change_radioKeys(1,false);
|
||||
}
|
||||
if(event.keyCode==50) {
|
||||
change_radioKeys(2,false);
|
||||
}
|
||||
if(event.keyCode==51) {
|
||||
change_radioKeys(3,false);
|
||||
}
|
||||
if(event.keyCode==52) {
|
||||
change_radioKeys(4,false);
|
||||
}
|
||||
if(event.keyCode==53) {
|
||||
change_radioKeys(5,false);
|
||||
}
|
||||
if(event.keyCode==48) {
|
||||
change_radioKeys(0,false);
|
||||
}
|
||||
}
|
||||
|
||||
$(document.body).bind('keyup',function(event){ mbsum(event); });
|
||||
|
||||
function shpb() {
|
||||
$(document).find('div.pimg').unbind('mouseover');
|
||||
$(document).find('div.pimg').unbind('mouseout');
|
||||
$(document).find('div.pimg').unbind('mousedown');
|
||||
$(document).find('div.pimg').bind('mouseover',function(){ top.hi(this,$(this).attr('stt'),event,0,1,1,1,'stt'); });
|
||||
$(document).find('div.pimg').bind('mouseout',function(){ top.hic(); });
|
||||
$(document).find('div.pimg').bind('mousedown',function(){ top.hic(); });
|
||||
var test = $(document).find('div.pimg');
|
||||
var i = 0;
|
||||
while(i != -1) {
|
||||
if(test[i] != undefined) {
|
||||
if($(test[i]).attr('pog') > 1 && $(test[i]).attr('stl') == 0) {
|
||||
$(test[i]).attr('stl',1);
|
||||
$(test[i]).html('<span class="sp1">'+$(test[i]).attr('pog')+'</span><span class="sp4">'+$(test[i]).attr('pog')+'</span><span class="sp3">'+$(test[i]).attr('pog')+'</span><span class="sp2">'+$(test[i]).attr('pog')+'</span><div>'+$(test[i]).attr('pog')+'</div>'+$(test[i]).html());
|
||||
}else if($(test[i]).attr('col') > 1 && $(test[i]).attr('stl') == 0) {
|
||||
$(test[i]).attr('stl',1);
|
||||
$(test[i]).html('<span class="sp1">x'+$(test[i]).attr('col')+'</span><span class="sp4">x'+$(test[i]).attr('col')+'</span><span class="sp3">x'+$(test[i]).attr('col')+'</span><span class="sp2">x'+$(test[i]).attr('col')+'</span><div>x'+$(test[i]).attr('col')+'</div>'+$(test[i]).html());
|
||||
}
|
||||
}else{
|
||||
i = -2;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div align="center"><b><font color="red">!!! НОВАЯ БОЕВАЯ СИСТЕМА РАБОТАЕТ В ТЕСТОВОМ РЕЖИМЕ !!!</font></b></div>
|
||||
<div style="background-color:#e8e8e8">
|
||||
<script type="text/javascript" src="js/btl_info.js"></script>
|
||||
<script>
|
||||
$.ajaxSetup({cache: false});
|
||||
$(window).error(function(){
|
||||
return true;
|
||||
});
|
||||
</script>
|
||||
<script src="https://img.new-combats.com/js/jx/jquery.form.js" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="js/jquery.cookie.js"></script>
|
||||
<script type="text/javascript">
|
||||
var login = '<? echo $u->info['login']; ?>';
|
||||
var za = <? echo 0+$u->stats['zona']; ?>;
|
||||
var zb = <? echo 0+$u->stats['zonb']; ?>;
|
||||
var level = <? echo $u->info['level']; ?>;
|
||||
|
||||
function replaceAll(find, replace, str) {
|
||||
return str.replace(new RegExp(find, 'g'), replace);
|
||||
}
|
||||
|
||||
function explode( delimiter, string ) {
|
||||
|
||||
var emptyArray = { 0: '' };
|
||||
|
||||
if ( arguments.length != 2
|
||||
|| typeof arguments[0] == 'undefined'
|
||||
|| typeof arguments[1] == 'undefined' )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if ( delimiter === ''
|
||||
|| delimiter === false
|
||||
|| delimiter === null )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( typeof delimiter == 'function'
|
||||
|| typeof delimiter == 'object'
|
||||
|| typeof string == 'function'
|
||||
|| typeof string == 'object' )
|
||||
{
|
||||
return emptyArray;
|
||||
}
|
||||
|
||||
if ( delimiter === true ) {
|
||||
delimiter = '1';
|
||||
}
|
||||
|
||||
return string.toString().split ( delimiter.toString() );
|
||||
}
|
||||
|
||||
<?
|
||||
function convert($from, $to, $var)
|
||||
{
|
||||
if (is_array($var))
|
||||
{
|
||||
$new = array();
|
||||
foreach ($var as $key => $val)
|
||||
{
|
||||
$new[convert($from, $to, $key)] = convert($from, $to, $val);
|
||||
}
|
||||
$var = $new;
|
||||
}
|
||||
else if (is_string($var))
|
||||
{
|
||||
$var = iconv($from, $to, $var);
|
||||
}
|
||||
return $var;
|
||||
}
|
||||
function normJsonStr($str){
|
||||
$str = preg_replace_callback('/\\\u([a-f0-9]{4})/i', create_function('$m', 'return chr(hexdec($m[1])-1072+224);'), $str);
|
||||
return $str;
|
||||
}
|
||||
?>
|
||||
|
||||
var log_text = <? echo normJsonStr(json_encode($log_text)); ?>;
|
||||
var youlogin = "<?=$u->info['login']?>";
|
||||
|
||||
function looklogrep(text,vars) {
|
||||
|
||||
var vars = explode('||',vars);
|
||||
var forYou = '';
|
||||
var data = { };
|
||||
var i = 0;
|
||||
var j = {};
|
||||
while(i != -1 ) {
|
||||
if( vars[i] != undefined ) {
|
||||
j = explode('=',vars[i]);
|
||||
data[j[0]] = j[1];
|
||||
}else{
|
||||
i = -2;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
text = replaceAll('{u1}','<span onClick="top.chat.addto(\'' + data['login1'] + '\',\'to\'); return false;" oncontextmenu="top.infoMenu(\'' + data['login1'] + '\',event,\'chat\'); return false;" class="CSSteam'+data['t1']+'">' + data['login1'] + '</span>',text);
|
||||
text = replaceAll('{u2}','<span onClick="top.chat.addto(\'' + data['login2'] + '\',\'to\'); return false;" oncontextmenu="top.infoMenu(\'' + data['login2'] + '\',event,\'chat\'); return false;" class="CSSteam'+data['t2']+'">' + data['login2'] + '</span>',text);
|
||||
text = replaceAll('^^^^','=',text);
|
||||
text = replaceAll('{pr}','<b>' + data['prm'] + '</b>',text);
|
||||
|
||||
var test_zb1 = [ 0 , 0 , 0 , 0 , 0 , 0];
|
||||
var test_zb2 = [ 0 , 0 , 0 , 0 , 0 , 0];
|
||||
i = 1;
|
||||
j = data['bl2'];
|
||||
while( i <= data['zb2'] ) {
|
||||
test_zb1[ j ] = 1;
|
||||
j++;
|
||||
if( j > 5 ) {
|
||||
j = 1;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
i = 1;
|
||||
while( i <= 5 ) {
|
||||
j = 1;
|
||||
rej = '';
|
||||
while( j <= 5 ) {
|
||||
zab = '';
|
||||
if( i == j ) {
|
||||
zab += '1'; //a
|
||||
}else{
|
||||
zab += '0'; //a
|
||||
}
|
||||
if( test_zb1[ j ] == 1) {
|
||||
zab += '1'; //b
|
||||
}else{
|
||||
zab += '0'; //b
|
||||
}
|
||||
rej += '<img src="https://img.new-combats.com/i/zones/'+data['t2']+'/'+data['t1']+''+zab+'.gif">';
|
||||
j++;
|
||||
}
|
||||
text = replaceAll('{zn2_' + i + '}',rej,text);
|
||||
i++;
|
||||
}
|
||||
|
||||
i = 1;
|
||||
while( i <= 21 ) {
|
||||
//замена R - игрок 1
|
||||
if( log_text[data['s1']] != undefined ) {
|
||||
if( log_text[data['s1']][i] != undefined ) {
|
||||
r = log_text[data['s1']][i];
|
||||
k = 0;
|
||||
while( k != -1 ) {
|
||||
if( r[k] != undefined ) {
|
||||
text = replaceAll('{1x' + i + 'x' + k + '}','' + r[k] + '',text);
|
||||
}else{
|
||||
k = -2;
|
||||
}
|
||||
k++;
|
||||
}
|
||||
}
|
||||
}
|
||||
//замена R - игрок 2
|
||||
if( log_text[data['s2']] != undefined ) {
|
||||
if( log_text[data['s2']][i] != undefined ) {
|
||||
r = log_text[data['s2']][i];
|
||||
k = 0;
|
||||
while( k != -1 ) {
|
||||
if( r[k] != undefined ) {
|
||||
text = replaceAll('{2x' + i + 'x' + k + '}','' + r[k] + '',text);
|
||||
}else{
|
||||
k = -2;
|
||||
}
|
||||
k++;
|
||||
}
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
//text = replaceAll('^^^^','=',text);
|
||||
|
||||
/*text = replaceAll('{tm1}','<span class="date '+forYou+'">00:01</span>',text);
|
||||
text = replaceAll('{tm2}','<span class="date '+forYou+'">00:02</span>',text);
|
||||
text = replaceAll('{tm3}','<span class="date '+forYou+'">01.01.2015 00:01</span>',text);
|
||||
text = replaceAll('{tm4}','<span class="date '+forYou+'">02.02.2015 00:02</span>',text);*/
|
||||
|
||||
//Повторная замена
|
||||
text = replaceAll('{u1}','<span onClick="top.chat.addto(\'' + data['login1'] + '\',\'to\'); return false;" oncontextmenu="top.infoMenu(\'' + data['login1'] + '\',event,\'chat\'); return false;" class="CSSteam'+data['t1']+'">' + data['login1'] + '</span>',text);
|
||||
text = replaceAll('{u2}','<span onClick="top.chat.addto(\'' + data['login2'] + '\',\'to\'); return false;" oncontextmenu="top.infoMenu(\'' + data['login2'] + '\',event,\'chat\'); return false;" class="CSSteam'+data['t2']+'">' + data['login2'] + '</span>',text);
|
||||
|
||||
if( data['prm'] != undefined ) {
|
||||
data['prm'] = replaceAll("rvnO","=",data['prm']);
|
||||
}
|
||||
|
||||
//data['prm'] = replaceAll('^^^^','=', data['prm'] );
|
||||
|
||||
text = replaceAll('{pr}','<b>' + data['prm'] + '</b>',text);
|
||||
|
||||
text = replaceAll('^^^^','=',text);
|
||||
|
||||
text = replaceAll('==','',text);
|
||||
|
||||
if( ( data['login1'] == youlogin || data['login2'] == youlogin ) && youlogin != '' ) {
|
||||
text = replaceAll('{fru}',' date2 ',text);
|
||||
}else{
|
||||
text = replaceAll('{fru}','',text);
|
||||
}
|
||||
|
||||
/*text = replaceAll('{tm1}','<span class="date '+forYou+'">00:01</span>',text);
|
||||
text = replaceAll('{tm2}','<span class="date '+forYou+'">00:02</span>',text);
|
||||
text = replaceAll('{tm3}','<span class="date '+forYou+'">01.01.2015 00:01</span>',text);
|
||||
text = replaceAll('{tm4}','<span class="date '+forYou+'">02.02.2015 00:02</span>',text);*/
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
</script>
|
||||
<script type="text/javascript" src="js/btl_mini.js"></script>
|
||||
<div id="hint4" class="ahint"></div>
|
||||
<style>
|
||||
html, body {
|
||||
background-color:#e8e8e8;
|
||||
}
|
||||
</style>
|
||||
<div align="center" onMouseDown="top.hic();" onMouseOut="top.hic();">
|
||||
<table width="100%" bgcolor="#e8e8e8" border="0" cellspacing="0" cellpadding="1">
|
||||
<tr>
|
||||
<td valign="top" width="260"><div id="player1">
|
||||
</div>
|
||||
<div align="right"></div></td>
|
||||
<td valign="top"><div align="center">
|
||||
<table width="100%" height="25" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="50%" valign="top"><div id="player1_login" style="float:left;"></div></td>
|
||||
<td align="center"><h3>Поединок</h3></td>
|
||||
<td width="50%" valign="top" align="right"><div id="player2_login" style="float:right;"></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" align="center" cellpadding="0" cellspacing="3">
|
||||
<tr>
|
||||
<td height="20">
|
||||
<div id="ref2" name="ref2"></div><div id="ref" name="ref"></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<div id="error" style="display:none;"></div>
|
||||
<td><div id="pers_magic" align="center">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img title="Пустой слот заклятия" src="https://img.new-combats.com/i/items/w/w101.gif" /></td>
|
||||
<td><img title="Пустой слот заклятия" src="https://img.new-combats.com/i/items/w/w101.gif" /></td>
|
||||
<td><img title="Пустой слот заклятия" src="https://img.new-combats.com/i/items/w/w101.gif" /></td>
|
||||
<td><img title="Пустой слот заклятия" src="https://img.new-combats.com/i/items/w/w101.gif" /></td>
|
||||
<td><img title="Пустой слот заклятия" src="https://img.new-combats.com/i/items/w/w101.gif" /></td>
|
||||
<td><img title="Пустой слот заклятия" src="https://img.new-combats.com/i/items/w/w101.gif" /></td>
|
||||
<td><img title="Пустой слот заклятия" src="https://img.new-combats.com/i/items/w/w101.gif" /></td>
|
||||
<td><img title="Пустой слот заклятия" src="https://img.new-combats.com/i/items/w/w101.gif" /></td>
|
||||
<td><img title="Пустой слот заклятия" src="https://img.new-combats.com/i/items/w/w101.gif" /></td>
|
||||
<td><img title="Пустой слот заклятия" src="https://img.new-combats.com/i/items/w/w101.gif" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><table border="0" align="center" cellpadding="0" cellspacing="1">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<div id="ndfksdw">
|
||||
<table width="100%" id="mainpanel222" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td bgcolor="#A7A7A7"><div align="center"><strong>Атака</strong></div></td>
|
||||
<td width="20" bgcolor="#A7A7A7"><div align="center" style="color:#A7A7A7;">-</div></td>
|
||||
<td bgcolor="#A7A7A7"><div align="center"><strong>Защита</strong></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="2" id="mainpanel">
|
||||
<tr>
|
||||
<td><div id="zatack1_1" class="crop"><a onclick="change_radio(1,1,'atack',0);return false;" href="#"><img style="display:block;" id="atack_1_1" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td><div id="zatack2_1" class="crop"><a onclick="change_radio(2,1,'atack',0);return false;" href="#"><img style="display:block;" id="atack_2_1" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td><div id="zatack3_1" class="crop"><a onclick="change_radio(3,1,'atack',0);return false;" href="#"><img style="display:block;" id="atack_3_1" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td><div id="zatack4_1" class="crop"><a onclick="change_radio(4,1,'atack',0);return false;" href="#"><img style="display:block;" id="atack_4_1" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td><div id="zatack5_1" class="crop"><a onclick="change_radio(5,1,'atack',0);return false;" href="#"><img style="display:block;" id="atack_5_1" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td onclick="select_atack(1,1);" style="cursor:default;" align="left">удар в голову</td>
|
||||
<td width="3" style="cursor:default;" onclick="select_atack(1,1);"> </td>
|
||||
<td><div id="zblock1_1" class="crop"><a onclick="change_radio(1,1,'block',0);return false;" href="#"><img style="display:block;" id="block_1_1" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td onclick="change_radio(1,1,'block');" style="cursor:default;" align="left"><div id="txtb1_1"> блок головы</div>
|
||||
<div id="txtb1_2"> блок головы и груди</div>
|
||||
<div id="txtb1_3"> блок головы, груди и живота</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div id="zatack1_2" class="crop"><a onclick="change_radio(1,2,'atack',0);return false;" href="#"><img style="display:block;" id="atack_1_2" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td><div id="zatack2_2" class="crop"><a onclick="change_radio(2,2,'atack',0);return false;" href="#"><img style="display:block;" id="atack_2_2" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td><div id="zatack3_2" class="crop"><a onclick="change_radio(3,2,'atack',0);return false;" href="#"><img style="display:block;" id="atack_3_2" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td><div id="zatack4_2" class="crop"><a onclick="change_radio(4,2,'atack',0);return false;" href="#"><img style="display:block;" id="atack_4_2" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td><div id="zatack5_2" class="crop"><a onclick="change_radio(5,2,'atack',0);return false;" href="#"><img style="display:block;" id="atack_5_2" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td onclick="select_atack(2,1);" style="cursor:default;" align="left">удар в грудь</td>
|
||||
<td onclick="select_atack(2,1);" style="cursor:default;"> </td>
|
||||
<td><div id="zblock1_2" class="crop"><a onclick="change_radio(1,2,'block',0);return false;" href="#"><img style="display:block;" id="block_1_2" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td onclick="change_radio(1,2,'block');" style="cursor:default;" align="left"><div id="txtb2_1"> блок груди</div>
|
||||
<div id="txtb2_2"> блок груди и живота</div>
|
||||
<div id="txtb2_3"> блок груди, живота и пояса</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div id="zatack1_3" class="crop"><a onclick="change_radio(1,3,'atack',0);return false;" href="#"><img style="display:block;" id="atack_1_3" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td><div id="zatack2_3" class="crop"><a onclick="change_radio(2,3,'atack',0);return false;" href="#"><img style="display:block;" id="atack_2_3" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td><div id="zatack3_3" class="crop"><a onclick="change_radio(3,3,'atack',0);return false;" href="#"><img style="display:block;" id="atack_3_3" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td><div id="zatack4_3" class="crop"><a onclick="change_radio(4,3,'atack',0);return false;" href="#"><img id="atack_4_3" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td><div id="zatack5_3" class="crop"><a onclick="change_radio(5,3,'atack',0);return false;" href="#"><img style="display:block;" id="atack_5_3" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td onclick="select_atack(3,1);" style="cursor:default;" align="left">удар в живот</td>
|
||||
<td onclick="select_atack(3,1);" style="cursor:default;"> </td>
|
||||
<td><div id="zblock1_3" class="crop"><a onclick="change_radio(1,3,'block',0);return false;" href="#"><img style="display:block;" id="block_1_3" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td onclick="change_radio(1,3,'block');" style="cursor:default;" align="left"><div id="txtb3_1"> блок живота</div>
|
||||
<div id="txtb3_2"> блок живота и пояса</div>
|
||||
<div id="txtb3_3"> блок живота, пояса и ног</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div id="zatack1_4" class="crop"><a onclick="change_radio(1,4,'atack',0);return false;" href="#"><img style="display:block;" id="atack_1_4" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td><div id="zatack2_4" class="crop"><a onclick="change_radio(2,4,'atack',0);return false;" href="#"><img style="display:block;" id="atack_2_4" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td><div id="zatack3_4" class="crop"><a onclick="change_radio(3,4,'atack',0);return false;" href="#"><img style="display:block;" id="atack_3_4" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td><div id="zatack4_4" class="crop"><a onclick="change_radio(4,4,'atack',0);return false;" href="#"><img style="display:block;" id="atack_4_4" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td><div id="zatack5_4" class="crop"><a onclick="change_radio(5,4,'atack',0);return false;" href="#"><img style="display:block;" id="atack_5_4" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td onclick="select_atack(4,1);" style="cursor:default;" align="left">удар в пояс(пах)</td>
|
||||
<td onclick="select_atack(4,1);" style="cursor:default;"> </td>
|
||||
<td><div id="zblock1_4" class="crop"><a onclick="change_radio(1,4,'block',0);return false;" href="#"><img style="display:block;" id="block_1_4" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td onclick="change_radio(1,4,'block');" style="cursor:default;" align="left"><div id="txtb4_1"> блок пояса</div>
|
||||
<div id="txtb4_2"> блок пояса и ног</div>
|
||||
<div id="txtb4_3"> блок пояса, ног и головы</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div id="zatack1_5" class="crop"><a onclick="change_radio(1,5,'atack',0);return false;" href="#"><img style="display:block;" id="atack_1_5" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td><div id="zatack2_5" class="crop"><a onclick="change_radio(2,5,'atack',0);return false;" href="#"><img style="display:block;" id="atack_2_5" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td><div id="zatack3_5" class="crop"><a onclick="change_radio(3,5,'atack',0);return false;" href="#"><img style="display:block;" id="atack_3_5" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td><div id="zatack4_5" class="crop"><a onclick="change_radio(4,5,'atack',0);return false;" href="#"><img style="display:block;" id="atack_4_5" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td><div id="zatack5_5" class="crop"><a onclick="change_radio(5,5,'atack',0);return false;" href="#"><img style="display:block;" id="atack_5_5" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td onclick="select_atack(5,1);" style="cursor:default;" align="left">удар по ногам</td>
|
||||
<td onclick="select_atack(5,1);" style="cursor:default;"> </td>
|
||||
<td><div id="zblock1_5" class="crop"><a onclick="change_radio(1,5,'block',0);return false;" href="#"><img style="display:block;" id="block_1_5" class="radio_off" src="https://img.new-combats.com/i/misc/radio.gif" width="36" height="18" /></a></div></td>
|
||||
<td onclick="change_radio(1,5,'block');" style="cursor:default;" align="left"><div id="txtb5_1"> блок ног</div>
|
||||
<div id="txtb5_2"> блок ног и головы</div>
|
||||
<div id="txtb5_3"> блок ног, головы и груди</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="ref_menu_down" align="center">
|
||||
<table width="100%" border="0" style="background-color:#f2f0f0;" align="center" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="5"> </td>
|
||||
<td width="20" title="Случайный удар" onclick="top.cb_radio_click($('#cr_rach_rc3'),3);"><script>top.slcbrc[3] = 1; if( top.slcbrc[3] == 0 ) { document.write(top.create_check('rc3','','off')); }else{ document.write(top.create_check('rc3','','on')); }</script></td>
|
||||
<td width="20" title="Не сбрасывать выбор зон атаки\блока" onclick="top.cb_radio_click($('#cr_rach_rc4'),4);"><script>if( top.slcbrc[4] == 0 ) { document.write(top.create_check('rc4','','off')); }else{ document.write(top.create_check('rc4','','on')); }</script></td>
|
||||
<td width="20"> </td>
|
||||
<td align="center">
|
||||
<input name="fast_battle" id="fast_battle" type="hidden"/>
|
||||
<input name="auto_battle" id="auto_battle" type="hidden" />
|
||||
<button name="go_btn" type="button" id="go_btn" style="cursor:pointer;" class="btn" title="Вперёд!!!" onclick="atack();">Вперёд!!!</button>
|
||||
<button name="reflesh_btn" onClick="reflesh(true);" type="button" id="reflesh_btn" style="cursor:pointer;display:none;" class="btn" title="Обновить" >Обновить</button>
|
||||
<button name="back_menu_down" onClick="top.frames['main'].location='main.php?finish=<? echo microtime(); ?>';" type="button" id="back_menu_down" style="cursor:pointer;display:none;" class="btn" title="Вернуться" >Вернуться</button>
|
||||
<input name="save_zones" id="save_zones" type="hidden" />
|
||||
</td>
|
||||
<td width="20"><img <? if( $u->info['lider'] != $u->info['battle'] ) { ?>style="display:none;cursor:pointer;"<? }else{ ?>style="cursor:pointer;"<? } ?> onclick="top.leaderFight();" id="btn_down_img3" style="cursor:pointer;" title="Передать флаг" src="https://img.new-combats.com/i/ico_change_leader1.gif" width="16" height="19" /></td>
|
||||
<td width="20"><img <? if( $u->info['lider'] != $u->info['battle'] ) { ?>style="display:none;cursor:pointer;"<? }else{ ?>style="cursor:pointer;"<? } ?> onclick="top.leaderFight2();" id="btn_down_img4" style="cursor:pointer;" title="Убить" src="https://img.new-combats.com/i/ico_kill_member1.gif" width="16" height="19" /></td>
|
||||
<td width="40"><div align="right"><img onclick="top.smena1();" id="btn_down_img2" style="cursor:pointer;" title="Смена противника (3)" src="https://img.new-combats.com/i/ico_change.gif" width="16" height="19" /> <img src="https://img.new-combats.com/i/ico_refresh.gif" name="btn_down_img1" width="16" height="19" id="btn_down_img1" style="cursor:pointer;" title="Обновить" onclick="battleClass.reflesh(2);" /></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="1"></td>
|
||||
<td height="1"></td>
|
||||
<td height="1"></td>
|
||||
<td height="1"></td>
|
||||
<td height="1"><img style="display:block" src="https://<?=$c['img'];?>/1x1.gif" width="200" height="1" /></td>
|
||||
<td height="1"></td>
|
||||
<td height="1"></td>
|
||||
<td height="1"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<? if($u->info['level'] == 0) { ?><hr />
|
||||
<center><font color="#333333"><small>Просто нажмите <b>Вперёд!!!</b> чтобы сделать рандомный удар</small></font></center><hr />
|
||||
<? } ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="mainpanel2" style="height:118px; display:none;" align="center"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div style="padding-top:20px;padding-bottom:10px;" align="center">
|
||||
<table <? if($u->info['level'] < 2) { echo ' style="display:none;" '; } ?> border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><span title="Нанесенный удар" style="margin-right:11px; font-size:9px;"><img onclick="startHintPriemsBattle()" width="8" height="8" src="https://img.new-combats.com/i/micro/hit.gif" /> <font id="tac1"><? echo 0+$u->info['tactic1']; ?></font></span></td>
|
||||
<td><span title="Критический удар" style="margin-right:11px; font-size:9px;"><img width="8" height="8" src="https://img.new-combats.com/i/micro/krit.gif" /> <font id="tac2"><? echo 0+$u->info['tactic2']; ?></font></span></td>
|
||||
<td><span title="Проведенный контрудар" style="margin-right:11px; font-size:9px;"><img width="8" height="8" src="https://img.new-combats.com/i/micro/counter.gif" /> <font id="tac3"><? echo 0+$u->info['tactic3']; ?></font></span></td>
|
||||
<td><span title="Успешный блок" style="margin-right:11px; font-size:9px;"><img width="8" height="8" src="https://img.new-combats.com/i/micro/block.gif" /> <font id="tac4"><? echo 0+$u->info['tactic4']; ?></font></span></td>
|
||||
<td><span title="Успешное парирование" style="margin-right:11px; font-size:9px;"><img width="8" height="8" src="https://img.new-combats.com/i/micro/parry.gif" /> <font id="tac5"><? echo 0+$u->info['tactic5']; ?></font></span></td>
|
||||
<td><span title="Нанесенный урон" style="margin-right:11px; font-size:9px;"><img width="8" height="8" src="https://img.new-combats.com/i/micro/hp.gif" /> <font id="tac6"><? echo 0+floor($u->info['tactic6']); ?></font></span></td>
|
||||
<td><span id="tac7t" title="Уровень духа" style="margin-right:11px; font-size:9px;"><img width="7" height="8" src="https://img.new-combats.com/i/micro/spirit.gif" /> <font id="tac7"><? if($u->info['tactic7']<0){ $u->info['tactic7'] = 0; } echo 0+$u->info['tactic7']; ?></font></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" align="center" cellpadding="0" cellspacing="1">
|
||||
<tr align="center">
|
||||
<td><div id="priems" style="width:440px;"></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div style="display:none;" id="pers_priem" align="center"></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr style="border-color:#333;" />
|
||||
</div></td>
|
||||
<td valign="top" width="260" align="right"><div id="player2">
|
||||
<div align="left"></div>
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="allTeams0" align="center"><font id="teams"></font></div>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="260" valign="top"> </td>
|
||||
<td valign="top">
|
||||
<hr />
|
||||
<div align="center">
|
||||
<font color="green"><b>На данный момент вами нанесено урона: </b></font><b class="private"> <span id="nabito"><? echo floor($u->info['battle_yron']); ?></span> HP </b><b style="color:blue">.</b><br />
|
||||
<span style="display:none">
|
||||
<small>(Опыт: +<b><span id="expmaybe"><? echo floor($u->info['battle_exp']); ?></span> ед.</b>, Без учета процентов)</small>
|
||||
</span>
|
||||
</div>
|
||||
<hr /></td>
|
||||
<td width="260" valign="top"><div align="right"><a href="https://new-combats.com/logs.php?log=<? echo $u->info['battle']; ?>" target="blank_">Лог боя »»</a><br />
|
||||
(Бой идет с таймаутом <strong id="timer_out">NaN</strong> мин.)</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="st1222" id="volna"></div>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="260"> </td>
|
||||
<td><div style="font-size:12px;" id="battle_logg" align="left"></div><div align="left">Полную версию лога боя смотрите <a href="https://new-combats.com/logs.php?log=<? echo $u->info['battle']; ?>" target="blank_">здесь »»</a></div><br /></td>
|
||||
<td width="260"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<script>
|
||||
genZoneAtack();
|
||||
genZoneBlock();
|
||||
refleshPoints();
|
||||
battleClass.start();
|
||||
</script>
|
||||
</div>
|
||||
<?
|
||||
|
||||
}
|
||||
|
||||
?>
|
@ -1,537 +0,0 @@
|
||||
<?
|
||||
if(!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<style>
|
||||
body {
|
||||
background-color:#e9e9e9;
|
||||
}
|
||||
.b_nml {
|
||||
min-width: 175px;
|
||||
background-color: #f3f0f1;
|
||||
text-align: center;
|
||||
font-weight: bolder;
|
||||
padding:2px;
|
||||
}
|
||||
.b_tbl {
|
||||
border:1px solid #f3f0f1;
|
||||
}
|
||||
.fl {
|
||||
float:left;
|
||||
}
|
||||
.fr {
|
||||
float:right;
|
||||
}
|
||||
.uerror {
|
||||
color:#E20000;
|
||||
font-weight: bolder;
|
||||
}
|
||||
.upersi {
|
||||
border-right:1px solid #666666;
|
||||
border-bottom:1px solid #666666;
|
||||
border-top:1px solid #ffffff;
|
||||
border-left:1px solid #ffffff;
|
||||
padding:2px;
|
||||
}
|
||||
.CSSteam0{font-weight:bold;cursor:pointer;}
|
||||
.CSSteam1{font-weight:bold;color:#6666CC;cursor:pointer;}
|
||||
.CSSteam2{font-weight:bold;color:#B06A00;cursor:pointer;}
|
||||
.CSSteam3{font-weight:bold;color:#269088;cursor:pointer;}
|
||||
.CSSteam4{font-weight:bold;color:#A0AF20;cursor:pointer;}
|
||||
.CSSteam5{font-weight:bold;color:#0F79D3;cursor:pointer;}
|
||||
.CSSteam6{font-weight:bold;color:#D85E23;cursor:pointer;}
|
||||
.CSSteam7{font-weight:bold;color:#5C832F;cursor:pointer;}
|
||||
.CSSteam8{font-weight:bold;color:#842B61;cursor:pointer;}
|
||||
.CSSteam9{font-weight:bold;color:navy;cursor:pointer;}
|
||||
.CSSvs{font-weight:bold;}
|
||||
</style>
|
||||
<script type="text/javascript" src="https://new-combats.com/js/jquery.js"></script>
|
||||
<script>
|
||||
var fight = {
|
||||
base:{
|
||||
users:[],
|
||||
priems:[ ],
|
||||
teams:[ ]
|
||||
},
|
||||
data:{
|
||||
me:{
|
||||
id:<?=$u->info['id']?>,
|
||||
login:"<?=$u->info['login']?>",
|
||||
enemy:<?=$u->info['enemy']?>,
|
||||
priems:[<?=str_replace('|',',',$u->info['priems'])?>],
|
||||
priemz:[<?=str_replace('|',',',$u->info['priems_z'])?>]
|
||||
},
|
||||
timeout:1
|
||||
},
|
||||
genmain:function() {
|
||||
//Генирация персонажа
|
||||
$('#u1').html( '<div id="uinf_' + this.data.me.id + '"></div>' );
|
||||
this.returnUserInfo(this.data.me.id,false);
|
||||
$('#u2').html( '<div id="uinf_' + this.data.me.enemy + '"></div>' );
|
||||
this.returnUserInfo(this.data.me.enemy,false);
|
||||
//Генирация команды
|
||||
this.returnTeamInfo( false );
|
||||
},
|
||||
returnUserKey:function(id) {
|
||||
var r = -1;
|
||||
for (var i = 0; i < this.base.users.length; i++) {
|
||||
if( this.base.users[i].info != undefined && this.base.users[i].info.id == id ) {
|
||||
r = i;
|
||||
}
|
||||
}
|
||||
return r;
|
||||
},
|
||||
updateUser:function(id, html) {
|
||||
$.ajax({
|
||||
url:'/fight/take.user.php',
|
||||
data:{
|
||||
'uid':id
|
||||
},
|
||||
success:function( data ) {
|
||||
data = $.parseJSON(data);
|
||||
if( data.id > 0 ) {
|
||||
var nid = fight.base.users.length;
|
||||
fight.base.users[nid] = {
|
||||
info:data
|
||||
};
|
||||
if( html == true ) {
|
||||
fight.returnUserInfo( data.id , true );
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
updateTeam:function( html ) {
|
||||
$.ajax({
|
||||
url:'/fight/take.team.php',
|
||||
data:{ },
|
||||
success:function( data ) {
|
||||
data = $.parseJSON(data);
|
||||
fight.base.teams = data;
|
||||
if( html == true ) {
|
||||
fight.returnTeamInfo( true );
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
returnTeamInfo:function( double ) {
|
||||
if( this.base.teams.length > 0 ) {
|
||||
var r = '', t1 = {}, t2 = [];
|
||||
for (var i = 0; i < this.base.teams.length; i++) {
|
||||
if( this.base.teams[i] != undefined ) {
|
||||
var rud = '' + this.returnTeamUser( this.base.teams[i] ) + '';
|
||||
if( t1[this.base.teams[i].team] == undefined ) {
|
||||
t1[ this.base.teams[i].team ] = '';
|
||||
t2[ t2.length ] = this.base.teams[i].team;
|
||||
}else{
|
||||
t1[ this.base.teams[i].team ] += ', ';
|
||||
}
|
||||
t1[ this.base.teams[i].team ] += rud;
|
||||
}
|
||||
}
|
||||
var i = 0;
|
||||
while( i < t2.length ) {
|
||||
if( t2[i] != undefined && t1[ t2[i] ] != undefined ) {
|
||||
if( i != 0 ) {
|
||||
r += ' <span class="CSSvs">против</span> ';
|
||||
}
|
||||
r += t1[ t2[i] ];
|
||||
}
|
||||
i++;
|
||||
}
|
||||
$('#u_teams').html( r );
|
||||
}else{
|
||||
if( double == false ) {
|
||||
this.updateTeam( true );
|
||||
}
|
||||
}
|
||||
},
|
||||
returnTeamUser:function( user ) {
|
||||
var r = '';
|
||||
if( user.id != undefined ) {
|
||||
user.hpNow = Math.floor(user.hpNow);
|
||||
if( user.hpNow < 0 ) {
|
||||
user.hpNow = 0;
|
||||
}else if( user.hpAll < user.hpNow ) {
|
||||
user.hpNow = user.hpAll;
|
||||
}
|
||||
r += '<span class="CSSteam' + user.team + '">' + user.login + '</span><small> [' + user.hpNow + '/' + user.hpAll + ']</small>';
|
||||
}else{
|
||||
r = '<i>Персонаж ?</i>';
|
||||
}
|
||||
return r;
|
||||
},
|
||||
returnUserInfo:function(id , double) {
|
||||
var uid = this.returnUserKey(id);
|
||||
if( uid >= 0 ) {
|
||||
$('#uinf_' + this.base.users[uid].info.id).html('<div>' + this.userPers( uid ) + '</div>');
|
||||
if( this.data.me.id == this.base.users[uid].info.id ) {
|
||||
$('#u_log1').html( this.userInf( uid ) );
|
||||
}else if( this.data.me.enemy == this.base.users[uid].info.id ) {
|
||||
$('#u_log2').html( this.userInf( uid ) );
|
||||
}
|
||||
}else{
|
||||
if( double == false ) {
|
||||
this.updateUser(id,true);
|
||||
}else{
|
||||
$('#uinf_' + id).html('Error: User #' + id + ' is not found');
|
||||
}
|
||||
}
|
||||
},
|
||||
userPers:function( uid ) {
|
||||
var r = '';
|
||||
if( this.base.users[uid] != undefined ) {
|
||||
var itms = {
|
||||
1 : '<img src="https://img.new-combats.com/i/items/w/w9.gif" width="60" height="60">',
|
||||
2 : '<img src="https://img.new-combats.com/i/items/w/w13.gif" width="60" height="40">',
|
||||
3 : '<img src="https://img.new-combats.com/i/items/w/w3.gif" width="60" height="60">',
|
||||
4 : '<img src="https://img.new-combats.com/i/items/w/w4.gif" width="60" height="80">',
|
||||
5 : '<img src="https://img.new-combats.com/i/items/w/w5.gif" width="60" height="40">',
|
||||
6 : '<img src="https://img.new-combats.com/i/items/w/w1.gif" width="60" height="20">',
|
||||
7 : '<img src="https://img.new-combats.com/i/items/w/w2.gif" width="60" height="20">',
|
||||
8 : '<img src="https://img.new-combats.com/i/items/w/w6.gif" width="20" height="20">',
|
||||
9 : '<img src="https://img.new-combats.com/i/items/w/w6.gif" width="20" height="20">',
|
||||
10: '<img src="https://img.new-combats.com/i/items/w/w6.gif" width="20" height="20">',
|
||||
11: '<img src="https://img.new-combats.com/i/items/w/w11.gif" width="60" height="40">',
|
||||
12: '<img src="https://img.new-combats.com/i/items/w/w10.gif" width="60" height="60">',
|
||||
13: '<img src="https://img.new-combats.com/i/items/w/w19.gif" width="60" height="80">',
|
||||
14: '<img src="https://img.new-combats.com/i/items/w/w12.gif" width="60" height="40">',
|
||||
//
|
||||
15: '<img src="https://img.new-combats.com/i/items/w/w15.gif" width="40" height="20">',
|
||||
16: '<img src="https://img.new-combats.com/i/items/w/w15.gif" width="40" height="20">',
|
||||
17: '<img src="https://img.new-combats.com/i/items/w/w15.gif" width="40" height="20">',
|
||||
18: '<img src="https://img.new-combats.com/i/items/w/w20.gif" width="40" height="20">',
|
||||
19: '<img src="https://img.new-combats.com/i/items/w/w20.gif" width="40" height="20">',
|
||||
20: '<img src="https://img.new-combats.com/i/items/w/w20.gif" width="40" height="20">'
|
||||
};
|
||||
|
||||
r += '<table class="upersi" width="240" height="280" border="0" cellspacing="0" cellpadding="0">'+
|
||||
'<tr>'+
|
||||
'<td width="60" align="center" valign="top"><table width="60" border="0" cellspacing="0" cellpadding="0">'+
|
||||
'<tr>'+
|
||||
'<td height="60">' + itms[1] + '</td>'+
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
'<td height="40">' + itms[2] + '</td>'+
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
'<td height="60">' + itms[3] + '</td>'+
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
'<td height="80">' + itms[4] + '</td>'+
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
'<td height="40">' + itms[5] + '</td>'+
|
||||
'</tr>'+
|
||||
'</table></td>'+
|
||||
'<td width="120"><table width="120" border="0" cellspacing="0" cellpadding="0">'+
|
||||
'<tr>'+
|
||||
'<td height="20" style="background-color:#d7d7d7" valign="middle"></td>'+
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
'<td style="background-image:url(\'https://img.new-combats.com/i/obraz/' + this.base.users[uid].info['sex'] + '/' + this.base.users[uid].info['obraz'] + '\')" height="220" align="left" valign="top"> </td>'+
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
'<td height="40"><table width="120" border="0" cellpadding="0" cellspacing="0">'+
|
||||
'<tr>'+
|
||||
'<td height="20">' + itms[15] + '</td>'+
|
||||
'<td>' + itms[16] + '</td>'+
|
||||
'<td>' + itms[17] + '</td>'+
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
'<td height="20">' + itms[18] + '</td>'+
|
||||
'<td>' + itms[19] + '</td>'+
|
||||
'<td>' + itms[20] + '</td>'+
|
||||
'</tr>'+
|
||||
'</table></td>'+
|
||||
'</tr>'+
|
||||
'</table></td>'+
|
||||
'<td width="60" align="center" valign="top"><table width="60" border="0" cellspacing="0" cellpadding="0">'+
|
||||
'<tr>'+
|
||||
'<td height="20">' + itms[6] + '</td>'+
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
'<td height="20">' + itms[7] + '</td>'+
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
'<td height="20"><table width="60" height="20" border="0" cellspacing="0" cellpadding="0">'+
|
||||
'<tr>'+
|
||||
'<td width="20">' + itms[8] + '</td>'+
|
||||
'<td>' + itms[9] + '</td>'+
|
||||
'<td width="20">' + itms[10] + '</td>'+
|
||||
'</tr>'+
|
||||
'</table></td>'+
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
'<td height="40">' + itms[11] + '</td>'+
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
'<td height="60">' + itms[12] + '</td>'+
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
'<td height="80">' + itms[13] + '</td>'+
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
'<td height="40">' + itms[14] + '</td>'+
|
||||
'</tr>'+
|
||||
'</table></td>'+
|
||||
'</tr>'+
|
||||
'</table>';
|
||||
}
|
||||
return r;
|
||||
},
|
||||
userInf:function( uid ) {
|
||||
var r = '';
|
||||
if( this.base.users[uid] != undefined ) {
|
||||
if( this.base.users[uid].info['align'] > 0 ) {
|
||||
r += '<img src="https://img.new-combats.com/i/align/align' + this.base.users[uid].info['align'] + '.gif" width="12" height="15">';
|
||||
}
|
||||
if( this.base.users[uid].info['clan'] > 0 ) {
|
||||
r += '<img src="https://img.new-combats.com/i/clan/' + this.base.users[uid].info['clan'] + '.gif" width="24" height="15">';
|
||||
}
|
||||
r += '<a href="javascript:void(0)" onclick="alert(\'Menu is disabled\');">' + this.base.users[uid].info['login'] + '</a>[' + this.base.users[uid].info['level'] + ']';
|
||||
r += '<a href="https://new-combats.com/info/' + this.base.users[uid].info['id'] + '" target="_blank"><img src="https://img.new-combats.com/i/inf_capitalcity.gif" width="12" height="11"></a>';
|
||||
}
|
||||
return r;
|
||||
},
|
||||
f5:function() {
|
||||
location.href = location.href;
|
||||
},
|
||||
start:function() {
|
||||
this.genmain();
|
||||
$('#ua_2').css('display','none');
|
||||
$('#ua_3').css('display','none');
|
||||
$('#ua_4').css('display','none');
|
||||
$('#ua_5').css('display','none');
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="250" height="300" align="left" valign="top"><div id="u1"></div></td>
|
||||
<td align="center" valign="top">
|
||||
<!-- -->
|
||||
<div id="u_logins">
|
||||
<div id="u_log1" class="fl"></div>
|
||||
<div id="u_log2" class="fr"></div>
|
||||
</div>
|
||||
<!-- -->
|
||||
<div style="padding-top:10px"> </div>
|
||||
<!-- -->
|
||||
<div id="u_error" class="uerror"><?=date('d.m.Y H:i:s')?> Произошла ошибка подключения к серверу</div>
|
||||
<!-- -->
|
||||
<div id="u_magics"> </div>
|
||||
<!-- -->
|
||||
<div id="u_main">
|
||||
<table class="b_tbl" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<!-- -->
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td><div class="b_nml">Атака</div></td>
|
||||
<td width="10"> </td>
|
||||
<td><div class="b_nml">Защита</div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<!-- -->
|
||||
<table id="ua_1" class="fl" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td><input type="radio" name="ua1" id="ua11" value="1" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ua1" id="ua12" value="2" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ua1" id="ua13" value="3" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ua1" id="ua14" value="4" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ua1" id="ua15" value="5" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- -->
|
||||
<table id="ua_2" class="fl" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td><input type="radio" name="ua2" id="ua11" value="1" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ua2" id="ua22" value="2" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ua2" id="ua23" value="3" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ua2" id="ua24" value="4" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ua2" id="ua25" value="5" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- -->
|
||||
<table id="ua_3" class="fl" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td><input type="radio" name="ua3" id="ua31" value="1" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ua3" id="ua32" value="2" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ua3" id="ua33" value="3" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ua3" id="ua34" value="4" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ua3" id="ua35" value="5" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- -->
|
||||
<table id="ua_4" class="fl" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td><input type="radio" name="ua4" id="ua41" value="1" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ua4" id="ua42" value="2" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ua4" id="ua43" value="3" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ua4" id="ua44" value="4" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ua4" id="ua45" value="5" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- -->
|
||||
<table id="ua_5" class="fl" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td><input type="radio" name="ua5" id="ua51" value="1" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ua5" id="ua52" value="2" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ua5" id="ua53" value="3" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ua5" id="ua54" value="4" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ua5" id="ua55" value="5" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- -->
|
||||
<table class="fl" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td><label for="ua11">удар в голову</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="ua12">удар в грудь</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="ua13">удар в живот</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="ua14">удар в пояс(пах)</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="ua15">удар по ногам</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- -->
|
||||
</td>
|
||||
<td> </td>
|
||||
<td align="center">
|
||||
<!-- -->
|
||||
<table class="fr" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td><label for="ub11">блок головы и груди</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="ub12">блок груди и живота</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="ub13">блок живота и пояса</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="ub14">блок пояса и ног</label></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="ub15">блок ног и головы</label></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- -->
|
||||
<table class="fl" border="0" cellspacing="0" cellpadding="2">
|
||||
<tr>
|
||||
<td><input type="radio" name="ub1" id="ub11" value="1" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ub1" id="ub12" value="2" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ub1" id="ub13" value="3" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ub1" id="ub14" value="4" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type="radio" name="ub1" id="ub15" value="5" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="b_nml">
|
||||
<!-- -->
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="20"> </td>
|
||||
<td width="20"> </td>
|
||||
<td align="center" valign="middle">
|
||||
<input type="button" value="Вперёд!!!" />
|
||||
</td>
|
||||
<td width="20"> </td>
|
||||
<td width="20"><img onclick="fight.f5()" title="Обновить" src="https://img.new-combats.com/i/ico_refresh.gif" width="16" height="19" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<!-- -->
|
||||
</td>
|
||||
<td width="250" align="right" valign="top"><div id="u2"></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<div id="u_teams"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="float:left">На данный момент вами нанесено урона: <b><span id="u_atackhp">0</span> HP</b>.</div>
|
||||
<div style="float:right">(Бой идет с таймаутом <b id="u_timeout">1</b> мин.)</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<script>fight.start();</script>
|
@ -1,112 +0,0 @@
|
||||
<?
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
}
|
||||
$tattack = '';
|
||||
|
||||
if($u->room['file']=='cp')
|
||||
{
|
||||
if(date("H")>=6 && date("H")<22) {
|
||||
$now = 'day';
|
||||
} else { $now = 'night'; }
|
||||
if($u->info['level'] >= 4)
|
||||
{
|
||||
if(date("H")>=6 && date("H")<22)
|
||||
{
|
||||
$tattack = '<span onMouseMove="this.runtimeStyle.color = \'white\';" onMouseOut="this.runtimeStyle.color = this.parentElement.style.color;" onclick="">Нападение доступно с 22 до 6 ч.</span>';
|
||||
} else {
|
||||
if(isset($_POST['attack']))
|
||||
{
|
||||
$magic->magicCentralAttack();
|
||||
}
|
||||
$tattack = '<span onMouseMove="this.runtimeStyle.color = \'white\';" onMouseOut="this.runtimeStyle.color = this.parentElement.style.color;" onclick="findlogin(\'Напасть\',\'attack\',\'\',\'\');">Напасть</span>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="250" valign="top">
|
||||
<? $usee = $u->getInfoPers($u->info['id'],0); if($usee!=false){ echo $usee[0]; }else{ echo 'information is lost.'; } ?>
|
||||
</td>
|
||||
<td width="230" valign="top" style="padding-top:19px;"><? require_once('modules_data/stats_loc.php'); ?></td>
|
||||
<td valign="top"><div align="right">
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr align="right" valign="top">
|
||||
<td>
|
||||
<? if($re!=''){ echo '<font color="red"><b>'.$re.'</b></font>'; } ?>
|
||||
<table width="500" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<div style="position:relative; cursor: pointer;" id="ione">
|
||||
<img src="https://img.new-combats.com/i/images/300x225/capital/<? echo $now; ?>/city_capres1.jpg" alt="" name="img_ione" width="500" height="268" border="1" id="img_ione"/>
|
||||
<div id="buttons_on_image" style="cursor:pointer; font-weight:bold; color:#D8D8D8; font-size:10px;">
|
||||
<? echo $tattack; ?>
|
||||
|
||||
<span onMouseMove="this.runtimeStyle.color = 'white';" onMouseOut="this.runtimeStyle.color = 'white';" onclick="window.open('https://new-combats.com/forum', 'forum', 'location=yes,menubar=yes,status=yes,resizable=yes,toolbar=yes,scrollbars=yes,scrollbars=yes')">Форум</span>
|
||||
</div>
|
||||
<script language="javascript" type="text/javascript">
|
||||
<!--
|
||||
if(document.getElementById('ione'))
|
||||
{
|
||||
document.getElementById('ione').appendChild(document.getElementById('buttons_on_image'));
|
||||
document.getElementById('buttons_on_image').style.position = 'absolute';
|
||||
document.getElementById('buttons_on_image').style.bottom = '8px';
|
||||
document.getElementById('buttons_on_image').style.right = '23px';
|
||||
}else{
|
||||
document.getElementById('buttons_on_image').style.display = 'none';
|
||||
}
|
||||
-->
|
||||
</script>
|
||||
<div style="position:absolute; left:142px; top:17px; width:236px; height:157px; z-index:90;"><img <? thisInfRm('1.180.0.3'); ?> onClick="location='main.php?loc=1.180.0.3';" src="https://img.new-combats.com/i/images/300x225/capital/2klub.gif" width="236" height="157" class="aFilter" /></div>
|
||||
|
||||
<div style="position:absolute; left:195px; top:143px; width:73px; height:47px; z-index:100;"><img <? thisInfRm('1.180.0.10'); ?> src="https://img.new-combats.com/i/images/300x225/capital/2shop.gif" width="73" height="47" class="aFilter" /></div>
|
||||
|
||||
<div style="position:absolute; left:80px; top:197px; width:42px; height:35px; z-index:100;"><img <? thisInfRm('1.180.0.293'); ?> src="https://img.new-combats.com/i/images/300x225/demons/dm_dungeon.gif" width="42" height="35" class="aFilter" /></div>
|
||||
|
||||
<div style="position:absolute; left:50px; top:143px; width:48px; height:36px; z-index:91;"><img <? thisInfRm('1.180.0.272'); ?> src="https://img.new-combats.com/i/images/300x225/capital/2comission.gif" width="48" height="36" class="aFilter" /></div>
|
||||
|
||||
<div style="position:absolute; left:244px; top:170px; width:71px; height:45px; z-index:91;"><img <? thisInfRm('1.180.0.210'); ?> src="https://img.new-combats.com/i/images/300x225/capital/2remont.gif" width="71" height="45" class="aFilter" /></div>
|
||||
|
||||
<div style="position:absolute; left:303px; top:150px; width:79px; height:88px; z-index:93;"><img <? thisInfRm('1.180.0.x'); ?> src="https://img.new-combats.com/i/images/300x225/capital/2cerkov.gif" width="79" height="88" /></div>
|
||||
|
||||
<div style="position:absolute; left:330px; top:130px; width:111px; height:72px; z-index:92;"><img <? thisInfRm('1.180.0.226'); ?> src="https://img.new-combats.com/i/images/300x225/capital/2pochta.gif" width="111" height="72" class="aFilter" /></div>
|
||||
|
||||
<div style="position:absolute; left:73px; top:135px; width:92px; height:62px; z-index:92;"><img <? thisInfRm('1.180.0.14'); ?> onclick="alert('Не работает. Находится на реконструкции.')" onMouseOver="this.className='aFilterhover';" onMouseOut="this.className='aFilter';" src="https://img.new-combats.com/i/images/300x225/capital/2vokzal.gif" width="92" height="62" class="aFilter" /></div>
|
||||
|
||||
<div style="position:absolute; left:140px; top:119px; width:75px; height:90px; z-index:101;"><img src="https://img.new-combats.com/i/elka.gif" width="75" height="90" <? thisInfRm('1.180.0.208'); ?> onClick="location='main.php?loc=1.180.0.208';" class="aFilter" /></div>
|
||||
|
||||
<div style="position:absolute; left:446px; top:153px; width:30px; height:54px; z-index:94;"><img <? thisInfRm('1.180.0.11'); ?> src="https://img.new-combats.com/i/images/300x225/capital/2strelka.gif" width="30" height="54" title="Страшилкина улица" class="aFilter" /></div>
|
||||
|
||||
<div style="position:absolute; left:16px; top:155px; width:30px; height:54px; z-index:910;"><img src="https://img.new-combats.com/i/images/300x225/capital/3strelka.gif" width="30" height="53" title="Парк развлечений" /></div>
|
||||
<div id="snow"></div>
|
||||
<? echo $goline; ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div align="right" style="padding: 3px;"><small>«<? echo $c['title3']; ?>» приветствует Вас, <b><? echo $u->info['login']; ?></b>.<br />
|
||||
</small></div></td>
|
||||
<td><div style="visibility:hidden; height:0px " id="moveto"></div>
|
||||
<!-- <br /><span class="menutop"><nobr>Комната для новичков</nobr></span>-->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<small>
|
||||
<HR>
|
||||
<? $hgo = $u->testHome(); if(!isset($hgo['id'])){ ?><INPUT onclick="location.href='main.php?homeworld=<? echo $code; ?>';" class="btn" value="Возврат" type="button" name="combats2"><? } unset($hgo); ?>
|
||||
<INPUT id="forum" class="btn" onclick="window.open('https://new-combats.com/forum/', 'forum', 'location=yes,menubar=yes,status=yes,resizable=yes,toolbar=yes,scrollbars=yes,scrollbars=yes')" value="Форум" type="button" name="forum">
|
||||
<INPUT class="btn" onclick="window.open('/encicl/help/top1.html', 'help', 'height=300,width=500,location=no,menubar=no,status=no,toolbar=no,scrollbars=yes')" value="Подсказка" type="button">
|
||||
<INPUT class="btn" value="Объекты" type="button">
|
||||
<br />
|
||||
<strong>Внимание!Обязательно смените пароль на уникальный,который не использовался ранее в подобных проектах,это обезопасит вашего персонажа от взлома.<BR>
|
||||
<em>Администрация.</strong> </em></small> <BR>
|
||||
<? echo $rowonmax; ?><BR>
|
||||
|
||||
</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
<?
|
||||
}
|
||||
|
||||
?>
|
@ -4,382 +4,389 @@ if(!defined('GAME'))
|
||||
die();
|
||||
}
|
||||
|
||||
if($u->room['file']=='_shop_referal_')
|
||||
if($u->room['file'] != '_shop_referal_') {
|
||||
return;
|
||||
}
|
||||
$shopProcent = 0;
|
||||
|
||||
function sendSysChat(string $city, string $to, string $message) {
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($city);
|
||||
$cmsg->setTo($to);
|
||||
$cmsg->setText($message);
|
||||
$cmsg->setType(6);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
}
|
||||
|
||||
if(isset($_POST['itemgift']))
|
||||
{
|
||||
$shopProcent = 0;
|
||||
|
||||
if(isset($_POST['itemgift']))
|
||||
{
|
||||
$to = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['to_login']).'" ORDER BY `id` ASC LIMIT 1'));
|
||||
if(isset($to['id']))
|
||||
{
|
||||
if($u->info['align'] == 2 || $u->info['haos'] > time()) {
|
||||
$re = '<div align="left">Хаосникам запрещается делать подарки другим игрокам</div>';
|
||||
}elseif($to['id']==$u->info['id'])
|
||||
{
|
||||
$re = '<div align="left">Очень щедро дарить что-то самому себе ;)</div>';
|
||||
}elseif($u->info['level']<4)
|
||||
{
|
||||
$re = '<div align="left">Дарить подарки можно начиная с 4-го уровня</div>';
|
||||
}else{
|
||||
if( $_POST['itemgift'] > 1000000000000 ) {
|
||||
$itm_l = mysql_fetch_array(mysql_query('SELECT * FROM `users_gifts` WHERE `uid` = "'.$u->info['id'].'" AND `id` = "'.mysql_real_escape_string((int)$_POST['itemgift']-1000000000000).'" LIMIT 1'));
|
||||
if( isset($itm_l['id']) && $itm_l['money'] > $u->info['money'] ) {
|
||||
$re = '<div align="left">Недостаточно денег</div>';
|
||||
}elseif( isset($itm_l['id']) ) {
|
||||
$itm = $u->addItem(4533,1,'|gift_id='.$itm_l['id'].'');
|
||||
if( $itm > 0 ) {
|
||||
$itm = mysql_fetch_array(mysql_query('SELECT `im`.*,`iu`.* FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`) WHERE (`im`.`type` = "28" OR `im`.`type` = "38" OR `im`.`type` = "63" OR `im`.`type` = "64") AND `iu`.`id` = "'.mysql_real_escape_string($itm).'" AND `iu`.`uid` = "1" AND `iu`.`gift` = "" AND `iu`.`delete` = "0" AND `iu`.`inOdet` = "0" AND `iu`.`inShop` = "0" LIMIT 1'));
|
||||
if(isset($itm['id'])) {
|
||||
$u->info['money'] -= $itm_l['money'];
|
||||
mysql_query('UPDATE `users` SET `money` = "'.$u->info['money'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
|
||||
$itm['gtxt1'] = $_POST['podarok2'];
|
||||
$itm['gtxt2'] = $_POST['txt'];
|
||||
|
||||
$itm['gtxt1'] = str_replace('\x3C','<',$itm['gtxt1']);
|
||||
$itm['gtxt1'] = str_replace('\x3','>',$itm['gtxt1']);
|
||||
$itm['gtxt1'] = htmlspecialchars($itm['gtxt1'],NULL);
|
||||
$itm['gtxt2'] = str_replace('\x3C','<',$itm['gtxt2']);
|
||||
$itm['gtxt2'] = str_replace('\x3','>',$itm['gtxt2']);
|
||||
$itm['gtxt2'] = htmlspecialchars($itm['gtxt2'],NULL);
|
||||
|
||||
$upd = mysql_query('UPDATE `items_users` SET `data` = "'.$itm['data'].'",`gtxt1` = "'.mysql_real_escape_string($itm['gtxt1']).'",`gtxt2` = "'.mysql_real_escape_string($itm['gtxt2']).'", `uid` = "'.$to['id'].'", `gift` = "'.$u->info['login'].'",`time_create` = "'.time().'" WHERE `id` = "'.$itm['id'].'" LIMIT 1');
|
||||
$whos = mysql_fetch_array(mysql_query('SELECT `login` FROM `users` WHERE `id` = "'.$to['id'].'" LIMIT 1'));
|
||||
$ld = $u->addDelo(1, $to['id'],'"<font color=#C65F00>Shop.'.$u->info['city'].'</font>": Получен подарок от [id="'.$u->info['id'].'"/ Логин : "'.$u->info['login'].'"]. Предмет [id="'.$itm['id'].'"/ Название : "'.$itm['name'].'"]',time(),$u->info['city'],'Shop.gift',0,0);
|
||||
$ld = $u->addDelo(1, $u->info['id'],'"<font color=#C65F00>Shop.'.$u->info['city'].'</font>": Сделал подарок персонажу [id="'.$to['id'].'"/ Логин : "'.$whos['login'].'"]. Предмет [id="'.$itm['id'].'"/ Название : "'.$itm['name'].'"]',time(),$u->info['city'],'Shop.gift',0,0);
|
||||
if($upd)
|
||||
{
|
||||
$re = '<div align="left">Подарок был успешно отправлен к "'.$to['login'].'" за '.$itm_l['money'].' кр.</div>';
|
||||
$text = ' Получен подарок <b>'.$itm_l['name'].'</b>. От персонажа [login:'.$u->info['login'].'] .';
|
||||
mysql_query("INSERT INTO `chat` (`new`, `city`, `room`, `login`, `to`, `text`, `time`, `type`, `toChat`) VALUES ('1','".$u->info['city']."', '', '', '".$to['login']."', '".$text."', '".time()."', '6', '0')");
|
||||
}else{
|
||||
$re = '<div align="left">Не удалось сделать подарок</div>';
|
||||
}
|
||||
}else{
|
||||
$re = '<div align="left">Не удалось сделать подарок, он испортился...</div>';
|
||||
}
|
||||
}else{
|
||||
$re = '<div align="left">Не удалось сделать подарок, курьер случайно сломал его...</div>';
|
||||
}
|
||||
}else{
|
||||
$re = '<div align="left">Предмет не найден</div>';
|
||||
}
|
||||
}else{
|
||||
$itm = mysql_fetch_array(mysql_query('SELECT `im`.*,`iu`.* FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`) WHERE (`im`.`type` = "28" OR `im`.`type` = "38" OR `im`.`type` = "63" OR `im`.`type` = "64") AND `iu`.`id` = "'.mysql_real_escape_string($_POST['itemgift']).'" AND `iu`.`uid` = "'.$u->info['id'].'" AND `iu`.`gift` = "" AND `iu`.`delete` = "0" AND `iu`.`inOdet` = "0" AND `iu`.`inShop` = "0" LIMIT 1'));
|
||||
if(isset($itm['id']))
|
||||
{
|
||||
//$itm['data'] = '';
|
||||
|
||||
$itm['gtxt1'] = $_POST['podarok2'];
|
||||
$itm['gtxt2'] = $_POST['txt'];
|
||||
|
||||
$itm['gtxt1'] = str_replace('\x3C','<',$itm['gtxt1']);
|
||||
$itm['gtxt1'] = str_replace('\x3','>',$itm['gtxt1']);
|
||||
$itm['gtxt1'] = htmlspecialchars($itm['gtxt1'],NULL);
|
||||
$itm['gtxt2'] = str_replace('\x3C','<',$itm['gtxt2']);
|
||||
$itm['gtxt2'] = str_replace('\x3','>',$itm['gtxt2']);
|
||||
$itm['gtxt2'] = htmlspecialchars($itm['gtxt2'],NULL);
|
||||
|
||||
$upd = mysql_query('UPDATE `items_users` SET `data` = "'.$itm['data'].'",`gtxt1` = "'.mysql_real_escape_string($itm['gtxt1']).'",`gtxt2` = "'.mysql_real_escape_string($itm['gtxt2']).'", `uid` = "'.$to['id'].'", `gift` = "'.$u->info['login'].'",`time_create` = "'.time().'" WHERE `id` = "'.$itm['id'].'" LIMIT 1');
|
||||
$whos = mysql_fetch_array(mysql_query('SELECT `login` FROM `users` WHERE `id` = "'.$to['id'].'" LIMIT 1'));
|
||||
$ld = $u->addDelo(1, $to['id'],'"<font color=#C65F00>Shop.'.$u->info['city'].'</font>": Получен подарок от [id="'.$u->info['id'].'"/ Логин : "'.$u->info['login'].'"]. Предмет [id="'.$itm['id'].'"/ Название : "'.$itm['name'].'"]',time(),$u->info['city'],'Shop.gift',0,0);
|
||||
$ld = $u->addDelo(1, $u->info['id'],'"<font color=#C65F00>Shop.'.$u->info['city'].'</font>": Сделал подарок персонажу [id="'.$to['id'].'"/ Логин : "'.$whos['login'].'"]. Предмет [id="'.$itm['id'].'"/ Название : "'.$itm['name'].'"]',time(),$u->info['city'],'Shop.gift',0,0);
|
||||
if($upd)
|
||||
{
|
||||
$re = '<div align="left">Подарок был успешно отправлен к "'.$to['login'].'"</div>';
|
||||
$text = ' Получен подарок <b>'.$itm['name'].'</b>. От персонажа [login:'.$u->info['login'].'] .';
|
||||
mysql_query("INSERT INTO `chat` (`new`, `city`, `room`, `login`, `to`, `text`, `time`, `type`, `toChat`) VALUES ('1','".$u->info['city']."', '', '', '".$to['login']."', '".$text."', '".time()."', '6', '0')");
|
||||
}else{
|
||||
$re = '<div align="left">Не удалось сделать подарок</div>';
|
||||
}
|
||||
}else{
|
||||
$re = '<div align="left">Предмет не найден</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$re = '<div align="left">Персонаж с таким логином не найден</div>';
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($u->stats['shopSale'],$_GET['sale'])){
|
||||
$bns = 0+$u->stats['shopSale'];
|
||||
if($bns!=0){
|
||||
if($bns>0){
|
||||
$bns = '+'.$bns;
|
||||
}
|
||||
//$shopProcent = $u->shopSaleM( $shopProcent , $itm );
|
||||
$shopProcent -= $bns;
|
||||
if($shopProcent>99){ $shopProcent = 99; }
|
||||
if($shopProcent<1){ $shopProcent = 1; }
|
||||
echo '<div style="color:grey;"><b>У Вас действует бонус при продаже: '.$bns.'%</b><br><small>Вы сможете продавать предметы за 50% от их стоимости</small></div>';
|
||||
}
|
||||
}
|
||||
if(!isset($_GET['otdel'])) {
|
||||
$_GET['otdel'] = 1;
|
||||
}
|
||||
$sid = 27;
|
||||
$error = '';
|
||||
if(isset($_GET['buy'])){
|
||||
if($u->newAct($_GET['sd4'])==true){
|
||||
$re = $u->buyItem($sid,(int)$_GET['buy'],(int)$_GET['x']);
|
||||
}else{
|
||||
$re = 'Вы уверены что хотите купить этот предмет?';
|
||||
}
|
||||
}elseif(isset($_GET['sale']) && isset($_GET['item']) && $u->newAct($_GET['sd4'])){
|
||||
$id = (int)$_GET['item'];
|
||||
$itm = mysql_fetch_array(mysql_query('SELECT `im`.*,`iu`.*, count(`iuu`.id) as inGroupCount
|
||||
FROM `items_users` AS `iu`
|
||||
LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`)
|
||||
LEFT JOIN `items_users` as `iuu` ON (`iuu`.inGroup = `iu`.inGroup AND `iuu`.item_id = `im`.id )
|
||||
WHERE `iuu`.`uid`="'.$u->info['id'].'" AND `iu`.`uid`="'.$u->info['id'].'" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`id` = "'.mysql_real_escape_string($id).'" LIMIT 1'));
|
||||
$po = $u->lookStats($itm['data']);
|
||||
if($u->info['allLock'] > time()) {
|
||||
$po['nosale'] = 1;
|
||||
}
|
||||
if( ($itm['gift'] != '' && $itm['gift'] != '0') && ( $itm['type'] == 37 || $itm['type'] == 38 || $itm['type'] == 39 || $itm['type'] == 63 ) ) {
|
||||
$error = 'Нельзя продавать подарки, они должны оставаться на память! :)';
|
||||
}elseif(isset($po['nosale'])){
|
||||
$error = 'Не удалось продать предмет, запрет продажи данного предмета ...';
|
||||
}elseif($pl['type']<29 && ($po['srok'] > 0 || $pl['srok'] > 0) && $pl['type'] != 28){
|
||||
$error = 'Не удалось продать предмет, вышел срок годности ...';
|
||||
}elseif(isset($po['fromlaba'])){
|
||||
$error = 'Не удалось продать предмет, предмет из лабиринта продается за воинственность ...';
|
||||
}elseif(isset($po['frompisher'])){
|
||||
$error = 'Предметы с подземелья нельзя продать';
|
||||
}elseif(isset($itm['id'])){
|
||||
if($itm['1price']>0){
|
||||
$itm['price1'] = $itm['1price'];
|
||||
}
|
||||
$shpCena = $itm['price1'];
|
||||
$plmx = 0;
|
||||
if($itm['iznosMAXi']!=$itm['iznosMAX'] && $itm['iznosMAX']!=0){
|
||||
$plmx = $itm['iznosMAX'];
|
||||
}else{
|
||||
$plmx = $itm['iznosMAXi'];
|
||||
}
|
||||
if($itm['iznosNOW']>0){
|
||||
$prc1 = $itm['iznosNOW']/$plmx*100;
|
||||
}else{
|
||||
$prc1 = 0;
|
||||
}
|
||||
$shpCena = $u->shopSaleM( $shpCena , $itm );
|
||||
$shpCena = $shpCena/100*(90-$prc1);
|
||||
if( $itm['iznosMAXi'] < 999999999 ) {
|
||||
if($itm['iznosMAX']>0 && $itm['iznosMAXi']>0 && $itm['iznosMAXi']>$itm['iznosMAX']){
|
||||
$shpCena = $shpCena/100*($itm['iznosMAX']/$itm['iznosMAXi']*90);
|
||||
}
|
||||
}
|
||||
$shpCena = $u->round2($shpCena/100*(90-$shopProcent));
|
||||
if($shpCena<0){
|
||||
$shpCena = 0;
|
||||
}
|
||||
$col = $u->itemsX($itm['id']);
|
||||
if($col>0){
|
||||
$shpCena = $shpCena*$col;
|
||||
}
|
||||
if($shpCena<0){
|
||||
$shpCena = 0;
|
||||
}
|
||||
$upd2 = mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `id` = "'.$itm['id'].'" LIMIT 1');
|
||||
if($upd2){
|
||||
if($col>1){
|
||||
mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `item_id`="'.$itm['item_id'].'" AND `uid`="'.$itm['uid'].'" AND `inGroup` = "'.$itm['inGroup'].'" LIMIT '.$col.'');
|
||||
}
|
||||
$u->info['money'] += $shpCena;
|
||||
$upd = mysql_query('UPDATE `users` SET `money` = "'.$u->info['money'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
if($upd) {
|
||||
$error = 'Вы успешно продали предмет "'.$itm['name'].' [x'.$col.']" за '.$shpCena.' кр.';
|
||||
mysql_query('UPDATE `items_users` SET `inGroup` = "0",`delete` = "'.time().'" WHERE `inGroup` = "'.$itm['id'].'" AND `uid` = "'.$u->info['id'].'" LIMIT '.$itm['group_max'].'');
|
||||
$u->addDelo(2,$u->info['id'],'"<font color="green">System.shop</font>": Предмет "'.$itm['name'].' (x'.$col.')" [itm:'.$itm['id'].'] был продан в магазин за <B>'.$shpCena.' кр.</B>.',time(),$u->info['city'],'System.shop',0,0);
|
||||
} else {
|
||||
$u->addDelo(2,$u->info['id'],'"<font color="green">System.shop</font>": Предмет "'.$itm['name'].' (x'.$col.')" [itm:'.$itm['id'].'] был продан в магазин за <B>'.$shpCena.' кр.</B> (кредиты не переведены).',time(),$u->info['city'],'System.shop',0,0);
|
||||
$error = 'Не удалось продать предмет...';
|
||||
}
|
||||
} else {
|
||||
$error = 'Не удалось продать предмет...';
|
||||
}
|
||||
} else {
|
||||
$error = 'Предмет не найден в инвентаре.';
|
||||
}
|
||||
} elseif(isset($_GET['sale']) && isset($_GET['item_rep']) && $u->newAct($_GET['sd4']) ) {
|
||||
$id = (int)$_GET['item_rep'];
|
||||
$itm = mysql_fetch_array(mysql_query('SELECT `im`.*,`iu`.* FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`) WHERE `iu`.`uid`="'.$u->info['id'].'" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `im`.`pricerep` > 0 AND `iu`.`inShop`="0" AND `iu`.`id` = "'.mysql_real_escape_string($id).'" LIMIT 1'));
|
||||
$po = $u->lookStats($itm['data']);
|
||||
if($u->info['allLock'] > time()) {
|
||||
$po['nosale'] = 1;
|
||||
}
|
||||
if(isset($po['nosale'])){
|
||||
$error = 'Не удалось продать предмет, запрет продажи данного предмета ...';
|
||||
}elseif($pl['type']<29 && ($po['srok'] > 0 || $pl['srok'] > 0)){
|
||||
$error = 'Не удалось продать предмет, вышел срок годности ...';
|
||||
}elseif(isset($itm['id'])){
|
||||
$shpCena = $itm['pricerep'];
|
||||
|
||||
$plmx = 0;
|
||||
if($itm['iznosMAXi']!=$itm['iznosMAX'] && $itm['iznosMAX']!=0){
|
||||
$plmx = $itm['iznosMAX'];
|
||||
}else{
|
||||
$plmx = $itm['iznosMAXi'];
|
||||
}
|
||||
|
||||
if($itm['iznosNOW']>0){
|
||||
$prc1 = $itm['iznosNOW']/$plmx*100;
|
||||
}else{
|
||||
$prc1 = 0;
|
||||
}
|
||||
$shpCena = $shpCena/100*(100-$prc1);
|
||||
if($itm['iznosMAX']>0 && $itm['iznosMAXi']>0 && $itm['iznosMAXi']>$itm['iznosMAX']){
|
||||
$shpCena = $shpCena/100*($itm['iznosMAX']/$itm['iznosMAXi']*100);
|
||||
}
|
||||
//$shpCena = $u->round2($shpCena/100*(100-$shopProcent));
|
||||
if($shpCena<0){
|
||||
$shpCena = 0;
|
||||
}
|
||||
$col = $u->itemsX($itm['id']);
|
||||
if($col>0){
|
||||
$shpCena = $shpCena*$col;
|
||||
}
|
||||
$shpCena = floor($shpCena);
|
||||
if($shpCena<0){
|
||||
$shpCena = 0;
|
||||
}
|
||||
$upd2 = mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `id` = "'.$itm['id'].'" LIMIT 1');
|
||||
if($upd2){
|
||||
if($col>1){
|
||||
mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `item_id`="'.$itm['item_id'].'" AND `uid`="'.$itm['uid'].'" AND `inGroup` = "'.$itm['inGroup'].'" LIMIT '.$col.'');
|
||||
}
|
||||
$u->rep['rep3'] += $shpCena;
|
||||
$upd = mysql_query('UPDATE `rep` SET `rep3` = "'.$u->rep['rep3'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
if($upd){
|
||||
$error = 'Вы успешно обменяли предмет "'.$itm['name'].' [x'.$col.']" на +'.$shpCena.' воинственности.<br>
|
||||
Ваша воинственность: '.($u->rep['rep3']-$u->rep['rep3_buy']).'';
|
||||
mysql_query('UPDATE `items_users` SET `inGroup` = "0",`delete` = "'.time().'" WHERE `inGroup` = "'.$itm['id'].'" AND `uid` = "'.$u->info['id'].'" LIMIT '.$itm['group_max'].'');
|
||||
$u->addDelo(2,$u->info['id'],'"<font color="green">System.shop</font>": Предмет "'.$itm['name'].' (x'.$col.')" [itm:'.$itm['id'].'] был продан в магазин за <B>'.$shpCena.' воинственность.</B>.',time(),$u->info['city'],'System.shop',0,0);
|
||||
}else{
|
||||
$u->addDelo(2,$u->info['id'],'"<font color="green">System.shop</font>": Предмет "'.$itm['name'].' (x'.$col.')" [itm:'.$itm['id'].'] был продан в магазин за <B>'.$shpCena.' воинственность.</B> (Репутация не переведена).',time(),$u->info['city'],'System.shop',0,0);
|
||||
$error = 'Не удалось обменять предмет...';
|
||||
}
|
||||
}else{
|
||||
$error = 'Не удалось обменять предмет...';
|
||||
}
|
||||
}else{
|
||||
$error = 'Подходящий предмет не найден в инвентаре.';
|
||||
}
|
||||
}
|
||||
|
||||
if($re!=''){ echo '<div align="right"><font color="red"><b>'.$re.'</b></font></div>'; } ?>
|
||||
$to = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['to_login']).'" ORDER BY `id` ASC LIMIT 1'));
|
||||
if(isset($to['id']))
|
||||
{
|
||||
if($u->info['align'] == 2 || $u->info['haos'] > time()) {
|
||||
$re = '<div align="left">Хаосникам запрещается делать подарки другим игрокам</div>';
|
||||
}elseif($to['id']==$u->info['id'])
|
||||
{
|
||||
$re = '<div align="left">Очень щедро дарить что-то самому себе ;)</div>';
|
||||
}elseif($u->info['level']<4)
|
||||
{
|
||||
$re = '<div align="left">Дарить подарки можно начиная с 4-го уровня</div>';
|
||||
}else{
|
||||
if( $_POST['itemgift'] > 1000000000000 ) {
|
||||
$itm_l = mysql_fetch_array(mysql_query('SELECT * FROM `users_gifts` WHERE `uid` = "'.$u->info['id'].'" AND `id` = "'.mysql_real_escape_string((int)$_POST['itemgift']-1000000000000).'" LIMIT 1'));
|
||||
if( isset($itm_l['id']) && $itm_l['money'] > $u->info['money'] ) {
|
||||
$re = '<div align="left">Недостаточно денег</div>';
|
||||
}elseif( isset($itm_l['id']) ) {
|
||||
$itm = $u->addItem(4533,1,'|gift_id='.$itm_l['id'].'');
|
||||
if( $itm > 0 ) {
|
||||
$itm = mysql_fetch_array(mysql_query('SELECT `im`.*,`iu`.* FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`) WHERE (`im`.`type` = "28" OR `im`.`type` = "38" OR `im`.`type` = "63" OR `im`.`type` = "64") AND `iu`.`id` = "'.mysql_real_escape_string($itm).'" AND `iu`.`uid` = "1" AND `iu`.`gift` = "" AND `iu`.`delete` = "0" AND `iu`.`inOdet` = "0" AND `iu`.`inShop` = "0" LIMIT 1'));
|
||||
if(isset($itm['id'])) {
|
||||
$u->info['money'] -= $itm_l['money'];
|
||||
mysql_query('UPDATE `users` SET `money` = "'.$u->info['money'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
|
||||
$itm['gtxt1'] = $_POST['podarok2'];
|
||||
$itm['gtxt2'] = $_POST['txt'];
|
||||
|
||||
$itm['gtxt1'] = str_replace('\x3C','<',$itm['gtxt1']);
|
||||
$itm['gtxt1'] = str_replace('\x3','>',$itm['gtxt1']);
|
||||
$itm['gtxt1'] = htmlspecialchars($itm['gtxt1'],NULL);
|
||||
$itm['gtxt2'] = str_replace('\x3C','<',$itm['gtxt2']);
|
||||
$itm['gtxt2'] = str_replace('\x3','>',$itm['gtxt2']);
|
||||
$itm['gtxt2'] = htmlspecialchars($itm['gtxt2'],NULL);
|
||||
|
||||
$upd = mysql_query('UPDATE `items_users` SET `data` = "'.$itm['data'].'",`gtxt1` = "'.mysql_real_escape_string($itm['gtxt1']).'",`gtxt2` = "'.mysql_real_escape_string($itm['gtxt2']).'", `uid` = "'.$to['id'].'", `gift` = "'.$u->info['login'].'",`time_create` = "'.time().'" WHERE `id` = "'.$itm['id'].'" LIMIT 1');
|
||||
$whos = mysql_fetch_array(mysql_query('SELECT `login` FROM `users` WHERE `id` = "'.$to['id'].'" LIMIT 1'));
|
||||
$ld = $u->addDelo(1, $to['id'],'"<font color=#C65F00>Shop.'.$u->info['city'].'</font>": Получен подарок от [id="'.$u->info['id'].'"/ Логин : "'.$u->info['login'].'"]. Предмет [id="'.$itm['id'].'"/ Название : "'.$itm['name'].'"]',time(),$u->info['city'],'Shop.gift',0,0);
|
||||
$ld = $u->addDelo(1, $u->info['id'],'"<font color=#C65F00>Shop.'.$u->info['city'].'</font>": Сделал подарок персонажу [id="'.$to['id'].'"/ Логин : "'.$whos['login'].'"]. Предмет [id="'.$itm['id'].'"/ Название : "'.$itm['name'].'"]',time(),$u->info['city'],'Shop.gift',0,0);
|
||||
if($upd)
|
||||
{
|
||||
$re = '<div>Подарок был успешно отправлен к "'.$to['login'].'" за '.$itm_l['money'].' кр.</div>';
|
||||
$text = ' Получен подарок <b>'.$itm_l['name'].'</b>. От персонажа [login:'.$u->info['login'].'] .';
|
||||
sendSysChat($u->info['city'], $to['login'], $text);
|
||||
}else{
|
||||
$re = '<div>Не удалось сделать подарок</div>';
|
||||
}
|
||||
}else{
|
||||
$re = '<div>Не удалось сделать подарок, он испортился...</div>';
|
||||
}
|
||||
}else{
|
||||
$re = '<div>Не удалось сделать подарок, курьер случайно сломал его...</div>';
|
||||
}
|
||||
}else{
|
||||
$re = '<div>Предмет не найден</div>';
|
||||
}
|
||||
}else{
|
||||
$itm = mysql_fetch_array(mysql_query('SELECT `im`.*,`iu`.* FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`) WHERE (`im`.`type` = "28" OR `im`.`type` = "38" OR `im`.`type` = "63" OR `im`.`type` = "64") AND `iu`.`id` = "'.mysql_real_escape_string($_POST['itemgift']).'" AND `iu`.`uid` = "'.$u->info['id'].'" AND `iu`.`gift` = "" AND `iu`.`delete` = "0" AND `iu`.`inOdet` = "0" AND `iu`.`inShop` = "0" LIMIT 1'));
|
||||
if(isset($itm['id']))
|
||||
{
|
||||
$itm['gtxt1'] = $_POST['podarok2'];
|
||||
$itm['gtxt2'] = $_POST['txt'];
|
||||
|
||||
$itm['gtxt1'] = str_replace('\x3C','<',$itm['gtxt1']);
|
||||
$itm['gtxt1'] = str_replace('\x3','>',$itm['gtxt1']);
|
||||
$itm['gtxt1'] = htmlspecialchars($itm['gtxt1'],NULL);
|
||||
$itm['gtxt2'] = str_replace('\x3C','<',$itm['gtxt2']);
|
||||
$itm['gtxt2'] = str_replace('\x3','>',$itm['gtxt2']);
|
||||
$itm['gtxt2'] = htmlspecialchars($itm['gtxt2'],NULL);
|
||||
|
||||
$upd = mysql_query('UPDATE `items_users` SET `data` = "'.$itm['data'].'",`gtxt1` = "'.mysql_real_escape_string($itm['gtxt1']).'",`gtxt2` = "'.mysql_real_escape_string($itm['gtxt2']).'", `uid` = "'.$to['id'].'", `gift` = "'.$u->info['login'].'",`time_create` = "'.time().'" WHERE `id` = "'.$itm['id'].'" LIMIT 1');
|
||||
$whos = mysql_fetch_array(mysql_query('SELECT `login` FROM `users` WHERE `id` = "'.$to['id'].'" LIMIT 1'));
|
||||
$ld = $u->addDelo(1, $to['id'],'"<font color=#C65F00>Shop.'.$u->info['city'].'</font>": Получен подарок от [id="'.$u->info['id'].'"/ Логин : "'.$u->info['login'].'"]. Предмет [id="'.$itm['id'].'"/ Название : "'.$itm['name'].'"]',time(),$u->info['city'],'Shop.gift',0,0);
|
||||
$ld = $u->addDelo(1, $u->info['id'],'"<font color=#C65F00>Shop.'.$u->info['city'].'</font>": Сделал подарок персонажу [id="'.$to['id'].'"/ Логин : "'.$whos['login'].'"]. Предмет [id="'.$itm['id'].'"/ Название : "'.$itm['name'].'"]',time(),$u->info['city'],'Shop.gift',0,0);
|
||||
if($upd)
|
||||
{
|
||||
$re = '<div>Подарок был успешно отправлен к "'.$to['login'].'"</div>';
|
||||
$text = ' Получен подарок <b>'.$itm['name'].'</b>. От персонажа [login:'.$u->info['login'].'] .';
|
||||
sendSysChat($u->info['city'], $to['login'], $text);
|
||||
}else{
|
||||
$re = '<div>Не удалось сделать подарок</div>';
|
||||
}
|
||||
}else{
|
||||
$re = '<div>Предмет не найден</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$re = '<div>Персонаж с таким логином не найден</div>';
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($u->stats['shopSale'],$_GET['sale'])){
|
||||
$bns = 0+$u->stats['shopSale'];
|
||||
if($bns!=0){
|
||||
if($bns>0){
|
||||
$bns = '+'.$bns;
|
||||
}
|
||||
$shopProcent -= $bns;
|
||||
if($shopProcent>99){ $shopProcent = 99; }
|
||||
if($shopProcent<1){ $shopProcent = 1; }
|
||||
echo '<div style="color:grey;"><b>У Вас действует бонус при продаже: '.$bns.'%</b><br><small>Вы сможете продавать предметы за 50% от их стоимости</small></div>';
|
||||
}
|
||||
}
|
||||
if(!isset($_GET['otdel'])) {
|
||||
$_GET['otdel'] = 1;
|
||||
}
|
||||
$sid = 27;
|
||||
$error = '';
|
||||
if(isset($_GET['buy'])){
|
||||
if($u->newAct($_GET['sd4'])==true){
|
||||
$re = $u->buyItem($sid,(int)$_GET['buy'],(int)$_GET['x']);
|
||||
}else{
|
||||
$re = 'Вы уверены что хотите купить этот предмет?';
|
||||
}
|
||||
}elseif(isset($_GET['sale']) && isset($_GET['item']) && $u->newAct($_GET['sd4'])){
|
||||
$id = (int)$_GET['item'];
|
||||
$itm = mysql_fetch_array(mysql_query('SELECT `im`.*,`iu`.*, count(`iuu`.id) as inGroupCount
|
||||
FROM `items_users` AS `iu`
|
||||
LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`)
|
||||
LEFT JOIN `items_users` as `iuu` ON (`iuu`.inGroup = `iu`.inGroup AND `iuu`.item_id = `im`.id )
|
||||
WHERE `iuu`.`uid`="'.$u->info['id'].'" AND `iu`.`uid`="'.$u->info['id'].'" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" AND `iu`.`id` = "'.mysql_real_escape_string($id).'" LIMIT 1'));
|
||||
$po = $u->lookStats($itm['data']);
|
||||
if($u->info['allLock'] > time()) {
|
||||
$po['nosale'] = 1;
|
||||
}
|
||||
if( ($itm['gift'] != '' && $itm['gift'] != '0') && ( $itm['type'] == 37 || $itm['type'] == 38 || $itm['type'] == 39 || $itm['type'] == 63 ) ) {
|
||||
$error = 'Нельзя продавать подарки, они должны оставаться на память! :)';
|
||||
}elseif(isset($po['nosale'])){
|
||||
$error = 'Не удалось продать предмет, запрет продажи данного предмета ...';
|
||||
}elseif($pl['type']<29 && ($po['srok'] > 0 || $pl['srok'] > 0) && $pl['type'] != 28){
|
||||
$error = 'Не удалось продать предмет, вышел срок годности ...';
|
||||
}elseif(isset($po['fromlaba'])){
|
||||
$error = 'Не удалось продать предмет, предмет из лабиринта продается за воинственность ...';
|
||||
}elseif(isset($po['frompisher'])){
|
||||
$error = 'Предметы с подземелья нельзя продать';
|
||||
}elseif(isset($itm['id'])){
|
||||
if($itm['1price']>0){
|
||||
$itm['price1'] = $itm['1price'];
|
||||
}
|
||||
$shpCena = $itm['price1'];
|
||||
$plmx = 0;
|
||||
if($itm['iznosMAXi']!=$itm['iznosMAX'] && $itm['iznosMAX']!=0){
|
||||
$plmx = $itm['iznosMAX'];
|
||||
}else{
|
||||
$plmx = $itm['iznosMAXi'];
|
||||
}
|
||||
if($itm['iznosNOW']>0){
|
||||
$prc1 = $itm['iznosNOW']/$plmx*100;
|
||||
}else{
|
||||
$prc1 = 0;
|
||||
}
|
||||
$shpCena = $u->shopSaleM( $shpCena , $itm );
|
||||
$shpCena = $shpCena/100*(90-$prc1);
|
||||
if( $itm['iznosMAXi'] < 999999999 ) {
|
||||
if($itm['iznosMAX']>0 && $itm['iznosMAXi']>0 && $itm['iznosMAXi']>$itm['iznosMAX']){
|
||||
$shpCena = $shpCena/100*($itm['iznosMAX']/$itm['iznosMAXi']*90);
|
||||
}
|
||||
}
|
||||
$shpCena = $u->round2($shpCena/100*(90-$shopProcent));
|
||||
if($shpCena<0){
|
||||
$shpCena = 0;
|
||||
}
|
||||
$col = $u->itemsX($itm['id']);
|
||||
if($col>0){
|
||||
$shpCena = $shpCena*$col;
|
||||
}
|
||||
if($shpCena<0){
|
||||
$shpCena = 0;
|
||||
}
|
||||
$upd2 = mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `id` = "'.$itm['id'].'" LIMIT 1');
|
||||
if($upd2){
|
||||
if($col>1){
|
||||
mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `item_id`="'.$itm['item_id'].'" AND `uid`="'.$itm['uid'].'" AND `inGroup` = "'.$itm['inGroup'].'" LIMIT '.$col.'');
|
||||
}
|
||||
$u->info['money'] += $shpCena;
|
||||
$upd = mysql_query('UPDATE `users` SET `money` = "'.$u->info['money'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
if($upd) {
|
||||
$error = 'Вы успешно продали предмет "'.$itm['name'].' [x'.$col.']" за '.$shpCena.' кр.';
|
||||
mysql_query('UPDATE `items_users` SET `inGroup` = "0",`delete` = "'.time().'" WHERE `inGroup` = "'.$itm['id'].'" AND `uid` = "'.$u->info['id'].'" LIMIT '.$itm['group_max'].'');
|
||||
$u->addDelo(2,$u->info['id'],'"<font color="green">System.shop</font>": Предмет "'.$itm['name'].' (x'.$col.')" [itm:'.$itm['id'].'] был продан в магазин за <B>'.$shpCena.' кр.</B>.',time(),$u->info['city'],'System.shop',0,0);
|
||||
} else {
|
||||
$u->addDelo(2,$u->info['id'],'"<font color="green">System.shop</font>": Предмет "'.$itm['name'].' (x'.$col.')" [itm:'.$itm['id'].'] был продан в магазин за <B>'.$shpCena.' кр.</B> (кредиты не переведены).',time(),$u->info['city'],'System.shop',0,0);
|
||||
$error = 'Не удалось продать предмет...';
|
||||
}
|
||||
} else {
|
||||
$error = 'Не удалось продать предмет...';
|
||||
}
|
||||
} else {
|
||||
$error = 'Предмет не найден в инвентаре.';
|
||||
}
|
||||
} elseif(isset($_GET['sale']) && isset($_GET['item_rep']) && $u->newAct($_GET['sd4']) ) {
|
||||
$id = (int)$_GET['item_rep'];
|
||||
$itm = mysql_fetch_array(mysql_query('SELECT `im`.*,`iu`.* FROM `items_users` AS `iu` LEFT JOIN `items_main` AS `im` ON (`im`.`id` = `iu`.`item_id`) WHERE `iu`.`uid`="'.$u->info['id'].'" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `im`.`pricerep` > 0 AND `iu`.`inShop`="0" AND `iu`.`id` = "'.mysql_real_escape_string($id).'" LIMIT 1'));
|
||||
$po = $u->lookStats($itm['data']);
|
||||
if($u->info['allLock'] > time()) {
|
||||
$po['nosale'] = 1;
|
||||
}
|
||||
if(isset($po['nosale'])){
|
||||
$error = 'Не удалось продать предмет, запрет продажи данного предмета ...';
|
||||
}elseif($pl['type']<29 && ($po['srok'] > 0 || $pl['srok'] > 0)){
|
||||
$error = 'Не удалось продать предмет, вышел срок годности ...';
|
||||
}elseif(isset($itm['id'])){
|
||||
$shpCena = $itm['pricerep'];
|
||||
|
||||
$plmx = 0;
|
||||
if($itm['iznosMAXi']!=$itm['iznosMAX'] && $itm['iznosMAX']!=0){
|
||||
$plmx = $itm['iznosMAX'];
|
||||
}else{
|
||||
$plmx = $itm['iznosMAXi'];
|
||||
}
|
||||
|
||||
if($itm['iznosNOW']>0){
|
||||
$prc1 = $itm['iznosNOW']/$plmx*100;
|
||||
}else{
|
||||
$prc1 = 0;
|
||||
}
|
||||
$shpCena = $shpCena/100*(100-$prc1);
|
||||
if($itm['iznosMAX']>0 && $itm['iznosMAXi']>0 && $itm['iznosMAXi']>$itm['iznosMAX']){
|
||||
$shpCena = $shpCena/100*($itm['iznosMAX']/$itm['iznosMAXi']*100);
|
||||
}
|
||||
//$shpCena = $u->round2($shpCena/100*(100-$shopProcent));
|
||||
if($shpCena<0){
|
||||
$shpCena = 0;
|
||||
}
|
||||
$col = $u->itemsX($itm['id']);
|
||||
if($col>0){
|
||||
$shpCena = $shpCena*$col;
|
||||
}
|
||||
$shpCena = floor($shpCena);
|
||||
if($shpCena<0){
|
||||
$shpCena = 0;
|
||||
}
|
||||
$upd2 = mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `id` = "'.$itm['id'].'" LIMIT 1');
|
||||
if($upd2){
|
||||
if($col>1){
|
||||
mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `item_id`="'.$itm['item_id'].'" AND `uid`="'.$itm['uid'].'" AND `inGroup` = "'.$itm['inGroup'].'" LIMIT '.$col.'');
|
||||
}
|
||||
$u->rep['rep3'] += $shpCena;
|
||||
$upd = mysql_query('UPDATE `rep` SET `rep3` = "'.$u->rep['rep3'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
if($upd){
|
||||
$error = 'Вы успешно обменяли предмет "'.$itm['name'].' [x'.$col.']" на +'.$shpCena.' воинственности.<br>
|
||||
Ваша воинственность: '.($u->rep['rep3']-$u->rep['rep3_buy']).'';
|
||||
mysql_query('UPDATE `items_users` SET `inGroup` = "0",`delete` = "'.time().'" WHERE `inGroup` = "'.$itm['id'].'" AND `uid` = "'.$u->info['id'].'" LIMIT '.$itm['group_max'].'');
|
||||
$u->addDelo(2,$u->info['id'],'"<font color="green">System.shop</font>": Предмет "'.$itm['name'].' (x'.$col.')" [itm:'.$itm['id'].'] был продан в магазин за <B>'.$shpCena.' воинственность.</B>.',time(),$u->info['city'],'System.shop',0,0);
|
||||
}else{
|
||||
$u->addDelo(2,$u->info['id'],'"<font color="green">System.shop</font>": Предмет "'.$itm['name'].' (x'.$col.')" [itm:'.$itm['id'].'] был продан в магазин за <B>'.$shpCena.' воинственность.</B> (Репутация не переведена).',time(),$u->info['city'],'System.shop',0,0);
|
||||
$error = 'Не удалось обменять предмет...';
|
||||
}
|
||||
}else{
|
||||
$error = 'Не удалось обменять предмет...';
|
||||
}
|
||||
}else{
|
||||
$error = 'Подходящий предмет не найден в инвентаре.';
|
||||
}
|
||||
}
|
||||
|
||||
if($re!=''){ echo '<div align="right"><font color="red"><b>'.$re.'</b></font></div>'; } ?>
|
||||
<script type="text/javascript">
|
||||
function AddCount(name, txt)
|
||||
{
|
||||
document.getElementById("hint4").innerHTML = '<table border=0 width=100% cellspacing=1 cellpadding=0 bgcolor="#CCC3AA"><tr><td align=center><B>Купить неск. штук</td><td width=20 align=right valign=top style="cursor: pointer" onclick="closehint3();"><BIG><B>x</TD></tr><tr><td colspan=2>'+
|
||||
'<form method=post><table border=0 width=100% cellspacing=0 cellpadding=0 bgcolor="#FFF6DD"><tr><INPUT TYPE="hidden" name="set" value="'+name+'"><td colspan=2 align=center><B><I>'+txt+'</td></tr><tr><td width=80% align=right>'+
|
||||
'Количество (шт.) <INPUT TYPE="text" NAME="count" id=count size=4></td><td width=20%> <INPUT TYPE="submit" value=" »» ">'+
|
||||
'</TD></TR></form></TABLE></td></tr></table>';
|
||||
document.getElementById("hint4").style.visibility = 'visible';
|
||||
document.getElementById("hint4").style.left = '100px';
|
||||
document.getElementById("hint4").style.top = '100px';
|
||||
document.getElementById("count").focus();
|
||||
}
|
||||
function closehint3() {
|
||||
document.getElementById('hint4').style.visibility='hidden';
|
||||
Hint3Name='';
|
||||
}
|
||||
</script>
|
||||
<style type="text/css">
|
||||
|
||||
.pH3 { COLOR: #8f0000; FONT-FAMILY: Arial; FONT-SIZE: 12pt; FONT-WEIGHT: bold; }
|
||||
.class_ {
|
||||
font-weight: bold;
|
||||
color: #C5C5C5;
|
||||
cursor:pointer;
|
||||
}
|
||||
.class_st {
|
||||
font-weight: bold;
|
||||
color: #659BA3;
|
||||
cursor:pointer;
|
||||
}
|
||||
.class__ {
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
cursor:pointer;
|
||||
background-color: #659BA3;
|
||||
}
|
||||
.class__st {
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
cursor:pointer;
|
||||
background-color: #659BA3;
|
||||
font-size: 10px;
|
||||
}
|
||||
.class_old {
|
||||
font-weight: bold;
|
||||
color: #919191;
|
||||
cursor:pointer;
|
||||
}
|
||||
.class__old {
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
cursor:pointer;
|
||||
background-color: #838383;
|
||||
font-size: 10px;
|
||||
}
|
||||
</style>
|
||||
<TABLE width="100%" cellspacing="0" cellpadding="0">
|
||||
<tr><td valign="top"><?php
|
||||
echo '<b style="color:red">'.$error.'</b>';
|
||||
?>
|
||||
function AddCount(name, txt)
|
||||
{
|
||||
document.getElementById("hint4").innerHTML = '<table border=0 width=100% cellspacing=1 cellpadding=0 bgcolor="#CCC3AA"><tr><td align=center><B>Купить неск. штук</td><td width=20 align=right valign=top style="cursor: pointer" onclick="closehint3();"><BIG><B>x</TD></tr><tr><td colspan=2>'+
|
||||
'<form method=post><table border=0 width=100% cellspacing=0 cellpadding=0 bgcolor="#FFF6DD"><tr><INPUT TYPE="hidden" name="set" value="'+name+'"><td colspan=2 align=center><B><I>'+txt+'</td></tr><tr><td width=80% align=right>'+
|
||||
'Количество (шт.) <INPUT TYPE="text" NAME="count" id=count size=4></td><td width=20%> <INPUT TYPE="submit" value=" »» ">'+
|
||||
'</TD></TR></form></TABLE></td></tr></table>';
|
||||
document.getElementById("hint4").style.visibility = 'visible';
|
||||
document.getElementById("hint4").style.left = '100px';
|
||||
document.getElementById("hint4").style.top = '100px';
|
||||
document.getElementById("count").focus();
|
||||
}
|
||||
function closehint3() {
|
||||
document.getElementById('hint4').style.visibility='hidden';
|
||||
Hint3Name='';
|
||||
}
|
||||
</script>
|
||||
<style type="text/css">
|
||||
|
||||
.pH3 { COLOR: #8f0000; FONT-FAMILY: Arial; FONT-SIZE: 12pt; FONT-WEIGHT: bold; }
|
||||
.class_ {
|
||||
font-weight: bold;
|
||||
color: #C5C5C5;
|
||||
cursor:pointer;
|
||||
}
|
||||
.class_st {
|
||||
font-weight: bold;
|
||||
color: #659BA3;
|
||||
cursor:pointer;
|
||||
}
|
||||
.class__ {
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
cursor:pointer;
|
||||
background-color: #659BA3;
|
||||
}
|
||||
.class__st {
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
cursor:pointer;
|
||||
background-color: #659BA3;
|
||||
font-size: 10px;
|
||||
}
|
||||
.class_old {
|
||||
font-weight: bold;
|
||||
color: #919191;
|
||||
cursor:pointer;
|
||||
}
|
||||
.class__old {
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
cursor:pointer;
|
||||
background-color: #838383;
|
||||
font-size: 10px;
|
||||
}
|
||||
</style>
|
||||
<TABLE width="100%" cellspacing="0" cellpadding="0">
|
||||
<tr><td valign="top"><?php
|
||||
echo '<b style="color:red">'.$error.'</b>';
|
||||
?>
|
||||
<br />
|
||||
<TABLE width="100%" cellspacing="0" cellpadding="4">
|
||||
<TR>
|
||||
<form name="F1" method="post">
|
||||
<TD valign="top" align="left">
|
||||
<!--Магазин-->
|
||||
<table width="100%" cellspacing="0" cellpadding="0" bgcolor="#a5a5a5">
|
||||
<div id="hint3" style="visibility:hidden"></div>
|
||||
<tr>
|
||||
<td align="center" height="21">
|
||||
<?php
|
||||
/*названия разделов (сверху)*/
|
||||
if(!isset($_GET['sale']) && !isset($_GET['gifts']) && isset($_GET['otdel'])) {
|
||||
$otdels_small_array = array (
|
||||
'',
|
||||
'<b>Образы</b>',
|
||||
'<b>Заклинания</b>',
|
||||
'<b>Учебник</b>');
|
||||
if(isset($otdels_small_array[$_GET['otdel']])){
|
||||
echo $otdels_small_array[$_GET['otdel']];
|
||||
}
|
||||
//echo '<br><b>Магазин принимает вещи 0-7 уровней под 100%, вещи 8-го уровня под 95%, вещи 9-го уровня, а так же свитки и эликсиры можно сдать в магазин под 70%.</b>';
|
||||
|
||||
} elseif (isset($_GET['sale']) && $_GET['sale']) {
|
||||
echo '
|
||||
<B>Отдел "Скупка"</B><br>
|
||||
Здесь вы можете продать свои вещи, за жалкие гроши...<br>'.
|
||||
//<b>Магазин принимает вещи 0-7 уровней под 99%, вещи 8-го уровня под 95%, вещи 9-го уровня, а так же свитки и эликсиры можно сдать в магазин под 70%.</b><br>
|
||||
'У вас в наличии:
|
||||
';
|
||||
} elseif (isset($_GET['gifts'])) {
|
||||
echo '
|
||||
<B>Отдел "Сделать подарки"</B>';
|
||||
}
|
||||
?>
|
||||
<TABLE width="100%" cellspacing="0" cellpadding="4">
|
||||
<TR>
|
||||
<form name="F1" method="post">
|
||||
<TD valign="top" align="left">
|
||||
<!--Магазин-->
|
||||
<table width="100%" cellspacing="0" cellpadding="0" bgcolor="#a5a5a5">
|
||||
<div id="hint3" style="visibility:hidden"></div>
|
||||
<tr>
|
||||
<td align="center" height="21">
|
||||
<?php
|
||||
/*названия разделов (сверху)*/
|
||||
if(!isset($_GET['sale']) && !isset($_GET['gifts']) && isset($_GET['otdel'])) {
|
||||
$otdels_small_array = array (
|
||||
'',
|
||||
'<b>Образы</b>',
|
||||
'<b>Заклинания</b>',
|
||||
'<b>Учебник</b>');
|
||||
if(isset($otdels_small_array[$_GET['otdel']])){
|
||||
echo $otdels_small_array[$_GET['otdel']];
|
||||
}
|
||||
//echo '<br><b>Магазин принимает вещи 0-7 уровней под 100%, вещи 8-го уровня под 95%, вещи 9-го уровня, а так же свитки и эликсиры можно сдать в магазин под 70%.</b>';
|
||||
|
||||
} elseif (isset($_GET['sale']) && $_GET['sale']) {
|
||||
echo '
|
||||
<B>Отдел "Скупка"</B><br>
|
||||
Здесь вы можете продать свои вещи, за жалкие гроши...<br>'.
|
||||
//<b>Магазин принимает вещи 0-7 уровней под 99%, вещи 8-го уровня под 95%, вещи 9-го уровня, а так же свитки и эликсиры можно сдать в магазин под 70%.</b><br>
|
||||
'У вас в наличии:
|
||||
';
|
||||
} elseif (isset($_GET['gifts'])) {
|
||||
echo '
|
||||
<B>Отдел "Сделать подарки"</B>';
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
<tr><td>
|
||||
<!--Рюкзак / Прилавок-->
|
||||
<table width="100%" CELLSPACING="1" CELLPADDING="1" bgcolor="#a5a5a5">
|
||||
<?php
|
||||
if(isset($_GET['gifts']))
|
||||
{
|
||||
?>
|
||||
|
||||
<tr><td>
|
||||
<!--Рюкзак / Прилавок-->
|
||||
<table width="100%" CELLSPACING="1" CELLPADDING="1" bgcolor="#a5a5a5">
|
||||
<?php
|
||||
if(isset($_GET['gifts']))
|
||||
{
|
||||
?>
|
||||
|
||||
<tr><td bgcolor="#D5D5D5">
|
||||
Вы можете сделать подарок дорогому человеку. Ваш подарок будет отображаться в информации о персонаже.
|
||||
<OL>
|
||||
<LI>Укажите логин персонажа, которому хотите сделать подарок<BR>
|
||||
Логин
|
||||
<INPUT TYPE=text NAME=to_login value="">
|
||||
Логин
|
||||
<INPUT TYPE=text NAME=to_login value="">
|
||||
<LI>Цель подарка. Будет отображаться в информации о персонаже (не более 60 символов)<BR>
|
||||
<INPUT TYPE=text NAME=podarok2 value="" maxlength=60 size=50>
|
||||
<LI>Напишите текст сопроводительной записки (в информации о персонаже не отображается)<BR>
|
||||
@ -392,104 +399,101 @@ if($u->room['file']=='_shop_referal_')
|
||||
</OL>
|
||||
<input name="itemgift" id="itemgift" type="hidden" value="0" />
|
||||
</td></tr>
|
||||
<?php
|
||||
}
|
||||
if(!isset($_GET['sale'])){
|
||||
//Выводим вещи в магазине для покупки
|
||||
$u->shopItems($sid);
|
||||
}else{
|
||||
//Выводим вещи в инвентаре для продажи
|
||||
$itmAll = $u->genInv(2,'`iu`.`uid`="'.$u->info['id'].'" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" ORDER BY `lastUPD` DESC');
|
||||
if($itmAll[0]==0){
|
||||
$itmAllSee = '<tr><td align="center" bgcolor="#e2e0e0">ПУСТО</td></tr>';
|
||||
}else{
|
||||
$itmAllSee = $itmAll[2];
|
||||
}
|
||||
echo $itmAllSee;
|
||||
}
|
||||
?>
|
||||
</TABLE>
|
||||
</TD></TR>
|
||||
<?php
|
||||
}
|
||||
if(!isset($_GET['sale'])){
|
||||
//Выводим вещи в магазине для покупки
|
||||
$u->shopItems($sid);
|
||||
}else{
|
||||
//Выводим вещи в инвентаре для продажи
|
||||
$itmAll = $u->genInv(2,'`iu`.`uid`="'.$u->info['id'].'" AND `iu`.`delete`="0" AND `iu`.`inOdet`="0" AND `iu`.`inShop`="0" ORDER BY `lastUPD` DESC');
|
||||
if($itmAll[0]==0){
|
||||
$itmAllSee = '<tr><td align="center" bgcolor="#e2e0e0">ПУСТО</td></tr>';
|
||||
}else{
|
||||
$itmAllSee = $itmAll[2];
|
||||
}
|
||||
echo $itmAllSee;
|
||||
}
|
||||
?>
|
||||
</TABLE>
|
||||
</TD>
|
||||
</FORM>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<td width="280" valign="top">
|
||||
<TABLE cellspacing="0" cellpadding="0"><TD width="100%"> </TD><TD>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr align="right" valign="top">
|
||||
<td>
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</TD>
|
||||
</FORM>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<td width="280" valign="top">
|
||||
<TABLE cellspacing="0" cellpadding="0"><TD width="100%"> </TD><TD>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr align="right" valign="top">
|
||||
<td>
|
||||
<!-- -->
|
||||
<? echo $goLis; ?>
|
||||
<!-- -->
|
||||
<? echo $goLis; ?>
|
||||
<!-- -->
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td nowrap="nowrap">
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
|
||||
<tr>
|
||||
<td bgcolor="#D3D3D3"><img src="https://img.new-combats.com/i/move/links.gif" width="9" height="7" /></td>
|
||||
<td bgcolor="#D3D3D3" nowrap><a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.323&rnd=<? echo $code; ?>';" title="<? thisInfRm('1.180.0.323',1); ?>">Большая парковая улица</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></table>
|
||||
</td></table>
|
||||
<div><br />
|
||||
<div align="right">
|
||||
<small>
|
||||
Масса: <?=$u->aves['now']?>/<?=$u->aves['max']?> <br />
|
||||
У вас в наличии: <b style="color:#339900;"><?php echo round($u->info['money'],2); ?> кр.</b>
|
||||
<?
|
||||
if($u->info['level'] < 8) {
|
||||
?>
|
||||
<br />Зубов: <?=$u->zuby($u->info['money4'])?>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</small>
|
||||
</div>
|
||||
<br />
|
||||
<INPUT TYPE="button" value="Обновить" onclick="location = '<? echo str_replace('item','',str_replace('buy','',$_SERVER['REQUEST_URI'])); ?>';"><BR>
|
||||
</div>
|
||||
<div style="background-color:#A5A5A5;padding:1"><center><B>Отделы магазина</B></center></div>
|
||||
<div style="line-height:17px;">
|
||||
<?php
|
||||
/*названия разделов (справа)*/
|
||||
$otdels_array = array (
|
||||
'',
|
||||
'Образы',
|
||||
'Заклинания',
|
||||
'Учебник');
|
||||
$i=1;
|
||||
while ($i!=-1)
|
||||
{
|
||||
if(isset($otdels_array[$i]))
|
||||
{
|
||||
if(isset($_GET['otdel']) && $_GET['otdel']==$i)
|
||||
{
|
||||
$color = 'C7C7C7';
|
||||
} else {
|
||||
$color = 'e2e0e0';
|
||||
}
|
||||
echo '
|
||||
<A HREF="?otdel='.$i.'"><DIV style="background-color: #'.$color.'">
|
||||
'.$otdels_array[$i].'
|
||||
</A></DIV>
|
||||
';
|
||||
} else {
|
||||
$i = -2;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</table>
|
||||
<br>
|
||||
<div id="textgo" style="visibility:hidden;"></div>
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td nowrap="nowrap">
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
|
||||
<tr>
|
||||
<td bgcolor="#D3D3D3"><img src="https://img.new-combats.com/i/move/links.gif" width="9" height="7" /></td>
|
||||
<td bgcolor="#D3D3D3" nowrap><a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.323&rnd=<? echo $code; ?>';" title="<? thisInfRm('1.180.0.323', 1); ?>">Большая парковая улица</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></table>
|
||||
</td></table>
|
||||
<div><br />
|
||||
<div align="right">
|
||||
<small>
|
||||
Масса: <?=$u->aves['now']?>/<?=$u->aves['max']?> <br />
|
||||
У вас в наличии: <b style="color:#339900;"><?php echo round($u->info['money'], 2); ?> кр.</b>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
if($u->info['level'] < 8) {
|
||||
?>
|
||||
<br />Зубов: <?=$u->zuby($u->info['money4'])?>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
</small>
|
||||
</div>
|
||||
<br />
|
||||
<INPUT TYPE="button" value="Обновить" onclick="location = '<? echo str_replace('item', '', str_replace('buy', '', $_SERVER['REQUEST_URI'])); ?>';"><BR>
|
||||
</div>
|
||||
<div style="background-color:#A5A5A5;padding:1"><center><B>Отделы магазина</B></center></div>
|
||||
<div style="line-height:17px;">
|
||||
<?php
|
||||
/*названия разделов (справа)*/
|
||||
$otdels_array = array (
|
||||
'',
|
||||
'Образы',
|
||||
'Заклинания',
|
||||
'Учебник');
|
||||
$i=1;
|
||||
while ($i!=-1)
|
||||
{
|
||||
if(isset($otdels_array[$i]))
|
||||
{
|
||||
if(isset($_GET['otdel']) && $_GET['otdel']==$i)
|
||||
{
|
||||
$color = 'C7C7C7';
|
||||
} else {
|
||||
$color = 'e2e0e0';
|
||||
}
|
||||
echo '
|
||||
<A HREF="?otdel='.$i.'"><DIV style="background-color: #'.$color.'">
|
||||
'.$otdels_array[$i].'
|
||||
</A></DIV>
|
||||
';
|
||||
} else {
|
||||
$i = -2;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</table>
|
||||
<br>
|
||||
<div id="textgo" style="visibility:hidden;"></div>
|
||||
|
@ -106,7 +106,6 @@ if ($u->room['file'] == 'an/bank') {
|
||||
}
|
||||
}
|
||||
} elseif (isset($_GET['res'])) {
|
||||
//echo $_GET['schet'].'<br>';
|
||||
$b_pass = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `bank` WHERE `uid` = "' . $u->info['id'] . '" AND `id` = "' . mysql_real_escape_string(
|
||||
@ -138,7 +137,9 @@ if ($u->room['file'] == 'an/bank') {
|
||||
} elseif (isset($_GET['open']) && !isset($u->bank['id'])) {
|
||||
if ($_POST['rdn01'] == 2 && ($u->info['level'] >= 8 || $u->info['money4'] < 15)) {
|
||||
$re2 = 'Недостаточно зубов!';
|
||||
} elseif ($u->info['money'] >= 3 || ($u->info['level'] < 8 && $u->info['money4'] >= 15)) {
|
||||
} elseif ($u->info['money'] >= 3 || ($u->info['level'] < 8 && $u->info['money4'] >= 15 && \Core\Config::get(
|
||||
'zuby'
|
||||
))) {
|
||||
if ($_POST['pass1'] == '' || $_POST['pass1'] == ' ') {
|
||||
$re2 = 'Вы не указали пароль!';
|
||||
} elseif ($_POST['pass1'] != $_POST['pass2']) {
|
||||
@ -150,11 +151,11 @@ if ($u->room['file'] == 'an/bank') {
|
||||
$pass = htmlspecialchars($_POST['pass1'], null);
|
||||
$ins = mysql_query(
|
||||
'INSERT INTO `bank` (`uid`,`create`,`pass`) VALUES ("' . $u->info['id'] . '","' . time(
|
||||
) . '","' . $pass . '")'
|
||||
) . '","' . mysql_real_escape_string($pass) . '")'
|
||||
);
|
||||
if ($ins) {
|
||||
$bank = mysql_insert_id();
|
||||
if ($u->info['level'] < 8 && $_POST['rdn01'] == 2) {
|
||||
if ($u->info['level'] < 8 && $_POST['rdn01'] == 2 && \Core\Config::get('zuby')) {
|
||||
$u->info['money4'] -= 15;
|
||||
} else {
|
||||
$u->info['money'] -= 3;
|
||||
@ -176,7 +177,7 @@ if ($u->room['file'] == 'an/bank') {
|
||||
$re2 = 'Хаосники не могут создавать новые счета в банке.';
|
||||
}
|
||||
} else {
|
||||
if ($u->info['level'] < 8) {
|
||||
if ($u->info['level'] < 8 && \Core\Config::get('zuby')) {
|
||||
$re2 = 'Для открытия счета необходимо иметь при себе <b>3.00 кр.</b> или <b>' . $u->zuby(15) . '</b>';
|
||||
} else {
|
||||
$re2 = 'Для открытия счета необходимо иметь при себе <b>3.00 кр.</b>';
|
||||
@ -386,7 +387,7 @@ if ($u->room['file'] == 'an/bank') {
|
||||
$re2 = 'Передача кредитов возможна только с 4-го уровня';
|
||||
}
|
||||
} elseif ($u->info['align'] != 2 && $u->info['haos'] < time(
|
||||
) && $u->info['haos'] != 1 && $u->info['align'] != 50 && isset($_POST['convert_kredit']) && 1 == 2) {
|
||||
) && $u->info['haos'] != 1 && $u->info['align'] != 50 && isset($_POST['convert_kredit']) && \Core\Config::get('crtoecr') > 0) {
|
||||
//обменять кр. на екр.
|
||||
if ($u->info['palpro'] > time()) {
|
||||
$mn = ceil((int)($_POST['convert_sum2'] * 100));
|
||||
@ -398,7 +399,7 @@ if ($u->room['file'] == 'an/bank') {
|
||||
'd.m.Y', time()
|
||||
) . ']" ORDER BY `id` DESC LIMIT 1', 1
|
||||
);
|
||||
$sm_lim = 50;
|
||||
$sm_lim = 100;
|
||||
if (isset($sm['id']) && $sm['vals'] + $mne > $sm_lim) {
|
||||
if ($sm['vals'] < $sm_lim) {
|
||||
$re2 = 'На сегодня Вы можете обменять еще на <b>' . ($sm_lim - $sm['vals']) . ' екр.</b>. (Примерно ' . round(
|
||||
@ -431,6 +432,8 @@ if ($u->room['file'] == 'an/bank') {
|
||||
$u->bank['money1']
|
||||
) . '", `money2` = "' . mysql_real_escape_string(
|
||||
$u->bank['money2']
|
||||
) . '",`shara` = `shara` + "' . mysql_real_escape_string(
|
||||
$mne
|
||||
) . '" WHERE `id` = "' . mysql_real_escape_string($u->bank['id']) . '" LIMIT 1'
|
||||
);
|
||||
$log = '"' . $u->info['login'] . '" [' . $u->info['level'] . '] обменял <b>' . $mn . ' кр.</b> на <b>' . $mne . ' екр.</b>, Банковский счет №' . $u->bank['id'] . '.';
|
||||
@ -492,7 +495,7 @@ if ($u->room['file'] == 'an/bank') {
|
||||
$mn = round(($mn / 100), 2);
|
||||
if ($u->bank['money1'] >= $mn) {
|
||||
if ($mn < 0.01 || $mn > 1000000000) {
|
||||
$re2 = 'Неверно указана сумма';
|
||||
$re2 = 'Неверно указана сумма (Снять ' . ((int)$_POST['get_sum']) . ' кр.)';
|
||||
} else {
|
||||
$upd = mysql_query(
|
||||
'UPDATE `users` SET `money` = "' . mysql_real_escape_string(
|
||||
@ -520,13 +523,81 @@ if ($u->room['file'] == 'an/bank') {
|
||||
} else {
|
||||
$re2 = 'У вас нет <b>' . $mn . ' кр.</b> на счете';
|
||||
}
|
||||
} elseif (isset($_POST['get_ekredit'])) {
|
||||
//положить деньги на счет
|
||||
$mn = floor((int)($_POST['get_esum'] * 100));
|
||||
$mn = round(($mn / 100), 2);
|
||||
if ($u->bank['money2'] >= $mn) {
|
||||
if ($mn < 0.01 || $mn > 1000000000) {
|
||||
$re2 = 'Неверно указана сумма (Снять ' . ((int)$_POST['get_esum']) . ' Екр.)';
|
||||
} else {
|
||||
$upd = mysql_query(
|
||||
'UPDATE `users` SET `money2` = "' . mysql_real_escape_string(
|
||||
$u->info['money2'] + $mn
|
||||
) . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'
|
||||
);
|
||||
if ($upd) {
|
||||
$u->bank['money2'] -= $mn;
|
||||
$u->info['money2'] += $mn;
|
||||
mysql_query(
|
||||
'UPDATE `bank` SET `money2` = "' . mysql_real_escape_string(
|
||||
$u->bank['money2']
|
||||
) . '" WHERE `id` = "' . $u->bank['id'] . '" LIMIT 1'
|
||||
);
|
||||
$u->addDelo(
|
||||
3, $u->info['id'],
|
||||
'Вы сняли со счета <b>' . $mn . ' Екр.</b>, комиссия <b>0 Екр.</b> <i>(Итого: ' . $u->bank['money1'] . ' кр., ' . $u->bank['money2'] . ' екр.)</i>',
|
||||
time(), $u->info['city'], 'Bank.System', 0, 0, $u->bank['id']
|
||||
);
|
||||
$re2 = 'Вы удачно сняли со счета <b>' . $mn . ' Екр.</b>';
|
||||
} else {
|
||||
$re2 = 'Не удалось выполнить операцию';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$re2 = 'У вас нет <b>' . $mn . ' Екр.</b> на счете';
|
||||
}
|
||||
} elseif (isset($_POST['add_ekredit'])) {
|
||||
//положить деньги на счет
|
||||
$mn = floor((int)($_POST['add_esum'] * 100));
|
||||
$mn = round(($mn / 100), 2);
|
||||
if ($u->info['money2'] >= $mn) {
|
||||
if ($mn < 0.01 || $mn > 1000000000) {
|
||||
$re2 = 'Неверно указана сумма (Пополнение счета)';
|
||||
} else {
|
||||
$upd = mysql_query(
|
||||
'UPDATE `users` SET `money2` = "' . mysql_real_escape_string(
|
||||
$u->info['money2'] - $mn
|
||||
) . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1'
|
||||
);
|
||||
if ($upd) {
|
||||
$u->bank['money2'] += $mn;
|
||||
$u->info['money2'] -= $mn;
|
||||
mysql_query(
|
||||
'UPDATE `bank` SET `money2` = "' . mysql_real_escape_string(
|
||||
$u->bank['money2']
|
||||
) . '" WHERE `id` = "' . $u->bank['id'] . '" LIMIT 1'
|
||||
);
|
||||
$u->addDelo(
|
||||
3, $u->info['id'],
|
||||
'Вы положили на счет <b>' . $mn . ' Eкр.</b>, комиссия <b>0 Екр.</b> <i>(Итого: ' . $u->bank['money1'] . ' кр., ' . $u->bank['money2'] . ' екр.)</i>',
|
||||
time(), $u->info['city'], 'Bank.System', 0, 0, $u->bank['id']
|
||||
);
|
||||
$re2 = 'Вы удачно положили на свой счет <b>' . $mn . ' Екр.</b>';
|
||||
} else {
|
||||
$re2 = 'Не удалось выполнить операцию';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$re2 = 'У вас нет при себе <b>' . $mn . ' Екр.</b>';
|
||||
}
|
||||
} elseif (isset($_POST['add_kredit'])) {
|
||||
//положить деньги на счет
|
||||
$mn = floor((int)($_POST['add_sum'] * 100));
|
||||
$mn = round(($mn / 100), 2);
|
||||
if ($u->info['money'] >= $mn) {
|
||||
if ($mn < 0.01 || $mn > 1000000000) {
|
||||
$re2 = 'Неверно указана сумма';
|
||||
$re2 = 'Неверно указана сумма (Пополнение счета)';
|
||||
} else {
|
||||
$upd = mysql_query(
|
||||
'UPDATE `users` SET `money` = "' . mysql_real_escape_string(
|
||||
@ -740,7 +811,7 @@ if ($u->room['file'] == 'an/bank') {
|
||||
<FIELDSET style="width:300px;">
|
||||
<LEGEND><B>Открытие счета</B></LEGEND>
|
||||
<small>
|
||||
<? if ($u->info['level'] < 8) { ?>
|
||||
<? if ($u->info['level'] < 8 && \Core\Config::get('zuby')) { ?>
|
||||
<center>
|
||||
<input name="rdn01" type="radio" value="1"> <b>3.00 кр.</b> <input
|
||||
name="rdn01" type="radio" value="2"> <?= $u->zuby(15) ?>
|
||||
@ -889,6 +960,11 @@ if ($u->room['file'] == 'an/bank') {
|
||||
<TD>При себе наличных:</TD>
|
||||
<TD><B><? echo $u->round2($u->info['money']); ?> кр.</B></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>При себе наличных:</TD>
|
||||
<TD><B><? echo $u->round2($u->info['money2']); ?> Екр.</B></TD>
|
||||
</TR>
|
||||
|
||||
</TABLE>
|
||||
</FIELDSET>
|
||||
</TD>
|
||||
@ -991,7 +1067,7 @@ if ($u->room['file'] == 'an/bank') {
|
||||
</td>
|
||||
</tr>
|
||||
<? if ($u->info['align'] != 2 && $u->info['haos'] < time(
|
||||
) && $u->info['haos'] != 1 && $u->info['align'] != 50 && 1 == 2) { ?>
|
||||
) && $u->info['haos'] != 1 && \Core\Config::get('crtoecr') > 0) { ?>
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<fieldset style="background-color:#DDEAD7">
|
||||
|
@ -279,10 +279,14 @@ if ($u->room['file'] == 'bank') {
|
||||
$u->bank['id']
|
||||
) . ' на ваш банковский счет №' . getNum($ub['id']) . '.';
|
||||
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES ('" . $ut['city'] . "','" . $ut['room'] . "','','" . $ut['login'] . "','" . $text . "','" . time(
|
||||
) . "','12','0','1')"
|
||||
);
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($ut['city']);
|
||||
$cmsg->setRoom($ut['room']);
|
||||
$cmsg->setTo($ut['login']);
|
||||
$cmsg->setText($text);
|
||||
$cmsg->setType(12);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
}
|
||||
} else {
|
||||
$re2 = 'Не удалось выполнить операцию';
|
||||
@ -365,10 +369,15 @@ if ($u->room['file'] == 'bank') {
|
||||
$text = '"[login:' . $u->info['login'] . ']" перевел' . ($u->info['sex'] == 0 ? "" : "а") . ' вам <b>' . ($mn - $prc) . ' кр.</b> со своего банковского счета №' . getNum(
|
||||
$u->bank['id']
|
||||
) . ' на ваш банковский счет №' . getNum($ub['id']) . '.';
|
||||
mysql_query(
|
||||
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'" . $ut['city'] . "','" . $ut['room'] . "','','" . $ut['login'] . "','" . $text . "','" . time(
|
||||
) . "','6','0','1')"
|
||||
);
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($ut['city']);
|
||||
$cmsg->setRoom($ut['room']);
|
||||
$cmsg->setTo($ut['login']);
|
||||
$cmsg->setText($text);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
}
|
||||
} else {
|
||||
$re2 = 'Не удалось выполнить операцию';
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,564 +0,0 @@
|
||||
<?
|
||||
if(!defined('GAME')) { die(); }
|
||||
|
||||
if($u->room['file'] == 'newtower') {
|
||||
require_once('_incl_data/class/__zv.php');
|
||||
$bs = mysql_fetch_array(mysql_query('SELECT * FROM `bs_turnirs` WHERE `id` = "'.$u->info['inTurnir'].'" LIMIT 1'));
|
||||
$bmid = 0;
|
||||
if(!isset($bs['id']) || $bs['status'] == 0) { die('Турнир не найден.'); }
|
||||
|
||||
function b_act($uid, $val, $time) {
|
||||
global $bs;
|
||||
$ins = mysql_query('INSERT INTO `bs_actions` (`bid`,`count`,`time`,`uid`,`val`) VALUES (
|
||||
"'.$bs['id'].'","'.$bs['count'].'","'.$time.'","'.$uid.'","'.$val.'"
|
||||
)');
|
||||
return $ins;
|
||||
}
|
||||
|
||||
function test_users_life() {
|
||||
global $u,$bs;
|
||||
//Проверка бага с юзерами и архивариусами
|
||||
$sp = mysql_query('SELECT `id`,`lose`,`nich` FROM `users` WHERE `inTurnir` = "'.$bs['id'].'"');
|
||||
$users = 0;
|
||||
$arhiv = 0;
|
||||
while( $pl = mysql_fetch_array($sp) ) {
|
||||
$test = mysql_fetch_array(mysql_query('SELECT `id` FROM `users` WHERE `inUser` = "'.$pl['id'].'" AND `real` > 0 AND `inUser` > 0 LIMIT 1'));
|
||||
if(isset($test['id'])) {
|
||||
//Игрок
|
||||
$users++;
|
||||
}else{
|
||||
//Архив
|
||||
$arhiv++;
|
||||
}
|
||||
}
|
||||
if( ($bs['users'] - $bs['users_finish']) != $users || $bs['arhiv'] != $arhiv ) {
|
||||
$bs['users_finish'] = $bs['users'] - $users;
|
||||
$bs['arhiv'] = $arhiv;
|
||||
mysql_query('UPDATE `bs_turnirs` SET `users_finish` = "'.$bs['users_finish'].'", `arhiv` = "'.$bs['arhiv'].'" WHERE `id` = "'.$bs['id'].'" LIMIT 1');
|
||||
}
|
||||
}
|
||||
|
||||
test_users_life();
|
||||
|
||||
function b_test($uid,$val,$count = false,$sort = 'ORDER BY `id` DESC') {
|
||||
global $bs;
|
||||
if($count == false ) {
|
||||
$r = mysql_fetch_array(mysql_query('SELECT * FROM `bs_actions` WHERE `bid` = "'.$bs['id'].'" AND `count` = "'.$bs['count'].'" AND `uid` = "'.$uid.'" AND `val` = "'.$val.'" '.$sort.' LIMIT 1'));
|
||||
}else{
|
||||
$r = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `bs_actions` WHERE `bid` = "'.$bs['id'].'" AND `count` = "'.$bs['count'].'" AND `uid` = "'.$uid.'" AND `val` = "'.$val.'" '.$sort.' LIMIT 1'));
|
||||
$r = $r[0];
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
|
||||
//ПОднять предмет
|
||||
if( isset($_GET['takeit']) ) {
|
||||
$itm = mysql_fetch_array(mysql_query('SELECT * FROM `bs_items` WHERE `bid` = "'.$bs['id'].'" AND `count` = "'.$bs['count'].'" AND `id` = "'.mysql_real_escape_string($_GET['takeit']).'" LIMIT 1'));
|
||||
if( isset($itm['id']) ) {
|
||||
if( $itm['x'] == 0 && $itm['y'] == 0 ) {
|
||||
$itm['x'] = $u->info['x'];
|
||||
$itm['y'] = $u->info['y'];
|
||||
}
|
||||
if( $itm['x'] == $u->info['x'] && $itm['y'] == $u->info['y'] ) {
|
||||
$itmb = mysql_fetch_array(mysql_query('SELECT `id`,`img`,`name` FROM `items_main` WHERE `id` = "'.$itm['item_id'].'" LIMIT 1'));
|
||||
if( isset($itmb['id']) ) {
|
||||
$tact = b_test($u->info['id'],'take_itm');
|
||||
if( $tact['time'] > time() ) {
|
||||
$error2 = 'Нельзя поднимать предметы так часто, ждите еще '.($tact['time'] - time()).' сек.';
|
||||
}else{
|
||||
b_act($u->info['id'],'take_itm',time()+3);
|
||||
$error2 = 'Вы подняли предмет "'.$itmb['name'].'"';
|
||||
$u->addItem( $itmb['id'] , $u->info['id'] );
|
||||
mysql_query('DELETE FROM `bs_items` WHERE `id` = "'.$itm['id'].'" LIMIT 1');
|
||||
}
|
||||
}else{
|
||||
$error2 = 'Предмет не найден...';
|
||||
}
|
||||
}else{
|
||||
$error2 = 'Предмет не найден в комнате с вами...';
|
||||
}
|
||||
}else{
|
||||
$error2 = 'Предмет не найден, кто-то оказался быстрее...';
|
||||
}
|
||||
}
|
||||
|
||||
//Предметы БС
|
||||
$bs_items = '';
|
||||
$sp = mysql_query('SELECT * FROM `bs_items` WHERE `bid` = "'.$bs['id'].'" AND `count` = "'.$bs['count'].'" AND `x` = "'.$u->info['x'].'" AND `y` = "'.$u->info['y'].'"');
|
||||
while( $pl = mysql_fetch_array($sp) ) {
|
||||
$itm = mysql_fetch_array(mysql_query('SELECT `id`,`img`,`name` FROM `items_main` WHERE `id` = "'.$pl['item_id'].'" LIMIT 1'));
|
||||
if( isset($itm['id']) ) {
|
||||
$bs_items .= '<a href="?takeit='.$pl['id'].'"><img title="Поднять '."\r".$itm['name'].'" src="https://img.new-combats.com/i/items/'.$itm['img'].'"></a>';
|
||||
}
|
||||
}
|
||||
if( $bs_items != '' ) {
|
||||
$bs_items = '<br><div><b>Предметы в комнате:</b><br><br>'.$bs_items.'</div>';
|
||||
}
|
||||
|
||||
//Данные комнаты
|
||||
$map = array(
|
||||
'name' => 'Название локации',
|
||||
'up' => array( 'i' => 'i' , 'js' => 'onclick="return false"' ),
|
||||
'left' => array( 'i' => 'i' , 'js' => 'onclick="return false"' ),
|
||||
'right' => array( 'i' => 'i' , 'js' => 'onclick="return false"' ),
|
||||
'down' => array( 'i' => 'i' , 'js' => 'onclick="return false"' )
|
||||
);
|
||||
$title_locs = array(
|
||||
'up' => '',
|
||||
'left' => '',
|
||||
'right' => '',
|
||||
'down' => ''
|
||||
);
|
||||
|
||||
|
||||
if( isset($_GET['attack']) ) {
|
||||
$usr = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`align`,`clan`,`battle`,`level` FROM `users` WHERE `login` = "'.mysql_real_escape_string($_GET['attack']).'" AND `inUser` = 0 AND `room` = "362" LIMIT 1'));
|
||||
if( isset($usr['id']) ) {
|
||||
$usr_real = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`align`,`clan`,`battle`,`level` FROM `users` WHERE `login` = "'.mysql_real_escape_string($_GET['attack']).'" AND `inUser` = "'.$usr['id'].'" LIMIT 1'));
|
||||
if( !isset($usr_real['id']) ) {
|
||||
$usr_real = $usr;
|
||||
}
|
||||
$sts = mysql_fetch_array(mysql_query('SELECT `id`,`x`,`y`,`team`,`hpNow` FROM `stats` WHERE `id` = "'.$usr['id'].'" LIMIT 1'));
|
||||
if( $sts['x'] != $u->info['x'] || $sts['y'] != $u->info['y'] ) {
|
||||
$error = 'Вы должны находиться в одной комнате';
|
||||
}elseif( $usr_real['login'] == $u->info['login'] ) {
|
||||
$error = 'Нельзя нападать на самого себя';
|
||||
}else{
|
||||
$tbtl = mysql_fetch_array(mysql_query('SELECT * FROM `battle` WHERE `id` = "'.$usr['battle'].'" AND `team_win` = "-1" LIMIT 1'));
|
||||
if( !isset($tbtl['id']) && $usr['battle'] > 0 ) {
|
||||
$usr['battle'] = 0;
|
||||
$sts['team'] = 0;
|
||||
mysql_query('UPDATE `users` SET `battle` = 0 WHERE `id` = "'.$usr['id'].'" LIMIT 1');
|
||||
if( $sts['hpNow'] < 1 ) {
|
||||
mysql_query('UPDATE `stats` SET `hpNow` = 1 WHERE `id` = "'.$usr['id'].'" LIMIT 1');
|
||||
}
|
||||
}
|
||||
|
||||
$btl_id = $magic->atackUser($u->info['id'],$usr['id'],$sts['team'],$usr['battle']);
|
||||
if( $btl_id > 0 ) {
|
||||
mysql_query('UPDATE `battle` SET `inTurnir` = "'.$bs['id'].'",`timeout` = "30" WHERE `id` = "'.$btl_id.'" LIMIT 1');
|
||||
}
|
||||
$me_real = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`align`,`clan`,`battle`,`level` FROM `users` WHERE `inUser` = "'.$u->info['id'].'" AND `login` = "'.$u->info['login'].'" LIMIT 1'));
|
||||
if( $usr['battle'] > 0 ) {
|
||||
$usr['battle'] = mysql_fetch_array(mysql_query('SELECT `id` FROM `battle` WHERE `id` = "'.$usr['battle'].'" AND `team_win` = "-1" LIMIT 1'));
|
||||
if( isset($usr['battle']['id']) ) {
|
||||
$usr['battle'] = $usr['battle']['id'];
|
||||
}else{
|
||||
$usr['battle'] = 0;
|
||||
}
|
||||
}
|
||||
if( $usr['battle'] > 0 ) {
|
||||
//Заносим в лог БС
|
||||
if( $u->info['sex'] == 0 ) {
|
||||
$text = '{u1} вмешался в поединок против {u2} <a target=_blank href=/logs.php?log='.$btl_id.' >»»</a>';
|
||||
}else{
|
||||
$text = '{u1} вмешалась в поединок против {u2} <a target=_blank href=/logs.php?log='.$btl_id.' >»»</a>';
|
||||
}
|
||||
}else{
|
||||
//Заносим в лог БС
|
||||
if( $u->info['sex'] == 0 ) {
|
||||
$text = '{u1} напал на {u2} завязался бой <a target=_blank href=/logs.php?log='.$btl_id.' >»»</a>';
|
||||
}else{
|
||||
$text = '{u1} напала на {u2} завязался бой <a target=_blank href=/logs.php?log='.$btl_id.' >»»</a>';
|
||||
}
|
||||
}
|
||||
if( isset($usr_real['id'])) {
|
||||
$usrreal = '';
|
||||
if( $usr_real['align'] > 0 ) {
|
||||
$usrreal .= '<img src=https://img.new-combats.com/i/align/align'.$usr_real['align'].'.gif width=12 height=15 >';
|
||||
}
|
||||
if( $usr_real['clan'] > 0 ) {
|
||||
$usrreal .= '<img src=https://img.new-combats.com/i/clan/'.$usr_real['clan'].'.gif width=24 height=15 >';
|
||||
}
|
||||
$usrreal .= '<b>'.$usr_real['login'].'</b>['.$usr_real['level'].']<a target=_blank href=/info/'.$usr_real['id'].' ><img width=12 hiehgt=11 src=https://img.new-combats.com/i/inf_capitalcity.gif ></a>';
|
||||
}else{
|
||||
$mereal = '<i>Невидимка</i>[??]';
|
||||
}
|
||||
if( isset($me_real['id']) ) {
|
||||
$mereal = '';
|
||||
if( $me_real['align'] > 0 ) {
|
||||
$mereal .= '<img src=https://img.new-combats.com/i/align/align'.$me_real['align'].'.gif width=12 height=15 >';
|
||||
}
|
||||
if( $me_real['clan'] > 0 ) {
|
||||
$mereal .= '<img src=https://img.new-combats.com/i/clan/'.$me_real['clan'].'.gif width=24 height=15 >';
|
||||
}
|
||||
$mereal .= '<b>'.$me_real['login'].'</b>['.$me_real['level'].']<a target=_blank href=/info/'.$me_real['id'].' ><img width=12 hiehgt=11 src=https://img.new-combats.com/i/inf_capitalcity.gif ></a>';
|
||||
}else{
|
||||
$mereal = '<i>Невидимка</i>[??]';
|
||||
}
|
||||
$text = str_replace('{u1}',$mereal,$text);
|
||||
$text = str_replace('{u2}',$usrreal,$text);
|
||||
//Добавляем в лог БС
|
||||
mysql_query('INSERT INTO `bs_logs` (`type`,`text`,`time`,`id_bs`,`count_bs`,`city`,`m`,`u`) VALUES (
|
||||
"1", "'.mysql_real_escape_string($text).'", "'.time().'", "'.$bs['id'].'", "'.$bs['count'].'", "'.$bs['city'].'",
|
||||
"'.round($bs['money']*0.85,2).'","'.$i.'"
|
||||
)');
|
||||
//
|
||||
unset($text,$usrreal,$mereal,$usr_real,$me_real);
|
||||
//
|
||||
header('location: main.php');
|
||||
}
|
||||
}else{
|
||||
$error = 'Персонаж не найден в этом турнире';
|
||||
}
|
||||
}
|
||||
$box = mysql_fetch_array(mysql_query('SELECT * FROM `bs_map` WHERE `mid` = "'.mysql_real_escape_string($bmid).'" AND `x` = "'.$u->info['x'].'" AND `y` = "'.$u->info['y'].'" LIMIT 1'));
|
||||
if( !isset($box['id']) ) {
|
||||
$box2 = mysql_fetch_array(mysql_query('SELECT * FROM `bs_map` WHERE `mid` = "'.mysql_real_escape_string($bmid).'" AND `y` = "'.$u->info['x'].'" AND `x` = "'.$u->info['y'].'" LIMIT 1'));
|
||||
if( isset($box2['id']) ) {
|
||||
$u->info['x'] = $box2['y'];
|
||||
$u->info['y'] = $box2['x'];
|
||||
mysql_query('UPDATE `stats` SET `x` = "'.$u->info['x'].'",`y` = "'.$u->info['y'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
$bot = $box2;
|
||||
}
|
||||
unset($box2);
|
||||
}
|
||||
if( !isset($box['id']) ) {
|
||||
//Клетка не найдена
|
||||
$map['name'] = 'Неизвестная локация: '.$u->info['x'].' . '.$u->info['y'];
|
||||
if( $u->info['x'] == 0 && $u->info['y'] == 0 ) {
|
||||
mysql_query('UPDATE `stats` SET `x` = "-3",`y` = "-8" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
header('location: main.php');
|
||||
die();
|
||||
}
|
||||
}else{
|
||||
//Действия на клетке
|
||||
$goto = false;
|
||||
if( isset($_GET['up']) ) {
|
||||
if( $box['up'] == 0 ) {
|
||||
$error = 'Проход не существует';
|
||||
}else{
|
||||
if( $box['up'] > 1 ) {
|
||||
$goto = mysql_fetch_array(mysql_query('SELECT `id` FROM `bs_map` WHERE `mid` = "'.mysql_real_escape_string($bmid).'" AND `id` = "'.mysql_real_escape_string($box['up']).'" LIMIT 1'));
|
||||
if( isset($goto['id']) ) {
|
||||
$goto = array( $goto['x'], $goto['y'] );
|
||||
}
|
||||
}else{
|
||||
$goto = array( $box['x'] - 1, $box['y'] );
|
||||
}
|
||||
}
|
||||
}elseif( isset($_GET['down']) ) {
|
||||
if( $box['down'] == 0 ) {
|
||||
$error = 'Проход не существует';
|
||||
}else{
|
||||
if( $box['down'] > 1 ) {
|
||||
$goto = mysql_fetch_array(mysql_query('SELECT `id` FROM `bs_map` WHERE `mid` = "'.mysql_real_escape_string($bmid).'" AND `id` = "'.mysql_real_escape_string($box['down']).'" LIMIT 1'));
|
||||
if( isset($goto['id']) ) {
|
||||
$goto = array( $goto['x'], $goto['y'] );
|
||||
}
|
||||
}else{
|
||||
$goto = array( $box['x'] + 1, $box['y'] );
|
||||
}
|
||||
}
|
||||
}elseif( isset($_GET['left']) ) {
|
||||
if( $box['left'] == 0 ) {
|
||||
$error = 'Проход не существует';
|
||||
}else{
|
||||
if( $box['left'] > 1 ) {
|
||||
$goto = mysql_fetch_array(mysql_query('SELECT `id` FROM `bs_map` WHERE `mid` = "'.mysql_real_escape_string($bmid).'" AND `id` = "'.mysql_real_escape_string($box['left']).'" LIMIT 1'));
|
||||
if( isset($goto['id']) ) {
|
||||
$goto = array( $goto['x'], $goto['y'] );
|
||||
}
|
||||
}else{
|
||||
$goto = array( $box['x'] , $box['y'] - 1);
|
||||
}
|
||||
}
|
||||
}elseif( isset($_GET['right']) ) {
|
||||
if( $box['right'] == 0 ) {
|
||||
$error = 'Проход не существует';
|
||||
}else{
|
||||
if( $box['right'] > 1 ) {
|
||||
$goto = mysql_fetch_array(mysql_query('SELECT `id` FROM `bs_map` WHERE `mid` = "'.mysql_real_escape_string($bmid).'" AND `id` = "'.mysql_real_escape_string($box['right']).'" LIMIT 1'));
|
||||
if( isset($goto['id']) ) {
|
||||
$goto = array( $goto['x'], $goto['y'] );
|
||||
}
|
||||
}else{
|
||||
$goto = array( $box['x'] , $box['y'] + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
if( $goto != false ) {
|
||||
$stop_s = mysql_fetch_array(mysql_query('SELECT * FROM `eff_users` WHERE `uid` = "'.$u->info['id'].'" AND `id_eff` = 2 AND `timeUse` > "'.time().'" LIMIT 1'));
|
||||
if($u->info['timeGo'] < time() ) {
|
||||
if(!$stop_s['id']) {
|
||||
$trap = mysql_fetch_array(mysql_query('SELECT * FROM `bs_trap` WHERE `bid` = "'.$bs['id'].'" AND `login` != "'.$u->info['login'].'" AND `count` = "'.$bs['count'].'" AND `x` = "'.$goto[0].'" AND `y` = "'.$goto[1].'" LIMIT 1'));
|
||||
if( isset($trap['id']) ) {
|
||||
if(rand(0, 100) < $trap['chance'] || $trap['chance'] == 0 ) {
|
||||
//Добавляем эффект и отнимаем НР
|
||||
$ptntew = rand(1, 10)*60;
|
||||
mysql_query('INSERT INTO `eff_users` (`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`,`img2`) VALUES (
|
||||
"2","'.$u->info['id'].'","Путы (Ловушка '.$trap['login'].')","puti='.(time()+$ptntew).'","1","'.(time()+$ptntew).'","chains.gif"
|
||||
) ');
|
||||
if( $u->stats['hpNow'] > floor($u->stats['hpAll']/100*33)) {
|
||||
$trap_hpmin = round($u->stats['hpNow']/2);
|
||||
$u->stats['hpNow'] = $u->stats['hpNow']-$trap_hpmin;
|
||||
mysql_query('UPDATE `stats` SET `hpNow` = "'.$u->stats['hpNow'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
}
|
||||
if( $u->stats['hpNow'] < 0 ) {
|
||||
$u->stats['hpNow'] = 0;
|
||||
}elseif( $u->stats['hpNow'] > $u->stats['hpAll'] ) {
|
||||
$u->stats['hpNow'] = $u->stats['hpAll'];
|
||||
}
|
||||
//Заносим в чат
|
||||
$rtxt = '[img[items/trap.gif]] Персонаж "'.$u->info['login'].'" угодил в ловушку поставленную "'.$trap['login'].'". <b>-'.$trap_hpmin.'</b> ['.round($u->stats['hpNow']).'/'.round($u->stats['hpAll']).']';
|
||||
mysql_query("INSERT INTO `chat` (`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`,`new`) VALUES ('".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1','1')");
|
||||
//Заносим в лог БС
|
||||
$me_real = mysql_fetch_array(mysql_query('SELECT `id`,`login`,`align`,`clan`,`battle`,`level` FROM `users` WHERE `inUser` = "'.$u->info['id'].'" AND `login` = "'.$u->info['login'].'" LIMIT 1'));
|
||||
//Заносим в лог БС
|
||||
if( $u->info['sex'] == 0 ) {
|
||||
$text = '{u1} угодил в ловушку поставленную {u2}';
|
||||
}else{
|
||||
$text = '{u1} угодила в ловушку поставленную {u2}';
|
||||
}
|
||||
if( isset($trap['id'])) {
|
||||
$usrreal = '';
|
||||
if( $trap['align'] > 0 ) {
|
||||
$usrreal .= '<img src=https://img.new-combats.com/i/align/align'.$trap['align'].'.gif width=12 height=15 >';
|
||||
}
|
||||
if( $trap['clan'] > 0 ) {
|
||||
$usrreal .= '<img src=https://img.new-combats.com/i/clan/'.$trap['clan'].'.gif width=24 height=15 >';
|
||||
}
|
||||
$usrreal .= '<b>'.$trap['login'].'</b>['.$trap['level'].']<a target=_blank href=/info/'.$trap['id'].' ><img width=12 hiehgt=11 src=https://img.new-combats.com/i/inf_capitalcity.gif ></a>';
|
||||
}else{
|
||||
$mereal = '<i>Невидимка</i>[??]';
|
||||
}
|
||||
if( isset($me_real['id']) ) {
|
||||
$mereal = '';
|
||||
if( $me_real['align'] > 0 ) {
|
||||
$mereal .= '<img src=https://img.new-combats.com/i/align/align'.$me_real['align'].'.gif width=12 height=15 >';
|
||||
}
|
||||
if( $me_real['clan'] > 0 ) {
|
||||
$mereal .= '<img src=https://img.new-combats.com/i/clan/'.$me_real['clan'].'.gif width=24 height=15 >';
|
||||
}
|
||||
$mereal .= '<b>'.$me_real['login'].'</b>['.$me_real['level'].']<a target=_blank href=/info/'.$me_real['id'].' ><img width=12 hiehgt=11 src=https://img.new-combats.com/i/inf_capitalcity.gif ></a>';
|
||||
}else{
|
||||
$mereal = '<i>Невидимка</i>[??]';
|
||||
}
|
||||
$text = str_replace('{u1}',$mereal,$text);
|
||||
$text = str_replace('{u2}',$usrreal,$text);
|
||||
//Добавляем в лог БС
|
||||
mysql_query('INSERT INTO `bs_logs` (`type`,`text`,`time`,`id_bs`,`count_bs`,`city`,`m`,`u`) VALUES (
|
||||
"2", "'.mysql_real_escape_string($text).'", "'.time().'", "'.$bs['id'].'", "'.$bs['count'].'", "'.$bs['city'].'",
|
||||
"'.round($bs['money']*0.85,2).'","'.$i.'"
|
||||
)');
|
||||
//
|
||||
unset($text,$usrreal,$mereal,$usr_real,$me_real);
|
||||
//Удаляем ловушку
|
||||
mysql_query('DELETE FROM `bs_trap` WHERE `id` = "'.$trap['id'].'" LIMIT 1');
|
||||
}
|
||||
}
|
||||
mysql_query('UPDATE `stats` SET `x` = "'.$goto[0].'" , `y` = "'.$goto[1].'" , `timeGo` = "'. ( time() + $box['timeGo'] ) .'" , `timeGoL` = "'. ( time() ) .'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
header('location: /main.php');
|
||||
die();
|
||||
} else {
|
||||
$error = "Вы в ловушке...";
|
||||
}
|
||||
}else{
|
||||
$error = 'Вы не можете так быстро перемещаться...';
|
||||
}
|
||||
}
|
||||
//Данные клетки
|
||||
$map['name'] = $box['name'];
|
||||
if( $box['up'] > 0 ) {
|
||||
$map['up']['i'] = '';
|
||||
$map['up']['js'] = '';
|
||||
}
|
||||
if( $box['left'] > 0 ) {
|
||||
$map['left']['i'] = '';
|
||||
$map['left']['js'] = '';
|
||||
}
|
||||
if( $box['right'] > 0 ) {
|
||||
$map['right']['i'] = '';
|
||||
$map['right']['js'] = '';
|
||||
}
|
||||
if( $box['down'] > 0 ) {
|
||||
$map['down']['i'] = '';
|
||||
$map['down']['js'] = '';
|
||||
}
|
||||
}
|
||||
if( $box['up'] > 0 ) {
|
||||
if( $box['up'] > 1 ) {
|
||||
$title_locs['up'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `bs_map` WHERE `mid` = "'.$box['mid'].'" AND `id` = "'.$box['up'].'" LIMIT 1'));
|
||||
}else{
|
||||
$title_locs['up'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `bs_map` WHERE `mid` = "'.$box['mid'].'" AND `x` = "'.($box['x']-1).'" AND `y` = "'.$box['y'].'" LIMIT 1'));
|
||||
}
|
||||
$title_locs['up'] = $title_locs['up']['name'];
|
||||
}
|
||||
if( $box['down'] > 0 ) {
|
||||
if( $box['down'] > 1 ) {
|
||||
$title_locs['down'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `bs_map` WHERE `mid` = "'.$box['mid'].'" AND `id` = "'.$box['down'].'" LIMIT 1'));
|
||||
}else{
|
||||
$title_locs['down'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `bs_map` WHERE `mid` = "'.$box['mid'].'" AND `x` = "'.($box['x']+1).'" AND `y` = "'.$box['y'].'" LIMIT 1'));
|
||||
}
|
||||
$title_locs['down'] = $title_locs['down']['name'];
|
||||
}
|
||||
if( $box['left'] > 0 ) {
|
||||
if( $box['left'] > 1 ) {
|
||||
$title_locs['left'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `bs_map` WHERE `mid` = "'.$box['mid'].'" AND `id` = "'.$box['left'].'" LIMIT 1'));
|
||||
}else{
|
||||
$title_locs['left'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `bs_map` WHERE `mid` = "'.$box['mid'].'" AND `y` = "'.($box['y']-1).'" AND `x` = "'.$box['x'].'" LIMIT 1'));
|
||||
}
|
||||
$title_locs['left'] = $title_locs['left']['name'];
|
||||
}
|
||||
if( $box['right'] > 0 ) {
|
||||
if( $box['right'] > 1 ) {
|
||||
$title_locs['right'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `bs_map` WHERE `mid` = "'.$box['mid'].'" AND `id` = "'.$box['right'].'" LIMIT 1'));
|
||||
}else{
|
||||
$title_locs['right'] = mysql_fetch_array(mysql_query('SELECT `id`,`name` FROM `bs_map` WHERE `mid` = "'.$box['mid'].'" AND `y` = "'.($box['y']+1).'" AND `x` = "'.$box['x'].'" LIMIT 1'));
|
||||
}
|
||||
$title_locs['right'] = $title_locs['right']['name'];
|
||||
}
|
||||
?>
|
||||
<script type="text/javascript" src="js/jquery.js"></script>
|
||||
<script>if(top.$('#autoRefOnline').attr('checked') == true && top.$('#chcf10').attr('checked') != true) {top.chat.reflesh();}</script>
|
||||
<div style="margin-right:20px;">
|
||||
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<? if(isset($u->error) && $u->error != ''){ ?>
|
||||
<tr>
|
||||
<td>
|
||||
<p style="float:right;"> <? if(isset($u->error)){ echo '<font color="red"><b>'.$u->error.'</b></font>'; } ?></p>
|
||||
</td>
|
||||
</tr>
|
||||
<? } ?>
|
||||
<tr>
|
||||
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<? if(isset($error2)){ echo '<font color="red"><b>'.$error2.'</b></font>'; } ?>
|
||||
<?
|
||||
echo $zv->userInfo();
|
||||
$sp = mysql_query('SELECT * FROM `bs_trap` WHERE `bid` = "'.$bs['id'].'" AND `count` = "'.$bs['count'].'" AND `login` = "'.$u->info['login'].'" AND `x` = "'.$u->info['x'].'" AND `y` = "'.$u->info['y'].'"');
|
||||
while($pl = mysql_fetch_array($sp)) {
|
||||
echo '<img title="Ваша ловушка. Вероятность: '.$pl['chance'].'%'."\r".''.date('d.m.Y H:i',$pl['time']).'" src="https://img.new-combats.com/i/items/trap.gif">';
|
||||
}
|
||||
if(isset($u->stats['puti'])) {
|
||||
echo '<br><img src="https://img.new-combats.com/i/items/chains.gif"> Вы не можете передвигаться еще '.$u->timeOut($u->stats['puti']-time()).' ';
|
||||
}
|
||||
echo '<script>top.lafstReg['.$u->info['id'].'] = 0; top.startHpRegen("main",'.$u->info['id'].','.(0+$u->stats['hpNow']).','.(0+$u->stats['hpAll']).','.(0+$u->stats['mpNow']).','.(0+$u->stats['mpAll']).','.(time()-$u->info['regHP']).','.(time()-$u->info['regMP']).','.(0+$u->rgd[0]).','.(0+$u->rgd[1]).',1);</script>';
|
||||
echo $bs_items;
|
||||
?>
|
||||
</td>
|
||||
<td width="530" height="260" align="right" valign="top"><table width="100%" border="0" align="right" cellpadding="10" cellspacing="0">
|
||||
<tr align="right" valign="top">
|
||||
<td>
|
||||
<? if(isset($error)){ echo '<font color="red"><b>'.$error.'</b></font>'; } ?>
|
||||
<h3 style="text-align:right"> <?=$map['name']?> </h3>
|
||||
<?
|
||||
if( $box['img'] != '' ) {
|
||||
echo '<img src="https://img.new-combats.com/i/tower/'.$box['img'].'">';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td width="80">
|
||||
<div align="center" style="padding:13px 5px 15px 5px;">
|
||||
<img style="cursor:pointer" onclick="top.atackTower();" src="https://img.new-combats.com/attack.gif" width="66" height="24" />
|
||||
</div>
|
||||
<table width="80" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><table width="80" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td colspan="3" align="center"><img src="https://img.new-combats.com/move/navigatin_46.gif" width="80" height="4" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" align="center"><table width="80" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="https://img.new-combats.com/move/navigatin_48.gif" width="9" height="8" /></td>
|
||||
<td width="100%" bgcolor="#000000">
|
||||
<div style="position:relative">
|
||||
<div style="position:absolute;top:-14px;left:-8px;"><? echo $goLis; ?></div>
|
||||
<script>$('#locobobr').css('display','none');</script>
|
||||
</div>
|
||||
</td>
|
||||
<td><img src="https://img.new-combats.com/move/navigatin_50.gif" width="7" height="8" /></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="https://img.new-combats.com/move/navigatin_51.gif" width="31" height="8" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://img.new-combats.com/move/navigatin_54.gif" width="9" height="20" /><img src="https://img.new-combats.com/move/navigatin_55i.gif" width="22" height="20" border="0" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a <?='title="'.$title_locs['left'].'"'?> <?=$map['left']['js']?> href="?left"><img src="https://img.new-combats.com/move/navigatin_59<?=$map['left']['i']?>.gif" width="21" height="20" border="0" /></a><img src="https://img.new-combats.com/move/navigatin_60.gif" width="10" height="20" border="0" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://img.new-combats.com/move/navigatin_63.gif" width="11" height="21" /><img src="https://img.new-combats.com/move/navigatin_64i.gif" width="20" height="21" border="0" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://img.new-combats.com/move/navigatin_68.gif" width="31" height="8" /></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><a <?='title="'.$title_locs['up'].'"'?> <?=$map['up']['js']?> href="?up"><img src="https://img.new-combats.com/move/navigatin_52<?=$map['up']['i']?>.gif" width="19" height="22" border="0" /></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="main.php"><img src="https://img.new-combats.com/move/navigatin_58.gif" width="19" height="33" border="0" o="o" /></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a <?='title="'.$title_locs['down'].'"'?> <?=$map['down']['js']?> href="?down"><img src="https://img.new-combats.com/move/navigatin_67<?=$map['down']['i']?>.gif" width="19" height="22" border="0" /></a></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td><img src="https://img.new-combats.com/move/navigatin_53.gif" width="30" height="8" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://img.new-combats.com/move/navigatin_56i.gif" width="21" height="20" border="0" /><img src="https://img.new-combats.com/move/navigatin_57.gif" width="9" height="20" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://img.new-combats.com/move/navigatin_61.gif" width="8" height="21" /><a <?='title="'.$title_locs['right'].'"'?> <?=$map['right']['js']?> href="?right"><img src="https://img.new-combats.com/move/navigatin_62<?=$map['right']['i']?>.gif" width="22" height="21" border="0" /></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://img.new-combats.com/move/navigatin_65i.gif" width="21" height="20" border="0" /><img src="https://img.new-combats.com/move/navigatin_66.gif" width="9" height="20" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://img.new-combats.com/move/navigatin_69.gif" width="30" height="8" /></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td nowrap="nowrap" id="moveto"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- <br /><span class="menutop"><nobr>Картинная галерея 2</nobr></span>--></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
Всего живых участников на данный момент: <b><?=($bs['users'])?></b><? if($bs['arhiv'] > 0) { ?> + <b><?=$bs['arhiv']?></b><? } ?>...
|
||||
<br />
|
||||
Тип турнира: <?
|
||||
$typbs = array(
|
||||
'Обычный',
|
||||
'Светлый',
|
||||
'Темный',
|
||||
'Быстрый',
|
||||
'Медленный',
|
||||
'Жадный',
|
||||
'Яростный',
|
||||
'Без НР'
|
||||
);
|
||||
echo $typbs[$bs['type_btl']];
|
||||
?>,
|
||||
История текущего <a target="_blank" href="/towerlog.php?id=<?=$bs['count']?>">турнира</a>.
|
||||
</td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?
|
||||
}
|
||||
?>
|
File diff suppressed because it is too large
Load Diff
@ -1,139 +0,0 @@
|
||||
<?php
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
}
|
||||
|
||||
if($u->room['file']=='ruletka')
|
||||
{
|
||||
?>
|
||||
<style type="text/css">
|
||||
|
||||
.pH3 { COLOR: #8f0000; FONT-FAMILY: Arial; FONT-SIZE: 12pt; FONT-WEIGHT: bold; }
|
||||
.class_ {
|
||||
font-weight: bold;
|
||||
color: #C5C5C5;
|
||||
cursor:pointer;
|
||||
}
|
||||
.class_st {
|
||||
font-weight: bold;
|
||||
color: #659BA3;
|
||||
cursor:pointer;
|
||||
}
|
||||
.class__ {
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
cursor:pointer;
|
||||
background-color: #659BA3;
|
||||
}
|
||||
.class__st {
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
cursor:pointer;
|
||||
background-color: #659BA3;
|
||||
font-size: 10px;
|
||||
}
|
||||
.class_old {
|
||||
font-weight: bold;
|
||||
color: #919191;
|
||||
cursor:pointer;
|
||||
}
|
||||
.class__old {
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
cursor:pointer;
|
||||
background-color: #838383;
|
||||
font-size: 10px;
|
||||
}
|
||||
td {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
|
||||
<TABLE width="100%" cellspacing="0" cellpadding="0">
|
||||
<tr><td valign="top"><div align="center" class="pH3">Рулетка</div>
|
||||
<br />
|
||||
<div align="center">
|
||||
<p>Рулетка работает в тестовом режиме. Вы можете потерять кр., возмещаться потери не будут.</p>
|
||||
<p>
|
||||
<object id="ruletka" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="940" height="340">
|
||||
<param name="movie" value="casino/ruletka.swf" />
|
||||
<param name="quality" value="high" />
|
||||
<param name="wmode" value="opaque" />
|
||||
<param name="swfversion" value="6.0.65.0" />
|
||||
<!-- Этот тег param предлагает пользователям Flash Player 6.0 r65 и более поздних версий загрузить последнюю версию Flash Player. Удалите его, если не хотите, чтобы пользователи видели запрос. -->
|
||||
<param name="expressinstall" value="Scripts/expressInstall.swf" />
|
||||
<param name="BGCOLOR" value="#dedfde" />
|
||||
<!-- Следующий тег object не поддерживается браузером Internet Explorer. Поэтому скройте его от Internet Explorer при помощи IECC. -->
|
||||
<!--[if !IE]>-->
|
||||
<object type="application/x-shockwave-flash" data="casino/ruletka.swf" width="940" height="340">
|
||||
<!--<![endif]-->
|
||||
<param name="quality" value="high" />
|
||||
<param name="wmode" value="opaque" />
|
||||
<param name="swfversion" value="6.0.65.0" />
|
||||
<param name="expressinstall" value="Scripts/expressInstall.swf" />
|
||||
<param name="BGCOLOR" value="#dedfde" />
|
||||
<!-- Браузер отображает следующее альтернативное содержимое для пользователей Flash Player 6.0 и более старых версий. -->
|
||||
<div>
|
||||
<h4>Для содержимого этой страницы требуется более новая версия Adobe Flash Player.</h4>
|
||||
<p><a href="https://www.adobe.com/go/getflashplayer"><img src="https://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Получить проигрыватель Adobe Flash Player" /></a></p>
|
||||
</div>
|
||||
<!--[if !IE]>-->
|
||||
</object>
|
||||
<!--<![endif]-->
|
||||
</object>
|
||||
</p>
|
||||
</div>
|
||||
<td width="280" align="left" valign="top">
|
||||
<TABLE cellspacing="0" cellpadding="0"><TD width="100%"> </TD><TD>
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr align="right" valign="top">
|
||||
<td>
|
||||
<!-- -->
|
||||
<? echo $goLis; ?>
|
||||
<!-- -->
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td nowrap="nowrap">
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
|
||||
<tr>
|
||||
<td bgcolor="#D3D3D3"><img src="https://img.new-combats.com/i/move/links.gif" width="9" height="7" /></td>
|
||||
<td bgcolor="#D3D3D3" nowrap><a href="#" id="greyText" class="menutop" onclick="location='main.php?loc=1.180.0.3&rnd=<? echo $code; ?>';" title="<? thisInfRm('1.180.0.3',1); ?>">Бойцовский клуб</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></table>
|
||||
</td></table>
|
||||
<small>
|
||||
<p align="left">Банк казино: <b><?
|
||||
$mn = 0; $mz = 0;
|
||||
|
||||
|
||||
$sm = $u->testAction('`city` = "'.$u->info['city'].'" AND `vars` = "casino_balance" LIMIT 1',1);
|
||||
if(!isset($sm['id'])) {
|
||||
$u->addAction(time(),'casino_balance',0);
|
||||
}else{
|
||||
$mn += $sm['vals'];
|
||||
}
|
||||
|
||||
$sp = mysql_query('SELECT `money`,`end` FROM `ruletka_coin` WHERE `money` > 0 AND `end` > 0');
|
||||
while($pl = mysql_fetch_array($sp))
|
||||
{
|
||||
if($pl['end']>0)
|
||||
{
|
||||
$mz += $pl['money'];
|
||||
}
|
||||
}
|
||||
echo ($mn);
|
||||
?> кр.</b></p></small></td>
|
||||
</table>
|
||||
<br>
|
||||
<div id="textgo" style="visibility:hidden;"></div>
|
||||
<?
|
||||
}
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
swfobject.registerObject("ruletka");
|
||||
</script>
|
File diff suppressed because it is too large
Load Diff
@ -1,68 +1,70 @@
|
||||
<?
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
if ($p['deletInfo'] == 1) {
|
||||
$tm = (int)$_POST['time'];
|
||||
if ($tm != 1 && $tm != 7 && $tm != 14 && $tm != 30 && $tm != 60) {
|
||||
$uer = 'Неверно указаны данные';
|
||||
} else {
|
||||
$uu = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `users` WHERE `login` = "' . mysql_real_escape_string($_POST['logingo']) . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($uu['id'])) {
|
||||
if ($uu['info_delete'] != 1 && $uu['info_delete'] < time()) {
|
||||
$srok = [
|
||||
1 => 'бессрочно',
|
||||
7 => 'неделя',
|
||||
14 => 'две недели',
|
||||
30 => 'месяц',
|
||||
60 => 'два месяца',
|
||||
];
|
||||
$srok = $srok[$tm];
|
||||
if ($tm == 1) {
|
||||
$tm = '`info_delete` = "1"';
|
||||
} elseif ($tm == 7) {
|
||||
$tm = '`info_delete` = "' . (time() + 7 * 86400) . '"';
|
||||
} elseif ($tm == 14) {
|
||||
$tm = '`info_delete` = "' . (time() + 14 * 86400) . '"';
|
||||
} elseif ($tm == 30) {
|
||||
$tm = '`info_delete` = "' . (time() + 30 * 86400) . '"';
|
||||
} elseif ($tm == 60) {
|
||||
$tm = '`info_delete` = "' . (time() + 60 * 86400) . '"';
|
||||
}
|
||||
$upd = mysql_query('UPDATE `users` SET ' . $tm . ' WHERE `id` = "' . $uu['id'] . '" LIMIT 1');
|
||||
if ($upd) {
|
||||
$sx = '';
|
||||
if ($u->info['sex'] == 1) {
|
||||
$sx = 'а';
|
||||
}
|
||||
$rtxt = '[img[items/cui.gif]] ' . $rang . ' "' . $u->info['login'] . '" использовал' . $sx . ' заклятие обезличивание на "' . $uu['login'] . '" сроком ' . $srok;
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
|
||||
$rtxt = $rang . ' "' . $u->info['login'] . '" использовал' . $sx . ' заклятие "<b>обезличивание</b>", сроком ' . $srok . '.';
|
||||
mysql_query(
|
||||
"INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('" . $uu['id'] . "','" . $_SERVER['REMOTE_ADDR'] . "','" . $u->info['city'] . "','" . time(
|
||||
) . "','" . $rtxt . "','" . $u->info['login'] . "',0)"
|
||||
);
|
||||
$uer = 'Вы успешно использовали заклятие обезличивания на персонажа "' . $uu['login'] . '".<br>';
|
||||
} else {
|
||||
$uer = 'Не удалось использовать данное заклятие';
|
||||
}
|
||||
} else {
|
||||
$uer = 'Персонаж уже обезличен';
|
||||
}
|
||||
} else {
|
||||
$uer = 'Персонаж не найден в этом городе';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$uer = 'У Вас нет прав на использование данного заклятия';
|
||||
}
|
||||
if($p['deletInfo']==1)
|
||||
{
|
||||
$tm = (int)$_POST['time'];
|
||||
if($tm!=1 && $tm!=7 && $tm!=14 && $tm!=30 && $tm!=60)
|
||||
{
|
||||
$uer = 'Неверно указаны данные';
|
||||
}else{
|
||||
$uu = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['logingo']).'" LIMIT 1'));
|
||||
if(isset($uu['id']))
|
||||
{
|
||||
if($uu['info_delete']!=1 && $uu['info_delete']<time())
|
||||
{
|
||||
$srok = array(
|
||||
1=>'бессрочно',
|
||||
7=>'неделя',
|
||||
14=>'две недели',
|
||||
30=>'месяц',
|
||||
60=>'два месяца'
|
||||
);
|
||||
$srok = $srok[$tm];
|
||||
if($tm==1)
|
||||
{
|
||||
$tm = '`info_delete` = "1"';
|
||||
}elseif($tm==7)
|
||||
{
|
||||
$tm = '`info_delete` = "'.(time()+7*86400).'"';
|
||||
}elseif($tm==14)
|
||||
{
|
||||
$tm = '`info_delete` = "'.(time()+14*86400).'"';
|
||||
}elseif($tm==30)
|
||||
{
|
||||
$tm = '`info_delete` = "'.(time()+30*86400).'"';
|
||||
}elseif($tm==60)
|
||||
{
|
||||
$tm = '`info_delete` = "'.(time()+60*86400).'"';
|
||||
}
|
||||
$upd = mysql_query('UPDATE `users` SET '.$tm.' WHERE `id` = "'.$uu['id'].'" LIMIT 1');
|
||||
if($upd)
|
||||
{
|
||||
$sx = '';
|
||||
if($u->info['sex']==1)
|
||||
{
|
||||
$sx = 'а';
|
||||
}
|
||||
$rtxt = '[img[items/cui.gif]] '.$rang.' "'.$u->info['login'].'" использовал'.$sx.' заклятие обезличивание на "'.$uu['login'].'" сроком '.$srok;
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES ('".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" использовал'.$sx.' заклятие "<b>обезличивание</b>", сроком '.$srok.'.';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно использовали заклятие обезличивания на персонажа "'.$uu['login'].'".<br>';
|
||||
}else{
|
||||
$uer = 'Не удалось использовать данное заклятие';
|
||||
}
|
||||
}else{
|
||||
$uer = 'Персонаж уже обезличен';
|
||||
}
|
||||
}else{
|
||||
$uer = 'Персонаж не найден в этом городе';
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$uer = 'У Вас нет прав на использование данного заклятия';
|
||||
}
|
||||
?>
|
@ -1,67 +1,73 @@
|
||||
<?
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
if ($p['haos'] == 1) {
|
||||
$tm = (int)$_POST['time'];
|
||||
$tmban = [7 => 'одна неделя', 14 => 'две недели', 30 => 'один месяц', 60 => 'два месяца', 1 => 'бессрочно'];
|
||||
if ($tm != 7 && $tm != 14 && $tm != 30 && $tm != 60 && ($tm != 1 || ($p['haosInf'] == 0 && $tm == 1))) {
|
||||
$uer = 'Неверно указано время наказания';
|
||||
} else {
|
||||
$uu = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `users` WHERE `login` = "' . mysql_real_escape_string($_POST['logingo']) . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($uu['id'])) {
|
||||
if ($uu['align'] > 1 && $uu['align'] < 2 && $u->info['admin'] == 0) {
|
||||
$uer = 'Вы не можете отправлять Паладина в хаос';
|
||||
} elseif ($uu['align'] > 3 && $uu['align'] < 4 && $u->info['admin'] == 0) {
|
||||
$uer = 'Вы не можете отправлять Тармана в хаос';
|
||||
} elseif ($uu['align'] == 2) {
|
||||
$uer = 'Персонаж был ранее отправлен в хаос';
|
||||
} elseif ($uu['admin'] > 0 && $u->info['admin'] == 0) {
|
||||
$uer = 'Вы не можете отправлять Ангелов в хаос';
|
||||
} elseif ($uu['city'] != $u->info['city'] && $p['citym1'] == 0) {
|
||||
$uer = 'Персонаж находится в другом городе';
|
||||
} elseif (floor($uu['align']) == $a && $uu['align'] > $u->info['align'] && $u->info['admin'] == 0) {
|
||||
$uer = 'Вы не можете накладывать заклятие на старших по званию';
|
||||
} elseif ($uu['id'] == $u->info['id'] && $u->info['admin'] == 0) {
|
||||
$uer = 'Вы не можете накладывать заклятие на самого себя';
|
||||
} else {
|
||||
$th = time() + ($tm * 24 * 60 * 60);
|
||||
if ($tm == 1) {
|
||||
$th = 1;
|
||||
}
|
||||
$upd = mysql_query(
|
||||
'UPDATE `users` SET `align` = "2",`clan` = "0",`haos` = "' . mysql_real_escape_string(
|
||||
$th
|
||||
) . '" WHERE `id` = "' . $uu['id'] . '" LIMIT 1'
|
||||
);
|
||||
if ($upd) {
|
||||
$sx = '';
|
||||
if ($u->info['sex'] == 1) {
|
||||
$sx = 'а';
|
||||
}
|
||||
mysql_query('UPDATE `users_delo` SET `hb` = "0" WHERE `uid` = "' . $uu['id'] . '" AND `hb`!="0"');
|
||||
$rtxt = '[img[items/pal_button4.gif]] ' . $rang . ' "' . $u->info['login'] . '" отправил' . $sx . ' персонажа "' . $uu['login'] . '" в хаос на срок: ' . $tmban[$tm] . '';
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
|
||||
$rtxt = $rang . ' "' . $u->info['login'] . '" отправил' . $sx . ' в "<b>хаос</b>" на срок: ' . $tmban[$tm] . '.';
|
||||
mysql_query(
|
||||
"INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('" . $uu['id'] . "','" . $_SERVER['REMOTE_ADDR'] . "','" . $u->info['city'] . "','" . time(
|
||||
) . "','" . $rtxt . "','" . $u->info['login'] . "',0)"
|
||||
);
|
||||
$uer = 'Вы успешно отправили персонажа "' . $uu['login'] . '" в хаос на срок: ' . $tmban[$tm] . '.';
|
||||
} else {
|
||||
$uer = 'Не удалось использовать данное заклятие';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$uer = 'Персонаж не найден в этом городе';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$uer = 'У Вас нет прав на использование данного заклятия';
|
||||
}
|
||||
if($p['haos']==1)
|
||||
{
|
||||
$tm = (int)$_POST['time'];
|
||||
$tmban = array(7=>'одна неделя',14=>'две недели',30=>'один месяц',60=>'два месяца',1=>'бессрочно');
|
||||
if($tm!=7 && $tm!=14 && $tm!=30 && $tm!=60 && ($tm!=1 || ($p['haosInf']==0 && $tm==1)))
|
||||
{
|
||||
$uer = 'Неверно указано время наказания';
|
||||
}else{
|
||||
$uu = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['logingo']).'" LIMIT 1'));
|
||||
if(isset($uu['id']))
|
||||
{
|
||||
if($uu['align']>1 && $uu['align']<2 && $u->info['admin']==0)
|
||||
{
|
||||
$uer = 'Вы не можете отправлять Паладина в хаос';
|
||||
}elseif($uu['align']>3 && $uu['align']<4 && $u->info['admin']==0)
|
||||
{
|
||||
$uer = 'Вы не можете отправлять Тармана в хаос';
|
||||
}elseif($uu['align']==2)
|
||||
{
|
||||
$uer = 'Персонаж был ранее отправлен в хаос';
|
||||
}elseif($uu['admin']>0 && $u->info['admin']==0)
|
||||
{
|
||||
$uer = 'Вы не можете отправлять Ангелов в хаос';
|
||||
}elseif($uu['city']!=$u->info['city'] && $p['citym1']==0){
|
||||
$uer = 'Персонаж находится в другом городе';
|
||||
}elseif(floor($uu['align'])==$a && $uu['align']>$u->info['align'] && $u->info['admin']==0)
|
||||
{
|
||||
$uer = 'Вы не можете накладывать заклятие на старших по званию';
|
||||
}elseif($uu['id']==$u->info['id'] && $u->info['admin']==0){
|
||||
$uer = 'Вы не можете накладывать заклятие на самого себя';
|
||||
}else{
|
||||
$th = time()+($tm*24*60*60);
|
||||
if($tm==1)
|
||||
{
|
||||
$th = 1;
|
||||
}
|
||||
$upd = mysql_query('UPDATE `users` SET `align` = "2",`clan` = "0",`haos` = "'.mysql_real_escape_string($th).'" WHERE `id` = "'.$uu['id'].'" LIMIT 1');
|
||||
if($upd)
|
||||
{
|
||||
$sx = '';
|
||||
if($u->info['sex']==1)
|
||||
{
|
||||
$sx = 'а';
|
||||
}
|
||||
mysql_query('UPDATE `users_delo` SET `hb` = "0" WHERE `uid` = "'.$uu['id'].'" AND `hb`!="0"');
|
||||
$rtxt = '[img[items/pal_button4.gif]] '.$rang.' "'.$u->info['login'].'" отправил'.$sx.' персонажа "'.$uu['login'].'" в хаос на срок: '.$tmban[$tm].'';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" отправил'.$sx.' в "<b>хаос</b>" на срок: '.$tmban[$tm].'.';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно отправили персонажа "'.$uu['login'].'" в хаос на срок: '.$tmban[$tm].'.';
|
||||
}else{
|
||||
$uer = 'Не удалось использовать данное заклятие';
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$uer = 'Персонаж не найден в этом городе';
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$uer = 'У Вас нет прав на использование данного заклятия';
|
||||
}
|
||||
?>
|
@ -57,7 +57,14 @@ if (!isset($u->info['room']) OR !isset($u->info['id']) OR $toUser == '') {
|
||||
if ($upd_d) $dngo = true;
|
||||
if ($u->info['sex'] == 1) $sx = 'а'; else $sx = '';
|
||||
$rtxt = '[img[items/teleport-cometome.gif]] ' . $rang . ' "' . $u->info['cast_login'] . '" телепортировал' . $sx . ' персонажа "' . $uu['login'] . '" к себе в ' . ($action == 'to-fight' ? "поединок" . ($dngo == true ? " и пещеру." : "") : ($action == 'to-dungeon' ? "подземелье" : "комнату")) . '.';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'" . $u->info['city'] . "','" . $u->info['room'] . "','','','" . $rtxt . "','" . time() . "','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
|
||||
$uer = 'Вы успешно телепортировали к себе персонажа "' . $uu['login'] . '" в <b>' . ($action == 'to-fight' ? "поединок" : ($action == 'to-dungeon' ? "подземелье" : "комнату")) . '</b>.';
|
||||
} else {
|
||||
|
@ -41,7 +41,14 @@ if(!defined('GAME'))
|
||||
$sx = 'а';
|
||||
}
|
||||
$rtxt = '[img[items/teleport.gif]] '.$rang.' "'.$u->info['cast_login'].'" телепортировал'.$sx.' персонажа "'.$uu['login'].'" в [img[city_ico/'.$cgo.'.gif]] '.$u->city_name[$cgo].'.';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" телепортировал'.$sx.' в "<b>'.$u->city_name[$cgo].'</b>".';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',5)");
|
||||
$uer = 'Вы успешно телепортировали персонажа "'.$uu['login'].'" в <b>'.$u->city_name[$cgo].'</b>.';
|
||||
|
@ -36,7 +36,14 @@ if($p['priemIskl']==1)
|
||||
|
||||
mysql_query('UPDATE `users_delo` SET `hb` = "0" WHERE `uid` = "'.$uu['id'].'" AND `hb`!="0"');
|
||||
$rtxt = '[img[items/unpal'.$zvimg.'.gif]] '.$rang.' "'.$u->info['cast_login'].'" лишил'.$sx.' "'.$uu['login'].'" звания "'.$zvna2.'"';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" лишил'.$sx.' звания "'.$zvna2.'".';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно сняли знак '.$zvna.' с персонажа "'.$uu['login'].'".<br>';
|
||||
|
@ -19,7 +19,14 @@ if($p['deletInfo']==1)
|
||||
$sx = 'а';
|
||||
}
|
||||
$rtxt = '[img[items/uncui.gif]] '.$rang.' "'.$u->info['cast_login'].'" снял'.$sx.' заклятие обезличивание с персонажа "'.$uu['login'].'"';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" снял'.$sx.' заклятие "<b>обезличивание</b>".';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно сняли заклятие обезличивания с персонажа "'.$uu['login'].'".<br>';
|
||||
|
@ -46,7 +46,14 @@ if($p['zatoch']==1 || $p['citym1']==1)
|
||||
}
|
||||
mysql_query('UPDATE `items_users` SET `delete` = "1357908642" WHERE `uid` = '.$uu['id'].' AND `delete` = 0');
|
||||
$rtxt = '[img[items/jail.gif]] '.$rang.' "'.$u->info['cast_login'].'" отправил'.$sx.' в заточение "'.$uu['login'].'", сроком '.$srokt[$tm].'';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" отправил'.$sx.' в "<b>заточение</b>" сроком '.$srokt[$tm].'.';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',6)");
|
||||
$uer = 'Вы успешно посадили в тюрьму персонажа "'.$uu['login'].'", сроком '.$srok[$tm].'.';
|
||||
|
@ -27,7 +27,14 @@ if($p['usealign1']==1 && $u->info['admin'] > 0)
|
||||
$sx = 'а';
|
||||
}
|
||||
$rtxt = '[img[items/pal_button1.gif]] '.$rang.' "'.$u->info['cast_login'].'" присвоил'.$sx.' светлую склонность персонажу "'.$uu['login'].'"';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" приствоил'.$sx.' светлую склонность персонажу.';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно присвоили светлую склонность персонажу "'.$uu['login'].'".';
|
||||
|
@ -27,7 +27,14 @@ if($p['usealign3']==1 && $u->info['admin'] > 0)
|
||||
$sx = 'а';
|
||||
}
|
||||
$rtxt = '[img[items/pal_button[dark].gif]] '.$rang.' "'.$u->info['cast_login'].'" присвоил'.$sx.' темную склонность персонажу "'.$uu['login'].'"';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" приствоил'.$sx.' темную склонность персонажу.';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно присвоили темную склонность персонажу "'.$uu['login'].'".';
|
||||
|
@ -27,7 +27,14 @@ if($p['usealign7']==1 && $u->info['admin'] > 0)
|
||||
$sx = 'а';
|
||||
}
|
||||
$rtxt = '[img[items/palbuttonneutralsv3.gif]] '.$rang.' "'.$u->info['cast_login'].'" присвоил'.$sx.' нейтральную склонность персонажу "'.$uu['login'].'"';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" приствоил'.$sx.' нейтральную склонность персонажу.';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно присвоили нейтральную склонность персонажу "'.$uu['login'].'".';
|
||||
|
@ -55,7 +55,14 @@ if($p['attack']==1)
|
||||
$rtxt = '[img[items/pal_button8.gif]] '.$rang.' "'.$u->info['cast_login'].'" совершил'.$sx.' нападение на персонажа "'.$uu['login'].'".';
|
||||
if ($goodt>0)
|
||||
{
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
}
|
||||
unset($goodt);
|
||||
header('location: main.php');
|
||||
@ -73,7 +80,14 @@ if($p['attack']==1)
|
||||
$sx = 'а';
|
||||
}
|
||||
$rtxt = '[img[items/cure3.gif]] '.$rang.' "'.$u->info['cast_login'].'" излечил'.$sx.' персонажа "'.$uu['login'].'" от травм.';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" излечил'.$sx.' от травм';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно излечили персонажу "'.$uu['login'].'" от травм.';
|
||||
|
@ -40,7 +40,14 @@ if($p['banned']==1 || $p['ban0']==1)
|
||||
}
|
||||
$rtxt = '[img[items/pal_button6.gif]] '.$rang.' "'.$u->info['cast_login'].'" наложил'.$sx.' заклятие смерти на "'.$uu['login'].'"';
|
||||
mysql_query("UPDATE `chat` SET `delete` = 1 WHERE `login` = '".$uu['login']."' LIMIT 1000");
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" наложил'.$sx.' заклятие "<b>смерти</b>".';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно наложили заклятие смерти на персонажа "'.$uu['login'].'".';
|
||||
|
@ -1,68 +1,70 @@
|
||||
<?
|
||||
if(!defined('GAME'))
|
||||
{
|
||||
die();
|
||||
<?php
|
||||
if (!defined('GAME')) {
|
||||
die();
|
||||
}
|
||||
if ($p['deletInfo'] == 1) {
|
||||
$tm = (int)$_POST['time'];
|
||||
if ($tm != 1 && $tm != 7 && $tm != 14 && $tm != 30 && $tm != 60) {
|
||||
$uer = 'Неверно указаны данные';
|
||||
} else {
|
||||
$uu = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT * FROM `users` WHERE `login` = "' . mysql_real_escape_string($_POST['logingo']) . '" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (isset($uu['id'])) {
|
||||
if ($uu['info_delete'] != 1 && $uu['info_delete'] < time()) {
|
||||
$srok = [
|
||||
1 => 'бессрочно',
|
||||
7 => 'неделя',
|
||||
14 => 'две недели',
|
||||
30 => 'месяц',
|
||||
60 => 'два месяца',
|
||||
];
|
||||
$srok = $srok[$tm];
|
||||
if ($tm == 1) {
|
||||
$tm = '`info_delete` = "1"';
|
||||
} elseif ($tm == 7) {
|
||||
$tm = '`info_delete` = "' . (time() + 7 * 86400) . '"';
|
||||
} elseif ($tm == 14) {
|
||||
$tm = '`info_delete` = "' . (time() + 14 * 86400) . '"';
|
||||
} elseif ($tm == 30) {
|
||||
$tm = '`info_delete` = "' . (time() + 30 * 86400) . '"';
|
||||
} elseif ($tm == 60) {
|
||||
$tm = '`info_delete` = "' . (time() + 60 * 86400) . '"';
|
||||
}
|
||||
$upd = mysql_query('UPDATE `users` SET ' . $tm . ' WHERE `id` = "' . $uu['id'] . '" LIMIT 1');
|
||||
if ($upd) {
|
||||
$sx = '';
|
||||
if ($u->info['sex'] == 1) {
|
||||
$sx = 'а';
|
||||
}
|
||||
$rtxt = '[img[items/cui.gif]] ' . $rang . ' "' . $u->info['cast_login'] . '" использовал' . $sx . ' заклятие обезличивание на "' . $uu['login'] . '" сроком ' . $srok;
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
|
||||
$rtxt = $rang . ' "' . $u->info['login'] . '" использовал' . $sx . ' заклятие "<b>обезличивание</b>", сроком ' . $srok . '.';
|
||||
mysql_query(
|
||||
"INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('" . $uu['id'] . "','" . $_SERVER['REMOTE_ADDR'] . "','" . $u->info['city'] . "','" . time(
|
||||
) . "','" . $rtxt . "','" . $u->info['login'] . "',0)"
|
||||
);
|
||||
$uer = 'Вы успешно использовали заклятие обезличивания на персонажа "' . $uu['login'] . '".<br>';
|
||||
} else {
|
||||
$uer = 'Не удалось использовать данное заклятие';
|
||||
}
|
||||
} else {
|
||||
$uer = 'Персонаж уже обезличен';
|
||||
}
|
||||
} else {
|
||||
$uer = 'Персонаж не найден в этом городе';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$uer = 'У Вас нет прав на использование данного заклятия';
|
||||
}
|
||||
if($p['deletInfo']==1)
|
||||
{
|
||||
$tm = (int)$_POST['time'];
|
||||
if($tm!=1 && $tm!=7 && $tm!=14 && $tm!=30 && $tm!=60)
|
||||
{
|
||||
$uer = 'Неверно указаны данные';
|
||||
}else{
|
||||
$uu = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['logingo']).'" LIMIT 1'));
|
||||
if(isset($uu['id']))
|
||||
{
|
||||
if($uu['info_delete']!=1 && $uu['info_delete']<time())
|
||||
{
|
||||
$srok = array(
|
||||
1=>'бессрочно',
|
||||
7=>'неделя',
|
||||
14=>'две недели',
|
||||
30=>'месяц',
|
||||
60=>'два месяца'
|
||||
);
|
||||
$srok = $srok[$tm];
|
||||
if($tm==1)
|
||||
{
|
||||
$tm = '`info_delete` = "1"';
|
||||
}elseif($tm==7)
|
||||
{
|
||||
$tm = '`info_delete` = "'.(time()+7*86400).'"';
|
||||
}elseif($tm==14)
|
||||
{
|
||||
$tm = '`info_delete` = "'.(time()+14*86400).'"';
|
||||
}elseif($tm==30)
|
||||
{
|
||||
$tm = '`info_delete` = "'.(time()+30*86400).'"';
|
||||
}elseif($tm==60)
|
||||
{
|
||||
$tm = '`info_delete` = "'.(time()+60*86400).'"';
|
||||
}
|
||||
$upd = mysql_query('UPDATE `users` SET '.$tm.' WHERE `id` = "'.$uu['id'].'" LIMIT 1');
|
||||
if($upd)
|
||||
{
|
||||
$sx = '';
|
||||
if($u->info['sex']==1)
|
||||
{
|
||||
$sx = 'а';
|
||||
}
|
||||
$rtxt = '[img[items/cui.gif]] '.$rang.' "'.$u->info['cast_login'].'" использовал'.$sx.' заклятие обезличивание на "'.$uu['login'].'" сроком '.$srok;
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES ('".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" использовал'.$sx.' заклятие "<b>обезличивание</b>", сроком '.$srok.'.';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно использовали заклятие обезличивания на персонажа "'.$uu['login'].'".<br>';
|
||||
}else{
|
||||
$uer = 'Не удалось использовать данное заклятие';
|
||||
}
|
||||
}else{
|
||||
$uer = 'Персонаж уже обезличен';
|
||||
}
|
||||
}else{
|
||||
$uer = 'Персонаж не найден в этом городе';
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$uer = 'У Вас нет прав на использование данного заклятия';
|
||||
}
|
||||
?>
|
@ -50,7 +50,14 @@ if($p['haos']==1)
|
||||
}
|
||||
mysql_query('UPDATE `users_delo` SET `hb` = "0" WHERE `uid` = "'.$uu['id'].'" AND `hb`!="0"');
|
||||
$rtxt = '[img[items/pal_button4.gif]] '.$rang.' "'.$u->info['cast_login'].'" отправил'.$sx.' персонажа "'.$uu['login'].'" в хаос на срок: '.$tmban[$tm].'';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" отправил'.$sx.' в "<b>хаос</b>" на срок: '.$tmban[$tm].'.';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно отправили персонажа "'.$uu['login'].'" в хаос на срок: '.$tmban[$tm].'.';
|
||||
|
@ -23,7 +23,14 @@ if($p['heal'] == 1)
|
||||
$sx = 'а';
|
||||
}
|
||||
$rtxt = '[img[items/cureHP120.gif]] '.$rang.' "'.$u->info['cast_login'].'" восстановил'.$sx.' здоровье персонажа "'.$uu['login'].'"';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$uer = 'Вы успешно восстановили здоровье персонажа "'.$uu['login'].'".';
|
||||
}else{
|
||||
$uer = 'Не удалось использовать данное заклятие';
|
||||
|
@ -115,7 +115,14 @@ if($p['nick']==1)
|
||||
$sx = 'а';
|
||||
}
|
||||
$rtxt = '[img[items/nick.gif]] '.$rang.' "'.$u->info['cast_login'].'" сменил'.$sx.' логин персонажа "'.$uu['login_last'].'" на "'.$uu['login'].'"';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" сменил'.$sx.' логин сперсонажа с "'.$uu['login_last'].'" на "'.$uu['login'].'".';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно сменили логин персонажа "'.$uu['login_last'].'" на '.$uu['login'].'.';
|
||||
|
@ -40,7 +40,14 @@ if($p['m1']==1 || $p['citym1']==1)
|
||||
$sx = 'а';
|
||||
}
|
||||
$rtxt = '[img[items/silence'.round($tm).'.gif]] '.$rang.' "'.$u->info['cast_login'].'" наложил'.$sx.' заклятие молчания на "'.$uu['login'].'", сроком '.$srok[$tm].'';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" наложил'.$sx.' заклятие "<b>молчания</b>" сроком '.$srok[$tm].'.';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно наложили заклятие молчания на персонажа '.$uu['login'].'", сроком '.$srok[$tm].'.';
|
||||
|
@ -33,7 +33,14 @@ if($p['m2']==1 || $p['citym2']==1)
|
||||
$sx = 'а';
|
||||
}
|
||||
$rtxt = '[img[items/sleepf.gif]] '.$rang.' "'.$u->info['cast_login'].'" наложил'.$sx.' заклятие форумного молчания на "'.$uu['login'].'", сроком '.$srok[$tm].'';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" наложил'.$sx.' заклятие "<b>форумного молчания</b>" сроком '.$srok[$tm].'.';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно наложили заклятие форумного молчания на персонажа "'.$uu['login'].'", сроком '.$srok[$tm].'.';
|
||||
|
@ -46,7 +46,14 @@ if($p['marry']==1)
|
||||
$rtxt = '[img[items/marry.gif]] '.$rang.' "'.$u->info['cast_login'].'" подтвердил'.$sx.' законность брака между "'.$uu['login'].'" и "'.$uu2['login'].'".';
|
||||
|
||||
mysql_query("UPDATE `chat` SET `delete` = 1 WHERE `login` = '".$uu['login']."' LIMIT 1000");
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" подтвердил'.$sx.' законность брака с '.$uu2['id'].'.';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" подтвердил'.$sx.' законность брака с '.$uu['id'].'.';
|
||||
|
@ -23,7 +23,14 @@ if($p['heal'] == 1)
|
||||
$sx = 'а';
|
||||
}
|
||||
$rtxt = '[img[items/cureMana1000.gif]] '.$rang.' "'.$u->info['cast_login'].'" восстановил'.$sx.' ману персонажа "'.$uu['login'].'"';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$uer = 'Вы успешно восстановили ману персонажа "'.$uu['login'].'".';
|
||||
}else{
|
||||
$uer = 'Не удалось использовать данное заклятие';
|
||||
|
@ -34,7 +34,14 @@ if($p['usenoper']==1)
|
||||
$sx = 'а';
|
||||
}
|
||||
$rtxt = '[img[items/mod/magic2.gif]] '.$rang.' "'.$u->info['cast_login'].'" наложил'.$sx.' запрет на передачи с "'.$uu['login'].'"';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" наложил'.$sx.' запрет на "<b>передачи</b>".';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно наложили запрет на передачи с персонажа "'.$uu['login'].'".';
|
||||
|
@ -34,7 +34,14 @@ if($p['usenoper']==1)
|
||||
$sx = 'а';
|
||||
}
|
||||
$rtxt = '[img[items/mod/magic2.gif]] '.$rang.' "'.$u->info['cast_login'].'" наложил'.$sx.' полный запрет на передачи с "'.$uu['login'].'"';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" наложил'.$sx.' полный запрет на "<b>передачи</b>".';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно наложили полный запрет на передачи с персонажа "'.$uu['login'].'".';
|
||||
|
@ -36,7 +36,14 @@ if($p['proverka']==1)
|
||||
}
|
||||
$rtxt = '[img[items/check.gif]] '.$rang.' "'.$u->info['cast_login'].'" подтвердил'.$sx.' что персонаж "'.$uu['login'].'" чист перед законом. (До '.date('d.m.Y H:i',$uu['palpro']).').';
|
||||
//mysql_query("UPDATE `chat` SET `delete` = 1 WHERE `login` = '".$uu['login']."' LIMIT 1000");
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" подтвердил'.$sx.' проверку на чистоту до <b>'.date('d.m.Y H:i',$uu['palpro']).'</b>.';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно поставили пометку о чистоте персонажа "'.$uu['login'].'".';
|
||||
|
@ -36,7 +36,14 @@ if($p['proverka']==1)
|
||||
}
|
||||
$rtxt = '[img[items/pal_buttont.gif]] '.$rang.' "'.$u->info['cast_login'].'" снял'.$sx.' проверку на чистоту персонажу "'.$uu['login'].'"';
|
||||
//mysql_query("UPDATE `chat` SET `delete` = 1 WHERE `login` = '".$uu['login']."' LIMIT 1000");
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" снял'.$sx.' проверку на чистоту';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно сняли пометку о чистоте персонажа "'.$uu['login'].'".';
|
||||
|
@ -34,7 +34,14 @@ if($p['sex']==1)
|
||||
$sx = 'а';
|
||||
}
|
||||
$rtxt = '[img[items/male.png]] '.$rang.' "'.$u->info['cast_login'].'" сменил'.$sx.' пол персонажа "'.$uu['login'].'" на '.$usx['0-'.$uu['sex']].'';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" сменил'.$sx.' пол сперсонажа на '.$usx['0-'.$uu['sex']].'.';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно сменили пол персонажа "'.$uu['login'].'" на '.$usx['0-'.$uu['sex']].'.';
|
||||
|
@ -28,7 +28,14 @@ if($p['shaos']==1)
|
||||
}elseif($uu['align']==2 || $uu['haos']>0)
|
||||
{
|
||||
$rtxt = '[img[items/pal_button5.gif]] '.$rang.' "'.$u->info['cast_login'].'" выпустил'.$sx.' персонажа "'.$uu['login'].'" из хаоса';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" выпустил'.$sx.' из "<b>хаоса</b>".';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно выпустили персонажа "'.$uu['login'].'" из хаоса.<br>';
|
||||
|
@ -35,7 +35,14 @@ if($p['sm2']==1 || $p['citysm2']==1 || $p['citysm1']==1 || $p['sm1']==1)
|
||||
if($x!=2 && $uu['molch1']>=time())
|
||||
{
|
||||
$rtxt = '[img[items/pal_button3.gif]] '.$rang.' "'.$u->info['cast_login'].'" снял'.$sx.' заклятие молчания с "'.$uu['login'].'"';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" снял'.$sx.' заклятие "<b>молчания</b>".';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно сняли заклятие молчания с персонажа "'.$uu['login'].'".<br>';
|
||||
@ -43,7 +50,14 @@ if($p['sm2']==1 || $p['citysm2']==1 || $p['citysm1']==1 || $p['sm1']==1)
|
||||
if($x!=1 && $uu['molch2']>=time())
|
||||
{
|
||||
$rtxt = '[img[items/fsleep_off.gif]] '.$rang.' "'.$u->info['login'].'" снял'.$sx.' заклятие форумного молчания с "'.$uu['login'].'"';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" снял'.$sx.' заклятие "<b>форумного молчания</b>".';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer .= 'Вы успешно сняли заклятие форумного молчания с персонажа "'.$uu['login'].'".';
|
||||
|
@ -33,7 +33,14 @@ if($p['useunalign']==1)
|
||||
$sx = 'а';
|
||||
}
|
||||
$rtxt = '[img[items/palbuttondarkhc1.gif]] '.$rang.' "'.$u->info['cast_login'].'" снял'.$sx.' склонность⁄клан с персонажа "'.$uu['login'].'"';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" снял'.$sx.' склонность с персонажа.';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно сняли склонность с персонажа "'.$uu['login'].'".';
|
||||
|
@ -20,7 +20,14 @@ if($p['unbanned']==1)
|
||||
{
|
||||
mysql_query('UPDATE `users_delo` SET `hb` = "0" WHERE `uid` = "'.$uu['id'].'" AND `hb`!="0"');
|
||||
$rtxt = '[img[items/pal_button7.gif]] '.$rang.' "'.$u->info['cast_login'].'" снял'.$sx.' заклятие смерти с "'.$uu['login'].'"';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" снял'.$sx.' заклятие "<b>смерти</b>".';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно сняли заклятие смерти с персонажа "'.$uu['login'].'".<br>';
|
||||
|
@ -44,7 +44,14 @@ if($p['unbtl']==1)
|
||||
inBattleLog('{tm1} '.$rang.' "<b>'.$u->info['cast_login'].'</b>" выпустил персонажа "<b>'.$uu['login'].'</b>" из поединка.');
|
||||
$rtxt = '[img[items/pal_buttonn.gif]] '.$rang.' "'.$u->info['cast_login'].'" выпустил'.$sx.' персонажа "'.$uu['login'].'" из поединка';
|
||||
//mysql_query("UPDATE `chat` SET `delete` = 1 WHERE `login` = '".$uu['login']."' LIMIT 1000");
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" выпустил'.$sx.' персонажа из поединка №<b>'.$uu['battle222'].'</b>.';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно выпустили персонажа "'.$uu['login'].'" из поединка.';
|
||||
|
@ -44,7 +44,14 @@ if($p['marry']==1)
|
||||
$rtxt = '[img[items/unmarry.gif]] '.$rang.' "'.$u->info['cast_login'].'" расторгнул'.$sx.' законность брака между "'.$uu['login'].'" и "'.$uu2['login'].'".';
|
||||
|
||||
mysql_query("UPDATE `chat` SET `delete` = 1 WHERE `login` = '".$uu['login']."' LIMIT 1000");
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" расторгнул'.$sx.' законность брака с '.$uu2['id'].'.';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" расторгнул'.$sx.' законность брака с '.$uu['id'].'.';
|
||||
|
@ -34,7 +34,14 @@ if($p['useunnoper']==1)
|
||||
$sx = 'а';
|
||||
}
|
||||
$rtxt = '[img[items/mod/magic9.gif]] '.$rang.' "'.$u->info['cast_login'].'" снял'.$sx.' запрет на передачи персонажа "'.$uu['login'].'"';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" снял'.$sx.' запрет на "<b>передачи</b>".';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно сняли запрет на передачи с персонажа "'.$uu['login'].'".';
|
||||
|
@ -34,7 +34,14 @@ if($p['useunnoper']==1)
|
||||
$sx = 'а';
|
||||
}
|
||||
$rtxt = '[img[items/mod/magic9.gif]] '.$rang.' "'.$u->info['cast_login'].'" снял'.$sx.' полный запрет на передачи персонажа "'.$uu['login'].'"';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" снял'.$sx.' полный запрет на "<b>передачи</b>".';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно сняли полный запрет на передачи с персонажа "'.$uu['login'].'".';
|
||||
|
@ -24,7 +24,14 @@ if($p['useuntravm']==1)
|
||||
$sx = 'а';
|
||||
}
|
||||
$rtxt = '[img[items/cure3.gif]] '.$rang.' "'.$u->info['cast_login'].'" излечил'.$sx.' персонажа "'.$uu['login'].'" от травм.';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" излечил'.$sx.' от травм';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)");
|
||||
$uer = 'Вы успешно излечили персонажу "'.$uu['login'].'" от травм.';
|
||||
|
@ -72,7 +72,14 @@ if($u->info['admin']>0 || ($u->info['align']>=3 && $u->info['align']<4))
|
||||
}
|
||||
mysql_query('UPDATE `stats` SET `hpNow` = "'.$u->stats['hpAll'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
|
||||
mysql_query('UPDATE `stats` SET `hpNow` = "1",`regHP` = "'.time().'" WHERE `id` = "'.$uu['id'].'" LIMIT 1');
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$uer = 'Вы успешно выпили всю кровь у персонажа "'.$uu['login'].'".<br>';
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,14 @@ if($p['szatoch']==1 || $p['citym1']==1)
|
||||
}
|
||||
mysql_query('UPDATE `items_users` SET `delete` = "0" WHERE `uid` = '.$uu['id'].' AND `delete` = "1357908642"');
|
||||
$rtxt = '[img[items/jail_off.gif]] '.$rang.' "'.$u->info['cast_login'].'" выпустил'.$sx.' из заточение "'.$uu['login'].'".';
|
||||
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`) VALUES (1,'".$u->info['city']."','".$u->info['room']."','','','".$rtxt."','".time()."','6','0','1')");
|
||||
|
||||
$cmsg = new ChatMessage();
|
||||
$cmsg->setCity($u->info['city']);
|
||||
$cmsg->setRoom($u->info['room']);
|
||||
$cmsg->setText($rtxt);
|
||||
$cmsg->setType(6);
|
||||
$cmsg->setTypeTime(1);
|
||||
(new Chat())->sendMsg($cmsg);
|
||||
$rtxt = $rang.' "'.$u->info['login'].'" выпустил'.$sx.' из "<b>заточение</b>" .';
|
||||
mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',6)");
|
||||
$uer = 'Вы успешно выпустили из тюрьмы персонажа "'.$uu['login'].'" .';
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user