Jump to content

Battle tent


Recommended Posts

I'm having some problems with my battle tent, it's only displaying 1 bot



include "globals.php";
if($ir['jail'] or $ir['hospital']) {
echo("This page cannot be accessed while in jail or hospital.");
print "<h3>Battle Tent</h3>
[b]Welcome to the battle tent! Here you can challenge bot's for money.[/b]
<table width='95%' cellspacing='1' class='table'><tr><th>Bot Name</th><th>Level</th><th>Times Beaten</th><th>Ready To Be Challenged?</th><th>Location</th><th>Money Won</th><th>Challenge</th></tr>";
$q=$db->query("SELECT cb.*,u.*,c.npcid,cy.cityname FROM challengebots cb LEFT JOIN users u ON cb.cb_npcid=u.userid LEFT JOIN challengesbeaten c ON c.npcid=u.userid AND c.userid=$userid LEFT JOIN cities cy ON u.location=cy.cityid");
$q=$db->query("SELECT count(*) FROM challengesbeaten WHERE npcid=$v");
print "<tr><td align='center'>{$r['username']}</td><td align='center'>{$r['level']}</td><td align='center'>$times</td><td align='center'>";

if($r['hp'] >= $r['maxhp']/2 and $r['location']==$ir['location']) {
print "<font color=green>Yes</font>";
} else {
print "<font color=red>No</font>"; }

print "</td><td align='center'>{$r['cityname']}</td><td align='center'>\$".money_formatter($earn,'')."</td><td align='center'>";
print "[i]Already[/i]";
print "[url='attack.php?ID={$r[']Challenge[/url]";
print "</td></tr>";
print "</table>";
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...