diff --git a/TEMP/4315 copy/--READ ME--.txt b/4315/--READ ME--.txt similarity index 100% rename from TEMP/4315 copy/--READ ME--.txt rename to 4315/--READ ME--.txt diff --git a/TEMP/4315 copy/images/Thumbs.db b/4315/images/Thumbs.db similarity index 100% rename from TEMP/4315 copy/images/Thumbs.db rename to 4315/images/Thumbs.db diff --git a/TEMP/4315 copy/images/about_icon.jpg b/4315/images/about_icon.jpg similarity index 100% rename from TEMP/4315 copy/images/about_icon.jpg rename to 4315/images/about_icon.jpg diff --git a/TEMP/4315 copy/images/arrow_icon.jpg b/4315/images/arrow_icon.jpg similarity index 100% rename from TEMP/4315 copy/images/arrow_icon.jpg rename to 4315/images/arrow_icon.jpg diff --git a/TEMP/4315 copy/images/arrow_icon2.jpg b/4315/images/arrow_icon2.jpg similarity index 100% rename from TEMP/4315 copy/images/arrow_icon2.jpg rename to 4315/images/arrow_icon2.jpg diff --git a/TEMP/4315 copy/images/bg_1.jpg b/4315/images/bg_1.jpg similarity index 100% rename from TEMP/4315 copy/images/bg_1.jpg rename to 4315/images/bg_1.jpg diff --git a/TEMP/4315 copy/images/email_icon.jpg b/4315/images/email_icon.jpg similarity index 100% rename from TEMP/4315 copy/images/email_icon.jpg rename to 4315/images/email_icon.jpg diff --git a/TEMP/4315 copy/images/guestbook_icon.jpg b/4315/images/guestbook_icon.jpg similarity index 100% rename from TEMP/4315 copy/images/guestbook_icon.jpg rename to 4315/images/guestbook_icon.jpg diff --git a/TEMP/4315 copy/images/home.jpg b/4315/images/home.jpg similarity index 100% rename from TEMP/4315 copy/images/home.jpg rename to 4315/images/home.jpg diff --git a/TEMP/4315 copy/images/home_icon.jpg b/4315/images/home_icon.jpg similarity index 100% rename from TEMP/4315 copy/images/home_icon.jpg rename to 4315/images/home_icon.jpg diff --git a/TEMP/4315 copy/images/right_side.jpg b/4315/images/right_side.jpg similarity index 100% rename from TEMP/4315 copy/images/right_side.jpg rename to 4315/images/right_side.jpg diff --git a/TEMP/4315 copy/images/sidediv.jpg b/4315/images/sidediv.jpg similarity index 100% rename from TEMP/4315 copy/images/sidediv.jpg rename to 4315/images/sidediv.jpg diff --git a/TEMP/4315 copy/images/smallarrow_icon.jpg b/4315/images/smallarrow_icon.jpg similarity index 100% rename from TEMP/4315 copy/images/smallarrow_icon.jpg rename to 4315/images/smallarrow_icon.jpg diff --git a/TEMP/4315 copy/images/spacer.gif b/4315/images/spacer.gif similarity index 100% rename from TEMP/4315 copy/images/spacer.gif rename to 4315/images/spacer.gif diff --git a/TEMP/4315 copy/images/topimage_r1_c1.gif b/4315/images/topimage_r1_c1.gif similarity index 100% rename from TEMP/4315 copy/images/topimage_r1_c1.gif rename to 4315/images/topimage_r1_c1.gif diff --git a/TEMP/4315 copy/images/topimage_r2_c1.gif b/4315/images/topimage_r2_c1.gif similarity index 100% rename from TEMP/4315 copy/images/topimage_r2_c1.gif rename to 4315/images/topimage_r2_c1.gif diff --git a/TEMP/4315 copy/images/topimage_r2_c10.gif b/4315/images/topimage_r2_c10.gif similarity index 100% rename from TEMP/4315 copy/images/topimage_r2_c10.gif rename to 4315/images/topimage_r2_c10.gif diff --git a/TEMP/4315 copy/images/topimage_r2_c11.gif b/4315/images/topimage_r2_c11.gif similarity index 100% rename from TEMP/4315 copy/images/topimage_r2_c11.gif rename to 4315/images/topimage_r2_c11.gif diff --git a/TEMP/4315 copy/images/topimage_r2_c2.gif b/4315/images/topimage_r2_c2.gif similarity index 100% rename from TEMP/4315 copy/images/topimage_r2_c2.gif rename to 4315/images/topimage_r2_c2.gif diff --git a/TEMP/4315 copy/images/topimage_r2_c2_f2.gif b/4315/images/topimage_r2_c2_f2.gif similarity index 100% rename from TEMP/4315 copy/images/topimage_r2_c2_f2.gif rename to 4315/images/topimage_r2_c2_f2.gif diff --git a/TEMP/4315 copy/images/topimage_r2_c3.gif b/4315/images/topimage_r2_c3.gif similarity index 100% rename from TEMP/4315 copy/images/topimage_r2_c3.gif rename to 4315/images/topimage_r2_c3.gif diff --git a/TEMP/4315 copy/images/topimage_r2_c4.gif b/4315/images/topimage_r2_c4.gif similarity index 100% rename from TEMP/4315 copy/images/topimage_r2_c4.gif rename to 4315/images/topimage_r2_c4.gif diff --git a/TEMP/4315 copy/images/topimage_r2_c5.gif b/4315/images/topimage_r2_c5.gif similarity index 100% rename from TEMP/4315 copy/images/topimage_r2_c5.gif rename to 4315/images/topimage_r2_c5.gif diff --git a/TEMP/4315 copy/images/topimage_r2_c6.gif b/4315/images/topimage_r2_c6.gif similarity index 100% rename from TEMP/4315 copy/images/topimage_r2_c6.gif rename to 4315/images/topimage_r2_c6.gif diff --git a/TEMP/4315 copy/images/topimage_r2_c7.gif b/4315/images/topimage_r2_c7.gif similarity index 100% rename from TEMP/4315 copy/images/topimage_r2_c7.gif rename to 4315/images/topimage_r2_c7.gif diff --git a/TEMP/4315 copy/images/topimage_r2_c8.gif b/4315/images/topimage_r2_c8.gif similarity index 100% rename from TEMP/4315 copy/images/topimage_r2_c8.gif rename to 4315/images/topimage_r2_c8.gif diff --git a/TEMP/4315 copy/images/topimage_r2_c9.gif b/4315/images/topimage_r2_c9.gif similarity index 100% rename from TEMP/4315 copy/images/topimage_r2_c9.gif rename to 4315/images/topimage_r2_c9.gif diff --git a/TEMP/4315 copy/images/topimage_r3_c10.gif b/4315/images/topimage_r3_c10.gif similarity index 100% rename from TEMP/4315 copy/images/topimage_r3_c10.gif rename to 4315/images/topimage_r3_c10.gif diff --git a/TEMP/4315 copy/images/topimage_r3_c4.gif b/4315/images/topimage_r3_c4.gif similarity index 100% rename from TEMP/4315 copy/images/topimage_r3_c4.gif rename to 4315/images/topimage_r3_c4.gif diff --git a/TEMP/4315 copy/images/topimage_r3_c6.gif b/4315/images/topimage_r3_c6.gif similarity index 100% rename from TEMP/4315 copy/images/topimage_r3_c6.gif rename to 4315/images/topimage_r3_c6.gif diff --git a/TEMP/4315 copy/images/topimage_r3_c8.gif b/4315/images/topimage_r3_c8.gif similarity index 100% rename from TEMP/4315 copy/images/topimage_r3_c8.gif rename to 4315/images/topimage_r3_c8.gif diff --git a/TEMP/4315 copy/images/topimage_r4_c2.gif b/4315/images/topimage_r4_c2.gif similarity index 100% rename from TEMP/4315 copy/images/topimage_r4_c2.gif rename to 4315/images/topimage_r4_c2.gif diff --git a/TEMP/4315 copy/index.html b/4315/index.html similarity index 100% rename from TEMP/4315 copy/index.html rename to 4315/index.html diff --git a/TEMP/4315 copy/style.css b/4315/style.css similarity index 100% rename from TEMP/4315 copy/style.css rename to 4315/style.css diff --git a/TEMP/4315 copy/topimage_files/topimage.png b/4315/topimage_files/topimage.png similarity index 100% rename from TEMP/4315 copy/topimage_files/topimage.png rename to 4315/topimage_files/topimage.png diff --git a/TEMP/4315/--READ ME--.txt b/TEMP/4315/--READ ME--.txt deleted file mode 100644 index a2c173c..0000000 --- a/TEMP/4315/--READ ME--.txt +++ /dev/null @@ -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----- \ No newline at end of file diff --git a/TEMP/4315/images/Thumbs.db b/TEMP/4315/images/Thumbs.db deleted file mode 100644 index a14f9ff..0000000 Binary files a/TEMP/4315/images/Thumbs.db and /dev/null differ diff --git a/TEMP/4315/images/about_icon.jpg b/TEMP/4315/images/about_icon.jpg deleted file mode 100644 index 226e257..0000000 Binary files a/TEMP/4315/images/about_icon.jpg and /dev/null differ diff --git a/TEMP/4315/images/arrow_icon.jpg b/TEMP/4315/images/arrow_icon.jpg deleted file mode 100644 index 4b95cf2..0000000 Binary files a/TEMP/4315/images/arrow_icon.jpg and /dev/null differ diff --git a/TEMP/4315/images/arrow_icon2.jpg b/TEMP/4315/images/arrow_icon2.jpg deleted file mode 100644 index 125b8fb..0000000 Binary files a/TEMP/4315/images/arrow_icon2.jpg and /dev/null differ diff --git a/TEMP/4315/images/bg_1.jpg b/TEMP/4315/images/bg_1.jpg deleted file mode 100644 index 0e5e68c..0000000 Binary files a/TEMP/4315/images/bg_1.jpg and /dev/null differ diff --git a/TEMP/4315/images/email_icon.jpg b/TEMP/4315/images/email_icon.jpg deleted file mode 100644 index b301691..0000000 Binary files a/TEMP/4315/images/email_icon.jpg and /dev/null differ diff --git a/TEMP/4315/images/guestbook_icon.jpg b/TEMP/4315/images/guestbook_icon.jpg deleted file mode 100644 index 125acc7..0000000 Binary files a/TEMP/4315/images/guestbook_icon.jpg and /dev/null differ diff --git a/TEMP/4315/images/home.jpg b/TEMP/4315/images/home.jpg deleted file mode 100644 index 231d2ca..0000000 Binary files a/TEMP/4315/images/home.jpg and /dev/null differ diff --git a/TEMP/4315/images/home_icon.jpg b/TEMP/4315/images/home_icon.jpg deleted file mode 100644 index 37185ee..0000000 Binary files a/TEMP/4315/images/home_icon.jpg and /dev/null differ diff --git a/TEMP/4315/images/right_side.jpg b/TEMP/4315/images/right_side.jpg deleted file mode 100644 index 85a3c2d..0000000 Binary files a/TEMP/4315/images/right_side.jpg and /dev/null differ diff --git a/TEMP/4315/images/sidediv.jpg b/TEMP/4315/images/sidediv.jpg deleted file mode 100644 index 166d3ca..0000000 Binary files a/TEMP/4315/images/sidediv.jpg and /dev/null differ diff --git a/TEMP/4315/images/smallarrow_icon.jpg b/TEMP/4315/images/smallarrow_icon.jpg deleted file mode 100644 index 0b98288..0000000 Binary files a/TEMP/4315/images/smallarrow_icon.jpg and /dev/null differ diff --git a/TEMP/4315/images/spacer.gif b/TEMP/4315/images/spacer.gif deleted file mode 100644 index fc25609..0000000 Binary files a/TEMP/4315/images/spacer.gif and /dev/null differ diff --git a/TEMP/4315/images/topimage_r1_c1.gif b/TEMP/4315/images/topimage_r1_c1.gif deleted file mode 100644 index 58d9b3c..0000000 Binary files a/TEMP/4315/images/topimage_r1_c1.gif and /dev/null differ diff --git a/TEMP/4315/images/topimage_r2_c1.gif b/TEMP/4315/images/topimage_r2_c1.gif deleted file mode 100644 index af922e0..0000000 Binary files a/TEMP/4315/images/topimage_r2_c1.gif and /dev/null differ diff --git a/TEMP/4315/images/topimage_r2_c10.gif b/TEMP/4315/images/topimage_r2_c10.gif deleted file mode 100644 index beebf8e..0000000 Binary files a/TEMP/4315/images/topimage_r2_c10.gif and /dev/null differ diff --git a/TEMP/4315/images/topimage_r2_c11.gif b/TEMP/4315/images/topimage_r2_c11.gif deleted file mode 100644 index f0e1afa..0000000 Binary files a/TEMP/4315/images/topimage_r2_c11.gif and /dev/null differ diff --git a/TEMP/4315/images/topimage_r2_c2.gif b/TEMP/4315/images/topimage_r2_c2.gif deleted file mode 100644 index 5619d91..0000000 Binary files a/TEMP/4315/images/topimage_r2_c2.gif and /dev/null differ diff --git a/TEMP/4315/images/topimage_r2_c2_f2.gif b/TEMP/4315/images/topimage_r2_c2_f2.gif deleted file mode 100644 index 5619d91..0000000 Binary files a/TEMP/4315/images/topimage_r2_c2_f2.gif and /dev/null differ diff --git a/TEMP/4315/images/topimage_r2_c3.gif b/TEMP/4315/images/topimage_r2_c3.gif deleted file mode 100644 index 731c0f1..0000000 Binary files a/TEMP/4315/images/topimage_r2_c3.gif and /dev/null differ diff --git a/TEMP/4315/images/topimage_r2_c4.gif b/TEMP/4315/images/topimage_r2_c4.gif deleted file mode 100644 index a9a1e84..0000000 Binary files a/TEMP/4315/images/topimage_r2_c4.gif and /dev/null differ diff --git a/TEMP/4315/images/topimage_r2_c5.gif b/TEMP/4315/images/topimage_r2_c5.gif deleted file mode 100644 index a6ba138..0000000 Binary files a/TEMP/4315/images/topimage_r2_c5.gif and /dev/null differ diff --git a/TEMP/4315/images/topimage_r2_c6.gif b/TEMP/4315/images/topimage_r2_c6.gif deleted file mode 100644 index ed44a70..0000000 Binary files a/TEMP/4315/images/topimage_r2_c6.gif and /dev/null differ diff --git a/TEMP/4315/images/topimage_r2_c7.gif b/TEMP/4315/images/topimage_r2_c7.gif deleted file mode 100644 index 374721f..0000000 Binary files a/TEMP/4315/images/topimage_r2_c7.gif and /dev/null differ diff --git a/TEMP/4315/images/topimage_r2_c8.gif b/TEMP/4315/images/topimage_r2_c8.gif deleted file mode 100644 index bc0d160..0000000 Binary files a/TEMP/4315/images/topimage_r2_c8.gif and /dev/null differ diff --git a/TEMP/4315/images/topimage_r2_c9.gif b/TEMP/4315/images/topimage_r2_c9.gif deleted file mode 100644 index 4b3bef2..0000000 Binary files a/TEMP/4315/images/topimage_r2_c9.gif and /dev/null differ diff --git a/TEMP/4315/images/topimage_r3_c10.gif b/TEMP/4315/images/topimage_r3_c10.gif deleted file mode 100644 index 751271e..0000000 Binary files a/TEMP/4315/images/topimage_r3_c10.gif and /dev/null differ diff --git a/TEMP/4315/images/topimage_r3_c4.gif b/TEMP/4315/images/topimage_r3_c4.gif deleted file mode 100644 index 300e6bd..0000000 Binary files a/TEMP/4315/images/topimage_r3_c4.gif and /dev/null differ diff --git a/TEMP/4315/images/topimage_r3_c6.gif b/TEMP/4315/images/topimage_r3_c6.gif deleted file mode 100644 index 7032434..0000000 Binary files a/TEMP/4315/images/topimage_r3_c6.gif and /dev/null differ diff --git a/TEMP/4315/images/topimage_r3_c8.gif b/TEMP/4315/images/topimage_r3_c8.gif deleted file mode 100644 index a397305..0000000 Binary files a/TEMP/4315/images/topimage_r3_c8.gif and /dev/null differ diff --git a/TEMP/4315/images/topimage_r4_c2.gif b/TEMP/4315/images/topimage_r4_c2.gif deleted file mode 100644 index 227e9d3..0000000 Binary files a/TEMP/4315/images/topimage_r4_c2.gif and /dev/null differ diff --git a/TEMP/4315/topimage_files/topimage.png b/TEMP/4315/topimage_files/topimage.png deleted file mode 100644 index 3f36990..0000000 Binary files a/TEMP/4315/topimage_files/topimage.png and /dev/null differ diff --git a/TEMP/pcgamester2/images/Thumbs.db b/TEMP/pcgamester2/images/Thumbs.db deleted file mode 100644 index ac0946c..0000000 Binary files a/TEMP/pcgamester2/images/Thumbs.db and /dev/null differ diff --git a/TEMP/pcgamester2/images/img_1.jpg b/TEMP/pcgamester2/images/img_1.jpg deleted file mode 100644 index 973eb70..0000000 Binary files a/TEMP/pcgamester2/images/img_1.jpg and /dev/null differ diff --git a/TEMP/pcgamester2/images/img_10.jpg b/TEMP/pcgamester2/images/img_10.jpg deleted file mode 100644 index a6bd903..0000000 Binary files a/TEMP/pcgamester2/images/img_10.jpg and /dev/null differ diff --git a/TEMP/pcgamester2/images/img_2.jpg b/TEMP/pcgamester2/images/img_2.jpg deleted file mode 100644 index 3bea05c..0000000 Binary files a/TEMP/pcgamester2/images/img_2.jpg and /dev/null differ diff --git a/TEMP/pcgamester2/images/img_3.jpg b/TEMP/pcgamester2/images/img_3.jpg deleted file mode 100644 index 7db90d9..0000000 Binary files a/TEMP/pcgamester2/images/img_3.jpg and /dev/null differ diff --git a/TEMP/pcgamester2/images/img_4.png b/TEMP/pcgamester2/images/img_4.png deleted file mode 100644 index 5f0464c..0000000 Binary files a/TEMP/pcgamester2/images/img_4.png and /dev/null differ diff --git a/TEMP/pcgamester2/images/img_5.jpg b/TEMP/pcgamester2/images/img_5.jpg deleted file mode 100644 index 458bd95..0000000 Binary files a/TEMP/pcgamester2/images/img_5.jpg and /dev/null differ diff --git a/TEMP/pcgamester2/images/img_6.jpg b/TEMP/pcgamester2/images/img_6.jpg deleted file mode 100644 index bf583ef..0000000 Binary files a/TEMP/pcgamester2/images/img_6.jpg and /dev/null differ diff --git a/TEMP/pcgamester2/images/img_7.jpg b/TEMP/pcgamester2/images/img_7.jpg deleted file mode 100644 index afebd4c..0000000 Binary files a/TEMP/pcgamester2/images/img_7.jpg and /dev/null differ diff --git a/TEMP/pcgamester2/images/img_8.jpg b/TEMP/pcgamester2/images/img_8.jpg deleted file mode 100644 index 68d989c..0000000 Binary files a/TEMP/pcgamester2/images/img_8.jpg and /dev/null differ diff --git a/TEMP/pcgamester2/images/img_9.jpg b/TEMP/pcgamester2/images/img_9.jpg deleted file mode 100644 index 71587a4..0000000 Binary files a/TEMP/pcgamester2/images/img_9.jpg and /dev/null differ diff --git a/TEMP/pcgamester2/images/img_main.jpg b/TEMP/pcgamester2/images/img_main.jpg deleted file mode 100644 index e34f8a5..0000000 Binary files a/TEMP/pcgamester2/images/img_main.jpg and /dev/null differ diff --git a/TEMP/pcgamester2/index.html b/TEMP/pcgamester2/index.html deleted file mode 100644 index 77affd6..0000000 --- a/TEMP/pcgamester2/index.html +++ /dev/null @@ -1,308 +0,0 @@ - - - - ---PcGamester 2 - The best place for cheats, downloads and more!-- - - - - - - - -
- - - - -
- - - - -
-
- - - - - -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Menu - -
-
Home -
-
About -
-
New Games -
-
Cheats -
-
Reviews -
-
Related -
-
Other -
-
Contact -
-
- Games - -
-
Top Rated Games -
-
Top 50 Games -
-
Most Popular Games -
-
Game Review -
-
Action Games -
-
Stratergy Games -
-
Simulation Games -
-
Racing Games -
-
Shooting Games -
-
Adventure Games -
-
Fighting Games -
-
Board Games -
-
- Our Affiliates - -
-
Template Design -
-
TheGameSphere -
-
- Latest News - -
-
Our website has just launched on the web! We will be updating it daily as soon as we finish with our new design. -
- -
- - - - - -
- - - - -
- - - -
- -
- -
- - - -
- - - - - - - - -
Featured Game - Pacific Fighters
- -
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. Read More. -
-
News And Announcments
-
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
-
- -
- - - - -
Top 10 Games:
- -
- 1. World of Warcraft -
- 2. The chronicles of Riddick -
- 3. Guild Wars -
- 4. Sid Meier's Pirates -
- 5. Half-Life 2 -
- 6. Grand Theft Auto - San Andreas -
- 7. Falcon 4.0: Allied Force -
- 8. Silent Hunter III -
- 9. GTR FIA Racing -
- 10. Star Wars Republic Commando -
-
Featured Playable Demo -
-
-
-Piolet Down - Behind Enemy -
- -
-In this action adventure game pilot down features 3 playable levels and many other extras to play. Click the games section to download it -
- -
-
-
- - - - - -
- Copyright 2005 Your Company Name. All rights reserved. Contact Created by Michael Davis - http://www.stealthtemplates.com -
-
- - - - - -
Created by Stealthtemplates.com -
- - - - - diff --git a/TEMP/pcgamester2/style.css b/TEMP/pcgamester2/style.css deleted file mode 100644 index 068026e..0000000 --- a/TEMP/pcgamester2/style.css +++ /dev/null @@ -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; -} \ No newline at end of file diff --git a/actions.php b/actions.php index 47159ec..1c4b9c0 100644 --- a/actions.php +++ b/actions.php @@ -14,19 +14,15 @@ $credsYo=explode("@seperator@", $credsYo); $u=strtolower($credsYo[0]); $p=strtolower($credsYo[1]); -if($u=="") -{ -header("Location: index.php?login"); +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) - { -header("Location: index.php"); -exit; +while($row = mysql_fetch_array($result)) { + if($row['password']!=$p) { + header("Location: index.php"); + exit; } } @@ -35,38 +31,37 @@ $result = mysql_query($sql); $sql="SELECT * FROM mrpg_users WHERE name='$u'"; $result = mysql_query($sql); -while($row = mysql_fetch_array($result)) -{ -$char['id']=$row['id']; -$char['x']=$row['x']; -$char['y']=$row['y']; -$char['mode']=$row['mode']; +while($row = mysql_fetch_array($result)) { + $char['id']=$row['id']; + $char['x']=$row['x']; + $char['y']=$row['y']; + $char['mode']=$row['mode']; } if($char['mode']=="battle") { -if($_SERVER['QUERY_STRING']=="stats") { - header("Location: stat.php?x=" . $u . "&y=" . md5($p)); - exit; -} + if($_SERVER['QUERY_STRING']=="stats") { + header("Location: stat.php?x=" . $u . "&y=" . md5($p)); + exit; + } -header("Location: battle.php"); -exit; + header("Location: battle.php"); + exit; } else if($char['mode']=="lvlup") { -header("Location: lvlup.php"); -exit; + header("Location: lvlup.php"); + exit; } else if($char['mode']=="confirm") { -header("Location: confirm.php"); -exit; + header("Location: confirm.php"); + exit; } else if($char['mode']=="message") { -header("Location: message.php"); -exit; + header("Location: message.php"); + exit; } @@ -74,7 +69,7 @@ exit; if($_SERVER['QUERY_STRING']!="") { $update=true; switch($_SERVER['QUERY_STRING']) { - + case "up": $char['x']=$char['x']; $char['y']=$char['y']-1; @@ -102,7 +97,7 @@ if($_SERVER['QUERY_STRING']!="") { $sql="UPDATE mrpg_users SET dir='2' WHERE name='$u'"; $result = mysql_query($sql); break; - case "stats": + case "stats": header("Location: stat.php?x=" . $u . "&y=" . md5($p)); exit; break; @@ -118,135 +113,125 @@ if($_GET['que']!="") { fallback(); } -foreach($que as $value) { - -walkByNumArray($value); - -if(!(walkable($char['x'], $char['y']))) { -fallback(); -} - -} - - + 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'] . ";"); + //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 */ if($char['x']==6 && $char['y']==56) { -$char['x']=6; -$char['y']=57; + $char['x']=6; + $char['y']=57; -mysql_query("UPDATE mrpg_users SET mode='confirm' WHERE id=" . $char['id'] . ";"); + mysql_query("UPDATE mrpg_users SET mode='confirm' WHERE id=" . $char['id'] . ";"); -mysql_query("UPDATE mrpg_confirm SET q='The area you are about to enter is very dangerous for low-levels, and also leads to the first City. Level 10+ Reccommended. Once you exit it, you will never be able to return here. Do you want to continue?', yesx=56, yesy=11, nox=6, noy=57 WHERE id=" . $char['id'] . ";"); + mysql_query("UPDATE mrpg_confirm SET q='The area you are about to enter is very dangerous for low-levels, and also leads to the first City. Level 10+ Reccommended. Once you exit it, you will never be able to return here. Do you want to continue?', yesx=56, yesy=11, nox=6, noy=57 WHERE id=" . $char['id'] . ";"); -header("Location: confirm.php"); -exit; + header("Location: confirm.php"); + exit; } else if($char['x']==97 && $char['y']==13) { -mysql_query("UPDATE mrpg_users SET mode='message' WHERE id=" . $char['id'] . ";"); + mysql_query("UPDATE mrpg_users SET mode='message' WHERE id=" . $char['id'] . ";"); -mysql_query("UPDATE mrpg_message SET q='

Chapter I:

Coming soon! :)

', x=96, y=13 WHERE id=" . $char['id'] . ";"); + mysql_query("UPDATE mrpg_message SET q='

Chapter I:

Coming soon! :)

', x=96, y=13 WHERE id=" . $char['id'] . ";"); -header("Location: message.php"); -exit; + header("Location: message.php"); + exit; } if($update==true && walkable($char['x'], $char['y'])) { -$tx=$char['x']; -$ty=$char['y']; -$sql="UPDATE mrpg_users SET x='$tx', y='$ty' WHERE name='$u'"; -$result = mysql_query($sql); + $tx=$char['x']; + $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))]; + + if($battle!=0) { + + $sql="UPDATE mrpg_users SET mode='battle' WHERE name='$u'"; + $result = mysql_query($sql); + + $result = mysql_query("SELECT * FROM mrpg_monsters WHERE id='$battle'"); + while($row = mysql_fetch_array($result)) + { + $battlehp=$row['hp']; + } -///////////BATTLE CHECK//////////// + $sql="UPDATE `mrpg_battles` SET `use` = '1', `enemy` = '$battle', `enemyhp` = '$battlehp' WHERE `id` =" . $char['id'] . ";"; + $result = mysql_query($sql); + //echo "BATTLE!
$sql"; -$bzone=checkbzone($tx, $ty, 0); + header("Location: battle.php?appear=yes"); + exit; -$battle=$bzone[rand(0,(count($bzone)-1))]; + } + //////////END BATTLE CHECK////////// -if($battle!=0) { - -$sql="UPDATE mrpg_users SET mode='battle' WHERE name='$u'"; -$result = mysql_query($sql); - -$result = mysql_query("SELECT * FROM mrpg_monsters WHERE id='$battle'"); -while($row = mysql_fetch_array($result)) -{ -$battlehp=$row['hp']; -} - - - -$sql="UPDATE `mrpg_battles` SET `use` = '1', `enemy` = '$battle', `enemyhp` = '$battlehp' WHERE `id` =" . $char['id'] . ";"; -$result = mysql_query($sql); - -//echo "BATTLE!
$sql"; - -header("Location: battle.php?appear=yes"); -exit; - -} -//////////END BATTLE CHECK////////// - - - - -fallback(); + fallback(); } function walkByNumArray($num) { - -global $char; - -if($num==1) { -$char['x']=$char['x']; -$char['y'] =$char['y']-1; -} else if($num==2) { -$char['x']=$char['x']-1; -$char['y'] =$char['y']; -} else if($num==3) { -$char['x']=$char['x']+1; -$char['y'] =$char['y']; -} else if($num==4) { -$char['x']=$char['x']; -$char['y'] =$char['y']+1; -} - + global $char; + if($num==1) { + $char['x']=$char['x']; + $char['y'] =$char['y']-1; + } else if($num==2) { + $char['x']=$char['x']-1; + $char['y'] =$char['y']; + } else if($num==3) { + $char['x']=$char['x']+1; + $char['y'] =$char['y']; + } else if($num==4) { + $char['x']=$char['x']; + $char['y'] =$char['y']+1; + } } function fallback() { -global $u, $p; -header('Location: showim.php?x=' . $u . '&y=' . md5($p)); -exit; + global $u, $p; + header('Location: showim.php?x=' . $u . '&y=' . md5($p)); + exit; } fallback(); - -?> \ No newline at end of file +?> diff --git a/battle.php b/battle.php index 98b23f6..c40d6b0 100644 --- a/battle.php +++ b/battle.php @@ -13,25 +13,20 @@ $havegone=false; $dead=false; - $messages=array(); $u=strtolower($credsYo[0]); $p=strtolower($credsYo[1]); -if($u=="") -{ -header("Location: index.php?login"); +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) - { -header("Location: index.php"); -exit; +while($row = mysql_fetch_array($result)) { + if($row['password']!=$p) { + header("Location: index.php"); + exit; } } @@ -40,86 +35,70 @@ $result = mysql_query($sql); $sql="SELECT * FROM mrpg_users WHERE name='$u'"; $result = mysql_query($sql); -while($row = mysql_fetch_array($result)) -{ -$char['id']=$row['id']; -$char['exp']=$row['level']; +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']; + 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); if($_GET['appear']==yes) { -$messages[]=ucfirst($monsterstats['name']) . " appears!"; - + $messages[]=ucfirst($monsterstats['name']) . " appears!"; } if($_GET['act']==run) { + $run=rand(1,4); + if($run==4) { -$run=rand(1,4); - -if($run==4) { - - -$messages[]="You attempt to escape!"; -$messages[]="Success!"; -$havegone=false; -$sql="UPDATE mrpg_battles SET `use`=0, `enemy`=0, `enemyhp`=0 WHERE `id`=" . $char['id'] . ";"; -mysql_query($sql); -mysql_query("UPDATE mrpg_users SET mode='norm' WHERE id=" . $char['id'] . ";"); -} else { -$havegone=true; -$messages[]="You attempt to escape!"; -$messages[]="Failure..."; - -} - + $messages[]="You attempt to escape!"; + $messages[]="Success!"; + $havegone=false; + $sql="UPDATE mrpg_battles SET `use`=0, `enemy`=0, `enemyhp`=0 WHERE `id`=" . $char['id'] . ";"; + mysql_query($sql); + mysql_query("UPDATE mrpg_users SET mode='norm' WHERE id=" . $char['id'] . ";"); + } else { + $havegone=true; + $messages[]="You attempt to escape!"; + $messages[]="Failure..."; + } } else if($_GET['act']==attack) { -$messages[]="You attack the " . ucfirst($monsterstats['name']) . "!"; -$havegone=true; + $messages[]="You attack the " . ucfirst($monsterstats['name']) . "!"; + $havegone=true; + //(Strength + Force / 2) + (offense + fight / 2) + $hit1=($pstats['strength'] + $pstats['force']) / 2; + $hit2=($pstats['offsnse'] + $pstats['fight']) / 2; -//(Strength + Force / 2) + (offense + fight / 2) - -$hit1=($pstats['strength'] + $pstats['force']) / 2; -$hit2=($pstats['offsnse'] + $pstats['fight']) / 2; - -$hit=(2/3)*(($hit1+$hit2)/2); - -$hit=rand(0,round($hit+4.9999)); -$messages[]="And you deal $hit damage!"; -$enemyhp=$enemyhp-$hit; + $hit=(2/3)*(($hit1+$hit2)/2); + $hit=rand(0,round($hit+4.9999)); + $messages[]="And you deal $hit damage!"; + $enemyhp=$enemyhp-$hit; } @@ -134,48 +113,37 @@ mysql_query("UPDATE mrpg_battles SET enemyhp=$enemyhp WHERE id=" . $char['id'] . if($enemyhp<=0) { -$messages[]=$monsterstats['diemsg']; + $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."; -$sql="UPDATE mrpg_battles SET `use`=0, `enemy`=0, `enemyhp`=0 WHERE `id`=" . $char['id'] . ";"; -mysql_query($sql); + 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 { + mysql_query("UPDATE mrpg_users SET mode='norm', level=level+$expgiven WHERE id=" . $char['id'] . ";"); + } - -$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 -{ - -mysql_query("UPDATE mrpg_users SET mode='norm', level=level+$expgiven WHERE id=" . $char['id'] . ";"); -} - - - - -$havegone=false; + $havegone=false; } - - if($havegone==true) { //The player has acted! Now its the games turn! -$monsterhit=rand(0, $monsterstats['power']); + $monsterhit=rand(0, $monsterstats['power']); -$pstats['hp']=$pstats['hp']-$monsterhit; + $pstats['hp']=$pstats['hp']-$monsterhit; -mysql_query("UPDATE mrpg_stat SET hp=" . $pstats['hp'] . " WHERE id=" . $char['id'] . ";"); + mysql_query("UPDATE mrpg_stat SET hp=" . $pstats['hp'] . " WHERE id=" . $char['id'] . ";"); -$messages[]="The " . ucfirst($monsterstats['name']) . " attacks! And deals $monsterhit Damage!"; + $messages[]="The " . ucfirst($monsterstats['name']) . " attacks! And deals $monsterhit Damage!"; } @@ -183,15 +151,15 @@ $messages[]="The " . ucfirst($monsterstats['name']) . " attacks! And deals $mons if($pstats['hp']<=0) { -$messages[]="You died!"; + $messages[]="You died!"; -$dead=true; + $dead=true; -mysql_query("UPDATE mrpg_stat SET hp=maxhp, poison=0, other=0 WHERE id=" . $char['id'] . ";"); + mysql_query("UPDATE mrpg_stat SET hp=maxhp, poison=0, other=0 WHERE id=" . $char['id'] . ";"); -mysql_query("UPDATE mrpg_battles SET `use`=0, enemy=0, enemyhp=0 WHERE id=" . $char['id'] . ";"); + mysql_query("UPDATE mrpg_battles SET `use`=0, enemy=0, enemyhp=0 WHERE id=" . $char['id'] . ";"); -mysql_query("UPDATE mrpg_users SET mode='norm', x=5, y=3 WHERE id=" . $char['id'] . ";"); + mysql_query("UPDATE mrpg_users SET mode='norm', x=5, y=3 WHERE id=" . $char['id'] . ";"); } @@ -200,4 +168,4 @@ mysql_query("UPDATE mrpg_users SET mode='norm', x=5, y=3 WHERE id=" . $char['id' bimage($char['id'], $messages[0], $messages[1], $messages[2], $messages[3], $dead); -?> \ No newline at end of file +?> diff --git a/battlezones.php b/battlezones.php index 2e0237e..6494ee5 100644 --- a/battlezones.php +++ b/battlezones.php @@ -1,25 +1,13 @@ =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) { -return array(2,0,0,0,0,3); -} else { -return array(0); + 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) { + return array(2,0,0,0,0,3); + } else { + return array(0); + } } - - -} - - - - - - - - - -?> \ No newline at end of file +?> diff --git a/config.php b/config.php index 72e22ed..2bf805b 100644 --- a/config.php +++ b/config.php @@ -5,21 +5,17 @@ exit;*/ -$con = mysql_connect("localhost","mop_admin","droids"); -if (!$con) - { - die('Could not connect: ' . mysql_error()); - } +$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']!="") -{ -$ip=$_SERVER['HTTP_X_FORWARDED_FOR']; -} -else -{ -$ip=$_SERVER['REMOTE_ADDR']; +if($_SERVER['HTTP_X_FORWARDED_FOR']!="") { + $ip=$_SERVER['HTTP_X_FORWARDED_FOR']; +} else { + $ip=$_SERVER['REMOTE_ADDR']; } -?> \ No newline at end of file +?> diff --git a/confirm.php b/confirm.php index f78a653..ea95b4d 100644 --- a/confirm.php +++ b/confirm.php @@ -10,84 +10,62 @@ $credsYo=explode("@seperator@", $credsYo); $u=strtolower($credsYo[0]); $p=strtolower($credsYo[1]); -if($u=="") -{ -header("Location: index.php?login"); +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) - { -header("Location: index.php"); -exit; +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)) -{ -$char['id']=$row['id']; -$char['mode']=$row['mode']; +while($row = mysql_fetch_array($result)) { + $char['id']=$row['id']; + $char['mode']=$row['mode']; } if($char['mode']!="confirm") { -header("Location: action.php"); -exit; + header("Location: action.php"); + exit; } $sql="SELECT * FROM mrpg_confirm WHERE id=" . $char['id'] . ";"; $result = mysql_query($sql); -while($row = mysql_fetch_array($result)) -{ -$confirm['q']=$row['q']; -$confirm['yesx']=$row['yesx']; -$confirm['yesy']=$row['yesy']; -$confirm['nox']=$row['nox']; -$confirm['noy']=$row['noy']; +while($row = mysql_fetch_array($result)) { + $confirm['q']=$row['q']; + $confirm['yesx']=$row['yesx']; + $confirm['yesy']=$row['yesy']; + $confirm['nox']=$row['nox']; + $confirm['noy']=$row['noy']; } if($_SERVER['QUERY_STRING']=="") { - -echo "

" . $confirm['q'] . "



- -
Yes  |  No
"; - + echo "

" . $confirm['q'] . "



+
Yes  |  No
"; } 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; - -} + 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; - -} + mysql_query("UPDATE mrpg_users SET mode='norm', x=" . $confirm['nox'] . ", y=" . $confirm['noy'] . " WHERE id=" . $char['id'] . ";"); + header("Location: actions.php"); + exit; +} - - - - -?> \ No newline at end of file +?> diff --git a/coordim.php b/coordim.php index 424950b..944fd5c 100644 --- a/coordim.php +++ b/coordim.php @@ -14,25 +14,21 @@ include("battlezones.php"); $u=$char['x']; $p=$char['y']; -if($u=="") -{ -header("Location: index.php"); +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']; -$x=$row['x']+0; -$y=$row['y']+0; -$dir=$row['dir']; + $bzone=checkbzone($x, $y, 0); -$bzone=checkbzone($x, $y, 0); - - if(md5($row['password'])!=$p) - { -header("Location: index.php"); -exit; + if(md5($row['password'])!=$p) { + header("Location: index.php"); + exit; } } @@ -71,52 +67,47 @@ $srcx=$char['x']*16-230; $srcy=$char['y']*16-160; $srcx2=$char['x']*16+5; $srcy2=$char['y']*16+5; -$black = imageColorAllocate ($im, 0x00, 0x00, 0x00); +$black = imageColorAllocate ($im, 0x00, 0x00, 0x00); $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']; -$thetime=$row['lastact']; -$dsrcx=$dx*16-230; -$dsrcy=$dy*16-160; + $dx=$row['x']; + $dy=$row['y']; + $thetime=$row['lastact']; + $dsrcx=$dx*16-230; + $dsrcy=$dy*16-160; + if((date("U")-$thetime)<=60) { -if((date("U")-$thetime)<=60) { + if($row['dir']==1) { + imageCopyMerge($im, $images['chUp'], $dsrcx +230, $dsrcy +144, 0, 0, 12, 32,100); + } else if($row['dir']==2) { + imageCopyMerge($im, $images['chLeft'], $dsrcx +230, $dsrcy +144, 0, 0, 12, 32,100); + } else if($row['dir']==3) { + imageCopyMerge($im, $images['chRight'], $dsrcx +230, $dsrcy +144, 0, 0, 12, 32,100); + } else if($row['dir']==4) { + imageCopyMerge($im, $images['chDown'], $dsrcx +230, $dsrcy +144, 0, 0, 12, 32,100); + } -if($row['dir']==1) { -imageCopyMerge($im, $images['chUp'], $dsrcx +230, $dsrcy +144, 0, 0, 12, 32,100); -} else if($row['dir']==2) { -imageCopyMerge($im, $images['chLeft'], $dsrcx +230, $dsrcy +144, 0, 0, 12, 32,100); -} else if($row['dir']==3) { -imageCopyMerge($im, $images['chRight'], $dsrcx +230, $dsrcy +144, 0, 0, 12, 32,100); -} else if($row['dir']==4) { -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); -} + //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); + } } if($dir==1) { -imageCopyMerge($im, $images['chUp'], $srcx+230, $srcy+144, 0, 0, 12, 32,100); + imageCopyMerge($im, $images['chUp'], $srcx+230, $srcy+144, 0, 0, 12, 32,100); } else if($dir==2) { -imageCopyMerge($im, $images['chLeft'], $srcx+230, $srcy+144, 0, 0, 12, 32,100); + imageCopyMerge($im, $images['chLeft'], $srcx+230, $srcy+144, 0, 0, 12, 32,100); } else if($dir==3) { -imageCopyMerge($im, $images['chRight'], $srcx+230, $srcy+144, 0, 0, 12, 32,100); + imageCopyMerge($im, $images['chRight'], $srcx+230, $srcy+144, 0, 0, 12, 32,100); } else if($dir==4) { -imageCopyMerge($im, $images['chDown'], $srcx+230, $srcy+144, 0, 0, 12, 32,100); + imageCopyMerge($im, $images['chDown'], $srcx+230, $srcy+144, 0, 0, 12, 32,100); } //imageCopyMerge($im, $images['chDown'], $srcx+230, $srcy+144, 0, 0, 12, 32,100); @@ -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($im); +imageDestroy($im2); imageDestroy($images['chDown']); imageDestroy($images['chUp']); imageDestroy($images['chLeft']); imageDestroy($images['chRight']); - - ob_end_flush(); -?> \ No newline at end of file +?> diff --git a/experience.php b/experience.php index 1c33412..2d22ee1 100644 --- a/experience.php +++ b/experience.php @@ -6,28 +6,22 @@ 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; -if($mode==1) { -$a=pow($input, 2) * 31; -return $a; -} + $val=sqrt($val); -if($mode==2) { + $val=round($val-.499); + //$val=$val-.499; -$val=$input/31; - -$val=sqrt($val); - -$val=round($val-.499); - -//$val=$val-.499; - -return(abs($val)); - + return(abs($val)); + } } -} - -?> \ No newline at end of file +?> diff --git a/forum.zip b/forum.zip deleted file mode 100644 index 47f026d..0000000 Binary files a/forum.zip and /dev/null differ diff --git a/game.php b/game.php index 450f7f9..cb79668 100644 --- a/game.php +++ b/game.php @@ -14,32 +14,28 @@ $credsYo=explode("@seperator@", $credsYo); $u=strtolower($credsYo[0]); $p=strtolower($credsYo[1]); -if($u=="") -{ -header("Location: index.php?login"); +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"); -exit; + header("Location: index.php"); + exit; } } $sql="SELECT * FROM mrpg_users WHERE name='$u'"; $result = mysql_query($sql); -while($row = mysql_fetch_array($result)) -{ -$char['x']=$row['x']; -$char['y']=$row['y']; +while($row = mysql_fetch_array($result)) { + $char['x']=$row['x']; + $char['y']=$row['y']; } - ?> @@ -372,4 +345,3 @@ make_gui($frame, $guif); ?> -

Please note that the experience / level formula has been adjusted, and you may not be the same level as earlier.

\ No newline at end of file diff --git a/gameold.php b/gameold.php index 0edeec5..3319a1e 100644 --- a/gameold.php +++ b/gameold.php @@ -9,35 +9,35 @@ x=3 y=5 function newframe(x,y) { -document.all.TheFrame.src="showim.php?x=" + x + "&y=" + y + document.all.TheFrame.src="showim.php?x=" + x + "&y=" + y } function go(d) { // 1 for up, 2 for right, 3 for down, 4 for left -if(d==1) { -x=x -y=y-1 -} else if(d==2) { -x=x+1 -y=y -} else if(d==3) { -x=x -y=y+1 -} else if(d==4) { -x=x-1 -y=y -} -newframe(x,y) + if(d==1) { + x=x + y=y-1 + } else if(d==2) { + x=x+1 + y=y + } else if(d==3) { + x=x + y=y+1 + } else if(d==4) { + x=x-1 + y=y + } + newframe(x,y) } "; + $frame=""; -$links="Up
Left Right
+ $links="Up
Left Right
Down"; -make_gui($frame, $links); + make_gui($frame, $links); -?> \ No newline at end of file +?> diff --git a/grid.php b/grid.php index 0b1e4c8..e4ef87d 100644 --- a/grid.php +++ b/grid.php @@ -8,61 +8,53 @@ $black = imageColorAllocate ($im, 0, 0, 0); imageFill($im, 5, 5, $black); - - */ include("config.php"); function makestatimage($pid) { -global $con; + global $con; -$result = mysql_query("SELECT * FROM mrpg_stat WHERE id='$pid'"); -$row = mysql_fetch_array($result); + $result = mysql_query("SELECT * FROM mrpg_stat WHERE id='$pid'"); + $row = mysql_fetch_array($result); -$im=imageCreateTrueColor(470, 329); -$white=imageColorAllocate ($im, 255, 255, 255); -$red=imageColorAllocate ($im, 255, 0, 0); -$green=imageColorAllocate ($im, 0, 255, 0); -$black = imageColorAllocate ($im, 0, 0, 0); -imageFill($im, 5, 5, $black); + $im=imageCreateTrueColor(470, 329); + $white=imageColorAllocate ($im, 255, 255, 255); + $red=imageColorAllocate ($im, 255, 0, 0); + $green=imageColorAllocate ($im, 0, 255, 0); + $black = imageColorAllocate ($im, 0, 0, 0); + imageFill($im, 5, 5, $black); -imageString($im, 4, 50, 100, "PP: " . $row['pp'], $white); -imageString($im, 4, 50, 140, "Offense: " . $row['offense'], $white); -imageString($im, 4, 50, 180, "Defense: " . $row['defense'], $white); -imageString($im, 4, 50, 220, "Fight: " . $row['fight'], $white); + imageString($im, 4, 50, 100, "PP: " . $row['pp'], $white); + imageString($im, 4, 50, 140, "Offense: " . $row['offense'], $white); + imageString($im, 4, 50, 180, "Defense: " . $row['defense'], $white); + imageString($im, 4, 50, 220, "Fight: " . $row['fight'], $white); -imageString($im, 4, 340, 100, "Speed: " . $row['speed'], $white); -imageString($im, 4, 340, 140, "Wisdom: " . $row['wisdom'], $white); -imageString($im, 4, 340, 180, "Strength: " . $row['strength'], $white); -imageString($im, 4, 340, 220, "Force: " . $row['force'], $white); + imageString($im, 4, 340, 100, "Speed: " . $row['speed'], $white); + imageString($im, 4, 340, 140, "Wisdom: " . $row['wisdom'], $white); + imageString($im, 4, 340, 180, "Strength: " . $row['strength'], $white); + imageString($im, 4, 340, 220, "Force: " . $row['force'], $white); -$barw=round(($row['hp'] / $row['maxhp'])*370); + $barw=round(($row['hp'] / $row['maxhp'])*370); -imageFilledRectangle($im, 50, 30, 420, 70, $red); -imageFilledRectangle($im, 50, 30, 50+$barw, 70, $green); -imageRectangle($im, 50, 30, 420, 70, $white); + imageFilledRectangle($im, 50, 30, 420, 70, $red); + imageFilledRectangle($im, 50, 30, 50+$barw, 70, $green); + imageRectangle($im, 50, 30, 420, 70, $white); -imageString($im, 5, 210, 10, "HP: " . $row['hp'], $green); + imageString($im, 5, 210, 10, "HP: " . $row['hp'], $green); -header('Content-type: image/png'); -imagePNG($im); -imageDestroy($im); + header('Content-type: image/png'); + imagePNG($im); + imageDestroy($im); } - - - makestatimage(1); - - - /* $background = imageColorAllocate ($im, 255, 255, 255); $background = imageColorTransparent($im,$background); @@ -84,16 +76,4 @@ $x=$x+16; }*/ - - - - - - - - - - - - -?> \ No newline at end of file +?> diff --git a/gui.php b/gui.php index 7f6bd7e..f590346 100644 --- a/gui.php +++ b/gui.php @@ -1,9 +1,7 @@ + echo ' @@ -32,5 +30,4 @@ echo '
\ No newline at end of file +?> diff --git a/hs.php b/hs.php index da9f98d..bbe4db2 100644 --- a/hs.php +++ b/hs.php @@ -6,23 +6,18 @@ 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']); - + $hs[]=array("name"=>$row['name'], "exp"=>$row['level']); } //print_r($hs); - echo "
"; $i=1; foreach($hs as $value) { - -echo ""; - -$i++; + echo ""; + $i++; } echo "
Earthbound Highscores
#NameEXPLevel
$i: " . ucfirst($value['name']) . " " . $value['exp'] . " " . abs(level(2, $value['exp'])) . "
$i: " . ucfirst($value['name']) . " " . $value['exp'] . " " . abs(level(2, $value['exp'])) . "
"; -?> \ No newline at end of file +?> diff --git a/includes/battleimfuncts.php b/includes/battleimfuncts.php index 692a1a2..ac2ebb9 100644 --- a/includes/battleimfuncts.php +++ b/includes/battleimfuncts.php @@ -3,95 +3,92 @@ //include("../config.php"); function bimage($pid, $t1, $t2, $t3, $t4, $dead) { -global $con; + global $con; -/* + /* -Usage: bimage(PlayerID, "line1", "line2", "line3", "line4"); + Usage: bimage(PlayerID, "line1", "line2", "line3", "line4"); -*/ + */ -////////Create User HP bar -$result = mysql_query("SELECT * FROM mrpg_stat WHERE id='$pid'"); -$row = mysql_fetch_array($result); + ////////Create User HP bar + $result = mysql_query("SELECT * FROM mrpg_stat WHERE id='$pid'"); + $row = mysql_fetch_array($result); -$im=imageCreateTrueColor(470, 329); -$white=imageColorAllocate ($im, 255, 255, 255); -$red=imageColorAllocate ($im, 255, 0, 0); -$green=imageColorAllocate ($im, 0, 255, 0); -$black = imageColorAllocate ($im, 0, 0, 0); -imageFill($im, 5, 5, $black); + $im=imageCreateTrueColor(470, 329); + $white=imageColorAllocate ($im, 255, 255, 255); + $red=imageColorAllocate ($im, 255, 0, 0); + $green=imageColorAllocate ($im, 0, 255, 0); + $black = imageColorAllocate ($im, 0, 0, 0); + imageFill($im, 5, 5, $black); -if($dead==true) { -$row['hp']=0; -} + if($dead==true) { + $row['hp']=0; + } -$barw=round(($row['hp'] / $row['maxhp'])*370); + $barw=round(($row['hp'] / $row['maxhp'])*370); -imageFilledRectangle($im, 50, 280, 420, 300, $red); -imageFilledRectangle($im, 50, 280, 50+$barw, 300, $green); -imageRectangle($im, 50, 280, 420, 300, $white); -imageString($im, 5, 175, 282, "Your HP: " . $row['hp'] . "/" . $row['maxhp'], $black); + imageFilledRectangle($im, 50, 280, 420, 300, $red); + imageFilledRectangle($im, 50, 280, 50+$barw, 300, $green); + imageRectangle($im, 50, 280, 420, 300, $white); + imageString($im, 5, 175, 282, "Your HP: " . $row['hp'] . "/" . $row['maxhp'], $black); -////////Create enemy HP bar -$result = mysql_query("SELECT * FROM mrpg_battles WHERE id='$pid'"); -$row = mysql_fetch_array($result); -$enemyid=$row['enemy']; -$enemyhp=$row['enemyhp']; -$result = mysql_query("SELECT * FROM mrpg_monsters WHERE id='$enemyid'"); -$row = mysql_fetch_array($result); -if($row!="") { + ////////Create enemy HP bar + $result = mysql_query("SELECT * FROM mrpg_battles WHERE id='$pid'"); + $row = mysql_fetch_array($result); + $enemyid=$row['enemy']; + $enemyhp=$row['enemyhp']; + $result = mysql_query("SELECT * FROM mrpg_monsters WHERE id='$enemyid'"); + $row = mysql_fetch_array($result); + if($row!="") { -$enemyimage=$row['image']; -$enemymaxhp=$row['hp']; -$barw=round(($enemyhp / $enemymaxhp)*370); -imageFilledRectangle($im, 50, 20, 420, 40, $red); -imageFilledRectangle($im, 50, 20, 50+$barw, 40, $green); -imageRectangle($im, 50, 20, 420, 40, $white); -imageString($im, 5, 175, 22, "Enemy HP: " . $enemyhp . "/" . $enemymaxhp, $black); + $enemyimage=$row['image']; + $enemymaxhp=$row['hp']; + $barw=round(($enemyhp / $enemymaxhp)*370); + imageFilledRectangle($im, 50, 20, 420, 40, $red); + imageFilledRectangle($im, 50, 20, 50+$barw, 40, $green); + imageRectangle($im, 50, 20, 420, 40, $white); + imageString($im, 5, 175, 22, "Enemy HP: " . $enemyhp . "/" . $enemymaxhp, $black); -///////////Enemies image! + ///////////Enemies image! -$igstr="images/monsters/$enemyimage"; + $igstr="images/monsters/$enemyimage"; -$enemyimage=imageCreateFromPNG($igstr); + $enemyimage=imageCreateFromPNG($igstr); -$iminfo=getImageSize($igstr); + $iminfo=getImageSize($igstr); -$posX=235-(round($iminfo[0]/2)); + $posX=235-(round($iminfo[0]/2)); -$background = imageColorAllocate ($enemyimage, 0xFF, 0, 0xFF); -$background = imageColorTransparent($enemyimage, $background); + $background = imageColorAllocate ($enemyimage, 0xFF, 0, 0xFF); + $background = imageColorTransparent($enemyimage, $background); -imageCopyMerge($im, $enemyimage, $posX, 70, 0, 0, 100, 100,100); -} + imageCopyMerge($im, $enemyimage, $posX, 70, 0, 0, 100, 100,100); + } -$tpos1=235-(round(strlen($t1)/2)*9); -imageString($im,5, $tpos1, 180, $t1, $white); + $tpos1=235-(round(strlen($t1)/2)*9); + imageString($im,5, $tpos1, 180, $t1, $white); -$tpos2=235-(round(strlen($t2)/2)*9); -imageString($im,5, $tpos2, 200, $t2, $white); + $tpos2=235-(round(strlen($t2)/2)*9); + imageString($im,5, $tpos2, 200, $t2, $white); -$tpos3=235-(round(strlen($t3)/2)*9); -imageString($im,5, $tpos3, 220, $t3, $white); + $tpos3=235-(round(strlen($t3)/2)*9); + imageString($im,5, $tpos3, 220, $t3, $white); -$tpos4=235-(round(strlen($t4)/2)*9); -imageString($im,5, $tpos4, 240, $t4, $white); + $tpos4=235-(round(strlen($t4)/2)*9); + imageString($im,5, $tpos4, 240, $t4, $white); -header('Content-type: image/png'); -imagePNG($im); -imageDestroy($enemyimage); -imageDestroy($im); + header('Content-type: image/png'); + imagePNG($im); + imageDestroy($enemyimage); + imageDestroy($im); } - - - -?> \ No newline at end of file +?> diff --git a/includes/experience.php b/includes/experience.php index c3bca72..e09caf1 100644 --- a/includes/experience.php +++ b/includes/experience.php @@ -6,28 +6,23 @@ Finds experience from level, and vice-versa function level($mode,$input) { + if($mode==1) { + $a=pow($input, 2) * 14; + return $a; + } -if($mode==1) { -$a=pow($input, 2) * 14; -return $a; -} + if($mode==2) { -if($mode==2) { + $val=$input/14; + $val=sqrt($val); -$val=$input/14; + $val=round($val-.499); -$val=sqrt($val); - -$val=round($val-.499); - -//$val=$val-.499; - -return(abs($val)); + //$val=$val-.499; + return(abs($val)); + } } - -} - -?> \ No newline at end of file +?> diff --git a/includes/statsimage.php b/includes/statsimage.php index 0ce5b9c..d46003d 100644 --- a/includes/statsimage.php +++ b/includes/statsimage.php @@ -4,52 +4,52 @@ include("config.php"); include("includes/experience.php"); function makestatimage($pid) { + global $con; -global $con; + $result = mysql_query("SELECT * FROM mrpg_stat WHERE id='$pid'"); + $row = mysql_fetch_array($result); -$result = mysql_query("SELECT * FROM mrpg_stat WHERE id='$pid'"); -$row = mysql_fetch_array($result); - -$result = mysql_query("SELECT * FROM mrpg_users WHERE id='$pid'"); -$exp = mysql_fetch_array($result); + $result = mysql_query("SELECT * FROM mrpg_users WHERE id='$pid'"); + $exp = mysql_fetch_array($result); -$im=imageCreateTrueColor(450, 309); -$white=imageColorAllocate ($im, 255, 255, 255); -$red=imageColorAllocate ($im, 255, 0, 0); -$green=imageColorAllocate ($im, 0, 255, 0); -$black = imageColorAllocate ($im, 0, 0, 0); -imageFill($im, 5, 5, $black); + $im=imageCreateTrueColor(450, 309); + $white=imageColorAllocate ($im, 255, 255, 255); + $red=imageColorAllocate ($im, 255, 0, 0); + $green=imageColorAllocate ($im, 0, 255, 0); + $black = imageColorAllocate ($im, 0, 0, 0); + imageFill($im, 5, 5, $black); -imageString($im, 4, 50, 100, "PP: " . $row['pp'], $white); -imageString($im, 4, 50, 140, "Offense: " . $row['offense'], $white); -imageString($im, 4, 50, 180, "Defense: " . $row['defense'], $white); -imageString($im, 4, 50, 220, "Fight: " . $row['fight'], $white); + imageString($im, 4, 50, 100, "PP: " . $row['pp'], $white); + imageString($im, 4, 50, 140, "Offense: " . $row['offense'], $white); + imageString($im, 4, 50, 180, "Defense: " . $row['defense'], $white); + imageString($im, 4, 50, 220, "Fight: " . $row['fight'], $white); -imageString($im, 4, 340, 100, "Speed: " . $row['speed'], $white); -imageString($im, 4, 340, 140, "Wisdom: " . $row['wisdom'], $white); -imageString($im, 4, 340, 180, "Strength: " . $row['strength'], $white); -imageString($im, 4, 340, 220, "Force: " . $row['force'], $white); + imageString($im, 4, 340, 100, "Speed: " . $row['speed'], $white); + imageString($im, 4, 340, 140, "Wisdom: " . $row['wisdom'], $white); + imageString($im, 4, 340, 180, "Strength: " . $row['strength'], $white); + imageString($im, 4, 340, 220, "Force: " . $row['force'], $white); -imageString($im, 5, 200, 260, "Level: " . level(2, $exp['level']), $white); + imageString($im, 5, 200, 260, "Level: " . level(2, $exp['level']), $white); -imageString($im, 5, 200, 275, "EXP: " . $exp['level'], $white); + imageString($im, 5, 200, 275, "EXP: " . $exp['level'], $white); -$barw=round(($row['hp'] / $row['maxhp'])*370); + $barw=round(($row['hp'] / $row['maxhp'])*370); -imageFilledRectangle($im, 50, 30, 420, 70, $red); -imageFilledRectangle($im, 50, 30, 50+$barw, 70, $green); -imageRectangle($im, 50, 30, 420, 70, $white); + imageFilledRectangle($im, 50, 30, 420, 70, $red); + imageFilledRectangle($im, 50, 30, 50+$barw, 70, $green); + imageRectangle($im, 50, 30, 420, 70, $white); -imageString($im, 5, 190, 10, "HP: " . $row['hp'] . "/" . $row['maxhp'], $green); + imageString($im, 5, 190, 10, "HP: " . $row['hp'] . "/" . $row['maxhp'], $green); -header('Content-type: image/png'); -imagePNG($im); -imageDestroy($im); + header('Content-type: image/png'); + imagePNG($im); + echo "."; exit; + imageDestroy($im); } -?> \ No newline at end of file +?> diff --git a/index.php b/index.php index 9449d8f..08d1170 100644 --- a/index.php +++ b/index.php @@ -2,33 +2,24 @@ include("config.php"); -if($_POST['u']!="") -{ -$u=addslashes($_POST['u']); -$p=addslashes($_POST['p']); +if($_POST['u']!="") { + $u=addslashes($_POST['u']); + $p=addslashes($_POST['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) -{ - -setcookie("mrpg-ethbnd", strtolower($u . "@seperator@" . $p), time()+525600); -header("Location: game.php"); -exit; -} -else -{ -$message="Invalid username or password."; - -} -} - -} + 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) { + setcookie("mrpg-ethbnd", strtolower($u . "@seperator@" . $p), time()+525600); + header("Location: game.php"); + exit; + } else { + $message="Invalid username or password."; + } + } + } } ?> @@ -37,7 +28,7 @@ $message="Invalid username or password."; EarthBound - Online RPG Game by Mop - + @@ -48,22 +39,15 @@ $message="Invalid username or password.";

- - - - - - +
Home    Play Now!    Register

Top 20    - Forum - - + Forum
@@ -76,7 +60,7 @@ $message="Invalid username or password.";
- + @@ -96,9 +80,6 @@ $message="Invalid username or password.";
- - -
Dec 1st 2007
Open!
@@ -110,27 +91,20 @@ $message="Invalid username or password.";
- -
- "; - - - -$newb=$text[$num][1] - $text[$num+1][1]; - -//$graphdatshizdates[]=$text[$num][0]+21600; - -$graphdatshizdates[]=$text[$num][0]-518400; - - - -if($newb<0) { -$newb=abs($newb); - - -} -else -{ -$newb=$newb*-1; -} - -$graphdatshiz[]=$newb; - - -//echo "\n"; -} - - -$num++; -} - - - - - -$width=count($graphdatshiz)*5; - -//$im=imageCreateTrueColor (round($width/3), 300); - - -$im=imageCreateTrueColor ($width, 300); - -$white = imageColorAllocate ($im, 0xFF, 0xFF, 0xFF); -$light = ImageColorAllocate ($im, 0xCC, 0xCC, 0xCC); -$black = imageColorAllocate ($im, 0x00, 0x00, 0x00); -$red = imageColorAllocate ($im, 0xFF, 0x00, 0x00); - - -imageFill ($im, 1, 1, $white); - - -$printx=25; - -while($printx<=$width) { -imageLine ( $im, $printx, 0, $printx, 300, $light); -$printx=$printx+5; -} - - -imageLine ( $im, 0, 1, $width, 1, $light); -imageLine ( $im, 0, 50, $width, 50, $light); -imageLine ( $im, 0, 100, $width, 100, $light); -imageLine ( $im, 0, 150, $width, 150, $light); -imageLine ( $im, 0, 200, $width, 200, $light); -imageLine ( $im, 0, 250, $width, 250, $light); -imageLine ( $im, 0, 298, $width, 299, $light); -imageString($im,1, 1, 1, "3000", $black); -imageString($im,1, 1, 47, "2500", $black); -imageString($im,1, 1, 97, "2000", $black); -imageString($im,1, 1, 147, "1500", $black); -imageString($im,1, 1, 197, "1000", $black); -imageString($im,1, 1, 247, "500", $black); -imageString($im,1, 1, 290, "0", $black); - - -imageString($im,3, 50, 1, "Graph of # of Rants on the Runescape forum per 10 minutes.", $black); -imageString($im,3, 50, 10, "Large spikes are caused by removal of large threads by Jagex.", $black); - -imageRectangle ($im, 0, 0, $width-1, 299, $black); - - - -function drawpoint($x, $y) { - -global $black, $im, $red; - -imageSetPixel($im, $x, $y, $red); -imageSetPixel($im, $x-1, $y, $red); -imageSetPixel($im, $x+1, $y, $red); -imageSetPixel($im, $x, $y-1, $red); -imageSetPixel($im, $x, $y+1, $red); -} - - -//drawpoint(5,5); - - -$x=25; -$y=0; - -$previousX=25; -$previousY=300; - - -while($y<=count($graphdatshiz)) { - - -$pos=300-abs(round($graphdatshiz[$y]/10)); - - - -if(!(abs($previousY-$pos)>=1000)) -{ -imageLine ( $im, $previousX, $previousY, $x, $pos, $black); -$previousX=$x; -$previousY=$pos; -} - -$date=$graphdatshizdates[$y]; -$olddate=$graphdatshizdates[($y-1)]; - -$dateH=date("G", $date); -$datemin=date("i", $date); - -$thedate=date("j", $date); -$olddate=date("j", $olddate); - -/*if($dateH==0 && $datemin=="00") {*/ - -if($thedate!=$olddate) { - -//imageString($im,1, $x-80, 290, "---" . date("m-d-Y", $date-86400) . "--><---" . date("m-d-Y", $date) . "-- $date -", $black); - -imageString($im,1, $x, 290, "<---" . $thedate . "th", $black); - - -} - -//imageString($im,1, $x, 280, "<-----", $black); - -drawpoint($x,$pos); - -$x=$x+5; -$y=$y+1; -} - - - -header('Content-type: image/png'); -imagePNG ($im); -imageDestroy ($im); - -//print_r($graphdatshiz); - -//print_r($graphdatshizdates); -?> \ No newline at end of file diff --git a/rantread.php b/rantread.php deleted file mode 100644 index 65df535..0000000 --- a/rantread.php +++ /dev/null @@ -1,47 +0,0 @@ -
Rants
$value) { - - -$text[$key]=explode(":", $value); - -} - -$total=count($text)-1; - -$num=0; - - -echo "
$message
Username:
Password
"; - - -} else if($_SERVER['QUERY_STRING']=="highscores") { - -include("hs.php"); - -} else { -echo '
EarthBound Welcomes You
+
$message
Username:
Password
"; + } else if($_SERVER['QUERY_STRING']=="highscores") { + include("hs.php"); + } else { + echo '
EarthBound Welcomes You

@@ -170,7 +144,7 @@ The game is now open! Go play!
- E-mail: + E-mail:
--> @@ -229,4 +203,4 @@ Players Online: - \ No newline at end of file + diff --git a/init.sql b/init.sql new file mode 100644 index 0000000..ec23f9b --- /dev/null +++ b/init.sql @@ -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; diff --git a/login.php b/login.php index 8cbb64b..67ff5f6 100644 --- a/login.php +++ b/login.php @@ -2,34 +2,23 @@ include("config.php"); -if($_POST['u']!="") -{ -$u=addslashes($_POST['u']); -$p=addslashes($_POST['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) -{ -$message="You have been logged in. Proceed to the Game.
"; -setcookie("mrpg-ethbnd", strtolower($u . "@seperator@" . $p), time()+525600); -} -else -{ -$message="Invalid username or password."; - -} -} - -} +if($_POST['u']!="") { + $u=addslashes($_POST['u']); + $p=addslashes($_POST['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) { + $message="You have been logged in. Proceed to the Game.
"; + setcookie("mrpg-ethbnd", strtolower($u . "@seperator@" . $p), time()+525600); + } else { + $message="Invalid username or password."; + } + } + } } ?> -
Username:
Password
- diff --git a/lvlup.php b/lvlup.php index 233e8f8..07a21e8 100644 --- a/lvlup.php +++ b/lvlup.php @@ -9,35 +9,30 @@ $credsYo=explode("@seperator@", $credsYo); $u=strtolower($credsYo[0]); $p=strtolower($credsYo[1]); -if($u=="") -{ -header("Location: index.php?login"); +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) - { -header("Location: index.php"); -exit; +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)) -{ -$char['id']=$row['id']; -$char['exp']=$row['level']; -$mode=$row['mode']; +while($row = mysql_fetch_array($result)) { + $char['id']=$row['id']; + $char['exp']=$row['level']; + $mode=$row['mode']; } if($mode!="lvlup") { -header("Location: actions.php"); -exit; + header("Location: actions.php"); + exit; } @@ -53,17 +48,17 @@ $newlvl=level(2, $char['exp']); if($newlvl<=5) { -$increase=2; + $increase=2; } else if($newlvl>5 && $newlvl<=7) { -$increase=4; + $increase=4; } else if($newlvl>7 && $newlvl<=13) { -$increase=6; + $increase=6; } else if($newlvl>13 && $newlvl<=20) { -$increase=8; + $increase=8; } else if($newlvl>20 && $newlvl<=27) { -$increase=10; + $increase=10; } else { -$increase=10; + $increase=10; } $nhp=rand(1, $increase); @@ -87,7 +82,7 @@ $sql="UPDATE mrpg_stat SET `strength`=`strength`+$nstrength, `force`=`force`+$nforce WHERE id='" . $char['id'] . "'"; - + mysql_query($sql); @@ -126,7 +121,7 @@ imageString($fwim,5, $pos, $y+20, "Your level is now " . level(2, $char['exp']), header('Content-type: image/png'); -imagejpeg($fwim); -imageDestroy($fw); +imagejpeg($fwim); +imageDestroy($fw); -?> \ No newline at end of file +?> diff --git a/message.php b/message.php index 3a9564e..1b2a056 100644 --- a/message.php +++ b/message.php @@ -10,72 +10,54 @@ $credsYo=explode("@seperator@", $credsYo); $u=strtolower($credsYo[0]); $p=strtolower($credsYo[1]); -if($u=="") -{ -header("Location: index.php?login"); -exit; +if($u=="") { + header("Location: index.php?login"); + exit; } $result = mysql_query("SELECT * FROM mrpg_users WHERE name='$u'"); -while($row = mysql_fetch_array($result)) -{ - - if($row['password']!=$p) - { -header("Location: index.php"); -exit; +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)) -{ -$char['id']=$row['id']; -$char['mode']=$row['mode']; +while($row = mysql_fetch_array($result)) { + $char['id']=$row['id']; + $char['mode']=$row['mode']; } - if($char['mode']!="message") { -header("Location: actions.php"); -exit; + header("Location: actions.php"); + exit; } $sql="SELECT * FROM mrpg_message WHERE id=" . $char['id'] . ";"; $result = mysql_query($sql); -while($row = mysql_fetch_array($result)) -{ -$confirm['q']=$row['q']; -$confirm['x']=$row['x']; -$confirm['y']=$row['y']; - +while($row = mysql_fetch_array($result)) { + $confirm['q']=$row['q']; + $confirm['x']=$row['x']; + $confirm['y']=$row['y']; } if($_SERVER['QUERY_STRING']=="") { - -echo "

" . $confirm['q'] . "



- + echo "

" . $confirm['q'] . "



Continue
"; } else if($_SERVER['QUERY_STRING']=="yes") { -$sql="UPDATE mrpg_users SET mode='norm', x=" . $confirm['x'] . ", y=" . $confirm['y'] . " WHERE id=" . $char['id'] . ";"; -mysql_query($sql); + $sql="UPDATE mrpg_users SET mode='norm', x=" . $confirm['x'] . ", y=" . $confirm['y'] . " WHERE id=" . $char['id'] . ";"; + mysql_query($sql); -header("Location: actions.php"); -exit; + header("Location: actions.php"); + exit; -} +} - - - - - -?> \ No newline at end of file +?> diff --git a/rantgraph.php b/rantgraph.php deleted file mode 100644 index b28d361..0000000 --- a/rantgraph.php +++ /dev/null @@ -1,176 +0,0 @@ -$value) { -$text[$key]=explode(":", $value); -} -$total=count($text)-1; -$num=0; - -$graphdatshiz=array(0); -$graphdatshizdates=array(0); -while($num<=$total) { - -if($num!=$total) { - - - -//echo "
" . date("m-d-Y h:i:s", $text[$num][0]+21600) . " " . date("m-d-Y h:i:s", $text[$num+1][0]+21600) . ":$newb
\n"; -while($num<=$total) { - - -if($num!=$total) { -echo ""; - - - -$newb=$text[$num][1] - $text[$num+1][1]; - -if($newb<0) { -$newb=abs($newb); -} -else -{ -$newb=$newb*-1; -} - -echo "\n"; -} - - -$num++; -} - -echo "
NumRaw TimeFromToAmount
$num" . $text[$num][0] . "" . date("m-d-Y h:i:s", $text[$num][0]+21600) . " " . date("m-d-Y h:i:s", $text[$num+1][0]+21600) . ":$newb
"; -//print_r($text); -?> \ No newline at end of file diff --git a/register.php b/register.php index 2684291..0d562d2 100644 --- a/register.php +++ b/register.php @@ -7,100 +7,67 @@ function validname($input) { } -if($_POST['reg']==1) -{ -if($_POST['username']=="" || $_POST['password']=="" || $_POST['password2']=="") -{ -$message.="Fill out all the feilds.
"; +if($_POST['reg']==1) { + if($_POST['username']=="" || $_POST['password']=="" || $_POST['password2']=="") { + $message.="Fill out all the feilds.
"; + } else { + $u=strtolower(addslashes($_POST['username'])); + $p=strtolower(addslashes($_POST['password'])); + $p2=strtolower(addslashes($_POST['password2'])); + + if(validname($u)=="false" || validname($p)=="false" || validname($p2)=="false") { + $message.="Invalid entries. 3-12 characters, Alpha-Numeric only.
"; + } else { + if($p!=$p2) { + $message.="Passwords didn't match.
"; + } else { + $result = mysql_query("SELECT * FROM mrpg_users WHERE name='$u'"); + while($row = mysql_fetch_array($result)) { + $namecheck=$row['id']; + } + + if($namecheck!="") { + $message.="Username is taken!.
"; + } else { + //Register + $id=1; + $result = mysql_query("SELECT id FROM mrpg_users"); + while($row = mysql_fetch_array($result)) { + if(($row['id']+1)>$id) { + $id=($row['id']+1); + } + } + + mysql_query("INSERT INTO `mrpg_users` ( `id` , `name` , `password` , `x` , `y` , `dir` , `inventory` , `level` , `lastact` , `mode` ) + VALUES ( + '$id', '$u', '$p', '5', '3', '0', '', '0', '0', 'norm' + );"); + + mysql_query("INSERT INTO `mrpg_confirm` VALUES ( + '$id', '', '0', '0', '0', '0' + );"); + + mysql_query("INSERT INTO `mrpg_message` VALUES ( + '$id', '', '0', '0' + );"); + + mysql_query("INSERT INTO `mrpg_battles` ( `id` , `use` , `enemy` , `enemyhp` , `other` ) + VALUES ( + '$id', '0', '0', '0', '' + );"); + + mysql_query("INSERT INTO `mrpg_stat` ( `id` , `hp` , `maxhp` , `pp` , `offense` , `defense` , `fight` , `speed` , `wisdom` , `strength` , `force` , `poison` , `other` ) + VALUES ( + '$id', '20', '20', '5', '1', '1', '1', '1', '1', '1', '1', '0', '0' + );"); + + $message.="Registered! You can now play!"; + + } + } + } + } } -else -{ - - -$u=strtolower(addslashes($_POST['username'])); -$p=strtolower(addslashes($_POST['password'])); -$p2=strtolower(addslashes($_POST['password2'])); - -if(validname($u)=="false" || validname($p)=="false" || validname($p2)=="false") -{ -$message.="Invalid entries. 3-12 characters, Alpha-Numeric only.
"; -} -else -{ -if($p!=$p2) -{ -$message.="Passwords didn't match.
"; -} -else -{ -$result = mysql_query("SELECT * FROM mrpg_users WHERE name='$u'"); -while($row = mysql_fetch_array($result)) -{ -$namecheck=$row['id']; -} - -if($namecheck!="") -{ -$message.="Username is taken!.
"; -} -else -{ -//Register - -$id=0; -$result = mysql_query("SELECT id FROM mrpg_users"); -while($row = mysql_fetch_array($result)) -{ -if(($row['id']+1)>$id) -{ -$id=($row['id']+1); -} - -} - - - -mysql_query("INSERT INTO `mrpg_users` ( `id` , `name` , `password` , `x` , `y` , `dir` , `inventory` , `level` , `lastact` , `mode` ) -VALUES ( -'$id', '$u', '$p', '5', '3', '0', '', '0', '0', 'norm' -);"); - - -mysql_query("INSERT INTO `mrpg_confirm` VALUES ( -'$id', '', '0', '0', '0', '0' -);"); - - -mysql_query("INSERT INTO `mrpg_message` VALUES ( -'$id', '', '0', '0' -);"); - - -mysql_query("INSERT INTO `mrpg_battles` ( `id` , `use` , `enemy` , `enemyhp` , `other` ) -VALUES ( -'$id', '0', '0', '0', '' -);"); - - - -mysql_query("INSERT INTO `mrpg_stat` ( `id` , `hp` , `maxhp` , `pp` , `offense` , `defense` , `fight` , `speed` , `wisdom` , `strength` , `force` , `poison` , `other` ) -VALUES ( -'$id', '20', '20', '5', '1', '1', '1', '1', '1', '1', '1', '0', '0' -);"); - - - -$message.="Registered! You can now play!"; - - - -} -} -} -} -} - - ?> diff --git a/stat.php b/stat.php index aac0128..2e73ad0 100644 --- a/stat.php +++ b/stat.php @@ -11,20 +11,17 @@ $p=$char['y']; $result = mysql_query("SELECT * FROM mrpg_users WHERE name='$u'"); -while($row = mysql_fetch_array($result)) -{ -$uid=$row['id']; -$x=$row['x']; -$y=$row['y']; +while($row = mysql_fetch_array($result)) { + $uid=$row['id']; + $x=$row['x']; + $y=$row['y']; - if(md5($row['password'])!=$p) - { -header("Location: index.php"); -exit; + if(md5($row['password'])!=$p) { + header("Location: index.php"); + exit; } } makestatimage($uid); - -?> \ No newline at end of file +?> diff --git a/stats.php b/stats.php index 025a489..2184218 100644 --- a/stats.php +++ b/stats.php @@ -4,14 +4,14 @@ include("config.php"); $result = mysql_query("SELECT name,lastact FROM mrpg_users WHERE (" . date("U") . "-lastact)<=60"); -while($row = mysql_fetch_array($result)) -{ -$online.=ucfirst($row['name']) . ", "; +while($row = mysql_fetch_array($result)) { + $online.=ucfirst($row['name']) . ", "; } if($online=="") { -echo "None!"; + echo "None!"; } else { -echo $online; + echo $online; } -?> \ No newline at end of file + +?> diff --git a/walkable.php b/walkable.php index ce0e7a7..d240b06 100644 --- a/walkable.php +++ b/walkable.php @@ -29,16 +29,13 @@ $walkable[61]=array(0,1,1,1,1,1,1,1,1,1,1,1,1,0,0); $walkable[62]=array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); function walkable($x,$y) { -global $walkable; + global $walkable; -if($walkable[$y][$x]==1) { -return true; -} else { -return false; + if($walkable[$y][$x]==1) { + return true; + } else { + return false; + } } -} - - - -?> \ No newline at end of file +?>