'INSERT INTO `dungeon_items` (`dn`,`item_id`,`time`,`x`,`y`) VALUES '.$ins.''
);
mysql_query('DELETE FROM `items_users` WHERE `uid` = "'.$pls1['inBot'].'" LIMIT 1');
mysql_query('DELETE FROM `eff_users` WHERE `uid` = "'.$pls1['inBot'].'" LIMIT 1');
mysql_query(
'UPDATE `bs_zv` SET `finish` = "'.time(
).'" WHERE `id` = "'.$pls1['id'].'" LIMIT 1'
);
mysql_query('UPDATE `users` SET `inUser` = 0 WHERE `id` = "'.$pls1['uid'].'" LIMIT 1');
}
}
$id['users_finish']++;
}
$i++;
}
}
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'
)
);
$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'
'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'
);
mysql_query('UPDATE `users` SET `inUser` = 0 WHERE `id` = "'.$pl['uid'].'" LIMIT 1');