Файл: test3.php
Строк: 3113
<?
$thyr=mysql_query("SELECT * FROM `ohota` WHERE `tip`='pit'");
$numtr=mysql_num_rows($thyr);
if($numtr!=0)
{
while($thy=mysql_fetch_array($thyr))
{
$bvs=mysql_query("SELECT * FROM `ohota` WHERE `usr`='".$thy['usr']."' and `tip`='ohot'");
$bv=mysql_fetch_array($bvs);
$mob=mysql_fetch_array(mysql_query("SELECT * FROM `ohota_mob` WHERE `id`='".$bv['enemy']."'"));
$ustr=mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id`='".$bv['usr']."'"));
$mz=mysql_query("SELECT * FROM `ohota_mob` WHERE `usr`='".$ustr['id']."'");
$mnzzz=mysql_num_rows($mz);
if($mnzzz!=0 and $thy['hp']>0)
{
$trs=mysql_query("SELECT * FROM `pit` WHERE `id`='".$thy['pit']."' and `usr`='".$bv['usr']."'");
$ts=mysql_fetch_array($trs);
$tn=time();
/////1///
$mobs=mysql_query("SELECT * FROM `mag_pit` WHERE `usr`='".$ustr['id']."' and `mag`='1' and `otkat`<='".$tn."' and `pit`='".$ts['id']."'");
$rows=mysql_num_rows($mobs);
if($rows==0)
{
}
else
{
$skill=mysql_fetch_array($mobs);
$r=rand(1,100);
if($r<=$skill['shans'])
{
$tim=time()+12;
mysql_query("UPDATE `ohota` SET `mag_mast`='".$skill['bonus']."', `mag_mast_time`='".$tim."' WHERE `id`='".$bv['id']."'");
$ttt=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt."' WHERE `id`='".$skill['id']."'");
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$bv['usr']."',
`text`='<img src=img/main/b1.png> <font color=#ff9900>".$ts['name']."</font> использовал навык <font color=#00ffff>".$skill['name']."</font> (".$ustr['usr']." +".$skill['bonus']."% урона от сфер)'
");
}
else
{
$ttt=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt."' WHERE `id`='".$skill['id']."'");
}
}
///
//////2/////
$mobs2=mysql_query("SELECT * FROM `mag_pit` WHERE `usr`='".$ustr['id']."' and `mag`='3' and `otkat`<='".$tn."' and `pit`='".$ts['id']."'");
$rows2=mysql_num_rows($mobs2);
if($rows2==0)
{
}
else
{
$skill2=mysql_fetch_array($mobs2);
$r2=rand(1,100);
if($r2<=$skill2['shans'])
{
$tim2=time()+12;
mysql_query("UPDATE `ohota` SET `mag_ney_time`='".$tim2."' WHERE `id`='".$thy['id']."'");
$ttt2=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt2."' WHERE `id`='".$skill2['id']."'");
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='<img src=img/main/b1.png> <font color=#ff9900>".$ts['name']."</font> использовал навык <font color=#00ffff>".$skill2['name']."</font>'
");
}
else
{
$ttt2=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt2."' WHERE `id`='".$skill2['id']."'");
}
}
//////
/////3////
$mobs3=mysql_query("SELECT * FROM `mag_pit` WHERE `usr`='".$ustr['id']."' and `mag`='4' and `otkat`<='".$tn."' and `pit`='".$ts['id']."'");
$rows3=mysql_num_rows($mobs3);
if($rows3==0)
{
}
else
{
$skill3=mysql_fetch_array($mobs3);
$r3=rand(1,100);
if($r3<=$skill3['shans'])
{
$ttt3=time()+30;
$sila=$skill3['sila'];
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt3."' WHERE `id`='".$skill3['id']."'");
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='<img src=img/main/b1.png> <font color=#ff9900>".$ts['name']."</font> использовал навык <font color=#00ffff>".$skill3['name']."</font> (".$mob['name']." -".$sila.")'
");
$hp=$mob['hp']-$sila;
if($hp<=0)
{
$nai=$ustr['reit_oh']+1;
$ds=$ustr['dost2a']+1;
mysql_query("UPDATE `users` SET `reit_oh`='".$nai."', `dost2a`='".$ds."' WHERE `id`='".$ustr['id']."'");
$hp=0;
$lg2='<img src=img/main/b7.png> <font color=#ff9900>'.$ts['name'].'</font> убил '.$mob['name'].'';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg2."'
");
$exp=$mob['hp'];
mysql_query("DELETE FROM `ohota_mob` WHERE `id`='".$mob['id']."'");
$nums=mysql_num_rows(mysql_query("SELECT * FROM `ohota_mob` WHERE `usr`='".$bv['usr']."'"));
if($nums==0 and $bv['status']==0)
{
$mba=mysql_fetch_array(mysql_query("SELECT * FROM `ohota_mb` WHERE `id`='".$bv['volna']."'"));
if($mba['kl']>0 and $mba['fm']==0 and $mba['exp']==0)
{
$lg12='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r16.png alt=kl>'.$mba['kl'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12."'
");
$dd=date('d');
$dm=date('m');
if($dd>=8 and $dd<=11 and $dm==3)
{
if($ustr['pol']==1)
{
$rr=rand(1,50);
if($rr==1)
{
$lg12z2='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8r.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z2."'
");
$f8r=$ustr['f8r']+1;
}
else
{
$f8r=$ustr['f8r'];
}
}
else
{
$f8r=$ustr['f8r'];
}
$f8=$ustr['f8']+1;
mysql_query("UPDATE `users` SET `f8`='".$f8."', `f8r`='".$f8r."' WHERE `id`='".$ustr['id']."'");
$lg12z='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z."'
");
}
$res=$ustr['kl']+$mba['kl'];
mysql_query("UPDATE `users` SET `kl`='".$res."' WHERE `id`='".$ustr['id']."'");
}
elseif($mba['kl']>0 and $mba['fm']>0 and $mba['exp']==0)
{
$lg12='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r16.png alt=kl>'.$mba['kl'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12."'
");
$lg122='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r17.png alt=fm>'.$mba['fm'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg122."'
");
$dd=date('d');
$dm=date('m');
if($dd>=8 and $dd<=11 and $dm==3)
{
if($ustr['pol']==1)
{
$rr=rand(1,50);
if($rr==1)
{
$lg12z2='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8r.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z2."'
");
$f8r=$ustr['f8r']+1;
}
else
{
$f8r=$ustr['f8r'];
}
}
else
{
$f8r=$ustr['f8r'];
}
$f8=$ustr['f8']+3;
mysql_query("UPDATE `users` SET `f8`='".$f8."', `f8r`='".$f8r."' WHERE `id`='".$ustr['id']."'");
$lg12z='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8.png>3</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z."'
");
}
$res=$ustr['kl']+$mba['kl'];
$res2=$ustr['fm']+$mba['fm'];
mysql_query("UPDATE `users` SET `kl`='".$res."', `fm`='".$res2."' WHERE `id`='".$ustr['id']."'");
}
elseif($mba['kl']>0 and $mba['fm']>0 and $mba['exp']>0)
{
$lg12='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r16.png alt=kl>'.$mba['kl'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12."'
");
$lg122='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r17.png alt=fm>'.$mba['fm'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg122."'
");
$dd=date('d');
$dm=date('m');
if($dd>=8 and $dd<=11 and $dm==3)
{
if($ustr['pol']==1)
{
$rr=rand(1,50);
if($rr==1)
{
$lg12z2='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8r.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z2."'
");
$f8r=$ustr['f8r']+1;
}
else
{
$f8r=$ustr['f8r'];
}
}
else
{
$f8r=$ustr['f8r'];
}
$f8=$ustr['f8']+3;
mysql_query("UPDATE `users` SET `f8`='".$f8."', `f8r`='".$f8r."' WHERE `id`='".$ustr['id']."'");
$lg12z='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8.png>3</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z."'
");
}
$res=$ustr['kl']+$mba['kl'];
$res2=$ustr['fm']+$mba['fm'];
if($ustr['lvl']>$ustr['rang'])
{
$vips=mysql_query("SELECT * FROM `vip` WHERE `usr`='".$ustr['id']."'");
$nvip=mysql_num_rows($vips);
if($nvip!=0)
{
$mba['exp']=$mba['exp']*2;
}
else
{
$mba['exp']=$mba['exp'];
}
}
else
{
$mba['exp']=0;
}
$exp=$ustr['exp_rang']+$mba['exp'];
mysql_query("UPDATE `users` SET `kl`='".$res."', `fm`='".$res2."', `exp_rang`='".$exp."' WHERE `id`='".$ustr['id']."'");
$thyr=rand(1,200);
if($thyr==1)
{
if($ustr['lvl']>30 and $ustr['lvl']<36)
{
$r=rand(1,15);
if($r==1)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3274'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==2)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3275'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==3)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3276'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==4)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3282'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==5)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3283'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==6)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3284'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==7)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3292'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==8)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3293'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==9)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3294'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==10)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3311'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==11)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3310'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==12)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3309'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==13)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3312'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==14)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3313'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==15)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3314'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
}
if($ustr['lvl']>35 and $ustr['lvl']<40)
{
$r=rand(1,13);
if($r==1)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3277'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==2)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3285'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==3)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3286'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==4)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3287'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==5)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3295'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==6)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3296'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==7)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3297'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==8)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3308'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==9)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3307'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==10)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3306'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==11)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3315'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==12)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3316'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==13)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3317'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
}
if($ustr['lvl']>39)
{
$r=rand(1,22);
if($r==1)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3278'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==2)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3279'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==3)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3280'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==4)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3282'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==5)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3281'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==6)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3288'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==7)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3289'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==8)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3290'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==9)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3291'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==10)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3298'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==11)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3299'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==12)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3300'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==13)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3301'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==14)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3313'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==15)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3305'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==16)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3304'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==17)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3303'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==18)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3302'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==19)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3318'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==20)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3319'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==21)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3320'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==22)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3321'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
}
$lg122z='<img src=img/main/e9.png> <font color=#00ff00>Вам выпала вещь <font color=#ffcc00>'.$thy['name'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg122z."'
");
}
}
if($ustr['kv']==100 and $bv['volna']==6)
{
$kv=$ustr['kv2']+1;
mysql_query("UPDATE `users` SET `kv2`='".$kv."' WHERE `id`='".$ustr['id']."'");
}
if($ustr['kv']==101 and $bv['volna']==18)
{
$kv=$ustr['kv2']+1;
mysql_query("UPDATE `users` SET `kv2`='".$kv."' WHERE `id`='".$ustr['id']."'");
}
if($ustr['kv']==105 and $bv['volna']==54)
{
$kv=$ustr['kv2']+1;
mysql_query("UPDATE `users` SET `kv2`='".$kv."' WHERE `id`='".$ustr['id']."'");
}
if($ustr['kv']==17 and $bv['volna']==1)
{
mysql_query("UPDATE `users` SET `kv`='18' WHERE `id`='".$ustr['id']."'");
}
$v2=$bv['volna']+1;
if($v2>=55)
{
mysql_query("DELETE FROM `ohota` WHERE `usr`='".$bv['usr']."'");
mysql_query("INSERT INTO `user_log` SET
`usr`='".$ustr['id']."',
`text`='Вы успешно прошли охоту!'
");
}
$ma=mysql_fetch_array(mysql_query("SELECT * FROM `ohota_mb` WHERE `id`='".$v2."'"));
if($ustr['lvl']<16)
{
$hp=$ma['hp']*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
if($ustr['lvl']>=16 and $ustr['lvl']<31)
{
$hp=($ma['hp']+$ma['hp']/100*30)*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
if($ustr['lvl']>=31 and $ustr['lvl']<39)
{
$hp=($ma['hp']+$ma['hp']/100*50)*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
if($ustr['lvl']>=39)
{
$hp=($ma['hp']+$ma['hp']/100*70)*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
$sila=$sila/5;
$arm=$arm/15;
if($ma['kol']==1)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
}
if($ma['kol']==2)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
}
if($ma['kol']==3)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
$tim3=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim3."'
");
}
if($ma['kol']==4)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
$tim3=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim3."'
");
$tim4=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim4."'
");
}
if($ma['kol']==5)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
$tim3=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim3."'
");
$tim4=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim4."'
");
$tim5=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim5."'
");
}
mysql_query("UPDATE `ohota` SET `volna`='".$v2."', `enemy`='0' WHERE `id`='".$bv['id']."'");
}
$new=mysql_fetch_array(mysql_query("SELECT * FROM `ohota_mob` WHERE `usr`='".$ustr['id']."'"));
mysql_query("UPDATE `ohota` SET `enemy`='".$new['id']."' WHERE `id`='".$bv['id']."'");
}
else
{
$exp=$sila;
mysql_query("UPDATE `ohota_mob` SET `hp`='".$hp."' WHERE `id`='".$mob['id']."'");
}
$exp=$ts['exp']+$exp;
mysql_query("UPDATE `pit` SET `exp`='".$exp."' WHERE `id`='".$ts['id']."'");
}
else
{
$ttt3=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt3."' WHERE `id`='".$skill3['id']."'");
}
}
///////
/////4////
$mobs4=mysql_query("SELECT * FROM `mag_pit` WHERE `usr`='".$ustr['id']."' and `mag`='5' and `otkat`<='".$tn."' and `pit`='".$ts['id']."'");
$rows4=mysql_num_rows($mobs4);
if($rows4==0)
{
}
else
{
$skill4=mysql_fetch_array($mobs4);
$r4=rand(1,100);
if($r4<=$skill4['shans'])
{
$ttt4=time()+30;
$sila=$skill4['sila'];
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt4."' WHERE `id`='".$skill4['id']."'");
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='<img src=img/main/b1.png> <font color=#ff9900>".$ts['name']."</font> использовал навык <font color=#00ffff>".$skill4['name']."</font> (".$mob['name']." -".$sila.")'
");
$hp=$mob['hp']-$sila;
if($hp<=0)
{
$nai=$ustr['reit_oh']+1;
$ds=$ustr['dost2a']+1;
mysql_query("UPDATE `users` SET `reit_oh`='".$nai."', `dost2a`='".$ds."' WHERE `id`='".$ustr['id']."'");
$hp=0;
$lg2='<img src=img/main/b7.png> <font color=#ff9900>'.$ts['name'].'</font> убил '.$mob['name'].'';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg2."'
");
$exp=$mob['hp'];
mysql_query("DELETE FROM `ohota_mob` WHERE `id`='".$mob['id']."'");
}
else
{
$exp=$sila;
mysql_query("UPDATE `ohota_mob` SET `hp`='".$hp."' WHERE `id`='".$mob['id']."'");
}
$exp=$ts['exp']+$exp;
mysql_query("UPDATE `pit` SET `exp`='".$exp."' WHERE `id`='".$ts['id']."'");
$nums=mysql_num_rows(mysql_query("SELECT * FROM `ohota_mob` WHERE `usr`='".$bv['usr']."'"));
if($nums==0 and $bv['status']==0)
{
$mba=mysql_fetch_array(mysql_query("SELECT * FROM `ohota_mb` WHERE `id`='".$bv['volna']."'"));
if($mba['kl']>0 and $mba['fm']==0 and $mba['exp']==0)
{
$lg12='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r16.png alt=kl>'.$mba['kl'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12."'
");
$dd=date('d');
$dm=date('m');
if($dd>=8 and $dd<=11 and $dm==3)
{
if($ustr['pol']==1)
{
$rr=rand(1,50);
if($rr==1)
{
$lg12z2='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8r.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z2."'
");
$f8r=$ustr['f8r']+1;
}
else
{
$f8r=$ustr['f8r'];
}
}
else
{
$f8r=$ustr['f8r'];
}
$f8=$ustr['f8']+1;
mysql_query("UPDATE `users` SET `f8`='".$f8."', `f8r`='".$f8r."' WHERE `id`='".$ustr['id']."'");
$lg12z='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z."'
");
}
$res=$ustr['kl']+$mba['kl'];
mysql_query("UPDATE `users` SET `kl`='".$res."' WHERE `id`='".$ustr['id']."'");
}
elseif($mba['kl']>0 and $mba['fm']>0 and $mba['exp']==0)
{
$lg12='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r16.png alt=kl>'.$mba['kl'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12."'
");
$lg122='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r17.png alt=fm>'.$mba['fm'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg122."'
");
$dd=date('d');
$dm=date('m');
if($dd>=8 and $dd<=11 and $dm==3)
{
if($ustr['pol']==1)
{
$rr=rand(1,50);
if($rr==1)
{
$lg12z2='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8r.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z2."'
");
$f8r=$ustr['f8r']+1;
}
else
{
$f8r=$ustr['f8r'];
}
}
else
{
$f8r=$ustr['f8r'];
}
$f8=$ustr['f8']+3;
mysql_query("UPDATE `users` SET `f8`='".$f8."', `f8r`='".$f8r."' WHERE `id`='".$ustr['id']."'");
$lg12z='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8.png>3</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z."'
");
}
$res=$ustr['kl']+$mba['kl'];
$res2=$ustr['fm']+$mba['fm'];
mysql_query("UPDATE `users` SET `kl`='".$res."', `fm`='".$res2."' WHERE `id`='".$ustr['id']."'");
}
elseif($mba['kl']>0 and $mba['fm']>0 and $mba['exp']>0)
{
$lg12='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r16.png alt=kl>'.$mba['kl'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12."'
");
$lg122='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r17.png alt=fm>'.$mba['fm'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg122."'
");
$dd=date('d');
$dm=date('m');
if($dd>=8 and $dd<=11 and $dm==3)
{
if($ustr['pol']==1)
{
$rr=rand(1,50);
if($rr==1)
{
$lg12z2='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8r.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z2."'
");
$f8r=$ustr['f8r']+1;
}
else
{
$f8r=$ustr['f8r'];
}
}
else
{
$f8r=$ustr['f8r'];
}
$f8=$ustr['f8']+3;
mysql_query("UPDATE `users` SET `f8`='".$f8."', `f8r`='".$f8r."' WHERE `id`='".$ustr['id']."'");
$lg12z='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8.png>3</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z."'
");
}
$res=$ustr['kl']+$mba['kl'];
$res2=$ustr['fm']+$mba['fm'];
if($ustr['lvl']>$ustr['rang'])
{
$vips=mysql_query("SELECT * FROM `vip` WHERE `usr`='".$ustr['id']."'");
$nvip=mysql_num_rows($vips);
if($nvip!=0)
{
$mba['exp']=$mba['exp']*2;
}
else
{
$mba['exp']=$mba['exp'];
}
}
else
{
$mba['exp']=0;
}
$exp=$ustr['exp_rang']+$mba['exp'];
mysql_query("UPDATE `users` SET `kl`='".$res."', `fm`='".$res2."', `exp_rang`='".$exp."' WHERE `id`='".$ustr['id']."'");
$thyr=rand(1,200);
if($thyr==1)
{
if($ustr['lvl']>30 and $ustr['lvl']<36)
{
$r=rand(1,15);
if($r==1)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3274'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==2)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3275'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==3)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3276'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==4)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3282'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==5)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3283'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==6)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3284'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==7)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3292'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==8)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3293'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==9)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3294'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==10)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3311'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==11)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3310'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==12)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3309'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==13)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3312'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==14)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3313'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==15)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3314'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
}
if($ustr['lvl']>35 and $ustr['lvl']<40)
{
$r=rand(1,13);
if($r==1)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3277'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==2)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3285'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==3)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3286'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==4)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3287'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==5)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3295'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==6)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3296'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==7)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3297'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==8)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3308'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==9)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3307'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==10)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3306'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==11)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3315'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==12)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3316'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==13)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3317'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
}
if($ustr['lvl']>39)
{
$r=rand(1,22);
if($r==1)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3278'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==2)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3279'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==3)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3280'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==4)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3282'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==5)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3281'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==6)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3288'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==7)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3289'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==8)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3290'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==9)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3291'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==10)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3298'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==11)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3299'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==12)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3300'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==13)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3301'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==14)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3313'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==15)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3305'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==16)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3304'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==17)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3303'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==18)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3302'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==19)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3318'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==20)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3319'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==21)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3320'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==22)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3321'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
}
$lg122z='<img src=img/main/e9.png> <font color=#00ff00>Вам выпала вещь <font color=#ffcc00>'.$thy['name'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg122z."'
");
}
}
if($ustr['kv']==100 and $bv['volna']==6)
{
$kv=$ustr['kv2']+1;
mysql_query("UPDATE `users` SET `kv2`='".$kv."' WHERE `id`='".$ustr['id']."'");
}
if($ustr['kv']==101 and $bv['volna']==18)
{
$kv=$ustr['kv2']+1;
mysql_query("UPDATE `users` SET `kv2`='".$kv."' WHERE `id`='".$ustr['id']."'");
}
if($ustr['kv']==105 and $bv['volna']==54)
{
$kv=$ustr['kv2']+1;
mysql_query("UPDATE `users` SET `kv2`='".$kv."' WHERE `id`='".$ustr['id']."'");
}
if($ustr['kv']==17 and $bv['volna']==1)
{
mysql_query("UPDATE `users` SET `kv`='18' WHERE `id`='".$ustr['id']."'");
}
$v2=$bv['volna']+1;
if($v2>=55)
{
mysql_query("DELETE FROM `ohota` WHERE `usr`='".$bv['usr']."'");
mysql_query("INSERT INTO `user_log` SET
`usr`='".$ustr['id']."',
`text`='Вы успешно прошли охоту!'
");
}
$ma=mysql_fetch_array(mysql_query("SELECT * FROM `ohota_mb` WHERE `id`='".$v2."'"));
if($ustr['lvl']<16)
{
$hp=$ma['hp']*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
if($ustr['lvl']>=16 and $ustr['lvl']<31)
{
$hp=($ma['hp']+$ma['hp']/100*30)*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
if($ustr['lvl']>=31 and $ustr['lvl']<39)
{
$hp=($ma['hp']+$ma['hp']/100*50)*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
if($ustr['lvl']>=39)
{
$hp=($ma['hp']+$ma['hp']/100*70)*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
$sila=$sila/5;
$arm=$arm/15;
if($ma['kol']==1)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
}
if($ma['kol']==2)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
}
if($ma['kol']==3)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
$tim3=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim3."'
");
}
if($ma['kol']==4)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
$tim3=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim3."'
");
$tim4=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim4."'
");
}
if($ma['kol']==5)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
$tim3=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim3."'
");
$tim4=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim4."'
");
$tim5=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim5."'
");
}
mysql_query("UPDATE `ohota` SET `volna`='".$v2."', `enemy`='0' WHERE `id`='".$bv['id']."'");
}
$new=mysql_fetch_array(mysql_query("SELECT * FROM `ohota_mob` WHERE `usr`='".$ustr['id']."'"));
mysql_query("UPDATE `ohota` SET `enemy`='".$new['id']."' WHERE `id`='".$bv['id']."'");
}
else
{
$ttt4=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt4."' WHERE `id`='".$skill4['id']."'");
}
}
///////
/////5////
$mobs5=mysql_query("SELECT * FROM `mag_pit` WHERE `usr`='".$ustr['id']."' and `mag`='6' and `otkat`<='".$tn."' and `pit`='".$ts['id']."'");
$rows5=mysql_num_rows($mobs5);
if($rows5==0)
{
}
else
{
$skill5=mysql_fetch_array($mobs5);
$r5=rand(1,100);
if($r5<=$skill5['shans'])
{
$ttt5=time()+30;
$sila=round($thy['sila']/100*$skill5['bonus']);
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt5."' WHERE `id`='".$skill5['id']."'");
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='<img src=img/main/b1.png> <font color=#ff9900>".$ts['name']."</font> использовал навык <font color=#00ffff>".$skill5['name']."</font> (".$mob['name']." -".$sila." -".$sila." -".$sila.")'
");
$hp=$mob['hp']-$sila-$sila-$sila;
if($hp<=0)
{
$nai=$ustr['reit_oh']+1;
$ds=$ustr['dost2a']+1;
mysql_query("UPDATE `users` SET `reit_oh`='".$nai."', `dost2a`='".$ds."' WHERE `id`='".$ustr['id']."'");
$hp=0;
$lg2='<img src=img/main/b7.png> <font color=#ff9900>'.$ts['name'].'</font> убил '.$mob['name'].'';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg2."'
");
$exp=$mob['hp'];
mysql_query("DELETE FROM `ohota_mob` WHERE `id`='".$mob['id']."'");
$nums=mysql_num_rows(mysql_query("SELECT * FROM `ohota_mob` WHERE `usr`='".$bv['usr']."'"));
if($nums==0 and $bv['status']==0)
{
$mba=mysql_fetch_array(mysql_query("SELECT * FROM `ohota_mb` WHERE `id`='".$bv['volna']."'"));
if($mba['kl']>0 and $mba['fm']==0 and $mba['exp']==0)
{
$lg12='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r16.png alt=kl>'.$mba['kl'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12."'
");
$dd=date('d');
$dm=date('m');
if($dd>=8 and $dd<=11 and $dm==3)
{
if($ustr['pol']==1)
{
$rr=rand(1,50);
if($rr==1)
{
$lg12z2='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8r.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z2."'
");
$f8r=$ustr['f8r']+1;
}
else
{
$f8r=$ustr['f8r'];
}
}
else
{
$f8r=$ustr['f8r'];
}
$f8=$ustr['f8']+1;
mysql_query("UPDATE `users` SET `f8`='".$f8."', `f8r`='".$f8r."' WHERE `id`='".$ustr['id']."'");
$lg12z='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z."'
");
}
$res=$ustr['kl']+$mba['kl'];
mysql_query("UPDATE `users` SET `kl`='".$res."' WHERE `id`='".$ustr['id']."'");
}
elseif($mba['kl']>0 and $mba['fm']>0 and $mba['exp']==0)
{
$lg12='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r16.png alt=kl>'.$mba['kl'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12."'
");
$lg122='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r17.png alt=fm>'.$mba['fm'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg122."'
");
$dd=date('d');
$dm=date('m');
if($dd>=8 and $dd<=11 and $dm==3)
{
if($ustr['pol']==1)
{
$rr=rand(1,50);
if($rr==1)
{
$lg12z2='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8r.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z2."'
");
$f8r=$ustr['f8r']+1;
}
else
{
$f8r=$ustr['f8r'];
}
}
else
{
$f8r=$ustr['f8r'];
}
$f8=$ustr['f8']+3;
mysql_query("UPDATE `users` SET `f8`='".$f8."', `f8r`='".$f8r."' WHERE `id`='".$ustr['id']."'");
$lg12z='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8.png>3</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z."'
");
}
$res=$ustr['kl']+$mba['kl'];
$res2=$ustr['fm']+$mba['fm'];
mysql_query("UPDATE `users` SET `kl`='".$res."', `fm`='".$res2."' WHERE `id`='".$ustr['id']."'");
}
elseif($mba['kl']>0 and $mba['fm']>0 and $mba['exp']>0)
{
$lg12='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r16.png alt=kl>'.$mba['kl'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12."'
");
$lg122='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r17.png alt=fm>'.$mba['fm'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg122."'
");
$dd=date('d');
$dm=date('m');
if($dd>=8 and $dd<=11 and $dm==3)
{
if($ustr['pol']==1)
{
$rr=rand(1,50);
if($rr==1)
{
$lg12z2='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8r.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z2."'
");
$f8r=$ustr['f8r']+1;
}
else
{
$f8r=$ustr['f8r'];
}
}
else
{
$f8r=$ustr['f8r'];
}
$f8=$ustr['f8']+3;
mysql_query("UPDATE `users` SET `f8`='".$f8."', `f8r`='".$f8r."' WHERE `id`='".$ustr['id']."'");
$lg12z='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8.png>3</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z."'
");
}
$res=$ustr['kl']+$mba['kl'];
$res2=$ustr['fm']+$mba['fm'];
if($ustr['lvl']>$ustr['rang'])
{
$vips=mysql_query("SELECT * FROM `vip` WHERE `usr`='".$ustr['id']."'");
$nvip=mysql_num_rows($vips);
if($nvip!=0)
{
$mba['exp']=$mba['exp']*2;
}
else
{
$mba['exp']=$mba['exp'];
}
}
else
{
$mba['exp']=0;
}
$exp=$ustr['exp_rang']+$mba['exp'];
mysql_query("UPDATE `users` SET `kl`='".$res."', `fm`='".$res2."', `exp_rang`='".$exp."' WHERE `id`='".$ustr['id']."'");
$thyr=rand(1,200);
if($thyr==1)
{
if($ustr['lvl']>30 and $ustr['lvl']<36)
{
$r=rand(1,15);
if($r==1)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3274'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==2)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3275'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==3)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3276'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==4)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3282'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==5)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3283'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==6)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3284'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==7)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3292'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==8)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3293'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==9)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3294'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==10)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3311'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==11)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3310'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==12)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3309'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==13)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3312'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==14)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3313'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==15)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3314'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
}
if($ustr['lvl']>35 and $ustr['lvl']<40)
{
$r=rand(1,13);
if($r==1)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3277'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==2)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3285'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==3)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3286'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==4)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3287'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==5)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3295'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==6)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3296'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==7)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3297'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==8)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3308'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==9)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3307'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==10)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3306'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==11)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3315'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==12)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3316'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==13)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3317'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
}
if($ustr['lvl']>39)
{
$r=rand(1,22);
if($r==1)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3278'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==2)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3279'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==3)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3280'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==4)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3282'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==5)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3281'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==6)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3288'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==7)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3289'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==8)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3290'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==9)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3291'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==10)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3298'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==11)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3299'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==12)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3300'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==13)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3301'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==14)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3313'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==15)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3305'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==16)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3304'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==17)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3303'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==18)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3302'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==19)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3318'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==20)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3319'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==21)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3320'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==22)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3321'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
}
$lg122z='<img src=img/main/e9.png> <font color=#00ff00>Вам выпала вещь <font color=#ffcc00>'.$thy['name'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg122z."'
");
}
}
if($ustr['kv']==100 and $bv['volna']==6)
{
$kv=$ustr['kv2']+1;
mysql_query("UPDATE `users` SET `kv2`='".$kv."' WHERE `id`='".$ustr['id']."'");
}
if($ustr['kv']==101 and $bv['volna']==18)
{
$kv=$ustr['kv2']+1;
mysql_query("UPDATE `users` SET `kv2`='".$kv."' WHERE `id`='".$ustr['id']."'");
}
if($ustr['kv']==105 and $bv['volna']==54)
{
$kv=$ustr['kv2']+1;
mysql_query("UPDATE `users` SET `kv2`='".$kv."' WHERE `id`='".$ustr['id']."'");
}
if($ustr['kv']==17 and $bv['volna']==1)
{
mysql_query("UPDATE `users` SET `kv`='18' WHERE `id`='".$ustr['id']."'");
}
$v2=$bv['volna']+1;
if($v2>=55)
{
mysql_query("DELETE FROM `ohota` WHERE `usr`='".$bv['usr']."'");
mysql_query("INSERT INTO `user_log` SET
`usr`='".$ustr['id']."',
`text`='Вы успешно прошли охоту!'
");
}
$ma=mysql_fetch_array(mysql_query("SELECT * FROM `ohota_mb` WHERE `id`='".$v2."'"));
if($ustr['lvl']<16)
{
$hp=$ma['hp']*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
if($ustr['lvl']>=16 and $ustr['lvl']<31)
{
$hp=($ma['hp']+$ma['hp']/100*30)*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
if($ustr['lvl']>=31 and $ustr['lvl']<39)
{
$hp=($ma['hp']+$ma['hp']/100*50)*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
if($ustr['lvl']>=39)
{
$hp=($ma['hp']+$ma['hp']/100*70)*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
$sila=$sila/5;
$arm=$arm/15;
if($ma['kol']==1)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
}
if($ma['kol']==2)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
}
if($ma['kol']==3)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
$tim3=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim3."'
");
}
if($ma['kol']==4)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
$tim3=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim3."'
");
$tim4=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim4."'
");
}
if($ma['kol']==5)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
$tim3=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim3."'
");
$tim4=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim4."'
");
$tim5=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim5."'
");
}
mysql_query("UPDATE `ohota` SET `volna`='".$v2."', `enemy`='0' WHERE `id`='".$bv['id']."'");
}
$new=mysql_fetch_array(mysql_query("SELECT * FROM `ohota_mob` WHERE `usr`='".$ustr['id']."'"));
mysql_query("UPDATE `ohota` SET `enemy`='".$new['id']."' WHERE `id`='".$bv['id']."'");
}
else
{
$exp=$sila;
mysql_query("UPDATE `ohota_mob` SET `hp`='".$hp."' WHERE `id`='".$mob['id']."'");
}
$exp=$ts['exp']+$exp;
mysql_query("UPDATE `pit` SET `exp`='".$exp."' WHERE `id`='".$ts['id']."'");
}
else
{
$ttt5=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt5."' WHERE `id`='".$skill5['id']."'");
}
}
///////
/////6///
$mobs6=mysql_query("SELECT * FROM `mag_pit` WHERE `usr`='".$ustr['id']."' and `mag`='7' and `otkat`<='".$tn."' and `pit`='".$ts['id']."'");
$rows6=mysql_num_rows($mobs6);
if($rows6==0)
{
}
else
{
$skill6=mysql_fetch_array($mobs6);
$r6=rand(1,100);
if($r6<=$skill6['shans'])
{
$tim6=time()+12;
mysql_query("UPDATE `ohota_mob` SET `mag_pr`='".$skill6['bonus']."', `mag_pr_time`='".$tim6."' WHERE `id`='".$mob['id']."'");
$ttt6=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt6."' WHERE `id`='".$skill6['id']."'");
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='<img src=img/main/b1.png> <font color=#ff9900>".$ts['name']."</font> использовал навык <font color=#00ffff>".$skill6['name']."</font> (".$mob['name']." -".$skill6['bonus']."% урона)'
");
}
else
{
$ttt6=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt6."' WHERE `id`='".$skill6['id']."'");
}
}
///
/////7////
$mobs7=mysql_query("SELECT * FROM `mag_pit` WHERE `usr`='".$ustr['id']."' and `mag`='8' and `otkat`<='".$tn."' and `pit`='".$ts['id']."'");
$rows7=mysql_num_rows($mobs7);
if($rows7==0)
{
}
else
{
$skill7=mysql_fetch_array($mobs7);
$r7=rand(1,100);
if($r7<=$skill7['shans'])
{
$ttt7=time()+30;
$sila=$skill7['sila'];
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt7."' WHERE `id`='".$skill7['id']."'");
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='<img src=img/main/b1.png> <font color=#ff9900>".$ts['name']."</font> использовал навык <font color=#00ffff>".$skill4['name']."</font> (".$mob['name']." -".$sila." + 2c. оглушение)'
");
$hp=$mob['hp']-$sila;
if($hp<=0)
{
$nai=$ustr['reit_oh']+1;
$ds=$ustr['dost2a']+1;
mysql_query("UPDATE `users` SET `reit_oh`='".$nai."', `dost2a`='".$ds."' WHERE `id`='".$ustr['id']."'");
$hp=0;
$lg2='<img src=img/main/b7.png> <font color=#ff9900>'.$ts['name'].'</font> убил '.$mob['name'].'';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg2."'
");
$exp=$mob['hp'];
mysql_query("DELETE FROM `ohota_mob` WHERE `id`='".$mob['id']."'");
$nums=mysql_num_rows(mysql_query("SELECT * FROM `ohota_mob` WHERE `usr`='".$bv['usr']."'"));
if($nums==0 and $bv['status']==0)
{
$mba=mysql_fetch_array(mysql_query("SELECT * FROM `ohota_mb` WHERE `id`='".$bv['volna']."'"));
if($mba['kl']>0 and $mba['fm']==0 and $mba['exp']==0)
{
$lg12='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r16.png alt=kl>'.$mba['kl'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12."'
");
$dd=date('d');
$dm=date('m');
if($dd>=8 and $dd<=11 and $dm==3)
{
if($ustr['pol']==1)
{
$rr=rand(1,50);
if($rr==1)
{
$lg12z2='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8r.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z2."'
");
$f8r=$ustr['f8r']+1;
}
else
{
$f8r=$ustr['f8r'];
}
}
else
{
$f8r=$ustr['f8r'];
}
$f8=$ustr['f8']+1;
mysql_query("UPDATE `users` SET `f8`='".$f8."', `f8r`='".$f8r."' WHERE `id`='".$ustr['id']."'");
$lg12z='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z."'
");
}
$res=$ustr['kl']+$mba['kl'];
mysql_query("UPDATE `users` SET `kl`='".$res."' WHERE `id`='".$ustr['id']."'");
}
elseif($mba['kl']>0 and $mba['fm']>0 and $mba['exp']==0)
{
$lg12='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r16.png alt=kl>'.$mba['kl'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12."'
");
$lg122='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r17.png alt=fm>'.$mba['fm'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg122."'
");
$dd=date('d');
$dm=date('m');
if($dd>=8 and $dd<=11 and $dm==3)
{
if($ustr['pol']==1)
{
$rr=rand(1,50);
if($rr==1)
{
$lg12z2='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8r.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z2."'
");
$f8r=$ustr['f8r']+1;
}
else
{
$f8r=$ustr['f8r'];
}
}
else
{
$f8r=$ustr['f8r'];
}
$f8=$ustr['f8']+3;
mysql_query("UPDATE `users` SET `f8`='".$f8."', `f8r`='".$f8r."' WHERE `id`='".$ustr['id']."'");
$lg12z='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8.png>3</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z."'
");
}
$res=$ustr['kl']+$mba['kl'];
$res2=$ustr['fm']+$mba['fm'];
mysql_query("UPDATE `users` SET `kl`='".$res."', `fm`='".$res2."' WHERE `id`='".$ustr['id']."'");
}
elseif($mba['kl']>0 and $mba['fm']>0 and $mba['exp']>0)
{
$lg12='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r16.png alt=kl>'.$mba['kl'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12."'
");
$lg122='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r17.png alt=fm>'.$mba['fm'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg122."'
");
$dd=date('d');
$dm=date('m');
if($dd>=8 and $dd<=11 and $dm==3)
{
if($ustr['pol']==1)
{
$rr=rand(1,50);
if($rr==1)
{
$lg12z2='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8r.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z2."'
");
$f8r=$ustr['f8r']+1;
}
else
{
$f8r=$ustr['f8r'];
}
}
else
{
$f8r=$ustr['f8r'];
}
$f8=$ustr['f8']+3;
mysql_query("UPDATE `users` SET `f8`='".$f8."', `f8r`='".$f8r."' WHERE `id`='".$ustr['id']."'");
$lg12z='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8.png>3</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z."'
");
}
$res=$ustr['kl']+$mba['kl'];
$res2=$ustr['fm']+$mba['fm'];
if($ustr['lvl']>$ustr['rang'])
{
$vips=mysql_query("SELECT * FROM `vip` WHERE `usr`='".$ustr['id']."'");
$nvip=mysql_num_rows($vips);
if($nvip!=0)
{
$mba['exp']=$mba['exp']*2;
}
else
{
$mba['exp']=$mba['exp'];
}
}
else
{
$mba['exp']=0;
}
$exp=$ustr['exp_rang']+$mba['exp'];
mysql_query("UPDATE `users` SET `kl`='".$res."', `fm`='".$res2."', `exp_rang`='".$exp."' WHERE `id`='".$ustr['id']."'");
$thyr=rand(1,200);
if($thyr==1)
{
if($ustr['lvl']>30 and $ustr['lvl']<36)
{
$r=rand(1,15);
if($r==1)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3274'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==2)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3275'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==3)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3276'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==4)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3282'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==5)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3283'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==6)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3284'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==7)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3292'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==8)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3293'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==9)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3294'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==10)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3311'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==11)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3310'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==12)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3309'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==13)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3312'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==14)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3313'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==15)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3314'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
}
if($ustr['lvl']>35 and $ustr['lvl']<40)
{
$r=rand(1,13);
if($r==1)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3277'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==2)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3285'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==3)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3286'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==4)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3287'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==5)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3295'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==6)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3296'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==7)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3297'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==8)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3308'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==9)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3307'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==10)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3306'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==11)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3315'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==12)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3316'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==13)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3317'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
}
if($ustr['lvl']>39)
{
$r=rand(1,22);
if($r==1)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3278'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==2)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3279'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==3)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3280'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==4)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3282'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==5)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3281'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==6)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3288'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==7)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3289'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==8)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3290'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==9)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3291'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==10)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3298'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==11)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3299'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==12)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3300'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==13)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3301'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==14)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3313'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==15)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3305'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==16)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3304'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==17)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3303'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==18)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3302'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==19)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3318'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==20)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3319'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==21)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3320'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==22)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3321'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
}
$lg122z='<img src=img/main/e9.png> <font color=#00ff00>Вам выпала вещь <font color=#ffcc00>'.$thy['name'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg122z."'
");
}
}
if($ustr['kv']==100 and $bv['volna']==6)
{
$kv=$ustr['kv2']+1;
mysql_query("UPDATE `users` SET `kv2`='".$kv."' WHERE `id`='".$ustr['id']."'");
}
if($ustr['kv']==101 and $bv['volna']==18)
{
$kv=$ustr['kv2']+1;
mysql_query("UPDATE `users` SET `kv2`='".$kv."' WHERE `id`='".$ustr['id']."'");
}
if($ustr['kv']==105 and $bv['volna']==54)
{
$kv=$ustr['kv2']+1;
mysql_query("UPDATE `users` SET `kv2`='".$kv."' WHERE `id`='".$ustr['id']."'");
}
if($ustr['kv']==17 and $bv['volna']==1)
{
mysql_query("UPDATE `users` SET `kv`='18' WHERE `id`='".$ustr['id']."'");
}
$v2=$bv['volna']+1;
if($v2>=55)
{
mysql_query("DELETE FROM `ohota` WHERE `usr`='".$bv['usr']."'");
mysql_query("INSERT INTO `user_log` SET
`usr`='".$ustr['id']."',
`text`='Вы успешно прошли охоту!'
");
}
$ma=mysql_fetch_array(mysql_query("SELECT * FROM `ohota_mb` WHERE `id`='".$v2."'"));
if($ustr['lvl']<16)
{
$hp=$ma['hp']*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
if($ustr['lvl']>=16 and $ustr['lvl']<31)
{
$hp=($ma['hp']+$ma['hp']/100*30)*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
if($ustr['lvl']>=31 and $ustr['lvl']<39)
{
$hp=($ma['hp']+$ma['hp']/100*50)*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
if($ustr['lvl']>=39)
{
$hp=($ma['hp']+$ma['hp']/100*70)*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
$sila=$sila/5;
$arm=$arm/15;
if($ma['kol']==1)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
}
if($ma['kol']==2)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
}
if($ma['kol']==3)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
$tim3=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim3."'
");
}
if($ma['kol']==4)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
$tim3=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim3."'
");
$tim4=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim4."'
");
}
if($ma['kol']==5)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
$tim3=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim3."'
");
$tim4=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim4."'
");
$tim5=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim5."'
");
}
mysql_query("UPDATE `ohota` SET `volna`='".$v2."', `enemy`='0' WHERE `id`='".$bv['id']."'");
}
$new=mysql_fetch_array(mysql_query("SELECT * FROM `ohota_mob` WHERE `usr`='".$ustr['id']."'"));
mysql_query("UPDATE `ohota` SET `enemy`='".$new['id']."' WHERE `id`='".$bv['id']."'");
}
else
{
$exp=$sila;
$ts=time()+2;
mysql_query("UPDATE `ohota_mob` SET `hp`='".$hp."', `sfer_so`='".$ts."' WHERE `id`='".$mob['id']."'");
}
$exp=$ts['exp']+$exp;
mysql_query("UPDATE `pit` SET `exp`='".$exp."' WHERE `id`='".$ts['id']."'");
}
else
{
$ttt7=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt7."' WHERE `id`='".$skill7['id']."'");
}
}
///////
/////8///
$mobs8=mysql_query("SELECT * FROM `mag_pit` WHERE `usr`='".$ustr['id']."' and `mag`='9' and `otkat`<='".$tn."' and `pit`='".$ts['id']."'");
$rows8=mysql_num_rows($mobs8);
if($rows8==0)
{
}
else
{
$skill8=mysql_fetch_array($mobs8);
$r8=rand(1,100);
if($r8<=$skill8['shans'])
{
$ttt8=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt8."' WHERE `id`='".$skill8['id']."'");
mysql_query("UPDATE `mag` SET
`time`='0' WHERE `usr`='".$ustr['id']."'");
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='<img src=img/main/b1.png> <font color=#ff9900>".$ts['name']."</font> использовал навык <font color=#00ffff>".$skill8['name']."</font>'
");
}
else
{
$ttt8=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt8."' WHERE `id`='".$skill8['id']."'");
}
}
///
/////9///
$mobs9=mysql_query("SELECT * FROM `mag_pit` WHERE `usr`='".$ustr['id']."' and `mag`='10' and `otkat`<='".$tn."' and `pit`='".$ts['id']."'");
$rows9=mysql_num_rows($mobs9);
if($rows9==0)
{
}
else
{
$skill9=mysql_fetch_array($mobs9);
$r9=rand(1,100);
if($r9<=$skill9['shans'])
{
$ttt9=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt9."' WHERE `id`='".$skill9['id']."'");
$sila=round($thy['sila']+$thy['sila']/100*$skill['bonus']);
$hp=$bv['hp']+$sila;
if($hp>=$ustr['hp'])
{
$hp=$ustr['hp'];
}
mysql_query("UPDATE `ohota` SET `hp`='".$hp."' WHERE `id`='".$bv['id']."'");
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='<img src=img/main/b1.png> <font color=#ff9900>".$ts['name']."</font> использовал навык <font color=#00ffff>".$skill9['name']."</font> (".$ustr['usr']." +".$sila."хп)'
");
}
else
{
$ttt9=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt9."' WHERE `id`='".$skill9['id']."'");
}
}
///
/////10///
$mobs10=mysql_query("SELECT * FROM `mag_pit` WHERE `usr`='".$ustr['id']."' and `mag`='11' and `otkat`<='".$tn."' and `pit`='".$ts['id']."'");
$rows10=mysql_num_rows($mobs10);
if($rows10==0)
{
}
else
{
$skill10=mysql_fetch_array($mobs10);
$r10=rand(1,100);
if($r10<=$skill10['shans'])
{
$tim10=time()+12;
mysql_query("UPDATE `ohota` SET `mag_za`='".$skill10['bonus']."', `mag_za_time`='".$tim10."' WHERE `id`='".$bv['id']."'");
$ttt10=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt10."' WHERE `id`='".$skill10['id']."'");
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='<img src=img/main/b1.png> <font color=#ff9900>".$ts['name']."</font> использовал навык <font color=#00ffff>".$skill10['name']."</font> (".$ustr['usr']." +".$skill10['bonus']."% защита от физического урона)'
");
}
else
{
$ttt10=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt10."' WHERE `id`='".$skill10['id']."'");
}
}
///
/////11////
$mobs11=mysql_query("SELECT * FROM `mag_pit` WHERE `usr`='".$ustr['id']."' and `mag`='12' and `otkat`<='".$tn."' and `pit`='".$ts['id']."'");
$rows11=mysql_num_rows($mobs11);
if($rows11==0)
{
}
else
{
$skill11=mysql_fetch_array($mobs11);
$r11=rand(1,100);
if($r11<=$skill11['shans'])
{
$ttt11=time()+30;
$sila=$thy['sila'];
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt11."' WHERE `id`='".$skill11['id']."'");
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='<img src=img/main/b1.png> <font color=#ff9900>".$ts['name']."</font> использовал навык <font color=#00ffff>".$skill11['name']."</font> (".$mob['name']." -".$sila.")'
");
$hp=$mob['hp']-$sila;
if($hp<=0)
{
$nai=$ustr['reit_oh']+1;
$ds=$ustr['dost2a']+1;
mysql_query("UPDATE `users` SET `reit_oh`='".$nai."', `dost2a`='".$ds."' WHERE `id`='".$ustr['id']."'");
$hp=0;
$lg2='<img src=img/main/b7.png> <font color=#ff9900>'.$ts['name'].'</font> убил '.$mob['name'].'';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg2."'
");
$exp=$mob['hp'];
mysql_query("DELETE FROM `ohota_mob` WHERE `id`='".$mob['id']."'");
$nums=mysql_num_rows(mysql_query("SELECT * FROM `ohota_mob` WHERE `usr`='".$bv['usr']."'"));
if($nums==0 and $bv['status']==0)
{
$mba=mysql_fetch_array(mysql_query("SELECT * FROM `ohota_mb` WHERE `id`='".$bv['volna']."'"));
if($mba['kl']>0 and $mba['fm']==0 and $mba['exp']==0)
{
$lg12='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r16.png alt=kl>'.$mba['kl'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12."'
");
$dd=date('d');
$dm=date('m');
if($dd>=8 and $dd<=11 and $dm==3)
{
if($ustr['pol']==1)
{
$rr=rand(1,50);
if($rr==1)
{
$lg12z2='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8r.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z2."'
");
$f8r=$ustr['f8r']+1;
}
else
{
$f8r=$ustr['f8r'];
}
}
else
{
$f8r=$ustr['f8r'];
}
$f8=$ustr['f8']+1;
mysql_query("UPDATE `users` SET `f8`='".$f8."', `f8r`='".$f8r."' WHERE `id`='".$ustr['id']."'");
$lg12z='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z."'
");
}
$res=$ustr['kl']+$mba['kl'];
mysql_query("UPDATE `users` SET `kl`='".$res."' WHERE `id`='".$ustr['id']."'");
}
elseif($mba['kl']>0 and $mba['fm']>0 and $mba['exp']==0)
{
$lg12='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r16.png alt=kl>'.$mba['kl'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12."'
");
$lg122='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r17.png alt=fm>'.$mba['fm'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg122."'
");
$dd=date('d');
$dm=date('m');
if($dd>=8 and $dd<=11 and $dm==3)
{
if($ustr['pol']==1)
{
$rr=rand(1,50);
if($rr==1)
{
$lg12z2='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8r.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z2."'
");
$f8r=$ustr['f8r']+1;
}
else
{
$f8r=$ustr['f8r'];
}
}
else
{
$f8r=$ustr['f8r'];
}
$f8=$ustr['f8']+3;
mysql_query("UPDATE `users` SET `f8`='".$f8."', `f8r`='".$f8r."' WHERE `id`='".$ustr['id']."'");
$lg12z='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8.png>3</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z."'
");
}
$res=$ustr['kl']+$mba['kl'];
$res2=$ustr['fm']+$mba['fm'];
mysql_query("UPDATE `users` SET `kl`='".$res."', `fm`='".$res2."' WHERE `id`='".$ustr['id']."'");
}
elseif($mba['kl']>0 and $mba['fm']>0 and $mba['exp']>0)
{
$lg12='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r16.png alt=kl>'.$mba['kl'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12."'
");
$lg122='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r17.png alt=fm>'.$mba['fm'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg122."'
");
$dd=date('d');
$dm=date('m');
if($dd>=8 and $dd<=11 and $dm==3)
{
if($ustr['pol']==1)
{
$rr=rand(1,50);
if($rr==1)
{
$lg12z2='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8r.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z2."'
");
$f8r=$ustr['f8r']+1;
}
else
{
$f8r=$ustr['f8r'];
}
}
else
{
$f8r=$ustr['f8r'];
}
$f8=$ustr['f8']+3;
mysql_query("UPDATE `users` SET `f8`='".$f8."', `f8r`='".$f8r."' WHERE `id`='".$ustr['id']."'");
$lg12z='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8.png>3</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z."'
");
}
$res=$ustr['kl']+$mba['kl'];
$res2=$ustr['fm']+$mba['fm'];
if($ustr['lvl']>$ustr['rang'])
{
$vips=mysql_query("SELECT * FROM `vip` WHERE `usr`='".$ustr['id']."'");
$nvip=mysql_num_rows($vips);
if($nvip!=0)
{
$mba['exp']=$mba['exp']*2;
}
else
{
$mba['exp']=$mba['exp'];
}
}
else
{
$mba['exp']=0;
}
$exp=$ustr['exp_rang']+$mba['exp'];
mysql_query("UPDATE `users` SET `kl`='".$res."', `fm`='".$res2."', `exp_rang`='".$exp."' WHERE `id`='".$ustr['id']."'");
$thyr=rand(1,200);
if($thyr==1)
{
if($ustr['lvl']>30 and $ustr['lvl']<36)
{
$r=rand(1,15);
if($r==1)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3274'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==2)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3275'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==3)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3276'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==4)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3282'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==5)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3283'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==6)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3284'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==7)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3292'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==8)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3293'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==9)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3294'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==10)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3311'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==11)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3310'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==12)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3309'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==13)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3312'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==14)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3313'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==15)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3314'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
}
if($ustr['lvl']>35 and $ustr['lvl']<40)
{
$r=rand(1,13);
if($r==1)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3277'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==2)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3285'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==3)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3286'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==4)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3287'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==5)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3295'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==6)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3296'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==7)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3297'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==8)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3308'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==9)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3307'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==10)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3306'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==11)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3315'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==12)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3316'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==13)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3317'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
}
if($ustr['lvl']>39)
{
$r=rand(1,22);
if($r==1)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3278'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==2)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3279'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==3)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3280'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==4)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3282'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==5)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3281'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==6)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3288'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==7)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3289'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==8)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3290'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==9)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3291'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==10)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3298'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==11)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3299'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==12)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3300'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==13)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3301'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==14)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3313'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==15)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3305'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==16)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3304'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==17)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3303'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==18)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3302'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==19)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3318'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==20)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3319'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==21)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3320'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==22)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3321'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
}
$lg122z='<img src=img/main/e9.png> <font color=#00ff00>Вам выпала вещь <font color=#ffcc00>'.$thy['name'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg122z."'
");
}
}
if($ustr['kv']==100 and $bv['volna']==6)
{
$kv=$ustr['kv2']+1;
mysql_query("UPDATE `users` SET `kv2`='".$kv."' WHERE `id`='".$ustr['id']."'");
}
if($ustr['kv']==101 and $bv['volna']==18)
{
$kv=$ustr['kv2']+1;
mysql_query("UPDATE `users` SET `kv2`='".$kv."' WHERE `id`='".$ustr['id']."'");
}
if($ustr['kv']==105 and $bv['volna']==54)
{
$kv=$ustr['kv2']+1;
mysql_query("UPDATE `users` SET `kv2`='".$kv."' WHERE `id`='".$ustr['id']."'");
}
if($ustr['kv']==17 and $bv['volna']==1)
{
mysql_query("UPDATE `users` SET `kv`='18' WHERE `id`='".$ustr['id']."'");
}
$v2=$bv['volna']+1;
if($v2>=55)
{
mysql_query("DELETE FROM `ohota` WHERE `usr`='".$bv['usr']."'");
mysql_query("INSERT INTO `user_log` SET
`usr`='".$ustr['id']."',
`text`='Вы успешно прошли охоту!'
");
}
$ma=mysql_fetch_array(mysql_query("SELECT * FROM `ohota_mb` WHERE `id`='".$v2."'"));
if($ustr['lvl']<16)
{
$hp=$ma['hp']*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
if($ustr['lvl']>=16 and $ustr['lvl']<31)
{
$hp=($ma['hp']+$ma['hp']/100*30)*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
if($ustr['lvl']>=31 and $ustr['lvl']<39)
{
$hp=($ma['hp']+$ma['hp']/100*50)*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
if($ustr['lvl']>=39)
{
$hp=($ma['hp']+$ma['hp']/100*70)*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
$sila=$sila/5;
$arm=$arm/15;
if($ma['kol']==1)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
}
if($ma['kol']==2)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
}
if($ma['kol']==3)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
$tim3=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim3."'
");
}
if($ma['kol']==4)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
$tim3=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim3."'
");
$tim4=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim4."'
");
}
if($ma['kol']==5)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
$tim3=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim3."'
");
$tim4=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim4."'
");
$tim5=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim5."'
");
}
mysql_query("UPDATE `ohota` SET `volna`='".$v2."', `enemy`='0' WHERE `id`='".$bv['id']."'");
}
$new=mysql_fetch_array(mysql_query("SELECT * FROM `ohota_mob` WHERE `usr`='".$ustr['id']."'"));
mysql_query("UPDATE `ohota` SET `enemy`='".$new['id']."' WHERE `id`='".$bv['id']."'");
}
else
{
$exp=$sila;
$ts=time()+2;
mysql_query("UPDATE `ohota_mob` SET `hp`='".$hp."' WHERE `id`='".$mob['id']."'");
}
$exp=$ts['exp']+$exp;
mysql_query("UPDATE `pit` SET `exp`='".$exp."' WHERE `id`='".$ts['id']."'");
}
else
{
$ttt11=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt11."' WHERE `id`='".$skill11['id']."'");
}
}
///////
/////12///
$mobs12=mysql_query("SELECT * FROM `mag_pit` WHERE `usr`='".$ustr['id']."' and `mag`='13' and `otkat`<='".$tn."' and `pit`='".$ts['id']."'");
$rows12=mysql_num_rows($mobs12);
if($rows10==0)
{
}
else
{
$skill12=mysql_fetch_array($mobs12);
$r12=rand(1,100);
if($r12<=$skill12['shans'])
{
$tim12=time()+12;
mysql_query("UPDATE `ohota_mob` SET `mag_sr`='".$skill10['bonus']."', `mag_sr_time`='".$tim10."' WHERE `id`='".$mob['id']."'");
$ttt10=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt12."' WHERE `id`='".$skill12['id']."'");
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='<img src=img/main/b1.png> <font color=#ff9900>".$ts['name']."</font> использовал навык <font color=#00ffff>".$skill12['name']."</font> (".$mob['name']." -".$skill12['bonus']."% защита)'
");
}
else
{
$ttt10=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt10."' WHERE `id`='".$skill10['id']."'");
}
}
///
/////13///
$mobs13=mysql_query("SELECT * FROM `mag_pit` WHERE `usr`='".$ustr['id']."' and `mag`='14' and `otkat`<='".$tn."' and `pit`='".$ts['id']."'");
$rows13=mysql_num_rows($mobs13);
if($rows13==0)
{
}
else
{
$skill13=mysql_fetch_array($mobs13);
$r13=rand(1,100);
if($r13<=$skill13['shans'])
{
$tim13=time()+12;
mysql_query("UPDATE `ohota` SET `mag_yr`='".$skill13['bonus']."', `mag_yr_time`='".$tim13."' WHERE `id`='".$thy['id']."'");
$ttt13=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt13."' WHERE `id`='".$skill13['id']."'");
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='<img src=img/main/b1.png> <font color=#ff9900>".$ts['name']."</font> использовал навык <font color=#00ffff>".$skill13['name']."</font> (".$ts['name']." +".$skill13['bonus']."% урона)'
");
}
else
{
$ttt13=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt13."' WHERE `id`='".$skill13['id']."'");
}
}
///
/////14///
$mobs14=mysql_query("SELECT * FROM `mag_pit` WHERE `usr`='".$ustr['id']."' and `mag`='15' and `otkat`<='".$tn."' and `pit`='".$ts['id']."'");
$rows14=mysql_num_rows($mobs14);
if($rows14==0)
{
}
else
{
$skill14=mysql_fetch_array($mobs14);
$r14=rand(1,100);
if($r14<=$skill14['shans'])
{
$tim14=time()+12;
mysql_query("UPDATE `ohota` SET `mag_kr_time`='".$tim14."' WHERE `id`='".$thy['id']."'");
$ttt14=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt14."' WHERE `id`='".$skill14['id']."'");
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='<img src=img/main/b1.png> <font color=#ff9900>".$ts['name']."</font> использовал навык <font color=#00ffff>".$skill14['name']."</font>'
");
}
else
{
$ttt14=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt14."' WHERE `id`='".$skill14['id']."'");
}
}
///
/////15///
$mobs15=mysql_query("SELECT * FROM `mag_pit` WHERE `usr`='".$ustr['id']."' and `mag`='16' and `otkat`<='".$tn."' and `pit`='".$ts['id']."'");
$rows15=mysql_num_rows($mobs15);
if($rows15==0)
{
}
else
{
$skill15=mysql_fetch_array($mobs15);
$r15=rand(1,100);
if($r15<=$skill15['shans'])
{
$sila=round($thy['sila']+$thy['sila']/100*$skill15['bonus']);
$hp=$thy['hp']+$sila;
if($hp>$ts['hp'])
{
$hp=$ts['hp'];
}
mysql_query("UPDATE `ohota` SET `hp`='".$hp."' WHERE `id`='".$thy['id']."'");
$ttt15=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt15."' WHERE `id`='".$skill15['id']."'");
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='<img src=img/main/b1.png> <font color=#ff9900>".$ts['name']."</font> использовал навык <font color=#00ffff>".$skill15['name']."</font> (".$ts['name']." +".$sila."хп)'
");
}
else
{
$ttt15=time()+30;
mysql_query("UPDATE `mag_pit` SET `otkat`='".$ttt15."' WHERE `id`='".$skill15['id']."'");
}
}
///
if($thy['time_us']<time())
{
if($bv['status']==1 or $bv['status']==2)
{
}
else
{
$re=$thy['sila'];
if($thy['mag_yr_time']>=time())
{
$re=$re+$re/100*$thy['mag_yr'];
}
if($thy['mag_kr_time']>=time())
{
$re=$re*2;
}
if($mob['sfer_d']>=time())
{
$mob['arm']=$mob['arm']-$mob['arm']/100*$mob['sfer_dp'];
}
if($mob['mag_sr_time']>=time())
{
$mob['arm']=$mob['arm']-$mob['arm']/100*$mob['mag_sr'];
}
$sila=round($re-$mob['arm']);
if($sila<=$thy['sila']/100*10)
{
$sila=round($thy['sila']/100*10);
}
if($sila<1)
{
$sila=1;
}
$rk=rand(1,3);
if($rk==1)
{
$k='ударил';
}
if($rk==2)
{
$k='пронзил';
}
if($rk==3)
{
$k='двинул';
}
$lg='<img src=img/main/b1.png> <font color=#ff9900>'.$ts['name'].'</font> '.$k.' '.$mob['name'].' -'.$sila.'';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg."'
");
$hp=$mob['hp']-$sila;
if($hp<=0)
{
$nai=$ustr['reit_oh']+1;
$ds=$ustr['dost2a']+1;
mysql_query("UPDATE `users` SET `reit_oh`='".$nai."', `dost2a`='".$ds."' WHERE `id`='".$ustr['id']."'");
$hp=0;
$lg2='<img src=img/main/b7.png> <font color=#ff9900>'.$ts['name'].'</font> убил '.$mob['name'].'';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg2."'
");
$exp=$mob['hp'];
mysql_query("DELETE FROM `ohota_mob` WHERE `id`='".$mob['id']."'");
$nums=mysql_num_rows(mysql_query("SELECT * FROM `ohota_mob` WHERE `usr`='".$bv['usr']."'"));
if($nums==0 and $bv['status']==0)
{
$mba=mysql_fetch_array(mysql_query("SELECT * FROM `ohota_mb` WHERE `id`='".$bv['volna']."'"));
if($mba['kl']>0 and $mba['fm']==0 and $mba['exp']==0)
{
$lg12='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r16.png alt=kl>'.$mba['kl'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12."'
");
$dd=date('d');
$dm=date('m');
if($dd>=8 and $dd<=11 and $dm==3)
{
if($ustr['pol']==1)
{
$rr=rand(1,50);
if($rr==1)
{
$lg12z2='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8r.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z2."'
");
$f8r=$ustr['f8r']+1;
}
else
{
$f8r=$ustr['f8r'];
}
}
else
{
$f8r=$ustr['f8r'];
}
$f8=$ustr['f8']+1;
mysql_query("UPDATE `users` SET `f8`='".$f8."', `f8r`='".$f8r."' WHERE `id`='".$ustr['id']."'");
$lg12z='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z."'
");
}
$res=$ustr['kl']+$mba['kl'];
mysql_query("UPDATE `users` SET `kl`='".$res."' WHERE `id`='".$ustr['id']."'");
}
elseif($mba['kl']>0 and $mba['fm']>0 and $mba['exp']==0)
{
$lg12='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r16.png alt=kl>'.$mba['kl'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12."'
");
$lg122='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r17.png alt=fm>'.$mba['fm'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg122."'
");
$dd=date('d');
$dm=date('m');
if($dd>=8 and $dd<=11 and $dm==3)
{
if($ustr['pol']==1)
{
$rr=rand(1,50);
if($rr==1)
{
$lg12z2='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8r.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z2."'
");
$f8r=$ustr['f8r']+1;
}
else
{
$f8r=$ustr['f8r'];
}
}
else
{
$f8r=$ustr['f8r'];
}
$f8=$ustr['f8']+3;
mysql_query("UPDATE `users` SET `f8`='".$f8."', `f8r`='".$f8r."' WHERE `id`='".$ustr['id']."'");
$lg12z='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8.png>3</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z."'
");
}
$res=$ustr['kl']+$mba['kl'];
$res2=$ustr['fm']+$mba['fm'];
mysql_query("UPDATE `users` SET `kl`='".$res."', `fm`='".$res2."' WHERE `id`='".$ustr['id']."'");
}
elseif($mba['kl']>0 and $mba['fm']>0 and $mba['exp']>0)
{
$lg12='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r16.png alt=kl>'.$mba['kl'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12."'
");
$lg122='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/r17.png alt=fm>'.$mba['fm'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg122."'
");
$dd=date('d');
$dm=date('m');
if($dd>=8 and $dd<=11 and $dm==3)
{
if($ustr['pol']==1)
{
$rr=rand(1,50);
if($rr==1)
{
$lg12z2='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8r.png>1</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z2."'
");
$f8r=$ustr['f8r']+1;
}
else
{
$f8r=$ustr['f8r'];
}
}
else
{
$f8r=$ustr['f8r'];
}
$f8=$ustr['f8']+3;
mysql_query("UPDATE `users` SET `f8`='".$f8."', `f8r`='".$f8r."' WHERE `id`='".$ustr['id']."'");
$lg12z='<img src=img/main/e9.png> <font color=#00ff00>Вы выбили <img src=img/main/f8.png>3</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg12z."'
");
}
$res=$ustr['kl']+$mba['kl'];
$res2=$ustr['fm']+$mba['fm'];
if($ustr['lvl']>$ustr['rang'])
{
$vips=mysql_query("SELECT * FROM `vip` WHERE `usr`='".$ustr['id']."'");
$nvip=mysql_num_rows($vips);
if($nvip!=0)
{
$mba['exp']=$mba['exp']*2;
}
else
{
$mba['exp']=$mba['exp'];
}
}
else
{
$mba['exp']=0;
}
$exp=$ustr['exp_rang']+$mba['exp'];
mysql_query("UPDATE `users` SET `kl`='".$res."', `fm`='".$res2."', `exp_rang`='".$exp."' WHERE `id`='".$ustr['id']."'");
$thyr=rand(1,200);
if($thyr==1)
{
if($ustr['lvl']>30 and $ustr['lvl']<36)
{
$r=rand(1,15);
if($r==1)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3274'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==2)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3275'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==3)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3276'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==4)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3282'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==5)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3283'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==6)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3284'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==7)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3292'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==8)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3293'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==9)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3294'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==10)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3311'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==11)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3310'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==12)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3309'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==13)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3312'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==14)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3313'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==15)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3314'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
}
if($ustr['lvl']>35 and $ustr['lvl']<40)
{
$r=rand(1,13);
if($r==1)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3277'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==2)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3285'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==3)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3286'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==4)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3287'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==5)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3295'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==6)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3296'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==7)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3297'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==8)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3308'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==9)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3307'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==10)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3306'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==11)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3315'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==12)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3316'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==13)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3317'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
}
if($ustr['lvl']>39)
{
$r=rand(1,22);
if($r==1)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3278'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==2)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3279'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==3)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3280'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==4)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3282'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==5)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3281'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==6)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3288'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==7)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3289'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==8)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3290'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==9)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3291'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==10)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3298'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==11)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3299'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==12)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3300'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==13)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3301'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==14)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3313'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==15)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3305'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==16)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3304'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==17)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3303'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==18)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3302'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==19)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3318'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==20)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3319'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==21)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3320'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
if($r==22)
{
$trz=mysql_query("SELECT * FROM `torg_leg` WHERE `id`='3321'");
$thy=mysql_fetch_array($trz);
mysql_query("INSERT INTO `item` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='<font color=#ffcc00>".$thy['name']."</font>',
`cena`='".$thy['cena']."',
`lvl`='".$thy['lvl']."',
`img`='".$thy['img']."',
`hp`='".$thy['hp']."',
`arm`='".$thy['arm']."',
`sila`='".$thy['sila']."',
`tip`='".$thy['tip']."',
`lic`='1',
`pr`='".$thy['pr']."',
`status`='off'
");
}
}
$lg122z='<img src=img/main/e9.png> <font color=#00ff00>Вам выпала вещь <font color=#ffcc00>'.$thy['name'].'</font>';
mysql_query("INSERT INTO `log_ohota` SET
`id`='',
`usr`='".$ustr['id']."',
`text`='".$lg122z."'
");
}
}
if($ustr['kv']==100 and $bv['volna']==6)
{
$kv=$ustr['kv2']+1;
mysql_query("UPDATE `users` SET `kv2`='".$kv."' WHERE `id`='".$ustr['id']."'");
}
if($ustr['kv']==101 and $bv['volna']==18)
{
$kv=$ustr['kv2']+1;
mysql_query("UPDATE `users` SET `kv2`='".$kv."' WHERE `id`='".$ustr['id']."'");
}
if($ustr['kv']==105 and $bv['volna']==54)
{
$kv=$ustr['kv2']+1;
mysql_query("UPDATE `users` SET `kv2`='".$kv."' WHERE `id`='".$ustr['id']."'");
}
if($ustr['kv']==17 and $bv['volna']==1)
{
mysql_query("UPDATE `users` SET `kv`='18' WHERE `id`='".$ustr['id']."'");
}
$v2=$bv['volna']+1;
if($v2>=55)
{
mysql_query("DELETE FROM `ohota` WHERE `usr`='".$bv['usr']."'");
mysql_query("INSERT INTO `user_log` SET
`usr`='".$ustr['id']."',
`text`='Вы успешно прошли охоту!'
");
}
$ma=mysql_fetch_array(mysql_query("SELECT * FROM `ohota_mb` WHERE `id`='".$v2."'"));
if($ustr['lvl']<16)
{
$hp=$ma['hp']*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
if($ustr['lvl']>=16 and $ustr['lvl']<31)
{
$hp=($ma['hp']+$ma['hp']/100*30)*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
if($ustr['lvl']>=31 and $ustr['lvl']<39)
{
$hp=($ma['hp']+$ma['hp']/100*50)*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
if($ustr['lvl']>=39)
{
$hp=($ma['hp']+$ma['hp']/100*70)*$ustr['lvl'];
$sila=$ma['sila']*$ustr['lvl'];
$arm=$ma['arm']*$ustr['lvl'];
}
$sila=$sila/5;
$arm=$arm/15;
if($ma['kol']==1)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
}
if($ma['kol']==2)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
}
if($ma['kol']==3)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
$tim3=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim3."'
");
}
if($ma['kol']==4)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
$tim3=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim3."'
");
$tim4=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim4."'
");
}
if($ma['kol']==5)
{
$tim=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim."'
");
$tim2=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim2."'
");
$tim3=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim3."'
");
$tim4=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim4."'
");
$tim5=time()+rand(0,5);
mysql_query("INSERT INTO `ohota_mob` SET
`id`='',
`usr`='".$ustr['id']."',
`name`='".$ma['name']."',
`img`='".$ma['id']."',
`sila`='".$sila."',
`hp`='".$hp."',
`arm`='".$arm."',
`time`='".$tim5."'
");
}
mysql_query("UPDATE `ohota` SET `volna`='".$v2."', `enemy`='0' WHERE `id`='".$bv['id']."'");
}
$new=mysql_fetch_array(mysql_query("SELECT * FROM `ohota_mob` WHERE `usr`='".$ustr['id']."'"));
mysql_query("UPDATE `ohota` SET `enemy`='".$new['id']."' WHERE `id`='".$bv['id']."'");
}
else
{
$exp=$sila;
mysql_query("UPDATE `ohota_mob` SET `hp`='".$hp."' WHERE `id`='".$mob['id']."'");
}
$exp=$ts['exp']+$exp;
if($ts['pred']<=25)
{
$sp=10;
}
elseif($ts['pred']>25 and $ts['sped']<=50)
{
$sp=9;
}
elseif($ts['pred']>50 and $ts['sped']<=75)
{
$sp=8;
}
elseif($ts['pred']>75 and $ts['sped']<=99)
{
$sp=7;
}
elseif($ts['pred']==100)
{
$sp=6;
}
$tim=time()+$sp;
mysql_query("UPDATE `ohota` SET `time_us`='".$tim."' WHERE `id`='".$thy['id']."'");
mysql_query("UPDATE `pit` SET `exp`='".$exp."' WHERE `id`='".$ts['id']."'");
}
}
}
}
}
?>