jds137 Posted December 27, 2008 Share Posted December 27, 2008 A former coder left this on my site, and after looking at I feel it has potential to be really great. It lets you search an area by using a set of arrow keys. I dont know how to add em, right now its all screwed up. Anyone wanna tackle making this better, then we can give it away to CE members? <?php include "globals.php"; if(!$_GET['searching']) { // Begin Static Display // Display header print "<h1> <center> [b] <font color=red> Welcome To Sir Smigs Castle Where You Can Go To Find Stuff. </font> [/b] </center> </h1> "; // Display 2 discreption of choices print "<h3> <center> [b] <font color=blue> You are standing in a room with several Directions you can go. Which way will you choose. </font> [/b] </center> </h3> "; // Directions print "<center>Directions To Walk</center> <center><table border='0' class='table' width='20%' bordercolor='#939393'><tr background='tablehgrad.png'> <td><center>[url='castle.php?searching=hope']left foward[/url]</td><td><center>[url='castle.php?searching=i']foward[/url]</td><td><center>[url='castle.php?searching=love']right foward[/url]</td></tr><tr> <td><center>[url='castle.php?searching=you']left[/url]</td><td><center>[url='castle.php?searching=but']up[/url]</td><td><center>[url='castle.php?searching=youve']right[/url]</td></tr><tr> <td><center>[url='castle.php?searching=hurt']left backword[/url]</td><td><center>[url='castle.php?searching=me']backword[/url]</td><td><center>[url='castle.php?searching=deeply']right backword[/url]</td></tr><tr> </table> "; // End Static Display } else { // Begin Dynamic Display // Hope if ($_GET['searching'] == 'hope') { if($ir['castle'] ==0) { mysql_query("UPDATE users SET will=will-0,energy=energy-0,money=money-0 WHERE userid=$userid",$c); print "You Have no Steps Left you can try Again at new day. [url='index.php']back[/url]!"; } else $mel=rand(1,5); if ($mel==1) { print "You walk down the hall way and dont find anything. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); } if ($mel==2) { print "You walk down the hall way and fall into a deep pit. When you come to your in the hospital. [url='index.php']Home[/url]"; $db->query("update users set castle=castle-1,hospital=60,hospreason='Fell into a deep pit in Sir Smigs Castle.',money=money-0 where userid=$userid"); } if ($mel==3) { print "You walk down the hall way and dont find your way out, but you find 3 tokens. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); $db->query("update users set tokens=tokens+3 where userid=$userid"); } if ($mel==4) { print "You walk down the hall way and dont find your way out, but you find some money. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1,money=money+1234 where userid=$userid"); } if ($mel==5) { print "You walk down the hall way and you find nothing. [url='castle.php']Home[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); } } // I if ($_GET['searching'] == 'i') { if($ir['walking'] ==0) { mysql_query("UPDATE users SET will=will-0,energy=energy-0,money=money-0 WHERE userid=$userid",$c); print "You Have no Steps Left you can try Again at new day. [url='index.php']back[/url]!"; } else $mel=rand(1,5); if ($mel==1) { print "You walk down the hall way and dont find anything. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); } if ($mel==2) { print "You walk down the hall way and fall into a deep pit. When you come to your in the hospital. [url='index.php']Home[/url]"; $db->query("update users set castle=castle-1,hospital=60,hospreason='Fell into a deep pit in Sir Smigs Castle.',money=money-0 where userid=$userid"); } if ($mel==3) { print "You walk down the hall way and dont find your way out, but you find 3 tokens. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); $db->query("update users set tokens=tokens+3 where userid=$userid"); } if ($mel==4) { print "You walk down the hall way and dont find your way out, but you find some money. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1,money=money+1234 where userid=$userid"); } if ($mel==5) { print "You walk down the hall way and you find nothing. [url='castle.php']Home[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); } } // Love if ($_GET['searching'] == 'love') { if($ir['walking'] ==0) { mysql_query("UPDATE users SET will=will-0,energy=energy-0,money=money-0 WHERE userid=$userid",$c); print "You Have no Steps Left you can try Again at new day. [url='index.php']back[/url]!"; } else $mel=rand(1,5); if ($mel==1) { print "You walk down the hall way and dont find anything. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); } if ($mel==2) { print "You walk down the hall way and fall into a deep pit. When you come to your in the hospital. [url='index.php']Home[/url]"; $db->query("update users set castle=castle-1,hospital=60,hospreason='Fell into a deep pit in Sir Smigs Castle.',money=money-0 where userid=$userid"); } if ($mel==3) { print "You walk down the hall way and dont find your way out, but you find 3 tokens. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); $db->query("update users set tokens=tokens+3 where userid=$userid"); } if ($mel==4) { print "You walk down the hall way and dont find your way out, but you find some money. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1,money=money+1234 where userid=$userid"); } if ($mel==5) { print "You walk down the hall way and you find nothing. [url='castle.php']Home[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); } } // You if ($_GET['searching'] == 'you') { if($ir['walking'] ==0) { mysql_query("UPDATE users SET will=will-0,energy=energy-0,money=money-0 WHERE userid=$userid",$c); print "You Have no Steps Left you can try Again at new day. [url='index.php']back[/url]!"; } else $mel=rand(1,5); if ($mel==1) { print "You walk down the hall way and dont find anything. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); } if ($mel==2) { print "You walk down the hall way and fall into a deep pit. When you come to your in the hospital. [url='index.php']Home[/url]"; $db->query("update users set castle=castle-1,hospital=60,hospreason='Fell into a deep pit in Sir Smigs Castle.',money=money-0 where userid=$userid"); } if ($mel==3) { print "You walk down the hall way and dont find your way out, but you find 3 tokens. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); $db->query("update users set tokens=tokens+3 where userid=$userid"); } if ($mel==4) { print "You walk down the hall way and dont find your way out, but you find some money. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1,money=money+1234 where userid=$userid"); } if ($mel==5) { print "You walk down the hall way and you find nothing. [url='castle.php']Home[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); } } // But if ($_GET['searching'] == 'but') { if($ir['walking'] ==0) { mysql_query("UPDATE users SET will=will-0,energy=energy-0,money=money-0 WHERE userid=$userid",$c); print "You Have no Steps Left you can try Again at new day. [url='index.php']back[/url]!"; } else $mel=rand(1,5); if ($mel==1) { print "You walk down the hall way and dont find anything. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); } if ($mel==2) { print "You walk down the hall way and fall into a deep pit. When you come to your in the hospital. [url='index.php']Home[/url]"; $db->query("update users set castle=castle-1,hospital=60,hospreason='Fell into a deep pit in Sir Smigs Castle.',money=money-0 where userid=$userid"); } if ($mel==3) { print "You walk down the hall way and dont find your way out, but you find 3 tokens. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); $db->query("update users set tokens=tokens+3 where userid=$userid"); } if ($mel==4) { print "You walk down the hall way and dont find your way out, but you find some money. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1,money=money+1234 where userid=$userid"); } if ($mel==5) { print "You walk down the hall way and you find nothing. [url='castle.php']Home[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); } } // Youve if ($_GET['searching'] == 'youve') { if($ir['walking'] ==0) { mysql_query("UPDATE users SET will=will-0,energy=energy-0,money=money-0 WHERE userid=$userid",$c); print "You Have no Steps Left you can try Again at new day. [url='index.php']back[/url]!"; } else $mel=rand(1,5); if ($mel==1) { print "You walk down the hall way and dont find anything. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); } if ($mel==2) { print "You walk down the hall way and fall into a deep pit. When you come to your in the hospital. [url='index.php']Home[/url]"; $db->query("update users set castle=castle-1,hospital=60,hospreason='Fell into a deep pit in Sir Smigs Castle.',money=money-0 where userid=$userid"); } if ($mel==3) { print "You walk down the hall way and dont find your way out, but you find 3 tokens. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); $db->query("update users set tokens=tokens+3 where userid=$userid"); } if ($mel==4) { print "You walk down the hall way and dont find your way out, but you find some money. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1,money=money+1234 where userid=$userid"); } if ($mel==5) { print "You walk down the hall way and you find nothing. [url='castle.php']Home[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); } } // Hurt if ($_GET['searching'] == 'hurt') { if($ir['walking'] ==0) { mysql_query("UPDATE users SET will=will-0,energy=energy-0,money=money-0 WHERE userid=$userid",$c); print "You Have no Steps Left you can try Again at new day. [url='index.php']back[/url]!"; } else $mel=rand(1,5); if ($mel==1) { print "You walk down the hall way and dont find anything. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); } if ($mel==2) { print "You walk down the hall way and fall into a deep pit. When you come to your in the hospital. [url='index.php']Home[/url]"; $db->query("update users set castle=castle-1,hospital=60,hospreason='Fell into a deep pit in Sir Smigs Castle.',money=money-0 where userid=$userid"); } if ($mel==3) { print "You walk down the hall way and dont find your way out, but you find 3 tokens. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); $db->query("update users set tokens=tokens+3 where userid=$userid"); } if ($mel==4) { print "You walk down the hall way and dont find your way out, but you find some money. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1,money=money+1234 where userid=$userid"); } if ($mel==5) { print "You walk down the hall way and you find nothing. [url='castle.php']Home[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); } } // Me if ($_GET['searching'] == 'me') { if($ir['walking'] ==0) { mysql_query("UPDATE users SET will=will-0,energy=energy-0,money=money-0 WHERE userid=$userid",$c); print "You Have no Steps Left you can try Again at new day. [url='index.php']back[/url]!"; } else $mel=rand(1,5); if ($mel==1) { print "You walk down the hall way and dont find anything. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); } if ($mel==2) { print "You walk down the hall way and fall into a deep pit. When you come to your in the hospital. [url='index.php']Home[/url]"; $db->query("update users set castle=castle-1,hospital=60,hospreason='Fell into a deep pit in Sir Smigs Castle.',money=money-0 where userid=$userid"); } if ($mel==3) { print "You walk down the hall way and dont find your way out, but you find 3 tokens. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); $db->query("update users set tokens=tokens+3 where userid=$userid"); } if ($mel==4) { print "You walk down the hall way and dont find your way out, but you find some money. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1,money=money+1234 where userid=$userid"); } if ($mel==5) { print "You walk down the hall way and you find nothing. [url='castle.php']Home[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); } } // Deeply if ($_GET['searching'] == 'deeply') { if($ir['walking'] ==0) { mysql_query("UPDATE users SET will=will-0,energy=energy-0,money=money-0 WHERE userid=$userid",$c); print "You Have no Steps Left you can try Again at new day. [url='index.php']back[/url]!"; } else $mel=rand(1,5); if ($mel==1) { print "You walk down the hall way and dont find anything. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); } if ($mel==2) { print "You walk down the hall way and fall into a deep pit. When you come to your in the hospital. [url='index.php']Home[/url]"; $db->query("update users set castle=castle-1,hospital=60,hospreason='Fell into a deep pit in Sir Smigs Castle.',money=money-0 where userid=$userid"); } if ($mel==3) { print "You walk down the hall way and dont find your way out, but you find 3 tokens. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); $db->query("update users set tokens=tokens+3 where userid=$userid"); } if ($mel==4) { print "You walk down the hall way and dont find your way out, but you find some money. [url='castle.php']Continue Searching[/url]"; $db->query("update users set castle=castle-1,money=money+1234 where userid=$userid"); } if ($mel==5) { print "You walk down the hall way and you find nothing. [url='castle.php']Home[/url]"; $db->query("update users set castle=castle-1 where userid=$userid"); } } } $h->endpage(); ?> db part thats needed walking int 11 not null 50 Quote Link to comment Share on other sites More sharing options...
danger boy Posted December 27, 2008 Share Posted December 27, 2008 Re: Help Re Doing Search an area Modd Looks intresting...... Quote Link to comment Share on other sites More sharing options...
Savager Posted December 27, 2008 Share Posted December 27, 2008 Re: Help Re Doing Search an area Modd your coder is horrible at coding. i hope you didnt pay him. Quote Link to comment Share on other sites More sharing options...
jds137 Posted December 27, 2008 Author Share Posted December 27, 2008 Re: Help Re Doing Search an area Modd I fired em, after he presented me with that crap. lol Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.