diff --git a/admin/control.php b/admin/control.php new file mode 100644 index 0000000..97a616e --- /dev/null +++ b/admin/control.php @@ -0,0 +1,69 @@ + $b) { + if (!is_numeric($_POST[$b])) { $errors .= "$b is a numeric field. Please enter numbers only. Please go back and try again.
"; } + } + 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.
"; } + } + 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.

You may return Home or to the Main Settings page."); + + } + + 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"] .= ""; + } + + $page = parsetemplate(gettemplate("control"), $controlrow); + display("Main Settings", $page); + +} + +?> \ No newline at end of file diff --git a/admin/cookies.php b/admin/cookies.php new file mode 100644 index 0000000..ca508c1 --- /dev/null +++ b/admin/cookies.php @@ -0,0 +1,31 @@ + \ No newline at end of file diff --git a/admin/globals.php b/admin/globals.php new file mode 100644 index 0000000..0a92d19 --- /dev/null +++ b/admin/globals.php @@ -0,0 +1,18 @@ + \ No newline at end of file diff --git a/admin/icons/bug.png b/admin/icons/bug.png new file mode 100644 index 0000000..2d5fb90 Binary files /dev/null and b/admin/icons/bug.png differ diff --git a/admin/icons/cog.png b/admin/icons/cog.png new file mode 100644 index 0000000..67de2c6 Binary files /dev/null and b/admin/icons/cog.png differ diff --git a/admin/icons/coins.png b/admin/icons/coins.png new file mode 100644 index 0000000..0ca9074 Binary files /dev/null and b/admin/icons/coins.png differ diff --git a/admin/icons/cross.png b/admin/icons/cross.png new file mode 100644 index 0000000..1514d51 Binary files /dev/null and b/admin/icons/cross.png differ diff --git a/admin/icons/delete.png b/admin/icons/delete.png new file mode 100644 index 0000000..08f2493 Binary files /dev/null and b/admin/icons/delete.png differ diff --git a/admin/icons/flag_blue.png b/admin/icons/flag_blue.png new file mode 100644 index 0000000..003924f Binary files /dev/null and b/admin/icons/flag_blue.png differ diff --git a/admin/icons/group.png b/admin/icons/group.png new file mode 100644 index 0000000..7fb4e1f Binary files /dev/null and b/admin/icons/group.png differ diff --git a/admin/icons/house.png b/admin/icons/house.png new file mode 100644 index 0000000..fed6221 Binary files /dev/null and b/admin/icons/house.png differ diff --git a/admin/icons/lightning.png b/admin/icons/lightning.png new file mode 100644 index 0000000..9680afd Binary files /dev/null and b/admin/icons/lightning.png differ diff --git a/admin/icons/pencil.png b/admin/icons/pencil.png new file mode 100644 index 0000000..0bfecd5 Binary files /dev/null and b/admin/icons/pencil.png differ diff --git a/admin/icons/tick.png b/admin/icons/tick.png new file mode 100644 index 0000000..a9925a0 Binary files /dev/null and b/admin/icons/tick.png differ diff --git a/admin/icons/user.png b/admin/icons/user.png new file mode 100644 index 0000000..79f35cc Binary files /dev/null and b/admin/icons/user.png differ diff --git a/admin/icons/world.png b/admin/icons/world.png new file mode 100644 index 0000000..68f21d3 Binary files /dev/null and b/admin/icons/world.png differ diff --git a/admin/icons/world_add.png b/admin/icons/world_add.png new file mode 100644 index 0000000..6d0d7f7 Binary files /dev/null and b/admin/icons/world_add.png differ diff --git a/admin/icons/world_delete.png b/admin/icons/world_delete.png new file mode 100644 index 0000000..ffcd115 Binary files /dev/null and b/admin/icons/world_delete.png differ diff --git a/admin/icons/world_edit.png b/admin/icons/world_edit.png new file mode 100644 index 0000000..00794d4 Binary files /dev/null and b/admin/icons/world_edit.png differ diff --git a/admin/icons/wrench.png b/admin/icons/wrench.png new file mode 100644 index 0000000..5c8213f Binary files /dev/null and b/admin/icons/wrench.png differ diff --git a/admin/index.php b/admin/index.php new file mode 100644 index 0000000..ddca0b8 --- /dev/null +++ b/admin/index.php @@ -0,0 +1,34 @@ + \ No newline at end of file diff --git a/admin/lib.php b/admin/lib.php new file mode 100644 index 0000000..083e45f --- /dev/null +++ b/admin/lib.php @@ -0,0 +1,254 @@ +
$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=>"\"Home\" Home", + 2=>"\"Config\" Config", + 3=>"\"Players\" Players", + 4=>"\"Items\" Items", + 5=>"\"Monsters\" Monsters", + 6=>"\"Spells\" Spells", + 7=>"\"Guilds\" Guilds", + 8=>"\"Realms\" Realms", + 9=>"\"Misc.\" Misc.", + 10=>"\"Tools\" Tools" + ); + + $tabstrip = ""; + foreach ($tabs as $a => $b) { + if ($thetab == $a) { $style = "tab_on"; } else { $style = "tab_off"; } + $tabstrip .= "$b"; + } + + 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 = "\n" + . "\n" + . "\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 .= << + + + Version {{version}} / {{numqueries}} Queries / {{totaltime}} Seconds + + + Dragon Scourge © by renderse7en + + + + + +THEVERYENDOFYOU; + + // Finalize control array for output. + $page = parsetemplate($page, $row); + + if ($controlrow["compression"] == 1) { ob_start("ob_gzhandler"); } + echo $page; + die(); + +} + +?> \ No newline at end of file diff --git a/admin/realms.php b/admin/realms.php new file mode 100644 index 0000000..42f2c22 --- /dev/null +++ b/admin/realms.php @@ -0,0 +1,321 @@ + $b) { + extract($b); + if ($alt) { $bg = "class=\"td_alt\""; $alt = false; } else { $bg = ""; $alt = true; } + $pagerow["realmslist"] .= "
$name\"Edit\" Edit     \"Delete\" Delete
"; + } + + 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. Click here 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. Click here 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. Click here 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"] .= "
$name (".$realms[$b["world"]]["name"].")\"Edit\" Edit     \"Delete\" Delete
"; + } + + 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. Click here 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"] .= ""; + } + + // 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. Click here 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"] .= ""; + } + + // 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. Click here 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"] .= "
$title\"Edit\" Edit     \"Delete\" Delete
"; + } + + 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. Click here 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"] .= ""; + } + + // 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. Click here 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"] .= ""; + } + + // 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. Click here 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)); + + } + +} + +?> \ No newline at end of file diff --git a/admin/templates/control.php b/admin/templates/control.php new file mode 100644 index 0000000..21fa586 --- /dev/null +++ b/admin/templates/control.php @@ -0,0 +1,37 @@ +Configuration Settings +These are the primary game settings that control various global aspects of your game.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Game Name
The name of your game. Used in page titles and when sending email to new users.

Game is Open? Yes
Should normally be left on, but you should turn off your game while performing any updates.

Game Path
The full server path to your game. If you don't know this, please ask your host for assistance.

Game URL
The full URL to your game.

Forum URL
If you have a support forum for your game, enter its URL here - otherwise leave blank to disable this link.

Avatar Path
The full server path to your avatar uploads folder.

Avatar URL
The full URL to your avatar uploads folder.

Avatar Max Filesize
Enter the maximum file size (in bytes) for uploaded avatars.
Range: 0 to 4294967295.


Show Babblebox? Yes
Enables the Babblebox iframe in the right panel.

Show Who's Online? Yes
Enables the Who's Online listing in the right panel.

Show Item Images?
Slot images use one image for all items in a given slot (e.g. weapons, shields, armor, etc.). ID images use an individual image for every item, based on the item's ID number.
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.


Show Monster Images? Yes
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.

Admin's Email
This is the game owner's email address, used when sending email to new users.

Enable Email Functions? Yes
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.
NOTE: 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.


Enable ZLib Compression? Yes
Enables ZLib output compression, which reduces bandwidth and speeds up page access time for end-users.

Enable Debug Info? Yes
Displays extra information (query count & page generation time) in the footer, and displays full MySQL query errors if they occur.

