46 lines
2.0 KiB
PHP
46 lines
2.0 KiB
PHP
<?
|
|
if( isset($s[1]) && $s[1] == '15/vorota' ) {
|
|
/*
|
|
Ñóíäóê: Ñóíäóê Ñòðàæà, ìîæíî íàéòè
|
|
"Âåðõíÿÿ ×àñòü Êëþ÷à Ïîðòàëà" - 4443
|
|
*/
|
|
//Âñå ïåðåìåííûå ñîõðàíÿòü â ìàññèâå $vad !
|
|
$vad = array(
|
|
'go' => true
|
|
);
|
|
$vad['you'] = mysql_fetch_array(mysql_query('SELECT * FROM `katok_now` WHERE `clone` = "'.$u->info['id'].'" LIMIT 1'));
|
|
$vad['itm'] = mysql_fetch_array(mysql_query('SELECT * FROM `items_users` WHERE `item_id` = 4910 AND `uid` = "'.$u->info['id'].'" LIMIT 1'));
|
|
if($u->info['x'] != $obj['x']) {
|
|
$r = 'Âû ìîæåòå óäàðèòü òîëüêî ïðÿìî ïåðåä âîðîòàìè, áèòü ñáîêó íåëüçÿ!';
|
|
}elseif(($vad['you']['team'] == 2 && $obj['name'] == 'Âîðîòà Ñèíèõ') || ($vad['you']['team'] == 1 && $obj['name'] == 'Âîðîòà Êðàñíûõ')) {
|
|
$r = 'Âû õîòèòå çàáèòü øàéáó â ñâîè âîðîòà? :)';
|
|
}elseif(isset($vad['itm']['id'])) {
|
|
$r = 'Âû áðîñèëè øàéáó â '.$obj['name'].'! ';
|
|
//Ïðîâåðÿåì çàáèë èëè íåò, 30% ÷òî çàáèë
|
|
if(rand(0,100) < 30) {
|
|
$r = ' <B>ÃÎÎÎÎOÎÎÎÎÎÎÎÎÎË!</b> Øàéáà âîçâðàùåíà íà öåíòð ïîëÿ!';
|
|
$this->sys_chat('<b>'.$u->info['login'].'</b> çàáèë <font color=red><b>ÃÎË!!!</b></font>! (Øàéáà ïåðåìåùåíà íà öåíòð)');
|
|
mysql_query('UPDATE `katok_now` SET `win` = `win` + 1 WHERE `id` = "'.$vad['you']['id'].'" LIMIT 1');
|
|
}else{
|
|
$r = ' È ïðîìàçàëè! Øàéáà âîçâðàùåíà íà öåíòð ïîëÿ!';
|
|
$this->sys_chat('<b>'.$u->info['login'].'</b> ïðîìàçàë! (Øàéáà ïåðåìåùåíà íà öåíòð)');
|
|
}
|
|
//Óäàëÿåì øàéáó è ñòàâèì íà öåíòð ñíîâà
|
|
mysql_query('DELETE FROM `items_users` WHERE `id` = "'.$vad['itm']['id'].'" LIMIT 1');
|
|
//
|
|
mysql_query('INSERT INTO `dungeon_obj` (
|
|
`name`,`dn`,`x`,`y`,`img`,`delete`,`action`,`for_dn`,
|
|
`type`,`w`,`h`,`s`,`s2`,`os1`,`os2`,`os3`,`os4`,`type2`,`top`,`left`,`date`
|
|
) VALUES (
|
|
"Øàéáà","'.$u->info['dnow'].'","5","7","shaiba.png","0","fileact:15/shaiba","0",
|
|
"0","120","220","0","0","5","8","12","0","0","0","0","{use:\'takeit\',rt1:69,rl1:-47,rt2:74,rl2:126,rt3:76,rl3:140,rt4:80,rl4:150}"
|
|
)');
|
|
//
|
|
}else{
|
|
$r = 'Áåç øàéáû âàì çäåñü íå÷åãî äåëàòü, îòïðàâëÿéòåñü è îòáåðèòå å¸!';
|
|
}
|
|
|
|
|
|
unset($vad);
|
|
}
|
|
?>
|