From bee59d4382bb96b19091d9d9764da37fd4c577d7 Mon Sep 17 00:00:00 2001 From: Jamin Blount Date: Sun, 5 Feb 2017 11:56:42 -0600 Subject: [PATCH] Beta 3 Build 16 4.26.2006 - Build 16 (Road Rage): - Fixed a bug that prevented you from applying fewer than your max levelspell points. - Added links back to the stores after buying maps/items or using the bank. - Added a link back to town after gambling. - Fixed the link in the error message when failing to create a guild. --- changelog.txt | 6 ++++++ guilds.php | 2 +- lib.php | 6 +++--- templates/town_bank2.php | 2 +- templates/town_buy3.php | 2 +- templates/town_map3.php | 2 +- town.php | 8 ++++---- users.php | 10 ++++++---- 8 files changed, 23 insertions(+), 15 deletions(-) diff --git a/changelog.txt b/changelog.txt index 0cc9447..5e8b885 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,12 @@ Changelog ***** BETA THREE ***** +4.26.2006 - Build 16 (Road Rage): +- Fixed a bug that prevented you from applying fewer than your max levelspell points. +- Added links back to the stores after buying maps/items or using the bank. +- Added a link back to town after gambling. +- Fixed the link in the error message when failing to create a guild. + 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. diff --git a/guilds.php b/guilds.php index d850890..22ceaa9 100644 --- a/guilds.php +++ b/guilds.php @@ -141,7 +141,7 @@ function guildcreate() { } else { // Die gracefully on errors. - err("The following error(s) occurred when your account was being made:
$errorlist
Please go back and try again."); + err("The following error(s) occurred when your account was being made:
$errorlist
Please go back and try again."); } diff --git a/lib.php b/lib.php index f552a5a..08626e9 100644 --- a/lib.php +++ b/lib.php @@ -5,9 +5,9 @@ $starttime = getmicrotime(); $numqueries = 0; $link = opendb(); $version = "Beta 3"; -$bnumber = "15"; -$bname = "Dead Man's Chest"; -$bdate = "4.08.2006"; +$bnumber = "16"; +$bname = "Road Rage"; +$bdate = "4.26.2006"; // Handling for servers with magic_quotes turned on. // Example from php.net. diff --git a/templates/town_bank2.php b/templates/town_bank2.php index 026fd3d..2d49e68 100644 --- a/templates/town_bank2.php +++ b/templates/town_bank2.php @@ -3,7 +3,7 @@ $template = <<
You are now storing {{formatbank}} gold in the bank, and you are carrying {{formatgold}} gold in your pocket.

-You may return to town, or use the direction buttons to continue exploring. +You may return to town, the bank, or use the direction buttons to continue exploring. END; ?> \ No newline at end of file diff --git a/templates/town_buy3.php b/templates/town_buy3.php index 38deb79..6a14ad7 100644 --- a/templates/town_buy3.php +++ b/templates/town_buy3.php @@ -2,7 +2,7 @@ $template = <<
-You may return to town, or use the direction buttons to continue exploring. +You may return to town, the item store, or use the direction buttons to continue exploring. END; ?> \ No newline at end of file diff --git a/templates/town_map3.php b/templates/town_map3.php index b9a6827..6beaae3 100644 --- a/templates/town_map3.php +++ b/templates/town_map3.php @@ -2,7 +2,7 @@ $template = <<
-You may return to town, or use the direction buttons to continue exploring. +You may return to town, the map store, or use the direction buttons to continue exploring. END; ?> \ No newline at end of file diff --git a/town.php b/town.php index 2d80855..92b0c79 100644 --- a/town.php +++ b/town.php @@ -317,11 +317,11 @@ function gamble() { 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?"); + display("Gamble", "You won!

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

Care to try again or would you rather go back to town?"); } 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?"); + display("Gamble", "You lost!

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

Care to try again or would you rather go back to town?"); } } @@ -334,11 +334,11 @@ function gamble() { 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?"); + display("Gamble", "You won!

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

Care to try again or would you rather go back to town?"); } 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?"); + display("Gamble", "You lost!

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

Care to try again or would you rather go back to town?"); } } diff --git a/users.php b/users.php index 99c7e34..4bc88e3 100644 --- a/users.php +++ b/users.php @@ -605,10 +605,12 @@ function levelspell() { // This is to ensure that people don't edit the source to just add more fields. $total = $userrow["levelspell"]; for($i=0; $i<$total; $i++) { - if (!isset($spells[$_POST["spell".$i]])) { err("That spell doesn't exist."); } - $userrow["spell".$_POST["slot".$i]."id"] = $_POST["spell".$i]; - $userrow["spell".$_POST["slot".$i]."name"] = $spells[$_POST["spell".$i]]["name"]; - $userrow["levelspell"]--; + if ($_POST["spell".$i] != 0) { + if (!isset($spells[$_POST["spell".$i]])) { err("That spell doesn't exist."); } + $userrow["spell".$_POST["slot".$i]."id"] = $_POST["spell".$i]; + $userrow["spell".$_POST["slot".$i]."name"] = $spells[$_POST["spell".$i]]["name"]; + $userrow["levelspell"]--; + } } // Finish.