Bot Check
Bot Check ensures that players are human by displaying a CAPTCHA challenge form every so often (random 1 in n 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.
Range: 0 to 4294967295.
Recommended: 255.


PVP Refresh Time
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.
Range: 0 to 4294967295.


PVP Timeout Limit
The amount of time (in seconds) it takes for someone to remain inactive and cause the PVP battle to close.
Range: 0 to 4294967295.


Guild Startup Cost
The amount of gold it takes for a player to start their own Guild.
Range: 0 to 4294967295.


Guild Start Level
The minimum level a player must reach before being allowed to start a Guild.
Range: 0 to 4294967295.


Guild Join Level
The minimum level a player must reach before being allowed to join a Guild.
Range: 0 to 4294967295.


Guild Update Time
The amount of time (in hours) before automatically recalculating Guild Honor Points.
Range: 0 to 4294967295.


+ +
+END; + +?> \ No newline at end of file diff --git a/admin/templates/index.php b/admin/templates/index.php new file mode 100644 index 0000000..70bc833 --- /dev/null +++ b/admin/templates/index.php @@ -0,0 +1,12 @@ +Welcome to the Dragon Scourge Administrator. +Please select a tab above to control various settings and attributes for your game.

+Your game has {{accounts}} accounts with {{characters}} active characters. {{guildchars}} are members of {{guilds}} Guilds.

+ +Click here to return to your game.


+The awesome Silk icons, used throughout the control panel, were created by FamFamFam.com. +END; + +?> \ No newline at end of file diff --git a/admin/templates/primary.php b/admin/templates/primary.php new file mode 100644 index 0000000..b1ca2b5 --- /dev/null +++ b/admin/templates/primary.php @@ -0,0 +1,41 @@ + +{{gamename}} :: {{pagetitle}} + + +
+ + + + {{tabstrip}} + +
+ + +
+ {{content}} +
+END; + +?> \ No newline at end of file diff --git a/admin/templates/realms_index.php b/admin/templates/realms_index.php new file mode 100644 index 0000000..b5d23ed --- /dev/null +++ b/admin/templates/realms_index.php @@ -0,0 +1,9 @@ +Realms +Please select which aspect of the Realms you wish to edit.

+[ Realms | Towns | Storyline ] +END; + +?> \ No newline at end of file diff --git a/admin/templates/realms_realms.php b/admin/templates/realms_realms.php new file mode 100644 index 0000000..3219f4c --- /dev/null +++ b/admin/templates/realms_realms.php @@ -0,0 +1,9 @@ +Realms List +Select a Realm from the list below to edit or delete it. You can also Add add a new Realm.

+{{realmslist}} +END; + +?> \ No newline at end of file diff --git a/admin/templates/realms_realms_add.php b/admin/templates/realms_realms_add.php new file mode 100644 index 0000000..60397cd --- /dev/null +++ b/admin/templates/realms_realms_add.php @@ -0,0 +1,16 @@ +Add a Realm +Back to Realms List

+ + + + + +
Realm Name
The name of this Realm.

Realm Size
Realms are divided into four square quadrants. This number is the length/width of each individual quadrant.
Range: 0 to 65535.


+ +
+END; + +?> \ No newline at end of file diff --git a/admin/templates/realms_realms_delete.php b/admin/templates/realms_realms_delete.php new file mode 100644 index 0000000..4e95409 --- /dev/null +++ b/admin/templates/realms_realms_delete.php @@ -0,0 +1,17 @@ +Delete a Realm +Back to Realms List

+ + + + +
+Are you sure you want to delete {{name}}? +
+ +
+END; + +?> \ No newline at end of file diff --git a/admin/templates/realms_realms_edit.php b/admin/templates/realms_realms_edit.php new file mode 100644 index 0000000..4510bea --- /dev/null +++ b/admin/templates/realms_realms_edit.php @@ -0,0 +1,16 @@ +Edit a Realm +Back to Realms List

+ + + + + +
Realm Name
The name of this Realm.

Realm Size
Realms are divided into four square quadrants. This number is the length/width of each individual quadrant. Range: 0 to 65535.

+ +
+END; + +?> \ No newline at end of file diff --git a/admin/templates/realms_story.php b/admin/templates/realms_story.php new file mode 100644 index 0000000..fb16d1d --- /dev/null +++ b/admin/templates/realms_story.php @@ -0,0 +1,9 @@ +Story List +Select a Chapter from the list below to edit or delete it. You can also Add add a new Chapter.

+{{storylist}} +END; + +?> \ No newline at end of file diff --git a/admin/templates/realms_towns.php b/admin/templates/realms_towns.php new file mode 100644 index 0000000..3542b57 --- /dev/null +++ b/admin/templates/realms_towns.php @@ -0,0 +1,9 @@ +Towns List +Select a Town from the list below to edit or delete it. You can also Add add a new Town.

+{{townslist}} +END; + +?> \ No newline at end of file diff --git a/admin/templates/realms_towns_add.php b/admin/templates/realms_towns_add.php new file mode 100644 index 0000000..a2f9b60 --- /dev/null +++ b/admin/templates/realms_towns_add.php @@ -0,0 +1,23 @@ +Add a Town +Back to Towns List

+ + + + + + + + + + + + +
Town Name
The name of this Town.

Realm
The Realm this Town is a part of.

Latitude
The vertical location of this town on the map.
Must be within the map size of the selected Realm.


Longitude
The horizontal location of this town on the map.
Must be within the map size of the selected Realm.


Inn Price
The cost to stay at this town's Inn.
Range: 0 to 4294967295.


Map Price
The cost to buy the map to this town.
Range: 0 to 4294967295.


TP Price
The travel points to jump to this town.
Range: 0 to 65535.


Minimum Item Level
The minimum base item level that will be generated in this town.
Range: 0 to 4294967295.


Maximum Item Level
The maximum base item level that will be generated in this town.
Range: 0 to 4294967295.


+ +
+END; + +?> \ No newline at end of file diff --git a/admin/templates/realms_towns_delete.php b/admin/templates/realms_towns_delete.php new file mode 100644 index 0000000..7922923 --- /dev/null +++ b/admin/templates/realms_towns_delete.php @@ -0,0 +1,17 @@ +Delete a Town +Back to Towns List

+ + + + +
+Are you sure you want to delete {{name}}? +
+ +
+END; + +?> \ No newline at end of file diff --git a/admin/templates/realms_towns_edit.php b/admin/templates/realms_towns_edit.php new file mode 100644 index 0000000..cdd2dd5 --- /dev/null +++ b/admin/templates/realms_towns_edit.php @@ -0,0 +1,23 @@ +Edit a Town +Back to Towns List

+ + + + + + + + + + + + +
Town Name
The name of this Town.

Realm
The Realm this Town is a part of.

Latitude
The vertical location of this town on the map.
Range: -{{realmsize}} to {{realmsize}}.


Longitude
The horizontal location of this town on the map.
Range: -{{realmsize}} to {{realmsize}}.


Inn Price
The cost to stay at this town's Inn.
Range: 0 to 4294967295.


Map Price
The cost to buy the map to this town.
Range: 0 to 4294967295.


TP Price
The travel points to jump to this town.
Range: 0 to 65535.


Minimum Item Level
The minimum base item level that will be generated in this town.
Range: 0 to 4294967295.


Maximum Item Level
The maximum base item level that will be generated in this town.
Range: 0 to 4294967295.


+ +
+END; + +?> \ No newline at end of file diff --git a/changelog.txt b/changelog.txt index 5e8b885..6b70a4e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,22 @@ DRAGON SCOURGE Changelog +***** BETA FOUR ***** + +8.09.2006 - Build 17 (Haiku): +- Moved stylesheets into .css files. +- Added javascript tooltips for the class info when creating a new character. +- Changed doquery() format - rewrote all calls to this function to match the new format. +- Various changes to the structure of lib.php. +- Implemented Anman's increased attack and defense spells (Blessed Strike & Stone Skin). +- Fixed class display in profile view. +- Began admin control panel. +- Various little bitty fixes. +- You can no longer gamble 0 gold. +- Added new level stat type: life. +- Monsters can now do excellent hits, and you can now dodge monsters. +- Removed several columns from controlrow that are no longer used. + ***** BETA THREE ***** 4.26.2006 - Build 16 (Road Rage): diff --git a/config.php b/config.php index 1e30d25..3d10be5 100644 --- a/config.php +++ b/config.php @@ -5,7 +5,7 @@ $dbsettings = Array( "user" => "", // MySQL username. "pass" => "", // MySQL password. "name" => "", // MySQL database name. - "prefix" => "", // Prefix for table names. + "prefix" => "sx", // Prefix for table names. "secretword" => ""); // Secret word used when hashing information for cookies. ?> \ No newline at end of file diff --git a/cookies.php b/cookies.php index 81c22d7..d356503 100644 --- a/cookies.php +++ b/cookies.php @@ -12,7 +12,7 @@ function checkcookies() { // {ID} {USERNAME} {PASSWORDHASH} {REMEMBERME} $theuser = explode(" ",$_COOKIE["scourge"]); if (!is_numeric($theuser[0])) { err("Invalid cookie data (Error 0). Please clear cookies and log in again."); } - $row = dorow(doquery("SELECT * FROM {{table}} WHERE username='$theuser[1]' LIMIT 1", "accounts")); + $row = dorow(doquery("SELECT * FROM <> WHERE username='$theuser[1]' LIMIT 1")); if ($row == false) { err("Invalid cookie data (Error 1). Please clear cookies and log in again."); } if ($row["id"] != $theuser[0]) { err("Invalid cookie data (Error 2). Please clear cookies and log in again."); } if (md5($row["password"] . "--" . $dbsettings["secretword"]) !== $theuser[2]) { err("Invalid cookie data (Error 3). Please clear cookies and log in again."); } diff --git a/css/primary.css b/css/primary.css new file mode 100644 index 0000000..a79f81b --- /dev/null +++ b/css/primary.css @@ -0,0 +1,83 @@ +body { + font: 10px Verdana; + 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; + } + +.tip { + font: 10px/12px Arial,Helvetica,sans-serif; + border: solid 1px #666666; + width: 270px; + padding: 1px; + position: absolute; + z-index: 100; + visibility: hidden; + color: #333333; + top: 20px; + left: 90px; + background-color: #ffffcc; + layer-background-color: #ffffcc; + } \ No newline at end of file diff --git a/explore.php b/explore.php index 7e0ba02..10b8d5d 100644 --- a/explore.php +++ b/explore.php @@ -39,25 +39,25 @@ function move() { // Primary exploring function. Move them with the compass butt // Breakout for story. if ($userrow["story"] != "0" && $userrow["storylat"] == $userrow["latitude"] && $userrow["storylon"] == $userrow["longitude"]) { $string = ltrim($string," ,"); - doquery("UPDATE {{table}} SET $string WHERE id='".$userrow["id"]."' LIMIT 1", "users"); + doquery("UPDATE <> SET $string WHERE id='".$userrow["id"]."' LIMIT 1"); die(header("Location: story.php")); } // Breakout for towns. - $row = dorow(doquery("SELECT * FROM {{table}} WHERE world='".$userrow["world"]."' AND latitude='".$userrow["latitude"]."' AND longitude='".$userrow["longitude"]."' LIMIT 1", "towns")); + $row = dorow(doquery("SELECT * FROM <> WHERE world='".$userrow["world"]."' AND latitude='".$userrow["latitude"]."' AND longitude='".$userrow["longitude"]."' LIMIT 1")); if ($row != false) { $townslist = explode(",",$userrow["townslist"]); if (!in_array($row["id"], $townslist)) { $userrow["townslist"] .= ",".$row["id"]; $string .= ", townslist='".$userrow["townslist"]."'"; } - doquery("UPDATE {{table}} SET currentaction='In Town' $string WHERE id='".$userrow["id"]."' LIMIT 1", "users"); + doquery("UPDATE <> SET currentaction='In Town' $string WHERE id='".$userrow["id"]."' LIMIT 1"); display("Exploring", parsetemplate(gettemplate("town_enter"), $row)); } // Decide if we want to pick a fight with someone. if (rand(1,5) == 1 && $userrow["currentaction"] != "In Town") { - doquery("UPDATE {{table}} SET currentaction='Fighting' $string WHERE id='".$userrow["id"]."' LIMIT 1", "users"); + doquery("UPDATE <> SET currentaction='Fighting' $string WHERE id='".$userrow["id"]."' LIMIT 1"); die(header("Location: fight.php")); } @@ -70,7 +70,7 @@ function move() { // Primary exploring function. Move them with the compass butt // If we've gotten this far, nothing has happened. $userrow["currentaction"] = "Exploring"; - doquery("UPDATE {{table}} SET currentaction='Exploring', dropidstring='0' $string WHERE id='".$userrow["id"]."' LIMIT 1", "users"); + doquery("UPDATE <> SET currentaction='Exploring', dropidstring='0' $string WHERE id='".$userrow["id"]."' LIMIT 1"); display("Exploring", gettemplate("explore")); } @@ -85,7 +85,7 @@ function travel($id) { // Move them with the Travel To list. if ($userrow["exploreverify"] != "") { botkillah(); } if (!is_numeric($id)) { err("Invalid action. Please go back and try again."); } - $query = doquery("SELECT * FROM {{table}} WHERE id='$id' LIMIT 1", "towns"); + $query = doquery("SELECT * FROM <> WHERE id='$id' LIMIT 1"); $row = dorow($query); // Errors. @@ -99,7 +99,7 @@ function travel($id) { // Move them with the Travel To list. $userrow["longitude"] = $row["longitude"]; $userrow["latitude"] = $row["latitude"]; $userrow["currenttp"] -= $row["travelpoints"]; - $query = doquery("UPDATE {{table}} SET dropidstring='0', latitude='".$userrow["latitude"]."', longitude='".$userrow["longitude"]."', currenttp='".$userrow["currenttp"]."', currentaction='In Town' WHERE id='".$userrow["id"]."' LIMIT 1", "users"); + $query = doquery("UPDATE <> SET dropidstring='0', latitude='".$userrow["latitude"]."', longitude='".$userrow["longitude"]."', currenttp='".$userrow["currenttp"]."', currentaction='In Town' WHERE id='".$userrow["id"]."' LIMIT 1"); display("Exploring", parsetemplate(gettemplate("town_enter"), $row)); } @@ -125,7 +125,7 @@ function quickheal() { // Quick heal. // Now heal them. $userrow["currenthp"] = min($userrow["currenthp"] + $spells[$id]["value"], $userrow["maxhp"]); $userrow["currentmp"] = $userrow["currentmp"] - $spells[$id]["mp"]; - doquery("UPDATE {{table}} SET currenthp='".$userrow["currenthp"]."', currentmp='".$userrow["currentmp"]."' WHERE id='".$userrow["id"]."' LIMIT 1", "users"); + doquery("UPDATE <> SET currenthp='".$userrow["currenthp"]."', currentmp='".$userrow["currentmp"]."' WHERE id='".$userrow["id"]."' LIMIT 1"); display("Exploring", gettemplate("explore_quickheal")); } @@ -136,23 +136,23 @@ function itemdrop() { // Handling for item drops from monsters. if ($userrow["dropidstring"] == "0") { err("No item has been dropped. Please go back and try again."); } - $premodrow = dorow(doquery("SELECT * FROM {{table}} ORDER BY id","itemmodnames")); + $premodrow = dorow(doquery("SELECT * FROM <> ORDER BY id")); foreach($premodrow as $a=>$b) { $modrow[$b["fieldname"]] = $b; } $thenewitem = explode(",",$userrow["dropidstring"]); - $newitem = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$thenewitem[1]."' LIMIT 1", "itembase")); - $newprefix = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$thenewitem[0]."' LIMIT 1", "itemprefixes")); - $newsuffix = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$thenewitem[2]."' LIMIT 1", "itemsuffixes")); + $newitem = dorow(doquery("SELECT * FROM <> WHERE id='".$thenewitem[1]."' LIMIT 1")); + $newprefix = dorow(doquery("SELECT * FROM <> WHERE id='".$thenewitem[0]."' LIMIT 1")); + $newsuffix = dorow(doquery("SELECT * FROM <> WHERE id='".$thenewitem[2]."' LIMIT 1")); $newfullitem = builditem($newprefix, $newitem, $newsuffix, $modrow); $row["itemtable"] = parsetemplate(gettemplate("explore_drop_itemrow"), $newfullitem); if ($userrow["item".$newitem["slotnumber"]."idstring"] != "0") { $theolditem = explode(",",$userrow["item".$newitem["slotnumber"]."idstring"]); - $olditem = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$theolditem[1]."' LIMIT 1", "itembase")); - $oldprefix = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$theolditem[0]."' LIMIT 1", "itemprefixes")); - $oldsuffix = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$theolditem[2]."' LIMIT 1", "itemsuffixes")); + $olditem = dorow(doquery("SELECT * FROM <> WHERE id='".$theolditem[1]."' LIMIT 1")); + $oldprefix = dorow(doquery("SELECT * FROM <> WHERE id='".$theolditem[0]."' LIMIT 1")); + $oldsuffix = dorow(doquery("SELECT * FROM <> WHERE id='".$theolditem[2]."' LIMIT 1")); $oldfullitem = builditem($oldprefix, $olditem, $oldsuffix, $modrow); $row["olditems"] = parsetemplate(gettemplate("town_buy_olditemrow"), $oldfullitem); } else { @@ -223,11 +223,11 @@ function botkillah() { // Bust a cap in the asses of macro bots. Word. if (isset($_POST["submit"])) { if (strtoupper($_POST["verify"]) == $userrow["exploreverify"]) { - $query = doquery("UPDATE {{table}} SET exploreverify='',exploreverifyimage='' WHERE id='".$userrow["id"]."' LIMIT 1", "users"); + $query = doquery("UPDATE <> SET exploreverify='',exploreverifyimage='' WHERE id='".$userrow["id"]."' LIMIT 1"); unlink("images/botcheck/".$userrow["exploreverifyimage"]); die(header("Location: index.php")); } else { - $query = doquery("UPDATE {{table}} SET explorefailed=explorefailed+1 WHERE id='".$userrow["id"]."' LIMIT 1", "users"); + $query = doquery("UPDATE <> SET explorefailed=explorefailed+1 WHERE id='".$userrow["id"]."' LIMIT 1"); die(header("Location: index.php?do=humanity")); } @@ -254,7 +254,7 @@ function botkillah() { // Bust a cap in the asses of macro bots. Word. for($i=0; $i<8; $i++) { $randomext .= rand(0,9); } ImagePNG($im, "images/botcheck/$randomext".".png"); ImageDestroy($im); - $query = doquery("UPDATE {{table}} SET exploreverify='$new_string',exploreverifyimage='$randomext".".png' WHERE id='".$userrow["id"]."' LIMIT 1", "users"); + $query = doquery("UPDATE <> SET exploreverify='$new_string',exploreverifyimage='$randomext".".png' WHERE id='".$userrow["id"]."' LIMIT 1"); $pagerow["exploreverifyimage"] = $randomext.".png"; diff --git a/extras/Thumbs.db b/extras/Thumbs.db new file mode 100644 index 0000000..936848d Binary files /dev/null and b/extras/Thumbs.db differ diff --git a/extras/install.sql b/extras/install.sql index 774ce94..3f99d70 100644 --- a/extras/install.sql +++ b/extras/install.sql @@ -1,9 +1,9 @@ -- phpMyAdmin SQL Dump --- version 2.6.0-pl3 +-- version 2.8.0.4 -- http://www.phpmyadmin.net -- -- Host: localhost --- Generation Time: Feb 26, 2006 at 02:10 PM +-- Generation Time: Aug 09, 2006 at 09:29 PM -- Server version: 4.1.14 -- PHP Version: 5.0.5 -- @@ -16,7 +16,6 @@ -- Table structure for table `sx_accounts` -- -DROP TABLE IF EXISTS `sx_accounts`; CREATE TABLE `sx_accounts` ( `id` int(10) unsigned NOT NULL auto_increment, `username` varchar(30) NOT NULL default '', @@ -32,13 +31,18 @@ CREATE TABLE `sx_accounts` ( `imageformat` varchar(4) NOT NULL default '0', `minimap` tinyint(3) unsigned NOT NULL default '0', PRIMARY KEY (`id`) -) ; +) TYPE=MyISAM; + +-- +-- Dumping data for table `sx_accounts` +-- + +-- -------------------------------------------------------- -- -- Table structure for table `sx_babblebox` -- -DROP TABLE IF EXISTS `sx_babblebox`; CREATE TABLE `sx_babblebox` ( `id` int(11) unsigned NOT NULL auto_increment, `posttime` datetime NOT NULL default '0000-00-00 00:00:00', @@ -47,32 +51,38 @@ CREATE TABLE `sx_babblebox` ( `content` varchar(255) NOT NULL default '', `guild` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`id`) -) ; +) TYPE=MyISAM; + +-- +-- Dumping data for table `sx_babblebox` +-- + +-- -------------------------------------------------------- -- -- Table structure for table `sx_classes` -- -DROP TABLE IF EXISTS `sx_classes`; CREATE TABLE `sx_classes` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(50) NOT NULL default '', `expbonus` tinyint(3) unsigned NOT NULL default '0', `goldbonus` tinyint(3) unsigned NOT NULL default '0', `damageperstrength` float unsigned NOT NULL default '0', - `hpperdexterity` float unsigned NOT NULL default '0', + `defenseperdex` float NOT NULL default '0', + `hpperlife` float unsigned NOT NULL default '0', `mpperenergy` float unsigned NOT NULL default '0', `description` text NOT NULL, PRIMARY KEY (`id`) -) ; +) TYPE=MyISAM; -- -- Dumping data for table `sx_classes` -- -INSERT INTO `sx_classes` VALUES (1, 'Barbarian', 0, 0, 3, 2, 1, 'Barbarians specialize in physical damage. 3 damage pr str, 2 hp per dex, 1 mp per energy.'); -INSERT INTO `sx_classes` VALUES (2, 'Sorceress', 0, 0, 1, 2, 3, 'Sorceresses specialize in magical damage. 3 mp per energy, 2 hp per dex, 1 damage per str.'); -INSERT INTO `sx_classes` VALUES (3, 'Paladin', 0, 0, 2, 3, 1, 'Paladins specialize in staying alive. 3 hp per dex, 2 damage per str, 1 mp per energy.'); +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.'), +(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.'); -- -------------------------------------------------------- @@ -80,42 +90,39 @@ INSERT INTO `sx_classes` VALUES (3, 'Paladin', 0, 0, 2, 3, 1, 'Paladins speciali -- Table structure for table `sx_control` -- -DROP TABLE IF EXISTS `sx_control`; CREATE TABLE `sx_control` ( `id` tinyint(3) unsigned NOT NULL auto_increment, `gamename` varchar(50) NOT NULL default '', `gameopen` tinyint(3) unsigned NOT NULL default '0', `gamepath` varchar(200) NOT NULL default '', `gameurl` varchar(200) NOT NULL default '', - `forumtype` tinyint(3) unsigned NOT NULL default '0', `forumurl` varchar(200) NOT NULL default '', `avatarpath` varchar(200) NOT NULL default '', `avatarurl` varchar(200) NOT NULL default '', `avatarmaxsize` int(10) unsigned NOT NULL default '0', `showshout` tinyint(3) unsigned NOT NULL default '0', `showonline` tinyint(3) unsigned NOT NULL default '0', - `shownews` tinyint(3) unsigned NOT NULL default '0', - `showimages` tinyint(3) unsigned NOT NULL default '0', + `showitemimages` tinyint(3) unsigned NOT NULL default '0', + `showmonsterimages` 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', - `logerrors` tinyint(3) unsigned NOT NULL default '0', - `botcheck` tinyint(3) unsigned NOT NULL default '0', - `pvprefresh` int(10) NOT NULL default '0', - `pvptimeout` int(10) NOT NULL default '0', + `botcheck` int(10) unsigned NOT NULL default '0', + `pvprefresh` int(10) unsigned NOT NULL default '0', + `pvptimeout` int(10) unsigned NOT NULL default '0', `guildstartup` int(10) unsigned NOT NULL default '100000', `guildstartlvl` int(10) unsigned NOT NULL default '0', `guildjoinlvl` int(10) unsigned NOT NULL default '0', `guildupdate` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`id`) -) ; +) TYPE=MyISAM; -- -- Dumping data for table `sx_control` -- -INSERT INTO `sx_control` VALUES (1, 'Dragon Scourge', 1, 'd:\\server\\docroot\\scourge\\', 'http://localhost/scourge/', 1, 'http://se7enet.com/forums/ubbthreads.php', 'd:\\server\\docroot\\scourge\\images\\users\\', 'http://localhost/scourge/images/users/', 15000, 1, 1, 1, 1, 'jamin@se7enet.com', 0, 1, 1, 1, 255, 15, 120, 100000, 35, 10, 24); +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); -- -------------------------------------------------------- @@ -123,7 +130,6 @@ INSERT INTO `sx_control` VALUES (1, 'Dragon Scourge', 1, 'd:\\server\\docroot\\s -- Table structure for table `sx_difficulties` -- -DROP TABLE IF EXISTS `sx_difficulties`; CREATE TABLE `sx_difficulties` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(50) NOT NULL default '', @@ -132,15 +138,15 @@ CREATE TABLE `sx_difficulties` ( `multiplier` float NOT NULL default '0', `deathpenalty` tinyint(3) unsigned NOT NULL default '0', PRIMARY KEY (`id`) -) ; +) TYPE=MyISAM; -- -- Dumping data for table `sx_difficulties` -- -INSERT INTO `sx_difficulties` VALUES (1, 'Easy', 0, 0, 1, 0); -INSERT INTO `sx_difficulties` VALUES (2, 'Medium', 3, 3, 1.5, 3); -INSERT INTO `sx_difficulties` VALUES (3, 'Hard', 5, 5, 2, 7); +INSERT INTO `sx_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); -- -------------------------------------------------------- @@ -148,20 +154,25 @@ INSERT INTO `sx_difficulties` VALUES (3, 'Hard', 5, 5, 2, 7); -- Table structure for table `sx_guildapps` -- -DROP TABLE IF EXISTS `sx_guildapps`; CREATE TABLE `sx_guildapps` ( `id` int(10) unsigned NOT NULL auto_increment, `guild` int(10) unsigned NOT NULL default '0', `charid` int(10) unsigned NOT NULL default '0', `charname` varchar(30) NOT NULL default '', PRIMARY KEY (`id`) -) ; +) TYPE=MyISAM; + +-- +-- Dumping data for table `sx_guildapps` +-- + + +-- -------------------------------------------------------- -- -- Table structure for table `sx_guilds` -- -DROP TABLE IF EXISTS `sx_guilds`; CREATE TABLE `sx_guilds` ( `id` int(10) unsigned NOT NULL auto_increment, `lastupdate` bigint(20) unsigned NOT NULL default '0', @@ -184,7 +195,11 @@ CREATE TABLE `sx_guilds` ( `statement` text NOT NULL, `news` text NOT NULL, PRIMARY KEY (`id`) -) ; +) TYPE=MyISAM; + +-- +-- Dumping data for table `sx_guilds` +-- -- -------------------------------------------------------- @@ -192,7 +207,6 @@ CREATE TABLE `sx_guilds` ( -- Table structure for table `sx_itembase` -- -DROP TABLE IF EXISTS `sx_itembase`; CREATE TABLE `sx_itembase` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(50) NOT NULL default '', @@ -220,185 +234,185 @@ CREATE TABLE `sx_itembase` ( `mod6name` varchar(50) NOT NULL default '', `mod6attr` smallint(5) unsigned NOT NULL default '0', PRIMARY KEY (`id`) -) ; +) TYPE=MyISAM; -- -- Dumping data for table `sx_itembase` -- -INSERT INTO `sx_itembase` VALUES (1, 'Pointy Stick', 1, 0, 1, 10, 5, 1, 0, 0, 0, 'physattack', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (2, 'Big Stick', 1, 0, 1, 15, 8, 1, 0, 0, 0, 'physattack', 4, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (3, 'Dagger', 1, 0, 1, 20, 10, 1, 0, 0, 0, 'physattack', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (4, 'Hand Axe', 1, 0, 1, 30, 15, 1, 0, 0, 0, 'physattack', 7, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (5, 'Leg Bone', 1, 0, 1, 40, 20, 1, 0, 0, 0, 'physattack', 8, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (6, 'Dirk', 1, 0, 1, 60, 30, 3, 10, 0, 0, 'physattack', 10, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (7, 'Small Axe', 1, 0, 1, 80, 40, 3, 10, 0, 0, 'physattack', 11, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (8, 'Club', 1, 0, 1, 110, 55, 3, 15, 0, 0, 'physattack', 12, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (9, 'Kris', 1, 0, 1, 140, 70, 3, 15, 0, 0, 'physattack', 15, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (10, 'Light Axe', 1, 0, 1, 180, 90, 5, 20, 0, 0, 'physattack', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (11, 'Spiked Club', 1, 0, 1, 220, 110, 5, 20, 0, 0, 'physattack', 20, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (12, 'Cudgel', 1, 0, 1, 270, 135, 5, 25, 0, 0, 'physattack', 23, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (13, 'Stiletto', 1, 0, 1, 330, 165, 7, 25, 0, 0, 'physattack', 25, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (14, 'Pick Axe', 1, 0, 1, 400, 200, 9, 30, 0, 0, 'physattack', 30, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (15, 'Nailed Club', 1, 0, 1, 480, 240, 11, 30, 0, 0, 'physattack', 30, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (16, 'Cutlass', 1, 0, 1, 570, 285, 13, 35, 0, 0, 'physattack', 35, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (17, 'Bayonet', 1, 0, 1, 670, 335, 15, 35, 0, 0, 'physattack', 38, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (18, 'Tomahawk', 1, 0, 1, 800, 400, 17, 40, 0, 0, 'physattack', 40, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (19, 'Light Mace', 1, 0, 1, 950, 475, 19, 40, 0, 0, 'physattack', 43, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (20, 'Falchion', 1, 0, 1, 1200, 600, 21, 45, 0, 0, 'physattack', 45, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (21, 'Foil', 1, 0, 1, 1400, 700, 23, 50, 0, 0, 'physattack', 48, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (22, 'Short Sword', 1, 0, 1, 1600, 800, 25, 50, 0, 0, 'physattack', 50, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (23, 'Double Axe', 1, 0, 1, 1900, 950, 27, 60, 0, 0, 'physattack', 55, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (24, 'Mace', 1, 0, 1, 2300, 1150, 29, 60, 0, 0, 'physattack', 60, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (25, 'Scimitar', 1, 0, 1, 2800, 1400, 31, 70, 0, 0, 'physattack', 65, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (26, 'Bardiche', 1, 0, 1, 3400, 1700, 33, 70, 0, 0, 'physattack', 70, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (27, 'Knobbed Mace', 1, 0, 1, 4100, 2050, 35, 80, 0, 0, 'physattack', 75, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (28, 'Rapier', 1, 0, 1, 4900, 2450, 37, 90, 0, 0, 'physattack', 85, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (29, 'Morning Star', 1, 0, 1, 5800, 2900, 39, 100, 0, 0, 'physattack', 95, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (30, 'Battle Axe', 1, 0, 1, 6800, 3400, 41, 110, 0, 0, 'physattack', 105, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (31, 'Saber', 1, 0, 1, 7800, 3900, 43, 120, 0, 0, 'physattack', 115, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (32, 'Francisca', 1, 0, 1, 9000, 4500, 45, 130, 0, 0, 'physattack', 125, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (33, 'Flanged Mace', 1, 0, 1, 10000, 5000, 47, 140, 0, 0, 'physattack', 135, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (34, 'Broadsword', 1, 0, 1, 11000, 5500, 49, 150, 0, 0, 'physattack', 145, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (35, 'War Axe', 1, 0, 1, 12500, 6250, 51, 165, 0, 0, 'physattack', 155, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (36, 'Trench Mace', 1, 0, 1, 14000, 7000, 53, 180, 0, 0, 'physattack', 165, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (37, 'Long Sword', 1, 0, 1, 15500, 7750, 55, 195, 0, 0, 'physattack', 180, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (38, 'Broad Axe', 1, 0, 1, 17000, 8500, 57, 210, 0, 0, 'physattack', 195, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (39, 'Flail', 1, 0, 1, 18500, 9250, 59, 225, 0, 0, 'physattack', 210, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (40, 'Claymore', 1, 0, 1, 20000, 10000, 61, 240, 0, 0, 'physattack', 225, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (41, 'Poleaxe', 1, 0, 1, 21500, 10750, 63, 255, 0, 0, 'physattack', 240, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (42, 'War Hammer', 1, 0, 1, 23000, 11500, 65, 270, 0, 0, 'physattack', 255, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (43, 'Katana', 1, 0, 1, 24500, 12250, 67, 285, 0, 0, 'physattack', 270, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (44, 'Scythe', 1, 0, 1, 26000, 13000, 69, 300, 0, 0, 'physattack', 280, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (45, 'Zweihander', 1, 0, 1, 27500, 13750, 71, 315, 0, 0, 'physattack', 295, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (46, 'Halberd', 1, 0, 1, 29000, 14500, 73, 330, 0, 0, 'physattack', 310, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (47, 'Flamberge', 1, 0, 1, 30000, 15000, 75, 345, 0, 0, 'physattack', 330, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (48, 'Great Axe', 1, 0, 1, 32000, 16000, 77, 360, 0, 0, 'physattack', 345, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (49, 'Great Sword', 1, 0, 1, 34000, 17000, 79, 375, 0, 0, 'physattack', 360, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (50, 'Giant Axe', 1, 0, 1, 36000, 18000, 81, 390, 0, 0, 'physattack', 380, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (173, 'Xiran''s Bite', 1, 1, 0, 0, 0, 83, 150, 100, 50, 'physattack', 600, 'fireattack', 600, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (52, 'Skivvies', 2, 0, 1, 20, 10, 1, 0, 0, 0, 'physdefense', 2, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (53, 'Cloak', 2, 0, 1, 30, 15, 1, 0, 0, 0, 'physdefense', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (54, 'Cloth Armor', 2, 0, 1, 40, 20, 1, 0, 0, 0, 'physdefense', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (55, 'Quilted Coat', 2, 0, 1, 50, 25, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (56, 'Quilted Armor', 2, 0, 1, 70, 35, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (57, 'Leather Coat', 2, 0, 1, 90, 45, 3, 5, 6, 0, 'physdefense', 6, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (58, 'Leather Hauberk', 2, 0, 1, 110, 55, 3, 5, 6, 0, 'physdefense', 7, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (59, 'Leather Coat', 2, 0, 1, 150, 75, 3, 8, 10, 0, 'physdefense', 8, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (60, 'Hard Leather Armor', 2, 0, 1, 190, 95, 3, 8, 10, 0, 'physdefense', 9, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (61, 'Riveted Leather Armor', 2, 0, 1, 230, 115, 5, 10, 12, 0, 'physdefense', 11, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (62, 'Spiked Leather Armor', 2, 0, 1, 270, 135, 5, 10, 12, 0, 'physdefense', 12, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (63, 'Light Chain Mail', 2, 0, 1, 310, 155, 5, 13, 16, 0, 'physdefense', 14, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (64, 'Heavy Chain Mail', 2, 0, 1, 360, 180, 7, 13, 16, 0, 'physdefense', 15, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (65, 'Chain Mail Shirt', 2, 0, 1, 420, 210, 9, 15, 18, 0, 'physdefense', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (66, 'Chain Mail Hauberk', 2, 0, 1, 500, 250, 11, 15, 18, 0, 'physdefense', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (67, 'Full Chain Mail', 2, 0, 1, 580, 290, 13, 18, 22, 0, 'physdefense', 21, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (68, 'Light Plate Mail', 2, 0, 1, 680, 340, 15, 18, 22, 0, 'physdefense', 23, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (69, 'Heavy Plate Mail', 2, 0, 1, 800, 400, 17, 20, 24, 0, 'physdefense', 24, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (70, 'Plate Mail Shirt', 2, 0, 1, 950, 475, 19, 20, 24, 0, 'physdefense', 26, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (71, 'Plate Mail Hauberk', 2, 0, 1, 1200, 600, 21, 23, 28, 0, 'physdefense', 27, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (72, 'Full Plate Mail', 2, 0, 1, 1500, 750, 23, 25, 30, 0, 'physdefense', 29, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (73, 'Light Scale Mail', 2, 0, 1, 1800, 900, 25, 25, 30, 0, 'physdefense', 30, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (172, 'Crestfall''s Chain Mail', 2, 1, 0, 0, 0, 50, 75, 80, 0, 'physdefense', 100, 'magicdefense', 75, 'firedefense', 75, 'lightdefense', 75, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (171, 'Numoren''s Ring', 5, 1, 0, 0, 0, 0, 0, 0, 0, '', 0, 'magicattack', 25, 'fireattack', 25, 'lightattack', 25, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (170, 'Shirreh''s Sword', 1, 1, 0, 0, 0, 25, 0, 0, 0, 'physattack', 75, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (74, 'Heavy Scale Mail', 2, 0, 1, 2400, 1200, 27, 30, 36, 0, 'physdefense', 33, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (75, 'Scale Mail Shirt', 2, 0, 1, 2800, 1400, 29, 30, 36, 0, 'physdefense', 36, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (76, 'Scale Mail Hauberk', 2, 0, 1, 3500, 1750, 31, 35, 42, 0, 'physdefense', 39, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (77, 'Full Scale Mail', 2, 0, 1, 4800, 2400, 33, 35, 42, 0, 'physdefense', 42, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (78, 'Copper Breastplate', 2, 0, 1, 6000, 3000, 35, 40, 48, 0, 'physdefense', 45, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (79, 'Bronze Breastplate', 2, 0, 1, 7500, 3750, 37, 45, 54, 0, 'physdefense', 50, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (80, 'Iron Breastplate', 2, 0, 1, 9000, 4500, 39, 50, 60, 0, 'physdefense', 56, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (81, 'Steel Breastplate', 2, 0, 1, 10500, 5250, 41, 55, 66, 0, 'physdefense', 62, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (82, 'Titanium Breastplate', 2, 0, 1, 12000, 6000, 43, 60, 72, 0, 'physdefense', 68, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (83, 'Copper Field Plate', 2, 0, 1, 14000, 7000, 45, 65, 78, 0, 'physdefense', 74, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (84, 'Bronze Field Plate', 2, 0, 1, 16000, 8000, 47, 70, 84, 0, 'physdefense', 80, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (85, 'Iron Field Plate', 2, 0, 1, 18000, 9000, 49, 75, 90, 0, 'physdefense', 86, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (86, 'Steel Field Plate', 2, 0, 1, 20000, 10000, 51, 83, 100, 0, 'physdefense', 92, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (87, 'Titanium Field Plate', 2, 0, 1, 24000, 12000, 53, 90, 108, 0, 'physdefense', 98, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (88, 'Copper Articulated Plate', 2, 0, 1, 28000, 14000, 55, 98, 118, 0, 'physdefense', 106, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (89, 'Bronze Articulated Plate', 2, 0, 1, 32000, 16000, 57, 105, 126, 0, 'physdefense', 115, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (90, 'Iron Articulated Plate', 2, 0, 1, 36000, 18000, 59, 113, 136, 0, 'physdefense', 124, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (91, 'Steel Articulated Plate', 2, 0, 1, 40000, 20000, 61, 120, 144, 0, 'physdefense', 133, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (92, 'Titanium Articulated Plate', 2, 0, 1, 45000, 22500, 63, 128, 154, 0, 'physdefense', 142, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (93, 'Copper Battle Armor', 2, 0, 1, 50000, 25000, 65, 135, 162, 0, 'physdefense', 150, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (94, 'Bronze Battle Armor', 2, 0, 1, 55000, 27500, 67, 143, 172, 0, 'physdefense', 159, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (95, 'Iron Battle Armor', 2, 0, 1, 60000, 30000, 69, 150, 180, 0, 'physdefense', 165, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (96, 'Steel Battle Armor', 2, 0, 1, 65000, 32500, 71, 158, 190, 0, 'physdefense', 174, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (97, 'Titanium Battle Armor', 2, 0, 1, 70000, 35000, 73, 165, 198, 0, 'physdefense', 183, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (98, 'Copper Gothic Plate', 2, 0, 1, 75000, 37500, 75, 173, 208, 0, 'physdefense', 195, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (99, 'Bronze Gothic Plate', 2, 0, 1, 80000, 40000, 77, 180, 216, 0, 'physdefense', 203, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (100, 'Iron Gothic Plate', 2, 0, 1, 85000, 42500, 79, 188, 226, 0, 'physdefense', 212, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (101, 'Steel Gothic Plate', 2, 0, 1, 90000, 45000, 81, 195, 234, 0, 'physdefense', 224, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (102, 'Titanium Gothic Plate', 2, 0, 1, 95000, 47500, 83, 203, 244, 0, 'physdefense', 236, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (103, 'Leather Buckler', 4, 0, 1, 25, 13, 1, 0, 0, 0, 'physdefense', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (104, 'Wood Buckler', 4, 0, 1, 50, 25, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (105, 'Steel Buckler', 4, 0, 1, 75, 38, 1, 0, 0, 0, 'physdefense', 7, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (106, 'Titanium Buckler', 4, 0, 1, 100, 50, 1, 0, 0, 0, 'physdefense', 8, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (107, 'Leather Targe', 4, 0, 1, 150, 75, 3, 0, 5, 0, 'physdefense', 11, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (108, 'Wood Targe', 4, 0, 1, 200, 100, 3, 0, 10, 0, 'physdefense', 12, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (109, 'Steel Targe', 4, 0, 1, 300, 150, 5, 0, 15, 0, 'physdefense', 15, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (110, 'Titanium Targe', 4, 0, 1, 400, 200, 5, 0, 20, 0, 'physdefense', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (111, 'Small Aspis', 4, 0, 1, 600, 300, 8, 0, 25, 0, 'physdefense', 21, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (112, 'Large Aspis', 4, 0, 1, 800, 400, 11, 0, 35, 0, 'physdefense', 23, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (113, 'Full Aspis', 4, 0, 1, 1200, 600, 14, 0, 45, 0, 'physdefense', 26, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (114, 'Great Aspis', 4, 0, 1, 1500, 750, 17, 0, 55, 0, 'physdefense', 27, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (115, 'Small Kite Shield', 4, 0, 1, 2000, 1000, 20, 0, 65, 0, 'physdefense', 30, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (116, 'Large Kite Shield', 4, 0, 1, 2500, 1250, 23, 0, 80, 0, 'physdefense', 36, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (117, 'Full Kite Shield', 4, 0, 1, 3000, 1500, 26, 0, 95, 0, 'physdefense', 39, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (118, 'Great Kite Shield', 4, 0, 1, 4000, 2000, 29, 0, 110, 0, 'physdefense', 45, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (119, 'Small Heater Shield', 4, 0, 1, 5000, 2500, 31, 0, 130, 0, 'physdefense', 56, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (120, 'Large Heater Shield', 4, 0, 1, 6000, 3000, 34, 0, 150, 0, 'physdefense', 62, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (121, 'Full Heater Shield', 4, 0, 1, 8000, 4000, 37, 0, 170, 0, 'physdefense', 74, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (122, 'Great Heater Shield', 4, 0, 1, 10000, 5000, 40, 0, 190, 0, 'physdefense', 80, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (123, 'Small Scuta', 4, 0, 1, 12000, 6000, 43, 0, 210, 0, 'physdefense', 86, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (124, 'Large Scuta', 4, 0, 1, 15000, 7500, 46, 0, 230, 0, 'physdefense', 98, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (125, 'Full Scuta', 4, 0, 1, 18000, 9000, 49, 0, 250, 0, 'physdefense', 106, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (126, 'Great Scuta', 4, 0, 1, 22000, 11000, 51, 0, 270, 0, 'physdefense', 115, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (127, 'Small Pavise', 4, 0, 1, 26000, 13000, 54, 0, 300, 0, 'physdefense', 133, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (128, 'Large Pavise', 4, 0, 1, 30000, 15000, 57, 0, 320, 0, 'physdefense', 142, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (129, 'Full Pavise', 4, 0, 1, 35000, 17500, 60, 0, 340, 0, 'physdefense', 159, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (130, 'Great Pavise', 4, 0, 1, 40000, 20000, 65, 0, 360, 0, 'physdefense', 165, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (131, 'Small Heraldic Shield', 4, 0, 1, 45000, 22500, 70, 0, 380, 0, 'physdefense', 183, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (132, 'Large Heraldic Shield', 4, 0, 1, 50000, 25000, 75, 0, 400, 0, 'physdefense', 195, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (133, 'Full Heraldic Shield', 4, 0, 1, 55000, 27500, 80, 0, 420, 0, 'physdefense', 212, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (134, 'Great Heraldic Shield', 4, 0, 1, 60000, 30000, 85, 0, 440, 0, 'physdefense', 236, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (135, 'Leather Cap', 3, 0, 1, 20, 10, 1, 0, 0, 0, 'physdefense', 2, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (136, 'Copper Cap', 3, 0, 1, 40, 20, 1, 0, 0, 0, 'physdefense', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (137, 'Bronze Cap', 3, 0, 1, 60, 30, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (138, 'Steel Cap', 3, 0, 1, 80, 40, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (139, 'Titanium Cap', 3, 0, 1, 110, 55, 1, 0, 0, 0, 'physdefense', 7, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (140, 'Leather Skull Cap', 3, 0, 1, 140, 70, 3, 5, 6, 0, 'physdefense', 8, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (141, 'Copper Skull Cap', 3, 0, 1, 170, 85, 3, 5, 6, 0, 'physdefense', 9, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (142, 'Bronze Skull Cap', 3, 0, 1, 200, 100, 3, 8, 10, 0, 'physdefense', 11, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (143, 'Steel Skull Cap', 3, 0, 1, 240, 120, 5, 10, 12, 0, 'physdefense', 13, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (144, 'Titanium Skull Cap', 3, 0, 1, 280, 140, 5, 10, 12, 0, 'physdefense', 14, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (145, 'Copper Helm', 3, 0, 1, 330, 165, 5, 13, 16, 0, 'physdefense', 16, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (146, 'Bronze Helm', 3, 0, 1, 380, 190, 8, 13, 16, 0, 'physdefense', 16, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (147, 'Iron Helm', 3, 0, 1, 440, 220, 11, 15, 18, 0, 'physdefense', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (148, 'Steel Helm', 3, 0, 1, 500, 250, 14, 18, 22, 0, 'physdefense', 22, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (149, 'Titanium Helm', 3, 0, 1, 600, 300, 17, 18, 22, 0, 'physdefense', 23, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (150, 'Copper Corinthian Helmet', 3, 0, 1, 700, 350, 20, 20, 24, 0, 'physdefense', 27, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (151, 'Bronze Corinthian Helmet', 3, 0, 1, 850, 425, 23, 23, 28, 0, 'physdefense', 33, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (152, 'Iron Corinthian Helmet', 3, 0, 1, 1000, 500, 26, 25, 30, 0, 'physdefense', 37, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (153, 'Steel Corinthian Helmet', 3, 0, 1, 2000, 1000, 29, 25, 30, 0, 'physdefense', 44, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (154, 'Titanium Corinthian Helmet', 3, 0, 1, 3200, 1600, 31, 30, 36, 0, 'physdefense', 48, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (155, 'Copper Sallet', 3, 0, 1, 4400, 2200, 34, 30, 36, 0, 'physdefense', 51, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (156, 'Bronze Sallet', 3, 0, 1, 6000, 3000, 37, 35, 42, 0, 'physdefense', 58, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (157, 'Iron Sallet', 3, 0, 1, 7000, 3500, 40, 35, 42, 0, 'physdefense', 63, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (158, 'Steel Sallet', 3, 0, 1, 8000, 4000, 43, 40, 48, 0, 'physdefense', 68, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (159, 'Titanium Sallet', 3, 0, 1, 10000, 5000, 46, 45, 54, 0, 'physdefense', 79, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (160, 'Copper Bascinet', 3, 0, 1, 12000, 6000, 49, 50, 60, 0, 'physdefense', 84, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (161, 'Bronze Bascinet', 3, 0, 1, 15000, 7500, 51, 55, 66, 0, 'physdefense', 94, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (162, 'Iron Bascinet', 3, 0, 1, 18000, 9000, 54, 60, 72, 0, 'physdefense', 98, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (163, 'Steel Bascinet', 3, 0, 1, 22000, 11000, 57, 65, 78, 0, 'physdefense', 108, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (164, 'Titanium Bascinet', 3, 0, 1, 26000, 13000, 60, 70, 84, 0, 'physdefense', 115, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (165, 'Copper Horned Helm', 3, 0, 1, 30000, 15000, 65, 75, 90, 0, 'physdefense', 125, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (166, 'Bronze Horned Helm', 3, 0, 1, 35000, 17500, 70, 83, 100, 0, 'physdefense', 139, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (167, 'Iron Horned Helm', 3, 0, 1, 40000, 20000, 75, 90, 108, 0, 'physdefense', 145, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (168, 'Steel Horned Helm', 3, 0, 1, 45000, 22500, 80, 98, 118, 0, 'physdefense', 160, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (169, 'Titanium Horned Helm', 3, 0, 1, 50000, 25000, 85, 105, 126, 0, 'physdefense', 175, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -INSERT INTO `sx_itembase` VALUES (51, 'Giant Maul', 1, 0, 1, 38000, 19000, 83, 405, 0, 0, 'physattack', 400, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); +INSERT INTO `sx_itembase` (`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), +(2, 'Big Stick', 1, 0, 1, 15, 8, 1, 0, 0, 0, 'physattack', 4, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(3, 'Dagger', 1, 0, 1, 20, 10, 1, 0, 0, 0, 'physattack', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(4, 'Hand Axe', 1, 0, 1, 30, 15, 1, 0, 0, 0, 'physattack', 7, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(5, 'Leg Bone', 1, 0, 1, 40, 20, 1, 0, 0, 0, 'physattack', 8, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(6, 'Dirk', 1, 0, 1, 60, 30, 3, 10, 0, 0, 'physattack', 10, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(7, 'Small Axe', 1, 0, 1, 80, 40, 3, 10, 0, 0, 'physattack', 11, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(8, 'Club', 1, 0, 1, 110, 55, 3, 15, 0, 0, 'physattack', 12, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(9, 'Kris', 1, 0, 1, 140, 70, 3, 15, 0, 0, 'physattack', 15, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(10, 'Light Axe', 1, 0, 1, 180, 90, 5, 20, 0, 0, 'physattack', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(11, 'Spiked Club', 1, 0, 1, 220, 110, 5, 20, 0, 0, 'physattack', 20, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(12, 'Cudgel', 1, 0, 1, 270, 135, 5, 25, 0, 0, 'physattack', 23, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(13, 'Stiletto', 1, 0, 1, 330, 165, 7, 25, 0, 0, 'physattack', 25, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(14, 'Pick Axe', 1, 0, 1, 400, 200, 9, 30, 0, 0, 'physattack', 30, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(15, 'Nailed Club', 1, 0, 1, 480, 240, 11, 30, 0, 0, 'physattack', 30, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(16, 'Cutlass', 1, 0, 1, 570, 285, 13, 35, 0, 0, 'physattack', 35, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(17, 'Bayonet', 1, 0, 1, 670, 335, 15, 35, 0, 0, 'physattack', 38, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(18, 'Tomahawk', 1, 0, 1, 800, 400, 17, 40, 0, 0, 'physattack', 40, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(19, 'Light Mace', 1, 0, 1, 950, 475, 19, 40, 0, 0, 'physattack', 43, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(20, 'Falchion', 1, 0, 1, 1200, 600, 21, 45, 0, 0, 'physattack', 45, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(21, 'Foil', 1, 0, 1, 1400, 700, 23, 50, 0, 0, 'physattack', 48, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(22, 'Short Sword', 1, 0, 1, 1600, 800, 25, 50, 0, 0, 'physattack', 50, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(23, 'Double Axe', 1, 0, 1, 1900, 950, 27, 60, 0, 0, 'physattack', 55, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(24, 'Mace', 1, 0, 1, 2300, 1150, 29, 60, 0, 0, 'physattack', 60, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(25, 'Scimitar', 1, 0, 1, 2800, 1400, 31, 70, 0, 0, 'physattack', 65, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(26, 'Bardiche', 1, 0, 1, 3400, 1700, 33, 70, 0, 0, 'physattack', 70, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(27, 'Knobbed Mace', 1, 0, 1, 4100, 2050, 35, 80, 0, 0, 'physattack', 75, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(28, 'Rapier', 1, 0, 1, 4900, 2450, 37, 90, 0, 0, 'physattack', 85, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(29, 'Morning Star', 1, 0, 1, 5800, 2900, 39, 100, 0, 0, 'physattack', 95, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(30, 'Battle Axe', 1, 0, 1, 6800, 3400, 41, 110, 0, 0, 'physattack', 105, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(31, 'Saber', 1, 0, 1, 7800, 3900, 43, 120, 0, 0, 'physattack', 115, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(32, 'Francisca', 1, 0, 1, 9000, 4500, 45, 130, 0, 0, 'physattack', 125, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(33, 'Flanged Mace', 1, 0, 1, 10000, 5000, 47, 140, 0, 0, 'physattack', 135, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(34, 'Broadsword', 1, 0, 1, 11000, 5500, 49, 150, 0, 0, 'physattack', 145, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(35, 'War Axe', 1, 0, 1, 12500, 6250, 51, 165, 0, 0, 'physattack', 155, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(36, 'Trench Mace', 1, 0, 1, 14000, 7000, 53, 180, 0, 0, 'physattack', 165, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(37, 'Long Sword', 1, 0, 1, 15500, 7750, 55, 195, 0, 0, 'physattack', 180, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(38, 'Broad Axe', 1, 0, 1, 17000, 8500, 57, 210, 0, 0, 'physattack', 195, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(39, 'Flail', 1, 0, 1, 18500, 9250, 59, 225, 0, 0, 'physattack', 210, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(40, 'Claymore', 1, 0, 1, 20000, 10000, 61, 240, 0, 0, 'physattack', 225, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(41, 'Poleaxe', 1, 0, 1, 21500, 10750, 63, 255, 0, 0, 'physattack', 240, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(42, 'War Hammer', 1, 0, 1, 23000, 11500, 65, 270, 0, 0, 'physattack', 255, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(43, 'Katana', 1, 0, 1, 24500, 12250, 67, 285, 0, 0, 'physattack', 270, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(44, 'Scythe', 1, 0, 1, 26000, 13000, 69, 300, 0, 0, 'physattack', 280, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(45, 'Zweihander', 1, 0, 1, 27500, 13750, 71, 315, 0, 0, 'physattack', 295, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(46, 'Halberd', 1, 0, 1, 29000, 14500, 73, 330, 0, 0, 'physattack', 310, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(47, 'Flamberge', 1, 0, 1, 30000, 15000, 75, 345, 0, 0, 'physattack', 330, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(48, 'Great Axe', 1, 0, 1, 32000, 16000, 77, 360, 0, 0, 'physattack', 345, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(49, 'Great Sword', 1, 0, 1, 34000, 17000, 79, 375, 0, 0, 'physattack', 360, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(50, 'Giant Axe', 1, 0, 1, 36000, 18000, 81, 390, 0, 0, 'physattack', 380, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(173, 'Xiran''s Bite', 1, 1, 0, 0, 0, 83, 150, 100, 50, 'physattack', 600, 'fireattack', 600, '', 0, '', 0, '', 0, '', 0, '', 0), +(52, 'Skivvies', 2, 0, 1, 20, 10, 1, 0, 0, 0, 'physdefense', 2, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(53, 'Cloak', 2, 0, 1, 30, 15, 1, 0, 0, 0, 'physdefense', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(54, 'Cloth Armor', 2, 0, 1, 40, 20, 1, 0, 0, 0, 'physdefense', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(55, 'Quilted Coat', 2, 0, 1, 50, 25, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(56, 'Quilted Armor', 2, 0, 1, 70, 35, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(57, 'Leather Coat', 2, 0, 1, 90, 45, 3, 5, 6, 0, 'physdefense', 6, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(58, 'Leather Hauberk', 2, 0, 1, 110, 55, 3, 5, 6, 0, 'physdefense', 7, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(59, 'Leather Coat', 2, 0, 1, 150, 75, 3, 8, 10, 0, 'physdefense', 8, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(60, 'Hard Leather Armor', 2, 0, 1, 190, 95, 3, 8, 10, 0, 'physdefense', 9, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(61, 'Riveted Leather Armor', 2, 0, 1, 230, 115, 5, 10, 12, 0, 'physdefense', 11, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(62, 'Spiked Leather Armor', 2, 0, 1, 270, 135, 5, 10, 12, 0, 'physdefense', 12, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(63, 'Light Chain Mail', 2, 0, 1, 310, 155, 5, 13, 16, 0, 'physdefense', 14, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(64, 'Heavy Chain Mail', 2, 0, 1, 360, 180, 7, 13, 16, 0, 'physdefense', 15, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(65, 'Chain Mail Shirt', 2, 0, 1, 420, 210, 9, 15, 18, 0, 'physdefense', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(66, 'Chain Mail Hauberk', 2, 0, 1, 500, 250, 11, 15, 18, 0, 'physdefense', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(67, 'Full Chain Mail', 2, 0, 1, 580, 290, 13, 18, 22, 0, 'physdefense', 21, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(68, 'Light Plate Mail', 2, 0, 1, 680, 340, 15, 18, 22, 0, 'physdefense', 23, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(69, 'Heavy Plate Mail', 2, 0, 1, 800, 400, 17, 20, 24, 0, 'physdefense', 24, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(70, 'Plate Mail Shirt', 2, 0, 1, 950, 475, 19, 20, 24, 0, 'physdefense', 26, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(71, 'Plate Mail Hauberk', 2, 0, 1, 1200, 600, 21, 23, 28, 0, 'physdefense', 27, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(72, 'Full Plate Mail', 2, 0, 1, 1500, 750, 23, 25, 30, 0, 'physdefense', 29, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(73, 'Light Scale Mail', 2, 0, 1, 1800, 900, 25, 25, 30, 0, 'physdefense', 30, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(172, 'Crestfall''s Chain Mail', 2, 1, 0, 0, 0, 50, 75, 80, 0, 'physdefense', 100, 'magicdefense', 75, 'firedefense', 75, 'lightdefense', 75, '', 0, '', 0, '', 0), +(171, 'Numoren''s Ring', 5, 1, 0, 0, 0, 0, 0, 0, 0, '', 0, 'magicattack', 25, 'fireattack', 25, 'lightattack', 25, '', 0, '', 0, '', 0), +(170, 'Shirreh''s Sword', 1, 1, 0, 0, 0, 25, 0, 0, 0, 'physattack', 75, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(74, 'Heavy Scale Mail', 2, 0, 1, 2400, 1200, 27, 30, 36, 0, 'physdefense', 33, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(75, 'Scale Mail Shirt', 2, 0, 1, 2800, 1400, 29, 30, 36, 0, 'physdefense', 36, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(76, 'Scale Mail Hauberk', 2, 0, 1, 3500, 1750, 31, 35, 42, 0, 'physdefense', 39, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(77, 'Full Scale Mail', 2, 0, 1, 4800, 2400, 33, 35, 42, 0, 'physdefense', 42, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(78, 'Copper Breastplate', 2, 0, 1, 6000, 3000, 35, 40, 48, 0, 'physdefense', 45, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(79, 'Bronze Breastplate', 2, 0, 1, 7500, 3750, 37, 45, 54, 0, 'physdefense', 50, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(80, 'Iron Breastplate', 2, 0, 1, 9000, 4500, 39, 50, 60, 0, 'physdefense', 56, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(81, 'Steel Breastplate', 2, 0, 1, 10500, 5250, 41, 55, 66, 0, 'physdefense', 62, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(82, 'Titanium Breastplate', 2, 0, 1, 12000, 6000, 43, 60, 72, 0, 'physdefense', 68, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(83, 'Copper Field Plate', 2, 0, 1, 14000, 7000, 45, 65, 78, 0, 'physdefense', 74, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(84, 'Bronze Field Plate', 2, 0, 1, 16000, 8000, 47, 70, 84, 0, 'physdefense', 80, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(85, 'Iron Field Plate', 2, 0, 1, 18000, 9000, 49, 75, 90, 0, 'physdefense', 86, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(86, 'Steel Field Plate', 2, 0, 1, 20000, 10000, 51, 83, 100, 0, 'physdefense', 92, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(87, 'Titanium Field Plate', 2, 0, 1, 24000, 12000, 53, 90, 108, 0, 'physdefense', 98, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(88, 'Copper Articulated Plate', 2, 0, 1, 28000, 14000, 55, 98, 118, 0, 'physdefense', 106, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(89, 'Bronze Articulated Plate', 2, 0, 1, 32000, 16000, 57, 105, 126, 0, 'physdefense', 115, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(90, 'Iron Articulated Plate', 2, 0, 1, 36000, 18000, 59, 113, 136, 0, 'physdefense', 124, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(91, 'Steel Articulated Plate', 2, 0, 1, 40000, 20000, 61, 120, 144, 0, 'physdefense', 133, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(92, 'Titanium Articulated Plate', 2, 0, 1, 45000, 22500, 63, 128, 154, 0, 'physdefense', 142, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(93, 'Copper Battle Armor', 2, 0, 1, 50000, 25000, 65, 135, 162, 0, 'physdefense', 150, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(94, 'Bronze Battle Armor', 2, 0, 1, 55000, 27500, 67, 143, 172, 0, 'physdefense', 159, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(95, 'Iron Battle Armor', 2, 0, 1, 60000, 30000, 69, 150, 180, 0, 'physdefense', 165, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(96, 'Steel Battle Armor', 2, 0, 1, 65000, 32500, 71, 158, 190, 0, 'physdefense', 174, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(97, 'Titanium Battle Armor', 2, 0, 1, 70000, 35000, 73, 165, 198, 0, 'physdefense', 183, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(98, 'Copper Gothic Plate', 2, 0, 1, 75000, 37500, 75, 173, 208, 0, 'physdefense', 195, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(99, 'Bronze Gothic Plate', 2, 0, 1, 80000, 40000, 77, 180, 216, 0, 'physdefense', 203, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(100, 'Iron Gothic Plate', 2, 0, 1, 85000, 42500, 79, 188, 226, 0, 'physdefense', 212, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(101, 'Steel Gothic Plate', 2, 0, 1, 90000, 45000, 81, 195, 234, 0, 'physdefense', 224, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(102, 'Titanium Gothic Plate', 2, 0, 1, 95000, 47500, 83, 203, 244, 0, 'physdefense', 236, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(103, 'Leather Buckler', 4, 0, 1, 25, 13, 1, 0, 0, 0, 'physdefense', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(104, 'Wood Buckler', 4, 0, 1, 50, 25, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(105, 'Steel Buckler', 4, 0, 1, 75, 38, 1, 0, 0, 0, 'physdefense', 7, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(106, 'Titanium Buckler', 4, 0, 1, 100, 50, 1, 0, 0, 0, 'physdefense', 8, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(107, 'Leather Targe', 4, 0, 1, 150, 75, 3, 0, 5, 0, 'physdefense', 11, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(108, 'Wood Targe', 4, 0, 1, 200, 100, 3, 0, 10, 0, 'physdefense', 12, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(109, 'Steel Targe', 4, 0, 1, 300, 150, 5, 0, 15, 0, 'physdefense', 15, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(110, 'Titanium Targe', 4, 0, 1, 400, 200, 5, 0, 20, 0, 'physdefense', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(111, 'Small Aspis', 4, 0, 1, 600, 300, 8, 0, 25, 0, 'physdefense', 21, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(112, 'Large Aspis', 4, 0, 1, 800, 400, 11, 0, 35, 0, 'physdefense', 23, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(113, 'Full Aspis', 4, 0, 1, 1200, 600, 14, 0, 45, 0, 'physdefense', 26, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(114, 'Great Aspis', 4, 0, 1, 1500, 750, 17, 0, 55, 0, 'physdefense', 27, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(115, 'Small Kite Shield', 4, 0, 1, 2000, 1000, 20, 0, 65, 0, 'physdefense', 30, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(116, 'Large Kite Shield', 4, 0, 1, 2500, 1250, 23, 0, 80, 0, 'physdefense', 36, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(117, 'Full Kite Shield', 4, 0, 1, 3000, 1500, 26, 0, 95, 0, 'physdefense', 39, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(118, 'Great Kite Shield', 4, 0, 1, 4000, 2000, 29, 0, 110, 0, 'physdefense', 45, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(119, 'Small Heater Shield', 4, 0, 1, 5000, 2500, 31, 0, 130, 0, 'physdefense', 56, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(120, 'Large Heater Shield', 4, 0, 1, 6000, 3000, 34, 0, 150, 0, 'physdefense', 62, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(121, 'Full Heater Shield', 4, 0, 1, 8000, 4000, 37, 0, 170, 0, 'physdefense', 74, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(122, 'Great Heater Shield', 4, 0, 1, 10000, 5000, 40, 0, 190, 0, 'physdefense', 80, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(123, 'Small Scuta', 4, 0, 1, 12000, 6000, 43, 0, 210, 0, 'physdefense', 86, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(124, 'Large Scuta', 4, 0, 1, 15000, 7500, 46, 0, 230, 0, 'physdefense', 98, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(125, 'Full Scuta', 4, 0, 1, 18000, 9000, 49, 0, 250, 0, 'physdefense', 106, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(126, 'Great Scuta', 4, 0, 1, 22000, 11000, 51, 0, 270, 0, 'physdefense', 115, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(127, 'Small Pavise', 4, 0, 1, 26000, 13000, 54, 0, 300, 0, 'physdefense', 133, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(128, 'Large Pavise', 4, 0, 1, 30000, 15000, 57, 0, 320, 0, 'physdefense', 142, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(129, 'Full Pavise', 4, 0, 1, 35000, 17500, 60, 0, 340, 0, 'physdefense', 159, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(130, 'Great Pavise', 4, 0, 1, 40000, 20000, 65, 0, 360, 0, 'physdefense', 165, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(131, 'Small Heraldic Shield', 4, 0, 1, 45000, 22500, 70, 0, 380, 0, 'physdefense', 183, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(132, 'Large Heraldic Shield', 4, 0, 1, 50000, 25000, 75, 0, 400, 0, 'physdefense', 195, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(133, 'Full Heraldic Shield', 4, 0, 1, 55000, 27500, 80, 0, 420, 0, 'physdefense', 212, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(134, 'Great Heraldic Shield', 4, 0, 1, 60000, 30000, 85, 0, 440, 0, 'physdefense', 236, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(135, 'Leather Cap', 3, 0, 1, 20, 10, 1, 0, 0, 0, 'physdefense', 2, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(136, 'Copper Cap', 3, 0, 1, 40, 20, 1, 0, 0, 0, 'physdefense', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(137, 'Bronze Cap', 3, 0, 1, 60, 30, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(138, 'Steel Cap', 3, 0, 1, 80, 40, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(139, 'Titanium Cap', 3, 0, 1, 110, 55, 1, 0, 0, 0, 'physdefense', 7, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(140, 'Leather Skull Cap', 3, 0, 1, 140, 70, 3, 5, 6, 0, 'physdefense', 8, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(141, 'Copper Skull Cap', 3, 0, 1, 170, 85, 3, 5, 6, 0, 'physdefense', 9, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(142, 'Bronze Skull Cap', 3, 0, 1, 200, 100, 3, 8, 10, 0, 'physdefense', 11, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(143, 'Steel Skull Cap', 3, 0, 1, 240, 120, 5, 10, 12, 0, 'physdefense', 13, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(144, 'Titanium Skull Cap', 3, 0, 1, 280, 140, 5, 10, 12, 0, 'physdefense', 14, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(145, 'Copper Helm', 3, 0, 1, 330, 165, 5, 13, 16, 0, 'physdefense', 16, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(146, 'Bronze Helm', 3, 0, 1, 380, 190, 8, 13, 16, 0, 'physdefense', 16, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(147, 'Iron Helm', 3, 0, 1, 440, 220, 11, 15, 18, 0, 'physdefense', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(148, 'Steel Helm', 3, 0, 1, 500, 250, 14, 18, 22, 0, 'physdefense', 22, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(149, 'Titanium Helm', 3, 0, 1, 600, 300, 17, 18, 22, 0, 'physdefense', 23, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(150, 'Copper Corinthian Helmet', 3, 0, 1, 700, 350, 20, 20, 24, 0, 'physdefense', 27, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(151, 'Bronze Corinthian Helmet', 3, 0, 1, 850, 425, 23, 23, 28, 0, 'physdefense', 33, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(152, 'Iron Corinthian Helmet', 3, 0, 1, 1000, 500, 26, 25, 30, 0, 'physdefense', 37, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(153, 'Steel Corinthian Helmet', 3, 0, 1, 2000, 1000, 29, 25, 30, 0, 'physdefense', 44, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(154, 'Titanium Corinthian Helmet', 3, 0, 1, 3200, 1600, 31, 30, 36, 0, 'physdefense', 48, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(155, 'Copper Sallet', 3, 0, 1, 4400, 2200, 34, 30, 36, 0, 'physdefense', 51, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(156, 'Bronze Sallet', 3, 0, 1, 6000, 3000, 37, 35, 42, 0, 'physdefense', 58, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(157, 'Iron Sallet', 3, 0, 1, 7000, 3500, 40, 35, 42, 0, 'physdefense', 63, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(158, 'Steel Sallet', 3, 0, 1, 8000, 4000, 43, 40, 48, 0, 'physdefense', 68, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(159, 'Titanium Sallet', 3, 0, 1, 10000, 5000, 46, 45, 54, 0, 'physdefense', 79, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(160, 'Copper Bascinet', 3, 0, 1, 12000, 6000, 49, 50, 60, 0, 'physdefense', 84, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(161, 'Bronze Bascinet', 3, 0, 1, 15000, 7500, 51, 55, 66, 0, 'physdefense', 94, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(162, 'Iron Bascinet', 3, 0, 1, 18000, 9000, 54, 60, 72, 0, 'physdefense', 98, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(163, 'Steel Bascinet', 3, 0, 1, 22000, 11000, 57, 65, 78, 0, 'physdefense', 108, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(164, 'Titanium Bascinet', 3, 0, 1, 26000, 13000, 60, 70, 84, 0, 'physdefense', 115, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(165, 'Copper Horned Helm', 3, 0, 1, 30000, 15000, 65, 75, 90, 0, 'physdefense', 125, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(166, 'Bronze Horned Helm', 3, 0, 1, 35000, 17500, 70, 83, 100, 0, 'physdefense', 139, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(167, 'Iron Horned Helm', 3, 0, 1, 40000, 20000, 75, 90, 108, 0, 'physdefense', 145, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(168, 'Steel Horned Helm', 3, 0, 1, 45000, 22500, 80, 98, 118, 0, 'physdefense', 160, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(169, 'Titanium Horned Helm', 3, 0, 1, 50000, 25000, 85, 105, 126, 0, 'physdefense', 175, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0), +(51, 'Giant Maul', 1, 0, 1, 38000, 19000, 83, 405, 0, 0, 'physattack', 400, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0); -- -------------------------------------------------------- @@ -406,39 +420,38 @@ INSERT INTO `sx_itembase` VALUES (51, 'Giant Maul', 1, 0, 1, 38000, 19000, 83, 4 -- Table structure for table `sx_itemmodnames` -- -DROP TABLE IF EXISTS `sx_itemmodnames`; CREATE TABLE `sx_itemmodnames` ( `id` int(10) unsigned NOT NULL auto_increment, `fieldname` varchar(50) NOT NULL default '', `prettyname` varchar(50) NOT NULL default '', `percent` tinyint(3) unsigned NOT NULL default '0', PRIMARY KEY (`id`) -) ; +) TYPE=MyISAM; -- -- Dumping data for table `sx_itemmodnames` -- -INSERT INTO `sx_itemmodnames` VALUES (1, 'expbonus', 'Experience Bonus', 1); -INSERT INTO `sx_itemmodnames` VALUES (2, 'goldbonus', 'Gold Bonus', 1); -INSERT INTO `sx_itemmodnames` VALUES (3, 'maxhp', 'Max HP', 0); -INSERT INTO `sx_itemmodnames` VALUES (4, 'maxmp', 'Max MP', 0); -INSERT INTO `sx_itemmodnames` VALUES (5, 'maxtp', 'Max TP', 0); -INSERT INTO `sx_itemmodnames` VALUES (6, 'strength', 'Strength', 0); -INSERT INTO `sx_itemmodnames` VALUES (7, 'dexterity', 'Dexterity', 0); -INSERT INTO `sx_itemmodnames` VALUES (8, 'energy', 'Energy', 0); -INSERT INTO `sx_itemmodnames` VALUES (9, 'physattack', 'Physical Attack', 0); -INSERT INTO `sx_itemmodnames` VALUES (10, 'physdefense', 'Physical Defense', 0); -INSERT INTO `sx_itemmodnames` VALUES (11, 'magicattack', 'Magic Attack', 0); -INSERT INTO `sx_itemmodnames` VALUES (12, 'magicdefense', 'Magid Defense', 0); -INSERT INTO `sx_itemmodnames` VALUES (13, 'fireattack', 'Fire Attack', 0); -INSERT INTO `sx_itemmodnames` VALUES (14, 'firedefense', 'Fire Defense', 0); -INSERT INTO `sx_itemmodnames` VALUES (15, 'lightattack', 'Lightning Attack', 0); -INSERT INTO `sx_itemmodnames` VALUES (16, 'lightdefense', 'Lightning Defense', 0); -INSERT INTO `sx_itemmodnames` VALUES (17, 'hpleech', 'HP Leech', 1); -INSERT INTO `sx_itemmodnames` VALUES (18, 'mpleech', 'MP Leech', 1); -INSERT INTO `sx_itemmodnames` VALUES (19, 'hpgain', 'HP Per Kill', 0); -INSERT INTO `sx_itemmodnames` VALUES (20, 'mpgain', 'MP Per Kill', 0); +INSERT INTO `sx_itemmodnames` (`id`, `fieldname`, `prettyname`, `percent`) VALUES (1, 'expbonus', 'Experience Bonus', 1), +(2, 'goldbonus', 'Gold Bonus', 1), +(3, 'maxhp', 'Max HP', 0), +(4, 'maxmp', 'Max MP', 0), +(5, 'maxtp', 'Max TP', 0), +(6, 'strength', 'Strength', 0), +(7, 'dexterity', 'Dexterity', 0), +(8, 'energy', 'Energy', 0), +(9, 'physattack', 'Physical Attack', 0), +(10, 'physdefense', 'Physical Defense', 0), +(11, 'magicattack', 'Magic Attack', 0), +(12, 'magicdefense', 'Magid Defense', 0), +(13, 'fireattack', 'Fire Attack', 0), +(14, 'firedefense', 'Fire Defense', 0), +(15, 'lightattack', 'Lightning Attack', 0), +(16, 'lightdefense', 'Lightning Defense', 0), +(17, 'hpleech', 'HP Leech', 1), +(18, 'mpleech', 'MP Leech', 1), +(19, 'hpgain', 'HP Per Kill', 0), +(20, 'mpgain', 'MP Per Kill', 0); -- -------------------------------------------------------- @@ -446,7 +459,6 @@ INSERT INTO `sx_itemmodnames` VALUES (20, 'mpgain', 'MP Per Kill', 0); -- Table structure for table `sx_itemprefixes` -- -DROP TABLE IF EXISTS `sx_itemprefixes`; CREATE TABLE `sx_itemprefixes` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(50) NOT NULL default '', @@ -462,14 +474,14 @@ CREATE TABLE `sx_itemprefixes` ( `basename` varchar(50) NOT NULL default '', `baseattr` smallint(5) unsigned NOT NULL default '0', PRIMARY KEY (`id`) -) ; +) TYPE=MyISAM; -- -- Dumping data for table `sx_itemprefixes` -- -INSERT INTO `sx_itemprefixes` VALUES (1, 'Sharp', 1, 0, 0, 5, 3, 1, 0, 0, 0, 'physattack', 2); -INSERT INTO `sx_itemprefixes` VALUES (2, 'Magic', 1, 0, 0, 8, 4, 1, 0, 0, 0, 'magicattack', 5); +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), +(2, 'Magic', 1, 0, 0, 8, 4, 1, 0, 0, 0, 'magicattack', 5); -- -------------------------------------------------------- @@ -477,7 +489,6 @@ INSERT INTO `sx_itemprefixes` VALUES (2, 'Magic', 1, 0, 0, 8, 4, 1, 0, 0, 0, 'ma -- Table structure for table `sx_itemsuffixes` -- -DROP TABLE IF EXISTS `sx_itemsuffixes`; CREATE TABLE `sx_itemsuffixes` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(50) NOT NULL default '', @@ -493,14 +504,14 @@ CREATE TABLE `sx_itemsuffixes` ( `basename` varchar(50) NOT NULL default '', `baseattr` smallint(5) unsigned NOT NULL default '0', PRIMARY KEY (`id`) -) ; +) TYPE=MyISAM; -- -- Dumping data for table `sx_itemsuffixes` -- -INSERT INTO `sx_itemsuffixes` VALUES (1, 'of the Vampire', 1, 0, 0, 5, 3, 1, 0, 0, 0, 'hpleech', 5); -INSERT INTO `sx_itemsuffixes` VALUES (2, 'of the Bear', 1, 0, 0, 5, 3, 1, 0, 0, 0, 'strength', 5); +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), +(2, 'of the Bear', 1, 0, 0, 5, 3, 1, 0, 0, 0, 'strength', 5); -- -------------------------------------------------------- @@ -508,7 +519,6 @@ INSERT INTO `sx_itemsuffixes` VALUES (2, 'of the Bear', 1, 0, 0, 5, 3, 1, 0, 0, -- Table structure for table `sx_messages` -- -DROP TABLE IF EXISTS `sx_messages`; CREATE TABLE `sx_messages` ( `id` int(10) unsigned NOT NULL auto_increment, `postdate` datetime NOT NULL default '0000-00-00 00:00:00', @@ -521,20 +531,18 @@ CREATE TABLE `sx_messages` ( `message` text NOT NULL, `gold` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`id`) -) ; +) TYPE=MyISAM; -- -- Dumping data for table `sx_messages` -- - -- -------------------------------------------------------- -- -- Table structure for table `sx_monsters` -- -DROP TABLE IF EXISTS `sx_monsters`; CREATE TABLE `sx_monsters` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(30) NOT NULL default '', @@ -559,220 +567,220 @@ 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; -- -- Dumping data for table `sx_monsters` -- -INSERT INTO `sx_monsters` 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 `sx_monsters` VALUES (2, 'Shade', 1, 1, 4, 2, 3, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (3, 'Slime', 1, 2, 4, 2, 3, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (4, 'Small Drake', 1, 2, 4, 3, 4, 5, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (5, 'Skeleton', 1, 3, 5, 3, 5, 6, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (6, 'Haunt', 1, 3, 6, 4, 6, 6, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (7, 'Big Slime', 1, 4, 7, 5, 7, 7, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (8, 'Drake', 1, 4, 8, 5, 8, 8, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (9, 'Ghost', 1, 5, 9, 6, 9, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (10, 'Bee', 1, 5, 10, 4, 9, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (11, 'Scorpion', 1, 6, 8, 6, 10, 11, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (12, 'Dawk', 1, 6, 14, 8, 11, 11, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (13, 'Nymph', 1, 7, 15, 6, 12, 12, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (14, 'Ember', 1, 7, 12, 7, 12, 14, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (15, 'Daydream', 1, 8, 12, 8, 13, 14, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (16, 'Wasp', 1, 8, 15, 10, 14, 14, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (17, 'Shadow', 1, 9, 15, 8, 16, 16, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (18, 'Harpy', 1, 9, 15, 12, 17, 17, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (19, 'Air Elemental', 1, 10, 17, 11, 19, 18, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (20, 'Rogue', 1, 10, 22, 14, 21, 20, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (21, 'Lynx', 1, 11, 19, 14, 23, 24, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (22, 'Trickster', 1, 11, 25, 17, 25, 26, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (23, 'Goblin', 1, 12, 27, 17, 25, 27, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (24, 'Charmer', 1, 12, 27, 14, 27, 29, 18, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (25, 'Raven', 1, 13, 30, 12, 29, 29, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (26, 'Bobcat', 1, 13, 26, 21, 31, 29, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (27, 'Lycan', 1, 14, 37, 15, 34, 36, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (28, 'Fiend', 1, 14, 42, 26, 37, 40, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (29, 'Liche', 1, 15, 44, 23, 40, 42, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (30, 'Dawkin', 1, 15, 35, 21, 42, 40, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (31, 'Anarchist', 1, 16, 38, 25, 45, 49, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (32, 'Hellcat', 1, 16, 47, 30, 48, 49, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (33, 'Fallen Cherub', 1, 17, 56, 29, 51, 55, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (34, 'Grey Wolf', 1, 17, 63, 36, 54, 52, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (35, 'Black Bear', 1, 18, 48, 29, 56, 55, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (36, 'Knight', 1, 18, 55, 33, 59, 64, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (37, 'Giant', 1, 19, 58, 38, 62, 66, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (38, 'Young Wyrm', 1, 19, 73, 44, 65, 60, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (39, 'Lesser Devil', 1, 20, 82, 44, 68, 69, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (40, 'Lesser Demon', 1, 20, 73, 36, 70, 70, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (42, 'Silver Slime', 2, 1, 83, 44, 73, 72, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (43, 'Apparition', 2, 1, 68, 34, 76, 81, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (44, 'Phantasm', 2, 2, 66, 47, 79, 76, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (45, 'Poltergeist', 2, 2, 96, 33, 82, 83, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (46, 'Wraith', 2, 3, 73, 38, 84, 79, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (47, 'Big Drake', 2, 3, 89, 59, 87, 84, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (48, 'Illusion', 2, 4, 104, 37, 90, 86, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (49, 'Dawkare', 2, 4, 110, 50, 93, 86, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (50, 'Illusionist', 2, 5, 93, 50, 96, 87, 40, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (51, 'Skeleton Soldier', 2, 5, 104, 48, 98, 95, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (52, 'Devil', 2, 6, 121, 57, 102, 112, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (53, 'Demon', 2, 6, 95, 48, 105, 113, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (54, 'Brown Bear', 2, 7, 103, 76, 109, 100, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (55, 'Black Wolf', 2, 7, 123, 45, 112, 104, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (56, 'Water Elemental', 2, 8, 122, 82, 116, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (57, 'Harridan', 2, 8, 96, 71, 119, 109, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (58, 'Sylph', 2, 9, 115, 69, 123, 111, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (59, 'Orc', 2, 9, 135, 82, 126, 123, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (60, 'Dawkra', 2, 10, 108, 65, 130, 121, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (61, 'Shaman', 2, 10, 122, 80, 133, 136, 98, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (62, 'Cinder', 2, 11, 159, 62, 137, 124, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (63, 'Yellowjacket', 2, 11, 115, 96, 140, 138, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (64, 'Rogue Scorpion', 2, 12, 123, 58, 144, 139, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (65, 'Magidrake', 2, 12, 156, 68, 147, 140, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (66, 'Dream', 2, 13, 170, 84, 151, 165, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (67, 'Ocelot', 2, 13, 162, 90, 154, 168, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (68, 'Shadow Raven', 2, 14, 189, 81, 158, 152, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (69, 'Knave', 2, 14, 181, 91, 161, 168, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (70, 'Lycanthor', 2, 15, 157, 109, 165, 162, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (71, 'Mirage', 2, 15, 138, 105, 168, 155, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (72, 'Magician', 2, 16, 164, 105, 172, 166, 70, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (73, 'Mace Knight', 2, 16, 156, 86, 175, 175, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (74, 'Lesser Wyvern', 2, 17, 171, 90, 179, 167, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (75, 'Serafiend', 2, 17, 195, 128, 182, 166, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (76, 'Zhora''s Follower', 2, 18, 155, 125, 186, 201, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (77, 'Zhora''s Cantor', 2, 18, 214, 103, 189, 188, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (78, 'Liche Captain', 2, 19, 180, 101, 193, 203, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (79, 'Leviathan', 2, 19, 214, 108, 196, 195, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (80, 'Renegade', 2, 20, 164, 138, 200, 210, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (81, 'Dark Slime', 3, 1, 189, 98, 203, 203, 143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (82, 'Phantom', 3, 1, 230, 131, 207, 205, 152, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (83, 'Spirit', 3, 2, 168, 147, 210, 198, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (84, 'Specter', 3, 2, 254, 93, 215, 213, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (85, 'Winged Drake', 3, 3, 231, 117, 220, 207, 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (86, 'Shimmer', 3, 3, 261, 120, 225, 219, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (87, 'Dawkor', 3, 4, 217, 113, 230, 210, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (88, 'Enchanter', 3, 4, 264, 132, 235, 254, 130, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (89, 'Mounted Skeleton', 3, 5, 257, 137, 240, 262, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (90, 'Greater Devil', 3, 5, 245, 125, 245, 221, 153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (91, 'Greater Demon', 3, 6, 228, 133, 250, 250, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (92, 'Polar Bear', 3, 6, 299, 161, 255, 240, 171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (93, 'Red Wolf', 3, 7, 218, 140, 259, 259, 171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (94, 'Earth Elemental', 3, 7, 228, 151, 264, 288, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (95, 'Ogress', 3, 8, 299, 111, 269, 283, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (96, 'Nisse', 3, 8, 283, 154, 274, 247, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (97, 'Troll', 3, 9, 285, 154, 279, 254, 204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (98, 'Wizard', 3, 9, 341, 145, 284, 287, 158, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (99, 'Fire', 3, 10, 249, 162, 289, 284, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (100, 'Hornet', 3, 10, 339, 150, 294, 265, 165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (101, 'Red Scorpion', 3, 11, 311, 198, 299, 273, 148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (102, 'Hallucination', 3, 11, 320, 152, 304, 332, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (103, 'Leopard', 3, 12, 302, 136, 308, 315, 221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (104, 'Frost Raven', 3, 12, 357, 132, 313, 282, 226, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (105, 'Scoundrel', 3, 13, 315, 153, 318, 299, 132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (106, 'Fallen Muse', 3, 13, 343, 130, 323, 353, 177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (107, 'Snow Leopard', 3, 14, 394, 145, 328, 322, 136, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (108, 'Lycanthra', 3, 14, 277, 187, 333, 314, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (109, 'Axe Knight', 3, 15, 376, 224, 338, 352, 141, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (110, 'Cheetah', 3, 15, 381, 151, 343, 326, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (111, 'Wyvern', 3, 16, 369, 209, 348, 328, 233, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (112, 'Cherufiend', 3, 16, 304, 177, 353, 343, 217, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (113, 'Zhora''s Advocate', 3, 17, 290, 225, 357, 343, 151, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (114, 'Zhora''s Elder', 3, 17, 301, 160, 362, 348, 195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (115, 'Liche Prince', 3, 18, 426, 206, 367, 342, 233, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (116, 'Behemoth', 3, 18, 421, 190, 372, 361, 235, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (117, 'Insurgent', 3, 19, 336, 264, 377, 393, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (118, 'Greater Wyvern', 3, 20, 444, 161, 382, 409, 324, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (119, 'Devil Lord', 4, 1, 351, 218, 389, 393, 252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (120, 'Demon Lord', 4, 1, 476, 175, 396, 361, 206, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (121, 'Grizzly Bear', 4, 2, 347, 162, 403, 363, 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (122, 'Arctic Wolf', 4, 2, 468, 177, 410, 427, 261, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (123, 'Fire Elemental', 4, 3, 334, 180, 417, 422, 233, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (124, 'Gorgon', 4, 3, 344, 225, 424, 441, 270, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (125, 'Enchantress', 4, 4, 466, 173, 431, 427, 265, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (126, 'Ogre', 4, 4, 526, 276, 438, 456, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (127, 'Sorcerer', 4, 5, 517, 303, 445, 450, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (128, 'Blaze', 4, 5, 394, 195, 452, 457, 270, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (129, 'Demon Hornet', 4, 6, 469, 212, 459, 432, 337, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (130, 'Silver Scorpion', 4, 6, 560, 275, 466, 499, 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (131, 'Torment', 4, 7, 488, 261, 473, 521, 402, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (132, 'Fire Raven', 4, 7, 533, 303, 480, 432, 242, 0, 0, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (133, 'Hellion', 4, 8, 400, 341, 487, 517, 321, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (134, 'Fallen Angel', 4, 8, 470, 223, 494, 524, 325, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (135, 'Werewolf', 4, 9, 476, 281, 501, 517, 342, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (136, 'Armored Knight', 4, 9, 514, 336, 508, 473, 308, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (137, 'Archfiend', 4, 10, 443, 351, 515, 541, 390, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (138, 'Zhora''s Fanatic', 4, 10, 569, 256, 522, 502, 312, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (139, 'Zhora''s Priest', 4, 11, 529, 212, 529, 540, 351, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (140, 'Liche King', 4, 11, 617, 231, 536, 579, 261, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (141, 'Colossus', 4, 12, 576, 315, 543, 505, 218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (142, 'Nihilist', 4, 12, 440, 297, 550, 594, 327, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (143, 'Armored Skeleton', 4, 13, 574, 385, 557, 563, 254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (144, 'Puma', 4, 13, 525, 339, 564, 559, 403, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (145, 'Devil King', 4, 14, 532, 309, 571, 526, 369, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (146, 'Demon King', 4, 14, 544, 284, 578, 619, 353, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (147, 'Kodiak Bear', 4, 15, 474, 369, 585, 574, 328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (148, 'Haunted Wolf', 4, 15, 687, 338, 592, 652, 268, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (149, 'Light Elemental', 4, 16, 647, 264, 599, 582, 414, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (150, 'Medusa', 4, 16, 649, 243, 606, 619, 477, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (151, 'Siren', 4, 17, 528, 270, 613, 675, 507, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (152, 'Uruk', 4, 17, 540, 385, 620, 577, 456, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (153, 'Warlock', 4, 18, 653, 421, 627, 615, 382, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (154, 'Jaguar', 4, 18, 666, 317, 634, 603, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (155, 'Necromancer', 4, 19, 584, 295, 641, 622, 461, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (156, 'Demagogue', 4, 19, 733, 376, 648, 713, 414, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (157, 'Titan', 4, 20, 636, 446, 655, 590, 384, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (158, 'Lion', 4, 20, 643, 358, 662, 662, 391, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (159, 'Pyre', 5, 1, 780, 296, 672, 686, 309, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (160, 'Figment', 5, 1, 820, 315, 683, 663, 478, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (161, 'Demon Scorpion', 5, 1, 791, 402, 693, 666, 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (162, 'Nightmare', 5, 2, 789, 437, 704, 761, 381, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (163, 'Silver Raven', 5, 2, 793, 472, 714, 650, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (164, 'Bandit', 5, 2, 638, 435, 725, 740, 541, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (165, 'Fallen Archangel', 5, 3, 633, 500, 735, 765, 375, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (166, 'Tiger', 5, 3, 746, 493, 746, 709, 369, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (167, 'Fallen Seraph', 5, 3, 734, 492, 756, 802, 618, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (168, 'Werebear', 5, 4, 875, 422, 767, 691, 422, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (169, 'Demon Knight', 5, 4, 653, 412, 777, 708, 411, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (170, 'Magic Wyvern', 5, 4, 639, 387, 788, 725, 363, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (171, 'Fiendlord', 5, 5, 727, 479, 798, 878, 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (172, 'Zhora''s Zealot', 5, 5, 963, 365, 809, 882, 706, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (173, 'Zhora''s Bishop', 5, 6, 983, 344, 819, 738, 436, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (174, 'Liche Lord', 5, 6, 872, 457, 830, 797, 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (175, 'Fire Wyvern', 5, 7, 714, 454, 840, 857, 678, 0, 0, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (176, 'Zhora''s Obsessive', 5, 7, 945, 435, 851, 937, 694, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (177, 'Zhora''s Archbishop', 5, 8, 861, 595, 861, 887, 444, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (178, 'Grey Daemon', 5, 8, 750, 567, 872, 960, 653, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (179, 'Hellhound', 5, 9, 794, 618, 882, 935, 403, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (180, 'Great Wyrm', 5, 9, 965, 518, 893, 858, 550, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (181, 'Green Dragon', 5, 10, 795, 587, 903, 876, 684, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (182, 'Red Daemon', 5, 10, 869, 421, 914, 988, 623, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (183, 'Hellbeast', 5, 11, 906, 444, 924, 943, 406, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (184, 'Frost Wyrm', 5, 11, 964, 533, 935, 973, 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (185, 'Blue Dragon', 5, 12, 1116, 492, 945, 993, 408, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (186, 'Dark Daemon', 5, 12, 1138, 478, 956, 995, 697, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (187, 'Hellbear', 5, 13, 947, 426, 966, 938, 488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (188, 'Red Wyrm', 5, 13, 919, 509, 977, 1026, 821, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (189, 'Red Dragon', 5, 14, 1106, 533, 987, 1057, 772, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (190, 'Black Daemon', 5, 14, 1048, 440, 998, 1048, 504, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (191, 'Hellwolf', 5, 15, 1170, 555, 1008, 1109, 488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (192, 'Blue Wyrm', 5, 15, 1121, 530, 1019, 1040, 676, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (193, 'Dark Dragon', 5, 16, 1235, 484, 1029, 927, 649, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (194, 'Fallen Dragon', 5, 16, 1207, 676, 1040, 1009, 687, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (195, 'Shadow Dragon', 5, 17, 1166, 735, 1050, 1113, 702, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (196, 'Black Dragon', 5, 17, 1104, 680, 1061, 1008, 504, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (197, 'Ancient Dragon', 5, 18, 868, 675, 1071, 986, 740, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (198, 'False Dragon', 5, 18, 1169, 758, 1082, 1050, 473, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (199, 'Daemonlord', 5, 19, 1082, 557, 1092, 1049, 787, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (200, 'Dragonlord', 5, 20, 971, 728, 1103, 1159, 916, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); -INSERT INTO `sx_monsters` VALUES (201, 'Razora', 1, 99, 150, 60, 120, 120, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 0); -INSERT INTO `sx_monsters` VALUES (202, 'Numoren', 2, 99, 300, 300, 300, 300, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 0); -INSERT INTO `sx_monsters` VALUES (203, 'Crestfall', 3, 99, 800, 1000, 500, 550, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 9, 0); -INSERT INTO `sx_monsters` VALUES (204, 'Lucifuge''s Throneguard', 4, 99, 200, 300, 700, 750, 400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 0); -INSERT INTO `sx_monsters` VALUES (205, 'Lucifuge', 4, 99, 1500, 1500, 850, 900, 850, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 13, 0); -INSERT INTO `sx_monsters` VALUES (206, 'Xiran''s Minion', 5, 99, 500, 400, 1200, 1250, 1100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 16, 0); -INSERT INTO `sx_monsters` VALUES (207, 'Xiran''s Cardinal', 5, 99, 750, 750, 1300, 1400, 1250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 0); -INSERT INTO `sx_monsters` VALUES (208, 'Xiran', 5, 99, 1000, 1000, 1400, 1500, 1300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 18, 0); -INSERT INTO `sx_monsters` VALUES (209, 'Xiran', 5, 99, 5000, 5000, 1600, 1800, 1200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 19, 0); +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), +(2, 'Shade', 1, 1, 4, 2, 3, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(3, 'Slime', 1, 2, 4, 2, 3, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(4, 'Small Drake', 1, 2, 4, 3, 4, 5, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(5, 'Skeleton', 1, 3, 5, 3, 5, 6, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(6, 'Haunt', 1, 3, 6, 4, 6, 6, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(7, 'Big Slime', 1, 4, 7, 5, 7, 7, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(8, 'Drake', 1, 4, 8, 5, 8, 8, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(9, 'Ghost', 1, 5, 9, 6, 9, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(10, 'Bee', 1, 5, 10, 4, 9, 10, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(11, 'Scorpion', 1, 6, 8, 6, 10, 11, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(12, 'Dawk', 1, 6, 14, 8, 11, 11, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(13, 'Nymph', 1, 7, 15, 6, 12, 12, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(14, 'Ember', 1, 7, 12, 7, 12, 14, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(15, 'Daydream', 1, 8, 12, 8, 13, 14, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(16, 'Wasp', 1, 8, 15, 10, 14, 14, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(17, 'Shadow', 1, 9, 15, 8, 16, 16, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(18, 'Harpy', 1, 9, 15, 12, 17, 17, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(19, 'Air Elemental', 1, 10, 17, 11, 19, 18, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(20, 'Rogue', 1, 10, 22, 14, 21, 20, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(21, 'Lynx', 1, 11, 19, 14, 23, 24, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(22, 'Trickster', 1, 11, 25, 17, 25, 26, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(23, 'Goblin', 1, 12, 27, 17, 25, 27, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(24, 'Charmer', 1, 12, 27, 14, 27, 29, 18, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(25, 'Raven', 1, 13, 30, 12, 29, 29, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(26, 'Bobcat', 1, 13, 26, 21, 31, 29, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(27, 'Lycan', 1, 14, 37, 15, 34, 36, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(28, 'Fiend', 1, 14, 42, 26, 37, 40, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(29, 'Liche', 1, 15, 44, 23, 40, 42, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(30, 'Dawkin', 1, 15, 35, 21, 42, 40, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(31, 'Anarchist', 1, 16, 38, 25, 45, 49, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(32, 'Hellcat', 1, 16, 47, 30, 48, 49, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(33, 'Fallen Cherub', 1, 17, 56, 29, 51, 55, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(34, 'Grey Wolf', 1, 17, 63, 36, 54, 52, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(35, 'Black Bear', 1, 18, 48, 29, 56, 55, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(36, 'Knight', 1, 18, 55, 33, 59, 64, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(37, 'Giant', 1, 19, 58, 38, 62, 66, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(38, 'Young Wyrm', 1, 19, 73, 44, 65, 60, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(39, 'Lesser Devil', 1, 20, 82, 44, 68, 69, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(40, 'Lesser Demon', 1, 20, 73, 36, 70, 70, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(42, 'Silver Slime', 2, 1, 83, 44, 73, 72, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(43, 'Apparition', 2, 1, 68, 34, 76, 81, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(44, 'Phantasm', 2, 2, 66, 47, 79, 76, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(45, 'Poltergeist', 2, 2, 96, 33, 82, 83, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(46, 'Wraith', 2, 3, 73, 38, 84, 79, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(47, 'Big Drake', 2, 3, 89, 59, 87, 84, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(48, 'Illusion', 2, 4, 104, 37, 90, 86, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(49, 'Dawkare', 2, 4, 110, 50, 93, 86, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(50, 'Illusionist', 2, 5, 93, 50, 96, 87, 40, 70, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(51, 'Skeleton Soldier', 2, 5, 104, 48, 98, 95, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(52, 'Devil', 2, 6, 121, 57, 102, 112, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(53, 'Demon', 2, 6, 95, 48, 105, 113, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(54, 'Brown Bear', 2, 7, 103, 76, 109, 100, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(55, 'Black Wolf', 2, 7, 123, 45, 112, 104, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(56, 'Water Elemental', 2, 8, 122, 82, 116, 128, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(57, 'Harridan', 2, 8, 96, 71, 119, 109, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(58, 'Sylph', 2, 9, 115, 69, 123, 111, 89, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(59, 'Orc', 2, 9, 135, 82, 126, 123, 73, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(60, 'Dawkra', 2, 10, 108, 65, 130, 121, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(61, 'Shaman', 2, 10, 122, 80, 133, 136, 98, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(62, 'Cinder', 2, 11, 159, 62, 137, 124, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(63, 'Yellowjacket', 2, 11, 115, 96, 140, 138, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(64, 'Rogue Scorpion', 2, 12, 123, 58, 144, 139, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(65, 'Magidrake', 2, 12, 156, 68, 147, 140, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(66, 'Dream', 2, 13, 170, 84, 151, 165, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(67, 'Ocelot', 2, 13, 162, 90, 154, 168, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(68, 'Shadow Raven', 2, 14, 189, 81, 158, 152, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(69, 'Knave', 2, 14, 181, 91, 161, 168, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(70, 'Lycanthor', 2, 15, 157, 109, 165, 162, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(71, 'Mirage', 2, 15, 138, 105, 168, 155, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(72, 'Magician', 2, 16, 164, 105, 172, 166, 70, 140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(73, 'Mace Knight', 2, 16, 156, 86, 175, 175, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(74, 'Lesser Wyvern', 2, 17, 171, 90, 179, 167, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(75, 'Serafiend', 2, 17, 195, 128, 182, 166, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(76, 'Zhora''s Follower', 2, 18, 155, 125, 186, 201, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(77, 'Zhora''s Cantor', 2, 18, 214, 103, 189, 188, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(78, 'Liche Captain', 2, 19, 180, 101, 193, 203, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(79, 'Leviathan', 2, 19, 214, 108, 196, 195, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(80, 'Renegade', 2, 20, 164, 138, 200, 210, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(81, 'Dark Slime', 3, 1, 189, 98, 203, 203, 143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(82, 'Phantom', 3, 1, 230, 131, 207, 205, 152, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(83, 'Spirit', 3, 2, 168, 147, 210, 198, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(84, 'Specter', 3, 2, 254, 93, 215, 213, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(85, 'Winged Drake', 3, 3, 231, 117, 220, 207, 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(86, 'Shimmer', 3, 3, 261, 120, 225, 219, 112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(87, 'Dawkor', 3, 4, 217, 113, 230, 210, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(88, 'Enchanter', 3, 4, 264, 132, 235, 254, 130, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(89, 'Mounted Skeleton', 3, 5, 257, 137, 240, 262, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(90, 'Greater Devil', 3, 5, 245, 125, 245, 221, 153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(91, 'Greater Demon', 3, 6, 228, 133, 250, 250, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(92, 'Polar Bear', 3, 6, 299, 161, 255, 240, 171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(93, 'Red Wolf', 3, 7, 218, 140, 259, 259, 171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(94, 'Earth Elemental', 3, 7, 228, 151, 264, 288, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(95, 'Ogress', 3, 8, 299, 111, 269, 283, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(96, 'Nisse', 3, 8, 283, 154, 274, 247, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(97, 'Troll', 3, 9, 285, 154, 279, 254, 204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(98, 'Wizard', 3, 9, 341, 145, 284, 287, 158, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(99, 'Fire', 3, 10, 249, 162, 289, 284, 134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(100, 'Hornet', 3, 10, 339, 150, 294, 265, 165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(101, 'Red Scorpion', 3, 11, 311, 198, 299, 273, 148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(102, 'Hallucination', 3, 11, 320, 152, 304, 332, 223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(103, 'Leopard', 3, 12, 302, 136, 308, 315, 221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(104, 'Frost Raven', 3, 12, 357, 132, 313, 282, 226, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(105, 'Scoundrel', 3, 13, 315, 153, 318, 299, 132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(106, 'Fallen Muse', 3, 13, 343, 130, 323, 353, 177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(107, 'Snow Leopard', 3, 14, 394, 145, 328, 322, 136, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(108, 'Lycanthra', 3, 14, 277, 187, 333, 314, 220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(109, 'Axe Knight', 3, 15, 376, 224, 338, 352, 141, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(110, 'Cheetah', 3, 15, 381, 151, 343, 326, 170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(111, 'Wyvern', 3, 16, 369, 209, 348, 328, 233, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(112, 'Cherufiend', 3, 16, 304, 177, 353, 343, 217, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(113, 'Zhora''s Advocate', 3, 17, 290, 225, 357, 343, 151, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(114, 'Zhora''s Elder', 3, 17, 301, 160, 362, 348, 195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(115, 'Liche Prince', 3, 18, 426, 206, 367, 342, 233, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(116, 'Behemoth', 3, 18, 421, 190, 372, 361, 235, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(117, 'Insurgent', 3, 19, 336, 264, 377, 393, 181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(118, 'Greater Wyvern', 3, 20, 444, 161, 382, 409, 324, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(119, 'Devil Lord', 4, 1, 351, 218, 389, 393, 252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(120, 'Demon Lord', 4, 1, 476, 175, 396, 361, 206, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(121, 'Grizzly Bear', 4, 2, 347, 162, 403, 363, 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(122, 'Arctic Wolf', 4, 2, 468, 177, 410, 427, 261, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(123, 'Fire Elemental', 4, 3, 334, 180, 417, 422, 233, 0, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(124, 'Gorgon', 4, 3, 344, 225, 424, 441, 270, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(125, 'Enchantress', 4, 4, 466, 173, 431, 427, 265, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(126, 'Ogre', 4, 4, 526, 276, 438, 456, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(127, 'Sorcerer', 4, 5, 517, 303, 445, 450, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(128, 'Blaze', 4, 5, 394, 195, 452, 457, 270, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(129, 'Demon Hornet', 4, 6, 469, 212, 459, 432, 337, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(130, 'Silver Scorpion', 4, 6, 560, 275, 466, 499, 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(131, 'Torment', 4, 7, 488, 261, 473, 521, 402, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(132, 'Fire Raven', 4, 7, 533, 303, 480, 432, 242, 0, 0, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(133, 'Hellion', 4, 8, 400, 341, 487, 517, 321, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(134, 'Fallen Angel', 4, 8, 470, 223, 494, 524, 325, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(135, 'Werewolf', 4, 9, 476, 281, 501, 517, 342, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(136, 'Armored Knight', 4, 9, 514, 336, 508, 473, 308, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(137, 'Archfiend', 4, 10, 443, 351, 515, 541, 390, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(138, 'Zhora''s Fanatic', 4, 10, 569, 256, 522, 502, 312, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(139, 'Zhora''s Priest', 4, 11, 529, 212, 529, 540, 351, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(140, 'Liche King', 4, 11, 617, 231, 536, 579, 261, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(141, 'Colossus', 4, 12, 576, 315, 543, 505, 218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(142, 'Nihilist', 4, 12, 440, 297, 550, 594, 327, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(143, 'Armored Skeleton', 4, 13, 574, 385, 557, 563, 254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(144, 'Puma', 4, 13, 525, 339, 564, 559, 403, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(145, 'Devil King', 4, 14, 532, 309, 571, 526, 369, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(146, 'Demon King', 4, 14, 544, 284, 578, 619, 353, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(147, 'Kodiak Bear', 4, 15, 474, 369, 585, 574, 328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(148, 'Haunted Wolf', 4, 15, 687, 338, 592, 652, 268, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(149, 'Light Elemental', 4, 16, 647, 264, 599, 582, 414, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(150, 'Medusa', 4, 16, 649, 243, 606, 619, 477, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(151, 'Siren', 4, 17, 528, 270, 613, 675, 507, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(152, 'Uruk', 4, 17, 540, 385, 620, 577, 456, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(153, 'Warlock', 4, 18, 653, 421, 627, 615, 382, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(154, 'Jaguar', 4, 18, 666, 317, 634, 603, 248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(155, 'Necromancer', 4, 19, 584, 295, 641, 622, 461, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(156, 'Demagogue', 4, 19, 733, 376, 648, 713, 414, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(157, 'Titan', 4, 20, 636, 446, 655, 590, 384, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(158, 'Lion', 4, 20, 643, 358, 662, 662, 391, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(159, 'Pyre', 5, 1, 780, 296, 672, 686, 309, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(160, 'Figment', 5, 1, 820, 315, 683, 663, 478, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(161, 'Demon Scorpion', 5, 1, 791, 402, 693, 666, 300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(162, 'Nightmare', 5, 2, 789, 437, 704, 761, 381, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(163, 'Silver Raven', 5, 2, 793, 472, 714, 650, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(164, 'Bandit', 5, 2, 638, 435, 725, 740, 541, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(165, 'Fallen Archangel', 5, 3, 633, 500, 735, 765, 375, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(166, 'Tiger', 5, 3, 746, 493, 746, 709, 369, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(167, 'Fallen Seraph', 5, 3, 734, 492, 756, 802, 618, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(168, 'Werebear', 5, 4, 875, 422, 767, 691, 422, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(169, 'Demon Knight', 5, 4, 653, 412, 777, 708, 411, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(170, 'Magic Wyvern', 5, 4, 639, 387, 788, 725, 363, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(171, 'Fiendlord', 5, 5, 727, 479, 798, 878, 387, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(172, 'Zhora''s Zealot', 5, 5, 963, 365, 809, 882, 706, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(173, 'Zhora''s Bishop', 5, 6, 983, 344, 819, 738, 436, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(174, 'Liche Lord', 5, 6, 872, 457, 830, 797, 495, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(175, 'Fire Wyvern', 5, 7, 714, 454, 840, 857, 678, 0, 0, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(176, 'Zhora''s Obsessive', 5, 7, 945, 435, 851, 937, 694, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(177, 'Zhora''s Archbishop', 5, 8, 861, 595, 861, 887, 444, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(178, 'Grey Daemon', 5, 8, 750, 567, 872, 960, 653, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(179, 'Hellhound', 5, 9, 794, 618, 882, 935, 403, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(180, 'Great Wyrm', 5, 9, 965, 518, 893, 858, 550, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(181, 'Green Dragon', 5, 10, 795, 587, 903, 876, 684, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(182, 'Red Daemon', 5, 10, 869, 421, 914, 988, 623, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(183, 'Hellbeast', 5, 11, 906, 444, 924, 943, 406, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(184, 'Frost Wyrm', 5, 11, 964, 533, 935, 973, 506, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(185, 'Blue Dragon', 5, 12, 1116, 492, 945, 993, 408, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(186, 'Dark Daemon', 5, 12, 1138, 478, 956, 995, 697, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(187, 'Hellbear', 5, 13, 947, 426, 966, 938, 488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(188, 'Red Wyrm', 5, 13, 919, 509, 977, 1026, 821, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(189, 'Red Dragon', 5, 14, 1106, 533, 987, 1057, 772, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(190, 'Black Daemon', 5, 14, 1048, 440, 998, 1048, 504, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(191, 'Hellwolf', 5, 15, 1170, 555, 1008, 1109, 488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(192, 'Blue Wyrm', 5, 15, 1121, 530, 1019, 1040, 676, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(193, 'Dark Dragon', 5, 16, 1235, 484, 1029, 927, 649, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(194, 'Fallen Dragon', 5, 16, 1207, 676, 1040, 1009, 687, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(195, 'Shadow Dragon', 5, 17, 1166, 735, 1050, 1113, 702, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(196, 'Black Dragon', 5, 17, 1104, 680, 1061, 1008, 504, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(197, 'Ancient Dragon', 5, 18, 868, 675, 1071, 986, 740, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(198, 'False Dragon', 5, 18, 1169, 758, 1082, 1050, 473, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(199, 'Daemonlord', 5, 19, 1082, 557, 1092, 1049, 787, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(200, 'Dragonlord', 5, 20, 971, 728, 1103, 1159, 916, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), +(201, 'Razora', 1, 99, 150, 60, 120, 120, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 0), +(202, 'Numoren', 2, 99, 300, 300, 300, 300, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 0), +(203, 'Crestfall', 3, 99, 800, 1000, 500, 550, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 9, 0), +(204, 'Lucifuge''s Throneguard', 4, 99, 200, 300, 700, 750, 400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12, 0), +(205, 'Lucifuge', 4, 99, 1500, 1500, 850, 900, 850, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 13, 0), +(206, 'Xiran''s Minion', 5, 99, 500, 400, 1200, 1250, 1100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 16, 0), +(207, 'Xiran''s Cardinal', 5, 99, 750, 750, 1300, 1400, 1250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 0), +(208, 'Xiran', 5, 99, 1000, 1000, 1400, 1500, 1300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 18, 0), +(209, 'Xiran', 5, 99, 5000, 5000, 1600, 1800, 1200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 19, 0); -- -------------------------------------------------------- @@ -780,7 +788,6 @@ INSERT INTO `sx_monsters` VALUES (209, 'Xiran', 5, 99, 5000, 5000, 1600, 1800, 1 -- Table structure for table `sx_pvp` -- -DROP TABLE IF EXISTS `sx_pvp`; CREATE TABLE `sx_pvp` ( `id` bigint(20) unsigned NOT NULL auto_increment, `player1id` int(10) unsigned NOT NULL default '0', @@ -792,7 +799,7 @@ CREATE TABLE `sx_pvp` ( `turntime` timestamp NOT NULL, `fightrow` text NOT NULL, PRIMARY KEY (`id`) -) ; +) TYPE=MyISAM; -- -- Dumping data for table `sx_pvp` @@ -805,7 +812,6 @@ CREATE TABLE `sx_pvp` ( -- Table structure for table `sx_spells` -- -DROP TABLE IF EXISTS `sx_spells`; CREATE TABLE `sx_spells` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(30) NOT NULL default '', @@ -816,72 +822,87 @@ 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; -- -- Dumping data for table `sx_spells` -- -INSERT INTO `sx_spells` VALUES (1, 'Heal 1', 'heal', 5, 2, 5, 2, 0); -INSERT INTO `sx_spells` VALUES (2, 'Heal 2', 'heal', 10, 5, 10, 0, 0); -INSERT INTO `sx_spells` VALUES (3, 'Heal 3', 'heal', 20, 10, 15, 0, 0); -INSERT INTO `sx_spells` VALUES (4, 'Heal 4', 'heal', 30, 15, 20, 0, 0); -INSERT INTO `sx_spells` VALUES (5, 'Heal 5', 'heal', 45, 25, 25, 0, 0); -INSERT INTO `sx_spells` VALUES (6, 'Heal 6', 'heal', 60, 35, 30, 0, 0); -INSERT INTO `sx_spells` VALUES (7, 'Heal 7', 'heal', 80, 50, 35, 3, 0); -INSERT INTO `sx_spells` VALUES (8, 'Heal 8', 'heal', 100, 75, 40, 3, 0); -INSERT INTO `sx_spells` VALUES (9, 'Heal 9', 'heal', 150, 100, 45, 3, 0); -INSERT INTO `sx_spells` VALUES (10, 'Heal 10', 'heal', 200, 150, 50, 3, 0); -INSERT INTO `sx_spells` VALUES (11, 'Hurt 1', 'hurt', 5, 2, 5, 0, 0); -INSERT INTO `sx_spells` VALUES (12, 'Hurt 2', 'hurt', 10, 5, 10, 0, 0); -INSERT INTO `sx_spells` VALUES (13, 'Hurt 3', 'hurt', 15, 7, 15, 0, 0); -INSERT INTO `sx_spells` VALUES (14, 'Hurt 4', 'hurt', 25, 12, 20, 0, 0); -INSERT INTO `sx_spells` VALUES (15, 'Hurt 5', 'hurt', 35, 20, 25, 0, 0); -INSERT INTO `sx_spells` VALUES (16, 'Hurt 6', 'hurt', 50, 30, 30, 0, 0); -INSERT INTO `sx_spells` VALUES (17, 'Hurt 7', 'hurt', 65, 40, 35, 3, 0); -INSERT INTO `sx_spells` VALUES (18, 'Hurt 8', 'hurt', 85, 50, 40, 3, 0); -INSERT INTO `sx_spells` VALUES (19, 'Hurt 9', 'hurt', 105, 65, 45, 3, 0); -INSERT INTO `sx_spells` VALUES (20, 'Hurt 10', 'hurt', 130, 80, 50, 3, 0); -INSERT INTO `sx_spells` VALUES (21, 'Sleep 1', 'sleep', 80, 20, 10, 0, 0); -INSERT INTO `sx_spells` VALUES (22, 'Sleep 2', 'sleep', 60, 35, 20, 0, 0); -INSERT INTO `sx_spells` VALUES (23, 'Sleep 3', 'sleep', 40, 50, 30, 2, 0); -INSERT INTO `sx_spells` VALUES (24, 'Sleep 4', 'sleep', 20, 75, 40, 2, 0); -INSERT INTO `sx_spells` VALUES (25, 'Sleep 5', 'sleep', 5, 100, 50, 2, 0); -INSERT INTO `sx_spells` VALUES (26, 'Fire 1', 'fire', 5, 2, 5, 0, 0); -INSERT INTO `sx_spells` VALUES (27, 'Fire 2', 'fire', 10, 5, 10, 0, 0); -INSERT INTO `sx_spells` VALUES (28, 'Fire 3', 'fire', 15, 7, 15, 0, 0); -INSERT INTO `sx_spells` VALUES (29, 'Fire 4', 'fire', 25, 12, 20, 0, 0); -INSERT INTO `sx_spells` VALUES (30, 'Fire 5', 'fire', 35, 20, 25, 0, 0); -INSERT INTO `sx_spells` VALUES (31, 'Fire 6', 'fire', 50, 30, 30, 0, 0); -INSERT INTO `sx_spells` VALUES (32, 'Fire 7', 'fire', 65, 40, 35, 2, 0); -INSERT INTO `sx_spells` VALUES (33, 'Fire 8', 'fire', 85, 50, 40, 2, 0); -INSERT INTO `sx_spells` VALUES (34, 'Fire 9', 'fire', 105, 65, 45, 2, 0); -INSERT INTO `sx_spells` VALUES (35, 'Fire 10', 'fire', 130, 80, 50, 2, 0); -INSERT INTO `sx_spells` VALUES (36, 'Lightning 1', 'light', 5, 2, 5, 0, 0); -INSERT INTO `sx_spells` VALUES (37, 'Lightning 2', 'light', 10, 5, 10, 0, 0); -INSERT INTO `sx_spells` VALUES (38, 'Lightning 3', 'light', 15, 7, 15, 0, 0); -INSERT INTO `sx_spells` VALUES (39, 'Lightning 4', 'light', 25, 12, 20, 0, 0); -INSERT INTO `sx_spells` VALUES (40, 'Lightning 5', 'light', 35, 20, 25, 0, 0); -INSERT INTO `sx_spells` VALUES (41, 'Lightning 6', 'light', 50, 30, 30, 0, 0); -INSERT INTO `sx_spells` VALUES (42, 'Lightning 7', 'light', 65, 40, 35, 2, 0); -INSERT INTO `sx_spells` VALUES (43, 'Lightning 8', 'light', 85, 50, 40, 2, 0); -INSERT INTO `sx_spells` VALUES (44, 'Lightning 9', 'light', 105, 65, 45, 2, 0); -INSERT INTO `sx_spells` VALUES (45, 'Lightning 10', 'light', 130, 80, 50, 2, 0); -INSERT INTO `sx_spells` VALUES (46, 'Prismatic Blast 1', 'prism', 2, 2, 5, 0, 0); -INSERT INTO `sx_spells` VALUES (47, 'Prismatic Blast 2', 'prism', 5, 5, 10, 0, 0); -INSERT INTO `sx_spells` VALUES (48, 'Prismatic Blast 3', 'prism', 10, 7, 15, 0, 0); -INSERT INTO `sx_spells` VALUES (49, 'Prismatic Blast 4', 'prism', 15, 12, 20, 0, 0); -INSERT INTO `sx_spells` VALUES (50, 'Prismatic Blast 5', 'prism', 15, 20, 25, 0, 0); -INSERT INTO `sx_spells` VALUES (51, 'Prismatic Blast 6', 'prism', 20, 30, 30, 0, 0); -INSERT INTO `sx_spells` VALUES (52, 'Prismatic Blast 7', 'prism', 25, 40, 35, 0, 1); -INSERT INTO `sx_spells` VALUES (53, 'Prismatic Blast 8', 'prism', 30, 50, 40, 0, 1); -INSERT INTO `sx_spells` VALUES (54, 'Prismatic Blast 9', 'prism', 35, 65, 45, 0, 1); -INSERT INTO `sx_spells` VALUES (55, 'Prismatic Blast 10', 'prism', 40, 80, 50, 0, 1); -INSERT INTO `sx_spells` VALUES (56, 'Stone Skin 1', 'stone', 5, 10, 10, 1, 0); -INSERT INTO `sx_spells` VALUES (57, 'Stone Skin 2', 'stone', 10, 20, 20, 1, 0); -INSERT INTO `sx_spells` VALUES (58, 'Stone Skin 3', 'stone', 20, 30, 30, 1, 0); -INSERT INTO `sx_spells` VALUES (59, 'Stone Skin 4', 'stone', 35, 40, 40, 1, 0); -INSERT INTO `sx_spells` VALUES (60, 'Stone Skin 5', 'stone', 50, 50, 50, 1, 0); +INSERT INTO `sx_spells` (`id`, `name`, `fname`, `value`, `mp`, `minlevel`, `classonly`, `classexclude`) VALUES (1, 'Heal 1', 'heal', 5, 2, 5, 2, 0), +(2, 'Heal 2', 'heal', 10, 5, 10, 0, 0), +(3, 'Heal 3', 'heal', 20, 10, 15, 0, 0), +(4, 'Heal 4', 'heal', 30, 15, 20, 0, 0), +(5, 'Heal 5', 'heal', 45, 25, 25, 0, 0), +(6, 'Heal 6', 'heal', 60, 35, 30, 0, 0), +(7, 'Heal 7', 'heal', 80, 50, 35, 3, 0), +(8, 'Heal 8', 'heal', 100, 75, 40, 3, 0), +(9, 'Heal 9', 'heal', 150, 100, 45, 3, 0), +(10, 'Heal 10', 'heal', 200, 150, 50, 3, 0), +(11, 'Hurt 1', 'hurt', 5, 2, 5, 0, 0), +(12, 'Hurt 2', 'hurt', 10, 5, 10, 0, 0), +(13, 'Hurt 3', 'hurt', 15, 7, 15, 0, 0), +(14, 'Hurt 4', 'hurt', 25, 12, 20, 0, 0), +(15, 'Hurt 5', 'hurt', 35, 20, 25, 0, 0), +(16, 'Hurt 6', 'hurt', 50, 30, 30, 0, 0), +(17, 'Hurt 7', 'hurt', 65, 40, 35, 3, 0), +(18, 'Hurt 8', 'hurt', 85, 50, 40, 3, 0), +(19, 'Hurt 9', 'hurt', 105, 65, 45, 3, 0), +(20, 'Hurt 10', 'hurt', 130, 80, 50, 3, 0), +(21, 'Sleep 1', 'sleep', 80, 20, 10, 0, 0), +(22, 'Sleep 2', 'sleep', 60, 35, 20, 0, 0), +(23, 'Sleep 3', 'sleep', 40, 50, 30, 2, 0), +(24, 'Sleep 4', 'sleep', 20, 75, 40, 2, 0), +(25, 'Sleep 5', 'sleep', 5, 100, 50, 2, 0), +(26, 'Fire 1', 'fire', 5, 2, 5, 0, 0), +(27, 'Fire 2', 'fire', 10, 5, 10, 0, 0), +(28, 'Fire 3', 'fire', 15, 7, 15, 0, 0), +(29, 'Fire 4', 'fire', 25, 12, 20, 0, 0), +(30, 'Fire 5', 'fire', 35, 20, 25, 0, 0), +(31, 'Fire 6', 'fire', 50, 30, 30, 0, 0), +(32, 'Fire 7', 'fire', 65, 40, 35, 2, 0), +(33, 'Fire 8', 'fire', 85, 50, 40, 2, 0), +(34, 'Fire 9', 'fire', 105, 65, 45, 2, 0), +(35, 'Fire 10', 'fire', 130, 80, 50, 2, 0), +(36, 'Lightning 1', 'light', 5, 2, 5, 0, 0), +(37, 'Lightning 2', 'light', 10, 5, 10, 0, 0), +(38, 'Lightning 3', 'light', 15, 7, 15, 0, 0), +(39, 'Lightning 4', 'light', 25, 12, 20, 0, 0), +(40, 'Lightning 5', 'light', 35, 20, 25, 0, 0), +(41, 'Lightning 6', 'light', 50, 30, 30, 0, 0), +(42, 'Lightning 7', 'light', 65, 40, 35, 2, 0), +(43, 'Lightning 8', 'light', 85, 50, 40, 2, 0), +(44, 'Lightning 9', 'light', 105, 65, 45, 2, 0), +(45, 'Lightning 10', 'light', 130, 80, 50, 2, 0), +(46, 'Prismatic Blast 1', 'prism', 2, 2, 5, 0, 0), +(47, 'Prismatic Blast 2', 'prism', 5, 5, 10, 0, 0), +(48, 'Prismatic Blast 3', 'prism', 10, 7, 15, 0, 0), +(49, 'Prismatic Blast 4', 'prism', 15, 12, 20, 0, 0), +(50, 'Prismatic Blast 5', 'prism', 15, 20, 25, 0, 0), +(51, 'Prismatic Blast 6', 'prism', 20, 30, 30, 0, 0), +(52, 'Prismatic Blast 7', 'prism', 25, 40, 35, 0, 1), +(53, 'Prismatic Blast 8', 'prism', 30, 50, 40, 0, 1), +(54, 'Prismatic Blast 9', 'prism', 35, 65, 45, 0, 1), +(55, 'Prismatic Blast 10', 'prism', 40, 80, 50, 0, 1), +(56, 'Stone Skin 1', '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); -- -------------------------------------------------------- @@ -889,7 +910,6 @@ INSERT INTO `sx_spells` VALUES (60, 'Stone Skin 5', 'stone', 50, 50, 50, 1, 0); -- Table structure for table `sx_story` -- -DROP TABLE IF EXISTS `sx_story`; CREATE TABLE `sx_story` ( `id` int(10) unsigned NOT NULL auto_increment, `title` text NOT NULL, @@ -907,32 +927,32 @@ CREATE TABLE `sx_story` ( `rewardname` varchar(30) NOT NULL default '', `rewardattr` int(11) NOT NULL default '0', PRIMARY KEY (`id`) -) ; +) TYPE=MyISAM; -- -- Dumping data for table `sx_story` -- -INSERT INTO `sx_story` 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); -INSERT INTO `sx_story` VALUES (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); -INSERT INTO `sx_story` VALUES (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 `sx_story` VALUES (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); -INSERT INTO `sx_story` VALUES (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); -INSERT INTO `sx_story` VALUES (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); -INSERT INTO `sx_story` VALUES (7, 'Forsaken Land', 'You step through Shirreh''s second door, and again feel the ground fall away for a few seconds. You come out of the darkness into a land even stranger than the last two. The sky is filled with dark storm clouds, but the clouds are a discomforting red color. The ground and trees are all bare. You are standing in what apparently used to be a town, but it''s completely deserted, and looks as if it has been for a long time.\r\n\r\nTwo signs hang from a tree nearby the doorway you came through. The first, which appears to be the only thing in town with a somewhat fresh coat of paint, points east and reads "Fort Kayne - 2 Miles."\r\n\r\nThe second is less friendly: "BEWARE CRESTFALL"', 3, 0, 0, 8, 0, '', 0, 0, 0, 'Exploring', '', 0); -INSERT INTO `sx_story` VALUES (8, 'Lord of Plague', 'So much for killing Lucifuge any time soon. Now you have to deal with Crestfall. The castle you''ve seen from a distance looked ominous before, but now that you''re up close, it''s even worse. Skeletons of fallen warriors are hanging on crosses in the courtyard - these are the first signs of actual human "life" you''ve seen since you came through Shirreh''s door. All the bare and stunted trees are covered with flocks of ravens.\r\n\r\n"LORD OF PLAGUE" is carved in the stone above the gateway into the courtyard. With so much already accomplished, and Lucifuge still somewhere ahead of you, you have no other choice now, dear adventurer.', 3, -100, -100, 0, 203, '', 0, 0, 0, 'Fighting', '', 0); -INSERT INTO `sx_story` VALUES (9, 'Bellerophon', 'Crestfall, the mortally-wounded Lord of Plague, lies writhing at your feet, and you are rather enjoying watching his throes of agony. As of yet, he has not exactly died, but instead he seems to... age... somehow. His skin is drying up and wrinkling, his hair is falling out, and before long all that''s left is a crusty old skeleton surrounded by a brilliantly gleaming chainmail coat.\r\n\r\nShirreh''s third door appears, but this time you can read the runes carved on it. And you don''t really like what the runes say.\r\n\r\nABANDON HOPE, ALL YE WHO ENTER HERE', 3, -100, -100, 10, 0, '0,172,0', 4, 0, 0, '', 'strength', 50); -INSERT INTO `sx_story` VALUES (10, 'Inferno', 'The last land was weird. This land is... spooky. You find yourself in the middle of a desert. The dark red clouds still cover the sky, but now the dry and cracked ground is also red. The exact same color as blood. Everywhere, you can see little vents of steam drifting up from the ground. Whoever - or whatever - created this place must not have much need for decoration. Other than the steam vents, the landscape is completely flat and featureless for miles around.\r\n\r\nOne nice thing about the land being so featureless is that you''ll at least be able to see your enemies long before they ever actually get close enough to do any damage.\r\n\r\nWith nothing but a vague feeling that you should probably head south, you decide not to stick around and wait for something to try eating you for breakfast.', 4, 0, 0, 11, 0, '', 0, 0, 0, 'Exploring', '', 0); -INSERT INTO `sx_story` VALUES (11, 'Welcome To My Parlor', 'At long last, you''ve made it. Lucifuge''s mountain fortress is all that stands between you and world peace. The huge black gates swing open, awating your entry, before you even arrive. No sunlight penetrates into the courtyard, even though you can''t see anything really blocking it out. The only light inside seems to be coming directly from the great stone gargoyle statue in the center.\r\n\r\nBut as you get closer, the stone gargoyle stands up and turns around.\r\n\r\n"Greetings, human. Lucifuge has been expecting you. He doesn''t really like to be bothered, though, so I''m here to take care of you."', 4, -100, 100, 0, 204, '', 0, 0, 0, 'Fighting', '', 0); -INSERT INTO `sx_story` VALUES (12, 'Throneguard''s Demise', 'The throneguard screams, and falls. From deep in the bowels of the fortress, you hear a roar so loud that even the ground is shaking beneath you.\r\n\r\nYou have nowhere left to go but inside the fortress, and you''ve come too far to give up now.', 4, -100, 100, 0, 205, '', 0, 0, 0, 'Fighting', '', 0); -INSERT INTO `sx_story` VALUES (13, 'The Light Restored', 'Lucifuge, the overlord of all the evil that has destroyed this land, lies vanquished at your feet. You take his heart, still warm and dripping with his black blood, and put it in your pack, next to the one you already took from Razora.\r\n\r\nYou can''t help but be mildly disturbed by the last words uttered by Lucifuge before he died, though...\r\n\r\n"But... Xiran said it wouldn''t be like this."', 4, -100, 100, 14, 0, '', 5, 0, 0, '', 'dexterity', 50); -INSERT INTO `sx_story` VALUES (14, 'The Blacklands', 'Just as you''re catching your breath, the fortress starts to shake and the floor crumbles beneath you. You fall for what seems like an eternity, until finally landing in yet another place. The ground and sky are both black. This land, like the last, is also dotted with little vents in the ground - here, though, the vents spout fire instead of steam. And it''s a good thing, too, because in this place there is no sun. The fire vents are your only source of light. Thankfully the place where you fell is only a short distance from what looks like a town.\r\n\r\nAs you enter the place, which the sign out front identifies as simply "Outpost 5," the guards tell you just what you''ve been waiting for: your quest isn''t over.\r\n\r\n"Lucifuge was Xiran''s highest ranking general. But he was still only second in command. Xiran himself is locked in his ice prison, Dreadguard, to the north. Shirreh banished him there ages ago, and throughout the centuries these outposts have served as guard stations to make sure he doesn''t escape. But now through the work of Lucifuge, Xiran could regain enough of his strength to escape the prison and destroy the world. You must hurry, traveller. Your only chance at killing Xiran rests on getting there while Xiran is still chained down."', 5, 0, 0, 15, 0, '', 0, 0, 0, 'In Town', '', 0); -INSERT INTO `sx_story` VALUES (15, 'Xiran''s Minion', 'The ice prison Dreadguard looms tall and white before you. In an odd little twist that seems to defy all logic, more of the fire vents seem to be coming straight out of the ice.\r\n\r\nAs you come close to the prison, a large beast strides out towards you. The beast has the body of a man, but the head of a snake, and wings like a bat.\r\n\r\nJust before drawing its sword and preparing to fight, the beast calls out a warning: "Take heed, hero, you now come to the palace of Xiran, and it shall not fall quietly. Better souls than yours now inhabit this place, and Xiran takes pleasure in their eternal torment."', 5, 100, 100, 0, 206, '', 0, 0, 0, 'Fighting', '', 0); -INSERT INTO `sx_story` VALUES (16, 'Xiran''s Cardinal', 'As the minion falls, another figure steps out of the darkness. This one looks like a man, a plain ordinary man. The Cardinal, highest among all the mortals who worship Xiran, wears only a plain black cloak, and carries nothing more than a walking stick.\r\n\r\nSurely it can''t be this easy...', 5, 100, 100, 0, 207, '', 0, 0, 0, 'Fighting', '', 0); -INSERT INTO `sx_story` VALUES (17, 'The Demon God', 'With both the minion and the Cardinal slain, you enter the prison. The entire building seems to be one huge room, and in the very center of it is the demon god, Xiran. He looks something like a man, except he is about twenty feet tall and covered with black scales. Two horns are coming out of his head, and his eyes are bright red. His arms are stretched out, held by massive chains to the walls. But despite the obvious pain this is causing him, he seems to be smiling at you.\r\n\r\n"Welcome, mortal. I''m glad you''ve come, for it is you who shall set me free."', 5, 100, 100, 0, 208, '', 0, 0, 0, 'Fighting', '', 0); -INSERT INTO `sx_story` VALUES (18, 'Bonds Broken', 'After a great battle, Xiran finally sags down as far as the chains will stretch. The red light from his eyes dims and goes out. You listen closely, and the beating from his huge heart slows and finally stops altogether.\r\n\r\nSuddenly the temperature drops, and the huge chains holding Xiran''s lifeless body get frosty with ice crystals. Then you see the chains glowing beneath the layer of ice, and with a thunderous crack, the shackles break and fall away from Xiran''s hands.\r\n\r\nImmediately his eyes flash, and almost before you can blink, Xiran has lept into the air and a great sword has appeared in his hands.\r\n\r\n"See, mortal! I told you I would be freed. You should have left well enough alone in matters that did not concern you. You''ve come so far, it will be such a shame to have to kill you now."', 5, 100, 100, 0, 209, '', 0, 0, 0, 'Fighting', 'energy', 50); -INSERT INTO `sx_story` VALUES (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); -INSERT INTO `sx_story` VALUES (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); +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), +(4, 'Shirreh''s Door', 'As you step through the doorway, you have a momentary feeling of the ground being swept out beneath you. Then you are surrounded by light, and you enter a new town. The townsfolk, surprised at your sudden entry through a door that has never been opened, quickly inform you of the legend surrounding the door.\r\n\r\nIt was created by the archangel Shirreh, as a path between this land and the last you were in. Shirreh made the door so that whoever did eventually destroy Razora would be able to travel here and attempt to defeat Numoren, the demon who was given dominion over this land by Lucifuge.\r\n\r\nIt''s time to continue on, dear adventurer. You did well in the last land, but a new evil awaits you here. One small dirt path leads out of town and into the dense jungle.', 2, 0, 0, 5, 0, '', 0, 0, 0, 'In Town', '', 0), +(5, 'Numoren''s Portal', 'Deep in the heart of the jungles that cover this land, you come to a clearing. In the center of the clearing are two large upright stones, with one more stone on top. You walk around it, and looking through the doorway from one side only shows the other side of the clearing. But looking through it from the other side shows a dark hallway.\r\n\r\nWould you like to step through the magic doorway into the hall, or would you like some more time to get ready for this battle?', 2, 100, 100, 0, 202, '', 0, 0, 0, 'Fighting', '', 0), +(6, 'Numoren''s Ring', 'Numoren has fallen at your hand, and this land is safe. Shirreh''s second door, identical to the first except for the rune carvings at the top of the frame, appears in a wall behind you.\r\n\r\nAs Numoren''s body disappears in a puff of smoke, you hear a small jingling sound and notice a gold ring falling to the ground. Numoren''s ring glows and you can almost hear it calling your name.\r\n\r\nWould you like to pick up the ring, dear adventurer?', 2, 100, 100, 7, 0, '0,171,0', 3, 0, 0, '', 'goldbonus', 5), +(7, 'Forsaken Land', 'You step through Shirreh''s second door, and again feel the ground fall away for a few seconds. You come out of the darkness into a land even stranger than the last two. The sky is filled with dark storm clouds, but the clouds are a discomforting red color. The ground and trees are all bare. You are standing in what apparently used to be a town, but it''s completely deserted, and looks as if it has been for a long time.\r\n\r\nTwo signs hang from a tree nearby the doorway you came through. The first, which appears to be the only thing in town with a somewhat fresh coat of paint, points east and reads "Fort Kayne - 2 Miles."\r\n\r\nThe second is less friendly: "BEWARE CRESTFALL"', 3, 0, 0, 8, 0, '', 0, 0, 0, 'Exploring', '', 0), +(8, 'Lord of Plague', 'So much for killing Lucifuge any time soon. Now you have to deal with Crestfall. The castle you''ve seen from a distance looked ominous before, but now that you''re up close, it''s even worse. Skeletons of fallen warriors are hanging on crosses in the courtyard - these are the first signs of actual human "life" you''ve seen since you came through Shirreh''s door. All the bare and stunted trees are covered with flocks of ravens.\r\n\r\n"LORD OF PLAGUE" is carved in the stone above the gateway into the courtyard. With so much already accomplished, and Lucifuge still somewhere ahead of you, you have no other choice now, dear adventurer.', 3, -100, -100, 0, 203, '', 0, 0, 0, 'Fighting', '', 0), +(9, 'Bellerophon', 'Crestfall, the mortally-wounded Lord of Plague, lies writhing at your feet, and you are rather enjoying watching his throes of agony. As of yet, he has not exactly died, but instead he seems to... age... somehow. His skin is drying up and wrinkling, his hair is falling out, and before long all that''s left is a crusty old skeleton surrounded by a brilliantly gleaming chainmail coat.\r\n\r\nShirreh''s third door appears, but this time you can read the runes carved on it. And you don''t really like what the runes say.\r\n\r\nABANDON HOPE, ALL YE WHO ENTER HERE', 3, -100, -100, 10, 0, '0,172,0', 4, 0, 0, '', 'strength', 50), +(10, 'Inferno', 'The last land was weird. This land is... spooky. You find yourself in the middle of a desert. The dark red clouds still cover the sky, but now the dry and cracked ground is also red. The exact same color as blood. Everywhere, you can see little vents of steam drifting up from the ground. Whoever - or whatever - created this place must not have much need for decoration. Other than the steam vents, the landscape is completely flat and featureless for miles around.\r\n\r\nOne nice thing about the land being so featureless is that you''ll at least be able to see your enemies long before they ever actually get close enough to do any damage.\r\n\r\nWith nothing but a vague feeling that you should probably head south, you decide not to stick around and wait for something to try eating you for breakfast.', 4, 0, 0, 11, 0, '', 0, 0, 0, 'Exploring', '', 0), +(11, 'Welcome To My Parlor', 'At long last, you''ve made it. Lucifuge''s mountain fortress is all that stands between you and world peace. The huge black gates swing open, awating your entry, before you even arrive. No sunlight penetrates into the courtyard, even though you can''t see anything really blocking it out. The only light inside seems to be coming directly from the great stone gargoyle statue in the center.\r\n\r\nBut as you get closer, the stone gargoyle stands up and turns around.\r\n\r\n"Greetings, human. Lucifuge has been expecting you. He doesn''t really like to be bothered, though, so I''m here to take care of you."', 4, -100, 100, 0, 204, '', 0, 0, 0, 'Fighting', '', 0), +(12, 'Throneguard''s Demise', 'The throneguard screams, and falls. From deep in the bowels of the fortress, you hear a roar so loud that even the ground is shaking beneath you.\r\n\r\nYou have nowhere left to go but inside the fortress, and you''ve come too far to give up now.', 4, -100, 100, 0, 205, '', 0, 0, 0, 'Fighting', '', 0), +(13, 'The Light Restored', 'Lucifuge, the overlord of all the evil that has destroyed this land, lies vanquished at your feet. You take his heart, still warm and dripping with his black blood, and put it in your pack, next to the one you already took from Razora.\r\n\r\nYou can''t help but be mildly disturbed by the last words uttered by Lucifuge before he died, though...\r\n\r\n"But... Xiran said it wouldn''t be like this."', 4, -100, 100, 14, 0, '', 5, 0, 0, '', 'dexterity', 50), +(14, 'The Blacklands', 'Just as you''re catching your breath, the fortress starts to shake and the floor crumbles beneath you. You fall for what seems like an eternity, until finally landing in yet another place. The ground and sky are both black. This land, like the last, is also dotted with little vents in the ground - here, though, the vents spout fire instead of steam. And it''s a good thing, too, because in this place there is no sun. The fire vents are your only source of light. Thankfully the place where you fell is only a short distance from what looks like a town.\r\n\r\nAs you enter the place, which the sign out front identifies as simply "Outpost 5," the guards tell you just what you''ve been waiting for: your quest isn''t over.\r\n\r\n"Lucifuge was Xiran''s highest ranking general. But he was still only second in command. Xiran himself is locked in his ice prison, Dreadguard, to the north. Shirreh banished him there ages ago, and throughout the centuries these outposts have served as guard stations to make sure he doesn''t escape. But now through the work of Lucifuge, Xiran could regain enough of his strength to escape the prison and destroy the world. You must hurry, traveller. Your only chance at killing Xiran rests on getting there while Xiran is still chained down."', 5, 0, 0, 15, 0, '', 0, 0, 0, 'In Town', '', 0), +(15, 'Xiran''s Minion', 'The ice prison Dreadguard looms tall and white before you. In an odd little twist that seems to defy all logic, more of the fire vents seem to be coming straight out of the ice.\r\n\r\nAs you come close to the prison, a large beast strides out towards you. The beast has the body of a man, but the head of a snake, and wings like a bat.\r\n\r\nJust before drawing its sword and preparing to fight, the beast calls out a warning: "Take heed, hero, you now come to the palace of Xiran, and it shall not fall quietly. Better souls than yours now inhabit this place, and Xiran takes pleasure in their eternal torment."', 5, 100, 100, 0, 206, '', 0, 0, 0, 'Fighting', '', 0), +(16, 'Xiran''s Cardinal', 'As the minion falls, another figure steps out of the darkness. This one looks like a man, a plain ordinary man. The Cardinal, highest among all the mortals who worship Xiran, wears only a plain black cloak, and carries nothing more than a walking stick.\r\n\r\nSurely it can''t be this easy...', 5, 100, 100, 0, 207, '', 0, 0, 0, 'Fighting', '', 0), +(17, 'The Demon God', 'With both the minion and the Cardinal slain, you enter the prison. The entire building seems to be one huge room, and in the very center of it is the demon god, Xiran. He looks something like a man, except he is about twenty feet tall and covered with black scales. Two horns are coming out of his head, and his eyes are bright red. His arms are stretched out, held by massive chains to the walls. But despite the obvious pain this is causing him, he seems to be smiling at you.\r\n\r\n"Welcome, mortal. I''m glad you''ve come, for it is you who shall set me free."', 5, 100, 100, 0, 208, '', 0, 0, 0, 'Fighting', '', 0), +(18, 'Bonds Broken', 'After a great battle, Xiran finally sags down as far as the chains will stretch. The red light from his eyes dims and goes out. You listen closely, and the beating from his huge heart slows and finally stops altogether.\r\n\r\nSuddenly the temperature drops, and the huge chains holding Xiran''s lifeless body get frosty with ice crystals. Then you see the chains glowing beneath the layer of ice, and with a thunderous crack, the shackles break and fall away from Xiran''s hands.\r\n\r\nImmediately his eyes flash, and almost before you can blink, Xiran has lept into the air and a great sword has appeared in his hands.\r\n\r\n"See, mortal! I told you I would be freed. You should have left well enough alone in matters that did not concern you. You''ve come so far, it will be such a shame to have to kill you now."', 5, 100, 100, 0, 209, '', 0, 0, 0, 'Fighting', 'energy', 50), +(19, 'Epilogue', 'With one final triumphant swing, you pierce Xiran''s heart and immediately your weapon disintegrates in front of your eyes. Xiran falls to the ground, and as the walls of the ice prison are falling down around you, Xiran''s body bursts into flames and is utterly consumed in seconds, leaving only a pile of ash on the floor.\r\n\r\nHis sword, though, remains unscathed by the fire, so as you are looking for the quickest way out of the crumbling building, you grab it and sling it over your shoulder. It''s only fair, after all, since the demon god''s heart took your own weapon away from you.\r\n\r\nYou make your way back to the last outpost, and the entire population has come out to see you. After many long ages, the dreadful task of awating Xiran''s escape has been lifted from their shoulders.\r\n\r\nNow that you''ve finally saved the world, you can''t wait to have a drink...\r\n\r\nThe End', 5, 100, 100, 20, 0, '0,173,0', 0, 0, 0, '', '', 0), +(20, 'Fin', 'You have now beat the game and have been added to the Scroll of Heroes. You may continue playing if you want, or of course you could also take a well-deserved rest. Thank you for playing, and we hope you''ve enjoyed it.', 5, 100, 100, 9999, 0, '', 0, 0, 0, '', '', 0); -- -------------------------------------------------------- @@ -940,7 +960,6 @@ INSERT INTO `sx_story` VALUES (20, 'Fin', 'You have now beat the game and have b -- Table structure for table `sx_towns` -- -DROP TABLE IF EXISTS `sx_towns`; CREATE TABLE `sx_towns` ( `id` tinyint(3) unsigned NOT NULL auto_increment, `name` varchar(30) NOT NULL default '', @@ -953,37 +972,37 @@ 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; -- -- Dumping data for table `sx_towns` -- -INSERT INTO `sx_towns` VALUES (1, 'Middleton', 1, 0, 0, 5, 0, 0, 1, 5); -INSERT INTO `sx_towns` VALUES (2, 'Norfolk', 1, 25, 25, 10, 25, 5, 3, 8); -INSERT INTO `sx_towns` VALUES (3, 'Calentia', 1, 50, -50, 25, 50, 15, 6, 11); -INSERT INTO `sx_towns` VALUES (4, 'Resmark', 1, -75, 75, 40, 100, 30, 9, 14); -INSERT INTO `sx_towns` VALUES (5, 'Erdricksburg', 1, 99, 99, 60, 500, 50, 12, 17); -INSERT INTO `sx_towns` VALUES (6, 'Lorensgaard', 2, 0, 0, 75, 0, 40, 15, 20); -INSERT INTO `sx_towns` VALUES (7, 'Nailes', 2, 17, -23, 100, 150, 55, 18, 23); -INSERT INTO `sx_towns` VALUES (8, 'Nostrum', 2, 46, 33, 150, 300, 70, 21, 27); -INSERT INTO `sx_towns` VALUES (9, 'Vauderellin', 2, -70, 65, 200, 500, 85, 24, 30); -INSERT INTO `sx_towns` VALUES (10, 'Underwood', 2, -95, -95, 250, 750, 90, 27, 33); -INSERT INTO `sx_towns` VALUES (11, 'Fort Kayne', 3, 0, 2, 200, 0, 75, 30, 36); -INSERT INTO `sx_towns` VALUES (12, 'Fort Minor', 3, -20, -25, 250, 800, 100, 33, 40); -INSERT INTO `sx_towns` VALUES (13, 'Fort Oligard', 3, 48, 37, 300, 1000, 125, 37, 44); -INSERT INTO `sx_towns` VALUES (14, 'Fort Wilmor', 3, 78, 68, 350, 1200, 150, 41, 48); -INSERT INTO `sx_towns` VALUES (15, 'Fort Plastid', 3, 98, 98, 400, 1400, 175, 45, 52); -INSERT INTO `sx_towns` VALUES (16, 'Luxor', 4, -5, 0, 200, 0, 200, 49, 56); -INSERT INTO `sx_towns` VALUES (17, 'Trake', 4, -20, 5, 300, 1800, 225, 53, 60); -INSERT INTO `sx_towns` VALUES (18, 'Cormorent', 4, -40, 15, 400, 2000, 250, 57, 64); -INSERT INTO `sx_towns` VALUES (19, 'Illuvian', 4, -60, 35, 500, 2500, 275, 61, 68); -INSERT INTO `sx_towns` VALUES (20, 'Pogue', 4, -80, 60, 600, 3000, 300, 65, 72); -INSERT INTO `sx_towns` VALUES (21, 'Outpost 5', 5, 0, 0, 350, 0, 325, 69, 76); -INSERT INTO `sx_towns` VALUES (22, 'Outpost 7', 5, 20, 20, 500, 3500, 350, 73, 80); -INSERT INTO `sx_towns` VALUES (23, 'Outpost 15', 5, 35, -55, 650, 4000, 375, 77, 82); -INSERT INTO `sx_towns` VALUES (24, 'Outpost 22', 5, -74, -69, 800, 4500, 400, 80, 84); -INSERT INTO `sx_towns` VALUES (25, 'Outpost 42', 5, 89, 94, 950, 5000, 425, 83, 85); +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), +(2, 'Norfolk', 1, 25, 25, 10, 25, 5, 3, 8), +(3, 'Calentia', 1, 50, -50, 25, 50, 15, 6, 11), +(4, 'Resmark', 1, -75, 75, 40, 100, 30, 9, 14), +(5, 'Erdricksburg', 1, 99, 99, 60, 500, 50, 12, 17), +(6, 'Lorensgaard', 2, 0, 0, 75, 0, 40, 15, 20), +(7, 'Nailes', 2, 17, -23, 100, 150, 55, 18, 23), +(8, 'Nostrum', 2, 46, 33, 150, 300, 70, 21, 27), +(9, 'Vauderellin', 2, -70, 65, 200, 500, 85, 24, 30), +(10, 'Underwood', 2, -95, -95, 250, 750, 90, 27, 33), +(11, 'Fort Kayne', 3, 0, 2, 200, 0, 75, 30, 36), +(12, 'Fort Minor', 3, -20, -25, 250, 800, 100, 33, 40), +(13, 'Fort Oligard', 3, 48, 37, 300, 1000, 125, 37, 44), +(14, 'Fort Wilmor', 3, 78, 68, 350, 1200, 150, 41, 48), +(15, 'Fort Plastid', 3, 98, 98, 400, 1400, 175, 45, 52), +(16, 'Luxor', 4, -5, 0, 200, 0, 200, 49, 56), +(17, 'Trake', 4, -20, 5, 300, 1800, 225, 53, 60), +(18, 'Cormorent', 4, -40, 15, 400, 2000, 250, 57, 64), +(19, 'Illuvian', 4, -60, 35, 500, 2500, 275, 61, 68), +(20, 'Pogue', 4, -80, 60, 600, 3000, 300, 65, 72), +(21, 'Outpost 5', 5, 0, 0, 350, 0, 325, 69, 76), +(22, 'Outpost 7', 5, 20, 20, 500, 3500, 350, 73, 80), +(23, 'Outpost 15', 5, 35, -55, 650, 4000, 375, 77, 82), +(24, 'Outpost 22', 5, -74, -69, 800, 4500, 400, 80, 84), +(25, 'Outpost 42', 5, 89, 94, 950, 5000, 425, 83, 85); -- -------------------------------------------------------- @@ -991,7 +1010,6 @@ INSERT INTO `sx_towns` VALUES (25, 'Outpost 42', 5, 89, 94, 950, 5000, 425, 83, -- Table structure for table `sx_users` -- -DROP TABLE IF EXISTS `sx_users`; CREATE TABLE `sx_users` ( `id` int(10) unsigned NOT NULL auto_increment, `account` int(10) unsigned NOT NULL default '0', @@ -1033,6 +1051,7 @@ CREATE TABLE `sx_users` ( `currenttp` smallint(5) unsigned NOT NULL default '5', `strength` smallint(5) unsigned NOT NULL default '0', `dexterity` smallint(5) unsigned NOT NULL default '0', + `life` smallint(5) unsigned NOT NULL default '0', `energy` smallint(5) unsigned NOT NULL default '0', `physattack` smallint(5) unsigned NOT NULL default '5', `physdefense` smallint(5) unsigned NOT NULL default '5', @@ -1090,30 +1109,35 @@ CREATE TABLE `sx_users` ( `mpleech` tinyint(3) unsigned NOT NULL default '0', `hpgain` tinyint(3) unsigned NOT NULL default '0', `mpgain` tinyint(3) unsigned NOT NULL default '0', + `bonusattack` smallint(5) unsigned NOT NULL default '0', + `bonusdefense` smallint(5) unsigned NOT NULL default '0', PRIMARY KEY (`id`), FULLTEXT KEY `item1name` (`item1name`) -) ; +) TYPE=MyISAM; + +-- +-- Dumping data for table `sx_users` +-- + +-- -------------------------------------------------------- -- -- Table structure for table `sx_worlds` -- -DROP TABLE IF EXISTS `sx_worlds`; CREATE TABLE `sx_worlds` ( `id` smallint(5) unsigned NOT NULL auto_increment, `name` varchar(30) NOT NULL default '', `size` smallint(5) unsigned NOT NULL default '0', - `bossid` mediumint(8) unsigned NOT NULL default '0', PRIMARY KEY (`id`) -) ; +) TYPE=MyISAM; -- -- Dumping data for table `sx_worlds` -- -INSERT INTO `sx_worlds` VALUES (1, 'Raenslide', 100, 1); -INSERT INTO `sx_worlds` VALUES (2, 'Lorenfall', 100, 0); -INSERT INTO `sx_worlds` VALUES (3, 'Borderlands', 100, 0); -INSERT INTO `sx_worlds` VALUES (4, 'Inferno', 100, 0); -INSERT INTO `sx_worlds` VALUES (5, 'Unreality', 100, 0); - \ No newline at end of file +INSERT INTO `sx_worlds` (`id`, `name`, `size`) VALUES (1, 'Raenslide', 100), +(2, 'Lorenfall', 100), +(3, 'Borderlands', 100), +(4, 'Inferno', 100), +(5, 'Unreality', 100); diff --git a/fight.php b/fight.php index bab35ac..7be71dc 100644 --- a/fight.php +++ b/fight.php @@ -10,7 +10,7 @@ if ($userrow["currentaction"] != "Fighting") { die(header("Location: index.php") // Global monsterrow. if($userrow["currentmonsterid"] != 0) { - $monsterquery = doquery("SELECT * FROM {{table}} WHERE id='".$userrow["currentmonsterid"]."' LIMIT 1", "monsters"); + $monsterquery = doquery("SELECT * FROM <> WHERE id='".$userrow["currentmonsterid"]."' LIMIT 1"); $monsterrow = dorow($monsterquery); } else { rollmonster(); @@ -26,7 +26,7 @@ function rollmonster() { if($userrow["longitude"] < 0) { $longitude = $userrow["longitude"] * -1; } else { $longitude = $userrow["longitude"]; } $maxlevel = ceil(max($latitude, $longitude) / 5); $minlevel = $maxlevel - 3; - $monsterquery = doquery("SELECT * FROM {{table}} WHERE world='".$userrow["world"]."' AND level >= $minlevel AND level <= $maxlevel ORDER BY RAND() LIMIT 1", "monsters"); + $monsterquery = doquery("SELECT * FROM <> WHERE world='".$userrow["world"]."' AND level >= $minlevel AND level <= $maxlevel ORDER BY RAND() LIMIT 1"); $monsterrow = dorow($monsterquery); $userrow["currentmonsterhp"] = (ceil(rand($monsterrow["maxhp"] * .75, $monsterrow["maxhp"]) * $userrow["difficulty"])); @@ -98,7 +98,7 @@ function dofight() { } elseif (isset($_POST["run"])) { - if (rand(4,10) + ceil(sqrt($userrow["physdefense"])) < (rand(1,5) + ceil(sqrt($monsterrow["physattack"])))) { + if (rand(4,10) + ceil(sqrt($userrow["dexterity"])) < (rand(1,5) + ceil(sqrt((0.75 * $monsterrow["physattack"]))))) { monsterturn(); $fightrow["message"] = "You tried to run away, but the monster blocked you!
"; @@ -126,7 +126,7 @@ function dofight() { } else { - if (rand(1,10) + ceil(sqrt($userrow["physdefense"])) < (rand(1,7) + ceil(sqrt($monsterrow["physattack"])))) { + if (rand(1,10) + ceil(sqrt($userrow["dexterity"])) < (rand(1,7) + ceil(sqrt((0.75 * $monsterrow["physattack"]))))) { monsterturn(); $fightrow["message"] = "The monster attacked before you were ready!
"; @@ -187,7 +187,7 @@ function playerturn() { // Chance to make an excellent hit. $toexcellent = rand(0,150); - if ($toexcellent <= sqrt($userrow["strength"])) { + if ($toexcellent <= sqrt($userrow["dexterity"])) { $fightrow["playerphysdamage"] *= 2; $fightrow["playermagicdamage"] *= 2; $fightrow["playerfiredamage"] *= 2; @@ -206,6 +206,7 @@ function playerturn() { } // Now we add Per Turn mods. + bonusattack(); hpleech("player"); mpleech("player"); @@ -242,7 +243,28 @@ function monsterturn() { $fightrow["monsterlightdamage"] = max($lighthit - $lightblock, 0); } + // Chance to make an excellent hit. + $toexcellent = rand(0,150); + if ($toexcellent <= sqrt($monsterrow["dexterity"])) { + $fightrow["monsterphysdamage"] *= 2; + $fightrow["monstermagicdamage"] *= 2; + $fightrow["monsterfiredamage"] *= 2; + $fightrow["monsterlightdamage"] *= 2; + $fightrow["message"] = "Excellent hit!
"; + } + + // Chance for player to dodge. + $tododge = rand(0,200); + if ($tododge <= sqrt($userrow["physdefense"])) { + $fightrow["monsterphysdamage"] = 0; + $fightrow["monstermagicdamage"] = 0; + $fightrow["monsterfiredamage"] = 0; + $fightrow["monsterlightdamage"] = 0; + $fightrow["message"] = "You dodged the monster's hit!
"; + } + // Now we add Per Turn mods. + bonusdefense(); hpleech("monster"); // Subtract all damage from player's hp. @@ -267,6 +289,8 @@ function youwin() { if ($monsterrow["newstory"] != "0") { $userrow["story"] = $monsterrow["newstory"]; } + $userrow["bonusattack"] = 0; + $userrow["bonusdefense"] = 0; // Now we add Per Kill mods. hpgain(); @@ -288,9 +312,9 @@ function youwin() { if (rand(0,7) == 1) { // Grab lots of stuff from the DB. - $preitemsrow = dorow(doquery("SELECT * FROM {{table}} WHERE reqlevel>='".($userrow["level"] - 5)."' AND reqlevel<='".$userrow["level"]."' AND willdrop='1' ORDER BY RAND() LIMIT 1", "itembase")); - $preprefixrow = dorow(doquery("SELECT * FROM {{table}} WHERE reqlevel<='".$userrow["level"]."' ORDER BY RAND() LIMIT 1", "itemprefixes")); - $presuffixrow = dorow(doquery("SELECT * FROM {{table}} WHERE reqlevel<='".$userrow["level"]."' ORDER BY RAND() LIMIT 1", "itemsuffixes")); + $preitemsrow = dorow(doquery("SELECT * FROM <> WHERE reqlevel>='".($userrow["level"] - 5)."' AND reqlevel<='".$userrow["level"]."' AND willdrop='1' ORDER BY RAND() LIMIT 1", "itembase")); + $preprefixrow = dorow(doquery("SELECT * FROM <> WHERE reqlevel<='".$userrow["level"]."' ORDER BY RAND() LIMIT 1", "itemprefixes")); + $presuffixrow = dorow(doquery("SELECT * FROM <> WHERE reqlevel<='".$userrow["level"]."' ORDER BY RAND() LIMIT 1", "itemsuffixes")); $idstring = ""; if (rand(0,4)==1) { $idstring .= $preprefixrow["id"] . ","; } else { $idstring .= "0,"; } @@ -351,7 +375,7 @@ function youlose() { "deathpenalty"=>$userrow["deathpenalty"]); // Then put them in town & reset fight stuff. - $townrow = dorow(doquery("SELECT * FROM {{table}} WHERE world='".$userrow["world"]."' ORDER BY id ASC LIMIT 1", "towns")); + $townrow = dorow(doquery("SELECT * FROM <> WHERE world='".$userrow["world"]."' ORDER BY id ASC LIMIT 1")); $userrow["latitude"] = $townrow["latitude"]; $userrow["longitude"] = $townrow["longitude"]; $userrow["currentaction"] = "In Town"; @@ -359,6 +383,8 @@ function youlose() { $userrow["currentmonsterid"] = 0; $userrow["currentmonsterhp"] = 0; $userrow["currenthp"] = ceil($userrow["maxhp"] / 4); + $userrow["bonusattack"] = 0; + $userrow["bonusdefense"] = 0; // Update. updateuserrow(); diff --git a/fightmods.php b/fightmods.php index fbac85f..db837d7 100644 --- a/fightmods.php +++ b/fightmods.php @@ -61,4 +61,88 @@ function mpgain() { } +function bonusattack() { + + /*********** + Description: Chance to deal extra damage. + Occurs: Per Turn. + Applies To: Player only. + Written By: Anman. + ***********/ + + global $userrow, $fightrow; + + $first = $userrow["bonusattack"] * 0.25; + $sec = $userrow["bonusattack"] * 0.5; + $third = $userrow["bonusattack"] * 0.75; + $rand = rand(0,100); + + if ($rand <= $first) { $multiplier = 2; } + elseif ($rand <= $sec) { $multiplier = 1.75; } + elseif ($rand <= $third) { $multiplier = 1.5; } + elseif ($rand <= $userrow["bonusattack"] && $rand > $third) { $multiplier = 1.25; } + else { $multiplier = 1; } + + $fightrow["playerphysdamage"] = floor($fightrow["playerphysdamage"] * $multiplier); + +} + +function bonusdefense() { + + /*********** + Description: Chance to reduce incurred damage. + Occurs: Per Turn. + Applies To: Player only. + Written By: Anman. + ***********/ + + global $userrow, $fightrow; + + $first = $userrow["bonusdefense"] * 0.25; + $sec = $userrow["bonusdefense"] * 0.5; + $third = $userrow["bonusdefense"] * 0.75; + $rand = rand(0,100); + + if ($rand <= $first) { $multiplier = 0; } + elseif ($rand <= $sec) { $multiplier = 0.25; } + elseif ($rand <= $third) { $multiplier = 0.5; } + elseif ($rand <= $userrow["bonusdefense"] && $rand > $third) { $multiplier = 0.75; } + else { $multiplier = 1; } + + $fightrow["monsterphysdamage"] = floor($fightrow["monsterphysdamage"] * $multiplier); + $fightrow["monstermagicdamage"] = floor($fightrow["monstermagicdamage"] * $multiplier); + $fightrow["monsterfiredamage"] = floor($fightrow["monsterfiredamage"] * $multiplier); + $fightrow["monsterlightdamage"] = floor($fightrow["monsterlightdamage"] * $multiplier); + +} + +function bonusdefense_pvp() { + + /*********** + Description: Chance to reduce incurred damage - PVP version. + Occurs: Per Turn. + Applies To: Player only. + Written By: Anman. + ***********/ + + global $userrow, $monsterrow, $fightrow; + + $first = $monsterrow["bonusdefense"] * 0.25; + $sec = $monsterrow["bonusdefense"] * 0.5; + $third = $monsterrow["bonusdefense"] * 0.75; + $rand = rand(0,100); + + if ($rand <= $first) { $multiplier = 0; } + elseif ($rand <= $sec) { $multiplier = 0.25; } + elseif ($rand <= $third) { $multiplier = 0.5; } + elseif ($rand <= $monsterrow["bonusdefense"] && $rand > $third) { $multiplier = 0.75; } + else { $multiplier = 1; } + + $fightrow["playerphysdamage"] = floor($fightrow["playerphysdamage"] * $multiplier); + $fightrow["playermagicdamage"] = floor($fightrow["playermagicdamage"] * $multiplier); + $fightrow["playerfiredamage"] = floor($fightrow["playerfiredamage"] * $multiplier); + $fightrow["playerlightdamage"] = floor($fightrow["playerlightdamage"] * $multiplier); + +} + ?> \ No newline at end of file diff --git a/globals.php b/globals.php index 5e31e0e..dcfea00 100644 --- a/globals.php +++ b/globals.php @@ -5,7 +5,7 @@ include("config.php"); if (trim($dbsettings["secretword"]) == "") { die("Invalid setting for secretword in config.php. This setting must never be blank."); } // Control row. -$controlrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='1' LIMIT 1", "control")); +$controlrow = dorow(doquery("SELECT * FROM <> WHERE id='1' LIMIT 1")); // Account row. include("cookies.php"); @@ -15,25 +15,25 @@ if ($acctrow != false && $acctrow["characters"] == 0 && substr($_SERVER["REQUEST // User row. if (substr($_SERVER["REQUEST_URI"], -19) != "login.php?do=logout") { - $online = doquery("UPDATE {{table}} SET onlinetime=NOW() WHERE id='".$acctrow["activechar"]."' LIMIT 1", "users"); + $online = doquery("UPDATE <> SET onlinetime=NOW() WHERE id='".$acctrow["activechar"]."' LIMIT 1"); } else { - $online = doquery("UPDATE {{table}} SET onlinetime = DATE_SUB(onlinetime, INTERVAL 11 MINUTE) WHERE id='".$acctrow["activechar"]."' LIMIT 1", "users"); + $online = doquery("UPDATE <> SET onlinetime = DATE_SUB(onlinetime, INTERVAL 11 MINUTE) WHERE id='".$acctrow["activechar"]."' LIMIT 1"); } -$userrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$acctrow["activechar"]."' LIMIT 1", "users")); +$userrow = dorow(doquery("SELECT * FROM <> WHERE id='".$acctrow["activechar"]."' LIMIT 1")); if ($userrow != false) { $userrow = array_map("stripslashes", $userrow); } // World row. -$worldrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["world"]."' LIMIT 1", "worlds")); +$worldrow = dorow(doquery("SELECT * FROM <> WHERE id='".$userrow["world"]."' LIMIT 1")); // Town row. if ($userrow["currentaction"] == "In Town") { - $townrow = dorow(doquery("SELECT * FROM {{table}} WHERE world='".$userrow["world"]."' AND longitude='".$userrow["longitude"]."' AND latitude='".$userrow["latitude"]."' LIMIT 1", "towns")); + $townrow = dorow(doquery("SELECT * FROM <> WHERE world='".$userrow["world"]."' AND longitude='".$userrow["longitude"]."' AND latitude='".$userrow["latitude"]."' LIMIT 1")); } else { $townrow = false; } // Spells. -$spells = dorow(doquery("SELECT * FROM {{table}} ORDER BY id", "spells"), "id"); +$spells = dorow(doquery("SELECT * FROM <> ORDER BY id", "spells"), "id"); // Global fightrow. $fightrow = array( diff --git a/guilds.php b/guilds.php index 22ceaa9..4aa1e7a 100644 --- a/guilds.php +++ b/guilds.php @@ -12,7 +12,7 @@ function guildmain() { if (!isset($_GET["list"])) { guildhome(); } } - $guilds = dorow(doquery("SELECT * FROM {{table}} WHERE isactive='1' ORDER BY honor", "guilds"), "id"); + $guilds = dorow(doquery("SELECT * FROM <> WHERE isactive='1' ORDER BY honor"), "id"); $row["guildlist"] = ""; $bgcolor = "background-color: #ffffff;"; if ($guilds != false) { @@ -35,7 +35,7 @@ function guildhome() { global $userrow, $controlrow; if ($userrow["guild"] == 0) { err("You are not yet a member of any Guild. Please go back and try again."); } - $guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds")); + $guild = dorow(doquery("SELECT * FROM <> WHERE id='".$userrow["guild"]."' LIMIT 1")); if ($guild["lastupdate"] <= (mktime() - ($controlrow["guildupdate"] * 3600))) { $guild = guildupdate(); } @@ -55,7 +55,7 @@ function guildhome() { $pagerow["bank"] = number_format($guild["bank"]); // Pull memberslist for select box. - $members = dorow(doquery("SELECT * FROM {{table}} WHERE guild='".$userrow["guild"]."' ORDER BY guildrank", "users"), "id"); + $members = dorow(doquery("SELECT * FROM <> WHERE guild='".$userrow["guild"]."' ORDER BY guildrank"), "id"); $pagerow["memberselect"] = ""; // Pull applications for selectbox. - $apps = dorow(doquery("SELECT * FROM {{table}} WHERE guild='".$userrow["guild"]."' ORDER BY id", "guildapps"), "id"); + $apps = dorow(doquery("SELECT * FROM <> WHERE guild='".$userrow["guild"]."' ORDER BY id"), "id"); if ($apps != false) { $pagerow["appselect"] = "
Guild Name & TagHonorFunctions
\n"; $bgcolor = "background-color: #ffffff;"; if ($guildmembers != false) { @@ -280,12 +280,12 @@ function guildbank() { global $userrow; extract($_POST); - $guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds")); + $guild = dorow(doquery("SELECT * FROM <> WHERE id='".$userrow["guild"]."' LIMIT 1")); if (isset($_POST["out"])) { - $member = dorow(doquery("SELECT * FROM {{table}} WHERE id='$charid' LIMIT 1", "users")); + $member = dorow(doquery("SELECT * FROM <> WHERE id='$charid' LIMIT 1")); // Errors. if ($userrow["guildrank"] < 4) { err("You do not have permission to distribute Guild funds. Please go back and try again."); } @@ -298,8 +298,8 @@ function guildbank() { if ($member["id"] == $userrow["id"]) { err("You cannot send Guild money to yourself. Please go back and try again."); } // Do stuff. - $send = doquery("INSERT INTO {{table}} SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='$charid', recipientname='".$member["charname"]."', status='0', title='Money from your Guild', message='Your Guild has sent you money from the Guild Bank.

