Compare commits

...

10 Commits

Author SHA1 Message Date
Jamin Blount
ae49476b96 Decrypt lib.php 2018-10-14 09:20:56 -05:00
Jamin Blount
29d0ee8ce6 Update README.md 2017-02-12 10:58:32 -06:00
Jamin Blount
6a170645e9 Beta 5 Build 20
9.2.2007 - Build 20 (Consolation Prize Part Deux):
- Fixed incorrect story values in install.sql.
- Some changes to the version/copyright/moddedby display.
2017-02-05 12:02:56 -06:00
Jamin Blount
50516c3280 Beta 5 Build 19
07.28.2007 - Build 19 (Consolation Prize):
- Added "moddedby" column to controlrow. Will display next to normal
Scourge copyright.
- Added SigBot, which lets players display their character stats in
forum signature images.
- PVP fights now properly escape the opposing player's $userrow before
updating.
- Fixed misspellings of 'bonusdefense' in spells.php.
- Fixed error that occurred when you failed to select a spell slot when
adding new spells.
- Minor changes to err() output.
2017-02-05 12:01:47 -06:00
Jamin Blount
0f3f0dc8ed Beta 4 Build 18
09.03.2006 - Build 18 (Joe Camel):
- Fixed function redeclaration with Blessed Strike & Stone Skin spells.
- When you're all alone, you no longer have a little blue "undefined"
orb to keep you company.
- Changing worlds after a quest now gives you the world's starting town
to avoid panel errors.
- Minor optimization fix for item building.
- Unique items no longer drop with prefixes/suffixes, and you can no
longer buy unique items.
- Removed alphanumeric requirement for passwords.
- hpleech(monster) now properly accounts for difficulty multiplier when
checking against the monster's maxhp.
- Added Deposit/Withdraw All links to the Bank.
- Fixed PVP and Post office bugs related to the new doquery syntax.
- Fixed single-quote bugs in mymail().
- Removed verbiage from the levelup template that was no longer
necessary.
- Fixed some more verbiage in the registration message that was also no
longer necessary.
- Added admin-definable cookie name and cookie domain to controlrow.
2017-02-05 11:58:57 -06:00
Jamin Blount
d529178672 Beta 4 Build 17
8.09.2006 - Build 17 (Haiku):
- Moved stylesheets into .css files.
- Added javascript tooltips for the class info when creating a new
character.
- Changed doquery() format - rewrote all calls to this function to match
the new format.
- Various changes to the structure of lib.php.
- Implemented Anman's increased attack and defense spells (Blessed
Strike & Stone Skin).
- Fixed class display in profile view.
- Began admin control panel.
- Various little bitty fixes.
- You can no longer gamble 0 gold.
- Added new level stat type: life.
- Monsters can now do excellent hits, and you can now dodge monsters.
- Removed several columns from controlrow that are no longer used.
2017-02-05 11:57:55 -06:00
Jamin Blount
bee59d4382 Beta 3 Build 16
4.26.2006 - Build 16 (Road Rage):
- Fixed a bug that prevented you from applying fewer than your max
levelspell points.
- Added links back to the stores after buying maps/items or using the
bank.
- Added a link back to town after gambling.
- Fixed the link in the error message when failing to create a guild.
2017-02-05 11:56:42 -06:00
Jamin Blount
32e5cfe9ac Beta 3 Build 15
4.08.2006 - Build 15 (Dead Man's Chest):
- Character profiles now display class name instead of ID numbers.
- Fixed incorrect minimum level display in guild start/apply error
messages.
- Finally re-implemented gambling.
- Added very short tooltip descriptions of the classes when creating new
characters.
- Spiffied up the Version Info page a little bit.
- A few other minor cosmetic changes.
2017-02-05 11:55:49 -06:00
Jamin Blount
035a48fbfe Beta 3 Build 14
2.26.2006 - Build 14 (Pete Rose):
- The poor sods who are stuck on dial-up can now select to not show the
minimap in their account settings.
- Fixed a problem with guild names in paneltop.
- Fixed minor bug in account settings that caused a server error when
not changing your password.
- Manually logging out of the game now resets your onlinetime so you no
longer appear in Who's Online.
- Letting a duel time out after it's been accepted now counts against
your duelling wins/losses.
- Overhauled dorow() to allow forcing array indexes by a specific
column. Modified several functions accordingly.
- Guild Honor is now shown correctly on the main Guild Hall page
immediately after an update.
- Guild shoutboxes now add the guild ID from userrow instead of in the
GET request. More secure.
- Guild minimim join/start levels are now admin-editable in controlrow.
- updateuserrow() now array_maps addslashes to allow apostrophes in item
names.
2017-02-05 11:54:46 -06:00
Jamin Blount
bcc5476d1f Beta 3 Build 13
2.04.2006 - Build 13 (Unlucky):
-
- Dying now properly takes you back to the actual lat/lon of the world's
first town (rather than 0,0 every time).
- Added 160+ new monsters for the later realms.
- Buy Maps now correctly only shows available maps from the Realm you're
in.
- Fixed some weirdness with the Travel To menu in the second Realm.
- Added storyline/quests.
- Added item drops from monsters.
- Monsters now have a chance to swing first, and to block you from
running.
- Added Quick Heal to panel_bottom.
- Users who are already a member of a guild no longer see the "Apply to
Join" link on the Guild List page.
- Added Honor Points to guilds.
* plus 1 point per member.
* plus floored square root of total combined member experience.
* plus 2 points per member PVP win.
* minus 1 point per member PVP loss.
* Calculated every 24 hours automatically, and upon every
approve/remove/leave.
* Displayed on the Guild List page.
- Added stats for your current items on the first Buy screen.
- You cannot create/join a guild until Level 10 to help prevent bank
abuse.
- Added PVP logging - wins, losses, and highest lvl character killed.
- Hall of Fame now shows top 25 chars.
- Hall of Fame now uses stock mysql_fetch_array() instead of custom
dorow().
- Items now have a 1 in 5 chance of having prefixes/suffixes (it used to
be 50:50).
- Added email verification support.
2017-02-05 11:52:51 -06:00
151 changed files with 5021 additions and 1568 deletions

2
.htaccess Normal file
View File

@ -0,0 +1,2 @@
RewriteEngine On
RewriteRule ^sigbot/([0-9]+).png$ sigbot.php?id=$1 [L]

View File

@ -1,4 +1,7 @@
# Dragon Scourge
- See also: [Dragon Knight](https://github.com/renderse7en/dragon-knight)
- [Live Demo](http://www.dragonscourge.com/play)
Many years ago, when I was young and dumb, I wrote a [simple little game](https://github.com/renderse7en/dragon-knight) based on the game *Dragon Warrior* for the NES. It was fun, it helped me learn how to code, and a lot of people liked it.
After that, I begin writing a sequel, of sorts, called Dragon Scourge. I never really finished that game. Life got in the way. Got married. Got a job. Had kids. All that.
@ -23,7 +26,7 @@ As with Dragon Knight before it, please keep some things in mind:
1. Clone this repo or download the zip.
2. Create a new database for Dragon Scourge to use, if you don't already have one set up.
3. Edit `config.php` to include the correct values for your database setup.
4. Upload the contents of the Dragon Knight folder to your site.
4. Upload the contents of the Dragon Scourge folder to your site.
5. Using a MySQL client such as HeidiSQL or PHPMyAdmin, run the contents of `install.sql` on the database you created.
7. Enjoy the game.

View File

@ -1,7 +1,106 @@
DRAGON SCOURGE
Changelog
***** BETA FIVE *****
9.2.2007 - Build 20 (Consolation Prize Part Deux):
- Fixed incorrect story values in install.sql.
- Some changes to the version/copyright/moddedby display.
07.28.2007 - Build 19 (Consolation Prize):
- Added "moddedby" column to controlrow. Will display next to normal Scourge copyright.
- Added SigBot, which lets players display their character stats in forum signature images.
- PVP fights now properly escape the opposing player's $userrow before updating.
- Fixed misspellings of 'bonusdefense' in spells.php.
- Fixed error that occurred when you failed to select a spell slot when adding new spells.
- Minor changes to err() output.
***** BETA FOUR *****
09.03.2006 - Build 18 (Joe Camel):
- Fixed function redeclaration with Blessed Strike & Stone Skin spells.
- When you're all alone, you no longer have a little blue "undefined" orb to keep you company.
- Changing worlds after a quest now gives you the world's starting town to avoid panel errors.
- Minor optimization fix for item building.
- Unique items no longer drop with prefixes/suffixes, and you can no longer buy unique items.
- Removed alphanumeric requirement for passwords.
- hpleech(monster) now properly accounts for difficulty multiplier when checking against the monster's maxhp.
- Added Deposit/Withdraw All links to the Bank.
- Fixed PVP and Post office bugs related to the new doquery syntax.
- Fixed single-quote bugs in mymail().
- Removed verbiage from the levelup template that was no longer necessary.
- Fixed some more verbiage in the registration message that was also no longer necessary.
- Added admin-definable cookie name and cookie domain to controlrow.
8.09.2006 - Build 17 (Haiku):
- Moved stylesheets into .css files.
- Added javascript tooltips for the class info when creating a new character.
- Changed doquery() format - rewrote all calls to this function to match the new format.
- Various changes to the structure of lib.php.
- Implemented Anman's increased attack and defense spells (Blessed Strike & Stone Skin).
- Fixed class display in profile view.
- Began admin control panel.
- Various little bitty fixes.
- You can no longer gamble 0 gold.
- Added new level stat type: life.
- Monsters can now do excellent hits, and you can now dodge monsters.
- Removed several columns from controlrow that are no longer used.
***** BETA THREE *****
4.26.2006 - Build 16 (Road Rage):
- Fixed a bug that prevented you from applying fewer than your max levelspell points.
- Added links back to the stores after buying maps/items or using the bank.
- Added a link back to town after gambling.
- Fixed the link in the error message when failing to create a guild.
4.08.2006 - Build 15 (Dead Man's Chest):
- Character profiles now display class name instead of ID numbers.
- Fixed incorrect minimum level display in guild start/apply error messages.
- Finally re-implemented gambling.
- Added very short tooltip descriptions of the classes when creating new characters.
- Spiffied up the Version Info page a little bit.
- A few other minor cosmetic changes.
2.26.2006 - Build 14 (Pete Rose):
- The poor sods who are stuck on dial-up can now select to not show the minimap in their account settings.
- Fixed a problem with guild names in paneltop.
- Fixed minor bug in account settings that caused a server error when not changing your password.
- Manually logging out of the game now resets your onlinetime so you no longer appear in Who's Online.
- Letting a duel time out after it's been accepted now counts against your duelling wins/losses.
- Overhauled dorow() to allow forcing array indexes by a specific column. Modified several functions accordingly.
- Guild Honor is now shown correctly on the main Guild Hall page immediately after an update.
- Guild shoutboxes now add the guild ID from userrow instead of in the GET request. More secure.
- Guild minimim join/start levels are now admin-editable in controlrow.
- updateuserrow() now array_maps addslashes to allow apostrophes in item names.
2.04.2006 - Build 13 (Unlucky):
- Dying now properly takes you back to the actual lat/lon of the world's first town (rather than 0,0 every time).
- Added 160+ new monsters for the later realms.
- Buy Maps now correctly only shows available maps from the Realm you're in.
- Fixed some weirdness with the Travel To menu in the second Realm.
- Added storyline/quests.
- Added item drops from monsters.
- Monsters now have a chance to swing first, and to block you from running.
- Added Quick Heal to panel_bottom.
- Users who are already a member of a guild no longer see the "Apply to Join" link on the Guild List page.
- Added Honor Points to guilds.
* plus 1 point per member.
* plus floored square root of total combined member experience.
* plus 2 points per member PVP win.
* minus 1 point per member PVP loss.
* Calculated every 24 hours automatically, and upon every approve/remove/leave.
* Displayed on the Guild List page.
- Added stats for your current items on the first Buy screen.
- You cannot create/join a guild until Level 10 to help prevent bank abuse.
- Added PVP logging - wins, losses, and highest lvl character killed.
- Hall of Fame now shows top 25 chars.
- Hall of Fame now uses stock mysql_fetch_array() instead of custom dorow().
- Items now have a 1 in 5 chance of having prefixes/suffixes (it used to be 50:50).
- Added email verification support.
***** BETA TWO *****
12.10.2005 - Build 12 (Eggs):
- Members can now leave the Guild without requiring an officer to demote them to zero.
- Rank 5 members can now edit/update Guild settings.

View File

@ -1,11 +1,25 @@
<?php // config.php :: Low-level app/database variables.
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 19
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$dbsettings = Array(
"server" => "localhost", // MySQL server name. (Usually localhost.)
"user" => "", // MySQL username.
"pass" => "", // MySQL password.
"name" => "", // MySQL database name.
"prefix" => "", // Prefix for table names.
"secretword" => ""); // Secret word used when hashing information for cookies.
"user" => "", // MySQL username.
"pass" => "", // MySQL password.
"name" => "", // MySQL database name.
"prefix" => "sx", // Prefix for table names.
"secretword" => ""); // Secret word used when hashing information for cookies.
?>

View File

@ -1,18 +1,33 @@
<?php // cookies.php :: Handles cookies. (Mmm, tasty!)
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
function checkcookies() {
include('config.php');
global $controlrow;
$row = false;
if (isset($_COOKIE["scourge"])) {
if (isset($_COOKIE[$controlrow["cookiename"]])) {
// COOKIE FORMAT:
// {ID} {USERNAME} {PASSWORDHASH} {REMEMBERME}
$theuser = explode(" ",$_COOKIE["scourge"]);
$theuser = explode(" ",$_COOKIE[$controlrow["cookiename"]]);
if (!is_numeric($theuser[0])) { err("Invalid cookie data (Error 0). Please clear cookies and log in again."); }
$row = dorow(doquery("SELECT * FROM {{table}} WHERE username='$theuser[1]' LIMIT 1", "accounts"));
$row = dorow(doquery("SELECT * FROM <<accounts>> WHERE username='$theuser[1]' LIMIT 1"));
if ($row == false) { err("Invalid cookie data (Error 1). Please clear cookies and log in again."); }
if ($row["id"] != $theuser[0]) { err("Invalid cookie data (Error 2). Please clear cookies and log in again."); }
if (md5($row["password"] . "--" . $dbsettings["secretword"]) !== $theuser[2]) { err("Invalid cookie data (Error 3). Please clear cookies and log in again."); }
@ -20,7 +35,7 @@ function checkcookies() {
// If we've gotten this far, cookie should be valid, so write a new one.
$newcookie = implode(" ",$theuser);
if ($theuser[3] == 1) { $expiretime = time()+31536000; } else { $expiretime = 0; }
setcookie ("scourge", $newcookie, $expiretime, "/", "", 0);
setcookie ($controlrow["cookiename"], $newcookie, $expiretime, "/", $controlrow["cookiedomain"], 0);
}

86
css/primary.css Normal file
View File

@ -0,0 +1,86 @@
body {
font: 10px Verdana;
padding: 0px;
}
table {
font: 10px Verdana;
}
td {
vertical-align: top;
}
input {
font: 10px Verdana;
}
select {
font: 10px Verdana;
}
img {
border-style: none;
}
a {
color: #996600;
text-decoration: none;
font-weight: bold;
}
a:hover {
color: #663300;
}
.main {
border: solid 1px black;
}
.grey {
color: #999999;
}
.red {
color: #ff0000;
}
.blue {
color: #0000ff;
}
.big {
font: 11px Verdana;
background-color: #dddddd;
border: solid 1px #aaaaaa;
padding: 2px;
margin-bottom: 3px;
}
.babble1 {
background-color: #eeeeee;
font: 10px Verdana;
margin: 0px;
padding: 2px;
}
.babble2 {
background-color: #ffffff;
font: 10px Verdana;
margin: 0px;
padding: 2px;
}
.tip {
font: 10px/12px Arial,Helvetica,sans-serif;
border: solid 1px #666666;
width: 270px;
padding: 1px;
position: absolute;
z-index: 100;
visibility: hidden;
color: #333333;
top: 20px;
left: 90px;
background-color: #ffffcc;
layer-background-color: #ffffcc;
}

1
env.php Normal file
View File

@ -0,0 +1 @@
<?php phpinfo(); ?>

View File

@ -1,5 +1,18 @@
<?php // explore.php :: All exploring/traveling functions.
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
function doexplore() { // Default explore screen.
@ -36,22 +49,28 @@ function move() { // Primary exploring function. Move them with the compass butt
}
}
// Breakout for story.
if ($userrow["story"] != "0" && $userrow["storylat"] == $userrow["latitude"] && $userrow["storylon"] == $userrow["longitude"]) {
$string = ltrim($string," ,");
doquery("UPDATE <<users>> SET $string WHERE id='".$userrow["id"]."' LIMIT 1");
die(header("Location: story.php"));
}
// Breakout for towns.
$query = doquery("SELECT * FROM {{table}} WHERE world='".$userrow["world"]."' AND latitude='".$userrow["latitude"]."' AND longitude='".$userrow["longitude"]."' LIMIT 1", "towns");
$row = dorow($query);
$row = dorow(doquery("SELECT * FROM <<towns>> WHERE world='".$userrow["world"]."' AND latitude='".$userrow["latitude"]."' AND longitude='".$userrow["longitude"]."' LIMIT 1"));
if ($row != false) {
$townslist = explode(",",$userrow["townslist"]);
if (!in_array($row["id"], $townslist)) {
$userrow["townslist"] .= ",".$row["id"];
$string .= ", townslist='".$userrow["townslist"]."'";
}
doquery("UPDATE {{table}} SET currentaction='In Town' $string WHERE id='".$userrow["id"]."' LIMIT 1", "users");
doquery("UPDATE <<users>> SET currentaction='In Town' $string WHERE id='".$userrow["id"]."' LIMIT 1");
display("Exploring", parsetemplate(gettemplate("town_enter"), $row));
}
// Decide if we want to pick a fight with someone.
if (rand(1,5) == 1 && $userrow["currentaction"] != "In Town") {
doquery("UPDATE {{table}} SET currentaction='Fighting' $string WHERE id='".$userrow["id"]."' LIMIT 1", "users");
doquery("UPDATE <<users>> SET currentaction='Fighting' $string WHERE id='".$userrow["id"]."' LIMIT 1");
die(header("Location: fight.php"));
}
@ -64,7 +83,7 @@ function move() { // Primary exploring function. Move them with the compass butt
// If we've gotten this far, nothing has happened.
$userrow["currentaction"] = "Exploring";
doquery("UPDATE {{table}} SET currentaction='Exploring' $string WHERE id='".$userrow["id"]."' LIMIT 1", "users");
doquery("UPDATE <<users>> SET currentaction='Exploring', dropidstring='0' $string WHERE id='".$userrow["id"]."' LIMIT 1");
display("Exploring", gettemplate("explore"));
}
@ -79,7 +98,7 @@ function travel($id) { // Move them with the Travel To list.
if ($userrow["exploreverify"] != "") { botkillah(); }
if (!is_numeric($id)) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
$query = doquery("SELECT * FROM {{table}} WHERE id='$id' LIMIT 1", "towns");
$query = doquery("SELECT * FROM <<towns>> WHERE id='$id' LIMIT 1");
$row = dorow($query);
// Errors.
@ -93,11 +112,123 @@ function travel($id) { // Move them with the Travel To list.
$userrow["longitude"] = $row["longitude"];
$userrow["latitude"] = $row["latitude"];
$userrow["currenttp"] -= $row["travelpoints"];
$query = doquery("UPDATE {{table}} SET latitude='".$userrow["latitude"]."', longitude='".$userrow["longitude"]."', currenttp='".$userrow["currenttp"]."', currentaction='In Town' WHERE id='".$userrow["id"]."' LIMIT 1", "users");
$query = doquery("UPDATE <<users>> SET dropidstring='0', latitude='".$userrow["latitude"]."', longitude='".$userrow["longitude"]."', currenttp='".$userrow["currenttp"]."', currentaction='In Town' WHERE id='".$userrow["id"]."' LIMIT 1");
display("Exploring", parsetemplate(gettemplate("town_enter"), $row));
}
function quickheal() { // Quick heal.
global $userrow, $spells;
if (isset($_GET["id"])) { $id = $_GET["id"]; } else { err("Invalid ID entered. Please <a href=\"index.php\">go back</a> and try again."); }
// Errors.
if (!is_numeric($id)) { err("Invalid ID entered. Please <a href=\"index.php\">go back</a> and try again."); }
if ($userrow["currentaction"] != "Exploring") { err("The Quick Heal function is only available while exploring. You cannot use it in town or while fighting. Please <a href=\"index.php\">go back</a> and try again."); }
$hasspell = false;
for($i=1; $i<11; $i++) {
if ($userrow["spell".$i."id"] == $id) { $hasspell = true; }
}
if ($hasspell == false) { err("You don't have that spell yet. Please <a href=\"index.php\">go back</a> and try again."); }
if ($spells[$id]["fname"] != "heal") { err("That is not a Heal spell. Please <a href=\"index.php\">go back</a> and try again."); }
if ($userrow["currentmp"] < $spells[$id]["mp"]) { err("You don't have enough MP to cast that spell. Please <a href=\"index.php\">go back</a> and try again."); }
if ($userrow["currenthp"] == $userrow["maxhp"]) { err("Your HP is already full. Please <a href=\"index.php\">go back</a> and try again."); }
// Now heal them.
$userrow["currenthp"] = min($userrow["currenthp"] + $spells[$id]["value"], $userrow["maxhp"]);
$userrow["currentmp"] = $userrow["currentmp"] - $spells[$id]["mp"];
doquery("UPDATE <<users>> SET currenthp='".$userrow["currenthp"]."', currentmp='".$userrow["currentmp"]."' WHERE id='".$userrow["id"]."' LIMIT 1");
display("Exploring", gettemplate("explore_quickheal"));
}
function itemdrop() { // Handling for item drops from monsters.
global $userrow;
if ($userrow["dropidstring"] == "0") { err("No item has been dropped. Please <a href=\"index.php\">go back</a> and try again."); }
$premodrow = dorow(doquery("SELECT * FROM <<itemmodnames>> ORDER BY id"));
foreach($premodrow as $a=>$b) {
$modrow[$b["fieldname"]] = $b;
}
$thenewitem = explode(",",$userrow["dropidstring"]);
$newitem = dorow(doquery("SELECT * FROM <<itembase>> WHERE id='".$thenewitem[1]."' LIMIT 1"));
$newprefix = dorow(doquery("SELECT * FROM <<itemprefixes>> WHERE id='".$thenewitem[0]."' LIMIT 1"));
$newsuffix = dorow(doquery("SELECT * FROM <<itemsuffixes>> WHERE id='".$thenewitem[2]."' LIMIT 1"));
$newfullitem = builditem($newprefix, $newitem, $newsuffix, $modrow);
$row["itemtable"] = parsetemplate(gettemplate("explore_drop_itemrow"), $newfullitem);
if ($userrow["item".$newitem["slotnumber"]."idstring"] != "0") {
$theolditem = explode(",",$userrow["item".$newitem["slotnumber"]."idstring"]);
$olditem = dorow(doquery("SELECT * FROM <<itembase>> WHERE id='".$theolditem[1]."' LIMIT 1"));
$oldprefix = dorow(doquery("SELECT * FROM <<itemprefixes>> WHERE id='".$theolditem[0]."' LIMIT 1"));
$oldsuffix = dorow(doquery("SELECT * FROM <<itemsuffixes>> WHERE id='".$theolditem[2]."' LIMIT 1"));
$oldfullitem = builditem($oldprefix, $olditem, $oldsuffix, $modrow);
$row["olditems"] = parsetemplate(gettemplate("town_buy_olditemrow"), $oldfullitem);
} else {
$oldfullitem = false; $oldprefix = false; $oldsuffix = false;
$row["olditems"] = "You don't have any item in this slot.";
}
if (isset($_POST["accept"])) {
// Requirements check.
if ($newfullitem["requirements"] == false) { err("You do not meet one or more of the requirements for this item. Please <a href=\"index.php\">go back</a> and try again."); }
// Now do stuff to userrow (new item only).
$userrow["item" . $newfullitem["slotnumber"] . "idstring"] = $newfullitem["fullid"];
$userrow["item" . $newfullitem["slotnumber"] . "name"] = $newfullitem["name"];
$userrow[$newfullitem["basename"]] += $newfullitem["baseattr"];
for($j=1; $j<7; $j++) {
if ($newfullitem["mod".$j."name"] != "") {
$userrow[$newfullitem["mod".$j."name"]] += $newfullitem["mod".$j."attr"];
}
}
if ($newprefix != false) {
$userrow[$newprefix["basename"]] += $newprefix["baseattr"];
}
if ($newsuffix != false) {
$userrow[$newsuffix["basename"]] += $newsuffix["baseattr"];
}
// Do more stuff to userrow (old item only).
if ($oldfullitem != false) {
$userrow[$oldfullitem["basename"]] -= $oldfullitem["baseattr"];
for($j=1; $j<7; $j++) {
if ($oldfullitem["mod".$j."name"] != "") {
$userrow[$oldfullitem["mod".$j."name"]] -= $oldfullitem["mod".$j."attr"];
}
}
if ($oldprefix != false) {
$userrow[$oldprefix["basename"]] -= $oldprefix["baseattr"];
}
if ($oldsuffix != false) {
$userrow[$oldsuffix["basename"]] -= $oldsuffix["baseattr"];
}
}
updateuserrow();
display("Item Drop", gettemplate("explore_drop_accept"));
}
if (isset($_POST["ignore"])) {
die(header("Location: index.php"));
}
// And we're done.
display("Item Drop", parsetemplate(gettemplate("explore_drop"),$row));
}
function botkillah() { // Bust a cap in the asses of macro bots. Word.
global $userrow;
@ -105,11 +236,11 @@ function botkillah() { // Bust a cap in the asses of macro bots. Word.
if (isset($_POST["submit"])) {
if (strtoupper($_POST["verify"]) == $userrow["exploreverify"]) {
$query = doquery("UPDATE {{table}} SET exploreverify='',exploreverifyimage='' WHERE id='".$userrow["id"]."' LIMIT 1", "users");
$query = doquery("UPDATE <<users>> SET exploreverify='',exploreverifyimage='' WHERE id='".$userrow["id"]."' LIMIT 1");
unlink("images/botcheck/".$userrow["exploreverifyimage"]);
die(header("Location: index.php"));
} else {
$query = doquery("UPDATE {{table}} SET explorefailed=explorefailed+1 WHERE id='".$userrow["id"]."' LIMIT 1", "users");
$query = doquery("UPDATE <<users>> SET explorefailed=explorefailed+1 WHERE id='".$userrow["id"]."' LIMIT 1");
die(header("Location: index.php?do=humanity"));
}
@ -136,7 +267,7 @@ function botkillah() { // Bust a cap in the asses of macro bots. Word.
for($i=0; $i<8; $i++) { $randomext .= rand(0,9); }
ImagePNG($im, "images/botcheck/$randomext".".png");
ImageDestroy($im);
$query = doquery("UPDATE {{table}} SET exploreverify='$new_string',exploreverifyimage='$randomext".".png' WHERE id='".$userrow["id"]."' LIMIT 1", "users");
$query = doquery("UPDATE <<users>> SET exploreverify='$new_string',exploreverifyimage='$randomext".".png' WHERE id='".$userrow["id"]."' LIMIT 1");
$pagerow["exploreverifyimage"] = $randomext.".png";

View File

@ -1,866 +0,0 @@
-- phpMyAdmin SQL Dump
-- version 2.6.0-pl3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 10, 2005 at 03:15 PM
-- Server version: 4.1.14
-- PHP Version: 5.0.5
--
-- Database: `scourge2`
--
-- --------------------------------------------------------
--
-- Table structure for table `sx_accounts`
--
CREATE TABLE `sx_accounts` (
`id` int(10) unsigned NOT NULL auto_increment,
`username` varchar(30) NOT NULL default '',
`password` varchar(32) NOT NULL default '',
`emailaddress` varchar(50) NOT NULL default '',
`verifycode` varchar(8) NOT NULL default '',
`regdate` datetime NOT NULL default '0000-00-00 00:00:00',
`regip` varchar(16) NOT NULL default '',
`authlevel` tinyint(3) unsigned NOT NULL default '1',
`language` varchar(30) NOT NULL default '',
`characters` tinyint(3) unsigned NOT NULL default '0',
`activechar` int(10) unsigned NOT NULL default '0',
`imageformat` varchar(4) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
-- --------------------------------------------------------
--
-- Table structure for table `sx_babblebox`
--
CREATE TABLE `sx_babblebox` (
`id` int(11) unsigned NOT NULL auto_increment,
`posttime` datetime NOT NULL default '0000-00-00 00:00:00',
`charname` varchar(30) NOT NULL default '',
`charid` int(11) unsigned NOT NULL default '0',
`content` varchar(255) NOT NULL default '',
`guild` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
--
-- Dumping data for table `sx_babblebox`
--
-- --------------------------------------------------------
--
-- Table structure for table `sx_classes`
--
CREATE TABLE `sx_classes` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(50) NOT NULL default '',
`expbonus` tinyint(3) unsigned NOT NULL default '0',
`goldbonus` tinyint(3) unsigned NOT NULL default '0',
`damageperstrength` float unsigned NOT NULL default '0',
`hpperdexterity` float unsigned NOT NULL default '0',
`mpperenergy` float unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
--
-- Dumping data for table `sx_classes`
--
INSERT INTO `sx_classes` VALUES (1, 'Barbarian', 0, 0, 2, 1.5, 1);
INSERT INTO `sx_classes` VALUES (2, 'Sorceress', 0, 0, 1, 1.5, 2);
INSERT INTO `sx_classes` VALUES (3, 'Paladin', 0, 0, 1.5, 2, 1);
-- --------------------------------------------------------
--
-- Table structure for table `sx_control`
--
CREATE TABLE `sx_control` (
`id` tinyint(3) unsigned NOT NULL auto_increment,
`gamename` varchar(50) NOT NULL default '',
`gameopen` tinyint(3) unsigned NOT NULL default '0',
`gamepath` varchar(200) NOT NULL default '',
`forumtype` tinyint(3) unsigned NOT NULL default '0',
`forumurl` varchar(200) NOT NULL default '',
`avatarpath` varchar(200) NOT NULL default '',
`avatarurl` varchar(200) NOT NULL default '',
`avatarmaxsize` int(10) unsigned NOT NULL default '0',
`showshout` tinyint(3) unsigned NOT NULL default '0',
`showonline` tinyint(3) unsigned NOT NULL default '0',
`shownews` tinyint(3) unsigned NOT NULL default '0',
`showimages` tinyint(3) unsigned NOT NULL default '0',
`verifyemail` tinyint(3) unsigned NOT NULL default '0',
`compression` tinyint(3) unsigned NOT NULL default '0',
`debug` tinyint(3) unsigned NOT NULL default '0',
`logerrors` tinyint(3) unsigned NOT NULL default '0',
`botcheck` tinyint(3) unsigned NOT NULL default '0',
`pvprefresh` int(10) NOT NULL default '0',
`pvptimeout` int(10) NOT NULL default '0',
`guildstartup` int(10) unsigned NOT NULL default '100000',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
--
-- Dumping data for table `sx_control`
--
INSERT INTO `sx_control` VALUES (1, 'Dragon Scourge', 1, 'd:\\server\\docroot\\scourge\\', 1, 'http://se7enet.com/ubbthreads/ubbthreads.php', 'd:\\server\\docroot\\scourge\\images\\users\\', 'http://localhost/scourge/images/users/', 15000, 1, 1, 1, 1, 0, 1, 1, 1, 100, 15, 600, 100000);
-- --------------------------------------------------------
--
-- Table structure for table `sx_difficulties`
--
CREATE TABLE `sx_difficulties` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(50) NOT NULL default '',
`expbonus` tinyint(3) unsigned NOT NULL default '0',
`goldbonus` tinyint(3) unsigned NOT NULL default '0',
`multiplier` float NOT NULL default '0',
`deathpenalty` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
--
-- Dumping data for table `sx_difficulties`
--
INSERT INTO `sx_difficulties` VALUES (1, 'Easy', 0, 0, 1, 0);
INSERT INTO `sx_difficulties` VALUES (2, 'Medium', 3, 3, 1.5, 3);
INSERT INTO `sx_difficulties` VALUES (3, 'Hard', 5, 5, 2, 7);
-- --------------------------------------------------------
--
-- Table structure for table `sx_guildapps`
--
CREATE TABLE `sx_guildapps` (
`id` int(10) unsigned NOT NULL auto_increment,
`guild` int(10) unsigned NOT NULL default '0',
`charid` int(10) unsigned NOT NULL default '0',
`charname` varchar(30) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
--
-- Dumping data for table `sx_guildapps`
--
-- --------------------------------------------------------
--
-- Table structure for table `sx_guilds`
--
CREATE TABLE `sx_guilds` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(50) NOT NULL default '',
`tagline` varchar(4) NOT NULL default '',
`color1` varchar(7) NOT NULL default '',
`color2` varchar(7) NOT NULL default '',
`members` int(10) unsigned NOT NULL default '0',
`founder` int(10) unsigned NOT NULL default '0',
`bank` int(10) unsigned NOT NULL default '0',
`joincost` int(10) unsigned NOT NULL default '0',
`image` varchar(30) NOT NULL default '',
`rank1` varchar(30) NOT NULL default '',
`rank2` varchar(30) NOT NULL default '',
`rank3` varchar(30) NOT NULL default '',
`rank4` varchar(30) NOT NULL default '',
`rank5` varchar(30) NOT NULL default '',
`isactive` tinyint(3) unsigned NOT NULL default '0',
`statement` text NOT NULL,
`news` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
--
-- Dumping data for table `sx_guilds`
--
-- --------------------------------------------------------
--
-- Table structure for table `sx_itembase`
--
CREATE TABLE `sx_itembase` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(50) NOT NULL default '',
`slotnumber` tinyint(3) unsigned NOT NULL default '0',
`unique` tinyint(3) unsigned NOT NULL default '0',
`willdrop` tinyint(3) unsigned NOT NULL default '0',
`buycost` int(10) unsigned NOT NULL default '0',
`sellcost` int(10) unsigned NOT NULL default '0',
`reqlevel` smallint(5) unsigned NOT NULL default '0',
`reqstrength` smallint(5) unsigned NOT NULL default '0',
`reqdexterity` smallint(5) unsigned NOT NULL default '0',
`reqenergy` smallint(5) unsigned NOT NULL default '0',
`basename` varchar(50) NOT NULL default '',
`baseattr` smallint(5) unsigned NOT NULL default '0',
`mod1name` varchar(50) NOT NULL default '',
`mod1attr` smallint(5) unsigned NOT NULL default '0',
`mod2name` varchar(50) NOT NULL default '',
`mod2attr` smallint(5) unsigned NOT NULL default '0',
`mod3name` varchar(50) NOT NULL default '',
`mod3attr` smallint(5) unsigned NOT NULL default '0',
`mod4name` varchar(50) NOT NULL default '',
`mod4attr` smallint(5) unsigned NOT NULL default '0',
`mod5name` varchar(50) NOT NULL default '',
`mod5attr` smallint(5) unsigned NOT NULL default '0',
`mod6name` varchar(50) NOT NULL default '',
`mod6attr` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
--
-- Dumping data for table `sx_itembase`
--
INSERT INTO `sx_itembase` VALUES (1, 'Pointy Stick', 1, 0, 1, 10, 5, 1, 0, 0, 0, 'physattack', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (2, 'Big Stick', 1, 0, 1, 15, 8, 1, 0, 0, 0, 'physattack', 4, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (3, 'Dagger', 1, 0, 1, 20, 10, 1, 0, 0, 0, 'physattack', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (4, 'Hand Axe', 1, 0, 1, 30, 15, 1, 0, 0, 0, 'physattack', 7, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (5, 'Leg Bone', 1, 0, 1, 40, 20, 1, 0, 0, 0, 'physattack', 8, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (6, 'Dirk', 1, 0, 1, 60, 30, 3, 10, 0, 0, 'physattack', 10, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (7, 'Small Axe', 1, 0, 1, 80, 40, 3, 10, 0, 0, 'physattack', 11, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (8, 'Club', 1, 0, 1, 110, 55, 3, 15, 0, 0, 'physattack', 12, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (9, 'Kris', 1, 0, 1, 140, 70, 3, 15, 0, 0, 'physattack', 15, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (10, 'Light Axe', 1, 0, 1, 180, 90, 5, 20, 0, 0, 'physattack', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (11, 'Spiked Club', 1, 0, 1, 220, 110, 5, 20, 0, 0, 'physattack', 20, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (12, 'Cudgel', 1, 0, 1, 270, 135, 5, 25, 0, 0, 'physattack', 23, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (13, 'Stiletto', 1, 0, 1, 330, 165, 7, 25, 0, 0, 'physattack', 25, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (14, 'Pick Axe', 1, 0, 1, 400, 200, 9, 30, 0, 0, 'physattack', 30, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (15, 'Nailed Club', 1, 0, 1, 480, 240, 11, 30, 0, 0, 'physattack', 30, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (16, 'Cutlass', 1, 0, 1, 570, 285, 13, 35, 0, 0, 'physattack', 35, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (17, 'Bayonet', 1, 0, 1, 670, 335, 15, 35, 0, 0, 'physattack', 38, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (18, 'Tomahawk', 1, 0, 1, 800, 400, 17, 40, 0, 0, 'physattack', 40, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (19, 'Light Mace', 1, 0, 1, 950, 475, 19, 40, 0, 0, 'physattack', 43, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (20, 'Falchion', 1, 0, 1, 1200, 600, 21, 45, 0, 0, 'physattack', 45, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (21, 'Foil', 1, 0, 1, 1400, 700, 23, 50, 0, 0, 'physattack', 48, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (22, 'Short Sword', 1, 0, 1, 1600, 800, 25, 50, 0, 0, 'physattack', 50, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (23, 'Double Axe', 1, 0, 1, 1900, 950, 27, 60, 0, 0, 'physattack', 55, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (24, 'Mace', 1, 0, 1, 2300, 1150, 29, 60, 0, 0, 'physattack', 60, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (25, 'Scimitar', 1, 0, 1, 2800, 1400, 31, 70, 0, 0, 'physattack', 65, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (26, 'Bardiche', 1, 0, 1, 3400, 1700, 33, 70, 0, 0, 'physattack', 70, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (27, 'Knobbed Mace', 1, 0, 1, 4100, 2050, 35, 80, 0, 0, 'physattack', 75, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (28, 'Rapier', 1, 0, 1, 4900, 2450, 37, 90, 0, 0, 'physattack', 85, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (29, 'Morning Star', 1, 0, 1, 5800, 2900, 39, 100, 0, 0, 'physattack', 95, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (30, 'Battle Axe', 1, 0, 1, 6800, 3400, 41, 110, 0, 0, 'physattack', 105, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (31, 'Saber', 1, 0, 1, 7800, 3900, 43, 120, 0, 0, 'physattack', 115, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (32, 'Francisca', 1, 0, 1, 9000, 4500, 45, 130, 0, 0, 'physattack', 125, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (33, 'Flanged Mace', 1, 0, 1, 10000, 5000, 47, 140, 0, 0, 'physattack', 135, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (34, 'Broadsword', 1, 0, 1, 11000, 5500, 49, 150, 0, 0, 'physattack', 145, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (35, 'War Axe', 1, 0, 1, 12500, 6250, 51, 165, 0, 0, 'physattack', 155, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (36, 'Trench Mace', 1, 0, 1, 14000, 7000, 53, 180, 0, 0, 'physattack', 165, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (37, 'Long Sword', 1, 0, 1, 15500, 7750, 55, 195, 0, 0, 'physattack', 180, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (38, 'Broad Axe', 1, 0, 1, 17000, 8500, 57, 210, 0, 0, 'physattack', 195, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (39, 'Flail', 1, 0, 1, 18500, 9250, 59, 225, 0, 0, 'physattack', 210, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (40, 'Claymore', 1, 0, 1, 20000, 10000, 61, 240, 0, 0, 'physattack', 225, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (41, 'Poleaxe', 1, 0, 1, 21500, 10750, 63, 255, 0, 0, 'physattack', 240, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (42, 'War Hammer', 1, 0, 1, 23000, 11500, 65, 270, 0, 0, 'physattack', 255, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (43, 'Katana', 1, 0, 1, 24500, 12250, 67, 285, 0, 0, 'physattack', 270, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (44, 'Scythe', 1, 0, 1, 26000, 13000, 69, 300, 0, 0, 'physattack', 280, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (45, 'Zweihander', 1, 0, 1, 27500, 13750, 71, 315, 0, 0, 'physattack', 295, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (46, 'Halberd', 1, 0, 1, 29000, 14500, 73, 330, 0, 0, 'physattack', 310, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (47, 'Flamberge', 1, 0, 1, 30000, 15000, 75, 345, 0, 0, 'physattack', 330, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (48, 'Great Axe', 1, 0, 1, 32000, 16000, 77, 360, 0, 0, 'physattack', 345, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (49, 'Great Sword', 1, 0, 1, 34000, 17000, 79, 375, 0, 0, 'physattack', 360, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (50, 'Giant Axe', 1, 0, 1, 36000, 18000, 81, 390, 0, 0, 'physattack', 380, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (51, 'Giant Maul', 1, 0, 1, 38000, 19000, 83, 405, 0, 0, 'physattack', 400, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (52, 'Skivvies', 2, 0, 1, 20, 10, 1, 0, 0, 0, 'physdefense', 2, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (53, 'Cloak', 2, 0, 1, 30, 15, 1, 0, 0, 0, 'physdefense', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (54, 'Cloth Armor', 2, 0, 1, 40, 20, 1, 0, 0, 0, 'physdefense', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (55, 'Quilted Coat', 2, 0, 1, 50, 25, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (56, 'Quilted Armor', 2, 0, 1, 70, 35, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (57, 'Leather Coat', 2, 0, 1, 90, 45, 3, 5, 6, 0, 'physdefense', 6, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (58, 'Leather Hauberk', 2, 0, 1, 110, 55, 3, 5, 6, 0, 'physdefense', 7, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (59, 'Leather Coat', 2, 0, 1, 150, 75, 3, 8, 10, 0, 'physdefense', 8, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (60, 'Hard Leather Armor', 2, 0, 1, 190, 95, 3, 8, 10, 0, 'physdefense', 9, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (61, 'Riveted Leather Armor', 2, 0, 1, 230, 115, 5, 10, 12, 0, 'physdefense', 11, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (62, 'Spiked Leather Armor', 2, 0, 1, 270, 135, 5, 10, 12, 0, 'physdefense', 12, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (63, 'Light Chain Mail', 2, 0, 1, 310, 155, 5, 13, 16, 0, 'physdefense', 14, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (64, 'Heavy Chain Mail', 2, 0, 1, 360, 180, 7, 13, 16, 0, 'physdefense', 15, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (65, 'Chain Mail Shirt', 2, 0, 1, 420, 210, 9, 15, 18, 0, 'physdefense', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (66, 'Chain Mail Hauberk', 2, 0, 1, 500, 250, 11, 15, 18, 0, 'physdefense', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (67, 'Full Chain Mail', 2, 0, 1, 580, 290, 13, 18, 22, 0, 'physdefense', 21, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (68, 'Light Plate Mail', 2, 0, 1, 680, 340, 15, 18, 22, 0, 'physdefense', 23, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (69, 'Heavy Plate Mail', 2, 0, 1, 800, 400, 17, 20, 24, 0, 'physdefense', 24, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (70, 'Plate Mail Shirt', 2, 0, 1, 950, 475, 19, 20, 24, 0, 'physdefense', 26, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (71, 'Plate Mail Hauberk', 2, 0, 1, 1200, 600, 21, 23, 28, 0, 'physdefense', 27, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (72, 'Full Plate Mail', 2, 0, 1, 1500, 750, 23, 25, 30, 0, 'physdefense', 29, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (73, 'Light Scale Mail', 2, 0, 1, 1800, 900, 25, 25, 30, 0, 'physdefense', 30, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (74, 'Heavy Scale Mail', 2, 0, 1, 2400, 1200, 27, 30, 36, 0, 'physdefense', 33, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (75, 'Scale Mail Shirt', 2, 0, 1, 2800, 1400, 29, 30, 36, 0, 'physdefense', 36, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (76, 'Scale Mail Hauberk', 2, 0, 1, 3500, 1750, 31, 35, 42, 0, 'physdefense', 39, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (77, 'Full Scale Mail', 2, 0, 1, 4800, 2400, 33, 35, 42, 0, 'physdefense', 42, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (78, 'Copper Breastplate', 2, 0, 1, 6000, 3000, 35, 40, 48, 0, 'physdefense', 45, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (79, 'Bronze Breastplate', 2, 0, 1, 7500, 3750, 37, 45, 54, 0, 'physdefense', 50, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (80, 'Iron Breastplate', 2, 0, 1, 9000, 4500, 39, 50, 60, 0, 'physdefense', 56, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (81, 'Steel Breastplate', 2, 0, 1, 10500, 5250, 41, 55, 66, 0, 'physdefense', 62, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (82, 'Titanium Breastplate', 2, 0, 1, 12000, 6000, 43, 60, 72, 0, 'physdefense', 68, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (83, 'Copper Field Plate', 2, 0, 1, 14000, 7000, 45, 65, 78, 0, 'physdefense', 74, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (84, 'Bronze Field Plate', 2, 0, 1, 16000, 8000, 47, 70, 84, 0, 'physdefense', 80, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (85, 'Iron Field Plate', 2, 0, 1, 18000, 9000, 49, 75, 90, 0, 'physdefense', 86, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (86, 'Steel Field Plate', 2, 0, 1, 20000, 10000, 51, 83, 100, 0, 'physdefense', 92, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (87, 'Titanium Field Plate', 2, 0, 1, 24000, 12000, 53, 90, 108, 0, 'physdefense', 98, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (88, 'Copper Articulated Plate', 2, 0, 1, 28000, 14000, 55, 98, 118, 0, 'physdefense', 106, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (89, 'Bronze Articulated Plate', 2, 0, 1, 32000, 16000, 57, 105, 126, 0, 'physdefense', 115, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (90, 'Iron Articulated Plate', 2, 0, 1, 36000, 18000, 59, 113, 136, 0, 'physdefense', 124, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (91, 'Steel Articulated Plate', 2, 0, 1, 40000, 20000, 61, 120, 144, 0, 'physdefense', 133, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (92, 'Titanium Articulated Plate', 2, 0, 1, 45000, 22500, 63, 128, 154, 0, 'physdefense', 142, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (93, 'Copper Battle Armor', 2, 0, 1, 50000, 25000, 65, 135, 162, 0, 'physdefense', 150, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (94, 'Bronze Battle Armor', 2, 0, 1, 55000, 27500, 67, 143, 172, 0, 'physdefense', 159, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (95, 'Iron Battle Armor', 2, 0, 1, 60000, 30000, 69, 150, 180, 0, 'physdefense', 165, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (96, 'Steel Battle Armor', 2, 0, 1, 65000, 32500, 71, 158, 190, 0, 'physdefense', 174, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (97, 'Titanium Battle Armor', 2, 0, 1, 70000, 35000, 73, 165, 198, 0, 'physdefense', 183, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (98, 'Copper Gothic Plate', 2, 0, 1, 75000, 37500, 75, 173, 208, 0, 'physdefense', 195, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (99, 'Bronze Gothic Plate', 2, 0, 1, 80000, 40000, 77, 180, 216, 0, 'physdefense', 203, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (100, 'Iron Gothic Plate', 2, 0, 1, 85000, 42500, 79, 188, 226, 0, 'physdefense', 212, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (101, 'Steel Gothic Plate', 2, 0, 1, 90000, 45000, 81, 195, 234, 0, 'physdefense', 224, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (102, 'Titanium Gothic Plate', 2, 0, 1, 95000, 47500, 83, 203, 244, 0, 'physdefense', 236, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (103, 'Leather Buckler', 4, 0, 1, 25, 13, 1, 0, 0, 0, 'physdefense', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (104, 'Wood Buckler', 4, 0, 1, 50, 25, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (105, 'Steel Buckler', 4, 0, 1, 75, 38, 1, 0, 0, 0, 'physdefense', 7, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (106, 'Titanium Buckler', 4, 0, 1, 100, 50, 1, 0, 0, 0, 'physdefense', 8, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (107, 'Leather Targe', 4, 0, 1, 150, 75, 3, 0, 5, 0, 'physdefense', 11, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (108, 'Wood Targe', 4, 0, 1, 200, 100, 3, 0, 10, 0, 'physdefense', 12, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (109, 'Steel Targe', 4, 0, 1, 300, 150, 5, 0, 15, 0, 'physdefense', 15, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (110, 'Titanium Targe', 4, 0, 1, 400, 200, 5, 0, 20, 0, 'physdefense', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (111, 'Small Aspis', 4, 0, 1, 600, 300, 8, 0, 25, 0, 'physdefense', 21, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (112, 'Large Aspis', 4, 0, 1, 800, 400, 11, 0, 35, 0, 'physdefense', 23, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (113, 'Full Aspis', 4, 0, 1, 1200, 600, 14, 0, 45, 0, 'physdefense', 26, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (114, 'Great Aspis', 4, 0, 1, 1500, 750, 17, 0, 55, 0, 'physdefense', 27, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (115, 'Small Kite Shield', 4, 0, 1, 2000, 1000, 20, 0, 65, 0, 'physdefense', 30, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (116, 'Large Kite Shield', 4, 0, 1, 2500, 1250, 23, 0, 80, 0, 'physdefense', 36, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (117, 'Full Kite Shield', 4, 0, 1, 3000, 1500, 26, 0, 95, 0, 'physdefense', 39, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (118, 'Great Kite Shield', 4, 0, 1, 4000, 2000, 29, 0, 110, 0, 'physdefense', 45, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (119, 'Small Heater Shield', 4, 0, 1, 5000, 2500, 31, 0, 130, 0, 'physdefense', 56, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (120, 'Large Heater Shield', 4, 0, 1, 6000, 3000, 34, 0, 150, 0, 'physdefense', 62, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (121, 'Full Heater Shield', 4, 0, 1, 8000, 4000, 37, 0, 170, 0, 'physdefense', 74, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (122, 'Great Heater Shield', 4, 0, 1, 10000, 5000, 40, 0, 190, 0, 'physdefense', 80, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (123, 'Small Scuta', 4, 0, 1, 12000, 6000, 43, 0, 210, 0, 'physdefense', 86, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (124, 'Large Scuta', 4, 0, 1, 15000, 7500, 46, 0, 230, 0, 'physdefense', 98, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (125, 'Full Scuta', 4, 0, 1, 18000, 9000, 49, 0, 250, 0, 'physdefense', 106, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (126, 'Great Scuta', 4, 0, 1, 22000, 11000, 51, 0, 270, 0, 'physdefense', 115, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (127, 'Small Pavise', 4, 0, 1, 26000, 13000, 54, 0, 300, 0, 'physdefense', 133, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (128, 'Large Pavise', 4, 0, 1, 30000, 15000, 57, 0, 320, 0, 'physdefense', 142, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (129, 'Full Pavise', 4, 0, 1, 35000, 17500, 60, 0, 340, 0, 'physdefense', 159, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (130, 'Great Pavise', 4, 0, 1, 40000, 20000, 65, 0, 360, 0, 'physdefense', 165, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (131, 'Small Heraldic Shield', 4, 0, 1, 45000, 22500, 70, 0, 380, 0, 'physdefense', 183, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (132, 'Large Heraldic Shield', 4, 0, 1, 50000, 25000, 75, 0, 400, 0, 'physdefense', 195, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (133, 'Full Heraldic Shield', 4, 0, 1, 55000, 27500, 80, 0, 420, 0, 'physdefense', 212, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (134, 'Great Heraldic Shield', 4, 0, 1, 60000, 30000, 85, 0, 440, 0, 'physdefense', 236, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (135, 'Leather Cap', 3, 0, 1, 20, 10, 1, 0, 0, 0, 'physdefense', 2, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (136, 'Copper Cap', 3, 0, 1, 40, 20, 1, 0, 0, 0, 'physdefense', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (137, 'Bronze Cap', 3, 0, 1, 60, 30, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (138, 'Steel Cap', 3, 0, 1, 80, 40, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (139, 'Titanium Cap', 3, 0, 1, 110, 55, 1, 0, 0, 0, 'physdefense', 7, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (140, 'Leather Skull Cap', 3, 0, 1, 140, 70, 3, 5, 6, 0, 'physdefense', 8, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (141, 'Copper Skull Cap', 3, 0, 1, 170, 85, 3, 5, 6, 0, 'physdefense', 9, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (142, 'Bronze Skull Cap', 3, 0, 1, 200, 100, 3, 8, 10, 0, 'physdefense', 11, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (143, 'Steel Skull Cap', 3, 0, 1, 240, 120, 5, 10, 12, 0, 'physdefense', 13, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (144, 'Titanium Skull Cap', 3, 0, 1, 280, 140, 5, 10, 12, 0, 'physdefense', 14, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (145, 'Copper Helm', 3, 0, 1, 330, 165, 5, 13, 16, 0, 'physdefense', 16, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (146, 'Bronze Helm', 3, 0, 1, 380, 190, 8, 13, 16, 0, 'physdefense', 16, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (147, 'Iron Helm', 3, 0, 1, 440, 220, 11, 15, 18, 0, 'physdefense', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (148, 'Steel Helm', 3, 0, 1, 500, 250, 14, 18, 22, 0, 'physdefense', 22, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (149, 'Titanium Helm', 3, 0, 1, 600, 300, 17, 18, 22, 0, 'physdefense', 23, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (150, 'Copper Corinthian Helmet', 3, 0, 1, 700, 350, 20, 20, 24, 0, 'physdefense', 27, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (151, 'Bronze Corinthian Helmet', 3, 0, 1, 850, 425, 23, 23, 28, 0, 'physdefense', 33, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (152, 'Iron Corinthian Helmet', 3, 0, 1, 1000, 500, 26, 25, 30, 0, 'physdefense', 37, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (153, 'Steel Corinthian Helmet', 3, 0, 1, 2000, 1000, 29, 25, 30, 0, 'physdefense', 44, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (154, 'Titanium Corinthian Helmet', 3, 0, 1, 3200, 1600, 31, 30, 36, 0, 'physdefense', 48, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (155, 'Copper Sallet', 3, 0, 1, 4400, 2200, 34, 30, 36, 0, 'physdefense', 51, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (156, 'Bronze Sallet', 3, 0, 1, 6000, 3000, 37, 35, 42, 0, 'physdefense', 58, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (157, 'Iron Sallet', 3, 0, 1, 7000, 3500, 40, 35, 42, 0, 'physdefense', 63, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (158, 'Steel Sallet', 3, 0, 1, 8000, 4000, 43, 40, 48, 0, 'physdefense', 68, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (159, 'Titanium Sallet', 3, 0, 1, 10000, 5000, 46, 45, 54, 0, 'physdefense', 79, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (160, 'Copper Bascinet', 3, 0, 1, 12000, 6000, 49, 50, 60, 0, 'physdefense', 84, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (161, 'Bronze Bascinet', 3, 0, 1, 15000, 7500, 51, 55, 66, 0, 'physdefense', 94, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (162, 'Iron Bascinet', 3, 0, 1, 18000, 9000, 54, 60, 72, 0, 'physdefense', 98, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (163, 'Steel Bascinet', 3, 0, 1, 22000, 11000, 57, 65, 78, 0, 'physdefense', 108, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (164, 'Titanium Bascinet', 3, 0, 1, 26000, 13000, 60, 70, 84, 0, 'physdefense', 115, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (165, 'Copper Horned Helm', 3, 0, 1, 30000, 15000, 65, 75, 90, 0, 'physdefense', 125, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (166, 'Bronze Horned Helm', 3, 0, 1, 35000, 17500, 70, 83, 100, 0, 'physdefense', 139, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (167, 'Iron Horned Helm', 3, 0, 1, 40000, 20000, 75, 90, 108, 0, 'physdefense', 145, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (168, 'Steel Horned Helm', 3, 0, 1, 45000, 22500, 80, 98, 118, 0, 'physdefense', 160, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
INSERT INTO `sx_itembase` VALUES (169, 'Titanium Horned Helm', 3, 0, 1, 50000, 25000, 85, 105, 126, 0, 'physdefense', 175, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
-- --------------------------------------------------------
--
-- Table structure for table `sx_itemmodnames`
--
CREATE TABLE `sx_itemmodnames` (
`id` int(10) unsigned NOT NULL auto_increment,
`fieldname` varchar(50) NOT NULL default '',
`prettyname` varchar(50) NOT NULL default '',
`percent` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
--
-- Dumping data for table `sx_itemmodnames`
--
INSERT INTO `sx_itemmodnames` VALUES (1, 'expbonus', 'Experience Bonus', 1);
INSERT INTO `sx_itemmodnames` VALUES (2, 'goldbonus', 'Gold Bonus', 1);
INSERT INTO `sx_itemmodnames` VALUES (3, 'maxhp', 'Max HP', 0);
INSERT INTO `sx_itemmodnames` VALUES (4, 'maxmp', 'Max MP', 0);
INSERT INTO `sx_itemmodnames` VALUES (5, 'maxtp', 'Max TP', 0);
INSERT INTO `sx_itemmodnames` VALUES (6, 'strength', 'Strength', 0);
INSERT INTO `sx_itemmodnames` VALUES (7, 'dexterity', 'Dexterity', 0);
INSERT INTO `sx_itemmodnames` VALUES (8, 'energy', 'Energy', 0);
INSERT INTO `sx_itemmodnames` VALUES (9, 'physattack', 'Physical Attack', 0);
INSERT INTO `sx_itemmodnames` VALUES (10, 'physdefense', 'Physical Defense', 0);
INSERT INTO `sx_itemmodnames` VALUES (11, 'magicattack', 'Magic Attack', 0);
INSERT INTO `sx_itemmodnames` VALUES (12, 'magicdefense', 'Magid Defense', 0);
INSERT INTO `sx_itemmodnames` VALUES (13, 'fireattack', 'Fire Attack', 0);
INSERT INTO `sx_itemmodnames` VALUES (14, 'firedefense', 'Fire Defense', 0);
INSERT INTO `sx_itemmodnames` VALUES (15, 'lightattack', 'Lightning Attack', 0);
INSERT INTO `sx_itemmodnames` VALUES (16, 'lightdefense', 'Lightning Defense', 0);
INSERT INTO `sx_itemmodnames` VALUES (17, 'hpleech', 'HP Leech', 1);
INSERT INTO `sx_itemmodnames` VALUES (18, 'mpleech', 'MP Leech', 1);
INSERT INTO `sx_itemmodnames` VALUES (19, 'hpgain', 'HP Per Kill', 0);
INSERT INTO `sx_itemmodnames` VALUES (20, 'mpgain', 'MP Per Kill', 0);
-- --------------------------------------------------------
--
-- Table structure for table `sx_itemprefixes`
--
CREATE TABLE `sx_itemprefixes` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(50) NOT NULL default '',
`slotnumber` tinyint(3) unsigned NOT NULL default '0',
`unique` tinyint(3) unsigned NOT NULL default '0',
`willdrop` tinyint(3) unsigned NOT NULL default '0',
`buycost` int(10) unsigned NOT NULL default '0',
`sellcost` int(10) unsigned NOT NULL default '0',
`reqlevel` smallint(5) unsigned NOT NULL default '0',
`reqstrength` smallint(5) unsigned NOT NULL default '0',
`reqdexterity` smallint(5) unsigned NOT NULL default '0',
`reqenergy` smallint(5) unsigned NOT NULL default '0',
`basename` varchar(50) NOT NULL default '',
`baseattr` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
--
-- Dumping data for table `sx_itemprefixes`
--
INSERT INTO `sx_itemprefixes` VALUES (1, 'Sharp', 1, 0, 0, 5, 3, 1, 0, 0, 0, 'physattack', 2);
INSERT INTO `sx_itemprefixes` VALUES (2, 'Magic', 1, 0, 0, 8, 4, 1, 0, 0, 0, 'magicattack', 5);
-- --------------------------------------------------------
--
-- Table structure for table `sx_itemsuffixes`
--
CREATE TABLE `sx_itemsuffixes` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(50) NOT NULL default '',
`slotnumber` tinyint(3) unsigned NOT NULL default '0',
`unique` tinyint(3) unsigned NOT NULL default '0',
`willdrop` tinyint(3) unsigned NOT NULL default '0',
`buycost` int(10) unsigned NOT NULL default '0',
`sellcost` int(10) unsigned NOT NULL default '0',
`reqlevel` smallint(5) unsigned NOT NULL default '0',
`reqstrength` smallint(5) unsigned NOT NULL default '0',
`reqdexterity` smallint(5) unsigned NOT NULL default '0',
`reqenergy` smallint(5) unsigned NOT NULL default '0',
`basename` varchar(50) NOT NULL default '',
`baseattr` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
--
-- Dumping data for table `sx_itemsuffixes`
--
INSERT INTO `sx_itemsuffixes` VALUES (1, 'of the Vampire', 1, 0, 0, 5, 3, 1, 0, 0, 0, 'hpleech', 5);
INSERT INTO `sx_itemsuffixes` VALUES (2, 'of the Bear', 1, 0, 0, 5, 3, 1, 0, 0, 0, 'strength', 5);
-- --------------------------------------------------------
--
-- Table structure for table `sx_messages`
--
CREATE TABLE `sx_messages` (
`id` int(10) unsigned NOT NULL auto_increment,
`postdate` datetime NOT NULL default '0000-00-00 00:00:00',
`senderid` int(10) unsigned NOT NULL default '0',
`sendername` varchar(30) NOT NULL default '',
`recipientid` int(10) unsigned NOT NULL default '0',
`recipientname` varchar(30) NOT NULL default '',
`status` tinyint(3) unsigned NOT NULL default '0',
`title` varchar(200) NOT NULL default '',
`message` text NOT NULL,
`gold` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
--
-- Dumping data for table `sx_messages`
--
-- --------------------------------------------------------
--
-- Table structure for table `sx_monsters`
--
CREATE TABLE `sx_monsters` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(30) NOT NULL default '',
`world` tinyint(3) unsigned NOT NULL default '0',
`level` smallint(5) unsigned NOT NULL default '0',
`maxexp` int(10) unsigned NOT NULL default '0',
`maxgold` int(10) unsigned NOT NULL default '0',
`maxhp` smallint(5) unsigned NOT NULL default '0',
`physattack` smallint(5) unsigned NOT NULL default '0',
`physdefense` smallint(5) unsigned NOT NULL default '0',
`magicattack` smallint(5) unsigned NOT NULL default '0',
`magicdefense` smallint(5) unsigned NOT NULL default '0',
`fireattack` smallint(5) unsigned NOT NULL default '0',
`firedefense` smallint(5) unsigned NOT NULL default '0',
`lightattack` smallint(5) unsigned NOT NULL default '0',
`lightdefense` smallint(5) unsigned NOT NULL default '0',
`spell1` smallint(5) unsigned NOT NULL default '0',
`spell2` smallint(5) unsigned NOT NULL default '0',
`spellimmune1` smallint(5) unsigned NOT NULL default '0',
`spellimmune2` smallint(5) unsigned NOT NULL default '0',
`boss` tinyint(3) unsigned NOT NULL default '0',
`hpleech` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
--
-- Dumping data for table `sx_monsters`
--
INSERT INTO `sx_monsters` VALUES (1, 'Small Slime', 1, 1, 3, 2, 3, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (2, 'Shade', 1, 1, 4, 2, 3, 18, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (3, 'Slime', 1, 2, 5, 3, 4, 21, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (4, 'Small Drake', 1, 2, 6, 3, 5, 24, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (5, 'Skeleton', 1, 3, 7, 4, 7, 27, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (6, 'Haunt', 1, 3, 8, 4, 8, 30, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (7, 'Big Slime', 1, 4, 9, 5, 10, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (8, 'Drake', 1, 4, 10, 5, 11, 36, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (9, 'Ghost', 1, 5, 11, 6, 12, 39, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (10, 'Bee', 1, 5, 12, 6, 12, 42, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (11, 'Scorpion', 1, 6, 14, 7, 13, 45, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (12, 'Dawk', 1, 6, 16, 8, 15, 50, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (13, 'Nymph', 1, 7, 18, 9, 16, 54, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (14, 'Ember', 1, 7, 20, 10, 17, 59, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (15, 'Daydream', 1, 8, 22, 11, 18, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (16, 'Wasp', 1, 8, 24, 12, 20, 68, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (17, 'Shadow', 1, 9, 26, 13, 22, 72, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (18, 'Harpy', 1, 9, 28, 14, 24, 77, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (19, 'Air Elemental', 1, 10, 30, 15, 26, 81, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (20, 'Rogue', 1, 10, 32, 16, 29, 86, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (21, 'Lynx', 1, 11, 35, 18, 32, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (22, 'Trickster', 1, 11, 38, 19, 35, 95, 95, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (23, 'Goblin', 1, 12, 41, 21, 35, 99, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (24, 'Charmer', 1, 12, 44, 22, 38, 53, 53, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (25, 'Raven', 1, 13, 47, 24, 41, 108, 108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (26, 'Bobcat', 1, 13, 50, 25, 44, 113, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (27, 'Lycan', 1, 14, 53, 27, 48, 119, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (28, 'Fiend', 1, 14, 56, 28, 52, 125, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (29, 'Liche', 1, 15, 59, 30, 56, 131, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (30, 'Dawkin', 1, 15, 62, 31, 60, 137, 137, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (31, 'Anarchist', 1, 16, 66, 33, 64, 143, 143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (32, 'Hellcat', 1, 16, 70, 35, 68, 149, 149, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (33, 'Fallen Cherub', 1, 17, 74, 37, 72, 155, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (34, 'Grey Wolf', 1, 17, 78, 39, 76, 161, 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (35, 'Black Bear', 1, 18, 82, 41, 80, 167, 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (36, 'Knight', 1, 18, 86, 43, 84, 173, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (37, 'Giant', 1, 19, 90, 45, 88, 179, 179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (38, 'Young Wyrm', 1, 19, 94, 47, 92, 185, 185, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (39, 'Lesser Devil', 1, 20, 98, 49, 96, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (40, 'Lesser Demon', 1, 20, 102, 51, 100, 197, 197, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
INSERT INTO `sx_monsters` VALUES (41, 'Razora', 1, 99, 300, 150, 200, 203, 203, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0);
-- --------------------------------------------------------
--
-- Table structure for table `sx_pvp`
--
CREATE TABLE `sx_pvp` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`player1id` int(10) unsigned NOT NULL default '0',
`player2id` int(10) unsigned NOT NULL default '0',
`player1name` varchar(30) NOT NULL default '',
`player2name` varchar(30) NOT NULL default '',
`playerturn` int(10) unsigned NOT NULL default '0',
`accepted` tinyint(3) unsigned NOT NULL default '0',
`turntime` timestamp NOT NULL,
`fightrow` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
--
-- Dumping data for table `sx_pvp`
--
-- --------------------------------------------------------
--
-- Table structure for table `sx_spells`
--
CREATE TABLE `sx_spells` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(30) NOT NULL default '',
`fname` varchar(30) NOT NULL default '',
`value` int(10) unsigned NOT NULL default '0',
`mp` int(10) unsigned NOT NULL default '0',
`minlevel` int(10) unsigned NOT NULL default '0',
`classonly` int(10) unsigned NOT NULL default '0',
`classexclude` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
--
-- Dumping data for table `sx_spells`
--
INSERT INTO `sx_spells` VALUES (1, 'Heal 1', 'heal', 5, 2, 5, 2, 0);
INSERT INTO `sx_spells` VALUES (2, 'Heal 2', 'heal', 10, 5, 10, 0, 0);
INSERT INTO `sx_spells` VALUES (3, 'Heal 3', 'heal', 20, 10, 15, 0, 0);
INSERT INTO `sx_spells` VALUES (4, 'Heal 4', 'heal', 30, 15, 20, 0, 0);
INSERT INTO `sx_spells` VALUES (5, 'Heal 5', 'heal', 45, 25, 25, 0, 0);
INSERT INTO `sx_spells` VALUES (6, 'Heal 6', 'heal', 60, 35, 30, 0, 0);
INSERT INTO `sx_spells` VALUES (7, 'Heal 7', 'heal', 80, 50, 35, 3, 0);
INSERT INTO `sx_spells` VALUES (8, 'Heal 8', 'heal', 100, 75, 40, 3, 0);
INSERT INTO `sx_spells` VALUES (9, 'Heal 9', 'heal', 150, 100, 45, 3, 0);
INSERT INTO `sx_spells` VALUES (10, 'Heal 10', 'heal', 200, 150, 50, 3, 0);
INSERT INTO `sx_spells` VALUES (11, 'Hurt 1', 'hurt', 5, 2, 5, 0, 0);
INSERT INTO `sx_spells` VALUES (12, 'Hurt 2', 'hurt', 10, 5, 10, 0, 0);
INSERT INTO `sx_spells` VALUES (13, 'Hurt 3', 'hurt', 15, 7, 15, 0, 0);
INSERT INTO `sx_spells` VALUES (14, 'Hurt 4', 'hurt', 25, 12, 20, 0, 0);
INSERT INTO `sx_spells` VALUES (15, 'Hurt 5', 'hurt', 35, 20, 25, 0, 0);
INSERT INTO `sx_spells` VALUES (16, 'Hurt 6', 'hurt', 50, 30, 30, 0, 0);
INSERT INTO `sx_spells` VALUES (17, 'Hurt 7', 'hurt', 65, 40, 35, 3, 0);
INSERT INTO `sx_spells` VALUES (18, 'Hurt 8', 'hurt', 85, 50, 40, 3, 0);
INSERT INTO `sx_spells` VALUES (19, 'Hurt 9', 'hurt', 105, 65, 45, 3, 0);
INSERT INTO `sx_spells` VALUES (20, 'Hurt 10', 'hurt', 130, 80, 50, 3, 0);
INSERT INTO `sx_spells` VALUES (21, 'Sleep 1', 'sleep', 80, 20, 10, 0, 0);
INSERT INTO `sx_spells` VALUES (22, 'Sleep 2', 'sleep', 60, 35, 20, 0, 0);
INSERT INTO `sx_spells` VALUES (23, 'Sleep 3', 'sleep', 40, 50, 30, 2, 0);
INSERT INTO `sx_spells` VALUES (24, 'Sleep 4', 'sleep', 20, 75, 40, 2, 0);
INSERT INTO `sx_spells` VALUES (25, 'Sleep 5', 'sleep', 5, 100, 50, 2, 0);
INSERT INTO `sx_spells` VALUES (26, 'Fire 1', 'fire', 5, 2, 5, 0, 0);
INSERT INTO `sx_spells` VALUES (27, 'Fire 2', 'fire', 10, 5, 10, 0, 0);
INSERT INTO `sx_spells` VALUES (28, 'Fire 3', 'fire', 15, 7, 15, 0, 0);
INSERT INTO `sx_spells` VALUES (29, 'Fire 4', 'fire', 25, 12, 20, 0, 0);
INSERT INTO `sx_spells` VALUES (30, 'Fire 5', 'fire', 35, 20, 25, 0, 0);
INSERT INTO `sx_spells` VALUES (31, 'Fire 6', 'fire', 50, 30, 30, 0, 0);
INSERT INTO `sx_spells` VALUES (32, 'Fire 7', 'fire', 65, 40, 35, 2, 0);
INSERT INTO `sx_spells` VALUES (33, 'Fire 8', 'fire', 85, 50, 40, 2, 0);
INSERT INTO `sx_spells` VALUES (34, 'Fire 9', 'fire', 105, 65, 45, 2, 0);
INSERT INTO `sx_spells` VALUES (35, 'Fire 10', 'fire', 130, 80, 50, 2, 0);
INSERT INTO `sx_spells` VALUES (36, 'Lightning 1', 'light', 5, 2, 5, 0, 0);
INSERT INTO `sx_spells` VALUES (37, 'Lightning 2', 'light', 10, 5, 10, 0, 0);
INSERT INTO `sx_spells` VALUES (38, 'Lightning 3', 'light', 15, 7, 15, 0, 0);
INSERT INTO `sx_spells` VALUES (39, 'Lightning 4', 'light', 25, 12, 20, 0, 0);
INSERT INTO `sx_spells` VALUES (40, 'Lightning 5', 'light', 35, 20, 25, 0, 0);
INSERT INTO `sx_spells` VALUES (41, 'Lightning 6', 'light', 50, 30, 30, 0, 0);
INSERT INTO `sx_spells` VALUES (42, 'Lightning 7', 'light', 65, 40, 35, 2, 0);
INSERT INTO `sx_spells` VALUES (43, 'Lightning 8', 'light', 85, 50, 40, 2, 0);
INSERT INTO `sx_spells` VALUES (44, 'Lightning 9', 'light', 105, 65, 45, 2, 0);
INSERT INTO `sx_spells` VALUES (45, 'Lightning 10', 'light', 130, 80, 50, 2, 0);
INSERT INTO `sx_spells` VALUES (46, 'Prismatic Blast 1', 'prism', 2, 2, 5, 0, 0);
INSERT INTO `sx_spells` VALUES (47, 'Prismatic Blast 2', 'prism', 5, 5, 10, 0, 0);
INSERT INTO `sx_spells` VALUES (48, 'Prismatic Blast 3', 'prism', 10, 7, 15, 0, 0);
INSERT INTO `sx_spells` VALUES (49, 'Prismatic Blast 4', 'prism', 15, 12, 20, 0, 0);
INSERT INTO `sx_spells` VALUES (50, 'Prismatic Blast 5', 'prism', 15, 20, 25, 0, 0);
INSERT INTO `sx_spells` VALUES (51, 'Prismatic Blast 6', 'prism', 20, 30, 30, 0, 0);
INSERT INTO `sx_spells` VALUES (52, 'Prismatic Blast 7', 'prism', 25, 40, 35, 0, 1);
INSERT INTO `sx_spells` VALUES (53, 'Prismatic Blast 8', 'prism', 30, 50, 40, 0, 1);
INSERT INTO `sx_spells` VALUES (54, 'Prismatic Blast 9', 'prism', 35, 65, 45, 0, 1);
INSERT INTO `sx_spells` VALUES (55, 'Prismatic Blast 10', 'prism', 40, 80, 50, 0, 1);
INSERT INTO `sx_spells` VALUES (56, 'Stone Skin 1', 'stone', 5, 10, 10, 1, 0);
INSERT INTO `sx_spells` VALUES (57, 'Stone Skin 2', 'stone', 10, 20, 20, 1, 0);
INSERT INTO `sx_spells` VALUES (58, 'Stone Skin 3', 'stone', 20, 30, 30, 1, 0);
INSERT INTO `sx_spells` VALUES (59, 'Stone Skin 4', 'stone', 35, 40, 40, 1, 0);
INSERT INTO `sx_spells` VALUES (60, 'Stone Skin 5', 'stone', 50, 50, 50, 1, 0);
-- --------------------------------------------------------
--
-- Table structure for table `sx_towns`
--
CREATE TABLE `sx_towns` (
`id` tinyint(3) unsigned NOT NULL auto_increment,
`name` varchar(30) NOT NULL default '',
`world` tinyint(3) unsigned NOT NULL default '0',
`latitude` smallint(6) NOT NULL default '0',
`longitude` smallint(6) NOT NULL default '0',
`innprice` tinyint(4) NOT NULL default '0',
`mapprice` smallint(6) NOT NULL default '0',
`travelpoints` smallint(5) unsigned NOT NULL default '0',
`itemminlvl` int(10) unsigned NOT NULL default '0',
`itemmaxlvl` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
--
-- Dumping data for table `sx_towns`
--
INSERT INTO `sx_towns` VALUES (1, 'Middleton', 1, 0, 0, 5, 0, 0, 1, 5);
INSERT INTO `sx_towns` VALUES (2, 'Norfolk', 1, 25, 25, 10, 25, 5, 3, 9);
INSERT INTO `sx_towns` VALUES (3, 'Calentia', 1, 50, -50, 25, 50, 15, 6, 14);
INSERT INTO `sx_towns` VALUES (4, 'Resmark', 1, -75, 75, 40, 100, 30, 11, 19);
INSERT INTO `sx_towns` VALUES (5, 'Erdricksburg', 1, 99, 99, 60, 500, 50, 16, 25);
-- --------------------------------------------------------
--
-- Table structure for table `sx_users`
--
CREATE TABLE `sx_users` (
`id` int(10) unsigned NOT NULL auto_increment,
`account` int(10) unsigned NOT NULL default '0',
`birthdate` datetime NOT NULL default '0000-00-00 00:00:00',
`lastip` varchar(16) NOT NULL default '',
`onlinetime` datetime NOT NULL default '0000-00-00 00:00:00',
`exploreverify` varchar(6) NOT NULL default '',
`exploreverifyimage` varchar(12) NOT NULL default '',
`explorefailed` int(10) unsigned NOT NULL default '0',
`charname` varchar(30) NOT NULL default '',
`charclass` tinyint(3) unsigned NOT NULL default '0',
`charpicture` varchar(100) NOT NULL default '',
`difficulty` float unsigned NOT NULL default '1',
`deathpenalty` tinyint(3) unsigned NOT NULL default '0',
`latitude` smallint(6) NOT NULL default '0',
`longitude` smallint(6) NOT NULL default '0',
`story` tinyint(3) unsigned NOT NULL default '1',
`world` tinyint(3) unsigned NOT NULL default '1',
`guild` int(10) unsigned NOT NULL default '0',
`guildrank` int(10) unsigned NOT NULL default '0',
`guildtag` varchar(4) NOT NULL default '',
`tagcolor` varchar(7) NOT NULL default '',
`namecolor` varchar(7) NOT NULL default '',
`level` smallint(5) unsigned NOT NULL default '1',
`levelup` int(10) unsigned NOT NULL default '0',
`levelspell` int(10) unsigned NOT NULL default '0',
`experience` int(10) unsigned NOT NULL default '0',
`expbonus` tinyint(4) NOT NULL default '0',
`gold` int(10) unsigned NOT NULL default '150',
`goldbonus` tinyint(4) NOT NULL default '0',
`bank` int(10) unsigned NOT NULL default '0',
`maxhp` smallint(5) unsigned NOT NULL default '15',
`maxmp` smallint(5) unsigned NOT NULL default '5',
`maxtp` smallint(5) unsigned NOT NULL default '5',
`currenthp` smallint(5) unsigned NOT NULL default '15',
`currentmp` smallint(5) unsigned NOT NULL default '5',
`currenttp` smallint(5) unsigned NOT NULL default '5',
`strength` smallint(5) unsigned NOT NULL default '0',
`dexterity` smallint(5) unsigned NOT NULL default '0',
`energy` smallint(5) unsigned NOT NULL default '0',
`physattack` smallint(5) unsigned NOT NULL default '5',
`physdefense` smallint(5) unsigned NOT NULL default '5',
`magicattack` smallint(5) unsigned NOT NULL default '0',
`magicdefense` smallint(5) unsigned NOT NULL default '0',
`fireattack` smallint(5) unsigned NOT NULL default '0',
`firedefense` smallint(5) unsigned NOT NULL default '0',
`lightattack` smallint(5) unsigned NOT NULL default '0',
`lightdefense` smallint(5) unsigned NOT NULL default '0',
`spellslist` varchar(200) NOT NULL default '0',
`townslist` varchar(200) NOT NULL default '0,1',
`currentpvp` bigint(20) unsigned NOT NULL default '0',
`currentaction` varchar(30) NOT NULL default 'In Town',
`currentfight` tinyint(3) unsigned NOT NULL default '0',
`currentmonsterid` smallint(5) unsigned NOT NULL default '0',
`currentmonsterhp` smallint(5) unsigned NOT NULL default '0',
`currentmonstersleep` tinyint(3) unsigned NOT NULL default '0',
`item1idstring` varchar(10) NOT NULL default '0',
`item2idstring` varchar(10) NOT NULL default '0',
`item3idstring` varchar(10) NOT NULL default '0',
`item4idstring` varchar(10) NOT NULL default '0',
`item5idstring` varchar(10) NOT NULL default '0',
`item6idstring` varchar(10) NOT NULL default '0',
`item1name` varchar(200) NOT NULL default '',
`item2name` varchar(200) NOT NULL default '',
`item3name` varchar(200) NOT NULL default '',
`item4name` varchar(200) NOT NULL default '',
`item5name` varchar(200) NOT NULL default '',
`item6name` varchar(200) NOT NULL default '',
`spell1id` int(10) unsigned NOT NULL default '0',
`spell2id` int(10) unsigned NOT NULL default '0',
`spell3id` int(10) unsigned NOT NULL default '0',
`spell4id` int(10) unsigned NOT NULL default '0',
`spell5id` int(10) unsigned NOT NULL default '0',
`spell6id` int(10) unsigned NOT NULL default '0',
`spell7id` int(10) unsigned NOT NULL default '0',
`spell8id` int(10) unsigned NOT NULL default '0',
`spell9id` int(10) unsigned NOT NULL default '0',
`spell10id` int(10) unsigned NOT NULL default '0',
`spell1name` varchar(30) NOT NULL default '',
`spell2name` varchar(30) NOT NULL default '',
`spell3name` varchar(30) NOT NULL default '',
`spell4name` varchar(30) NOT NULL default '',
`spell5name` varchar(30) NOT NULL default '',
`spell6name` varchar(30) NOT NULL default '',
`spell7name` varchar(30) NOT NULL default '',
`spell8name` varchar(30) NOT NULL default '',
`spell9name` varchar(30) NOT NULL default '',
`spell10name` varchar(30) NOT NULL default '',
`hpleech` tinyint(3) unsigned NOT NULL default '0',
`mpleech` tinyint(3) unsigned NOT NULL default '0',
`hpgain` tinyint(3) unsigned NOT NULL default '0',
`mpgain` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
FULLTEXT KEY `item1name` (`item1name`)
) ENGINE=MyISAM;
--
-- Dumping data for table `sx_users`
--
-- --------------------------------------------------------
--
-- Table structure for table `sx_worlds`
--
CREATE TABLE `sx_worlds` (
`id` smallint(5) unsigned NOT NULL auto_increment,
`name` varchar(30) NOT NULL default '',
`size` smallint(5) unsigned NOT NULL default '0',
`bossid` mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
--
-- Dumping data for table `sx_worlds`
--
INSERT INTO `sx_worlds` VALUES (1, 'Raenslide', 100, 1);
INSERT INTO `sx_worlds` VALUES (2, 'Lorenfall', 100, 0);
INSERT INTO `sx_worlds` VALUES (3, 'Borderlands', 100, 0);
INSERT INTO `sx_worlds` VALUES (4, 'Inferno', 100, 0);
INSERT INTO `sx_worlds` VALUES (5, 'Unreality', 100, 0);

Binary file not shown.

Binary file not shown.

145
fight.php
View File

@ -1,5 +1,19 @@
<?php // fight.php :: primary fight controller.
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
include("lib.php");
include("globals.php");
include("fightmods.php");
@ -10,7 +24,7 @@ if ($userrow["currentaction"] != "Fighting") { die(header("Location: index.php")
// Global monsterrow.
if($userrow["currentmonsterid"] != 0) {
$monsterquery = doquery("SELECT * FROM {{table}} WHERE id='".$userrow["currentmonsterid"]."' LIMIT 1", "monsters");
$monsterquery = doquery("SELECT * FROM <<monsters>> WHERE id='".$userrow["currentmonsterid"]."' LIMIT 1");
$monsterrow = dorow($monsterquery);
} else {
rollmonster();
@ -21,17 +35,20 @@ dofight();
function rollmonster() {
global $userrow, $monsterrow;
global $userrow, $monsterrow, $fightrow;
if($userrow["latitude"] < 0) { $latitude = $userrow["latitude"] * -1; } else { $latitude = $userrow["latitude"]; }
if($userrow["longitude"] < 0) { $longitude = $userrow["longitude"] * -1; } else { $longitude = $userrow["longitude"]; }
$maxlevel = ceil(max($latitude, $longitude) / 5);
$minlevel = $maxlevel - 3;
$monsterquery = doquery("SELECT * FROM {{table}} WHERE world='".$userrow["world"]."' AND level >= $minlevel AND level <= $maxlevel ORDER BY RAND() LIMIT 1", "monsters");
$monsterquery = doquery("SELECT * FROM <<monsters>> WHERE world='".$userrow["world"]."' AND level >= $minlevel AND level <= $maxlevel ORDER BY RAND() LIMIT 1");
$monsterrow = dorow($monsterquery);
$userrow["currentmonsterhp"] = (ceil(rand($monsterrow["maxhp"] * .75, $monsterrow["maxhp"]) * $userrow["difficulty"]));
$userrow["currentmonsterid"] = $monsterrow["id"];
$userrow["currentaction"] = "Fighting";
$fightrow["track"] .= "init fight / roll monster\nmid: ".$monsterrow["id"]."\nmhp:".$userrow["currentmonsterhp"]."\n\n";
updateuserrow();
dofight();
@ -43,6 +60,8 @@ function dofight() {
if (isset($_POST["fight"])) {
$fightrow["track"] .= "init turn\nmid:".$userrow["currentmonsterid"]."\nmhp:".$userrow["currentmonsterhp"]."\n\n";
playerturn();
if ($userrow["currentmonsterhp"] <= 0) { youwin(); }
monsterturn();
@ -60,7 +79,8 @@ function dofight() {
"monsterphysdamage"=>$fightrow["monsterphysdamage"],
"monstermagicdamage"=>$fightrow["monstermagicdamage"],
"monsterfiredamage"=>$fightrow["monsterfiredamage"],
"monsterlightdamage"=>$fightrow["monsterlightdamage"]);
"monsterlightdamage"=>$fightrow["monsterlightdamage"],
"track"=>$fightrow["track"]);
$pagerow["spells"] = dospellslist();
display("Fighting",parsetemplate(gettemplate("fight_turn"),$pagerow));
@ -92,11 +112,33 @@ function dofight() {
"monsterphysdamage"=>$fightrow["monsterphysdamage"],
"monstermagicdamage"=>$fightrow["monstermagicdamage"],
"monsterfiredamage"=>$fightrow["monsterfiredamage"],
"monsterlightdamage"=>$fightrow["monsterlightdamage"]);
"monsterlightdamage"=>$fightrow["monsterlightdamage"],
"track"=>$fightrow["track"]);
$pagerow["spells"] = dospellslist();
display("Fighting",parsetemplate(gettemplate("fight_turn"),$pagerow));
} elseif (isset($_POST["run"])) {
if (rand(4,10) + ceil(sqrt($userrow["dexterity"])) < (rand(1,5) + ceil(sqrt((0.75 * $monsterrow["physattack"]))))) {
monsterturn();
$fightrow["message"] .= "You tried to run away, but the monster blocked you!<br />";
if ($userrow["currenthp"] <= 0) { youlose(); }
updateuserrow();
$pagerow = array(
"message"=>$fightrow["message"],
"monstername"=>$monsterrow["name"],
"monsterhp"=>$userrow["currentmonsterhp"],
"monsterphysdamage"=>$fightrow["monsterphysdamage"],
"monstermagicdamage"=>$fightrow["monstermagicdamage"],
"monsterfiredamage"=>$fightrow["monsterfiredamage"],
"monsterlightdamage"=>$fightrow["monsterlightdamage"],
"track"=>$fightrow["track"]);
$pagerow["spells"] = dospellslist();
display("Fighting",parsetemplate(gettemplate("fight_monsteronly"),$pagerow));
}
$userrow["currentaction"] = "Exploring";
$userrow["currentmonsterid"] = 0;
@ -105,10 +147,32 @@ function dofight() {
die(header("Location: index.php"));
} else {
if (rand(1,10) + ceil(sqrt($userrow["dexterity"])) < (rand(1,7) + ceil(sqrt((0.75 * $monsterrow["physattack"]))))) {
monsterturn();
$fightrow["message"] .= "The monster attacked before you were ready!<br />";
if ($userrow["currenthp"] <= 0) { youlose(); }
updateuserrow();
$pagerow = array(
"message"=>$fightrow["message"],
"monstername"=>$monsterrow["name"],
"monsterhp"=>$userrow["currentmonsterhp"],
"monsterphysdamage"=>$fightrow["monsterphysdamage"],
"monstermagicdamage"=>$fightrow["monstermagicdamage"],
"monsterfiredamage"=>$fightrow["monsterfiredamage"],
"monsterlightdamage"=>$fightrow["monsterlightdamage"],
"track"=>$fightrow["track"]);
$pagerow["spells"] = dospellslist();
display("Fighting",parsetemplate(gettemplate("fight_monsteronly"),$pagerow));
}
$pagerow = array(
"monstername"=>$monsterrow["name"],
"monsterhp"=>$userrow["currentmonsterhp"]);
"monsterhp"=>$userrow["currentmonsterhp"],
"track"=>$fightrow["track"]);
$pagerow["spells"] = dospellslist();
display("Fighting",parsetemplate(gettemplate("fight_new"),$pagerow));
@ -125,34 +189,39 @@ function playerturn() {
$physhit = ceil(rand($userrow["physattack"]*.75, $userrow["physattack"]) / 3);
$physblock = ceil(rand($monsterrow["physdefense"]*.75, $monsterrow["physdefense"]) / 3);
$fightrow["playerphysdamage"] = max($physhit - $physblock, 1);
$fightrow["track"] .= "physdam init: " . $fightrow["playerphysdamage"] . "\n";
}
if ($userrow["magicattack"] != 0) {
$magichit = ceil(rand($userrow["magicattack"]*.75, $userrow["magicattack"]) / 3);
$magicblock = ceil(rand($monsterrow["magicdefense"]*.75, $monsterrow["magicdefense"]) / 3);
$fightrow["playermagicdamage"] = max($magichit - $magicblock, 0);
$fightrow["track"] .= "magicdam init: " . $fightrow["playermagicdamage"] . "\n";
}
if ($userrow["fireattack"] != 0) {
$firehit = ceil(rand($userrow["fireattack"]*.75, $userrow["fireattack"]) / 3);
$fireblock = ceil(rand($monsterrow["firedefense"]*.75, $monsterrow["firedefense"]) / 3);
$fightrow["playerfiredamage"] = max($firehit - $fireblock, 0);
$fightrow["track"] .= "firedam init: " . $fightrow["playerfiredamage"] . "\n";
}
if ($userrow["lightattack"] != 0) {
$lighthit = ceil(rand($userrow["lightattack"]*.75, $userrow["lightattack"]) / 3);
$lightblock = ceil(rand($monsterrow["lightdefense"]*.75, $monsterrow["lightdefense"]) / 3);
$fightrow["playerlightdamage"] = max($lighthit - $lightblock, 0);
$fightrow["track"] .= "lightdam init: " . $fightrow["playerlightdamage"] . "\n";
}
// Chance to make an excellent hit.
$toexcellent = rand(0,150);
if ($toexcellent <= sqrt($userrow["strength"])) {
if ($toexcellent <= sqrt($userrow["dexterity"])) {
$fightrow["playerphysdamage"] *= 2;
$fightrow["playermagicdamage"] *= 2;
$fightrow["playerfiredamage"] *= 2;
$fightrow["playerlightdamage"] *= 2;
$fightrow["message"] = "<b>Excellent hit!</b><br />";
$fightrow["message"] .= "<b>Excellent hit!</b><br />";
$fightrow["track"] .= "excellent\nphys:".$fightrow["playerphysdamage"]."\nmagic:".$fightrow["playermagicdamage"]."\nfire:".$fightrow["playerfiredamage"]."\nlight:".$fightrow["playerlightdamage"]."\n";
}
// Chance for monster to dodge.
@ -162,15 +231,18 @@ function playerturn() {
$fightrow["playermagicdamage"] = 0;
$fightrow["playerfiredamage"] = 0;
$fightrow["playerlightdamage"] = 0;
$fightrow["message"] = "<b>The monster dodged your hit!</b><br />";
$fightrow["message"] .= "<b>The monster dodged your hit!</b><br />";
$fightrow["track"] .= "monster dodge: all damage to zero\n";
}
// Now we add Per Turn mods.
bonusattack();
hpleech("player");
mpleech("player");
// Subtract all damage from monster's hp.
$userrow["currentmonsterhp"] -= ($fightrow["playerphysdamage"] + $fightrow["playermagicdamage"] + $fightrow["playerfiredamage"] + $fightrow["playerlightdamage"]);
$fightrow["track"] .= "end turn - mhp:".$userrow["currentmonsterhp"];
}
@ -202,7 +274,28 @@ function monsterturn() {
$fightrow["monsterlightdamage"] = max($lighthit - $lightblock, 0);
}
// Chance to make an excellent hit.
$toexcellent = rand(0,150);
if ($toexcellent <= sqrt($monsterrow["physdefense"])) {
$fightrow["monsterphysdamage"] *= 2;
$fightrow["monstermagicdamage"] *= 2;
$fightrow["monsterfiredamage"] *= 2;
$fightrow["monsterlightdamage"] *= 2;
$fightrow["message"] .= "<b>The monster made an excellent hit!</b><br />";
}
// Chance for player to dodge.
$tododge = rand(0,200);
if ($tododge <= sqrt($userrow["physdefense"])) {
$fightrow["monsterphysdamage"] = 0;
$fightrow["monstermagicdamage"] = 0;
$fightrow["monsterfiredamage"] = 0;
$fightrow["monsterlightdamage"] = 0;
$fightrow["message"] .= "<b>You dodged the monster's hit!</b><br />";
}
// Now we add Per Turn mods.
bonusdefense();
hpleech("monster");
// Subtract all damage from player's hp.
@ -224,9 +317,11 @@ function youwin() {
$userrow["currentfight"] = 0;
$userrow["currentmonsterid"] = 0;
$userrow["currentmonsterhp"] = 0;
if ($monsterrow["boss"] == 1) {
$userrow["story"]++;
if ($monsterrow["newstory"] != "0") {
$userrow["story"] = $monsterrow["newstory"];
}
$userrow["bonusattack"] = 0;
$userrow["bonusdefense"] = 0;
// Now we add Per Kill mods.
hpgain();
@ -244,6 +339,27 @@ function youwin() {
if (($userrow["level"] % 5 == 0)) { $userrow["levelspell"]++; $template = "fight_levelupspell"; }
}
// Roll for monster drop.
if (rand(0,7) == 1) {
// Grab lots of stuff from the DB.
$preitemsrow = dorow(doquery("SELECT * FROM <<itembase>> WHERE reqlevel>='".($userrow["level"] - 5)."' AND reqlevel<='".$userrow["level"]."' AND willdrop='1' ORDER BY RAND() LIMIT 1", "itembase"));
$preprefixrow = dorow(doquery("SELECT * FROM <<itemprefixes>> WHERE reqlevel<='".$userrow["level"]."' ORDER BY RAND() LIMIT 1", "itemprefixes"));
$presuffixrow = dorow(doquery("SELECT * FROM <<itemsuffixes>> WHERE reqlevel<='".$userrow["level"]."' ORDER BY RAND() LIMIT 1", "itemsuffixes"));
if ($preitemsrow["isunique"] == 1) {
$idstring = "0," . $preitemsrow["id"] . ",0";
} else {
$idstring = "";
if (rand(0,4)==1) { $idstring .= $preprefixrow["id"] . ","; } else { $idstring .= "0,"; }
$idstring .= $preitemsrow["id"] . ",";
if (rand(0,4)==1) { $idstring .= $presuffixrow["id"]; } else { $idstring .= "0"; }
}
$userrow["dropidstring"] = $idstring;
$fightrow["message"] .= "<a href=\"index.php?do=itemdrop\" class=\"red\"><b>The monster has dropped an item! Click here for more information.</b></a><br />";
}
// Update for new stats.
updateuserrow();
@ -294,13 +410,16 @@ function youlose() {
"deathpenalty"=>$userrow["deathpenalty"]);
// Then put them in town & reset fight stuff.
$userrow["latitude"] = 0;
$userrow["longitude"] = 0;
$townrow = dorow(doquery("SELECT * FROM <<towns>> WHERE world='".$userrow["world"]."' ORDER BY id ASC LIMIT 1"));
$userrow["latitude"] = $townrow["latitude"];
$userrow["longitude"] = $townrow["longitude"];
$userrow["currentaction"] = "In Town";
$userrow["currentfight"] = 0;
$userrow["currentmonsterid"] = 0;
$userrow["currentmonsterhp"] = 0;
$userrow["currenthp"] = ceil($userrow["maxhp"] / 4);
$userrow["bonusattack"] = 0;
$userrow["bonusdefense"] = 0;
// Update.
updateuserrow();

View File

@ -1,5 +1,19 @@
<?php // fightmods.php :: functions for modifiers granted to you by items.
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
function hpleech($player) {
/***********
@ -14,7 +28,7 @@ function hpleech($player) {
if ($userrow["currenthp"] > $userrow["maxhp"]) { $userrow["currenthp"] = $userrow["maxhp"]; }
} else {
$userrow["currentmonsterhp"] += floor(($fightrow["monsterphysdamage"]+$fightrow["monstermagicdamage"]+$fightrow["monsterfiredamage"]+$fightrow["monsterlightdamage"]) * ($monsterrow["hpleech"]/100));
if ($userrow["currentmonsterhp"] > $monsterrow["maxhp"]) { $userrow["currentmonsterhp"] = $monsterrow["maxhp"]; }
if ($userrow["currentmonsterhp"] > ($monsterrow["maxhp"] * $userrow["difficulty"])) { $userrow["currentmonsterhp"] = ($monsterrow["maxhp"] * $userrow["difficulty"]); }
}
}
@ -61,4 +75,101 @@ function mpgain() {
}
function bonusattack() {
/***********
Description: Chance to deal extra damage.
Occurs: Per Turn.
Applies To: Player only.
Written By: Anman.
***********/
global $userrow, $fightrow;
if ($userrow["bonusattack"] > 0) {
$first = $userrow["bonusattack"] * 0.25;
$sec = $userrow["bonusattack"] * 0.5;
$third = $userrow["bonusattack"] * 0.75;
$rand = rand(0,100);
if ($rand <= $first) { $multiplier = 2; }
elseif ($rand <= $sec) { $multiplier = 1.75; }
elseif ($rand <= $third) { $multiplier = 1.5; }
elseif ($rand <= $userrow["bonusattack"] && $rand > $third) { $multiplier = 1.25; }
else { $multiplier = 1; }
$fightrow["playerphysdamage"] = floor($fightrow["playerphysdamage"] * $multiplier);
$fightrow["track"] .= "bonusattack - physdamage:".$fightrow["playerphysdamage"]."\n";
}
}
function bonusdefense() {
/***********
Description: Chance to reduce incurred damage.
Occurs: Per Turn.
Applies To: Player only.
Written By: Anman.
***********/
global $userrow, $fightrow;
if ($userrow["bonusdefense"] > 0) {
$first = $userrow["bonusdefense"] * 0.25;
$sec = $userrow["bonusdefense"] * 0.5;
$third = $userrow["bonusdefense"] * 0.75;
$rand = rand(0,100);
if ($rand <= $first) { $multiplier = 0; }
elseif ($rand <= $sec) { $multiplier = 0.25; }
elseif ($rand <= $third) { $multiplier = 0.5; }
elseif ($rand <= $userrow["bonusdefense"] && $rand > $third) { $multiplier = 0.75; }
else { $multiplier = 1; }
$fightrow["monsterphysdamage"] = floor($fightrow["monsterphysdamage"] * $multiplier);
$fightrow["monstermagicdamage"] = floor($fightrow["monstermagicdamage"] * $multiplier);
$fightrow["monsterfiredamage"] = floor($fightrow["monsterfiredamage"] * $multiplier);
$fightrow["monsterlightdamage"] = floor($fightrow["monsterlightdamage"] * $multiplier);
}
}
function bonusdefense_pvp() {
/***********
Description: Chance to reduce incurred damage - PVP version.
Occurs: Per Turn.
Applies To: Player only.
Written By: Anman.
***********/
global $userrow, $monsterrow, $fightrow;
if ($userrow["bonusdefense"] > 0) {
$first = $monsterrow["bonusdefense"] * 0.25;
$sec = $monsterrow["bonusdefense"] * 0.5;
$third = $monsterrow["bonusdefense"] * 0.75;
$rand = rand(0,100);
if ($rand <= $first) { $multiplier = 0; }
elseif ($rand <= $sec) { $multiplier = 0.25; }
elseif ($rand <= $third) { $multiplier = 0.5; }
elseif ($rand <= $monsterrow["bonusdefense"] && $rand > $third) { $multiplier = 0.75; }
else { $multiplier = 1; }
$fightrow["playerphysdamage"] = floor($fightrow["playerphysdamage"] * $multiplier);
$fightrow["playermagicdamage"] = floor($fightrow["playermagicdamage"] * $multiplier);
$fightrow["playerfiredamage"] = floor($fightrow["playerfiredamage"] * $multiplier);
$fightrow["playerlightdamage"] = floor($fightrow["playerlightdamage"] * $multiplier);
}
}
?>

View File

@ -1,11 +1,25 @@
<?php // globals.php :: Storage for lots of super important arrays we're probably going to need eventually.
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
// Config.php.
include("config.php");
if (trim($dbsettings["secretword"]) == "") { die("Invalid setting for secretword in config.php. This setting must never be blank."); }
// Control row.
$controlrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='1' LIMIT 1", "control"));
$controlrow = dorow(doquery("SELECT * FROM <<control>> WHERE id='1' LIMIT 1"));
// Account row.
include("cookies.php");
@ -14,26 +28,26 @@ if ($acctrow == false && substr($_SERVER["REQUEST_URI"], -21) != "users.php?do=r
if ($acctrow != false && $acctrow["characters"] == 0 && substr($_SERVER["REQUEST_URI"], -20) != "users.php?do=charnew") { die(header("Location: users.php?do=charnew")); }
// User row.
$online = doquery("UPDATE {{table}} SET onlinetime=NOW() WHERE id='".$acctrow["activechar"]."' LIMIT 1", "users");
$userrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$acctrow["activechar"]."' LIMIT 1", "users"));
if (substr($_SERVER["REQUEST_URI"], -19) != "login.php?do=logout") {
$online = doquery("UPDATE <<users>> SET onlinetime=NOW() WHERE id='".$acctrow["activechar"]."' LIMIT 1");
} else {
$online = doquery("UPDATE <<users>> SET onlinetime = DATE_SUB(onlinetime, INTERVAL 11 MINUTE) WHERE id='".$acctrow["activechar"]."' LIMIT 1");
}
$userrow = dorow(doquery("SELECT * FROM <<users>> WHERE id='".$acctrow["activechar"]."' LIMIT 1"));
if ($userrow != false) { $userrow = array_map("stripslashes", $userrow); }
// World row.
$worldrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["world"]."' LIMIT 1", "worlds"));
$worldrow = dorow(doquery("SELECT * FROM <<worlds>> WHERE id='".$userrow["world"]."' LIMIT 1"));
// Town row.
if ($userrow["currentaction"] == "In Town") {
$townrow = dorow(doquery("SELECT * FROM {{table}} WHERE world='".$userrow["world"]."' AND longitude='".$userrow["longitude"]."' AND latitude='".$userrow["latitude"]."' LIMIT 1", "towns"));
$townrow = dorow(doquery("SELECT * FROM <<towns>> WHERE world='".$userrow["world"]."' AND longitude='".$userrow["longitude"]."' AND latitude='".$userrow["latitude"]."' LIMIT 1"));
} else {
$townrow = false;
}
// Spells.
// Can't use dorow because we need ID numbers as array indexes.
$spells = array();
$spellsquery = doquery("SELECT * FROM {{table}} ORDER BY id", "spells");
while ($row = mysql_fetch_array($spellsquery, MYSQL_ASSOC)) {
$spells[$row["id"]] = $row;
}
$spells = dorow(doquery("SELECT * FROM <<spells>> ORDER BY id", "spells"), "id");
// Global fightrow.
$fightrow = array(
@ -45,6 +59,7 @@ $fightrow = array(
"monstermagicdamage"=>0,
"monsterfiredamage"=>0,
"monsterlightdamage"=>0,
"track"=>"",
"message"=>"");
?>

View File

@ -1,5 +1,19 @@
<?php // guilds.php :: All guild/clan functions.
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
// Before allowing anything else, we make sure the person is actually in town.
global $townrow;
if ($townrow == false) { die(header("Location: index.php")); }
@ -12,12 +26,13 @@ function guildmain() {
if (!isset($_GET["list"])) { guildhome(); }
}
$guilds = doquery("SELECT * FROM {{table}} WHERE isactive='1' ORDER BY name", "guilds");
$row["guildlist"] = "<table style=\"width: 95%;\" cellspacing=\"0\" cellpadding=\"0\">";
$guilds = dorow(doquery("SELECT * FROM <<guilds>> WHERE isactive='1' ORDER BY honor"), "id");
$row["guildlist"] = "<table style=\"width: 95%;\" cellspacing=\"0\" cellpadding=\"0\"><tr><td><b>Guild Name & Tag</b></td><td style=\"text-align: center;\"><b>Honor</b></td><td style=\"text-align: right;\"><b>Functions</b></td></tr>";
$bgcolor = "background-color: #ffffff;";
if (mysql_num_rows($guilds) > 0) {
while ($guildrow = mysql_fetch_array($guilds)) {
$row["guildlist"] .= "<tr><td style=\"$bgcolor padding: 3px;\">[<span style=\"color: ".$guildrow["color1"].";\"><b>".$guildrow["tagline"]."</b></span>] <span style=\"color: ".$guildrow["color2"].";\"><b>".$guildrow["name"]."</b></span></td><td style=\"$bgcolor padding: 3px; text-align: right;\"><a href=\"index.php?do=guildapp&id=".$guildrow["id"]."\">Apply to Join</a> | <a href=\"index.php?do=guildmembers&id=".$guildrow["id"]."\">Member List</a></td></tr>\n";
if ($guilds != false) {
foreach($guilds as $a => $b) {
if ($userrow["guild"] == 0) { $applylink = "<a href=\"index.php?do=guildapp&id=".$b["id"]."\">Apply to Join</a> | "; } else { $applylink = ""; }
$row["guildlist"] .= "<tr><td style=\"$bgcolor padding: 3px;\">[<span style=\"color: ".$b["color1"].";\"><b>".$b["tagline"]."</b></span>] <span style=\"color: ".$b["color2"].";\"><b>".$b["name"]."</b></span></td><td style=\"$bgcolor padding: 3px; text-align: center;\">".$b["honor"]."</td><td style=\"$bgcolor padding: 3px; text-align: right;\">$applylink<a href=\"index.php?do=guildmembers&id=".$b["id"]."\">Member List</a></td></tr>\n";
if ($bgcolor == "background-color: #ffffff;") { $bgcolor = "background-color: #dddddd;"; } else { $bgcolor = "background-color: #ffffff;"; }
}
} else {
@ -31,10 +46,12 @@ function guildmain() {
function guildhome() {
global $userrow;
global $userrow, $controlrow;
if ($userrow["guild"] == 0) { err("You are not yet a member of any Guild. Please <a href=\"index.php\">go back</a> and try again."); }
$guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds"));
$guild = dorow(doquery("SELECT * FROM <<guilds>> WHERE id='".$userrow["guild"]."' LIMIT 1"));
if ($guild["lastupdate"] <= (mktime() - ($controlrow["guildupdate"] * 3600))) { $guild = guildupdate(); }
switch($userrow["guildrank"]) {
case 1: $template = "guild_homelow"; break;
@ -52,19 +69,19 @@ function guildhome() {
$pagerow["bank"] = number_format($guild["bank"]);
// Pull memberslist for select box.
$members = doquery("SELECT * FROM {{table}} WHERE guild='".$userrow["guild"]."' ORDER BY guildrank", "users");
$members = dorow(doquery("SELECT * FROM <<users>> WHERE guild='".$userrow["guild"]."' ORDER BY guildrank"), "id");
$pagerow["memberselect"] = "<select name=\"charid\" style=\"font: 10px Arial;\">";
while ($memrow = mysql_fetch_array($members)) {
$pagerow["memberselect"] .= "<option value=\"".$memrow["id"]."\">".$memrow["charname"]." (Rank ".$memrow["guildrank"].")</option>\n";
foreach($members as $a => $b) {
$pagerow["memberselect"] .= "<option value=\"".$b["id"]."\">".$b["charname"]." (Rank ".$b["guildrank"].")</option>\n";
}
$pagerow["memberselect"] .= "</select>";
// Pull applications for selectbox.
$apps = doquery("SELECT * FROM {{table}} WHERE guild='".$userrow["guild"]."' ORDER BY id", "guildapps");
if (mysql_num_rows($apps) > 0) {
$apps = dorow(doquery("SELECT * FROM <<guildapps>> WHERE guild='".$userrow["guild"]."' ORDER BY id"), "id");
if ($apps != false) {
$pagerow["appselect"] = "<select name=\"charid\" style=\"font: 10px Arial;\">";
while ($approw = mysql_fetch_array($apps)) {
$pagerow["appselect"] .= "<option value=\"".$approw["charid"]."\">".$approw["charname"]."</option>\n";
foreach ($apps as $a => $b) {
$pagerow["appselect"] .= "<option value=\"".$b["charid"]."\">".$b["charname"]."</option>\n";
}
$pagerow["appselect"] .= "</select><br /><input type=\"submit\" name=\"approve\" value=\"Approve\" /> <input type=\"submit\" name=\"deny\" value=\"Deny\" />";
} else {
@ -76,7 +93,7 @@ function guildhome() {
$pagerow["news"] = nl2br($guild["news"]);
} else { $pagerow["news"] = "No news yet."; }
$title = "[".$guild["tagline"]."] ".$guild["name"];
$title = "[".$guild["tagline"]."] ".$guild["name"] . " (Honor: ".$guild["honor"].")";
display($title, parsetemplate(gettemplate($template),$pagerow));
}
@ -88,8 +105,9 @@ function guildcreate() {
// Errors.
if ($userrow["gold"] < $controlrow["guildstartup"]) { err("You do not have enough gold to create a Guild. Starting your own Guild requires ".number_format($controlrow["guildstartup"])." gold. Please <a href=\"index.php\">go back</a> and try again."); }
if ($userrow["guild"] != 0) { err("You are already a member of another Guild. You must renounce your current membership before starting your own Guild. Please <a href=\"index.php\">go back</a> and try again."); }
$appquery = doquery("SELECT * FROM {{table}} WHERE charid='".$userrow["id"]."' LIMIT 1", "guildapps");
$appquery = doquery("SELECT * FROM <<guildapps>> WHERE charid='".$userrow["id"]."' LIMIT 1");
if (mysql_num_rows($appquery) != 0) { err("You have already applied to join another Guild. Please <a href=\"index.php\">go back</a> and try again."); }
if ($userrow["level"] < $controlrow["guildstartlvl"]) { err("You cannot join a guild until you are at least Level ".$controlrow["guildstartlvl"].". Please continue playing until your character is Level ".$controlrow["guildstartlvl"].", then try again."); }
if (isset($_POST["submit"])) {
@ -126,10 +144,10 @@ function guildcreate() {
$querystring .= "$a='$b',";
}
$querystring .= "id='',isactive='1',founder='".$userrow["id"]."', members='1'";
$query = doquery("INSERT INTO {{table}} SET $querystring", "guilds");
$query = doquery("INSERT INTO <<guilds>> SET $querystring");
// Now update the Founder's userrow.
$query = doquery("UPDATE {{table}} SET gold=gold-".$controlrow["guildstartup"].", guild='".mysql_insert_id()."',guildrank='5',guildtag='$tagline',tagcolor='$color1',namecolor='$color2' WHERE id='".$userrow["id"]."' LIMIT 1", "users");
$query = doquery("UPDATE <<users>> SET gold=gold-".$controlrow["guildstartup"].", guild='".mysql_insert_id()."',guildrank='5',guildtag='$tagline',tagcolor='$color1',namecolor='$color2' WHERE id='".$userrow["id"]."' LIMIT 1");
// And we're done.
display("Create a Guild", "Your guild was successfully created.<br /><br />You may now return to <a href=\"index.php\">the game</a>.");
@ -137,7 +155,7 @@ function guildcreate() {
} else {
// Die gracefully on errors.
err("The following error(s) occurred when your account was being made:<br /><span style=\"color:red;\">$errorlist</span><br />Please <a href=\"users.php?do=register\">go back</a> and try again.");
err("The following error(s) occurred when your account was being made:<br /><span style=\"color:red;\">$errorlist</span><br />Please <a href=\"users.php?do=guildcreate\">go back</a> and try again.");
}
@ -152,7 +170,7 @@ function guildedit() {
global $userrow;
$guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds"));
$guild = dorow(doquery("SELECT * FROM <<guilds>> WHERE id='".$userrow["guild"]."' LIMIT 1"));
// Errors.
if ($userrow["guildrank"] < 5) { err("You do not have permission to edit the Guild settings. Please <a href=\"index.php\">go back</a> and try again."); }
@ -190,8 +208,8 @@ function guildedit() {
$querystring .= "$a='$b',";
}
$querystring .= "id=id";
$query = doquery("UPDATE {{table}} SET $querystring WHERE id='".$guild["id"]."'", "guilds");
$updatemem = doquery("UPDATE {{table}} SET namecolor='$color2', tagcolor='$color1' WHERE guild='".$guild["id"]."'", "users");
$query = doquery("UPDATE <<guilds>> SET $querystring WHERE id='".$guild["id"]."'");
$updatemem = doquery("UPDATE <<users>> SET namecolor='$color2', tagcolor='$color1' WHERE guild='".$guild["id"]."'");
// And we're done.
display("Edit Guild", "Your guild was successfully edited.<br /><br />You may now return to <a href=\"index.php\">town</a> or to your <a href=\"index.php?do=guildhome\">Guild Hall</a>.");
@ -215,21 +233,22 @@ function guildapp() {
$id = $_GET["id"];
if (!is_numeric($id)) { err("Invalid input. Please <a href=\"index.php\">go back</a> and try again."); }
$guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='$id' LIMIT 1", "guilds"));
$guild = dorow(doquery("SELECT * FROM <<guilds>> WHERE id='$id' LIMIT 1"));
if ($guild == false) { err("Invalid input. Please <a href=\"index.php\">go back</a> and try again."); }
// Errors.
if ($userrow["gold"] < $guild["joincost"]) { err("You do not have enough gold to join this Guild. Joining this Guild requires ".number_format($guild["joincost"])." gold. Please <a href=\"index.php\">go back</a> and try again."); }
if ($userrow["guild"] != 0) { err("You are already a member of another Guild. You must renounce your current membership before joining this Guild. Please <a href=\"index.php\">go back</a> and try again."); }
$appquery = doquery("SELECT * FROM {{table}} WHERE charid='".$userrow["id"]."' LIMIT 1", "guildapps");
$appquery = doquery("SELECT * FROM <<guildapps>> WHERE charid='".$userrow["id"]."' LIMIT 1");
if (mysql_num_rows($appquery) != 0) { err("You have already applied to join another Guild. Please <a href=\"index.php\">go back</a> and try again."); }
if ($userrow["level"] < $controlrow["guildjoinlvl"]) { err("You cannot join a guild until you are at least Level ".$controlrow["guildjoinlvl"].". Please continue playing until your character is Level ".$controlrow["guildjoinlvl"].", then try again."); }
if (isset($_POST["yes"])) {
$query = doquery("INSERT INTO {{table}} SET id='',guild='$id',charid='".$userrow["id"]."',charname='".$userrow["charname"]."'", "guildapps");
$update = doquery("UPDATE {{table}} SET bank=bank+".$guild["joincost"]." WHERE id='".$guild["id"]."' LIMIT 1", "guilds");
$updatemem = doquery("UPDATE {{table}} SET gold=gold-".$guild["joincost"]." WHERE id='".$userrow["id"]."' LIMIT 1", "users");
$send = doquery("INSERT INTO {{table}} SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='".$guild["founder"]."', recipientname='Guild Leader', status='0', title='New Guild Application', message='Someone has applied to join your Guild.<br /><br /><b>Do not reply to this message!</b>', gold='0'", "messages");
$query = doquery("INSERT INTO <<guildapps>> SET id='',guild='$id',charid='".$userrow["id"]."',charname='".$userrow["charname"]."'");
$update = doquery("UPDATE <<guilds>> SET bank=bank+".$guild["joincost"]." WHERE id='".$guild["id"]."' LIMIT 1");
$updatemem = doquery("UPDATE <<users>> SET gold=gold-".$guild["joincost"]." WHERE id='".$userrow["id"]."' LIMIT 1");
$send = doquery("INSERT INTO <<messages>> SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='".$guild["founder"]."', recipientname='Guild Leader', status='0', title='New Guild Application', message='Someone has applied to join your Guild.<br /><br /><b>Do not reply to this message!</b>', gold='0'");
display("Join a Guild", "Thank you for applying to this Guild. If the Guild Leader approves your application, you will be notified via the Post Office.<br /><br />You may now return to <a href=\"index.php\">the game</a>.");
} elseif (isset($_POST["no"])) {
@ -250,15 +269,15 @@ function guildmembers() {
$id = $_GET["id"];
if (!is_numeric($id)) { err("Invalid input. Please <a href=\"index.php\">go back</a> and try again."); }
$guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='$id' LIMIT 1", "guilds"));
$guild = dorow(doquery("SELECT * FROM <<guilds>> WHERE id='$id' LIMIT 1"));
if ($guild == false) { err("Invalid input. Please <a href=\"index.php\">go back</a> and try again."); }
$query = doquery("SELECT * FROM {{table}} WHERE guild='$id' ORDER BY guildrank DESC", "users");
$guildmembers = dorow(doquery("SELECT * FROM <<users>> WHERE guild='$id' ORDER BY guildrank DESC"), "id");
$row["guildmembers"] = "<table style=\"width: 95%;\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background-color: #dddddd; padding: 3px;\"><b>Name</b></td><td style=\"background-color: #dddddd; padding: 3px; text-align: right;\"><b>Rank</b></td></tr>\n";
$bgcolor = "background-color: #ffffff;";
if (mysql_num_rows($query) > 0) {
while ($guildrow = mysql_fetch_array($query)) {
$row["guildmembers"] .= "<tr><td style=\"$bgcolor padding: 3px;\">[<span style=\"color: ".$guild["color1"].";\"><b>".$guild["tagline"]."</b></span>]<span style=\"color: ".$guild["color2"].";\"><b>".$guildrow["charname"]."</b></span></td><td style=\"$bgcolor padding: 3px; text-align: right;\">".$guild["rank".$guildrow["guildrank"]]."</td></tr>\n";
if ($guildmembers != false) {
foreach ($guildmembers as $a => $b) {
$row["guildmembers"] .= "<tr><td style=\"$bgcolor padding: 3px;\">[<span style=\"color: ".$guild["color1"].";\"><b>".$guild["tagline"]."</b></span>]<span style=\"color: ".$guild["color2"].";\"><b>".$b["charname"]."</b></span></td><td style=\"$bgcolor padding: 3px; text-align: right;\">".$guild["rank".$b["guildrank"]]."</td></tr>\n";
if ($bgcolor == "background-color: #ffffff;") { $bgcolor = "background-color: #dddddd;"; } else { $bgcolor = "background-color: #ffffff;"; }
}
} else {
@ -275,12 +294,12 @@ function guildbank() {
global $userrow;
extract($_POST);
$guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds"));
$guild = dorow(doquery("SELECT * FROM <<guilds>> WHERE id='".$userrow["guild"]."' LIMIT 1"));
if (isset($_POST["out"])) {
$member = dorow(doquery("SELECT * FROM {{table}} WHERE id='$charid' LIMIT 1", "users"));
$member = dorow(doquery("SELECT * FROM <<users>> WHERE id='$charid' LIMIT 1"));
// Errors.
if ($userrow["guildrank"] < 4) { err("You do not have permission to distribute Guild funds. Please <a href=\"index.php\">go back</a> and try again."); }
@ -293,8 +312,8 @@ function guildbank() {
if ($member["id"] == $userrow["id"]) { err("You cannot send Guild money to yourself. Please <a href=\"index.php\">go back</a> and try again."); }
// Do stuff.
$send = doquery("INSERT INTO {{table}} SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='$charid', recipientname='".$member["charname"]."', status='0', title='Money from your Guild', message='Your Guild has sent you money from the Guild Bank.<br /><br /><b>Do not reply to this message!</b>', gold='$gold'", "messages");
$update = doquery("UPDATE {{table}} SET bank=bank-$gold WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds");
$send = doquery("INSERT INTO <<messages>> SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='$charid', recipientname='".$member["charname"]."', status='0', title='Money from your Guild', message='Your Guild has sent you money from the Guild Bank.<br /><br /><b>Do not reply to this message!</b>', gold='$gold'");
$update = doquery("UPDATE <<guilds>> SET bank=bank-$gold WHERE id='".$userrow["guild"]."' LIMIT 1");
display("Post Office", gettemplate("mailbox_sent"));
} elseif (isset($_POST["in"])) {
@ -305,8 +324,8 @@ function guildbank() {
if ($_POST["golddeposit"] > $userrow["gold"]) { err("You do not have that much money in your pocket."); }
// Do stuff.
$update = doquery("UPDATE {{table}} SET bank=bank+".$_POST["golddeposit"]." WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds");
$updatemem = doquery("UPDATE {{table}} SET gold=gold-".$_POST["golddeposit"]." WHERE id='".$userrow["id"]."' LIMIT 1", "users");
$update = doquery("UPDATE <<guilds>> SET bank=bank+".$_POST["golddeposit"]." WHERE id='".$userrow["guild"]."' LIMIT 1");
$updatemem = doquery("UPDATE <<users>> SET gold=gold-".$_POST["golddeposit"]." WHERE id='".$userrow["id"]."' LIMIT 1");
display("Guild Bank", "Thank you for depositing money to the Guild Bank.<br /><br />You may now return to <a href=\"index.php\">Town</a> or to your <a href=\"index.php?do=guildhome\">Guild Hall</a>.");
}
@ -318,8 +337,8 @@ function guildpromote() {
global $userrow;
extract($_POST);
$guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds"));
$member = dorow(doquery("SELECT * FROM {{table}} WHERE id='$charid' LIMIT 1", "users"));
$guild = dorow(doquery("SELECT * FROM <<guilds>> WHERE id='".$userrow["guild"]."' LIMIT 1"));
$member = dorow(doquery("SELECT * FROM <<users>> WHERE id='$charid' LIMIT 1"));
if (isset($_POST["promote"])) {
@ -331,7 +350,7 @@ function guildpromote() {
if ($member["guild"] != $userrow["guild"]) { err("That player is not in your Guild. Please <a href=\"index.php\">go back</a> and try again."); }
// Do stuff.
$update = doquery("UPDATE {{table}} SET guildrank=guildrank+1 WHERE id='$charid' LIMIT 1", "users");
$update = doquery("UPDATE <<users>> SET guildrank=guildrank+1 WHERE id='$charid' LIMIT 1");
} elseif (isset($_POST["demote"])) {
@ -344,7 +363,7 @@ function guildpromote() {
if ($member["guildrank"] == 1) { guildremove(); }
// Do stuff.
$update = doquery("UPDATE {{table}} SET guildrank=guildrank-1 WHERE id='$charid' LIMIT 1", "users");
$update = doquery("UPDATE <<users>> SET guildrank=guildrank-1 WHERE id='$charid' LIMIT 1");
}
@ -357,9 +376,9 @@ function guildapprove() {
global $userrow;
extract($_POST);
$guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds"));
$member = dorow(doquery("SELECT * FROM {{table}} WHERE id='$charid' LIMIT 1", "users"));
$app = dorow(doquery("SELECT * FROM {{table}} WHERE guild='".$userrow["guild"]."' AND charid='$charid' LIMIT 1", "guildapps"));
$guild = dorow(doquery("SELECT * FROM <<guilds>> WHERE id='".$userrow["guild"]."' LIMIT 1"));
$member = dorow(doquery("SELECT * FROM <<users>> WHERE id='$charid' LIMIT 1"));
$app = dorow(doquery("SELECT * FROM <<guildapps>> WHERE guild='".$userrow["guild"]."' AND charid='$charid' LIMIT 1"));
// Errors.
if ($userrow["guildrank"] < 4) { err("You do not have permission to approve new members. Please <a href=\"index.php\">go back</a> and try again."); }
@ -367,14 +386,15 @@ function guildapprove() {
// Do stuff.
if (isset($_POST["approve"])) {
$updatemem = doquery("UPDATE {{table}} SET guild='".$userrow["guild"]."', guildrank='1', guildtag='".$guild["tagline"]."', tagcolor='".$guild["color1"]."', namecolor='".$guild["color2"]."' WHERE id='".$app["charid"]."' LIMIT 1", "users");
$updateguild = doquery("UPDATE {{table}} SET members=members+1 WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds");
$deleteapp = doquery("DELETE FROM {{table}} WHERE guild='".$userrow["guild"]."' AND charid='$charid' LIMIT 1", "guildapps");
$send = doquery("INSERT INTO {{table}} SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='$charid', recipientname='".$member["charname"]."', status='0', title='Guild Approval', message='The Guild has approved you for membership, and you are now a member of ".$guild["name"].". Congratulations!<br /><br /><b>Do not reply to this message!</b>', gold='0'", "messages");
$updatemem = doquery("UPDATE <<users>> SET guild='".$userrow["guild"]."', guildrank='1', guildtag='".$guild["tagline"]."', tagcolor='".$guild["color1"]."', namecolor='".$guild["color2"]."' WHERE id='".$app["charid"]."' LIMIT 1");
$updateguild = doquery("UPDATE <<guilds>> SET members=members+1 WHERE id='".$userrow["guild"]."' LIMIT 1");
$deleteapp = doquery("DELETE FROM <<guildapps>> WHERE guild='".$userrow["guild"]."' AND charid='$charid' LIMIT 1");
$send = doquery("INSERT INTO <<messages>> SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='$charid', recipientname='".$member["charname"]."', status='0', title='Guild Approval', message='The Guild has approved you for membership, and you are now a member of ".$guild["name"].". Congratulations!<br /><br /><b>Do not reply to this message!</b>', gold='0'");
guildupdate();
display("Approve Members", "Thank you for approving this user.<br /><br />You may now return to <a href=\"index.php\">Town</a> or to your <a href=\"index.php?do=guildhome\">Guild Hall</a>.");
} else {
$deleteapp = doquery("DELETE FROM {{table}} WHERE guild='".$userrow["guild"]."' AND charid='$charid' LIMIT 1", "guildapps");
$send = doquery("INSERT INTO {{table}} SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='$charid', recipientname='".$member["charname"]."', status='0', title='Guild Denial', message='The Guild has denied your application for membership. Sorry.<br /><br /><b>Do not reply to this message!</b>', gold='0'", "messages");
$deleteapp = doquery("DELETE FROM <<guilds>> WHERE guild='".$userrow["guild"]."' AND charid='$charid' LIMIT 1");
$send = doquery("INSERT INTO <<messages>> SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='$charid', recipientname='".$member["charname"]."', status='0', title='Guild Denial', message='The Guild has denied your application for membership. Sorry.<br /><br /><b>Do not reply to this message!</b>', gold='0'");
display("Approve Members", "Thank you for denying this user.<br /><br />You may now return to <a href=\"index.php\">Town</a> or to your <a href=\"index.php?do=guildhome\">Guild Hall</a>.");
}
@ -385,14 +405,15 @@ function guildremove() {
global $userrow;
extract($_POST);
$guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds"));
$member = dorow(doquery("SELECT * FROM {{table}} WHERE id='$charid' LIMIT 1", "users"));
$guild = dorow(doquery("SELECT * FROM <<guilds>> WHERE id='".$userrow["guild"]."' LIMIT 1"));
$member = dorow(doquery("SELECT * FROM <<users>> WHERE id='$charid' LIMIT 1"));
if (isset($_POST["yes"])) {
$update = doquery("UPDATE {{table}} SET members=members-1 WHERE id='".$guild["id"]."' LIMIT 1", "guilds");
$updatemem = doquery("UPDATE {{table}} SET guild='0', guildrank='0', guildtag='', tagcolor='', namecolor='' WHERE id='$charid' LIMIT 1", "users");
$send = doquery("INSERT INTO {{table}} SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='$charid', recipientname='".$member["charname"]."', status='0', title='Guild Removal', message='The Guild has removed you from their membership. Sorry.<br /><br /><b>Do not reply to this message!</b>', gold='0'", "messages");
$update = doquery("UPDATE <<guilds>> SET members=members-1 WHERE id='".$guild["id"]."' LIMIT 1");
$updatemem = doquery("UPDATE <<users>> SET guild='0', guildrank='0', guildtag='', tagcolor='', namecolor='' WHERE id='$charid' LIMIT 1");
$send = doquery("INSERT INTO <<messages>> SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='$charid', recipientname='".$member["charname"]."', status='0', title='Guild Removal', message='The Guild has removed you from their membership. Sorry.<br /><br /><b>Do not reply to this message!</b>', gold='0'");
guildupdate();
display("Remove Members", "Thank you for removing this user.<br /><br />You may now return to <a href=\"index.php\">Town</a> or to your <a href=\"index.php?do=guildhome\">Guild Hall</a>.");
} elseif (isset($_POST["no"])) {
@ -412,14 +433,14 @@ function guildnews() {
global $userrow;
$guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds"));
$guild = dorow(doquery("SELECT * FROM <<guilds>> WHERE id='".$userrow["guild"]."' LIMIT 1"));
// Errors.
if ($userrow["guildrank"] < 5) { err("You do not have permission to edit Guild news. Please <a href=\"index.php\">go back</a> and try again."); }
if (isset($_POST["submit"])) {
$query = doquery("UPDATE {{table}} SET news='".$_POST["news"]."' WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds");
$query = doquery("UPDATE <<guilds>> SET news='".$_POST["news"]."' WHERE id='".$userrow["guild"]."' LIMIT 1");
display("Guild News", "Thank you for updating your Guild News.<br /><br />You may now return to <a href=\"index.php\">Town</a> or to your <a href=\"index.php?do=guildhome\">Guild Hall</a>.");
}
@ -433,20 +454,20 @@ function guilddisband() {
global $userrow;
$guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds"));
$guild = dorow(doquery("SELECT * FROM <<guilds>> WHERE id='".$userrow["guild"]."' LIMIT 1"));
// Errors.
if ($userrow["id"] != $guild["founder"]) { err("You do not have permission to disband the Guild. Please <a href=\"index.php\">go back</a> and try again."); }
if (isset($_POST["yes"])) {
$query = doquery("SELECT * FROM {{table}} WHERE guild='".$guild["id"]."'", "users");
while ($row = mysql_fetch_array($query)) {
$send = doquery("INSERT INTO {{table}} SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='".$row["id"]."', recipientname='".$row["charname"]."', status='0', title='Guild Disbanded', message='Your Guild leader has chosen to disband the guild. Your member status has been reset, and you can now apply to join another guild if you wish.<br /><br /><b>Do not reply to this message!</b>', gold='0'", "messages");
$guildmembers = dorow(doquery("SELECT * FROM <<users>> WHERE guild='".$guild["id"]."'"), "id");
foreach ($guildmembers as $a => $b) {
$send = doquery("INSERT INTO <<messages>> SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='".$b["id"]."', recipientname='".$b["charname"]."', status='0', title='Guild Disbanded', message='Your Guild leader has chosen to disband the guild. Your member status has been reset, and you can now apply to join another guild if you wish.<br /><br /><b>Do not reply to this message!</b>', gold='0'");
}
$updatemem = doquery("UPDATE {{table}} SET guild='0', guildrank='0', guildtag='', tagcolor='', namecolor='' WHERE guild='".$guild["id"]."'", "users");
$delete = doquery("DELETE FROM {{table}} WHERE id='".$guild["id"]."'", "guilds");
$deletebb = doquery("DELETE FROM {{table}} WHERE guild='".$guild["id"]."'", "babblebox");
$updatemem = doquery("UPDATE <<users>> SET guild='0', guildrank='0', guildtag='', tagcolor='', namecolor='' WHERE guild='".$guild["id"]."'");
$delete = doquery("DELETE FROM <<guilds>> WHERE id='".$guild["id"]."'");
$deletebb = doquery("DELETE FROM <<babblebox>> WHERE guild='".$guild["id"]."'");
display("Disband Guild", "Thank you for disbanding your Guild.<br /><br />You may now return to <a href=\"index.php\">Town</a>.");
} elseif (isset($_POST["no"])) {
@ -467,8 +488,9 @@ function guildleave() {
if (isset($_POST["yes"])) {
$updatemem = doquery("UPDATE {{table}} SET guild='0', guildrank='0', guildtag='', tagcolor='', namecolor='' WHERE id='".$userrow["id"]."'", "users");
$update = doquery("UPDATE {{table}} SET members=members-1 WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds");
$updatemem = doquery("UPDATE <<users>> SET guild='0', guildrank='0', guildtag='', tagcolor='', namecolor='' WHERE id='".$userrow["id"]."'");
$update = doquery("UPDATE <<guilds>> SET members=members-1 WHERE id='".$userrow["guild"]."' LIMIT 1");
guildupdate();
display("Leave Guild", "Thank you for leaving your Guild.<br /><br />You may now return to <a href=\"index.php\">Town</a>.");
} elseif (isset($_POST["no"])) {
@ -481,4 +503,30 @@ function guildleave() {
}
function guildupdate() {
global $userrow;
$guild = dorow(doquery("SELECT * FROM <<guilds>> WHERE id='".$userrow["guild"]."' LIMIT 1"));
$users = dorow(doquery("SELECT * FROM <<users>> WHERE guild='".$userrow["guild"]."'"), "id");
$honor = $guild["members"];
$totalexp = 0;
foreach ($users as $a => $b) {
$totalexp += $b["experience"];
$honor += ($b["pvpwins"] * 2);
$honor -= $b["pvplosses"];
}
$honor += floor(sqrt($totalexp));
$lastupdate = mktime();
$update = doquery("UPDATE <<guilds>> SET honor='$honor',lastupdate='$lastupdate' WHERE id='".$userrow["guild"]."' LIMIT 1");
// Now update the array and send back to main guild function.
$guild["honor"] = $honor;
$guild["lastupdate"] = $lastupdate;
return ($guild);
}
?>

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 14 KiB

BIN
images/items/5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

BIN
images/r7_copyright.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
images/r7_logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

BIN
images/sigbotback.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

BIN
images/sigtag.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1019 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

View File

@ -1,5 +1,21 @@
<?php // index.php :: Case switching to decide what function we need to be running.
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
error_reporting(E_STRICT);
include("lib.php");
include("globals.php");
@ -10,6 +26,8 @@ if(isset($_GET["do"])) {
// Exploring.
case "explore": include("explore.php"); move(); break;
case "travel": include("explore.php"); travel($do[1]); break;
case "quickheal": include("explore.php"); quickheal(); break;
case "itemdrop": include("explore.php"); itemdrop(); break;
case "humanity": include("explore.php"); botkillah(); break;
// Towns.
case "inn": include("town.php"); inn(); break;
@ -43,6 +61,7 @@ if(isset($_GET["do"])) {
case "guilddisband": include("guilds.php"); guilddisband(); break;
case "guildedit": include("guilds.php"); guildedit(); break;
case "guildleave": include("guilds.php"); guildleave(); break;
case "guildupdate": include("guilds.php"); guildupdate(); break;
// Misc.
case "babblebox": include("misc.php"); babblebox2(); break;
case "showmap": include("misc.php"); showmap(); break;
@ -58,6 +77,9 @@ if(isset($_GET["do"])) {
function donothing() {
global $userrow;
if ($userrow["story"] != "0" && $userrow["storylat"] == $userrow["latitude"] && $userrow["storylon"] == $userrow["longitude"]) {
die(header("Location: story.php"));
}
if ($userrow["currentpvp"] != 0) {
die(header("Location: pvp.php"));
}

499
install.php Normal file
View File

@ -0,0 +1,499 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
opendb();
// Handling for servers with magic_quotes turned on.
if (get_magic_quotes_gpc()) {
$_POST = array_map('uber_ss', $_POST);
$_GET = array_map('uber_ss', $_GET);
$_COOKIE = array_map('uber_ss', $_COOKIE);
}
$_POST = array_map('uber_mres', $_POST);
$_POST = array_map('uber_hsc', $_POST);
$_GET = array_map('uber_mres', $_GET);
$_GET = array_map('uber_hsc', $_GET);
$_COOKIE = array_map('uber_mres', $_COOKIE);
$_COOKIE = array_map('uber_hsc', $_COOKIE);
$page = "one";
if (isset($_GET["page"])) { $page = $_GET["page"]; }
switch ($page) {
case "one": one(); break;
case "two": two(); break;
case "three": three(); break;
case "four": four(); break;
case "five": five(); break;
default: one(); break;
}
function uber_ss($value) {
$value = is_array($value) ?
array_map('uber_ss', $value) :
stripslashes($value);
return $value;
}
function uber_mres($value) {
$value = is_array($value) ?
array_map('uber_mres', $value) :
mysql_real_escape_string($value);
return $value;
}
function uber_hsc($value) {
$value = is_array($value) ?
array_map('uber_hsc', $value) :
htmlspecialchars($value);
return $value;
}
function opendb() { // Open database connection.
include("config.php");
extract($dbsettings);
if (!mysql_connect($server, $user, $pass)) {
define("MYSQLRESULT",false);
} else {
define("MYSQLRESULT",true);
}
if (MYSQLRESULT) {
if (!mysql_select_db($name)) {
define("DBRESULT", false);
} else {
define("DBRESULT", true);
}
}
return $link;
}
function doquery($query) { // Something of a tiny little database abstraction layer.
include('config.php');
$sqlquery = mysql_query(preg_replace("/<<([a-zA-Z0-9_\-]+)>>/", $dbsettings["prefix"]."_$1", $query));
if ($sqlquery == false) {
die(mysql_error() . "<br /><br />" . $query);
}
return $sqlquery;
}
function dorow($sqlquery, $force = "") { // Abstraction layer part deux.
switch (mysql_num_rows($sqlquery)) {
case 0:
$row = false;
break;
case 1:
if ($force == "") {
$row = mysql_fetch_assoc($sqlquery);
} else {
$temprow = mysql_fetch_assoc($sqlquery);
$row[$temprow[$force]] = $temprow;
}
break;
default:
if ($force == "") {
while ($temprow = mysql_fetch_assoc($sqlquery)) {
$row[] = $temprow;
}
} else {
while ($temprow = mysql_fetch_assoc($sqlquery)) {
$row[$temprow[$force]] = $temprow;
}
}
break;
}
return $row;
}
// Thanks to Predrag Supurovic from php.net for this function!
function dobatch($p_query) {
$query_split = preg_split ("/[;]+/", $p_query);
foreach ($query_split as $command_line) {
$command_line = trim($command_line);
if ($command_line != '') {
$query_result = doquery($command_line);
if ($query_result == 0) {
break;
}
}
}
return $query_result;
}
/***** DONE WITH ALL THE SETUP STUFF, SO ACTUALLY START INSTALLING. *****/
function one() {
// Test file permissions.
$botcheck = false;
$f = fopen("images/botcheck/test.txt", "a");
if ($f) {
if (fwrite($f,"test")) {
$botcheck = true;
fclose($f);
unlink("images/botcheck/test.txt");
}
}
$users = false;
$f = fopen("images/users/test.txt", "a");
if ($f) {
if (fwrite($f,"test")) {
$users = true;
fclose($f);
unlink("images/users/test.txt");
}
}
// Display status.
if ($botcheck) { $botcheck = "<span style=\"color: Green;\">Pass</span>"; } else { $botcheck = "<span style=\"color: red;\">Fail</span>"; }
if ($users) { $users = "<span style=\"color: Green;\">Pass</span>"; } else { $users = "<span style=\"color: red;\">Fail</span>"; }
if (MYSQLRESULT) { $mysqlresult = "<span style=\"color: Green;\">Pass</span>"; } else { $mysqlresult = "<span style=\"color: red;\">Fail</span>"; }
if (DBRESULT) { $dbresult = "<span style=\"color: Green;\">Pass</span>"; } else { $dbresult = "<span style=\"color: red;\">Fail</span>"; }
// Done. Show page.
$page = <<<THEVERYENDOFYOU
<html>
<head>
<title>Dragon Scourge :: Installation (Step 1)</title>
<style type="text/css">
body, table, td, div { font: 11px Verdana; }
body { background-image: url(images/background.jpg); }
h3 { margin-top: 0px; }
td { vertical-align: top; }
.main { background-color: white; border: solid 1px black; text-align: left; padding: 10px; }
</style>
</head>
<body><center>
<div class="main" style="width: 700px;">
<h3>Dragon Scourge :: Installation (Step 1)</h3>
<ol>
<li><b>Verify Settings</b></li>
<li>Install Database</li>
<li>Primary Game Settings</li>
<li>Create Admin User</li>
</ol>
<table border="1">
<tr><th colspan="2">Verify Settings</th></tr>
<tr><td>MySQL Connection</td><td>$mysqlresult</td></tr>
<tr><td>MySQL Database</td><td>$dbresult</td></tr>
<tr><td>File Permissions: /images/users/</td><td>$users</td></tr>
<tr><td>File Permissions: /images/botcheck/</td><td>$botcheck</td></tr>
</table><br /><br />
If any of the above settings display <span style="color: red;">Fail</span>, please go back and make sure everything is correct.<br /><br />
For failures on either MySQL Connection or MySQL Database, please ensure that you have inserted the correct values for your server configuration into config.php, and make sure that the database to which you will be installing Dragon Scourge already exists on your server.<br /><br />
For failures on either of the two File Permissions settings, make sure that the appropriate folders have been CHMODed to 0777 (on Unix/Linux servers), or are not set to read-only (on Windows servers). If you need help with this, <a href="http://www.stadtaus.com/en/tutorials/chmod-ftp-file-permissions.php" target="_new">click here</a> for tutorials on how to do this in several major FTP clients.<br /><br />
Once you have checked all the appropriate settings, reload this page and make sure that all four tests indicate <span style="color: green;">Pass</span> before continuing.<br /><br />
Once all tests pass, click the link below to continue to step two.<br /><br />
<a href="install.php?page=two">Continue to Step Two: Install Database</a><br />
Installing the database may take several seconds. Please click the link only once.
</div>
</center></body>
</html>
THEVERYENDOFYOU;
die($page);
}
function two() {
$installsql = file_get_contents("install.sql");
$status = dobatch($installsql);
$page = <<<THEVERYENDOFYOU
<html>
<head>
<title>Dragon Scourge :: Installation (Step 2)</title>
<style type="text/css">
body, table, td, div { font: 11px Verdana; }
body { background-image: url(images/background.jpg); }
h3 { margin-top: 0px; }
td { vertical-align: top; }
.main { background-color: white; border: solid 1px black; text-align: left; padding: 10px; }
</style>
</head>
<body><center>
<div class="main" style="width: 700px;">
<h3>Dragon Scourge :: Installation (Step 2)</h3>
<ol>
<li>Verify Settings</li>
<li><b>Install Database</b></li>
<li>Primary Game Settings</li>
<li>Create Admin User</li>
</ol>
The database installation is now complete. Click the link below to set up your initial game settings.<br /><br />
<a href="install.php?page=three">Continue to Step Three: Primary Game Settings</a>
</div>
</center></body>
</html>
THEVERYENDOFYOU;
die($page);
}
function three() {
// Path stuff. Easy.
$gamepath = str_replace("install.php","",__FILE__);
$gamepath = str_replace("\\","/",$gamepath);
$avatarpath = $gamepath . "images/users/";
$gameurl = "http://" . $_SERVER["SERVER_NAME"] . $_SERVER["PHP_SELF"];
$gameurl = str_replace("install.php","",$gameurl);
$avatarurl = $gameurl . "images/users/";
$page = <<<THEVERYENDOFYOU
<html>
<head>
<title>Dragon Scourge :: Installation (Step 3)</title>
<style type="text/css">
body, table, td, div { font: 11px Verdana; }
body { background-image: url(images/background.jpg); }
h3 { margin-top: 0px; }
td { vertical-align: top; }
.grey { color: #888888; }
.main { background-color: white; border: solid 1px black; text-align: left; padding: 10px; }
</style>
</head>
<body><center>
<div class="main" style="width: 700px;">
<h3>Dragon Scourge :: Installation (Step 3)</h3>
<ol>
<li>Verify Settings</li>
<li>Install Database</li>
<li><b>Primary Game Settings</b></li>
<li>Create Admin User</li>
</ol>
<form action="install.php?page=four" method="post">
<table cellspacing="0" cellpadding="5" width="98%">
<tr><td width="25%">Game Name</td><td><input type="text" name="gamename" size="20" maxlength="50" value="Dragon Scourge" /><br /><span class="grey">The name of your game. Used in page titles and when sending email to new users.</span><br /><br /></td></tr>
<tr><td width="25%">Game Path</td><td><input type="text" name="gamepath" size="40" maxlength="200" value="$gamepath" /><br /><span class="grey">The full server path to your game. If you don't know this, please ask your host for assistance.</span><br /><br /></td></tr>
<tr><td width="25%">Game URL</td><td><input type="text" name="gameurl" size="40" maxlength="200" value="$gameurl" /><br /><span class="grey">The full URL to your game.</span><br /><br /></td></tr>
<tr><td width="25%">Forum URL</td><td><input type="text" name="forumurl" size="40" maxlength="200" value="" /><br /><span class="grey">If you have a support forum for your game, enter its URL here - otherwise leave blank to disable this link.</span><br /><br /></td></tr>
<tr><td width="25%">Avatar Path</td><td><input type="text" name="avatarpath" size="40" maxlength="200" value="$avatarpath" /><br /><span class="grey">The full server path to your avatar uploads folder.</span><br /><br /></td></tr>
<tr><td width="25%">Avatar URL</td><td><input type="text" name="avatarurl" size="40" maxlength="200" value="$avatarurl" /><br /><span class="grey">The full URL to your avatar uploads folder.</span><br /><br /></td></tr>
<tr><td width="25%">Avatar Max Filesize</td><td><input type="text" name="avatarmaxsize" size="10" maxlength="10" value="15000" /><br /><span class="grey">Enter the maximum file size (in bytes) for uploaded avatars.<br />Range: 0 to 4294967295.</span><br /><br /></td></tr>
<tr><td width="25%">Show Babblebox?</td><td><input type="checkbox" name="showshout" value="1" /> Yes<br /><span class="grey">Enables the Babblebox iframe in the right panel.</span><br /><br /></td></tr>
<tr><td width="25%">Show Who's Online?</td><td><input type="checkbox" name="showonline" value="1" /> Yes<br /><span class="grey">Enables the Who's Online listing in the right panel.</span><br /><br /></td></tr>
<tr><td width="25%">Show SigBot URL?</td><td><input type="checkbox" name="showsigbot" value="1" /> Yes<br /><span class="grey">The SigBot allows users to display their character stats in forum signature images. This setting only controls whether SigBot URLs are displayed on the Characters page. To disable SigBot completely, remove the file <b>.htaccess</b> from your game installation folder.</span><br /><br /></td></tr>
<tr><td width="25%">Admin's Email</td><td><input type="text" name="adminemail" size="20" maxlength="200" value="" /><br /><span class="grey">This is the game owner's email address, used when sending email to new users.</span><br /><br /></td></tr>
<tr><td width="25%">Enable Email Functions?</td><td><input type="checkbox" name="verifyemail" value="1" /> Yes<br /><span class="grey">Sends a verification letter to anyone who registers an account, to enforce valid email addresses. Also allows users to request new passwords if they lose/forget theirs.<br /><b>NOTE:</b> Some Windows servers may have issues if their php.ini settings are improperly configured. If you're on a Windows host and get a lot of email sending errors, disable this setting or contact your host for more information.</b></span><br /><br /></td></tr>
<tr><td width="25%">Enable ZLib Compression?</td><td><input type="checkbox" name="compression" value="1" /> Yes<br /><span class="grey">Enables ZLib output compression, which reduces bandwidth and speeds up page access time for end-users.</span><br /><br /></td></tr>
<tr><td width="25%">Enable Debug Info?</td><td><input type="checkbox" name="debug" value="1" /> Yes<br /><span class="grey">Displays extra information (query count & page generation time) in the footer, and displays full MySQL query errors if they occur.</span><br /><br /></td></tr>
<tr><td width="25%">Bot Check</td><td><input type="text" name="botcheck" size="10" maxlength="10" value="255" /><br /><span class="grey">Bot Check ensures that players are human by displaying a CAPTCHA challenge form every so often (random 1 in <i>n</i> chance) during exploring. Higher numbers show the Bot Check less often, but may not be as secure. Lower numbers will show the bot check more often, but may annoy some users. Enter 0 to disable the bot check completely.<br />Range: 0 to 4294967295.<br />Recommended: 255.</span><br /><br /></td></tr>
<tr><td width="25%">PVP Refresh Time</td><td><input type="text" name="pvprefresh" size="10" maxlength="10" value="15" /><br /><span class="grey">The amount of time (in seconds) the mini PVP frame should wait before refreshing itself to check for new data. Low numbers may cause strain on your server if you have a lot of concurrent users.<br />Range: 0 to 4294967295.</span><br /><br /></td></tr>
<tr><td width="25%">PVP Timeout Limit</td><td><input type="text" name="pvptimeout" size="10" maxlength="10" value="45" /><br /><span class="grey">The amount of time (in seconds) it takes for someone to remain inactive and cause the PVP battle to close.<br />Range: 0 to 4294967295.</span><br /><br /></td></tr>
<tr><td width="25%">Guild Startup Cost</td><td><input type="text" name="guildstartup" size="10" maxlength="10" value="100000" /><br /><span class="grey">The amount of gold it takes for a player to start their own Guild.<br />Range: 0 to 4294967295.</span><br /><br /></td></tr>
<tr><td width="25%">Guild Start Level</td><td><input type="text" name="guildstartlvl" size="10" maxlength="10" value="35" /><br /><span class="grey">The minimum level a player must reach before being allowed to start a Guild.<br />Range: 0 to 4294967295.</span><br /><br /></td></tr>
<tr><td width="25%">Guild Join Level</td><td><input type="text" name="guildjoinlvl" size="10" maxlength="10" value="10" /><br /><span class="grey">The minimum level a player must reach before being allowed to join a Guild.<br />Range: 0 to 4294967295.</span><br /><br /></td></tr>
<tr><td width="25%">Guild Update Time</td><td><input type="text" name="guildupdate" size="10" maxlength="10" value="24" /><br /><span class="grey">The amount of time (in hours) before automatically recalculating Guild Honor Points.<br />Range: 0 to 4294967295.</span><br /><br /></td></tr>
<tr><td colspan="2" style="border-top: solid 2px black;"><center>
<input type="submit" name="submit" value="Continue to Step Four: Create Admin User" /><br />
</center></td></tr>
</table>
</form>
</div>
</center></body>
</html>
THEVERYENDOFYOU;
die($page);
}
function four() {
// Check for errors.
$requires = array("gamename","gamepath","gameurl","avatarpath","avatarurl","avatarmaxsize","adminemail","botcheck","pvprefresh","pvptimeout","guildstartup","guildstartlvl","guildjoinlvl","guildupdate");
$numerics = array("avatarmaxsize","botcheck","pvprefresh","pvptimeout","guildstartup","guildstartlvl","guildjoinlvl","guildupdate");
$toggles = array("showshout","showonline","showsigbot","verifyemail","compression","debug");
$errors = "";
foreach($requires as $a => $b) {
if (!isset($_POST[$b]) || trim($_POST[$b])=="") { $errors .= "$b field is required.<br />"; }
}
foreach($numerics as $a => $b) {
if (!is_numeric($_POST[$b])) { $errors .= "$b field must contain numbers only.<br />"; }
}
if ($errors != "") { die("The following errors occurred. Please go back and correct these errors before continuing.<br /><br />$errors"); }
// Check toggles.
foreach($toggles as $a => $b) {
if (!isset($_POST[$b])) { $_POST[$b] = "0"; }
}
// No errors, so set up the table.
extract($_POST);
doquery("INSERT INTO <<control>> SET
id='1',
gamename='$gamename',
gameopen='1',
gamepath='$gamepath',
gameurl='$gameurl',
forumurl='$forumurl',
avatarpath='$avatarpath',
avatarurl='$avatarurl',
avatarmaxsize='$avatarmaxsize',
cookiename='scourge',
cookiedomain='',
showshout='$showshout',
showonline='$showonline',
showitemimages='1',
showmonsterimages='0',
showsigbot='$showsigbot',
adminemail='$adminemail',
verifyemail='$verifyemail',
compression='$compression',
debug='$debug',
botcheck='$botcheck',
moddedby='',
pvprefresh='$pvprefresh',
pvptimeout='$pvptimeout',
guildstartup='$guildstartup',
guildstartlvl='$guildstartlvl',
guildjoinlvl='$guildjoinlvl',
guildupdate='$guildupdate'
");
// Done with the controlrow creator. Now show admin user creation form.'
$page = <<<THEVERYENDOFYOU
<html>
<head>
<title>Dragon Scourge :: Installation (Step 4)</title>
<style type="text/css">
body, table, td, div { font: 11px Verdana; }
body { background-image: url(images/background.jpg); }
h3 { margin-top: 0px; }
td { vertical-align: top; }
.grey { color: #888888; }
.main { background-color: white; border: solid 1px black; text-align: left; padding: 10px; }
</style>
</head>
<body><center>
<div class="main" style="width: 700px;">
<h3>Dragon Scourge :: Installation (Step 4)</h3>
<ol>
<li>Verify Settings</li>
<li>Install Database</li>
<li>Primary Game Settings</li>
<li><b>Create Admin User</b></li>
</ol>
<form action="install.php?page=five" method="post">
<table cellspacing="0" cellpadding="5" width="98%">
<tr><td width="25%">Username</td><td><input type="text" name="username" size="20" maxlength="30" value="" /><br /><br /></td></tr>
<tr><td width="25%">Password</td><td><input type="text" name="password" size="20" maxlength="30" value="" /><br /><br /></td></tr>
<tr><td width="25%">Email Address</td><td><input type="text" name="emailaddress" size="40" maxlength="200" value="$adminemail" /><br /><br /></td></tr>
<tr><td colspan="2" style="border-top: solid 2px black;"><center>
<input type="submit" name="submit" value="Create Admin User and Complete Installation" />
</center></td></tr>
</table>
</form>
</div>
</center></body>
</html>
THEVERYENDOFYOU;
die($page);
}
function five() {
// Check for errors.
$requires = array("username","password","emailaddress");
$errors = "";
foreach($requires as $a => $b) {
if (!isset($_POST[$b]) || trim($_POST[$b])=="") { $errors .= "$b field is required.<br />"; }
}
if ($errors != "") { die("The following errors occurred. Please go back and correct these errors before continuing.<br /><br />$errors"); }
// No errors, so set up the table.
extract($_POST);
$password = md5($password);
doquery("INSERT INTO <<accounts>> SET
id='1',
username='$username',
password='$password',
emailaddress='$emailaddress',
verifycode='1',
regdate=NOW(),
regip='".$_SERVER["REMOTE_ADDR"]."',
authlevel='255',
language='English',
characters='0',
activechar='0',
imageformat='.png',
minimap='1'
");
// Done with the controlrow creator. Now show admin user creation form.'
$page = <<<THEVERYENDOFYOU
<html>
<head>
<title>Dragon Scourge :: Installation Complete</title>
<style type="text/css">
body, table, td, div { font: 11px Verdana; }
body { background-image: url(images/background.jpg); }
h3 { margin-top: 0px; }
td { vertical-align: top; }
.grey { color: #888888; }
.main { background-color: white; border: solid 1px black; text-align: left; padding: 10px; }
</style>
</head>
<body><center>
<div class="main" style="width: 700px;">
<h3>Dragon Scourge :: Installation Complete</h3>
Dragon Scourge Installation has now completed. Congratulations.<br /><br />
For security reasons, <b>please delete install.php and install.sql from your game directory at this time!</b><br /><br />
<a href="login.php?do=login">Click here</a> to log into your game for the first time. Once you log in, you will be asked to create your first Character.
</div>
</center></body>
</html>
THEVERYENDOFYOU;
die($page);
}
?>

971
install.sql Normal file
View File

@ -0,0 +1,971 @@
DROP TABLE IF EXISTS `<<accounts>>`;
CREATE TABLE `<<accounts>>` (
`id` int(10) unsigned NOT NULL auto_increment,
`username` varchar(30) NOT NULL default '',
`password` varchar(32) NOT NULL default '',
`emailaddress` varchar(200) NOT NULL default '',
`verifycode` varchar(32) NOT NULL default '',
`regdate` datetime NOT NULL default '0000-00-00 00:00:00',
`regip` varchar(16) NOT NULL default '',
`authlevel` tinyint(3) unsigned NOT NULL default '1',
`language` varchar(30) NOT NULL default '',
`characters` tinyint(3) unsigned NOT NULL default '0',
`activechar` int(10) unsigned NOT NULL default '0',
`imageformat` varchar(4) NOT NULL default '0',
`minimap` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM ;
DROP TABLE IF EXISTS `<<babblebox>>`;
CREATE TABLE `<<babblebox>>` (
`id` int(11) unsigned NOT NULL auto_increment,
`posttime` datetime NOT NULL default '0000-00-00 00:00:00',
`charname` varchar(30) NOT NULL default '',
`charid` int(11) unsigned NOT NULL default '0',
`content` varchar(255) NOT NULL default '',
`guild` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM ;
DROP TABLE IF EXISTS `<<classes>>`;
CREATE TABLE `<<classes>>` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(50) NOT NULL default '',
`expbonus` tinyint(3) unsigned NOT NULL default '0',
`goldbonus` tinyint(3) unsigned NOT NULL default '0',
`damageperstrength` float unsigned NOT NULL default '0',
`defenseperdex` float NOT NULL default '0',
`hpperlife` float unsigned NOT NULL default '0',
`mpperenergy` float unsigned NOT NULL default '0',
`description` text NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM ;
INSERT INTO `<<classes>>` (`id`, `name`, `expbonus`, `goldbonus`, `damageperstrength`, `defenseperdex`, `hpperlife`, `mpperenergy`, `description`) VALUES
(1, 'Barbarian', 0, 0, 3, 1, 2, 1, 'Barbarians specialize in physical damage. 3 damage per strength point, 1 defense per dexterity point, 2 hp per life point, 1 mp per energy point.'),
(2, 'Sorceress', 0, 0, 1, 1, 2, 3, 'Sorceresses specialize in magical damage. 1 damage per strength point, 1 defense per dexterity point, 2 hp per life point, 3 mp per energy point.'),
(3, 'Paladin', 0, 0, 1, 2, 3, 1, 'Paladins specialize in staying alive. 1 damage per strength point, 2 defense per dexterity point, 3 hp per life point, 1 mp per energy point.');
DROP TABLE IF EXISTS `<<control>>`;
CREATE TABLE `<<control>>` (
`id` tinyint(3) unsigned NOT NULL auto_increment,
`gamename` varchar(50) NOT NULL default '',
`gameopen` tinyint(3) unsigned NOT NULL default '0',
`gamepath` varchar(200) NOT NULL default '',
`gameurl` varchar(200) NOT NULL default '',
`forumurl` varchar(200) NOT NULL default '',
`avatarpath` varchar(200) NOT NULL default '',
`avatarurl` varchar(200) NOT NULL default '',
`avatarmaxsize` int(10) unsigned NOT NULL default '0',
`cookiename` varchar(255) NOT NULL default 'scourge',
`cookiedomain` varchar(255) NOT NULL default '',
`showshout` tinyint(3) unsigned NOT NULL default '0',
`showonline` tinyint(3) unsigned NOT NULL default '0',
`showitemimages` tinyint(3) unsigned NOT NULL default '0',
`showmonsterimages` tinyint(3) unsigned NOT NULL default '0',
`showsigbot` tinyint(3) unsigned NOT NULL default '0',
`adminemail` varchar(200) NOT NULL default '',
`verifyemail` tinyint(3) unsigned NOT NULL default '0',
`compression` tinyint(3) unsigned NOT NULL default '0',
`debug` tinyint(3) unsigned NOT NULL default '0',
`botcheck` int(10) unsigned NOT NULL default '0',
`moddedby` text NOT NULL,
`pvprefresh` int(10) unsigned NOT NULL default '0',
`pvptimeout` int(10) unsigned NOT NULL default '0',
`guildstartup` int(10) unsigned NOT NULL default '100000',
`guildstartlvl` int(10) unsigned NOT NULL default '0',
`guildjoinlvl` int(10) unsigned NOT NULL default '0',
`guildupdate` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM ;
DROP TABLE IF EXISTS `<<difficulties>>`;
CREATE TABLE `<<difficulties>>` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(50) NOT NULL default '',
`expbonus` tinyint(3) unsigned NOT NULL default '0',
`goldbonus` tinyint(3) unsigned NOT NULL default '0',
`multiplier` float NOT NULL default '0',
`deathpenalty` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM ;
INSERT INTO `<<difficulties>>` (`id`, `name`, `expbonus`, `goldbonus`, `multiplier`, `deathpenalty`) VALUES
(1, 'Easy', 0, 0, 1, 0),
(2, 'Medium', 3, 3, 1.5, 3),
(3, 'Hard', 5, 5, 2, 7);
DROP TABLE IF EXISTS `<<guildapps>>`;
CREATE TABLE `<<guildapps>>` (
`id` int(10) unsigned NOT NULL auto_increment,
`guild` int(10) unsigned NOT NULL default '0',
`charid` int(10) unsigned NOT NULL default '0',
`charname` varchar(30) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM ;
DROP TABLE IF EXISTS `<<guilds>>`;
CREATE TABLE `<<guilds>>` (
`id` int(10) unsigned NOT NULL auto_increment,
`lastupdate` bigint(20) unsigned NOT NULL default '0',
`name` varchar(50) NOT NULL default '',
`tagline` varchar(4) NOT NULL default '',
`color1` varchar(7) NOT NULL default '',
`color2` varchar(7) NOT NULL default '',
`members` int(10) unsigned NOT NULL default '0',
`honor` int(10) unsigned NOT NULL default '0',
`founder` int(10) unsigned NOT NULL default '0',
`bank` int(10) unsigned NOT NULL default '0',
`joincost` int(10) unsigned NOT NULL default '0',
`image` varchar(30) NOT NULL default '',
`rank1` varchar(30) NOT NULL default '',
`rank2` varchar(30) NOT NULL default '',
`rank3` varchar(30) NOT NULL default '',
`rank4` varchar(30) NOT NULL default '',
`rank5` varchar(30) NOT NULL default '',
`isactive` tinyint(3) unsigned NOT NULL default '0',
`statement` text NOT NULL,
`news` text NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM ;
DROP TABLE IF EXISTS `<<itembase>>`;
CREATE TABLE `<<itembase>>` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(50) NOT NULL default '',
`slotnumber` tinyint(3) unsigned NOT NULL default '0',
`isunique` tinyint(3) unsigned NOT NULL default '0',
`willdrop` tinyint(3) unsigned NOT NULL default '0',
`buycost` int(10) unsigned NOT NULL default '0',
`sellcost` int(10) unsigned NOT NULL default '0',
`reqlevel` smallint(5) unsigned NOT NULL default '0',
`reqstrength` smallint(5) unsigned NOT NULL default '0',
`reqdexterity` smallint(5) unsigned NOT NULL default '0',
`reqenergy` smallint(5) unsigned NOT NULL default '0',
`basename` varchar(50) NOT NULL default '',
`baseattr` smallint(5) unsigned NOT NULL default '0',
`mod1name` varchar(50) NOT NULL default '',
`mod1attr` smallint(5) unsigned NOT NULL default '0',
`mod2name` varchar(50) NOT NULL default '',
`mod2attr` smallint(5) unsigned NOT NULL default '0',
`mod3name` varchar(50) NOT NULL default '',
`mod3attr` smallint(5) unsigned NOT NULL default '0',
`mod4name` varchar(50) NOT NULL default '',
`mod4attr` smallint(5) unsigned NOT NULL default '0',
`mod5name` varchar(50) NOT NULL default '',
`mod5attr` smallint(5) unsigned NOT NULL default '0',
`mod6name` varchar(50) NOT NULL default '',
`mod6attr` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM ;
INSERT INTO `<<itembase>>` (`id`, `name`, `slotnumber`, `isunique`, `willdrop`, `buycost`, `sellcost`, `reqlevel`, `reqstrength`, `reqdexterity`, `reqenergy`, `basename`, `baseattr`, `mod1name`, `mod1attr`, `mod2name`, `mod2attr`, `mod3name`, `mod3attr`, `mod4name`, `mod4attr`, `mod5name`, `mod5attr`, `mod6name`, `mod6attr`) VALUES
(1, 'Pointy Stick', 1, 0, 1, 10, 5, 1, 0, 0, 0, 'physattack', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(2, 'Big Stick', 1, 0, 1, 15, 8, 1, 0, 0, 0, 'physattack', 4, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(3, 'Dagger', 1, 0, 1, 20, 10, 1, 0, 0, 0, 'physattack', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(4, 'Hand Axe', 1, 0, 1, 30, 15, 1, 0, 0, 0, 'physattack', 7, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(5, 'Leg Bone', 1, 0, 1, 40, 20, 1, 0, 0, 0, 'physattack', 8, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(6, 'Dirk', 1, 0, 1, 60, 30, 3, 10, 0, 0, 'physattack', 10, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(7, 'Small Axe', 1, 0, 1, 80, 40, 3, 10, 0, 0, 'physattack', 11, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(8, 'Club', 1, 0, 1, 110, 55, 3, 15, 0, 0, 'physattack', 12, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(9, 'Kris', 1, 0, 1, 140, 70, 3, 15, 0, 0, 'physattack', 15, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(10, 'Light Axe', 1, 0, 1, 180, 90, 5, 20, 0, 0, 'physattack', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(11, 'Spiked Club', 1, 0, 1, 220, 110, 5, 20, 0, 0, 'physattack', 20, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(12, 'Cudgel', 1, 0, 1, 270, 135, 5, 25, 0, 0, 'physattack', 23, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(13, 'Stiletto', 1, 0, 1, 330, 165, 7, 25, 0, 0, 'physattack', 25, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(14, 'Pick Axe', 1, 0, 1, 400, 200, 9, 30, 0, 0, 'physattack', 30, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(15, 'Nailed Club', 1, 0, 1, 480, 240, 11, 30, 0, 0, 'physattack', 30, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(16, 'Cutlass', 1, 0, 1, 570, 285, 13, 35, 0, 0, 'physattack', 35, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(17, 'Bayonet', 1, 0, 1, 670, 335, 15, 35, 0, 0, 'physattack', 38, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(18, 'Tomahawk', 1, 0, 1, 800, 400, 17, 40, 0, 0, 'physattack', 40, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(19, 'Light Mace', 1, 0, 1, 950, 475, 19, 40, 0, 0, 'physattack', 43, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(20, 'Falchion', 1, 0, 1, 1200, 600, 21, 45, 0, 0, 'physattack', 45, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(21, 'Foil', 1, 0, 1, 1400, 700, 23, 50, 0, 0, 'physattack', 48, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(22, 'Short Sword', 1, 0, 1, 1600, 800, 25, 50, 0, 0, 'physattack', 50, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(23, 'Double Axe', 1, 0, 1, 1900, 950, 27, 60, 0, 0, 'physattack', 55, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(24, 'Mace', 1, 0, 1, 2300, 1150, 29, 60, 0, 0, 'physattack', 60, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(25, 'Scimitar', 1, 0, 1, 2800, 1400, 31, 70, 0, 0, 'physattack', 65, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(26, 'Bardiche', 1, 0, 1, 3400, 1700, 33, 70, 0, 0, 'physattack', 70, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(27, 'Knobbed Mace', 1, 0, 1, 4100, 2050, 35, 80, 0, 0, 'physattack', 75, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(28, 'Rapier', 1, 0, 1, 4900, 2450, 37, 90, 0, 0, 'physattack', 85, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(29, 'Morning Star', 1, 0, 1, 5800, 2900, 39, 100, 0, 0, 'physattack', 95, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(30, 'Battle Axe', 1, 0, 1, 6800, 3400, 41, 110, 0, 0, 'physattack', 105, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(31, 'Saber', 1, 0, 1, 7800, 3900, 43, 120, 0, 0, 'physattack', 115, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(32, 'Francisca', 1, 0, 1, 9000, 4500, 45, 130, 0, 0, 'physattack', 125, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(33, 'Flanged Mace', 1, 0, 1, 10000, 5000, 47, 140, 0, 0, 'physattack', 135, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(34, 'Broadsword', 1, 0, 1, 11000, 5500, 49, 150, 0, 0, 'physattack', 145, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(35, 'War Axe', 1, 0, 1, 12500, 6250, 51, 165, 0, 0, 'physattack', 155, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(36, 'Trench Mace', 1, 0, 1, 14000, 7000, 53, 180, 0, 0, 'physattack', 165, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(37, 'Long Sword', 1, 0, 1, 15500, 7750, 55, 195, 0, 0, 'physattack', 180, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(38, 'Broad Axe', 1, 0, 1, 17000, 8500, 57, 210, 0, 0, 'physattack', 195, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(39, 'Flail', 1, 0, 1, 18500, 9250, 59, 225, 0, 0, 'physattack', 210, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(40, 'Claymore', 1, 0, 1, 20000, 10000, 61, 240, 0, 0, 'physattack', 225, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(41, 'Poleaxe', 1, 0, 1, 21500, 10750, 63, 255, 0, 0, 'physattack', 240, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(42, 'War Hammer', 1, 0, 1, 23000, 11500, 65, 270, 0, 0, 'physattack', 255, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(43, 'Katana', 1, 0, 1, 24500, 12250, 67, 285, 0, 0, 'physattack', 270, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(44, 'Scythe', 1, 0, 1, 26000, 13000, 69, 300, 0, 0, 'physattack', 280, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(45, 'Zweihander', 1, 0, 1, 27500, 13750, 71, 315, 0, 0, 'physattack', 295, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(46, 'Halberd', 1, 0, 1, 29000, 14500, 73, 330, 0, 0, 'physattack', 310, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(47, 'Flamberge', 1, 0, 1, 30000, 15000, 75, 345, 0, 0, 'physattack', 330, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(48, 'Great Axe', 1, 0, 1, 32000, 16000, 77, 360, 0, 0, 'physattack', 345, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(49, 'Great Sword', 1, 0, 1, 34000, 17000, 79, 375, 0, 0, 'physattack', 360, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(50, 'Giant Axe', 1, 0, 1, 36000, 18000, 81, 390, 0, 0, 'physattack', 380, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(173, 'Xiran''s Bite', 1, 1, 0, 0, 0, 83, 150, 100, 50, 'physattack', 600, 'fireattack', 600, '', 0, '', 0, '', 0, '', 0, '', 0),
(52, 'Skivvies', 2, 0, 1, 20, 10, 1, 0, 0, 0, 'physdefense', 2, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(53, 'Cloak', 2, 0, 1, 30, 15, 1, 0, 0, 0, 'physdefense', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(54, 'Cloth Armor', 2, 0, 1, 40, 20, 1, 0, 0, 0, 'physdefense', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(55, 'Quilted Coat', 2, 0, 1, 50, 25, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(56, 'Quilted Armor', 2, 0, 1, 70, 35, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(57, 'Leather Coat', 2, 0, 1, 90, 45, 3, 5, 6, 0, 'physdefense', 6, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(58, 'Leather Hauberk', 2, 0, 1, 110, 55, 3, 5, 6, 0, 'physdefense', 7, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(59, 'Leather Coat', 2, 0, 1, 150, 75, 3, 8, 10, 0, 'physdefense', 8, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(60, 'Hard Leather Armor', 2, 0, 1, 190, 95, 3, 8, 10, 0, 'physdefense', 9, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(61, 'Riveted Leather Armor', 2, 0, 1, 230, 115, 5, 10, 12, 0, 'physdefense', 11, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(62, 'Spiked Leather Armor', 2, 0, 1, 270, 135, 5, 10, 12, 0, 'physdefense', 12, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(63, 'Light Chain Mail', 2, 0, 1, 310, 155, 5, 13, 16, 0, 'physdefense', 14, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(64, 'Heavy Chain Mail', 2, 0, 1, 360, 180, 7, 13, 16, 0, 'physdefense', 15, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(65, 'Chain Mail Shirt', 2, 0, 1, 420, 210, 9, 15, 18, 0, 'physdefense', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(66, 'Chain Mail Hauberk', 2, 0, 1, 500, 250, 11, 15, 18, 0, 'physdefense', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(67, 'Full Chain Mail', 2, 0, 1, 580, 290, 13, 18, 22, 0, 'physdefense', 21, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(68, 'Light Plate Mail', 2, 0, 1, 680, 340, 15, 18, 22, 0, 'physdefense', 23, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(69, 'Heavy Plate Mail', 2, 0, 1, 800, 400, 17, 20, 24, 0, 'physdefense', 24, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(70, 'Plate Mail Shirt', 2, 0, 1, 950, 475, 19, 20, 24, 0, 'physdefense', 26, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(71, 'Plate Mail Hauberk', 2, 0, 1, 1200, 600, 21, 23, 28, 0, 'physdefense', 27, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(72, 'Full Plate Mail', 2, 0, 1, 1500, 750, 23, 25, 30, 0, 'physdefense', 29, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(73, 'Light Scale Mail', 2, 0, 1, 1800, 900, 25, 25, 30, 0, 'physdefense', 30, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(172, 'Crestfall''s Chain Mail', 2, 1, 0, 0, 0, 50, 75, 80, 0, 'physdefense', 100, 'magicdefense', 75, 'firedefense', 75, 'lightdefense', 75, '', 0, '', 0, '', 0),
(171, 'Numoren''s Ring', 5, 1, 0, 0, 0, 0, 0, 0, 0, '', 0, 'magicattack', 25, 'fireattack', 25, 'lightattack', 25, '', 0, '', 0, '', 0),
(170, 'Shirreh''s Sword', 1, 1, 0, 0, 0, 25, 0, 0, 0, 'physattack', 75, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(74, 'Heavy Scale Mail', 2, 0, 1, 2400, 1200, 27, 30, 36, 0, 'physdefense', 33, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(75, 'Scale Mail Shirt', 2, 0, 1, 2800, 1400, 29, 30, 36, 0, 'physdefense', 36, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(76, 'Scale Mail Hauberk', 2, 0, 1, 3500, 1750, 31, 35, 42, 0, 'physdefense', 39, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(77, 'Full Scale Mail', 2, 0, 1, 4800, 2400, 33, 35, 42, 0, 'physdefense', 42, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(78, 'Copper Breastplate', 2, 0, 1, 6000, 3000, 35, 40, 48, 0, 'physdefense', 45, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(79, 'Bronze Breastplate', 2, 0, 1, 7500, 3750, 37, 45, 54, 0, 'physdefense', 50, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(80, 'Iron Breastplate', 2, 0, 1, 9000, 4500, 39, 50, 60, 0, 'physdefense', 56, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(81, 'Steel Breastplate', 2, 0, 1, 10500, 5250, 41, 55, 66, 0, 'physdefense', 62, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(82, 'Titanium Breastplate', 2, 0, 1, 12000, 6000, 43, 60, 72, 0, 'physdefense', 68, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(83, 'Copper Field Plate', 2, 0, 1, 14000, 7000, 45, 65, 78, 0, 'physdefense', 74, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(84, 'Bronze Field Plate', 2, 0, 1, 16000, 8000, 47, 70, 84, 0, 'physdefense', 80, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(85, 'Iron Field Plate', 2, 0, 1, 18000, 9000, 49, 75, 90, 0, 'physdefense', 86, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(86, 'Steel Field Plate', 2, 0, 1, 20000, 10000, 51, 83, 100, 0, 'physdefense', 92, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(87, 'Titanium Field Plate', 2, 0, 1, 24000, 12000, 53, 90, 108, 0, 'physdefense', 98, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(88, 'Copper Articulated Plate', 2, 0, 1, 28000, 14000, 55, 98, 118, 0, 'physdefense', 106, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(89, 'Bronze Articulated Plate', 2, 0, 1, 32000, 16000, 57, 105, 126, 0, 'physdefense', 115, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(90, 'Iron Articulated Plate', 2, 0, 1, 36000, 18000, 59, 113, 136, 0, 'physdefense', 124, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(91, 'Steel Articulated Plate', 2, 0, 1, 40000, 20000, 61, 120, 144, 0, 'physdefense', 133, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(92, 'Titanium Articulated Plate', 2, 0, 1, 45000, 22500, 63, 128, 154, 0, 'physdefense', 142, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(93, 'Copper Battle Armor', 2, 0, 1, 50000, 25000, 65, 135, 162, 0, 'physdefense', 150, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(94, 'Bronze Battle Armor', 2, 0, 1, 55000, 27500, 67, 143, 172, 0, 'physdefense', 159, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(95, 'Iron Battle Armor', 2, 0, 1, 60000, 30000, 69, 150, 180, 0, 'physdefense', 165, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(96, 'Steel Battle Armor', 2, 0, 1, 65000, 32500, 71, 158, 190, 0, 'physdefense', 174, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(97, 'Titanium Battle Armor', 2, 0, 1, 70000, 35000, 73, 165, 198, 0, 'physdefense', 183, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(98, 'Copper Gothic Plate', 2, 0, 1, 75000, 37500, 75, 173, 208, 0, 'physdefense', 195, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(99, 'Bronze Gothic Plate', 2, 0, 1, 80000, 40000, 77, 180, 216, 0, 'physdefense', 203, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(100, 'Iron Gothic Plate', 2, 0, 1, 85000, 42500, 79, 188, 226, 0, 'physdefense', 212, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(101, 'Steel Gothic Plate', 2, 0, 1, 90000, 45000, 81, 195, 234, 0, 'physdefense', 224, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(102, 'Titanium Gothic Plate', 2, 0, 1, 95000, 47500, 83, 203, 244, 0, 'physdefense', 236, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(103, 'Leather Buckler', 4, 0, 1, 25, 13, 1, 0, 0, 0, 'physdefense', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(104, 'Wood Buckler', 4, 0, 1, 50, 25, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(105, 'Steel Buckler', 4, 0, 1, 75, 38, 1, 0, 0, 0, 'physdefense', 7, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(106, 'Titanium Buckler', 4, 0, 1, 100, 50, 1, 0, 0, 0, 'physdefense', 8, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(107, 'Leather Targe', 4, 0, 1, 150, 75, 3, 0, 5, 0, 'physdefense', 11, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(108, 'Wood Targe', 4, 0, 1, 200, 100, 3, 0, 10, 0, 'physdefense', 12, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(109, 'Steel Targe', 4, 0, 1, 300, 150, 5, 0, 15, 0, 'physdefense', 15, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(110, 'Titanium Targe', 4, 0, 1, 400, 200, 5, 0, 20, 0, 'physdefense', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(111, 'Small Aspis', 4, 0, 1, 600, 300, 8, 0, 25, 0, 'physdefense', 21, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(112, 'Large Aspis', 4, 0, 1, 800, 400, 11, 0, 35, 0, 'physdefense', 23, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(113, 'Full Aspis', 4, 0, 1, 1200, 600, 14, 0, 45, 0, 'physdefense', 26, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(114, 'Great Aspis', 4, 0, 1, 1500, 750, 17, 0, 55, 0, 'physdefense', 27, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(115, 'Small Kite Shield', 4, 0, 1, 2000, 1000, 20, 0, 65, 0, 'physdefense', 30, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(116, 'Large Kite Shield', 4, 0, 1, 2500, 1250, 23, 0, 80, 0, 'physdefense', 36, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(117, 'Full Kite Shield', 4, 0, 1, 3000, 1500, 26, 0, 95, 0, 'physdefense', 39, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(118, 'Great Kite Shield', 4, 0, 1, 4000, 2000, 29, 0, 110, 0, 'physdefense', 45, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(119, 'Small Heater Shield', 4, 0, 1, 5000, 2500, 31, 0, 130, 0, 'physdefense', 56, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(120, 'Large Heater Shield', 4, 0, 1, 6000, 3000, 34, 0, 150, 0, 'physdefense', 62, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(121, 'Full Heater Shield', 4, 0, 1, 8000, 4000, 37, 0, 170, 0, 'physdefense', 74, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(122, 'Great Heater Shield', 4, 0, 1, 10000, 5000, 40, 0, 190, 0, 'physdefense', 80, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(123, 'Small Scuta', 4, 0, 1, 12000, 6000, 43, 0, 210, 0, 'physdefense', 86, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(124, 'Large Scuta', 4, 0, 1, 15000, 7500, 46, 0, 230, 0, 'physdefense', 98, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(125, 'Full Scuta', 4, 0, 1, 18000, 9000, 49, 0, 250, 0, 'physdefense', 106, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(126, 'Great Scuta', 4, 0, 1, 22000, 11000, 51, 0, 270, 0, 'physdefense', 115, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(127, 'Small Pavise', 4, 0, 1, 26000, 13000, 54, 0, 300, 0, 'physdefense', 133, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(128, 'Large Pavise', 4, 0, 1, 30000, 15000, 57, 0, 320, 0, 'physdefense', 142, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(129, 'Full Pavise', 4, 0, 1, 35000, 17500, 60, 0, 340, 0, 'physdefense', 159, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(130, 'Great Pavise', 4, 0, 1, 40000, 20000, 65, 0, 360, 0, 'physdefense', 165, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(131, 'Small Heraldic Shield', 4, 0, 1, 45000, 22500, 70, 0, 380, 0, 'physdefense', 183, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(132, 'Large Heraldic Shield', 4, 0, 1, 50000, 25000, 75, 0, 400, 0, 'physdefense', 195, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(133, 'Full Heraldic Shield', 4, 0, 1, 55000, 27500, 80, 0, 420, 0, 'physdefense', 212, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(134, 'Great Heraldic Shield', 4, 0, 1, 60000, 30000, 85, 0, 440, 0, 'physdefense', 236, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(135, 'Leather Cap', 3, 0, 1, 20, 10, 1, 0, 0, 0, 'physdefense', 2, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(136, 'Copper Cap', 3, 0, 1, 40, 20, 1, 0, 0, 0, 'physdefense', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(137, 'Bronze Cap', 3, 0, 1, 60, 30, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(138, 'Steel Cap', 3, 0, 1, 80, 40, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(139, 'Titanium Cap', 3, 0, 1, 110, 55, 1, 0, 0, 0, 'physdefense', 7, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(140, 'Leather Skull Cap', 3, 0, 1, 140, 70, 3, 5, 6, 0, 'physdefense', 8, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(141, 'Copper Skull Cap', 3, 0, 1, 170, 85, 3, 5, 6, 0, 'physdefense', 9, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(142, 'Bronze Skull Cap', 3, 0, 1, 200, 100, 3, 8, 10, 0, 'physdefense', 11, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(143, 'Steel Skull Cap', 3, 0, 1, 240, 120, 5, 10, 12, 0, 'physdefense', 13, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(144, 'Titanium Skull Cap', 3, 0, 1, 280, 140, 5, 10, 12, 0, 'physdefense', 14, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(145, 'Copper Helm', 3, 0, 1, 330, 165, 5, 13, 16, 0, 'physdefense', 16, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(146, 'Bronze Helm', 3, 0, 1, 380, 190, 8, 13, 16, 0, 'physdefense', 16, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(147, 'Iron Helm', 3, 0, 1, 440, 220, 11, 15, 18, 0, 'physdefense', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(148, 'Steel Helm', 3, 0, 1, 500, 250, 14, 18, 22, 0, 'physdefense', 22, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(149, 'Titanium Helm', 3, 0, 1, 600, 300, 17, 18, 22, 0, 'physdefense', 23, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(150, 'Copper Corinthian Helmet', 3, 0, 1, 700, 350, 20, 20, 24, 0, 'physdefense', 27, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(151, 'Bronze Corinthian Helmet', 3, 0, 1, 850, 425, 23, 23, 28, 0, 'physdefense', 33, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(152, 'Iron Corinthian Helmet', 3, 0, 1, 1000, 500, 26, 25, 30, 0, 'physdefense', 37, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(153, 'Steel Corinthian Helmet', 3, 0, 1, 2000, 1000, 29, 25, 30, 0, 'physdefense', 44, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(154, 'Titanium Corinthian Helmet', 3, 0, 1, 3200, 1600, 31, 30, 36, 0, 'physdefense', 48, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(155, 'Copper Sallet', 3, 0, 1, 4400, 2200, 34, 30, 36, 0, 'physdefense', 51, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(156, 'Bronze Sallet', 3, 0, 1, 6000, 3000, 37, 35, 42, 0, 'physdefense', 58, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(157, 'Iron Sallet', 3, 0, 1, 7000, 3500, 40, 35, 42, 0, 'physdefense', 63, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(158, 'Steel Sallet', 3, 0, 1, 8000, 4000, 43, 40, 48, 0, 'physdefense', 68, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(159, 'Titanium Sallet', 3, 0, 1, 10000, 5000, 46, 45, 54, 0, 'physdefense', 79, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(160, 'Copper Bascinet', 3, 0, 1, 12000, 6000, 49, 50, 60, 0, 'physdefense', 84, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(161, 'Bronze Bascinet', 3, 0, 1, 15000, 7500, 51, 55, 66, 0, 'physdefense', 94, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(162, 'Iron Bascinet', 3, 0, 1, 18000, 9000, 54, 60, 72, 0, 'physdefense', 98, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(163, 'Steel Bascinet', 3, 0, 1, 22000, 11000, 57, 65, 78, 0, 'physdefense', 108, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(164, 'Titanium Bascinet', 3, 0, 1, 26000, 13000, 60, 70, 84, 0, 'physdefense', 115, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(165, 'Copper Horned Helm', 3, 0, 1, 30000, 15000, 65, 75, 90, 0, 'physdefense', 125, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(166, 'Bronze Horned Helm', 3, 0, 1, 35000, 17500, 70, 83, 100, 0, 'physdefense', 139, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(167, 'Iron Horned Helm', 3, 0, 1, 40000, 20000, 75, 90, 108, 0, 'physdefense', 145, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(168, 'Steel Horned Helm', 3, 0, 1, 45000, 22500, 80, 98, 118, 0, 'physdefense', 160, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(169, 'Titanium Horned Helm', 3, 0, 1, 50000, 25000, 85, 105, 126, 0, 'physdefense', 175, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0),
(51, 'Giant Maul', 1, 0, 1, 38000, 19000, 83, 405, 0, 0, 'physattack', 400, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
DROP TABLE IF EXISTS `<<itemmodnames>>`;
CREATE TABLE `<<itemmodnames>>` (
`id` int(10) unsigned NOT NULL auto_increment,
`fieldname` varchar(50) NOT NULL default '',
`prettyname` varchar(50) NOT NULL default '',
`percent` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM ;
INSERT INTO `<<itemmodnames>>` (`id`, `fieldname`, `prettyname`, `percent`) VALUES
(1, 'expbonus', 'Experience Bonus', 1),
(2, 'goldbonus', 'Gold Bonus', 1),
(3, 'maxhp', 'Max HP', 0),
(4, 'maxmp', 'Max MP', 0),
(5, 'maxtp', 'Max TP', 0),
(6, 'strength', 'Strength', 0),
(7, 'dexterity', 'Dexterity', 0),
(8, 'energy', 'Energy', 0),
(9, 'physattack', 'Physical Attack', 0),
(10, 'physdefense', 'Physical Defense', 0),
(11, 'magicattack', 'Magic Attack', 0),
(12, 'magicdefense', 'Magid Defense', 0),
(13, 'fireattack', 'Fire Attack', 0),
(14, 'firedefense', 'Fire Defense', 0),
(15, 'lightattack', 'Lightning Attack', 0),
(16, 'lightdefense', 'Lightning Defense', 0),
(17, 'hpleech', 'HP Leech', 1),
(18, 'mpleech', 'MP Leech', 1),
(19, 'hpgain', 'HP Per Kill', 0),
(20, 'mpgain', 'MP Per Kill', 0);
DROP TABLE IF EXISTS `<<itemprefixes>>`;
CREATE TABLE `<<itemprefixes>>` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(50) NOT NULL default '',
`slotnumber` tinyint(3) unsigned NOT NULL default '0',
`unique` tinyint(3) unsigned NOT NULL default '0',
`willdrop` tinyint(3) unsigned NOT NULL default '0',
`buycost` int(10) unsigned NOT NULL default '0',
`sellcost` int(10) unsigned NOT NULL default '0',
`reqlevel` smallint(5) unsigned NOT NULL default '0',
`reqstrength` smallint(5) unsigned NOT NULL default '0',
`reqdexterity` smallint(5) unsigned NOT NULL default '0',
`reqenergy` smallint(5) unsigned NOT NULL default '0',
`basename` varchar(50) NOT NULL default '',
`baseattr` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM ;
INSERT INTO `<<itemprefixes>>` (`id`, `name`, `slotnumber`, `unique`, `willdrop`, `buycost`, `sellcost`, `reqlevel`, `reqstrength`, `reqdexterity`, `reqenergy`, `basename`, `baseattr`) VALUES
(1, 'Sharp', 1, 0, 0, 5, 3, 1, 0, 0, 0, 'physattack', 2),
(2, 'Magic', 1, 0, 0, 8, 4, 1, 0, 0, 0, 'magicattack', 5);
DROP TABLE IF EXISTS `<<itemsuffixes>>`;
CREATE TABLE `<<itemsuffixes>>` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(50) NOT NULL default '',
`slotnumber` tinyint(3) unsigned NOT NULL default '0',
`unique` tinyint(3) unsigned NOT NULL default '0',
`willdrop` tinyint(3) unsigned NOT NULL default '0',
`buycost` int(10) unsigned NOT NULL default '0',
`sellcost` int(10) unsigned NOT NULL default '0',
`reqlevel` smallint(5) unsigned NOT NULL default '0',
`reqstrength` smallint(5) unsigned NOT NULL default '0',
`reqdexterity` smallint(5) unsigned NOT NULL default '0',
`reqenergy` smallint(5) unsigned NOT NULL default '0',
`basename` varchar(50) NOT NULL default '',
`baseattr` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM ;
INSERT INTO `<<itemsuffixes>>` (`id`, `name`, `slotnumber`, `unique`, `willdrop`, `buycost`, `sellcost`, `reqlevel`, `reqstrength`, `reqdexterity`, `reqenergy`, `basename`, `baseattr`) VALUES
(1, 'of the Vampire', 1, 0, 0, 5, 3, 1, 0, 0, 0, 'hpleech', 5),
(2, 'of the Bear', 1, 0, 0, 5, 3, 1, 0, 0, 0, 'strength', 5);
DROP TABLE IF EXISTS `<<messages>>`;
CREATE TABLE `<<messages>>` (
`id` int(10) unsigned NOT NULL auto_increment,
`postdate` datetime NOT NULL default '0000-00-00 00:00:00',
`senderid` int(10) unsigned NOT NULL default '0',
`sendername` varchar(30) NOT NULL default '',
`recipientid` int(10) unsigned NOT NULL default '0',
`recipientname` varchar(30) NOT NULL default '',
`status` tinyint(3) unsigned NOT NULL default '0',
`title` varchar(200) NOT NULL default '',
`message` text NOT NULL,
`gold` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM ;
DROP TABLE IF EXISTS `<<monsters>>`;
CREATE TABLE `<<monsters>>` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(30) NOT NULL default '',
`world` tinyint(3) unsigned NOT NULL default '0',
`level` smallint(5) unsigned NOT NULL default '0',
`maxexp` int(10) unsigned NOT NULL default '0',
`maxgold` int(10) unsigned NOT NULL default '0',
`maxhp` smallint(5) unsigned NOT NULL default '0',
`physattack` smallint(5) unsigned NOT NULL default '0',
`physdefense` smallint(5) unsigned NOT NULL default '0',
`magicattack` smallint(5) unsigned NOT NULL default '0',
`magicdefense` smallint(5) unsigned NOT NULL default '0',
`fireattack` smallint(5) unsigned NOT NULL default '0',
`firedefense` smallint(5) unsigned NOT NULL default '0',
`lightattack` smallint(5) unsigned NOT NULL default '0',
`lightdefense` smallint(5) unsigned NOT NULL default '0',
`spell1` smallint(5) unsigned NOT NULL default '0',
`spell2` smallint(5) unsigned NOT NULL default '0',
`spellimmune1` smallint(5) unsigned NOT NULL default '0',
`spellimmune2` smallint(5) unsigned NOT NULL default '0',
`boss` tinyint(3) unsigned NOT NULL default '0',
`newstory` int(10) unsigned NOT NULL default '0',
`hpleech` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM ;
INSERT INTO `<<monsters>>` (`id`, `name`, `world`, `level`, `maxexp`, `maxgold`, `maxhp`, `physattack`, `physdefense`, `magicattack`, `magicdefense`, `fireattack`, `firedefense`, `lightattack`, `lightdefense`, `spell1`, `spell2`, `spellimmune1`, `spellimmune2`, `boss`, `newstory`, `hpleech`) VALUES
(1, 'Small Slime', 1, 1, 4, 2, 3, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(2, 'Shade', 1, 1, 4, 2, 3, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(3, 'Slime', 1, 2, 4, 2, 3, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(4, 'Small Drake', 1, 2, 4, 3, 4, 5, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(5, 'Skeleton', 1, 3, 5, 3, 5, 6, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(6, 'Haunt', 1, 3, 6, 4, 6, 6, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(7, 'Big Slime', 1, 4, 7, 5, 7, 7, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(8, 'Drake', 1, 4, 8, 5, 8, 8, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(9, 'Ghost', 1, 5, 9, 6, 9, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(10, 'Bee', 1, 5, 10, 4, 9, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(11, 'Scorpion', 1, 6, 8, 6, 10, 11, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(12, 'Dawk', 1, 6, 14, 8, 11, 11, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(13, 'Nymph', 1, 7, 15, 6, 12, 12, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(14, 'Ember', 1, 7, 12, 7, 12, 14, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(15, 'Daydream', 1, 8, 12, 8, 13, 14, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(16, 'Wasp', 1, 8, 15, 10, 14, 14, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(17, 'Shadow', 1, 9, 15, 8, 16, 16, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(18, 'Harpy', 1, 9, 15, 12, 17, 17, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(19, 'Air Elemental', 1, 10, 17, 11, 19, 18, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(20, 'Rogue', 1, 10, 22, 14, 21, 20, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(21, 'Lynx', 1, 11, 19, 14, 23, 24, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(22, 'Trickster', 1, 11, 25, 17, 25, 26, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(23, 'Goblin', 1, 12, 27, 17, 25, 27, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(24, 'Charmer', 1, 12, 27, 14, 27, 29, 18, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(25, 'Raven', 1, 13, 30, 12, 29, 29, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(26, 'Bobcat', 1, 13, 26, 21, 31, 29, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(27, 'Lycan', 1, 14, 37, 15, 34, 36, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(28, 'Fiend', 1, 14, 42, 26, 37, 40, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(29, 'Liche', 1, 15, 44, 23, 40, 42, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(30, 'Dawkin', 1, 15, 35, 21, 42, 40, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(31, 'Anarchist', 1, 16, 38, 25, 45, 49, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(32, 'Hellcat', 1, 16, 47, 30, 48, 49, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(33, 'Fallen Cherub', 1, 17, 56, 29, 51, 55, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(34, 'Grey Wolf', 1, 17, 63, 36, 54, 52, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(35, 'Black Bear', 1, 18, 48, 29, 56, 55, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(36, 'Knight', 1, 18, 55, 33, 59, 64, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(37, 'Giant', 1, 19, 58, 38, 62, 66, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(38, 'Young Wyrm', 1, 19, 73, 44, 65, 60, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(39, 'Lesser Devil', 1, 20, 82, 44, 68, 69, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(40, 'Lesser Demon', 1, 20, 73, 36, 70, 70, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(42, 'Silver Slime', 2, 1, 83, 44, 73, 72, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(43, 'Apparition', 2, 1, 68, 34, 76, 81, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(44, 'Phantasm', 2, 2, 66, 47, 79, 76, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(45, 'Poltergeist', 2, 2, 96, 33, 82, 83, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(46, 'Wraith', 2, 3, 73, 38, 84, 79, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(47, 'Big Drake', 2, 3, 89, 59, 87, 84, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(48, 'Illusion', 2, 4, 104, 37, 90, 86, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(49, 'Dawkare', 2, 4, 110, 50, 93, 86, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(50, 'Illusionist', 2, 5, 93, 50, 96, 87, 40, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(51, 'Skeleton Soldier', 2, 5, 104, 48, 98, 95, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(52, 'Devil', 2, 6, 121, 57, 102, 112, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(53, 'Demon', 2, 6, 95, 48, 105, 113, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(54, 'Brown Bear', 2, 7, 103, 76, 109, 100, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(55, 'Black Wolf', 2, 7, 123, 45, 112, 104, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(56, 'Water Elemental', 2, 8, 122, 82, 116, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(57, 'Harridan', 2, 8, 96, 71, 119, 109, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(58, 'Sylph', 2, 9, 115, 69, 123, 111, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(59, 'Orc', 2, 9, 135, 82, 126, 123, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(60, 'Dawkra', 2, 10, 108, 65, 130, 121, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(61, 'Shaman', 2, 10, 122, 80, 133, 136, 98, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(62, 'Cinder', 2, 11, 159, 62, 137, 124, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(63, 'Yellowjacket', 2, 11, 115, 96, 140, 138, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(64, 'Rogue Scorpion', 2, 12, 123, 58, 144, 139, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(65, 'Magidrake', 2, 12, 156, 68, 147, 140, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(66, 'Dream', 2, 13, 170, 84, 151, 165, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(67, 'Ocelot', 2, 13, 162, 90, 154, 168, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(68, 'Shadow Raven', 2, 14, 189, 81, 158, 152, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(69, 'Knave', 2, 14, 181, 91, 161, 168, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(70, 'Lycanthor', 2, 15, 157, 109, 165, 162, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(71, 'Mirage', 2, 15, 138, 105, 168, 155, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(72, 'Magician', 2, 16, 164, 105, 172, 166, 70, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(73, 'Mace Knight', 2, 16, 156, 86, 175, 175, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(74, 'Lesser Wyvern', 2, 17, 171, 90, 179, 167, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(75, 'Serafiend', 2, 17, 195, 128, 182, 166, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(76, 'Zhora''s Follower', 2, 18, 155, 125, 186, 201, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(77, 'Zhora''s Cantor', 2, 18, 214, 103, 189, 188, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(78, 'Liche Captain', 2, 19, 180, 101, 193, 203, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(79, 'Leviathan', 2, 19, 214, 108, 196, 195, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(80, 'Renegade', 2, 20, 164, 138, 200, 210, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(81, 'Dark Slime', 3, 1, 189, 98, 203, 203, 143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(82, 'Phantom', 3, 1, 230, 131, 207, 205, 152, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(83, 'Spirit', 3, 2, 168, 147, 210, 198, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(84, 'Specter', 3, 2, 254, 93, 215, 213, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(85, 'Winged Drake', 3, 3, 231, 117, 220, 207, 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(86, 'Shimmer', 3, 3, 261, 120, 225, 219, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(87, 'Dawkor', 3, 4, 217, 113, 230, 210, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(88, 'Enchanter', 3, 4, 264, 132, 235, 254, 130, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(89, 'Mounted Skeleton', 3, 5, 257, 137, 240, 262, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(90, 'Greater Devil', 3, 5, 245, 125, 245, 221, 153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(91, 'Greater Demon', 3, 6, 228, 133, 250, 250, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(92, 'Polar Bear', 3, 6, 299, 161, 255, 240, 171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(93, 'Red Wolf', 3, 7, 218, 140, 259, 259, 171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(94, 'Earth Elemental', 3, 7, 228, 151, 264, 288, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(95, 'Ogress', 3, 8, 299, 111, 269, 283, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(96, 'Nisse', 3, 8, 283, 154, 274, 247, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(97, 'Troll', 3, 9, 285, 154, 279, 254, 204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(98, 'Wizard', 3, 9, 341, 145, 284, 287, 158, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(99, 'Fire', 3, 10, 249, 162, 289, 284, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(100, 'Hornet', 3, 10, 339, 150, 294, 265, 165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(101, 'Red Scorpion', 3, 11, 311, 198, 299, 273, 148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(102, 'Hallucination', 3, 11, 320, 152, 304, 332, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(103, 'Leopard', 3, 12, 302, 136, 308, 315, 221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(104, 'Frost Raven', 3, 12, 357, 132, 313, 282, 226, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(105, 'Scoundrel', 3, 13, 315, 153, 318, 299, 132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(106, 'Fallen Muse', 3, 13, 343, 130, 323, 353, 177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(107, 'Snow Leopard', 3, 14, 394, 145, 328, 322, 136, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(108, 'Lycanthra', 3, 14, 277, 187, 333, 314, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(109, 'Axe Knight', 3, 15, 376, 224, 338, 352, 141, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(110, 'Cheetah', 3, 15, 381, 151, 343, 326, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(111, 'Wyvern', 3, 16, 369, 209, 348, 328, 233, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(112, 'Cherufiend', 3, 16, 304, 177, 353, 343, 217, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(113, 'Zhora''s Advocate', 3, 17, 290, 225, 357, 343, 151, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(114, 'Zhora''s Elder', 3, 17, 301, 160, 362, 348, 195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(115, 'Liche Prince', 3, 18, 426, 206, 367, 342, 233, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(116, 'Behemoth', 3, 18, 421, 190, 372, 361, 235, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(117, 'Insurgent', 3, 19, 336, 264, 377, 393, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(118, 'Greater Wyvern', 3, 20, 444, 161, 382, 409, 324, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(119, 'Devil Lord', 4, 1, 351, 218, 389, 393, 252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(120, 'Demon Lord', 4, 1, 476, 175, 396, 361, 206, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(121, 'Grizzly Bear', 4, 2, 347, 162, 403, 363, 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(122, 'Arctic Wolf', 4, 2, 468, 177, 410, 427, 261, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(123, 'Fire Elemental', 4, 3, 334, 180, 417, 422, 233, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(124, 'Gorgon', 4, 3, 344, 225, 424, 441, 270, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(125, 'Enchantress', 4, 4, 466, 173, 431, 427, 265, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(126, 'Ogre', 4, 4, 526, 276, 438, 456, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(127, 'Sorcerer', 4, 5, 517, 303, 445, 450, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(128, 'Blaze', 4, 5, 394, 195, 452, 457, 270, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(129, 'Demon Hornet', 4, 6, 469, 212, 459, 432, 337, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(130, 'Silver Scorpion', 4, 6, 560, 275, 466, 499, 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(131, 'Torment', 4, 7, 488, 261, 473, 521, 402, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(132, 'Fire Raven', 4, 7, 533, 303, 480, 432, 242, 0, 0, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(133, 'Hellion', 4, 8, 400, 341, 487, 517, 321, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(134, 'Fallen Angel', 4, 8, 470, 223, 494, 524, 325, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(135, 'Werewolf', 4, 9, 476, 281, 501, 517, 342, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(136, 'Armored Knight', 4, 9, 514, 336, 508, 473, 308, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(137, 'Archfiend', 4, 10, 443, 351, 515, 541, 390, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(138, 'Zhora''s Fanatic', 4, 10, 569, 256, 522, 502, 312, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(139, 'Zhora''s Priest', 4, 11, 529, 212, 529, 540, 351, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(140, 'Liche King', 4, 11, 617, 231, 536, 579, 261, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(141, 'Colossus', 4, 12, 576, 315, 543, 505, 218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(142, 'Nihilist', 4, 12, 440, 297, 550, 594, 327, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(143, 'Armored Skeleton', 4, 13, 574, 385, 557, 563, 254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(144, 'Puma', 4, 13, 525, 339, 564, 559, 403, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(145, 'Devil King', 4, 14, 532, 309, 571, 526, 369, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(146, 'Demon King', 4, 14, 544, 284, 578, 619, 353, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(147, 'Kodiak Bear', 4, 15, 474, 369, 585, 574, 328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(148, 'Haunted Wolf', 4, 15, 687, 338, 592, 652, 268, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(149, 'Light Elemental', 4, 16, 647, 264, 599, 582, 414, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(150, 'Medusa', 4, 16, 649, 243, 606, 619, 477, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(151, 'Siren', 4, 17, 528, 270, 613, 675, 507, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(152, 'Uruk', 4, 17, 540, 385, 620, 577, 456, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(153, 'Warlock', 4, 18, 653, 421, 627, 615, 382, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(154, 'Jaguar', 4, 18, 666, 317, 634, 603, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(155, 'Necromancer', 4, 19, 584, 295, 641, 622, 461, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(156, 'Demagogue', 4, 19, 733, 376, 648, 713, 414, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(157, 'Titan', 4, 20, 636, 446, 655, 590, 384, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(158, 'Lion', 4, 20, 643, 358, 662, 662, 391, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(159, 'Pyre', 5, 1, 780, 296, 672, 686, 309, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(160, 'Figment', 5, 1, 820, 315, 683, 663, 478, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(161, 'Demon Scorpion', 5, 1, 791, 402, 693, 666, 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(162, 'Nightmare', 5, 2, 789, 437, 704, 761, 381, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(163, 'Silver Raven', 5, 2, 793, 472, 714, 650, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(164, 'Bandit', 5, 2, 638, 435, 725, 740, 541, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(165, 'Fallen Archangel', 5, 3, 633, 500, 735, 765, 375, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(166, 'Tiger', 5, 3, 746, 493, 746, 709, 369, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(167, 'Fallen Seraph', 5, 3, 734, 492, 756, 802, 618, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(168, 'Werebear', 5, 4, 875, 422, 767, 691, 422, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(169, 'Demon Knight', 5, 4, 653, 412, 777, 708, 411, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(170, 'Magic Wyvern', 5, 4, 639, 387, 788, 725, 363, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(171, 'Fiendlord', 5, 5, 727, 479, 798, 878, 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(172, 'Zhora''s Zealot', 5, 5, 963, 365, 809, 882, 706, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(173, 'Zhora''s Bishop', 5, 6, 983, 344, 819, 738, 436, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(174, 'Liche Lord', 5, 6, 872, 457, 830, 797, 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(175, 'Fire Wyvern', 5, 7, 714, 454, 840, 857, 678, 0, 0, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(176, 'Zhora''s Obsessive', 5, 7, 945, 435, 851, 937, 694, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(177, 'Zhora''s Archbishop', 5, 8, 861, 595, 861, 887, 444, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(178, 'Grey Daemon', 5, 8, 750, 567, 872, 960, 653, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(179, 'Hellhound', 5, 9, 794, 618, 882, 935, 403, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(180, 'Great Wyrm', 5, 9, 965, 518, 893, 858, 550, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(181, 'Green Dragon', 5, 10, 795, 587, 903, 876, 684, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(182, 'Red Daemon', 5, 10, 869, 421, 914, 988, 623, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(183, 'Hellbeast', 5, 11, 906, 444, 924, 943, 406, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(184, 'Frost Wyrm', 5, 11, 964, 533, 935, 973, 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(185, 'Blue Dragon', 5, 12, 1116, 492, 945, 993, 408, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(186, 'Dark Daemon', 5, 12, 1138, 478, 956, 995, 697, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(187, 'Hellbear', 5, 13, 947, 426, 966, 938, 488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(188, 'Red Wyrm', 5, 13, 919, 509, 977, 1026, 821, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(189, 'Red Dragon', 5, 14, 1106, 533, 987, 1057, 772, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(190, 'Black Daemon', 5, 14, 1048, 440, 998, 1048, 504, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(191, 'Hellwolf', 5, 15, 1170, 555, 1008, 1109, 488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(192, 'Blue Wyrm', 5, 15, 1121, 530, 1019, 1040, 676, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(193, 'Dark Dragon', 5, 16, 1235, 484, 1029, 927, 649, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(194, 'Fallen Dragon', 5, 16, 1207, 676, 1040, 1009, 687, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(195, 'Shadow Dragon', 5, 17, 1166, 735, 1050, 1113, 702, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(196, 'Black Dragon', 5, 17, 1104, 680, 1061, 1008, 504, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(197, 'Ancient Dragon', 5, 18, 868, 675, 1071, 986, 740, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(198, 'False Dragon', 5, 18, 1169, 758, 1082, 1050, 473, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(199, 'Daemonlord', 5, 19, 1082, 557, 1092, 1049, 787, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(200, 'Dragonlord', 5, 20, 971, 728, 1103, 1159, 916, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(201, 'Razora', 1, 99, 150, 60, 120, 120, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 0),
(202, 'Numoren', 2, 99, 300, 300, 300, 300, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 0),
(203, 'Crestfall', 3, 99, 800, 1000, 500, 550, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 9, 0),
(204, 'Lucifuge''s Throneguard', 4, 99, 200, 300, 700, 750, 400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 0),
(205, 'Lucifuge', 4, 99, 1500, 1500, 850, 900, 850, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 13, 0),
(206, 'Xiran''s Minion', 5, 99, 500, 400, 1200, 1250, 1100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 16, 0),
(207, 'Xiran''s Cardinal', 5, 99, 750, 750, 1300, 1400, 1250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 0),
(208, 'Xiran', 5, 99, 1000, 1000, 1400, 1500, 1300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 18, 0),
(209, 'Xiran', 5, 99, 5000, 5000, 1600, 1800, 1200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 19, 0);
DROP TABLE IF EXISTS `<<pvp>>`;
CREATE TABLE `<<pvp>>` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`player1id` int(10) unsigned NOT NULL default '0',
`player2id` int(10) unsigned NOT NULL default '0',
`player1name` varchar(30) NOT NULL default '',
`player2name` varchar(30) NOT NULL default '',
`playerturn` int(10) unsigned NOT NULL default '0',
`accepted` tinyint(3) unsigned NOT NULL default '0',
`turntime` timestamp NOT NULL,
`fightrow` text NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM ;
DROP TABLE IF EXISTS `<<spells>>`;
CREATE TABLE `<<spells>>` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(30) NOT NULL default '',
`fname` varchar(30) NOT NULL default '',
`value` int(10) unsigned NOT NULL default '0',
`mp` int(10) unsigned NOT NULL default '0',
`minlevel` int(10) unsigned NOT NULL default '0',
`classonly` int(10) unsigned NOT NULL default '0',
`classexclude` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM ;
INSERT INTO `<<spells>>` (`id`, `name`, `fname`, `value`, `mp`, `minlevel`, `classonly`, `classexclude`) VALUES
(1, 'Heal 1', 'heal', 5, 2, 5, 2, 0),
(2, 'Heal 2', 'heal', 10, 5, 10, 0, 0),
(3, 'Heal 3', 'heal', 20, 10, 15, 0, 0),
(4, 'Heal 4', 'heal', 30, 15, 20, 0, 0),
(5, 'Heal 5', 'heal', 45, 25, 25, 0, 0),
(6, 'Heal 6', 'heal', 60, 35, 30, 0, 0),
(7, 'Heal 7', 'heal', 80, 50, 35, 3, 0),
(8, 'Heal 8', 'heal', 100, 75, 40, 3, 0),
(9, 'Heal 9', 'heal', 150, 100, 45, 3, 0),
(10, 'Heal 10', 'heal', 200, 150, 50, 3, 0),
(11, 'Hurt 1', 'hurt', 5, 2, 5, 0, 0),
(12, 'Hurt 2', 'hurt', 10, 5, 10, 0, 0),
(13, 'Hurt 3', 'hurt', 15, 7, 15, 0, 0),
(14, 'Hurt 4', 'hurt', 25, 12, 20, 0, 0),
(15, 'Hurt 5', 'hurt', 35, 20, 25, 0, 0),
(16, 'Hurt 6', 'hurt', 50, 30, 30, 0, 0),
(17, 'Hurt 7', 'hurt', 65, 40, 35, 3, 0),
(18, 'Hurt 8', 'hurt', 85, 50, 40, 3, 0),
(19, 'Hurt 9', 'hurt', 105, 65, 45, 3, 0),
(20, 'Hurt 10', 'hurt', 130, 80, 50, 3, 0),
(21, 'Sleep 1', 'sleep', 80, 20, 10, 0, 0),
(22, 'Sleep 2', 'sleep', 60, 35, 20, 0, 0),
(23, 'Sleep 3', 'sleep', 40, 50, 30, 2, 0),
(24, 'Sleep 4', 'sleep', 20, 75, 40, 2, 0),
(25, 'Sleep 5', 'sleep', 5, 100, 50, 2, 0),
(26, 'Fire 1', 'fire', 5, 2, 5, 0, 0),
(27, 'Fire 2', 'fire', 10, 5, 10, 0, 0),
(28, 'Fire 3', 'fire', 15, 7, 15, 0, 0),
(29, 'Fire 4', 'fire', 25, 12, 20, 0, 0),
(30, 'Fire 5', 'fire', 35, 20, 25, 0, 0),
(31, 'Fire 6', 'fire', 50, 30, 30, 0, 0),
(32, 'Fire 7', 'fire', 65, 40, 35, 2, 0),
(33, 'Fire 8', 'fire', 85, 50, 40, 2, 0),
(34, 'Fire 9', 'fire', 105, 65, 45, 2, 0),
(35, 'Fire 10', 'fire', 130, 80, 50, 2, 0),
(36, 'Lightning 1', 'light', 5, 2, 5, 0, 0),
(37, 'Lightning 2', 'light', 10, 5, 10, 0, 0),
(38, 'Lightning 3', 'light', 15, 7, 15, 0, 0),
(39, 'Lightning 4', 'light', 25, 12, 20, 0, 0),
(40, 'Lightning 5', 'light', 35, 20, 25, 0, 0),
(41, 'Lightning 6', 'light', 50, 30, 30, 0, 0),
(42, 'Lightning 7', 'light', 65, 40, 35, 2, 0),
(43, 'Lightning 8', 'light', 85, 50, 40, 2, 0),
(44, 'Lightning 9', 'light', 105, 65, 45, 2, 0),
(45, 'Lightning 10', 'light', 130, 80, 50, 2, 0),
(46, 'Prismatic Blast 1', 'prism', 2, 2, 5, 0, 0),
(47, 'Prismatic Blast 2', 'prism', 5, 5, 10, 0, 0),
(48, 'Prismatic Blast 3', 'prism', 10, 7, 15, 0, 0),
(49, 'Prismatic Blast 4', 'prism', 15, 12, 20, 0, 0),
(50, 'Prismatic Blast 5', 'prism', 15, 20, 25, 0, 0),
(51, 'Prismatic Blast 6', 'prism', 20, 30, 30, 0, 0),
(52, 'Prismatic Blast 7', 'prism', 25, 40, 35, 0, 1),
(53, 'Prismatic Blast 8', 'prism', 30, 50, 40, 0, 1),
(54, 'Prismatic Blast 9', 'prism', 35, 65, 45, 0, 1),
(55, 'Prismatic Blast 10', 'prism', 40, 80, 50, 0, 1),
(56, 'Stone Skin 1', 'bonusdefense', 5, 5, 1, 0, 0),
(57, 'Stone Skin 2', 'bonusdefense', 10, 10, 3, 0, 0),
(58, 'Stone Skin 3', 'bonusdefense', 15, 15, 7, 0, 0),
(59, 'Stone Skin 4', 'bonusdefense', 20, 20, 10, 0, 2),
(60, 'Stone Skin 5', 'bonusdefense', 30, 30, 23, 0, 2),
(61, 'Stone Skin 6', 'bonusdefense', 40, 45, 31, 0, 2),
(62, 'Stone Skin 7', 'bonusdefense', 55, 65, 55, 1, 0),
(63, 'Stone Skin 8', 'bonusdefense', 70, 100, 75, 1, 0),
(64, 'Stone Skin 9', 'bonusdefense', 95, 200, 87, 1, 0),
(65, 'Stone Skin 10', 'bonusdefense', 110, 350, 95, 1, 0),
(66, 'Blessed Strike 1', 'bonusattack', 5, 5, 1, 0, 2),
(67, 'Blessed Strike 2', 'bonusattack', 10, 10, 3, 0, 2),
(68, 'Blessed Strike 3', 'bonusattack', 15, 15, 7, 0, 2),
(69, 'Blessed Strike 4', 'bonusattack', 20, 20, 10, 0, 2),
(70, 'Blessed Strike 5', 'bonusattack', 25, 30, 23, 0, 2),
(71, 'Blessed Strike 6', 'bonusattack', 30, 45, 31, 0, 2),
(72, 'Blessed Strike 7', 'bonusattack', 40, 65, 55, 1, 0),
(73, 'Blessed Strike 8', 'bonusattack', 55, 100, 75, 1, 0),
(74, 'Blessed Strike 9', 'bonusattack', 70, 200, 87, 1, 0),
(75, 'Blessed Strike 10', 'bonusattack', 90, 350, 95, 1, 0);
DROP TABLE IF EXISTS `<<story>>`;
CREATE TABLE `<<story>>` (
`id` int(10) unsigned NOT NULL auto_increment,
`title` text NOT NULL,
`story` text NOT NULL,
`world` int(10) unsigned NOT NULL default '0',
`latitude` smallint(6) NOT NULL default '0',
`longitude` smallint(6) NOT NULL default '0',
`nextstory` int(10) unsigned NOT NULL default '0',
`targetmonster` int(10) unsigned NOT NULL default '0',
`targetitem` varchar(10) NOT NULL default '',
`targetworld` int(10) unsigned NOT NULL default '0',
`targetlat` smallint(6) NOT NULL default '0',
`targetlon` smallint(6) NOT NULL default '0',
`targetaction` varchar(30) NOT NULL default '',
`rewardname` varchar(30) NOT NULL default '',
`rewardattr` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM ;
INSERT INTO `<<story>>` (`id`, `title`, `story`, `world`, `latitude`, `longitude`, `nextstory`, `targetmonster`, `targetitem`, `targetworld`, `targetlat`, `targetlon`, `targetaction`, `rewardname`, `rewardattr`) VALUES
(1, 'Prologue', 'The light has forsaken this land, and not for the first time. Centuries ago, it was overrun by darkness and then saved by a hero whose lifelong quest was to eradicate evil. The hero succeeded, and in the end, Lucifuge, King of the Dragons, was destroyed... at least for the time being. In the many long years since that time, Lucifuge has been gathering his forces and his power, and has finally regained enough of his former strength to return.\r\n\r\nSo the land is once again in need of a saviour. It will be no easy task, dear adventurer. In the last age, Lucifuge and his minions controlled but a small country. This time, he has sent his forces to sow chaos and darkness throughout the world. Only a brave adventurer will be able to conquer him and restore peace and order to the world.\r\n\r\nContinue on, dear adventurer. You shall be tested dearly, but the rewards will be great.', 1, 0, 0, 2, 0, '', 1, 0, 0, '', '', 0),
(2, 'Queen of Demons', 'You come to a great stone door, with the inscription ''RAZORA'' carved in the Language of the Fallen. Next to the door lie the skeletons of several dead warriors who failed to enter. One of the skeletons is holding a scrap of paper, which reads:\r\n\r\n"We finally made it. The legends are true, Razora does exist. As I write this, we are standing outside the demon queen''s throneroom. Something is following us, though, and has been for several days. We''re making camp tonight, and we''ll head inside in the morning. After the months of travelling, we definitely need our rest if we''re really preparing to face Razora. We''ve survived this far, surely whatever is following us will hold off one more night..."\r\n\r\nYou are now faced with a choice, dear adventurer. Are you ready to face the demon queen Razora, or do you still need more preparation?', 1, 100, -100, 0, 201, '', 0, 0, 0, '', '', 0),
(3, 'Fallen Queen', 'Razora, the Demon Queen, lies dead at your feet. Even now, her body and all the black blood spilled from it are melting away into the nether. Soon, all that''s left is her heart, which you take with you as proof that you destroyed her.\r\n\r\nOne section of the wall crumbles and falls, and leads to a doorway, guarded by a large statue of an angel. In the angel''s hand is a sword with flames engraved in the blade.\r\n\r\nIt wouldn''t be too much trouble to take the sword, and it does seem like your right to take it, after all the trouble you went through to kill Razora. You can now take the sword and continue through the doorway, or just continue on without it.', 1, 100, -100, 4, 0, '', 2, 0, 0, '', 'maxhp', 50),
(4, 'Shirreh''s Door', 'As you step through the doorway, you have a momentary feeling of the ground being swept out beneath you. Then you are surrounded by light, and you enter a new town. The townsfolk, surprised at your sudden entry through a door that has never been opened, quickly inform you of the legend surrounding the door.\r\n\r\nIt was created by the archangel Shirreh, as a path between this land and the last you were in. Shirreh made the door so that whoever did eventually destroy Razora would be able to travel here and attempt to defeat Numoren, the demon who was given dominion over this land by Lucifuge.\r\n\r\nIt''s time to continue on, dear adventurer. You did well in the last land, but a new evil awaits you here. One small dirt path leads out of town and into the dense jungle.', 2, 0, 0, 5, 0, '', 0, 0, 0, 'In Town', '', 0),
(5, 'Numoren''s Portal', 'Deep in the heart of the jungles that cover this land, you come to a clearing. In the center of the clearing are two large upright stones, with one more stone on top. You walk around it, and looking through the doorway from one side only shows the other side of the clearing. But looking through it from the other side shows a dark hallway.\r\n\r\nWould you like to step through the magic doorway into the hall, or would you like some more time to get ready for this battle?', 2, 100, 100, 0, 202, '', 0, 0, 0, 'Fighting', '', 0),
(6, 'Numoren''s Ring', 'Numoren has fallen at your hand, and this land is safe. Shirreh''s second door, identical to the first except for the rune carvings at the top of the frame, appears in a wall behind you.\r\n\r\nAs Numoren''s body disappears in a puff of smoke, you hear a small jingling sound and notice a gold ring falling to the ground. Numoren''s ring glows and you can almost hear it calling your name.\r\n\r\nWould you like to pick up the ring, dear adventurer?', 2, 100, 100, 7, 0, '0,171,0', 3, 0, 0, '', 'goldbonus', 5),
(7, 'Forsaken Land', 'You step through Shirreh''s second door, and again feel the ground fall away for a few seconds. You come out of the darkness into a land even stranger than the last two. The sky is filled with dark storm clouds, but the clouds are a discomforting red color. The ground and trees are all bare. You are standing in what apparently used to be a town, but it''s completely deserted, and looks as if it has been for a long time.\r\n\r\nTwo signs hang from a tree nearby the doorway you came through. The first, which appears to be the only thing in town with a somewhat fresh coat of paint, points east and reads "Fort Kayne - 2 Miles."\r\n\r\nThe second is less friendly: "BEWARE CRESTFALL"', 3, 0, 0, 8, 0, '', 0, 0, 0, 'Exploring', '', 0),
(8, 'Lord of Plague', 'So much for killing Lucifuge any time soon. Now you have to deal with Crestfall. The castle you''ve seen from a distance looked ominous before, but now that you''re up close, it''s even worse. Skeletons of fallen warriors are hanging on crosses in the courtyard - these are the first signs of actual human "life" you''ve seen since you came through Shirreh''s door. All the bare and stunted trees are covered with flocks of ravens.\r\n\r\n"LORD OF PLAGUE" is carved in the stone above the gateway into the courtyard. With so much already accomplished, and Lucifuge still somewhere ahead of you, you have no other choice now, dear adventurer.', 3, -100, -100, 0, 203, '', 0, 0, 0, 'Fighting', '', 0),
(9, 'Bellerophon', 'Crestfall, the mortally-wounded Lord of Plague, lies writhing at your feet, and you are rather enjoying watching his throes of agony. As of yet, he has not exactly died, but instead he seems to... age... somehow. His skin is drying up and wrinkling, his hair is falling out, and before long all that''s left is a crusty old skeleton surrounded by a brilliantly gleaming chainmail coat.\r\n\r\nShirreh''s third door appears, but this time you can read the runes carved on it. And you don''t really like what the runes say.\r\n\r\nABANDON HOPE, ALL YE WHO ENTER HERE', 3, -100, -100, 10, 0, '0,172,0', 4, 0, 0, '', 'strength', 50),
(10, 'Inferno', 'The last land was weird. This land is... spooky. You find yourself in the middle of a desert. The dark red clouds still cover the sky, but now the dry and cracked ground is also red. The exact same color as blood. Everywhere, you can see little vents of steam drifting up from the ground. Whoever - or whatever - created this place must not have much need for decoration. Other than the steam vents, the landscape is completely flat and featureless for miles around.\r\n\r\nOne nice thing about the land being so featureless is that you''ll at least be able to see your enemies long before they ever actually get close enough to do any damage.\r\n\r\nWith nothing but a vague feeling that you should probably head south, you decide not to stick around and wait for something to try eating you for breakfast.', 4, 0, 0, 11, 0, '', 0, 0, 0, 'Exploring', '', 0),
(11, 'Welcome To My Parlor', 'At long last, you''ve made it. Lucifuge''s mountain fortress is all that stands between you and world peace. The huge black gates swing open, awating your entry, before you even arrive. No sunlight penetrates into the courtyard, even though you can''t see anything really blocking it out. The only light inside seems to be coming directly from the great stone gargoyle statue in the center.\r\n\r\nBut as you get closer, the stone gargoyle stands up and turns around.\r\n\r\n"Greetings, human. Lucifuge has been expecting you. He doesn''t really like to be bothered, though, so I''m here to take care of you."', 4, -100, 100, 0, 204, '', 0, 0, 0, 'Fighting', '', 0),
(12, 'Throneguard''s Demise', 'The throneguard screams, and falls. From deep in the bowels of the fortress, you hear a roar so loud that even the ground is shaking beneath you.\r\n\r\nYou have nowhere left to go but inside the fortress, and you''ve come too far to give up now.', 4, -100, 100, 0, 205, '', 0, 0, 0, 'Fighting', '', 0),
(13, 'The Light Restored', 'Lucifuge, the overlord of all the evil that has destroyed this land, lies vanquished at your feet. You take his heart, still warm and dripping with his black blood, and put it in your pack, next to the one you already took from Razora.\r\n\r\nYou can''t help but be mildly disturbed by the last words uttered by Lucifuge before he died, though...\r\n\r\n"But... Xiran said it wouldn''t be like this."', 4, -100, 100, 14, 0, '', 5, 0, 0, '', 'dexterity', 50),
(14, 'The Blacklands', 'Just as you''re catching your breath, the fortress starts to shake and the floor crumbles beneath you. You fall for what seems like an eternity, until finally landing in yet another place. The ground and sky are both black. This land, like the last, is also dotted with little vents in the ground - here, though, the vents spout fire instead of steam. And it''s a good thing, too, because in this place there is no sun. The fire vents are your only source of light. Thankfully the place where you fell is only a short distance from what looks like a town.\r\n\r\nAs you enter the place, which the sign out front identifies as simply "Outpost 5," the guards tell you just what you''ve been waiting for: your quest isn''t over.\r\n\r\n"Lucifuge was Xiran''s highest ranking general. But he was still only second in command. Xiran himself is locked in his ice prison, Dreadguard, to the north. Shirreh banished him there ages ago, and throughout the centuries these outposts have served as guard stations to make sure he doesn''t escape. But now through the work of Lucifuge, Xiran could regain enough of his strength to escape the prison and destroy the world. You must hurry, traveller. Your only chance at killing Xiran rests on getting there while Xiran is still chained down."', 5, 0, 0, 15, 0, '', 0, 0, 0, 'In Town', '', 0),
(15, 'Xiran''s Minion', 'The ice prison Dreadguard looms tall and white before you. In an odd little twist that seems to defy all logic, more of the fire vents seem to be coming straight out of the ice.\r\n\r\nAs you come close to the prison, a large beast strides out towards you. The beast has the body of a man, but the head of a snake, and wings like a bat.\r\n\r\nJust before drawing its sword and preparing to fight, the beast calls out a warning: "Take heed, hero, you now come to the palace of Xiran, and it shall not fall quietly. Better souls than yours now inhabit this place, and Xiran takes pleasure in their eternal torment."', 5, 100, 100, 0, 206, '', 0, 0, 0, 'Fighting', '', 0),
(16, 'Xiran''s Cardinal', 'As the minion falls, another figure steps out of the darkness. This one looks like a man, a plain ordinary man. The Cardinal, highest among all the mortals who worship Xiran, wears only a plain black cloak, and carries nothing more than a walking stick.\r\n\r\nSurely it can''t be this easy...', 5, 100, 100, 0, 207, '', 0, 0, 0, 'Fighting', '', 0),
(17, 'The Demon God', 'With both the minion and the Cardinal slain, you enter the prison. The entire building seems to be one huge room, and in the very center of it is the demon god, Xiran. He looks something like a man, except he is about twenty feet tall and covered with black scales. Two horns are coming out of his head, and his eyes are bright red. His arms are stretched out, held by massive chains to the walls. But despite the obvious pain this is causing him, he seems to be smiling at you.\r\n\r\n"Welcome, mortal. I''m glad you''ve come, for it is you who shall set me free."', 5, 100, 100, 0, 208, '', 0, 0, 0, 'Fighting', '', 0),
(18, 'Bonds Broken', 'After a great battle, Xiran finally sags down as far as the chains will stretch. The red light from his eyes dims and goes out. You listen closely, and the beating from his huge heart slows and finally stops altogether.\r\n\r\nSuddenly the temperature drops, and the huge chains holding Xiran''s lifeless body get frosty with ice crystals. Then you see the chains glowing beneath the layer of ice, and with a thunderous crack, the shackles break and fall away from Xiran''s hands.\r\n\r\nImmediately his eyes flash, and almost before you can blink, Xiran has lept into the air and a great sword has appeared in his hands.\r\n\r\n"See, mortal! I told you I would be freed. You should have left well enough alone in matters that did not concern you. You''ve come so far, it will be such a shame to have to kill you now."', 5, 100, 100, 0, 209, '', 0, 0, 0, 'Fighting', 'energy', 50),
(19, 'Epilogue', 'With one final triumphant swing, you pierce Xiran''s heart and immediately your weapon disintegrates in front of your eyes. Xiran falls to the ground, and as the walls of the ice prison are falling down around you, Xiran''s body bursts into flames and is utterly consumed in seconds, leaving only a pile of ash on the floor.\r\n\r\nHis sword, though, remains unscathed by the fire, so as you are looking for the quickest way out of the crumbling building, you grab it and sling it over your shoulder. It''s only fair, after all, since the demon god''s heart took your own weapon away from you.\r\n\r\nYou make your way back to the last outpost, and the entire population has come out to see you. After many long ages, the dreadful task of awating Xiran''s escape has been lifted from their shoulders.\r\n\r\nNow that you''ve finally saved the world, you can''t wait to have a drink...\r\n\r\nThe End', 5, 100, 100, 20, 0, '0,173,0', 0, 0, 0, '', '', 0),
(20, 'Fin', 'You have now beat the game and have been added to the Scroll of Heroes. You may continue playing if you want, or of course you could also take a well-deserved rest. Thank you for playing, and we hope you''ve enjoyed it.', 5, 100, 100, 9999, 0, '', 0, 0, 0, '', '', 0);
DROP TABLE IF EXISTS `<<towns>>`;
CREATE TABLE `<<towns>>` (
`id` tinyint(3) unsigned NOT NULL auto_increment,
`name` varchar(30) NOT NULL default '',
`world` tinyint(3) unsigned NOT NULL default '0',
`latitude` smallint(6) NOT NULL default '0',
`longitude` smallint(6) NOT NULL default '0',
`innprice` int(10) unsigned NOT NULL default '0',
`mapprice` int(10) unsigned NOT NULL default '0',
`travelpoints` smallint(5) unsigned NOT NULL default '0',
`itemminlvl` int(10) unsigned NOT NULL default '0',
`itemmaxlvl` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM ;
INSERT INTO `<<towns>>` (`id`, `name`, `world`, `latitude`, `longitude`, `innprice`, `mapprice`, `travelpoints`, `itemminlvl`, `itemmaxlvl`) VALUES
(1, 'Middleton', 1, 0, 0, 5, 0, 0, 1, 5),
(2, 'Norfolk', 1, 25, 25, 10, 25, 5, 3, 8),
(3, 'Calentia', 1, 50, -50, 25, 50, 15, 6, 11),
(4, 'Resmark', 1, -75, 75, 40, 100, 30, 9, 14),
(5, 'Erdricksburg', 1, 99, 99, 60, 500, 50, 12, 17),
(6, 'Lorensgaard', 2, 0, 0, 75, 0, 40, 15, 20),
(7, 'Nailes', 2, 17, -23, 100, 150, 55, 18, 23),
(8, 'Nostrum', 2, 46, 33, 150, 300, 70, 21, 27),
(9, 'Vauderellin', 2, -70, 65, 200, 500, 85, 24, 30),
(10, 'Underwood', 2, -95, -95, 250, 750, 90, 27, 33),
(11, 'Fort Kayne', 3, 0, 2, 200, 0, 75, 30, 36),
(12, 'Fort Minor', 3, -20, -25, 250, 800, 100, 33, 40),
(13, 'Fort Oligard', 3, 48, 37, 300, 1000, 125, 37, 44),
(14, 'Fort Wilmor', 3, 78, 68, 350, 1200, 150, 41, 48),
(15, 'Fort Plastid', 3, 98, 98, 400, 1400, 175, 45, 52),
(16, 'Luxor', 4, -5, 0, 200, 0, 200, 49, 56),
(17, 'Trake', 4, -20, 5, 300, 1800, 225, 53, 60),
(18, 'Cormorent', 4, -40, 15, 400, 2000, 250, 57, 64),
(19, 'Illuvian', 4, -60, 35, 500, 2500, 275, 61, 68),
(20, 'Pogue', 4, -80, 60, 600, 3000, 300, 65, 72),
(21, 'Outpost 5', 5, 0, 0, 350, 0, 325, 69, 76),
(22, 'Outpost 7', 5, 20, 20, 500, 3500, 350, 73, 80),
(23, 'Outpost 15', 5, 35, -55, 650, 4000, 375, 77, 82),
(24, 'Outpost 22', 5, -74, -69, 800, 4500, 400, 80, 84),
(25, 'Outpost 42', 5, 89, 94, 950, 5000, 425, 83, 85);
DROP TABLE IF EXISTS `<<users>>`;
CREATE TABLE `<<users>>` (
`id` int(10) unsigned NOT NULL auto_increment,
`account` int(10) unsigned NOT NULL default '0',
`birthdate` datetime NOT NULL default '0000-00-00 00:00:00',
`lastip` varchar(16) NOT NULL default '',
`onlinetime` datetime NOT NULL default '0000-00-00 00:00:00',
`exploreverify` varchar(6) NOT NULL default '',
`exploreverifyimage` varchar(12) NOT NULL default '',
`explorefailed` int(10) unsigned NOT NULL default '0',
`charname` varchar(30) NOT NULL default '',
`charclass` tinyint(3) unsigned NOT NULL default '0',
`charpicture` varchar(100) NOT NULL default '',
`difficulty` float unsigned NOT NULL default '1',
`deathpenalty` tinyint(3) unsigned NOT NULL default '0',
`latitude` smallint(6) NOT NULL default '0',
`longitude` smallint(6) NOT NULL default '0',
`story` tinyint(3) unsigned NOT NULL default '1',
`storylat` smallint(6) NOT NULL default '0',
`storylon` smallint(6) NOT NULL default '0',
`world` tinyint(3) unsigned NOT NULL default '1',
`guild` int(10) unsigned NOT NULL default '0',
`guildrank` int(10) unsigned NOT NULL default '0',
`guildtag` varchar(4) NOT NULL default '',
`tagcolor` varchar(7) NOT NULL default '',
`namecolor` varchar(7) NOT NULL default '',
`level` smallint(5) unsigned NOT NULL default '1',
`levelup` int(10) unsigned NOT NULL default '0',
`levelspell` int(10) unsigned NOT NULL default '0',
`experience` int(10) unsigned NOT NULL default '0',
`expbonus` tinyint(4) NOT NULL default '0',
`gold` int(10) unsigned NOT NULL default '150',
`goldbonus` tinyint(4) NOT NULL default '0',
`bank` int(10) unsigned NOT NULL default '0',
`maxhp` smallint(5) unsigned NOT NULL default '15',
`maxmp` smallint(5) unsigned NOT NULL default '5',
`maxtp` smallint(5) unsigned NOT NULL default '5',
`currenthp` smallint(5) unsigned NOT NULL default '15',
`currentmp` smallint(5) unsigned NOT NULL default '5',
`currenttp` smallint(5) unsigned NOT NULL default '5',
`strength` smallint(5) unsigned NOT NULL default '0',
`dexterity` smallint(5) unsigned NOT NULL default '0',
`life` smallint(5) unsigned NOT NULL default '0',
`energy` smallint(5) unsigned NOT NULL default '0',
`physattack` smallint(5) unsigned NOT NULL default '5',
`physdefense` smallint(5) unsigned NOT NULL default '5',
`magicattack` smallint(5) unsigned NOT NULL default '0',
`magicdefense` smallint(5) unsigned NOT NULL default '0',
`fireattack` smallint(5) unsigned NOT NULL default '0',
`firedefense` smallint(5) unsigned NOT NULL default '0',
`lightattack` smallint(5) unsigned NOT NULL default '0',
`lightdefense` smallint(5) unsigned NOT NULL default '0',
`spellslist` varchar(200) NOT NULL default '0',
`townslist` varchar(200) NOT NULL default '0,1',
`pvpwins` int(10) unsigned NOT NULL default '0',
`pvplosses` int(10) unsigned NOT NULL default '0',
`pvphighest` int(10) unsigned NOT NULL default '0',
`currentpvp` bigint(20) unsigned NOT NULL default '0',
`currentaction` varchar(30) NOT NULL default 'In Town',
`currentfight` tinyint(3) unsigned NOT NULL default '0',
`currentmonsterid` smallint(5) unsigned NOT NULL default '0',
`currentmonsterhp` smallint(5) unsigned NOT NULL default '0',
`currentmonstersleep` tinyint(3) unsigned NOT NULL default '0',
`dropidstring` varchar(10) NOT NULL default '0',
`item1idstring` varchar(10) NOT NULL default '0',
`item2idstring` varchar(10) NOT NULL default '0',
`item3idstring` varchar(10) NOT NULL default '0',
`item4idstring` varchar(10) NOT NULL default '0',
`item5idstring` varchar(10) NOT NULL default '0',
`item6idstring` varchar(10) NOT NULL default '0',
`item1name` varchar(200) NOT NULL default '',
`item2name` varchar(200) NOT NULL default '',
`item3name` varchar(200) NOT NULL default '',
`item4name` varchar(200) NOT NULL default '',
`item5name` varchar(200) NOT NULL default '',
`item6name` varchar(200) NOT NULL default '',
`spell1id` int(10) unsigned NOT NULL default '0',
`spell2id` int(10) unsigned NOT NULL default '0',
`spell3id` int(10) unsigned NOT NULL default '0',
`spell4id` int(10) unsigned NOT NULL default '0',
`spell5id` int(10) unsigned NOT NULL default '0',
`spell6id` int(10) unsigned NOT NULL default '0',
`spell7id` int(10) unsigned NOT NULL default '0',
`spell8id` int(10) unsigned NOT NULL default '0',
`spell9id` int(10) unsigned NOT NULL default '0',
`spell10id` int(10) unsigned NOT NULL default '0',
`spell1name` varchar(30) NOT NULL default '',
`spell2name` varchar(30) NOT NULL default '',
`spell3name` varchar(30) NOT NULL default '',
`spell4name` varchar(30) NOT NULL default '',
`spell5name` varchar(30) NOT NULL default '',
`spell6name` varchar(30) NOT NULL default '',
`spell7name` varchar(30) NOT NULL default '',
`spell8name` varchar(30) NOT NULL default '',
`spell9name` varchar(30) NOT NULL default '',
`spell10name` varchar(30) NOT NULL default '',
`hpleech` tinyint(3) unsigned NOT NULL default '0',
`mpleech` tinyint(3) unsigned NOT NULL default '0',
`hpgain` tinyint(3) unsigned NOT NULL default '0',
`mpgain` tinyint(3) unsigned NOT NULL default '0',
`bonusattack` smallint(5) unsigned NOT NULL default '0',
`bonusdefense` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
FULLTEXT KEY `item1name` (`item1name`)
) TYPE=MyISAM ;
DROP TABLE IF EXISTS `<<worlds>>`;
CREATE TABLE `<<worlds>>` (
`id` smallint(5) unsigned NOT NULL auto_increment,
`name` varchar(30) NOT NULL default '',
`size` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM ;
INSERT INTO `<<worlds>>` (`id`, `name`, `size`) VALUES
(1, 'Raenslide', 100),
(2, 'Lorenfall', 100),
(3, 'Borderlands', 100),
(4, 'Inferno', 100),
(5, 'Unreality', 100);

246
lib.php
View File

@ -1,29 +1,76 @@
<?php // lib.php :: Common functions used throughout the program.
<?php
// lib.php :: Common functions used throughout the program.
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
//if (file_exists("install.php")) { die("Please remove the <b>install.php</b> and <b>install.sql</b> files from your game directory before continuing."); }
//if (file_exists("install.sql")) { die("Please remove the install.php file from your game directory before continuing."); }
// Setup for superglobal stuff that can't go in globals.php.
$starttime = getmicrotime();
$numqueries = 0;
$link = opendb();
$version = "Beta 2";
$bnumber = "12";
$bname = "Eggs";
$bdate = "12.10.2005";
$version = "Beta 5";
$bnumber = "20";
$bname = "Consolation Prize Part Deux";
$bdate = "9.2.2007";
include("lib2.php");
// Handling for servers with magic_quotes turned on.
// Example from php.net.
if (get_magic_quotes_gpc()) {
$_POST = array_map('stripslashes_deep', $_POST);
$_GET = array_map('stripslashes_deep', $_GET);
$_COOKIE = array_map('stripslashes_deep', $_COOKIE);
$_POST = array_map('uber_ss', $_POST);
$_GET = array_map('uber_ss', $_GET);
$_COOKIE = array_map('uber_ss', $_COOKIE);
}
$_POST = array_map('addslashes_deep', $_POST);
$_POST = array_map('makesafe', $_POST);
$_GET = array_map('addslashes_deep', $_GET);
$_GET = array_map('makesafe', $_GET);
$_COOKIE = array_map('addslashes_deep', $_COOKIE);
$_COOKIE = array_map('makesafe', $_COOKIE);
$_POST = array_map('uber_mres', $_POST);
$_POST = array_map('uber_hsc', $_POST);
$_GET = array_map('uber_mres', $_GET);
$_GET = array_map('uber_hsc', $_GET);
$_COOKIE = array_map('uber_mres', $_COOKIE);
$_COOKIE = array_map('uber_hsc', $_COOKIE);
function uber_ss($value) {
$value = is_array($value) ?
array_map('uber_ss', $value) :
stripslashes($value);
return $value;
}
function uber_mres($value) {
$value = is_array($value) ?
array_map('uber_mres', $value) :
mysql_real_escape_string($value);
return $value;
}
function uber_hsc($value) {
$value = is_array($value) ?
array_map('uber_hsc', $value) :
htmlspecialchars($value);
return $value;
}
function opendb() { // Open database connection.
@ -35,31 +82,50 @@ function opendb() { // Open database connection.
}
function doquery($query, $table) { // Something of a tiny little database abstraction layer.
function doquery($query) { // Something of a tiny little database abstraction layer.
include('config.php');
global $numqueries;
$sqlquery = mysql_query(str_replace("{{table}}", $dbsettings["prefix"] . "_" . $table, $query)) or die(mysql_error() . "<br /><br />$query");
global $numqueries, $controlrow;
$sqlquery = mysql_query(preg_replace('/<<([a-zA-Z0-9_\-]+)>>/', $dbsettings["prefix"].'_$1', $query));
if ($sqlquery == false) {
if ($controlrow["debug"] == 1) { die(mysql_error() . "<br /><br />" . $query); } else { die("A MySQL query error occurred. Please contact the game administrator for more help."); }
}
$numqueries++;
return $sqlquery;
}
function dorow($sqlquery) { // Abstraction layer part deux.
function dorow($sqlquery, $force = "") { // Abstraction layer part deux.
switch(mysql_num_rows($sqlquery)) {
switch (mysql_num_rows($sqlquery)) {
case 0:
$row = false;
break;
case 1:
$row = mysql_fetch_array($sqlquery, MYSQL_ASSOC);
if ($force == "") {
$row = mysql_fetch_assoc($sqlquery);
} else {
$temprow = mysql_fetch_assoc($sqlquery);
$row[$temprow[$force]] = $temprow;
}
break;
default:
$row = array();
while ($array = mysql_fetch_array($sqlquery, MYSQL_ASSOC)) {
$row[] = $array;
if ($force == "") {
while ($temprow = mysql_fetch_assoc($sqlquery)) {
$row[] = $temprow;
}
} else {
while ($temprow = mysql_fetch_assoc($sqlquery)) {
$row[$temprow[$force]] = $temprow;
}
}
break;
}
return $row;
}
@ -81,18 +147,6 @@ function parsetemplate($template, $array) { // Replace template with proper cont
}
function prettydate($uglydate) { // Change the MySQL date format (YYYY-MM-DD) into something friendlier.
return date("F j, Y", mktime(0,0,0,substr($uglydate, 5, 2),substr($uglydate, 8, 2),substr($uglydate, 0, 4)));
}
function prettyforumdate($uglydate) { // Change the MySQL date format (YYYY-MM-DD) into something friendlier.
return date("F j, Y\<\b\\r \/\>G:i", mktime(0,0,0,substr($uglydate, 5, 2),substr($uglydate, 8, 2),substr($uglydate, 0, 4)));
}
function getmicrotime() { // Used for timing script operations.
list($usec, $sec) = explode(" ",microtime());
@ -106,69 +160,46 @@ function is_email($email) { // Thanks to "mail(at)philipp-louis.de" from php.net
}
function stripslashes_deep($value) {
$value = is_array($value) ?
array_map('stripslashes_deep', $value) :
stripslashes($value);
return $value;
}
function mymail($to, $title, $body, $from = '') { // thanks to arto dot PLEASE dot DO dot NOT dot SPAM at artoaaltonen dot fi.
function addslashes_deep($value) {
global $controlrow;
extract($controlrow);
$value = is_array($value) ?
array_map('addslashes_deep', $value) :
addslashes($value);
return $value;
}
function makesafe($d) {
$from = trim($from);
if (!$from) {
$from = "<$adminemail>";
}
$d = str_replace("\t","",$d);
$d = str_replace("<","&#60;",$d);
$d = str_replace(">","&#62;",$d);
$d = str_replace("\n","",$d);
$d = str_replace("|","??",$d);
$d = str_replace(" "," &nbsp;",$d);
return $d;
$rp = $adminemail;
$org = "$gameurl";
$mailer = "PHP";
$head = "";
$head .= "Content-Type: text/plain \r\n";
$head .= "Date: ". date('r'). " \r\n";
$head .= "Return-Path: $rp \r\n";
$head .= "From: $from \r\n";
$head .= "Sender: $from \r\n";
$head .= "Reply-To: $from \r\n";
$head .= "Organization: $org \r\n";
$head .= "X-Sender: $from \r\n";
$head .= "X-Priority: 3 \r\n";
$head .= "X-Mailer: $mailer \r\n";
$body = str_replace("\r\n", "\n", $body);
$body = str_replace("\n", "\r\n", $body);
return mail($to, $title, $body, $head);
}
function err($error, $system = false, $panels = true) { // Basic little error handler.
display("Error", $error, $panels);
/*
// Don't display major system errors (sql errors).
if ($system == true) {
if ($handle = fopen("errorlog/errorlog.txt", 'a')) {
$written = fwrite($handle, $error."\n");
fclose($handle);
}
if ($written != false) {
display("Error", "A critical game system error has occurred.<br /><br />Please have the game administrator check the game error logs and fix the problem.<br /><br />Please <a href=\"index.php\">go back</a> and try again.");
} else {
display("Error", "A critical game system error has occurred. Additionally, an error occurred when trying to create a game error log entry. Please have the game administrator check the server logs and fix the problem.<br /><br />Please <a href=\"index.php\">go back</a> and try again.");
}
} else {
display("Error", $error);
}
*/
}
function updateuserrow() {
global $userrow;
$querystring = "";
foreach($userrow as $a=>$b) {
$querystring .= "$a='$b',";
}
$querystring = rtrim($querystring, ",");
$query = doquery("UPDATE {{table}} SET $querystring WHERE id='".$userrow["id"]."' LIMIT 1", "users");
$errmsg = "One or more errors have occurred:<br /><br /><b>$error</b><br /><br />Please <a href=\"javascript:history.go(-1);\">go back</a> and try again.";
display("Error", $errmsg, $panels);
}
function display($title, $content, $panels = true) { // Finalize page and output to browser.
@ -177,7 +208,7 @@ function display($title, $content, $panels = true) { // Finalize page and output
global $controlrow, $userrow, $worldrow, $numqueries, $starttime, $version, $build;
if (!isset($controlrow)) {
$controlrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='1' LIMIT 1", "control"));
$controlrow = dorow(doquery("SELECT * FROM <<control>> WHERE id='1' LIMIT 1"));
}
// Make page tags for XHTML validation.
@ -190,11 +221,17 @@ function display($title, $content, $panels = true) { // Finalize page and output
$row = array();
$row["gamename"] = $controlrow["gamename"];
$row["pagetitle"] = $title;
$row["background"] = "background";
$row["background"] = "background" . $userrow["world"];
$row["version"] = $version;
$row["numqueries"] = $numqueries;
$row["totaltime"] = round(getmicrotime()-$starttime,4);
$row["content"] = $content;
$row["moddedby"] = $controlrow["moddedby"];
if ($controlrow["forumurl"] != "") { $row["forumslink"] = "<a href=\"".$controlrow["forumurl"]."\">Support Forums</a>"; } else { $row["forumslink"] = ""; }
if ($controlrow["debug"] == 1) { $row["debug"] = "/ " . $numqueries . " Queries / " . round(getmicrotime()-$starttime,4) . " Seconds"; } else { $row["debug"] = ""; }
if ($row["moddedby"] != "") {
$row["info"] = $row["moddedby"];
} else {
$row["info"] = "Version <a href=\"index.php?do=version\">" . $row["version"] . "</a> " . $row["debug"];
}
// Setup for side panels.
include("panels.php");
@ -211,7 +248,25 @@ function display($title, $content, $panels = true) { // Finalize page and output
$row["bottomnav"] = "";
}
//if(md5_file("templates/primary.php") != "0aeec5eb64ff875a697142528afe8fc7") { die("Primary template modified. Cannot continue."); }
$page = rtrim($page, "<-!");
$page .= <<<THEVERYENDOFYOU
<table cellspacing="0" cellpadding="3" style="width: 95px; color: #ffffff; border: solid 1px #ffffff; background-color: #000000; margin-top: 2px;">
<tr>
<td width="40%">
{{info}}
</td>
<td width="20%" style="text-align: center;">
{{forumslink}}
</td>
<td width="40%" style="text-align:right;">
<a href="index.php?do=version">Dragon Scourge</a> &copy; by <a href="http://www.renderse7en.com">renderse7en</a>.
</td>
</tr>
</table>
</center></body>
</html>
THEVERYENDOFYOU;
// Finalize control array for output.
$page = parsetemplate($page, $row);
@ -219,7 +274,6 @@ function display($title, $content, $panels = true) { // Finalize page and output
if ($controlrow["compression"] == 1) { ob_start("ob_gzhandler"); }
echo $page;
die();
}
?>

131
lib2.php Normal file
View File

@ -0,0 +1,131 @@
<?php // lib2.php :: functions with an arguably narrower focus than the stuff in the primary library.
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
function updateuserrow() {
global $userrow;
$userrow = array_map("uber_mres", $userrow);
$querystring = "";
foreach($userrow as $a=>$b) {
$querystring .= "$a='$b',";
}
$querystring = rtrim($querystring, ",");
$query = doquery("UPDATE <<users>> SET $querystring WHERE id='".$userrow["id"]."' LIMIT 1");
}
function builditem($prefix, $baseitem, $suffix, $modrow) { // Copy of town.php's builditem().
global $controlrow, $acctrow, $userrow;
// First setup the basic item attributes.
$baseitem["baseid"] = $baseitem["id"];
$baseitem["fullid"] = $baseitem["id"];
$baseitem["attrtype"] = $modrow[$baseitem["basename"]]["prettyname"];
$baseitem["basevalue"] = $baseitem["baseattr"];
$baseitem["image"] = "";
// Next give pretty names to any item modifiers.
$baseitem["itemmods"] = "";
for($j=1; $j<7; $j++) {
if ($baseitem["mod".$j."name"] != "") {
$baseitem["itemmods"] .= $modrow[$baseitem["mod".$j."name"]]["prettyname"] . ": +" . $baseitem["mod".$j."attr"];
if ($modrow[$baseitem["mod".$j."name"]]["percent"] == 1) { $baseitem["itemmods"] .= "%"; }
$baseitem["itemmods"] .= "<br />\n";
}
}
// Add prefix mods if applicable.
if ($prefix != false) {
$baseitem["fullid"] = $prefix["id"] . "," . $baseitem["fullid"];
$baseitem["name"] = $prefix["name"] . " " . $baseitem["name"];
$baseitem["buycost"] += $prefix["buycost"];
$baseitem["sellcost"] += $prefix["sellcost"];
$baseitem["reqlevel"] = max($baseitem["reqlevel"], $prefix["reqlevel"]);
$baseitem["reqstrength"] += $prefix["reqstrength"];
$baseitem["reqenergy"] += $prefix["reqenergy"];
$baseitem["reqdexterity"] += $prefix["reqdexterity"];
$baseitem["itemmods"] .= $modrow[$prefix["basename"]]["prettyname"] . ": +" . $prefix["baseattr"];
if ($modrow[$prefix["basename"]]["percent"] == 1) { $baseitem["itemmods"] .= "%"; }
$baseitem["itemmods"] .= "<br />\n";
} else { $baseitem["fullid"] = "0," . $baseitem["fullid"]; }
// Add suffix mods if applicable.
if ($suffix != false) {
$baseitem["fullid"] .= "," . $suffix["id"];
$baseitem["name"] .= " " . $suffix["name"];
$baseitem["buycost"] += $suffix["buycost"];
$baseitem["sellcost"] += $suffix["sellcost"];
$baseitem["reqlevel"] = max($baseitem["reqlevel"], $suffix["reqlevel"]);
$baseitem["reqstrength"] += $suffix["reqstrength"];
$baseitem["reqenergy"] += $suffix["reqenergy"];
$baseitem["reqdexterity"] += $suffix["reqdexterity"];
$baseitem["itemmods"] .= $modrow[$suffix["basename"]]["prettyname"] . ": +" . $suffix["baseattr"];
if ($modrow[$suffix["basename"]]["percent"] == 1) { $baseitem["itemmods"] .= "%"; }
$baseitem["itemmods"] .= "<br />\n";
} else { $baseitem["fullid"] .= ",0"; }
// Check requirements.
$baseitem["requirements"] = true;
if ($baseitem["reqlevel"] == 1) { $baseitem["level"] = ""; } else {
$baseitem["level"] = "Required Level: " . $baseitem["reqlevel"];
if ($baseitem["reqlevel"] > $userrow["level"]) {
$baseitem["level"] = "<span class=\"red\">".$baseitem["level"]."</span>";
$baseitem["requirements"] = false;
}
$baseitem["level"] .= "<br />\n";
}
if ($baseitem["reqstrength"] == 0) { $baseitem["strength"] = ""; } else {
$baseitem["strength"] = "Required Strength: " . $baseitem["reqstrength"];
if ($baseitem["reqstrength"] > $userrow["strength"]) {
$baseitem["strength"] = "<span class=\"red\">".$baseitem["strength"]."</span>";
$baseitem["requirements"] = false;
}
$baseitem["strength"] .= "<br />\n";
}
if ($baseitem["reqdexterity"] == 0) { $baseitem["dexterity"] = ""; } else {
$baseitem["dexterity"] = "Required Dexterity: " . $baseitem["reqdexterity"];
if ($baseitem["reqdexterity"] > $userrow["dexterity"]) {
$baseitem["dexterity"] = "<span class=\"red\">".$baseitem["dexterity"]."</span>";
$baseitem["requirements"] = false;
}
$baseitem["dexterity"] .= "<br />\n";
}
if ($baseitem["reqenergy"] == 0) { $baseitem["energy"] = ""; } else {
$baseitem["energy"] = "Required Energy: " . $baseitem["reqenergy"];
if ($baseitem["reqenergy"] > $userrow["energy"]) {
$baseitem["energy"] = "<span class=\"red\">".$baseitem["energy"]."</span>";
$baseitem["requirements"] = false;
}
$baseitem["energy"] .= "<br />\n";
}
if ($controlrow["showitemimages"] == 1) {
$baseitem["image"] = "<img src=\"images/items/".$baseitem["slotnumber"].$acctrow["imageformat"]."\" alt=\"".$baseitem["name"]."\" title=\"".$baseitem["name"]."\" />";
} elseif ($controlrow["showitemimages"] == 2) {
$baseitem["image"] = "<img src=\"images/items/".$baseitem["id"].$acctrow["imageformat"]."\" alt=\"".$baseitem["name"]."\" title=\"".$baseitem["name"]."\" />";
} else {
$baseitem["image"] = "";
}
// And send it back.
return $baseitem;
}
?>

View File

@ -1,5 +1,19 @@
<?php // login.php :: Handles user logins and logouts.
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
include("lib.php");
if (isset($_GET["do"])) { $do = $_GET["do"]; } else { $do = ""; }
@ -13,22 +27,25 @@ switch($do) {
function login() {
$controlrow = dorow(doquery("SELECT * FROM <<control>> WHERE id='1' LIMIT 1"));
if (isset($_POST["submit"])) {
// Setup.
include("config.php");
extract($_POST);
$query = doquery("SELECT id,password FROM {{table}} WHERE username='$username' LIMIT 1", "accounts");
$query = doquery("SELECT * FROM <<accounts>> WHERE username='$username' LIMIT 1");
$row = dorow($query);
// Errors.
if ($row == false) { err("Invalid username. Please <a href=\"index.php\">go back</a> and try again.", false, false); }
if ($row["password"] != md5($password)) { err("Invalid password. Please <a href=\"index.php\">go back</a> and try again.", false, false); }
if ($row["verifycode"] != 1) { err("You have not yet verified your account. Please click the link found in your Account Verification email before continuing. If you never received the email, please check your spam filter settings or contact the game administrator for further assistance.", false, false); }
// Finish.
$newcookie = $row["id"] . " " . $username . " " . md5($row["password"] . "--" . $dbsettings["secretword"]);
if (isset($remember)) { $expiretime = time()+31536000; $newcookie .= " 1"; } else { $expiretime = 0; $newcookie .= " 0"; }
setcookie("scourge", $newcookie, $expiretime, "/", "", 0);
setcookie($controlrow["cookiename"], $newcookie, $expiretime, "/", $controlrow["cookiedomain"], 0);
die(header("Location: index.php"));
} else {
@ -41,7 +58,8 @@ function login() {
function logout() {
setcookie("scourge", "", (time()-3600), "/", "", 0);
include("globals.php");
setcookie($controlrow["cookiename"], "", (time()-3600), "/", $controlrow["cookiedomain"], 0);
die(header("Location: login.php?do=login"));
}

View File

@ -1,5 +1,19 @@
<?php // mailbox.php :: All Post Office functions.
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
// Before allowing anything else, we make sure the person is actually in town.
global $townrow;
if ($townrow == false) { die(header("Location: index.php")); }
@ -8,16 +22,11 @@ function mailbox() {
global $userrow;
$messagequery = doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM {{table}} WHERE recipientid='".$userrow["id"]."' ORDER BY postdate DESC", "messages");
$messages = dorow($messagequery);
$messages = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM <<messages>> WHERE recipientid='".$userrow["id"]."' ORDER BY postdate DESC"), "id");
$row["messages"] = "<table width=\"97%\">\n";
if (mysql_num_rows($messagequery) == 0) {
if ($messages == false) {
$row["messages"] .= "<tr><td>You do not have any messages.</td></tr>";
} elseif (mysql_num_rows($messagequery) == 1) {
if ($messages["status"] == 0) { $messages["new"] = "<span class=\"red\">*</span>"; } else { $messages["new"] = ""; }
if ($messages["gold"] != 0) { $messages["money"] = "<span class=\"blue\">\$</span>"; } else { $messages["money"] = ""; }
$row["messages"] .= parsetemplate(gettemplate("mailbox_listrow"), $messages);
} else {
foreach($messages as $a=>$b) {
if ($b["status"] == 0) { $b["new"] = "<span class=\"red\">*</span>"; } else { $b["new"] = ""; }
@ -35,14 +44,11 @@ function outbox() {
global $userrow;
$messagequery = doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM {{table}} WHERE senderid='".$userrow["id"]."' ORDER BY postdate DESC", "messages");
$messages = dorow($messagequery);
$messages = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM <<messages>> WHERE senderid='".$userrow["id"]."' ORDER BY postdate DESC"), "id");
$row["messages"] = "<table width=\"97%\">\n";
if (mysql_num_rows($messagequery) == 0) {
if ($messages == false) {
$row["messages"] .= "<tr><td>You do not have any sent messages.</td></tr>";
} elseif (mysql_num_rows($messagequery) == 1) {
$row["messages"] .= parsetemplate(gettemplate("mailbox_listoutrow"), $messages);
} else {
foreach($messages as $a=>$b) {
$row["messages"] .= parsetemplate(gettemplate("mailbox_listoutrow"), $b);
@ -59,7 +65,7 @@ function letter() {
global $userrow;
if (!is_numeric($_GET["id"])) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
$message = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM {{table}} WHERE id='".$_GET["id"]."' LIMIT 1", "messages"));
$message = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM <<messages>> WHERE id='".$_GET["id"]."' LIMIT 1"));
if ($message == false) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
if ($message["recipientid"] != $userrow["id"]) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
@ -73,11 +79,11 @@ function letter() {
// Reset status to old, and gold to zero, so they can't keep reading the message to get more money.
if ($message["status"] == 0) {
$statusquery = doquery("UPDATE {{table}} SET status='1', gold='0' WHERE id='".$_GET["id"]."' LIMIT 1", "messages");
$statusquery = doquery("UPDATE <<messages>> SET status='1', gold='0' WHERE id='".$_GET["id"]."' LIMIT 1");
}
// Pull the sender's userrow so we can show avatars.
$sender = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$message["senderid"]."' LIMIT 1", "users"));
$sender = dorow(doquery("SELECT * FROM <<users>> WHERE id='".$message["senderid"]."' LIMIT 1"));
if ($sender["charpicture"] != "") {
$message["senderavatar"] = "<img src=\"".$sender["charpicture"]."\" alt=\"".$sender["charname"]."\" width=\"50\" height=\"50\" />";
} else {
@ -94,7 +100,7 @@ function letterout() {
global $userrow;
if (!is_numeric($_GET["id"])) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
$message = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM {{table}} WHERE id='".$_GET["id"]."' LIMIT 1", "messages"));
$message = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM <<messages>> WHERE id='".$_GET["id"]."' LIMIT 1"));
if ($message == false) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
if ($message["senderid"] != $userrow["id"]) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
@ -113,7 +119,7 @@ function mailnew() {
extract($_POST);
$errors = 0; $errorlist = "";
if ($userrow["gold"] < 5) { $errors++; $errorlist .= "You do not have enough gold to cover the postage fee.<br />"; }
$checkuser = dorow(doquery("SELECT * FROM {{table}} WHERE charname='$recipient' LIMIT 1", "users"));
$checkuser = dorow(doquery("SELECT * FROM <<users>> WHERE charname='$recipient' LIMIT 1"));
if ($checkuser == false) { $errors++; $errorlist .= "There is no player with that Character Name.<br />"; }
if (trim($gold) != "") {
if (!is_numeric($gold)) { $errors++; $errorlist .= "The Send Gold field must be a number.<br />"; }
@ -132,7 +138,7 @@ function mailnew() {
updateuserrow();
// And send the message.
$send = doquery("INSERT INTO {{table}} SET id='', postdate=NOW(), senderid='".$userrow["id"]."', sendername='".$userrow["charname"]."', recipientid='".$checkuser["id"]."', recipientname='$recipient', status='0', title='$title', message='$message', gold='$gold'", "messages");
$send = doquery("INSERT INTO <<messages>> SET id='', postdate=NOW(), senderid='".$userrow["id"]."', sendername='".$userrow["charname"]."', recipientid='".$checkuser["id"]."', recipientname='$recipient', status='0', title='$title', message='$message', gold='$gold'");
display("Post Office", gettemplate("mailbox_sent"));
} else {
@ -153,7 +159,7 @@ function mailreply() {
global $userrow;
if (!is_numeric($_GET["id"])) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
$origmessage = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM {{table}} WHERE id='".$_GET["id"]."' LIMIT 1", "messages"));
$origmessage = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM <<messages>> WHERE id='".$_GET["id"]."' LIMIT 1"));
if ($origmessage == false) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
if ($origmessage["recipientid"] != $userrow["id"]) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
@ -163,7 +169,7 @@ function mailreply() {
extract($_POST);
$errors = 0; $errorlist = "";
if ($userrow["gold"] < 5) { $errors++; $errorlist .= "You do not have enough gold to cover the postage fee.<br />"; }
$checkuser = dorow(doquery("SELECT * FROM {{table}} WHERE charname='".$origmessage["sendername"]."' LIMIT 1", "users"));
$checkuser = dorow(doquery("SELECT * FROM <<users>> WHERE charname='".$origmessage["sendername"]."' LIMIT 1"));
if ($checkuser == false) { $errors++; $errorlist .= "There is no player with that Character Name.<br />"; }
if (trim($gold) != "") {
if (!is_numeric($gold)) { $errors++; $errorlist .= "The Send Gold field must be a number.<br />"; }
@ -181,7 +187,7 @@ function mailreply() {
updateuserrow();
// And send the message.
$send = doquery("INSERT INTO {{table}} SET id='', postdate=NOW(), senderid='".$userrow["id"]."', sendername='".$userrow["charname"]."', recipientid='".$origmessage["senderid"]."', recipientname='".$origmessage["sendername"]."', status='0', title='$title', message='$message', gold='$gold'", "messages");
$send = doquery("INSERT INTO <<messages>> SET id='', postdate=NOW(), senderid='".$userrow["id"]."', sendername='".$userrow["charname"]."', recipientid='".$origmessage["senderid"]."', recipientname='".$origmessage["sendername"]."', status='0', title='$title', message='$message', gold='$gold'");
display("Post Office", gettemplate("mailbox_sent"));
} else {
@ -205,11 +211,11 @@ function maildelete() {
global $userrow;
if (!is_numeric($_GET["id"])) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
$message = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM {{table}} WHERE id='".$_GET["id"]."' LIMIT 1", "messages"));
$message = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM <<messages>> WHERE id='".$_GET["id"]."' LIMIT 1"));
if ($message == false) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
if ($message["recipientid"] != $userrow["id"]) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
$delete = doquery("DELETE FROM {{table}} WHERE id='".$_GET["id"]."'", "messages");
$delete = doquery("DELETE FROM <<messages>> WHERE id='".$_GET["id"]."'");
die(header("Location: index.php?do=mailbox"));
}

View File

@ -1,49 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!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>Dragon Scourge Beta</title>
<style type="text/css">
body { font: 10px Verdana; background-image: url(images/background.jpg); padding: 0px; }
table { font: 10px Verdana; }
td { vertical-align: top; }
input { font: 10px Verdana; }
img { border-style: none; }
a { color: #996600; text-decoration: none; font-weight: bold; }
a:hover { color: #663300; }
.main { border: solid 1px black; }
.grey { color: #999999; }
.red { color: #ff0000; }
.blue { color: #0000ff; }
.big { font: 11px Verdana; background-color: #dddddd; border: solid 1px #aaaaaa; padding: 2px; margin-bottom: 3px; }
</style>
</head>
<body><center>
<table cellspacing="0" cellpadding="3" style="width: 800px; height: 570px; border: solid 1px black; background-color: white; ">
<tr>
<td colspan="3" style="border-bottom: solid 1px #cccccc;">
<a href="index.php"><img src="play/images/logo.png" alt="Dragon Scourge Beta" title="Dragon Scourge Beta" /></a>
</td>
</tr>
<tr>
<td valign="top" style="height: 100%; padding: 10px;">
Please read <a href="http://se7enet.com/forums/showflat.php?Cat=&Number=7721&page=0&view=collapsed&sb=5&o=&fpart=&vc=#Post7721">THIS POST</a> on the forums before playing the game! This is very important, and if you don't read it, monkeys will come and eat your genitals.<br /><br />
Once you've done that, you are more than happy to...<br /><br />
<span class="big"><a href="http://dragonscourge.com/play">Play Dragon Scourge.</a>
</td>
</tr>
</table>
<table cellspacing="0" cellpadding="3" style="width: 800px; border: solid 1px black; background-color: white; margin-top: 2px;">
<tr>
<td width="50%">
</td>
<td width="50%" style="text-align:right;">
<a href="http://www.dragonscourge.com">Dragon Scourge</a> &copy; 2003-2005 by <a href="http://www.renderse7en.com">renderse7en</a>
</td>
</tr>
</table>
</center></body>
</html>

54
map.php
View File

@ -1,5 +1,19 @@
<?php // map.php :: full map flash controller.
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
include("lib.php");
include("globals.php");
@ -7,7 +21,7 @@ $perpix = 500 / ($worldrow["size"] * 2);
$text = "&";
// First do towns.
$towns = dorow(doquery("SELECT * FROM {{table}} WHERE world='".$worldrow["id"]."'", "towns"));
$towns = dorow(doquery("SELECT * FROM <<towns>> WHERE world='".$worldrow["id"]."'"));
$text .= "towns=".sizeof($towns)."&";
$count = 0;
foreach($towns as $a=>$b) {
@ -30,19 +44,37 @@ $text .= "player_x=".$x."&";
$text .= "player_y=".$y."&";
$text .= "player_name=".$userrow["charname"]."&";
$users = doquery("SELECT * FROM {{table}} WHERE world='".$worldrow["id"]."' AND UNIX_TIMESTAMP(onlinetime) >= '".(time()-600)."' AND id != '".$userrow["id"]."'", "users");
$text .= "users=".mysql_num_rows($users)."&";
// Then do everyone else.
$users = dorow(doquery("SELECT * FROM <<users>> WHERE world='".$worldrow["id"]."' AND UNIX_TIMESTAMP(onlinetime) >= '".(time()-600)."' AND id != '".$userrow["id"]."'"), "id");
if ($users) { $text .= "users=".count($users)."&"; } else { $text .= "users=0&"; }
$count = 0;
while ($b = mysql_fetch_array($users)) {
$lat = $b["latitude"];
$lon = $b["longitude"];
if ($users != false) {
foreach ($users as $a => $b) {
$lat = $b["latitude"];
$lon = $b["longitude"];
if ($lat >= 0) { $y = ceil(($worldrow["size"] - $lat) * $perpix); } else { $y = 250 + ceil(($lat * -1) * $perpix); }
if ($lon >= 0) { $x = 250 + ceil($lon * $perpix); } else { $x = ceil(($worldrow["size"] + $lon) * $perpix); }
$text .= "user".$count."_x=".$x."&";
$text .= "user".$count."_y=".$y."&";
$text .= "user".$count."_name=".$b["charname"]."&";
$count++;
}
}
// Then do quests.
if ($userrow["story"] != "0" && $userrow["story"] != "9999") {
$lat = $userrow["storylat"];
$lon = $userrow["storylon"];
if ($lat >= 0) { $y = ceil(($worldrow["size"] - $lat) * $perpix); } else { $y = 250 + ceil(($lat * -1) * $perpix); }
if ($lon >= 0) { $x = 250 + ceil($lon * $perpix); } else { $x = ceil(($worldrow["size"] + $lon) * $perpix); }
$text .= "user".$count."_x=".$x."&";
$text .= "user".$count."_y=".$y."&";
$text .= "user".$count."_name=".$b["charname"]."&";
$count++;
}
$text .= "story=1&";
$text .= "story_x=".$x."&";
$text .= "story_y=".$y."&";
$text .= "story_name=Quest&";
} else { $text .= "story=0&"; }
echo($text);

BIN
map.swf

Binary file not shown.

View File

@ -1,5 +1,19 @@
<?php // mapmini.php :: minimap flash controller.
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
include("lib.php");
include("globals.php");
@ -7,7 +21,7 @@ $perpix = 100 / ($worldrow["size"] * 2);
$text = "&";
// First do towns.
$towns = dorow(doquery("SELECT * FROM {{table}} WHERE world='".$worldrow["id"]."'", "towns"));
$towns = dorow(doquery("SELECT * FROM <<towns>> WHERE world='".$worldrow["id"]."'"));
$text .= "towns=".sizeof($towns)."&";
$count = 0;
foreach($towns as $a=>$b) {
@ -28,19 +42,37 @@ if ($lon >= 0) { $x = 50 + ceil($lon * $perpix); } else { $x = ceil(($worldrow["
$text .= "player_x=".$x."&";
$text .= "player_y=".$y."&";
$users = doquery("SELECT * FROM {{table}} WHERE world='".$worldrow["id"]."' AND UNIX_TIMESTAMP(onlinetime) >= '".(time()-600)."' AND id != '".$userrow["id"]."'", "users");
$text .= "users=".mysql_num_rows($users)."&";
// Then do everyone else.
$users = dorow(doquery("SELECT * FROM <<users>> WHERE world='".$worldrow["id"]."' AND UNIX_TIMESTAMP(onlinetime) >= '".(time()-600)."' AND id != '".$userrow["id"]."'"), "id");
if ($users) { $text .= "users=".count($users)."&"; } else { $text .= "users=0&"; }
$count = 0;
while ($b = mysql_fetch_array($users)) {
$lat = $b["latitude"];
$lon = $b["longitude"];
if ($lat >= 0) { $y = ceil(($worldrow["size"] - $lat) * $perpix); } else { $y = 50 + ceil(($lat * -1) * $perpix); }
if ($lon >= 0) { $x = 50 + ceil($lon * $perpix); } else { $x = ceil(($worldrow["size"] + $lon) * $perpix); }
$text .= "user".$count."_x=".$x."&";
$text .= "user".$count."_y=".$y."&";
$count++;
if ($users != false) {
foreach ($users as $a => $b) {
$lat = $b["latitude"];
$lon = $b["longitude"];
if ($lat >= 0) { $y = ceil(($worldrow["size"] - $lat) * $perpix); } else { $y = 50 + ceil(($lat * -1) * $perpix); }
if ($lon >= 0) { $x = 50 + ceil($lon * $perpix); } else { $x = ceil(($worldrow["size"] + $lon) * $perpix); }
$text .= "user".$count."_x=".$x."&";
$text .= "user".$count."_y=".$y."&";
$count++;
}
}
// Then do quests.
if ($userrow["story"] != "0" && $userrow["story"] != "9999") {
$lat = $userrow["storylat"];
$lon = $userrow["storylon"];
if ($lat >= 0) { $y = ceil(($worldrow["size"] - $lat) * $perpix); } else { $y = 250 + ceil(($lat * -1) * $perpix); }
if ($lon >= 0) { $x = 250 + ceil($lon * $perpix); } else { $x = ceil(($worldrow["size"] + $lon) * $perpix); }
$text .= "story=1&";
$text .= "story_x=".$x."&";
$text .= "story_y=".$y."&";
$text .= "story_name=Quest&";
} else { $text .= "story=0&"; }
echo($text);
?>

Binary file not shown.

View File

@ -1,9 +1,23 @@
<?php // misc.php :: Random functions that really don't fit anywhere else.
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
function iddqd() {
global $acctrow;
doquery("UPDATE {{table}} SET extra1='1' WHERE id='".$acctrow["id"]."' LIMIT 1", "accounts");
doquery("UPDATE <<accounts>> SET extra1='1' WHERE id='".$acctrow["id"]."' LIMIT 1");
$page = "\"Please don't take everything I say so seriously.\"<br /><i><a href=\"http://www.nin.com\">---Trent Reznor</a></i>";
display("LMFAO!", $page);
@ -11,16 +25,27 @@ function iddqd() {
function version() {
global $version, $bname, $bdate, $bnumber;
global $controlrow, $version, $bname, $bdate, $bnumber;
$year = date("Y");
if ($controlrow["moddedby"] != "") {
$moddedby = "<tr><td colspan=\"2\"><hr />" . $controlrow["moddedby"] . "</td></tr>";
} else {
$moddedby = "";
}
$page = <<<END
<table width="90%">
<tr><td width="30%">Version Number:</td><td><b>$version</b></td></tr>
<center>
<img src="images/r7_logo.png" alt="renderse7en" /><br /><br />
<span style="font: 12px Verdana;"><a href="http://www.dragonscourge.com" target="_new">Dragon Scourge</a><br />&copy; 2003-$year by <a href="http://www.renderse7en.com">renderse7en</a></b></span><br /><br />
<table>
<tr><td>Version Number:</td><td><b>$version</b></td></tr>
<tr><td>Build Number:</td><td><b>$bnumber</b></td></tr>
<tr><td>Build Name:</td><td><b>$bname</b></td></tr>
<tr><td>Build Date:</td><td><b>$bdate</b></td></tr>
<tr><td colspan="2"><a href="changelog.txt" target="_new">View the Changelog</a></td></tr>
$moddedby
</table>
</center>
END;
display("Version Information",$page);
@ -32,10 +57,10 @@ function babblebox2() {
global $userrow, $controlrow;
if (isset($_GET["g"])) {
if (!is_numeric($_GET["g"])) { err("Invalid input."); }
$g = "WHERE guild='".$_GET["g"]."'";
$g2 = ", guild='".$_GET["g"]."'";
$row["guild"] = "&g=".$_GET["g"];
$guild = $userrow["guild"];
$g = "WHERE guild='$guild'";
$g2 = ", guild='$guild'";
$row["guild"] = "&g=yes";
} else {
$g = "WHERE guild='0'";
$row["guild"] = "";
@ -45,14 +70,14 @@ function babblebox2() {
// Add new shout.
if (trim($_POST["babble"]) != "") {
$insert = doquery("INSERT INTO {{table}} SET id='', posttime=NOW(), charid='".$userrow["id"]."', charname='".$userrow["charname"]."', content='".$_POST["babble"]."' $g2", "babblebox");
$insert = doquery("INSERT INTO <<babblebox>> SET id='', posttime=NOW(), charid='".$userrow["id"]."', charname='".$userrow["charname"]."', content='".$_POST["babble"]."' $g2");
}
// Only keep 20 shouts in DB at any one time.
$check = doquery("SELECT * FROM {{table}} $g", "babblebox");
$check = doquery("SELECT * FROM <<babblebox>> $g");
if (mysql_num_rows($check) > 20) {
$delete1 = dorow(doquery("SELECT id FROM {{table}} $g ORDER BY id LIMIT 1", "babblebox"));
$delete2 = doquery("DELETE FROM {{table}} WHERE id='".$delete1["id"]."' LIMIT 1", "babblebox");
$delete1 = dorow(doquery("SELECT id FROM <<babblebox>> $g ORDER BY id LIMIT 1"));
$delete2 = doquery("DELETE FROM <<babblebox>> WHERE id='".$delete1["id"]."' LIMIT 1");
}
// And we're done.
@ -60,11 +85,11 @@ function babblebox2() {
}
$shouts = doquery("SELECT * FROM {{table}} $g ORDER BY id LIMIT 20", "babblebox");
$shouts = dorow(doquery("SELECT * FROM <<babblebox>> $g ORDER BY id LIMIT 20"), "id");
$row["shouts"] = "";
$background = 1;
if (mysql_num_rows($shouts) > 0) {
while ($b = mysql_fetch_array($shouts)) {
if ($shouts != false) {
foreach ($shouts as $a => $b) {
$row["shouts"] .= "<div class=\"babble$background\">[<a href=\"users.php?do=profile&uid=".$b["charid"]."\" target=\"_parent\">".$b["charname"]."</a>] ".$b["content"]."</div>\n";
if ($background == 1) { $background = 2; } else { $background = 1; }
}

View File

@ -1,8 +1,22 @@
<?php // panels.php :: Handling for left/right/top/bottom status panels.
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
function panelleft() {
global $controlrow, $userrow, $townrow, $worldrow;
global $controlrow, $userrow, $acctrow, $townrow, $worldrow;
$row = array();
// Action handling.
@ -30,6 +44,24 @@ function panelleft() {
$row["longitude"] = $userrow["longitude"] . "E";
}
// Minimap option.
if ($acctrow["minimap"] == 0) {
$row["minimap"] = "<a href=\"javascript:void(0)\" onClick=\"Javascript:window.open('index.php?do=showmap','','width=550,height=550,toolbar=no, location=no,directories=no,status=yes,menubar=no,scrollbars=no,copyhistory=yes, resizable=yes');\">View Map</a><br /><br />";
} else {
$row["minimap"] = <<<THEVERYENDOFYOU
<div style="border: solid 1px black; width: 106px; height: 106px; padding: 0px; margin: 0px 0px 5px 0px;">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="106" height="106" id="mapmini" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="mapmini.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="mapmini.swf" quality="high" bgcolor="#ffffff" width="106" height="106" name="mapmini" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</div>
THEVERYENDOFYOU;
}
// Travel To handling.
$row["travelto"] = "";
@ -43,16 +75,11 @@ function panelleft() {
$townstring .= ") AND world='".$userrow["world"]."'";
// Then we do the query.
$traveltoquery = doquery("SELECT id,name FROM {{table}} WHERE $townstring ORDER BY id", "towns");
$traveltorow = dorow($traveltoquery);
$traveltoquery = dorow(doquery("SELECT id,name FROM <<towns>> WHERE $townstring ORDER BY id"), "id");
// Finally we build the link list.
if ($userrow["townslist"] != "0,1") { // Multiple towns means multiple arrays.
foreach($traveltorow as $c=>$d) {
$row["travelto"] .= "<a href=\"index.php?do=travel:".$d["id"]."\">".$d["name"]."</a><br />\n";
}
} else { // One town means one array.
$row["travelto"] .= "<a href=\"index.php?do=travel:".$traveltorow["id"]."\">".$traveltorow["name"]."</a><br />\n";
foreach ($traveltoquery as $a => $b) {
$row["travelto"] .= "<a href=\"index.php?do=travel:".$b["id"]."\">".$b["name"]."</a><br />\n";
}
// And then we're done with this panel.
@ -69,16 +96,16 @@ function panelright() {
// Babblebox.
if ($controlrow["showshout"] == 1) {
$row["babblebox"] = "<div class=\"big\"><b>Babblebox</b></div>";
$row["babblebox"] .= "<iframe src=\"index.php?do=babblebox\" name=\"sbox\" width=\"100%\" height=\"200\" frameborder=\"0\" id=\"bbox\">Your browser does not support inline frames! The Babble Box will not be available until you upgrade to a newer <a href=\"http://www.mozilla.org\" target=\"_new\">browser</a>.</iframe>";
$row["babblebox"] .= "<iframe src=\"index.php?do=babblebox\" name=\"sbox\" width=\"100%\" height=\"200\" frameborder=\"0\" id=\"bbox\">Your browser does not support inline frames! The Babble Box will not be available until you upgrade to a newer <a href=\"http://www.mozilla.org\" target=\"_new\">browser</a>.</iframe><br /><br />";
}
// Who's Online.
if ($controlrow["showonline"] == 1) {
$row["whosonline"] = "<div class=\"big\"><b>Who's Online</b></div>";
$users = doquery("SELECT * FROM {{table}} WHERE UNIX_TIMESTAMP(onlinetime) >= '".(time()-600)."'", "users");
$number = mysql_num_rows($users);
$users = dorow(doquery("SELECT * FROM <<users>> WHERE UNIX_TIMESTAMP(onlinetime) >= '".(time()-600)."'"), "id");
$number = count($users);
$row["whosonline"] .= "There are <b>$number</b> user(s) online within the last 10 minutes: ";
while($b = mysql_fetch_array($users)) {
foreach ($users as $a => $b) {
if ($b["guild"] != 0) {
$charname = "[<span style=\"color: ".$b["tagcolor"].";\">".$b["guildtag"]."</span>]<span style=\"color: ".$b["namecolor"].";\">".$b["charname"]."</span>";
} else {
@ -99,8 +126,9 @@ function paneltop($loggedin = true) {
global $acctrow, $userrow;
if ($loggedin == true || isset($acctrow)) {
if ($userrow == false) { $userrow["charname"] = "No Characters Yet"; }
if ($acctrow["authlevel"] == 2) { $admin = " (<a href=\"admin/index.php\">Admin</a>)"; } else { $admin = ""; }
if ($userrow == false) { $userrow["charname"] = "No Characters Yet"; $userrow["guild"] = 0; }
//if ($acctrow["authlevel"] == 255) { $admin = " (<a href=\"admin/index.php\">Admin</a>)"; } else { $admin = ""; }
$admin = "";
if ($userrow["guild"] != 0) {
$charname = "[<span style=\"color: ".$userrow["tagcolor"].";\">".$userrow["guildtag"]."</span>]<span style=\"color: ".$userrow["namecolor"].";\">".$userrow["charname"]."</span>";
} else {
@ -124,7 +152,7 @@ function paneltop($loggedin = true) {
function panelbottom() {
global $userrow;
global $userrow, $spells;
$row = array();
if ($userrow["charpicture"] != "") {
@ -133,6 +161,28 @@ function panelbottom() {
$row["charpicture"] = "images/users/nopicture.gif";
}
// Do quickspell stuff.
$quickhealid = 0;
$quickhealvalue = 0;
if ($userrow["currentaction"] == "Exploring") {
for ($i=1; $i<11; $i++) {
if ($userrow["spell".$i."id"] != 0) {
if ($spells[$userrow["spell".$i."id"]]["fname"] == "heal") {
if ($spells[$userrow["spell".$i."id"]]["value"] > $quickhealvalue) {
$quickhealvalue = $spells[$userrow["spell".$i."id"]]["value"];
$quickhealid = $spells[$userrow["spell".$i."id"]]["id"];
}
}
}
}
}
if ($quickhealid != 0) {
$row["quickheal"] = "<a href=\"index.php?do=quickheal&id=$quickhealid\" class=\"red\">(Heal)</a>";
} else {
$row["quickheal"] = "";
}
// Do the rest of it.
$row["level"] = $userrow["level"];
if ($userrow["levelup"] > 0) { $row["levelup"] = "<a href=\"users.php?do=levelup\" class=\"red\">(".$userrow["levelup"]." LP)</a>"; } else { $row["levelup"] = ""; }
if ($userrow["levelspell"] > 0) { $row["levelspell"] = "<a href=\"users.php?do=levelspell\" class=\"blue\">(".$userrow["levelspell"]." SP)</a>"; } else { $row["levelspell"] = ""; }

76
pvp.php
View File

@ -1,5 +1,19 @@
<?php // pvp.php :: primary duel controller.
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
include("lib.php");
include("globals.php");
include("fightmods.php");
@ -13,15 +27,15 @@ donothing();
function donothing() {
global $userrow, $monsterrow, $fightrow;
$pvp = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp"));
$pvp = dorow(doquery("SELECT * FROM <<pvp>> WHERE id='".$userrow["currentpvp"]."' LIMIT 1"));
// Check if they need to accept challenge.
if ($pvp["accepted"] == 0 && $pvp["player2id"] == $userrow["id"]) { challenged(); }
// Check if challenge has been declined.
if ($pvp["accepted"] == 2) {
$query = doquery("UPDATE {{table}} SET currentpvp='0',currentaction='In Town' WHERE id='".$userrow["id"]."' LIMIT 1", "users");
$query = doquery("DELETE FROM {{table}} WHERE id='".$pvp["id"]."' LIMIT 1", "pvp");
$query = doquery("UPDATE <<users>> SET currentpvp='0',currentaction='In Town' WHERE id='".$userrow["id"]."' LIMIT 1");
$query = doquery("DELETE FROM <<pvp>> WHERE id='".$pvp["id"]."' LIMIT 1");
display("Duel Challenge", gettemplate("pvp_declined"));
}
@ -39,9 +53,9 @@ function donothing() {
function challenged() {
global $userrow, $monsterrow, $fightrow;
$pvp = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp"));
$pvp = dorow(doquery("SELECT * FROM <<pvp>> WHERE id='".$userrow["currentpvp"]."' LIMIT 1"));
if ($pvp == false) { die("Location: index.php"); }
$newuserrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$pvp["player1id"]."' LIMIT 1", "users"));
$newuserrow = dorow(doquery("SELECT * FROM <<users>> WHERE id='".$pvp["player1id"]."' LIMIT 1"));
if ($newuserrow["charpicture"] != "") {
$newuserrow["avatar"] = "<img src=\"".$newuserrow["charpicture"]."\" alt=\"".$newuserrow["charname"]."\" width=\"50\" height=\"50\" />";
@ -51,14 +65,14 @@ function challenged() {
if (isset($_POST["yes"])) {
$query = doquery("UPDATE {{table}} SET accepted='1' WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp");
$query = doquery("UPDATE {{table}} SET currentaction='Duelling' WHERE id='".$pvp["player1id"]."' OR id='".$pvp["player2id"]."' LIMIT 2", "users");
$query = doquery("UPDATE <<pvp>> SET accepted='1' WHERE id='".$userrow["currentpvp"]."' LIMIT 1");
$query = doquery("UPDATE <<users>> SET currentaction='Duelling' WHERE id='".$pvp["player1id"]."' OR id='".$pvp["player2id"]."' LIMIT 2");
dofight();
} elseif (isset($_POST["no"])) {
$query = doquery("UPDATE {{table}} SET accepted='2',playerturn=player1id WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp");
$query = doquery("UPDATE {{table}} SET currentaction='In Town', currentpvp='0' WHERE id='".$userrow["id"]."' LIMIT 1", "users");
$query = doquery("UPDATE <<pvp>> SET accepted='2',playerturn=player1id WHERE id='".$userrow["currentpvp"]."' LIMIT 1");
$query = doquery("UPDATE <<users>> SET currentaction='In Town', currentpvp='0' WHERE id='".$userrow["id"]."' LIMIT 1");
display("Duel Challenge",parsetemplate(gettemplate("pvp_decline"),$newuserrow));
} else {
@ -72,13 +86,13 @@ function challenged() {
function dowait() {
global $userrow, $monsterrow, $fightrow;
$pvp = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp"));
$pvp = dorow(doquery("SELECT * FROM <<pvp>> WHERE id='".$userrow["currentpvp"]."' LIMIT 1"));
// "monsterrow" now becomes the other player's character.
if ($pvp["player1id"] == $userrow["id"]) {
$monsterrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$pvp["player2id"]."' LIMIT 1", "users"));
$monsterrow = dorow(doquery("SELECT * FROM <<users>> WHERE id='".$pvp["player2id"]."' LIMIT 1"));
} else {
$monsterrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$pvp["player1id"]."' LIMIT 1", "users"));
$monsterrow = dorow(doquery("SELECT * FROM <<users>> WHERE id='".$pvp["player1id"]."' LIMIT 1"));
}
$pagerow = array(
@ -102,15 +116,15 @@ function dowait() {
function dofight() {
global $userrow, $monsterrow, $fightrow, $spells;
$pvp = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp"));
$pvp = dorow(doquery("SELECT * FROM <<pvp>> WHERE id='".$userrow["currentpvp"]."' LIMIT 1"));
// "monsterrow" now becomes the other player's character.
if ($pvp["player1id"] == $userrow["id"]) {
$nextplayer = $pvp["player2id"];
$monsterrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$pvp["player2id"]."' LIMIT 1", "users"));
$monsterrow = dorow(doquery("SELECT * FROM <<users>> WHERE id='".$pvp["player2id"]."' LIMIT 1"));
} else {
$nextplayer = $pvp["player1id"];
$monsterrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$pvp["player1id"]."' LIMIT 1", "users"));
$monsterrow = dorow(doquery("SELECT * FROM <<users>> WHERE id='".$pvp["player1id"]."' LIMIT 1"));
}
if (isset($_POST["fight"])) {
@ -120,7 +134,7 @@ function dofight() {
updateopponent();
$fightrowimploded = $fightrow["playerphysdamage"].",".$fightrow["playermagicdamage"].",".$fightrow["playerfiredamage"].",".$fightrow["playerlightdamage"].",".$fightrow["message"];
$query = doquery("UPDATE {{table}} SET fightrow='$fightrowimploded', playerturn='$nextplayer' WHERE id='".$pvp["id"]."' LIMIT 1", "pvp");
$query = doquery("UPDATE <<pvp>> SET fightrow='$fightrowimploded', playerturn='$nextplayer' WHERE id='".$pvp["id"]."' LIMIT 1");
$pagerow = array(
"message"=>$fightrow["message"],
@ -156,7 +170,7 @@ function dofight() {
updateopponent();
$fightrowimploded = $fightrow["playerphysdamage"].",".$fightrow["playermagicdamage"].",".$fightrow["playerfiredamage"].",".$fightrow["playerlightdamage"].",".$fightrow["message"];
$query = doquery("UPDATE {{table}} SET fightrow='$fightrowimploded', playerturn='$nextplayer' WHERE id='".$pvp["id"]."' LIMIT 1", "pvp");
$query = doquery("UPDATE <<pvp>> SET fightrow='$fightrowimploded', playerturn='$nextplayer' WHERE id='".$pvp["id"]."' LIMIT 1");
$pagerow = array(
"message"=>$fightrow["message"],
@ -255,7 +269,7 @@ function playerturn() {
// Chance to make an excellent hit.
$toexcellent = rand(0,150);
if ($toexcellent <= sqrt($userrow["strength"])) {
if ($toexcellent <= sqrt($userrow["dexterity"])) {
$fightrow["playerphysdamage"] *= 2;
$fightrow["playermagicdamage"] *= 2;
$fightrow["playerfiredamage"] *= 2;
@ -265,7 +279,7 @@ function playerturn() {
// Chance for monster to dodge.
$tododge = rand(0,200);
if ($tododge <= sqrt($monsterrow["physdefense"])) {
if ($tododge <= sqrt($monsterrow["dexterity"])) {
$fightrow["playerphysdamage"] = 0;
$fightrow["playermagicdamage"] = 0;
$fightrow["playerfiredamage"] = 0;
@ -274,6 +288,8 @@ function playerturn() {
}
// Now we add Per Turn mods.
bonusattack();
bonusdefense_pvp();
hpleech("player");
mpleech("player");
@ -285,7 +301,7 @@ function playerturn() {
function youwin() {
global $userrow, $monsterrow, $fightrow;
$pvp = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp"));
$pvp = dorow(doquery("SELECT * FROM <<pvp>> WHERE id='".$userrow["currentpvp"]."' LIMIT 1"));
// "monsterrow" now becomes the other player's character.
if ($pvp["player1id"] == $userrow["id"]) {
@ -299,16 +315,21 @@ function youwin() {
$userrow["currentaction"] = "In Town";
$userrow["currentfight"] = 0;
$userrow["currentpvp"] = 0;
$userrow["bonusattack"] = 0;
$userrow["bonusdefense"] = 0;
// Now we add Per Kill mods.
hpgain();
mpgain();
// Update for new stats.
$userrow["pvpwins"] += 1;
$monsterrow["pvplosses"] += 1;
if ($monsterrow["level"] > $userrow["pvphighest"]) { $userrow["pvphighest"] = $monsterrow["level"]; }
updateopponent();
updateuserrow();
$fightrowimploded = $fightrow["playerphysdamage"].",".$fightrow["playermagicdamage"].",".$fightrow["playerfiredamage"].",".$fightrow["playerlightdamage"].",".$fightrow["message"];
$query = doquery("UPDATE {{table}} SET fightrow='$fightrowimploded', playerturn='$nextplayer' WHERE id='".$pvp["id"]."' LIMIT 1", "pvp");
$query = doquery("UPDATE <<pvp>> SET fightrow='$fightrowimploded', playerturn='$nextplayer' WHERE id='".$pvp["id"]."' LIMIT 1");
// And we're done.
$pagerow = array(
@ -333,12 +354,12 @@ function youwin() {
function youlose() {
global $userrow, $monsterrow, $fightrow;
$pvp = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp"));
$pvp = dorow(doquery("SELECT * FROM <<pvp>> WHERE id='".$userrow["currentpvp"]."' LIMIT 1"));
if ($pvp["player1id"] == $userrow["id"]) {
$monsterrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$pvp["player2id"]."' LIMIT 1", "users"));
$monsterrow = dorow(doquery("SELECT * FROM <<users>> WHERE id='".$pvp["player2id"]."' LIMIT 1"));
} else {
$monsterrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$pvp["player1id"]."' LIMIT 1", "users"));
$monsterrow = dorow(doquery("SELECT * FROM <<users>> WHERE id='".$pvp["player1id"]."' LIMIT 1"));
}
$tempfightrow = explode(",",$pvp["fightrow"]);
@ -353,10 +374,12 @@ function youlose() {
$userrow["currentfight"] = 0;
$userrow["currentpvp"] = 0;
$userrow["currenthp"] = ceil($userrow["maxhp"] / 4);
$userrow["bonusattack"] = 0;
$userrow["bonusdefense"] = 0;
// Update.
updateuserrow();
$query = doquery("DELETE FROM {{table}} WHERE id='".$pvp["id"]."' LIMIT 1", "pvp");
$query = doquery("DELETE FROM <<pvp>> WHERE id='".$pvp["id"]."' LIMIT 1");
// And we're done.
$pagerow = array(
@ -381,6 +404,7 @@ function youlose() {
function updateopponent() {
global $monsterrow;
$monsterrow = array_map("uber_mres", $monsterrow);
$querystring = "";
foreach($monsterrow as $a=>$b) {
@ -388,7 +412,7 @@ function updateopponent() {
}
$querystring = rtrim($querystring, ",");
$query = doquery("UPDATE {{table}} SET $querystring WHERE id='".$monsterrow["id"]."' LIMIT 1", "users");
$query = doquery("UPDATE <<users>> SET $querystring WHERE id='".$monsterrow["id"]."' LIMIT 1");
}

View File

@ -1,16 +1,39 @@
<?php // pvpmini.php :: update tester for pvp.
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
include("lib.php");
include("globals.php");
global $userrow, $controlrow;
$row = dorow(doquery("SELECT *,UNIX_TIMESTAMP(turntime) as fturntime FROM {{table}} WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp"));
$row = dorow(doquery("SELECT *,UNIX_TIMESTAMP(turntime) as fturntime FROM <<pvp>> WHERE id='".$userrow["currentpvp"]."' LIMIT 1"));
// Check for timeout.
if ($row["fturntime"] < (time() - $controlrow["pvptimeout"])) {
$query = doquery("UPDATE {{table}} SET currentpvp='0', currentaction='In Town' WHERE id='".$row["player1id"]."' OR id='".$row["player2id"]."' LIMIT 2", "users");
$query2 = doquery("DELETE FROM {{table}} WHERE id='".$row["id"]."'", "pvp");
// If the PVP was accepted, whoever timed out loses.
if ($row["accepted"] == 1) {
$monsterrow = dorow(doquery("SELECT * FROM <<users>> WHERE id='".$row["player2id"]."' LIMIT 1"));
if ($monsterrow["level"] > $userrow["pvphighest"]) { $highest = ", pvphighest='".$monsterrow["level"]."'"; } else { $highest = ""; }
doquery("UPDATE <<users>> SET currentpvp='0', currentaction='In Town', pvpwins = pvpwins + 1 $highest WHERE id='".$row["player1id"]."' LIMIT 1");
doquery("UPDATE <<users>> SET currentpvp='0', currentaction='In Town', pvplosses = pvplosses + 1 WHERE id='".$row["player2id"]."' LIMIT 1");
} else {
doquery("UPDATE <<users>> SET currentpvp='0', currentaction='In Town' WHERE id='".$row["player1id"]."' OR id='".$row["player2id"]."' LIMIT 2");
}
$query2 = doquery("DELETE FROM <<pvp>> WHERE id='".$row["id"]."'");
$pagerow["content"] = "The other player did not respond and this Duel has timed out. Thanks for playing.<br /><br />This window will refresh to the main screen in ".$controlrow["pvprefresh"]." seconds.";
$pagerow["target"] = "_top";
$pagerow["parentreload"] = "onload=\"setTimeout('top.location.href=\'index.php\'',".($controlrow["pvprefresh"] * 1000).")\"";

10
scripts/tooltip.js Normal file
View File

@ -0,0 +1,10 @@
// Extended Tooltip Javascript
// copyright 9th August 2002, 3rd July 2005
// by Stephen Chapman, Felgall Pty Ltd
// permission is granted to use this javascript provided that the below code is not altered
var DH = 0;var an = 0;var al = 0;var ai = 0;if (document.getElementById) {ai = 1; DH = 1;}else {if (document.all) {al = 1; DH = 1;} else { browserVersion = parseInt(navigator.appVersion); if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)) {an = 1; DH = 1;}}} function fd(oi, wS) {if (ai) return wS ? document.getElementById(oi).style:document.getElementById(oi); if (al) return wS ? document.all[oi].style: document.all[oi]; if (an) return document.layers[oi];}
function pw() {return window.innerWidth != null? window.innerWidth: document.body.clientWidth != null? document.body.clientWidth:null;}
function mouseX(evt) {if (evt.pageX) return evt.pageX; else if (evt.clientX)return evt.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); else return null;}
function mouseY(evt) {if (evt.pageY) return evt.pageY; else if (evt.clientY)return evt.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); else return null;}
function popUp(evt,oi) {if (DH) {var wp = pw(); ds = fd(oi,1); dm = fd(oi,0); st = ds.visibility; if (dm.offsetWidth) ew = dm.offsetWidth; else if (dm.clip.width) ew = dm.clip.width; if (st == "visible" || st == "show") { ds.visibility = "hidden"; } else {tv = mouseY(evt) + 20; lv = mouseX(evt) - (ew/4); if (lv < 2) lv = 2; else if (lv + ew > wp) lv -= ew/2; if (!an) {lv += 'px';tv += 'px';} ds.left = lv; ds.top = tv; ds.visibility = "visible";}}}

75
sigbot.php Normal file
View File

@ -0,0 +1,75 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
include("lib.php");
// Get a bunch of stuff.
if (isset($_GET["id"]) && is_numeric($_GET["id"])) { $id = $_GET["id"]; }
if (!isset($id)) { die(); }
$userrow = dorow(doquery("SELECT *, UNIX_TIMESTAMP(onlinetime) AS fonlinetime FROM <<users>> WHERE id='$id' LIMIT 1"));
if (!$userrow) { die(); }
$class = dorow(doquery("SELECT * FROM <<classes>> WHERE id='".$userrow["charclass"]."' LIMIT 1"));
$world = dorow(doquery("SELECT * FROM <<worlds>> WHERE id='".$userrow["world"]."' LIMIT 1"));
// Start our image.
$img = imagecreatefrompng("images/sigbotback.png");
$textcolor = imagecolorallocate($img, 0, 0, 0);
// Add the user's name.
if ($userrow["guildtag"] != "") {
$tagcolor = hexToRGB(ltrim($userrow["tagcolor"], "#"));
$namecolor = hexToRGB(ltrim($userrow["namecolor"], "#"));
$tagcolor = imagecolorallocate($img, $tagcolor[0], $tagcolor[1], $tagcolor[2]);
$namecolor = imagecolorallocate($img, $namecolor[0], $namecolor[1], $namecolor[2]);
imagestring($img, 3, 40, 5, "[" . $userrow["guildtag"] . "]", $tagcolor);
imagestring($img, 3, 78, 5, $userrow["charname"], $namecolor);
} else {
imagestring($img, 3, 50, 5, $userrow["charname"], $textcolor);
}
// Add some other stats.
imagestring($img, 2, 78, 20, "Level " . $userrow["level"] . " " . $class["name"], $textcolor);
imagestring($img, 2, 78, 30, "In " . $world["name"], $textcolor);
// Is online or not?
if ($userrow["fonlinetime"] >= (mktime() - 600)) {
imagestring($img, 2, 78, 40, "Currently: Online", $textcolor);
} else {
imagestring($img, 2, 78, 40, "Currently: Offline", $textcolor);
}
// Final output to browser.
header("Content-type: image/png");
imagepng($img);
imagedestroy($img);
function hexToRGB($hexstr) {
$hexstr = strtolower($hexstr);
$replace = array("a"=>10, "b"=>11, "c"=>12, "d"=>13, "e"=>14, "f"=>15);
$hex = array();
for ($i = 0; $i < 6; $i++) {
if (isset($replace[$hexstr{$i}])) { $hex[$i] = $replace[$hexstr{$i}]; } else { $hex[$i] = $hexstr{$i}; }
}
$red = ($hex[0] * 16) + $hex[1];
$green = ($hex[2] * 16) + $hex[3];
$blue = ($hex[4] * 16) + $hex[5];
return array($red,$green,$blue);
}
?>

View File

@ -1,5 +1,19 @@
<?php // spells.php :: functions for spells.
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
function heal($id) {
global $userrow, $spells;
@ -94,4 +108,80 @@ function prism($id) {
}
// Mad crazy ninja love to Anman for writing this spell. I've cleaned it up a bit to match the format of the rest of the code, but it's his spell.
function blessedstrike($id) {
global $userrow, $monsterrow, $fightrow, $spells;
$failed = 0;
if ($userrow["currentmp"] < $spells[$id]["mp"]) { $return = "<span class=\"red\"><b>Spell Failed:</b> You do not have enough MP to cast that spell.</span><br />"; $failed = 1; }
if ($failed == 0) {
//now define the power of the spell. you can stack these spells, but the more you try to stack it the harder it will be to get a decent number out of the stack. Now, this spell is more of a bonus to a player compared to the defence spell. So for this reason, the ratio of stacking has been decreased from 100 to 90 and the minimum % to take of the spell is now 10% instead of 20%.
$userrow["currentmp"] -= $spells[$id]["mp"];
if ($userrow["bonusattack"] == 0) {
$userrow["bonusattack"] = $spells[$id]["value"];
} else {
//if a more powerful inc attack spell is cast, replace the old value with the new one
if ($userrow["bonusattack"] < $spells[$id]["value"]) {
$userrow["bonusattack"] = $spells[$id]["value"];
} else {
//if the same or a weaker spell is cast, determine the maximum stack number and then apply..
$newattmax = ((90 - $userrow["bonusattack"])+1) / 90;
if ($newattmax < 0.1) { $newattmax = 0.1;}
$newattmax = $spells[$id]["value"] * $newattmax;
$newattmax = floor($newattmax);
if ($newattmax < 1) { $newattmax = 1;}
if ($spells[$id]["value"] > $newattmax) {$spells[$id]["value"] = $newattmax;}
$userrow["bonusattack"] = $userrow["bonusattack"] + $spells[$id]["value"];
}
if ($userrow["bonusattack"] > 200) { $userrow["bonusattack"] = 200; }
// *2 damage delt will never go above 50% chance. *1.75 damage will always be 50%
}
$return = $userrow["charname"] . " casts " . $spells[$id]["name"] . ". Future attacks will be more powerful!<br />";
}
return($return);
}
// Mad crazy ninja love to Anman for writing this spell. I've cleaned it up a bit to match the format of the rest of the code, but it's his spell.
function stoneskin($id) {
global $userrow, $monsterrow, $fightrow, $spells;
$failed = 0;
if ($userrow["currentmp"] < $spells[$id]["mp"]) { $return = "<span class=\"red\"><b>Spell Failed:</b> You do not have enough MP to cast that spell.</span><br />"; $failed = 1; }
if ($failed ==0 ) {
//now define the power of the spell. you can stack these spells, but the more you try to stack it the harder it will be to get a decent number out of the stack. The max will always be 100. This is because the spell works with percentages and 100 will always be the highest.
$userrow["currentmp"] -= $spells[$id]["mp"];
if ($userrow["bonusdefense"] == 0) {
$userrow["bonusdefense"] = $spells[$id]["value"];
} else {
//if a more powerful defense spell is cast, replace the old value with the new one
if ($userrow["bonusdefense"] < $spells[$id]["value"]) {
$userrow["bonusdefense"] = $spells[$id]["value"];
} else {
//if the same or a weaker spell is cast, determine the maximum stack number and then apply..
$newdefmax = ((100 - $userrow["bonusdefense"])+1) / 100;
if ($newdefmax < 0.2) { $newdefmax = 0.2;}
$newdefmax = $spells[$id]["value"] * $newdefmax;
$newdefmax = floor($newdefmax);
if ($newdefmax < 1) { $newdefmax = 1;}
if ($spells[$id]["value"] > $newdefmax) {$spells[$id]["value"] = $newdefmax;}
$userrow["bonusdefense"] = $userrow["bonusdefense"] + $spells[$id]["value"];
}
if ($userrow["bonusdefense"] > 200) { $userrow["bonusdefense"] = 200;}
// all damage will never go above 50% chance. 0.25% damage will always be 50%
}
$return = $userrow["charname"] . " casts " . $spells[$id]["name"] . ". Damage taken will be reduced!<br />";
}
return($return);
}
?>

235
story.php Normal file
View File

@ -0,0 +1,235 @@
<?php // story.php :: Storyline handling.
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
include("lib.php");
include("globals.php");
$story = dorow(doquery("SELECT * FROM <<story>> WHERE id='".$userrow["story"]."' LIMIT 1"));
// Decide which type of story to run.
if ($story["targetmonster"] != "0") { storymonster(); }
if ($story["targetitem"] != "") { storyitem(); }
storyteleport();
function storyteleport() { // Sends to a new location, or just displays a chunk of the story with no associated action.
global $userrow, $story;
if (isset($_POST["submit"])) {
if ($story["nextstory"] != "0") {
$nextstory = dorow(doquery("SELECT * FROM <<story>> WHERE id='".$story["nextstory"]."' LIMIT 1"));
$userrow["story"] = $nextstory["id"];
$userrow["storylat"] = $nextstory["latitude"];
$userrow["storylon"] = $nextstory["longitude"];
}
if ($story["targetworld"] != "0") {
$userrow["world"] = $story["targetworld"];
$userrow["latitude"] = $story["targetlat"];
$userrow["longitude"] = $story["targetlon"];
// Get first town from new world.
$newtown = dorow(doquery("SELECT * FROM <<towns>> WHERE world='".$userrow["world"]."' ORDER BY id LIMIT 1"));
$towns = explode(",",$userrow["townslist"]);
$towns[] = $newtown["id"];
$userrow["townslist"] = implode(",",$towns);
}
if ($story["targetaction"] != "") {
$userrow["currentaction"] = $story["targetaction"];
}
if ($story["rewardname"] != "") {
$userrow[$story["rewardname"]] += $story["rewardattr"];
}
updateuserrow();
die(header("Location: index.php"));
}
$story["reward"] = "";
if ($story["rewardname"] != "") {
$premodrow = dorow(doquery("SELECT * FROM <<itemmodnames>> ORDER BY id"));
foreach($premodrow as $a=>$b) {
$modrow[$b["fieldname"]] = $b;
}
$story["reward"] .= "<hr />You've gained a permanent reward from this quest:<br />";
$story["reward"] .= $modrow[$story["rewardname"]]["prettyname"] . ": +" . $story["rewardattr"];
if ($modrow[$story["rewardname"]]["percent"] == 1) { $story["reward"] .= "%"; }
$story["reward"] .= "<br />This reward will be applied when you continue on your adventure.";
}
$story["story"] = nl2br($story["story"]);
display($story["title"], parsetemplate(gettemplate("story_teleport"), $story));
}
function storymonster() {
global $userrow, $story;
if (isset($_POST["submit"])) {
$monster = dorow(doquery("SELECT * FROM <<monsters>> WHERE id='".$story["targetmonster"]."' LIMIT 1"));
$querystring = "currentmonsterid='".$monster["id"]."', currentmonsterhp='".(ceil(rand($monster["maxhp"] * .75, $monster["maxhp"]) * $userrow["difficulty"]))."', currentaction='Fighting'";
$update = doquery("UPDATE <<users>> SET $querystring WHERE id='".$userrow["id"]."' LIMIT 1");
die(header("Location: fight.php"));
}
$story["story"] = nl2br($story["story"]);
display($story["title"], parsetemplate(gettemplate("story_monster"), $story));
}
function storyitem() {
global $userrow, $story;
$modrow = dorow(doquery("SELECT * FROM <<itemmodnames>> ORDER BY id"), "fieldname");
$thenewitem = explode(",",$story["targetitem"]);
$newitem = dorow(doquery("SELECT * FROM <<itembase>> WHERE id='".$thenewitem[1]."' LIMIT 1"));
$newprefix = dorow(doquery("SELECT * FROM <<itemprefixes>> WHERE id='".$thenewitem[0]."' LIMIT 1"));
$newsuffix = dorow(doquery("SELECT * FROM <<itemsuffixes>> WHERE id='".$thenewitem[2]."' LIMIT 1"));
$newfullitem = builditem($newprefix, $newitem, $newsuffix, $modrow);
$story["itemtable"] = parsetemplate(gettemplate("explore_drop_itemrow"), $newfullitem);
if ($userrow["item".$newitem["slotnumber"]."idstring"] != "0") {
$theolditem = explode(",",$userrow["item".$newitem["slotnumber"]."idstring"]);
$olditem = dorow(doquery("SELECT * FROM <<itembase>> WHERE id='".$theolditem[1]."' LIMIT 1"));
$oldprefix = dorow(doquery("SELECT * FROM <<itemprefixes>> WHERE id='".$theolditem[0]."' LIMIT 1"));
$oldsuffix = dorow(doquery("SELECT * FROM <<itemsuffixes>> WHERE id='".$theolditem[2]."' LIMIT 1"));
$oldfullitem = builditem($oldprefix, $olditem, $oldsuffix, $modrow);
$story["olditems"] = parsetemplate(gettemplate("town_buy_olditemrow"), $oldfullitem);
} else {
$oldfullitem = false; $oldprefix = false; $oldsuffix = false;
$story["olditems"] = "You don't have any item in this slot.";
}
if (isset($_POST["takeitem"])) {
// Requirements check.
if ($newfullitem["requirements"] == false) { err("You do not meet one or more of the requirements for this item. Please <a href=\"index.php\">go back</a> and try again."); }
// Now do stuff to userrow (new item only).
$userrow["item" . $newfullitem["slotnumber"] . "idstring"] = $newfullitem["fullid"];
$userrow["item" . $newfullitem["slotnumber"] . "name"] = $newfullitem["name"];
$userrow[$newfullitem["basename"]] += $newfullitem["baseattr"];
for($j=1; $j<7; $j++) {
if ($newfullitem["mod".$j."name"] != "") {
$userrow[$newfullitem["mod".$j."name"]] += $newfullitem["mod".$j."attr"];
}
}
if ($newprefix != false) {
$userrow[$newprefix["basename"]] += $newprefix["baseattr"];
}
if ($newsuffix != false) {
$userrow[$newsuffix["basename"]] += $newsuffix["baseattr"];
}
// Do more stuff to userrow (old item only).
if ($oldfullitem != false) {
$userrow[$oldfullitem["basename"]] -= $oldfullitem["baseattr"];
for($j=1; $j<7; $j++) {
if ($oldfullitem["mod".$j."name"] != "") {
$userrow[$oldfullitem["mod".$j."name"]] -= $oldfullitem["mod".$j."attr"];
}
}
if ($oldprefix != false) {
$userrow[$oldprefix["basename"]] -= $oldprefix["baseattr"];
}
if ($oldsuffix != false) {
$userrow[$oldsuffix["basename"]] -= $oldsuffix["baseattr"];
}
}
if ($story["nextstory"] != "0") {
$nextstory = dorow(doquery("SELECT * FROM <<story>> WHERE id='".$story["nextstory"]."' LIMIT 1"));
$userrow["story"] = $nextstory["id"];
$userrow["storylat"] = $nextstory["latitude"];
$userrow["storylon"] = $nextstory["longitude"];
}
if ($story["targetworld"] != "0") {
$userrow["world"] = $story["targetworld"];
$userrow["latitude"] = $story["targetlat"];
$userrow["longitude"] = $story["targetlon"];
// Get first town from new world.
$newtown = dorow(doquery("SELECT * FROM <<towns>> WHERE world='".$userrow["world"]."' ORDER BY id LIMIT 1"));
$towns = explode(",",$userrow["townslist"]);
$towns[] = $newtown["id"];
$userrow["townslist"] = implode(",",$towns);
}
if ($story["targetaction"] != "") {
$userrow["currentaction"] = $story["targetaction"];
}
if ($story["rewardname"] != "") {
$userrow[$story["rewardname"]] += $story["rewardattr"];
}
updateuserrow();
die(header("Location: index.php"));
}
if (isset($_POST["noitem"])) {
if ($story["nextstory"] != "0") {
$nextstory = dorow(doquery("SELECT * FROM <<story>> WHERE id='".$story["nextstory"]."' LIMIT 1"));
$userrow["story"] = $nextstory["id"];
$userrow["storylat"] = $nextstory["latitude"];
$userrow["storylon"] = $nextstory["longitude"];
}
if ($story["targetworld"] != "0") {
$userrow["world"] = $story["targetworld"];
$userrow["latitude"] = $story["targetlat"];
$userrow["longitude"] = $story["targetlon"];
// Get first town from new world.
$newtown = dorow(doquery("SELECT * FROM <<towns>> WHERE world='".$userrow["world"]."' ORDER BY id LIMIT 1"));
$towns = explode(",",$userrow["townslist"]);
$towns[] = $newtown["id"];
$userrow["townslist"] = implode(",",$towns);
}
if ($story["targetaction"] != "") {
$userrow["currentaction"] = $story["targetaction"];
}
if ($story["rewardname"] != "") {
$userrow[$story["rewardname"]] += $story["rewardattr"];
}
updateuserrow();
die(header("Location: index.php"));
}
$story["reward"] = "";
if ($story["rewardname"] != "") {
$premodrow = dorow(doquery("SELECT * FROM <<itemmodnames>> ORDER BY id"));
foreach($premodrow as $a=>$b) {
$modrow[$b["fieldname"]] = $b;
}
$story["reward"] .= "<hr />You've gained a permanent reward from this quest:<br />";
$story["reward"] .= $modrow[$story["rewardname"]]["prettyname"] . ": +" . $story["rewardattr"];
if ($modrow[$story["rewardname"]]["percent"] == 1) { $story["reward"] .= "%"; }
$story["reward"] .= "<br />This reward will be applied when you continue on your adventure.";
}
$story["story"] = nl2br($story["story"]);
display($story["title"], parsetemplate(gettemplate("story_item"), $story));
}
?>

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
In order to prevent mouse macro bots from playing the game automatically, this game requires a periodic manual security code confirmation to ensure that only real people are playing the game. Please enter the code you see below into the box and click the Submit button. You will then be returned to the game.
<form action="index.php?do=botcheck" method="post">

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
You are exploring the map, and nothing has happened. Continue exploring using the direction buttons or the Travel To menus.
END;

View File

@ -0,0 +1,29 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
The monster dropped an item. You can either accept or ignore the item, but any item you currently have in that slot will be discarded if you choose to accept the item.<br /><br />
<div class="big"><b>The stats for your current item are:</b></div>
{{olditems}}<br />
<div class="big"><b>The stats for the dropped item are:</b></b></div>
{{itemtable}}
<br />
<form action="index.php?do=itemdrop" method="post">
<input type="submit" name="accept" value="Accept This Item" /> <input type="submit" name="ignore" value="Ignore This Item" />
</form>
END;
?>

View File

@ -0,0 +1,22 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
Thank you for accepting this item.<br /><br />
You may now <a href="index.php">continue exploring</a>.
END;
?>

View File

@ -0,0 +1,32 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
<table style="border-bottom: solid 1px black; width: 95%;" cellspacing="0" cellpadding="0"><tr>
<td>{{image}}</td>
<td style="vertical-align: middle; width: 100%;">
<b>{{name}}</b><br />
{{attrtype}}: {{basevalue}}<br />
{{level}}
{{strength}}
{{dexterity}}
{{energy}}
<span class="blue">{{itemmods}}</span>
</td>
</tr></table>
END;
?>

View File

@ -0,0 +1,21 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
You have healed yourself. Continue exploring using the direction buttons or the Travel To menus.
END;
?>

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
<form action="index.php?do=humanity" method="post">
In order to prevent macros and robots from abusing the game, you must verify that you are able to read the following image. Please enter the 6 character code you see in the image into the form box below to continue playing. Thank you.<br /><br />

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
You are fighting a <b>{{monstername}}</b>.<br /><br />
{{message}}

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
You are fighting a <b>{{monstername}}</b>.<br /><br />
{{message}}

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
You are fighting a <b>{{monstername}}</b>.<br /><br />
{{message}}

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
You are fighting a <b>{{monstername}}</b>.<br />
Monster's HP: {{monsterhp}}<br /><br />

View File

@ -0,0 +1,30 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
You are fighting a <b>{{monstername}}</b>.<br />
Monster's HP: {{monsterhp}}<br /><br />
{{message}}
The monster attacks you for (<span style="color: black; font-weight: bold;">{{monsterphysdamage}}</span>|<span style="color: green; font-weight: bold;">{{monstermagicdamage}}</span>|<span style="color: red; font-weight: bold;">{{monsterfiredamage}}</span>|<span style="color: blue; font-weight: bold;">{{monsterlightdamage}}</span>) damage.<br /><br />
Command?
<form action="fight.php" method="post">
<input type="submit" name="fight" value="Fight" /> <br />
{{spells}}<br />
<input type="submit" name="run" value="Run" />
</form>
END;
?>

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
You are fighting a <b>{{monstername}}</b>.<br />
Monster's HP: {{monsterhp}}<br /><br />

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
You are fighting a <b>{{monstername}}</b>.<br />
Monster's HP: {{monsterhp}}<br /><br />

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
You are fighting a <b>{{monstername}}</b>.<br /><br />
{{message}}

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
<center>
<div style="border: solid 1px #aaaaaa; background-color: #eeeeee; padding: 5px; width: 400px; text-align: left;">

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
<center>
<table style="width: 450px;"><tr>

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
<center>
<table style="width: 450px;"><tr>

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
Leaving the Guild is permanent and cannot be undone. Are you sure you want to do this?<br /><br />
<form action="index.php?do=guildleave" method="post">

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
If you are not currently affiliated with any Guild, you can <a href="index.php?do=guildcreate">start your own</a> or submit an application to join one of the Guilds listed below.<br /><br />
If you are a member of a Guild, you can also continue to your Guild's <a href="index.php?do=guildhome">Hall</a>.<br /><br />

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
<b>{{name}} Members List</b><br /><br />
{{guildmembers}}

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
<form action="index.php?do=guildnews" method="post">
Edit your Guild's news/info below.<br /><br />

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
{{charname}} is currently Rank 1. Demoting this member will remove him from your guild. Are you sure you want to do that?<br /><br />
<form action="index.php?do=guildremove" method="post">

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
<form action="login.php?do=login" method="post">
<table width="90%" cellspacing="0" cellpadding="5">

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
<table width="95%">
<tr>

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
To: <a href="users.php?do=profile&uid={{recipientid}}">{{recipientname}}</a><br />
Date: {{fpostdate}}<br />

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
The Post Office is where you can send and receive Letters and Money Transfers.<br /><br />
{{messages}}

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
Your Outbox shows all letters that you have sent to other players. Any letters that have been deleted by the recipient will not be available in your Outbox.<br /><br />
{{messages}}

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
<tr>
<td width="40%"><a href="index.php?do=mailviewsent&id={{id}}">{{title}}</a></td>

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
<tr>
<td width="40%">{{new}}{{money}}<a href="index.php?do=mailview&id={{id}}">{{title}}</a></td>

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
You can send a letter to another player using the form below. Fields marked with a <span class="red">*</span> are required.
The Send Gold field allows you to attach money to the letter, which will be given to the recipient when they read it.<br /><br />

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
You can send a letter to another player using the form below. Fields marked with a <span class="red">*</span> are required.
The Send Gold field allows you to attach money to the letter, which will be given to the recipient when they read it.<br /><br />

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
Thank you for sending this message.<br /><br />
You may now go back to your <a href="index.php?do=mailbox">Mailbox</a> or return to <a href="index.php">Town</a>.

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
<head>
<meta http-equiv="refresh" content="45">

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
<head>
<title>Map</title>

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
@ -15,8 +29,9 @@ $template = <<<END
</tr>
</table>
</td><td style="vertical-align: middle;">
<span class="red">{{levelup}}</span><br />
<span class="blue">{{levelspell}}</span>
{{levelup}}<br />
{{levelspell}}<br />
{{quickheal}}
</td>
</td><td style="vertical-align: middle;">
<table width="100%" cellspacing="0" cellpadding="0">

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
<div class="big"><b>Location</b></div>
{{action}} {{townname}}<br />
@ -10,12 +24,7 @@ Longitude: {{longitude}}<br /><br />
<a href="index.php?do=explore&dir=n"><img src="images/compass_01.png" alt="North" title="North" /></a><br />
<a href="index.php?do=explore&dir=w"><img src="images/compass_02.png" alt="West" title="West" /></a><a href="index.php?do=explore&dir=e"><img src="images/compass_03.png" alt="East" title="East" /></a><br />
<a href="index.php?do=explore&dir=s"><img src="images/compass_04.png" alt="South" title="South" /></a><br /><br />
<div style="border: solid 1px black; width: 106px; height: 106px; padding: 0px; margin: 0px 0px 5px 0px;">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="106" height="106" id="mapmini" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="mapmini.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="mapmini.swf" quality="high" bgcolor="#ffffff" width="106" height="106" name="mapmini" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</div>
{{minimap}}
</center>
<div class="big"><b>Travel To</b></div>
{{travelto}}

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
<table width="100%" cellspacing="0" cellpadding="0"><tr>
<td width="50%" style="text-align: center; vertical-align: middle;">

View File

@ -1,8 +1,21 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
{{babblebox}}
<br /><br />
{{whosonline}}
END;

View File

@ -1,34 +1,26 @@
<?php
/*
MODIFYING THIS FILE IN ANY WAY WILL CAUSE THE GAME TO STOP FUNCTIONING.
In order to protect my intellectual property, certain security measures had to be taken.
As such, the primary template is locked. Any change to this file will result in the game
becoming nonfunctional. While I realize that there are valid reasons for wanting to change
the page structure, it is impossible to allow that without users also being able to remove
or change my copyright information. If you feel you absolutely must have access to change
this file at will, consider upgrading to the licensed commercial version of Dragon Scourge.
Thank you.
*/
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
<head>
<title>{{gamename}} :: {{pagetitle}}</title>
<link rel="stylesheet" href="css/primary.css" type="text/css" />
<script type="text/javascript" src="scripts/tooltip.js"></script>
<style type="text/css">
body { font: 10px Verdana; background-image: url(images/{{background}}.jpg); padding: 0px; }
table { font: 10px Verdana; }
td { vertical-align: top; }
input { font: 10px Verdana; }
img { border-style: none; }
a { color: #996600; text-decoration: none; font-weight: bold; }
a:hover { color: #663300; }
.main { border: solid 1px black; }
.grey { color: #999999; }
.red { color: #ff0000; }
.blue { color: #0000ff; }
.big { font: 11px Verdana; background-color: #dddddd; border: solid 1px #aaaaaa; padding: 2px; margin-bottom: 3px; }
.babble1 { background-color: #eeeeee; font: 10px Verdana; margin: 0px; padding: 2px; }
.babble2 { background-color: #ffffff; font: 10px Verdana; margin: 0px; padding: 2px; }
body { background-image: url(images/{{background}}.jpg); }
</style>
</head>
<body><center>
@ -63,18 +55,6 @@ a:hover { color: #663300; }
<td colspan="3" style="border-top: solid 1px #cccccc;">{{bottomnav}}</td>
</tr>
</table>
<table cellspacing="0" cellpadding="3" style="width: 800px; border: solid 1px black; background-color: white; margin-top: 2px;">
<tr>
<td width="50%">
Version <a href="index.php?do=version">{{version}}</a> / {{numqueries}} Queries / {{totaltime}} Seconds
</td>
<td width="50%" style="text-align:right;">
<a href="http://www.dragonscourge.com">Dragon Scourge</a> &copy; 2003-2005 by <a href="http://www.renderse7en.com">renderse7en</a>
</td>
</tr>
</table>
</center></body>
</html>
END;
?>

View File

@ -1,5 +1,19 @@
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
<head>
<title>{{gamename}} :: {{pagetitle}}</title>

View File

@ -1,15 +1,18 @@
<?php
/*
MODIFYING THIS FILE IN ANY WAY WILL CAUSE THE GAME TO STOP FUNCTIONING.
In order to protect my intellectual property, certain security measures had to be taken.
As such, the primary template is locked. Any change to this file will result in the game
becoming nonfunctional. While I realize that there are valid reasons for wanting to change
the page structure, it is impossible to allow that without users also being able to remove
or change my copyright information. If you feel you absolutely must have access to change
this file at will, consider upgrading to the licensed commercial version of Dragon Scourge.
Thank you.
*/
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
$template = <<<END
<head>

Some files were not shown because too many files have changed in this diff Show More