info['admin']) { header('location: /'); die(); } $i = 0; while ($i < 100) { if (!isset($c['battle_cfg'][$i])) { $c['battle_cfg'][$i] = 0; } $i++; } ?> Тестирование ботов

Создать тестовый бой (Записать icq персу и скрыть: 17768719)



addNewbot(0, null, $user1, false, false); $bot2 = $u->addNewbot(0, null, $user2, false, false); mysql_query('UPDATE `users` SET `battle` = "' . $logid . '" WHERE `id` = "' . $bot1 . '" LIMIT 1'); mysql_query('UPDATE `users` SET `battle` = "' . $logid . '" WHERE `id` = "' . $bot2 . '" LIMIT 1'); mysql_query( 'UPDATE `stats` SET `hpNow` = 100000000 , `bot` = 2 , `team` = "1" WHERE `id` = "' . $bot1 . '" LIMIT 1' ); mysql_query( 'UPDATE `stats` SET `hpNow` = 100000000 , `bot` = 2 , `team` = "2" WHERE `id` = "' . $bot2 . '" LIMIT 1' ); // mysql_query( 'INSERT INTO `battle_logs` ( `time`,`battle`,`id_hod`,`type`,`text` ) VALUES ( "' . time() . '","' . $logid . '","1","1","Часы показывали ' . date( 'd.m.Y H:i:s' ) . ', когда ' . $user1['login'] . ' и ' . $user2['login'] . ' бросили вызов друг другу." )' ); // //Эффекты $i = 0; while ($i < 1000) { // $efs = mysql_fetch_array( mysql_query('SELECT * FROM `eff_main` WHERE `id2` = "' . $i . '" LIMIT 1') ); if ($_POST['eu1_' . $efs['id2']] == 1) { mysql_query( 'INSERT INTO `eff_users` ( `id_eff` , `uid` , `name` , `data` , `timeUse` ) VALUES ( "' . $efs['id2'] . '" , "' . $bot1 . '" , "' . $efs['mname'] . '" , "' . $efs['mdata'] . '" , "' . time( ) . '" )' ); } if ($_POST['eu2_' . $efs['id2']] == 1) { mysql_query( 'INSERT INTO `eff_users` ( `id_eff` , `uid` , `name` , `data` , `timeUse` ) VALUES ( "' . $efs['id2'] . '" , "' . $bot2 . '" , "' . $efs['mname'] . '" , "' . $efs['mdata'] . '" , "' . time( ) . '" )' ); } // $i++; } // function inuser_go_btl($id) { if (isset($id['id'])) { file_get_contents( '/jx/battle/refresh.php?uid=' . $id['id'] . '&cron_core=' . md5( $id['id'] . '_brfCOreW@!_' . $id['pass'] ) . '&pass=' . $id['pass'] ); } } $sp = mysql_query( 'SELECT `id`,`time_start` FROM `battle` WHERE `team_win` = "-1" AND `time_over` = "0" AND `type` = 329 LIMIT 100' ); while ($pl = mysql_fetch_array($sp)) { $user1 = mysql_fetch_array( mysql_query('SELECT * FROM `users` WHERE `battle` = "' . $pl['id'] . '" LIMIT 1') ); inuser_go_btl($user1); } // $error = 'Бой между ' . $user1['login'] . ' [' . $user1['level'] . '] и ' . $user2['login'] . ' [' . $user2['level'] . '] начался! Лог боя'; } else { $error = 'Один из персонажей не найден в базе.'; } echo '
' . $error . '
'; } // $ef1 = ''; $ef2 = ''; $sp = mysql_query('SELECT * FROM `eff_main` WHERE `mdata` != "" AND `actionTime` > 0 ORDER BY `mname` ASC'); $i = 0; while ($pl = mysql_fetch_array($sp)) { $i++; // //Действие эффекта $ei = ''; $tr = ''; $t = $u->items['add']; $x = 0; $ed = \Core\ConversionHelper::dataStringToArray($pl['mdata']); while ($x < count($t)) { $n = $t[$x]; if (isset($ed['add_' . $n], $u->is[$n])) { $z = ''; if ($ed['add_' . $n] > 0) { $z = '+'; } $tr .= '
' . $u->is[$n] . ': ' . $z . '' . $ed['add_' . $n]; } $x++; } if ($tr != '') { $ei .= $tr; } if ($e['info'] != '') { $ei .= '
Информация:
' . $e['info']; } // $ef = ''; $ef1 .= '' . $ef . ''; $ef2 .= '' . $ef . ''; } // $dv = ''; $da = ''; $dv .= ''; $da = ''; ?>
 

 

 

  против    

 

 

 эффекты