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.
This commit is contained in:
Jamin Blount 2017-02-05 12:01:47 -06:00
parent 0f3f0dc8ed
commit 50516c3280
161 changed files with 2283 additions and 1678 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,69 +0,0 @@
<?php // control.php :: editing the game's controlrow.
global $thetab;
$thetab = 2;
function controlrow() {
global $controlrow;
if (isset($_POST["submit"])) {
$numerics = array("avatarmaxsize","showitemimages","botcheck","pvprefresh","pvptimeout","guildstartup","guildstartlvl","guildjoinlvl","guildupdate");
$toggles = array("gameopen","showshout","showonline","showmonsterimages","verifyemail","compression","debug");
$norequires = array("forumurl");
// Check errors.
$errors = "";
foreach($numerics as $a => $b) {
if (!is_numeric($_POST[$b])) { $errors .= "$b is a numeric field. Please enter numbers only. Please go back and try again.<br />"; }
}
foreach($_POST as $a => $b) {
if (trim($_POST[$a]) == "" && !in_array($a,$norequires)) { $errors .= "$a is a required field. Please enter a value. Please go back and try again.<br />"; }
}
if ($errors != "") { err($errors); }
// Check toggles.
foreach($toggles as $a => $b) {
if (!isset($_POST[$b])) { $_POST[$b] = "0"; }
}
// Build query.
$query = "";
$columns = dorow(doquery("SHOW COLUMNS FROM {{table}}", "control"));
foreach($columns as $a => $b) {
if (isset($_POST[$b["Field"]])) { $query .= $b["Field"] . "='" . $_POST[$b["Field"]] . "',"; }
}
$query = rtrim($query, ",");
// Save settings & finish.
doquery("UPDATE {{table}} SET $query WHERE id='1' LIMIT 1", "control");
display("Main Settings", "The main settings were saved successfully. <br /><br />You may return <a href=\"index.php\">Home</a> or to the <a href=\"index.php?do=control\">Main Settings page</a>.");
}
extract($controlrow);
// Checkboxes.
if ($gameopen == 1) { $controlrow["check_gameopen"] = "checked=\"checked\""; } else { $controlrow["check_gameopen"] = ""; }
if ($showshout == 1) { $controlrow["check_showshout"] = "checked=\"checked\""; } else { $controlrow["check_showshout"] = ""; }
if ($showonline == 1) { $controlrow["check_showonline"] = "checked=\"checked\""; } else { $controlrow["check_showonline"] = ""; }
if ($showmonsterimages == 1) { $controlrow["check_showmonsterimages"] = "checked=\"checked\""; } else { $controlrow["check_showmonsterimages"] = ""; }
if ($verifyemail == 1) { $controlrow["check_verifyemail"] = "checked=\"checked\""; } else { $controlrow["check_verifyemail"] = ""; }
if ($compression == 1) { $controlrow["check_compression"] = "checked=\"checked\""; } else { $controlrow["check_compression"] = ""; }
if ($debug == 1) { $controlrow["check_debug"] = "checked=\"checked\""; } else { $controlrow["check_debug"] = ""; }
// Item image dropdown.
$itemimages = array(0=>"Off",1=>"Slot",2=>"ID");
$controlrow["select_showitemimages"] = "";
foreach($itemimages as $a => $b) {
if ($controlrow["showitemimages"] == $a) { $selected = "selected=\"selected=\""; } else { $selected = ""; }
$controlrow["select_showitemimages"] .= "<option value=\"$a\" $selected>$b</option>";
}
$page = parsetemplate(gettemplate("control"), $controlrow);
display("Main Settings", $page);
}
?>

View File

@ -1,32 +0,0 @@
<?php // cookies.php :: Handles cookies. (Mmm, tasty!)
function checkcookies() {
include("../config.php");
global $controlrow;
$row = false;
if (isset($_COOKIE[$controlrow["cookiename"]])) {
// COOKIE FORMAT:
// {ID} {USERNAME} {PASSWORDHASH} {REMEMBERME}
$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"));
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."); }
// 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 ($controlrow["cookiename"], $newcookie, $expiretime, "/", $controlrow["cookiedomain"], 0);
}
return $row;
}
?>

View File

@ -1,18 +0,0 @@
<?php // globals.php :: Storage for lots of super important arrays we're probably going to need eventually.
// 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"));
// Account row.
include("cookies.php");
$acctrow = checkcookies();
if ($acctrow == false) { die(header("Location: " . $controlrow["gameurl"] . "login.php?do=login")); }
if ($acctrow["authlevel"] != 255) { die("You do not have access to this area."); }
$thetab = 1;
?>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 774 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 732 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 715 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 671 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 753 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 806 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 634 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 741 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 923 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 940 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 945 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 945 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 610 B

View File

@ -1,34 +0,0 @@
<?php
include("lib.php");
include("globals.php");
if (isset($_GET["do"])) {
$do = $_GET["do"];
switch ($do) {
case "control": include("control.php"); controlrow(); break;
case "realms": include("realms.php"); break;
default: donothing();
}
} else { donothing(); }
function donothing() {
$accounts = dorow(doquery("SELECT * FROM {{table}}", "accounts"), "id");
$pagerow["accounts"] = sizeof($accounts);
$characters = dorow(doquery("SELECT * FROM {{table}}", "users"), "id");
$pagerow["characters"] = sizeof($characters);
$guildchars = dorow(doquery("SELECT * FROM {{table}} WHERE guild != 0", "users"), "id");
$pagerow["guildchars"] = sizeof($guildchars);
$guilds = dorow(doquery("SELECT * FROM {{table}}", "guilds"), "id");
$pagerow["guilds"] = sizeof($guilds);
$page = parsetemplate(gettemplate("index"), $pagerow);
display("Administrator", $page);
}
?>

View File

