Проблема с ареной - Visavi.net https://visavi.net/ RSS - Visavi.net https://visavi.net/assets/img/images/logo_small.png RSS - Visavi.net https://visavi.net/ [email protected] (admin) [email protected] (admin) Mon, 23 Dec 2024 09:17:40 +0300 м-да уж.<br> или на пастебин или кодепен выложи.. все в одно сливается. либо как выше писали файл закинь<br> когда уже научитесь код красиво оформлять и php и html отделять? https://visavi.net/topics/42875/688290 Проблема с ареной Dmitry Kokorin Thu, 25 Feb 2016 16:01:13 +0300 Сообщения https://visavi.net/topics/42875/688290 Сюда выложи <a href="http://pastebin.com/" target="_blank" rel="nofollow">http://pastebin.com/</a> в куче постов без подсветки сложно читать. https://visavi.net/topics/42875/688285 Проблема с ареной Александр Thu, 25 Feb 2016 08:57:47 +0300 Сообщения https://visavi.net/topics/42875/688285 Никто не знает? -это печально<img src="https://visavi.net/uploads/stickers/sad.gif" alt="sad"> У кого ж спросить?.. https://visavi.net/topics/42875/688284 Проблема с ареной Олег Thu, 25 Feb 2016 08:48:01 +0300 Сообщения https://visavi.net/topics/42875/688284 мда, лучше бы просто файл прислал хех https://visavi.net/topics/42875/688269 Проблема с ареной Александр Wed, 24 Feb 2016 13:32:46 +0300 Сообщения https://visavi.net/topics/42875/688269 <pre class="prettyprint"> $udar=round($uron+$uron/6); mysql_query(&quot;UPDATE `users` SET `money` = &#039;$udata&#91;money]&#039;+&#039;$var&#039;, `exp`=&#039;$udata&#91;exp]&#039;+&#039;$bon&#039;, `hp`= &#039;$udata&#91;hp]&#039;-&#039;$uron&#039; , `mp`=&#039;$udata&#91;mp]&#039;-&#039;$mprand&#039;, `arenawins`=&#039;$win&#039;,`arenaloses`=&#039;$los&#039; WHERE `usr` = &#039;$log&#039;&quot;); mysql_query(&quot;UPDATE `set` SET `arenainv`=&#039;$inv&#039;, `artime`=&#039;$time&#039; WHERE `usr` = &#039;$log&#039;&quot;)or die(mysql_error()); mysql_query(&quot;UPDATE `arenalog` SET `name`=&#039;win&#039;,`oponent`=&#039;$user&#039;,`money`=&#039;$var&#039;,`exp`=&#039;$bon&#039;, `myudar`=&#039;$udar&#039;,`userudar`=&#039;$uron&#039; WHERE `usr` = &#039;$log&#039;&quot;); ob_start(); $header=TRUE; header (&quot;Location&#58; arena.php?log=win&quot;);exit; //в бой } else{ $inv=$set&#91;arenainv]-1; $win=$udata&#91;arenawins]; $los=$udata&#91;arenaloses]+1; $var=1*round($var/4); $bon=round($bon/2); $uron=1+rand(0,$udata&#91;hp]/5); $uron=round($uron); $udar=round($uron-$uron/6); mysql_query(&quot;UPDATE `users` SET `money` = &#039;$udata&#91;money]&#039;-&#039;$var&#039;, `exp`=&#039;$udata&#91;exp]&#039;+&#039;$bon&#039;, `hp`= &#039;$udata&#91;hp]&#039;-&#039;$uron&#039; , `mp`=&#039;$udata&#91;mp]&#039;-&#039;$mprand&#039;, `arenawins`=&#039;$win&#039;,`arenaloses`=&#039;$los&#039; WHERE `usr` = &#039;$log&#039;&quot;); mysql_query(&quot;UPDATE `set` SET `arenainv`=&#039;$inv&#039;, `artime`=&#039;$time&#039; WHERE `usr` = &#039;$log&#039;&quot;); mysql_query(&quot;UPDATE `arenalog` SET `name`=&#039;los&#039;,`oponent`=&#039;$user&#039;,`money`=&#039;$var&#039;,`exp`=&#039;$bon&#039;, `myudar`=&#039;$udar&#039;,`userudar`=&#039;$uron&#039; WHERE `usr` = &#039;$log&#039;&quot;); header (&quot;Location&#58; arena.php?log=los&quot;);exit;</pre> https://visavi.net/topics/42875/688265 Проблема с ареной Олег Wed, 24 Feb 2016 11:33:48 +0300 Сообщения https://visavi.net/topics/42875/688265 <pre class="prettyprint">&#91; header (&quot;Location&#58; arena.php?log=inv&quot;);exit; //в бой }elseif($udata&#91;hp]&lt;=0 OR $udata&#91;mp]&lt;=0){ mysql_query(&quot;UPDATE `arenalog` SET `name`=&#039;hp&#039; WHERE `usr` = &#039;$log&#039;&quot;); header (&quot;Location&#58; arena.php?log=hp&quot;);exit; //в бой } ELSE{ if($udata&#91;lvl]&gt;=0 and $udata&#91;lvl]&lt;=5){$koef1=rand(2,4);$koef2=rand(4,8);$koef3=rand(6,10);$bon1=rand(1,4)*1.5;$bon2=rand(2,6)*1.5;$bon3=rand(6,8)*1.5;} if($udata&#91;lvl]&gt;5 and $udata&#91;lvl]&lt;=10){$koef1=rand(2,4);$koef2=rand(4,8);$koef3=rand(6,10);$bon1=rand(1,4)*1.5;$bon2=rand(5,15)*1.5;$bon3=rand(10,20)*1.5;} if($udata&#91;lvl]&gt;10 and $udata&#91;lvl]&lt;=20){$koef1=rand(8,16);$koef2=rand(10,20);$koef3=rand(20,30);$bon1=rand(8,16)*1.6;$bon2=rand(10,20)*1.6;$bon3=rand(20,30)*1.6;} if($udata&#91;lvl]&gt;20 and $udata&#91;lvl]&lt;=30){$koef1=rand(14,22);$koef2=rand(15,25);$koef3=rand(30,40);$bon1=rand(14,22)*1.7;$bon2=rand(15,25)*1.7;$bon3=rand(30,40)*1.7;} if($udata&#91;lvl]&gt;30 and $udata&#91;lvl]&lt;=40){$koef1=rand(20,28);$koef2=rand(20,35);$koef3=rand(40,50);$bon1=rand(20,28)*1.8;$bon2=rand(20,35)*1.8;$bon3=rand(40,50)*1.8;} if($udata&#91;lvl]&gt;40 and $udata&#91;lvl]&lt;=50){$koef1=rand(26,32);$koef2=rand(30,45);$koef3=rand(50,60);$bon1=rand(26,32)*1.9;$bon2=rand(30,45)*1.9;$bon3=rand(50,60)*1.9;} if($udata&#91;lvl]&gt;50 and $udata&#91;lvl]&lt;=60){$koef1=rand(30,36);$koef2=rand(35,55);$koef3=rand(50,65);$bon1=rand(30,36)*2;$bon2=rand(35,55)*2;$bon3=rand(50,70)*2;} if(!empty($_GET&#91;user1])){$shans=80;$var=round($koef1+$set&#91;razb]*1.5);$bon=round($bon1+$set&#91;razb]*3);$user=$_GET&#91;user1];} if(!empty($_GET&#91;user2])){$shans=66;$var=round($koef2+$set&#91;razb]*1.5);$bon=round($bon2+$set&#91;razb]*3);$user=$_GET&#91;user2];} if(!empty($_GET&#91;user3])){$shans=40;$var=round($koef3+$set&#91;razb]*2);$bon=round($bon3+$set&#91;razb]*3);$user=$_GET&#91;user3];} $stat=$_GET&#91;stat]; $my=$udata&#91;sila]+$udata&#91;hpall]+$udata&#91;lovk]+$udata&#91;prot]; if(($my-$stat)&gt;=10){$shans=80;} if($shans&gt;=$rand){ $inv=$set&#91;arenainv]-1; $win=$udata&#91;arenawins]+1; $los=$udata&#91;arenaloses]; $uron=3+rand(0,$udata&#91;hp]/5); $uron=round($uron); </pre> https://visavi.net/topics/42875/688264 Проблема с ареной Олег Wed, 24 Feb 2016 11:32:27 +0300 Сообщения https://visavi.net/topics/42875/688264 <pre class="prettyprint"> if($udata&#91;lvl]&gt;=0 and $udata&#91;lvl]&lt;=5){$koef1=rand(2,4);$koef2=rand(4,8);$koef3=rand(6,10);$bon1=rand(1,4)*1.5;$bon2=rand(2,6)*1.5;$bon3=rand(6,8)*1.5;} if($udata&#91;lvl]&gt;5 and $udata&#91;lvl]&lt;=10){$koef1=rand(2,4);$koef2=rand(4,8);$koef3=rand(6,10);$bon1=rand(1,4)*1.5;$bon2=rand(5,15)*1.5;$bon3=rand(10,20)*1.5;} if($udata&#91;lvl]&gt;10 and $udata&#91;lvl]&lt;=20){$koef1=rand(8,16);$koef2=rand(10,20);$koef3=rand(20,30);$bon1=rand(8,16)*1.6;$bon2=rand(10,20)*1.6;$bon3=rand(20,30)*1.6;} if($udata&#91;lvl]&gt;20 and $udata&#91;lvl]&lt;=30){$koef1=rand(14,22);$koef2=rand(15,25);$koef3=rand(30,40);$bon1=rand(14,22)*1.7;$bon2=rand(15,25)*1.7;$bon3=rand(30,40)*1.7;} if($udata&#91;lvl]&gt;30 and $udata&#91;lvl]&lt;=40){$koef1=rand(20,28);$koef2=rand(20,35);$koef3=rand(40,50);$bon1=rand(20,28)*1.8;$bon2=rand(20,35)*1.8;$bon3=rand(40,50)*1.8;} if($udata&#91;lvl]&gt;40 and $udata&#91;lvl]&lt;=50){$koef1=rand(26,32);$koef2=rand(30,45);$koef3=rand(50,60);$bon1=rand(26,32)*1.9;$bon2=rand(30,45)*1.9;$bon3=rand(50,60)*1.9;} if($udata&#91;lvl]&gt;50 and $udata&#91;lvl]&lt;=60){$koef1=rand(30,36);$koef2=rand(35,55);$koef3=rand(50,65);$bon1=rand(30,36)*2;$bon2=rand(35,55)*2;$bon3=rand(50,70)*2;} if(!empty($_GET&#91;user1])){$shans=80;$var=round($koef1+$set&#91;razb]*1.5);$bon=round($bon1+$set&#91;razb]*3);$user=$_GET&#91;user1];} if(!empty($_GET&#91;user2])){$shans=66;$var=round($koef2+$set&#91;razb]*1.5);$bon=round($bon2+$set&#91;razb]*3);$user=$_GET&#91;user2];} if(!empty($_GET&#91;user3])){$shans=40;$var=round($koef3+$set&#91;razb]*2);$bon=round($bon3+$set&#91;razb]*3);$user=$_GET&#91;user3];} $stat=$_GET&#91;stat]; $my=$udata&#91;sila]+$udata&#91;hpall]+$udata&#91;lovk]+$udata&#91;prot]; if(($my-$stat)&gt;=10){$shans=80;} if($shans&gt;=$rand){ $inv=$set&#91;arenainv]-1; $win=$udata&#91;arenawins]+1; $los=$udata&#91;arenaloses]; $uron=3+rand(0,$udata&#91;hp]/5); $uron=round($uron); $udar=round($uron+$uron/6); mysql_query(&quot;UPDATE `users` SET `money` = &#039;$udata&#91;money]&#039;+&#039;$var&#039;, `exp`=&#039;$udata&#91;exp]&#039;+&#039;$bon&#039;, `hp`= &#039;$udata&#91;hp]&#039;-&#039;$uron&#039; , `mp`=&#039;$udata&#91;mp]&#039;-&#039;$mprand&#039;, `arenawins`=&#039;$win&#039;,`arenaloses`=&#039;$los&#039; WHERE `usr` = &#039;$log&#039;&quot;);</pre> https://visavi.net/topics/42875/688263 Проблема с ареной Олег Wed, 24 Feb 2016 11:23:49 +0300 Сообщения https://visavi.net/topics/42875/688263 <pre class="prettyprint"> echo&quot;&lt;img src=&#039;pic/main/hero.png&#039; alt=&#039;*&#039;/&gt; $log &lt;img src=&#039;pic/main/redup.png&#039; alt=&#039;*&#039;/&gt; $udata&#91;lvl] &lt;img src=&#039;pic/main/red_warrior.png&#039; alt=&#039;*&#039;/&gt; $udata&#91;sila] &lt;img src=&#039;pic/main/red_healer.png&#039; alt=&#039;*&#039;/&gt; $udata&#91;hpall] &lt;img src=&#039;pic/main/exp.png&#039; alt=&#039;*&#039;/&gt; $udata&#91;lovk] &lt;img src=&#039;pic/main/def.png&#039; alt=&#039;*&#039;/&gt; $udata&#91;prot]&lt;/br&gt; $div&quot;; $el = mysql_query(&quot;SELECT * FROM `res` WHERE `usr` = &#039;$log&#039; and `tip`=&#039;elexir&#039; and `kol`&gt;&#039;0&#039; ORDER by `cena` DESC LIMIT 4&quot;); $avt=mysql_num_rows($el); if($avt&gt;=1){ While($elm = mysql_fetch_array($el)){ echo&quot;$elm&#91;name] ($elm&#91;kol] шт.) &#91;&lt;a href=\&quot;elexirs.php?id=$elm&#91;id]\&quot;&gt;исп.&lt;/a&gt;]&lt;br/&gt;&quot;; }} echo&quot;&lt;/div&gt;&lt;div class=&#039;menu&#039;&gt;&lt;a href=\&quot;arena.php?\&quot;&gt;Другие противники&lt;/a&gt;&quot;; &#64;include(&#039;files/down.php&#039;); case &#039;ataka&#039;&#58; if(isset($_GET&#91;&#039;ataka&#039;])){ $header=TRUE; $log1=rand($udata&#91;lvl]-3,$udata&#91;lvl]-1); $log2=rand($udata&#91;lvl],$udata&#91;lvl]+1); $log3=rand($udata&#91;lvl]+2,$udata&#91;lvl]+4); $boy1=mysql_query(&quot;SELECT * FROM `users` WHERE `lvl`=&#039;$log1&#039; ORDER BY RAND() LIMIT 1&quot;); $boys1 = mysql_fetch_array($boy1); $boy2=mysql_query(&quot;SELECT * FROM `users` WHERE `lvl`=&#039;$log2&#039; and `usr`!=&#039;$log&#039; ORDER BY RAND() LIMIT 1&quot;); $boys2 = mysql_fetch_array($boy2); $boy3=mysql_query(&quot;SELECT * FROM `users` WHERE `lvl`=&#039;$log3&#039; ORDER BY RAND() LIMIT 1&quot;); $boys3 = mysql_fetch_array($boy3); $rand=rand(0,100); $mprand=rand(3,6); if($set&#91;arenainv]==0){ $ost=5-round(($time-$set&#91;artime])/60); mysql_query(&quot;UPDATE `arenalog` SET `name`=&#039;inv&#039;, `log`=&#039;$ost&#039; WHERE `usr` = &#039;$log&#039;&quot;); header (&quot;Location&#58; arena.php?log=inv&quot;);exit; //в бой }elseif($udata&#91;hp]&lt;=0 OR $udata&#91;mp]&lt;=0){ mysql_query(&quot;UPDATE `arenalog` SET `name`=&#039;hp&#039; WHERE `usr` = &#039;$log&#039;&quot;); header (&quot;Location&#58; arena.php?log=hp&quot;);exit; //в бой } ELSE{ </pre> https://visavi.net/topics/42875/688262 Проблема с ареной Олег Wed, 24 Feb 2016 11:20:43 +0300 Сообщения https://visavi.net/topics/42875/688262 <pre class="prettyprint"> if(empty($boys2&#91;usr])){echo&quot;&lt;b&gt;Нет подходящего игрока&lt;/b&gt;&lt;/br&gt;&quot;;}else{ $stat2=$boys2&#91;sila]+$boys2&#91;hp]+$boys2&#91;lovk]+$boys2&#91;prot]; echo&quot;&lt;b&gt;$boys2&#91;usr]&lt;/b&gt;&lt;/br&gt;&quot;;} echo&quot;&lt;img class=&#039;float-left&#039; src=&#039;pic/avatar/human/B.jpg&#039; width=&#039;50&#039; height=&#039;80&#039; style=&#039;margin-right&#58;6px;&#039;/&gt; &lt;img src=&#039;pic/main/redup.png&#039; alt=&#039;*&#039;/&gt;Уровень&#58; $boys2&#91;lvl]&lt;/br&gt; &lt;img src=&#039;pic/main/red_warrior.png&#039; alt=&#039;*&#039;/&gt;Сила&#58; $boys2&#91;sila]&lt;/br&gt; &lt;img src=&#039;pic/main/red_healer.png&#039; alt=&#039;*&#039;/&gt;Здоровье&#58; $boys2&#91;hp]&lt;/br&gt;&lt;img src=&#039;pic/main/exp.png&#039; alt=&#039;*&#039;/&gt;Ловкость&#58; $boys2&#91;lovk]&lt;/br&gt;&lt;img src=&#039;pic/main/def.png&#039; alt=&#039;*&#039;/&gt; Защита&#58; $boys2&#91;prot]&lt;/br&gt; &lt;form action=\&quot;arena.php?mod=ataka&amp;ataka&amp;user2=$boys2&#91;usr]&amp;stat=$stat2\&quot; method=\&quot;post\&quot;&gt; &lt;input class=\&quot;button\&quot; type=\&quot;submit\&quot; value=\&quot;Атаковать!\&quot; /&gt;&lt;/form&gt; &lt;/div&gt;&lt;div class=&#039;menu&#039;&gt;&quot;; if(empty($boys3&#91;usr])){echo&quot;&lt;b&gt;Нет подходящего игрока&lt;/b&gt;&lt;/br&gt;&quot;;}else{ $stat3=$boys3&#91;sila]+$boys3&#91;hp]+$boys3&#91;lovk]+$boys3&#91;prot]; echo&quot;&lt;b&gt;$boys3&#91;usr]&lt;/b&gt;&lt;/br&gt;&quot;;} echo&quot;&lt;img class=&#039;float-left&#039; src=&#039;pic/avatar/human/A.jpg&#039; width=&#039;50&#039; height=&#039;80&#039; style=&#039;margin-right&#58;6px;&#039;/&gt; &lt;img src=&#039;pic/main/redup.png&#039; alt=&#039;*&#039;/&gt;Уровень&#58; $boys3&#91;lvl]&lt;/br&gt;&lt;img src=&#039;pic/main/red_warrior.png&#039; alt=&#039;*&#039;/&gt;Сила&#58; $boys3&#91;sila]&lt;/br&gt; &lt;img src=&#039;pic/main/red_healer.png&#039; alt=&#039;*&#039;/&gt;Здоровье&#58; $boys3&#91;hp]&lt;/br&gt;&lt;img src=&#039;pic/main/exp.png&#039; alt=&#039;*&#039;/&gt;Ловкость&#58; $boys3&#91;lovk]&lt;/br&gt;&lt;img src=&#039;pic/main/def.png&#039; alt=&#039;*&#039;/&gt; Защита&#58; $boys3&#91;prot]&lt;/br&gt; &lt;form action=\&quot;arena.php?mod=ataka&amp;ataka&amp;user3=$boys3&#91;usr]&amp;stat=$stat3\&quot; method=\&quot;post\&quot;&gt; &lt;input class=\&quot;button\&quot; type=\&quot;submit\&quot; value=\&quot;Атаковать!\&quot; /&gt;&lt;/form&gt; &lt;/div&gt;&lt;div class=&#039;menu&#039;&gt; &quot;; </pre> https://visavi.net/topics/42875/688261 Проблема с ареной Олег Wed, 24 Feb 2016 11:20:06 +0300 Сообщения https://visavi.net/topics/42875/688261 <pre class="prettyprint"> $boys1 = mysql_fetch_array($boy1);} } if(empty($boys2&#91;usr])){$log2=rand($udata&#91;lvl],$udata&#91;lvl]+1); $boy2=mysql_query(&quot;SELECT * FROM `users` WHERE `lvl`=&#039;$log2&#039; and `usr`!=&#039;$log&#039; ORDER BY RAND() LIMIT 1&quot;); $boys2 = mysql_fetch_array($boy2); $avto = mysql_num_rows($boy2);if($avto==0){$log2=rand($udata&#91;lvl]-3,$udata&#91;lvl]-1); $boy2=mysql_query(&quot;SELECT * FROM `users` WHERE `lvl`=&#039;$log2&#039; ORDER BY RAND() LIMIT 1&quot;); $boys2 = mysql_fetch_array($boy2);} } if(empty($boys3&#91;usr])){$log3=rand($udata&#91;lvl]+2,$udata&#91;lvl]+3); $boy3=mysql_query(&quot;SELECT * FROM `users` WHERE `lvl`=&#039;$log3&#039; ORDER BY RAND() LIMIT 1&quot;); $boys3 = mysql_fetch_array($boy3); $avto = mysql_num_rows($boy3);if($avto==0){$log3=rand($udata&#91;lvl]-3,$udata&#91;lvl]-1); $boy3=mysql_query(&quot;SELECT * FROM `users` WHERE `lvl`=&#039;$log3&#039; ORDER BY RAND() LIMIT 1&quot;); $boys3 = mysql_fetch_array($boy3);} } echo&quot;&lt;/div&gt;&lt;div class=&#039;menu&#039;&gt;&quot;; if(empty($boys1&#91;usr])){echo&quot;&lt;b&gt;Нет подходящего игрока&lt;/b&gt;&lt;/br&gt;&quot;;}else{ $stat1=$boys1&#91;sila]+$boys1&#91;hp]+$boys1&#91;lovk]+$boys1&#91;prot]; echo&quot;&lt;b&gt;$boys1&#91;usr]&lt;/b&gt;&lt;/br&gt;&quot;;} echo&quot;&lt;img class=&#039;float-left&#039; src=&#039;pic/avatar/human/C.jpg&#039; width=&#039;50&#039; height=&#039;80&#039; style=&#039;margin-right&#58;6px;&#039;/&gt; &lt;img src=&#039;pic/main/redup.png&#039; alt=&#039;*&#039;/&gt;Уровень&#58; $boys1&#91;lvl]&lt;/br&gt; &lt;img src=&#039;pic/main/red_warrior.png&#039; alt=&#039;*&#039;/&gt;Сила&#58; $boys1&#91;sila]&lt;/br&gt; &lt;img src=&#039;pic/main/red_healer.png&#039; alt=&#039;*&#039;/&gt;Здоровье&#58; $boys1&#91;hp]&lt;/br&gt;&lt;img src=&#039;pic/main/exp.png&#039; alt=&#039;*&#039;/&gt;Ловкость&#58; $boys1&#91;lovk]&lt;/br&gt;&lt;img src=&#039;pic/main/def.png&#039; alt=&#039;*&#039;/&gt; Защита&#58; $boys1&#91;prot]&lt;/br&gt; &lt;form action=\&quot;arena.php?mod=ataka&amp;ataka&amp;user1=$boys1&#91;usr]&amp;stat=$stat1\&quot; method=\&quot;post\&quot;&gt; &lt;input class=\&quot;button\&quot; type=\&quot;submit\&quot; value=\&quot;Атаковать!\&quot; /&gt;&lt;/form&gt; &lt;/div&gt;&lt;div class=&#039;menu&#039;&gt;&quot;; </pre> https://visavi.net/topics/42875/688260 Проблема с ареной Олег Wed, 24 Feb 2016 11:18:18 +0300 Сообщения https://visavi.net/topics/42875/688260 <pre class="prettyprint"> if(empty($boys3&#91;usr])){echo&quot;&lt;b&gt;Нет подходящего игрока&lt;/b&gt;&lt;/br&gt;&quot;;}else{ $stat3=$boys3&#91;sila]+$boys3&#91;hp]+$boys3&#91;lovk]+$boys3&#91;prot]; echo&quot;&lt;b&gt;$boys3&#91;usr]&lt;/b&gt;&lt;/br&gt;&quot;;} echo&quot;&lt;img class=&#039;float-left&#039; src=&#039;pic/avatar/human/A.jpg&#039; width=&#039;50&#039; height=&#039;80&#039; style=&#039;margin-right&#58;6px;&#039;/&gt; &lt;img src=&#039;pic/main/redup.png&#039; alt=&#039;*&#039;/&gt;Уровень&#58; $boys3&#91;lvl]&lt;/br&gt;&lt;img src=&#039;pic/main/red_warrior.png&#039; alt=&#039;*&#039;/&gt;Сила&#58; $boys3&#91;sila]&lt;/br&gt; &lt;img src=&#039;pic/main/red_healer.png&#039; alt=&#039;*&#039;/&gt;Здоровье&#58; $boys3&#91;hp]&lt;/br&gt;&lt;img src=&#039;pic/main/exp.png&#039; alt=&#039;*&#039;/&gt;Ловкость&#58; $boys3&#91;lovk]&lt;/br&gt;&lt;img src=&#039;pic/main/def.png&#039; alt=&#039;*&#039;/&gt; Защита&#58; $boys3&#91;prot]&lt;/br&gt; &lt;form action=\&quot;arena.php?mod=ataka&amp;ataka&amp;user3=$boys3&#91;usr]&amp;stat=$stat3\&quot; method=\&quot;post\&quot;&gt; &lt;input class=\&quot;button\&quot; type=\&quot;submit\&quot; value=\&quot;Атаковать!\&quot; /&gt;&lt;/form&gt; &lt;/div&gt;&lt;div class=&#039;menu&#039;&gt; &quot;; echo&quot;&lt;img src=&#039;pic/main/hero.png&#039; alt=&#039;*&#039;/&gt; $log &lt;img src=&#039;pic/main/redup.png&#039; alt=&#039;*&#039;/&gt; $udata&#91;lvl] &lt;img src=&#039;pic/main/red_warrior.png&#039; alt=&#039;*&#039;/&gt; $udata&#91;sila] &lt;img src=&#039;pic/main/red_healer.png&#039; alt=&#039;*&#039;/&gt; $udata&#91;hpall] &lt;img src=&#039;pic/main/exp.png&#039; alt=&#039;*&#039;/&gt; $udata&#91;lovk] &lt;img src=&#039;pic/main/def.png&#039; alt=&#039;*&#039;/&gt; $udata&#91;prot]&lt;/br&gt; $div&quot;; $el = mysql_query(&quot;SELECT * FROM `res` WHERE `usr` = &#039;$log&#039; and `tip`=&#039;elexir&#039; and `kol`&gt;&#039;0&#039; ORDER by `cena` DESC LIMIT 4&quot;); $avt=mysql_num_rows($el); if($avt&gt;=1){ While($elm = mysql_fetch_array($el)){ echo&quot;$elm&#91;name] ($elm&#91;kol] шт.) &#91;&lt;a href=\&quot;elexirs.php?id=$elm&#91;id]\&quot;&gt;исп.&lt;/a&gt;]&lt;br/&gt;&quot;; }} echo&quot;&lt;/div&gt;&lt;div class=&#039;menu&#039;&gt;&lt;a href=\&quot;arena.php?\&quot;&gt;Другие противники&lt;/a&gt;&quot;; &#64;include(&#039;files/down.php&#039;); case &#039;ataka&#039;&#58; if(isset($_GET&#91;&#039;ataka&#039;])){ $header=TRUE; $log1=rand($udata&#91;lvl]-3,$udata&#91;lvl]-1); $log2=rand($udata&#91;lvl],$udata&#91;lvl]+1); $log3=rand($udata&#91;lvl]+2,$udata&#91;lvl]+4); $boy1=mysql_query(&quot;SELECT * FROM `users` WHERE `lvl`=&#039;$log1&#039; ORDER BY RAND() LIMIT 1&quot;);</pre> https://visavi.net/topics/42875/688259 Проблема с ареной Олег Wed, 24 Feb 2016 11:17:03 +0300 Сообщения https://visavi.net/topics/42875/688259 <pre class="prettyprint"> echo&quot;&lt;/div&gt;&lt;div class=&#039;menu&#039;&gt;&quot;; if(empty($boys1&#91;usr])){echo&quot;&lt;b&gt;Нет подходящего игрока&lt;/b&gt;&lt;/br&gt;&quot;;}else{ $stat1=$boys1&#91;sila]+$boys1&#91;hp]+$boys1&#91;lovk]+$boys1&#91;prot]; echo&quot;&lt;b&gt;$boys1&#91;usr]&lt;/b&gt;&lt;/br&gt;&quot;;} echo&quot;&lt;img class=&#039;float-left&#039; src=&#039;pic/avatar/human/C.jpg&#039; width=&#039;50&#039; height=&#039;80&#039; style=&#039;margin-right&#58;6px;&#039;/&gt; &lt;img src=&#039;pic/main/redup.png&#039; alt=&#039;*&#039;/&gt;Уровень&#58; $boys1&#91;lvl]&lt;/br&gt; &lt;img src=&#039;pic/main/red_warrior.png&#039; alt=&#039;*&#039;/&gt;Сила&#58; $boys1&#91;sila]&lt;/br&gt; &lt;img src=&#039;pic/main/red_healer.png&#039; alt=&#039;*&#039;/&gt;Здоровье&#58; $boys1&#91;hp]&lt;/br&gt;&lt;img src=&#039;pic/main/exp.png&#039; alt=&#039;*&#039;/&gt;Ловкость&#58; $boys1&#91;lovk]&lt;/br&gt;&lt;img src=&#039;pic/main/def.png&#039; alt=&#039;*&#039;/&gt; Защита&#58; $boys1&#91;prot]&lt;/br&gt; &lt;form action=\&quot;arena.php?mod=ataka&amp;ataka&amp;user1=$boys1&#91;usr]&amp;stat=$stat1\&quot; method=\&quot;post\&quot;&gt; &lt;input class=\&quot;button\&quot; type=\&quot;submit\&quot; value=\&quot;Атаковать!\&quot; /&gt;&lt;/form&gt; &lt;/div&gt;&lt;div class=&#039;menu&#039;&gt;&quot;; if(empty($boys2&#91;usr])){echo&quot;&lt;b&gt;Нет подходящего игрока&lt;/b&gt;&lt;/br&gt;&quot;;}else{ $stat2=$boys2&#91;sila]+$boys2&#91;hp]+$boys2&#91;lovk]+$boys2&#91;prot]; echo&quot;&lt;b&gt;$boys2&#91;usr]&lt;/b&gt;&lt;/br&gt;&quot;;} echo&quot;&lt;img class=&#039;float-left&#039; src=&#039;pic/avatar/human/B.jpg&#039; width=&#039;50&#039; height=&#039;80&#039; style=&#039;margin-right&#58;6px;&#039;/&gt; &lt;img src=&#039;pic/main/redup.png&#039; alt=&#039;*&#039;/&gt;Уровень&#58; $boys2&#91;lvl]&lt;/br&gt; &lt;img src=&#039;pic/main/red_warrior.png&#039; alt=&#039;*&#039;/&gt;Сила&#58; $boys2&#91;sila]&lt;/br&gt; &lt;img src=&#039;pic/main/red_healer.png&#039; alt=&#039;*&#039;/&gt;Здоровье&#58; $boys2&#91;hp]&lt;/br&gt;&lt;img src=&#039;pic/main/exp.png&#039; alt=&#039;*&#039;/&gt;Ловкость&#58; $boys2&#91;lovk]&lt;/br&gt;&lt;img src=&#039;pic/main/def.png&#039; alt=&#039;*&#039;/&gt; Защита&#58; $boys2&#91;prot]&lt;/br&gt; &lt;form action=\&quot;arena.php?mod=ataka&amp;ataka&amp;user2=$boys2&#91;usr]&amp;stat=$stat2\&quot; method=\&quot;post\&quot;&gt; &lt;input class=\&quot;button\&quot; type=\&quot;submit\&quot; value=\&quot;Атаковать!\&quot; /&gt;&lt;/form&gt; &lt;/div&gt;&lt;div class=&#039;menu&#039;&gt;&quot;; </pre> https://visavi.net/topics/42875/688258 Проблема с ареной Олег Wed, 24 Feb 2016 11:13:46 +0300 Сообщения https://visavi.net/topics/42875/688258 не влазит бой сам. Ща кусками закину<br> <br> <em><span style="font-size:x-small">Добавлено через 07:48 сек.</span></em><br> <pre class="prettyprint"> if($_GET&#91;log]==&quot;los&quot;){ echo&quot;&lt;div class=\&quot;log\&quot;&gt;&lt;font color=&#039;#FF6633&#039;&gt;Поражение!&lt;/br&gt;&lt;/font&gt;Вы нанесли урона&#58; $logs&#91;myudar]&lt;/br&gt; $logs&#91;oponent] нанес урона&#58; $logs&#91;userudar]&lt;/br&gt;У вас отобрали $logs&#91;money] монет, но вы получили $logs&#91;exp] опыта. &lt;/div&gt;&lt;/div&gt;&quot;;} } echo&quot;&lt;/div&gt;&quot;; if(empty($boys1&#91;usr])){$log1=rand($udata&#91;lvl]-3,$udata&#91;lvl]-1); $boy1=mysql_query(&quot;SELECT * FROM `users` WHERE `lvl`=&#039;$log1&#039; ORDER BY RAND() LIMIT 1&quot;); $boys1 = mysql_fetch_array($boy1); $avto = mysql_num_rows($boy1);if($avto==0){$log1=rand($udata&#91;lvl]-3,$udata&#91;lvl]-1); $boy1=mysql_query(&quot;SELECT * FROM `users` WHERE `lvl`=&#039;$log1&#039; ORDER BY RAND() LIMIT 1&quot;); $boys1 = mysql_fetch_array($boy1);} } if(empty($boys2&#91;usr])){$log2=rand($udata&#91;lvl],$udata&#91;lvl]+1); $boy2=mysql_query(&quot;SELECT * FROM `users` WHERE `lvl`=&#039;$log2&#039; and `usr`!=&#039;$log&#039; ORDER BY RAND() LIMIT 1&quot;); $boys2 = mysql_fetch_array($boy2); $avto = mysql_num_rows($boy2);if($avto==0){$log2=rand($udata&#91;lvl]-3,$udata&#91;lvl]-1); $boy2=mysql_query(&quot;SELECT * FROM `users` WHERE `lvl`=&#039;$log2&#039; ORDER BY RAND() LIMIT 1&quot;); $boys2 = mysql_fetch_array($boy2);} } if(empty($boys3&#91;usr])){$log3=rand($udata&#91;lvl]+2,$udata&#91;lvl]+3); $boy3=mysql_query(&quot;SELECT * FROM `users` WHERE `lvl`=&#039;$log3&#039; ORDER BY RAND() LIMIT 1&quot;); $boys3 = mysql_fetch_array($boy3); $avto = mysql_num_rows($boy3);if($avto==0){$log3=rand($udata&#91;lvl]-3,$udata&#91;lvl]-1); $boy3=mysql_query(&quot;SELECT * FROM `users` WHERE `lvl`=&#039;$log3&#039; ORDER BY RAND() LIMIT 1&quot;); $boys3 = mysql_fetch_array($boy3);} }</pre> https://visavi.net/topics/42875/688257 Проблема с ареной Олег Wed, 24 Feb 2016 11:00:13 +0300 Сообщения https://visavi.net/topics/42875/688257 а где сам то бой? https://visavi.net/topics/42875/688256 Проблема с ареной Dmitry Kokorin Wed, 24 Feb 2016 10:20:58 +0300 Сообщения https://visavi.net/topics/42875/688256 Код выложил частично- весь не влазит. Весь файл находится по адресу - <a href="http://bitvam.tk/arena.php" target="_blank" rel="nofollow">http://bitvam.tk/arena.php</a> https://visavi.net/topics/42875/688251 Проблема с ареной Олег Wed, 24 Feb 2016 06:47:13 +0300 Сообщения https://visavi.net/topics/42875/688251