Top 25 for Halls MMO

Post all your tuts or request for tuts here.
Post Reply
spawnfestis
Posts: 79
Joined: Fri Dec 04, 2009 3:19 am

Top 25 for Halls MMO

Post by spawnfestis »

toplist.php

Code: Select all

<!--Written by Spawnfestis @ indie-resource.com! Free to use by all means!-->
<center>
<?php
include_once 'connect.php';
session_start();
?>
<link href="style.css" rel="stylesheet" type="text/css" />

<?php
$result = mysql_query("SELECT * FROM `players` ORDER BY `exper` DESC LIMIT 0,25") or die("Could not get toplist information. Database error.");
$counter = 1;

echo "<table width='185' cellspacing='3' valign='top'>";
echo "<tr><td width='10'>#</td><td width='100'>Name</td><td width='25'>Level</td><td width='50'>Class</td><tr>";
while($row = mysql_fetch_array($result))
{
	echo "<tr><td width='10'>".$counter."</td>";
	echo "<td width='100'>".$row['name']."</td>";
	echo "<td width='25'>". $row['level']."</td>";
	echo "<td width='50'>". $row['pclass']."</td></tr>";
	$counter++;
}
echo "</table>";
?>
</center>
I use it to call from a menu to an iframe, that way it centers in my "mainbox" and delivers what I want.
You can paste this into for example, toplist.php and just make a link in your game and it'll work magically.

From a game developer (to be, I have 6 months left, then I'm out to work ;))!
Cheers for giving me motivation to make an MMORPG although I didn't use much of the code from the tutorials, this community makes me strive for success.
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Top 25 for Halls MMO

Post by hallsofvallhalla »

Thanks for the code!
spawnfestis
Posts: 79
Joined: Fri Dec 04, 2009 3:19 am

Re: Top 25 for Halls MMO

Post by spawnfestis »

hallsofvallhalla wrote:Thanks for the code!
No problem. And another tip for your latest video; If two users attacks the same target (even if it _does_ replenish life) at the same time one can be left without Experience and the other will get it easier. ;)
I'm about to fix this is my version as soon as I get past customization.

I'll put up a project preview on this site when I'm close to Alpha/Beta whatever stage feels needed to have some testers. :)
Post Reply

Return to “Tutorials”