@ -1,254 +0,0 @@
<?php // lib.php :: Common functions used throughout the program.
// Setup for superglobal stuff that can't go in globals.php.
$starttime = getmicrotime();
$numqueries = 0;
$link = opendb();
$version = "Beta 4";
$bnumber = "18";
$bname = "Joe Camel";
$bdate = "9.03.2006";
// 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);
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);
$link = mysql_connect($server, $user, $pass) or err(mysql_error(),true);
mysql_select_db($name) or err(mysql_error(),true);
return $link;
}
function doquery($query, $table) { // 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");
$numqueries++;
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;
}
function gettemplate($templatename) { // SQL query for the template.
$filename = "templates/" . $templatename . ".php";
include("$filename");
return $template;
}
function parsetemplate($template, $array) { // Replace template with proper content. Also does languages.
foreach($array as $a => $b) {
$template = str_replace("{{{$a}}}", $b, $template);
}
return $template;
}
function getmicrotime() { // Used for timing script operations.
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
function is_email($email) { // Thanks to "mail(at)philipp-louis.de" from php.net!
return(preg_match("/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i",$email));
}
function mymail($to, $title, $body, $from = '') { // thanks to arto dot PLEASE dot DO dot NOT dot SPAM at artoaaltonen dot fi.
global $controlrow;
extract($controlrow);
$from = trim($from);
if (!$from) {
$from = '<$adminemail>';
}
$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);
}
function dotabs() {
global $thetab;
$tabs = array(
1=>"<a href=\"index.php\"><img src=\"icons/house.png\" align=\"top\" alt=\"Home\" /> Home</a>",
2=>"<a href=\"index.php?do=control\"><img src=\"icons/cog.png\" align=\"top\" alt=\"Config\" /> Config</a>",
3=>"<a href=\"index.php?do=users\"><img src=\"icons/user.png\" align=\"top\" alt=\"Players\" /> Players</a>",
4=>"<a href=\"index.php?do=items\"><img src=\"icons/coins.png\" align=\"top\" alt=\"Items\" /> Items</a>",
5=>"<a href=\"index.php?do=monsters\"><img src=\"icons/bug.png\" align=\"top\" alt=\"Monsters\" /> Monsters</a>",
6=>"<a href=\"index.php?do=spells\"><img src=\"icons/lightning.png\" align=\"top\" alt=\"Spells\" /> Spells</a>",
7=>"<a href=\"index.php?do=guilds\"><img src=\"icons/group.png\" align=\"top\" alt=\"Guilds\" /> Guilds</a>",
8=>"<a href=\"index.php?do=realms\"><img src=\"icons/world.png\" align=\"top\" alt=\"Realms\" /> Realms</a>",
9=>"<a href=\"index.php?do=misc\"><img src=\"icons/flag_blue.png\" align=\"top\" alt=\"Misc.\" /> Misc.</a>",
10=>"<a href=\"index.php?do=tools\"><img src=\"icons/wrench.png\" align=\"top\" alt=\"Tools\" /> Tools</a>"
);
$tabstrip = "";
foreach ($tabs as $a => $b) {
if ($thetab == $a) { $style = "tab_on"; } else { $style = "tab_off"; }
$tabstrip .= "<td class=\"$style\">$b</td>";
}
return ($tabstrip);
}
function display($title, $content) { // Finalize page and output to browser.
include('../config.php');
global $controlrow, $numqueries, $starttime, $version, $build;
if (!isset($controlrow)) {
$controlrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='1' LIMIT 1", "control"));
}
// Make page tags for XHTML validation.
$page = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n"
. "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"DTD/xhtml1-transitional.dtd\">\n"
. "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n";
$page .= gettemplate("primary");
// Setup for primary page array indexes.
$row = array();
$row["gamename"] = $controlrow["gamename"];
$row["pagetitle"] = $title;
$row["version"] = $version;
$row["numqueries"] = $numqueries;
$row["totaltime"] = round(getmicrotime()-$starttime,4);
$row["content"] = $content;
$row["tabstrip"] = dotabs();
$page .= <<<THEVERYENDOFYOU
<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; 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);
if ($controlrow["compression"] == 1) { ob_start("ob_gzhandler"); }
echo $page;
die();
}
?>

View File