Do not reply to this message!', gold='$gold'", "messages"); - $update = doquery("UPDATE {{table}} SET bank=bank-$gold WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds"); + $send = doquery("INSERT INTO <> SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='$charid', recipientname='".$member["charname"]."', status='0', title='Money from your Guild', message='Your Guild has sent you money from the Guild Bank.

Do not reply to this message!', gold='$gold'"); + $update = doquery("UPDATE <> SET bank=bank-$gold WHERE id='".$userrow["guild"]."' LIMIT 1"); display("Post Office", gettemplate("mailbox_sent")); } elseif (isset($_POST["in"])) { @@ -310,8 +310,8 @@ function guildbank() { if ($_POST["golddeposit"] > $userrow["gold"]) { err("You do not have that much money in your pocket."); } // Do stuff. - $update = doquery("UPDATE {{table}} SET bank=bank+".$_POST["golddeposit"]." WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds"); - $updatemem = doquery("UPDATE {{table}} SET gold=gold-".$_POST["golddeposit"]." WHERE id='".$userrow["id"]."' LIMIT 1", "users"); + $update = doquery("UPDATE <> SET bank=bank+".$_POST["golddeposit"]." WHERE id='".$userrow["guild"]."' LIMIT 1"); + $updatemem = doquery("UPDATE <> SET gold=gold-".$_POST["golddeposit"]." WHERE id='".$userrow["id"]."' LIMIT 1"); display("Guild Bank", "Thank you for depositing money to the Guild Bank.

