game/modules_data/location/spavedlivost.php
2022-06-07 00:30:34 +03:00

215 lines
9.2 KiB
PHP

<?php
if(!defined('GAME'))
{
die();
}
session_start();
$user=$u->info;
$timer = time()+24*60*60;
$is_eff=mysql_fetch_array(mysql_query("SELECT id,timeUse FROM eff_users where id_eff='397' and `delete` =0 and uid='".$u->info['id']."'"));
if($_GET['get']=='10' && $is_eff[0]==0){
/*
'm1'=>'Ìô. êðèòè÷åñêîãî óäàðà (%)',
'm2'=>'Ìô. ïðîòèâ êðèòè÷åñêîãî óäàðà (%)',
'm3'=>'Ìô. ìîùíîñòè êðèò. óäàðà (%)',
'm4'=>'Ìô. óâåðòûâàíèÿ (%)',
'm5'=>'Ìô. ïðîòèâ óâåðòûâàíèÿ (%)',
'm6'=>'Ìô. êîíòðóäàðà (%)',
'm7'=>'Ìô. ïàðèðîâàíèÿ (%)',
'm10'=>'Ìô. ìîùíîñòè óðîíà',
'm11'=>'Ìô. ìîùíîñòè ìàãèè ñòèõèé',
'za'=>'Çàùèòà îò óðîíà',
'zm'=>'Çàùèòà îò ìàãèè ñòèõèé'
's1'=>'Ñèëà',
's2'=>'Ëîâêîñòü',
's3'=>'Èíòóèöèÿ',
's4'=>'Âûíîñëèâîñòü',
's5'=>'Èíòåëëåêò',
's6'=>'Ìóäðîñòü',
's7'=>'Äóõîâíîñòü',
's8'=>'Âîëÿ',
's9'=>'Ñâîáîäà äóõà',
's10'=>'Áîæåñòâåííîñòü'
$u->info['admin']
*/
$datadd='|add_m10='.rand(1,3).'|add_m11='.rand(1,3).'|add_m6='.rand(1,2).'|add_m7='.rand(1,2).'|add_za='.rand(5,35).'|add_zm='.rand(5,35).'';
if(mysql_query("UPDATE `users` SET `money`=`money`+'10' where `id`='".$user['id']."'") and
mysql_query('INSERT INTO `eff_users` (
`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`
) VALUES (
"397","'.$user['id'].'","Áëàãîñëîâëåíèå Ñïðàâåäëèâîñòè","add_exp=5'.$datadd.'|nofastfinisheff=1","105","'.time().'"
)'));
{
$err = "Ñïðàâåäëèâîñòü ñåãîäíÿ â õîðîøåì íàñòðîåíèè. Âû ïîëó÷èëè Áëàãîñëîâëåíèå Ñïðàâåäëèâîñòè è 10 êðåäèòîâ!";
mysql_query('UPDATE `users_achiv` SET `pa`= `pa`+1 WHERE `id` = "'.$user['id'].'" LIMIT 1');
}
}
elseif($_GET['get']=='10' && $is_eff[0]>0){
$wait_sec=$is_eff['timeUse'];
$new_t=time();
$left_time=$wait_sec-$new_t;
$left_min=floor($left_time/3600);
$left_sec=floor(($left_time-$left_min*3600)/60);
if($left_min==1){$time_h="÷àñ";}
if($left_min>1 and $left_min<5){$time_h="÷àñà";}
if($left_min>4){$time_h="÷àñîâ";}
$time_left=$left_min." ".$time_h." ".$left_sec." ìèí";
$err="Âû óæå ïîëó÷àëè áëàãîñëîâåíèå Ñïðàâåäëèâîñòè. Äîæäèòåñü îêîí÷àíèÿ òåêóùåãî Áëàãîñëîâëåíèÿ";
}
?>
<HTML><HEAD>
<link rel=stylesheet type="text/css" href="https://img.new-combats.com/i/main.css">
<meta content="text/html; charset=windows-1251" http-equiv=Content-type>
<META Http-Equiv=Cache-Control Content=no-cache>
<meta http-equiv=PRAGMA content=NO-CACHE>
<META Http-Equiv=Expires Content=0>
</HEAD>
<body bgcolor=e2e0e0 style="background-image: url(/i/misc/statue.png);background-repeat:no-repeat;background-position:top right">
<div id=hint4 class=ahint></div>
<TABLE width=100%>
<TR><TD valign=top width=100%><center><font style="font-size:24px; color:#000033"><h3>"Ïàìÿòíèê Ñïðàâåäëèâîñòè"</h3></font></center>
<div style="float:right;width:300px;">
<?
//id ïðåäìåòà
$arr = array(
);
if( isset($_GET['takeartefact']) ) {
$i = (int)$_GET['takeartefact'];
$itm = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.mysql_real_escape_string($arr[$i]).'" LIMIT 1'));
if(isset($itm['id'])) {
$take_today = mysql_fetch_array(mysql_query('SELECT COUNT(*) FROM `items_users` WHERE `uid` = "'.$u->info['id'].'" AND `data` LIKE "%musor_art=1%" AND `delete` < 1234567890 LIMIT 1'));
$take_today = 0 + $take_today[0];
if( $take_today < 2 ) {
$error .= 'Âû âçÿëè ó Àíãåëà «'.$itm['name'].'» íàéòè âû åãî ìîæåòå ó ñåáÿ â ðþêçàêå.';
$u->addItem($itm['id'],$u->info['id'],'|sudba='.$u->info['login'].'|nosale=1|frompisher=1|musor_art=1');
}else{
$error .= 'Àíãåë Âàì óæå âûäàë ïðåäìåò, áîëüøå âû íå ïîëó÷èòå, åñëè õîòèòå ïîìåíÿòü ñâîþ âåùü, îòäàéòå Àíãåëó òå êîòîðûå âû óæå âçÿëè !';
}
}else{
$error .= 'Ïðåäìåò íå íàéäåí!';
}
}elseif(isset($_GET['restart'])) {
if(mysql_query('UPDATE `items_users` SET `delete` = "'.time().'" WHERE `uid` = "'.$u->info['id'].'" AND `data` LIKE "%musor_art=1%" AND `delete` < 1234567890')) {
$error .= 'Âû îòäàëè âñå âåùè ïîëó÷åííûå â äàð Àíãåëîì, âûáåðèòå ñåáå íîâûå ïðåäìåòû.';
}else{
$error .= 'Ó âàñ íåò ïðåäìåòîâ îò Àíãåëà.';
}
}
echo '<b style="color:red">'.$error.'</b><br>';
$i = 0;
$items = '';
while($i < count($arr)) {
$itm = mysql_fetch_array(mysql_query('SELECT * FROM `items_main` WHERE `id` = "'.mysql_real_escape_string($arr[$i]).'" LIMIT 1'));
if(isset($itm['id'])) {
$items .= ' <a href="?takeartefact='.$i.'"><img src="https://img.new-combats.com/i/items/'.$itm['img'].'" title="Âçÿòü &quot;' . $itm['name'] . '&quot;"></a> &nbsp; ';
}
$i++;
}
/*echo '<a href="?restart=1">Îòäàòü Àíãåëó âåùè</a><br><b>Âîçìîæíî âçÿòü âåùè:</b><br>';
if( $items != '' ) {
echo '<br><br>'.$items;
}else{
echo 'Íåò ïðåäìåòîâ';
}*/
?>
</div>
<center><img src="https://new-combats.com/i/statue/big1256_zspobic.jpg" ></center>
<TD nowrap valign=top>
<BR><DIV align=right>
<td width=280 valign=top><TABLE cellspacing=0 cellpadding=0><TD width=100%>&nbsp;</TD><TD><HTML>
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">
<td>
</td>
<td>
<TABLE height=15 border="0" cellspacing="0" cellpadding="0">
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">
<td>
</td>
<td>
<td width="280" valign="top">
<TABLE cellspacing="0" cellpadding="0"><TD width="100%">&nbsp;</TD><TD>
<table border="0" cellpadding="0" cellspacing="0">
<tr align="right" valign="top">
<td>
<!-- -->
<? echo $goLis; ?>
<!-- -->
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td nowrap="nowrap">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DEDEDE">
<tr>
<td bgcolor="#D3D3D3"><img src="https://<? echo $c['img']; ?>/i/move/links.gif" width="9" height="7" /></td>
<td bgcolor="#D3D3D3" nowrap><a href="#" id="greyText" class="menutop" onClick="location='main.php?loc=1.180.0.415&rnd=<? echo $code; ?>';" title="<? thisInfRm('1.180.0.415',1); ?>">Ïëîùàäü ïîêëîíà</a></td>
</tr>
</table>
</td>
</tr>
</table>
</td></table>
</td></table>
</td>
</tr>
</table>
<!-- <br /><span class="menutop"><nobr>Îáùåæèòèå</nobr></span>-->
</td>
</tr>
</table>
<div id="mmoves" style="background-color:#FFFFCC; visibility:hidden; overflow:visible; position:absolute; border-color:#666666; border-style:solid; border-width: 1px; padding: 2px; white-space: nowrap;"></div>
</TD></TR>
</HTML>
</TD></TABLE>
</table>
</DIV>
</TD>
</TR>
<tr>
<td>
<div align="left"><font color="red"><b><?=$err?></b></font></div>
Áëàãîñëîâëåíèå Ñïðàâåäëèâîñòè: <a href="?get=10">ïîëó÷èòü</a>
</td>
</tr>
</TABLE>
<br>
</BODY>
<br>
<br>
<br>
<TABLE width=100% align="right">
<tr><td>
</TD></tr>
</TABLE>
</HTML>