Файл: wenr.online/app/cron/town.php
Строк: 12
<?php
$db->query('update `town` set `gold` = `gold` + 200 where `attack_time` < '.time());
$db->query('update `users` set `gold` = `gold` + 1 * `lvl` where `guild` = 1 or `guild` = 5');
$db->query('OPTIMIZE TABLE `kills`');
/*
$bot = $db->prepare('select * from `users` where `skin` != ?');
$bot -> execute([1]);
$bot = $bot -> fetchAll();
foreach($bot as $res){
$skinName = [4=>'Легкий доспех ополчения','4_2'=>'Доспех паладина',5=>'Доспех наемника','5_2'=>'Доспех охотника на драконов',6=>'Мантия послушника',
'6_1'=>'Мантия мага огня'];
$hp = 350;
if($res['guild'] < 4) $hp = 150;
$sql = $db->prepare('insert into bag (`name`,`user`,`type`,`dex`,`force`,`hp`,`max_hp`,`mana`,`mana_max`,`img`,`status`) values (?,?,?,?,?,?,?,?,?,?,?)');
$sql -> execute([
$skinName[$res['skin']],
$res['user_id'],
'armor',
0,
0,
0,
$hp,
0,
0,
$res['skin'],
1
]);
}
echo 'ok';
*/