You may now return to Town or to your Guild Hall."); } @@ -323,8 +323,8 @@ function guildpromote() { global $userrow; extract($_POST); - $guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds")); - $member = dorow(doquery("SELECT * FROM {{table}} WHERE id='$charid' LIMIT 1", "users")); + $guild = dorow(doquery("SELECT * FROM <> WHERE id='".$userrow["guild"]."' LIMIT 1")); + $member = dorow(doquery("SELECT * FROM <> WHERE id='$charid' LIMIT 1")); if (isset($_POST["promote"])) { @@ -336,7 +336,7 @@ function guildpromote() { if ($member["guild"] != $userrow["guild"]) { err("That player is not in your Guild. Please go back and try again."); } // Do stuff. - $update = doquery("UPDATE {{table}} SET guildrank=guildrank+1 WHERE id='$charid' LIMIT 1", "users"); + $update = doquery("UPDATE <> SET guildrank=guildrank+1 WHERE id='$charid' LIMIT 1"); } elseif (isset($_POST["demote"])) { @@ -349,7 +349,7 @@ function guildpromote() { if ($member["guildrank"] == 1) { guildremove(); } // Do stuff. - $update = doquery("UPDATE {{table}} SET guildrank=guildrank-1 WHERE id='$charid' LIMIT 1", "users"); + $update = doquery("UPDATE <> SET guildrank=guildrank-1 WHERE id='$charid' LIMIT 1"); } @@ -362,9 +362,9 @@ function guildapprove() { global $userrow; extract($_POST); - $guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds")); - $member = dorow(doquery("SELECT * FROM {{table}} WHERE id='$charid' LIMIT 1", "users")); - $app = dorow(doquery("SELECT * FROM {{table}} WHERE guild='".$userrow["guild"]."' AND charid='$charid' LIMIT 1", "guildapps")); + $guild = dorow(doquery("SELECT * FROM <> WHERE id='".$userrow["guild"]."' LIMIT 1")); + $member = dorow(doquery("SELECT * FROM <> WHERE id='$charid' LIMIT 1")); + $app = dorow(doquery("SELECT * FROM <> WHERE guild='".$userrow["guild"]."' AND charid='$charid' LIMIT 1")); // Errors. if ($userrow["guildrank"] < 4) { err("You do not have permission to approve new members. Please go back and try again."); } @@ -372,15 +372,15 @@ function guildapprove() { // Do stuff. if (isset($_POST["approve"])) { - $updatemem = doquery("UPDATE {{table}} SET guild='".$userrow["guild"]."', guildrank='1', guildtag='".$guild["tagline"]."', tagcolor='".$guild["color1"]."', namecolor='".$guild["color2"]."' WHERE id='".$app["charid"]."' LIMIT 1", "users"); - $updateguild = doquery("UPDATE {{table}} SET members=members+1 WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds"); - $deleteapp = doquery("DELETE FROM {{table}} WHERE guild='".$userrow["guild"]."' AND charid='$charid' LIMIT 1", "guildapps"); - $send = doquery("INSERT INTO {{table}} SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='$charid', recipientname='".$member["charname"]."', status='0', title='Guild Approval', message='The Guild has approved you for membership, and you are now a member of ".$guild["name"].". Congratulations!

Do not reply to this message!', gold='0'", "messages"); + $updatemem = doquery("UPDATE <> SET guild='".$userrow["guild"]."', guildrank='1', guildtag='".$guild["tagline"]."', tagcolor='".$guild["color1"]."', namecolor='".$guild["color2"]."' WHERE id='".$app["charid"]."' LIMIT 1"); + $updateguild = doquery("UPDATE <> SET members=members+1 WHERE id='".$userrow["guild"]."' LIMIT 1"); + $deleteapp = doquery("DELETE FROM <> WHERE guild='".$userrow["guild"]."' AND charid='$charid' LIMIT 1"); + $send = doquery("INSERT INTO <> SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='$charid', recipientname='".$member["charname"]."', status='0', title='Guild Approval', message='The Guild has approved you for membership, and you are now a member of ".$guild["name"].". Congratulations!

Do not reply to this message!', gold='0'"); guildupdate(); display("Approve Members", "Thank you for approving this user.

You may now return to Town or to your Guild Hall."); } else { - $deleteapp = doquery("DELETE FROM {{table}} WHERE guild='".$userrow["guild"]."' AND charid='$charid' LIMIT 1", "guildapps"); - $send = doquery("INSERT INTO {{table}} SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='$charid', recipientname='".$member["charname"]."', status='0', title='Guild Denial', message='The Guild has denied your application for membership. Sorry.

Do not reply to this message!', gold='0'", "messages"); + $deleteapp = doquery("DELETE FROM <> WHERE guild='".$userrow["guild"]."' AND charid='$charid' LIMIT 1"); + $send = doquery("INSERT INTO <> SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='$charid', recipientname='".$member["charname"]."', status='0', title='Guild Denial', message='The Guild has denied your application for membership. Sorry.

Do not reply to this message!', gold='0'"); display("Approve Members", "Thank you for denying this user.

You may now return to Town or to your Guild Hall."); } @@ -391,14 +391,14 @@ function guildremove() { global $userrow; extract($_POST); - $guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds")); - $member = dorow(doquery("SELECT * FROM {{table}} WHERE id='$charid' LIMIT 1", "users")); + $guild = dorow(doquery("SELECT * FROM <> WHERE id='".$userrow["guild"]."' LIMIT 1")); + $member = dorow(doquery("SELECT * FROM <> WHERE id='$charid' LIMIT 1")); if (isset($_POST["yes"])) { - $update = doquery("UPDATE {{table}} SET members=members-1 WHERE id='".$guild["id"]."' LIMIT 1", "guilds"); - $updatemem = doquery("UPDATE {{table}} SET guild='0', guildrank='0', guildtag='', tagcolor='', namecolor='' WHERE id='$charid' LIMIT 1", "users"); - $send = doquery("INSERT INTO {{table}} SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='$charid', recipientname='".$member["charname"]."', status='0', title='Guild Removal', message='The Guild has removed you from their membership. Sorry.

Do not reply to this message!', gold='0'", "messages"); + $update = doquery("UPDATE <> SET members=members-1 WHERE id='".$guild["id"]."' LIMIT 1"); + $updatemem = doquery("UPDATE <> SET guild='0', guildrank='0', guildtag='', tagcolor='', namecolor='' WHERE id='$charid' LIMIT 1"); + $send = doquery("INSERT INTO <> SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='$charid', recipientname='".$member["charname"]."', status='0', title='Guild Removal', message='The Guild has removed you from their membership. Sorry.

Do not reply to this message!', gold='0'"); guildupdate(); display("Remove Members", "Thank you for removing this user.

You may now return to Town or to your Guild Hall."); @@ -419,14 +419,14 @@ function guildnews() { global $userrow; - $guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds")); + $guild = dorow(doquery("SELECT * FROM <> WHERE id='".$userrow["guild"]."' LIMIT 1")); // Errors. if ($userrow["guildrank"] < 5) { err("You do not have permission to edit Guild news. Please go back and try again."); } if (isset($_POST["submit"])) { - $query = doquery("UPDATE {{table}} SET news='".$_POST["news"]."' WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds"); + $query = doquery("UPDATE <> SET news='".$_POST["news"]."' WHERE id='".$userrow["guild"]."' LIMIT 1"); display("Guild News", "Thank you for updating your Guild News.

