- Messages
- 3,819
- Reaction score
- 163
- Points
- 63
Hey guys,
Really didn't want to do this... but i'm really confused. xD
I think i went too in-depth to this.
Heres my problem.
I'm trying to make personal Highscores for a RuneScape private server that is SQL/IPB integrated.
and, i got all the data I need, but I have the levels in experience not in the levels.
I have the function and stuff to do it, just can't figure out how to implement it.
Here it is.
Also, if you could help me try to do this automaticly, like put in a loop or something, that would be great.
Thanks in advance,
--Neil
Really didn't want to do this... but i'm really confused. xD
I think i went too in-depth to this.
Heres my problem.
I'm trying to make personal Highscores for a RuneScape private server that is SQL/IPB integrated.
and, i got all the data I need, but I have the levels in experience not in the levels.
I have the function and stuff to do it, just can't figure out how to implement it.
Here it is.
Also, if you could help me try to do this automaticly, like put in a loop or something, that would be great.
PHP:
<style type="text/css">
table {
width: 50%;
}
</style>
<?php
$c1 = mysql_connect("localhost", "*****", "*******");
mysql_select_db("cali_3", $c1);
if (isset ($_GET['name']))
{
$name = $_GET['name'];
$result = mysql_query("SELECT * FROM ibf_members WHERE name='$name'") or die(mysql_error());
while($row = mysql_fetch_array($result))
{
function experience($L) {
$a=0;
for($x=1; $x<$L; $x++) {
$a += floor($x+300*pow(2, ($x/7)));
}
return floor($a/4);
}
if($playerxp >= 13034430) //fix
$playerLevel = 99;
echo "<a href=#search><h3><center><u>Search again?</u></center></h3></a><br /><br />";
echo "<center><table border=1>";
$stats = array("attack", "defence", "strength", "hitpoints", "range", "prayer", "magic", "cooking","woodcutting","fletching","fishing","firemaking","crafting","smithing","mining","herblore","agility","thieving","slayer","farming","runecrafting");
echo "<tr>";
echo "<td><strong>" . $row['name'] . "</strong></td>";
echo "<td>Level</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Attack</td>";
echo "<td>" . $row['attack'] . "</td>";
echo "<td>" . $L['$stats'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Defence</td>";
echo "<td>" . $row['defence'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Strength</td>";
echo "<td>" . $row['strength'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Hitpoints</td>";
echo "<td>" . $row['hitpoints'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Ranged</td>";
echo "<td>" . $row['range'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Prayer</td>";
echo "<td>" . $row['prayer'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Magic</td>";
echo "<td>" . $row['magic'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Cooking</td>";
echo "<td>" . $row['cooking'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Woodcutting</td>";
echo "<td>" . $row['woodcutting'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Fletching</td>";
echo "<td>" . $row['fletching'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Fishing</td>";
echo "<td>" . $row['fishing'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Firemaking</td>";
echo "<td>" . $row['firemaking'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Crafting</td>";
echo "<td>" . $row['crafting'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Smithing</td>";
echo "<td>" . $row['smithing'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Mining</td>";
echo "<td>" . $row['mining'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Herblore</td>";
echo "<td>" . $row['herblore'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Agility</td>";
echo "<td>" . $row['agility'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Thieving</td>";
echo "<td>" . $row['thieving'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Slayer</td>";
echo "<td>" . $row['slayer'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>Farming</td>";
echo "<td>" . $row['farming'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<td>RuneCrafting</td>";
echo "<td>" . $row['runecrafting'] . "</td>";
echo "</tr>";
}
echo "</table></center>";
mysql_close($c1);
}
else if (!isset ($_GET['name'])) {
echo "Welcome to the CaliScape Sig Shop!";
echo "<br />";
echo "Here you can make a custom signiture showing your CaliScape Stats!";
echo "<br />Enjoy!<br />";
}
?>
<center><a name="search"></a>
<form name="psearch" type="get" action="index.php">
<input type="hidden" name="code" value="Sigs" />
<input type="text" name="name" /><br />
<input type="submit" value="Search" />
</form></center>
Thanks in advance,
--Neil
Last edited: