Вход Регистрация
Файл: l2ps_v5/pic/udar.php
Строк: 65
<?php


include("files/ini.php");
include(
"files/data.php");


$ref=rand(1,3);
$ref2=rand(1,3);

if(
$udata37==""){include_once("files/zag.php");echo'Вы находитесь не в окрестностях!';include_once'files/down.php';exit;}

$a = @mysql_query("select * from okrestnosti WHERE `id`='$id' ");
while(
$arr=mysql_fetch_array($a)){


$hp=trim($udata16);
$allhp=trim($udata17);

$mob2=$arr['mob2'];
$mob3=$arr['mob3'];
$mob5=$arr['mob5'];
$mob0=$arr['mob0'];
$mob6=$arr['mob6'];
$mob7=$arr['mob7'];
$mob8=$arr['mob8'];
$mob9=$arr['mob9'];
$mob10=$arr['mob10'];
$id=$arr['id'];


$allhp2=trim($mob3);
$die=trim($udat[5]);
$hp2=trim($mob2);



$udk=$udata4-$mob6;

if(
$udk<"0"){ $udk="0";}
if(
$tip!=="mag"){
$time date("H:i:s");

if(
$mob8=="RaidBoss"){

$raiduron=$udata4/2;

$udk=rand($raiduron,$udata4);
}
if(
$mob8=="Кристал"){

$raiduron=$udata4/2;

$udk=rand($raiduron,$udata4);
}

    
mysql_query("INSERT INTO `battle_log` VALUES ('', '[".$time."] - Вы нанесли $udk урона монстру.', '".$log."')");
}

if(
$mob8=="RaidBoss"){
$raiduron=$udata4/2;

$udk=rand($raiduron,$udata4);
}
if(
$mob8=="Кристал"){
$raiduron=$udata4/2;

$udk=rand($raiduron,$udata4);
}



$udk=$mob2-$udk;


mysql_query("UPDATE `okrestnosti` SET `mob2`='$udk' WHERE `id`='$id'");

$met=$mob5*3;

$udarr=$met-$udata3;

if(
$udarr<"0"){ $udarr="0";}
$refin=rand(1,3);
if(
$refin==1){
$udata16=$udata16-$udarr;
if(
$mob8=="RaidBoss"){
$udarr=rand($mob5,$mob6);
$udata16=$udata16-$udarr;
}
if(
$mob8=="Кристал"){
$udarr=rand($mob5,$mob6);
$udata16=$udata16-$udarr;
}
$time date("H:i:s");
    
mysql_query("INSERT INTO `battle_log` VALUES ('', '[".$time."] - Вы не успели отвернутся от удара, урон $udarr', '".$log."')");
}else{
$time date("H:i:s");
    
mysql_query("INSERT INTO `battle_log` VALUES ('', '[".$time."] - Вы отпрыгнули от удара', '".$log."')");
}



mysql_query("UPDATE `users` SET `udata16`='$udata16' WHERE `udata0`='$log'");




if(
$udata16<="0"){ header ("Location: gk.php?go=lose"); exit; }
if(
$udata29<="0"){ header ("Location: ataka.php?&startan=$startan&id=$id"); exit; }

$_title '&#x423;&#x434;&#x430;&#x440;';

header ("Location: ataka.php?&id=$id&startan=$startan&");

if(!@
file("data/tmp/$log.dat")){echo"<small>Ошибка!</small></p></card></wml>"; exit; }



if(
$tip=="mag"){

$qi mysql_query("SELECT * from `mag` WHERE `mag10`='".$log."' and `id`='".$name."' ");
if (
mysql_affected_rows()==0)
{
echo 
"Магия не существует!";
}
else
{
while(
$rowi=mysql_fetch_array($qi))
{

$data[0]=trim($rowi['mag0']);
$data[1]=trim($rowi['mag1']);


$udar=round($udata4+$data[0]);

if(
$mob8=="RaidBoss"){$mob6="0";}
if(
$mob8=="Кристал"){$mob6="0";}

$udk=$udata4+$udar-$mob6;

if(
$udk<"0"){ $udk="0";}

$arr mysql_query("SELECT * from `item` WHERE `uda7`='".$log."' and `uda4`='Soulshot' and uda3>0 ");
$qi mysql_query("SELECT * from `item` WHERE `uda7`='".$log."' and `uda4`='Soulshot' and uda3>0 ");
if (
mysql_affected_rows()==0)
{
echo 
"Вещей нет!";

}
else
{

while(
$rowi=mysql_fetch_array($qi))
{
if(
$rowi[uda3]>0){
$uda3=$rowi[uda3]-1;
mysql_query("UPDATE `item` SET `uda3`='$uda3' WHERE `uda7`='$log' and `uda4`='Soulshot'");}
}
if(!
$rowi[uda3]>0){
$udk=$udk*2;
}

}

if(
$mob8=="RaidBoss"){
$raiduron=$udata4/2;

$udk=rand($raiduron,$udata4);
}if(
$mob8=="Кристал"){
$raiduron=$udata4/2;

$udk=rand($raiduron,$udata4);
}

    
mysql_query("INSERT INTO `battle_log` VALUES ('', '[".$time."] - Вы нанесли $udk урона монстру.', '".$log."')");



$udk=$mob2-$udk;




$mob2=$mob2-$udar;




mysql_query("UPDATE `okrestnosti` SET `mob2`='$udk' WHERE `id`='$id'");

$udata29=$udata29-$rowi['mag1'];

mysql_query("UPDATE `users` SET `udata29`='$udata29' WHERE `udata0`='$log'");



if(
$name!==$data[8]){echo"&#x423; &#x432;&#x430;&#x441; &#x442;&#x430;&#x43A;&#x43E;&#x439; &#x43C;&#x430;&#x433;&#x438;&#x438; &#x43D;&#x435;&#x442;!"; include("files/down.php"); exit;}



}}
if(
$udata29<"0"){echo"<small>&#x423; &#x432;&#x430;&#x441; &#x43D;&#x435;&#x445;&#x432;&#x430;&#x442;&#x430;&#x435;&#x442; MP.</small>";include("files/down.php"); exit;}


if(
$ref=="2"){

$text = @file("data/tmp/$log.dat");
$udat explode(":||:",$text[0]);
$met=$udat[2]*3;


$udarr=$met+$ref-$udata3/2;

if(
$udarr<"0"){ $udarr="0";}

$udata16=$udata16-$udarr;

if(
$mob8=="RaidBoss"){
$rb=rand($mob5,$mob6);
$udarr=$rb;
$udata16=$udata16-$udarr;
}
if(
$mob8=="Кристал"){
$rb=rand($mob5,$mob6);
$udarr=$rb;
$udata16=$udata16-$udarr;
}

mysql_query("UPDATE `users` SET `udata16`='$udata16' WHERE `udata0`='$log'");


$msg=rand(0,2);
if(
$msg=="0"){$sms="<small>Вы засомневались и в вас попали.</small>";}
if(
$msg=="1"){$sms="<small>Вы уклонились, но монстр как будто угадал куда вы уклоняетесь и попал прямо в вас.</small>";}
if(
$msg=="2"){$sms="<small>Вы не успели увернуться от удара.</small>";}


echo
"$sms <small><b>Урон: $udarr</b></small><br/>";
 }else{

$msg=rand(0,2);
if(
$msg=="0"){$sms="<small>Вы отскочили от удара.</small>";}
if(
$msg=="1"){$sms="<small>Вы пригнулись и монстр промахнулся.</small>";}
if(
$msg=="2"){$sms="<small>Вы отпрыгнули назад.</small>";}

echo
"$sms<br/>";}


$msg=rand(0,2);
if(
$msg=="0"){$sms="<small>Засомневался, но ударил прямо в цель!</small>";}
if(
$msg=="1"){$sms="<small>Вы решительно ударили во врага.</small>";}
if(
$msg=="2"){$sms="<small>Враг пытался увернуться, но вы сильно ударили во врага.</small>";}

echo
"$sms <small><b>Урон: $udar</b></small><br/>";


}
}



include_once
"files/down.php";
?>
Онлайн: 0
Реклама