You may now return to Town or to your Guild Hall."); } @@ -440,20 +440,20 @@ function guilddisband() { global $userrow; - $guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds")); + $guild = dorow(doquery("SELECT * FROM <> WHERE id='".$userrow["guild"]."' LIMIT 1")); // Errors. if ($userrow["id"] != $guild["founder"]) { err("You do not have permission to disband the Guild. Please go back and try again."); } if (isset($_POST["yes"])) { - $guildmembers = dorow(doquery("SELECT * FROM {{table}} WHERE guild='".$guild["id"]."'", "users"), "id"); + $guildmembers = dorow(doquery("SELECT * FROM <> WHERE guild='".$guild["id"]."'"), "id"); foreach ($guildmembers as $a => $b) { - $send = doquery("INSERT INTO {{table}} SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='".$b["id"]."', recipientname='".$b["charname"]."', status='0', title='Guild Disbanded', message='Your Guild leader has chosen to disband the guild. Your member status has been reset, and you can now apply to join another guild if you wish.

Do not reply to this message!', gold='0'", "messages"); + $send = doquery("INSERT INTO <> SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='".$b["id"]."', recipientname='".$b["charname"]."', status='0', title='Guild Disbanded', message='Your Guild leader has chosen to disband the guild. Your member status has been reset, and you can now apply to join another guild if you wish.

