diff --git a/changelog.txt b/changelog.txt index ba900d5..0cc9447 100644 --- a/changelog.txt +++ b/changelog.txt @@ -2,6 +2,15 @@ DRAGON SCOURGE Changelog ***** BETA THREE ***** + +4.08.2006 - Build 15 (Dead Man's Chest): +- Character profiles now display class name instead of ID numbers. +- Fixed incorrect minimum level display in guild start/apply error messages. +- Finally re-implemented gambling. +- Added very short tooltip descriptions of the classes when creating new characters. +- Spiffied up the Version Info page a little bit. +- A few other minor cosmetic changes. + 2.26.2006 - Build 14 (Pete Rose): - The poor sods who are stuck on dial-up can now select to not show the minimap in their account settings. - Fixed a problem with guild names in paneltop. @@ -40,6 +49,7 @@ Changelog - Added email verification support. ***** BETA TWO ***** + 12.10.2005 - Build 12 (Eggs): - Members can now leave the Guild without requiring an officer to demote them to zero. - Rank 5 members can now edit/update Guild settings. diff --git a/extras/install.sql b/extras/install.sql index 41b7c25..774ce94 100644 --- a/extras/install.sql +++ b/extras/install.sql @@ -62,6 +62,7 @@ CREATE TABLE `sx_classes` ( `damageperstrength` float unsigned NOT NULL default '0', `hpperdexterity` float unsigned NOT NULL default '0', `mpperenergy` float unsigned NOT NULL default '0', + `description` text NOT NULL, PRIMARY KEY (`id`) ) ; @@ -69,9 +70,9 @@ CREATE TABLE `sx_classes` ( -- Dumping data for table `sx_classes` -- -INSERT INTO `sx_classes` VALUES (1, 'Barbarian', 0, 0, 3, 2, 1); -INSERT INTO `sx_classes` VALUES (2, 'Sorceress', 0, 0, 1, 2, 3); -INSERT INTO `sx_classes` VALUES (3, 'Paladin', 0, 0, 2, 3, 1); +INSERT INTO `sx_classes` VALUES (1, 'Barbarian', 0, 0, 3, 2, 1, 'Barbarians specialize in physical damage. 3 damage pr str, 2 hp per dex, 1 mp per energy.'); +INSERT INTO `sx_classes` VALUES (2, 'Sorceress', 0, 0, 1, 2, 3, 'Sorceresses specialize in magical damage. 3 mp per energy, 2 hp per dex, 1 damage per str.'); +INSERT INTO `sx_classes` VALUES (3, 'Paladin', 0, 0, 2, 3, 1, 'Paladins specialize in staying alive. 3 hp per dex, 2 damage per str, 1 mp per energy.'); -- -------------------------------------------------------- diff --git a/guilds.php b/guilds.php index 42736ae..d850890 100644 --- a/guilds.php +++ b/guilds.php @@ -93,7 +93,7 @@ function guildcreate() { if ($userrow["guild"] != 0) { err("You are already a member of another Guild. You must renounce your current membership before starting your own Guild. Please go back and try again."); } $appquery = doquery("SELECT * FROM {{table}} WHERE charid='".$userrow["id"]."' LIMIT 1", "guildapps"); if (mysql_num_rows($appquery) != 0) { err("You have already applied to join another Guild. Please go back and try again."); } - if ($userrow["level"] < $controlrow["guildstartlvl"]) { err("You cannot join a guild until you are at least Level ".$controlrow["guildstartlvl"].". Please continue playing until you make Level 10, then try again."); } + if ($userrow["level"] < $controlrow["guildstartlvl"]) { err("You cannot join a guild until you are at least Level ".$controlrow["guildstartlvl"].". Please continue playing until your character is Level ".$controlrow["guildstartlvl"].", then try again."); } if (isset($_POST["submit"])) { @@ -227,7 +227,7 @@ function guildapp() { if ($userrow["guild"] != 0) { err("You are already a member of another Guild. You must renounce your current membership before joining this Guild. Please go back and try again."); } $appquery = doquery("SELECT * FROM {{table}} WHERE charid='".$userrow["id"]."' LIMIT 1", "guildapps"); if (mysql_num_rows($appquery) != 0) { err("You have already applied to join another Guild. Please go back and try again."); } - if ($userrow["level"] < $controlrow["guildjoinlvl"]) { err("You cannot join a guild until you are at least Level ".$controlrow["guildjoinlvl"].". Please continue playing until you make Level 10, then try again."); } + if ($userrow["level"] < $controlrow["guildjoinlvl"]) { err("You cannot join a guild until you are at least Level ".$controlrow["guildjoinlvl"].". Please continue playing until your character is Level ".$controlrow["guildjoinlvl"].", then try again."); } if (isset($_POST["yes"])) { diff --git a/images/Thumbs.db b/images/Thumbs.db index fa34c89..48ef721 100644 Binary files a/images/Thumbs.db and b/images/Thumbs.db differ diff --git a/images/background1.jpg b/images/background1.jpg index 5e8693f..b83146a 100644 Binary files a/images/background1.jpg and b/images/background1.jpg differ diff --git a/images/background2.jpg b/images/background2.jpg index 800a5cd..970213d 100644 Binary files a/images/background2.jpg and b/images/background2.jpg differ diff --git a/images/background3.jpg b/images/background3.jpg index b7da387..4bdec91 100644 Binary files a/images/background3.jpg and b/images/background3.jpg differ diff --git a/images/background4.jpg b/images/background4.jpg index c7646dc..945b3d3 100644 Binary files a/images/background4.jpg and b/images/background4.jpg differ diff --git a/images/background5.jpg b/images/background5.jpg index 49a973c..d553d43 100644 Binary files a/images/background5.jpg and b/images/background5.jpg differ diff --git a/images/items/Thumbs.db b/images/items/Thumbs.db index 002e49b..1803b7b 100644 Binary files a/images/items/Thumbs.db and b/images/items/Thumbs.db differ diff --git a/images/r7_copyright.png b/images/r7_copyright.png new file mode 100644 index 0000000..4444cc7 Binary files /dev/null and b/images/r7_copyright.png differ diff --git a/images/r7_logo.png b/images/r7_logo.png new file mode 100644 index 0000000..29e5d51 Binary files /dev/null and b/images/r7_logo.png differ diff --git a/images/town_bank.png b/images/town_bank.png index 09a1ff8..6650c67 100644 Binary files a/images/town_bank.png and b/images/town_bank.png differ diff --git a/images/town_buy.png b/images/town_buy.png index 8c21dc5..9a22119 100644 Binary files a/images/town_buy.png and b/images/town_buy.png differ diff --git a/images/town_duel.png b/images/town_duel.png index 6009336..df2b123 100644 Binary files a/images/town_duel.png and b/images/town_duel.png differ diff --git a/images/town_gamble.png b/images/town_gamble.png index d2f5df7..b7b1897 100644 Binary files a/images/town_gamble.png and b/images/town_gamble.png differ diff --git a/images/town_guilds.png b/images/town_guilds.png index 46dc7ef..7eedc7f 100644 Binary files a/images/town_guilds.png and b/images/town_guilds.png differ diff --git a/images/town_hall.png b/images/town_hall.png index a96608f..cac80f0 100644 Binary files a/images/town_hall.png and b/images/town_hall.png differ diff --git a/images/town_inn.png b/images/town_inn.png index 8ef3dad..4095eda 100644 Binary files a/images/town_inn.png and b/images/town_inn.png differ diff --git a/images/town_maps.png b/images/town_maps.png index d13536e..39ebce3 100644 Binary files a/images/town_maps.png and b/images/town_maps.png differ diff --git a/images/town_post.png b/images/town_post.png index 337a39c..4a60761 100644 Binary files a/images/town_post.png and b/images/town_post.png differ diff --git a/images/users/Jamin85462030.gif b/images/users/Jamin85462030.gif new file mode 100644 index 0000000..59c98f6 Binary files /dev/null and b/images/users/Jamin85462030.gif differ diff --git a/images/users/Thumbs.db b/images/users/Thumbs.db index 179cb3b..8f73d70 100644 Binary files a/images/users/Thumbs.db and b/images/users/Thumbs.db differ diff --git a/lib.php b/lib.php index 79774b9..f552a5a 100644 --- a/lib.php +++ b/lib.php @@ -5,9 +5,9 @@ $starttime = getmicrotime(); $numqueries = 0; $link = opendb(); $version = "Beta 3"; -$bnumber = "14"; -$bname = "Pete Rose"; -$bdate = "2.26.2006"; +$bnumber = "15"; +$bname = "Dead Man's Chest"; +$bdate = "4.08.2006"; // Handling for servers with magic_quotes turned on. // Example from php.net. diff --git a/misc.php b/misc.php index 2fd871b..8e2de03 100644 --- a/misc.php +++ b/misc.php @@ -14,13 +14,17 @@ function version() { global $version, $bname, $bdate, $bnumber; $page = << -Version Number:$version +
+renderse7en

+Dragon Scourge
© 2003-2006 by renderse7en


+ +
Version Number:$version
Build Number:$bnumber
Build Name:$bname
Build Date:$bdate
View the Changelog
+
END; display("Version Information",$page); diff --git a/templates/primary.php b/templates/primary.php index 1043262..1a01e4b 100644 --- a/templates/primary.php +++ b/templates/primary.php @@ -72,7 +72,7 @@ a:hover { color: #663300; } {{forumslink}} - Dragon Scourge © 2003-2005 by renderse7en + Dragon Scourge © by renderse7en diff --git a/templates/town_gamble1.php b/templates/town_gamble1.php index a2ce1d7..fc1a288 100644 --- a/templates/town_gamble1.php +++ b/templates/town_gamble1.php @@ -1,7 +1,15 @@
Select a cup, enter a bet amount, and click the button to see if you win.

+Easy gambling gives 2-to-1 payouts. Hard gambling gives 10-to-1 payouts, but it's a lot harder to win.

+
+{{form}} +
+Bet amount:

+ +
+If you've changed your mind, you can also return to town. END; ?> \ No newline at end of file diff --git a/templates/users_charnew.php b/templates/users_charnew.php index d030d26..2a02cc6 100644 --- a/templates/users_charnew.php +++ b/templates/users_charnew.php @@ -5,7 +5,7 @@ $template = << Character Name:
Character names must be 30 characters or less.


Avatar:Upload an avatar:

Avatars must be 50x50 pixels & {{maxsize}}kb or smaller.
JPG, GIF, and PNG file types only.


-Character Class: +Character Class:
Hover over a class name for more information:
{{classdesc}}


Difficulty: Default Character: Yes.
Place a check in the box if you want your new character to become the current default for your account.

diff --git a/town.php b/town.php index c294221..2d80855 100644 --- a/town.php +++ b/town.php @@ -290,8 +290,96 @@ function buy() { // Buy items from merchants. function gamble() { - display("Gamble", gettemplate("town_gamble1")); + global $userrow; + $mode = "easy"; + if (isset($_GET["mode"])) { $mode = $_GET["mode"]; } + + if (isset($_POST["submit"])) { + + $amount = $_POST["amount"]; + + // Cup errors. + if (!isset($_POST["cup"])) { err("You didn't pick any cup to bet on. Please go back and try again."); } + if (!is_numeric($_POST["cup"])) { err("You didn't pick any cup to bet on. Please go back and try again."); } + + // Bet amount errors. + if (trim($amount) == "") { err("Invalid bet amount. Please go back and try again."); } + if (!is_numeric($amount)) { err("Invalid bet amount. Please go back and try again."); } + if ($amount < 0) { err("Invalid bet amount. Please go back and try again."); } + if ($userrow["gold"] < $amount) { err("Invalid bet amount. Please go back and try again."); } + + if ($mode == "hard") { + + $thecup = $_POST["cup"]; + $thewin = rand(1,9); + + if ($thecup == $thewin) { + $userrow["gold"] += ($amount * 10); + doquery("UPDATE {{table}} SET gold=gold+($amount * 10) WHERE id='".$userrow["id"]."' LIMIT 1", "users"); + display("Gamble", "You won!

You just picked up ".($amount * 10)." Gold.

Care to try again?"); + } else { + $userrow["gold"] -= $amount; + doquery("UPDATE {{table}} SET gold=gold-$amount WHERE id='".$userrow["id"]."' LIMIT 1", "users"); + display("Gamble", "You lost!

Sorry buddy, but we're gonna have to take your ".$amount." Gold.

Care to try again?"); + } + + } + + if ($mode == "easy") { + + $thecup = $_POST["cup"]; + $thewin = rand(1,3); + + if ($thecup == $thewin) { + $userrow["gold"] += ($amount * 2); + doquery("UPDATE {{table}} SET gold=gold+($amount * 2) WHERE id='".$userrow["id"]."' LIMIT 1", "users"); + display("Gamble", "You won!

You just picked up ".($amount * 2)." Gold.

Care to try again?"); + } else { + $userrow["gold"] -= $amount; + doquery("UPDATE {{table}} SET gold=gold-$amount WHERE id='".$userrow["id"]."' LIMIT 1", "users"); + display("Gamble", "You lost!

Sorry buddy, but we're gonna have to take your ".$amount." Gold.

Care to try again?"); + } + + } + + } else { + + if ($mode == "hard") { + + $row["mode"] = "hard"; + $row["form"] = ""; + $row["form"] .= ""; + $row["form"] .= ""; + $row["form"] .= ""; + $row["form"] .= ""; + $row["form"] .= ""; + $row["form"] .= ""; + $row["form"] .= ""; + $row["form"] .= ""; + $row["form"] .= ""; + $row["form"] .= ""; + $row["form"] .= ""; + $row["form"] .= "
"; + + } + + if ($mode == "easy") { + + $row["mode"] = "easy"; + $row["form"] = ""; + $row["form"] .= ""; + $row["form"] .= ""; + $row["form"] .= ""; + $row["form"] .= "
"; + + } + + display("Gamble", parsetemplate(gettemplate("town_gamble1"), $row)); + + } + + } function bank() { diff --git a/users.php b/users.php index bf68fa6..99c7e34 100644 --- a/users.php +++ b/users.php @@ -185,6 +185,10 @@ function profile() { // Level points. if ($newuserrow["levelup"] != 0 || $newuserrow["levelspell"] != 0) { $newuserrow["levelpointscharnotice"] = "You have Level/Spell Points available."; } else { $newuserrow["levelpointscharnotice"] = ""; } + + // Class. + $class = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["charclass"]."' LIMIT 1", "classes")); + $newuserrow["charclass"] = $class["name"]; display("Extended Profile",parsetemplate(gettemplate($template),$newuserrow)); @@ -419,9 +423,12 @@ function charnew() { $classes = dorow(doquery("SELECT * FROM {{table}} ORDER BY id", "classes")); $row["charclass"] = ""; + $row["classdesc"] = ""; foreach($classes as $a=>$b) { $row["charclass"] .= ""; + $row["classdesc"] .= "".$b["name"]." | "; } + $row["classdesc"] = rtrim($row["classdesc"], " |"); $difficulty = dorow(doquery("SELECT * FROM {{table}} ORDER BY id", "difficulties")); $row["difficulty"] = ""; foreach($difficulty as $a=>$b) {