From a70f7ed93da31821fc145c21ddf1084ff068e5c3 Mon Sep 17 00:00:00 2001 From: Jamin Blount Date: Sun, 5 Feb 2017 11:00:00 -0600 Subject: [PATCH] v1.1.2 ### 1.1.2 (4.24.2004) ### - Fixed bug with default spell/town field contents. - Fixed bug with updating new spell on levelup. - Updated help file to point to new forums address. - Version info is now handled through lib.php, instead of config.php. --- config.php | 5 - fight.php | 2 +- help.php | 2 +- install.php | 4 +- lib.php | 5 +- upgrade_to_112.php | 361 +++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 368 insertions(+), 11 deletions(-) create mode 100644 upgrade_to_112.php diff --git a/config.php b/config.php index ef22de2..b1d2606 100644 --- a/config.php +++ b/config.php @@ -8,9 +8,4 @@ $dbsettings = Array( "prefix" => "dk", // Prefix for table names. (Default: dk) "secretword" => ""); // Secret word used when hashing information for cookies. -// 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.1.0"; -$build = ""; - ?> \ No newline at end of file diff --git a/fight.php b/fight.php index 8eb1279..8f9179a 100644 --- a/fight.php +++ b/fight.php @@ -388,7 +388,7 @@ function victory() { $newlevel = $levelrow["id"]; if ($levelrow[$userrow["charclass"]."_spells"] != 0) { - $userspells = $userrow["spells"] .= ",".$levelrow[$userrow["charclass"]."_spells"]; + $userspells = $userrow["spells"] . ",".$levelrow[$userrow["charclass"]."_spells"]; $newspell = "spells='$userspells',"; $spelltext = "You have learned a new spell.
"; } else { $spelltext = ""; $newspell=""; } diff --git a/help.php b/help.php index 58b733e..56b6512 100644 --- a/help.php +++ b/help.php @@ -312,7 +312,7 @@ the heal spell. These may not be used during fights, however - you have to use t Please visit the following sites for more information:
Se7enet (Jamin's homepage)
Dragon Knight (official DK homepage)
-Forums (official DK forums)

+Forums (official DK forums)

All original coding and graphics for the Dragon Knight game engine are © 2003-2004 by Jamin Seven.

[ Top ]

diff --git a/install.php b/install.php index 17c701f..d956bfc 100644 --- a/install.php +++ b/install.php @@ -698,8 +698,8 @@ CREATE TABLE `$users` ( `slot2name` varchar(30) NOT NULL default 'None', `slot3name` varchar(30) NOT NULL default 'None', `dropcode` mediumint(8) unsigned NOT NULL default '0', - `spells` varchar(50) NOT NULL default '0,', - `towns` varchar(50) NOT NULL default '0,', + `spells` varchar(50) NOT NULL default '0', + `towns` varchar(50) NOT NULL default '0', PRIMARY KEY (`id`) ) TYPE=MyISAM; END; diff --git a/lib.php b/lib.php index 04b396e..ba02926 100644 --- a/lib.php +++ b/lib.php @@ -2,6 +2,8 @@ $starttime = getmicrotime(); $numqueries = 0; +$version = "1.1.2"; +$build = ""; function opendb() { // Open database connection. @@ -91,8 +93,7 @@ function my_htmlspecialchars($text) { // Thanks to "etymxris at yahoo dot com" f function display($content, $title, $topnav=true, $leftnav=true, $rightnav=true, $badstart=false) { // Finalize page and output to browser. - include('config.php'); - global $numqueries, $userrow, $controlrow; + global $numqueries, $userrow, $controlrow, $version, $build; if (!isset($controlrow)) { $controlquery = doquery("SELECT * FROM {{table}} WHERE id='1' LIMIT 1", "control"); $controlrow = mysql_fetch_array($controlquery); diff --git a/upgrade_to_112.php b/upgrade_to_112.php new file mode 100644 index 0000000..ed59beb --- /dev/null +++ b/upgrade_to_112.php @@ -0,0 +1,361 @@ +"",2=>"",3=>""); +$levels["1"] = array( + 1=>"0", + 2=>"0,1", + 3=>"0,1", + 4=>"0,1,6", + 5=>"0,1,6", + 6=>"0,1,6", + 7=>"0,1,6,11", + 8=>"0,1,6,11", + 9=>"0,1,6,11,2", + 10=>"0,1,6,11,2", + 11=>"0,1,6,11,2", + 12=>"0,1,6,11,2,7", + 13=>"0,1,6,11,2,7", + 14=>"0,1,6,11,2,7,17", + 15=>"0,1,6,11,2,7,17", + 16=>"0,1,6,11,2,7,17", + 17=>"0,1,6,11,2,7,17,12", + 18=>"0,1,6,11,2,7,17,12", + 19=>"0,1,6,11,2,7,17,12", + 20=>"0,1,6,11,2,7,17,12", + 21=>"0,1,6,11,2,7,17,12", + 22=>"0,1,6,11,2,7,17,12", + 23=>"0,1,6,11,2,7,17,12", + 24=>"0,1,6,11,2,7,17,12", + 25=>"0,1,6,11,2,7,17,12,3", + 26=>"0,1,6,11,2,7,17,12,3", + 27=>"0,1,6,11,2,7,17,12,3", + 28=>"0,1,6,11,2,7,17,12,3", + 29=>"0,1,6,11,2,7,17,12,3", + 30=>"0,1,6,11,2,7,17,12,3", + 31=>"0,1,6,11,2,7,17,12,3,8", + 32=>"0,1,6,11,2,7,17,12,3,8", + 33=>"0,1,6,11,2,7,17,12,3,8", + 34=>"0,1,6,11,2,7,17,12,3,8", + 35=>"0,1,6,11,2,7,17,12,3,8", + 36=>"0,1,6,11,2,7,17,12,3,8,18", + 37=>"0,1,6,11,2,7,17,12,3,8,18", + 38=>"0,1,6,11,2,7,17,12,3,8,18", + 39=>"0,1,6,11,2,7,17,12,3,8,18", + 40=>"0,1,6,11,2,7,17,12,3,8,18,13", + 41=>"0,1,6,11,2,7,17,12,3,8,18,13", + 42=>"0,1,6,11,2,7,17,12,3,8,18,13", + 43=>"0,1,6,11,2,7,17,12,3,8,18,13", + 44=>"0,1,6,11,2,7,17,12,3,8,18,13", + 45=>"0,1,6,11,2,7,17,12,3,8,18,13,4", + 46=>"0,1,6,11,2,7,17,12,3,8,18,13,4", + 47=>"0,1,6,11,2,7,17,12,3,8,18,13,4", + 48=>"0,1,6,11,2,7,17,12,3,8,18,13,4", + 49=>"0,1,6,11,2,7,17,12,3,8,18,13,4", + 50=>"0,1,6,11,2,7,17,12,3,8,18,13,4", + 51=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9", + 52=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9", + 53=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9", + 54=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9", + 55=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9", + 56=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9", + 57=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9", + 58=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9", + 59=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9", + 60=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19", + 61=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19", + 62=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19", + 63=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19", + 64=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19", + 65=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19", + 66=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19", + 67=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19", + 68=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19", + 69=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19", + 70=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5", + 71=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5", + 72=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5", + 73=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5", + 74=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5", + 75=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5", + 76=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5", + 77=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5", + 78=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5", + 79=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5,10", + 80=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5,10", + 81=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5,10", + 82=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5,10", + 83=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5,10", + 84=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5,10", + 85=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5,10", + 86=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5,10", + 87=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5,10", + 88=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5,10", + 89=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5,10", + 90=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5,10", + 91=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5,10", + 92=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5,10", + 93=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5,10", + 94=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5,10", + 95=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5,10", + 96=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5,10", + 97=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5,10", + 98=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5,10", + 99=>"0,1,6,11,2,7,17,12,3,8,18,13,4,9,19,5,10"); + +$levels["2"] = array( + 1=>"0", + 2=>"0,1", + 3=>"0,1", + 4=>"0,1", + 5=>"0,1,6", + 6=>"0,1,6", + 7=>"0,1,6", + 8=>"0,1,6,11", + 9=>"0,1,6,11", + 10=>"0,1,6,11", + 11=>"0,1,6,11,2", + 12=>"0,1,6,11,2", + 13=>"0,1,6,11,2", + 14=>"0,1,6,11,2,7", + 15=>"0,1,6,11,2,7", + 16=>"0,1,6,11,2,7", + 17=>"0,1,6,11,2,7", + 18=>"0,1,6,11,2,7,14", + 19=>"0,1,6,11,2,7,14", + 20=>"0,1,6,11,2,7,14", + 21=>"0,1,6,11,2,7,14", + 22=>"0,1,6,11,2,7,14,12", + 23=>"0,1,6,11,2,7,14,12", + 24=>"0,1,6,11,2,7,14,12", + 25=>"0,1,6,11,2,7,14,12,17", + 26=>"0,1,6,11,2,7,14,12,17", + 27=>"0,1,6,11,2,7,14,12,17", + 28=>"0,1,6,11,2,7,14,12,17", + 29=>"0,1,6,11,2,7,14,12,17,3", + 30=>"0,1,6,11,2,7,14,12,17,3", + 31=>"0,1,6,11,2,7,14,12,17,3", + 32=>"0,1,6,11,2,7,14,12,17,3", + 33=>"0,1,6,11,2,7,14,12,17,3", + 34=>"0,1,6,11,2,7,14,12,17,3,8", + 35=>"0,1,6,11,2,7,14,12,17,3,8", + 36=>"0,1,6,11,2,7,14,12,17,3,8", + 37=>"0,1,6,11,2,7,14,12,17,3,8", + 38=>"0,1,6,11,2,7,14,12,17,3,8,15", + 39=>"0,1,6,11,2,7,14,12,17,3,8,15", + 40=>"0,1,6,11,2,7,14,12,17,3,8,15", + 41=>"0,1,6,11,2,7,14,12,17,3,8,15", + 42=>"0,1,6,11,2,7,14,12,17,3,8,15", + 43=>"0,1,6,11,2,7,14,12,17,3,8,15", + 44=>"0,1,6,11,2,7,14,12,17,3,8,15", + 45=>"0,1,6,11,2,7,14,12,17,3,8,15,18", + 46=>"0,1,6,11,2,7,14,12,17,3,8,15,18", + 47=>"0,1,6,11,2,7,14,12,17,3,8,15,18", + 48=>"0,1,6,11,2,7,14,12,17,3,8,15,18", + 49=>"0,1,6,11,2,7,14,12,17,3,8,15,18", + 50=>"0,1,6,11,2,7,14,12,17,3,8,15,18", + 51=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13", + 52=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13", + 53=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13", + 54=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13", + 55=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13", + 56=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13", + 57=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13", + 58=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19", + 59=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19", + 60=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19", + 61=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19", + 62=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19", + 63=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19", + 64=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19", + 65=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19", + 66=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19", + 67=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19", + 68=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19", + 69=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19", + 70=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 71=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 72=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 73=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 74=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 75=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 76=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 77=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 78=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 79=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 80=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 81=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 82=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 83=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 84=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 85=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 86=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 87=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 88=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 89=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 90=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 91=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 92=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 93=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 94=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 95=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 96=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 97=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 98=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16", + 99=>"0,1,6,11,2,7,14,12,17,3,8,15,18,13,19,16"); + +$levels["3"] = array( + 1=>"0", + 2=>"0,1", + 3=>"0,1", + 4=>"0,1", + 5=>"0,1,6", + 6=>"0,1,6", + 7=>"0,1,6", + 8=>"0,1,6,11", + 9=>"0,1,6,11", + 10=>"0,1,6,11", + 11=>"0,1,6,11,2", + 12=>"0,1,6,11,2", + 13=>"0,1,6,11,2", + 14=>"0,1,6,11,2,7", + 15=>"0,1,6,11,2,7", + 16=>"0,1,6,11,2,7", + 17=>"0,1,6,11,2,7", + 18=>"0,1,6,11,2,7,17", + 19=>"0,1,6,11,2,7,17", + 20=>"0,1,6,11,2,7,17", + 21=>"0,1,6,11,2,7,17", + 22=>"0,1,6,11,2,7,17,12", + 23=>"0,1,6,11,2,7,17,12", + 24=>"0,1,6,11,2,7,17,12", + 25=>"0,1,6,11,2,7,17,12,14", + 26=>"0,1,6,11,2,7,17,12,14", + 27=>"0,1,6,11,2,7,17,12,14", + 28=>"0,1,6,11,2,7,17,12,14", + 29=>"0,1,6,11,2,7,17,12,14,3", + 30=>"0,1,6,11,2,7,17,12,14,3", + 31=>"0,1,6,11,2,7,17,12,14,3", + 32=>"0,1,6,11,2,7,17,12,14,3", + 33=>"0,1,6,11,2,7,17,12,14,3", + 34=>"0,1,6,11,2,7,17,12,14,3,8", + 35=>"0,1,6,11,2,7,17,12,14,3,8", + 36=>"0,1,6,11,2,7,17,12,14,3,8", + 37=>"0,1,6,11,2,7,17,12,14,3,8", + 38=>"0,1,6,11,2,7,17,12,14,3,8,18", + 39=>"0,1,6,11,2,7,17,12,14,3,8,18", + 40=>"0,1,6,11,2,7,17,12,14,3,8,18", + 41=>"0,1,6,11,2,7,17,12,14,3,8,18", + 42=>"0,1,6,11,2,7,17,12,14,3,8,18", + 43=>"0,1,6,11,2,7,17,12,14,3,8,18", + 44=>"0,1,6,11,2,7,17,12,14,3,8,18", + 45=>"0,1,6,11,2,7,17,12,14,3,8,18,4", + 46=>"0,1,6,11,2,7,17,12,14,3,8,18,4", + 47=>"0,1,6,11,2,7,17,12,14,3,8,18,4", + 48=>"0,1,6,11,2,7,17,12,14,3,8,18,4", + 49=>"0,1,6,11,2,7,17,12,14,3,8,18,4", + 50=>"0,1,6,11,2,7,17,12,14,3,8,18,4", + 51=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13", + 52=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13", + 53=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13", + 54=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13", + 55=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13", + 56=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9", + 57=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9", + 58=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9", + 59=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9", + 60=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 61=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 62=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 63=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 64=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 65=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 66=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 67=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 68=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 69=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 70=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 71=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 72=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 73=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 74=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 75=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 76=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 77=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 78=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 79=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 80=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 81=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 82=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 83=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 84=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 85=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 86=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 87=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 88=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 89=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 90=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 91=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 92=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 93=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 94=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 95=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 96=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 97=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 98=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15", + 99=>"0,1,6,11,2,7,17,12,14,3,8,18,4,13,9,15"); + +$errors = 0; $errorlist = ""; + +$mainquery = mysql_query("SELECT id,level,charclass,spells FROM $users ORDER BY id"); +while ($mainrow = mysql_fetch_array($mainquery)) { + $level = $mainrow["level"]; + $charclass = $mainrow["charclass"]; + $newspell = $levels[$charclass][$level]; + $newquery = mysql_query("UPDATE $users SET spells='$newspell' WHERE id='".$mainrow["id"]."' LIMIT 1"); + if ($newquery != true) { + $errors++; $errorlist .= mysql_error() . "
"; + } +} + +$users = $prefix . "_users"; +$query = <<"; } else { $errors++; $errorlist .= "Error upgrading Users table.
"; } +unset($query); + +if ($errors == 0) { echo "
Upgrade finished."; } else { echo $errorlist; } + +} else { + + echo "Click the button below to run the upgrade script.
"; + die(); + +} + +?> \ No newline at end of file