Do not reply to this message!', gold='0'"); } - $updatemem = doquery("UPDATE {{table}} SET guild='0', guildrank='0', guildtag='', tagcolor='', namecolor='' WHERE guild='".$guild["id"]."'", "users"); - $delete = doquery("DELETE FROM {{table}} WHERE id='".$guild["id"]."'", "guilds"); - $deletebb = doquery("DELETE FROM {{table}} WHERE guild='".$guild["id"]."'", "babblebox"); + $updatemem = doquery("UPDATE <> SET guild='0', guildrank='0', guildtag='', tagcolor='', namecolor='' WHERE guild='".$guild["id"]."'"); + $delete = doquery("DELETE FROM <> WHERE id='".$guild["id"]."'"); + $deletebb = doquery("DELETE FROM <> WHERE guild='".$guild["id"]."'"); display("Disband Guild", "Thank you for disbanding your Guild.

You may now return to Town."); } elseif (isset($_POST["no"])) { @@ -474,8 +474,8 @@ function guildleave() { if (isset($_POST["yes"])) { - $updatemem = doquery("UPDATE {{table}} SET guild='0', guildrank='0', guildtag='', tagcolor='', namecolor='' WHERE id='".$userrow["id"]."'", "users"); - $update = doquery("UPDATE {{table}} SET members=members-1 WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds"); + $updatemem = doquery("UPDATE <> SET guild='0', guildrank='0', guildtag='', tagcolor='', namecolor='' WHERE id='".$userrow["id"]."'"); + $update = doquery("UPDATE <> SET members=members-1 WHERE id='".$userrow["guild"]."' LIMIT 1"); guildupdate(); display("Leave Guild", "Thank you for leaving your Guild.

You may now return to Town."); @@ -493,8 +493,8 @@ function guildupdate() { global $userrow; - $guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds")); - $users = dorow(doquery("SELECT * FROM {{table}} WHERE guild='".$userrow["guild"]."'", "users"), "id"); + $guild = dorow(doquery("SELECT * FROM <> WHERE id='".$userrow["guild"]."' LIMIT 1")); + $users = dorow(doquery("SELECT * FROM <> WHERE guild='".$userrow["guild"]."'"), "id"); $honor = $guild["members"]; $totalexp = 0; @@ -506,7 +506,7 @@ function guildupdate() { $honor += floor(sqrt($totalexp)); $lastupdate = mktime(); - $update = doquery("UPDATE {{table}} SET honor='$honor',lastupdate='$lastupdate' WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds"); + $update = doquery("UPDATE <> SET honor='$honor',lastupdate='$lastupdate' WHERE id='".$userrow["guild"]."' LIMIT 1"); // Now update the array and send back to main guild function. $guild["honor"] = $honor; diff --git a/images/Thumbs.db b/images/Thumbs.db index 48ef721..c4981a0 100644 Binary files a/images/Thumbs.db and b/images/Thumbs.db differ diff --git a/lib.php b/lib.php index 08626e9..6a39e12 100644 --- a/lib.php +++ b/lib.php @@ -4,26 +4,53 @@ $starttime = getmicrotime(); $numqueries = 0; $link = opendb(); -$version = "Beta 3"; -$bnumber = "16"; -$bname = "Road Rage"; -$bdate = "4.26.2006"; +$version = "Beta 4"; +$bnumber = "17"; +$bname = "Haiku"; +$bdate = "8.09.2006"; +include("lib2.php"); // Handling for servers with magic_quotes turned on. -// Example from php.net. if (get_magic_quotes_gpc()) { - $_POST = array_map('stripslashes_deep', $_POST); - $_GET = array_map('stripslashes_deep', $_GET); - $_COOKIE = array_map('stripslashes_deep', $_COOKIE); + $_POST = array_map('uber_ss', $_POST); + $_GET = array_map('uber_ss', $_GET); + $_COOKIE = array_map('uber_ss', $_COOKIE); } -$_POST = array_map('addslashes_deep', $_POST); -$_POST = array_map('makesafe', $_POST); -$_GET = array_map('addslashes_deep', $_GET); -$_GET = array_map('makesafe', $_GET); -$_COOKIE = array_map('addslashes_deep', $_COOKIE); -$_COOKIE = array_map('makesafe', $_COOKIE); +$_POST = array_map('uber_mres', $_POST); +$_POST = array_map('uber_hsc', $_POST); +$_GET = array_map('uber_mres', $_GET); +$_GET = array_map('uber_hsc', $_GET); +$_COOKIE = array_map('uber_mres', $_COOKIE); +$_COOKIE = array_map('uber_hsc', $_COOKIE); + +function uber_ss($value) { + + $value = is_array($value) ? + array_map('uber_ss', $value) : + stripslashes($value); + return $value; + +} + +function uber_mres($value) { + + $value = is_array($value) ? + array_map('uber_mres', $value) : + mysql_real_escape_string($value); + return $value; + +} + +function uber_hsc($value) { + + $value = is_array($value) ? + array_map('uber_hsc', $value) : + htmlspecialchars($value); + return $value; + +} function opendb() { // Open database connection. @@ -35,11 +62,16 @@ function opendb() { // Open database connection. } -function doquery($query, $table) { // Something of a tiny little database abstraction layer. +function doquery($query) { // Something of a tiny little database abstraction layer. include('config.php'); - global $numqueries; - $sqlquery = mysql_query(str_replace("{{table}}", $dbsettings["prefix"] . "_" . $table, $query)) or die(mysql_error() . "

$query"); + global $numqueries, $controlrow; + $sqlquery = mysql_query(preg_replace('/<<([a-zA-Z0-9_\-]+)>>/', $dbsettings["prefix"].'_$1', $query)); + + if ($sqlquery == false) { + if ($controlrow["debug"] == 1) { die(mysql_error() . "

" . $query); } else { die("A MySQL query error occurred. Please contact the game administrator for more help."); } + } + $numqueries++; return $sqlquery; @@ -95,18 +127,6 @@ function parsetemplate($template, $array) { // Replace template with proper cont } -function prettydate($uglydate) { // Change the MySQL date format (YYYY-MM-DD) into something friendlier. - - return date("F j, Y", mktime(0,0,0,substr($uglydate, 5, 2),substr($uglydate, 8, 2),substr($uglydate, 0, 4))); - -} - -function prettyforumdate($uglydate) { // Change the MySQL date format (YYYY-MM-DD) into something friendlier. - - return date("F j, Y\<\b\\r \/\>G:i", mktime(0,0,0,substr($uglydate, 5, 2),substr($uglydate, 8, 2),substr($uglydate, 0, 4))); - -} - function getmicrotime() { // Used for timing script operations. list($usec, $sec) = explode(" ",microtime()); @@ -120,36 +140,6 @@ function is_email($email) { // Thanks to "mail(at)philipp-louis.de" from php.net } -function stripslashes_deep($value) { - - $value = is_array($value) ? - array_map('stripslashes_deep', $value) : - stripslashes($value); - return $value; - -} - -function addslashes_deep($value) { - - $value = is_array($value) ? - array_map('addslashes_deep', $value) : - addslashes($value); - return $value; - -} - -function makesafe($d) { - - $d = str_replace("\t","",$d); - $d = str_replace("<","<",$d); - $d = str_replace(">",">",$d); - $d = str_replace("\n","",$d); - $d = str_replace("|","??",$d); - $d = str_replace(" ","  ",$d); - return $d; - -} - function mymail($to, $title, $body, $from = '') { // thanks to arto dot PLEASE dot DO dot NOT dot SPAM at artoaaltonen dot fi. global $controlrow; @@ -188,133 +178,10 @@ function mymail($to, $title, $body, $from = '') { // thanks to arto dot PLEASE d function err($error, $system = false, $panels = true) { // Basic little error handler. display("Error", $error, $panels); -/* - // Don't display major system errors (sql errors). - if ($system == true) { - if ($handle = fopen("errorlog/errorlog.txt", 'a')) { - $written = fwrite($handle, $error."\n"); - fclose($handle); - } - if ($written != false) { - display("Error", "A critical game system error has occurred.

Please have the game administrator check the game error logs and fix the problem.

Please go back and try again."); - } else { - display("Error", "A critical game system error has occurred. Additionally, an error occurred when trying to create a game error log entry. Please have the game administrator check the server logs and fix the problem.

Please go back and try again."); - } - } else { - display("Error", $error); - } -*/ + } -function updateuserrow() { - - global $userrow; - $userrow = array_map("addslashes", $userrow); - - $querystring = ""; - foreach($userrow as $a=>$b) { - $querystring .= "$a='$b',"; - } - $querystring = rtrim($querystring, ","); - - $query = doquery("UPDATE {{table}} SET $querystring WHERE id='".$userrow["id"]."' LIMIT 1", "users"); - -} -function builditem($prefix, $baseitem, $suffix, $modrow) { // Copy of town.php's builditem(). - - global $controlrow, $acctrow, $userrow; - - // First setup the basic item attributes. - $baseitem["baseid"] = $baseitem["id"]; - $baseitem["fullid"] = $baseitem["id"]; - $baseitem["attrtype"] = $modrow[$baseitem["basename"]]["prettyname"]; - $baseitem["basevalue"] = $baseitem["baseattr"]; - $baseitem["image"] = ""; - - // Next give pretty names to any item modifiers. - $baseitem["itemmods"] = ""; - for($j=1; $j<7; $j++) { - if ($baseitem["mod".$j."name"] != "") { - $baseitem["itemmods"] .= $modrow[$baseitem["mod".$j."name"]]["prettyname"] . ": +" . $baseitem["mod".$j."attr"]; - if ($modrow[$baseitem["mod".$j."name"]]["percent"] == 1) { $baseitem["itemmods"] .= "%"; } - $baseitem["itemmods"] .= "
\n"; - } - } - - // Add prefix mods if applicable. - if ($prefix != false) { - $baseitem["fullid"] = $prefix["id"] . "," . $baseitem["fullid"]; - $baseitem["name"] = $prefix["name"] . " " . $baseitem["name"]; - $baseitem["buycost"] += $prefix["buycost"]; - $baseitem["sellcost"] += $prefix["sellcost"]; - $baseitem["reqlevel"] = max($baseitem["reqlevel"], $prefix["reqlevel"]); - $baseitem["reqstrength"] += $prefix["reqstrength"]; - $baseitem["reqenergy"] += $prefix["reqenergy"]; - $baseitem["reqdexterity"] += $prefix["reqdexterity"]; - $baseitem["itemmods"] .= $modrow[$prefix["basename"]]["prettyname"] . ": +" . $prefix["baseattr"]; - if ($modrow[$prefix["basename"]]["percent"] == 1) { $baseitem["itemmods"] .= "%"; } - $baseitem["itemmods"] .= "
\n"; - } else { $baseitem["fullid"] = "0," . $baseitem["fullid"]; } - - // Add suffix mods if applicable. - if ($suffix != false) { - $baseitem["fullid"] .= "," . $suffix["id"]; - $baseitem["name"] .= " " . $suffix["name"]; - $baseitem["buycost"] += $suffix["buycost"]; - $baseitem["sellcost"] += $suffix["sellcost"]; - $baseitem["reqlevel"] = max($baseitem["reqlevel"], $suffix["reqlevel"]); - $baseitem["reqstrength"] += $suffix["reqstrength"]; - $baseitem["reqenergy"] += $suffix["reqenergy"]; - $baseitem["reqdexterity"] += $suffix["reqdexterity"]; - $baseitem["itemmods"] .= $modrow[$suffix["basename"]]["prettyname"] . ": +" . $suffix["baseattr"]; - if ($modrow[$suffix["basename"]]["percent"] == 1) { $baseitem["itemmods"] .= "%"; } - $baseitem["itemmods"] .= "
\n"; - } else { $baseitem["fullid"] .= ",0"; } - - // Check requirements. - $baseitem["requirements"] = true; - if ($baseitem["reqlevel"] == 1) { $baseitem["level"] = ""; } else { - $baseitem["level"] = "Required Level: " . $baseitem["reqlevel"]; - if ($baseitem["reqlevel"] > $userrow["level"]) { - $baseitem["level"] = "".$baseitem["level"].""; - $baseitem["requirements"] = false; - } - $baseitem["level"] .= "
\n"; - } - if ($baseitem["reqstrength"] == 0) { $baseitem["strength"] = ""; } else { - $baseitem["strength"] = "Required Strength: " . $baseitem["reqstrength"]; - if ($baseitem["reqstrength"] > $userrow["strength"]) { - $baseitem["strength"] = "".$baseitem["strength"].""; - $baseitem["requirements"] = false; - } - $baseitem["strength"] .= "
\n"; - } - if ($baseitem["reqdexterity"] == 0) { $baseitem["dexterity"] = ""; } else { - $baseitem["dexterity"] = "Required Dexterity: " . $baseitem["reqdexterity"]; - if ($baseitem["reqdexterity"] > $userrow["dexterity"]) { - $baseitem["dexterity"] = "".$baseitem["dexterity"].""; - $baseitem["requirements"] = false; - } - $baseitem["dexterity"] .= "
\n"; - } - if ($baseitem["reqenergy"] == 0) { $baseitem["energy"] = ""; } else { - $baseitem["energy"] = "Required Energy: " . $baseitem["reqenergy"]; - if ($baseitem["reqenergy"] > $userrow["energy"]) { - $baseitem["energy"] = "".$baseitem["energy"].""; - $baseitem["requirements"] = false; - } - $baseitem["energy"] .= "
\n"; - } - - if ($controlrow["showimages"] == 1) { - $baseitem["image"] = "\"".$baseitem["name"]."\""; - } - - // And send it back. - return $baseitem; - -} function display($title, $content, $panels = true) { // Finalize page and output to browser. @@ -322,7 +189,7 @@ function display($title, $content, $panels = true) { // Finalize page and output global $controlrow, $userrow, $worldrow, $numqueries, $starttime, $version, $build; if (!isset($controlrow)) { - $controlrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='1' LIMIT 1", "control")); + $controlrow = dorow(doquery("SELECT * FROM <> WHERE id='1' LIMIT 1")); } // Make page tags for XHTML validation. @@ -337,10 +204,9 @@ function display($title, $content, $panels = true) { // Finalize page and output $row["pagetitle"] = $title; $row["background"] = "background" . $userrow["world"]; $row["version"] = $version; - $row["numqueries"] = $numqueries; - $row["totaltime"] = round(getmicrotime()-$starttime,4); $row["content"] = $content; if ($controlrow["forumurl"] != "") { $row["forumslink"] = "Support Forums"; } else { $row["forumslink"] = ""; } + if ($controlrow["debug"] == 1) { $row["debug"] = "/ " . $numqueries . " Queries / " . round(getmicrotime()-$starttime,4) . " Seconds"; } else { $row["debug"] = ""; } // Setup for side panels. include("panels.php"); @@ -357,7 +223,25 @@ function display($title, $content, $panels = true) { // Finalize page and output $row["bottomnav"] = ""; } - //if(md5_file("templates/primary.php") != "0aeec5eb64ff875a697142528afe8fc7") { die("Primary template modified. Cannot continue."); } + $page = rtrim($page, "<-!"); + +$page .= << +
+ + + + +
NameRank
+ Version {{version}} {{debug}} + + {{forumslink}} + + Dragon Scourge © by renderse7en +
+
+ +THEVERYENDOFYOU; // Finalize control array for output. $page = parsetemplate($page, $row); diff --git a/lib2.php b/lib2.php new file mode 100644 index 0000000..95275da --- /dev/null +++ b/lib2.php @@ -0,0 +1,117 @@ +$b) { + $querystring .= "$a='$b',"; + } + $querystring = rtrim($querystring, ","); + + $query = doquery("UPDATE <> SET $querystring WHERE id='".$userrow["id"]."' LIMIT 1"); + +} + +function builditem($prefix, $baseitem, $suffix, $modrow) { // Copy of town.php's builditem(). + + global $controlrow, $acctrow, $userrow; + + // First setup the basic item attributes. + $baseitem["baseid"] = $baseitem["id"]; + $baseitem["fullid"] = $baseitem["id"]; + $baseitem["attrtype"] = $modrow[$baseitem["basename"]]["prettyname"]; + $baseitem["basevalue"] = $baseitem["baseattr"]; + $baseitem["image"] = ""; + + // Next give pretty names to any item modifiers. + $baseitem["itemmods"] = ""; + for($j=1; $j<7; $j++) { + if ($baseitem["mod".$j."name"] != "") { + $baseitem["itemmods"] .= $modrow[$baseitem["mod".$j."name"]]["prettyname"] . ": +" . $baseitem["mod".$j."attr"]; + if ($modrow[$baseitem["mod".$j."name"]]["percent"] == 1) { $baseitem["itemmods"] .= "%"; } + $baseitem["itemmods"] .= "
\n"; + } + } + + // Add prefix mods if applicable. + if ($prefix != false) { + $baseitem["fullid"] = $prefix["id"] . "," . $baseitem["fullid"]; + $baseitem["name"] = $prefix["name"] . " " . $baseitem["name"]; + $baseitem["buycost"] += $prefix["buycost"]; + $baseitem["sellcost"] += $prefix["sellcost"]; + $baseitem["reqlevel"] = max($baseitem["reqlevel"], $prefix["reqlevel"]); + $baseitem["reqstrength"] += $prefix["reqstrength"]; + $baseitem["reqenergy"] += $prefix["reqenergy"]; + $baseitem["reqdexterity"] += $prefix["reqdexterity"]; + $baseitem["itemmods"] .= $modrow[$prefix["basename"]]["prettyname"] . ": +" . $prefix["baseattr"]; + if ($modrow[$prefix["basename"]]["percent"] == 1) { $baseitem["itemmods"] .= "%"; } + $baseitem["itemmods"] .= "
\n"; + } else { $baseitem["fullid"] = "0," . $baseitem["fullid"]; } + + // Add suffix mods if applicable. + if ($suffix != false) { + $baseitem["fullid"] .= "," . $suffix["id"]; + $baseitem["name"] .= " " . $suffix["name"]; + $baseitem["buycost"] += $suffix["buycost"]; + $baseitem["sellcost"] += $suffix["sellcost"]; + $baseitem["reqlevel"] = max($baseitem["reqlevel"], $suffix["reqlevel"]); + $baseitem["reqstrength"] += $suffix["reqstrength"]; + $baseitem["reqenergy"] += $suffix["reqenergy"]; + $baseitem["reqdexterity"] += $suffix["reqdexterity"]; + $baseitem["itemmods"] .= $modrow[$suffix["basename"]]["prettyname"] . ": +" . $suffix["baseattr"]; + if ($modrow[$suffix["basename"]]["percent"] == 1) { $baseitem["itemmods"] .= "%"; } + $baseitem["itemmods"] .= "
\n"; + } else { $baseitem["fullid"] .= ",0"; } + + // Check requirements. + $baseitem["requirements"] = true; + if ($baseitem["reqlevel"] == 1) { $baseitem["level"] = ""; } else { + $baseitem["level"] = "Required Level: " . $baseitem["reqlevel"]; + if ($baseitem["reqlevel"] > $userrow["level"]) { + $baseitem["level"] = "".$baseitem["level"].""; + $baseitem["requirements"] = false; + } + $baseitem["level"] .= "
\n"; + } + if ($baseitem["reqstrength"] == 0) { $baseitem["strength"] = ""; } else { + $baseitem["strength"] = "Required Strength: " . $baseitem["reqstrength"]; + if ($baseitem["reqstrength"] > $userrow["strength"]) { + $baseitem["strength"] = "".$baseitem["strength"].""; + $baseitem["requirements"] = false; + } + $baseitem["strength"] .= "
\n"; + } + if ($baseitem["reqdexterity"] == 0) { $baseitem["dexterity"] = ""; } else { + $baseitem["dexterity"] = "Required Dexterity: " . $baseitem["reqdexterity"]; + if ($baseitem["reqdexterity"] > $userrow["dexterity"]) { + $baseitem["dexterity"] = "".$baseitem["dexterity"].""; + $baseitem["requirements"] = false; + } + $baseitem["dexterity"] .= "
\n"; + } + if ($baseitem["reqenergy"] == 0) { $baseitem["energy"] = ""; } else { + $baseitem["energy"] = "Required Energy: " . $baseitem["reqenergy"]; + if ($baseitem["reqenergy"] > $userrow["energy"]) { + $baseitem["energy"] = "".$baseitem["energy"].""; + $baseitem["requirements"] = false; + } + $baseitem["energy"] .= "
\n"; + } + + if ($controlrow["showitemimages"] == 1) { + $baseitem["image"] = "\"".$baseitem["name"]."\""; + } elseif ($controlrow["showitemimages"] == 2) { + $baseitem["image"] = "\"".$baseitem["name"]."\""; + } else { + $baseitem["image"] = ""; + } + + // And send it back. + return $baseitem; + +} + +?> \ No newline at end of file diff --git a/login.php b/login.php index 1a11c7e..b4cc47f 100644 --- a/login.php +++ b/login.php @@ -18,7 +18,7 @@ function login() { // Setup. include("config.php"); extract($_POST); - $query = doquery("SELECT * FROM {{table}} WHERE username='$username' LIMIT 1", "accounts"); + $query = doquery("SELECT * FROM <> WHERE username='$username' LIMIT 1"); $row = dorow($query); // Errors. diff --git a/mailbox.php b/mailbox.php index e71632d..f45795b 100644 --- a/mailbox.php +++ b/mailbox.php @@ -8,7 +8,7 @@ function mailbox() { global $userrow; - $messages = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM {{table}} WHERE recipientid='".$userrow["id"]."' ORDER BY postdate DESC", "messages"), "id"); + $messages = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM <> WHERE recipientid='".$userrow["id"]."' ORDER BY postdate DESC"), "id"); $row["messages"] = "\n"; if ($messages == false) { @@ -30,7 +30,7 @@ function outbox() { global $userrow; - $messages = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM {{table}} WHERE senderid='".$userrow["id"]."' ORDER BY postdate DESC", "messages"), "id"); + $messages = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM <> WHERE senderid='".$userrow["id"]."' ORDER BY postdate DESC"), "id"); $row["messages"] = "
\n"; if ($messages == false) { @@ -51,7 +51,7 @@ function letter() { global $userrow; if (!is_numeric($_GET["id"])) { err("Invalid action. Please go back and try again."); } - $message = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM {{table}} WHERE id='".$_GET["id"]."' LIMIT 1", "messages")); + $message = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM <> WHERE id='".$_GET["id"]."' LIMIT 1")); if ($message == false) { err("Invalid action. Please go back and try again."); } if ($message["recipientid"] != $userrow["id"]) { err("Invalid action. Please go back and try again."); } @@ -65,11 +65,11 @@ function letter() { // Reset status to old, and gold to zero, so they can't keep reading the message to get more money. if ($message["status"] == 0) { - $statusquery = doquery("UPDATE {{table}} SET status='1', gold='0' WHERE id='".$_GET["id"]."' LIMIT 1", "messages"); + $statusquery = doquery("UPDATE <> SET status='1', gold='0' WHERE id='".$_GET["id"]."' LIMIT 1"); } // Pull the sender's userrow so we can show avatars. - $sender = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$message["senderid"]."' LIMIT 1", "users")); + $sender = dorow(doquery("SELECT * FROM <> WHERE id='".$message["senderid"]."' LIMIT 1")); if ($sender["charpicture"] != "") { $message["senderavatar"] = "\"".$sender["charname"]."\""; } else { @@ -86,7 +86,7 @@ function letterout() { global $userrow; if (!is_numeric($_GET["id"])) { err("Invalid action. Please go back and try again."); } - $message = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM {{table}} WHERE id='".$_GET["id"]."' LIMIT 1", "messages")); + $message = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM <> WHERE id='".$_GET["id"]."' LIMIT 1")); if ($message == false) { err("Invalid action. Please go back and try again."); } if ($message["senderid"] != $userrow["id"]) { err("Invalid action. Please go back and try again."); } @@ -105,7 +105,7 @@ function mailnew() { extract($_POST); $errors = 0; $errorlist = ""; if ($userrow["gold"] < 5) { $errors++; $errorlist .= "You do not have enough gold to cover the postage fee.
"; } - $checkuser = dorow(doquery("SELECT * FROM {{table}} WHERE charname='$recipient' LIMIT 1", "users")); + $checkuser = dorow(doquery("SELECT * FROM <> WHERE charname='$recipient' LIMIT 1")); if ($checkuser == false) { $errors++; $errorlist .= "There is no player with that Character Name.
"; } if (trim($gold) != "") { if (!is_numeric($gold)) { $errors++; $errorlist .= "The Send Gold field must be a number.
"; } @@ -124,7 +124,7 @@ function mailnew() { updateuserrow(); // And send the message. - $send = doquery("INSERT INTO {{table}} SET id='', postdate=NOW(), senderid='".$userrow["id"]."', sendername='".$userrow["charname"]."', recipientid='".$checkuser["id"]."', recipientname='$recipient', status='0', title='$title', message='$message', gold='$gold'", "messages"); + $send = doquery("INSERT INTO <> SET id='', postdate=NOW(), senderid='".$userrow["id"]."', sendername='".$userrow["charname"]."', recipientid='".$checkuser["id"]."', recipientname='$recipient', status='0', title='$title', message='$message', gold='$gold'"); display("Post Office", gettemplate("mailbox_sent")); } else { @@ -145,7 +145,7 @@ function mailreply() { global $userrow; if (!is_numeric($_GET["id"])) { err("Invalid action. Please go back and try again."); } - $origmessage = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM {{table}} WHERE id='".$_GET["id"]."' LIMIT 1", "messages")); + $origmessage = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM <> WHERE id='".$_GET["id"]."' LIMIT 1")); if ($origmessage == false) { err("Invalid action. Please go back and try again."); } if ($origmessage["recipientid"] != $userrow["id"]) { err("Invalid action. Please go back and try again."); } @@ -155,7 +155,7 @@ function mailreply() { extract($_POST); $errors = 0; $errorlist = ""; if ($userrow["gold"] < 5) { $errors++; $errorlist .= "You do not have enough gold to cover the postage fee.
"; } - $checkuser = dorow(doquery("SELECT * FROM {{table}} WHERE charname='".$origmessage["sendername"]."' LIMIT 1", "users")); + $checkuser = dorow(doquery("SELECT * FROM <> WHERE charname='".$origmessage["sendername"]."' LIMIT 1")); if ($checkuser == false) { $errors++; $errorlist .= "There is no player with that Character Name.
"; } if (trim($gold) != "") { if (!is_numeric($gold)) { $errors++; $errorlist .= "The Send Gold field must be a number.
"; } @@ -173,7 +173,7 @@ function mailreply() { updateuserrow(); // And send the message. - $send = doquery("INSERT INTO {{table}} SET id='', postdate=NOW(), senderid='".$userrow["id"]."', sendername='".$userrow["charname"]."', recipientid='".$origmessage["senderid"]."', recipientname='".$origmessage["sendername"]."', status='0', title='$title', message='$message', gold='$gold'", "messages"); + $send = doquery("INSERT INTO <> SET id='', postdate=NOW(), senderid='".$userrow["id"]."', sendername='".$userrow["charname"]."', recipientid='".$origmessage["senderid"]."', recipientname='".$origmessage["sendername"]."', status='0', title='$title', message='$message', gold='$gold'"); display("Post Office", gettemplate("mailbox_sent")); } else { @@ -197,7 +197,7 @@ function maildelete() { global $userrow; if (!is_numeric($_GET["id"])) { err("Invalid action. Please go back and try again."); } - $message = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM {{table}} WHERE id='".$_GET["id"]."' LIMIT 1", "messages")); + $message = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM <> WHERE id='".$_GET["id"]."' LIMIT 1")); if ($message == false) { err("Invalid action. Please go back and try again."); } if ($message["recipientid"] != $userrow["id"]) { err("Invalid action. Please go back and try again."); } diff --git a/map.php b/map.php index 4ea6228..0627024 100644 --- a/map.php +++ b/map.php @@ -7,7 +7,7 @@ $perpix = 500 / ($worldrow["size"] * 2); $text = "&"; // First do towns. -$towns = dorow(doquery("SELECT * FROM {{table}} WHERE world='".$worldrow["id"]."'", "towns")); +$towns = dorow(doquery("SELECT * FROM <> WHERE world='".$worldrow["id"]."'")); $text .= "towns=".sizeof($towns)."&"; $count = 0; foreach($towns as $a=>$b) { @@ -31,7 +31,7 @@ $text .= "player_y=".$y."&"; $text .= "player_name=".$userrow["charname"]."&"; // Then do everyone else. -$users = dorow(doquery("SELECT * FROM {{table}} WHERE world='".$worldrow["id"]."' AND UNIX_TIMESTAMP(onlinetime) >= '".(time()-600)."' AND id != '".$userrow["id"]."'", "users"), "id"); +$users = dorow(doquery("SELECT * FROM <> WHERE world='".$worldrow["id"]."' AND UNIX_TIMESTAMP(onlinetime) >= '".(time()-600)."' AND id != '".$userrow["id"]."'"), "id"); $text .= "users=".count($users)."&"; $count = 0; if ($users != false) { diff --git a/mapmini.php b/mapmini.php index 17c10fa..1ae8a6d 100644 --- a/mapmini.php +++ b/mapmini.php @@ -7,7 +7,7 @@ $perpix = 100 / ($worldrow["size"] * 2); $text = "&"; // First do towns. -$towns = dorow(doquery("SELECT * FROM {{table}} WHERE world='".$worldrow["id"]."'", "towns")); +$towns = dorow(doquery("SELECT * FROM <> WHERE world='".$worldrow["id"]."'")); $text .= "towns=".sizeof($towns)."&"; $count = 0; foreach($towns as $a=>$b) { @@ -29,7 +29,7 @@ $text .= "player_x=".$x."&"; $text .= "player_y=".$y."&"; // Then do everyone else. -$users = dorow(doquery("SELECT * FROM {{table}} WHERE world='".$worldrow["id"]."' AND UNIX_TIMESTAMP(onlinetime) >= '".(time()-600)."' AND id != '".$userrow["id"]."'", "users"), "id"); +$users = dorow(doquery("SELECT * FROM <> WHERE world='".$worldrow["id"]."' AND UNIX_TIMESTAMP(onlinetime) >= '".(time()-600)."' AND id != '".$userrow["id"]."'"), "id"); $text .= "users=".count($users)."&"; $count = 0; if ($users != false) { diff --git a/misc.php b/misc.php index 8e2de03..a8580b1 100644 --- a/misc.php +++ b/misc.php @@ -3,7 +3,7 @@ function iddqd() { global $acctrow; - doquery("UPDATE {{table}} SET extra1='1' WHERE id='".$acctrow["id"]."' LIMIT 1", "accounts"); + doquery("UPDATE <> SET extra1='1' WHERE id='".$acctrow["id"]."' LIMIT 1"); $page = "\"Please don't take everything I say so seriously.\"
---Trent Reznor"; display("LMFAO!", $page); @@ -49,14 +49,14 @@ function babblebox2() { // Add new shout. if (trim($_POST["babble"]) != "") { - $insert = doquery("INSERT INTO {{table}} SET id='', posttime=NOW(), charid='".$userrow["id"]."', charname='".$userrow["charname"]."', content='".$_POST["babble"]."' $g2", "babblebox"); + $insert = doquery("INSERT INTO <> SET id='', posttime=NOW(), charid='".$userrow["id"]."', charname='".$userrow["charname"]."', content='".$_POST["babble"]."' $g2"); } // Only keep 20 shouts in DB at any one time. - $check = doquery("SELECT * FROM {{table}} $g", "babblebox"); + $check = doquery("SELECT * FROM <> $g"); if (mysql_num_rows($check) > 20) { - $delete1 = dorow(doquery("SELECT id FROM {{table}} $g ORDER BY id LIMIT 1", "babblebox")); - $delete2 = doquery("DELETE FROM {{table}} WHERE id='".$delete1["id"]."' LIMIT 1", "babblebox"); + $delete1 = dorow(doquery("SELECT id FROM <> $g ORDER BY id LIMIT 1")); + $delete2 = doquery("DELETE FROM <> WHERE id='".$delete1["id"]."' LIMIT 1"); } // And we're done. @@ -64,7 +64,7 @@ function babblebox2() { } - $shouts = dorow(doquery("SELECT * FROM {{table}} $g ORDER BY id LIMIT 20", "babblebox"), "id"); + $shouts = dorow(doquery("SELECT * FROM <> $g ORDER BY id LIMIT 20"), "id"); $row["shouts"] = ""; $background = 1; if ($shouts != false) { diff --git a/panels.php b/panels.php index 2c7a8b2..9f88861 100644 --- a/panels.php +++ b/panels.php @@ -61,7 +61,7 @@ THEVERYENDOFYOU; $townstring .= ") AND world='".$userrow["world"]."'"; // Then we do the query. - $traveltoquery = dorow(doquery("SELECT id,name FROM {{table}} WHERE $townstring ORDER BY id", "towns"), "id"); + $traveltoquery = dorow(doquery("SELECT id,name FROM <> WHERE $townstring ORDER BY id"), "id"); // Finally we build the link list. foreach ($traveltoquery as $a => $b) { @@ -82,13 +82,13 @@ function panelright() { // Babblebox. if ($controlrow["showshout"] == 1) { $row["babblebox"] = "
Babblebox
"; - $row["babblebox"] .= ""; + $row["babblebox"] .= "

