syntax cleanup

This commit is contained in:
dave 2017-10-22 20:39:20 -07:00
parent bb1051e490
commit 3729258931
109 changed files with 847 additions and 1641 deletions

View File

Before

Width:  |  Height:  |  Size: 392 B

After

Width:  |  Height:  |  Size: 392 B

View File

Before

Width:  |  Height:  |  Size: 382 B

After

Width:  |  Height:  |  Size: 382 B

View File

Before

Width:  |  Height:  |  Size: 414 B

After

Width:  |  Height:  |  Size: 414 B

View File

Before

Width:  |  Height:  |  Size: 648 B

After

Width:  |  Height:  |  Size: 648 B

View File

Before

Width:  |  Height:  |  Size: 369 B

After

Width:  |  Height:  |  Size: 369 B

View File

Before

Width:  |  Height:  |  Size: 411 B

After

Width:  |  Height:  |  Size: 411 B

View File

Before

Width:  |  Height:  |  Size: 422 B

After

Width:  |  Height:  |  Size: 422 B

View File

Before

Width:  |  Height:  |  Size: 426 B

After

Width:  |  Height:  |  Size: 426 B

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1001 B

After

Width:  |  Height:  |  Size: 1001 B

View File

Before

Width:  |  Height:  |  Size: 450 B

After

Width:  |  Height:  |  Size: 450 B

View File

Before

Width:  |  Height:  |  Size: 43 B

After

Width:  |  Height:  |  Size: 43 B

View File

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

Before

Width:  |  Height:  |  Size: 427 B

After

Width:  |  Height:  |  Size: 427 B

View File

Before

Width:  |  Height:  |  Size: 441 B

After

Width:  |  Height:  |  Size: 441 B

View File

Before

Width:  |  Height:  |  Size: 367 B

After

Width:  |  Height:  |  Size: 367 B

View File

Before

Width:  |  Height:  |  Size: 397 B

After

Width:  |  Height:  |  Size: 397 B

View File

Before

Width:  |  Height:  |  Size: 397 B

After

Width:  |  Height:  |  Size: 397 B

View File

Before

Width:  |  Height:  |  Size: 147 B

After

Width:  |  Height:  |  Size: 147 B

View File

Before

Width:  |  Height:  |  Size: 402 B

After

Width:  |  Height:  |  Size: 402 B

View File

Before

Width:  |  Height:  |  Size: 127 B

After

Width:  |  Height:  |  Size: 127 B

View File

Before

Width:  |  Height:  |  Size: 515 B

After

Width:  |  Height:  |  Size: 515 B

View File

Before

Width:  |  Height:  |  Size: 123 B

After

Width:  |  Height:  |  Size: 123 B

View File

Before

Width:  |  Height:  |  Size: 300 B

After

Width:  |  Height:  |  Size: 300 B

View File

Before

Width:  |  Height:  |  Size: 125 B

After

Width:  |  Height:  |  Size: 125 B

View File

Before

Width:  |  Height:  |  Size: 57 B

After

Width:  |  Height:  |  Size: 57 B

View File

Before

Width:  |  Height:  |  Size: 56 B

After

Width:  |  Height:  |  Size: 56 B

View File

Before

Width:  |  Height:  |  Size: 65 B

After

Width:  |  Height:  |  Size: 65 B

View File

Before

Width:  |  Height:  |  Size: 58 B

After

Width:  |  Height:  |  Size: 58 B

View File

Before

Width:  |  Height:  |  Size: 56 B

After

Width:  |  Height:  |  Size: 56 B

View File

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 94 KiB

View File

@ -1,6 +0,0 @@
-----STEALTHTEMPLATES.COM-----
Thank you for downloading our Template. To get more updates on this template please visit www.stealthtemplates.com
We also offer custom made templates so be sure to visit our site!
-----STEALTHTEMPLATES.COM-----

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1001 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 300 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 635 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 691 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

View File

