$rs=mysql_query("select * from labirint where user_id='".$_SESSION['uid']."'"); $t=mysql_fetch_array($rs); /* ///Удаляем убитых ботов с локации // Узнаем номер ледующей локи(где проводилась зачистка) $apol = mysql_fetch_array(mysql_query("SELECT * FROM `labirint` WHERE glava='$glava' and name='".$t['name']."'")); $comment1 = "лабиринт".$apol['boi']; //Ищем бой, проверяем кто победил $apol1 = mysql_fetch_array(mysql_query("SELECT * FROM `battle` WHERE coment='{$comment1}' and timeout='3'")); //Если победил мобов, то убираем их из таблицы лабиринт if($apol1['win']=='1') { mysql_query("UPDATE podzem3 SET `n".$apol['boi']."` = '' WHERE glava = '{$glava}' LIMIT 2"); } */ $f = mysql_query("SELECT * FROM podzem3 WHERE glava='$glava' and name='".$t['name']."'"); while($rt = mysql_fetch_array($f)){ if($vector=='0'){$loc4=$location+30;} if($vector=='0'){$loc3=$location+20;} if($vector=='0'){$loc2=$location+10;} if($vector=='180'){$loc4=$location-30;} if($vector=='180'){$loc3=$location-20;} if($vector=='180'){$loc2=$location-10;} if($vector=='90'){$loc4=$location+3;} if($vector=='90'){$loc3=$location+2;} if($vector=='90'){$loc2=$location+1;} if($vector=='270'){$loc4=$location-3;} if($vector=='270'){$loc3=$location-2;} if($vector=='270'){$loc2=$location-1;} $mesto = $location; if($location == '01'){$mesto = '1';} if($location == '02'){$mesto = '2';} if($location == '03'){$mesto = '3';} if($location == '04'){$mesto = '4';} if($location == '05'){$mesto = '5';} if($location == '06'){$mesto = '6';} if($location == '07'){$mesto = '7';} if($location == '08'){$mesto = '8';} if($location == '09'){$mesto = '9';} include"podzem/raschet_bot.php"; //////////////////////////////////////////////// $fd = mysql_query("SELECT * FROM podzem4 WHERE glava='$glava' and name='".$t['name']."'"); $repa = mysql_fetch_array($fd); //////////////Объекты//////////////// if($repa["n$mesto"]=='20'){ mysql_query("UPDATE `users`,`online` SET `users`.`room` = '404',`online`.`room` = '404' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '{$_SESSION['uid']}' ;"); print ""; exit; } /////// //Вход на 2ой этаж if($repa["n$loc2"]=='et2' and $vector==$repa["v$loc2"]){ $s.='
'; } //Вход на 1ый этаж if($repa["n$loc2"]=='et1' and $vector==$repa["v$loc2"]){ $s.=''; } if($repa["n$loc2"]=='20' and $vector==$repa["v$loc2"]){ $s.=''; } if($repa["n$loc3"]=='20' and $vector==$repa["v$loc3"]){ $s.=''; } if($repa["n$loc4"]=='20' and $vector==$repa["v$loc4"]){ $s.=''; } if($repa["n$loc2"]=='el' and $vector==$repa["v$loc2"]){ $s.=''; } if($repa["n$loc3"]=='el' and $vector==$repa["v$loc3"]){ $s.=''; } if(($repa["n$mesto"]=='11.1' or $repa["n$mesto"]=='11.0') and $vector==$repa["v$mesto"]){ $s.=''; } if(($repa["n$loc2"]=='11.1' or $repa["n$loc2"]=='11.0') and $vector==$repa["v$loc2"]){ $s.=''; } if(($repa["n$loc3"]=='11.1' or $repa["n$loc3"]=='11.0') and $vector==$repa["v$loc3"]){ $s.=''; } if(($repa["n$loc4"]=='11.1' or $repa["n$loc4"]=='11.0') and $vector==$repa["v$loc4"]){ $s.=''; } ///////////// if(($repa["n$loc2"]=='12.1' or $repa["n$loc2"]=='12.0') and $vector==$repa["v$loc2"]){ $s.=''; } if(($repa["n$loc3"]=='12.1' or $repa["n$loc3"]=='12.0') and $vector==$repa["v$loc3"]){ $s.=''; } if(($repa["n$loc4"]=='12.1' or $repa["n$loc4"]=='12.0') and $vector==$repa["v$loc4"]){ $s.=''; } ////////////////klju4i///////////////////////// if($repa["n$mesto"]=='key1' or $repa["n$loc2"]=='key1' or $repa["n$loc3"]=='key1' or $repa["n$loc4"]=='key1'){$nomers='1';} if($repa["n$mesto"]=='key2' or $repa["n$loc2"]=='key2' or $repa["n$loc3"]=='key2' or $repa["n$loc4"]=='key2'){$nomers='2';} if($repa["n$mesto"]=='key3' or $repa["n$loc2"]=='key3' or $repa["n$loc3"]=='key3' or $repa["n$loc4"]=='key3'){$nomers='3';} if($repa["n$mesto"]=='key4' or $repa["n$loc2"]=='key4' or $repa["n$loc3"]=='key4' or $repa["n$loc4"]=='key4'){$nomers='4';} if($repa["n$mesto"]=='key5' or $repa["n$loc2"]=='key5' or $repa["n$loc3"]=='key5' or $repa["n$loc4"]=='key5'){$nomers='5';} if($repa["n$mesto"]=='key6' or $repa["n$loc2"]=='key6' or $repa["n$loc3"]=='key6' or $repa["n$loc4"]=='key6'){$nomers='6';} if($repa["n$mesto"]=='key7' or $repa["n$loc2"]=='key7' or $repa["n$loc3"]=='key7' or $repa["n$loc4"]=='key7'){$nomers='7';} if($repa["n$mesto"]=='key8' or $repa["n$loc2"]=='key8' or $repa["n$loc3"]=='key8' or $repa["n$loc4"]=='key8'){$nomers='8';} if($repa["n$mesto"]=='key9' or $repa["n$loc2"]=='key9' or $repa["n$loc3"]=='key9' or $repa["n$loc4"]=='key9'){$nomers='9';} if($repa["n$mesto"]=='key10' or $repa["n$loc2"]=='key10' or $repa["n$loc3"]=='key10' or $repa["n$loc4"]=='key10'){$nomers='10';} if(($repa["n$mesto"]=='key1' or $repa["n$mesto"]=='key2' or $repa["n$mesto"]=='key3' or $repa["n$mesto"]=='key4' or $repa["n$mesto"]=='key5' or $repa["n$mesto"]=='key6' or $repa["n$mesto"]=='key7' or $repa["n$mesto"]=='key8' or $repa["n$mesto"]=='key9' or $repa["n$mesto"]=='key10') and $vector==$repa["v$mesto"]){ $s.=''; } if(($repa["n$loc2"]=='key1' or $repa["n$loc2"]=='key2' or $repa["n$loc2"]=='key3' or $repa["n$loc2"]=='key4' or $repa["n$loc2"]=='key5' or $repa["n$loc2"]=='key6' or $repa["n$loc2"]=='key7' or $repa["n$loc2"]=='key8' or $repa["n$loc2"]=='key9' or $repa["n$loc2"]=='key10') and $vector==$repa["v$loc2"]){ $s.=''; } if($step2['fwd'] and ($repa["n$loc3"]=='key1' or $repa["n$loc3"]=='key2' or $repa["n$loc3"]=='key3' or $repa["n$loc3"]=='key4' or $repa["n$loc3"]=='key5' or $repa["n$loc3"]=='key6' or $repa["n$loc3"]=='key7' or $repa["n$loc3"]=='key8' or $repa["n$loc3"]=='key9' or $repa["n$loc3"]=='key10') and $vector==$repa["v$loc3"]){ $s.=''; } if($step3['fwd'] and ($repa["n$loc4"]=='key1' or $repa["n$loc4"]=='key2' or $repa["n$loc4"]=='key3' or $repa["n$loc4"]=='key4' or $repa["n$loc4"]=='key5' or $repa["n$loc4"]=='key6' or $repa["n$loc4"]=='key7' or $repa["n$loc4"]=='key8' or $repa["n$loc4"]=='key9' or $repa["n$loc4"]=='key10') and $vector==$repa["v$loc4"]){ $s.=''; } if($step3['fwd'] and ($repa["n$loc4"]=='13.1' or $repa["n$loc4"]=='13.0')){ $s.=''; } if($step3['fwd'] and ($repa["n$loc4"]=='14.1' or $repa["n$loc4"]=='14.0')){ $s.=''; } //////////////////////3///////////////////////// if($step3['fwd'] and $rt["n$loc4"]!='') { if($k_b=='1'){ $s.=''; } if($k_b=='2'){ $s.=''; $s.=''; } if($k_b=='3'){ $s.=''; $s.=''; $s.=''; } } $rogs=mysql_query("SELECT login,location FROM `labirint` WHERE `glava`='$glava'"); $i=0; while($mores=mysql_fetch_array($rogs)){ $i++; $nus=mysql_num_rows($rogs); if($vector == 0){$lac = $location+30;} if($vector == 90){$lac = $location+3;} if($vector == 180){$lac = $location-30;} if($vector == 270){$lac = $location-3;} if($step3['fwd'] and $lac==$mores['location'] and $nus>=2) { if($nus==2){ $l = '170'; } if($nus==3){ if($i==1){$l = '140';} if($i==2){$l = '170';} if($i==3){$l = '200';} } if($nus==4){ if($i==1){$l = '140';} if($i==2){$l = '160';} if($i==3){$l = '180';} if($i==4){$l = '200';} } $s.=''; } } if($step3['fwd'] and $repa["n$loc4"]>='1' and $repa["n$loc4"]<='10'){ $s.=''; } ///////////////////////////////////////////// if($step2['fwd'] and ($repa["n$loc3"]=='13.1' or $repa["n$loc3"]=='13.0')){ $s.=''; } if($step2['fwd'] and ($repa["n$loc3"]=='14.1' or $repa["n$loc3"]=='14.0')){ $s.=''; } /////////////////////2/////////////////////// if($step2['fwd'] and $rt["n$loc3"]!='') { if($k_b3=='1'){ $s.=''; } if($k_b3=='2'){ $s.=''; $s.=''; } if($k_b3=='3'){ $s.=''; $s.=''; $s.=''; } } $rogs=mysql_query("SELECT login,location FROM `labirint` WHERE `glava`='$glava'"); $i=0; while($mores=mysql_fetch_array($rogs)){ $i++; $nus=mysql_num_rows($rogs); if($vector == 0){$lac = $location+20;} if($vector == 90){$lac = $location+2;} if($vector == 180){$lac = $location-20;} if($vector == 270){$lac = $location-2;} if($step2['fwd'] and $lac==$mores['location'] and $nus>=2) { if($nus==2){ $l = '160'; } if($nus==3){ if($i==1){$l = '130';} if($i==2){$l = '160';} if($i==3){$l = '190';} } if($nus==4){ if($i==1){$l = '120';} if($i==2){$l = '150';} if($i==3){$l = '180';} if($i==4){$l = '210';} } $s.=''; } } if($step2['fwd'] and $repa["n$loc3"]>='1' and $repa["n$loc3"]<='10'){ $s.=''; $s.=''; } /////////////////////////////////////////// if($step1['fwd'] and ($repa["n$loc2"]=='13.1' or $repa["n$loc2"]=='13.0')){ $s.=''; } if($step1['fwd'] and ($repa["n$loc2"]=='14.1' or $repa["n$loc2"]=='14.0')){ $s.=''; } /////////////////////1///////////////////// if($step1['fwd'] and $rt["n$loc2"]!='') { if($k_b2=='1'){ if($rt["n$loc2"]=='8'){ $s.=''; }else{$s.='';} } if($k_b2=='2'){ $s.=''; $s.=''; } if($k_b2=='3'){ $s.=''; $s.=''; $s.=''; } } $rogs=mysql_query("SELECT login,location FROM `labirint` WHERE `glava`='$glava'"); $i=0; while($mores=mysql_fetch_array($rogs)){ $i++; $nus=mysql_num_rows($rogs); if($vector == 0){$lac = $location+10;} if($vector == 90){$lac = $location+1;} if($vector == 180){$lac = $location-10;} if($vector == 270){$lac = $location-1;} if($step1['fwd'] and $lac==$mores['location'] and $nus>=2) { if($nus==2){ $l = '150'; } if($nus==3){ if($i==1){$l = '90';} if($i==2){$l = '150';} if($i==3){$l = '180';} } if($nus==4){ if($i==1){$l = '100';} if($i==2){$l = '140';} if($i==3){$l = '180';} if($i==4){$l = '210';} } $s.=''; } } //////////////////////////////////////// if($step1['fwd'] and $repa["n$loc2"]>='1' and $repa["n$loc2"]<='10'){ $s.=''; $s.=''; } $mesto = $location; if($location == '01'){$mesto = '1';} if($location == '02'){$mesto = '2';} if($location == '03'){$mesto = '3';} if($location == '04'){$mesto = '4';} if($location == '05'){$mesto = '5';} if($location == '06'){$mesto = '6';} if($location == '07'){$mesto = '7';} if($location == '08'){$mesto = '8';} if($location == '09'){$mesto = '9';} //////////////0-ja//////////////// if($step1['fwd'] and $repa["n$mesto"]>='1' and $repa["n$mesto"]<='10'){ $s.=''; } }