@ -1,321 +0,0 @@
<?php
global $thetab;
$thetab = 8;
if (isset($_GET["fn"])) {
$fn = $_GET["fn"];
switch ($fn) {
case "realms": realms(); break;
case "towns": towns(); break;
case "story": storyline(); break;
default: index();
}
} else { index(); }
function index() {
display("Realms", gettemplate("realms_index"));
}
function realms() {
if (isset($_GET["action"])) {
$action = $_GET["action"];
} else { $action = "list"; }
if ($action == "list") {
$realms = dorow(doquery("SELECT * FROM {{table}} ORDER BY id", "worlds"), "id");
$alt = false;
$pagerow["realmslist"] = "";
foreach($realms as $a => $b) {
extract($b);
if ($alt) { $bg = "class=\"td_alt\""; $alt = false; } else { $bg = ""; $alt = true; }
$pagerow["realmslist"] .= "<table cellspacing=\"0\" cellpadding=\"5\" width=\"75%\"><tr><td $bg width=\"75%\"><b>$name</b></td><td $bg><a href=\"index.php?do=realms&fn=realms&action=edit&id=$id\"><img src=\"icons/world_edit.png\" alt=\"Edit\" align=\"top\" /> Edit</a> &nbsp; &nbsp; <a href=\"index.php?do=realms&fn=realms&action=delete&id=$id\"><img src=\"icons/world_delete.png\" alt=\"Delete\" align=\"top\" /> Delete</a></td></tr></table>";
}
display("Realms List", parsetemplate(gettemplate("realms_realms"), $pagerow));
} elseif ($action == "edit") {
if (!isset($_GET["id"]) || !is_numeric($_GET["id"])) { err("Invalid Realm ID number entered."); }
$id = $_GET["id"];
$therealm = dorow(doquery("SELECT * FROM {{table}} WHERE id='$id' LIMIT 1", "worlds"));
if ($therealm == false) { err("The Realm you entered does not exist."); }
if (isset($_POST["submit"])) {
// Check numbers.
$numerics = array("size");
foreach($numerics as $a => $b) { if (!is_numeric($_POST[$b])) { err("The $b field must be a number."); } }
// Other stuff.
if ($_POST["size"] < 0) { $_POST["size"] *= -1; }
// Update & finish.
extract($_POST);
$query = doquery("UPDATE {{table}} SET name='$name', size='$size' WHERE id='$id' LIMIT 1", "worlds");
display("Edit a Realm", "The Realm was edited successfully. <a href=\"index.php?do=realms&fn=realms\">Click here</a> to return to the Realms List.");
}
display("Edit a Realm", parsetemplate(gettemplate("realms_realms_edit"), $therealm));
} elseif ($action == "new") {
if (isset($_POST["submit"])) {
// Check numbers.
$numerics = array("size");
foreach($numerics as $a => $b) { if (!is_numeric($_POST[$b])) { err("The $b field must be a number."); } }
// Other stuff.
if ($_POST["size"] < 0) { $_POST["size"] *= -1; }
// Update & finish.
extract($_POST);
$query = doquery("INSERT INTO {{table}} SET id='', name='$name', size='$size'", "worlds");
display("Add a Realm", "The Realm was created successfully. <a href=\"index.php?do=realms&fn=realms\">Click here</a> to return to the Realms List.");
}
display("Add a Realm", parsetemplate(gettemplate("realms_realms_add"), $therealm));
} elseif ($action == "delete") {
if (!isset($_GET["id"]) || !is_numeric($_GET["id"])) { err("Invalid Realm ID number entered."); }
$id = $_GET["id"];
$therealm = dorow(doquery("SELECT * FROM {{table}} WHERE id='$id' LIMIT 1", "worlds"));
if ($therealm == false) { err("The Realm you entered does not exist."); }
if (isset($_POST["diediedie"])) {
$query = doquery("DELETE FROM {{table}} WHERE id='$id'", "worlds");
display("Delete a Realm", "The Realm was deleted successfully. <a href=\"index.php?do=realms&fn=realms\">Click here</a> to return to the Realms List.");
} elseif (isset($_POST["abort"])) {
die(header("Location: index.php?do=realms&fn=realms"));
}
display("Delete a Realm", parsetemplate(gettemplate("realms_realms_delete"), $therealm));
}
}
function towns() {
if (isset($_GET["action"])) {
$action = $_GET["action"];
} else { $action = "list"; }
if ($action == "list") {
$towns = dorow(doquery("SELECT * FROM {{table}} ORDER BY id", "towns"), "id");
$realms = dorow(doquery("SELECT * FROM {{table}} ORDER BY id", "worlds"), "id");
$alt = false;
$pagerow["townslist"] = "";
foreach($towns as $a => $b) {
extract($b);
if ($alt) { $bg = "class=\"td_alt\""; $alt = false; } else { $bg = ""; $alt = true; }
$pagerow["townslist"] .= "<table cellspacing=\"0\" cellpadding=\"5\" width=\"75%\"><tr><td $bg width=\"75%\"><b>$name</b> (".$realms[$b["world"]]["name"].")</td><td $bg><a href=\"index.php?do=realms&fn=towns&action=edit&id=$id\"><img src=\"icons/world_edit.png\" alt=\"Edit\" align=\"top\" /> Edit</a> &nbsp; &nbsp; <a href=\"index.php?do=realms&fn=towns&action=delete&id=$id\"><img src=\"icons/world_delete.png\" alt=\"Delete\" align=\"top\" /> Delete</a></td></tr></table>";
}
display("Towns List", parsetemplate(gettemplate("realms_towns"), $pagerow));
} elseif ($action == "edit") {
if (!isset($_GET["id"]) || !is_numeric($_GET["id"])) { err("Invalid Town ID number entered."); }
$id = $_GET["id"];
$thetown = dorow(doquery("SELECT * FROM {{table}} WHERE id='$id' LIMIT 1", "towns"));
if ($thetown == false) { err("The town you entered does not exist."); }
if (isset($_POST["submit"])) {
// Check numbers.
$numerics = array("world","latitude","longitude","innprice","mapprice","travelpoints","itemminlvl","itemmaxlvl");
foreach($numerics as $a => $b) { if (!is_numeric($_POST[$b])) { err("The $b field must be a number."); } }
// Update & finish.
extract($_POST);
$query = doquery("UPDATE {{table}} SET name='$name', world='$world', latitude='$latitude', longitude='$longitude', innprice='$innprice', mapprice='$mapprice', travelpoints='$travelpoints', itemminlvl='$itemminlvl', itemmaxlvl='$itemmaxlvl' WHERE id='$id' LIMIT 1", "towns");
display("Edit a Town", "The town was edited successfully. <a href=\"index.php?do=realms&fn=towns\">Click here</a> to return to the Towns List.");
}
// Realms list.
$realms = dorow(doquery("SELECT * FROM {{table}} ORDER BY id", "worlds"), "id");
$thetown["realmselect"] = "";
foreach($realms as $a => $b) {
if ($thetown["world"] == $b["id"]) { $selected = "selected=\"selected\""; } else { $selected = ""; }
$thetown["realmselect"] .= "<option value=\"".$b["id"]."\" $selected>".$b["name"]."</option>";
}
// Realm max size.
$thetown["realmsize"] = $realms[$thetown["world"]]["size"];
// Display.
display("Edit a Town", parsetemplate(gettemplate("realms_towns_edit"), $thetown));
} elseif ($action == "new") {
if (isset($_POST["submit"])) {
// Check numbers.
$numerics = array("world","latitude","longitude","innprice","mapprice","travelpoints","itemminlvl","itemmaxlvl");
foreach($numerics as $a => $b) { if (!is_numeric($_POST[$b])) { err("The $b field must be a number."); } }
// Update & finish.
extract($_POST);
$query = doquery("INSERT INTO {{table}} SET id='', name='$name', world='$world', latitude='$latitude', longitude='$longitude', innprice='$innprice', mapprice='$mapprice', travelpoints='$travelpoints', itemminlvl='$itemminlvl', itemmaxlvl='$itemmaxlvl'", "towns");
display("Add a Town", "The town was created successfully. <a href=\"index.php?do=realms&fn=towns\">Click here</a> to return to the Towns List.");
}
// Realms list.
$realms = dorow(doquery("SELECT * FROM {{table}} ORDER BY id", "worlds"), "id");
$thetown["realmselect"] = "";
foreach($realms as $a => $b) {
$thetown["realmselect"] .= "<option value=\"".$b["id"]."\">".$b["name"]."</option>";
}
// Realm max size.
$thetown["realmsize"] = $realms[$thetown["world"]]["size"];
// Display.
display("Add a Town", parsetemplate(gettemplate("realms_towns_add"), $thetown));
} elseif ($action == "delete") {
if (!isset($_GET["id"]) || !is_numeric($_GET["id"])) { err("Invalid town ID number entered."); }
$id = $_GET["id"];
$thetown = dorow(doquery("SELECT * FROM {{table}} WHERE id='$id' LIMIT 1", "towns"));
if ($thetown == false) { err("The town you entered does not exist."); }
if (isset($_POST["diediedie"])) {
$query = doquery("DELETE FROM {{table}} WHERE id='$id'", "towns");
display("Delete a Town", "The town was deleted successfully. <a href=\"index.php?do=realms&fn=towns\">Click here</a> to return to the towns List.");
} elseif (isset($_POST["abort"])) {
die(header("Location: index.php?do=realms&fn=towns"));
}
display("Delete a Town", parsetemplate(gettemplate("realms_towns_delete"), $thetown));
}
}
function storyline() {
if (isset($_GET["action"])) {
$action = $_GET["action"];
} else { $action = "list"; }
if ($action == "list") {
$story = dorow(doquery("SELECT * FROM {{table}} ORDER BY id", "story"), "id");
$alt = false;
$pagerow["storylist"] = "";
foreach($story as $a => $b) {
extract($b);
if ($alt) { $bg = "class=\"td_alt\""; $alt = false; } else { $bg = ""; $alt = true; }
$pagerow["storylist"] .= "<table cellspacing=\"0\" cellpadding=\"5\" width=\"75%\"><tr><td $bg width=\"75%\"><b>$title</b></td><td $bg><a href=\"index.php?do=realms&fn=story&action=edit&id=$id\"><img src=\"icons/world_edit.png\" alt=\"Edit\" align=\"top\" /> Edit</a> &nbsp; &nbsp; <a href=\"index.php?do=realms&fn=story&action=delete&id=$id\"><img src=\"icons/world_delete.png\" alt=\"Delete\" align=\"top\" /> Delete</a></td></tr></table>";
}
display("Story List", parsetemplate(gettemplate("realms_story"), $pagerow));
} elseif ($action == "edit") {
if (!isset($_GET["id"]) || !is_numeric($_GET["id"])) { err("Invalid Town ID number entered."); }
$id = $_GET["id"];
$thetown = dorow(doquery("SELECT * FROM {{table}} WHERE id='$id' LIMIT 1", "towns"));
if ($thetown == false) { err("The town you entered does not exist."); }
if (isset($_POST["submit"])) {
// Check numbers.
$numerics = array("world","latitude","longitude","innprice","mapprice","travelpoints","itemminlvl","itemmaxlvl");
foreach($numerics as $a => $b) { if (!is_numeric($_POST[$b])) { err("The $b field must be a number."); } }
// Update & finish.
extract($_POST);
$query = doquery("UPDATE {{table}} SET name='$name', world='$world', latitude='$latitude', longitude='$longitude', innprice='$innprice', mapprice='$mapprice', travelpoints='$travelpoints', itemminlvl='$itemminlvl', itemmaxlvl='$itemmaxlvl' WHERE id='$id' LIMIT 1", "towns");
display("Edit a Town", "The town was edited successfully. <a href=\"index.php?do=realms&fn=towns\">Click here</a> to return to the Towns List.");
}
// Realms list.
$realms = dorow(doquery("SELECT * FROM {{table}} ORDER BY id", "worlds"), "id");
$thetown["realmselect"] = "";
foreach($realms as $a => $b) {
if ($thetown["world"] == $b["id"]) { $selected = "selected=\"selected\""; } else { $selected = ""; }
$thetown["realmselect"] .= "<option value=\"".$b["id"]."\" $selected>".$b["name"]."</option>";
}
// Realm max size.
$thetown["realmsize"] = $realms[$thetown["world"]]["size"];
// Display.
display("Edit a Town", parsetemplate(gettemplate("realms_towns_edit"), $thetown));
} elseif ($action == "new") {
if (isset($_POST["submit"])) {
// Check numbers.
$numerics = array("world","latitude","longitude","innprice","mapprice","travelpoints","itemminlvl","itemmaxlvl");
foreach($numerics as $a => $b) { if (!is_numeric($_POST[$b])) { err("The $b field must be a number."); } }
// Update & finish.
extract($_POST);
$query = doquery("INSERT INTO {{table}} SET id='', name='$name', world='$world', latitude='$latitude', longitude='$longitude', innprice='$innprice', mapprice='$mapprice', travelpoints='$travelpoints', itemminlvl='$itemminlvl', itemmaxlvl='$itemmaxlvl'", "towns");
display("Add a Town", "The town was created successfully. <a href=\"index.php?do=realms&fn=towns\">Click here</a> to return to the Towns List.");
}
// Realms list.
$realms = dorow(doquery("SELECT * FROM {{table}} ORDER BY id", "worlds"), "id");
$thetown["realmselect"] = "";
foreach($realms as $a => $b) {
$thetown["realmselect"] .= "<option value=\"".$b["id"]."\">".$b["name"]."</option>";
}
// Realm max size.
$thetown["realmsize"] = $realms[$thetown["world"]]["size"];
// Display.
display("Add a Town", parsetemplate(gettemplate("realms_towns_add"), $thetown));
} elseif ($action == "delete") {
if (!isset($_GET["id"]) || !is_numeric($_GET["id"])) { err("Invalid town ID number entered."); }
$id = $_GET["id"];
$thetown = dorow(doquery("SELECT * FROM {{table}} WHERE id='$id' LIMIT 1", "towns"));
if ($thetown == false) { err("The town you entered does not exist."); }
if (isset($_POST["diediedie"])) {
$query = doquery("DELETE FROM {{table}} WHERE id='$id'", "towns");
display("Delete a Town", "The town was deleted successfully. <a href=\"index.php?do=realms&fn=towns\">Click here</a> to return to the towns List.");
} elseif (isset($_POST["abort"])) {
die(header("Location: index.php?do=realms&fn=towns"));
}
display("Delete a Town", parsetemplate(gettemplate("realms_towns_delete"), $thetown));
}
}
?>