@ -1,308 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>--PcGamester 2 - The best place for cheats, downloads and more!--</title>
<meta name="Descripion" content="Game downloads, cheats and more!">
<meta name="Keywords" content="games, flash, online, free, multiplayer, game, gaming, online games, free games, flash games, fun, fun games, web games, action games, adventure games, multiplayer games, board games, shooting games, sim games, racing games, racing, shooting, adventure, board, fighting, fighting games, multiplayer, action, gamersnet.co.nr, gamersnet, gamers, net, co, nr">
<meta name="Copyright" content="StealthTemplates">
<meta name="Language" content="English">
<meta name="Author" content="Michael Davis">
<body bgcolor="#2f2f2f" marginleft="0" marginright="0" leftmargin="0" rightmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<link rel="stylesheet" href="style.css" type="text/css">
<br>
<table align="center" height="15" width="700" cellspacing="0" cellpadding="0" class="table1">
<tr>
<td bgcolor="#666666" height="15"><img src="images/img_2.jpg" height="15" width="700"></td>
</tr>
</table>
<table align="center" height="120" width="700" cellspacing="0" cellpadding="0" class="table2">
<tr>
<td background="images/img_main.jpg">
</tr>
</table>
<table align="center" height="15" width="700" cellspacing="0" cellpadding="0" class="table2">
<tr>
<td bgcolor="#666666" height="15"><img src="images/img_2.jpg" height="15" width="700"></td>
</tr>
</table>
<table align="center" height="640" width="700" cellspacing="0" cellpadding="0" class="table2">
<tr>
<td background="images/img_4.png" valign="top" width="170">
<table align="center" width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td height="20" background="images/img_5.jpg" class="style1" align="center">- Menu -
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" align="center"><a href="#" class="menulink">Home</a>
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" align="center"><a href="#" class="menulink">About</a>
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" align="center"><a href="#" class="menulink">New Games</a>
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" align="center"><a href="#" class="menulink">Cheats</a>
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" align="center"><a href="#" class="menulink">Reviews</a>
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" align="center"><a href="#" class="menulink">Related</a>
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" align="center"><a href="#" class="menulink">Other</a>
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" align="center"><a href="#" class="menulink">Contact</a>
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" background="images/img_5.jpg" class="style1" align="center">- Games -
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" align="center"><a href="#" class="menulink">Top Rated Games</a>
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" align="center"><a href="#" class="menulink">Top 50 Games</a>
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" align="center"><a href="#" class="menulink">Most Popular Games</a>
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" align="center"><a href="#" class="menulink">Game Review</a>
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" align="center"><a href="#" class="menulink">Action Games</a>
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" align="center"><a href="#" class="menulink">Stratergy Games</a>
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" align="center"><a href="#" class="menulink">Simulation Games</a>
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" align="center"><a href="#" class="menulink">Racing Games</a>
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" align="center"><a href="#" class="menulink">Shooting Games</a>
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" align="center"><a href="#" class="menulink">Adventure Games</a>
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" align="center"><a href="#" class="menulink">Fighting Games</a>
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" align="center"><a href="#" class="menulink">Board Games</a>
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" background="images/img_5.jpg" class="style1" align="center">- Our Affiliates -
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" align="center"><a href="http://www.templatedesign.co.nr" class="menulink">Template Design</a>
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" align="center"><a href="http://www.thegamesphere.com" class="menulink">TheGameSphere</a>
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" background="images/img_5.jpg" class="style1" align="center">- Latest News -
</tr>
<tr>
<td bgcolor="#000000" height="1">
</tr>
<tr>
<td height="20" class="style3">Our website has just launched on the web! We will be updating it daily as soon as we finish with our new design.
</tr>
</table>
<td bgcolor="#000000" width="1">
<td bgcolor="#666666" valign="top">
<table align="center" height="189" width="100%" cellspacing="0" cellpadding="10" border="0" class="table3">
<tr>
<td bgcolor="#666666">
<table align="center" height="150" width="455" cellspacing="0" cellpadding="10" border="0" class="table1">
<tr>
<td bgcolor="#777777" class="style2">
<img src="images/img_6.jpg" align="left">
<img src="images/img_7.jpg" align="right">
<img src="images/img_8.jpg" align="center">
</tr>
</table>
</tr>
</table>
<br>
<table align="center" height="410" width="480" cellspacing="0" cellpadding="10" border="0" class="table1">
<tr>
<td bgcolor="#666666" valign="top">
<table align="center" height="385" width="255" cellspacing="0" cellpadding="10" border="0" class="table1">
<tr>
<td bgcolor="#777777" height="270" valign="top"><div class="style1">Featured Game - Pacific Fighters</div>
<img src="images/img_9.jpg" align="center">
<div class="style4">Pacific Fighters features an action packed flight simulation based in world war II aircrafts. You can choose of
over 40 flyable aircraft models and many missions. <a href="#" class="menulink">Read More.</a>
</tr>
<tr>
<td bgcolor="#777777" valign="top">
<div class="style1">News And Announcments</div>
<div class="style4">PcGamester 2 just launched on the web! Designed by http://www.stealthtemplates.com We hope you like our
new template and be sure to visit StealthTemplates</div>
</tr>
</table>
<td bgcolor="#666666" valign="top">
<table align="center" height="385" width="185" cellspacing="0" cellpadding="10" border="0" class="table1">
<tr>
<td bgcolor="#777777" valign="top"><div class="style1">Top 10 Games:</div>
<div class="style4">
1. World of Warcraft
<br>
2. The chronicles of Riddick
<br>
3. Guild Wars
<br>
4. Sid Meier's Pirates
<br>
5. Half-Life 2
<br>
6. Grand Theft Auto - San Andreas
<br>
7. Falcon 4.0: Allied Force
<br>
8. Silent Hunter III
<br>
9. GTR FIA Racing
<br>
10. Star Wars Republic Commando
</div>
<div class="style1">Featured Playable Demo
<br>
</div>
<div class="style4">
Piolet Down - Behind Enemy
</div>
<img src="images/img_10.jpg">
<div class="style4">
In this action adventure game pilot down features 3 playable levels and many other extras to play. Click the games section to download it
</div>
</tr>
</table>
</tr>
</table>
</tr>
</table
</tr>
</table>
<table align="center" height="15" width="700" cellspacing="0" cellpadding="0" class="table2">
<tr>
<td background="images/img_2.jpg" align="center"><div class="style2">
Copyright 2005 Your Company Name. All rights reserved. <a href="#" class="style2">Contact</a> Created by Michael Davis
<a href="http://www.stealthtemplates.com" class="style2"> http://www.stealthtemplates.com</a>
</div>
</tr>
</table>
<table align="center" height="15" width="700" cellspacing="0" cellpadding="0">
<tr>
<td align="right" class="style2">Created by Stealthtemplates.com
</tr>
</table>
<body>
</head>
</html>

