Beta 3 Build 15

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.
This commit is contained in:
Jamin Blount 2017-02-05 11:55:49 -06:00
parent 035a48fbfe
commit 32e5cfe9ac
30 changed files with 132 additions and 14 deletions

View File

@ -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.

View File

@ -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.');
-- --------------------------------------------------------

View File

@ -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 <a href=\"index.php\">go back</a> 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 <a href=\"index.php\">go back</a> 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 <a href=\"index.php\">go back</a> 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 <a href=\"index.php\">go back</a> 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"])) {

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

BIN
images/r7_copyright.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
images/r7_logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1019 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

View File

@ -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.

View File

@ -14,13 +14,17 @@ function version() {
global $version, $bname, $bdate, $bnumber;
$page = <<<END
<table width="90%">
<tr><td width="30%">Version Number:</td><td><b>$version</b></td></tr>
<center>
<img src="images/r7_logo.png" alt="renderse7en" /><br /><br />
<span style="font: 12px Verdana;"><a href="http://www.dragonscourge.com" target="_new">Dragon Scourge</a><br />&copy; 2003-2006 by <a href="http://www.renderse7en.com">renderse7en</a></b></span><br /><br />
<table>
<tr><td>Version Number:</td><td><b>$version</b></td></tr>
<tr><td>Build Number:</td><td><b>$bnumber</b></td></tr>
<tr><td>Build Name:</td><td><b>$bname</b></td></tr>
<tr><td>Build Date:</td><td><b>$bdate</b></td></tr>
<tr><td colspan="2"><a href="changelog.txt" target="_new">View the Changelog</a></td></tr>
</table>
</center>
END;
display("Version Information",$page);

View File

@ -72,7 +72,7 @@ a:hover { color: #663300; }
{{forumslink}}
</td>
<td width="40%" style="text-align:right;">
<a href="http://www.dragonscourge.com">Dragon Scourge</a> &copy; 2003-2005 by <a href="http://www.renderse7en.com">renderse7en</a>
<a href="http://www.dragonscourge.com">Dragon Scourge</a> &copy; by <a href="http://www.renderse7en.com">renderse7en</a>
</td>
</tr>
</table>

View File

@ -1,7 +1,15 @@
<?php
$template = <<<END
Gambling has not yet been implemented in this release.
Gambling can be a quick way to gain easy money, but it can also break you, leaving you as nothing more than a pitiful shell of wretched human filth. But hey, that won't happen to you, will it? You're a lucky guy, right? Right?<br /><br />Select a cup, enter a bet amount, and click the button to see if you win.<br /><br />
<a href="index.php?do=gamble&mode=easy">Easy gambling</a> gives 2-to-1 payouts. <a href="index.php?do=gamble&mode=hard">Hard gambling</a> gives 10-to-1 payouts, but it's a lot harder to win.<br /><br />
<form action="index.php?do=gamble&mode={{mode}}" method="post">
{{form}}
<br />
Bet amount: <input type="text" name="amount" size="5" maxlength="10" /><br /><br />
<input type="submit" name="submit" value="Give it a shot" />
</form>
If you've changed your mind, you can also <a href="index.php">return to town</a>.
END;
?>

View File

@ -5,7 +5,7 @@ $template = <<<END
<table>
<tr><td width="30%">Character Name:</td><td><input type="text" name="charname" size="30" maxlength="30" /><br />Character names must be 30 characters or less.<br /><br /><br /></td></tr>
<tr><td width="30%">Avatar:</td><td>Upload an avatar:<br /><input type="file" name="intavatar" /><br />Avatars must be 50x50 pixels & {{maxsize}}kb or smaller.<br />JPG, GIF, and PNG file types only.<br /><br /><br /></td></tr>
<tr><td width="30%">Character Class:</td><td><select name="charclass">{{charclass}}</select></td></tr>
<tr><td width="30%">Character Class:</td><td><select name="charclass">{{charclass}}</select><br /><span style="color: #666666;">Hover over a class name for more information:<br />{{classdesc}}</span><br /><br /></td></tr>
<tr><td width="30%">Difficulty:</td><td><select name="difficulty">{{difficulty}}</select></td></tr>
<tr><td width="30%">Default Character:</td><td><input type="checkbox" name="setdefault" value="yes" checked="checked" {{defaultenabled}} style="vertical-align: middle;" /> Yes.<br />Place a check in the box if you want your new character to become the current default for your account.<br /><br /></td></tr>
<tr><td colspan="2"><input type="submit" name="submit" value="Submit" /> <input type="reset" name="reset" value="Reset" /></td></tr>

View File

@ -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 <a href=\"index.php?do=gamble\">go back</a> and try again."); }
if (!is_numeric($_POST["cup"])) { err("You didn't pick any cup to bet on. Please <a href=\"index.php?do=gamble\">go back</a> and try again."); }
// Bet amount errors.
if (trim($amount) == "") { err("Invalid bet amount. Please <a href=\"index.php?do=gamble\">go back</a> and try again."); }
if (!is_numeric($amount)) { err("Invalid bet amount. Please <a href=\"index.php?do=gamble\">go back</a> and try again."); }
if ($amount < 0) { err("Invalid bet amount. Please <a href=\"index.php?do=gamble\">go back</a> and try again."); }
if ($userrow["gold"] < $amount) { err("Invalid bet amount. Please <a href=\"index.php?do=gamble\">go back</a> 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!<br /><br />You just picked up <b>".($amount * 10)." Gold</b>.<br /><br />Care to <a href=\"index.php?do=gamble&mode=hard\">try again</a>?");
} else {
$userrow["gold"] -= $amount;
doquery("UPDATE {{table}} SET gold=gold-$amount WHERE id='".$userrow["id"]."' LIMIT 1", "users");
display("Gamble", "You lost!<br /><br />Sorry buddy, but we're gonna have to take your <b>".$amount." Gold</b>.<br /><br />Care to <a href=\"index.php?do=gamble&mode=hard\">try again</a>?");
}
}
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!<br /><br />You just picked up <b>".($amount * 2)." Gold</b>.<br /><br />Care to <a href=\"index.php?do=gamble\">try again</a>?");
} else {
$userrow["gold"] -= $amount;
doquery("UPDATE {{table}} SET gold=gold-$amount WHERE id='".$userrow["id"]."' LIMIT 1", "users");
display("Gamble", "You lost!<br /><br />Sorry buddy, but we're gonna have to take your <b>".$amount." Gold</b>.<br /><br />Care to <a href=\"index.php?do=gamble\">try again</a>?");
}
}
} else {
if ($mode == "hard") {
$row["mode"] = "hard";
$row["form"] = "<table width=\"200\"><tr>";
$row["form"] .= "<td width=\"33%\" style=\"text-align: center;\"><label for=\"1\"><img src=\"images/cup.gif\" alt=\"cup\" /><br /><input type=\"radio\" name=\"cup\" value=\"1\" id=\"1\" /></label></td>";
$row["form"] .= "<td width=\"34%\" style=\"text-align: center;\"><label for=\"2\"><img src=\"images/cup.gif\" alt=\"cup\" /><br /><input type=\"radio\" name=\"cup\" value=\"2\" id=\"2\" /></label></td>";
$row["form"] .= "<td width=\"33%\" style=\"text-align: center;\"><label for=\"3\"><img src=\"images/cup.gif\" alt=\"cup\" /><br /><input type=\"radio\" name=\"cup\" value=\"3\" id=\"3\" /></label></td>";
$row["form"] .= "</tr><tr>";
$row["form"] .= "<td width=\"33%\" style=\"text-align: center;\"><label for=\"4\"><img src=\"images/cup.gif\" alt=\"cup\" /><br /><input type=\"radio\" name=\"cup\" value=\"4\" id=\"4\" /></label></td>";
$row["form"] .= "<td width=\"34%\" style=\"text-align: center;\"><label for=\"5\"><img src=\"images/cup.gif\" alt=\"cup\" /><br /><input type=\"radio\" name=\"cup\" value=\"5\" id=\"5\" /></label></td>";
$row["form"] .= "<td width=\"33%\" style=\"text-align: center;\"><label for=\"6\"><img src=\"images/cup.gif\" alt=\"cup\" /><br /><input type=\"radio\" name=\"cup\" value=\"6\" id=\"6\" /></label></td>";
$row["form"] .= "</tr><tr>";
$row["form"] .= "<td width=\"33%\" style=\"text-align: center;\"><label for=\"7\"><img src=\"images/cup.gif\" alt=\"cup\" /><br /><input type=\"radio\" name=\"cup\" value=\"7\" id=\"7\" /></label></td>";
$row["form"] .= "<td width=\"34%\" style=\"text-align: center;\"><label for=\"8\"><img src=\"images/cup.gif\" alt=\"cup\" /><br /><input type=\"radio\" name=\"cup\" value=\"8\" id=\"8\" /></label></td>";
$row["form"] .= "<td width=\"33%\" style=\"text-align: center;\"><label for=\"9\"><img src=\"images/cup.gif\" alt=\"cup\" /><br /><input type=\"radio\" name=\"cup\" value=\"9\" id=\"9\" /></label></td>";
$row["form"] .= "</tr></table>";
}
if ($mode == "easy") {
$row["mode"] = "easy";
$row["form"] = "<table width=\"200\"><tr>";
$row["form"] .= "<td width=\"33%\" style=\"text-align: center;\"><label for=\"1\"><img src=\"images/cup.gif\" alt=\"cup\" /><br /><input type=\"radio\" name=\"cup\" value=\"1\" id=\"1\" /></label></td>";
$row["form"] .= "<td width=\"34%\" style=\"text-align: center;\"><label for=\"2\"><img src=\"images/cup.gif\" alt=\"cup\" /><br /><input type=\"radio\" name=\"cup\" value=\"2\" id=\"2\" /></label></td>";
$row["form"] .= "<td width=\"33%\" style=\"text-align: center;\"><label for=\"3\"><img src=\"images/cup.gif\" alt=\"cup\" /><br /><input type=\"radio\" name=\"cup\" value=\"3\" id=\"3\" /></label></td>";
$row["form"] .= "</tr></table>";
}
display("Gamble", parsetemplate(gettemplate("town_gamble1"), $row));
}
}
function bank() {

View File

@ -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"] .= "<option value=\"".$b["id"]."\">".$b["name"]."</option>";
$row["classdesc"] .= "<a title=\"".$b["description"]."\">".$b["name"]."</a> | ";
}
$row["classdesc"] = rtrim($row["classdesc"], " |");
$difficulty = dorow(doquery("SELECT * FROM {{table}} ORDER BY id", "difficulties"));
$row["difficulty"] = "";
foreach($difficulty as $a=>$b) {