View File

@ -1,37 +0,0 @@
<?php
$template = <<<END
<h3>Configuration Settings</h3>
These are the primary game settings that control various global aspects of your game.<br /><br />
<form action="index.php?do=control" 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="{{gamename}}" /><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%" class="td_alt">Game is Open?</td><td class="td_alt"><input type="checkbox" name="gameopen" value="1" {{check_gameopen}} /> Yes<br /><span class="grey">Should normally be left on, but you should turn off your game while performing any updates.</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%" class="td_alt">Game URL</td><td class="td_alt"><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="{{forumurl}}" /><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%" class="td_alt">Avatar Path</td><td class="td_alt"><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%" class="td_alt">Avatar Max Filesize</td><td class="td_alt"><input type="text" name="avatarmaxsize" size="10" maxlength="10" value="{{avatarmaxsize}}" /><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" {{check_showshout}} /> Yes<br /><span class="grey">Enables the Babblebox iframe in the right panel.</span><br /><br /></td></tr>
<tr><td width="25%" class="td_alt">Show Who's Online?</td><td class="td_alt"><input type="checkbox" name="showonline" value="1" {{check_showonline}} /> 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 Item Images?</td><td><select name="showitemimages">{{select_showitemimages}}</select><br /><span class="grey"><b>Slot</b> images use one image for all items in a given slot (e.g. weapons, shields, armor, etc.). <b>ID</b> images use an individual image for every item, based on the item's ID number.<br /><b>Only enable ID images if your /images/items/ folder contains an image for every item in the database, or else you'll get a lot of broken image tags.</b></span><br /><br /></td></tr>
<tr><td width="25%" class="td_alt">Show Monster Images?</td><td class="td_alt"><input type="checkbox" name="showmonsterimages" value="1" {{check_showmonsterimages}} /> Yes<br /><span class="grey"><b>Only enable monster images if your /images/monsters/ folder contains an image for every monster in the database, or else you'll get a lot of broken image tags.</b></span><br /><br /></td></tr>
<tr><td width="25%">Admin's Email</td><td><input type="text" name="adminemail" size="20" maxlength="200" value="{{adminemail}}" /><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%" class="td_alt">Enable Email Functions?</td><td class="td_alt"><input type="checkbox" name="verifyemail" value="1" {{check_verifyemail}} /> 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" {{check_compression}} /> 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%" class="td_alt">Enable Debug Info?</td><td class="td_alt"><input type="checkbox" name="debug" value="1" {{check_debug}} /> 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="{{botcheck}}" /><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%" class="td_alt">PVP Refresh Time</td><td class="td_alt"><input type="text" name="pvprefresh" size="10" maxlength="10" value="{{pvprefresh}}" /><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="{{pvptimeout}}" /><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%" class="td_alt">Guild Startup Cost</td><td class="td_alt"><input type="text" name="guildstartup" size="10" maxlength="10" value="{{guildstartup}}" /><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="{{guildstartlvl}}" /><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%" class="td_alt">Guild Join Level</td><td class="td_alt"><input type="text" name="guildjoinlvl" size="10" maxlength="10" value="{{guildjoinlvl}}" /><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="{{guildupdate}}" /><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>
<button type="submit" name="submit"><img src="icons/tick.png" align="top" /> Save</button> <button type="reset"><img src="icons/cross.png" align="top" /> Reset</button>
</center></td></tr>
</table>
END;
?>

View File

@ -1,12 +0,0 @@
<?php
$template = <<<END
<h3>Welcome to the Dragon Scourge Administrator.</h3>
Please select a tab above to control various settings and attributes for your game.<br /><br />
Your game has {{accounts}} accounts with {{characters}} active characters. {{guildchars}} are members of {{guilds}} Guilds.<br /><br />
<a href="../index.php">Click here</a> to return to your game.<br /><br /><br />
<span class="grey">The awesome Silk icons, used throughout the control panel, were created by <a href="http://www.famfamfam.com/lab/icons/silk/" target="_new">FamFamFam.com</a>.</span>
END;
?>

View File

