diff --git a/config.php b/config.php
index ac1aefa..5900948 100644
--- a/config.php
+++ b/config.php
@@ -10,7 +10,7 @@ $dbsettings = Array(
// These are used for display purposes only. Technically you could change them, but it's not going to
// do anything special. And I'd prefer if you didn't, just to keep things all nice and standardized.
-$version = "1.0.3";
+$version = "1.0.4";
$build = "";
?>
\ No newline at end of file
diff --git a/fight.php b/fight.php
index 6ea3915..3b5d780 100644
--- a/fight.php
+++ b/fight.php
@@ -361,8 +361,8 @@ function victory() {
if ($userrow["difficulty"] == 2) { $gold = ceil($gold * $controlrow["diff2mod"]); }
if ($userrow["difficulty"] == 3) { $gold = ceil($gold * $controlrow["diff3mod"]); }
if ($userrow["goldbonus"] != 0) { $gold += ceil(($userrow["goldbonus"]/100)*$exp); }
- $newexp = $userrow["experience"] + $exp;
- $newgold = $userrow["gold"] + $gold;
+ if ($userrow["experience"] + $exp < 16777215) { $newexp = $userrow["experience"] + $exp; $warnexp = ""; } else { $newexp = $userrow["experience"]; $exp = 0; $warnexp = "You have maxed out your experience points."; }
+ if ($userrow["gold"] + $gold < 16777215) { $newgold = $userrow["gold"] + $gold; $warngold = ""; } else { $newgold = $userrow["gold"]; $gold = 0; $warngold = "You have maxed out your experience points."; }
$levelquery = doquery("SELECT * FROM {{table}} WHERE id='".($userrow["level"]+1)."' LIMIT 1", "levels");
if (mysql_num_rows($levelquery) == 1) { $levelrow = mysql_fetch_array($levelquery); }
@@ -386,8 +386,9 @@ function victory() {
$spelltext = "You have learned a new spell.
";
} else { $spelltext = ""; $newspell=""; }
- $page = "Congratulations. You have defeated the ".$monsterrow["name"].".
You gain $exp experience.
You gain $gold gold.
You have gained a level!
You gain ".$levelrow[$userrow["charclass"]."_hp"]." hit points.
You gain ".$levelrow[$userrow["charclass"]."_mp"]." magic points.
You gain ".$levelrow[$userrow["charclass"]."_tp"]." travel points.
You gain ".$levelrow[$userrow["charclass"]."_strength"]." strength.
You gain ".$levelrow[$userrow["charclass"]."_dexterity"]." dexterity.
$spelltext
You can now continue exploring.";
+ $page = "Congratulations. You have defeated the ".$monsterrow["name"].".
You gain $exp experience. $warnexp
You gain $gold gold. $warngold
You have gained a level!
You gain ".$levelrow[$userrow["charclass"]."_hp"]." hit points.
You gain ".$levelrow[$userrow["charclass"]."_mp"]." magic points.
You gain ".$levelrow[$userrow["charclass"]."_tp"]." travel points.
You gain ".$levelrow[$userrow["charclass"]."_strength"]." strength.
You gain ".$levelrow[$userrow["charclass"]."_dexterity"]." dexterity.
$spelltext
You can now continue exploring.";
$title = "Courage and Wit have served thee well!";
+ $dropcode = "";
} else {
$newhp = $userrow["maxhp"];
$newmp = $userrow["maxmp"];
@@ -398,7 +399,7 @@ function victory() {
$newdefense = $userrow["defensepower"];
$newlevel = $userrow["level"];
$newspell = "";
- $page = "Congratulations. You have defeated the ".$monsterrow["name"].".
You gain $exp experience.
You gain $gold gold.
";
+ $page = "Congratulations. You have defeated the ".$monsterrow["name"].".
You gain $exp experience. $warnexp
You gain $gold gold. $warngold
";
if (rand(1,30) == 1) {
$dropquery = doquery("SELECT * FROM {{table}} WHERE mlevel <= '".$monsterrow["level"]."' ORDER BY RAND() LIMIT 1", "drops");
diff --git a/index.php b/index.php
index 2ba4283..473e833 100644
--- a/index.php
+++ b/index.php
@@ -132,7 +132,7 @@ function showchar() {
$levelquery = doquery("SELECT ". $userrow["charclass"]."_exp FROM {{table}} WHERE id='".($userrow["level"]+1)."' LIMIT 1", "levels");
$levelrow = mysql_fetch_array($levelquery);
- $userrow["nextlevel"] = number_format($levelrow[$userrow["charclass"]."_exp"]);
+ if ($userrow["level"] < 99) { $userrow["nextlevel"] = number_format($levelrow[$userrow["charclass"]."_exp"]); } else { $userrow["nextlevel"] = "None"; }
if ($userrow["charclass"] == 1) { $userrow["charclass"] = $controlrow["class1name"]; }
elseif ($userrow["charclass"] == 2) { $userrow["charclass"] = $controlrow["class2name"]; }
@@ -248,10 +248,11 @@ function babblebox() {
$babblebox = array("content"=>"");
$bg = 1;
- $babblequery = doquery("SELECT * FROM {{table}} ORDER BY id LIMIT 20", "babble");
+ $babblequery = doquery("SELECT * FROM {{table}} ORDER BY id DESC LIMIT 20", "babble");
while ($babblerow = mysql_fetch_array($babblequery)) {
- if ($bg == 1) { $babblebox["content"] .= "
Powered by Dragon Knight | © 2003 by renderse7en | {{totaltime}} Seconds, {{numqueries}} Queries | Version {{version}}, {{build}} | +Powered by Dragon Knight | © 2003 by renderse7en | {{totaltime}} Seconds, {{numqueries}} Queries | Version {{version}} {{build}} |