View File

@ -1,57 +0,0 @@
.style1 {
color: #ffffff;
font-size: 11px;
font-family: arial, helvetica, sans-serif;
}
.style2 {
color: #000000;
font-size: 11px;
font-family: arial, helvetica, sans-serif;
}
.style3 {
color: #000000;
font-size: 11px;
font-family: arial, helvetica, sans-serif;
padding-left: 20px;
padding-right: 20px;
padding-top: 10px;
}
.style4 {
color: #9DA4BF;
font-size: 11px;
font-family: arial, helvetica, sans-serif;
}
.menuLink {
color: #9DA4BF;
font-size: 11px;
font-family: arial, helvetica, sans-serif;
text-decoration:none;
}
a.menuLink:hover {
color: #aaaaaa;
font-size: 11px;
font-family: arial, helvetica, sans-serif;
text-decoration:underline;
}
.table1
{
border-right: 1px solid #000000;
border-left: 1px solid #000000;
border-top: 1px solid #000000;
border-bottom: 1px solid #000000;
}
.table2
{
border-right: 1px solid #000000;
border-left: 1px solid #000000;
border-top: 0px solid #000000;
border-bottom: 1px solid #000000;
}
.table3
{
border-right: 0px solid #000000;
border-left: 0px solid #000000;
border-top: 0px solid #000000;
border-bottom: 1px solid #000000;
}

View File

