game/_incl_data/class/quest/dailyquesthp.php

30 lines
1.2 KiB
PHP
Raw Normal View History

2023-03-31 18:42:06 +00:00
<?php
2022-06-06 21:30:34 +00:00
/*
2023-01-10 16:29:32 +00:00
Бабушка покормила
2022-06-06 21:30:34 +00:00
*/
$timetest=time()-24*60*60;
$check = mysql_fetch_array(mysql_query('SELECT * FROM `actions` WHERE `uid` = "'.$u->info['id'].'" AND `vars`= "day_korm" AND `time` > "'.$timetest.'"'));
if(!isset($check['id']))
{
mysql_query('UPDATE `users` SET `room`= 9 WHERE `id` = "'.$u->info['id'].'"');
mysql_query('UPDATE `stats` SET `hpNow`= 0 WHERE `id` = "'.$u->info['id'].'"');
2023-01-10 16:29:32 +00:00
$rtxt='Накормила, спать уложила, всю жизненную энергию выпила и на цп выбросила '.$u->info['login'].'!';
2023-01-28 02:24:37 +00:00
$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);
2022-06-06 21:30:34 +00:00
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
{
2023-01-10 16:29:32 +00:00
$txt .= '<br><b><font color=red>Эх шустрый малец, тыж съел все сегодня! Завтра приходи накормлю чем нибудь вкусным!</b></font>';
2022-06-06 21:30:34 +00:00
}
?>