@ -1,41 +0,0 @@
<?php
$template = <<<END
<head>
<title>{{gamename}} :: {{pagetitle}}</title>
<style type="text/css">
body { font: 10px Verdana; background-image: url(../images/background1.jpg); 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: #888888; }
.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; }
.tab_on { background-color: #ffffff; border: solid 1px black; border-bottom: none; padding: 5px; text-align: center; margin: 0px 2px; }
.tab_off { background-color: #eeeeee; border: solid 1px black; padding: 5px; text-align: center; }
.td_alt { background-color: #f0f0f0; }
</style>
</head>
<body><center>
<table cellspacing="0" cellpadding="3" style="width: 800px;">
<tr>
{{tabstrip}}
</tr>
</table>
<table cellspacing="0" cellpadding="3" style="width: 800px; height: 570px; border: solid 1px black; border-top: none; background-color: white; ">
<tr><td style="padding: 10px;">
{{content}}
</td></tr>
</table>
END;
?>

View File

@ -1,9 +0,0 @@
<?php
$template = <<<END
<h3>Realms</h3>
Please select which aspect of the Realms you wish to edit.<br /><br />
[ <a href="index.php?do=realms&fn=realms">Realms</a> | <a href="index.php?do=realms&fn=towns">Towns</a> | <a href="index.php?do=realms&fn=story">Storyline</a> ]
END;
?>

View File

@ -1,9 +0,0 @@
<?php
$template = <<<END
<h3>Realms List</h3>
Select a Realm from the list below to edit or delete it. You can also <a href="index.php?do=realms&fn=realms&action=new"><img src="icons/world_add.png" alt="Add" align="top" /> add a new Realm</a>.<br /><br />
{{realmslist}}
END;
?>

View File

@ -1,16 +0,0 @@
<?php
$template = <<<END
<h3>Add a Realm</h3>
<a href="index.php?do=realms&fn=realms">Back to Realms List</a><br /><br />
<form action="index.php?do=realms&fn=realms&action=new" method="post">
<table cellspacing="0" cellpadding="5" width="98%">
<tr><td width="25%">Realm Name</td><td><input type="text" name="name" size="20" maxlength="30" /><br /><span class="grey">The name of this Realm.</span><br /><br /></td></tr>
<tr><td width="25%" class="td_alt">Realm Size</td><td class="td_alt"><input type="text" name="size" size="5" maxlength="5" /><br /><span class="grey">Realms are divided into four square quadrants. This number is the length/width of each individual quadrant.<br />Range: 0 to 65535.</span><br /><br /></td></tr>
<tr><td colspan="2" style="border-top: solid 2px black;"><center>
<button type="submit" name="submit"><img src="icons/tick.png" align="top" /> Save</button> <button type="reset"><img src="icons/cross.png" align="top" /> Reset</button>
</center></td></tr>
</table>
END;
?>

View File

@ -1,17 +0,0 @@
<?php
$template = <<<END
<h3>Delete a Realm</h3>
<a href="index.php?do=realms&fn=realms">Back to Realms List</a><br /><br />
<form action="index.php?do=realms&fn=realms&action=delete&id={{id}}" method="post">
<table cellspacing="0" cellpadding="5">
<tr><td colspan="2" style="border-top: solid 2px black;"><center>
Are you sure you want to delete {{name}}?
</center></td></tr>
<tr><td colspan="2" style="border-top: solid 2px black;"><center>
<button type="submit" name="diediedie"><img src="icons/tick.png" align="top" /> Yes</button> <button type="submit" name="abort"><img src="icons/cross.png" align="top" /> No</button>
</center></td></tr>
</table>
END;
?>

View File

@ -1,16 +0,0 @@
<?php
$template = <<<END
<h3>Edit a Realm</h3>
<a href="index.php?do=realms&fn=realms">Back to Realms List</a><br /><br />
<form action="index.php?do=realms&fn=realms&action=edit&id={{id}}" method="post">
<table cellspacing="0" cellpadding="5" width="98%">
<tr><td width="25%">Realm Name</td><td><input type="text" name="name" size="20" maxlength="30" value="{{name}}" /><br /><span class="grey">The name of this Realm.</span><br /><br /></td></tr>
<tr><td width="25%" class="td_alt">Realm Size</td><td class="td_alt"><input type="text" name="size" size="5" maxlength="5" value="{{size}}" /><br /><span class="grey">Realms are divided into four square quadrants. This number is the length/width of each individual quadrant. Range: 0 to 65535.</span><br /><br /></td></tr>
<tr><td colspan="2" style="border-top: solid 2px black;"><center>
<button type="submit" name="submit"><img src="icons/tick.png" align="top" /> Save</button> <button type="reset"><img src="icons/cross.png" align="top" /> Reset</button>
</center></td></tr>
</table>
END;
?>

View File

@ -1,9 +0,0 @@
<?php
$template = <<<END
<h3>Story List</h3>
Select a Chapter from the list below to edit or delete it. You can also <a href="index.php?do=realms&fn=story&action=new"><img src="icons/world_add.png" alt="Add" align="top" /> add a new Chapter</a>.<br /><br />
{{storylist}}
END;
?>

View File

@ -1,9 +0,0 @@
<?php
$template = <<<END
<h3>Towns List</h3>
Select a Town from the list below to edit or delete it. You can also <a href="index.php?do=realms&fn=towns&action=new"><img src="icons/world_add.png" alt="Add" align="top" /> add a new Town</a>.<br /><br />
{{townslist}}
END;
?>

View File

@ -1,23 +0,0 @@
<?php
$template = <<<END
<h3>Add a Town</h3>
<a href="index.php?do=realms&fn=towns">Back to Towns List</a><br /><br />
<form action="index.php?do=realms&fn=towns&action=new" method="post">
<table cellspacing="0" cellpadding="5" width="98%">
<tr><td width="25%">Town Name</td><td><input type="text" name="name" size="20" maxlength="30" /><br /><span class="grey">The name of this Town.</span><br /><br /></td></tr>
<tr><td width="25%" class="td_alt">Realm</td><td class="td_alt"><select name="world">{{realmselect}}</select><br /><span class="grey">The Realm this Town is a part of.</span><br /><br /></td></tr>
<tr><td width="25%">Latitude</td><td><input type="text" name="latitude" size="5" maxlength="6" /><br /><span class="grey">The vertical location of this town on the map.<br />Must be within the map size of the selected Realm.</span><br /><br /></td></tr>
<tr><td width="25%" class="td_alt">Longitude</td><td class="td_alt"><input type="text" name="longitude" size="5" maxlength="6" /><br /><span class="grey">The horizontal location of this town on the map.<br />Must be within the map size of the selected Realm.</span><br /><br /></td></tr>
<tr><td width="25%">Inn Price</td><td><input type="text" name="innprice" size="5" maxlength="10" /><br /><span class="grey">The cost to stay at this town's Inn.<br />Range: 0 to 4294967295.</span><br /><br /></td></tr>
<tr><td width="25%" class="td_alt">Map Price</td><td class="td_alt"><input type="text" name="mapprice" size="5" maxlength="10" /><br /><span class="grey">The cost to buy the map to this town.<br />Range: 0 to 4294967295.</span><br /><br /></td></tr>
<tr><td width="25%">TP Price</td><td><input type="text" name="travelpoints" size="5" maxlength="5" /><br /><span class="grey">The travel points to jump to this town.<br />Range: 0 to 65535.</span><br /><br /></td></tr>
<tr><td width="25%" class="td_alt">Minimum Item Level</td><td class="td_alt"><input type="text" name="itemminlvl" size="5" maxlength="10" /><br /><span class="grey">The minimum base item level that will be generated in this town.<br />Range: 0 to 4294967295.</span><br /><br /></td></tr>
<tr><td width="25%">Maximum Item Level</td><td><input type="text" name="itemmaxlvl" size="5" maxlength="10"/><br /><span class="grey">The maximum base item level that will be generated in this town.<br />Range: 0 to 4294967295.</span><br /><br /></td></tr>
<tr><td colspan="2" style="border-top: solid 2px black;"><center>
<button type="submit" name="submit"><img src="icons/tick.png" align="top" /> Save</button> <button type="reset"><img src="icons/cross.png" align="top" /> Reset</button>
</td></tr>
</table>
END;
?>

View File

@ -1,17 +0,0 @@
<?php
$template = <<<END
<h3>Delete a Town</h3>
<a href="index.php?do=realms&fn=town">Back to Towns List</a><br /><br />
<form action="index.php?do=realms&fn=towns&action=delete&id={{id}}" method="post">
<table cellspacing="0" cellpadding="5">
<tr><td colspan="2" style="border-top: solid 2px black;"><center>
Are you sure you want to delete {{name}}?
</center></td></tr>
<tr><td colspan="2" style="border-top: solid 2px black;"><center>
<button type="submit" name="diediedie"><img src="icons/tick.png" align="top" /> Yes</button> <button type="submit" name="abort"><img src="icons/cross.png" align="top" /> No</button>
</center></td></tr>
</table>
END;
?>

View File

@ -1,23 +0,0 @@
<?php
$template = <<<END
<h3>Edit a Town</h3>
<a href="index.php?do=realms&fn=towns">Back to Towns List</a><br /><br />
<form action="index.php?do=realms&fn=towns&action=edit&id={{id}}" method="post">
<table cellspacing="0" cellpadding="5" width="98%">
<tr><td width="25%">Town Name</td><td><input type="text" name="name" size="20" maxlength="30" value="{{name}}" /><br /><span class="grey">The name of this Town.</span><br /><br /></td></tr>
<tr><td width="25%" class="td_alt">Realm</td><td class="td_alt"><select name="world">{{realmselect}}</select><br /><span class="grey">The Realm this Town is a part of.</span><br /><br /></td></tr>
<tr><td width="25%">Latitude</td><td><input type="text" name="latitude" size="5" maxlength="6" value="{{latitude}}" /><br /><span class="grey">The vertical location of this town on the map.<br />Range: -{{realmsize}} to {{realmsize}}.</span><br /><br /></td></tr>
<tr><td width="25%" class="td_alt">Longitude</td><td class="td_alt"><input type="text" name="longitude" size="5" maxlength="6" value="{{longitude}}" /><br /><span class="grey">The horizontal location of this town on the map.<br />Range: -{{realmsize}} to {{realmsize}}.</span><br /><br /></td></tr>
<tr><td width="25%">Inn Price</td><td><input type="text" name="innprice" size="5" maxlength="10" value="{{innprice}}" /><br /><span class="grey">The cost to stay at this town's Inn.<br />Range: 0 to 4294967295.</span><br /><br /></td></tr>
<tr><td width="25%" class="td_alt">Map Price</td><td class="td_alt"><input type="text" name="mapprice" size="5" maxlength="10" value="{{mapprice}}" /><br /><span class="grey">The cost to buy the map to this town.<br />Range: 0 to 4294967295.</span><br /><br /></td></tr>
<tr><td width="25%">TP Price</td><td><input type="text" name="travelpoints" size="5" maxlength="5" value="{{travelpoints}}" /><br /><span class="grey">The travel points to jump to this town.<br />Range: 0 to 65535.</span><br /><br /></td></tr>
<tr><td width="25%" class="td_alt">Minimum Item Level</td><td class="td_alt"><input type="text" name="itemminlvl" size="5" maxlength="10" value="{{itemminlvl}}" /><br /><span class="grey">The minimum base item level that will be generated in this town.<br />Range: 0 to 4294967295.</span><br /><br /></td></tr>
<tr><td width="25%">Maximum Item Level</td><td><input type="text" name="itemmaxlvl" size="5" maxlength="10" value="{{itemmaxlvl}}" /><br /><span class="grey">The maximum base item level that will be generated in this town.<br />Range: 0 to 4294967295.</span><br /><br /></td></tr>
<tr><td colspan="2" style="border-top: solid 2px black;"><center>
<button type="submit" name="submit"><img src="icons/tick.png" align="top" /> Save</button> <button type="reset"><img src="icons/cross.png" align="top" /> Reset</button>
</td></tr>
</table>
END;
?>

View File

@ -1,6 +1,16 @@
DRAGON SCOURGE
Changelog
***** BETA FIVE *****
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):

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.
"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.
"secretword" => ""); // Secret word used when hashing information for cookies.
?>

View File

@ -1,5 +1,19 @@
<?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 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).
function checkcookies() {
include('config.php');

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 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).
function doexplore() { // Default explore screen.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +0,0 @@
ALTER TABLE `sx_control` ADD `cookiename` VARCHAR( 255 ) NOT NULL default 'scourge' AFTER `avatarmaxsize` ,
ADD `cookiedomain` VARCHAR( 255 ) NOT NULL AFTER `cookiename` ;
ALTER TABLE `sx_itembase` CHANGE `unique` `isunique` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '0'

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 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).
include("lib.php");
include("globals.php");
include("fightmods.php");

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 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).
function hpleech($player) {
/***********

View File

@ -1,5 +1,19 @@
<?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 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).
// Config.php.
include("config.php");
if (trim($dbsettings["secretword"]) == "") { die("Invalid setting for secretword in config.php. This setting must never be blank."); }

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 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).
// Before allowing anything else, we make sure the person is actually in town.
global $townrow;
if ($townrow == false) { die(header("Location: index.php")); }

BIN
images/sigbotback.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

@ -1,5 +1,19 @@
<?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 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).
error_reporting(E_STRICT);
include("lib.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 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).
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);
}
?>

View File

@ -1,22 +1,5 @@
-- phpMyAdmin SQL Dump
-- version 2.8.0.4
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Aug 09, 2006 at 09:29 PM
-- Server version: 4.1.14
-- PHP Version: 5.0.5
--
-- Database: `scourge2`
--
-- --------------------------------------------------------
--
-- Table structure for table `sx_accounts`
--
CREATE TABLE `sx_accounts` (
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 '',
@ -31,19 +14,10 @@ CREATE TABLE `sx_accounts` (
`imageformat` varchar(4) NOT NULL default '0',
`minimap` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
) TYPE=MyISAM ;
--
-- Dumping data for table `sx_accounts`
--
-- --------------------------------------------------------
--
-- Table structure for table `sx_babblebox`
--
CREATE TABLE `sx_babblebox` (
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 '',
@ -51,19 +25,10 @@ CREATE TABLE `sx_babblebox` (
`content` varchar(255) NOT NULL default '',
`guild` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
) TYPE=MyISAM ;
--
-- Dumping data for table `sx_babblebox`
--
-- --------------------------------------------------------
--
-- Table structure for table `sx_classes`
--
CREATE TABLE `sx_classes` (
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',
@ -74,23 +39,15 @@ CREATE TABLE `sx_classes` (
`mpperenergy` float unsigned NOT NULL default '0',
`description` text NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM;
) TYPE=MyISAM ;
--
-- Dumping data for table `sx_classes`
--
INSERT INTO `sx_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.'),
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.');
-- --------------------------------------------------------
--
-- Table structure for table `sx_control`
--
CREATE TABLE `sx_control` (
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',
@ -100,15 +57,19 @@ CREATE TABLE `sx_control` (
`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',
@ -116,21 +77,10 @@ CREATE TABLE `sx_control` (
`guildjoinlvl` int(10) unsigned NOT NULL default '0',
`guildupdate` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
) TYPE=MyISAM ;
--
-- Dumping data for table `sx_control`
--
INSERT INTO `sx_control` (`id`, `gamename`, `gameopen`, `gamepath`, `gameurl`, `forumurl`, `avatarpath`, `avatarurl`, `avatarmaxsize`, `showshout`, `showonline`, `showitemimages`, `showmonsterimages`, `adminemail`, `verifyemail`, `compression`, `debug`, `botcheck`, `pvprefresh`, `pvptimeout`, `guildstartup`, `guildstartlvl`, `guildjoinlvl`, `guildupdate`) VALUES (1, 'Dragon Scourge', 1, '', '', '', '', '', 15000, 1, 1, 1, 0, '', 1, 1, 1, 255, 15, 45, 100000, 35, 10, 24);
-- --------------------------------------------------------
--
-- Table structure for table `sx_difficulties`
--
CREATE TABLE `sx_difficulties` (
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',
@ -138,42 +88,24 @@ CREATE TABLE `sx_difficulties` (
`multiplier` float NOT NULL default '0',
`deathpenalty` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
) TYPE=MyISAM ;
--
-- Dumping data for table `sx_difficulties`
--
INSERT INTO `sx_difficulties` (`id`, `name`, `expbonus`, `goldbonus`, `multiplier`, `deathpenalty`) VALUES (1, 'Easy', 0, 0, 1, 0),
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);
-- --------------------------------------------------------
--
-- Table structure for table `sx_guildapps`
--
CREATE TABLE `sx_guildapps` (
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;
) TYPE=MyISAM ;
--
-- Dumping data for table `sx_guildapps`
--
-- --------------------------------------------------------
--
-- Table structure for table `sx_guilds`
--
CREATE TABLE `sx_guilds` (
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 '',
@ -195,23 +127,14 @@ CREATE TABLE `sx_guilds` (
`statement` text NOT NULL,
`news` text NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM;
) TYPE=MyISAM ;
--
-- Dumping data for table `sx_guilds`
--
-- --------------------------------------------------------
--
-- Table structure for table `sx_itembase`
--
CREATE TABLE `sx_itembase` (
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',
`unique` 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',
@ -234,13 +157,10 @@ CREATE TABLE `sx_itembase` (
`mod6name` varchar(50) NOT NULL default '',
`mod6attr` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
) TYPE=MyISAM ;
--
-- Dumping data for table `sx_itembase`
--
INSERT INTO `sx_itembase` (`id`, `name`, `slotnumber`, `unique`, `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),
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),
@ -414,25 +334,17 @@ INSERT INTO `sx_itembase` (`id`, `name`, `slotnumber`, `unique`, `willdrop`, `bu
(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);
-- --------------------------------------------------------
--
-- Table structure for table `sx_itemmodnames`
--
CREATE TABLE `sx_itemmodnames` (
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;
) TYPE=MyISAM ;
--
-- Dumping data for table `sx_itemmodnames`
--
INSERT INTO `sx_itemmodnames` (`id`, `fieldname`, `prettyname`, `percent`) VALUES (1, 'expbonus', 'Experience Bonus', 1),
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),
@ -453,13 +365,8 @@ INSERT INTO `sx_itemmodnames` (`id`, `fieldname`, `prettyname`, `percent`) VALUE
(19, 'hpgain', 'HP Per Kill', 0),
(20, 'mpgain', 'MP Per Kill', 0);
-- --------------------------------------------------------
--
-- Table structure for table `sx_itemprefixes`
--
CREATE TABLE `sx_itemprefixes` (
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',
@ -474,22 +381,14 @@ CREATE TABLE `sx_itemprefixes` (
`basename` varchar(50) NOT NULL default '',
`baseattr` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
) TYPE=MyISAM ;
--
-- Dumping data for table `sx_itemprefixes`
--
INSERT INTO `sx_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),
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);
-- --------------------------------------------------------
--
-- Table structure for table `sx_itemsuffixes`
--
CREATE TABLE `sx_itemsuffixes` (
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',
@ -504,22 +403,14 @@ CREATE TABLE `sx_itemsuffixes` (
`basename` varchar(50) NOT NULL default '',
`baseattr` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
) TYPE=MyISAM ;
--
-- Dumping data for table `sx_itemsuffixes`
--
INSERT INTO `sx_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),
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);
-- --------------------------------------------------------
--
-- Table structure for table `sx_messages`
--
CREATE TABLE `sx_messages` (
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',
@ -531,19 +422,10 @@ CREATE TABLE `sx_messages` (
`message` text NOT NULL,
`gold` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
) TYPE=MyISAM ;
--
-- Dumping data for table `sx_messages`
--
-- --------------------------------------------------------
--
-- Table structure for table `sx_monsters`
--
CREATE TABLE `sx_monsters` (
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',
@ -567,13 +449,10 @@ CREATE TABLE `sx_monsters` (
`newstory` int(10) unsigned NOT NULL default '0',
`hpleech` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
) TYPE=MyISAM ;
--
-- Dumping data for table `sx_monsters`
--
INSERT INTO `sx_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),
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),
@ -782,13 +661,8 @@ INSERT INTO `sx_monsters` (`id`, `name`, `world`, `level`, `maxexp`, `maxgold`,
(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);
-- --------------------------------------------------------
--
-- Table structure for table `sx_pvp`
--
CREATE TABLE `sx_pvp` (
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',
@ -799,20 +673,10 @@ CREATE TABLE `sx_pvp` (
`turntime` timestamp NOT NULL,
`fightrow` text NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM;
) TYPE=MyISAM ;
--
-- Dumping data for table `sx_pvp`
--
-- --------------------------------------------------------
--
-- Table structure for table `sx_spells`
--
CREATE TABLE `sx_spells` (
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 '',
@ -822,13 +686,10 @@ CREATE TABLE `sx_spells` (
`classonly` int(10) unsigned NOT NULL default '0',
`classexclude` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
) TYPE=MyISAM ;
--
-- Dumping data for table `sx_spells`
--
INSERT INTO `sx_spells` (`id`, `name`, `fname`, `value`, `mp`, `minlevel`, `classonly`, `classexclude`) VALUES (1, 'Heal 1', 'heal', 5, 2, 5, 2, 0),
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),
@ -883,34 +744,29 @@ INSERT INTO `sx_spells` (`id`, `name`, `fname`, `value`, `mp`, `minlevel`, `clas
(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', 'stoneskin', 5, 5, 1, 0, 0),
(57, 'Stone Skin 2', 'stoneskin', 10, 10, 3, 0, 0),
(58, 'Stone Skin 3', 'stoneskin', 15, 15, 7, 0, 0),
(59, 'Stone Skin 4', 'stoneskin', 20, 20, 10, 0, 2),
(60, 'Stone Skin 5', 'stoneskin', 30, 30, 23, 0, 2),
(61, 'Stone Skin 6', 'stoneskin', 40, 45, 31, 0, 2),
(62, 'Stone Skin 7', 'stoneskin', 55, 65, 55, 1, 0),
(63, 'Stone Skin 8', 'stoneskin', 70, 100, 75, 1, 0),
(64, 'Stone Skin 9', 'stoneskin', 95, 200, 87, 1, 0),
(65, 'Stone Skin 10', 'stoneskin', 110, 350, 95, 1, 0),
(66, 'Blessed Strike 1', 'blessedstrike', 5, 5, 1, 0, 2),
(67, 'Blessed Strike 2', 'blessedstrike', 10, 10, 3, 0, 2),
(68, 'Blessed Strike 3', 'blessedstrike', 15, 15, 7, 0, 2),
(69, 'Blessed Strike 4', 'blessedstrike', 20, 20, 10, 0, 2),
(70, 'Blessed Strike 5', 'blessedstrike', 25, 30, 23, 0, 2),
(71, 'Blessed Strike 6', 'blessedstrike', 30, 45, 31, 0, 2),
(72, 'Blessed Strike 7', 'blessedstrike', 40, 65, 55, 1, 0),
(73, 'Blessed Strike 8', 'blessedstrike', 55, 100, 75, 1, 0),
(74, 'Blessed Strike 9', 'blessedstrike', 70, 200, 87, 1, 0),
(75, 'Blessed Strike 10', 'blessedstrike', 90, 350, 95, 1, 0);
(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);
-- --------------------------------------------------------
--
-- Table structure for table `sx_story`
--
CREATE TABLE `sx_story` (
DROP TABLE IF EXISTS `<<story>>`;
CREATE TABLE `<<story>>` (
`id` int(10) unsigned NOT NULL auto_increment,
`title` text NOT NULL,
`story` text NOT NULL,
@ -927,15 +783,12 @@ CREATE TABLE `sx_story` (
`rewardname` varchar(30) NOT NULL default '',
`rewardattr` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
) TYPE=MyISAM ;
--
-- Dumping data for table `sx_story`
--
INSERT INTO `sx_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, 'In Town', '', 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, 'Fighting', '', 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, '0,170,0', 2, 0, 0, 'Exploring', 'maxhp', 50),
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, '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, '', '', 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, '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),
@ -954,13 +807,8 @@ INSERT INTO `sx_story` (`id`, `title`, `story`, `world`, `latitude`, `longitude`
(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);
-- --------------------------------------------------------
--
-- Table structure for table `sx_towns`
--
CREATE TABLE `sx_towns` (
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',
@ -972,13 +820,10 @@ CREATE TABLE `sx_towns` (
`itemminlvl` int(10) unsigned NOT NULL default '0',
`itemmaxlvl` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;
) TYPE=MyISAM ;
--
-- Dumping data for table `sx_towns`
--
INSERT INTO `sx_towns` (`id`, `name`, `world`, `latitude`, `longitude`, `innprice`, `mapprice`, `travelpoints`, `itemminlvl`, `itemmaxlvl`) VALUES (1, 'Middleton', 1, 0, 0, 5, 0, 0, 1, 5),
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),
@ -1004,13 +849,8 @@ INSERT INTO `sx_towns` (`id`, `name`, `world`, `latitude`, `longitude`, `innpric
(24, 'Outpost 22', 5, -74, -69, 800, 4500, 400, 80, 84),
(25, 'Outpost 42', 5, 89, 94, 950, 5000, 425, 83, 85);
-- --------------------------------------------------------
--
-- Table structure for table `sx_users`
--
CREATE TABLE `sx_users` (
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',
@ -1113,31 +953,19 @@ CREATE TABLE `sx_users` (
`bonusdefense` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
FULLTEXT KEY `item1name` (`item1name`)
) TYPE=MyISAM;
) TYPE=MyISAM ;
--
-- Dumping data for table `sx_users`
--
-- --------------------------------------------------------
--
-- Table structure for table `sx_worlds`
--
CREATE TABLE `sx_worlds` (
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;
) TYPE=MyISAM ;
--
-- Dumping data for table `sx_worlds`
--
INSERT INTO `sx_worlds` (`id`, `name`, `size`) VALUES (1, 'Raenslide', 100),
INSERT INTO `<<worlds>>` (`id`, `name`, `size`) VALUES
(1, 'Raenslide', 100),
(2, 'Lorenfall', 100),
(3, 'Borderlands', 100),
(4, 'Inferno', 100),
(5, 'Unreality', 100);
(5, 'Unreality', 100);

258
lib.php

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,19 @@
<?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 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).
function updateuserrow() {
global $userrow;

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 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).
include("lib.php");
if (isset($_GET["do"])) { $do = $_GET["do"]; } else { $do = ""; }
@ -26,12 +40,12 @@ function login() {
// 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 Accoutn 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); }
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($controlrow["cookiename"], $newcookie, $expiretime, "/", "", 0);
setcookie($controlrow["cookiename"], $newcookie, $expiretime, "/", $controlrow["cookiedomain"], 0);
die(header("Location: index.php"));
} else {

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 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).
// Before allowing anything else, we make sure the person is actually in town.
global $townrow;
if ($townrow == false) { die(header("Location: index.php")); }

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>

14
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 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).
include("lib.php");
include("globals.php");

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 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).
include("lib.php");
include("globals.php");

View File

@ -1,5 +1,19 @@
<?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 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).
function iddqd() {
global $acctrow;

View File

@ -1,5 +1,19 @@
<?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 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).
function panelleft() {
global $controlrow, $userrow, $acctrow, $townrow, $worldrow;
@ -113,7 +127,8 @@ function paneltop($loggedin = true) {
if ($loggedin == true || isset($acctrow)) {
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 = ""; }
//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 {

15
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 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).
include("lib.php");
include("globals.php");
include("fightmods.php");
@ -390,6 +404,7 @@ function youlose() {
function updateopponent() {
global $monsterrow;
$monsterrow = array_map("uber_mres", $monsterrow);
$querystring = "";
foreach($monsterrow as $a=>$b) {

View File

@ -1,5 +1,19 @@
<?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 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).
include("lib.php");
include("globals.php");

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 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).
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 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).
function heal($id) {
global $userrow, $spells;
@ -144,23 +158,23 @@ function stoneskin($id) {
//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["bonusdefence"] == 0) {
$userrow["bonusdefence"] = $spells[$id]["value"];
if ($userrow["bonusdefense"] == 0) {
$userrow["bonusdefense"] = $spells[$id]["value"];
} else {
//if a more powerful defence spell is cast, replace the old value with the new one
if ($userrow["bonusdefence"] < $spells[$id]["value"]) {
$userrow["bonusdefence"] = $spells[$id]["value"];
//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["bonusdefence"])+1) / 100;
$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["bonusdefence"] = $userrow["bonusdefence"] + $spells[$id]["value"];
$userrow["bonusdefense"] = $userrow["bonusdefense"] + $spells[$id]["value"];
}
if ($userrow["bonusdefence"] > 200) { $userrow["bonusdefence"] = 200;}
if ($userrow["bonusdefense"] > 200) { $userrow["bonusdefense"] = 200;}
// all damage will never go above 50% chance. 0.25% damage will always be 50%
}

View File

@ -1,5 +1,19 @@
<?php // story.php :: Storyline handling.
// 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).
include("lib.php");
include("globals.php");

View File

@ -1,70 +0,0 @@
<?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.
*/
$template = <<<END
<head>
<title>{{gamename}} :: {{pagetitle}}</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; }
.babble1 { background-color: #eeeeee; font: 10px Verdana; margin: 0px; padding: 2px; }
.babble2 { background-color: #ffffff; font: 10px Verdana; margin: 0px; padding: 2px; }
</style>
</head>
<body><center>
<table cellspacing="0" cellpadding="3" style="width: 800px; height: 570px; border: solid 1px black; background-color: white; ">
<tr>
<td style="border-bottom: solid 1px #cccccc;">
<table width="100%" cellspacing="0" cellpadding="0"><tr><td width="65%">
<a href="index.php"><img src="images/logo.png" alt="{{gamename}}" title="{{gamename}}" /></a>
</td><td style="vertical-align:middle; white-space:nowrap;">
{{topnav}}
</td></tr></table>
</td>
</tr>
<tr>
<td valign="top" style="height: 100%; border-right: solid 1px #cccccc;">
<img src="images/spacer.gif" alt="" width="140" height="1" /><br />
{{leftnav}}
</td>
</tr>
<tr>
<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 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).
$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 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).
$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

@ -1,5 +1,19 @@
<?php
// 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).
$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>

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 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).
$template = <<<END
Thank you for accepting this item.<br /><br />
You may now <a href="index.php">continue exploring</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 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).
$template = <<<END
<table style="border-bottom: solid 1px black; width: 95%;" cellspacing="0" cellpadding="0"><tr>
<td>{{image}}</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 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).
$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 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).
$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 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).
$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 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).
$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 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).
$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 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).
$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 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).
$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 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).
$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 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).
$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 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).
$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 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).
$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 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).
$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 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).
$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 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).
$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 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).
$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 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).
$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 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).
$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 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).
$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 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).
$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 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).
$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 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).
$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 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).
$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 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).
$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 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).
$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 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).
$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 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).
$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 />

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