@ -14,17 +14,13 @@ $credsYo=explode("@seperator@", $credsYo);
$u=strtolower($credsYo[0]);
$p=strtolower($credsYo[1]);
if($u=="")
{
if($u=="") {
header("Location: index.php?login");
}
$result = mysql_query("SELECT * FROM mrpg_users WHERE name='$u'");
while($row = mysql_fetch_array($result))
{
if($row['password']!=$p)
{
while($row = mysql_fetch_array($result)) {
if($row['password']!=$p) {
header("Location: index.php");
exit;
}
@ -35,8 +31,7 @@ $result = mysql_query($sql);
$sql="SELECT * FROM mrpg_users WHERE name='$u'";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
while($row = mysql_fetch_array($result)) {
$char['id']=$row['id'];
$char['x']=$row['x'];
$char['y']=$row['y'];
@ -119,29 +114,30 @@ if($_GET['que']!="") {
}
foreach($que as $value) {
walkByNumArray($value);
if(!(walkable($char['x'], $char['y']))) {
fallback();
}
}
}
/* TELES */
if($char['x']==19 && $char['y']==7) { $char['x']=10; $char['y']=60;
if($char['x']==19 && $char['y']==7) {
$char['x']=10; $char['y']=60;
//Lol heal
mysql_query("UPDATE mrpg_stat SET hp=maxhp WHERE id=" . $char['id'] . ";");
} //Tele into tut area
else if($char['x']==11 && $char['y']==59) { $char['x']=19; $char['y']=8; } //Tele out of tut area, to noobland
else if($char['x']==56 && $char['y']==10) { $char['x']=6; $char['y']=58; mysql_query("UPDATE mrpg_stat SET hp=maxhp WHERE id=" . $char['id'] . ";"); } //Out of canyon. + heal.
else if($char['x']==11 && $char['y']==59) {
$char['x']=19; $char['y']=8;
} //Tele out of tut area, to noobland
else if($char['x']==56 && $char['y']==10) {
$char['x']=6; $char['y']=58;
mysql_query("UPDATE mrpg_stat SET hp=maxhp WHERE id=" . $char['id'] . ";");
} //Out of canyon. + heal.
/* Misc stuff, like confirmations & messages */
@ -179,11 +175,7 @@ $ty=$char['y'];
$sql="UPDATE mrpg_users SET x='$tx', y='$ty' WHERE name='$u'";
$result = mysql_query($sql);
///////////BATTLE CHECK////////////
$bzone=checkbzone($tx, $ty, 0);
$battle=$bzone[rand(0,(count($bzone)-1))];
@ -212,18 +204,13 @@ exit;
}
//////////END BATTLE CHECK//////////
fallback();
}
function walkByNumArray($num) {
global $char;
if($num==1) {
$char['x']=$char['x'];
$char['y'] =$char['y']-1;
@ -237,7 +224,6 @@ $char['y'] =$char['y'];
$char['x']=$char['x'];
$char['y'] =$char['y']+1;
}
}
function fallback() {
@ -248,5 +234,4 @@ exit;
fallback();
?>

View File

@ -13,23 +13,18 @@ $havegone=false;
$dead=false;
$messages=array();
$u=strtolower($credsYo[0]);
$p=strtolower($credsYo[1]);
if($u=="")
{
if($u=="") {
header("Location: index.php?login");
}
$result = mysql_query("SELECT * FROM mrpg_users WHERE name='$u'");
while($row = mysql_fetch_array($result))
{
if($row['password']!=$p)
{
while($row = mysql_fetch_array($result)) {
if($row['password']!=$p) {
header("Location: index.php");
exit;
}
@ -40,35 +35,28 @@ $result = mysql_query($sql);
$sql="SELECT * FROM mrpg_users WHERE name='$u'";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
while($row = mysql_fetch_array($result)) {
$char['id']=$row['id'];
$char['exp']=$row['level'];
}
$sql="SELECT * FROM mrpg_battles WHERE id='" . $char['id'] . "'";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
while($row = mysql_fetch_array($result)) {
if($row['use']==0) {
header("Location: actions.php");
exit;
}
$enemy=$row['enemy'];
$enemyhp=$row['enemyhp'];
}
$sql="SELECT * FROM mrpg_monsters WHERE id='$enemy'";
$result = mysql_query($sql);
$monsterstats = mysql_fetch_array($result);
$sql="SELECT * FROM mrpg_stat WHERE id='" . $char['id'] . "'";
$result = mysql_query($sql);
$pstats = mysql_fetch_array($result);
@ -76,17 +64,13 @@ $pstats = mysql_fetch_array($result);
if($_GET['appear']==yes) {
$messages[]=ucfirst($monsterstats['name']) . " appears!";
}
if($_GET['act']==run) {
$run=rand(1,4);
if($run==4) {
$messages[]="You attempt to escape!";
$messages[]="Success!";
$havegone=false;
@ -100,15 +84,11 @@ $messages[]="Failure...";
}
} else if($_GET['act']==attack) {
$messages[]="You attack the " . ucfirst($monsterstats['name']) . "!";
$havegone=true;
//(Strength + Force / 2) + (offense + fight / 2)
$hit1=($pstats['strength'] + $pstats['force']) / 2;
@ -120,7 +100,6 @@ $hit=rand(0,round($hit+4.9999));
$messages[]="And you deal $hit damage!";
$enemyhp=$enemyhp-$hit;
}
@ -136,37 +115,26 @@ if($enemyhp<=0) {
$messages[]=$monsterstats['diemsg'];
$sql="UPDATE mrpg_battles SET `use`=0, `enemy`=0, `enemyhp`=0 WHERE `id`=" . $char['id'] . ";";
mysql_query($sql);
$expgiven=$monsterstats['expgive'];
$messages[]="You gain $expgiven experience.";
if( level(2, $char['exp']) != level(2, $char['exp']+$expgiven) ) {
mysql_query("UPDATE mrpg_users SET mode='lvlup', level=level+$expgiven WHERE id=" . $char['id'] . ";");
}
else
{
} else {
mysql_query("UPDATE mrpg_users SET mode='norm', level=level+$expgiven WHERE id=" . $char['id'] . ";");
}
$havegone=false;
}
if($havegone==true) { //The player has acted! Now its the games turn!
$monsterhit=rand(0, $monsterstats['power']);

View File

@ -1,7 +1,6 @@
<?php
function checkbzone($x, $y, $m) {
if($y>=0 && $y<=12 && $x>=0 && $x<=25) { //Noob zone
return array(1,2,0,0,0,0,0,0,0); // 1/10th chance rat :O
} else if($y>=11 && $y<=15 && $x>=53 && $x<=99) {
@ -9,17 +8,6 @@ return array(2,0,0,0,0,3);
} else {
return array(0);
}
}
?>

View File

@ -5,20 +5,16 @@
exit;*/
$con = mysql_connect("localhost","mop_admin","droids");
if (!$con)
{
$con = mysql_connect("mysql","mop_admin","droids");
if (!$con) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db("mop_rpg", $con);
//Get user IP
if($_SERVER['HTTP_X_FORWARDED_FOR']!="")
{
if($_SERVER['HTTP_X_FORWARDED_FOR']!="") {
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
}
else
{
} else {
$ip=$_SERVER['REMOTE_ADDR'];
}

View File

@ -10,30 +10,22 @@ $credsYo=explode("@seperator@", $credsYo);
$u=strtolower($credsYo[0]);
$p=strtolower($credsYo[1]);
if($u=="")
{
if($u=="") {
header("Location: index.php?login");
}
$result = mysql_query("SELECT * FROM mrpg_users WHERE name='$u'");
while($row = mysql_fetch_array($result))
{
if($row['password']!=$p)
{
while($row = mysql_fetch_array($result)) {
if($row['password']!=$p) {
header("Location: index.php");
exit;
}
}
$sql="SELECT * FROM mrpg_users WHERE name='$u'";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
while($row = mysql_fetch_array($result)) {
$char['id']=$row['id'];
$char['mode']=$row['mode'];
}
@ -47,8 +39,7 @@ exit;
$sql="SELECT * FROM mrpg_confirm WHERE id=" . $char['id'] . ";";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
while($row = mysql_fetch_array($result)) {
$confirm['q']=$row['q'];
$confirm['yesx']=$row['yesx'];
$confirm['yesy']=$row['yesy'];
@ -58,36 +49,23 @@ $confirm['noy']=$row['noy'];
if($_SERVER['QUERY_STRING']=="") {
echo "<center><br><h4><font color='white'>" . $confirm['q'] . "</font></h4><br><br>
<h5><a href='confirm.php?yes'>Yes</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href='confirm.php?no'>No</a></h5>";
}
if($_SERVER['QUERY_STRING']=="yes") {
mysql_query("UPDATE mrpg_users SET mode='norm', x=" . $confirm['yesx'] . ", y=" . $confirm['yesy'] . " WHERE id=" . $char['id'] . ";");
header("Location: actions.php");
exit;
}
if($_SERVER['QUERY_STRING']=="no") {
mysql_query("UPDATE mrpg_users SET mode='norm', x=" . $confirm['nox'] . ", y=" . $confirm['noy'] . " WHERE id=" . $char['id'] . ";");
header("Location: actions.php");
exit;
}
?>

View File

@ -14,23 +14,19 @@ include("battlezones.php");
$u=$char['x'];
$p=$char['y'];
if($u=="")
{
if($u=="") {
header("Location: index.php");
}
$result = mysql_query("SELECT * FROM mrpg_users WHERE name='$u'");
while($row = mysql_fetch_array($result))
{
while($row = mysql_fetch_array($result)) {
$x=$row['x']+0;
$y=$row['y']+0;
$dir=$row['dir'];
$bzone=checkbzone($x, $y, 0);
if(md5($row['password'])!=$p)
{
if(md5($row['password'])!=$p) {
header("Location: index.php");
exit;
}
@ -76,8 +72,7 @@ $white = imageColorAllocate ($im, 0xFF, 0xFF, 0xFF);
$result = mysql_query("SELECT name,x,y,lastact,dir FROM mrpg_users");
while($row = mysql_fetch_array($result))
{
while($row = mysql_fetch_array($result)) {
$dx=$row['x'];
$dy=$row['y'];
@ -85,7 +80,6 @@ $thetime=$row['lastact'];
$dsrcx=$dx*16-230;
$dsrcy=$dy*16-160;
if((date("U")-$thetime)<=60) {
if($row['dir']==1) {
@ -98,9 +92,6 @@ imageCopyMerge($im, $images['chRight'], $dsrcx +230, $dsrcy +144, 0, 0, 12, 32,
imageCopyMerge($im, $images['chDown'], $dsrcx +230, $dsrcy +144, 0, 0, 12, 32,100);
}
//imageString($im,5, $dsrcx+230-(strlen($row['name'])*3), $dsrcy+129, ucfirst($row['name']), $black);
imageString($im,5, $dsrcx+233-(strlen($row['name'])*3), $dsrcy+127, ucfirst($row['name']), $black);
}
@ -131,23 +122,13 @@ imageCopy($im2, $im, 0, 0, $srcx, $srcy, 470, 329);
header('Content-type: image/png');
imagePNG($im2);
imageDestroy($im);
imageDestroy($im2);
imageDestroy($images['chDown']);
imageDestroy($images['chUp']);
imageDestroy($images['chLeft']);
imageDestroy($images['chRight']);
ob_end_flush();
?>

View File

@ -6,15 +6,11 @@ Finds experience from level, and vice-versa
function level($mode,$input) {
if($mode==1) {
$a=pow($input, 2) * 31;
return $a;
}
if($mode==2) {
$val=$input/31;
$val=sqrt($val);
@ -24,8 +20,6 @@ $val=round($val-.499);
//$val=$val-.499;
return(abs($val));
}
}

BIN
forum.zip

Binary file not shown.

View File

@ -14,14 +14,12 @@ $credsYo=explode("@seperator@", $credsYo);
$u=strtolower($credsYo[0]);
$p=strtolower($credsYo[1]);
if($u=="")
{
if($u=="") {
header("Location: index.php?login");
}
$result = mysql_query("SELECT * FROM mrpg_users WHERE name='$u'");
while($row = mysql_fetch_array($result))
{
while($row = mysql_fetch_array($result)) {
if($row['password']!=$p)
{
header("Location: index.php");
@ -32,14 +30,12 @@ exit;
$sql="SELECT * FROM mrpg_users WHERE name='$u'";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
while($row = mysql_fetch_array($result)) {
$char['x']=$row['x'];
$char['y']=$row['y'];
}
?><script type='text/javascript'>
qSwitch=0
@ -59,25 +55,19 @@ qSwitch=1
qSwitch=0
}
drawQs(qSwitch)
}
function dirtostring(dir) {
if(dir==1) {
return "<image src='images/icons_up.gif'>"
} else if(dir==2) {
return "<image src='images/icons_left.gif'>"
} else if(dir==3) {
return "<image src='images/icons_right.gif'>"
} else if(dir==4) {
return "<image src='images/icons_down.gif'>"
} else if(dir==0) {
return "<image src='images/exbox.gif'>"
} else {
return ""
@ -85,8 +75,6 @@ return ""
}
function drawQs(x) {
if(x==1) {
qSwitch=1
@ -96,7 +84,6 @@ obj = document.getElementById('overlay')
obj.style.display=""
obj2 = document.getElementById('walkdiv')
obj2.style.display=""
}
if(x==0) {
qSwitch=0
@ -106,7 +93,6 @@ obj = document.getElementById('overlay')
obj.style.display="none"
obj = document.getElementById('walkdiv')
obj.style.display="none"
}
}
@ -122,11 +108,9 @@ q7=null
q8=null
q9=null
q10=null
function walkfunct(d) {
if(qSwitch==1 && d!=null) {
if(d==1) {
obj2 = document.getElementById('square')
obj2.style.top=(obj2.offsetTop - 16)
@ -141,8 +125,6 @@ obj2 = document.getElementById('square')
obj2.style.top=(obj2.offsetTop + 16)
}
if(q1==null) {
q1=d
} else if(q2==null) {
@ -167,12 +149,7 @@ goque()
}
drawque();
}
else
{
} else {
if(d==0) {
document.all.TheFrame.src="actions.php"
} else if(d==1) {
@ -235,8 +212,6 @@ if(strW10!="") {
questring=questring+", "+strW10+"."
}
obj = document.getElementById('theQue')
obj.innerHTML=questring
}
@ -304,7 +279,6 @@ document.all.TheFrame.src="battle.php?act=attack"
} else if(action==1) {
document.all.TheFrame.src="battle.php?act=run"
}
}
</script>
@ -322,7 +296,6 @@ height: 15px;
position: absolute;
top: 199px;
left: 272px;
}
</style>
@ -372,4 +345,3 @@ make_gui($frame, $guif);
?>
<br><h3>Please note that the experience / level formula has been adjusted, and you may not be the same level as earlier.</h3>

View File

@ -8,8 +8,6 @@ $black = imageColorAllocate ($im, 0, 0, 0);
imageFill($im, 5, 5, $black);
*/
include("config.php");
@ -54,15 +52,9 @@ imagePNG($im);
imageDestroy($im);
}
makestatimage(1);
/*
$background = imageColorAllocate ($im, 255, 255, 255);
$background = imageColorTransparent($im,$background);
@ -84,16 +76,4 @@ $x=$x+16;
}*/
?>

View File

@ -1,8 +1,6 @@
<?php
function make_gui($t, $b) {
echo '<table id="Table_01" width="537" height="594" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3">
@ -32,5 +30,4 @@ echo '<table id="Table_01" width="537" height="594" border="0" cellpadding="0" c
}
?>

5
hs.php
View File

@ -6,21 +6,16 @@ include("includes/experience.php");
$sql=mysql_query("SELECT * FROM mrpg_users ORDER BY level DESC LIMIT 20");
while($row=mysql_fetch_array($sql)) {
$hs[]=array("name"=>$row['name'], "exp"=>$row['level']);
}
//print_r($hs);
echo "<table border='1' cellspacing='0' class='hs'><tr><td colspan='4' align='center'> Earthbound Highscores </td></tr><tr><td>#</td><td>Name</td><td>EXP</td><td>Level</td></tr>";
$i=1;
foreach($hs as $value) {
echo "<tr><td> $i: </td><td> " . ucfirst($value['name']) . " </td><td> " . $value['exp'] . " </td><td> " . abs(level(2, $value['exp'])) . " </td></tr>";
$i++;
}

View File

@ -91,7 +91,4 @@ imageDestroy($im);
}
?>

View File

@ -6,7 +6,6 @@ Finds experience from level, and vice-versa
function level($mode,$input) {
if($mode==1) {
$a=pow($input, 2) * 14;
return $a;
@ -14,7 +13,6 @@ return $a;
if($mode==2) {
$val=$input/14;
$val=sqrt($val);
@ -24,10 +22,7 @@ $val=round($val-.499);
//$val=$val-.499;
return(abs($val));
}
}
?>

View File

@ -4,7 +4,6 @@ include("config.php");
include("includes/experience.php");
function makestatimage($pid) {
global $con;
$result = mysql_query("SELECT * FROM mrpg_stat WHERE id='$pid'");
@ -48,6 +47,7 @@ imageString($im, 5, 190, 10, "HP: " . $row['hp'] . "/" . $row['maxhp'], $green);
header('Content-type: image/png');
imagePNG($im);
echo "."; exit;
imageDestroy($im);
}

View File

@ -2,32 +2,23 @@
include("config.php");
if($_POST['u']!="")
{
if($_POST['u']!="") {
$u=addslashes($_POST['u']);
$p=addslashes($_POST['p']);
if($u!="" && $p!="")
{
if($u!="" && $p!="") {
$sql="SELECT * FROM mrpg_users WHERE name='$u'";
//echo $sql;
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
if($row['password']==$p)
{
while($row = mysql_fetch_array($result)) {
if($row['password']==$p) {
setcookie("mrpg-ethbnd", strtolower($u . "@seperator@" . $p), time()+525600);
header("Location: game.php");
exit;
}
else
{
} else {
$message="Invalid username or password.";
}
}
}
}
@ -48,11 +39,6 @@ $message="Invalid username or password.";
<br></br>
<table align="center" height=100 width="740" cellspacing="0" border="0" cellpadding="0" class="table2">
<tr>
@ -64,8 +50,6 @@ $message="Invalid username or password.";
<img src="images/guestbook_icon.jpg"><a href="forum/" class="menulink" alt="forum">Forum</a>
</td><td align="right" width="499" background="images/right_side.jpg">
</td>
@ -96,9 +80,6 @@ $message="Invalid username or password.";
<hr width="180">
<div align="right" class="style1">Dec 1st 2007</div>
<div align="left" class="style2"><img src="images/smallarrow_icon.jpg"> Open!</div>
@ -110,8 +91,6 @@ $message="Invalid username or password.";
</tr>
</table>
<td align="center" width="1" bgcolor="#000000">
<td align="center" width="499" bgcolor="#5A6674">
@ -121,14 +100,9 @@ $message="Invalid username or password.";
if($_SERVER['QUERY_STRING']=="register") {
include("register.php");
} else if($_SERVER['QUERY_STRING']=="login") {
echo "<form action='index.php?login' method='post'>$message<table border='0' cellpadding='1' cellspacing='0' class='style1'><tr><td>Username:</td><td><input type='text' name='u' value='$u'></td></tr><tr><td>Password</td><td><input type='password' name='p' value='$p'></td></tr><tr><td align='center' colspan='2'><input type='submit' value='Login'></td></tr></table></form>";
} else if($_SERVER['QUERY_STRING']=="highscores") {
include("hs.php");
} else {
echo '<div class="style4"><b>EarthBound Welcomes You</b></div>
<br>

73
init.sql Normal file
View File

@ -0,0 +1,73 @@
CREATE DATABASE mop_rpg;
USE mop_rpg;
CREATE TABLE `mrpg_battles` (
`id` text,
`use` text,
`enemy` text,
`enemyhp` text,
`other` text
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `mrpg_confirm` (
`id` int(11) DEFAULT NULL,
`q` text,
`yesx` int(11) DEFAULT NULL,
`yesy` int(11) DEFAULT NULL,
`nox` int(11) DEFAULT NULL,
`noy` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `mrpg_message` (
`id` int(11) DEFAULT NULL,
`q` text,
`x` int(11) DEFAULT NULL,
`y` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `mrpg_monsters` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`image` text,
`hp` int(11) DEFAULT NULL,
`name` text,
`diemsg` text,
`expgive` int(11) DEFAULT NULL,
`power` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
INSERT INTO `mrpg_monsters` VALUES (1,'rat.png',30,'Rat','rat died',10,0);
INSERT INTO `mrpg_monsters` VALUES (2,'chef_1.png',30,'Chef','chef screamed "profit has a tiny dick" and died',20,2);
INSERT INTO `mrpg_monsters` VALUES (3,'monster.png',30,'Monster','monster died',30,5);
CREATE TABLE `mrpg_stat` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`hp` int(11) DEFAULT NULL,
`maxhp` int(11) DEFAULT NULL,
`pp` int(11) DEFAULT NULL,
`offense` int(11) DEFAULT NULL,
`defense` int(11) DEFAULT NULL,
`fight` int(11) DEFAULT NULL,
`speed` int(11) DEFAULT NULL,
`wisdom` int(11) DEFAULT NULL,
`strength` int(11) DEFAULT NULL,
`force` int(11) DEFAULT NULL,
`poison` int(11) DEFAULT NULL,
`other` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
CREATE TABLE `mrpg_users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` text,
`password` text,
`x` int(11) DEFAULT NULL,
`y` int(11) DEFAULT NULL,
`dir` text,
`inventory` text,
`level` int(11) DEFAULT NULL,
`lastact` text,
`mode` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

View File

@ -2,34 +2,23 @@
include("config.php");
if($_POST['u']!="")
{
if($_POST['u']!="") {
$u=addslashes($_POST['u']);
$p=addslashes($_POST['p']);
if($u!="" && $p!="")
{
if($u!="" && $p!="") {
$sql="SELECT * FROM mrpg_users WHERE name='$u'";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
if($row['password']==$p)
{
while($row = mysql_fetch_array($result)) {
if($row['password']==$p) {
$message="You have been logged in. Proceed to <a href='game.php'>the Game.</a><br>";
setcookie("mrpg-ethbnd", strtolower($u . "@seperator@" . $p), time()+525600);
}
else
{
} else {
$message="Invalid username or password.";
}
}
}
}
?>
<form action='login.php' method='post'><?php echo $message; ?><table border='0' cellpadding='1' cellspacing='0'><tr><td>Username:</td><td><input type='text' name='u' value='<?php echo $u; ?>'></td></tr><tr><td>Password</td><td><input type='password' name='p' value='<?php echo $p; ?>'></td></tr><tr><td align='center' colspan='2'><input type='submit' value='Login'></td></tr></table></form>

Some files were not shown because too many files have changed in this diff Show More