"; } // Who's Online. if ($controlrow["showonline"] == 1) { $row["whosonline"] = "
Who's Online
"; - $users = dorow(doquery("SELECT * FROM {{table}} WHERE UNIX_TIMESTAMP(onlinetime) >= '".(time()-600)."'", "users"), "id"); + $users = dorow(doquery("SELECT * FROM <> WHERE UNIX_TIMESTAMP(onlinetime) >= '".(time()-600)."'"), "id"); $number = count($users); $row["whosonline"] .= "There are $number user(s) online within the last 10 minutes: "; foreach ($users as $a => $b) { @@ -113,7 +113,7 @@ function paneltop($loggedin = true) { if ($loggedin == true || isset($acctrow)) { if ($userrow == false) { $userrow["charname"] = "No Characters Yet"; $userrow["guild"] = 0; } - if ($acctrow["authlevel"] == 2) { $admin = " (Admin)"; } else { $admin = ""; } + if ($acctrow["authlevel"] == 255) { $admin = " (Admin)"; } else { $admin = ""; } if ($userrow["guild"] != 0) { $charname = "[".$userrow["guildtag"]."]".$userrow["charname"].""; } else { diff --git a/pvp.php b/pvp.php index 0bc607b..b286ce2 100644 --- a/pvp.php +++ b/pvp.php @@ -13,15 +13,15 @@ donothing(); function donothing() { global $userrow, $monsterrow, $fightrow; - $pvp = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp")); + $pvp = dorow(doquery("SELECT * FROM <> WHERE id='".$userrow["currentpvp"]."' LIMIT 1")); // Check if they need to accept challenge. if ($pvp["accepted"] == 0 && $pvp["player2id"] == $userrow["id"]) { challenged(); } // Check if challenge has been declined. if ($pvp["accepted"] == 2) { - $query = doquery("UPDATE {{table}} SET currentpvp='0',currentaction='In Town' WHERE id='".$userrow["id"]."' LIMIT 1", "users"); - $query = doquery("DELETE FROM {{table}} WHERE id='".$pvp["id"]."' LIMIT 1", "pvp"); + $query = doquery("UPDATE <> SET currentpvp='0',currentaction='In Town' WHERE id='".$userrow["id"]."' LIMIT 1"); + $query = doquery("DELETE FROM <> WHERE id='".$pvp["id"]."' LIMIT 1"); display("Duel Challenge", gettemplate("pvp_declined")); } @@ -39,9 +39,9 @@ function donothing() { function challenged() { global $userrow, $monsterrow, $fightrow; - $pvp = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp")); + $pvp = dorow(doquery("SELECT * FROM <> WHERE id='".$userrow["currentpvp"]."' LIMIT 1")); if ($pvp == false) { die("Location: index.php"); } - $newuserrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$pvp["player1id"]."' LIMIT 1", "users")); + $newuserrow = dorow(doquery("SELECT * FROM <> WHERE id='".$pvp["player1id"]."' LIMIT 1")); if ($newuserrow["charpicture"] != "") { $newuserrow["avatar"] = "\"".$newuserrow["charname"]."\""; @@ -51,14 +51,14 @@ function challenged() { if (isset($_POST["yes"])) { - $query = doquery("UPDATE {{table}} SET accepted='1' WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp"); - $query = doquery("UPDATE {{table}} SET currentaction='Duelling' WHERE id='".$pvp["player1id"]."' OR id='".$pvp["player2id"]."' LIMIT 2", "users"); + $query = doquery("UPDATE <> SET accepted='1' WHERE id='".$userrow["currentpvp"]."' LIMIT 1"); + $query = doquery("UPDATE <> SET currentaction='Duelling' WHERE id='".$pvp["player1id"]."' OR id='".$pvp["player2id"]."' LIMIT 2"); dofight(); } elseif (isset($_POST["no"])) { - $query = doquery("UPDATE {{table}} SET accepted='2',playerturn=player1id WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp"); - $query = doquery("UPDATE {{table}} SET currentaction='In Town', currentpvp='0' WHERE id='".$userrow["id"]."' LIMIT 1", "users"); + $query = doquery("UPDATE <> SET accepted='2',playerturn=player1id WHERE id='".$userrow["currentpvp"]."' LIMIT 1"); + $query = doquery("UPDATE <> SET currentaction='In Town', currentpvp='0' WHERE id='".$userrow["id"]."' LIMIT 1"); display("Duel Challenge",parsetemplate(gettemplate("pvp_decline"),$newuserrow)); } else { @@ -72,13 +72,13 @@ function challenged() { function dowait() { global $userrow, $monsterrow, $fightrow; - $pvp = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp")); + $pvp = dorow(doquery("SELECT * FROM <> WHERE id='".$userrow["currentpvp"]."' LIMIT 1")); // "monsterrow" now becomes the other player's character. if ($pvp["player1id"] == $userrow["id"]) { - $monsterrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$pvp["player2id"]."' LIMIT 1", "users")); + $monsterrow = dorow(doquery("SELECT * FROM <> WHERE id='".$pvp["player2id"]."' LIMIT 1")); } else { - $monsterrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$pvp["player1id"]."' LIMIT 1", "users")); + $monsterrow = dorow(doquery("SELECT * FROM <> WHERE id='".$pvp["player1id"]."' LIMIT 1")); } $pagerow = array( @@ -102,15 +102,15 @@ function dowait() { function dofight() { global $userrow, $monsterrow, $fightrow, $spells; - $pvp = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp")); + $pvp = dorow(doquery("SELECT * FROM <> WHERE id='".$userrow["currentpvp"]."' LIMIT 1")); // "monsterrow" now becomes the other player's character. if ($pvp["player1id"] == $userrow["id"]) { $nextplayer = $pvp["player2id"]; - $monsterrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$pvp["player2id"]."' LIMIT 1", "users")); + $monsterrow = dorow(doquery("SELECT * FROM <> WHERE id='".$pvp["player2id"]."' LIMIT 1")); } else { $nextplayer = $pvp["player1id"]; - $monsterrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$pvp["player1id"]."' LIMIT 1", "users")); + $monsterrow = dorow(doquery("SELECT * FROM <> WHERE id='".$pvp["player1id"]."' LIMIT 1")); } if (isset($_POST["fight"])) { @@ -120,7 +120,7 @@ function dofight() { updateopponent(); $fightrowimploded = $fightrow["playerphysdamage"].",".$fightrow["playermagicdamage"].",".$fightrow["playerfiredamage"].",".$fightrow["playerlightdamage"].",".$fightrow["message"]; - $query = doquery("UPDATE {{table}} SET fightrow='$fightrowimploded', playerturn='$nextplayer' WHERE id='".$pvp["id"]."' LIMIT 1", "pvp"); + $query = doquery("UPDATE <> SET fightrow='$fightrowimploded', playerturn='$nextplayer' WHERE id='".$pvp["id"]."' LIMIT 1"); $pagerow = array( "message"=>$fightrow["message"], @@ -156,7 +156,7 @@ function dofight() { updateopponent(); $fightrowimploded = $fightrow["playerphysdamage"].",".$fightrow["playermagicdamage"].",".$fightrow["playerfiredamage"].",".$fightrow["playerlightdamage"].",".$fightrow["message"]; - $query = doquery("UPDATE {{table}} SET fightrow='$fightrowimploded', playerturn='$nextplayer' WHERE id='".$pvp["id"]."' LIMIT 1", "pvp"); + $query = doquery("UPDATE <> SET fightrow='$fightrowimploded', playerturn='$nextplayer' WHERE id='".$pvp["id"]."' LIMIT 1"); $pagerow = array( "message"=>$fightrow["message"], @@ -255,7 +255,7 @@ function playerturn() { // Chance to make an excellent hit. $toexcellent = rand(0,150); - if ($toexcellent <= sqrt($userrow["strength"])) { + if ($toexcellent <= sqrt($userrow["dexterity"])) { $fightrow["playerphysdamage"] *= 2; $fightrow["playermagicdamage"] *= 2; $fightrow["playerfiredamage"] *= 2; @@ -265,7 +265,7 @@ function playerturn() { // Chance for monster to dodge. $tododge = rand(0,200); - if ($tododge <= sqrt($monsterrow["physdefense"])) { + if ($tododge <= sqrt($monsterrow["dexterity"])) { $fightrow["playerphysdamage"] = 0; $fightrow["playermagicdamage"] = 0; $fightrow["playerfiredamage"] = 0; @@ -274,6 +274,8 @@ function playerturn() { } // Now we add Per Turn mods. + bonusattack(); + bonusdefense_pvp(); hpleech("player"); mpleech("player"); @@ -285,7 +287,7 @@ function playerturn() { function youwin() { global $userrow, $monsterrow, $fightrow; - $pvp = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp")); + $pvp = dorow(doquery("SELECT * FROM <> WHERE id='".$userrow["currentpvp"]."' LIMIT 1")); // "monsterrow" now becomes the other player's character. if ($pvp["player1id"] == $userrow["id"]) { @@ -299,6 +301,8 @@ function youwin() { $userrow["currentaction"] = "In Town"; $userrow["currentfight"] = 0; $userrow["currentpvp"] = 0; + $userrow["bonusattack"] = 0; + $userrow["bonusdefense"] = 0; // Now we add Per Kill mods. hpgain(); @@ -311,7 +315,7 @@ function youwin() { updateopponent(); updateuserrow(); $fightrowimploded = $fightrow["playerphysdamage"].",".$fightrow["playermagicdamage"].",".$fightrow["playerfiredamage"].",".$fightrow["playerlightdamage"].",".$fightrow["message"]; - $query = doquery("UPDATE {{table}} SET fightrow='$fightrowimploded', playerturn='$nextplayer' WHERE id='".$pvp["id"]."' LIMIT 1", "pvp"); + $query = doquery("UPDATE <> SET fightrow='$fightrowimploded', playerturn='$nextplayer' WHERE id='".$pvp["id"]."' LIMIT 1"); // And we're done. $pagerow = array( @@ -336,12 +340,12 @@ function youwin() { function youlose() { global $userrow, $monsterrow, $fightrow; - $pvp = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp")); + $pvp = dorow(doquery("SELECT * FROM <> WHERE id='".$userrow["currentpvp"]."' LIMIT 1"")); if ($pvp["player1id"] == $userrow["id"]) { - $monsterrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$pvp["player2id"]."' LIMIT 1", "users")); + $monsterrow = dorow(doquery("SELECT * FROM <> WHERE id='".$pvp["player2id"]."' LIMIT 1")); } else { - $monsterrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$pvp["player1id"]."' LIMIT 1", "users")); + $monsterrow = dorow(doquery("SELECT * FROM <> WHERE id='".$pvp["player1id"]."' LIMIT 1")); } $tempfightrow = explode(",",$pvp["fightrow"]); @@ -356,10 +360,12 @@ function youlose() { $userrow["currentfight"] = 0; $userrow["currentpvp"] = 0; $userrow["currenthp"] = ceil($userrow["maxhp"] / 4); + $userrow["bonusattack"] = 0; + $userrow["bonusdefense"] = 0; // Update. updateuserrow(); - $query = doquery("DELETE FROM {{table}} WHERE id='".$pvp["id"]."' LIMIT 1", "pvp"); + $query = doquery("DELETE FROM <> WHERE id='".$pvp["id"]."' LIMIT 1"); // And we're done. $pagerow = array( @@ -391,7 +397,7 @@ function updateopponent() { } $querystring = rtrim($querystring, ","); - $query = doquery("UPDATE {{table}} SET $querystring WHERE id='".$monsterrow["id"]."' LIMIT 1", "users"); + $query = doquery("UPDATE <> SET $querystring WHERE id='".$monsterrow["id"]."' LIMIT 1"); } diff --git a/pvpmini.php b/pvpmini.php index 08b2e8c..3827e49 100644 --- a/pvpmini.php +++ b/pvpmini.php @@ -4,22 +4,22 @@ include("lib.php"); include("globals.php"); global $userrow, $controlrow; -$row = dorow(doquery("SELECT *,UNIX_TIMESTAMP(turntime) as fturntime FROM {{table}} WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp")); +$row = dorow(doquery("SELECT *,UNIX_TIMESTAMP(turntime) as fturntime FROM <> WHERE id='".$userrow["currentpvp"]."' LIMIT 1")); // Check for timeout. if ($row["fturntime"] < (time() - $controlrow["pvptimeout"])) { // If the PVP was accepted, whoever timed out loses. if ($row["accepted"] == 1) { - $monsterrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$row["player2id"]."' LIMIT 1", "users")); + $monsterrow = dorow(doquery("SELECT * FROM <> WHERE id='".$row["player2id"]."' LIMIT 1")); if ($monsterrow["level"] > $userrow["pvphighest"]) { $highest = ", pvphighest='".$monsterrow["level"]."'"; } else { $highest = ""; } - doquery("UPDATE {{table}} SET currentpvp='0', currentaction='In Town', pvpwins = pvpwins + 1 $highest WHERE id='".$row["player1id"]."' LIMIT 1", "users"); - doquery("UPDATE {{table}} SET currentpvp='0', currentaction='In Town', pvplosses = pvplosses + 1 WHERE id='".$row["player2id"]."' LIMIT 1", "users"); + doquery("UPDATE <> SET currentpvp='0', currentaction='In Town', pvpwins = pvpwins + 1 $highest WHERE id='".$row["player1id"]."' LIMIT 1"); + doquery("UPDATE <> SET currentpvp='0', currentaction='In Town', pvplosses = pvplosses + 1 WHERE id='".$row["player2id"]."' LIMIT 1"); } else { - doquery("UPDATE {{table}} SET currentpvp='0', currentaction='In Town' WHERE id='".$row["player1id"]."' OR id='".$row["player2id"]."' LIMIT 2", "users"); + doquery("UPDATE <> SET currentpvp='0', currentaction='In Town' WHERE id='".$row["player1id"]."' OR id='".$row["player2id"]."' LIMIT 2"); } - $query2 = doquery("DELETE FROM {{table}} WHERE id='".$row["id"]."'", "pvp"); + $query2 = doquery("DELETE FROM <> WHERE id='".$row["id"]."'"); $pagerow["content"] = "The other player did not respond and this Duel has timed out. Thanks for playing.

