game/modules_data/stats_loc.php

358 lines
13 KiB
PHP

<?php
if(!defined('GAME'))
{
die();
}
if (isset($_GET['getq']))
{
//--------------
$test = mysql_fetch_array(mysql_query('SELECT * FROM `actions` WHERE `uid` = "'.$u->info['id'].'" AND `vars`= "day_quest" LIMIT 1'));
if (!isset($test['id']))
{
$zadID=rand(1,7);
if ($u->info['level']==8 && $zadID==6){$zadID=2;}
if ($u->info['level']>11 && $zadID==4){$zadID=2;}
if ($u->info['level']>11 && $zadID==1){$zadID=2;}
}
else
{
$zadID=0;
}
if ($zadID==1)
{
$txt .= '<b><font color=black>Ãîâîðÿò â Capital City çàâåëèñü âñÿêèå Òðóïîæîðû. Ïîéäè äà óáåé èõ äâàæäû, ïîðàäóé áàáóøêó</b></font>';
}elseif($zadID==2)
{
$txt .= '<b><font color=black>Ïîêàæè íà ÷òî ñïîñîáåí! Ïîó÷àñòâóé â 10 õàîòè÷åñêèõ ïîåäèíêàõ!</b></font>';
}elseif($zadID==3)
{
$txt .= '<b><font color=black>Íåîáõîäèìî èññëåäîâàòü äëÿ áàáóøêè äâà ëþáûõ ïîäçåìåëèÿ, åé î÷åíü èíòåðåñíî ÷òî òàì âíóòðè! Òîëüêî ãëÿäè ìèëîê, ïðîïóñêè íå èñïîëüçóé!</b></font>';
}elseif($zadID==4)
{
$txt .= '<b><font color=black>Ñðàçèñü â õàîòè÷åñêèõ ïîåäèíêàõ è ïîëó÷è 100 000 îïûòà!</b></font>';
}elseif($zadID==5)
{
$txt .= '<b><font color=black>Îòêðîé ñóíäóê Òðóïîæîðà, ïîðàäóé áàáóøêó!</b></font>';
}elseif($zadID==6)
{
$txt .= '<b><font color=black>Ïîñåòè Èçëîì Õàîñà!</b></font>';
}elseif($zadID==7)
{
$txt .= '<b><font color=black>Âûïîëíè 3 ëþáûõ çàäàíèÿ â ïîäçåìåëèÿõ!Áàáóøêà áóäåò î÷åíü äîâîëüíà!</b></font>';
}elseif($zadID==8)
{
$txt .= '<b><font color=black>Ñõîäè êà ìèëîê â Áàøíþ Ñìåðòè! Äà ïîïðîáóé êàê òàì ñâîè ñèëåíêè.</b></font>';
}
else
{
$txt .= '<b><font color=red>Ýõ øóñòðûé ìàëåö, ïîëó÷àë çàäàíèå óæå ñåãîäíÿ! Çàâòðà ïðèõîäè, íàêîðìëþ ÷åì íèáóäü âêóñíûì íó è çàäàíèå äàì!</b></font>';
}
if ($zadID>0)
{
mysql_query('INSERT INTO `actions`(`uid`, `time`, `city`, `room`, `vars`, `ip`, `vals`, `val`) VALUES ("'.$u->info['id'].'","'.time().'","capitalcity","421","day_quest"," ","'.$zadID.'","'.$u->info['exp'].'")');
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','".$u->info['city']."','".$u->info['room']."','','".$u->info['login']."','".$txt."','-1','6','0')");
}
//--------------
}
if (isset($_GET['putq']))
{
//--------------
$test = mysql_fetch_array(mysql_query('SELECT * FROM `actions` WHERE `uid` = "'.$u->info['id'].'" AND `vars`= "day_quest" LIMIT 1'));
if (!isset($test['id']))
{
$txt .= '<b><font color=red>Ó òåáÿ íåò çàäàíèÿ ìèëîê, íå þëè! Õîòü áàáóøêà ïëîõî âèäèò íî áàáóøêà õîðîøî ïîìíèò.</b></font>';
}
else
{
$zadID=$test['vals'];
if ($zadID==1)
{
//$end_trup
$check = mysql_query('SELECT * FROM `actions` WHERE `uid` = "'.$u->info['id'].'" AND `vars`= "end_trup" AND `time` > "'.$test['time'].'"');
$i=0;
while($pl = mysql_fetch_array($check)){$i++;}
if ($i>1){
$txt .= '<b><font color=black>Ïîðàäîâàë áàáóøêó! Óáèë èïîñòàòà! Ìîæåò íà ïå÷è ïîëåæèì? - Íåò, íó äåðæè æåòîí÷èê!</b></font>';
mysql_query('UPDATE `actions` SET `vals`= 0 WHERE `uid` = "'.$u->info['id'].'" AND `vars`= "day_quest"');
if ($u->info['level'] < 12)
{
$u->addItem(10020,$u->info['id'],'|sudba='.$u->info['login']);
}
else
{
$u->addItem(6470,$u->info['id'],'|sudba='.$u->info['login']);
}
mysql_query('UPDATE `users_achiv` SET `zb`= `zb`+1 WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
$u->repexp_add($u->info['id'],50); //Ðåïóòàöèÿ +20
}
else
{
$txt .= '<b><font color=black>Ïîáåäè â áîÿõ ñ Òðóïîæîðîì '.$i.'/2</b></font>';
}
}elseif($zadID==2)
{
$check = mysql_query('SELECT * FROM `actions` WHERE `uid` = "'.$u->info['id'].'" AND `vars`= "end_xaot" AND `time` > "'.$test['time'].'"');
$i=0;
while($pl = mysql_fetch_array($check)){$i++;}
if ($i>9){
$txt .= '<b><font color=black>Ïîðàäîâàë áàáóøêó! Ïîó÷àñòâîâàë â áîÿõ! À òî÷íî ïîêóøàòü íå õî÷åøü? - Íåò, íó äåðæè æåòîí÷èê!</b></font>';
mysql_query('UPDATE `actions` SET `vals`= 0 WHERE `uid` = "'.$u->info['id'].'" AND `vars`= "day_quest"');
if ($u->info['level'] < 12)
{
$u->addItem(10020,$u->info['id'],'|sudba='.$u->info['login']);
}
else
{
$u->addItem(6470,$u->info['id'],'|sudba='.$u->info['login']);
}
mysql_query('UPDATE `users_achiv` SET `zb`= `zb`+1 WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
$u->repexp_add($u->info['id'],50); //Ðåïóòàöèÿ +20
}
else
{
$txt .= '<b><font color=black>Ó÷àñòèÿ â õàîòàõ '.$i.'/10</b></font>';
}
// $end_xaot;
}elseif($zadID==3)
{
$check = mysql_query('SELECT * FROM `actions` WHERE `uid` = "'.$u->info['id'].'" AND `vars`= "psh0" AND `time` > "'.$test['time'].'"');
$i=0;
while($pl = mysql_fetch_array($check)){$i++;}
if ($i>1){
$txt .= '<b><font color=black>Ïîðàäîâàë áàáóøêó! Õîðîøèé çàïàõ! À òî÷íî ïîêóøàòü íå õî÷åøü? - Íåò, íó äåðæè æåòîí÷èê!</b></font>';
mysql_query('UPDATE `actions` SET `vals`= 0 WHERE `uid` = "'.$u->info['id'].'" AND `vars`= "day_quest"');
if ($u->info['level'] < 12)
{
$u->addItem(10020,$u->info['id'],'|sudba='.$u->info['login']);
}
else
{
$u->addItem(6470,$u->info['id'],'|sudba='.$u->info['login']);
}
mysql_query('UPDATE `users_achiv` SET `zb`= `zb`+1 WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
$u->repexp_add($u->info['id'],50); //Ðåïóòàöèÿ +20
}
else
{
$txt .= '<b><font color=black>Ïîñåùåíèå Ïîäçåìåëèé '.$i.'/2</b></font>';
}
}elseif($zadID==4)
{
if (($u->info['exp']-$test['val'])>100000){
$txt .= '<b><font color=black>Ïîðàäîâàë áàáóøêó! Ïîäðîñ,Ïîäðîñ! äåðæè æåòîí÷èê!</b></font>';
mysql_query('UPDATE `actions` SET `vals`= 0 WHERE `uid` = "'.$u->info['id'].'" AND `vars`= "day_quest"');
if ($u->info['level'] < 12)
{
$u->addItem(10020,$u->info['id'],'|sudba='.$u->info['login']);
}
else
{
$u->addItem(6470,$u->info['id'],'|sudba='.$u->info['login']);
}
mysql_query('UPDATE `users_achiv` SET `zb`= `zb`+1 WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
$u->repexp_add($u->info['id'],50); //Ðåïóòàöèÿ +20
}
else
{
$txt .= '<b><font color=black>Ïîëó÷åíèå '.($u->info['exp']-$test['val']).'/100 000 îïûòà</b></font>';
}
}elseif($zadID==5)
{
$check = mysql_query('SELECT * FROM `actions` WHERE `uid` = "'.$u->info['id'].'" AND `vars`= "trup_sun" AND `time` > "'.$test['time'].'"');
$i=0;
while($pl = mysql_fetch_array($check)){$i++;}
if ($i>0){
$txt .= '<b><font color=black>Ïîðàäîâàë áàáóøêó! Ñóíäó÷åê óäà÷ó ïðèíåñ? Íåò? Íó äåðæè æåòîí÷èê!</b></font>';
mysql_query('UPDATE `actions` SET `vals`= 0 WHERE `uid` = "'.$u->info['id'].'" AND `vars`= "day_quest"');
if ($u->info['level'] < 12)
{
$u->addItem(10020,$u->info['id'],'|sudba='.$u->info['login']);
}
else
{
$u->addItem(6470,$u->info['id'],'|sudba='.$u->info['login']);
}
mysql_query('UPDATE `users_achiv` SET `zb`= `zb`+1 WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
$u->repexp_add($u->info['id'],50); //Ðåïóòàöèÿ +20
}
else
{
$txt .= '<b><font color=black>Îòêðûòèå ñóíäóêîâ Òðóïîæîðà 0/1</b></font>';
}
}elseif($zadID==6)
{
$check = mysql_query('SELECT * FROM `actions` WHERE `uid` = "'.$u->info['id'].'" AND `vars`= "izlom" AND `time` > "'.$test['time'].'"');
$i=0;
while($pl = mysql_fetch_array($check)){$i++;}
if ($i>0){
$txt .= '<b><font color=black>Ïîðàäîâàë áàáóøêó! Òàê ïàõíåò ãàðüþ è ñìåðòüþ Ììììì ... Çà ýòî òåáå æåòîí÷èê!</b></font>';
mysql_query('UPDATE `actions` SET `vals`= 0 WHERE `uid` = "'.$u->info['id'].'" AND `vars`= "day_quest"');
if ($u->info['level'] < 12)
{
$u->addItem(10020,$u->info['id'],'|sudba='.$u->info['login']);
}
else
{
$u->addItem(6470,$u->info['id'],'|sudba='.$u->info['login']);
}
mysql_query('UPDATE `users_achiv` SET `zb`= `zb`+1 WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
$u->repexp_add($u->info['id'],50); //Ðåïóòàöèÿ +20
}
else
{
$txt .= '<b><font color=black>Ïîñåùåíèå Èçëîìà Õàîñà 0/1</b></font>';
}
}elseif($zadID==7)
{
$check = mysql_query('SELECT * FROM `actions` WHERE `uid` = "'.$u->info['id'].'" AND `vals`= "win" AND `time` > "'.$test['time'].'"');
$i=0;
while($pl = mysql_fetch_array($check)){$i++;}
if ($i>2){
$txt .= '<b><font color=black>Ïîðàäîâàë áàáóøêó! Ñòàëî â ìèðå ñâåòëåå, íî áàáêà êàê áûëà ñëåïàÿ òàê è îñòàëàñü... <br> ×óòü íå çàáûëà æåòîí÷èê!</b></font>';
mysql_query('UPDATE `actions` SET `vals`= 0 WHERE `uid` = "'.$u->info['id'].'" AND `vars`= "day_quest"');
if ($u->info['level'] < 12)
{
$u->addItem(10020,$u->info['id'],'|sudba='.$u->info['login']);
}
else
{
$u->addItem(6470,$u->info['id'],'|sudba='.$u->info['login']);
}
mysql_query('UPDATE `users_achiv` SET `zb`= `zb`+1 WHERE `id` = "'.$u->info['id'].'" LIMIT 1');
$u->repexp_add($u->info['id'],50); //Ðåïóòàöèÿ +20
}
else
{
$txt .= '<b><font color=black>Âûïîëíè 3 çàäàíèÿ â ïîäçåìåëèÿõ. '.$i.'/3 </b></font>';
}
}elseif($zadID==8)
{
$txt .= '<b><font color=black>Ó÷àñòèå â áàøíå ñìåðòè 0.1</b></font>';
}
else
{
$txt .= '<b><font color=red>Ýõ øóñòðûé ìàëåö, ïîëó÷àë çàäàíèå óæå ñåãîäíÿ! Çàâòðà ïðèõîäè íàêîðìëþ ÷åì íèáóäü âêóñíûì íó è çàäàíèå äàì!</b></font>';
}
mysql_query("INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','".$u->info['city']."','".$u->info['room']."','','".$u->info['login']."','".$txt."','-1','6','0')");
}
//--------------
}
?>
<span style="font-size:12px;">
Ñèëà: <b><? echo $u->stats['s1']; ?></b><br />
Ëîâêîñòü:&nbsp;<b><? echo $u->stats['s2']; ?></b><br />
Èíòóèöèÿ:&nbsp;<b><? echo $u->stats['s3']; ?></b><br />
Âûíîñëèâîñòü:&nbsp;<b><? echo $u->stats['s4']; ?></b><br />
<? if($u->info['level'] > 3 || $u->stats['s5']!=0){ ?>Èíòåëëåêò:&nbsp;<b><? echo 0+$u->stats['s5']; ?></b><br /><? } ?>
<? if($u->info['level'] > 6 || $u->stats['s6']!=0){ ?>Ìóäðîñòü:&nbsp;<b><? echo 0+$u->stats['s6']; ?></b><br /><? } ?>
<? if($u->info['level'] > 9 || $u->stats['s7']!=0){ ?>Äóõîâíîñòü:&nbsp;<b><? echo 0+$u->stats['s7']; ?></b><br /><? } ?>
<? if($u->info['level'] > 14 || $u->stats['s8']!=0){ ?>Âîëÿ:&nbsp;<b><? echo 0+$u->stats['s8']; ?></b><br /><? } ?>
<? if($u->info['level'] > 15 || $u->stats['s9']!=0){ ?>Ñâîáîäà äóõà:&nbsp;<b><? echo 0+$u->stats['s9']; ?></b><br /><? } ?>
<? if($u->info['level'] > 16 || $u->stats['s10']!=0){ ?>Áîæåñòâåííûé:&nbsp;<b><? echo 0+$u->stats['s10']; ?></b><br /><? } ?>
<?
if($u->info['ability'] > 0 || ($u->info['skills'] > 0 && $u->info['level'] > 0))
{
echo '<a href="main.php?skills=1&side=1">+ Ñïîñîáíîñòè</a><br />';
}
?>
&nbsp;<br />
Îïûò:&nbsp;<a href="https://new-combats.com/exp" target="_blank"><? echo number_format($u->info['exp'], 0, ",", " "); ?></a><br />
Óðîâåíü:&nbsp;<? echo $u->info['level']; ?><br />
Ïîáåä:&nbsp;<? echo number_format($u->info['win'], 0, ",", " "); ?><br />
Ïîðàæåíèé:&nbsp;<? echo number_format($u->info['lose'], 0, ",", " "); ?><br />
Íè÷üèõ:&nbsp;<? echo number_format($u->info['nich'], 0, ",", " "); ?><br />
<!--Ñåðèÿ ïîáåä:&nbsp;<?=(0+$u->info['swin'])?><br>
Ñåðèÿ ïîðàæåíèé:&nbsp;<?=(0+$u->info['slose'])?><br>-->
Äåíüãè:&nbsp;<b><? echo $u->info['money']; ?> êð.</b>&nbsp;</br>
Äåíüãè:&nbsp;<b style="color:green"><? echo $u->info['money2']; ?> åêð.</b>&nbsp;</br>
<?
if($u->stats['pbe'] > 0) {
echo '<a href="https://new-combats.com/news/268/" target="_blank">Áîíóñ ïîêóïàòåëÿ:&nbsp;'.$u->stats['pbe'].'&nbsp;óðîâåíü</a>';
$nowby = mysql_fetch_array(mysql_query('SELECT `good` FROM `pay_operation` WHERE `uid` = "'.$u->info['id'].'" AND `good` > 0 ORDER BY `good` DESC LIMIT 1'));
if($u->stats['pbe'] > 0 && date('d.m.Y') != date('d.m.Y',$nowby['good'])) {
echo ' <font color="red"><br>(Ñîâåðøèòå ïîêóïêó ÅÊÐ ÷òîáû ñîõðàíèòü è óâåëè÷èòü áîíóñ ïîêóïàòåëÿ)</font>';
}
echo '<br>';
}
?>
<? if($u->rep['rep3'] >= 0) {
$repovo=$u->rep['rep3']-$u->rep['rep3_buy'];
?>
Âîèíñòâåííîñòü:&nbsp;<b style="color:green"><? echo $repovo; ?> åä.</b><br><? }
?>
Ðåëèêâèé:&nbsp;<b style="color:green"><? echo $u->info['relik']['relik'];/*$u->info['ang_g'];*/ ?> øò.</b><br>
<b><font color='red'>Âçÿòèå Åæåäíåâíîãî çàäàíèÿ: </font> <?=$u->dayquest($u->info['id'])?></b><br>
<?php
if ($u->info['level'] <= 0 || $u->info['exp'] > 499999998) {return;}
?>
<b>Âàø Áîíóñ <?=$u->pensia(false)?></b><br>
<?php
if ($u->info['level'] <= 2 ) {return;}
$bns = mysql_fetch_array(mysql_query('SELECT `id`,`time` FROM `aaa_bonus` WHERE `uid` = "'.$u->info['id'].'" AND `time` > '.time().' LIMIT 1'));
if(isset($_GET['takebns']) && $u->newAct($_GET['takebns']) && !isset($bns['id'])) {
$u->takeBonus();
$bns = mysql_fetch_array(mysql_query('SELECT `id`,`time` FROM `aaa_bonus` WHERE `uid` = "'.$u->info['id'].'" AND `time` > '.time().' LIMIT 1'));
}
if (isset($bns['id'])) {
echo '<button style="width:164px;margin-top:5px;" disabled="disabled" offclick="alert(\' ×åðåç '.$u->timeOut($bns['time']-time()).'\');" class="btn btn-danger"> ×åðåç '.$u->timeOut($bns['time']-time()).' </button>';
}else{
//Ñòðàíèöà ðîäèòåëÿ
?>
<button style="width:164px;margin-top:5px;margin-bottom:5px;" class="btn btn-success" onclick="myWindow5(this)">Çàïðîñèòü!</button></div>
<script>
function myWindow5(e) {// ñîçäàòü iframe è äîáàâèòü åãî ïîñëå êíîïêè
if (e.nextSibling.nodeName.toLowerCase() != "iframe")
{// åñëè ïîñëå êíîïêè íåò iframe
var iframe = document.createElement('iframe');
iframe.setAttribute('src', 'https://new-combats.com/bonuss.php');
iframe.setAttribute('height', '150');
iframe.setAttribute('style', 'width:164px; background-color: rgba(255, 255, 255, 0); padding: 0px 8px 3px 8px; box-shadow: 0px 0px 15px 0px rgba(1, 2, 4, 0.25); float: left; -webkit-transition: .2s ease-out; -o-transition: .2s ease-out; moz-transition: .2s ease-out; transition: .2s ease-out; margin: 0; z-index: 3;');
e.parentNode.insertBefore(iframe, e.nextSibling);
}
}
</script>
<style>
iframe[src^="https://new-combats.com/bonuss.php"]
{ /* êàêîé-òî ñòèëü ó iframe. Åãî ìîæíî îòöåíòðèðîâàòü ñòèëÿìè CSS ïî öåíòðó îêíà áðàóçåðà, ñäåëàòü îáùèé ôîí ñòðàíèöû çàòóìàíåííûì */
width: 100%;
border: none;
}
</style>
<?php
}