Completely rework help page
This commit is contained in:
parent
9df90861e2
commit
2b6ec4d4ab
512
public/admin.php
512
public/admin.php
|
@ -33,7 +33,7 @@ if (isset($_GET["do"])) {
|
|||
|
||||
function donothing() {
|
||||
|
||||
$page = "Welcome to the Dragon Knight Administration section. Use the links on the left bar to control and edit various elements of the game.<br /><br />Please note that the control panel has been created mostly as a shortcut for certain individual settings. It is meant for use primarily with editing one thing at a time. If you need to completely replace an entire table (say, to replace all stock monsters with your own new ones), it is suggested that you use a more in-depth database tool such as <a href=\"http://www.phpmyadmin.net\" target=\"_new\">phpMyAdmin</a>. Also, you may want to have a copy of the Dragon Knight development kit, available from the <a href=\"http://dragon.se7enet.com/dev.php\">Dragon Knight homepage</a>.<br /><br />Also, you should be aware that certain portions of the DK code are dependent on the formatting of certain database results (for example, the special attributes on item drops). While I have attempted to point these out throughout the admin script, you should definitely pay attention and be careful when editing some fields, because mistakes in the database content may result in script errors or your game breaking completely.";
|
||||
$page = "Welcome to the Dragon Knight Administration section. Use the links on the left bar to control and edit various elements of the game.<br><br>Please note that the control panel has been created mostly as a shortcut for certain individual settings. It is meant for use primarily with editing one thing at a time. If you need to completely replace an entire table (say, to replace all stock monsters with your own new ones), it is suggested that you use a more in-depth database tool such as <a href=\"http://www.phpmyadmin.net\" target=\"_new\">phpMyAdmin</a>. Also, you may want to have a copy of the Dragon Knight development kit, available from the <a href=\"http://dragon.se7enet.com/dev.php\">Dragon Knight homepage</a>.<br><br>Also, you should be aware that certain portions of the DK code are dependent on the formatting of certain database results (for example, the special attributes on item drops). While I have attempted to point these out throughout the admin script, you should definitely pay attention and be careful when editing some fields, because mistakes in the database content may result in script errors or your game breaking completely.";
|
||||
admindisplay($page, "Admin Home");
|
||||
|
||||
}
|
||||
|
@ -44,44 +44,44 @@ function main() {
|
|||
extract($_POST);
|
||||
$errors = 0;
|
||||
$errorlist = "";
|
||||
if ($gamename == "") { $errors++; $errorlist .= "Game name is required.<br />"; }
|
||||
if (($gamesize % 5) != 0) { $errors++; $errorlist .= "Map size must be divisible by five.<br />"; }
|
||||
if (!is_numeric($gamesize)) { $errors++; $errorlist .= "Map size must be a number.<br />"; }
|
||||
if ($forumtype == 2 && $forumaddress == "") { $errors++; $errorlist .= "You must specify a forum address when using the External setting.<br />"; }
|
||||
if ($class1name == "") { $errors++; $errorlist .= "Class 1 name is required.<br />"; }
|
||||
if ($class2name == "") { $errors++; $errorlist .= "Class 2 name is required.<br />"; }
|
||||
if ($class3name == "") { $errors++; $errorlist .= "Class 3 name is required.<br />"; }
|
||||
if ($gamename == "") { $errors++; $errorlist .= "Game name is required.<br>"; }
|
||||
if (($gamesize % 5) != 0) { $errors++; $errorlist .= "Map size must be divisible by five.<br>"; }
|
||||
if (!is_numeric($gamesize)) { $errors++; $errorlist .= "Map size must be a number.<br>"; }
|
||||
if ($forumtype == 2 && $forumaddress == "") { $errors++; $errorlist .= "You must specify a forum address when using the External setting.<br>"; }
|
||||
if ($class1name == "") { $errors++; $errorlist .= "Class 1 name is required.<br>"; }
|
||||
if ($class2name == "") { $errors++; $errorlist .= "Class 2 name is required.<br>"; }
|
||||
if ($class3name == "") { $errors++; $errorlist .= "Class 3 name is required.<br>"; }
|
||||
|
||||
if ($errors == 0) {
|
||||
$query = doquery("UPDATE {{table}} SET gamename='$gamename',gamesize='$gamesize',forumtype='$forumtype',forumaddress='$forumaddress',compression='$compression',class1name='$class1name',class2name='$class2name',class3name='$class3name',diff1name='$diff1name',diff2name='$diff2name',diff3name='$diff3name',diff2mod='$diff2mod',diff3mod='$diff3mod',gameopen='$gameopen',verifyemail='$verifyemail',gameurl='$gameurl',adminemail='$adminemail',shownews='$shownews',showonline='$showonline',showbabble='$showbabble' WHERE id='1' LIMIT 1", "control");
|
||||
admindisplay("Settings updated.","Main Settings");
|
||||
} else {
|
||||
admindisplay("<b>Errors:</b><br /><div style=\"color:red;\">$errorlist</div><br />Please go back and try again.", "Main Settings");
|
||||
admindisplay("<b>Errors:</b><br><div style=\"color:red;\">$errorlist</div><br>Please go back and try again.", "Main Settings");
|
||||
}
|
||||
}
|
||||
|
||||
global $controlrow;
|
||||
|
||||
$page = <<<END
|
||||
<b><u>Main Settings</u></b><br />
|
||||
These options control several major settings for the overall game engine.<br /><br />
|
||||
<b><u>Main Settings</u></b><br>
|
||||
These options control several major settings for the overall game engine.<br><br>
|
||||
<form action="admin.php?do=main" method="post">
|
||||
<table width="90%">
|
||||
<tr><td width="20%"><span class="highlight">Game Open:</span></td><td><select name="gameopen"><option value="1" {{open1select}}>Open</option><option value="0" {{open0select}}>Closed</option></select><br /><span class="small">Close the game if you are upgrading or working on settings and don't want to cause odd errors for end-users. Closing the game will completely halt all activity.</span></td></tr>
|
||||
<tr><td width="20%">Game Name:</td><td><input type="text" name="gamename" size="30" maxlength="50" value="{{gamename}}" /><br /><span class="small">Default is "Dragon Knight". Change this if you want to change to call your game something different.</span></td></tr>
|
||||
<tr><td width="20%">Game URL:</td><td><input type="text" name="gameurl" size="50" maxlength="100" value="{{gameurl}}" /><br /><span class="small">Please specify the full URL to your game installation ("http://www.server.com/dkpath/index.php"). This gets used in the registration email sent to users. If you leave this field blank or incorrect, users may not be able to register correctly.</span></td></tr>
|
||||
<tr><td width="20%">Admin Email:</td><td><input type="text" name="adminemail" size="30" maxlength="100" value="{{adminemail}}" /><br /><span class="small">Please specify your email address. This gets used when the game has to send an email to users.</span></td></tr>
|
||||
<tr><td width="20%">Map Size:</td><td><input type="text" name="gamesize" size="3" maxlength="3" value="{{gamesize}}" /><br /><span class="small">Default is 250. This is the size of each map quadrant. Note that monster levels increase every 5 spaces, so you should ensure that you have at least (map size / 5) monster levels total, otherwise there will be parts of the map without any monsters, or some monsters won't ever get used. Ex: with a map size of 250, you should have 50 monster levels total.</span></td></tr>
|
||||
<tr><td width="20%">Forum Type:</td><td><select name="forumtype"><option value="0" {{selecttype0}}>Disabled</option><option value="1" {{selecttype1}}>Internal</option><option value="2" {{selecttype2}}>External</option></select><br /><span class="small">'Disabled' removes the forum link. 'Internal' uses the built-in (and very stripped-down) forum program included with Dragon Knight, if you don't have your own forums software already installed. 'External' uses the address provided below and links to your own forums software.</span></td></tr>
|
||||
<tr><td width="20%">External Forum:</td><td><input type="text" name="forumaddress" size="30" maxlength="200" value="{{forumaddress}}" /><br /><span class="small">If the above value is set to 'External,' please specify the complete URL to your forums here.</span></td></tr>
|
||||
<tr><td width="20%">Page Compression:</td><td><select name="compression"><option value="0" {{selectcomp0}}>Disabled</option><option value="1" {{selectcomp1}}>Enabled</option></select><br /><span class="small">Enable page compression if it is supported by your server, and this will greatly reduce the amount of bandwidth required by the game.</span></td></tr>
|
||||
<tr><td width="20%">Email Verification:</td><td><select name="verifyemail"><option value="0" {{selectverify0}}>Disabled</option><option value="1" {{selectverify1}}>Enabled</option></select><br /><span class="small">Make users verify their email address for added security.</span></td></tr>
|
||||
<tr><td width="20%">Show News:</td><td><select name="shownews"><option value="0" {{selectnews0}}>No</option><option value="1" {{selectnews1}}>Yes</option></select><br /><span class="small">Toggle display of the Latest News box in towns.</td></tr>
|
||||
<tr><td width="20%">Show Who's Online:</td><td><select name="showonline"><option value="0" {{selectonline0}}>No</option><option value="1" {{selectonline1}}>Yes</option></select><br /><span class="small">Toggle display of the Who's Online box in towns.</span></td></tr>
|
||||
<tr><td width="20%">Show Babblebox:</td><td><select name="showbabble"><option value="0" {{selectbabble0}}>No</option><option value="1" {{selectbabble1}}>Yes</option></select><br /><span class="small">Toggle display of the Babble Box in towns.</span></td></tr>
|
||||
<tr><td width="20%">Class 1 Name:</td><td><input type="text" name="class1name" size="20" maxlength="50" value="{{class1name}}" /><br /></td></tr>
|
||||
<tr><td width="20%">Class 2 Name:</td><td><input type="text" name="class2name" size="20" maxlength="50" value="{{class2name}}" /><br /></td></tr>
|
||||
<tr><td width="20%">Class 3 Name:</td><td><input type="text" name="class3name" size="20" maxlength="50" value="{{class3name}}" /><br /></td></tr>
|
||||
<tr><td width="20%"><span class="highlight">Game Open:</span></td><td><select name="gameopen"><option value="1" {{open1select}}>Open</option><option value="0" {{open0select}}>Closed</option></select><br><span class="small">Close the game if you are upgrading or working on settings and don't want to cause odd errors for end-users. Closing the game will completely halt all activity.</span></td></tr>
|
||||
<tr><td width="20%">Game Name:</td><td><input type="text" name="gamename" size="30" maxlength="50" value="{{gamename}}" /><br><span class="small">Default is "Dragon Knight". Change this if you want to change to call your game something different.</span></td></tr>
|
||||
<tr><td width="20%">Game URL:</td><td><input type="text" name="gameurl" size="50" maxlength="100" value="{{gameurl}}" /><br><span class="small">Please specify the full URL to your game installation ("http://www.server.com/dkpath/index.php"). This gets used in the registration email sent to users. If you leave this field blank or incorrect, users may not be able to register correctly.</span></td></tr>
|
||||
<tr><td width="20%">Admin Email:</td><td><input type="text" name="adminemail" size="30" maxlength="100" value="{{adminemail}}" /><br><span class="small">Please specify your email address. This gets used when the game has to send an email to users.</span></td></tr>
|
||||
<tr><td width="20%">Map Size:</td><td><input type="text" name="gamesize" size="3" maxlength="3" value="{{gamesize}}" /><br><span class="small">Default is 250. This is the size of each map quadrant. Note that monster levels increase every 5 spaces, so you should ensure that you have at least (map size / 5) monster levels total, otherwise there will be parts of the map without any monsters, or some monsters won't ever get used. Ex: with a map size of 250, you should have 50 monster levels total.</span></td></tr>
|
||||
<tr><td width="20%">Forum Type:</td><td><select name="forumtype"><option value="0" {{selecttype0}}>Disabled</option><option value="1" {{selecttype1}}>Internal</option><option value="2" {{selecttype2}}>External</option></select><br><span class="small">'Disabled' removes the forum link. 'Internal' uses the built-in (and very stripped-down) forum program included with Dragon Knight, if you don't have your own forums software already installed. 'External' uses the address provided below and links to your own forums software.</span></td></tr>
|
||||
<tr><td width="20%">External Forum:</td><td><input type="text" name="forumaddress" size="30" maxlength="200" value="{{forumaddress}}" /><br><span class="small">If the above value is set to 'External,' please specify the complete URL to your forums here.</span></td></tr>
|
||||
<tr><td width="20%">Page Compression:</td><td><select name="compression"><option value="0" {{selectcomp0}}>Disabled</option><option value="1" {{selectcomp1}}>Enabled</option></select><br><span class="small">Enable page compression if it is supported by your server, and this will greatly reduce the amount of bandwidth required by the game.</span></td></tr>
|
||||
<tr><td width="20%">Email Verification:</td><td><select name="verifyemail"><option value="0" {{selectverify0}}>Disabled</option><option value="1" {{selectverify1}}>Enabled</option></select><br><span class="small">Make users verify their email address for added security.</span></td></tr>
|
||||
<tr><td width="20%">Show News:</td><td><select name="shownews"><option value="0" {{selectnews0}}>No</option><option value="1" {{selectnews1}}>Yes</option></select><br><span class="small">Toggle display of the Latest News box in towns.</td></tr>
|
||||
<tr><td width="20%">Show Who's Online:</td><td><select name="showonline"><option value="0" {{selectonline0}}>No</option><option value="1" {{selectonline1}}>Yes</option></select><br><span class="small">Toggle display of the Who's Online box in towns.</span></td></tr>
|
||||
<tr><td width="20%">Show Babblebox:</td><td><select name="showbabble"><option value="0" {{selectbabble0}}>No</option><option value="1" {{selectbabble1}}>Yes</option></select><br><span class="small">Toggle display of the Babble Box in towns.</span></td></tr>
|
||||
<tr><td width="20%">Class 1 Name:</td><td><input type="text" name="class1name" size="20" maxlength="50" value="{{class1name}}" /><br></td></tr>
|
||||
<tr><td width="20%">Class 2 Name:</td><td><input type="text" name="class2name" size="20" maxlength="50" value="{{class2name}}" /><br></td></tr>
|
||||
<tr><td width="20%">Class 3 Name:</td><td><input type="text" name="class3name" size="20" maxlength="50" value="{{class3name}}" /><br></td></tr>
|
||||
</table>
|
||||
<input type="submit" name="submit" value="Submit" /> <input type="reset" name="reset" value="Reset" />
|
||||
</form>
|
||||
|
@ -111,7 +111,7 @@ END;
|
|||
function items() {
|
||||
|
||||
$query = doquery("SELECT id,name FROM {{table}} ORDER BY id", "items");
|
||||
$page = "<b><u>Edit Items</u></b><br />Click an item's name to edit it.<br /><br /><table width=\"50%\">\n";
|
||||
$page = "<b><u>Edit Items</u></b><br>Click an item's name to edit it.<br><br><table width=\"50%\">\n";
|
||||
$count = 1;
|
||||
while ($row = mysql_fetch_array($query)) {
|
||||
if ($count == 1) { $page .= "<tr><td width=\"8%\" style=\"background-color: #eeeeee;\">".$row["id"]."</td><td style=\"background-color: #eeeeee;\"><a href=\"admin.php?do=edititem:".$row["id"]."\">".$row["name"]."</a></td></tr>\n"; $count = 2; }
|
||||
|
@ -130,18 +130,18 @@ function edititem($id) {
|
|||
extract($_POST);
|
||||
$errors = 0;
|
||||
$errorlist = "";
|
||||
if ($name == "") { $errors++; $errorlist .= "Name is required.<br />"; }
|
||||
if ($buycost == "") { $errors++; $errorlist .= "Cost is required.<br />"; }
|
||||
if (!is_numeric($buycost)) { $errors++; $errorlist .= "Cost must be a number.<br />"; }
|
||||
if ($attribute == "") { $errors++; $errorlist .= "Attribute is required.<br />"; }
|
||||
if (!is_numeric($attribute)) { $errors++; $errorlist .= "Attribute must be a number.<br />"; }
|
||||
if ($name == "") { $errors++; $errorlist .= "Name is required.<br>"; }
|
||||
if ($buycost == "") { $errors++; $errorlist .= "Cost is required.<br>"; }
|
||||
if (!is_numeric($buycost)) { $errors++; $errorlist .= "Cost must be a number.<br>"; }
|
||||
if ($attribute == "") { $errors++; $errorlist .= "Attribute is required.<br>"; }
|
||||
if (!is_numeric($attribute)) { $errors++; $errorlist .= "Attribute must be a number.<br>"; }
|
||||
if ($special == "" || $special == " ") { $special = "X"; }
|
||||
|
||||
if ($errors == 0) {
|
||||
$query = doquery("UPDATE {{table}} SET name='$name',type='$type',buycost='$buycost',attribute='$attribute',special='$special' WHERE id='$id' LIMIT 1", "items");
|
||||
admindisplay("Item updated.","Edit Items");
|
||||
} else {
|
||||
admindisplay("<b>Errors:</b><br /><div style=\"color:red;\">$errorlist</div><br />Please go back and try again.", "Edit Items");
|
||||
admindisplay("<b>Errors:</b><br><div style=\"color:red;\">$errorlist</div><br>Please go back and try again.", "Edit Items");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -151,29 +151,29 @@ function edititem($id) {
|
|||
$row = mysql_fetch_array($query);
|
||||
|
||||
$page = <<<END
|
||||
<b><u>Edit Items</u></b><br /><br />
|
||||
<b><u>Edit Items</u></b><br><br>
|
||||
<form action="admin.php?do=edititem:$id" method="post">
|
||||
<table width="90%">
|
||||
<tr><td width="20%">ID:</td><td>{{id}}</td></tr>
|
||||
<tr><td width="20%">Name:</td><td><input type="text" name="name" size="30" maxlength="30" value="{{name}}" /></td></tr>
|
||||
<tr><td width="20%">Type:</td><td><select name="type"><option value="1" {{type1select}}>Weapon</option><option value="2" {{type2select}}>Armor</option><option value="3" {{type3select}}>Shield</option></select></td></tr>
|
||||
<tr><td width="20%">Cost:</td><td><input type="text" name="buycost" size="5" maxlength="10" value="{{buycost}}" /> gold</td></tr>
|
||||
<tr><td width="20%">Attribute:</td><td><input type="text" name="attribute" size="5" maxlength="10" value="{{attribute}}" /><br /><span class="small">How much the item adds to total attackpower (weapons) or defensepower (armor/shields).</span></td></tr>
|
||||
<tr><td width="20%">Special:</td><td><input type="text" name="special" size="30" maxlength="50" value="{{special}}" /><br /><span class="small">Should be either a special code or <span class="highlight">X</span> to disable. Edit this field very carefully because mistakes to formatting or field names can create problems in the game.</span></td></tr>
|
||||
<tr><td width="20%">Attribute:</td><td><input type="text" name="attribute" size="5" maxlength="10" value="{{attribute}}" /><br><span class="small">How much the item adds to total attackpower (weapons) or defensepower (armor/shields).</span></td></tr>
|
||||
<tr><td width="20%">Special:</td><td><input type="text" name="special" size="30" maxlength="50" value="{{special}}" /><br><span class="small">Should be either a special code or <span class="highlight">X</span> to disable. Edit this field very carefully because mistakes to formatting or field names can create problems in the game.</span></td></tr>
|
||||
</table>
|
||||
<input type="submit" name="submit" value="Submit" /> <input type="reset" name="reset" value="Reset" />
|
||||
</form>
|
||||
<b>Special Codes:</b><br />
|
||||
Special codes can be added in the item's Special field to give it extra user attributes. Special codes are in the format <span class="highlight">attribute,value</span>. <span class="highlight">Attribute</span> can be any database field from the Users table - however, it is suggested that you only use the ones from the list below, otherwise things can get freaky. <span class="highlight">Value</span> may be any positive or negative whole number. For example, if you want a weapon to give an additional 50 max hit points, the special code would be <span class="highlight">maxhp,50</span>.<br /><br />
|
||||
Suggested user fields for special codes:<br />
|
||||
maxhp - max hit points<br />
|
||||
maxmp - max magic points<br />
|
||||
maxtp - max travel points<br />
|
||||
goldbonus - gold bonus, in percent<br />
|
||||
expbonus - experience bonus, in percent<br />
|
||||
strength - strength (which also adds to attackpower)<br />
|
||||
dexterity - dexterity (which also adds to defensepower)<br />
|
||||
attackpower - total attack power<br />
|
||||
<b>Special Codes:</b><br>
|
||||
Special codes can be added in the item's Special field to give it extra user attributes. Special codes are in the format <span class="highlight">attribute,value</span>. <span class="highlight">Attribute</span> can be any database field from the Users table - however, it is suggested that you only use the ones from the list below, otherwise things can get freaky. <span class="highlight">Value</span> may be any positive or negative whole number. For example, if you want a weapon to give an additional 50 max hit points, the special code would be <span class="highlight">maxhp,50</span>.<br><br>
|
||||
Suggested user fields for special codes:<br>
|
||||
maxhp - max hit points<br>
|
||||
maxmp - max magic points<br>
|
||||
maxtp - max travel points<br>
|
||||
goldbonus - gold bonus, in percent<br>
|
||||
expbonus - experience bonus, in percent<br>
|
||||
strength - strength (which also adds to attackpower)<br>
|
||||
dexterity - dexterity (which also adds to defensepower)<br>
|
||||
attackpower - total attack power<br>
|
||||
defensepower - total defense power
|
||||
END;
|
||||
|
||||
|
@ -189,7 +189,7 @@ END;
|
|||
function drops() {
|
||||
|
||||
$query = doquery("SELECT id,name FROM {{table}} ORDER BY id", "drops");
|
||||
$page = "<b><u>Edit Drops</u></b><br />Click an item's name to edit it.<br /><br /><table width=\"50%\">\n";
|
||||
$page = "<b><u>Edit Drops</u></b><br>Click an item's name to edit it.<br><br><table width=\"50%\">\n";
|
||||
$count = 1;
|
||||
while ($row = mysql_fetch_array($query)) {
|
||||
if ($count == 1) { $page .= "<tr><td width=\"8%\" style=\"background-color: #eeeeee;\">".$row["id"]."</td><td style=\"background-color: #eeeeee;\"><a href=\"admin.php?do=editdrop:".$row["id"]."\">".$row["name"]."</a></td></tr>\n"; $count = 2; }
|
||||
|
@ -208,17 +208,17 @@ function editdrop($id) {
|
|||
extract($_POST);
|
||||
$errors = 0;
|
||||
$errorlist = "";
|
||||
if ($name == "") { $errors++; $errorlist .= "Name is required.<br />"; }
|
||||
if ($mlevel == "") { $errors++; $errorlist .= "Monster level is required.<br />"; }
|
||||
if (!is_numeric($mlevel)) { $errors++; $errorlist .= "Monster level must be a number.<br />"; }
|
||||
if ($attribute1 == "" || $attribute1 == " " || $attribute1 == "X") { $errors++; $errorlist .= "First attribute is required.<br />"; }
|
||||
if ($name == "") { $errors++; $errorlist .= "Name is required.<br>"; }
|
||||
if ($mlevel == "") { $errors++; $errorlist .= "Monster level is required.<br>"; }
|
||||
if (!is_numeric($mlevel)) { $errors++; $errorlist .= "Monster level must be a number.<br>"; }
|
||||
if ($attribute1 == "" || $attribute1 == " " || $attribute1 == "X") { $errors++; $errorlist .= "First attribute is required.<br>"; }
|
||||
if ($attribute2 == "" || $attribute2 == " ") { $attribute2 = "X"; }
|
||||
|
||||
if ($errors == 0) {
|
||||
$query = doquery("UPDATE {{table}} SET name='$name',mlevel='$mlevel',attribute1='$attribute1',attribute2='$attribute2' WHERE id='$id' LIMIT 1", "drops");
|
||||
admindisplay("Item updated.","Edit Drops");
|
||||
} else {
|
||||
admindisplay("<b>Errors:</b><br /><div style=\"color:red;\">$errorlist</div><br />Please go back and try again.", "Edit Drops");
|
||||
admindisplay("<b>Errors:</b><br><div style=\"color:red;\">$errorlist</div><br>Please go back and try again.", "Edit Drops");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -228,28 +228,28 @@ function editdrop($id) {
|
|||
$row = mysql_fetch_array($query);
|
||||
|
||||
$page = <<<END
|
||||
<b><u>Edit Drops</u></b><br /><br />
|
||||
<b><u>Edit Drops</u></b><br><br>
|
||||
<form action="admin.php?do=editdrop:$id" method="post">
|
||||
<table width="90%">
|
||||
<tr><td width="20%">ID:</td><td>{{id}}</td></tr>
|
||||
<tr><td width="20%">Name:</td><td><input type="text" name="name" size="30" maxlength="30" value="{{name}}" /></td></tr>
|
||||
<tr><td width="20%">Monster Level:</td><td><input type="text" name="mlevel" size="5" maxlength="10" value="{{mlevel}}" /><br /><span class="small">Minimum monster level that will drop this item.</span></td></tr>
|
||||
<tr><td width="20%">Attribute 1:</td><td><input type="text" name="attribute1" size="30" maxlength="50" value="{{attribute1}}" /><br /><span class="small">Must be a special code. First attribute cannot be disabled. Edit this field very carefully because mistakes to formatting or field names can create problems in the game.</span></td></tr>
|
||||
<tr><td width="20%">Attribute 2:</td><td><input type="text" name="attribute2" size="30" maxlength="50" value="{{attribute2}}" /><br /><span class="small">Should be either a special code or <span class="highlight">X</span> to disable. Edit this field very carefully because mistakes to formatting or field names can create problems in the game.</span></td></tr>
|
||||
<tr><td width="20%">Monster Level:</td><td><input type="text" name="mlevel" size="5" maxlength="10" value="{{mlevel}}" /><br><span class="small">Minimum monster level that will drop this item.</span></td></tr>
|
||||
<tr><td width="20%">Attribute 1:</td><td><input type="text" name="attribute1" size="30" maxlength="50" value="{{attribute1}}" /><br><span class="small">Must be a special code. First attribute cannot be disabled. Edit this field very carefully because mistakes to formatting or field names can create problems in the game.</span></td></tr>
|
||||
<tr><td width="20%">Attribute 2:</td><td><input type="text" name="attribute2" size="30" maxlength="50" value="{{attribute2}}" /><br><span class="small">Should be either a special code or <span class="highlight">X</span> to disable. Edit this field very carefully because mistakes to formatting or field names can create problems in the game.</span></td></tr>
|
||||
</table>
|
||||
<input type="submit" name="submit" value="Submit" /> <input type="reset" name="reset" value="Reset" />
|
||||
</form>
|
||||
<b>Special Codes:</b><br />
|
||||
Special codes are used in the two attribute fields to give the item properties. The first attribute field must contain a special code, but the second one may be left empty ("X") if you wish. Special codes are in the format <span class="highlight">attribute,value</span>. <span class="highlight">Attribute</span> can be any database field from the Users table - however, it is suggested that you only use the ones from the list below, otherwise things can get freaky. <span class="highlight">Value</span> may be any positive or negative whole number. For example, if you want a weapon to give an additional 50 max hit points, the special code would be <span class="highlight">maxhp,50</span>.<br /><br />
|
||||
Suggested user fields for special codes:<br />
|
||||
maxhp - max hit points<br />
|
||||
maxmp - max magic points<br />
|
||||
maxtp - max travel points<br />
|
||||
goldbonus - gold bonus, in percent<br />
|
||||
expbonus - experience bonus, in percent<br />
|
||||
strength - strength (which also adds to attackpower)<br />
|
||||
dexterity - dexterity (which also adds to defensepower)<br />
|
||||
attackpower - total attack power<br />
|
||||
<b>Special Codes:</b><br>
|
||||
Special codes are used in the two attribute fields to give the item properties. The first attribute field must contain a special code, but the second one may be left empty ("X") if you wish. Special codes are in the format <span class="highlight">attribute,value</span>. <span class="highlight">Attribute</span> can be any database field from the Users table - however, it is suggested that you only use the ones from the list below, otherwise things can get freaky. <span class="highlight">Value</span> may be any positive or negative whole number. For example, if you want a weapon to give an additional 50 max hit points, the special code would be <span class="highlight">maxhp,50</span>.<br><br>
|
||||
Suggested user fields for special codes:<br>
|
||||
maxhp - max hit points<br>
|
||||
maxmp - max magic points<br>
|
||||
maxtp - max travel points<br>
|
||||
goldbonus - gold bonus, in percent<br>
|
||||
expbonus - experience bonus, in percent<br>
|
||||
strength - strength (which also adds to attackpower)<br>
|
||||
dexterity - dexterity (which also adds to defensepower)<br>
|
||||
attackpower - total attack power<br>
|
||||
defensepower - total defense power
|
||||
END;
|
||||
|
||||
|
@ -261,7 +261,7 @@ END;
|
|||
function towns() {
|
||||
|
||||
$query = doquery("SELECT id,name FROM {{table}} ORDER BY id", "towns");
|
||||
$page = "<b><u>Edit Towns</u></b><br />Click an town's name to edit it.<br /><br /><table width=\"50%\">\n";
|
||||
$page = "<b><u>Edit Towns</u></b><br>Click an town's name to edit it.<br><br><table width=\"50%\">\n";
|
||||
$count = 1;
|
||||
while ($row = mysql_fetch_array($query)) {
|
||||
if ($count == 1) { $page .= "<tr><td width=\"8%\" style=\"background-color: #eeeeee;\">".$row["id"]."</td><td style=\"background-color: #eeeeee;\"><a href=\"admin.php?do=edittown:".$row["id"]."\">".$row["name"]."</a></td></tr>\n"; $count = 2; }
|
||||
|
@ -280,25 +280,25 @@ function edittown($id) {
|
|||
extract($_POST);
|
||||
$errors = 0;
|
||||
$errorlist = "";
|
||||
if ($name == "") { $errors++; $errorlist .= "Name is required.<br />"; }
|
||||
if ($latitude == "") { $errors++; $errorlist .= "Latitude is required.<br />"; }
|
||||
if (!is_numeric($latitude)) { $errors++; $errorlist .= "Latitude must be a number.<br />"; }
|
||||
if ($longitude == "") { $errors++; $errorlist .= "Longitude is required.<br />"; }
|
||||
if (!is_numeric($longitude)) { $errors++; $errorlist .= "Longitude must be a number.<br />"; }
|
||||
if ($innprice == "") { $errors++; $errorlist .= "Inn Price is required.<br />"; }
|
||||
if (!is_numeric($innprice)) { $errors++; $errorlist .= "Inn Price must be a number.<br />"; }
|
||||
if ($mapprice == "") { $errors++; $errorlist .= "Map Price is required.<br />"; }
|
||||
if (!is_numeric($mapprice)) { $errors++; $errorlist .= "Map Price must be a number.<br />"; }
|
||||
if ($name == "") { $errors++; $errorlist .= "Name is required.<br>"; }
|
||||
if ($latitude == "") { $errors++; $errorlist .= "Latitude is required.<br>"; }
|
||||
if (!is_numeric($latitude)) { $errors++; $errorlist .= "Latitude must be a number.<br>"; }
|
||||
if ($longitude == "") { $errors++; $errorlist .= "Longitude is required.<br>"; }
|
||||
if (!is_numeric($longitude)) { $errors++; $errorlist .= "Longitude must be a number.<br>"; }
|
||||
if ($innprice == "") { $errors++; $errorlist .= "Inn Price is required.<br>"; }
|
||||
if (!is_numeric($innprice)) { $errors++; $errorlist .= "Inn Price must be a number.<br>"; }
|
||||
if ($mapprice == "") { $errors++; $errorlist .= "Map Price is required.<br>"; }
|
||||
if (!is_numeric($mapprice)) { $errors++; $errorlist .= "Map Price must be a number.<br>"; }
|
||||
|
||||
if ($travelpoints == "") { $errors++; $errorlist .= "Travel Points is required.<br />"; }
|
||||
if (!is_numeric($travelpoints)) { $errors++; $errorlist .= "Travel Points must be a number.<br />"; }
|
||||
if ($itemslist == "") { $errors++; $errorlist .= "Items List is required.<br />"; }
|
||||
if ($travelpoints == "") { $errors++; $errorlist .= "Travel Points is required.<br>"; }
|
||||
if (!is_numeric($travelpoints)) { $errors++; $errorlist .= "Travel Points must be a number.<br>"; }
|
||||
if ($itemslist == "") { $errors++; $errorlist .= "Items List is required.<br>"; }
|
||||
|
||||
if ($errors == 0) {
|
||||
$query = doquery("UPDATE {{table}} SET name='$name',latitude='$latitude',longitude='$longitude',innprice='$innprice',mapprice='$mapprice',travelpoints='$travelpoints',itemslist='$itemslist' WHERE id='$id' LIMIT 1", "towns");
|
||||
admindisplay("Town updated.","Edit Towns");
|
||||
} else {
|
||||
admindisplay("<b>Errors:</b><br /><div style=\"color:red;\">$errorlist</div><br />Please go back and try again.", "Edit Towns");
|
||||
admindisplay("<b>Errors:</b><br><div style=\"color:red;\">$errorlist</div><br>Please go back and try again.", "Edit Towns");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -308,17 +308,17 @@ function edittown($id) {
|
|||
$row = mysql_fetch_array($query);
|
||||
|
||||
$page = <<<END
|
||||
<b><u>Edit Towns</u></b><br /><br />
|
||||
<b><u>Edit Towns</u></b><br><br>
|
||||
<form action="admin.php?do=edittown:$id" method="post">
|
||||
<table width="90%">
|
||||
<tr><td width="20%">ID:</td><td>{{id}}</td></tr>
|
||||
<tr><td width="20%">Name:</td><td><input type="text" name="name" size="30" maxlength="30" value="{{name}}" /></td></tr>
|
||||
<tr><td width="20%">Latitude:</td><td><input type="text" name="latitude" size="5" maxlength="10" value="{{latitude}}" /><br /><span class="small">Positive or negative integer.</span></td></tr>
|
||||
<tr><td width="20%">Longitude:</td><td><input type="text" name="longitude" size="5" maxlength="10" value="{{longitude}}" /><br /><span class="small">Positive or negative integer.</span></td></tr>
|
||||
<tr><td width="20%">Latitude:</td><td><input type="text" name="latitude" size="5" maxlength="10" value="{{latitude}}" /><br><span class="small">Positive or negative integer.</span></td></tr>
|
||||
<tr><td width="20%">Longitude:</td><td><input type="text" name="longitude" size="5" maxlength="10" value="{{longitude}}" /><br><span class="small">Positive or negative integer.</span></td></tr>
|
||||
<tr><td width="20%">Inn Price:</td><td><input type="text" name="innprice" size="5" maxlength="10" value="{{innprice}}" /> gold</td></tr>
|
||||
<tr><td width="20%">Map Price:</td><td><input type="text" name="mapprice" size="5" maxlength="10" value="{{mapprice}}" /> gold<br /><span class="small">How much it costs to buy the map to this town.</span></td></tr>
|
||||
<tr><td width="20%">Travel Points:</td><td><input type="text" name="travelpoints" size="5" maxlength="10" value="{{travelpoints}}" /><br /><span class="small">How many TP are consumed when travelling to this town.</span></td></tr>
|
||||
<tr><td width="20%">Items List:</td><td><input type="text" name="itemslist" size="30" maxlength="200" value="{{itemslist}}" /><br /><span class="small">Comma-separated list of item ID numbers available for purchase at this town. (Example: <span class="highlight">1,2,3,6,9,10,13,20</span>)</span></td></tr>
|
||||
<tr><td width="20%">Map Price:</td><td><input type="text" name="mapprice" size="5" maxlength="10" value="{{mapprice}}" /> gold<br><span class="small">How much it costs to buy the map to this town.</span></td></tr>
|
||||
<tr><td width="20%">Travel Points:</td><td><input type="text" name="travelpoints" size="5" maxlength="10" value="{{travelpoints}}" /><br><span class="small">How many TP are consumed when travelling to this town.</span></td></tr>
|
||||
<tr><td width="20%">Items List:</td><td><input type="text" name="itemslist" size="30" maxlength="200" value="{{itemslist}}" /><br><span class="small">Comma-separated list of item ID numbers available for purchase at this town. (Example: <span class="highlight">1,2,3,6,9,10,13,20</span>)</span></td></tr>
|
||||
</table>
|
||||
<input type="submit" name="submit" value="Submit" /> <input type="reset" name="reset" value="Reset" />
|
||||
</form>
|
||||
|
@ -337,13 +337,13 @@ function monsters() {
|
|||
$statrow = mysql_fetch_array($statquery);
|
||||
|
||||
$query = doquery("SELECT id,name FROM {{table}} ORDER BY id", "monsters");
|
||||
$page = "<b><u>Edit Monsters</u></b><br />";
|
||||
$page = "<b><u>Edit Monsters</u></b><br>";
|
||||
|
||||
if (($controlrow["gamesize"]/5) != $statrow["level"]) {
|
||||
$page .= "<span class=\"highlight\">Note:</span> Your highest monster level does not match with your entered map size. Highest monster level should be ".($controlrow["gamesize"]/5).", yours is ".$statrow["level"].". Please fix this before opening the game to the public.<br /><br />";
|
||||
} else { $page .= "Monster level and map size match. No further actions are required for map compatibility.<br /><br />"; }
|
||||
$page .= "<span class=\"highlight\">Note:</span> Your highest monster level does not match with your entered map size. Highest monster level should be ".($controlrow["gamesize"]/5).", yours is ".$statrow["level"].". Please fix this before opening the game to the public.<br><br>";
|
||||
} else { $page .= "Monster level and map size match. No further actions are required for map compatibility.<br><br>"; }
|
||||
|
||||
$page .= "Click an monster's name to edit it.<br /><br /><table width=\"50%\">\n";
|
||||
$page .= "Click an monster's name to edit it.<br><br><table width=\"50%\">\n";
|
||||
$count = 1;
|
||||
while ($row = mysql_fetch_array($query)) {
|
||||
if ($count == 1) { $page .= "<tr><td width=\"8%\" style=\"background-color: #eeeeee;\">".$row["id"]."</td><td style=\"background-color: #eeeeee;\"><a href=\"admin.php?do=editmonster:".$row["id"]."\">".$row["name"]."</a></td></tr>\n"; $count = 2; }
|
||||
|
@ -362,25 +362,25 @@ function editmonster($id) {
|
|||
extract($_POST);
|
||||
$errors = 0;
|
||||
$errorlist = "";
|
||||
if ($name == "") { $errors++; $errorlist .= "Name is required.<br />"; }
|
||||
if ($maxhp == "") { $errors++; $errorlist .= "Max HP is required.<br />"; }
|
||||
if (!is_numeric($maxhp)) { $errors++; $errorlist .= "Max HP must be a number.<br />"; }
|
||||
if ($maxdam == "") { $errors++; $errorlist .= "Max Damage is required.<br />"; }
|
||||
if (!is_numeric($maxdam)) { $errors++; $errorlist .= "Max Damage must be a number.<br />"; }
|
||||
if ($armor == "") { $errors++; $errorlist .= "Armor is required.<br />"; }
|
||||
if (!is_numeric($armor)) { $errors++; $errorlist .= "Armor must be a number.<br />"; }
|
||||
if ($level == "") { $errors++; $errorlist .= "Monster Level is required.<br />"; }
|
||||
if (!is_numeric($level)) { $errors++; $errorlist .= "Monster Level must be a number.<br />"; }
|
||||
if ($maxexp == "") { $errors++; $errorlist .= "Max Exp is required.<br />"; }
|
||||
if (!is_numeric($maxexp)) { $errors++; $errorlist .= "Max Exp must be a number.<br />"; }
|
||||
if ($maxgold == "") { $errors++; $errorlist .= "Max Gold is required.<br />"; }
|
||||
if (!is_numeric($maxgold)) { $errors++; $errorlist .= "Max Gold must be a number.<br />"; }
|
||||
if ($name == "") { $errors++; $errorlist .= "Name is required.<br>"; }
|
||||
if ($maxhp == "") { $errors++; $errorlist .= "Max HP is required.<br>"; }
|
||||
if (!is_numeric($maxhp)) { $errors++; $errorlist .= "Max HP must be a number.<br>"; }
|
||||
if ($maxdam == "") { $errors++; $errorlist .= "Max Damage is required.<br>"; }
|
||||
if (!is_numeric($maxdam)) { $errors++; $errorlist .= "Max Damage must be a number.<br>"; }
|
||||
if ($armor == "") { $errors++; $errorlist .= "Armor is required.<br>"; }
|
||||
if (!is_numeric($armor)) { $errors++; $errorlist .= "Armor must be a number.<br>"; }
|
||||
if ($level == "") { $errors++; $errorlist .= "Monster Level is required.<br>"; }
|
||||
if (!is_numeric($level)) { $errors++; $errorlist .= "Monster Level must be a number.<br>"; }
|
||||
if ($maxexp == "") { $errors++; $errorlist .= "Max Exp is required.<br>"; }
|
||||
if (!is_numeric($maxexp)) { $errors++; $errorlist .= "Max Exp must be a number.<br>"; }
|
||||
if ($maxgold == "") { $errors++; $errorlist .= "Max Gold is required.<br>"; }
|
||||
if (!is_numeric($maxgold)) { $errors++; $errorlist .= "Max Gold must be a number.<br>"; }
|
||||
|
||||
if ($errors == 0) {
|
||||
$query = doquery("UPDATE {{table}} SET name='$name',maxhp='$maxhp',maxdam='$maxdam',armor='$armor',level='$level',maxexp='$maxexp',maxgold='$maxgold',immune='$immune' WHERE id='$id' LIMIT 1", "monsters");
|
||||
admindisplay("Monster updated.","Edit monsters");
|
||||
} else {
|
||||
admindisplay("<b>Errors:</b><br /><div style=\"color:red;\">$errorlist</div><br />Please go back and try again.", "Edit monsters");
|
||||
admindisplay("<b>Errors:</b><br><div style=\"color:red;\">$errorlist</div><br>Please go back and try again.", "Edit monsters");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -390,18 +390,18 @@ function editmonster($id) {
|
|||
$row = mysql_fetch_array($query);
|
||||
|
||||
$page = <<<END
|
||||
<b><u>Edit Monsters</u></b><br /><br />
|
||||
<b><u>Edit Monsters</u></b><br><br>
|
||||
<form action="admin.php?do=editmonster:$id" method="post">
|
||||
<table width="90%">
|
||||
<tr><td width="20%">ID:</td><td>{{id}}</td></tr>
|
||||
<tr><td width="20%">Name:</td><td><input type="text" name="name" size="30" maxlength="30" value="{{name}}" /></td></tr>
|
||||
<tr><td width="20%">Max Hit Points:</td><td><input type="text" name="maxhp" size="5" maxlength="10" value="{{maxhp}}" /></td></tr>
|
||||
<tr><td width="20%">Max Damage:</td><td><input type="text" name="maxdam" size="5" maxlength="10" value="{{maxdam}}" /><br /><span class="small">Compares to player's attackpower.</span></td></tr>
|
||||
<tr><td width="20%">Armor:</td><td><input type="text" name="armor" size="5" maxlength="10" value="{{armor}}" /><br /><span class="small">Compares to player's defensepower.</span></td></tr>
|
||||
<tr><td width="20%">Monster Level:</td><td><input type="text" name="level" size="5" maxlength="10" value="{{level}}" /><br /><span class="small">Determines spawn location and item drops.</span></td></tr>
|
||||
<tr><td width="20%">Max Experience:</td><td><input type="text" name="maxexp" size="5" maxlength="10" value="{{maxexp}}" /><br /><span class="small">Max experience gained from defeating monster.</span></td></tr>
|
||||
<tr><td width="20%">Max Gold:</td><td><input type="text" name="maxgold" size="5" maxlength="10" value="{{maxgold}}" /><br /><span class="small">Max gold gained from defeating monster.</span></td></tr>
|
||||
<tr><td width="20%">Immunity:</td><td><select name="immune"><option value="0" {{immune0select}}>None</option><option value="1" {{immune1select}}>Hurt Spells</option><option value="2" {{immune2select}}>Hurt & Sleep Spells</option></select><br /><span class="small">Some monsters may not be hurt by certain spells.</span></td></tr>
|
||||
<tr><td width="20%">Max Damage:</td><td><input type="text" name="maxdam" size="5" maxlength="10" value="{{maxdam}}" /><br><span class="small">Compares to player's attackpower.</span></td></tr>
|
||||
<tr><td width="20%">Armor:</td><td><input type="text" name="armor" size="5" maxlength="10" value="{{armor}}" /><br><span class="small">Compares to player's defensepower.</span></td></tr>
|
||||
<tr><td width="20%">Monster Level:</td><td><input type="text" name="level" size="5" maxlength="10" value="{{level}}" /><br><span class="small">Determines spawn location and item drops.</span></td></tr>
|
||||
<tr><td width="20%">Max Experience:</td><td><input type="text" name="maxexp" size="5" maxlength="10" value="{{maxexp}}" /><br><span class="small">Max experience gained from defeating monster.</span></td></tr>
|
||||
<tr><td width="20%">Max Gold:</td><td><input type="text" name="maxgold" size="5" maxlength="10" value="{{maxgold}}" /><br><span class="small">Max gold gained from defeating monster.</span></td></tr>
|
||||
<tr><td width="20%">Immunity:</td><td><select name="immune"><option value="0" {{immune0select}}>None</option><option value="1" {{immune1select}}>Hurt Spells</option><option value="2" {{immune2select}}>Hurt & Sleep Spells</option></select><br><span class="small">Some monsters may not be hurt by certain spells.</span></td></tr>
|
||||
</table>
|
||||
<input type="submit" name="submit" value="Submit" /> <input type="reset" name="reset" value="Reset" />
|
||||
</form>
|
||||
|
@ -419,7 +419,7 @@ END;
|
|||
function spells() {
|
||||
|
||||
$query = doquery("SELECT id,name FROM {{table}} ORDER BY id", "spells");
|
||||
$page = "<b><u>Edit Spells</u></b><br />Click an spell's name to edit it.<br /><br /><table width=\"50%\">\n";
|
||||
$page = "<b><u>Edit Spells</u></b><br>Click an spell's name to edit it.<br><br><table width=\"50%\">\n";
|
||||
$count = 1;
|
||||
while ($row = mysql_fetch_array($query)) {
|
||||
if ($count == 1) { $page .= "<tr><td width=\"8%\" style=\"background-color: #eeeeee;\">".$row["id"]."</td><td style=\"background-color: #eeeeee;\"><a href=\"admin.php?do=editspell:".$row["id"]."\">".$row["name"]."</a></td></tr>\n"; $count = 2; }
|
||||
|
@ -438,17 +438,17 @@ function editspell($id) {
|
|||
extract($_POST);
|
||||
$errors = 0;
|
||||
$errorlist = "";
|
||||
if ($name == "") { $errors++; $errorlist .= "Name is required.<br />"; }
|
||||
if ($mp == "") { $errors++; $errorlist .= "MP is required.<br />"; }
|
||||
if (!is_numeric($mp)) { $errors++; $errorlist .= "MP must be a number.<br />"; }
|
||||
if ($attribute == "") { $errors++; $errorlist .= "Attribute is required.<br />"; }
|
||||
if (!is_numeric($attribute)) { $errors++; $errorlist .= "Attribute must be a number.<br />"; }
|
||||
if ($name == "") { $errors++; $errorlist .= "Name is required.<br>"; }
|
||||
if ($mp == "") { $errors++; $errorlist .= "MP is required.<br>"; }
|
||||
if (!is_numeric($mp)) { $errors++; $errorlist .= "MP must be a number.<br>"; }
|
||||
if ($attribute == "") { $errors++; $errorlist .= "Attribute is required.<br>"; }
|
||||
if (!is_numeric($attribute)) { $errors++; $errorlist .= "Attribute must be a number.<br>"; }
|
||||
|
||||
if ($errors == 0) {
|
||||
$query = doquery("UPDATE {{table}} SET name='$name',mp='$mp',attribute='$attribute',type='$type' WHERE id='$id' LIMIT 1", "spells");
|
||||
admindisplay("Spell updated.","Edit Spells");
|
||||
} else {
|
||||
admindisplay("<b>Errors:</b><br /><div style=\"color:red;\">$errorlist</div><br />Please go back and try again.", "Edit Spells");
|
||||
admindisplay("<b>Errors:</b><br><div style=\"color:red;\">$errorlist</div><br>Please go back and try again.", "Edit Spells");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -458,14 +458,14 @@ function editspell($id) {
|
|||
$row = mysql_fetch_array($query);
|
||||
|
||||
$page = <<<END
|
||||
<b><u>Edit Spells</u></b><br /><br />
|
||||
<b><u>Edit Spells</u></b><br><br>
|
||||
<form action="admin.php?do=editspell:$id" method="post">
|
||||
<table width="90%">
|
||||
<tr><td width="20%">ID:</td><td>{{id}}</td></tr>
|
||||
<tr><td width="20%">Name:</td><td><input type="text" name="name" size="30" maxlength="30" value="{{name}}" /></td></tr>
|
||||
<tr><td width="20%">Magic Points:</td><td><input type="text" name="mp" size="5" maxlength="10" value="{{mp}}" /><br /><span class="small">MP required to cast spell.</span></td></tr>
|
||||
<tr><td width="20%">Attribute:</td><td><input type="text" name="attribute" size="5" maxlength="10" value="{{attribute}}" /><br /><span class="small">Numeric value of the spell's effect. Ties with type, below.</span></td></tr>
|
||||
<tr><td width="20%">Type:</td><td><select name="type"><option value="1" {{type1select}}>Heal</option><option value="2" {{type2select}}>Hurt</option><option value="3" {{type3select}}>Sleep</option><option value="4" {{type4select}}>Uber Attack</option><option value="5" {{type5select}}>Uber Defense</option></select><br /><span class="small">- Heal gives player back [attribute] hit points.<br />- Hurt deals [attribute] damage to monster.<br />- Sleep keeps monster from attacking ([attribute] is monster's chance out of 15 to stay asleep each turn).<br />- Uber Attack increases total attack damage by [attribute] percent.<br />- Uber Defense increases total defense from attack by [attribute] percent.</span></td></tr>
|
||||
<tr><td width="20%">Magic Points:</td><td><input type="text" name="mp" size="5" maxlength="10" value="{{mp}}" /><br><span class="small">MP required to cast spell.</span></td></tr>
|
||||
<tr><td width="20%">Attribute:</td><td><input type="text" name="attribute" size="5" maxlength="10" value="{{attribute}}" /><br><span class="small">Numeric value of the spell's effect. Ties with type, below.</span></td></tr>
|
||||
<tr><td width="20%">Type:</td><td><select name="type"><option value="1" {{type1select}}>Heal</option><option value="2" {{type2select}}>Hurt</option><option value="3" {{type3select}}>Sleep</option><option value="4" {{type4select}}>Uber Attack</option><option value="5" {{type5select}}>Uber Defense</option></select><br><span class="small">- Heal gives player back [attribute] hit points.<br>- Hurt deals [attribute] damage to monster.<br>- Sleep keeps monster from attacking ([attribute] is monster's chance out of 15 to stay asleep each turn).<br>- Uber Attack increases total attack damage by [attribute] percent.<br>- Uber Defense increases total defense from attack by [attribute] percent.</span></td></tr>
|
||||
</table>
|
||||
<input type="submit" name="submit" value="Submit" /> <input type="reset" name="reset" value="Reset" />
|
||||
</form>
|
||||
|
@ -493,7 +493,7 @@ function levels() {
|
|||
}
|
||||
|
||||
$page = <<<END
|
||||
<b><u>Edit Levels</u></b><br />Select a level number from the dropdown box to edit it.<br /><br />
|
||||
<b><u>Edit Levels</u></b><br>Select a level number from the dropdown box to edit it.<br><br>
|
||||
<form action="admin.php?do=editlevel" method="post">
|
||||
<select name="level">
|
||||
$options
|
||||
|
@ -516,50 +516,50 @@ function editlevel() {
|
|||
extract($_POST);
|
||||
$errors = 0;
|
||||
$errorlist = "";
|
||||
if ($_POST["one_exp"] == "") { $errors++; $errorlist .= "Class 1 Experience is required.<br />"; }
|
||||
if ($_POST["one_hp"] == "") { $errors++; $errorlist .= "Class 1 HP is required.<br />"; }
|
||||
if ($_POST["one_mp"] == "") { $errors++; $errorlist .= "Class 1 MP is required.<br />"; }
|
||||
if ($_POST["one_tp"] == "") { $errors++; $errorlist .= "Class 1 TP is required.<br />"; }
|
||||
if ($_POST["one_strength"] == "") { $errors++; $errorlist .= "Class 1 Strength is required.<br />"; }
|
||||
if ($_POST["one_dexterity"] == "") { $errors++; $errorlist .= "Class 1 Dexterity is required.<br />"; }
|
||||
if ($_POST["one_spells"] == "") { $errors++; $errorlist .= "Class 1 Spells is required.<br />"; }
|
||||
if (!is_numeric($_POST["one_exp"])) { $errors++; $errorlist .= "Class 1 Experience must be a number.<br />"; }
|
||||
if (!is_numeric($_POST["one_hp"])) { $errors++; $errorlist .= "Class 1 HP must be a number.<br />"; }
|
||||
if (!is_numeric($_POST["one_mp"])) { $errors++; $errorlist .= "Class 1 MP must be a number.<br />"; }
|
||||
if (!is_numeric($_POST["one_tp"])) { $errors++; $errorlist .= "Class 1 TP must be a number.<br />"; }
|
||||
if (!is_numeric($_POST["one_strength"])) { $errors++; $errorlist .= "Class 1 Strength must be a number.<br />"; }
|
||||
if (!is_numeric($_POST["one_dexterity"])) { $errors++; $errorlist .= "Class 1 Dexterity must be a number.<br />"; }
|
||||
if (!is_numeric($_POST["one_spells"])) { $errors++; $errorlist .= "Class 1 Spells must be a number.<br />"; }
|
||||
if ($_POST["one_exp"] == "") { $errors++; $errorlist .= "Class 1 Experience is required.<br>"; }
|
||||
if ($_POST["one_hp"] == "") { $errors++; $errorlist .= "Class 1 HP is required.<br>"; }
|
||||
if ($_POST["one_mp"] == "") { $errors++; $errorlist .= "Class 1 MP is required.<br>"; }
|
||||
if ($_POST["one_tp"] == "") { $errors++; $errorlist .= "Class 1 TP is required.<br>"; }
|
||||
if ($_POST["one_strength"] == "") { $errors++; $errorlist .= "Class 1 Strength is required.<br>"; }
|
||||
if ($_POST["one_dexterity"] == "") { $errors++; $errorlist .= "Class 1 Dexterity is required.<br>"; }
|
||||
if ($_POST["one_spells"] == "") { $errors++; $errorlist .= "Class 1 Spells is required.<br>"; }
|
||||
if (!is_numeric($_POST["one_exp"])) { $errors++; $errorlist .= "Class 1 Experience must be a number.<br>"; }
|
||||
if (!is_numeric($_POST["one_hp"])) { $errors++; $errorlist .= "Class 1 HP must be a number.<br>"; }
|
||||
if (!is_numeric($_POST["one_mp"])) { $errors++; $errorlist .= "Class 1 MP must be a number.<br>"; }
|
||||
if (!is_numeric($_POST["one_tp"])) { $errors++; $errorlist .= "Class 1 TP must be a number.<br>"; }
|
||||
if (!is_numeric($_POST["one_strength"])) { $errors++; $errorlist .= "Class 1 Strength must be a number.<br>"; }
|
||||
if (!is_numeric($_POST["one_dexterity"])) { $errors++; $errorlist .= "Class 1 Dexterity must be a number.<br>"; }
|
||||
if (!is_numeric($_POST["one_spells"])) { $errors++; $errorlist .= "Class 1 Spells must be a number.<br>"; }
|
||||
|
||||
if ($_POST["two_exp"] == "") { $errors++; $errorlist .= "Class 2 Experience is required.<br />"; }
|
||||
if ($_POST["two_hp"] == "") { $errors++; $errorlist .= "Class 2 HP is required.<br />"; }
|
||||
if ($_POST["two_mp"] == "") { $errors++; $errorlist .= "Class 2 MP is required.<br />"; }
|
||||
if ($_POST["two_tp"] == "") { $errors++; $errorlist .= "Class 2 TP is required.<br />"; }
|
||||
if ($_POST["two_strength"] == "") { $errors++; $errorlist .= "Class 2 Strength is required.<br />"; }
|
||||
if ($_POST["two_dexterity"] == "") { $errors++; $errorlist .= "Class 2 Dexterity is required.<br />"; }
|
||||
if ($_POST["two_spells"] == "") { $errors++; $errorlist .= "Class 2 Spells is required.<br />"; }
|
||||
if (!is_numeric($_POST["two_exp"])) { $errors++; $errorlist .= "Class 2 Experience must be a number.<br />"; }
|
||||
if (!is_numeric($_POST["two_hp"])) { $errors++; $errorlist .= "Class 2 HP must be a number.<br />"; }
|
||||
if (!is_numeric($_POST["two_mp"])) { $errors++; $errorlist .= "Class 2 MP must be a number.<br />"; }
|
||||
if (!is_numeric($_POST["two_tp"])) { $errors++; $errorlist .= "Class 2 TP must be a number.<br />"; }
|
||||
if (!is_numeric($_POST["two_strength"])) { $errors++; $errorlist .= "Class 2 Strength must be a number.<br />"; }
|
||||
if (!is_numeric($_POST["two_dexterity"])) { $errors++; $errorlist .= "Class 2 Dexterity must be a number.<br />"; }
|
||||
if (!is_numeric($_POST["two_spells"])) { $errors++; $errorlist .= "Class 2 Spells must be a number.<br />"; }
|
||||
if ($_POST["two_exp"] == "") { $errors++; $errorlist .= "Class 2 Experience is required.<br>"; }
|
||||
if ($_POST["two_hp"] == "") { $errors++; $errorlist .= "Class 2 HP is required.<br>"; }
|
||||
if ($_POST["two_mp"] == "") { $errors++; $errorlist .= "Class 2 MP is required.<br>"; }
|
||||
if ($_POST["two_tp"] == "") { $errors++; $errorlist .= "Class 2 TP is required.<br>"; }
|
||||
if ($_POST["two_strength"] == "") { $errors++; $errorlist .= "Class 2 Strength is required.<br>"; }
|
||||
if ($_POST["two_dexterity"] == "") { $errors++; $errorlist .= "Class 2 Dexterity is required.<br>"; }
|
||||
if ($_POST["two_spells"] == "") { $errors++; $errorlist .= "Class 2 Spells is required.<br>"; }
|
||||
if (!is_numeric($_POST["two_exp"])) { $errors++; $errorlist .= "Class 2 Experience must be a number.<br>"; }
|
||||
if (!is_numeric($_POST["two_hp"])) { $errors++; $errorlist .= "Class 2 HP must be a number.<br>"; }
|
||||
if (!is_numeric($_POST["two_mp"])) { $errors++; $errorlist .= "Class 2 MP must be a number.<br>"; }
|
||||
if (!is_numeric($_POST["two_tp"])) { $errors++; $errorlist .= "Class 2 TP must be a number.<br>"; }
|
||||
if (!is_numeric($_POST["two_strength"])) { $errors++; $errorlist .= "Class 2 Strength must be a number.<br>"; }
|
||||
if (!is_numeric($_POST["two_dexterity"])) { $errors++; $errorlist .= "Class 2 Dexterity must be a number.<br>"; }
|
||||
if (!is_numeric($_POST["two_spells"])) { $errors++; $errorlist .= "Class 2 Spells must be a number.<br>"; }
|
||||
|
||||
if ($_POST["three_exp"] == "") { $errors++; $errorlist .= "Class 3 Experience is required.<br />"; }
|
||||
if ($_POST["three_hp"] == "") { $errors++; $errorlist .= "Class 3 HP is required.<br />"; }
|
||||
if ($_POST["three_mp"] == "") { $errors++; $errorlist .= "Class 3 MP is required.<br />"; }
|
||||
if ($_POST["three_tp"] == "") { $errors++; $errorlist .= "Class 3 TP is required.<br />"; }
|
||||
if ($_POST["three_strength"] == "") { $errors++; $errorlist .= "Class 3 Strength is required.<br />"; }
|
||||
if ($_POST["three_dexterity"] == "") { $errors++; $errorlist .= "Class 3 Dexterity is required.<br />"; }
|
||||
if ($_POST["three_spells"] == "") { $errors++; $errorlist .= "Class 3 Spells is required.<br />"; }
|
||||
if (!is_numeric($_POST["three_exp"])) { $errors++; $errorlist .= "Class 3 Experience must be a number.<br />"; }
|
||||
if (!is_numeric($_POST["three_hp"])) { $errors++; $errorlist .= "Class 3 HP must be a number.<br />"; }
|
||||
if (!is_numeric($_POST["three_mp"])) { $errors++; $errorlist .= "Class 3 MP must be a number.<br />"; }
|
||||
if (!is_numeric($_POST["three_tp"])) { $errors++; $errorlist .= "Class 3 TP must be a number.<br />"; }
|
||||
if (!is_numeric($_POST["three_strength"])) { $errors++; $errorlist .= "Class 3 Strength must be a number.<br />"; }
|
||||
if (!is_numeric($_POST["three_dexterity"])) { $errors++; $errorlist .= "Class 3 Dexterity must be a number.<br />"; }
|
||||
if (!is_numeric($_POST["three_spells"])) { $errors++; $errorlist .= "Class 3 Spells must be a number.<br />"; }
|
||||
if ($_POST["three_exp"] == "") { $errors++; $errorlist .= "Class 3 Experience is required.<br>"; }
|
||||
if ($_POST["three_hp"] == "") { $errors++; $errorlist .= "Class 3 HP is required.<br>"; }
|
||||
if ($_POST["three_mp"] == "") { $errors++; $errorlist .= "Class 3 MP is required.<br>"; }
|
||||
if ($_POST["three_tp"] == "") { $errors++; $errorlist .= "Class 3 TP is required.<br>"; }
|
||||
if ($_POST["three_strength"] == "") { $errors++; $errorlist .= "Class 3 Strength is required.<br>"; }
|
||||
if ($_POST["three_dexterity"] == "") { $errors++; $errorlist .= "Class 3 Dexterity is required.<br>"; }
|
||||
if ($_POST["three_spells"] == "") { $errors++; $errorlist .= "Class 3 Spells is required.<br>"; }
|
||||
if (!is_numeric($_POST["three_exp"])) { $errors++; $errorlist .= "Class 3 Experience must be a number.<br>"; }
|
||||
if (!is_numeric($_POST["three_hp"])) { $errors++; $errorlist .= "Class 3 HP must be a number.<br>"; }
|
||||
if (!is_numeric($_POST["three_mp"])) { $errors++; $errorlist .= "Class 3 MP must be a number.<br>"; }
|
||||
if (!is_numeric($_POST["three_tp"])) { $errors++; $errorlist .= "Class 3 TP must be a number.<br>"; }
|
||||
if (!is_numeric($_POST["three_strength"])) { $errors++; $errorlist .= "Class 3 Strength must be a number.<br>"; }
|
||||
if (!is_numeric($_POST["three_dexterity"])) { $errors++; $errorlist .= "Class 3 Dexterity must be a number.<br>"; }
|
||||
if (!is_numeric($_POST["three_spells"])) { $errors++; $errorlist .= "Class 3 Spells must be a number.<br>"; }
|
||||
|
||||
if ($errors == 0) {
|
||||
$updatequery = <<<END
|
||||
|
@ -572,7 +572,7 @@ END;
|
|||
$query = doquery($updatequery, "levels");
|
||||
admindisplay("Level updated.","Edit Levels");
|
||||
} else {
|
||||
admindisplay("<b>Errors:</b><br /><div style=\"color:red;\">$errorlist</div><br />Please go back and try again.", "Edit Spells");
|
||||
admindisplay("<b>Errors:</b><br><div style=\"color:red;\">$errorlist</div><br>Please go back and try again.", "Edit Spells");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -586,8 +586,8 @@ END;
|
|||
$class3name = $controlrow["class3name"];
|
||||
|
||||
$page = <<<END
|
||||
<b><u>Edit Levels</u></b><br /><br />
|
||||
Experience values for each level should be the cumulative total amount of experience up to this point. All other values should be only the new amount to add this level.<br /><br />
|
||||
<b><u>Edit Levels</u></b><br><br>
|
||||
Experience values for each level should be the cumulative total amount of experience up to this point. All other values should be only the new amount to add this level.<br><br>
|
||||
<form action="admin.php?do=editlevel" method="post">
|
||||
<input type="hidden" name="level" value="$id" />
|
||||
<table width="90%">
|
||||
|
@ -635,7 +635,7 @@ END;
|
|||
function users() {
|
||||
|
||||
$query = doquery("SELECT id,username FROM {{table}} ORDER BY id", "users");
|
||||
$page = "<b><u>Edit Users</u></b><br />Click a username to edit the account.<br /><br /><table width=\"50%\">\n";
|
||||
$page = "<b><u>Edit Users</u></b><br>Click a username to edit the account.<br><br><table width=\"50%\">\n";
|
||||
$count = 1;
|
||||
while ($row = mysql_fetch_array($query)) {
|
||||
if ($count == 1) { $page .= "<tr><td width=\"8%\" style=\"background-color: #eeeeee;\">".$row["id"]."</td><td style=\"background-color: #eeeeee;\"><a href=\"admin.php?do=edituser:".$row["id"]."\">".$row["username"]."</a></td></tr>\n"; $count = 2; }
|
||||
|
@ -654,91 +654,91 @@ function edituser($id) {
|
|||
extract($_POST);
|
||||
$errors = 0;
|
||||
$errorlist = "";
|
||||
if ($email == "") { $errors++; $errorlist .= "Email is required.<br />"; }
|
||||
if ($verify == "") { $errors++; $errorlist .= "Verify is required.<br />"; }
|
||||
if ($authlevel == "") { $errors++; $errorlist .= "Auth Level is required.<br />"; }
|
||||
if ($latitude == "") { $errors++; $errorlist .= "Latitude is required.<br />"; }
|
||||
if ($longitude == "") { $errors++; $errorlist .= "Longitude is required.<br />"; }
|
||||
if ($charclass == "") { $errors++; $errorlist .= "Character Class is required.<br />"; }
|
||||
if ($currentaction == "") { $errors++; $errorlist .= "Current Action is required.<br />"; }
|
||||
if ($currentfight == "") { $errors++; $errorlist .= "Current Fight is required.<br />"; }
|
||||
if ($email == "") { $errors++; $errorlist .= "Email is required.<br>"; }
|
||||
if ($verify == "") { $errors++; $errorlist .= "Verify is required.<br>"; }
|
||||
if ($authlevel == "") { $errors++; $errorlist .= "Auth Level is required.<br>"; }
|
||||
if ($latitude == "") { $errors++; $errorlist .= "Latitude is required.<br>"; }
|
||||
if ($longitude == "") { $errors++; $errorlist .= "Longitude is required.<br>"; }
|
||||
if ($charclass == "") { $errors++; $errorlist .= "Character Class is required.<br>"; }
|
||||
if ($currentaction == "") { $errors++; $errorlist .= "Current Action is required.<br>"; }
|
||||
if ($currentfight == "") { $errors++; $errorlist .= "Current Fight is required.<br>"; }
|
||||
|
||||
if ($currentmonster == "") { $errors++; $errorlist .= "Current Monster is required.<br />"; }
|
||||
if ($currentmonsterhp == "") { $errors++; $errorlist .= "Current Monster HP is required.<br />"; }
|
||||
if ($currentmonstersleep == "") { $errors++; $errorlist .= "Current Monster Sleep is required.<br />"; }
|
||||
if ($currentmonsterimmune == "") { $errors++; $errorlist .= "Current Monster Immune is required.<br />"; }
|
||||
if ($currentuberdamage == "") { $errors++; $errorlist .= "Current Uber Damage is required.<br />"; }
|
||||
if ($currentuberdefense == "") { $errors++; $errorlist .= "Current Uber Defense is required.<br />"; }
|
||||
if ($currenthp == "") { $errors++; $errorlist .= "Current HP is required.<br />"; }
|
||||
if ($currentmp == "") { $errors++; $errorlist .= "Current MP is required.<br />"; }
|
||||
if ($currenttp == "") { $errors++; $errorlist .= "Current TP is required.<br />"; }
|
||||
if ($maxhp == "") { $errors++; $errorlist .= "Max HP is required.<br />"; }
|
||||
if ($currentmonster == "") { $errors++; $errorlist .= "Current Monster is required.<br>"; }
|
||||
if ($currentmonsterhp == "") { $errors++; $errorlist .= "Current Monster HP is required.<br>"; }
|
||||
if ($currentmonstersleep == "") { $errors++; $errorlist .= "Current Monster Sleep is required.<br>"; }
|
||||
if ($currentmonsterimmune == "") { $errors++; $errorlist .= "Current Monster Immune is required.<br>"; }
|
||||
if ($currentuberdamage == "") { $errors++; $errorlist .= "Current Uber Damage is required.<br>"; }
|
||||
if ($currentuberdefense == "") { $errors++; $errorlist .= "Current Uber Defense is required.<br>"; }
|
||||
if ($currenthp == "") { $errors++; $errorlist .= "Current HP is required.<br>"; }
|
||||
if ($currentmp == "") { $errors++; $errorlist .= "Current MP is required.<br>"; }
|
||||
if ($currenttp == "") { $errors++; $errorlist .= "Current TP is required.<br>"; }
|
||||
if ($maxhp == "") { $errors++; $errorlist .= "Max HP is required.<br>"; }
|
||||
|
||||
if ($maxmp == "") { $errors++; $errorlist .= "Max MP is required.<br />"; }
|
||||
if ($maxtp == "") { $errors++; $errorlist .= "Max TP is required.<br />"; }
|
||||
if ($level == "") { $errors++; $errorlist .= "Level is required.<br />"; }
|
||||
if ($gold == "") { $errors++; $errorlist .= "Gold is required.<br />"; }
|
||||
if ($experience == "") { $errors++; $errorlist .= "Experience is required.<br />"; }
|
||||
if ($goldbonus == "") { $errors++; $errorlist .= "Gold Bonus is required.<br />"; }
|
||||
if ($expbonus == "") { $errors++; $errorlist .= "Experience Bonus is required.<br />"; }
|
||||
if ($strength == "") { $errors++; $errorlist .= "Strength is required.<br />"; }
|
||||
if ($dexterity == "") { $errors++; $errorlist .= "Dexterity is required.<br />"; }
|
||||
if ($attackpower == "") { $errors++; $errorlist .= "Attack Power is required.<br />"; }
|
||||
if ($maxmp == "") { $errors++; $errorlist .= "Max MP is required.<br>"; }
|
||||
if ($maxtp == "") { $errors++; $errorlist .= "Max TP is required.<br>"; }
|
||||
if ($level == "") { $errors++; $errorlist .= "Level is required.<br>"; }
|
||||
if ($gold == "") { $errors++; $errorlist .= "Gold is required.<br>"; }
|
||||
if ($experience == "") { $errors++; $errorlist .= "Experience is required.<br>"; }
|
||||
if ($goldbonus == "") { $errors++; $errorlist .= "Gold Bonus is required.<br>"; }
|
||||
if ($expbonus == "") { $errors++; $errorlist .= "Experience Bonus is required.<br>"; }
|
||||
if ($strength == "") { $errors++; $errorlist .= "Strength is required.<br>"; }
|
||||
if ($dexterity == "") { $errors++; $errorlist .= "Dexterity is required.<br>"; }
|
||||
if ($attackpower == "") { $errors++; $errorlist .= "Attack Power is required.<br>"; }
|
||||
|
||||
if ($defensepower == "") { $errors++; $errorlist .= "Defense Power is required.<br />"; }
|
||||
if ($weaponid == "") { $errors++; $errorlist .= "Weapon ID is required.<br />"; }
|
||||
if ($armorid == "") { $errors++; $errorlist .= "Armor ID is required.<br />"; }
|
||||
if ($shieldid == "") { $errors++; $errorlist .= "Shield ID is required.<br />"; }
|
||||
if ($slot1id == "") { $errors++; $errorlist .= "Slot 1 ID is required.<br />"; }
|
||||
if ($slot2id == "") { $errors++; $errorlist .= "Slot 2 ID is required.<br />"; }
|
||||
if ($slot3id == "") { $errors++; $errorlist .= "Slot 3 ID is required.<br />"; }
|
||||
if ($weaponname == "") { $errors++; $errorlist .= "Weapon Name is required.<br />"; }
|
||||
if ($armorname == "") { $errors++; $errorlist .= "Armor Name is required.<br />"; }
|
||||
if ($shieldname == "") { $errors++; $errorlist .= "Shield Name is required.<br />"; }
|
||||
if ($defensepower == "") { $errors++; $errorlist .= "Defense Power is required.<br>"; }
|
||||
if ($weaponid == "") { $errors++; $errorlist .= "Weapon ID is required.<br>"; }
|
||||
if ($armorid == "") { $errors++; $errorlist .= "Armor ID is required.<br>"; }
|
||||
if ($shieldid == "") { $errors++; $errorlist .= "Shield ID is required.<br>"; }
|
||||
if ($slot1id == "") { $errors++; $errorlist .= "Slot 1 ID is required.<br>"; }
|
||||
if ($slot2id == "") { $errors++; $errorlist .= "Slot 2 ID is required.<br>"; }
|
||||
if ($slot3id == "") { $errors++; $errorlist .= "Slot 3 ID is required.<br>"; }
|
||||
if ($weaponname == "") { $errors++; $errorlist .= "Weapon Name is required.<br>"; }
|
||||
if ($armorname == "") { $errors++; $errorlist .= "Armor Name is required.<br>"; }
|
||||
if ($shieldname == "") { $errors++; $errorlist .= "Shield Name is required.<br>"; }
|
||||
|
||||
if ($slot1name == "") { $errors++; $errorlist .= "Slot 1 Name is required.<br />"; }
|
||||
if ($slot2name == "") { $errors++; $errorlist .= "Slot 2 Name is required.<br />"; }
|
||||
if ($slot3name == "") { $errors++; $errorlist .= "Slot 3 Name is required.<br />"; }
|
||||
if ($dropcode == "") { $errors++; $errorlist .= "Drop Code is required.<br />"; }
|
||||
if ($spells == "") { $errors++; $errorlist .= "Spells is required.<br />"; }
|
||||
if ($towns == "") { $errors++; $errorlist .= "Towns is required.<br />"; }
|
||||
if ($slot1name == "") { $errors++; $errorlist .= "Slot 1 Name is required.<br>"; }
|
||||
if ($slot2name == "") { $errors++; $errorlist .= "Slot 2 Name is required.<br>"; }
|
||||
if ($slot3name == "") { $errors++; $errorlist .= "Slot 3 Name is required.<br>"; }
|
||||
if ($dropcode == "") { $errors++; $errorlist .= "Drop Code is required.<br>"; }
|
||||
if ($spells == "") { $errors++; $errorlist .= "Spells is required.<br>"; }
|
||||
if ($towns == "") { $errors++; $errorlist .= "Towns is required.<br>"; }
|
||||
|
||||
if (!is_numeric($authlevel)) { $errors++; $errorlist .= "Auth Level must be a number.<br />"; }
|
||||
if (!is_numeric($latitude)) { $errors++; $errorlist .= "Latitude must be a number.<br />"; }
|
||||
if (!is_numeric($longitude)) { $errors++; $errorlist .= "Longitude must be a number.<br />"; }
|
||||
if (!is_numeric($charclass)) { $errors++; $errorlist .= "Character Class must be a number.<br />"; }
|
||||
if (!is_numeric($currentfight)) { $errors++; $errorlist .= "Current Fight must be a number.<br />"; }
|
||||
if (!is_numeric($currentmonster)) { $errors++; $errorlist .= "Current Monster must be a number.<br />"; }
|
||||
if (!is_numeric($currentmonsterhp)) { $errors++; $errorlist .= "Current Monster HP must be a number.<br />"; }
|
||||
if (!is_numeric($currentmonstersleep)) { $errors++; $errorlist .= "Current Monster Sleep must be a number.<br />"; }
|
||||
if (!is_numeric($authlevel)) { $errors++; $errorlist .= "Auth Level must be a number.<br>"; }
|
||||
if (!is_numeric($latitude)) { $errors++; $errorlist .= "Latitude must be a number.<br>"; }
|
||||
if (!is_numeric($longitude)) { $errors++; $errorlist .= "Longitude must be a number.<br>"; }
|
||||
if (!is_numeric($charclass)) { $errors++; $errorlist .= "Character Class must be a number.<br>"; }
|
||||
if (!is_numeric($currentfight)) { $errors++; $errorlist .= "Current Fight must be a number.<br>"; }
|
||||
if (!is_numeric($currentmonster)) { $errors++; $errorlist .= "Current Monster must be a number.<br>"; }
|
||||
if (!is_numeric($currentmonsterhp)) { $errors++; $errorlist .= "Current Monster HP must be a number.<br>"; }
|
||||
if (!is_numeric($currentmonstersleep)) { $errors++; $errorlist .= "Current Monster Sleep must be a number.<br>"; }
|
||||
|
||||
if (!is_numeric($currentmonsterimmune)) { $errors++; $errorlist .= "Current Monster Immune must be a number.<br />"; }
|
||||
if (!is_numeric($currentuberdamage)) { $errors++; $errorlist .= "Current Uber Damage must be a number.<br />"; }
|
||||
if (!is_numeric($currentuberdefense)) { $errors++; $errorlist .= "Current Uber Defense must be a number.<br />"; }
|
||||
if (!is_numeric($currenthp)) { $errors++; $errorlist .= "Current HP must be a number.<br />"; }
|
||||
if (!is_numeric($currentmp)) { $errors++; $errorlist .= "Current MP must be a number.<br />"; }
|
||||
if (!is_numeric($currenttp)) { $errors++; $errorlist .= "Current TP must be a number.<br />"; }
|
||||
if (!is_numeric($maxhp)) { $errors++; $errorlist .= "Max HP must be a number.<br />"; }
|
||||
if (!is_numeric($maxmp)) { $errors++; $errorlist .= "Max MP must be a number.<br />"; }
|
||||
if (!is_numeric($maxtp)) { $errors++; $errorlist .= "Max TP must be a number.<br />"; }
|
||||
if (!is_numeric($level)) { $errors++; $errorlist .= "Level must be a number.<br />"; }
|
||||
if (!is_numeric($currentmonsterimmune)) { $errors++; $errorlist .= "Current Monster Immune must be a number.<br>"; }
|
||||
if (!is_numeric($currentuberdamage)) { $errors++; $errorlist .= "Current Uber Damage must be a number.<br>"; }
|
||||
if (!is_numeric($currentuberdefense)) { $errors++; $errorlist .= "Current Uber Defense must be a number.<br>"; }
|
||||
if (!is_numeric($currenthp)) { $errors++; $errorlist .= "Current HP must be a number.<br>"; }
|
||||
if (!is_numeric($currentmp)) { $errors++; $errorlist .= "Current MP must be a number.<br>"; }
|
||||
if (!is_numeric($currenttp)) { $errors++; $errorlist .= "Current TP must be a number.<br>"; }
|
||||
if (!is_numeric($maxhp)) { $errors++; $errorlist .= "Max HP must be a number.<br>"; }
|
||||
if (!is_numeric($maxmp)) { $errors++; $errorlist .= "Max MP must be a number.<br>"; }
|
||||
if (!is_numeric($maxtp)) { $errors++; $errorlist .= "Max TP must be a number.<br>"; }
|
||||
if (!is_numeric($level)) { $errors++; $errorlist .= "Level must be a number.<br>"; }
|
||||
|
||||
if (!is_numeric($gold)) { $errors++; $errorlist .= "Gold must be a number.<br />"; }
|
||||
if (!is_numeric($experience)) { $errors++; $errorlist .= "Experience must be a number.<br />"; }
|
||||
if (!is_numeric($goldbonus)) { $errors++; $errorlist .= "Gold Bonus must be a number.<br />"; }
|
||||
if (!is_numeric($expbonus)) { $errors++; $errorlist .= "Experience Bonus must be a number.<br />"; }
|
||||
if (!is_numeric($strength)) { $errors++; $errorlist .= "Strength must be a number.<br />"; }
|
||||
if (!is_numeric($dexterity)) { $errors++; $errorlist .= "Dexterity must be a number.<br />"; }
|
||||
if (!is_numeric($attackpower)) { $errors++; $errorlist .= "Attack Power must be a number.<br />"; }
|
||||
if (!is_numeric($defensepower)) { $errors++; $errorlist .= "Defense Power must be a number.<br />"; }
|
||||
if (!is_numeric($weaponid)) { $errors++; $errorlist .= "Weapon ID must be a number.<br />"; }
|
||||
if (!is_numeric($armorid)) { $errors++; $errorlist .= "Armor ID must be a number.<br />"; }
|
||||
if (!is_numeric($gold)) { $errors++; $errorlist .= "Gold must be a number.<br>"; }
|
||||
if (!is_numeric($experience)) { $errors++; $errorlist .= "Experience must be a number.<br>"; }
|
||||
if (!is_numeric($goldbonus)) { $errors++; $errorlist .= "Gold Bonus must be a number.<br>"; }
|
||||
if (!is_numeric($expbonus)) { $errors++; $errorlist .= "Experience Bonus must be a number.<br>"; }
|
||||
if (!is_numeric($strength)) { $errors++; $errorlist .= "Strength must be a number.<br>"; }
|
||||
if (!is_numeric($dexterity)) { $errors++; $errorlist .= "Dexterity must be a number.<br>"; }
|
||||
if (!is_numeric($attackpower)) { $errors++; $errorlist .= "Attack Power must be a number.<br>"; }
|
||||
if (!is_numeric($defensepower)) { $errors++; $errorlist .= "Defense Power must be a number.<br>"; }
|
||||
if (!is_numeric($weaponid)) { $errors++; $errorlist .= "Weapon ID must be a number.<br>"; }
|
||||
if (!is_numeric($armorid)) { $errors++; $errorlist .= "Armor ID must be a number.<br>"; }
|
||||
|
||||
if (!is_numeric($shieldid)) { $errors++; $errorlist .= "Shield ID must be a number.<br />"; }
|
||||
if (!is_numeric($slot1id)) { $errors++; $errorlist .= "Slot 1 ID must be a number.<br />"; }
|
||||
if (!is_numeric($slot2id)) { $errors++; $errorlist .= "Slot 2 ID must be a number.<br />"; }
|
||||
if (!is_numeric($slot3id)) { $errors++; $errorlist .= "Slot 3 ID must be a number.<br />"; }
|
||||
if (!is_numeric($dropcode)) { $errors++; $errorlist .= "Drop Code must be a number.<br />"; }
|
||||
if (!is_numeric($shieldid)) { $errors++; $errorlist .= "Shield ID must be a number.<br>"; }
|
||||
if (!is_numeric($slot1id)) { $errors++; $errorlist .= "Slot 1 ID must be a number.<br>"; }
|
||||
if (!is_numeric($slot2id)) { $errors++; $errorlist .= "Slot 2 ID must be a number.<br>"; }
|
||||
if (!is_numeric($slot3id)) { $errors++; $errorlist .= "Slot 3 ID must be a number.<br>"; }
|
||||
if (!is_numeric($dropcode)) { $errors++; $errorlist .= "Drop Code must be a number.<br>"; }
|
||||
|
||||
if ($errors == 0) {
|
||||
$updatequery = <<<END
|
||||
|
@ -757,7 +757,7 @@ END;
|
|||
$query = doquery($updatequery, "users");
|
||||
admindisplay("User updated.","Edit Users");
|
||||
} else {
|
||||
admindisplay("<b>Errors:</b><br /><div style=\"color:red;\">$errorlist</div><br />Please go back and try again.", "Edit Users");
|
||||
admindisplay("<b>Errors:</b><br><div style=\"color:red;\">$errorlist</div><br>Please go back and try again.", "Edit Users");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -773,7 +773,7 @@ END;
|
|||
$class3name = $controlrow["class3name"];
|
||||
|
||||
$page = <<<HTML
|
||||
<b><u>Edit Users</u></b><br /><br />
|
||||
<b><u>Edit Users</u></b><br><br>
|
||||
<form action="admin.php?do=edituser:$id" method="post">
|
||||
<table width="90%">
|
||||
<tr><td width="20%">ID:</td><td>{{id}}</td></tr>
|
||||
|
@ -782,7 +782,7 @@ $page = <<<HTML
|
|||
<tr><td width="20%">Verify:</td><td><input type="text" name="verify" size="30" maxlength="8" value="{{verify}}" /></td></tr>
|
||||
<tr><td width="20%">Register Date:</td><td>{{regdate}}</td></tr>
|
||||
<tr><td width="20%">Last Online:</td><td>{{onlinetime}}</td></tr>
|
||||
<tr><td width="20%">Auth Level:</td><td><select name="authlevel"><option value="0" {{auth0select}}>User</option><option value="1" {{auth1select}}>Admin</option><option value="2" {{auth2select}}>Blocked</option></select><br /><span class="small">Set to "Blocked" to temporarily (or permanently) ban a user.</span></td></tr>
|
||||
<tr><td width="20%">Auth Level:</td><td><select name="authlevel"><option value="0" {{auth0select}}>User</option><option value="1" {{auth1select}}>Admin</option><option value="2" {{auth2select}}>Blocked</option></select><br><span class="small">Set to "Blocked" to temporarily (or permanently) ban a user.</span></td></tr>
|
||||
|
||||
<tr><td colspan="2" style="background-color:#cccccc;"> </td></tr>
|
||||
|
||||
|
@ -867,22 +867,22 @@ function addnews() {
|
|||
extract($_POST);
|
||||
$errors = 0;
|
||||
$errorlist = "";
|
||||
if ($content == "") { $errors++; $errorlist .= "Content is required.<br />"; }
|
||||
if ($content == "") { $errors++; $errorlist .= "Content is required.<br>"; }
|
||||
|
||||
if ($errors == 0) {
|
||||
$query = doquery("INSERT INTO {{table}} SET id='',postdate=NOW(),content='$content'", "news");
|
||||
admindisplay("News post added.","Add News");
|
||||
} else {
|
||||
admindisplay("<b>Errors:</b><br /><div style=\"color:red;\">$errorlist</div><br />Please go back and try again.", "Add News");
|
||||
admindisplay("<b>Errors:</b><br><div style=\"color:red;\">$errorlist</div><br>Please go back and try again.", "Add News");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$page = <<<END
|
||||
<b><u>Add A News Post</u></b><br /><br />
|
||||
<b><u>Add A News Post</u></b><br><br>
|
||||
<form action="admin.php?do=news" method="post">
|
||||
Type your post below and then click Submit to add it.<br />
|
||||
<textarea name="content" rows="5" cols="50"></textarea><br />
|
||||
Type your post below and then click Submit to add it.<br>
|
||||
<textarea name="content" rows="5" cols="50"></textarea><br>
|
||||
<input type="submit" name="submit" value="Submit" /> <input type="reset" name="reset" value="Reset" />
|
||||
</form>
|
||||
END;
|
||||
|
|
|
@ -58,15 +58,15 @@ function showthread($id, $start) {
|
|||
$count = 1;
|
||||
while ($row = mysql_fetch_array($query)) {
|
||||
if ($count == 1) {
|
||||
$page .= "<tr><td width=\"25%\" style=\"background-color:#ffffff; vertical-align:top;\"><span class=\"small\"><b>".$row["author"]."</b><br /><br />".prettyforumdate($row["postdate"])."</td><td style=\"background-color:#ffffff; vertical-align:top;\">".nl2br($row["content"])."</td></tr>\n";
|
||||
$page .= "<tr><td width=\"25%\" style=\"background-color:#ffffff; vertical-align:top;\"><span class=\"small\"><b>".$row["author"]."</b><br><br>".prettyforumdate($row["postdate"])."</td><td style=\"background-color:#ffffff; vertical-align:top;\">".nl2br($row["content"])."</td></tr>\n";
|
||||
$count = 2;
|
||||
} else {
|
||||
$page .= "<tr><td width=\"25%\" style=\"background-color:#eeeeee; vertical-align:top;\"><span class=\"small\"><b>".$row["author"]."</b><br /><br />".prettyforumdate($row["postdate"])."</td><td style=\"background-color:#eeeeee; vertical-align:top;\">".nl2br($row["content"])."</td></tr>\n";
|
||||
$page .= "<tr><td width=\"25%\" style=\"background-color:#eeeeee; vertical-align:top;\"><span class=\"small\"><b>".$row["author"]."</b><br><br>".prettyforumdate($row["postdate"])."</td><td style=\"background-color:#eeeeee; vertical-align:top;\">".nl2br($row["content"])."</td></tr>\n";
|
||||
$count = 1;
|
||||
}
|
||||
}
|
||||
$page .= "</table></td></tr></table><br />";
|
||||
$page .= "<table width=\"100%\"><tr><td><b>Reply To This Thread:</b><br /><form action=\"forum.php?do=reply\" method=\"post\"><input type=\"hidden\" name=\"parent\" value=\"$id\" /><input type=\"hidden\" name=\"title\" value=\"Re: ".$row2["title"]."\" /><textarea name=\"content\" rows=\"7\" cols=\"40\"></textarea><br /><input type=\"submit\" name=\"submit\" value=\"Submit\" /> <input type=\"reset\" name=\"reset\" value=\"Reset\" /></form></td></tr></table>";
|
||||
$page .= "</table></td></tr></table><br>";
|
||||
$page .= "<table width=\"100%\"><tr><td><b>Reply To This Thread:</b><br><form action=\"forum.php?do=reply\" method=\"post\"><input type=\"hidden\" name=\"parent\" value=\"$id\" /><input type=\"hidden\" name=\"title\" value=\"Re: ".$row2["title"]."\" /><textarea name=\"content\" rows=\"7\" cols=\"40\"></textarea><br><input type=\"submit\" name=\"submit\" value=\"Submit\" /> <input type=\"reset\" name=\"reset\" value=\"Reset\" /></form></td></tr></table>";
|
||||
|
||||
display($page, "Forum");
|
||||
|
||||
|
@ -94,7 +94,7 @@ function newthread() {
|
|||
die();
|
||||
}
|
||||
|
||||
$page = "<table width=\"100%\"><tr><td><b>Make A New Post:</b><br /><br/ ><form action=\"forum.php?do=new\" method=\"post\">Title:<br /><input type=\"text\" name=\"title\" size=\"50\" maxlength=\"50\" /><br /><br />Message:<br /><textarea name=\"content\" rows=\"7\" cols=\"40\"></textarea><br /><br /><input type=\"submit\" name=\"submit\" value=\"Submit\" /> <input type=\"reset\" name=\"reset\" value=\"Reset\" /></form></td></tr></table>";
|
||||
$page = "<table width=\"100%\"><tr><td><b>Make A New Post:</b><br><br/ ><form action=\"forum.php?do=new\" method=\"post\">Title:<br><input type=\"text\" name=\"title\" size=\"50\" maxlength=\"50\" /><br><br>Message:<br><textarea name=\"content\" rows=\"7\" cols=\"40\"></textarea><br><br><input type=\"submit\" name=\"submit\" value=\"Submit\" /> <input type=\"reset\" name=\"reset\" value=\"Reset\" /></form></td></tr></table>";
|
||||
display($page, "Forum");
|
||||
|
||||
}
|
||||
|
|
501
public/help.php
501
public/help.php
|
@ -1,18 +1,21 @@
|
|||
<?php
|
||||
include('lib.php');
|
||||
$link = opendb();
|
||||
$controlquery = doquery("SELECT * FROM {{table}} WHERE id='1' LIMIT 1", "control");
|
||||
$controlrow = mysql_fetch_array($controlquery);
|
||||
ob_start("ob_gzhandler");
|
||||
if (!file_exists('../.installed')) redirect('install.php');
|
||||
|
||||
require_once '../src/lib.php';
|
||||
|
||||
$controlrow = get_control_row();
|
||||
|
||||
$page = $_GET['page'] ?? '';
|
||||
if (!in_array($page, ['main', 'items', 'levels', 'monsters', 'spells'])) $page = 'main';
|
||||
?>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title><? echo $controlrow["gamename"]; ?> Help</title>
|
||||
<title><?= $controlrow["gamename"] ?> Help</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-image: url(images/background.jpg);
|
||||
background-image: url('images/background.jpg');
|
||||
color: black;
|
||||
font: 11px verdana;
|
||||
}
|
||||
|
@ -21,6 +24,9 @@ table {
|
|||
padding: 0px;
|
||||
font: 11px verdana;
|
||||
}
|
||||
tr:nth-child(even) {
|
||||
background-color: white;
|
||||
}
|
||||
td {
|
||||
border-style: none;
|
||||
padding: 3px;
|
||||
|
@ -70,11 +76,15 @@ a:hover {
|
|||
</head>
|
||||
<body>
|
||||
<a name="top"></a>
|
||||
<h1><? echo $controlrow["gamename"]; ?> Help</h1>
|
||||
[ <a href="index.php">Return to the game</a> ]
|
||||
<h1><?= $controlrow["gamename"] ?> Help</h1>
|
||||
[ <a href="/index.php">Return to the game</a> ]
|
||||
|
||||
<br /><br /><hr />
|
||||
<br><br><hr>
|
||||
|
||||
<?php
|
||||
// @MAIN
|
||||
if ($page === 'main'):
|
||||
?>
|
||||
<h3>Table of Contents</h3>
|
||||
<ul>
|
||||
<li /><a href="#intro">Introduction</a>
|
||||
|
@ -89,216 +99,467 @@ a:hover {
|
|||
<li /><a href="#credits">Credits</a>
|
||||
</ul>
|
||||
|
||||
<hr />
|
||||
<hr>
|
||||
|
||||
<h3><a name="intro"></a>Introduction</h3>
|
||||
Firstly, I'd like to say thank you for playing my game. The <i>Dragon Knight</i> game engine is the result of several months of
|
||||
planning, coding and testing. The original idea was to create a web-based tribute to the NES game, <i>Dragon
|
||||
Warrior</i>. In its current iteration, only the underlying fighting system really resembles that game, as almost
|
||||
everything else in DK has been made bigger and better. But you should still recognize bits and pieces as stemming
|
||||
from <i>Dragon Warrior</i> and other RPGs of old.<br /><br />
|
||||
from <i>Dragon Warrior</i> and other RPGs of old.<br><br>
|
||||
This is the first game I've ever written, and it has definitely been a positive experience. It got difficult at
|
||||
times, admittedly, but it was still a lot of fun to write, and even more fun to play. And I hope to use this
|
||||
experience so that if I ever want to create another game it will be even better than this one.<br /><br />
|
||||
experience so that if I ever want to create another game it will be even better than this one.<br><br>
|
||||
If you are a site administrator, and would like to install a copy of DK on your own server, you may visit the
|
||||
<a href="http://dragon.se7enet.com/dev.php" target="_new">development site</a> for <i>Dragon Knight</i>. This page
|
||||
includes the downloadable game souce code, as well as some other resources that developers and administrators may
|
||||
find valuable.<br /><br />
|
||||
Once again, thanks for playing!<br /><br />
|
||||
<i>Jamin Seven</i><br />
|
||||
<i>Dragon Knight creator</i><br />
|
||||
<a href="http://www.se7enet.com" target="_new">My Homepage</a><br />
|
||||
<a href="http://dragon.se7enet.com/dev.php" target="_new">Dragon Knight Homepage</a><br ><br />
|
||||
find valuable.<br><br>
|
||||
Once again, thanks for playing!<br><br>
|
||||
<i>Jamin Seven</i><br>
|
||||
<i>Dragon Knight creator</i><br>
|
||||
<a href="http://www.se7enet.com" target="_new">My Homepage</a><br>
|
||||
<a href="http://dragon.se7enet.com/dev.php" target="_new">Dragon Knight Homepage</a><br ><br>
|
||||
[ <a href="#top">Top</a> ]
|
||||
|
||||
<br /><br /><hr />
|
||||
<br><br><hr>
|
||||
|
||||
<h3><a name="classes"></a>Character Classes</h3>
|
||||
There are three character classes in the game. The main differences between the classes are what spells you get
|
||||
access to, the speed with which you level up, and the amount of HP/MP/strength/dexterity you gain per level. Below
|
||||
is a basic outline of each of the character classes. For more detailed information about the characters, please
|
||||
view the Levels table at the bottom of this page. Also, note that the outline below refers to the stock class setup
|
||||
for the game. If your administrator has used his/her own class setup, this information may not be accurate.<br /><br />
|
||||
<b><? echo $controlrow["class1name"]; ?></b>
|
||||
for the game. If your administrator has used his/her own class setup, this information may not be accurate.<br><br>
|
||||
<b><?= $controlrow["class1name"] ?></b>
|
||||
<ul>
|
||||
<li />Fast level-ups
|
||||
<li />High hit points
|
||||
<li />High magic points
|
||||
<li />Low strength
|
||||
<li />Low dexterity
|
||||
<li />5 heal spells
|
||||
<li />5 hurt spells
|
||||
<li />3 sleep spells
|
||||
<li />3 +defense spells
|
||||
<li />0 +attack spells
|
||||
<li>Fast level-ups</li>
|
||||
<li>High hit points</li>
|
||||
<li>High magic points</li>
|
||||
<li>Low strength</li>
|
||||
<li>Low dexterity</li>
|
||||
<li>5 heal spells</li>
|
||||
<li>5 hurt spells</li>
|
||||
<li>3 sleep spells</li>
|
||||
<li>3 +defense spells</li>
|
||||
<li>0 +attack spells</li>
|
||||
</ul>
|
||||
<b><? echo $controlrow["class2name"]; ?></b>
|
||||
<b><?= $controlrow["class2name"] ?></b>
|
||||
<ul>
|
||||
<li />Medium level-ups
|
||||
<li />Medium hit points
|
||||
<li />Low magic points
|
||||
<li />High strength
|
||||
<li />Low dexterity
|
||||
<li />3 heal spells
|
||||
<li />3 hurt spells
|
||||
<li />2 sleep spells
|
||||
<li />3 +defense spells
|
||||
<li />3 +attack spells
|
||||
<li>Medium level-ups</li>
|
||||
<li>Medium hit points</li>
|
||||
<li>Low magic points</li>
|
||||
<li>High strength</li>
|
||||
<li>Low dexterity</li>
|
||||
<li>3 heal spells</li>
|
||||
<li>3 hurt spells</li>
|
||||
<li>2 sleep spells</li>
|
||||
<li>3 +defense spells</li>
|
||||
<li>3 +attack spells</li>
|
||||
</ul>
|
||||
<b><? echo $controlrow["class3name"]; ?></b>
|
||||
<b><?= $controlrow["class3name"] ?></b>
|
||||
<ul>
|
||||
<li />Slow level-ups
|
||||
<li />Medium hit points
|
||||
<li />Medium magic points
|
||||
<li />Low strength
|
||||
<li />High dexterity
|
||||
<li />4 heal spells
|
||||
<li />4 hurt spells
|
||||
<li />3 sleep spells
|
||||
<li />2 +defense spells
|
||||
<li />2 +attack spells
|
||||
<li>Slow level-ups</li>
|
||||
<li>Medium hit points</li>
|
||||
<li>Medium magic points</li>
|
||||
<li>Low strength</li>
|
||||
<li>High dexterity</li>
|
||||
<li>4 heal spells</li>
|
||||
<li>4 hurt spells</li>
|
||||
<li>3 sleep spells</li>
|
||||
<li>2 +defense spells</li>
|
||||
<li>2 +attack spells</li>
|
||||
</ul>
|
||||
[ <a href="#top">Top</a> ]
|
||||
|
||||
<br /><br /><hr />
|
||||
<br><br><hr>
|
||||
|
||||
<h3><a name="intown"></a>Playing The Game: In Town</h3>
|
||||
When you begin a new game, the first thing you see is the Town screen. Towns serve four primary functions: healing, buying items,
|
||||
buying maps, and displaying game information.<br /><br />
|
||||
buying maps, and displaying game information.<br><br>
|
||||
To heal yourself, click the "Rest at the Inn" link at the top of the town screen. Each town's Inn has a different price - some towns
|
||||
are cheap, others are expensive. No matter what town you're in, the Inns always serve the same function: they restore your current
|
||||
hit points, magic points, and travel points to their maximum amounts. Out in the field, you are free to use healing spells to restore
|
||||
your hit points, but when you run low on magic points, the only way to restore them is at an Inn.<br /><br />
|
||||
your hit points, but when you run low on magic points, the only way to restore them is at an Inn.<br><br>
|
||||
Buying weapons and armor is accomplished through the appropriately-named "Buy Weapons/Armor" link. Not every item is available in
|
||||
every town, so in order to get the most powerful items, you'll need to explore some of the outer towns. Once you've clicked the link,
|
||||
you are presented with a list of items available in this town's store. To the left of each item is an icon that represents its type:
|
||||
weapon, armor or shield. The amount of attack/defense power, as well as the item's price, are displayed to the right of the item name.
|
||||
You'll notice that some items have a red asterisk (<span class="highlight">*</span>) next to their names. These are items that come
|
||||
with special attributes that modify other parts of your character profile. See the Items & Drops table at the bottom of this page for
|
||||
more information about special items.<br /><br />
|
||||
more information about special items.<br><br>
|
||||
Maps are the third function in towns. Buying a map to a town places the town in your Travel To box in the left status panel. Once
|
||||
you've purchased a town's map, you can click its name from your Travel To box and you will jump to that town. Travelling this way
|
||||
costs travel points, though, and you'll only be able to visit towns if you have enough travel points.<br /><br />
|
||||
costs travel points, though, and you'll only be able to visit towns if you have enough travel points.<br><br>
|
||||
The final function in towns is displaying game information and statistics. This includes the latest news post made by the game
|
||||
administrator, a list of players who have been online recently, and the Babble Box.<br /><br />
|
||||
administrator, a list of players who have been online recently, and the Babble Box.<br><br>
|
||||
[ <a href="#top">Top</a> ]
|
||||
|
||||
<br /><br /><hr />
|
||||
<br><br><hr>
|
||||
|
||||
<h3><a name="exploring"></a>Playing The Game: Exploring & Fighting</h3>
|
||||
Once you're done in town, you are free to start exploring the world. Use the compass buttons on the left status panel to move around.
|
||||
The game world is basically a big square, divided into four quadrants. Each quadrant is <? echo $controlrow["gamesize"]; ?> spaces
|
||||
The game world is basically a big square, divided into four quadrants. Each quadrant is <?= $controlrow["gamesize"] ?> spaces
|
||||
square. The first town is usually located at (0N,0E). Click the North button from the first town, and now you'll be at (1N,0E).
|
||||
Likewise, if you now click the West button, you'll be at (1N,1W). Monster levels increase with every 5 spaces you move outward
|
||||
from (0N,0E).<br /><br />
|
||||
from (0N,0E).<br><br>
|
||||
While you're exploring, you will occasionally run into monsters. As in pretty much any other RPG game, you and the monster take turns
|
||||
hitting each other in an attempt to reduce each other's hit points to zero. Once you run into a monster, the Exploring screen changes
|
||||
to the Fighting screen.<br /><br />
|
||||
to the Fighting screen.<br><br>
|
||||
When a fight begins, you'll see the monster's name and hit points, and the game will ask you for your first command. You then get to
|
||||
pick whether you want to fight, use a spell, or run away. Note, though, that sometimes the monster has the chance to hit you
|
||||
first.<br /><br />
|
||||
first.<br><br>
|
||||
The Fight button is pretty straightforward: you attack the monster, and the amount of damage dealt is based on your attack power and
|
||||
the monster's armor. On top of that, there are two other things that can happen: an Excellent Hit, which doubles your total attack
|
||||
damage; and a monster dodge, which results in you doing no damage to the monster.<br /><br />
|
||||
damage; and a monster dodge, which results in you doing no damage to the monster.<br><br>
|
||||
The Spell button allows you to pick an available spell and cast it. See the Spells list at the bottom of this page for more information
|
||||
about spells.<br /><br />
|
||||
about spells.<br><br>
|
||||
Finally, there is the Run button, which lets you run away from a fight if the monster is too powerful. Be warned, though: it is
|
||||
possible for the monster to block you from running and attack you. So if your hit points are low, you may fare better by staying
|
||||
around monsters that you know can't do much damage to you.<br /><br />
|
||||
around monsters that you know can't do much damage to you.<br><br>
|
||||
Once you've had your turn, the monster also gets his turn. It is also possible for you to dodge the monster's attack and take no
|
||||
damage.<br /><br />
|
||||
damage.<br><br>
|
||||
The end result of a fight is either you or the monster being knocked down to zero hit points. If you win, the monster dies and will
|
||||
give you a certain amount of experience and gold. There is also a chance that the monster will drop an item, which you can put into
|
||||
one of the three inventory slots to give you extra points in your character profile. If you lose and die, half of your gold is taken
|
||||
away - however, you are given back a few hit points to help you make it back to town (for example, if you don't have enough gold to
|
||||
pay for an Inn, and need to kill a couple low-level monsters to get the money).<br /><br />
|
||||
When the fight is over, you can continue exploring until you find another monster to beat into submission.<br /><br />
|
||||
pay for an Inn, and need to kill a couple low-level monsters to get the money).<br><br>
|
||||
When the fight is over, you can continue exploring until you find another monster to beat into submission.<br><br>
|
||||
[ <a href="#top">Top</a> ]
|
||||
|
||||
<br /><br /><hr />
|
||||
<br><br><hr>
|
||||
|
||||
<h3><a name="status"></a>Playing The Game: Status Panels</h3>
|
||||
There are two status panels on the game screen: left and right.<br /><br />
|
||||
There are two status panels on the game screen: left and right.<br><br>
|
||||
The left panel inclues your current location and play status (In Town, Exploring, Fighting), compass buttons for movement, and the
|
||||
Travel To list for jumping between towns. At the bottom of the left panel is also a list of game functions.<br /><br />
|
||||
The right panel displays some character statistics, your inventory, and quick spells.<br /><br />
|
||||
Travel To list for jumping between towns. At the bottom of the left panel is also a list of game functions.<br><br>
|
||||
The right panel displays some character statistics, your inventory, and quick spells.<br><br>
|
||||
The Character section shows the most important character statistics. It also displays the status bars for your current hit points,
|
||||
magic points and travel points. These status bars are colored either green, yellow or red depending on your current amount of each
|
||||
stat. There is also a link to pop up your list of extended statistics, which shows more detailed character information.<br /><br />
|
||||
stat. There is also a link to pop up your list of extended statistics, which shows more detailed character information.<br><br>
|
||||
The Fast Spells section lists any Heal spells you've learned. You may use these links any time you are in town or exploring to cast
|
||||
the heal spell. These may not be used during fights, however - you have to use the Spells box on the fight screen for that.
|
||||
[ <a href="#top">Top</a> ]
|
||||
|
||||
<br /><br /><hr />
|
||||
<br><br><hr>
|
||||
|
||||
<h3><a name="items"></a>Spoilers: Items & Drops</h3>
|
||||
<a href="help_items.php">Click here</a> for the Items & Drops spoiler page.<br /><br />
|
||||
<a href="help.php?page=items">Click here</a> for the Items & Drops spoiler page.<br><br>
|
||||
[ <a href="#top">Top</a> ]
|
||||
|
||||
<br /><br /><hr />
|
||||
<br><br><hr>
|
||||
|
||||
<h3><a name="monsters"></a>Spoilers: Monsters</h3>
|
||||
<a href="help_monsters.php">Click here</a> for the Monsters spoiler page.<br /><br />
|
||||
<a href="help.php?page=monsters">Click here</a> for the Monsters spoiler page.<br><br>
|
||||
[ <a href="#top">Top</a> ]
|
||||
|
||||
<br /><br /><hr />
|
||||
<br><br><hr>
|
||||
|
||||
<h3><a name="spells"></a>Spoilers: Spells</h3>
|
||||
<a href="help_spells.php">Click here</a> for the Spells spoiler page.<br /><br />
|
||||
<a href="help.php?page=spells">Click here</a> for the Spells spoiler page.<br><br>
|
||||
[ <a href="#top">Top</a> ]
|
||||
|
||||
<br /><br /><hr />
|
||||
<br><br><hr>
|
||||
|
||||
<h3><a name="levels"></a>Spoilers: Levels</h3>
|
||||
<a href="help_levels.php">Click here</a> for the Levels spoiler page.<br /><br />
|
||||
<a href="help.php?page=levels">Click here</a> for the Levels spoiler page.<br><br>
|
||||
[ <a href="#top">Top</a> ]
|
||||
|
||||
<br /><br /><hr />
|
||||
<br><br><hr>
|
||||
|
||||
<h3><a name="credits"></a>Credits</h3>
|
||||
<ul>
|
||||
<li /><b>All program code and stock graphics for the game were created by Jamin Seven</b>.<br /><br />
|
||||
<li />Major props go to a few people on the PHP manual site, for help with various chunks of code. The specific people are listed in the source code.<br /><br />
|
||||
<li />Super monkey love goes to Enix and the developers of <i>Dragon Warrior</i>. If it weren't for you guys, my game never would have been made.<br /><br />
|
||||
<li />Mega props go to Dalez from GameFAQs for his DW3 experience chart, which was where I got my experience levels from.<br /><br />
|
||||
<li />Mad crazy ninja love goes to the following people for help and support throughout the development process:<br /><br />
|
||||
<li><b>All program code and stock graphics for the game were created by Jamin Seven</b>.<br><br></li>
|
||||
<li>Major props go to a few people on the PHP manual site, for help with various chunks of code. The specific people are listed in the source code.<br><br></li>
|
||||
<li>Super monkey love goes to Enix and the developers of <i>Dragon Warrior</i>. If it weren't for you guys, my game never would have been made.<br><br></li>
|
||||
<li>Mega props go to Dalez from GameFAQs for his DW3 experience chart, which was where I got my experience levels from.<br><br></li>
|
||||
<li>
|
||||
Mad crazy ninja love goes to the following people for help and support throughout the development process:<br><br>
|
||||
<b>Ideas:</b> (whether they got used or not)
|
||||
<ul>
|
||||
<li />kushet
|
||||
<li />lghtning
|
||||
<li />Ebolamonkey3000
|
||||
<li />Crimson Scythe
|
||||
<li />SilDeath
|
||||
</ul><br />
|
||||
<li>kushet</li>
|
||||
<li>lghtning</li>
|
||||
<li>Ebolamonkey3000</li>
|
||||
<li>Crimson Scythe</li>
|
||||
<li>SilDeath</li>
|
||||
</ul>
|
||||
<b>Beta Testing:</b> (forums name if applicable, character name otherwise)
|
||||
<ul>
|
||||
<li />Ebolamonkey3000
|
||||
<li />lisi
|
||||
<li />Junglist
|
||||
<li />Crimson Scythe
|
||||
<li />Sk8erpunk69
|
||||
<li />lghtning
|
||||
<li />kushet
|
||||
<li />SilDeath
|
||||
<li />lowrider4life
|
||||
<li />dubiin
|
||||
<li />Sam Wise The Great
|
||||
</ul><br />
|
||||
<li />Apologies and lots of happy naked love to anyone I forgot.<br /><br />
|
||||
<li />And of course, thanks to <b>you</b> for playing my game!<br /><br />
|
||||
<li /><a href="../index.php?do=ninja">NINJA!</a>
|
||||
<li>Ebolamonkey3000</li>
|
||||
<li>lisi</li>
|
||||
<li>Junglist</li>
|
||||
<li>Crimson Scythe</li>
|
||||
<li>Sk8erpunk69</li>
|
||||
<li>lghtning</li>
|
||||
<li>kushet</li>
|
||||
<li>SilDeath</li>
|
||||
<li>lowrider4life</li>
|
||||
<li>dubiin</li>
|
||||
<li>Sam Wise The Great</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
Apologies and lots of happy naked love to anyone I forgot. <br><br>
|
||||
And of course, thanks to <b>you</b> for playing my game! <br><br>
|
||||
<a href="/index.php?do=ninja">NINJA!</a> <br><br>
|
||||
[ <a href="#top">Top</a> ]
|
||||
|
||||
<br /><br /><hr /><br />
|
||||
<br><br><hr><br>
|
||||
|
||||
Please visit the following sites for more information:<br />
|
||||
<a href="http://www.se7enet.com" target="_new">Se7enet</a> (Jamin's homepage)<br />
|
||||
<a href="http://dragon.se7enet.com/dev.php" target="_new">Dragon Knight</a> (official DK homepage)<br />
|
||||
<a href="http://se7enet.com/forums" target="_new">Forums</a> (official DK forums)<br /><br />
|
||||
All original coding and graphics for the <i>Dragon Knight</i> game engine are © 2003-2005 by Jamin Seven.<br /><br />
|
||||
Please visit the following sites for more information:<br>
|
||||
<a href="http://www.se7enet.com" target="_new">Se7enet</a> (Jamin's homepage)<br>
|
||||
<a href="http://dragon.se7enet.com/dev.php" target="_new">Dragon Knight</a> (official DK homepage)<br>
|
||||
<a href="http://se7enet.com/forums" target="_new">Forums</a> (official DK forums)<br><br>
|
||||
All original coding and graphics for the <i>Dragon Knight</i> game engine are © 2003-2005 by Jamin Seven.<br><br>
|
||||
[ <a href="#top">Top</a> ]
|
||||
<br /><br />
|
||||
|
||||
<?php
|
||||
endif;
|
||||
// @MAIN END
|
||||
?>
|
||||
|
||||
<?php
|
||||
// @ITEMS
|
||||
if ($page === 'items'):
|
||||
?>
|
||||
|
||||
<table width="60%" style="border: solid 1px black" cellspacing="0" cellpadding="0">
|
||||
<tr><td colspan="5" bgcolor="#ffffff"><center><b>Items</b></center></td></tr>
|
||||
<tr><td><b>Type</b></td><td><b>Name</b></td><td><b>Cost</b></td><td><b>Attribute</b></td><td><b>Special</b></td></tr>
|
||||
<?php
|
||||
$items = db()->query('SELECT * FROM items ORDER BY id;');
|
||||
$item_types = [1 => ['weapon', 'Attack'], 2 => ['armor', 'Defense'], 3 => ['shield', 'Defense']];
|
||||
|
||||
while ($item = $items->fetchArray(SQLITE3_ASSOC)) {
|
||||
$image = $item_types[$item['type']][0];
|
||||
$power = $item_types[$item['type']][1];
|
||||
|
||||
if ($item['special'] !== 'X') {
|
||||
$special = explode(',', $item['special']);
|
||||
$attr = special_to_string($special[0]);
|
||||
$stat = (($special[1] > 0) ? '+' : '') . $special[1];
|
||||
$bigspecial = "$attr $stat";
|
||||
} else {
|
||||
$bigspecial = '<span class="light">None</span>';
|
||||
}
|
||||
|
||||
echo "<tr><td width=\"5%\"><img src=\"images/icon_$image.gif\" alt=\"$image\"></td><td width=\"30%\">".$item["name"]."</td><td width=\"20%\">".$item["buycost"]." Gold</td><td width=\"20%\">".$item["attribute"]." $power Power</td><td width=\"25%\">$bigspecial</td></tr>\n";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
<br><br>
|
||||
|
||||
<table width="60%" style="border: solid 1px black" cellspacing="0" cellpadding="0">
|
||||
<tr><td colspan="4" bgcolor="#ffffff"><center><b>Drops</b></center></td></tr>
|
||||
<tr><td><b>Name</b></td><td><b>Monster Level</b></td><td><b>Attribute 1</b></td><td><b>Attribute 2</b></td></tr>
|
||||
<?php
|
||||
$drops = db()->query('SELECT * FROM drops ORDER BY id;');
|
||||
|
||||
while ($drop = $drops->fetchArray(SQLITE3_ASSOC)) {
|
||||
if ($drop["attribute1"] !== "X") {
|
||||
$special = explode(',', $drop['attribute1']);
|
||||
$attr = special_to_string($special[0]);
|
||||
$stat = (($special[1] > 0) ? '+' : '') . $special[1];
|
||||
$bigspecial1 = "$attr $stat";
|
||||
} else {
|
||||
$bigspecial1 = '<span class="light">None</span>';
|
||||
}
|
||||
|
||||
if ($drop["attribute2"] !== "X") {
|
||||
$special = explode(',', $drop['attribute2']);
|
||||
$attr = special_to_string($special[0]);
|
||||
$stat = (($special[1] > 0) ? '+' : '') . $special[1];
|
||||
$bigspecial2 = "$attr $stat";
|
||||
} else {
|
||||
$bigspecial2 = '<span class="light">None</span>';
|
||||
}
|
||||
|
||||
echo "<tr><td width=\"25%\">".$drop["name"]."</td><td width=\"15%\">".$drop["mlevel"]."</td><td width=\"30%\">$bigspecial1</td><td width=\"30%\">$bigspecial2</td></tr>\n";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
endif;
|
||||
// @ITEMS END
|
||||
?>
|
||||
|
||||
<?php
|
||||
// @SPELLS
|
||||
if ($page === 'spells'):
|
||||
?>
|
||||
|
||||
<table width="50%" style="border: solid 1px black" cellspacing="0" cellpadding="0">
|
||||
<tr><td colspan="8" bgcolor="#ffffff"><center><b>Spells</b></center></td></tr>
|
||||
<tr><td><b>Name</b></td><td><b>Cost</b></td><td><b>Type</b></td><td><b>Attribute</b></td></tr>
|
||||
<?php
|
||||
$spells = db()->query('SELECT * FROM spells ORDER BY id;');
|
||||
$spell_types = ['None', 'Heal', 'Hurt', 'Sleep', '+Damage (%)', '+Defense (%)'];
|
||||
while ($spell = $spells->fetchArray(SQLITE3_ASSOC)) {
|
||||
echo <<<HTML
|
||||
<tr><td width="25%">{$spell["name"]}</td>
|
||||
<td width="25%">{$spell["mp"]}</td>
|
||||
<td width="25%">{$spell_types[$spell['type']]}</td>
|
||||
<td width="25%">{$spell["attribute"]}</td></tr>
|
||||
HTML;
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<ul>
|
||||
<li><b>Heal</b> spells always give you the maximum amount possible, until your current HP is full.</li>
|
||||
<li><b>Hurt</b> spells deal X damage (not always the maximum) to the monster, regardless of the monster's armor.</li>
|
||||
<li><b>Sleep</b> spells put the monster to sleep. The monster has an X in 15 chance of remaining asleep each turn.</li>
|
||||
<li><b>+Damage</b> spells increase your total attack damage by X percent until the end of the fight.</li>
|
||||
<li><b>+Defense</b> spells reduce the total damage you take from the monster by X percent until the end of each fight.</li>
|
||||
</ul>
|
||||
|
||||
<?php
|
||||
endif;
|
||||
// @SPELLS END
|
||||
?>
|
||||
|
||||
<?php
|
||||
// @MONSTERS
|
||||
if ($page === 'monsters'):
|
||||
?>
|
||||
|
||||
<table width="75%" style="border: solid 1px black" cellspacing="0" cellpadding="0">
|
||||
<tr><td colspan="8" bgcolor="#ffffff"><center><b>Monsters</b></center></td></tr>
|
||||
<tr><td><b>Name</b></td><td><b>Max HP</b></td><td><b>Max Damage</b></td><td><b>Armor</b></td><td><b>Level</b></td><td><b>Max Exp.</b></td><td><b>Max Gold</b></td><td><b>Immunity</b></td></tr>
|
||||
<?php
|
||||
$monsters = db()->query('SELECT * FROM monsters ORDER BY id;');
|
||||
$immunities = ['<span class="light">None</span>', 'Hurt', 'Hurt & Sleep'];
|
||||
|
||||
while ($m = $monsters->fetchArray(SQLITE3_ASSOC)) {
|
||||
$immune = $immunities[$m['immune']] ?? 'Unknown';
|
||||
echo "<tr><td width=\"30%\">".$m["name"]."</td><td width=\"10%\">".$m["maxhp"]."</td><td width=\"10%\">".$m["maxdam"]."</td><td width=\"10%\">".$m["armor"]."</td><td width=\"10%\">".$m["level"]."</td><td width=\"10%\">".$m["maxexp"]."</td><td width=\"10%\">".$m["maxgold"]."</td><td width=\"20%\">$immune</td></tr>\n";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
endif;
|
||||
// @MONSTERS END
|
||||
?>
|
||||
|
||||
<?php
|
||||
// @LEVELS
|
||||
if ($page === 'levels'):
|
||||
|
||||
$rows = [];
|
||||
|
||||
$levels = db()->query('SELECT * FROM levels ORDER BY id;');
|
||||
while ($level = $levels->fetchArray(SQLITE3_ASSOC)) {
|
||||
$class_data = [1 => [], 2 => [], 3 => []];
|
||||
|
||||
foreach ($level as $column => $value) {
|
||||
if ($column === 'id') continue;
|
||||
|
||||
$parts = explode('_', $column);
|
||||
$class_number = (int) $parts[0];
|
||||
$attribute = $parts[1];
|
||||
|
||||
if (in_array($class_number, [1, 2, 3])) {
|
||||
$class_data[$class_number][$level['id']][$attribute] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
$rows[$level['id']] = $class_data;
|
||||
}
|
||||
|
||||
$spells = [];
|
||||
$spells_query = db()->query('SELECT * FROM spells ORDER BY id;');
|
||||
while ($spell = $spells_query->fetchArray(SQLITE3_ASSOC)) {
|
||||
$spells[$spell['id']] = $spell;
|
||||
}
|
||||
?>
|
||||
|
||||
<table width="50%" style="border: solid 1px black" cellspacing="0" cellpadding="0">
|
||||
<tr><td colspan="8" bgcolor="#ffffff"><center><b><? echo $controlrow["class1name"]; ?> Levels</b></center></td></tr>
|
||||
<tr><td><b>Level</b><td><b>Exp.</b></td><td><b>HP</b></td><td><b>MP</b></td><td><b>TP</b></td><td><b>Strength</b></td><td><b>Dexterity</b></td><td><b>Spell</b></td></tr>
|
||||
<?php
|
||||
foreach ($rows as $level => $class_data) {
|
||||
$level_data = $class_data[1][$level];
|
||||
|
||||
$spell_name = '';
|
||||
if (!empty($level_data['spells'])) $spell_name = $spells[$level_data['spells']]['name'];
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td>' . $level . '</td>';
|
||||
echo '<td>' . ($level_data['exp'] ?? '') . '</td>';
|
||||
echo '<td>' . ($level_data['hp'] ?? '') . '</td>';
|
||||
echo '<td>' . ($level_data['mp'] ?? '') . '</td>';
|
||||
echo '<td>' . ($level_data['tp'] ?? '') . '</td>';
|
||||
echo '<td>' . ($level_data['strength'] ?? '') . '</td>';
|
||||
echo '<td>' . ($level_data['dexterity'] ?? '') . '</td>';
|
||||
echo '<td>' . (!empty($spell_name) ? $spell_name : '<span class="light">None</span>') . '</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
<br><br>
|
||||
|
||||
<table width="50%" style="border: solid 1px black" cellspacing="0" cellpadding="0">
|
||||
<tr><td colspan="8" bgcolor="#ffffff"><center><b><? echo $controlrow["class2name"]; ?> Levels</b></center></td></tr>
|
||||
<tr><td><b>Level</b><td><b>Exp.</b></td><td><b>HP</b></td><td><b>MP</b></td><td><b>TP</b></td><td><b>Strength</b></td><td><b>Dexterity</b></td><td><b>Spell</b></td></tr>
|
||||
<?php
|
||||
foreach ($rows as $level => $class_data) {
|
||||
$level_data = $class_data[2][$level];
|
||||
|
||||
$spell_name = '';
|
||||
if (!empty($level_data['spells'])) $spell_name = $spells[$level_data['spells']]['name'];
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td>' . $level . '</td>';
|
||||
echo '<td>' . ($level_data['exp'] ?? '') . '</td>';
|
||||
echo '<td>' . ($level_data['hp'] ?? '') . '</td>';
|
||||
echo '<td>' . ($level_data['mp'] ?? '') . '</td>';
|
||||
echo '<td>' . ($level_data['tp'] ?? '') . '</td>';
|
||||
echo '<td>' . ($level_data['strength'] ?? '') . '</td>';
|
||||
echo '<td>' . ($level_data['dexterity'] ?? '') . '</td>';
|
||||
echo '<td>' . (!empty($spell_name) ? $spell_name : '<span class="light">None</span>') . '</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
<br><br>
|
||||
|
||||
<table width="50%" style="border: solid 1px black" cellspacing="0" cellpadding="0">
|
||||
<tr><td colspan="8" bgcolor="#ffffff"><center><b><? echo $controlrow["class3name"]; ?> Levels</b></center></td></tr>
|
||||
<tr><td><b>Level</b><td><b>Exp.</b></td><td><b>HP</b></td><td><b>MP</b></td><td><b>TP</b></td><td><b>Strength</b></td><td><b>Dexterity</b></td><td><b>Spell</b></td></tr>
|
||||
<?php
|
||||
foreach ($rows as $level => $class_data) {
|
||||
$level_data = $class_data[3][$level];
|
||||
|
||||
$spell_name = '';
|
||||
if (!empty($level_data['spells'])) $spell_name = $spells[$level_data['spells']]['name'];
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td>' . $level . '</td>';
|
||||
echo '<td>' . ($level_data['exp'] ?? '') . '</td>';
|
||||
echo '<td>' . ($level_data['hp'] ?? '') . '</td>';
|
||||
echo '<td>' . ($level_data['mp'] ?? '') . '</td>';
|
||||
echo '<td>' . ($level_data['tp'] ?? '') . '</td>';
|
||||
echo '<td>' . ($level_data['strength'] ?? '') . '</td>';
|
||||
echo '<td>' . ($level_data['dexterity'] ?? '') . '</td>';
|
||||
echo '<td>' . (!empty($spell_name) ? $spell_name : '<span class="light">None</span>') . '</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
Experience points listed are total values up until that point. All other values are just the new amount that you gain for each level.
|
||||
|
||||
<?php
|
||||
endif;
|
||||
// @LEVELS END
|
||||
?>
|
||||
|
||||
<br><br>
|
||||
|
||||
<table class="copyright" width="100%"><tr>
|
||||
<td width="50%" align="center">Powered by <a href="http://dragon.se7enet.com/dev.php" target="_new">Dragon Knight</a></td><td width="50%" align="center">© 2003-2006 by renderse7en</td>
|
||||
</tr></table>
|
||||
|
|
|
@ -1,155 +0,0 @@
|
|||
<?php
|
||||
include('lib.php');
|
||||
$link = opendb();
|
||||
$controlquery = doquery("SELECT * FROM {{table}} WHERE id='1' LIMIT 1", "control");
|
||||
$controlrow = mysql_fetch_array($controlquery);
|
||||
ob_start("ob_gzhandler");
|
||||
?>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title><? echo $controlrow["gamename"]; ?> Help</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-image: url(images/background.jpg);
|
||||
color: black;
|
||||
font: 11px verdana;
|
||||
}
|
||||
table {
|
||||
border-style: none;
|
||||
padding: 0px;
|
||||
font: 11px verdana;
|
||||
}
|
||||
td {
|
||||
border-style: none;
|
||||
padding: 3px;
|
||||
vertical-align: top;
|
||||
}
|
||||
td.top {
|
||||
border-bottom: solid 2px black;
|
||||
}
|
||||
td.left {
|
||||
width: 150px;
|
||||
border-right: solid 2px black;
|
||||
}
|
||||
td.right {
|
||||
width: 150px;
|
||||
border-left: solid 2px black;
|
||||
}
|
||||
a {
|
||||
color: #663300;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
a:hover {
|
||||
color: #330000;
|
||||
}
|
||||
.small {
|
||||
font: 10px verdana;
|
||||
}
|
||||
.highlight {
|
||||
color: red;
|
||||
}
|
||||
.light {
|
||||
color: #999999;
|
||||
}
|
||||
.title {
|
||||
border: solid 1px black;
|
||||
background-color: #eeeeee;
|
||||
font-weight: bold;
|
||||
padding: 5px;
|
||||
margin: 3px;
|
||||
}
|
||||
.copyright {
|
||||
border: solid 1px black;
|
||||
background-color: #eeeeee;
|
||||
font: 10px verdana;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<a name="top"></a>
|
||||
<h1><? echo $controlrow["gamename"]; ?> Help: Items & Drops</h1>
|
||||
[ <a href="help.php">Return to Help</a> | <a href="index.php">Return to the game</a> ]
|
||||
|
||||
<br /><br /><hr />
|
||||
|
||||
<table width="60%" style="border: solid 1px black" cellspacing="0" cellpadding="0">
|
||||
<tr><td colspan="5" bgcolor="#ffffff"><center><b>Items</b></center></td></tr>
|
||||
<tr><td><b>Type</b></td><td><b>Name</b></td><td><b>Cost</b></td><td><b>Attribute</b></td><td><b>Special</b></td></tr>
|
||||
<?
|
||||
$count = 1;
|
||||
$itemsquery = doquery("SELECT * FROM {{table}} ORDER BY id", "items");
|
||||
while ($itemsrow = mysql_fetch_array($itemsquery)) {
|
||||
if ($count == 1) { $color = "bgcolor=\"#ffffff\""; $count = 2; } else { $color = ""; $count = 1; }
|
||||
if ($itemsrow["type"] == 1) { $image = "weapon"; $power = "Attack"; } elseif ($itemsrow["type"] == 2) { $image = "armor"; $power = "Defense"; } else { $image = "shield"; $power = "Defense"; }
|
||||
if ($itemsrow["special"] != "X") {
|
||||
$special = explode(",",$itemsrow["special"]);
|
||||
if ($special[0] == "maxhp") { $attr = "Max HP"; }
|
||||
elseif ($special[0] == "maxmp") { $attr = "Max MP"; }
|
||||
elseif ($special[0] == "maxtp") { $attr = "Max TP"; }
|
||||
elseif ($special[0] == "goldbonus") { $attr = "Gold Bonus (%)"; }
|
||||
elseif ($special[0] == "expbonus") { $attr = "Experience Bonus (%)"; }
|
||||
elseif ($special[0] == "strength") { $attr = "Strength"; }
|
||||
elseif ($special[0] == "dexterity") { $attr = "Dexterity"; }
|
||||
elseif ($special[0] == "attackpower") { $attr = "Attack Power"; }
|
||||
elseif ($special[0] == "defensepower") { $attr = "Defense Power"; }
|
||||
else { $attr = $special[0]; }
|
||||
if ($special[1] > 0) { $stat = "+" . $special[1]; } else { $stat = $special[1]; }
|
||||
$bigspecial = "$attr $stat";
|
||||
} else { $bigspecial = "<span class=\"light\">None</span>"; }
|
||||
echo "<tr><td $color width=\"5%\"><img src=\"images/icon_$image.gif\" alt=\"$image\"></td><td $color width=\"30%\">".$itemsrow["name"]."</td><td $color width=\"20%\">".$itemsrow["buycost"]." Gold</td><td $color width=\"20%\">".$itemsrow["attribute"]." $power Power</td><td $color width=\"25%\">$bigspecial</td></tr>\n";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<br />
|
||||
<br />
|
||||
<table width="60%" style="border: solid 1px black" cellspacing="0" cellpadding="0">
|
||||
<tr><td colspan="4" bgcolor="#ffffff"><center><b>Drops</b></center></td></tr>
|
||||
<tr><td><b>Name</b></td><td><b>Monster Level</b></td><td><b>Attribute 1</b></td><td><b>Attribute 2</b></td></tr>
|
||||
<?
|
||||
$count = 1;
|
||||
$itemsquery = doquery("SELECT * FROM {{table}} ORDER BY id", "drops");
|
||||
while ($itemsrow = mysql_fetch_array($itemsquery)) {
|
||||
if ($count == 1) { $color = "bgcolor=\"#ffffff\""; $count = 2; } else { $color = ""; $count = 1; }
|
||||
if ($itemsrow["attribute1"] != "X") {
|
||||
$special1 = explode(",",$itemsrow["attribute1"]);
|
||||
if ($special1[0] == "maxhp") { $attr1 = "Max HP"; }
|
||||
elseif ($special1[0] == "maxmp") { $attr1 = "Max MP"; }
|
||||
elseif ($special1[0] == "maxtp") { $attr1 = "Max TP"; }
|
||||
elseif ($special1[0] == "goldbonus") { $attr1 = "Gold Bonus (%)"; }
|
||||
elseif ($special1[0] == "expbonus") { $attr1 = "Experience Bonus (%)"; }
|
||||
elseif ($special1[0] == "strength") { $attr1 = "Strength"; }
|
||||
elseif ($special1[0] == "dexterity") { $attr1 = "Dexterity"; }
|
||||
elseif ($special1[0] == "attackpower") { $attr1 = "Attack Power"; }
|
||||
elseif ($special1[0] == "defensepower") { $attr1 = "Defense Power"; }
|
||||
else { $attr1 = $special1[0]; }
|
||||
if ($special1[1] > 0) { $stat1 = "+" . $special1[1]; } else { $stat1 = $special1[1]; }
|
||||
$bigspecial1 = "$attr1 $stat1";
|
||||
} else { $bigspecial1 = "<span class=\"light\">None</span>"; }
|
||||
if ($itemsrow["attribute2"] != "X") {
|
||||
$special2 = explode(",",$itemsrow["attribute2"]);
|
||||
if ($special2[0] == "maxhp") { $attr2 = "Max HP"; }
|
||||
elseif ($special2[0] == "maxmp") { $attr2 = "Max MP"; }
|
||||
elseif ($special2[0] == "maxtp") { $attr2 = "Max TP"; }
|
||||
elseif ($special2[0] == "goldbonus") { $attr2 = "Gold Bonus (%)"; }
|
||||
elseif ($special2[0] == "expbonus") { $attr2 = "Experience Bonus (%)"; }
|
||||
elseif ($special2[0] == "strength") { $attr2 = "Strength"; }
|
||||
elseif ($special2[0] == "dexterity") { $attr2 = "Dexterity"; }
|
||||
elseif ($special2[0] == "attackpower") { $attr2 = "Attack Power"; }
|
||||
elseif ($special2[0] == "defensepower") { $attr2 = "Defense Power"; }
|
||||
else { $attr2 = $special2[0]; }
|
||||
if ($special2[1] > 0) { $stat2 = "+" . $special2[1]; } else { $stat2 = $special2[1]; }
|
||||
$bigspecial2 = "$attr2 $stat2";
|
||||
} else { $bigspecial2 = "<span class=\"light\">None</span>"; }
|
||||
echo "<tr><td $color width=\"25%\">".$itemsrow["name"]."</td><td $color width=\"15%\">".$itemsrow["mlevel"]."</td><td $color width=\"30%\">$bigspecial1</td><td $color width=\"30%\">$bigspecial2</td></tr>\n";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<br />
|
||||
<table class="copyright" width="100%"><tr>
|
||||
<td width="50%" align="center">Powered by <a href="http://dragon.se7enet.com/dev.php" target="_new">Dragon Knight</a></td><td width="50%" align="center">© 2003-2006 by renderse7en</td>
|
||||
</tr></table>
|
||||
</body>
|
||||
</html>
|
|
@ -1,141 +0,0 @@
|
|||
<?php
|
||||
include('lib.php');
|
||||
$link = opendb();
|
||||
$controlquery = doquery("SELECT * FROM {{table}} WHERE id='1' LIMIT 1", "control");
|
||||
$controlrow = mysql_fetch_array($controlquery);
|
||||
ob_start("ob_gzhandler");
|
||||
?>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title><? echo $controlrow["gamename"]; ?> Help</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-image: url(images/background.jpg);
|
||||
color: black;
|
||||
font: 11px verdana;
|
||||
}
|
||||
table {
|
||||
border-style: none;
|
||||
padding: 0px;
|
||||
font: 11px verdana;
|
||||
}
|
||||
td {
|
||||
border-style: none;
|
||||
padding: 3px;
|
||||
vertical-align: top;
|
||||
}
|
||||
td.top {
|
||||
border-bottom: solid 2px black;
|
||||
}
|
||||
td.left {
|
||||
width: 150px;
|
||||
border-right: solid 2px black;
|
||||
}
|
||||
td.right {
|
||||
width: 150px;
|
||||
border-left: solid 2px black;
|
||||
}
|
||||
a {
|
||||
color: #663300;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
a:hover {
|
||||
color: #330000;
|
||||
}
|
||||
.small {
|
||||
font: 10px verdana;
|
||||
}
|
||||
.highlight {
|
||||
color: red;
|
||||
}
|
||||
.light {
|
||||
color: #999999;
|
||||
}
|
||||
.title {
|
||||
border: solid 1px black;
|
||||
background-color: #eeeeee;
|
||||
font-weight: bold;
|
||||
padding: 5px;
|
||||
margin: 3px;
|
||||
}
|
||||
.copyright {
|
||||
border: solid 1px black;
|
||||
background-color: #eeeeee;
|
||||
font: 10px verdana;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<a name="top"></a>
|
||||
<h1><? echo $controlrow["gamename"]; ?> Help: Levels</h1>
|
||||
[ <a href="help.php">Return to Help</a> | <a href="index.php">Return to the game</a> ]
|
||||
|
||||
<br /><br /><hr />
|
||||
|
||||
<table width="50%" style="border: solid 1px black" cellspacing="0" cellpadding="0">
|
||||
<tr><td colspan="8" bgcolor="#ffffff"><center><b><? echo $controlrow["class1name"]; ?> Levels</b></center></td></tr>
|
||||
<tr><td><b>Level</b><td><b>Exp.</b></td><td><b>HP</b></td><td><b>MP</b></td><td><b>TP</b></td><td><b>Strength</b></td><td><b>Dexterity</b></td><td><b>Spell</b></td></tr>
|
||||
<?
|
||||
$count = 1;
|
||||
$itemsquery = doquery("SELECT id,1_exp,1_hp,1_mp,1_tp,1_strength,1_dexterity,1_spells FROM {{table}} ORDER BY id", "levels");
|
||||
$spellsquery = doquery("SELECT * FROM {{table}} ORDER BY id", "spells");
|
||||
$spells = array();
|
||||
while ($spellsrow = mysql_fetch_array($spellsquery)) {
|
||||
$spells[$spellsrow["id"]] = $spellsrow;
|
||||
}
|
||||
while ($itemsrow = mysql_fetch_array($itemsquery)) {
|
||||
if ($count == 1) { $color = "bgcolor=\"#ffffff\""; $count = 2; } else { $color = ""; $count = 1; }
|
||||
if ($itemsrow["1_spells"] != 0) { $spell = $spells[$itemsrow["1_spells"]]["name"]; } else { $spell = "<span class=\"light\">None</span>"; }
|
||||
if ($itemsrow["id"] != 100) { echo "<tr><td $color width=\"12%\">".$itemsrow["id"]."</td><td $color width=\"12%\">".number_format($itemsrow["1_exp"])."</td><td $color width=\"12%\">".$itemsrow["1_hp"]."</td><td $color width=\"12%\">".$itemsrow["1_mp"]."</td><td $color width=\"12%\">".$itemsrow["1_tp"]."</td><td $color width=\"12%\">".$itemsrow["1_strength"]."</td><td $color width=\"12%\">".$itemsrow["1_dexterity"]."</td><td $color width=\"12%\">$spell</td></tr>\n"; }
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<br /><br />
|
||||
<table width="50%" style="border: solid 1px black" cellspacing="0" cellpadding="0">
|
||||
<tr><td colspan="8" bgcolor="#ffffff"><center><b><? echo $controlrow["class2name"]; ?> Levels</b></center></td></tr>
|
||||
<tr><td><b>Level</b><td><b>Exp.</b></td><td><b>HP</b></td><td><b>MP</b></td><td><b>TP</b></td><td><b>Strength</b></td><td><b>Dexterity</b></td><td><b>Spell</b></td></tr>
|
||||
<?
|
||||
$count = 1;
|
||||
$itemsquery = doquery("SELECT id,2_exp,2_hp,2_mp,2_tp,2_strength,2_dexterity,2_spells FROM {{table}} ORDER BY id", "levels");
|
||||
$spellsquery = doquery("SELECT * FROM {{table}} ORDER BY id", "spells");
|
||||
$spells = array();
|
||||
while ($spellsrow = mysql_fetch_array($spellsquery)) {
|
||||
$spells[$spellsrow["id"]] = $spellsrow;
|
||||
}
|
||||
while ($itemsrow = mysql_fetch_array($itemsquery)) {
|
||||
if ($count == 1) { $color = "bgcolor=\"#ffffff\""; $count = 2; } else { $color = ""; $count = 1; }
|
||||
if ($itemsrow["2_spells"] != 0) { $spell = $spells[$itemsrow["2_spells"]]["name"]; } else { $spell = "<span class=\"light\">None</span>"; }
|
||||
if ($itemsrow["id"] != 100) { echo "<tr><td $color width=\"12%\">".$itemsrow["id"]."</td><td $color width=\"12%\">".number_format($itemsrow["2_exp"])."</td><td $color width=\"12%\">".$itemsrow["2_hp"]."</td><td $color width=\"12%\">".$itemsrow["2_mp"]."</td><td $color width=\"12%\">".$itemsrow["2_tp"]."</td><td $color width=\"12%\">".$itemsrow["2_strength"]."</td><td $color width=\"12%\">".$itemsrow["2_dexterity"]."</td><td $color width=\"12%\">$spell</td></tr>\n"; }
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<br /><br />
|
||||
<table width="50%" style="border: solid 1px black" cellspacing="0" cellpadding="0">
|
||||
<tr><td colspan="8" bgcolor="#ffffff"><center><b><? echo $controlrow["class3name"]; ?> Levels</b></center></td></tr>
|
||||
<tr><td><b>Level</b><td><b>Exp.</b></td><td><b>HP</b></td><td><b>MP</b></td><td><b>TP</b></td><td><b>Strength</b></td><td><b>Dexterity</b></td><td><b>Spell</b></td></tr>
|
||||
<?
|
||||
$count = 1;
|
||||
$itemsquery = doquery("SELECT id,3_exp,3_hp,3_mp,3_tp,3_strength,3_dexterity,3_spells FROM {{table}} ORDER BY id", "levels");
|
||||
$spellsquery = doquery("SELECT * FROM {{table}} ORDER BY id", "spells");
|
||||
$spells = array();
|
||||
while ($spellsrow = mysql_fetch_array($spellsquery)) {
|
||||
$spells[$spellsrow["id"]] = $spellsrow;
|
||||
}
|
||||
while ($itemsrow = mysql_fetch_array($itemsquery)) {
|
||||
if ($count == 1) { $color = "bgcolor=\"#ffffff\""; $count = 2; } else { $color = ""; $count = 1; }
|
||||
if ($itemsrow["3_spells"] != 0) { $spell = $spells[$itemsrow["3_spells"]]["name"]; } else { $spell = "<span class=\"light\">None</span>"; }
|
||||
if ($itemsrow["id"] != 100) { echo "<tr><td $color width=\"12%\">".$itemsrow["id"]."</td><td $color width=\"12%\">".number_format($itemsrow["3_exp"])."</td><td $color width=\"12%\">".$itemsrow["3_hp"]."</td><td $color width=\"12%\">".$itemsrow["3_mp"]."</td><td $color width=\"12%\">".$itemsrow["3_tp"]."</td><td $color width=\"12%\">".$itemsrow["3_strength"]."</td><td $color width=\"12%\">".$itemsrow["3_dexterity"]."</td><td $color width=\"12%\">$spell</td></tr>\n"; }
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<br />
|
||||
Experience points listed are total values up until that point. All other values are just the new amount that you gain for each level.
|
||||
<br /><br />
|
||||
<table class="copyright" width="100%"><tr>
|
||||
<td width="50%" align="center">Powered by <a href="http://dragon.se7enet.com/dev.php" target="_new">Dragon Knight</a></td><td width="50%" align="center">© 2003-2006 by renderse7en</td>
|
||||
</tr></table>
|
||||
</body>
|
||||
</html>
|
|
@ -1,96 +0,0 @@
|
|||
<?php
|
||||
include('lib.php');
|
||||
$link = opendb();
|
||||
$controlquery = doquery("SELECT * FROM {{table}} WHERE id='1' LIMIT 1", "control");
|
||||
$controlrow = mysql_fetch_array($controlquery);
|
||||
ob_start("ob_gzhandler");
|
||||
?>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title><? echo $controlrow["gamename"]; ?> Help</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-image: url(images/background.jpg);
|
||||
color: black;
|
||||
font: 11px verdana;
|
||||
}
|
||||
table {
|
||||
border-style: none;
|
||||
padding: 0px;
|
||||
font: 11px verdana;
|
||||
}
|
||||
td {
|
||||
border-style: none;
|
||||
padding: 3px;
|
||||
vertical-align: top;
|
||||
}
|
||||
td.top {
|
||||
border-bottom: solid 2px black;
|
||||
}
|
||||
td.left {
|
||||
width: 150px;
|
||||
border-right: solid 2px black;
|
||||
}
|
||||
td.right {
|
||||
width: 150px;
|
||||
border-left: solid 2px black;
|
||||
}
|
||||
a {
|
||||
color: #663300;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
a:hover {
|
||||
color: #330000;
|
||||
}
|
||||
.small {
|
||||
font: 10px verdana;
|
||||
}
|
||||
.highlight {
|
||||
color: red;
|
||||
}
|
||||
.light {
|
||||
color: #999999;
|
||||
}
|
||||
.title {
|
||||
border: solid 1px black;
|
||||
background-color: #eeeeee;
|
||||
font-weight: bold;
|
||||
padding: 5px;
|
||||
margin: 3px;
|
||||
}
|
||||
.copyright {
|
||||
border: solid 1px black;
|
||||
background-color: #eeeeee;
|
||||
font: 10px verdana;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<a name="top"></a>
|
||||
<h1><? echo $controlrow["gamename"]; ?> Help: Monsters</h1>
|
||||
[ <a href="help.php">Return to Help</a> | <a href="index.php">Return to the game</a> ]
|
||||
|
||||
<br /><br /><hr />
|
||||
|
||||
<table width="75%" style="border: solid 1px black" cellspacing="0" cellpadding="0">
|
||||
<tr><td colspan="8" bgcolor="#ffffff"><center><b>Monsters</b></center></td></tr>
|
||||
<tr><td><b>Name</b></td><td><b>Max HP</b></td><td><b>Max Damage</b></td><td><b>Armor</b></td><td><b>Level</b></td><td><b>Max Exp.</b></td><td><b>Max Gold</b></td><td><b>Immunity</b></td></tr>
|
||||
<?
|
||||
$count = 1;
|
||||
$itemsquery = doquery("SELECT * FROM {{table}} ORDER BY id", "monsters");
|
||||
while ($itemsrow = mysql_fetch_array($itemsquery)) {
|
||||
if ($count == 1) { $color = "bgcolor=\"#ffffff\""; $count = 2; } else { $color = ""; $count = 1; }
|
||||
if ($itemsrow["immune"] == 0) { $immune = "<span class=\"light\">None</span>"; } elseif ($itemsrow["immune"] == 1) { $immune = "Hurt"; } else { $immune = "Hurt & Sleep"; }
|
||||
echo "<tr><td $color width=\"30%\">".$itemsrow["name"]."</td><td $color width=\"10%\">".$itemsrow["maxhp"]."</td><td $color width=\"10%\">".$itemsrow["maxdam"]."</td><td $color width=\"10%\">".$itemsrow["armor"]."</td><td $color width=\"10%\">".$itemsrow["level"]."</td><td $color width=\"10%\">".$itemsrow["maxexp"]."</td><td $color width=\"10%\">".$itemsrow["maxgold"]."</td><td $color width=\"20%\">$immune</td></tr>\n";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<br />
|
||||
<table class="copyright" width="100%"><tr>
|
||||
<td width="50%" align="center">Powered by <a href="http://dragon.se7enet.com/dev.php" target="_new">Dragon Knight</a></td><td width="50%" align="center">© 2003-2006 by renderse7en</td>
|
||||
</tr></table>
|
||||
</body>
|
||||
</html>
|
|
@ -1,106 +0,0 @@
|
|||
<?php
|
||||
include('lib.php');
|
||||
$link = opendb();
|
||||
$controlquery = doquery("SELECT * FROM {{table}} WHERE id='1' LIMIT 1", "control");
|
||||
$controlrow = mysql_fetch_array($controlquery);
|
||||
ob_start("ob_gzhandler");
|
||||
?>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<title><? echo $controlrow["gamename"]; ?> Help</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-image: url(images/background.jpg);
|
||||
color: black;
|
||||
font: 11px verdana;
|
||||
}
|
||||
table {
|
||||
border-style: none;
|
||||
padding: 0px;
|
||||
font: 11px verdana;
|
||||
}
|
||||
td {
|
||||
border-style: none;
|
||||
padding: 3px;
|
||||
vertical-align: top;
|
||||
}
|
||||
td.top {
|
||||
border-bottom: solid 2px black;
|
||||
}
|
||||
td.left {
|
||||
width: 150px;
|
||||
border-right: solid 2px black;
|
||||
}
|
||||
td.right {
|
||||
width: 150px;
|
||||
border-left: solid 2px black;
|
||||
}
|
||||
a {
|
||||
color: #663300;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
a:hover {
|
||||
color: #330000;
|
||||
}
|
||||
.small {
|
||||
font: 10px verdana;
|
||||
}
|
||||
.highlight {
|
||||
color: red;
|
||||
}
|
||||
.light {
|
||||
color: #999999;
|
||||
}
|
||||
.title {
|
||||
border: solid 1px black;
|
||||
background-color: #eeeeee;
|
||||
font-weight: bold;
|
||||
padding: 5px;
|
||||
margin: 3px;
|
||||
}
|
||||
.copyright {
|
||||
border: solid 1px black;
|
||||
background-color: #eeeeee;
|
||||
font: 10px verdana;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<a name="top"></a>
|
||||
<h1><? echo $controlrow["gamename"]; ?> Help: Spells</h1>
|
||||
[ <a href="help.php">Return to Help</a> | <a href="index.php">Return to the game</a> ]
|
||||
|
||||
<br /><br /><hr />
|
||||
|
||||
<table width="50%" style="border: solid 1px black" cellspacing="0" cellpadding="0">
|
||||
<tr><td colspan="8" bgcolor="#ffffff"><center><b>Spells</b></center></td></tr>
|
||||
<tr><td><b>Name</b></td><td><b>Cost</b></td><td><b>Type</b></td><td><b>Attribute</b></td></tr>
|
||||
<?
|
||||
$count = 1;
|
||||
$itemsquery = doquery("SELECT * FROM {{table}} ORDER BY id", "spells");
|
||||
while ($itemsrow = mysql_fetch_array($itemsquery)) {
|
||||
if ($count == 1) { $color = "bgcolor=\"#ffffff\""; $count = 2; } else { $color = ""; $count = 1; }
|
||||
if ($itemsrow["type"] == 1) { $type = "Heal"; }
|
||||
elseif ($itemsrow["type"] == 2) { $type = "Hurt"; }
|
||||
elseif ($itemsrow["type"] == 3) { $type = "Sleep"; }
|
||||
elseif ($itemsrow["type"] == 4) { $type = "+Damage (%)"; }
|
||||
elseif ($itemsrow["type"] == 5) { $type = "+Defense (%)"; }
|
||||
echo "<tr><td $color width=\"25%\">".$itemsrow["name"]."</td><td $color width=\"25%\">".$itemsrow["mp"]."</td><td $color width=\"25%\">$type</td><td $color width=\"25%\">".$itemsrow["attribute"]."</td></tr>\n";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<ul>
|
||||
<li /><b>Heal</b> spells always give you the maximum amount possible, until your current HP is full.
|
||||
<li /><b>Hurt</b> spells deal X damage (not always the maximum) to the monster, regardless of the monster's armor.
|
||||
<li /><b>Sleep</b> spells put the monster to sleep. The monster has an X in 15 chance of remaining asleep each turn.
|
||||
<li /><b>+Damage</b> spells increase your total attack damage by X percent until the end of the fight.
|
||||
<li /><b>+Defense</b> spells reduce the total damage you take from the monster by X percent until the end of each fight.
|
||||
</ul>
|
||||
<table class="copyright" width="100%"><tr>
|
||||
<td width="50%" align="center">Powered by <a href="http://dragon.se7enet.com/dev.php" target="_new">Dragon Knight</a></td><td width="50%" align="center">© 2003-2006 by renderse7en</td>
|
||||
</tr></table>
|
||||
</body>
|
||||
</html>
|
|
@ -102,7 +102,7 @@ function dotown()
|
|||
if ($controlrow["shownews"] == 1) {
|
||||
$newsrow = db()->query('SELECT * FROM news ORDER BY id DESC LIMIT 1;')->fetchArray(SQLITE3_ASSOC);
|
||||
$townrow["news"] = "<table width=\"95%\"><tr><td class=\"title\">Latest News</td></tr><tr><td>\n";
|
||||
$townrow["news"] .= "<span class=\"light\">[".prettydate($newsrow["postdate"])."]</span><br />".nl2br($newsrow["content"]);
|
||||
$townrow["news"] .= "<span class=\"light\">[".prettydate($newsrow["postdate"])."]</span><br>".nl2br($newsrow["content"]);
|
||||
$townrow["news"] .= "</td></tr></table>\n";
|
||||
}
|
||||
|
||||
|
@ -186,7 +186,7 @@ function showchar()
|
|||
while ($spellrow = $spells->fetchArray(SQLITE3_ASSOC)) {
|
||||
$spell = false;
|
||||
foreach($userspells as $b) if ($b == $spellrow["id"]) $spell = true;
|
||||
if ($spell == true) $userrow["magiclist"] .= $spellrow["name"]."<br />";
|
||||
if ($spell == true) $userrow["magiclist"] .= $spellrow["name"]."<br>";
|
||||
}
|
||||
if ($userrow["magiclist"] == "") $userrow["magiclist"] = "None";
|
||||
|
||||
|
@ -251,7 +251,7 @@ function babblebox()
|
|||
else { $new = "<div style=\"width:98%; background-color:#ffffff;\">[<b>".$babblerow["author"]."</b>] ".stripslashes($babblerow["babble"])."</div>\n"; $bg = 1; }
|
||||
$babblebox["content"] = $new . $babblebox["content"];
|
||||
}
|
||||
$babblebox["content"] .= "<center><form action=\"index.php?do=babblebox\" method=\"post\"><input type=\"text\" name=\"babble\" size=\"15\" maxlength=\"120\" /><br /><input type=\"submit\" name=\"submit\" value=\"Babble\" /> <input type=\"reset\" name=\"reset\" value=\"Clear\" /></form></center>";
|
||||
$babblebox["content"] .= "<center><form action=\"index.php?do=babblebox\" method=\"post\"><input type=\"text\" name=\"babble\" size=\"15\" maxlength=\"120\" /><br><input type=\"submit\" name=\"submit\" value=\"Babble\" /> <input type=\"reset\" name=\"reset\" value=\"Clear\" /></form></center>";
|
||||
|
||||
echo parsetemplate("<html>\n" . gettemplate("babblebox"), $babblebox);
|
||||
}
|
||||
|
|
|
@ -28,17 +28,17 @@ function first()
|
|||
</head>
|
||||
|
||||
<body>
|
||||
<b>Dragon Knight Installation: Page One</b><br /><br />
|
||||
<b>NOTE:</b> Please ensure you have filled in the correct values in config.php before continuing. Installation will fail if these values are not correct. Also, the MySQL database needs to already exist. This installer script will take care of setting up its structure and content, but the database itself must already exist on your MySQL server before the installer will work.<br /><br />
|
||||
Installation for Dragon Knight is a simple two-step process: set up the database tables, then create the admin user. After that, you're done.<br /><br />
|
||||
<b>Dragon Knight Installation: Page One</b><br><br>
|
||||
<b>NOTE:</b> Please ensure you have filled in the correct values in config.php before continuing. Installation will fail if these values are not correct. Also, the MySQL database needs to already exist. This installer script will take care of setting up its structure and content, but the database itself must already exist on your MySQL server before the installer will work.<br><br>
|
||||
Installation for Dragon Knight is a simple two-step process: set up the database tables, then create the admin user. After that, you're done.<br><br>
|
||||
You have two options for database setup: complete or partial.
|
||||
<ul>
|
||||
<li><b>Complete Setup</b> includes table structure and all default data (items, drops, monsters, levels, spells, towns) - after complete setup, the game is totally ready to run.</li>
|
||||
<li><b>Partial Setup</b> only creates the table structure, it does not populate the tables - use this if you are going to be creating and importing your own customized game data later.</li>
|
||||
</ul>
|
||||
Click the appropriate button below for your preferred installation method.<br /><br />
|
||||
Click the appropriate button below for your preferred installation method.<br><br>
|
||||
<form action="install.php?page=2" method="post">
|
||||
<input type="submit" name="complete" value="Complete Setup" /><br /> - OR - <br /><input type="submit" name="partial" value="Partial Setup" />
|
||||
<input type="submit" name="complete" value="Complete Setup" /><br> - OR - <br><input type="submit" name="partial" value="Partial Setup" />
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -50,7 +50,7 @@ function first()
|
|||
*/
|
||||
function second()
|
||||
{
|
||||
echo "<html><head><title>Dragon Knight Installation</title></head><body><b>Dragon Knight Installation: Page Two</b><br /><br />";
|
||||
echo "<html><head><title>Dragon Knight Installation</title></head><body><b>Dragon Knight Installation: Page Two</b><br><br>";
|
||||
|
||||
$full = isset($_POST["complete"]);
|
||||
|
||||
|
@ -63,7 +63,7 @@ function second()
|
|||
);
|
||||
SQL);
|
||||
|
||||
echo $query === true ? 'Babble Box table created.<br />' : 'Error creating Babble Box table.';
|
||||
echo $query === true ? 'Babble Box table created.<br>' : 'Error creating Babble Box table.';
|
||||
|
||||
$query = db()->exec(<<<SQL
|
||||
CREATE TABLE control (
|
||||
|
@ -91,11 +91,11 @@ function second()
|
|||
);
|
||||
SQL);
|
||||
|
||||
echo $query === true ? 'Control table created.<br />' : 'Error creating Control table.';
|
||||
echo $query === true ? 'Control table created.<br>' : 'Error creating Control table.';
|
||||
|
||||
$query = db()->exec("INSERT INTO control VALUES (1, 'Dragon Knight', 250, 1, '', '', 1, '', 'Mage', 'Warrior', 'Paladin', 'Easy', 1, 'Medium', 1.2, 'Hard', 1.5, 1, 1, 1, 1);");
|
||||
|
||||
echo $query === true ? 'Control table populated.<br />' : 'Error populating Control table.';
|
||||
echo $query === true ? 'Control table populated.<br>' : 'Error populating Control table.';
|
||||
|
||||
$query = db()->exec(<<<SQL
|
||||
CREATE TABLE drops (
|
||||
|
@ -108,7 +108,7 @@ function second()
|
|||
);
|
||||
SQL);
|
||||
|
||||
echo $query == true ? 'Drops table created.<br />' : 'Error creating Drops table.';
|
||||
echo $query == true ? 'Drops table created.<br>' : 'Error creating Drops table.';
|
||||
|
||||
if ($full) {
|
||||
$query = db()->exec(<<<SQL
|
||||
|
@ -147,7 +147,7 @@ function second()
|
|||
(32, 'Fortune Drop', 5, 1, 'goldbonus,10', 'X');
|
||||
SQL);
|
||||
|
||||
echo $query === true ? 'Drops table populated.<br />' : 'Error populating Drops table.';
|
||||
echo $query === true ? 'Drops table populated.<br>' : 'Error populating Drops table.';
|
||||
}
|
||||
|
||||
$query = db()->exec(<<<SQL
|
||||
|
@ -163,7 +163,7 @@ function second()
|
|||
);
|
||||
SQL);
|
||||
|
||||
echo $query === true ? 'Forum table created.<br />' : 'Error creating Forum table.';
|
||||
echo $query === true ? 'Forum table created.<br>' : 'Error creating Forum table.';
|
||||
|
||||
$query = db()->exec(<<<SQL
|
||||
CREATE TABLE items (
|
||||
|
@ -176,7 +176,7 @@ function second()
|
|||
);
|
||||
SQL);
|
||||
|
||||
echo $query === true ? 'Items table created.<br />' : 'Error creating Items table.';
|
||||
echo $query === true ? 'Items table created.<br>' : 'Error creating Items table.';
|
||||
|
||||
if ($full) {
|
||||
$query = db()->exec(<<<SQL
|
||||
|
@ -216,7 +216,7 @@ function second()
|
|||
(33, 3, 'Destiny Aegis', 25000, 100, 'maxhp,50');
|
||||
SQL);
|
||||
|
||||
echo $query === true ? 'Items table populated.<br />' : 'Error populating Items table.';
|
||||
echo $query === true ? 'Items table populated.<br>' : 'Error populating Items table.';
|
||||
}
|
||||
|
||||
$query = db()->exec(<<<SQL
|
||||
|
@ -246,7 +246,7 @@ function second()
|
|||
);
|
||||
SQL);
|
||||
|
||||
echo $query === true ? 'Levels table created.<br />' : 'Error creating Levels table.';
|
||||
echo $query === true ? 'Levels table created.<br>' : 'Error creating Levels table.';
|
||||
|
||||
if ($full) {
|
||||
$query = db()->exec(<<<SQL
|
||||
|
@ -353,7 +353,7 @@ function second()
|
|||
(100, 16777215, 0, 0, 0, 0, 0, 0, 16777215, 0, 0, 0, 0, 0, 0, 16777215, 0, 0, 0, 0, 0, 0);
|
||||
SQL);
|
||||
|
||||
echo $query === true ? 'Levels table populated.<br />' : 'Error populating Levels table.';
|
||||
echo $query === true ? 'Levels table populated.<br>' : 'Error populating Levels table.';
|
||||
}
|
||||
|
||||
$query = db()->exec(<<<SQL
|
||||
|
@ -370,7 +370,7 @@ function second()
|
|||
);
|
||||
SQL);
|
||||
|
||||
echo $query === true ? 'Monsters table created.<br />' : 'Error creating Monsters table.';
|
||||
echo $query === true ? 'Monsters table created.<br>' : 'Error creating Monsters table.';
|
||||
|
||||
if ($full) {
|
||||
$query = db()->exec(<<<SQL
|
||||
|
@ -528,7 +528,7 @@ function second()
|
|||
(151, 'Lucifuge', 600, 600, 400, 50, 10000, 10000, 2);
|
||||
SQL);
|
||||
|
||||
echo $query === true ? 'Monsters table populated.<br />' : 'Error populating Monsters table.';
|
||||
echo $query === true ? 'Monsters table populated.<br>' : 'Error populating Monsters table.';
|
||||
}
|
||||
|
||||
$query = db()->exec(<<<SQL
|
||||
|
@ -539,11 +539,11 @@ function second()
|
|||
);
|
||||
SQL);
|
||||
|
||||
echo $query === true ? 'News table created.<br />' : 'Error creating News table.';
|
||||
echo $query === true ? 'News table created.<br>' : 'Error creating News table.';
|
||||
|
||||
$query = db()->exec("INSERT INTO news VALUES (1, '2004-01-01 12:00:00', 'This is the first news post. Please use the admin control panel to add another one and make this one go away.');");
|
||||
|
||||
echo $query === true ? 'News table populated.<br />' : 'Error populating News table.';
|
||||
echo $query === true ? 'News table populated.<br>' : 'Error populating News table.';
|
||||
|
||||
$query = db()->exec(<<<SQL
|
||||
CREATE TABLE spells (
|
||||
|
@ -555,7 +555,7 @@ function second()
|
|||
);
|
||||
SQL);
|
||||
|
||||
echo $query === true ? 'Spells table created.<br />' : 'Error creating Spells table.';
|
||||
echo $query === true ? 'Spells table created.<br>' : 'Error creating Spells table.';
|
||||
|
||||
if ($full) {
|
||||
$query = db()->exec(<<<SQL
|
||||
|
@ -581,7 +581,7 @@ function second()
|
|||
(19, 'Barrier', 30, 50, 5);
|
||||
SQL);
|
||||
|
||||
echo $query === true ? 'Spells table populated.<br />' : 'Error populating Spells table.';
|
||||
echo $query === true ? 'Spells table populated.<br>' : 'Error populating Spells table.';
|
||||
}
|
||||
|
||||
$query = db()->exec(<<<SQL
|
||||
|
@ -597,7 +597,7 @@ function second()
|
|||
);
|
||||
SQL);
|
||||
|
||||
echo $query === true ? 'Towns table created.<br />' : 'Error creating Towns table.';
|
||||
echo $query === true ? 'Towns table created.<br>' : 'Error creating Towns table.';
|
||||
|
||||
if ($full) {
|
||||
$query = db()->exec(<<<SQL
|
||||
|
@ -612,7 +612,7 @@ function second()
|
|||
(8, 'Endworld', -250, -250, 125, 9000, 160, '16,27,33');
|
||||
SQL);
|
||||
|
||||
echo $query === true ? 'Towns table populated.<br />' : 'Error populating Towns table.';
|
||||
echo $query === true ? 'Towns table populated.<br>' : 'Error populating Towns table.';
|
||||
}
|
||||
|
||||
$query = db()->exec(<<<SQL
|
||||
|
@ -669,10 +669,10 @@ function second()
|
|||
);
|
||||
SQL);
|
||||
|
||||
echo $query === true ? 'Users table created.<br />' : 'Error creating Users table.';
|
||||
echo $query === true ? 'Users table created.<br>' : 'Error creating Users table.';
|
||||
|
||||
$time = round((microtime(true) - START), 4);
|
||||
echo "<br />Database setup complete in $time seconds.<br /><br /><a href=\"install.php?page=3\">Click here to continue with installation.</a></body></html>";
|
||||
echo "<br>Database setup complete in $time seconds.<br><br><a href=\"install.php?page=3\">Click here to continue with installation.</a></body></html>";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -686,15 +686,15 @@ function third()
|
|||
<title>Dragon Knight Installation</title>
|
||||
</head>
|
||||
<body>
|
||||
<b>Dragon Knight Installation: Page Three</b><br /><br />
|
||||
Now you must create an administrator account so you can use the control panel. Fill out the form below to create your account. You will be able to customize the class names through the control panel once your admin account is created.<br /><br />
|
||||
<b>Dragon Knight Installation: Page Three</b><br><br>
|
||||
Now you must create an administrator account so you can use the control panel. Fill out the form below to create your account. You will be able to customize the class names through the control panel once your admin account is created.<br><br>
|
||||
<form action="install.php?page=4" method="post">
|
||||
<table width="50%">
|
||||
<tr><td width="20%" style="vertical-align:top;">Username:</td><td><input type="text" name="username" size="30" maxlength="30" /><br /><br /><br /></td></tr>
|
||||
<tr><td width="20%" style="vertical-align:top;">Username:</td><td><input type="text" name="username" size="30" maxlength="30" /><br><br><br></td></tr>
|
||||
<tr><td style="vertical-align:top;">Password:</td><td><input type="password" name="password1" size="30" maxlength="30" /></td></tr>
|
||||
<tr><td style="vertical-align:top;">Verify Password:</td><td><input type="password" name="password2" size="30" maxlength="30" /><br /><br /><br /></td></tr>
|
||||
<tr><td style="vertical-align:top;">Verify Password:</td><td><input type="password" name="password2" size="30" maxlength="30" /><br><br><br></td></tr>
|
||||
<tr><td style="vertical-align:top;">Email Address:</td><td><input type="text" name="email1" size="30" maxlength="100" /></td></tr>
|
||||
<tr><td style="vertical-align:top;">Verify Email:</td><td><input type="text" name="email2" size="30" maxlength="100" /><br /><br /><br /></td></tr>
|
||||
<tr><td style="vertical-align:top;">Verify Email:</td><td><input type="text" name="email2" size="30" maxlength="100" /><br><br><br></td></tr>
|
||||
<tr><td style="vertical-align:top;">Character Class:</td><td><select name="charclass"><option value="1">Mage</option><option value="2">Warrior</option><option value="3">Paladin</option></select></td></tr>
|
||||
<tr><td colspan="2"><input type="submit" name="submit" value="Submit" /> <input type="reset" name="reset" value="Reset" /></td></tr>
|
||||
</table>
|
||||
|
@ -761,11 +761,11 @@ function fourth()
|
|||
<title>Dragon Knight Installation</title>
|
||||
</head>
|
||||
<body>
|
||||
<b>Dragon Knight Installation: Page Four</b><br /><br />
|
||||
Your admin account was created successfully. Installation is complete.<br /><br />
|
||||
Be sure to delete install.php from your Dragon Knight directory for security purposes.<br /><br />
|
||||
You are now ready to <a href="index.php">play the game</a>. Note that you must log in through the public section before being allowed into the control panel. Once logged in, an "Admin" link will appear in the Functions box of the left sidebar panel.<br /><br/>
|
||||
Thank you for using Dragon Knight!<br /><br />-----<br /><br />
|
||||
<b>Dragon Knight Installation: Page Four</b><br><br>
|
||||
Your admin account was created successfully. Installation is complete.<br><br>
|
||||
Be sure to delete install.php from your Dragon Knight directory for security purposes.<br><br>
|
||||
You are now ready to <a href="index.php">play the game</a>. Note that you must log in through the public section before being allowed into the control panel. Once logged in, an "Admin" link will appear in the Functions box of the left sidebar panel.<br><br/>
|
||||
Thank you for using Dragon Knight!<br><br>-----<br><br>
|
||||
<b>Optional:</b> Dragon Knight is a free product, and does not require registration of any sort. However, there is an
|
||||
optional "call home" function in the installer, which notifies the author of your game installation. The ONLY information
|
||||
transmitted with this function is the URL to your game. This is included mainly to satisfy the author's curiosity about
|
||||
|
@ -791,8 +791,8 @@ function fifth()
|
|||
<title>Dragon Knight Installation</title>
|
||||
</head>
|
||||
<body>
|
||||
<b>Dragon Knight Installation: Page Five</b><br /><br />
|
||||
Thank you for submitting your URL!<br /><br />
|
||||
<b>Dragon Knight Installation: Page Five</b><br><br>
|
||||
Thank you for submitting your URL!<br><br>
|
||||
You are now ready to <a href="index.php">play the game</a>. Note that you must log in through the public section before being allowed into the control panel. Once logged in, an "Admin" link will appear in the Functions box of the left sidebar panel.
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -25,22 +25,22 @@ function register() { // Register a new account.
|
|||
$errors = 0; $errorlist = "";
|
||||
|
||||
// Process username.
|
||||
if ($username == "") { $errors++; $errorlist .= "Username field is required.<br />"; }
|
||||
if (preg_match("/[^A-z0-9_\-]/", $username)==1) { $errors++; $errorlist .= "Username must be alphanumeric.<br />"; } // Thanks to "Carlos Pires" from php.net!
|
||||
if ($username == "") { $errors++; $errorlist .= "Username field is required.<br>"; }
|
||||
if (preg_match("/[^A-z0-9_\-]/", $username)==1) { $errors++; $errorlist .= "Username must be alphanumeric.<br>"; } // Thanks to "Carlos Pires" from php.net!
|
||||
$usernamequery = doquery("SELECT username FROM {{table}} WHERE username='$username' LIMIT 1","users");
|
||||
if (mysql_num_rows($usernamequery) > 0) { $errors++; $errorlist .= "Username already taken - unique username required.<br />"; }
|
||||
if (mysql_num_rows($usernamequery) > 0) { $errors++; $errorlist .= "Username already taken - unique username required.<br>"; }
|
||||
|
||||
// Process email address.
|
||||
if ($email1 == "" || $email2 == "") { $errors++; $errorlist .= "Email fields are required.<br />"; }
|
||||
if ($email1 != $email2) { $errors++; $errorlist .= "Emails don't match.<br />"; }
|
||||
if (! is_email($email1)) { $errors++; $errorlist .= "Email isn't valid.<br />"; }
|
||||
if ($email1 == "" || $email2 == "") { $errors++; $errorlist .= "Email fields are required.<br>"; }
|
||||
if ($email1 != $email2) { $errors++; $errorlist .= "Emails don't match.<br>"; }
|
||||
if (! is_email($email1)) { $errors++; $errorlist .= "Email isn't valid.<br>"; }
|
||||
$emailquery = doquery("SELECT email FROM {{table}} WHERE email='$email1' LIMIT 1","users");
|
||||
if (mysql_num_rows($emailquery) > 0) { $errors++; $errorlist .= "Email already taken - unique email address required.<br />"; }
|
||||
if (mysql_num_rows($emailquery) > 0) { $errors++; $errorlist .= "Email already taken - unique email address required.<br>"; }
|
||||
|
||||
// Process password.
|
||||
if (trim($password1) == "") { $errors++; $errorlist .= "Password field is required.<br />"; }
|
||||
if (preg_match("/[^A-z0-9_\-]/", $password1)==1) { $errors++; $errorlist .= "Password must be alphanumeric.<br />"; } // Thanks to "Carlos Pires" from php.net!
|
||||
if ($password1 != $password2) { $errors++; $errorlist .= "Passwords don't match.<br />"; }
|
||||
if (trim($password1) == "") { $errors++; $errorlist .= "Password field is required.<br>"; }
|
||||
if (preg_match("/[^A-z0-9_\-]/", $password1)==1) { $errors++; $errorlist .= "Password must be alphanumeric.<br>"; } // Thanks to "Carlos Pires" from php.net!
|
||||
if ($password1 != $password2) { $errors++; $errorlist .= "Passwords don't match.<br>"; }
|
||||
$password = md5($password1);
|
||||
|
||||
if ($errors == 0) {
|
||||
|
@ -58,17 +58,17 @@ function register() { // Register a new account.
|
|||
|
||||
if ($controlrow["verifyemail"] == 1) {
|
||||
if (sendregmail($email1, $verifycode) == true) {
|
||||
$page = "Your account was created successfully.<br /><br />You should receive an Account Verification email shortly. You will need the verification code contained in that email before you are allowed to log in. Once you have received the email, please visit the <a href=\"users.php?do=verify\">Verification Page</a> to enter your code and start playing.";
|
||||
$page = "Your account was created successfully.<br><br>You should receive an Account Verification email shortly. You will need the verification code contained in that email before you are allowed to log in. Once you have received the email, please visit the <a href=\"users.php?do=verify\">Verification Page</a> to enter your code and start playing.";
|
||||
} else {
|
||||
$page = "Your account was created successfully.<br /><br />However, there was a problem sending your verification email. Please check with the game administrator to help resolve this problem.";
|
||||
$page = "Your account was created successfully.<br><br>However, there was a problem sending your verification email. Please check with the game administrator to help resolve this problem.";
|
||||
}
|
||||
} else {
|
||||
$page = "Your account was created succesfully.<br /><br />You may now continue to the <a href=\"login.php?do=login\">Login Page</a> and continue playing ".$controlrow["gamename"]."!";
|
||||
$page = "Your account was created succesfully.<br><br>You may now continue to the <a href=\"login.php?do=login\">Login Page</a> and continue playing ".$controlrow["gamename"]."!";
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
$page = "The following error(s) occurred when your account was being made:<br /><span style=\"color:red;\">$errorlist</span><br />Please go back and try again.";
|
||||
$page = "The following error(s) occurred when your account was being made:<br><span style=\"color:red;\">$errorlist</span><br>Please go back and try again.";
|
||||
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ function register() { // Register a new account.
|
|||
|
||||
$page = gettemplate("register");
|
||||
if ($controlrow["verifyemail"] == 1) {
|
||||
$controlrow["verifytext"] = "<br /><span class=\"small\">A verification code will be sent to the address above, and you will not be able to log in without first entering the code. Please be sure to enter your correct email address.</span>";
|
||||
$controlrow["verifytext"] = "<br><span class=\"small\">A verification code will be sent to the address above, and you will not be able to log in without first entering the code. Please be sure to enter your correct email address.</span>";
|
||||
} else {
|
||||
$controlrow["verifytext"] = "";
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ function verify() {
|
|||
if ($userrow["verify"] != $verify) { die("Incorrect verification code."); }
|
||||
// If we've made it this far, should be safe to update their account.
|
||||
$updatequery = doquery("UPDATE {{table}} SET verify='1' WHERE username='$username' LIMIT 1","users");
|
||||
display("Your account was verified successfully.<br /><br />You may now continue to the <a href=\"login.php?do=login\">Login Page</a> and start playing the game.<br /><br />Thanks for playing!","Verify Email",false,false,false);
|
||||
display("Your account was verified successfully.<br><br>You may now continue to the <a href=\"login.php?do=login\">Login Page</a> and start playing the game.<br><br>Thanks for playing!","Verify Email",false,false,false);
|
||||
}
|
||||
$page = gettemplate("verify");
|
||||
$topnav = "<a href=\"login.php?do=login\"><img src=\"images/button_login.gif\" alt=\"Log In\" border=\"0\" /></a><a href=\"users.php?do=register\"><img src=\"images/button_register.gif\" alt=\"Register\" border=\"0\" /></a><a href=\"help.php\"><img src=\"images/button_help.gif\" alt=\"Help\" border=\"0\" /></a>";
|
||||
|
@ -122,9 +122,9 @@ function lostpassword() {
|
|||
$md5newpass = md5($newpass);
|
||||
$updatequery = doquery("UPDATE {{table}} SET password='$md5newpass' WHERE email='$email' LIMIT 1","users");
|
||||
if (sendpassemail($email,$newpass) == true) {
|
||||
display("Your new password was emailed to the address you provided.<br /><br />Once you receive it, you may <a href=\"login.php?do=login\">Log In</a> and continue playing.<br /><br />Thank you.","Lost Password",false,false,false);
|
||||
display("Your new password was emailed to the address you provided.<br><br>Once you receive it, you may <a href=\"login.php?do=login\">Log In</a> and continue playing.<br><br>Thank you.","Lost Password",false,false,false);
|
||||
} else {
|
||||
display("There was an error sending your new password.<br /><br />Please check with the game administrator for more information.<br /><br />We apologize for the inconvience.","Lost Password",false,false,false);
|
||||
display("There was an error sending your new password.<br><br>Please check with the game administrator for more information.<br><br>We apologize for the inconvience.","Lost Password",false,false,false);
|
||||
}
|
||||
die();
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ function changepassword() {
|
|||
$realnewpass = md5($newpass1);
|
||||
$updatequery = doquery("UPDATE {{table}} SET password='$realnewpass' WHERE username='$username' LIMIT 1","users");
|
||||
if (isset($_COOKIE["dkgame"])) { setcookie("dkgame", "", time()-100000, "/", "", 0); }
|
||||
display("Your password was changed successfully.<br /><br />You have been logged out of the game to avoid cookie errors.<br /><br />Please <a href=\"login.php?do=login\">log back in</a> to continue playing.","Change Password",false,false,false);
|
||||
display("Your password was changed successfully.<br><br>You have been logged out of the game to avoid cookie errors.<br><br>Please <a href=\"login.php?do=login\">log back in</a> to continue playing.","Change Password",false,false,false);
|
||||
die();
|
||||
}
|
||||
$page = gettemplate("changepassword");
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
function fight() { // One big long function that determines the outcome of the fight.
|
||||
|
||||
global $userrow, $controlrow;
|
||||
if ($userrow["currentaction"] != "Fighting") { display("Cheat attempt detected.<br /><br />Get a life, loser.", "Error"); }
|
||||
if ($userrow["currentaction"] != "Fighting") { display("Cheat attempt detected.<br><br>Get a life, loser.", "Error"); }
|
||||
$pagearray = array();
|
||||
$playerisdead = 0;
|
||||
|
||||
|
@ -64,16 +64,16 @@ function fight() { // One big long function that determines the outcome of the f
|
|||
if ($chancetorun > (rand(1,5) + ceil(sqrt($monsterrow["maxdam"])))) { $chancetorun = 1; } else { $chancetorun = 0; }
|
||||
|
||||
if ($chancetorun == 0) {
|
||||
$pagearray["yourturn"] = "You tried to run away, but were blocked in front!<br /><br />";
|
||||
$pagearray["monsterhp"] = "Monster's HP: " . $userrow["currentmonsterhp"] . "<br /><br />";
|
||||
$pagearray["yourturn"] = "You tried to run away, but were blocked in front!<br><br>";
|
||||
$pagearray["monsterhp"] = "Monster's HP: " . $userrow["currentmonsterhp"] . "<br><br>";
|
||||
$pagearray["monsterturn"] = "";
|
||||
if ($userrow["currentmonstersleep"] != 0) { // Check to wake up.
|
||||
$chancetowake = rand(1,15);
|
||||
if ($chancetowake > $userrow["currentmonstersleep"]) {
|
||||
$userrow["currentmonstersleep"] = 0;
|
||||
$pagearray["monsterturn"] .= "The monster has woken up.<br />";
|
||||
$pagearray["monsterturn"] .= "The monster has woken up.<br>";
|
||||
} else {
|
||||
$pagearray["monsterturn"] .= "The monster is still asleep.<br />";
|
||||
$pagearray["monsterturn"] .= "The monster is still asleep.<br>";
|
||||
}
|
||||
}
|
||||
if ($userrow["currentmonstersleep"] == 0) { // Only do this if the monster is awake.
|
||||
|
@ -81,7 +81,7 @@ function fight() { // One big long function that determines the outcome of the f
|
|||
$toblock = ceil(rand($userrow["defensepower"]*.75,$userrow["defensepower"])/4);
|
||||
$tododge = rand(1,150);
|
||||
if ($tododge <= sqrt($userrow["dexterity"])) {
|
||||
$tohit = 0; $pagearray["monsterturn"] .= "You dodge the monster's attack. No damage has been scored.<br />";
|
||||
$tohit = 0; $pagearray["monsterturn"] .= "You dodge the monster's attack. No damage has been scored.<br>";
|
||||
$persondamage = 0;
|
||||
} else {
|
||||
$persondamage = $tohit - $toblock;
|
||||
|
@ -91,7 +91,7 @@ function fight() { // One big long function that determines the outcome of the f
|
|||
}
|
||||
if ($persondamage < 1) { $persondamage = 1; }
|
||||
}
|
||||
$pagearray["monsterturn"] .= "The monster attacks you for $persondamage damage.<br /><br />";
|
||||
$pagearray["monsterturn"] .= "The monster attacks you for $persondamage damage.<br><br>";
|
||||
$userrow["currenthp"] -= $persondamage;
|
||||
if ($userrow["currenthp"] <= 0) {
|
||||
$newgold = ceil($userrow["gold"]/2);
|
||||
|
@ -113,11 +113,11 @@ function fight() { // One big long function that determines the outcome of the f
|
|||
$pagearray["yourturn"] = "";
|
||||
$tohit = ceil(rand($userrow["attackpower"]*.75,$userrow["attackpower"])/3);
|
||||
$toexcellent = rand(1,150);
|
||||
if ($toexcellent <= sqrt($userrow["strength"])) { $tohit *= 2; $pagearray["yourturn"] .= "Excellent hit!<br />"; }
|
||||
if ($toexcellent <= sqrt($userrow["strength"])) { $tohit *= 2; $pagearray["yourturn"] .= "Excellent hit!<br>"; }
|
||||
$toblock = ceil(rand($monsterrow["armor"]*.75,$monsterrow["armor"])/3);
|
||||
$tododge = rand(1,200);
|
||||
if ($tododge <= sqrt($monsterrow["armor"])) {
|
||||
$tohit = 0; $pagearray["yourturn"] .= "The monster is dodging. No damage has been scored.<br />";
|
||||
$tohit = 0; $pagearray["yourturn"] .= "The monster is dodging. No damage has been scored.<br>";
|
||||
$monsterdamage = 0;
|
||||
} else {
|
||||
$monsterdamage = $tohit - $toblock;
|
||||
|
@ -126,9 +126,9 @@ function fight() { // One big long function that determines the outcome of the f
|
|||
$monsterdamage += ceil($monsterdamage * ($userrow["currentuberdamage"]/100));
|
||||
}
|
||||
}
|
||||
$pagearray["yourturn"] .= "You attack the monster for $monsterdamage damage.<br /><br />";
|
||||
$pagearray["yourturn"] .= "You attack the monster for $monsterdamage damage.<br><br>";
|
||||
$userrow["currentmonsterhp"] -= $monsterdamage;
|
||||
$pagearray["monsterhp"] = "Monster's HP: " . $userrow["currentmonsterhp"] . "<br /><br />";
|
||||
$pagearray["monsterhp"] = "Monster's HP: " . $userrow["currentmonsterhp"] . "<br><br>";
|
||||
if ($userrow["currentmonsterhp"] <= 0) {
|
||||
$updatequery = doquery("UPDATE {{table}} SET currentmonsterhp='0' WHERE id='".$userrow["id"]."' LIMIT 1", "users");
|
||||
header("Location: index.php?do=victory");
|
||||
|
@ -141,9 +141,9 @@ function fight() { // One big long function that determines the outcome of the f
|
|||
$chancetowake = rand(1,15);
|
||||
if ($chancetowake > $userrow["currentmonstersleep"]) {
|
||||
$userrow["currentmonstersleep"] = 0;
|
||||
$pagearray["monsterturn"] .= "The monster has woken up.<br />";
|
||||
$pagearray["monsterturn"] .= "The monster has woken up.<br>";
|
||||
} else {
|
||||
$pagearray["monsterturn"] .= "The monster is still asleep.<br />";
|
||||
$pagearray["monsterturn"] .= "The monster is still asleep.<br>";
|
||||
}
|
||||
}
|
||||
if ($userrow["currentmonstersleep"] == 0) { // Only do this if the monster is awake.
|
||||
|
@ -151,7 +151,7 @@ function fight() { // One big long function that determines the outcome of the f
|
|||
$toblock = ceil(rand($userrow["defensepower"]*.75,$userrow["defensepower"])/4);
|
||||
$tododge = rand(1,150);
|
||||
if ($tododge <= sqrt($userrow["dexterity"])) {
|
||||
$tohit = 0; $pagearray["monsterturn"] .= "You dodge the monster's attack. No damage has been scored.<br />";
|
||||
$tohit = 0; $pagearray["monsterturn"] .= "You dodge the monster's attack. No damage has been scored.<br>";
|
||||
$persondamage = 0;
|
||||
} else {
|
||||
$persondamage = $tohit - $toblock;
|
||||
|
@ -161,7 +161,7 @@ function fight() { // One big long function that determines the outcome of the f
|
|||
}
|
||||
if ($persondamage < 1) { $persondamage = 1; }
|
||||
}
|
||||
$pagearray["monsterturn"] .= "The monster attacks you for $persondamage damage.<br /><br />";
|
||||
$pagearray["monsterturn"] .= "The monster attacks you for $persondamage damage.<br><br>";
|
||||
$userrow["currenthp"] -= $persondamage;
|
||||
if ($userrow["currenthp"] <= 0) {
|
||||
$newgold = ceil($userrow["gold"]/2);
|
||||
|
@ -192,35 +192,35 @@ function fight() { // One big long function that determines the outcome of the f
|
|||
if ($userrow["maxhp"] < $newhp) { $newspellrow["attribute"] = $userrow["maxhp"] - $userrow["currenthp"]; $newhp = $userrow["currenthp"] + $newspellrow["attribute"]; }
|
||||
$userrow["currenthp"] = $newhp;
|
||||
$userrow["currentmp"] -= $newspellrow["mp"];
|
||||
$pagearray["yourturn"] = "You have cast the ".$newspellrow["name"]." spell, and gained ".$newspellrow["attribute"]." Hit Points.<br /><br />";
|
||||
$pagearray["yourturn"] = "You have cast the ".$newspellrow["name"]." spell, and gained ".$newspellrow["attribute"]." Hit Points.<br><br>";
|
||||
} elseif ($newspellrow["type"] == 2) { // Hurt spell.
|
||||
if ($userrow["currentmonsterimmune"] == 0) {
|
||||
$monsterdamage = rand((($newspellrow["attribute"]/6)*5), $newspellrow["attribute"]);
|
||||
$userrow["currentmonsterhp"] -= $monsterdamage;
|
||||
$pagearray["yourturn"] = "You have cast the ".$newspellrow["name"]." spell for $monsterdamage damage.<br /><br />";
|
||||
$pagearray["yourturn"] = "You have cast the ".$newspellrow["name"]." spell for $monsterdamage damage.<br><br>";
|
||||
} else {
|
||||
$pagearray["yourturn"] = "You have cast the ".$newspellrow["name"]." spell, but the monster is immune to it.<br /><br />";
|
||||
$pagearray["yourturn"] = "You have cast the ".$newspellrow["name"]." spell, but the monster is immune to it.<br><br>";
|
||||
}
|
||||
$userrow["currentmp"] -= $newspellrow["mp"];
|
||||
} elseif ($newspellrow["type"] == 3) { // Sleep spell.
|
||||
if ($userrow["currentmonsterimmune"] != 2) {
|
||||
$userrow["currentmonstersleep"] = $newspellrow["attribute"];
|
||||
$pagearray["yourturn"] = "You have cast the ".$newspellrow["name"]." spell. The monster is asleep.<br /><br />";
|
||||
$pagearray["yourturn"] = "You have cast the ".$newspellrow["name"]." spell. The monster is asleep.<br><br>";
|
||||
} else {
|
||||
$pagearray["yourturn"] = "You have cast the ".$newspellrow["name"]." spell, but the monster is immune to it.<br /><br />";
|
||||
$pagearray["yourturn"] = "You have cast the ".$newspellrow["name"]." spell, but the monster is immune to it.<br><br>";
|
||||
}
|
||||
$userrow["currentmp"] -= $newspellrow["mp"];
|
||||
} elseif ($newspellrow["type"] == 4) { // +Damage spell.
|
||||
$userrow["currentuberdamage"] = $newspellrow["attribute"];
|
||||
$userrow["currentmp"] -= $newspellrow["mp"];
|
||||
$pagearray["yourturn"] = "You have cast the ".$newspellrow["name"]." spell, and will gain ".$newspellrow["attribute"]."% damage until the end of this fight.<br /><br />";
|
||||
$pagearray["yourturn"] = "You have cast the ".$newspellrow["name"]." spell, and will gain ".$newspellrow["attribute"]."% damage until the end of this fight.<br><br>";
|
||||
} elseif ($newspellrow["type"] == 5) { // +Defense spell.
|
||||
$userrow["currentuberdefense"] = $newspellrow["attribute"];
|
||||
$userrow["currentmp"] -= $newspellrow["mp"];
|
||||
$pagearray["yourturn"] = "You have cast the ".$newspellrow["name"]." spell, and will gain ".$newspellrow["attribute"]."% defense until the end of this fight.<br /><br />";
|
||||
$pagearray["yourturn"] = "You have cast the ".$newspellrow["name"]." spell, and will gain ".$newspellrow["attribute"]."% defense until the end of this fight.<br><br>";
|
||||
}
|
||||
|
||||
$pagearray["monsterhp"] = "Monster's HP: " . $userrow["currentmonsterhp"] . "<br /><br />";
|
||||
$pagearray["monsterhp"] = "Monster's HP: " . $userrow["currentmonsterhp"] . "<br><br>";
|
||||
if ($userrow["currentmonsterhp"] <= 0) {
|
||||
$updatequery = doquery("UPDATE {{table}} SET currentmonsterhp='0',currenthp='".$userrow["currenthp"]."',currentmp='".$userrow["currentmp"]."' WHERE id='".$userrow["id"]."' LIMIT 1", "users");
|
||||
header("Location: index.php?do=victory");
|
||||
|
@ -233,9 +233,9 @@ function fight() { // One big long function that determines the outcome of the f
|
|||
$chancetowake = rand(1,15);
|
||||
if ($chancetowake > $userrow["currentmonstersleep"]) {
|
||||
$userrow["currentmonstersleep"] = 0;
|
||||
$pagearray["monsterturn"] .= "The monster has woken up.<br />";
|
||||
$pagearray["monsterturn"] .= "The monster has woken up.<br>";
|
||||
} else {
|
||||
$pagearray["monsterturn"] .= "The monster is still asleep.<br />";
|
||||
$pagearray["monsterturn"] .= "The monster is still asleep.<br>";
|
||||
}
|
||||
}
|
||||
if ($userrow["currentmonstersleep"] == 0) { // Only do this if the monster is awake.
|
||||
|
@ -243,7 +243,7 @@ function fight() { // One big long function that determines the outcome of the f
|
|||
$toblock = ceil(rand($userrow["defensepower"]*.75,$userrow["defensepower"])/4);
|
||||
$tododge = rand(1,150);
|
||||
if ($tododge <= sqrt($userrow["dexterity"])) {
|
||||
$tohit = 0; $pagearray["monsterturn"] .= "You dodge the monster's attack. No damage has been scored.<br />";
|
||||
$tohit = 0; $pagearray["monsterturn"] .= "You dodge the monster's attack. No damage has been scored.<br>";
|
||||
$persondamage = 0;
|
||||
} else {
|
||||
if ($tohit <= $toblock) { $tohit = $toblock + 1; }
|
||||
|
@ -253,7 +253,7 @@ function fight() { // One big long function that determines the outcome of the f
|
|||
}
|
||||
if ($persondamage < 1) { $persondamage = 1; }
|
||||
}
|
||||
$pagearray["monsterturn"] .= "The monster attacks you for $persondamage damage.<br /><br />";
|
||||
$pagearray["monsterturn"] .= "The monster attacks you for $persondamage damage.<br><br>";
|
||||
$userrow["currenthp"] -= $persondamage;
|
||||
if ($userrow["currenthp"] <= 0) {
|
||||
$newgold = ceil($userrow["gold"]/2);
|
||||
|
@ -265,16 +265,16 @@ function fight() { // One big long function that determines the outcome of the f
|
|||
|
||||
// Do a monster's turn if person lost the chance to swing first. Serves him right!
|
||||
} elseif ( $chancetoswingfirst == 0 ) {
|
||||
$pagearray["yourturn"] = "The monster attacks before you are ready!<br /><br />";
|
||||
$pagearray["monsterhp"] = "Monster's HP: " . $userrow["currentmonsterhp"] . "<br /><br />";
|
||||
$pagearray["yourturn"] = "The monster attacks before you are ready!<br><br>";
|
||||
$pagearray["monsterhp"] = "Monster's HP: " . $userrow["currentmonsterhp"] . "<br><br>";
|
||||
$pagearray["monsterturn"] = "";
|
||||
if ($userrow["currentmonstersleep"] != 0) { // Check to wake up.
|
||||
$chancetowake = rand(1,15);
|
||||
if ($chancetowake > $userrow["currentmonstersleep"]) {
|
||||
$userrow["currentmonstersleep"] = 0;
|
||||
$pagearray["monsterturn"] .= "The monster has woken up.<br />";
|
||||
$pagearray["monsterturn"] .= "The monster has woken up.<br>";
|
||||
} else {
|
||||
$pagearray["monsterturn"] .= "The monster is still asleep.<br />";
|
||||
$pagearray["monsterturn"] .= "The monster is still asleep.<br>";
|
||||
}
|
||||
}
|
||||
if ($userrow["currentmonstersleep"] == 0) { // Only do this if the monster is awake.
|
||||
|
@ -282,7 +282,7 @@ function fight() { // One big long function that determines the outcome of the f
|
|||
$toblock = ceil(rand($userrow["defensepower"]*.75,$userrow["defensepower"])/4);
|
||||
$tododge = rand(1,150);
|
||||
if ($tododge <= sqrt($userrow["dexterity"])) {
|
||||
$tohit = 0; $pagearray["monsterturn"] .= "You dodge the monster's attack. No damage has been scored.<br />";
|
||||
$tohit = 0; $pagearray["monsterturn"] .= "You dodge the monster's attack. No damage has been scored.<br>";
|
||||
$persondamage = 0;
|
||||
} else {
|
||||
$persondamage = $tohit - $toblock;
|
||||
|
@ -292,7 +292,7 @@ function fight() { // One big long function that determines the outcome of the f
|
|||
}
|
||||
if ($persondamage < 1) { $persondamage = 1; }
|
||||
}
|
||||
$pagearray["monsterturn"] .= "The monster attacks you for $persondamage damage.<br /><br />";
|
||||
$pagearray["monsterturn"] .= "The monster attacks you for $persondamage damage.<br><br>";
|
||||
$userrow["currenthp"] -= $persondamage;
|
||||
if ($userrow["currenthp"] <= 0) {
|
||||
$newgold = ceil($userrow["gold"]/2);
|
||||
|
@ -304,7 +304,7 @@ function fight() { // One big long function that determines the outcome of the f
|
|||
|
||||
} else {
|
||||
$pagearray["yourturn"] = "";
|
||||
$pagearray["monsterhp"] = "Monster's HP: " . $userrow["currentmonsterhp"] . "<br /><br />";
|
||||
$pagearray["monsterhp"] = "Monster's HP: " . $userrow["currentmonsterhp"] . "<br><br>";
|
||||
$pagearray["monsterturn"] = "";
|
||||
}
|
||||
|
||||
|
@ -321,16 +321,16 @@ function fight() { // One big long function that determines the outcome of the f
|
|||
|
||||
if ($playerisdead != 1) {
|
||||
$pagearray["command"] = <<<END
|
||||
Command?<br /><br />
|
||||
Command?<br><br>
|
||||
<form action="index.php?do=fight" method="post">
|
||||
<input type="submit" name="fight" value="Fight" /><br /><br />
|
||||
<select name="userspell"><option value="0">Choose One</option>$magiclist</select> <input type="submit" name="spell" value="Spell" /><br /><br />
|
||||
<input type="submit" name="run" value="Run" /><br /><br />
|
||||
<input type="submit" name="fight" value="Fight" /><br><br>
|
||||
<select name="userspell"><option value="0">Choose One</option>$magiclist</select> <input type="submit" name="spell" value="Spell" /><br><br>
|
||||
<input type="submit" name="run" value="Run" /><br><br>
|
||||
</form>
|
||||
END;
|
||||
$updatequery = doquery("UPDATE {{table}} SET currentaction='Fighting',currenthp='$newhp',currentmp='$newmp',currentfight='$newfight',currentmonster='$newmonster',currentmonsterhp='$newmonsterhp',currentmonstersleep='$newmonstersleep',currentmonsterimmune='$newmonsterimmune',currentuberdamage='$newuberdamage',currentuberdefense='$newuberdefense' WHERE id='".$userrow["id"]."' LIMIT 1", "users");
|
||||
} else {
|
||||
$pagearray["command"] = "<b>You have died.</b><br /><br />As a consequence, you've lost half of your gold. However, you have been given back a portion of your hit points to continue your journey.<br /><br />You may now continue back to <a href=\"index.php\">town</a>, and we hope you fair better next time.";
|
||||
$pagearray["command"] = "<b>You have died.</b><br><br>As a consequence, you've lost half of your gold. However, you have been given back a portion of your hit points to continue your journey.<br><br>You may now continue back to <a href=\"index.php\">town</a>, and we hope you fair better next time.";
|
||||
}
|
||||
|
||||
// Finalize page and display it.
|
||||
|
@ -377,10 +377,10 @@ function victory() {
|
|||
if ($levelrow[$userrow["charclass"]."_spells"] != 0) {
|
||||
$userspells = $userrow["spells"] . ",".$levelrow[$userrow["charclass"]."_spells"];
|
||||
$newspell = "spells='$userspells',";
|
||||
$spelltext = "You have learned a new spell.<br />";
|
||||
$spelltext = "You have learned a new spell.<br>";
|
||||
} else { $spelltext = ""; $newspell=""; }
|
||||
|
||||
$page = "Congratulations. You have defeated the ".$monsterrow["name"].".<br />You gain $exp experience. $warnexp <br />You gain $gold gold. $warngold <br /><br /><b>You have gained a level!</b><br /><br />You gain ".$levelrow[$userrow["charclass"]."_hp"]." hit points.<br />You gain ".$levelrow[$userrow["charclass"]."_mp"]." magic points.<br />You gain ".$levelrow[$userrow["charclass"]."_tp"]." travel points.<br />You gain ".$levelrow[$userrow["charclass"]."_strength"]." strength.<br />You gain ".$levelrow[$userrow["charclass"]."_dexterity"]." dexterity.<br />$spelltext<br />You can now continue <a href=\"index.php\">exploring</a>.";
|
||||
$page = "Congratulations. You have defeated the ".$monsterrow["name"].".<br>You gain $exp experience. $warnexp <br>You gain $gold gold. $warngold <br><br><b>You have gained a level!</b><br><br>You gain ".$levelrow[$userrow["charclass"]."_hp"]." hit points.<br>You gain ".$levelrow[$userrow["charclass"]."_mp"]." magic points.<br>You gain ".$levelrow[$userrow["charclass"]."_tp"]." travel points.<br>You gain ".$levelrow[$userrow["charclass"]."_strength"]." strength.<br>You gain ".$levelrow[$userrow["charclass"]."_dexterity"]." dexterity.<br>$spelltext<br>You can now continue <a href=\"index.php\">exploring</a>.";
|
||||
$title = "Courage and Wit have served thee well!";
|
||||
$dropcode = "";
|
||||
} else {
|
||||
|
@ -393,7 +393,7 @@ function victory() {
|
|||
$newdefense = $userrow["defensepower"];
|
||||
$newlevel = $userrow["level"];
|
||||
$newspell = "";
|
||||
$page = "Congratulations. You have defeated the ".$monsterrow["name"].".<br />You gain $exp experience. $warnexp <br />You gain $gold gold. $warngold <br /><br />";
|
||||
$page = "Congratulations. You have defeated the ".$monsterrow["name"].".<br>You gain $exp experience. $warnexp <br>You gain $gold gold. $warngold <br><br>";
|
||||
|
||||
if (rand(1,30) == 1) {
|
||||
$dropquery = doquery("SELECT * FROM {{table}} WHERE mlevel <= '".$monsterrow["level"]."' ORDER BY RAND() LIMIT 1", "drops");
|
||||
|
@ -493,20 +493,20 @@ function drop() {
|
|||
"expbonus"=>"Experience Bonus",
|
||||
"goldbonus"=>"Gold Bonus");
|
||||
|
||||
$page = "The monster dropped the following item: <b>".$droprow["name"]."</b><br /><br />";
|
||||
$page .= "This item has the following attribute(s):<br />";
|
||||
$page = "The monster dropped the following item: <b>".$droprow["name"]."</b><br><br>";
|
||||
$page .= "This item has the following attribute(s):<br>";
|
||||
|
||||
$attribute1 = explode(",",$droprow["attribute1"]);
|
||||
$page .= $attributearray[$attribute1[0]];
|
||||
if ($attribute1[1] > 0) { $page .= " +" . $attribute1[1] . "<br />"; } else { $page .= $attribute1[1] . "<br />"; }
|
||||
if ($attribute1[1] > 0) { $page .= " +" . $attribute1[1] . "<br>"; } else { $page .= $attribute1[1] . "<br>"; }
|
||||
|
||||
if ($droprow["attribute2"] != "X") {
|
||||
$attribute2 = explode(",",$droprow["attribute2"]);
|
||||
$page .= $attributearray[$attribute2[0]];
|
||||
if ($attribute2[1] > 0) { $page .= " +" . $attribute2[1] . "<br />"; } else { $page .= $attribute2[1] . "<br />"; }
|
||||
if ($attribute2[1] > 0) { $page .= " +" . $attribute2[1] . "<br>"; } else { $page .= $attribute2[1] . "<br>"; }
|
||||
}
|
||||
|
||||
$page .= "<br />Select an inventory slot from the list below to equip this item. If the inventory slot is already full, the old item will be discarded.";
|
||||
$page .= "<br>Select an inventory slot from the list below to equip this item. If the inventory slot is already full, the old item will be discarded.";
|
||||
$page .= "<form action=\"index.php?do=drop\" method=\"post\"><select name=\"slot\"><option value=\"0\">Choose One</option><option value=\"1\">Slot 1: ".$userrow["slot1name"]."</option><option value=\"2\">Slot 2: ".$userrow["slot2name"]."</option><option value=\"3\">Slot 3: ".$userrow["slot3name"]."</option></select> <input type=\"submit\" name=\"submit\" value=\"Submit\" /></form>";
|
||||
$page .= "You may also choose to just continue <a href=\"index.php\">exploring</a> and give up this item.";
|
||||
|
||||
|
@ -517,7 +517,7 @@ function drop() {
|
|||
|
||||
function dead() {
|
||||
|
||||
$page = "<b>You have died.</b><br /><br />As a consequence, you've lost half of your gold. However, you have been given back a portion of your hit points to continue your journey.<br /><br />You may now continue back to <a href=\"index.php\">town</a>, and we hope you fair better next time.";
|
||||
$page = "<b>You have died.</b><br><br>As a consequence, you've lost half of your gold. However, you have been given back a portion of your hit points to continue your journey.<br><br>You may now continue back to <a href=\"index.php\">town</a>, and we hope you fair better next time.";
|
||||
|
||||
}
|
||||
|
||||
|
|
31
src/lib.php
31
src/lib.php
|
@ -127,21 +127,21 @@ function display($content, $title, $topnav=true, $leftnav=true, $rightnav=true,
|
|||
if ($userrow["currentaction"] == "In Town") {
|
||||
$townquery = db()->query('SELECT * FROM towns WHERE latitude = ? AND longitude = ? LIMIT 1;', [$userrow["latitude"], $userrow["longitude"]]);
|
||||
$townrow = $townquery->fetchArray(SQLITE3_ASSOC);
|
||||
$userrow["currenttown"] = "Welcome to <b>".$townrow["name"]."</b>.<br /><br />";
|
||||
$userrow["currenttown"] = "Welcome to <b>".$townrow["name"]."</b>.<br><br>";
|
||||
} else {
|
||||
$userrow["currenttown"] = "";
|
||||
}
|
||||
|
||||
if ($controlrow["forumtype"] == 0) { $userrow["forumslink"] = ""; }
|
||||
elseif ($controlrow["forumtype"] == 1) { $userrow["forumslink"] = "<a href=\"forum.php\">Forum</a><br />"; }
|
||||
elseif ($controlrow["forumtype"] == 2) { $userrow["forumslink"] = "<a href=\"".$controlrow["forumaddress"]."\">Forum</a><br />"; }
|
||||
elseif ($controlrow["forumtype"] == 1) { $userrow["forumslink"] = "<a href=\"forum.php\">Forum</a><br>"; }
|
||||
elseif ($controlrow["forumtype"] == 2) { $userrow["forumslink"] = "<a href=\"".$controlrow["forumaddress"]."\">Forum</a><br>"; }
|
||||
|
||||
// Format various userrow stuffs...
|
||||
if ($userrow["latitude"] < 0) { $userrow["latitude"] = $userrow["latitude"] * -1 . "S"; } else { $userrow["latitude"] .= "N"; }
|
||||
if ($userrow["longitude"] < 0) { $userrow["longitude"] = $userrow["longitude"] * -1 . "W"; } else { $userrow["longitude"] .= "E"; }
|
||||
$userrow["experience"] = number_format($userrow["experience"]);
|
||||
$userrow["gold"] = number_format($userrow["gold"]);
|
||||
if ($userrow["authlevel"] == 1) { $userrow["adminlink"] = "<a href=\"admin.php\">Admin</a><br />"; } else { $userrow["adminlink"] = ""; }
|
||||
if ($userrow["authlevel"] == 1) { $userrow["adminlink"] = "<a href=\"admin.php\">Admin</a><br>"; } else { $userrow["adminlink"] = ""; }
|
||||
|
||||
// HP/MP/TP bars.
|
||||
$stathp = ceil($userrow["currenthp"] / $userrow["maxhp"] * 100);
|
||||
|
@ -179,7 +179,7 @@ function display($content, $title, $topnav=true, $leftnav=true, $rightnav=true,
|
|||
if ($b == $spellrow["id"] && $spellrow["type"] == 1) { $spell = true; }
|
||||
}
|
||||
if ($spell == true) {
|
||||
$userrow["magiclist"] .= "<a href=\"index.php?do=spell:".$spellrow["id"]."\">".$spellrow["name"]."</a><br />";
|
||||
$userrow["magiclist"] .= "<a href=\"index.php?do=spell:".$spellrow["id"]."\">".$spellrow["name"]."</a><br>";
|
||||
}
|
||||
}
|
||||
if ($userrow["magiclist"] == "") { $userrow["magiclist"] = "None"; }
|
||||
|
@ -194,7 +194,7 @@ function display($content, $title, $topnav=true, $leftnav=true, $rightnav=true,
|
|||
if ($b == $townrow2["id"]) { $town = true; }
|
||||
}
|
||||
if ($town == true) {
|
||||
$userrow["townslist"] .= "<a href=\"index.php?do=gotown:".$townrow2["id"]."\">".$townrow2["name"]."</a><br />\n";
|
||||
$userrow["townslist"] .= "<a href=\"index.php?do=gotown:".$townrow2["id"]."\">".$townrow2["name"]."</a><br>\n";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -303,3 +303,22 @@ function get_spell(int $id): array|false
|
|||
if ($query === false) return false;
|
||||
return $query->fetchArray(SQLITE3_ASSOC);
|
||||
}
|
||||
|
||||
/**
|
||||
* Translate a Specials keyword to it's string.
|
||||
*/
|
||||
function special_to_string(string $special): string
|
||||
{
|
||||
return match ($special) {
|
||||
'maxhp' => 'Max HP',
|
||||
'maxmp' => 'Max MP',
|
||||
'maxtp' => 'Max TP',
|
||||
'goldbonus' => 'Gold Bonus (%)',
|
||||
'expbonus' => 'Experience Bonus (%)',
|
||||
'strength' => 'Strength',
|
||||
'dexterity' => 'Dexterity',
|
||||
'attackpower' => 'Attack Power',
|
||||
'defensepower' => 'Defense Power',
|
||||
default => $special
|
||||
};
|
||||
}
|
||||
|
|
|
@ -10,10 +10,10 @@ function inn()
|
|||
global $userrow;
|
||||
|
||||
$townrow = get_town_by_xy($userrow["longitude"], $userrow["latitude"]);
|
||||
if ($townrow === false) { display("Cheat attempt detected.<br /><br />Get a life, loser.", "Error"); }
|
||||
if ($townrow === false) { display("Cheat attempt detected.<br><br>Get a life, loser.", "Error"); }
|
||||
|
||||
if ($userrow["gold"] < $townrow["innprice"]) {
|
||||
display("You do not have enough gold to stay at this Inn tonight.<br /><br />You may return to <a href=\"index.php\">town</a>, or use the direction buttons on the left to start exploring.", "Inn");
|
||||
display("You do not have enough gold to stay at this Inn tonight.<br><br>You may return to <a href=\"index.php\">town</a>, or use the direction buttons on the left to start exploring.", "Inn");
|
||||
}
|
||||
|
||||
if (isset($_POST["submit"])) {
|
||||
|
@ -23,14 +23,14 @@ function inn()
|
|||
[$newgold, $userrow['maxhp'], $userrow['maxmp'], $userrow['maxtp'], $userrow['id']
|
||||
]);
|
||||
$title = "Inn";
|
||||
$page = "You wake up feeling refreshed and ready for action.<br /><br />You may return to <a href=\"index.php\">town</a>, or use the direction buttons on the left to start exploring.";
|
||||
$page = "You wake up feeling refreshed and ready for action.<br><br>You may return to <a href=\"index.php\">town</a>, or use the direction buttons on the left to start exploring.";
|
||||
} elseif (isset($_POST["cancel"])) {
|
||||
redirect('index.php');
|
||||
} else {
|
||||
$title = "Inn";
|
||||
$page = <<<HTML
|
||||
Resting at the inn will refill your current HP, MP, and TP to their maximum levels.<br /><br />
|
||||
A night's sleep at this Inn will cost you <b>{$townrow["innprice"]} gold</b>. Is that ok?<br /><br />
|
||||
Resting at the inn will refill your current HP, MP, and TP to their maximum levels.<br><br>
|
||||
A night's sleep at this Inn will cost you <b>{$townrow["innprice"]} gold</b>. Is that ok?<br><br>
|
||||
<form action="index.php?do=inn" method="post">
|
||||
<input type="submit" name="submit" value="Yes" /> <input type="submit" name="cancel" value="No" />
|
||||
</form>
|
||||
|
@ -48,10 +48,10 @@ function buy()
|
|||
global $userrow;
|
||||
|
||||
$townrow = get_town_by_xy($userrow['longitude'], $userrow['latitude']);
|
||||
if ($townrow === false) display("Cheat attempt detected.<br /><br />Get a life, loser.", "Error");
|
||||
if ($townrow === false) display("Cheat attempt detected.<br><br>Get a life, loser.", "Error");
|
||||
|
||||
$items = db()->query("SELECT * FROM items WHERE id IN ({$townrow["itemslist"]});");
|
||||
$page = "Buying weapons will increase your Attack Power. Buying armor and shields will increase your Defense Power.<br /><br />Click an item name to purchase it.<br /><br />The following items are available at this town:<br /><br />\n";
|
||||
$page = "Buying weapons will increase your Attack Power. Buying armor and shields will increase your Defense Power.<br><br>Click an item name to purchase it.<br><br>The following items are available at this town:<br><br>\n";
|
||||
$page .= "<table width=\"80%\">\n";
|
||||
while ($itemsrow = $items->fetchArray(SQLITE3_ASSOC)) {
|
||||
$attrib = ($itemsrow["type"] == 1) ? "Attack Power:" : "Defense Power:";
|
||||
|
@ -68,7 +68,7 @@ function buy()
|
|||
$page .= "<td width=\"32%\"><b><a href=\"index.php?do=buy2:".$itemsrow["id"]."\">".$itemsrow["name"]."</a>$specialdot</b></td><td width=\"32%\">$attrib <b>".$itemsrow["attribute"]."</b></td><td width=\"32%\">Price: <b>".$itemsrow["buycost"]." gold</b></td></tr>\n";
|
||||
}
|
||||
}
|
||||
$page .= "</table><br />\n";
|
||||
$page .= "</table><br>\n";
|
||||
$page .= "If you've changed your mind, you may also return back to <a href=\"index.php\">town</a>.\n";
|
||||
$title = "Buy Items";
|
||||
|
||||
|
@ -83,14 +83,14 @@ function buy2($id)
|
|||
global $userrow;
|
||||
|
||||
$townrow = get_town_by_xy($userrow['longitude'], $userrow['latitude']);
|
||||
if ($townrow === false) display("Cheat attempt detected.<br /><br />Get a life, loser.", "Error");
|
||||
if ($townrow === false) display("Cheat attempt detected.<br><br>Get a life, loser.", "Error");
|
||||
$townitems = explode(",", $townrow["itemslist"]);
|
||||
if (!in_array($id, $townitems)) display("Cheat attempt detected.<br /><br />Get a life, loser.", "Error");
|
||||
if (!in_array($id, $townitems)) display("Cheat attempt detected.<br><br>Get a life, loser.", "Error");
|
||||
|
||||
$item = get_item($id);
|
||||
|
||||
if ($userrow["gold"] < $item["buycost"]) {
|
||||
display("You do not have enough gold to buy this item.<br /><br />You may return to <a href=\"index.php\">town</a>, <a href=\"index.php?do=buy\">store</a>, or use the direction buttons on the left to start exploring.", "Buy Items");
|
||||
display("You do not have enough gold to buy this item.<br><br>You may return to <a href=\"index.php\">town</a>, <a href=\"index.php?do=buy\">store</a>, or use the direction buttons on the left to start exploring.", "Buy Items");
|
||||
}
|
||||
|
||||
$type_to_row_mapping = [1 => 'weaponid', 2 => 'armorid', 3 => 'shieldid'];
|
||||
|
@ -98,9 +98,9 @@ function buy2($id)
|
|||
|
||||
if ($current_equipped_id != 0) {
|
||||
$item2 = get_item($current_equipped_id);
|
||||
$page = "If you are buying the ".$item["name"].", then I will buy your ".$item2["name"]." for ".ceil($item2["buycost"] / 2)." gold. Is that ok?<br /><br /><form action=\"index.php?do=buy3:$id\" method=\"post\"><input type=\"submit\" name=\"submit\" value=\"Yes\" /> <input type=\"submit\" name=\"cancel\" value=\"No\" /></form>";
|
||||
$page = "If you are buying the ".$item["name"].", then I will buy your ".$item2["name"]." for ".ceil($item2["buycost"] / 2)." gold. Is that ok?<br><br><form action=\"index.php?do=buy3:$id\" method=\"post\"><input type=\"submit\" name=\"submit\" value=\"Yes\" /> <input type=\"submit\" name=\"cancel\" value=\"No\" /></form>";
|
||||
} else {
|
||||
$page = "You are buying the ".$item["name"].", is that ok?<br /><br /><form action=\"index.php?do=buy3:$id\" method=\"post\"><input type=\"submit\" name=\"submit\" value=\"Yes\" /> <input type=\"submit\" name=\"cancel\" value=\"No\" /></form>";
|
||||
$page = "You are buying the ".$item["name"].", is that ok?<br><br><form action=\"index.php?do=buy3:$id\" method=\"post\"><input type=\"submit\" name=\"submit\" value=\"Yes\" /> <input type=\"submit\" name=\"cancel\" value=\"No\" /></form>";
|
||||
}
|
||||
|
||||
display($page, "Buy Items");
|
||||
|
@ -117,14 +117,14 @@ function buy3($id)
|
|||
global $userrow;
|
||||
|
||||
$townrow = get_town_by_xy($userrow['longitude'], $userrow['latitude']);
|
||||
if ($townrow === false) display("Cheat attempt detected.<br /><br />Get a life, loser.", "Error");
|
||||
if ($townrow === false) display("Cheat attempt detected.<br><br>Get a life, loser.", "Error");
|
||||
$townitems = explode(",", $townrow["itemslist"]);
|
||||
if (!in_array($id, $townitems)) display("Cheat attempt detected.<br /><br />Get a life, loser.", "Error");
|
||||
if (!in_array($id, $townitems)) display("Cheat attempt detected.<br><br>Get a life, loser.", "Error");
|
||||
|
||||
$item = get_item($id);
|
||||
|
||||
if ($userrow["gold"] < $item["buycost"]) {
|
||||
display("You do not have enough gold to buy this item.<br /><br />You may return to <a href=\"index.php\">town</a>, <a href=\"index.php?do=buy\">store</a>, or use the direction buttons on the left to start exploring.", "Buy Items");
|
||||
display("You do not have enough gold to buy this item.<br><br>You may return to <a href=\"index.php\">town</a>, <a href=\"index.php?do=buy\">store</a>, or use the direction buttons on the left to start exploring.", "Buy Items");
|
||||
}
|
||||
|
||||
$type_mapping = [
|
||||
|
@ -212,7 +212,7 @@ function buy3($id)
|
|||
$stmt = db()->query("UPDATE users SET " . implode(", ", $updateFields) . " WHERE id = ?;", $updateValues);
|
||||
if ($stmt === false) exit("Failed to purchase and equip $id. Go back and try again.");
|
||||
|
||||
display("Thank you for purchasing this item.<br /><br />You may return to <a href=\"index.php\">town</a>, <a href=\"index.php?do=buy\">store</a>, or use the direction buttons on the left to start exploring.", "Buy Items");
|
||||
display("Thank you for purchasing this item.<br><br>You may return to <a href=\"index.php\">town</a>, <a href=\"index.php?do=buy\">store</a>, or use the direction buttons on the left to start exploring.", "Buy Items");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -224,8 +224,8 @@ function maps()
|
|||
|
||||
$mappedtowns = explode(",", $userrow["towns"]);
|
||||
|
||||
$page = "Buying maps will put the town in your Travel To box, and it won't cost you as many TP to get there.<br /><br />\n";
|
||||
$page .= "Click a town name to purchase its map.<br /><br />\n";
|
||||
$page = "Buying maps will put the town in your Travel To box, and it won't cost you as many TP to get there.<br><br>\n";
|
||||
$page .= "Click a town name to purchase its map.<br><br>\n";
|
||||
$page .= "<table width=\"90%\">\n";
|
||||
|
||||
$towns = db()->query('SELECT * FROM towns ORDER BY id;');
|
||||
|
@ -243,7 +243,7 @@ function maps()
|
|||
}
|
||||
}
|
||||
|
||||
$page .= "</table><br />\n";
|
||||
$page .= "</table><br>\n";
|
||||
$page .= "If you've changed your mind, you may also return back to <a href=\"index.php\">town</a>.\n";
|
||||
|
||||
display($page, "Buy Maps");
|
||||
|
@ -259,10 +259,10 @@ function maps2($id)
|
|||
$townrow = get_town_by_id($id);
|
||||
|
||||
if ($userrow["gold"] < $townrow["mapprice"]) {
|
||||
display("You do not have enough gold to buy this map.<br /><br />You may return to <a href=\"index.php\">town</a>, <a href=\"index.php?do=maps\">store</a>, or use the direction buttons on the left to start exploring.", "Buy Maps");
|
||||
display("You do not have enough gold to buy this map.<br><br>You may return to <a href=\"index.php\">town</a>, <a href=\"index.php?do=maps\">store</a>, or use the direction buttons on the left to start exploring.", "Buy Maps");
|
||||
}
|
||||
|
||||
$page = "You are buying the ".$townrow["name"]." map. Is that ok?<br /><br /><form action=\"index.php?do=maps3:$id\" method=\"post\"><input type=\"submit\" name=\"submit\" value=\"Yes\" /> <input type=\"submit\" name=\"cancel\" value=\"No\" /></form>";
|
||||
$page = "You are buying the ".$townrow["name"]." map. Is that ok?<br><br><form action=\"index.php?do=maps3:$id\" method=\"post\"><input type=\"submit\" name=\"submit\" value=\"Yes\" /> <input type=\"submit\" name=\"cancel\" value=\"No\" /></form>";
|
||||
|
||||
display($page, "Buy Maps");
|
||||
}
|
||||
|
@ -279,7 +279,7 @@ function maps3($id)
|
|||
$townrow = get_town_by_id($id);
|
||||
|
||||
if ($userrow["gold"] < $townrow["mapprice"]) {
|
||||
display("You do not have enough gold to buy this map.<br /><br />You may return to <a href=\"index.php\">town</a>, <a href=\"index.php?do=maps\">store</a>, or use the direction buttons on the left to start exploring.", "Buy Maps");
|
||||
display("You do not have enough gold to buy this map.<br><br>You may return to <a href=\"index.php\">town</a>, <a href=\"index.php?do=maps\">store</a>, or use the direction buttons on the left to start exploring.", "Buy Maps");
|
||||
}
|
||||
|
||||
$mappedtowns = $userrow["towns"].",$id";
|
||||
|
@ -287,7 +287,7 @@ function maps3($id)
|
|||
|
||||
db()->query('UPDATE users SET towns=?, gold=? WHERE id=?;', [$mappedtowns, $newgold, $userrow['id']]);
|
||||
|
||||
display("Thank you for purchasing this map.<br /><br />You may return to <a href=\"index.php\">town</a>, <a href=\"index.php?do=maps\">store</a>, or use the direction buttons on the left to start exploring.", "Buy Maps");
|
||||
display("Thank you for purchasing this map.<br><br>You may return to <a href=\"index.php\">town</a>, <a href=\"index.php?do=maps\">store</a>, or use the direction buttons on the left to start exploring.", "Buy Maps");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -306,7 +306,7 @@ function travelto($id, bool $usepoints = true)
|
|||
display("You do not have enough TP to travel here. Please go back and try again when you get more TP.", "Travel To");
|
||||
}
|
||||
$mapped = explode(",",$userrow["towns"]);
|
||||
if (!in_array($id, $mapped)) { display("Cheat attempt detected.<br /><br />Get a life, loser.", "Error"); }
|
||||
if (!in_array($id, $mapped)) { display("Cheat attempt detected.<br><br>Get a life, loser.", "Error"); }
|
||||
}
|
||||
|
||||
if (($userrow["latitude"] == $townrow["latitude"]) && ($userrow["longitude"] == $townrow["longitude"])) {
|
||||
|
|
|
@ -51,25 +51,25 @@ a:hover {
|
|||
<body><center>
|
||||
<table width="90%"><tr>
|
||||
<td width="150" style="border-right: solid 1px black;">
|
||||
<b><u>DK Administration</u></b><br /><br />
|
||||
<b>Links:</b><br />
|
||||
<a href="admin.php">Admin Home</a><br />
|
||||
<a href="index.php">Game Home</a><br /><br />
|
||||
<b>Primary Data:</b><br />
|
||||
<a href="admin.php?do=main">Main Settings</a><br />
|
||||
<a href="admin.php?do=news">Add News Post</a><br />
|
||||
<a href="admin.php?do=users">Edit Users</a><br /><br />
|
||||
<b>Game Data:</b><br />
|
||||
<a href="admin.php?do=items">Edit Items</a><br />
|
||||
<a href="admin.php?do=drops">Edit Drops</a><br />
|
||||
<a href="admin.php?do=towns">Edit Towns</a><br />
|
||||
<a href="admin.php?do=monsters">Edit Monsters</a><br />
|
||||
<a href="admin.php?do=levels">Edit Levels</a><br />
|
||||
<a href="admin.php?do=spells">Edit Spells</a><br />
|
||||
<b><u>DK Administration</u></b><br><br>
|
||||
<b>Links:</b><br>
|
||||
<a href="admin.php">Admin Home</a><br>
|
||||
<a href="index.php">Game Home</a><br><br>
|
||||
<b>Primary Data:</b><br>
|
||||
<a href="admin.php?do=main">Main Settings</a><br>
|
||||
<a href="admin.php?do=news">Add News Post</a><br>
|
||||
<a href="admin.php?do=users">Edit Users</a><br><br>
|
||||
<b>Game Data:</b><br>
|
||||
<a href="admin.php?do=items">Edit Items</a><br>
|
||||
<a href="admin.php?do=drops">Edit Drops</a><br>
|
||||
<a href="admin.php?do=towns">Edit Towns</a><br>
|
||||
<a href="admin.php?do=monsters">Edit Monsters</a><br>
|
||||
<a href="admin.php?do=levels">Edit Levels</a><br>
|
||||
<a href="admin.php?do=spells">Edit Spells</a><br>
|
||||
</td><td>
|
||||
{{content}}
|
||||
</td></tr></table>
|
||||
<br />
|
||||
<br>
|
||||
<table class="copyright" width="90%"><tr>
|
||||
<td width="25%" align="center">Powered by <a href="http://dragon.se7enet.com/dev.php" target="_new">Dragon Knight</a></td><td width="25%" align="center">© 2003-2006 by renderse7en</td><td width="25%" align="center">{{totaltime}} Seconds, {{numqueries}} Queries</td><td width="25%" align="center">Version {{version}} {{build}}</td>
|
||||
</center></body>
|
||||
|
|
|
@ -6,7 +6,7 @@ $template = <<<THEVERYENDOFYOU
|
|||
<tr><td width="20%">Username:</td><td><input type="text" name="username" size="30" maxlength="30" /></td></tr>
|
||||
<tr><td>Old Password:</td><td><input type="password" name="oldpass" size="20" /></td></tr>
|
||||
<tr><td>New Password:</td><td><input type="password" name="newpass1" size="20" maxlength="10" /></td></tr>
|
||||
<tr><td>Verify New Password:</td><td><input type="password" name="newpass2" size="20" maxlength="10" /><br /><br /><br /></td></tr>
|
||||
<tr><td>Verify New Password:</td><td><input type="password" name="newpass2" size="20" maxlength="10" /><br><br><br></td></tr>
|
||||
<tr><td colspan="2"><input type="submit" name="submit" value="Submit" /> <input type="reset" name="reset" value="Reset" /></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
|
|
|
@ -3,7 +3,7 @@ $template = <<<THEVERYENDOFYOU
|
|||
<table width="100%">
|
||||
<tr><td class="title"><img src="images/title_fighting.gif" alt="Fighting" /></td></tr>
|
||||
<tr><td>
|
||||
You are fighting a <b>{{monstername}}</b><br /><br />
|
||||
You are fighting a <b>{{monstername}}</b><br><br>
|
||||
{{monsterhp}}
|
||||
{{yourturn}}
|
||||
{{monsterturn}}
|
||||
|
|
|
@ -3,38 +3,38 @@ $template = <<<THEVERYENDOFYOU
|
|||
<table width="100%">
|
||||
<tr><td class="title"><img src="images/button_location.gif" alt="Location" title="Location" /></td></tr>
|
||||
<tr><td>
|
||||
Currently: {{currentaction}}<br />
|
||||
Latitude: {{latitude}}<br />
|
||||
Longitude: {{longitude}}<br />
|
||||
<a href="javascript:openmappopup()">View Map</a><br /><br />
|
||||
Currently: {{currentaction}}<br>
|
||||
Latitude: {{latitude}}<br>
|
||||
Longitude: {{longitude}}<br>
|
||||
<a href="javascript:openmappopup()">View Map</a><br><br>
|
||||
<form action="index.php?do=move" method="post">
|
||||
<center>
|
||||
<input name="north" type="submit" value="North" /><br />
|
||||
<input name="west" type="submit" value="West" /><input name="east" type="submit" value="East" /><br />
|
||||
<input name="north" type="submit" value="North" /><br>
|
||||
<input name="west" type="submit" value="West" /><input name="east" type="submit" value="East" /><br>
|
||||
<input name="south" type="submit" value="South" />
|
||||
</center>
|
||||
</form>
|
||||
</td></tr>
|
||||
</table><br />
|
||||
</table><br>
|
||||
|
||||
<table width="100%">
|
||||
<tr><td class="title"><img src="images/button_towns.gif" alt="Towns" title="Towns" /></td></tr>
|
||||
<tr><td>
|
||||
{{currenttown}}
|
||||
Travel To:<br />
|
||||
Travel To:<br>
|
||||
{{townslist}}
|
||||
</td></tr>
|
||||
</table><br />
|
||||
</table><br>
|
||||
|
||||
<table width="100%">
|
||||
<tr><td class="title"><img src="images/button_functions.gif" alt="Functions" title="Functions" /></td></tr>
|
||||
<tr><td>
|
||||
{{forumslink}}
|
||||
{{adminlink}}
|
||||
<a href="users.php?do=changepassword">Change Password</a><br />
|
||||
<a href="login.php?do=logout">Log Out</a><br />
|
||||
<a href="users.php?do=changepassword">Change Password</a><br>
|
||||
<a href="login.php?do=logout">Log Out</a><br>
|
||||
<a href="help.php">Help</a>
|
||||
</td></tr>
|
||||
</table><br />
|
||||
</table><br>
|
||||
THEVERYENDOFYOU;
|
||||
?>
|
|
@ -6,7 +6,7 @@ $template = <<<THEVERYENDOFYOU
|
|||
<tr><td>Password:</td><td><input type="password" size="30" name="password" /></td></tr>
|
||||
<tr><td>Remember me?</td><td><input type="checkbox" name="rememberme" value="yes" /> Yes</td></tr>
|
||||
<tr><td colspan="2"><input type="submit" name="submit" value="Log In" /></td></tr>
|
||||
<tr><td colspan="2">Checking the "Remember Me" option will store your login information in a cookie so you don't have to enter it next time you get online.<br /><br />Want to play? You gotta <a href="users.php?do=register">register your own character.</a><br /><br />You may also <a href="users.php?do=changepassword">change your password</a>, or <a href="users.php?do=lostpassword">request a new one</a> if you've lost yours.</td></tr>
|
||||
<tr><td colspan="2">Checking the "Remember Me" option will store your login information in a cookie so you don't have to enter it next time you get online.<br><br>Want to play? You gotta <a href="users.php?do=register">register your own character.</a><br><br>You may also <a href="users.php?do=changepassword">change your password</a>, or <a href="users.php?do=lostpassword">request a new one</a> if you've lost yours.</td></tr>
|
||||
</table>
|
||||
</form>
|
||||
THEVERYENDOFYOU;
|
||||
|
|
|
@ -1,27 +1,27 @@
|
|||
<?php
|
||||
$template = <<<HTML
|
||||
Here is the character profile for <b>{{username}}</b>.<br /><br />
|
||||
When you're finished, you may <a href="index.php">return to town</a>.<br /><br />
|
||||
Here is the character profile for <b>{{username}}</b>.<br><br>
|
||||
When you're finished, you may <a href="index.php">return to town</a>.<br><br>
|
||||
<table width="200">
|
||||
<tr><td class="title"><img src="images/button_character.gif" alt="Character" title="Character" /></td></tr>
|
||||
<tr><td>
|
||||
<b>{{username}}</b><br /><br />
|
||||
<b>{{username}}</b><br><br>
|
||||
|
||||
Class: {{charclass}}<br /><br />
|
||||
Class: {{charclass}}<br><br>
|
||||
|
||||
Level: {{level}}<br />
|
||||
Experience: {{experience}}<br />
|
||||
Gold: {{gold}}<br />
|
||||
Hit Points: {{currenthp}} / {{maxhp}}<br />
|
||||
Magic Points: {{currentmp}} / {{maxmp}}<br />
|
||||
Travel Points: {{currenttp}} / {{maxtp}}<br /><br />
|
||||
Level: {{level}}<br>
|
||||
Experience: {{experience}}<br>
|
||||
Gold: {{gold}}<br>
|
||||
Hit Points: {{currenthp}} / {{maxhp}}<br>
|
||||
Magic Points: {{currentmp}} / {{maxmp}}<br>
|
||||
Travel Points: {{currenttp}} / {{maxtp}}<br><br>
|
||||
|
||||
Strength: {{strength}}<br />
|
||||
Dexterity: {{dexterity}}<br />
|
||||
Attack Power: {{attackpower}}<br />
|
||||
Defense Power: {{defensepower}}<br />
|
||||
Strength: {{strength}}<br>
|
||||
Dexterity: {{dexterity}}<br>
|
||||
Attack Power: {{attackpower}}<br>
|
||||
Defense Power: {{defensepower}}<br>
|
||||
</td></tr>
|
||||
</table><br />
|
||||
</table><br>
|
||||
|
||||
<table width="200">
|
||||
<tr><td class="title"><img src="images/button_inventory.gif" alt="Inventory" title="Inventory" /></td></tr>
|
||||
|
@ -31,9 +31,9 @@ $template = <<<HTML
|
|||
<tr><td><img src="images/icon_armor.gif" alt="Armor" title="Armor" /></td><td width="100%">Armor: {{armorname}}</td></tr>
|
||||
<tr><td><img src="images/icon_shield.gif" alt="Shield" title="Shield" /></td><td width="100%">Shield: {{shieldname}}</td></tr>
|
||||
</table>
|
||||
Slot 1: {{slot1name}}<br />
|
||||
Slot 2: {{slot2name}}<br />
|
||||
Slot 1: {{slot1name}}<br>
|
||||
Slot 2: {{slot2name}}<br>
|
||||
Slot 3: {{slot3name}}
|
||||
</td></tr>
|
||||
</table><br />
|
||||
</table><br>
|
||||
HTML;
|
||||
|
|
|
@ -80,7 +80,7 @@ winpops=window.open(popurl,"","width=520,height=520,scrollbars")
|
|||
<td class="middle">{{content}}</td>
|
||||
<td class="right">{{rightnav}}</td>
|
||||
</tr>
|
||||
</table><br />
|
||||
</table><br>
|
||||
<table class="copyright" width="90%"><tr>
|
||||
<td width="25%" align="center">Powered by <a href="http://dragon.se7enet.com/dev.php" target="_new">Dragon Knight</a></td><td width="25%" align="center">© 2003-2006 by renderse7en</td><td width="25%" align="center">{{totaltime}} Seconds, {{numqueries}} Queries</td><td width="25%" align="center">Version {{version}} {{build}}</td>
|
||||
</tr></table>
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
$template = <<<THEVERYENDOFYOU
|
||||
<form action="users.php?do=register" method="post">
|
||||
<table width="80%">
|
||||
<tr><td width="20%">Username:</td><td><input type="text" name="username" size="30" maxlength="30" /><br />Usernames must be 30 alphanumeric characters or less.<br /><br /><br /></td></tr>
|
||||
<tr><td width="20%">Username:</td><td><input type="text" name="username" size="30" maxlength="30" /><br>Usernames must be 30 alphanumeric characters or less.<br><br><br></td></tr>
|
||||
<tr><td>Password:</td><td><input type="password" name="password1" size="30" maxlength="10" /></td></tr>
|
||||
<tr><td>Verify Password:</td><td><input type="password" name="password2" size="30" maxlength="10" /><br />Passwords must be 10 alphanumeric characters or less.<br /><br /><br /></td></tr>
|
||||
<tr><td>Verify Password:</td><td><input type="password" name="password2" size="30" maxlength="10" /><br>Passwords must be 10 alphanumeric characters or less.<br><br><br></td></tr>
|
||||
<tr><td>Email Address:</td><td><input type="text" name="email1" size="30" maxlength="100" /></td></tr>
|
||||
<tr><td>Verify Email:</td><td><input type="text" name="email2" size="30" maxlength="100" />{{verifytext}}<br /><br /><br /></td></tr>
|
||||
<tr><td>Verify Email:</td><td><input type="text" name="email2" size="30" maxlength="100" />{{verifytext}}<br><br><br></td></tr>
|
||||
<tr><td>Character Class:</td><td><select name="charclass"><option value="1">{{class1name}}</option><option value="2">{{class2name}}</option><option value="3">{{class3name}}</option></select></td></tr>
|
||||
<tr><td colspan="2">See <a href="help.php">Help</a> for more information about character classes.<br /><br /></td></tr>
|
||||
<tr><td colspan="2">See <a href="help.php">Help</a> for more information about character classes.<br><br></td></tr>
|
||||
<tr><td colspan="2"><input type="submit" name="submit" value="Submit" /> <input type="reset" name="reset" value="Reset" /></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
|
|
|
@ -3,17 +3,17 @@ $template = <<<THEVERYENDOFYOU
|
|||
<table width="100%">
|
||||
<tr><td class="title"><img src="images/button_character.gif" alt="Character" title="Character" /></td></tr>
|
||||
<tr><td>
|
||||
<b>{{username}}</b><br />
|
||||
Level: {{level}}<br />
|
||||
Exp: {{experience}}<br />
|
||||
Gold: {{gold}}<br />
|
||||
HP: {{currenthp}}<br />
|
||||
MP: {{currentmp}}<br />
|
||||
TP: {{currenttp}}<br />
|
||||
{{statbars}}<br />
|
||||
<b>{{username}}</b><br>
|
||||
Level: {{level}}<br>
|
||||
Exp: {{experience}}<br>
|
||||
Gold: {{gold}}<br>
|
||||
HP: {{currenthp}}<br>
|
||||
MP: {{currentmp}}<br>
|
||||
TP: {{currenttp}}<br>
|
||||
{{statbars}}<br>
|
||||
<a href="javascript:opencharpopup()">Extended Stats</a>
|
||||
</td></tr>
|
||||
</table><br />
|
||||
</table><br>
|
||||
|
||||
<table width="100%">
|
||||
<tr><td class="title"><img src="images/button_inventory.gif" alt="Inventory" title="Inventory" /></td></tr>
|
||||
|
@ -23,17 +23,17 @@ TP: {{currenttp}}<br />
|
|||
<tr><td><img src="images/icon_armor.gif" alt="Armor" title="Armor" /></td><td width="100%">Armor: {{armorname}}</td></tr>
|
||||
<tr><td><img src="images/icon_shield.gif" alt="Shield" title="Shield" /></td><td width="100%">Shield: {{shieldname}}</td></tr>
|
||||
</table>
|
||||
Slot 1: {{slot1name}}<br />
|
||||
Slot 2: {{slot2name}}<br />
|
||||
Slot 1: {{slot1name}}<br>
|
||||
Slot 2: {{slot2name}}<br>
|
||||
Slot 3: {{slot3name}}
|
||||
</td></tr>
|
||||
</table><br />
|
||||
</table><br>
|
||||
|
||||
<table width="100%">
|
||||
<tr><td class="title"><img src="images/button_fastspells.gif" alt="Fast Spells" title="Fast Spells" /></td></tr>
|
||||
<tr><td>
|
||||
{{magiclist}}
|
||||
</td></tr>
|
||||
</table><br />
|
||||
</table><br>
|
||||
THEVERYENDOFYOU;
|
||||
?>
|
||||
|
|
|
@ -3,24 +3,24 @@ $template = <<<THEVERYENDOFYOU
|
|||
<table width="100%">
|
||||
<tr><td class="title"><img src="images/button_character.gif" alt="Character" title="Character" /></td></tr>
|
||||
<tr><td>
|
||||
<b>{{username}}</b><br /><br />
|
||||
<b>{{username}}</b><br><br>
|
||||
|
||||
Class: {{charclass}}<br /><br />
|
||||
Class: {{charclass}}<br><br>
|
||||
|
||||
Level: {{level}}<br />
|
||||
Experience: {{experience}} {{plusexp}}<br />
|
||||
Next Level: {{nextlevel}}<br />
|
||||
Gold: {{gold}} {{plusgold}}<br />
|
||||
Hit Points: {{currenthp}} / {{maxhp}}<br />
|
||||
Magic Points: {{currentmp}} / {{maxmp}}<br />
|
||||
Travel Points: {{currenttp}} / {{maxtp}}<br /><br />
|
||||
Level: {{level}}<br>
|
||||
Experience: {{experience}} {{plusexp}}<br>
|
||||
Next Level: {{nextlevel}}<br>
|
||||
Gold: {{gold}} {{plusgold}}<br>
|
||||
Hit Points: {{currenthp}} / {{maxhp}}<br>
|
||||
Magic Points: {{currentmp}} / {{maxmp}}<br>
|
||||
Travel Points: {{currenttp}} / {{maxtp}}<br><br>
|
||||
|
||||
Strength: {{strength}}<br />
|
||||
Dexterity: {{dexterity}}<br />
|
||||
Attack Power: {{attackpower}}<br />
|
||||
Defense Power: {{defensepower}}<br />
|
||||
Strength: {{strength}}<br>
|
||||
Dexterity: {{dexterity}}<br>
|
||||
Attack Power: {{attackpower}}<br>
|
||||
Defense Power: {{defensepower}}<br>
|
||||
</td></tr>
|
||||
</table><br />
|
||||
</table><br>
|
||||
|
||||
<table width="100%">
|
||||
<tr><td class="title"><img src="images/button_inventory.gif" alt="Inventory" title="Inventory" /></td></tr>
|
||||
|
@ -30,17 +30,17 @@ Defense Power: {{defensepower}}<br />
|
|||
<tr><td><img src="images/icon_armor.gif" alt="Armor" title="Armor" /></td><td width="100%">Armor: {{armorname}}</td></tr>
|
||||
<tr><td><img src="images/icon_shield.gif" alt="Shield" title="Shield" /></td><td width="100%">Shield: {{shieldname}}</td></tr>
|
||||
</table>
|
||||
Slot 1: {{slot1name}}<br />
|
||||
Slot 2: {{slot2name}}<br />
|
||||
Slot 1: {{slot1name}}<br>
|
||||
Slot 2: {{slot2name}}<br>
|
||||
Slot 3: {{slot3name}}
|
||||
</td></tr>
|
||||
</table><br />
|
||||
</table><br>
|
||||
|
||||
<table width="100%">
|
||||
<tr><td class="title"><img src="images/button_spells.gif" alt="Spells" title="Spells" /></td></tr>
|
||||
<tr><td>
|
||||
{{magiclist}}
|
||||
</td></tr>
|
||||
</table><br />
|
||||
</table><br>
|
||||
THEVERYENDOFYOU;
|
||||
?>
|
||||
|
|
|
@ -3,7 +3,7 @@ $template = <<<THEVERYENDOFYOU
|
|||
<table width="100%">
|
||||
<tr><td class="title"><img src="images/town_{{id}}.gif" alt="Welcome to {{name}}" title="Welcome to {{name}}" /></td></tr>
|
||||
<tr><td>
|
||||
<b>Town Options:</b><br />
|
||||
<b>Town Options:</b><br>
|
||||
<ul>
|
||||
<li /><a href="index.php?do=inn">Rest at the Inn</a>
|
||||
<li /><a href="index.php?do=buy">Buy Weapons/Armor</a>
|
||||
|
@ -12,7 +12,7 @@ $template = <<<THEVERYENDOFYOU
|
|||
</td></tr>
|
||||
<tr><td><center>
|
||||
{{news}}
|
||||
<br />
|
||||
<br>
|
||||
<table width="95%">
|
||||
<tr><td width="50%">
|
||||
{{whosonline}}
|
||||
|
|
|
@ -6,7 +6,7 @@ $template = <<<THEVERYENDOFYOU
|
|||
that was emailed to you to unlock your character.</td></tr>
|
||||
<tr><td width="20%">Username:</td><td><input type="text" name="username" size="30" maxlength="30" /></td></tr>
|
||||
<tr><td>Email Address:</td><td><input type="text" name="email" size="30" maxlength="100" /></td></tr>
|
||||
<tr><td>Verification Code:</td><td><input type="text" name="verify" size="10" maxlength="8" /><br /><br /><br /></td></tr>
|
||||
<tr><td>Verification Code:</td><td><input type="text" name="verify" size="10" maxlength="8" /><br><br><br></td></tr>
|
||||
<tr><td colspan="2"><input type="submit" name="submit" value="Submit" /> <input type="reset" name="reset" value="Reset" /></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
|
|
Loading…
Reference in New Issue
Block a user