This window will refresh to the main screen in ".$controlrow["pvprefresh"]." seconds."; $pagerow["target"] = "_top"; $pagerow["parentreload"] = "onload=\"setTimeout('top.location.href=\'index.php\'',".($controlrow["pvprefresh"] * 1000).")\""; diff --git a/scripts/tooltip.js b/scripts/tooltip.js new file mode 100644 index 0000000..d9317b8 --- /dev/null +++ b/scripts/tooltip.js @@ -0,0 +1,10 @@ +// Extended Tooltip Javascript +// copyright 9th August 2002, 3rd July 2005 +// by Stephen Chapman, Felgall Pty Ltd + +// permission is granted to use this javascript provided that the below code is not altered +var DH = 0;var an = 0;var al = 0;var ai = 0;if (document.getElementById) {ai = 1; DH = 1;}else {if (document.all) {al = 1; DH = 1;} else { browserVersion = parseInt(navigator.appVersion); if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)) {an = 1; DH = 1;}}} function fd(oi, wS) {if (ai) return wS ? document.getElementById(oi).style:document.getElementById(oi); if (al) return wS ? document.all[oi].style: document.all[oi]; if (an) return document.layers[oi];} +function pw() {return window.innerWidth != null? window.innerWidth: document.body.clientWidth != null? document.body.clientWidth:null;} +function mouseX(evt) {if (evt.pageX) return evt.pageX; else if (evt.clientX)return evt.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); else return null;} +function mouseY(evt) {if (evt.pageY) return evt.pageY; else if (evt.clientY)return evt.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); else return null;} +function popUp(evt,oi) {if (DH) {var wp = pw(); ds = fd(oi,1); dm = fd(oi,0); st = ds.visibility; if (dm.offsetWidth) ew = dm.offsetWidth; else if (dm.clip.width) ew = dm.clip.width; if (st == "visible" || st == "show") { ds.visibility = "hidden"; } else {tv = mouseY(evt) + 20; lv = mouseX(evt) - (ew/4); if (lv < 2) lv = 2; else if (lv + ew > wp) lv -= ew/2; if (!an) {lv += 'px';tv += 'px';} ds.left = lv; ds.top = tv; ds.visibility = "visible";}}} \ No newline at end of file diff --git a/spells.php b/spells.php index eaf111e..d21befc 100644 --- a/spells.php +++ b/spells.php @@ -94,4 +94,80 @@ function prism($id) { } +// Mad crazy ninja love to Anman for writing this spell. I've cleaned it up a bit to match the format of the rest of the code, but it's his spell. +function blessedstrike($id) { + + global $userrow, $monsterrow, $fightrow, $spells; + $failed = 0; + if ($userrow["currentmp"] < $spells[$id]["mp"]) { $return = "Spell Failed: You do not have enough MP to cast that spell.
"; $failed = 1; } + + if ($failed == 0) { + + //now define the power of the spell. you can stack these spells, but the more you try to stack it the harder it will be to get a decent number out of the stack. Now, this spell is more of a bonus to a player compared to the defence spell. So for this reason, the ratio of stacking has been decreased from 100 to 90 and the minimum % to take of the spell is now 10% instead of 20%. + $userrow["currentmp"] -= $spells[$id]["mp"]; + if ($userrow["bonusattack"] == 0) { + $userrow["bonusattack"] = $spells[$id]["value"]; + } else { + //if a more powerful inc attack spell is cast, replace the old value with the new one + if ($userrow["bonusattack"] < $spells[$id]["value"]) { + $userrow["bonusattack"] = $spells[$id]["value"]; + } else { + //if the same or a weaker spell is cast, determine the maximum stack number and then apply.. + $newattmax = ((90 - $userrow["bonusattack"])+1) / 90; + if ($newattmax < 0.1) { $newattmax = 0.1;} + $newattmax = $spells[$id]["value"] * $newattmax; + $newattmax = floor($newattmax); + if ($newattmax < 1) { $newattmax = 1;} + if ($spells[$id]["value"] > $newattmax) {$spells[$id]["value"] = $newattmax;} + $userrow["bonusattack"] = $userrow["bonusattack"] + $spells[$id]["value"]; + } + if ($userrow["bonusattack"] > 200) { $userrow["bonusattack"] = 200; } + // *2 damage delt will never go above 50% chance. *1.75 damage will always be 50% + } + + $return = $userrow["charname"] . " casts " . $spells[$id]["name"] . ". Future attacks will be more powerful!
"; + + } + + return($return); + +} + +// Mad crazy ninja love to Anman for writing this spell. I've cleaned it up a bit to match the format of the rest of the code, but it's his spell. +function stoneskin($id) { + + global $userrow, $monsterrow, $fightrow, $spells; + $failed = 0; + if ($userrow["currentmp"] < $spells[$id]["mp"]) { $return = "Spell Failed: You do not have enough MP to cast that spell.
"; $failed = 1; } + + if ($failed ==0 ) { + + //now define the power of the spell. you can stack these spells, but the more you try to stack it the harder it will be to get a decent number out of the stack. The max will always be 100. This is because the spell works with percentages and 100 will always be the highest. + $userrow["currentmp"] -= $spells[$id]["mp"]; + if ($userrow["bonusdefence"] == 0) { + $userrow["bonusdefence"] = $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"]; + } else { + //if the same or a weaker spell is cast, determine the maximum stack number and then apply.. + $newdefmax = ((100 - $userrow["bonusdefence"])+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"]; + } + if ($userrow["bonusdefence"] > 200) { $userrow["bonusdefence"] = 200;} + // all damage will never go above 50% chance. 0.25% damage will always be 50% + } + + $return = $userrow["charname"] . " casts " . $spells[$id]["name"] . ". Damage taken will be reduced!
"; + + } + return($return); +} + ?> \ No newline at end of file diff --git a/story.php b/story.php index ca54471..3dcde28 100644 --- a/story.php +++ b/story.php @@ -3,7 +3,7 @@ include("lib.php"); include("globals.php"); -$story = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["story"]."' LIMIT 1", "story")); +$story = dorow(doquery("SELECT * FROM <> WHERE id='".$userrow["story"]."' LIMIT 1")); // Decide which type of story to run. if ($story["targetmonster"] != "0") { storymonster(); } @@ -17,7 +17,7 @@ function storyteleport() { // Sends to a new location, or just displays a chunk if (isset($_POST["submit"])) { if ($story["nextstory"] != "0") { - $nextstory = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$story["nextstory"]."' LIMIT 1", "story")); + $nextstory = dorow(doquery("SELECT * FROM <> WHERE id='".$story["nextstory"]."' LIMIT 1")); $userrow["story"] = $nextstory["id"]; $userrow["storylat"] = $nextstory["latitude"]; $userrow["storylon"] = $nextstory["longitude"]; @@ -41,7 +41,7 @@ function storyteleport() { // Sends to a new location, or just displays a chunk $story["reward"] = ""; if ($story["rewardname"] != "") { - $premodrow = dorow(doquery("SELECT * FROM {{table}} ORDER BY id","itemmodnames")); + $premodrow = dorow(doquery("SELECT * FROM <> ORDER BY id")); foreach($premodrow as $a=>$b) { $modrow[$b["fieldname"]] = $b; } @@ -62,9 +62,9 @@ function storymonster() { if (isset($_POST["submit"])) { - $monster = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$story["targetmonster"]."' LIMIT 1", "monsters")); + $monster = dorow(doquery("SELECT * FROM <> WHERE id='".$story["targetmonster"]."' LIMIT 1")); $querystring = "currentmonsterid='".$monster["id"]."', currentmonsterhp='".(ceil(rand($monster["maxhp"] * .75, $monster["maxhp"]) * $userrow["difficulty"]))."', currentaction='Fighting'"; - $update = doquery("UPDATE {{table}} SET $querystring WHERE id='".$userrow["id"]."' LIMIT 1", "users"); + $update = doquery("UPDATE <> SET $querystring WHERE id='".$userrow["id"]."' LIMIT 1"); die(header("Location: fight.php")); } @@ -78,23 +78,23 @@ function storyitem() { global $userrow, $story; - $premodrow = dorow(doquery("SELECT * FROM {{table}} ORDER BY id","itemmodnames")); + $premodrow = dorow(doquery("SELECT * FROM <> ORDER BY id")); foreach($premodrow as $a=>$b) { $modrow[$b["fieldname"]] = $b; } $thenewitem = explode(",",$story["targetitem"]); - $newitem = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$thenewitem[1]."' LIMIT 1", "itembase")); - $newprefix = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$thenewitem[0]."' LIMIT 1", "itemprefixes")); - $newsuffix = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$thenewitem[2]."' LIMIT 1", "itemsuffixes")); + $newitem = dorow(doquery("SELECT * FROM <> WHERE id='".$thenewitem[1]."' LIMIT 1")); + $newprefix = dorow(doquery("SELECT * FROM <> WHERE id='".$thenewitem[0]."' LIMIT 1")); + $newsuffix = dorow(doquery("SELECT * FROM <> WHERE id='".$thenewitem[2]."' LIMIT 1")); $newfullitem = builditem($newprefix, $newitem, $newsuffix, $modrow); $story["itemtable"] = parsetemplate(gettemplate("explore_drop_itemrow"), $newfullitem); if ($userrow["item".$newitem["slotnumber"]."idstring"] != "0") { $theolditem = explode(",",$userrow["item".$newitem["slotnumber"]."idstring"]); - $olditem = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$theolditem[1]."' LIMIT 1", "itembase")); - $oldprefix = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$theolditem[0]."' LIMIT 1", "itemprefixes")); - $oldsuffix = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$theolditem[2]."' LIMIT 1", "itemsuffixes")); + $olditem = dorow(doquery("SELECT * FROM <> WHERE id='".$theolditem[1]."' LIMIT 1")); + $oldprefix = dorow(doquery("SELECT * FROM <> WHERE id='".$theolditem[0]."' LIMIT 1")); + $oldsuffix = dorow(doquery("SELECT * FROM <> WHERE id='".$theolditem[2]."' LIMIT 1")); $oldfullitem = builditem($oldprefix, $olditem, $oldsuffix, $modrow); $story["olditems"] = parsetemplate(gettemplate("town_buy_olditemrow"), $oldfullitem); } else { @@ -142,7 +142,7 @@ function storyitem() { } if ($story["nextstory"] != "0") { - $nextstory = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$story["nextstory"]."' LIMIT 1", "story")); + $nextstory = dorow(doquery("SELECT * FROM <> WHERE id='".$story["nextstory"]."' LIMIT 1")); $userrow["story"] = $nextstory["id"]; $userrow["storylat"] = $nextstory["latitude"]; $userrow["storylon"] = $nextstory["longitude"]; @@ -167,7 +167,7 @@ function storyitem() { if (isset($_POST["noitem"])) { if ($story["nextstory"] != "0") { - $nextstory = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$story["nextstory"]."' LIMIT 1", "story")); + $nextstory = dorow(doquery("SELECT * FROM <> WHERE id='".$story["nextstory"]."' LIMIT 1")); $userrow["story"] = $nextstory["id"]; $userrow["storylat"] = $nextstory["latitude"]; $userrow["storylon"] = $nextstory["longitude"]; @@ -191,7 +191,7 @@ function storyitem() { $story["reward"] = ""; if ($story["rewardname"] != "") { - $premodrow = dorow(doquery("SELECT * FROM {{table}} ORDER BY id","itemmodnames")); + $premodrow = dorow(doquery("SELECT * FROM <> ORDER BY id")); foreach($premodrow as $a=>$b) { $modrow[$b["fieldname"]] = $b; } diff --git a/templates/panels_right.php b/templates/panels_right.php index 4c1ac01..b8bab45 100644 --- a/templates/panels_right.php +++ b/templates/panels_right.php @@ -2,7 +2,6 @@ $template = <<
{{whosonline}} END; diff --git a/templates/primary.php b/templates/primary.php index 1a01e4b..a833c3a 100644 --- a/templates/primary.php +++ b/templates/primary.php @@ -14,21 +14,10 @@ Thank you. $template = << {{gamename}} :: {{pagetitle}} + +
@@ -63,21 +52,6 @@ a:hover { color: #663300; }
{{bottomnav}}
- - - - - - -
- Version {{version}} / {{numqueries}} Queries / {{totaltime}} Seconds - - {{forumslink}} - - Dragon Scourge © by renderse7en -
- - END; ?> \ No newline at end of file diff --git a/templates/users_levelup1.php b/templates/users_levelup1.php index a2b2ecb..7517188 100644 --- a/templates/users_levelup1.php +++ b/templates/users_levelup1.php @@ -4,7 +4,8 @@ $template = <<
Class: {{classname}}
Damage Per Strength: {{damageperstrength}}
-HP Per Dexterity: {{hpperdexterity}}
+Defense Per Dexterity: {{defenseperdex}}
+HP Per Life: {{hpperlife}}
MP Per Energy: {{mpperenergy}}

You have {{levelup}} point(s) to spend.

diff --git a/town.php b/town.php index 92b0c79..c1d5774 100644 --- a/town.php +++ b/town.php @@ -7,7 +7,7 @@ if ($townrow == false) { die(header("Location: index.php")); } function dotown() { // Default town screen. global $userrow; - $newpm = doquery("SELECT * FROM {{table}} WHERE recipientid='".$userrow["id"]."' AND status='0'", "messages"); + $newpm = doquery("SELECT * FROM <> WHERE recipientid='".$userrow["id"]."' AND status='0'"); if (mysql_num_rows($newpm) > 0) { $row["unread"] = "(".mysql_num_rows($newpm)." new)"; } else { @@ -32,7 +32,7 @@ function inn() { // Resting at the inn restores hp/mp/tp. $userrow["currentmp"] = $userrow["maxmp"]; $userrow["currenttp"] = $userrow["maxtp"]; $userrow["gold"] -= $townrow["innprice"]; - $query = doquery("UPDATE {{table}} SET currenthp='".$userrow["maxhp"]."', currentmp='".$userrow["maxmp"]."', currenttp='".$userrow["maxtp"]."', gold='".$userrow["gold"]."' WHERE id='".$userrow["id"]."' LIMIT 1", "users"); + $query = doquery("UPDATE <> SET currenthp='".$userrow["maxhp"]."', currentmp='".$userrow["maxmp"]."', currenttp='".$userrow["maxtp"]."', gold='".$userrow["gold"]."' WHERE id='".$userrow["id"]."' LIMIT 1"); display("Rest at the Inn", gettemplate("town_inn2")); } elseif (isset($_POST["abortmission"])) { die(header("Location: index.php")); } @@ -47,7 +47,7 @@ function map() { // Buy maps to towns for the Travel To menu. if (isset($_POST["three"])) { - $townquery = doquery("SELECT * FROM {{table}} WHERE id='".$_POST["id"]."' LIMIT 1", "towns"); + $townquery = doquery("SELECT * FROM <> WHERE id='".$_POST["id"]."' LIMIT 1"); $townrow = dorow($townquery); if ($userrow["gold"] < $townrow["mapprice"]) { err("You do not have enough gold to buy this map. Please go back and try again."); } @@ -55,7 +55,7 @@ function map() { // Buy maps to towns for the Travel To menu. if ($townrow != false) { $userrow["townslist"] .= "," . $townrow["id"]; $userrow["gold"] -= $townrow["mapprice"]; - $query = doquery("UPDATE {{table}} SET townslist='".$userrow["townslist"]."', gold='".$userrow["gold"]."' WHERE id='".$userrow["id"]."' LIMIT 1", "users"); + $query = doquery("UPDATE <> SET townslist='".$userrow["townslist"]."', gold='".$userrow["gold"]."' WHERE id='".$userrow["id"]."' LIMIT 1"); display("Buy Maps", gettemplate("town_map3")); } else { err("Invalid action. Please go back and try again."); @@ -63,7 +63,7 @@ function map() { // Buy maps to towns for the Travel To menu. } elseif (isset($_POST["two"])) { - $townquery = doquery("SELECT * FROM {{table}} WHERE name='".$_POST["two"]."' LIMIT 1", "towns"); + $townquery = doquery("SELECT * FROM <> WHERE name='".$_POST["two"]."' LIMIT 1"); $townrow = dorow($townquery); if ($userrow["gold"] < $townrow["mapprice"]) { err("You do not have enough gold to buy this map. Please go back and try again."); } @@ -76,7 +76,7 @@ function map() { // Buy maps to towns for the Travel To menu. } else { - $townquery = doquery("SELECT * FROM {{table}} WHERE world='".$userrow["world"]."' ORDER BY id", "towns"); + $townquery = doquery("SELECT * FROM <> WHERE world='".$userrow["world"]."' ORDER BY id"); $townrow = dorow($townquery); $townslist = explode(",",$userrow["townslist"]); @@ -116,10 +116,10 @@ function buy() { // Buy items from merchants. foreach($idstring as $a=>$b) { if(!is_numeric($b)) { err("Invalid action. Please go back and try again."); } } // Get database info on new item. - $newbaseitem = dorow(doquery("SELECT * FROM {{table}} WHERE id='$idstring[1]' LIMIT 1", "itembase")); - $newprefix = dorow(doquery("SELECT * FROM {{table}} WHERE id='$idstring[0]' LIMIT 1", "itemprefixes")); - $newsuffix = dorow(doquery("SELECT * FROM {{table}} WHERE id='$idstring[2]' LIMIT 1", "itemsuffixes")); - $premodrow = dorow(doquery("SELECT * FROM {{table}} ORDER BY id","itemmodnames")); + $newbaseitem = dorow(doquery("SELECT * FROM <> WHERE id='$idstring[1]' LIMIT 1")); + $newprefix = dorow(doquery("SELECT * FROM <> WHERE id='$idstring[0]' LIMIT 1")); + $newsuffix = dorow(doquery("SELECT * FROM <> WHERE id='$idstring[2]' LIMIT 1")); + $premodrow = dorow(doquery("SELECT * FROM <> ORDER BY id")); // Format the mod name row. foreach($premodrow as $a=>$b) { @@ -132,9 +132,9 @@ function buy() { // Buy items from merchants. if ($userrow["item" . $newbaseitem["slotnumber"] . "idstring"] != "0") { $oldidstring = explode(",",$userrow["item" . $newbaseitem["slotnumber"] . "idstring"]); - $oldbaseitem = dorow(doquery("SELECT * FROM {{table}} WHERE id='$oldidstring[1]' LIMIT 1", "itembase")); - $oldprefix = dorow(doquery("SELECT * FROM {{table}} WHERE id='$oldidstring[0]' LIMIT 1", "itemprefixes")); - $oldsuffix = dorow(doquery("SELECT * FROM {{table}} WHERE id='$oldidstring[2]' LIMIT 1", "itemsuffixes")); + $oldbaseitem = dorow(doquery("SELECT * FROM <> WHERE id='$oldidstring[1]' LIMIT 1")); + $oldprefix = dorow(doquery("SELECT * FROM <> WHERE id='$oldidstring[0]' LIMIT 1")); + $oldsuffix = dorow(doquery("SELECT * FROM <> WHERE id='$oldidstring[2]' LIMIT 1")); $oldfullitem = builditem($oldprefix, $oldbaseitem, $oldsuffix, $modrow); } else { $oldfullitem = false; $oldprefix = false; $oldsuffix = false; } @@ -189,10 +189,10 @@ function buy() { // Buy items from merchants. foreach($idstring as $a=>$b) { if(!is_numeric($b)) { err("Invalid action. Please go back and try again."); } } // Get database info on new item. - $newbaseitem = dorow(doquery("SELECT * FROM {{table}} WHERE id='$idstring[1]' LIMIT 1", "itembase")); - $newprefix = dorow(doquery("SELECT * FROM {{table}} WHERE id='$idstring[0]' LIMIT 1", "itemprefixes")); - $newsuffix = dorow(doquery("SELECT * FROM {{table}} WHERE id='$idstring[2]' LIMIT 1", "itemsuffixes")); - $premodrow = dorow(doquery("SELECT * FROM {{table}} ORDER BY id","itemmodnames")); + $newbaseitem = dorow(doquery("SELECT * FROM <> WHERE id='$idstring[1]' LIMIT 1")); + $newprefix = dorow(doquery("SELECT * FROM <> WHERE id='$idstring[0]' LIMIT 1")); + $newsuffix = dorow(doquery("SELECT * FROM <> WHERE id='$idstring[2]' LIMIT 1")); + $premodrow = dorow(doquery("SELECT * FROM <> ORDER BY id")); // Format the mod name row. foreach($premodrow as $a=>$b) { @@ -205,9 +205,9 @@ function buy() { // Buy items from merchants. if ($userrow["item" . $newbaseitem["slotnumber"] . "idstring"] != "0") { $oldidstring = explode(",",$userrow["item" . $newbaseitem["slotnumber"] . "idstring"]); - $oldbaseitem = dorow(doquery("SELECT * FROM {{table}} WHERE id='$oldidstring[1]' LIMIT 1", "itembase")); - $oldprefix = dorow(doquery("SELECT * FROM {{table}} WHERE id='$oldidstring[0]' LIMIT 1", "itemprefixes")); - $oldsuffix = dorow(doquery("SELECT * FROM {{table}} WHERE id='$oldidstring[2]' LIMIT 1", "itemsuffixes")); + $oldbaseitem = dorow(doquery("SELECT * FROM <> WHERE id='$oldidstring[1]' LIMIT 1")); + $oldprefix = dorow(doquery("SELECT * FROM <> WHERE id='$oldidstring[0]' LIMIT 1")); + $oldsuffix = dorow(doquery("SELECT * FROM <> WHERE id='$oldidstring[2]' LIMIT 1")); $oldfullitem = builditem($oldprefix, $oldbaseitem, $oldsuffix, $modrow); } else { $oldfullitem = false; } @@ -232,13 +232,13 @@ function buy() { // Buy items from merchants. } else { // Grab lots of stuff from the DB. - $preitemsrow = dorow(doquery("SELECT * FROM {{table}} WHERE reqlevel>='".$townrow["itemminlvl"]."' AND reqlevel<='".$townrow["itemmaxlvl"]."' ORDER BY RAND() LIMIT 10 ", "itembase")); - $preprefixrow = dorow(doquery("SELECT * FROM {{table}} WHERE reqlevel<='".$userrow["level"]."'", "itemprefixes")); - $presuffixrow = dorow(doquery("SELECT * FROM {{table}} WHERE reqlevel<='".$userrow["level"]."'", "itemsuffixes")); - $allitemsrow = dorow(doquery("SELECT * FROM {{table}}", "itembase")); - $allprefixrow = dorow(doquery("SELECT * FROM {{table}}", "itemprefixes")); - $allsuffixrow = dorow(doquery("SELECT * FROM {{table}}", "itemsuffixes")); - $premodrow = dorow(doquery("SELECT * FROM {{table}} ORDER BY id","itemmodnames")); + $preitemsrow = dorow(doquery("SELECT * FROM <> WHERE reqlevel>='".$townrow["itemminlvl"]."' AND reqlevel<='".$townrow["itemmaxlvl"]."' ORDER BY RAND() LIMIT 10")); + $preprefixrow = dorow(doquery("SELECT * FROM <> WHERE reqlevel<='".$userrow["level"]."'")); + $presuffixrow = dorow(doquery("SELECT * FROM <> WHERE reqlevel<='".$userrow["level"]."'")); + $allitemsrow = dorow(doquery("SELECT * FROM <>")); + $allprefixrow = dorow(doquery("SELECT * FROM <>")); + $allsuffixrow = dorow(doquery("SELECT * FROM <>")); + $premodrow = dorow(doquery("SELECT * FROM <> ORDER BY id")); // Format the rows. foreach($allitemsrow as $a=>$b) { @@ -306,7 +306,7 @@ function gamble() { // Bet amount errors. if (trim($amount) == "") { err("Invalid bet amount. Please go back and try again."); } if (!is_numeric($amount)) { err("Invalid bet amount. Please go back and try again."); } - if ($amount < 0) { err("Invalid bet amount. Please go back and try again."); } + if ($amount <= 0) { err("Invalid bet amount. Please go back and try again."); } if ($userrow["gold"] < $amount) { err("Invalid bet amount. Please go back and try again."); } if ($mode == "hard") { @@ -316,11 +316,11 @@ function gamble() { if ($thecup == $thewin) { $userrow["gold"] += ($amount * 10); - doquery("UPDATE {{table}} SET gold=gold+($amount * 10) WHERE id='".$userrow["id"]."' LIMIT 1", "users"); + doquery("UPDATE <> SET gold=gold+($amount * 10) WHERE id='".$userrow["id"]."' LIMIT 1"); display("Gamble", "You won!

You just picked up ".($amount * 10)." Gold.

Care to try again or would you rather go back to town?"); } else { $userrow["gold"] -= $amount; - doquery("UPDATE {{table}} SET gold=gold-$amount WHERE id='".$userrow["id"]."' LIMIT 1", "users"); + doquery("UPDATE <> SET gold=gold-$amount WHERE id='".$userrow["id"]."' LIMIT 1"); display("Gamble", "You lost!

Sorry buddy, but we're gonna have to take your ".$amount." Gold.

Care to try again or would you rather go back to town?"); } @@ -333,11 +333,11 @@ function gamble() { if ($thecup == $thewin) { $userrow["gold"] += ($amount * 2); - doquery("UPDATE {{table}} SET gold=gold+($amount * 2) WHERE id='".$userrow["id"]."' LIMIT 1", "users"); + doquery("UPDATE <> SET gold=gold+($amount * 2) WHERE id='".$userrow["id"]."' LIMIT 1"); display("Gamble", "You won!

You just picked up ".($amount * 2)." Gold.

Care to try again or would you rather go back to town?"); } else { $userrow["gold"] -= $amount; - doquery("UPDATE {{table}} SET gold=gold-$amount WHERE id='".$userrow["id"]."' LIMIT 1", "users"); + doquery("UPDATE <> SET gold=gold-$amount WHERE id='".$userrow["id"]."' LIMIT 1"); display("Gamble", "You lost!

Sorry buddy, but we're gonna have to take your ".$amount." Gold.

Care to try again or would you rather go back to town?"); } @@ -425,7 +425,7 @@ function bank() { function halloffame() { - $top = dorow(doquery("SELECT *, DATE_FORMAT(birthdate, '%m.%d.%Y') AS fregdate FROM {{table}} ORDER BY experience DESC LIMIT 25", "users"), "id"); + $top = dorow(doquery("SELECT *, DATE_FORMAT(birthdate, '%m.%d.%Y') AS fregdate FROM <> ORDER BY experience DESC LIMIT 25"), "id"); $row["halltable"] = ""; $i = 1; @@ -455,7 +455,7 @@ function duel() { global $userrow; - $row = dorow(doquery("SELECT * FROM {{table}} WHERE UNIX_TIMESTAMP(onlinetime) >= '".(time()-600)."' AND world='".$userrow["world"]."' AND latitude='".$userrow["latitude"]."' AND longitude='".$userrow["longitude"]."' AND id !='".$userrow["id"]."' ORDER BY id", "users"), "id"); + $row = dorow(doquery("SELECT * FROM <> WHERE UNIX_TIMESTAMP(onlinetime) >= '".(time()-600)."' AND world='".$userrow["world"]."' AND latitude='".$userrow["latitude"]."' AND longitude='".$userrow["longitude"]."' AND id !='".$userrow["id"]."' ORDER BY id"), "id"); $list = ""; if ($row == false) { @@ -483,7 +483,7 @@ function duelchallenge() { if(isset($_GET["uid"])) { if (!is_numeric($_GET["uid"])) { err("Invalid UID."); } if ($_GET["uid"] == $userrow["id"]) { err("You cannot duel yourself."); } - $newuserrow = dorow(doquery("SELECT *,UNIX_TIMESTAMP(onlinetime) as fonlinetime FROM {{table}} WHERE id='".$_GET["uid"]."' LIMIT 1", "users")); + $newuserrow = dorow(doquery("SELECT *,UNIX_TIMESTAMP(onlinetime) as fonlinetime FROM <> WHERE id='".$_GET["uid"]."' LIMIT 1")); if ($newuserrow == false) { err("That user doesn't exist."); } if ($newuserrow["account"] == $userrow["account"]) { err("You cannot duel another character on your own account."); } if ($newuserrow["fonlinetime"] <= (time() - 600)) { err("That user is not online."); } @@ -492,8 +492,8 @@ function duelchallenge() { } else { err("Invalid UID."); } // No errors, so create the PVP record and update everyone's userrow. - $query = doquery("INSERT INTO {{table}} SET id='',player1id='".$userrow["id"]."',player2id='".$newuserrow["id"]."',player1name='".$userrow["charname"]."',player2name='".$newuserrow["charname"]."',playerturn='".$newuserrow["id"]."',turntime=NOW(),fightrow=''","pvp"); - $query2 = doquery("UPDATE {{table}} SET currentpvp='".mysql_insert_id()."' WHERE id='".$newuserrow["id"]."' OR id='".$userrow["id"]."' LIMIT 2", "users"); + $query = doquery("INSERT INTO <> SET id='',player1id='".$userrow["id"]."',player2id='".$newuserrow["id"]."',player1name='".$userrow["charname"]."',player2name='".$newuserrow["charname"]."',playerturn='".$newuserrow["id"]."',turntime=NOW(),fightrow=''"); + $query2 = doquery("UPDATE <> SET currentpvp='".mysql_insert_id()."' WHERE id='".$newuserrow["id"]."' OR id='".$userrow["id"]."' LIMIT 2"); display("Duel Challenge",parsetemplate(gettemplate("pvp_challenge"),$newuserrow)); } diff --git a/users.php b/users.php index 4bc88e3..0e1a42a 100644 --- a/users.php +++ b/users.php @@ -39,7 +39,7 @@ function register() { // Process username. if (trim($username) == "") { $errors++; $errorlist .= "Username field is required.
"; } if (preg_match("/[^A-z0-9_\-]/", $username)==1) { $errors++; $errorlist .= "Username must be alphanumeric.
"; } // Thanks to "Carlos Pires" from php.net! - $usernamequery = doquery("SELECT username FROM {{table}} WHERE username='$username' LIMIT 1","accounts"); + $usernamequery = doquery("SELECT username FROM <> WHERE username='$username' LIMIT 1"); if (mysql_num_rows($usernamequery) > 0) { $errors++; $errorlist .= "Username already taken - unique username required.
"; } // Process password. @@ -52,7 +52,7 @@ function register() { if (trim($email1) == "") { $errors++; $errorlist .= "Email field is required.
"; } if ($email1 != $email2) { $errors++; $errorlist .= "Emails don't match.
"; } if (! is_email($email1)) { $errors++; $errorlist .= "Email isn't valid.
"; } - $emailquery = doquery("SELECT emailaddress FROM {{table}} WHERE emailaddress='$email1' LIMIT 1","accounts"); + $emailquery = doquery("SELECT emailaddress FROM <> WHERE emailaddress='$email1' LIMIT 1"); if (mysql_num_rows($emailquery) > 0) { $errors++; $errorlist .= "Email already taken - unique email address required.
"; } // Process other stuff. @@ -72,7 +72,7 @@ function register() { } // Now update. - $query = doquery("INSERT INTO {{table}} SET id='',regdate=NOW(),regip='".$_SERVER["REMOTE_ADDR"]."',verifycode='$verifycode',username='$username',password='$password',emailaddress='$email1',language='English',imageformat='$imageformat', minimap='$minimap'", "accounts") or die(mysql_error()); + $query = doquery("INSERT INTO <> SET id='',regdate=NOW(),regip='".$_SERVER["REMOTE_ADDR"]."',verifycode='$verifycode',username='$username',password='$password',emailaddress='$email1',language='English',imageformat='$imageformat', minimap='$minimap'") or die(mysql_error()); // Send confirmation email if necessary. if ($controlrow["verifyemail"] == 1) { @@ -134,7 +134,7 @@ function profile() { // Setup for viewing other people's profiles. if(isset($_GET["uid"])) { if (!is_numeric($_GET["uid"])) { err("Invalid UID."); } - $newuserrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$_GET["uid"]."' LIMIT 1", "users")); + $newuserrow = dorow(doquery("SELECT * FROM <> WHERE id='".$_GET["uid"]."' LIMIT 1")); if ($newuserrow == false) { err("No such UID."); } $template = "users_onlinechar"; } @@ -187,7 +187,7 @@ function profile() { if ($newuserrow["levelup"] != 0 || $newuserrow["levelspell"] != 0) { $newuserrow["levelpointscharnotice"] = "You have Level/Spell Points available."; } else { $newuserrow["levelpointscharnotice"] = ""; } // Class. - $class = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["charclass"]."' LIMIT 1", "classes")); + $class = dorow(doquery("SELECT * FROM <> WHERE id='".$newuserrow["charclass"]."' LIMIT 1")); $newuserrow["charclass"] = $class["name"]; display("Extended Profile",parsetemplate(gettemplate($template),$newuserrow)); @@ -216,7 +216,7 @@ function settings() { // Process email address. if (trim($email) == "") { $errors++; $errorlist .= "Email field is required.
"; } if (! is_email($email)) { $errors++; $errorlist .= "Email isn't valid.
"; } - $emailquery = doquery("SELECT emailaddress FROM {{table}} WHERE emailaddress='$email' AND id != '".$acctrow["id"]."' LIMIT 1","accounts"); + $emailquery = doquery("SELECT emailaddress FROM <> WHERE emailaddress='$email' AND id != '".$acctrow["id"]."' LIMIT 1"); if (mysql_num_rows($emailquery) > 0) { $errors++; $errorlist .= "Email already taken - unique email address required.
"; } // Process other stuff. @@ -225,7 +225,7 @@ function settings() { if ($errors == 0) { - $query = doquery("UPDATE {{table}} SET $password emailaddress='$email', imageformat='$imageformat', minimap='$minimap' WHERE id='".$acctrow["id"]."' LIMIT 1", "accounts"); + $query = doquery("UPDATE <> SET $password emailaddress='$email', imageformat='$imageformat', minimap='$minimap' WHERE id='".$acctrow["id"]."' LIMIT 1"); if (isset($newpass)) { setcookie("scourge", "", (time()-3600), "/", "", 0); @@ -269,10 +269,10 @@ function characters() { // Change the active character for the account. if (!is_numeric($_POST["makeactive"])) { err("Invalid UID."); } - $newuserrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$_POST["makeactive"]."' LIMIT 1", "users")); + $newuserrow = dorow(doquery("SELECT * FROM <> WHERE id='".$_POST["makeactive"]."' LIMIT 1")); if ($newuserrow == false) { err("No such UID."); } if ($newuserrow["account"] != $acctrow["id"]) { err("You don't own that UID."); } - $setnewchar = doquery("UPDATE {{table}} SET activechar='".$_POST["makeactive"]."' WHERE id='".$acctrow["id"]."' LIMIT 1", "accounts"); + $setnewchar = doquery("UPDATE <> SET activechar='".$_POST["makeactive"]."' WHERE id='".$acctrow["id"]."' LIMIT 1"); die(header("Location: users.php?do=characters")); } @@ -290,7 +290,7 @@ function characters() { } else { $row["newcharlink"] = ""; } // Grab characters. - $charrow = dorow(doquery("SELECT *, DATE_FORMAT(birthdate, '%m.%d.%Y') AS fregdate FROM {{table}} WHERE account='".$acctrow["id"]."' ORDER BY birthdate", "users"), "id"); + $charrow = dorow(doquery("SELECT *, DATE_FORMAT(birthdate, '%m.%d.%Y') AS fregdate FROM <> WHERE account='".$acctrow["id"]."' ORDER BY birthdate"), "id"); foreach($charrow as $a=>$b) { @@ -348,7 +348,7 @@ function charnew() { // Process charname. if (trim($charname) == "") { $errors++; $errorlist .= "Character Name field is required.
"; } if (preg_match("/[^A-z\ 0-9_\-]/", $charname)==1) { $errors++; $errorlist .= "Character names can only contain letters, numbers, spaces and hyphens.
"; } // Thanks to "Carlos Pires" from php.net! - $characternamequery = doquery("SELECT charname FROM {{table}} WHERE charname='$charname' LIMIT 1","users"); + $characternamequery = doquery("SELECT charname FROM <> WHERE charname='$charname' LIMIT 1"); if (mysql_num_rows($characternamequery) > 0) { $errors++; $errorlist .= "Character Name already taken - unique Character Name required.
"; } // Upload new charpicture, if required. @@ -379,13 +379,13 @@ function charnew() { // Get bonuses and multipliers from classes/difficulties tables. $expbonus = 0; $goldbonus = 0; - $classes = dorow(doquery("SELECT * FROM {{table}} WHERE id='$charclass' LIMIT 1", "classes")); + $classes = dorow(doquery("SELECT * FROM <> WHERE id='$charclass' LIMIT 1")); if ($classes != false) { $expbonus += $classes["expbonus"]; $goldbonus += $classes["goldbonus"]; } else { $errors++; $errorlist .= "Invalid character class"; } - $difficulties = dorow(doquery("SELECT * FROM {{table}} WHERE id='$difficulty' LIMIT 1", "difficulties")); + $difficulties = dorow(doquery("SELECT * FROM <> WHERE id='$difficulty' LIMIT 1")); if ($difficulties != false) { $expbonus += $difficulties["expbonus"]; $goldbonus += $difficulties["goldbonus"]; @@ -396,13 +396,13 @@ function charnew() { if ($errors == 0) { // Now everything's cool. Create new character row. - $query = doquery("INSERT INTO {{table}} SET id='', account='".$acctrow["id"]."', birthdate=NOW(), lastip='".$_SERVER["REMOTE_ADDR"]."', onlinetime=NOW(), charname='$charname', charpicture='$newcharpicture', charclass='$charclass', difficulty='$difficulty', deathpenalty='$deathpenalty', expbonus='$expbonus', goldbonus='$goldbonus'", "users"); + $query = doquery("INSERT INTO <> SET id='', account='".$acctrow["id"]."', birthdate=NOW(), lastip='".$_SERVER["REMOTE_ADDR"]."', onlinetime=NOW(), charname='$charname', charpicture='$newcharpicture', charclass='$charclass', difficulty='$difficulty', deathpenalty='$deathpenalty', expbonus='$expbonus', goldbonus='$goldbonus'"); // Update account row. $default = ""; if (isset($setdefault)) { $default = "activechar='".mysql_insert_id()."', "; } if ($acctrow["characters"] == 0) { $default = "activechar='".mysql_insert_id()."', "; } - $query2 = doquery("UPDATE {{table}} SET $default characters=characters+1 WHERE id='".$acctrow["id"]."' LIMIT 1", "accounts"); + $query2 = doquery("UPDATE <> SET $default characters=characters+1 WHERE id='".$acctrow["id"]."' LIMIT 1"); // And we're finished. die(header("Location: users.php?do=characters")); @@ -421,15 +421,17 @@ function charnew() { } - $classes = dorow(doquery("SELECT * FROM {{table}} ORDER BY id", "classes")); + $classes = dorow(doquery("SELECT * FROM <> ORDER BY id")); $row["charclass"] = ""; $row["classdesc"] = ""; + $count = 1; foreach($classes as $a=>$b) { $row["charclass"] .= ""; - $row["classdesc"] .= "".$b["name"]." | "; + $row["classdesc"] .= "
".$b["description"]."
".$b["name"]." | "; + $count++; } $row["classdesc"] = rtrim($row["classdesc"], " |"); - $difficulty = dorow(doquery("SELECT * FROM {{table}} ORDER BY id", "difficulties")); + $difficulty = dorow(doquery("SELECT * FROM <> ORDER BY id")); $row["difficulty"] = ""; foreach($difficulty as $a=>$b) { $row["difficulty"] .= ""; @@ -448,7 +450,7 @@ function charedit() { // Change the active character for the account. if (!is_numeric($_GET["uid"])) { err("Invalid UID."); } - $newuserrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$_GET["uid"]."' LIMIT 1", "users")); + $newuserrow = dorow(doquery("SELECT * FROM <> WHERE id='".$_GET["uid"]."' LIMIT 1")); if ($newuserrow == false) { err("No such UID."); } if ($newuserrow["account"] != $acctrow["id"]) { err("You don't own that UID."); } @@ -483,7 +485,7 @@ function charedit() { } // Now everything's cool. - $query = doquery("UPDATE {{table}} SET charpicture='$newcharpicture' WHERE id='".$newuserrow["id"]."' LIMIT 1", "users"); + $query = doquery("UPDATE <> SET charpicture='$newcharpicture' WHERE id='".$newuserrow["id"]."' LIMIT 1"); die(header("Location: users.php?do=characters")); } elseif (isset($_POST["delete"])) { @@ -494,11 +496,11 @@ function charedit() { } elseif (isset($_POST["ultrakill"])) { // First we delete the char. - $query = doquery("DELETE FROM {{table}} WHERE id='".$newuserrow["id"]."'", "users"); + $query = doquery("DELETE FROM <> WHERE id='".$newuserrow["id"]."'"); // Then we gotta update acctrow accordingly. - $query2 = dorow(doquery("SELECT * FROM {{table}} WHERE account='".$acctrow["id"]."' ORDER BY id LIMIT 1", "users")); - $query3 = doquery("UPDATE {{table}} SET characters=characters-1, activechar='".$query2["id"]."' WHERE id='".$acctrow["id"]."' LIMIT 1", "accounts"); + $query2 = dorow(doquery("SELECT * FROM <> WHERE account='".$acctrow["id"]."' ORDER BY id LIMIT 1")); + $query3 = doquery("UPDATE <> SET characters=characters-1, activechar='".$query2["id"]."' WHERE id='".$acctrow["id"]."' LIMIT 1"); die(header("Location: users.php?do=characters")); } elseif (isset($_POST["wimpout"])) { @@ -518,7 +520,7 @@ function levelup() { if ($userrow["levelup"] == 0) { err("You do not currently have any Level Points to spend."); } - $classrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["charclass"]."' LIMIT 1", "classes")); + $classrow = dorow(doquery("SELECT * FROM <> WHERE id='".$userrow["charclass"]."' LIMIT 1")); if (isset($_POST["submit"])) { @@ -542,8 +544,13 @@ function levelup() { break; case "dex": $userrow["dexterity"]++; - $userrow["maxhp"] += (1 * $classrow["hpperdexterity"]); - $userrow["currenthp"] += (1 * $classrow["hpperdexterity"]); + $userrow["physdefense"] += (1 * $classrow["defenseperdex"]); + $userrow["levelup"]--; + break; + case "lif": + $userrow["life"]++; + $userrow["maxhp"] += (1 * $classrow["hpperlife"]); + $userrow["currenthp"] += (1 * $classrow["hpperlife"]); $userrow["levelup"]--; break; case "enr": @@ -559,6 +566,7 @@ function levelup() { // Round down any fractions. $userrow["physattack"] = floor($userrow["physattack"]); + $userrow["physdefense"] = floor($userrow["physdefense"]); $userrow["maxhp"] = floor($userrow["maxhp"]); $userrow["maxmp"] = floor($userrow["maxmp"]); @@ -570,11 +578,12 @@ function levelup() { $row["dropdowns"] = ""; for($i=0; $i<$userrow["levelup"]; $i++) { - $row["dropdowns"] .= "
\n"; + $row["dropdowns"] .= "
\n"; } $row["classname"] = $classrow["name"]; $row["damageperstrength"] = $classrow["damageperstrength"]; - $row["hpperdexterity"] = $classrow["hpperdexterity"]; + $row["defenseperdex"] = $classrow["defenseperdex"]; + $row["hpperlife"] = $classrow["hpperlife"]; $row["mpperenergy"] = $classrow["mpperenergy"]; $row["levelup"] = $userrow["levelup"]; diff --git a/verify.php b/verify.php index 4c24dd0..368d82d 100644 --- a/verify.php +++ b/verify.php @@ -6,11 +6,11 @@ if (isset($_GET["code"])) { $code = $_GET["code"]; } else { die("Invalid account verification code."); } -$query = doquery("SELECT * FROM {{table}} WHERE verifycode='$code' LIMIT 1", "accounts"); +$query = doquery("SELECT * FROM <> WHERE verifycode='$code' LIMIT 1"); if (mysql_num_rows($query) != 1) { die("Invalid account verification code."); } else { - $update = doquery("UPDATE {{table}} SET verifycode='1' WHERE verifycode='$code' LIMIT 1", "accounts"); + $update = doquery("UPDATE <> SET verifycode='1' WHERE verifycode='$code' LIMIT 1"); } display("Account Verification",gettemplate("users_verified"), false);