<?
//
//
//Запуск битвы против ордена мертвых 3 раза в 12:00, 16:00, 20:00 по мск, кроме выходных
require_once($_SERVER['DOCUMENT_ROOT']."/jquery/inc/system.php");
//
//
$orden = DB::$dbs->queryFetch('SELECT * FROM `orden_dead` WHERE `id` = ? LIMIT 1', [1]);
//
//
if($orden['times'] == 1){
$time = 4;
$times = 2;
}
elseif($orden['times'] == 2){
$time = 4;
$times = 3;
}
elseif($orden['times'] == 3){
$time = 16;
$times = 1;
}
//
//
DB::$dbs->query('UPDATE `orden_dead` SET `power` = ?, `def` = ?, `hp` = ?, `id_user` = ?, `end` = ?, `time` = ?, `times` = ? WHERE `id` = ? LIMIT 1', array(3500,2750,1000000,0,0,time()+3600*$time,$times,1));
//
//
DB::$dbs->query("DELETE FROM `orden_dead_user` WHERE `id` >= ?", array(1));
DB::$dbs->query("DELETE FROM `orden_dead_logs` WHERE `id` >= ?", array(1));
//
//
?>