Beta 2 Build 12
12.10.2005 - Build 12 (Eggs): - Members can now leave the Guild without requiring an officer to demote them to zero. - Rank 5 members can now edit/update Guild settings. - # of Members is now set to 1 when a Guild is created, and updated correctly when an application is approved. - The Guild founder is now notified via the Post Office when someone applies to join. - Members can now arbitrarily deposit money to the Guild bank. - You can no longer send guild money to yourself. Checks and balances, man! - Fixed image format selection so that it actually works. - Removed Language selection from account registration/settings.
140
changelog.txt
Normal file
|
@ -0,0 +1,140 @@
|
||||||
|
DRAGON SCOURGE
|
||||||
|
Changelog
|
||||||
|
|
||||||
|
***** BETA TWO *****
|
||||||
|
12.10.2005 - Build 12 (Eggs):
|
||||||
|
- Members can now leave the Guild without requiring an officer to demote them to zero.
|
||||||
|
- Rank 5 members can now edit/update Guild settings.
|
||||||
|
- # of Members is now set to 1 when a Guild is created, and updated correctly when an application is approved.
|
||||||
|
- The Guild founder is now notified via the Post Office when someone applies to join.
|
||||||
|
- Members can now arbitrarily deposit money to the Guild bank.
|
||||||
|
- You can no longer send guild money to yourself. Checks and balances, man!
|
||||||
|
- Fixed image format selection so that it actually works.
|
||||||
|
- Removed Language selection from account registration/settings.
|
||||||
|
|
||||||
|
12.02.2005 - Build 11 (Chopsticks):
|
||||||
|
- Added guilds/clans.
|
||||||
|
- Fixed bug with 0 or 1 shouts.
|
||||||
|
- Removed an unused table row from extended profile.
|
||||||
|
- Users can now select PNG or GIF formats for item/monster images in their Account Settings.
|
||||||
|
- Added $controlrow option to enable/disable item/monster images (setting up for the Premium/Standard versions).
|
||||||
|
- New set of item images in town (to replace the ones I stole from Diablo II).
|
||||||
|
- Items in town are now created based on min/max levels for the town, instead of the user's exact level.
|
||||||
|
- Greatly expanded the list of base items.
|
||||||
|
- Fighting now has chances for excellent hit (double damage) and monster dodging (zero damage).
|
||||||
|
|
||||||
|
|
||||||
|
***** BETA ONE *****
|
||||||
|
|
||||||
|
11.10.2005 - Build 10 (Fingers):
|
||||||
|
- Map image has now been replaced with a fully dynamic Flash movie to prevent cache issues.
|
||||||
|
- Babblebox now refreshes itself every 45 seconds.
|
||||||
|
|
||||||
|
11.07.2005 - Build 09 (Billiards):
|
||||||
|
- Fixed spell return bug that would cause SQL errors in PVP.
|
||||||
|
- Removed hard-coded avatar image sizes.
|
||||||
|
- Fixed the "death by 0hp monster" bug.
|
||||||
|
- Fixed reply bug in the Post Office.
|
||||||
|
- Post Office should now check for sent gold AND postage when calculating for the error message.
|
||||||
|
- Entering pvp.php and ending up in the dowait() function properly shows fightrow variables.
|
||||||
|
- Monsters no longer have magic defense. (This is for balance testing. Some monsters will still end up with some eventually.)
|
||||||
|
|
||||||
|
11.02.2005 - Build 08 (Magic):
|
||||||
|
- Spending level points now increments current hp/mp as well as max hp/mp.
|
||||||
|
- Improved error handling in users.php.
|
||||||
|
- Character creation screen now properly displays max avatar filesize.
|
||||||
|
- Challenging for duels is now moved to town.php, so that pvp.php can *never* run without a valid currentpvp number in $userrow.
|
||||||
|
- You no longer get stranded in the duel screen if the other player declines the challenge.
|
||||||
|
- You can no longer challenge yourself (or any other character on your account) to a duel.
|
||||||
|
- The "No" button on the Inn screen now works properly.
|
||||||
|
- Removed "jewel" slot from onlinechar, since jewels are not currently implemented.
|
||||||
|
- Shields and helmets now display properly in profile and onlinechar.
|
||||||
|
- $controlrow is now properly retrieved while a user is not logged in.
|
||||||
|
- Hall of Fame experience points are now run through number_format().
|
||||||
|
- Fixed addslashes_deep() to actually add slashes, instead of strip them.
|
||||||
|
|
||||||
|
10.24.2005 - Build 07 (Lucky):
|
||||||
|
- Increased error checking to prevent pvp.php from running without the proper variables in place.
|
||||||
|
- Closed up travel/map loophole that lets you jump to places without owning the map.
|
||||||
|
- Fixed a possible error in an empty Post Office outbox.
|
||||||
|
- All "Please go back and try again" error messages now link back to index.php.
|
||||||
|
- Avatar system changes:
|
||||||
|
* External avatars are no longer allowed.
|
||||||
|
* Max avatar size (bytes) is now a changeable controlrow variable.
|
||||||
|
* Uploading a new avatar now deletes your old one to save server space.
|
||||||
|
* File extensions are no longer case sensitive.
|
||||||
|
- Botcheck system changes:
|
||||||
|
* Closed up loophole that let you keep exploring without verifying the image text.
|
||||||
|
* Images are now generated with random filenames to prevent old images from showing up.
|
||||||
|
* Images are now deleted after successful verification.
|
||||||
|
|
||||||
|
10.22.2005 - Build 06 (Courtney):
|
||||||
|
- Added Spells.
|
||||||
|
- Added PVP.
|
||||||
|
- Various minor bugfixes/changes that I can't remember cuz I wasn't updating this as I went along.
|
||||||
|
- Intra-account money transfers are limited to 10% of the user's gold.
|
||||||
|
- Increased size of pop-up map.
|
||||||
|
|
||||||
|
***** ALPHA TWO *****
|
||||||
|
|
||||||
|
5.6.2005 - Build 05 (Lifesavers):
|
||||||
|
- Added live image map with town/player locations.
|
||||||
|
- Added Babblebox.
|
||||||
|
- Added Who's Online.
|
||||||
|
- Fixed improper table with for IE6.
|
||||||
|
- Moved the scrollable div tag into the primary template and out of the sub templates.
|
||||||
|
- Removed a possible infinite loop in the anti-macro function.
|
||||||
|
- Added "Return to [Town|Game]" links to the templates that were missing them.
|
||||||
|
- Fixed a problem with the Top 10 list if there was only one character in the game.
|
||||||
|
- Character names are (once again) limited to alphanumerics, to prevent annoying database issues. (Regex has been altered to allow spaces & hyphens, though.)
|
||||||
|
|
||||||
|
4.23.2005 - Build 04 (Golf):
|
||||||
|
- Added image-based compass navigation.
|
||||||
|
- Fights happen slightly less often now (1/5 rather than 1/4).
|
||||||
|
- Added anti-macro image verification for protection against space robots.
|
||||||
|
|
||||||
|
4.1.2005 - Build 03 (Holy Hand Grenade):
|
||||||
|
- Fixed problem that prevented users from registering.
|
||||||
|
- Fixed exploit in the Bank and Post Office that allowed users to withdraw/deposit/send negative numbers.
|
||||||
|
- Added God Mode cheat: index.php?do=iddqd
|
||||||
|
|
||||||
|
3.29.2005 - Build 02 (Loser):
|
||||||
|
- Characters are now separated from Accounts, to allow multiple chars (4) on one account.
|
||||||
|
- Added account settings (changing password/email/language).
|
||||||
|
- Increased security on POST/GET/COOKIE arrays.
|
||||||
|
- You can no longer send a Letter to yourself.
|
||||||
|
|
||||||
|
3.28.2005 - Build 01 (Binary):
|
||||||
|
- Fixed shield/helmet item slot number mixup.
|
||||||
|
- Fixed rounding problem when applying gold/exp bonuses.
|
||||||
|
- Fixed Level Points template problem.
|
||||||
|
- Added the Hall of Fame (Top 10 list).
|
||||||
|
- Added the Post Office (private messaging + money transfers).
|
||||||
|
|
||||||
|
3.25.2005 - Build 00 (MI5):
|
||||||
|
- Complete ground-up rewrite. Build numbers reset to 00. Everything is new again.
|
||||||
|
|
||||||
|
|
||||||
|
***** ALPHA ONE *****
|
||||||
|
|
||||||
|
8.2.2004 - Build 23 (johnny):
|
||||||
|
- Fixed bug that prevented people from buying items.
|
||||||
|
- Fixed URL cheat that allowed people to buy any item in the game.
|
||||||
|
- Fixed bug that could cause negative damage to monsters (ie. heal them).
|
||||||
|
|
||||||
|
7.30.2004 - Build 22 (catch):
|
||||||
|
- Removed dev site link from ?do=version.
|
||||||
|
- Added changelog link to ?do=version.
|
||||||
|
- Fixed URL cheat that allowed people to get healed for free.
|
||||||
|
- Fixed number_format for gold/exp on the charprofile screen.
|
||||||
|
|
||||||
|
7.28.2004 - Build 21 (beer):
|
||||||
|
- Fixed problem with having occasional monster hp values as decimals instead of integers.
|
||||||
|
- Language name values are now properly lowercased for storage.
|
||||||
|
- Added "Not Working Yet" messages for arena/onlinechar/help.
|
||||||
|
- Fixed a problem with the fight screen showing the wrong player lat/lon values.
|
||||||
|
- Fixed a problem with users getting stuck off edge of the map.
|
||||||
|
- Added language indexes for x_submit and x_reset.
|
||||||
|
|
||||||
|
7.19.2004 - Build 20 (pr0n):
|
||||||
|
- Initial public testing release.
|
11
config.php
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?php // config.php :: Low-level app/database variables.
|
||||||
|
|
||||||
|
$dbsettings = Array(
|
||||||
|
"server" => "localhost", // MySQL server name. (Usually localhost.)
|
||||||
|
"user" => "", // MySQL username.
|
||||||
|
"pass" => "", // MySQL password.
|
||||||
|
"name" => "", // MySQL database name.
|
||||||
|
"prefix" => "", // Prefix for table names.
|
||||||
|
"secretword" => ""); // Secret word used when hashing information for cookies.
|
||||||
|
|
||||||
|
?>
|
31
cookies.php
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
<?php // cookies.php :: Handles cookies. (Mmm, tasty!)
|
||||||
|
|
||||||
|
function checkcookies() {
|
||||||
|
|
||||||
|
include('config.php');
|
||||||
|
|
||||||
|
$row = false;
|
||||||
|
|
||||||
|
if (isset($_COOKIE["scourge"])) {
|
||||||
|
|
||||||
|
// COOKIE FORMAT:
|
||||||
|
// {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"));
|
||||||
|
if ($row == false) { err("Invalid cookie data (Error 1). Please clear cookies and log in again."); }
|
||||||
|
if ($row["id"] != $theuser[0]) { err("Invalid cookie data (Error 2). Please clear cookies and log in again."); }
|
||||||
|
if (md5($row["password"] . "--" . $dbsettings["secretword"]) !== $theuser[2]) { err("Invalid cookie data (Error 3). Please clear cookies and log in again."); }
|
||||||
|
|
||||||
|
// If we've gotten this far, cookie should be valid, so write a new one.
|
||||||
|
$newcookie = implode(" ",$theuser);
|
||||||
|
if ($theuser[3] == 1) { $expiretime = time()+31536000; } else { $expiretime = 0; }
|
||||||
|
setcookie ("scourge", $newcookie, $expiretime, "/", "", 0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return $row;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
151
explore.php
Normal file
|
@ -0,0 +1,151 @@
|
||||||
|
<?php // explore.php :: All exploring/traveling functions.
|
||||||
|
|
||||||
|
|
||||||
|
function doexplore() { // Default explore screen.
|
||||||
|
|
||||||
|
display("Exploring", gettemplate("explore"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function move() { // Primary exploring function. Move them with the compass buttons.
|
||||||
|
|
||||||
|
global $controlrow, $userrow, $worldrow;
|
||||||
|
|
||||||
|
if ($userrow["currentpvp"] != 0) { die(header("Location: pvp.php")); }
|
||||||
|
if ($userrow["currentaction"] == "PVP") { die(header("Location: pvp.php")); }
|
||||||
|
if ($userrow["currentaction"] == "Fighting") { die(header("Location: fight.php")); }
|
||||||
|
if ($userrow["exploreverify"] != "") { botkillah(); }
|
||||||
|
|
||||||
|
// Move the character.
|
||||||
|
if (isset($_GET["dir"])) {
|
||||||
|
$dir = $_GET["dir"];
|
||||||
|
if($dir=="n") {
|
||||||
|
$latlon = "latitude";
|
||||||
|
if (($userrow[$latlon]+1) <= $worldrow["size"]) { $userrow[$latlon]++; $string = ", latitude=latitude+1"; } else { $string = ""; }
|
||||||
|
} elseif($dir=="s") {
|
||||||
|
$latlon = "latitude";
|
||||||
|
if ((($userrow[$latlon]-1)*-1) <= $worldrow["size"]) { $userrow[$latlon]--; $string = ", latitude=latitude-1"; } else { $string = ""; }
|
||||||
|
} elseif($dir=="e") {
|
||||||
|
$latlon = "longitude";
|
||||||
|
if (($userrow[$latlon]+1) <= $worldrow["size"]) { $userrow[$latlon]++; $string = ", longitude=longitude+1"; } else { $string = ""; }
|
||||||
|
} elseif($dir=="w") {
|
||||||
|
$latlon = "longitude";
|
||||||
|
if ((($userrow[$latlon]-1)*-1) <= $worldrow["size"]) { $userrow[$latlon]--; $string = ", longitude=longitude-1"; } else { $string = ""; }
|
||||||
|
} else {
|
||||||
|
err("Invalid input format. Please <a href=\"index.php\">go back</a> and try again.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Breakout for towns.
|
||||||
|
$query = doquery("SELECT * FROM {{table}} WHERE world='".$userrow["world"]."' AND latitude='".$userrow["latitude"]."' AND longitude='".$userrow["longitude"]."' LIMIT 1", "towns");
|
||||||
|
$row = dorow($query);
|
||||||
|
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");
|
||||||
|
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");
|
||||||
|
die(header("Location: fight.php"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Random check for protection against macro bots.
|
||||||
|
if ($controlrow["botcheck"] > 0) {
|
||||||
|
if (rand(1,$controlrow["botcheck"]) == 1) {
|
||||||
|
botkillah();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If we've gotten this far, nothing has happened.
|
||||||
|
$userrow["currentaction"] = "Exploring";
|
||||||
|
doquery("UPDATE {{table}} SET currentaction='Exploring' $string WHERE id='".$userrow["id"]."' LIMIT 1", "users");
|
||||||
|
display("Exploring", gettemplate("explore"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function travel($id) { // Move them with the Travel To list.
|
||||||
|
|
||||||
|
global $userrow, $worldrow;
|
||||||
|
|
||||||
|
if ($userrow["currentpvp"] != 0) { die(header("Location: pvp.php")); }
|
||||||
|
if ($userrow["currentaction"] == "PVP") { die(header("Location: pvp.php")); }
|
||||||
|
if ($userrow["currentaction"] == "Fighting") { die(header("Location: fight.php")); }
|
||||||
|
if ($userrow["exploreverify"] != "") { botkillah(); }
|
||||||
|
|
||||||
|
if (!is_numeric($id)) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
$query = doquery("SELECT * FROM {{table}} WHERE id='$id' LIMIT 1", "towns");
|
||||||
|
$row = dorow($query);
|
||||||
|
|
||||||
|
// Errors.
|
||||||
|
if ($userrow["currenttp"] < $row["travelpoints"]) { err("You do not have enough Travel Points to travel to this town. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($userrow["world"] != $row["world"]) { err("You can only travel to towns in ".$worldrow["name"].". Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($userrow["latitude"] == $row["latitude"] && $userrow["longitude"] == $row["longitude"] && $userrow["world"] == $row["world"]) { err("You are already in ".$row["name"].". You do not need to travel there.<br /><br /><a href=\"index.php\">Click here</a> to return to the main town screen."); }
|
||||||
|
$townslist = explode(",",$userrow["townslist"]);
|
||||||
|
if (!in_array($id,$townslist)) { err("You have not purchased the map to this town. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
|
||||||
|
// Now move them.
|
||||||
|
$userrow["longitude"] = $row["longitude"];
|
||||||
|
$userrow["latitude"] = $row["latitude"];
|
||||||
|
$userrow["currenttp"] -= $row["travelpoints"];
|
||||||
|
$query = doquery("UPDATE {{table}} SET latitude='".$userrow["latitude"]."', longitude='".$userrow["longitude"]."', currenttp='".$userrow["currenttp"]."', currentaction='In Town' WHERE id='".$userrow["id"]."' LIMIT 1", "users");
|
||||||
|
display("Exploring", parsetemplate(gettemplate("town_enter"), $row));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function botkillah() { // Bust a cap in the asses of macro bots. Word.
|
||||||
|
|
||||||
|
global $userrow;
|
||||||
|
|
||||||
|
if (isset($_POST["submit"])) {
|
||||||
|
|
||||||
|
if (strtoupper($_POST["verify"]) == $userrow["exploreverify"]) {
|
||||||
|
$query = doquery("UPDATE {{table}} SET exploreverify='',exploreverifyimage='' WHERE id='".$userrow["id"]."' LIMIT 1", "users");
|
||||||
|
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");
|
||||||
|
die(header("Location: index.php?do=humanity"));
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if ($userrow["exploreverify"] == "") {
|
||||||
|
|
||||||
|
// Thanks to phpNoise for the tutorial on this - http://www.phpnoise.com/tutorials/1/2
|
||||||
|
// Image setup.
|
||||||
|
$im = ImageCreate(200, 40);
|
||||||
|
$white = ImageColorAllocate($im, 240, 240, 240);
|
||||||
|
$black = ImageColorAllocate($im, 102, 51, 0);
|
||||||
|
|
||||||
|
// Get us some random text.
|
||||||
|
$new_string = "";
|
||||||
|
for($i=0; $i<6; $i++) {
|
||||||
|
$new_string .= chr(rand(65,90));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Finalize, update userrow & output.
|
||||||
|
ImageFill($im, 0, 0, $white);
|
||||||
|
ImageString($im, 5, rand(10,120), rand(5,25), $new_string, $black);
|
||||||
|
$randomext = "";
|
||||||
|
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");
|
||||||
|
|
||||||
|
$pagerow["exploreverifyimage"] = $randomext.".png";
|
||||||
|
|
||||||
|
} else { $pagerow["exploreverifyimage"] = $userrow["exploreverifyimage"]; }
|
||||||
|
|
||||||
|
display("Anti-Macro Verification", parsetemplate(gettemplate("explore_verify"),$pagerow));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
866
extras/install.sql
Normal file
|
@ -0,0 +1,866 @@
|
||||||
|
-- phpMyAdmin SQL Dump
|
||||||
|
-- version 2.6.0-pl3
|
||||||
|
-- http://www.phpmyadmin.net
|
||||||
|
--
|
||||||
|
-- Host: localhost
|
||||||
|
-- Generation Time: Dec 10, 2005 at 03:15 PM
|
||||||
|
-- Server version: 4.1.14
|
||||||
|
-- PHP Version: 5.0.5
|
||||||
|
--
|
||||||
|
-- Database: `scourge2`
|
||||||
|
--
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `sx_accounts`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `sx_accounts` (
|
||||||
|
`id` int(10) unsigned NOT NULL auto_increment,
|
||||||
|
`username` varchar(30) NOT NULL default '',
|
||||||
|
`password` varchar(32) NOT NULL default '',
|
||||||
|
`emailaddress` varchar(50) NOT NULL default '',
|
||||||
|
`verifycode` varchar(8) NOT NULL default '',
|
||||||
|
`regdate` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||||
|
`regip` varchar(16) NOT NULL default '',
|
||||||
|
`authlevel` tinyint(3) unsigned NOT NULL default '1',
|
||||||
|
`language` varchar(30) NOT NULL default '',
|
||||||
|
`characters` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`activechar` int(10) unsigned NOT NULL default '0',
|
||||||
|
`imageformat` varchar(4) NOT NULL default '0',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `sx_babblebox`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `sx_babblebox` (
|
||||||
|
`id` int(11) unsigned NOT NULL auto_increment,
|
||||||
|
`posttime` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||||
|
`charname` varchar(30) NOT NULL default '',
|
||||||
|
`charid` int(11) unsigned NOT NULL default '0',
|
||||||
|
`content` varchar(255) NOT NULL default '',
|
||||||
|
`guild` int(10) unsigned NOT NULL default '0',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `sx_babblebox`
|
||||||
|
--
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `sx_classes`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `sx_classes` (
|
||||||
|
`id` int(10) unsigned NOT NULL auto_increment,
|
||||||
|
`name` varchar(50) NOT NULL default '',
|
||||||
|
`expbonus` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`goldbonus` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`damageperstrength` float unsigned NOT NULL default '0',
|
||||||
|
`hpperdexterity` float unsigned NOT NULL default '0',
|
||||||
|
`mpperenergy` float unsigned NOT NULL default '0',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `sx_classes`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `sx_classes` VALUES (1, 'Barbarian', 0, 0, 2, 1.5, 1);
|
||||||
|
INSERT INTO `sx_classes` VALUES (2, 'Sorceress', 0, 0, 1, 1.5, 2);
|
||||||
|
INSERT INTO `sx_classes` VALUES (3, 'Paladin', 0, 0, 1.5, 2, 1);
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `sx_control`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `sx_control` (
|
||||||
|
`id` tinyint(3) unsigned NOT NULL auto_increment,
|
||||||
|
`gamename` varchar(50) NOT NULL default '',
|
||||||
|
`gameopen` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`gamepath` varchar(200) NOT NULL default '',
|
||||||
|
`forumtype` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`forumurl` varchar(200) NOT NULL default '',
|
||||||
|
`avatarpath` varchar(200) NOT NULL default '',
|
||||||
|
`avatarurl` varchar(200) NOT NULL default '',
|
||||||
|
`avatarmaxsize` int(10) unsigned NOT NULL default '0',
|
||||||
|
`showshout` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`showonline` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`shownews` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`showimages` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`verifyemail` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`compression` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`debug` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`logerrors` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`botcheck` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`pvprefresh` int(10) NOT NULL default '0',
|
||||||
|
`pvptimeout` int(10) NOT NULL default '0',
|
||||||
|
`guildstartup` int(10) unsigned NOT NULL default '100000',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `sx_control`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `sx_control` VALUES (1, 'Dragon Scourge', 1, 'd:\\server\\docroot\\scourge\\', 1, 'http://se7enet.com/ubbthreads/ubbthreads.php', 'd:\\server\\docroot\\scourge\\images\\users\\', 'http://localhost/scourge/images/users/', 15000, 1, 1, 1, 1, 0, 1, 1, 1, 100, 15, 600, 100000);
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `sx_difficulties`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `sx_difficulties` (
|
||||||
|
`id` int(10) unsigned NOT NULL auto_increment,
|
||||||
|
`name` varchar(50) NOT NULL default '',
|
||||||
|
`expbonus` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`goldbonus` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`multiplier` float NOT NULL default '0',
|
||||||
|
`deathpenalty` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `sx_difficulties`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `sx_difficulties` VALUES (1, 'Easy', 0, 0, 1, 0);
|
||||||
|
INSERT INTO `sx_difficulties` VALUES (2, 'Medium', 3, 3, 1.5, 3);
|
||||||
|
INSERT INTO `sx_difficulties` VALUES (3, 'Hard', 5, 5, 2, 7);
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `sx_guildapps`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `sx_guildapps` (
|
||||||
|
`id` int(10) unsigned NOT NULL auto_increment,
|
||||||
|
`guild` int(10) unsigned NOT NULL default '0',
|
||||||
|
`charid` int(10) unsigned NOT NULL default '0',
|
||||||
|
`charname` varchar(30) NOT NULL default '',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `sx_guildapps`
|
||||||
|
--
|
||||||
|
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `sx_guilds`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `sx_guilds` (
|
||||||
|
`id` int(10) unsigned NOT NULL auto_increment,
|
||||||
|
`name` varchar(50) NOT NULL default '',
|
||||||
|
`tagline` varchar(4) NOT NULL default '',
|
||||||
|
`color1` varchar(7) NOT NULL default '',
|
||||||
|
`color2` varchar(7) NOT NULL default '',
|
||||||
|
`members` int(10) unsigned NOT NULL default '0',
|
||||||
|
`founder` int(10) unsigned NOT NULL default '0',
|
||||||
|
`bank` int(10) unsigned NOT NULL default '0',
|
||||||
|
`joincost` int(10) unsigned NOT NULL default '0',
|
||||||
|
`image` varchar(30) NOT NULL default '',
|
||||||
|
`rank1` varchar(30) NOT NULL default '',
|
||||||
|
`rank2` varchar(30) NOT NULL default '',
|
||||||
|
`rank3` varchar(30) NOT NULL default '',
|
||||||
|
`rank4` varchar(30) NOT NULL default '',
|
||||||
|
`rank5` varchar(30) NOT NULL default '',
|
||||||
|
`isactive` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`statement` text NOT NULL,
|
||||||
|
`news` text NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `sx_guilds`
|
||||||
|
--
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `sx_itembase`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `sx_itembase` (
|
||||||
|
`id` int(10) unsigned NOT NULL auto_increment,
|
||||||
|
`name` varchar(50) NOT NULL default '',
|
||||||
|
`slotnumber` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`unique` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`willdrop` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`buycost` int(10) unsigned NOT NULL default '0',
|
||||||
|
`sellcost` int(10) unsigned NOT NULL default '0',
|
||||||
|
`reqlevel` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`reqstrength` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`reqdexterity` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`reqenergy` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`basename` varchar(50) NOT NULL default '',
|
||||||
|
`baseattr` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`mod1name` varchar(50) NOT NULL default '',
|
||||||
|
`mod1attr` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`mod2name` varchar(50) NOT NULL default '',
|
||||||
|
`mod2attr` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`mod3name` varchar(50) NOT NULL default '',
|
||||||
|
`mod3attr` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`mod4name` varchar(50) NOT NULL default '',
|
||||||
|
`mod4attr` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`mod5name` varchar(50) NOT NULL default '',
|
||||||
|
`mod5attr` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`mod6name` varchar(50) NOT NULL default '',
|
||||||
|
`mod6attr` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `sx_itembase`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `sx_itembase` VALUES (1, 'Pointy Stick', 1, 0, 1, 10, 5, 1, 0, 0, 0, 'physattack', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (2, 'Big Stick', 1, 0, 1, 15, 8, 1, 0, 0, 0, 'physattack', 4, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (3, 'Dagger', 1, 0, 1, 20, 10, 1, 0, 0, 0, 'physattack', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (4, 'Hand Axe', 1, 0, 1, 30, 15, 1, 0, 0, 0, 'physattack', 7, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (5, 'Leg Bone', 1, 0, 1, 40, 20, 1, 0, 0, 0, 'physattack', 8, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (6, 'Dirk', 1, 0, 1, 60, 30, 3, 10, 0, 0, 'physattack', 10, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (7, 'Small Axe', 1, 0, 1, 80, 40, 3, 10, 0, 0, 'physattack', 11, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (8, 'Club', 1, 0, 1, 110, 55, 3, 15, 0, 0, 'physattack', 12, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (9, 'Kris', 1, 0, 1, 140, 70, 3, 15, 0, 0, 'physattack', 15, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (10, 'Light Axe', 1, 0, 1, 180, 90, 5, 20, 0, 0, 'physattack', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (11, 'Spiked Club', 1, 0, 1, 220, 110, 5, 20, 0, 0, 'physattack', 20, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (12, 'Cudgel', 1, 0, 1, 270, 135, 5, 25, 0, 0, 'physattack', 23, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (13, 'Stiletto', 1, 0, 1, 330, 165, 7, 25, 0, 0, 'physattack', 25, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (14, 'Pick Axe', 1, 0, 1, 400, 200, 9, 30, 0, 0, 'physattack', 30, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (15, 'Nailed Club', 1, 0, 1, 480, 240, 11, 30, 0, 0, 'physattack', 30, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (16, 'Cutlass', 1, 0, 1, 570, 285, 13, 35, 0, 0, 'physattack', 35, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (17, 'Bayonet', 1, 0, 1, 670, 335, 15, 35, 0, 0, 'physattack', 38, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (18, 'Tomahawk', 1, 0, 1, 800, 400, 17, 40, 0, 0, 'physattack', 40, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (19, 'Light Mace', 1, 0, 1, 950, 475, 19, 40, 0, 0, 'physattack', 43, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (20, 'Falchion', 1, 0, 1, 1200, 600, 21, 45, 0, 0, 'physattack', 45, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (21, 'Foil', 1, 0, 1, 1400, 700, 23, 50, 0, 0, 'physattack', 48, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (22, 'Short Sword', 1, 0, 1, 1600, 800, 25, 50, 0, 0, 'physattack', 50, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (23, 'Double Axe', 1, 0, 1, 1900, 950, 27, 60, 0, 0, 'physattack', 55, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (24, 'Mace', 1, 0, 1, 2300, 1150, 29, 60, 0, 0, 'physattack', 60, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (25, 'Scimitar', 1, 0, 1, 2800, 1400, 31, 70, 0, 0, 'physattack', 65, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (26, 'Bardiche', 1, 0, 1, 3400, 1700, 33, 70, 0, 0, 'physattack', 70, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (27, 'Knobbed Mace', 1, 0, 1, 4100, 2050, 35, 80, 0, 0, 'physattack', 75, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (28, 'Rapier', 1, 0, 1, 4900, 2450, 37, 90, 0, 0, 'physattack', 85, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (29, 'Morning Star', 1, 0, 1, 5800, 2900, 39, 100, 0, 0, 'physattack', 95, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (30, 'Battle Axe', 1, 0, 1, 6800, 3400, 41, 110, 0, 0, 'physattack', 105, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (31, 'Saber', 1, 0, 1, 7800, 3900, 43, 120, 0, 0, 'physattack', 115, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (32, 'Francisca', 1, 0, 1, 9000, 4500, 45, 130, 0, 0, 'physattack', 125, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (33, 'Flanged Mace', 1, 0, 1, 10000, 5000, 47, 140, 0, 0, 'physattack', 135, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (34, 'Broadsword', 1, 0, 1, 11000, 5500, 49, 150, 0, 0, 'physattack', 145, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (35, 'War Axe', 1, 0, 1, 12500, 6250, 51, 165, 0, 0, 'physattack', 155, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (36, 'Trench Mace', 1, 0, 1, 14000, 7000, 53, 180, 0, 0, 'physattack', 165, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (37, 'Long Sword', 1, 0, 1, 15500, 7750, 55, 195, 0, 0, 'physattack', 180, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (38, 'Broad Axe', 1, 0, 1, 17000, 8500, 57, 210, 0, 0, 'physattack', 195, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (39, 'Flail', 1, 0, 1, 18500, 9250, 59, 225, 0, 0, 'physattack', 210, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (40, 'Claymore', 1, 0, 1, 20000, 10000, 61, 240, 0, 0, 'physattack', 225, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (41, 'Poleaxe', 1, 0, 1, 21500, 10750, 63, 255, 0, 0, 'physattack', 240, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (42, 'War Hammer', 1, 0, 1, 23000, 11500, 65, 270, 0, 0, 'physattack', 255, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (43, 'Katana', 1, 0, 1, 24500, 12250, 67, 285, 0, 0, 'physattack', 270, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (44, 'Scythe', 1, 0, 1, 26000, 13000, 69, 300, 0, 0, 'physattack', 280, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (45, 'Zweihander', 1, 0, 1, 27500, 13750, 71, 315, 0, 0, 'physattack', 295, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (46, 'Halberd', 1, 0, 1, 29000, 14500, 73, 330, 0, 0, 'physattack', 310, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (47, 'Flamberge', 1, 0, 1, 30000, 15000, 75, 345, 0, 0, 'physattack', 330, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (48, 'Great Axe', 1, 0, 1, 32000, 16000, 77, 360, 0, 0, 'physattack', 345, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (49, 'Great Sword', 1, 0, 1, 34000, 17000, 79, 375, 0, 0, 'physattack', 360, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (50, 'Giant Axe', 1, 0, 1, 36000, 18000, 81, 390, 0, 0, 'physattack', 380, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (51, 'Giant Maul', 1, 0, 1, 38000, 19000, 83, 405, 0, 0, 'physattack', 400, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (52, 'Skivvies', 2, 0, 1, 20, 10, 1, 0, 0, 0, 'physdefense', 2, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (53, 'Cloak', 2, 0, 1, 30, 15, 1, 0, 0, 0, 'physdefense', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (54, 'Cloth Armor', 2, 0, 1, 40, 20, 1, 0, 0, 0, 'physdefense', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (55, 'Quilted Coat', 2, 0, 1, 50, 25, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (56, 'Quilted Armor', 2, 0, 1, 70, 35, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (57, 'Leather Coat', 2, 0, 1, 90, 45, 3, 5, 6, 0, 'physdefense', 6, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (58, 'Leather Hauberk', 2, 0, 1, 110, 55, 3, 5, 6, 0, 'physdefense', 7, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (59, 'Leather Coat', 2, 0, 1, 150, 75, 3, 8, 10, 0, 'physdefense', 8, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (60, 'Hard Leather Armor', 2, 0, 1, 190, 95, 3, 8, 10, 0, 'physdefense', 9, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (61, 'Riveted Leather Armor', 2, 0, 1, 230, 115, 5, 10, 12, 0, 'physdefense', 11, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (62, 'Spiked Leather Armor', 2, 0, 1, 270, 135, 5, 10, 12, 0, 'physdefense', 12, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (63, 'Light Chain Mail', 2, 0, 1, 310, 155, 5, 13, 16, 0, 'physdefense', 14, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (64, 'Heavy Chain Mail', 2, 0, 1, 360, 180, 7, 13, 16, 0, 'physdefense', 15, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (65, 'Chain Mail Shirt', 2, 0, 1, 420, 210, 9, 15, 18, 0, 'physdefense', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (66, 'Chain Mail Hauberk', 2, 0, 1, 500, 250, 11, 15, 18, 0, 'physdefense', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (67, 'Full Chain Mail', 2, 0, 1, 580, 290, 13, 18, 22, 0, 'physdefense', 21, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (68, 'Light Plate Mail', 2, 0, 1, 680, 340, 15, 18, 22, 0, 'physdefense', 23, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (69, 'Heavy Plate Mail', 2, 0, 1, 800, 400, 17, 20, 24, 0, 'physdefense', 24, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (70, 'Plate Mail Shirt', 2, 0, 1, 950, 475, 19, 20, 24, 0, 'physdefense', 26, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (71, 'Plate Mail Hauberk', 2, 0, 1, 1200, 600, 21, 23, 28, 0, 'physdefense', 27, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (72, 'Full Plate Mail', 2, 0, 1, 1500, 750, 23, 25, 30, 0, 'physdefense', 29, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (73, 'Light Scale Mail', 2, 0, 1, 1800, 900, 25, 25, 30, 0, 'physdefense', 30, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (74, 'Heavy Scale Mail', 2, 0, 1, 2400, 1200, 27, 30, 36, 0, 'physdefense', 33, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (75, 'Scale Mail Shirt', 2, 0, 1, 2800, 1400, 29, 30, 36, 0, 'physdefense', 36, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (76, 'Scale Mail Hauberk', 2, 0, 1, 3500, 1750, 31, 35, 42, 0, 'physdefense', 39, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (77, 'Full Scale Mail', 2, 0, 1, 4800, 2400, 33, 35, 42, 0, 'physdefense', 42, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (78, 'Copper Breastplate', 2, 0, 1, 6000, 3000, 35, 40, 48, 0, 'physdefense', 45, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (79, 'Bronze Breastplate', 2, 0, 1, 7500, 3750, 37, 45, 54, 0, 'physdefense', 50, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (80, 'Iron Breastplate', 2, 0, 1, 9000, 4500, 39, 50, 60, 0, 'physdefense', 56, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (81, 'Steel Breastplate', 2, 0, 1, 10500, 5250, 41, 55, 66, 0, 'physdefense', 62, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (82, 'Titanium Breastplate', 2, 0, 1, 12000, 6000, 43, 60, 72, 0, 'physdefense', 68, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (83, 'Copper Field Plate', 2, 0, 1, 14000, 7000, 45, 65, 78, 0, 'physdefense', 74, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (84, 'Bronze Field Plate', 2, 0, 1, 16000, 8000, 47, 70, 84, 0, 'physdefense', 80, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (85, 'Iron Field Plate', 2, 0, 1, 18000, 9000, 49, 75, 90, 0, 'physdefense', 86, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (86, 'Steel Field Plate', 2, 0, 1, 20000, 10000, 51, 83, 100, 0, 'physdefense', 92, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (87, 'Titanium Field Plate', 2, 0, 1, 24000, 12000, 53, 90, 108, 0, 'physdefense', 98, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (88, 'Copper Articulated Plate', 2, 0, 1, 28000, 14000, 55, 98, 118, 0, 'physdefense', 106, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (89, 'Bronze Articulated Plate', 2, 0, 1, 32000, 16000, 57, 105, 126, 0, 'physdefense', 115, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (90, 'Iron Articulated Plate', 2, 0, 1, 36000, 18000, 59, 113, 136, 0, 'physdefense', 124, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (91, 'Steel Articulated Plate', 2, 0, 1, 40000, 20000, 61, 120, 144, 0, 'physdefense', 133, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (92, 'Titanium Articulated Plate', 2, 0, 1, 45000, 22500, 63, 128, 154, 0, 'physdefense', 142, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (93, 'Copper Battle Armor', 2, 0, 1, 50000, 25000, 65, 135, 162, 0, 'physdefense', 150, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (94, 'Bronze Battle Armor', 2, 0, 1, 55000, 27500, 67, 143, 172, 0, 'physdefense', 159, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (95, 'Iron Battle Armor', 2, 0, 1, 60000, 30000, 69, 150, 180, 0, 'physdefense', 165, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (96, 'Steel Battle Armor', 2, 0, 1, 65000, 32500, 71, 158, 190, 0, 'physdefense', 174, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (97, 'Titanium Battle Armor', 2, 0, 1, 70000, 35000, 73, 165, 198, 0, 'physdefense', 183, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (98, 'Copper Gothic Plate', 2, 0, 1, 75000, 37500, 75, 173, 208, 0, 'physdefense', 195, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (99, 'Bronze Gothic Plate', 2, 0, 1, 80000, 40000, 77, 180, 216, 0, 'physdefense', 203, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (100, 'Iron Gothic Plate', 2, 0, 1, 85000, 42500, 79, 188, 226, 0, 'physdefense', 212, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (101, 'Steel Gothic Plate', 2, 0, 1, 90000, 45000, 81, 195, 234, 0, 'physdefense', 224, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (102, 'Titanium Gothic Plate', 2, 0, 1, 95000, 47500, 83, 203, 244, 0, 'physdefense', 236, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (103, 'Leather Buckler', 4, 0, 1, 25, 13, 1, 0, 0, 0, 'physdefense', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (104, 'Wood Buckler', 4, 0, 1, 50, 25, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (105, 'Steel Buckler', 4, 0, 1, 75, 38, 1, 0, 0, 0, 'physdefense', 7, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (106, 'Titanium Buckler', 4, 0, 1, 100, 50, 1, 0, 0, 0, 'physdefense', 8, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (107, 'Leather Targe', 4, 0, 1, 150, 75, 3, 0, 5, 0, 'physdefense', 11, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (108, 'Wood Targe', 4, 0, 1, 200, 100, 3, 0, 10, 0, 'physdefense', 12, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (109, 'Steel Targe', 4, 0, 1, 300, 150, 5, 0, 15, 0, 'physdefense', 15, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (110, 'Titanium Targe', 4, 0, 1, 400, 200, 5, 0, 20, 0, 'physdefense', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (111, 'Small Aspis', 4, 0, 1, 600, 300, 8, 0, 25, 0, 'physdefense', 21, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (112, 'Large Aspis', 4, 0, 1, 800, 400, 11, 0, 35, 0, 'physdefense', 23, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (113, 'Full Aspis', 4, 0, 1, 1200, 600, 14, 0, 45, 0, 'physdefense', 26, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (114, 'Great Aspis', 4, 0, 1, 1500, 750, 17, 0, 55, 0, 'physdefense', 27, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (115, 'Small Kite Shield', 4, 0, 1, 2000, 1000, 20, 0, 65, 0, 'physdefense', 30, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (116, 'Large Kite Shield', 4, 0, 1, 2500, 1250, 23, 0, 80, 0, 'physdefense', 36, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (117, 'Full Kite Shield', 4, 0, 1, 3000, 1500, 26, 0, 95, 0, 'physdefense', 39, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (118, 'Great Kite Shield', 4, 0, 1, 4000, 2000, 29, 0, 110, 0, 'physdefense', 45, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (119, 'Small Heater Shield', 4, 0, 1, 5000, 2500, 31, 0, 130, 0, 'physdefense', 56, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (120, 'Large Heater Shield', 4, 0, 1, 6000, 3000, 34, 0, 150, 0, 'physdefense', 62, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (121, 'Full Heater Shield', 4, 0, 1, 8000, 4000, 37, 0, 170, 0, 'physdefense', 74, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (122, 'Great Heater Shield', 4, 0, 1, 10000, 5000, 40, 0, 190, 0, 'physdefense', 80, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (123, 'Small Scuta', 4, 0, 1, 12000, 6000, 43, 0, 210, 0, 'physdefense', 86, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (124, 'Large Scuta', 4, 0, 1, 15000, 7500, 46, 0, 230, 0, 'physdefense', 98, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (125, 'Full Scuta', 4, 0, 1, 18000, 9000, 49, 0, 250, 0, 'physdefense', 106, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (126, 'Great Scuta', 4, 0, 1, 22000, 11000, 51, 0, 270, 0, 'physdefense', 115, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (127, 'Small Pavise', 4, 0, 1, 26000, 13000, 54, 0, 300, 0, 'physdefense', 133, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (128, 'Large Pavise', 4, 0, 1, 30000, 15000, 57, 0, 320, 0, 'physdefense', 142, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (129, 'Full Pavise', 4, 0, 1, 35000, 17500, 60, 0, 340, 0, 'physdefense', 159, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (130, 'Great Pavise', 4, 0, 1, 40000, 20000, 65, 0, 360, 0, 'physdefense', 165, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (131, 'Small Heraldic Shield', 4, 0, 1, 45000, 22500, 70, 0, 380, 0, 'physdefense', 183, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (132, 'Large Heraldic Shield', 4, 0, 1, 50000, 25000, 75, 0, 400, 0, 'physdefense', 195, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (133, 'Full Heraldic Shield', 4, 0, 1, 55000, 27500, 80, 0, 420, 0, 'physdefense', 212, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (134, 'Great Heraldic Shield', 4, 0, 1, 60000, 30000, 85, 0, 440, 0, 'physdefense', 236, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (135, 'Leather Cap', 3, 0, 1, 20, 10, 1, 0, 0, 0, 'physdefense', 2, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (136, 'Copper Cap', 3, 0, 1, 40, 20, 1, 0, 0, 0, 'physdefense', 3, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (137, 'Bronze Cap', 3, 0, 1, 60, 30, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (138, 'Steel Cap', 3, 0, 1, 80, 40, 1, 0, 0, 0, 'physdefense', 5, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (139, 'Titanium Cap', 3, 0, 1, 110, 55, 1, 0, 0, 0, 'physdefense', 7, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (140, 'Leather Skull Cap', 3, 0, 1, 140, 70, 3, 5, 6, 0, 'physdefense', 8, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (141, 'Copper Skull Cap', 3, 0, 1, 170, 85, 3, 5, 6, 0, 'physdefense', 9, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (142, 'Bronze Skull Cap', 3, 0, 1, 200, 100, 3, 8, 10, 0, 'physdefense', 11, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (143, 'Steel Skull Cap', 3, 0, 1, 240, 120, 5, 10, 12, 0, 'physdefense', 13, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (144, 'Titanium Skull Cap', 3, 0, 1, 280, 140, 5, 10, 12, 0, 'physdefense', 14, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (145, 'Copper Helm', 3, 0, 1, 330, 165, 5, 13, 16, 0, 'physdefense', 16, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (146, 'Bronze Helm', 3, 0, 1, 380, 190, 8, 13, 16, 0, 'physdefense', 16, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (147, 'Iron Helm', 3, 0, 1, 440, 220, 11, 15, 18, 0, 'physdefense', 18, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (148, 'Steel Helm', 3, 0, 1, 500, 250, 14, 18, 22, 0, 'physdefense', 22, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (149, 'Titanium Helm', 3, 0, 1, 600, 300, 17, 18, 22, 0, 'physdefense', 23, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (150, 'Copper Corinthian Helmet', 3, 0, 1, 700, 350, 20, 20, 24, 0, 'physdefense', 27, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (151, 'Bronze Corinthian Helmet', 3, 0, 1, 850, 425, 23, 23, 28, 0, 'physdefense', 33, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (152, 'Iron Corinthian Helmet', 3, 0, 1, 1000, 500, 26, 25, 30, 0, 'physdefense', 37, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (153, 'Steel Corinthian Helmet', 3, 0, 1, 2000, 1000, 29, 25, 30, 0, 'physdefense', 44, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (154, 'Titanium Corinthian Helmet', 3, 0, 1, 3200, 1600, 31, 30, 36, 0, 'physdefense', 48, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (155, 'Copper Sallet', 3, 0, 1, 4400, 2200, 34, 30, 36, 0, 'physdefense', 51, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (156, 'Bronze Sallet', 3, 0, 1, 6000, 3000, 37, 35, 42, 0, 'physdefense', 58, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (157, 'Iron Sallet', 3, 0, 1, 7000, 3500, 40, 35, 42, 0, 'physdefense', 63, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (158, 'Steel Sallet', 3, 0, 1, 8000, 4000, 43, 40, 48, 0, 'physdefense', 68, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (159, 'Titanium Sallet', 3, 0, 1, 10000, 5000, 46, 45, 54, 0, 'physdefense', 79, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (160, 'Copper Bascinet', 3, 0, 1, 12000, 6000, 49, 50, 60, 0, 'physdefense', 84, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (161, 'Bronze Bascinet', 3, 0, 1, 15000, 7500, 51, 55, 66, 0, 'physdefense', 94, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (162, 'Iron Bascinet', 3, 0, 1, 18000, 9000, 54, 60, 72, 0, 'physdefense', 98, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (163, 'Steel Bascinet', 3, 0, 1, 22000, 11000, 57, 65, 78, 0, 'physdefense', 108, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (164, 'Titanium Bascinet', 3, 0, 1, 26000, 13000, 60, 70, 84, 0, 'physdefense', 115, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (165, 'Copper Horned Helm', 3, 0, 1, 30000, 15000, 65, 75, 90, 0, 'physdefense', 125, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (166, 'Bronze Horned Helm', 3, 0, 1, 35000, 17500, 70, 83, 100, 0, 'physdefense', 139, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (167, 'Iron Horned Helm', 3, 0, 1, 40000, 20000, 75, 90, 108, 0, 'physdefense', 145, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (168, 'Steel Horned Helm', 3, 0, 1, 45000, 22500, 80, 98, 118, 0, 'physdefense', 160, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
INSERT INTO `sx_itembase` VALUES (169, 'Titanium Horned Helm', 3, 0, 1, 50000, 25000, 85, 105, 126, 0, 'physdefense', 175, '', 0, '', 0, '', 0, '', 0, '', 0, '', 0);
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `sx_itemmodnames`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `sx_itemmodnames` (
|
||||||
|
`id` int(10) unsigned NOT NULL auto_increment,
|
||||||
|
`fieldname` varchar(50) NOT NULL default '',
|
||||||
|
`prettyname` varchar(50) NOT NULL default '',
|
||||||
|
`percent` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `sx_itemmodnames`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `sx_itemmodnames` VALUES (1, 'expbonus', 'Experience Bonus', 1);
|
||||||
|
INSERT INTO `sx_itemmodnames` VALUES (2, 'goldbonus', 'Gold Bonus', 1);
|
||||||
|
INSERT INTO `sx_itemmodnames` VALUES (3, 'maxhp', 'Max HP', 0);
|
||||||
|
INSERT INTO `sx_itemmodnames` VALUES (4, 'maxmp', 'Max MP', 0);
|
||||||
|
INSERT INTO `sx_itemmodnames` VALUES (5, 'maxtp', 'Max TP', 0);
|
||||||
|
INSERT INTO `sx_itemmodnames` VALUES (6, 'strength', 'Strength', 0);
|
||||||
|
INSERT INTO `sx_itemmodnames` VALUES (7, 'dexterity', 'Dexterity', 0);
|
||||||
|
INSERT INTO `sx_itemmodnames` VALUES (8, 'energy', 'Energy', 0);
|
||||||
|
INSERT INTO `sx_itemmodnames` VALUES (9, 'physattack', 'Physical Attack', 0);
|
||||||
|
INSERT INTO `sx_itemmodnames` VALUES (10, 'physdefense', 'Physical Defense', 0);
|
||||||
|
INSERT INTO `sx_itemmodnames` VALUES (11, 'magicattack', 'Magic Attack', 0);
|
||||||
|
INSERT INTO `sx_itemmodnames` VALUES (12, 'magicdefense', 'Magid Defense', 0);
|
||||||
|
INSERT INTO `sx_itemmodnames` VALUES (13, 'fireattack', 'Fire Attack', 0);
|
||||||
|
INSERT INTO `sx_itemmodnames` VALUES (14, 'firedefense', 'Fire Defense', 0);
|
||||||
|
INSERT INTO `sx_itemmodnames` VALUES (15, 'lightattack', 'Lightning Attack', 0);
|
||||||
|
INSERT INTO `sx_itemmodnames` VALUES (16, 'lightdefense', 'Lightning Defense', 0);
|
||||||
|
INSERT INTO `sx_itemmodnames` VALUES (17, 'hpleech', 'HP Leech', 1);
|
||||||
|
INSERT INTO `sx_itemmodnames` VALUES (18, 'mpleech', 'MP Leech', 1);
|
||||||
|
INSERT INTO `sx_itemmodnames` VALUES (19, 'hpgain', 'HP Per Kill', 0);
|
||||||
|
INSERT INTO `sx_itemmodnames` VALUES (20, 'mpgain', 'MP Per Kill', 0);
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `sx_itemprefixes`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `sx_itemprefixes` (
|
||||||
|
`id` int(10) unsigned NOT NULL auto_increment,
|
||||||
|
`name` varchar(50) NOT NULL default '',
|
||||||
|
`slotnumber` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`unique` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`willdrop` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`buycost` int(10) unsigned NOT NULL default '0',
|
||||||
|
`sellcost` int(10) unsigned NOT NULL default '0',
|
||||||
|
`reqlevel` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`reqstrength` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`reqdexterity` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`reqenergy` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`basename` varchar(50) NOT NULL default '',
|
||||||
|
`baseattr` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `sx_itemprefixes`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `sx_itemprefixes` VALUES (1, 'Sharp', 1, 0, 0, 5, 3, 1, 0, 0, 0, 'physattack', 2);
|
||||||
|
INSERT INTO `sx_itemprefixes` VALUES (2, 'Magic', 1, 0, 0, 8, 4, 1, 0, 0, 0, 'magicattack', 5);
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `sx_itemsuffixes`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `sx_itemsuffixes` (
|
||||||
|
`id` int(10) unsigned NOT NULL auto_increment,
|
||||||
|
`name` varchar(50) NOT NULL default '',
|
||||||
|
`slotnumber` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`unique` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`willdrop` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`buycost` int(10) unsigned NOT NULL default '0',
|
||||||
|
`sellcost` int(10) unsigned NOT NULL default '0',
|
||||||
|
`reqlevel` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`reqstrength` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`reqdexterity` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`reqenergy` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`basename` varchar(50) NOT NULL default '',
|
||||||
|
`baseattr` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `sx_itemsuffixes`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `sx_itemsuffixes` VALUES (1, 'of the Vampire', 1, 0, 0, 5, 3, 1, 0, 0, 0, 'hpleech', 5);
|
||||||
|
INSERT INTO `sx_itemsuffixes` VALUES (2, 'of the Bear', 1, 0, 0, 5, 3, 1, 0, 0, 0, 'strength', 5);
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `sx_messages`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `sx_messages` (
|
||||||
|
`id` int(10) unsigned NOT NULL auto_increment,
|
||||||
|
`postdate` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||||
|
`senderid` int(10) unsigned NOT NULL default '0',
|
||||||
|
`sendername` varchar(30) NOT NULL default '',
|
||||||
|
`recipientid` int(10) unsigned NOT NULL default '0',
|
||||||
|
`recipientname` varchar(30) NOT NULL default '',
|
||||||
|
`status` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`title` varchar(200) NOT NULL default '',
|
||||||
|
`message` text NOT NULL,
|
||||||
|
`gold` int(10) unsigned NOT NULL default '0',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `sx_messages`
|
||||||
|
--
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `sx_monsters`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `sx_monsters` (
|
||||||
|
`id` int(10) unsigned NOT NULL auto_increment,
|
||||||
|
`name` varchar(30) NOT NULL default '',
|
||||||
|
`world` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`level` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`maxexp` int(10) unsigned NOT NULL default '0',
|
||||||
|
`maxgold` int(10) unsigned NOT NULL default '0',
|
||||||
|
`maxhp` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`physattack` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`physdefense` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`magicattack` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`magicdefense` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`fireattack` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`firedefense` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`lightattack` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`lightdefense` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`spell1` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`spell2` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`spellimmune1` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`spellimmune2` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`boss` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`hpleech` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `sx_monsters`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `sx_monsters` VALUES (1, 'Small Slime', 1, 1, 3, 2, 3, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (2, 'Shade', 1, 1, 4, 2, 3, 18, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (3, 'Slime', 1, 2, 5, 3, 4, 21, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (4, 'Small Drake', 1, 2, 6, 3, 5, 24, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (5, 'Skeleton', 1, 3, 7, 4, 7, 27, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (6, 'Haunt', 1, 3, 8, 4, 8, 30, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (7, 'Big Slime', 1, 4, 9, 5, 10, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (8, 'Drake', 1, 4, 10, 5, 11, 36, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (9, 'Ghost', 1, 5, 11, 6, 12, 39, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (10, 'Bee', 1, 5, 12, 6, 12, 42, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (11, 'Scorpion', 1, 6, 14, 7, 13, 45, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (12, 'Dawk', 1, 6, 16, 8, 15, 50, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (13, 'Nymph', 1, 7, 18, 9, 16, 54, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (14, 'Ember', 1, 7, 20, 10, 17, 59, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (15, 'Daydream', 1, 8, 22, 11, 18, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (16, 'Wasp', 1, 8, 24, 12, 20, 68, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (17, 'Shadow', 1, 9, 26, 13, 22, 72, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (18, 'Harpy', 1, 9, 28, 14, 24, 77, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (19, 'Air Elemental', 1, 10, 30, 15, 26, 81, 81, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (20, 'Rogue', 1, 10, 32, 16, 29, 86, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (21, 'Lynx', 1, 11, 35, 18, 32, 90, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (22, 'Trickster', 1, 11, 38, 19, 35, 95, 95, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (23, 'Goblin', 1, 12, 41, 21, 35, 99, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (24, 'Charmer', 1, 12, 44, 22, 38, 53, 53, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (25, 'Raven', 1, 13, 47, 24, 41, 108, 108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (26, 'Bobcat', 1, 13, 50, 25, 44, 113, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (27, 'Lycan', 1, 14, 53, 27, 48, 119, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (28, 'Fiend', 1, 14, 56, 28, 52, 125, 125, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (29, 'Liche', 1, 15, 59, 30, 56, 131, 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (30, 'Dawkin', 1, 15, 62, 31, 60, 137, 137, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (31, 'Anarchist', 1, 16, 66, 33, 64, 143, 143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (32, 'Hellcat', 1, 16, 70, 35, 68, 149, 149, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (33, 'Fallen Cherub', 1, 17, 74, 37, 72, 155, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (34, 'Grey Wolf', 1, 17, 78, 39, 76, 161, 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (35, 'Black Bear', 1, 18, 82, 41, 80, 167, 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (36, 'Knight', 1, 18, 86, 43, 84, 173, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (37, 'Giant', 1, 19, 90, 45, 88, 179, 179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (38, 'Young Wyrm', 1, 19, 94, 47, 92, 185, 185, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (39, 'Lesser Devil', 1, 20, 98, 49, 96, 191, 191, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (40, 'Lesser Demon', 1, 20, 102, 51, 100, 197, 197, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||||
|
INSERT INTO `sx_monsters` VALUES (41, 'Razora', 1, 99, 300, 150, 200, 203, 203, 135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0);
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `sx_pvp`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `sx_pvp` (
|
||||||
|
`id` bigint(20) unsigned NOT NULL auto_increment,
|
||||||
|
`player1id` int(10) unsigned NOT NULL default '0',
|
||||||
|
`player2id` int(10) unsigned NOT NULL default '0',
|
||||||
|
`player1name` varchar(30) NOT NULL default '',
|
||||||
|
`player2name` varchar(30) NOT NULL default '',
|
||||||
|
`playerturn` int(10) unsigned NOT NULL default '0',
|
||||||
|
`accepted` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`turntime` timestamp NOT NULL,
|
||||||
|
`fightrow` text NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `sx_pvp`
|
||||||
|
--
|
||||||
|
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `sx_spells`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `sx_spells` (
|
||||||
|
`id` int(10) unsigned NOT NULL auto_increment,
|
||||||
|
`name` varchar(30) NOT NULL default '',
|
||||||
|
`fname` varchar(30) NOT NULL default '',
|
||||||
|
`value` int(10) unsigned NOT NULL default '0',
|
||||||
|
`mp` int(10) unsigned NOT NULL default '0',
|
||||||
|
`minlevel` int(10) unsigned NOT NULL default '0',
|
||||||
|
`classonly` int(10) unsigned NOT NULL default '0',
|
||||||
|
`classexclude` int(10) unsigned NOT NULL default '0',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `sx_spells`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `sx_spells` VALUES (1, 'Heal 1', 'heal', 5, 2, 5, 2, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (2, 'Heal 2', 'heal', 10, 5, 10, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (3, 'Heal 3', 'heal', 20, 10, 15, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (4, 'Heal 4', 'heal', 30, 15, 20, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (5, 'Heal 5', 'heal', 45, 25, 25, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (6, 'Heal 6', 'heal', 60, 35, 30, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (7, 'Heal 7', 'heal', 80, 50, 35, 3, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (8, 'Heal 8', 'heal', 100, 75, 40, 3, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (9, 'Heal 9', 'heal', 150, 100, 45, 3, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (10, 'Heal 10', 'heal', 200, 150, 50, 3, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (11, 'Hurt 1', 'hurt', 5, 2, 5, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (12, 'Hurt 2', 'hurt', 10, 5, 10, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (13, 'Hurt 3', 'hurt', 15, 7, 15, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (14, 'Hurt 4', 'hurt', 25, 12, 20, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (15, 'Hurt 5', 'hurt', 35, 20, 25, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (16, 'Hurt 6', 'hurt', 50, 30, 30, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (17, 'Hurt 7', 'hurt', 65, 40, 35, 3, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (18, 'Hurt 8', 'hurt', 85, 50, 40, 3, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (19, 'Hurt 9', 'hurt', 105, 65, 45, 3, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (20, 'Hurt 10', 'hurt', 130, 80, 50, 3, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (21, 'Sleep 1', 'sleep', 80, 20, 10, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (22, 'Sleep 2', 'sleep', 60, 35, 20, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (23, 'Sleep 3', 'sleep', 40, 50, 30, 2, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (24, 'Sleep 4', 'sleep', 20, 75, 40, 2, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (25, 'Sleep 5', 'sleep', 5, 100, 50, 2, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (26, 'Fire 1', 'fire', 5, 2, 5, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (27, 'Fire 2', 'fire', 10, 5, 10, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (28, 'Fire 3', 'fire', 15, 7, 15, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (29, 'Fire 4', 'fire', 25, 12, 20, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (30, 'Fire 5', 'fire', 35, 20, 25, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (31, 'Fire 6', 'fire', 50, 30, 30, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (32, 'Fire 7', 'fire', 65, 40, 35, 2, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (33, 'Fire 8', 'fire', 85, 50, 40, 2, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (34, 'Fire 9', 'fire', 105, 65, 45, 2, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (35, 'Fire 10', 'fire', 130, 80, 50, 2, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (36, 'Lightning 1', 'light', 5, 2, 5, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (37, 'Lightning 2', 'light', 10, 5, 10, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (38, 'Lightning 3', 'light', 15, 7, 15, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (39, 'Lightning 4', 'light', 25, 12, 20, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (40, 'Lightning 5', 'light', 35, 20, 25, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (41, 'Lightning 6', 'light', 50, 30, 30, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (42, 'Lightning 7', 'light', 65, 40, 35, 2, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (43, 'Lightning 8', 'light', 85, 50, 40, 2, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (44, 'Lightning 9', 'light', 105, 65, 45, 2, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (45, 'Lightning 10', 'light', 130, 80, 50, 2, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (46, 'Prismatic Blast 1', 'prism', 2, 2, 5, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (47, 'Prismatic Blast 2', 'prism', 5, 5, 10, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (48, 'Prismatic Blast 3', 'prism', 10, 7, 15, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (49, 'Prismatic Blast 4', 'prism', 15, 12, 20, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (50, 'Prismatic Blast 5', 'prism', 15, 20, 25, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (51, 'Prismatic Blast 6', 'prism', 20, 30, 30, 0, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (52, 'Prismatic Blast 7', 'prism', 25, 40, 35, 0, 1);
|
||||||
|
INSERT INTO `sx_spells` VALUES (53, 'Prismatic Blast 8', 'prism', 30, 50, 40, 0, 1);
|
||||||
|
INSERT INTO `sx_spells` VALUES (54, 'Prismatic Blast 9', 'prism', 35, 65, 45, 0, 1);
|
||||||
|
INSERT INTO `sx_spells` VALUES (55, 'Prismatic Blast 10', 'prism', 40, 80, 50, 0, 1);
|
||||||
|
INSERT INTO `sx_spells` VALUES (56, 'Stone Skin 1', 'stone', 5, 10, 10, 1, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (57, 'Stone Skin 2', 'stone', 10, 20, 20, 1, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (58, 'Stone Skin 3', 'stone', 20, 30, 30, 1, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (59, 'Stone Skin 4', 'stone', 35, 40, 40, 1, 0);
|
||||||
|
INSERT INTO `sx_spells` VALUES (60, 'Stone Skin 5', 'stone', 50, 50, 50, 1, 0);
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `sx_towns`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `sx_towns` (
|
||||||
|
`id` tinyint(3) unsigned NOT NULL auto_increment,
|
||||||
|
`name` varchar(30) NOT NULL default '',
|
||||||
|
`world` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`latitude` smallint(6) NOT NULL default '0',
|
||||||
|
`longitude` smallint(6) NOT NULL default '0',
|
||||||
|
`innprice` tinyint(4) NOT NULL default '0',
|
||||||
|
`mapprice` smallint(6) NOT NULL default '0',
|
||||||
|
`travelpoints` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`itemminlvl` int(10) unsigned NOT NULL default '0',
|
||||||
|
`itemmaxlvl` int(10) unsigned NOT NULL default '0',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `sx_towns`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `sx_towns` VALUES (1, 'Middleton', 1, 0, 0, 5, 0, 0, 1, 5);
|
||||||
|
INSERT INTO `sx_towns` VALUES (2, 'Norfolk', 1, 25, 25, 10, 25, 5, 3, 9);
|
||||||
|
INSERT INTO `sx_towns` VALUES (3, 'Calentia', 1, 50, -50, 25, 50, 15, 6, 14);
|
||||||
|
INSERT INTO `sx_towns` VALUES (4, 'Resmark', 1, -75, 75, 40, 100, 30, 11, 19);
|
||||||
|
INSERT INTO `sx_towns` VALUES (5, 'Erdricksburg', 1, 99, 99, 60, 500, 50, 16, 25);
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `sx_users`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `sx_users` (
|
||||||
|
`id` int(10) unsigned NOT NULL auto_increment,
|
||||||
|
`account` int(10) unsigned NOT NULL default '0',
|
||||||
|
`birthdate` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||||
|
`lastip` varchar(16) NOT NULL default '',
|
||||||
|
`onlinetime` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||||
|
`exploreverify` varchar(6) NOT NULL default '',
|
||||||
|
`exploreverifyimage` varchar(12) NOT NULL default '',
|
||||||
|
`explorefailed` int(10) unsigned NOT NULL default '0',
|
||||||
|
`charname` varchar(30) NOT NULL default '',
|
||||||
|
`charclass` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`charpicture` varchar(100) NOT NULL default '',
|
||||||
|
`difficulty` float unsigned NOT NULL default '1',
|
||||||
|
`deathpenalty` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`latitude` smallint(6) NOT NULL default '0',
|
||||||
|
`longitude` smallint(6) NOT NULL default '0',
|
||||||
|
`story` tinyint(3) unsigned NOT NULL default '1',
|
||||||
|
`world` tinyint(3) unsigned NOT NULL default '1',
|
||||||
|
`guild` int(10) unsigned NOT NULL default '0',
|
||||||
|
`guildrank` int(10) unsigned NOT NULL default '0',
|
||||||
|
`guildtag` varchar(4) NOT NULL default '',
|
||||||
|
`tagcolor` varchar(7) NOT NULL default '',
|
||||||
|
`namecolor` varchar(7) NOT NULL default '',
|
||||||
|
`level` smallint(5) unsigned NOT NULL default '1',
|
||||||
|
`levelup` int(10) unsigned NOT NULL default '0',
|
||||||
|
`levelspell` int(10) unsigned NOT NULL default '0',
|
||||||
|
`experience` int(10) unsigned NOT NULL default '0',
|
||||||
|
`expbonus` tinyint(4) NOT NULL default '0',
|
||||||
|
`gold` int(10) unsigned NOT NULL default '150',
|
||||||
|
`goldbonus` tinyint(4) NOT NULL default '0',
|
||||||
|
`bank` int(10) unsigned NOT NULL default '0',
|
||||||
|
`maxhp` smallint(5) unsigned NOT NULL default '15',
|
||||||
|
`maxmp` smallint(5) unsigned NOT NULL default '5',
|
||||||
|
`maxtp` smallint(5) unsigned NOT NULL default '5',
|
||||||
|
`currenthp` smallint(5) unsigned NOT NULL default '15',
|
||||||
|
`currentmp` smallint(5) unsigned NOT NULL default '5',
|
||||||
|
`currenttp` smallint(5) unsigned NOT NULL default '5',
|
||||||
|
`strength` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`dexterity` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`energy` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`physattack` smallint(5) unsigned NOT NULL default '5',
|
||||||
|
`physdefense` smallint(5) unsigned NOT NULL default '5',
|
||||||
|
`magicattack` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`magicdefense` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`fireattack` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`firedefense` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`lightattack` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`lightdefense` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`spellslist` varchar(200) NOT NULL default '0',
|
||||||
|
`townslist` varchar(200) NOT NULL default '0,1',
|
||||||
|
`currentpvp` bigint(20) unsigned NOT NULL default '0',
|
||||||
|
`currentaction` varchar(30) NOT NULL default 'In Town',
|
||||||
|
`currentfight` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`currentmonsterid` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`currentmonsterhp` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`currentmonstersleep` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`item1idstring` varchar(10) NOT NULL default '0',
|
||||||
|
`item2idstring` varchar(10) NOT NULL default '0',
|
||||||
|
`item3idstring` varchar(10) NOT NULL default '0',
|
||||||
|
`item4idstring` varchar(10) NOT NULL default '0',
|
||||||
|
`item5idstring` varchar(10) NOT NULL default '0',
|
||||||
|
`item6idstring` varchar(10) NOT NULL default '0',
|
||||||
|
`item1name` varchar(200) NOT NULL default '',
|
||||||
|
`item2name` varchar(200) NOT NULL default '',
|
||||||
|
`item3name` varchar(200) NOT NULL default '',
|
||||||
|
`item4name` varchar(200) NOT NULL default '',
|
||||||
|
`item5name` varchar(200) NOT NULL default '',
|
||||||
|
`item6name` varchar(200) NOT NULL default '',
|
||||||
|
`spell1id` int(10) unsigned NOT NULL default '0',
|
||||||
|
`spell2id` int(10) unsigned NOT NULL default '0',
|
||||||
|
`spell3id` int(10) unsigned NOT NULL default '0',
|
||||||
|
`spell4id` int(10) unsigned NOT NULL default '0',
|
||||||
|
`spell5id` int(10) unsigned NOT NULL default '0',
|
||||||
|
`spell6id` int(10) unsigned NOT NULL default '0',
|
||||||
|
`spell7id` int(10) unsigned NOT NULL default '0',
|
||||||
|
`spell8id` int(10) unsigned NOT NULL default '0',
|
||||||
|
`spell9id` int(10) unsigned NOT NULL default '0',
|
||||||
|
`spell10id` int(10) unsigned NOT NULL default '0',
|
||||||
|
`spell1name` varchar(30) NOT NULL default '',
|
||||||
|
`spell2name` varchar(30) NOT NULL default '',
|
||||||
|
`spell3name` varchar(30) NOT NULL default '',
|
||||||
|
`spell4name` varchar(30) NOT NULL default '',
|
||||||
|
`spell5name` varchar(30) NOT NULL default '',
|
||||||
|
`spell6name` varchar(30) NOT NULL default '',
|
||||||
|
`spell7name` varchar(30) NOT NULL default '',
|
||||||
|
`spell8name` varchar(30) NOT NULL default '',
|
||||||
|
`spell9name` varchar(30) NOT NULL default '',
|
||||||
|
`spell10name` varchar(30) NOT NULL default '',
|
||||||
|
`hpleech` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`mpleech` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`hpgain` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
`mpgain` tinyint(3) unsigned NOT NULL default '0',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
FULLTEXT KEY `item1name` (`item1name`)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `sx_users`
|
||||||
|
--
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Table structure for table `sx_worlds`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `sx_worlds` (
|
||||||
|
`id` smallint(5) unsigned NOT NULL auto_increment,
|
||||||
|
`name` varchar(30) NOT NULL default '',
|
||||||
|
`size` smallint(5) unsigned NOT NULL default '0',
|
||||||
|
`bossid` mediumint(8) unsigned NOT NULL default '0',
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Dumping data for table `sx_worlds`
|
||||||
|
--
|
||||||
|
|
||||||
|
INSERT INTO `sx_worlds` VALUES (1, 'Raenslide', 100, 1);
|
||||||
|
INSERT INTO `sx_worlds` VALUES (2, 'Lorenfall', 100, 0);
|
||||||
|
INSERT INTO `sx_worlds` VALUES (3, 'Borderlands', 100, 0);
|
||||||
|
INSERT INTO `sx_worlds` VALUES (4, 'Inferno', 100, 0);
|
||||||
|
INSERT INTO `sx_worlds` VALUES (5, 'Unreality', 100, 0);
|
BIN
extras/map.fla
Normal file
BIN
extras/mapmini.fla
Normal file
357
fight.php
Normal file
|
@ -0,0 +1,357 @@
|
||||||
|
<?php // fight.php :: primary fight controller.
|
||||||
|
|
||||||
|
include("lib.php");
|
||||||
|
include("globals.php");
|
||||||
|
include("fightmods.php");
|
||||||
|
|
||||||
|
// Global userrow.
|
||||||
|
global $userrow;
|
||||||
|
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");
|
||||||
|
$monsterrow = dorow($monsterquery);
|
||||||
|
} else {
|
||||||
|
rollmonster();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now we get to the real guts of the game. Yippy skippy.
|
||||||
|
dofight();
|
||||||
|
|
||||||
|
function rollmonster() {
|
||||||
|
|
||||||
|
global $userrow, $monsterrow;
|
||||||
|
if($userrow["latitude"] < 0) { $latitude = $userrow["latitude"] * -1; } else { $latitude = $userrow["latitude"]; }
|
||||||
|
if($userrow["longitude"] < 0) { $longitude = $userrow["longitude"] * -1; } else { $longitude = $userrow["longitude"]; }
|
||||||
|
$maxlevel = ceil(max($latitude, $longitude) / 5);
|
||||||
|
$minlevel = $maxlevel - 3;
|
||||||
|
$monsterquery = doquery("SELECT * FROM {{table}} WHERE world='".$userrow["world"]."' AND level >= $minlevel AND level <= $maxlevel ORDER BY RAND() LIMIT 1", "monsters");
|
||||||
|
$monsterrow = dorow($monsterquery);
|
||||||
|
|
||||||
|
$userrow["currentmonsterhp"] = (ceil(rand($monsterrow["maxhp"] * .75, $monsterrow["maxhp"]) * $userrow["difficulty"]));
|
||||||
|
$userrow["currentmonsterid"] = $monsterrow["id"];
|
||||||
|
$userrow["currentaction"] = "Fighting";
|
||||||
|
updateuserrow();
|
||||||
|
dofight();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function dofight() {
|
||||||
|
|
||||||
|
global $userrow, $monsterrow, $fightrow, $spells;
|
||||||
|
|
||||||
|
if (isset($_POST["fight"])) {
|
||||||
|
|
||||||
|
playerturn();
|
||||||
|
if ($userrow["currentmonsterhp"] <= 0) { youwin(); }
|
||||||
|
monsterturn();
|
||||||
|
if ($userrow["currenthp"] <= 0) { youlose(); }
|
||||||
|
updateuserrow();
|
||||||
|
|
||||||
|
$pagerow = array(
|
||||||
|
"message"=>$fightrow["message"],
|
||||||
|
"monstername"=>$monsterrow["name"],
|
||||||
|
"monsterhp"=>$userrow["currentmonsterhp"],
|
||||||
|
"playerphysdamage"=>$fightrow["playerphysdamage"],
|
||||||
|
"playermagicdamage"=>$fightrow["playermagicdamage"],
|
||||||
|
"playerfiredamage"=>$fightrow["playerfiredamage"],
|
||||||
|
"playerlightdamage"=>$fightrow["playerlightdamage"],
|
||||||
|
"monsterphysdamage"=>$fightrow["monsterphysdamage"],
|
||||||
|
"monstermagicdamage"=>$fightrow["monstermagicdamage"],
|
||||||
|
"monsterfiredamage"=>$fightrow["monsterfiredamage"],
|
||||||
|
"monsterlightdamage"=>$fightrow["monsterlightdamage"]);
|
||||||
|
$pagerow["spells"] = dospellslist();
|
||||||
|
display("Fighting",parsetemplate(gettemplate("fight_turn"),$pagerow));
|
||||||
|
|
||||||
|
} elseif (isset($_POST["spell"])) {
|
||||||
|
|
||||||
|
if (! is_numeric($_POST["spellid"])) { err("Invalid spell selection."); }
|
||||||
|
$isavailable = 0;
|
||||||
|
for ($i = 1; $i < 11; $i++) {
|
||||||
|
if ($userrow["spell".$i."id"] == $_POST["spellid"]) { $isavailable = 1; }
|
||||||
|
}
|
||||||
|
if ($isavailable == 0) { err("You don't have that spell."); }
|
||||||
|
|
||||||
|
include("spells.php");
|
||||||
|
$castspell = $spells[$_POST["spellid"]]["fname"]($_POST["spellid"]);
|
||||||
|
$userrow["currentmonsterhp"] -= ($fightrow["playerphysdamage"] + $fightrow["playermagicdamage"] + $fightrow["playerfiredamage"] + $fightrow["playerlightdamage"]);
|
||||||
|
if ($userrow["currentmonsterhp"] <= 0) { youwin(); }
|
||||||
|
monsterturn();
|
||||||
|
if ($userrow["currenthp"] <= 0) { youlose(); }
|
||||||
|
updateuserrow();
|
||||||
|
|
||||||
|
$pagerow = array(
|
||||||
|
"message"=>$castspell,
|
||||||
|
"monstername"=>$monsterrow["name"],
|
||||||
|
"monsterhp"=>$userrow["currentmonsterhp"],
|
||||||
|
"playerphysdamage"=>$fightrow["playerphysdamage"],
|
||||||
|
"playermagicdamage"=>$fightrow["playermagicdamage"],
|
||||||
|
"playerfiredamage"=>$fightrow["playerfiredamage"],
|
||||||
|
"playerlightdamage"=>$fightrow["playerlightdamage"],
|
||||||
|
"monsterphysdamage"=>$fightrow["monsterphysdamage"],
|
||||||
|
"monstermagicdamage"=>$fightrow["monstermagicdamage"],
|
||||||
|
"monsterfiredamage"=>$fightrow["monsterfiredamage"],
|
||||||
|
"monsterlightdamage"=>$fightrow["monsterlightdamage"]);
|
||||||
|
$pagerow["spells"] = dospellslist();
|
||||||
|
display("Fighting",parsetemplate(gettemplate("fight_turn"),$pagerow));
|
||||||
|
|
||||||
|
} elseif (isset($_POST["run"])) {
|
||||||
|
|
||||||
|
$userrow["currentaction"] = "Exploring";
|
||||||
|
$userrow["currentmonsterid"] = 0;
|
||||||
|
$userrow["currentmonsterhp"] = 0;
|
||||||
|
updateuserrow();
|
||||||
|
die(header("Location: index.php"));
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$pagerow = array(
|
||||||
|
"monstername"=>$monsterrow["name"],
|
||||||
|
"monsterhp"=>$userrow["currentmonsterhp"]);
|
||||||
|
$pagerow["spells"] = dospellslist();
|
||||||
|
display("Fighting",parsetemplate(gettemplate("fight_new"),$pagerow));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function playerturn() {
|
||||||
|
|
||||||
|
global $userrow, $monsterrow, $fightrow;
|
||||||
|
|
||||||
|
// Calculate all damages.
|
||||||
|
if ($userrow["physattack"] != 0) {
|
||||||
|
$physhit = ceil(rand($userrow["physattack"]*.75, $userrow["physattack"]) / 3);
|
||||||
|
$physblock = ceil(rand($monsterrow["physdefense"]*.75, $monsterrow["physdefense"]) / 3);
|
||||||
|
$fightrow["playerphysdamage"] = max($physhit - $physblock, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($userrow["magicattack"] != 0) {
|
||||||
|
$magichit = ceil(rand($userrow["magicattack"]*.75, $userrow["magicattack"]) / 3);
|
||||||
|
$magicblock = ceil(rand($monsterrow["magicdefense"]*.75, $monsterrow["magicdefense"]) / 3);
|
||||||
|
$fightrow["playermagicdamage"] = max($magichit - $magicblock, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($userrow["fireattack"] != 0) {
|
||||||
|
$firehit = ceil(rand($userrow["fireattack"]*.75, $userrow["fireattack"]) / 3);
|
||||||
|
$fireblock = ceil(rand($monsterrow["firedefense"]*.75, $monsterrow["firedefense"]) / 3);
|
||||||
|
$fightrow["playerfiredamage"] = max($firehit - $fireblock, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($userrow["lightattack"] != 0) {
|
||||||
|
$lighthit = ceil(rand($userrow["lightattack"]*.75, $userrow["lightattack"]) / 3);
|
||||||
|
$lightblock = ceil(rand($monsterrow["lightdefense"]*.75, $monsterrow["lightdefense"]) / 3);
|
||||||
|
$fightrow["playerlightdamage"] = max($lighthit - $lightblock, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Chance to make an excellent hit.
|
||||||
|
$toexcellent = rand(0,150);
|
||||||
|
if ($toexcellent <= sqrt($userrow["strength"])) {
|
||||||
|
$fightrow["playerphysdamage"] *= 2;
|
||||||
|
$fightrow["playermagicdamage"] *= 2;
|
||||||
|
$fightrow["playerfiredamage"] *= 2;
|
||||||
|
$fightrow["playerlightdamage"] *= 2;
|
||||||
|
$fightrow["message"] = "<b>Excellent hit!</b><br />";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Chance for monster to dodge.
|
||||||
|
$tododge = rand(0,200);
|
||||||
|
if ($tododge <= sqrt($monsterrow["physdefense"])) {
|
||||||
|
$fightrow["playerphysdamage"] = 0;
|
||||||
|
$fightrow["playermagicdamage"] = 0;
|
||||||
|
$fightrow["playerfiredamage"] = 0;
|
||||||
|
$fightrow["playerlightdamage"] = 0;
|
||||||
|
$fightrow["message"] = "<b>The monster dodged your hit!</b><br />";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now we add Per Turn mods.
|
||||||
|
hpleech("player");
|
||||||
|
mpleech("player");
|
||||||
|
|
||||||
|
// Subtract all damage from monster's hp.
|
||||||
|
$userrow["currentmonsterhp"] -= ($fightrow["playerphysdamage"] + $fightrow["playermagicdamage"] + $fightrow["playerfiredamage"] + $fightrow["playerlightdamage"]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function monsterturn() {
|
||||||
|
|
||||||
|
global $userrow, $monsterrow, $fightrow;
|
||||||
|
|
||||||
|
if ($monsterrow["physattack"] != 0) {
|
||||||
|
$physhit = ceil((rand($monsterrow["physattack"]*.75, $monsterrow["physattack"]) / 3) * $userrow["difficulty"]);
|
||||||
|
$physblock = ceil(rand($userrow["physdefense"]*.75, $userrow["physdefense"]) / 3);
|
||||||
|
$fightrow["monsterphysdamage"] = max($physhit - $physblock, 1); // Have to do at least 1 physical damage.
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($monsterrow["magicattack"] != 0) {
|
||||||
|
$magichit = ceil((rand($monsterrow["magicattack"]*.75, $monsterrow["magicattack"]) / 3) * $userrow["difficulty"]);
|
||||||
|
$magicblock = ceil(rand($userrow["magicdefense"]*.75, $userrow["magicdefense"]) / 3);
|
||||||
|
$fightrow["monstermagicdamage"] = max($magichit - $magicblock, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($monsterrow["fireattack"] != 0) {
|
||||||
|
$firehit = ((rand($monsterrow["fireattack"]*.75, $monsterrow["fireattack"]) / 3) * $userrow["difficulty"]);
|
||||||
|
$fireblock = ceil(rand($userrow["firedefense"]*.75, $userrow["firedefense"]) / 3);
|
||||||
|
$fightrow["monsterfiredamage"] = max($firehit - $fireblock, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($monsterrow["lightattack"] != 0) {
|
||||||
|
$lighthit = ceil((rand($monsterrow["lightattack"]*.75, $monsterrow["lightattack"]) / 3) * $userrow["difficulty"]);
|
||||||
|
$lightblock = ceil(rand($userrow["lightdefense"]*.75, $userrow["lightdefense"]) / 3);
|
||||||
|
$fightrow["monsterlightdamage"] = max($lighthit - $lightblock, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now we add Per Turn mods.
|
||||||
|
hpleech("monster");
|
||||||
|
|
||||||
|
// Subtract all damage from player's hp.
|
||||||
|
$userrow["currenthp"] -= ($fightrow["monsterphysdamage"] + $fightrow["monstermagicdamage"] + $fightrow["monsterfiredamage"] + $fightrow["monsterlightdamage"]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function youwin() {
|
||||||
|
|
||||||
|
global $userrow, $monsterrow, $fightrow;
|
||||||
|
|
||||||
|
$template = "fight_win";
|
||||||
|
|
||||||
|
$newexp = ceil(rand($monsterrow["maxexp"]*.75, $monsterrow["maxexp"]) * (1 + ($userrow["expbonus"] / 100)));
|
||||||
|
$newgold = ceil(rand($monsterrow["maxgold"]*.75, $monsterrow["maxgold"]) * (1 + ($userrow["goldbonus"] / 100)));
|
||||||
|
$userrow["experience"] += $newexp;
|
||||||
|
$userrow["gold"] += $newgold;
|
||||||
|
$userrow["currentaction"] = "Exploring";
|
||||||
|
$userrow["currentfight"] = 0;
|
||||||
|
$userrow["currentmonsterid"] = 0;
|
||||||
|
$userrow["currentmonsterhp"] = 0;
|
||||||
|
if ($monsterrow["boss"] == 1) {
|
||||||
|
$userrow["story"]++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now we add Per Kill mods.
|
||||||
|
hpgain();
|
||||||
|
mpgain();
|
||||||
|
|
||||||
|
// Check for new levelup.
|
||||||
|
if ($userrow["experience"] >= dolevels($userrow["level"]+1)) {
|
||||||
|
$template = "fight_levelup";
|
||||||
|
$userrow["level"]++;
|
||||||
|
$userrow["levelup"] += 5;
|
||||||
|
$userrow["maxtp"] += 5;
|
||||||
|
$userrow["currenthp"] = $userrow["maxhp"];
|
||||||
|
$userrow["currentmp"] = $userrow["maxmp"];
|
||||||
|
$userrow["currenttp"] = $userrow["maxtp"];
|
||||||
|
if (($userrow["level"] % 5 == 0)) { $userrow["levelspell"]++; $template = "fight_levelupspell"; }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update for new stats.
|
||||||
|
updateuserrow();
|
||||||
|
|
||||||
|
// And we're done.
|
||||||
|
$pagerow = array(
|
||||||
|
"message"=>$fightrow["message"],
|
||||||
|
"monstername"=>$monsterrow["name"],
|
||||||
|
"monsterhp"=>$userrow["currentmonsterhp"],
|
||||||
|
"playerphysdamage"=>$fightrow["playerphysdamage"],
|
||||||
|
"playermagicdamage"=>$fightrow["playermagicdamage"],
|
||||||
|
"playerfiredamage"=>$fightrow["playerfiredamage"],
|
||||||
|
"playerlightdamage"=>$fightrow["playerlightdamage"],
|
||||||
|
"monsterphysdamage"=>$fightrow["monsterphysdamage"],
|
||||||
|
"monstermagicdamage"=>$fightrow["monstermagicdamage"],
|
||||||
|
"monsterfiredamage"=>$fightrow["monsterfiredamage"],
|
||||||
|
"monsterlightdamage"=>$fightrow["monsterlightdamage"],
|
||||||
|
"newexp"=>$newexp,
|
||||||
|
"newgold"=>$newgold);
|
||||||
|
display("Victory!",parsetemplate(gettemplate($template),$pagerow));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function youlose() {
|
||||||
|
|
||||||
|
global $userrow, $monsterrow, $fightrow;
|
||||||
|
|
||||||
|
// First take away half the gold.
|
||||||
|
$userrow["gold"] = ceil($userrow["gold"] / 2);
|
||||||
|
|
||||||
|
// Then take away experience.
|
||||||
|
$thislevel = dolevels($userrow["level"]);
|
||||||
|
$nextlevel = dolevels($userrow["level"]+1);
|
||||||
|
$userrow["experience"] -= ceil((($nextlevel - $thislevel) / 100) * $userrow["deathpenalty"]);
|
||||||
|
|
||||||
|
// And we're done.
|
||||||
|
$pagerow = array(
|
||||||
|
"message"=>$fightrow["message"],
|
||||||
|
"monstername"=>$monsterrow["name"],
|
||||||
|
"monsterhp"=>$userrow["currentmonsterhp"],
|
||||||
|
"playerphysdamage"=>$fightrow["playerphysdamage"],
|
||||||
|
"playermagicdamage"=>$fightrow["playermagicdamage"],
|
||||||
|
"playerfiredamage"=>$fightrow["playerfiredamage"],
|
||||||
|
"playerlightdamage"=>$fightrow["playerlightdamage"],
|
||||||
|
"monsterphysdamage"=>$fightrow["monsterphysdamage"],
|
||||||
|
"monstermagicdamage"=>$fightrow["monstermagicdamage"],
|
||||||
|
"monsterfiredamage"=>$fightrow["monsterfiredamage"],
|
||||||
|
"monsterlightdamage"=>$fightrow["monsterlightdamage"],
|
||||||
|
"deathpenalty"=>$userrow["deathpenalty"]);
|
||||||
|
|
||||||
|
// Then put them in town & reset fight stuff.
|
||||||
|
$userrow["latitude"] = 0;
|
||||||
|
$userrow["longitude"] = 0;
|
||||||
|
$userrow["currentaction"] = "In Town";
|
||||||
|
$userrow["currentfight"] = 0;
|
||||||
|
$userrow["currentmonsterid"] = 0;
|
||||||
|
$userrow["currentmonsterhp"] = 0;
|
||||||
|
$userrow["currenthp"] = ceil($userrow["maxhp"] / 4);
|
||||||
|
|
||||||
|
// Update.
|
||||||
|
updateuserrow();
|
||||||
|
|
||||||
|
display("Thou Art Dead.",parsetemplate(gettemplate("fight_lose"),$pagerow));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function dolevels($level) {
|
||||||
|
|
||||||
|
$leveltotal = 15;
|
||||||
|
$leveladd = 15;
|
||||||
|
$i = 2;
|
||||||
|
while ($i < $level) {
|
||||||
|
$levelstart = $leveltotal;
|
||||||
|
if ($i < 4) {
|
||||||
|
$leveladd = ceil($leveladd * 2.0);
|
||||||
|
} elseif ($i < 13) {
|
||||||
|
$leveladd = floor($leveladd * 1.45);
|
||||||
|
} elseif ($i < 40) {
|
||||||
|
$leveladd = floor($leveladd * 1.20);
|
||||||
|
} elseif ($i < 60) {
|
||||||
|
$leveladd = 150000;
|
||||||
|
} elseif ($i < 80) {
|
||||||
|
$leveladd = 200000;
|
||||||
|
} elseif ($i < 100) {
|
||||||
|
$leveladd = 300000;
|
||||||
|
} elseif ($i >= 100) {
|
||||||
|
$leveladd = 500000;
|
||||||
|
}
|
||||||
|
$leveltotal = $levelstart + $leveladd;
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
return $leveltotal;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function dospellslist() {
|
||||||
|
|
||||||
|
global $userrow, $spells;
|
||||||
|
$options = "";
|
||||||
|
for ($i = 1; $i < 11; $i++) {
|
||||||
|
if ($userrow["spell".$i."id"] != 0) {
|
||||||
|
$options .= "<option value=\"".$userrow["spell".$i."id"]."\">".$userrow["spell".$i."name"]."</option>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($options != "") {
|
||||||
|
$list = "<select name=\"spellid\">$options</select> <input type=\"submit\" name=\"spell\" value=\"Cast Spell\" />";
|
||||||
|
} else { $list = "<input type=\"submit\" name=\"spell\" value=\"Cast Spell\" disabled=\"disabled\" />"; }
|
||||||
|
return $list;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
64
fightmods.php
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
<?php // fightmods.php :: functions for modifiers granted to you by items.
|
||||||
|
|
||||||
|
function hpleech($player) {
|
||||||
|
|
||||||
|
/***********
|
||||||
|
Description: A percentage of the final damage is given back to the player's HP.
|
||||||
|
Occurs: Per Turn.
|
||||||
|
Applies To: Player or Monster.
|
||||||
|
***********/
|
||||||
|
|
||||||
|
global $userrow, $fightrow, $monsterrow;
|
||||||
|
if ($player == "player") {
|
||||||
|
$userrow["currenthp"] += floor(($fightrow["playerphysdamage"]+$fightrow["playermagicdamage"]+$fightrow["playerfiredamage"]+$fightrow["playerlightdamage"]) * ($userrow["hpleech"]/100));
|
||||||
|
if ($userrow["currenthp"] > $userrow["maxhp"]) { $userrow["currenthp"] = $userrow["maxhp"]; }
|
||||||
|
} else {
|
||||||
|
$userrow["currentmonsterhp"] += floor(($fightrow["monsterphysdamage"]+$fightrow["monstermagicdamage"]+$fightrow["monsterfiredamage"]+$fightrow["monsterlightdamage"]) * ($monsterrow["hpleech"]/100));
|
||||||
|
if ($userrow["currentmonsterhp"] > $monsterrow["maxhp"]) { $userrow["currentmonsterhp"] = $monsterrow["maxhp"]; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function mpleech() {
|
||||||
|
|
||||||
|
/***********
|
||||||
|
Description: A percentage of the final damage is given back to the player's MP.
|
||||||
|
Occurs: Per Turn.
|
||||||
|
Applies To: Player only.
|
||||||
|
***********/
|
||||||
|
|
||||||
|
global $userrow, $fightrow;
|
||||||
|
$userrow["currentmp"] += floor(($fightrow["playerphysdamage"]+$fightrow["playermagicdamage"]+$fightrow["playerfiredamage"]+$fightrow["playerlightdamage"]) * ($userrow["mpleech"]/100));
|
||||||
|
if ($userrow["currentmp"] > $userrow["maxmp"]) { $userrow["currentmp"] = $userrow["maxmp"]; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function hpgain() {
|
||||||
|
|
||||||
|
/***********
|
||||||
|
Description: A fixed number is added to player's HP.
|
||||||
|
Occurs: Per Kill.
|
||||||
|
Applies To: Player only.
|
||||||
|
***********/
|
||||||
|
|
||||||
|
global $userrow, $fightrow;
|
||||||
|
$userrow["currenthp"] += $userrow["hpgain"];
|
||||||
|
if ($userrow["currenthp"] > $userrow["maxhp"]) { $userrow["currenthp"] = $userrow["maxhp"]; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function mpgain() {
|
||||||
|
|
||||||
|
/***********
|
||||||
|
Description: A fixed number is added to player's MP.
|
||||||
|
Occurs: Per Kill.
|
||||||
|
Applies To: Player only.
|
||||||
|
***********/
|
||||||
|
|
||||||
|
global $userrow, $fightrow;
|
||||||
|
$userrow["currentmp"] += $userrow["mpgain"];
|
||||||
|
if ($userrow["currentmp"] > $userrow["maxmp"]) { $userrow["currentmp"] = $userrow["maxmp"]; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
50
globals.php
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
<?php // globals.php :: Storage for lots of super important arrays we're probably going to need eventually.
|
||||||
|
|
||||||
|
// Config.php.
|
||||||
|
include("config.php");
|
||||||
|
if (trim($dbsettings["secretword"]) == "") { die("Invalid setting for secretword in config.php. This setting must never be blank."); }
|
||||||
|
|
||||||
|
// Control row.
|
||||||
|
$controlrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='1' LIMIT 1", "control"));
|
||||||
|
|
||||||
|
// Account row.
|
||||||
|
include("cookies.php");
|
||||||
|
$acctrow = checkcookies();
|
||||||
|
if ($acctrow == false && substr($_SERVER["REQUEST_URI"], -21) != "users.php?do=register") { die(header("Location: login.php?do=login")); }
|
||||||
|
if ($acctrow != false && $acctrow["characters"] == 0 && substr($_SERVER["REQUEST_URI"], -20) != "users.php?do=charnew") { die(header("Location: users.php?do=charnew")); }
|
||||||
|
|
||||||
|
// User row.
|
||||||
|
$online = doquery("UPDATE {{table}} SET onlinetime=NOW() WHERE id='".$acctrow["activechar"]."' LIMIT 1", "users");
|
||||||
|
$userrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$acctrow["activechar"]."' LIMIT 1", "users"));
|
||||||
|
|
||||||
|
// World row.
|
||||||
|
$worldrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["world"]."' LIMIT 1", "worlds"));
|
||||||
|
|
||||||
|
// 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"));
|
||||||
|
} else {
|
||||||
|
$townrow = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Spells.
|
||||||
|
// Can't use dorow because we need ID numbers as array indexes.
|
||||||
|
$spells = array();
|
||||||
|
$spellsquery = doquery("SELECT * FROM {{table}} ORDER BY id", "spells");
|
||||||
|
while ($row = mysql_fetch_array($spellsquery, MYSQL_ASSOC)) {
|
||||||
|
$spells[$row["id"]] = $row;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Global fightrow.
|
||||||
|
$fightrow = array(
|
||||||
|
"playerphysdamage"=>0,
|
||||||
|
"playermagicdamage"=>0,
|
||||||
|
"playerfiredamage"=>0,
|
||||||
|
"playerlightdamage"=>0,
|
||||||
|
"monsterphysdamage"=>0,
|
||||||
|
"monstermagicdamage"=>0,
|
||||||
|
"monsterfiredamage"=>0,
|
||||||
|
"monsterlightdamage"=>0,
|
||||||
|
"message"=>"");
|
||||||
|
|
||||||
|
?>
|
484
guilds.php
Normal file
|
@ -0,0 +1,484 @@
|
||||||
|
<?php // guilds.php :: All guild/clan functions.
|
||||||
|
|
||||||
|
// Before allowing anything else, we make sure the person is actually in town.
|
||||||
|
global $townrow;
|
||||||
|
if ($townrow == false) { die(header("Location: index.php")); }
|
||||||
|
|
||||||
|
function guildmain() {
|
||||||
|
|
||||||
|
global $userrow;
|
||||||
|
|
||||||
|
if ($userrow["guild"] != 0) {
|
||||||
|
if (!isset($_GET["list"])) { guildhome(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
$guilds = doquery("SELECT * FROM {{table}} WHERE isactive='1' ORDER BY name", "guilds");
|
||||||
|
$row["guildlist"] = "<table style=\"width: 95%;\" cellspacing=\"0\" cellpadding=\"0\">";
|
||||||
|
$bgcolor = "background-color: #ffffff;";
|
||||||
|
if (mysql_num_rows($guilds) > 0) {
|
||||||
|
while ($guildrow = mysql_fetch_array($guilds)) {
|
||||||
|
$row["guildlist"] .= "<tr><td style=\"$bgcolor padding: 3px;\">[<span style=\"color: ".$guildrow["color1"].";\"><b>".$guildrow["tagline"]."</b></span>] <span style=\"color: ".$guildrow["color2"].";\"><b>".$guildrow["name"]."</b></span></td><td style=\"$bgcolor padding: 3px; text-align: right;\"><a href=\"index.php?do=guildapp&id=".$guildrow["id"]."\">Apply to Join</a> | <a href=\"index.php?do=guildmembers&id=".$guildrow["id"]."\">Member List</a></td></tr>\n";
|
||||||
|
if ($bgcolor == "background-color: #ffffff;") { $bgcolor = "background-color: #dddddd;"; } else { $bgcolor = "background-color: #ffffff;"; }
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$row["guildlist"] .= "<tr><td>No Guilds have been created yet.</td></tr>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$row["guildlist"] .= "</table><br />";
|
||||||
|
display("Guild Hall", parsetemplate(gettemplate("guild_list"), $row));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function guildhome() {
|
||||||
|
|
||||||
|
global $userrow;
|
||||||
|
|
||||||
|
if ($userrow["guild"] == 0) { err("You are not yet a member of any Guild. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
$guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds"));
|
||||||
|
|
||||||
|
switch($userrow["guildrank"]) {
|
||||||
|
case 1: $template = "guild_homelow"; break;
|
||||||
|
case 2: $template = "guild_homelow"; break;
|
||||||
|
case 3: $template = "guild_homelow"; break;
|
||||||
|
case 4: $template = "guild_homemid"; break;
|
||||||
|
case 5: $template = "guild_homehigh"; break;
|
||||||
|
default: $template = "guild_homelow"; break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Setup Babblebox.
|
||||||
|
$pagerow["babblebox"] = "<div class=\"big\"><b>Guild Babblebox</b></div>\n<iframe src=\"index.php?do=babblebox&g=".$userrow["guild"]."\" name=\"sbox\" width=\"100%\" height=\"200\" frameborder=\"0\" id=\"bbox\">Your browser does not support inline frames! The Babble Box will not be available until you upgrade to a newer <a href=\"http://www.mozilla.org\" target=\"_new\">browser</a>.</iframe>";
|
||||||
|
|
||||||
|
// Setup Bank.
|
||||||
|
$pagerow["bank"] = number_format($guild["bank"]);
|
||||||
|
|
||||||
|
// Pull memberslist for select box.
|
||||||
|
$members = doquery("SELECT * FROM {{table}} WHERE guild='".$userrow["guild"]."' ORDER BY guildrank", "users");
|
||||||
|
$pagerow["memberselect"] = "<select name=\"charid\" style=\"font: 10px Arial;\">";
|
||||||
|
while ($memrow = mysql_fetch_array($members)) {
|
||||||
|
$pagerow["memberselect"] .= "<option value=\"".$memrow["id"]."\">".$memrow["charname"]." (Rank ".$memrow["guildrank"].")</option>\n";
|
||||||
|
}
|
||||||
|
$pagerow["memberselect"] .= "</select>";
|
||||||
|
|
||||||
|
// Pull applications for selectbox.
|
||||||
|
$apps = doquery("SELECT * FROM {{table}} WHERE guild='".$userrow["guild"]."' ORDER BY id", "guildapps");
|
||||||
|
if (mysql_num_rows($apps) > 0) {
|
||||||
|
$pagerow["appselect"] = "<select name=\"charid\" style=\"font: 10px Arial;\">";
|
||||||
|
while ($approw = mysql_fetch_array($apps)) {
|
||||||
|
$pagerow["appselect"] .= "<option value=\"".$approw["charid"]."\">".$approw["charname"]."</option>\n";
|
||||||
|
}
|
||||||
|
$pagerow["appselect"] .= "</select><br /><input type=\"submit\" name=\"approve\" value=\"Approve\" /> <input type=\"submit\" name=\"deny\" value=\"Deny\" />";
|
||||||
|
} else {
|
||||||
|
$pagerow["appselect"] = "No new applications.";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set up everything else.
|
||||||
|
if (trim($guild["news"]) != "") {
|
||||||
|
$pagerow["news"] = nl2br($guild["news"]);
|
||||||
|
} else { $pagerow["news"] = "No news yet."; }
|
||||||
|
|
||||||
|
$title = "[".$guild["tagline"]."] ".$guild["name"];
|
||||||
|
display($title, parsetemplate(gettemplate($template),$pagerow));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function guildcreate() {
|
||||||
|
|
||||||
|
global $controlrow, $userrow;
|
||||||
|
|
||||||
|
// Errors.
|
||||||
|
if ($userrow["gold"] < $controlrow["guildstartup"]) { err("You do not have enough gold to create a Guild. Starting your own Guild requires ".number_format($controlrow["guildstartup"])." gold. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($userrow["guild"] != 0) { err("You are already a member of another Guild. You must renounce your current membership before starting your own Guild. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
$appquery = doquery("SELECT * FROM {{table}} WHERE charid='".$userrow["id"]."' LIMIT 1", "guildapps");
|
||||||
|
if (mysql_num_rows($appquery) != 0) { err("You have already applied to join another Guild. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
|
||||||
|
if (isset($_POST["submit"])) {
|
||||||
|
|
||||||
|
extract($_POST);
|
||||||
|
|
||||||
|
// Errors.
|
||||||
|
$errors = 0; $errorlist = "";
|
||||||
|
if (preg_match("/[^A-z\ 0-9_\-]/", $name)==1) { $errors++; $errorlist .= "Guild names can only contain letters, numbers, spaces and hyphens.<br />"; } // Thanks to "Carlos Pires" from php.net!
|
||||||
|
if (preg_match("/[^A-z\ 0-9_\-]/", $rank1)==1) { $errors++; $errorlist .= "Rank 1 can only contain letters, numbers, spaces and hyphens.<br />"; } // Thanks to "Carlos Pires" from php.net!
|
||||||
|
if (preg_match("/[^A-z\ 0-9_\-]/", $rank2)==1) { $errors++; $errorlist .= "Rank 2 can only contain letters, numbers, spaces and hyphens.<br />"; } // Thanks to "Carlos Pires" from php.net!
|
||||||
|
if (preg_match("/[^A-z\ 0-9_\-]/", $rank3)==1) { $errors++; $errorlist .= "Rank 3 can only contain letters, numbers, spaces and hyphens.<br />"; } // Thanks to "Carlos Pires" from php.net!
|
||||||
|
if (preg_match("/[^A-z\ 0-9_\-]/", $rank4)==1) { $errors++; $errorlist .= "Rank 4 can only contain letters, numbers, spaces and hyphens.<br />"; } // Thanks to "Carlos Pires" from php.net!
|
||||||
|
if (preg_match("/[^A-z\ 0-9_\-]/", $rank5)==1) { $errors++; $errorlist .= "Rank 5 can only contain letters, numbers, spaces and hyphens.<br />"; } // Thanks to "Carlos Pires" from php.net!
|
||||||
|
if (preg_match("/[^A-z0-9_\-]/", $tagline)==1) { $errors++; $errorlist .= "Guild taglines must be alphanumeric.<br />"; } // Thanks to "Carlos Pires" from php.net!
|
||||||
|
if (trim($name) == "") { $errors++; $errorlist .= "Guild name is required.<br />"; }
|
||||||
|
if (trim($tagline) == "") { $errors++; $errorlist .= "Tagline is required.<br />"; }
|
||||||
|
if (trim($color1) == "#") { $errors++; $errorlist .= "Tagline color is required.<br />"; }
|
||||||
|
if (strlen($color1) < 7) { $errors++; $errorlist .= "Tagline color must be 7 characters long.<br />"; }
|
||||||
|
if (trim($color2) == "#") { $errors++; $errorlist .= "Name color is required.<br />"; }
|
||||||
|
if (strlen($color2) < 7) { $errors++; $errorlist .= "Name color must be 7 characters long.<br />"; }
|
||||||
|
if (trim($joincost) == "") { $errors++; $errorlist .= "Cost to join is required.<br />"; }
|
||||||
|
if (!is_numeric($joincost)) { $errors++; $errorlist .= "Cost to join must be a number.<br />"; }
|
||||||
|
if (trim($rank1) == "") { $errors++; $errorlist .= "Rank 1 is required.<br />"; }
|
||||||
|
if (trim($rank2) == "") { $errors++; $errorlist .= "Rank 2 is required.<br />"; }
|
||||||
|
if (trim($rank3) == "") { $errors++; $errorlist .= "Rank 3 is required.<br />"; }
|
||||||
|
if (trim($rank4) == "") { $errors++; $errorlist .= "Rank 4 is required.<br />"; }
|
||||||
|
if (trim($rank5) == "") { $errors++; $errorlist .= "Rank 5 is required.<br />"; }
|
||||||
|
|
||||||
|
// Should be fine. Go on and create it.
|
||||||
|
if ($errors == 0) {
|
||||||
|
$querystring = "";
|
||||||
|
unset($_POST["submit"]);
|
||||||
|
foreach($_POST as $a => $b) {
|
||||||
|
$querystring .= "$a='$b',";
|
||||||
|
}
|
||||||
|
$querystring .= "id='',isactive='1',founder='".$userrow["id"]."', members='1'";
|
||||||
|
$query = doquery("INSERT INTO {{table}} SET $querystring", "guilds");
|
||||||
|
|
||||||
|
// Now update the Founder's userrow.
|
||||||
|
$query = doquery("UPDATE {{table}} SET gold=gold-".$controlrow["guildstartup"].", guild='".mysql_insert_id()."',guildrank='5',guildtag='$tagline',tagcolor='$color1',namecolor='$color2' WHERE id='".$userrow["id"]."' LIMIT 1", "users");
|
||||||
|
|
||||||
|
// And we're done.
|
||||||
|
display("Create a Guild", "Your guild was successfully created.<br /><br />You may now return to <a href=\"index.php\">the game</a>.");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// Die gracefully on errors.
|
||||||
|
err("The following error(s) occurred when your account was being made:<br /><span style=\"color:red;\">$errorlist</span><br />Please <a href=\"users.php?do=register\">go back</a> and try again.");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$row["guildstartup"] = number_format($controlrow["guildstartup"]);
|
||||||
|
display("Create a Guild", parsetemplate(gettemplate("guild_create"), $row));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function guildedit() {
|
||||||
|
|
||||||
|
global $userrow;
|
||||||
|
|
||||||
|
$guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds"));
|
||||||
|
|
||||||
|
// Errors.
|
||||||
|
if ($userrow["guildrank"] < 5) { err("You do not have permission to edit the Guild settings. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
|
||||||
|
if (isset($_POST["submit"])) {
|
||||||
|
|
||||||
|
extract($_POST);
|
||||||
|
|
||||||
|
// Errors.
|
||||||
|
$errors = 0; $errorlist = "";
|
||||||
|
if (preg_match("/[^A-z\ 0-9_\-]/", $rank1)==1) { $errors++; $errorlist .= "Rank 1 can only contain letters, numbers, spaces and hyphens.<br />"; } // Thanks to "Carlos Pires" from php.net!
|
||||||
|
if (preg_match("/[^A-z\ 0-9_\-]/", $rank2)==1) { $errors++; $errorlist .= "Rank 2 can only contain letters, numbers, spaces and hyphens.<br />"; } // Thanks to "Carlos Pires" from php.net!
|
||||||
|
if (preg_match("/[^A-z\ 0-9_\-]/", $rank3)==1) { $errors++; $errorlist .= "Rank 3 can only contain letters, numbers, spaces and hyphens.<br />"; } // Thanks to "Carlos Pires" from php.net!
|
||||||
|
if (preg_match("/[^A-z\ 0-9_\-]/", $rank4)==1) { $errors++; $errorlist .= "Rank 4 can only contain letters, numbers, spaces and hyphens.<br />"; } // Thanks to "Carlos Pires" from php.net!
|
||||||
|
if (preg_match("/[^A-z\ 0-9_\-]/", $rank5)==1) { $errors++; $errorlist .= "Rank 5 can only contain letters, numbers, spaces and hyphens.<br />"; } // Thanks to "Carlos Pires" from php.net!
|
||||||
|
//if (preg_match("/#[a-fA-F0-9]/", $color1)==1) { $errors++; $errorlist .= "Tagline color does not appear to be a valid HTML color code.<br />"; }
|
||||||
|
//if (preg_match("/#[a-fA-F0-9]/", $color2)==1) { $errors++; $errorlist .= "Name color does not appear to be a valid HTML color code.<br />"; }
|
||||||
|
if (trim($color1) == "#") { $errors++; $errorlist .= "Tagline color is required.<br />"; }
|
||||||
|
if (strlen($color1) != 7) { $errors++; $errorlist .= "Tagline color must be 7 characters long.<br />"; }
|
||||||
|
if (trim($color2) == "#") { $errors++; $errorlist .= "Name color is required.<br />"; }
|
||||||
|
if (strlen($color2) != 7) { $errors++; $errorlist .= "Name color must be 7 characters long.<br />"; }
|
||||||
|
if (trim($joincost) == "") { $errors++; $errorlist .= "Cost to join is required.<br />"; }
|
||||||
|
if (!is_numeric($joincost)) { $errors++; $errorlist .= "Cost to join must be a number.<br />"; }
|
||||||
|
if (trim($rank1) == "") { $errors++; $errorlist .= "Rank 1 is required.<br />"; }
|
||||||
|
if (trim($rank2) == "") { $errors++; $errorlist .= "Rank 2 is required.<br />"; }
|
||||||
|
if (trim($rank3) == "") { $errors++; $errorlist .= "Rank 3 is required.<br />"; }
|
||||||
|
if (trim($rank4) == "") { $errors++; $errorlist .= "Rank 4 is required.<br />"; }
|
||||||
|
if (trim($rank5) == "") { $errors++; $errorlist .= "Rank 5 is required.<br />"; }
|
||||||
|
|
||||||
|
// Should be fine. Go on and create it.
|
||||||
|
if ($errors == 0) {
|
||||||
|
$querystring = "";
|
||||||
|
unset($_POST["submit"]);
|
||||||
|
foreach($_POST as $a => $b) {
|
||||||
|
$querystring .= "$a='$b',";
|
||||||
|
}
|
||||||
|
$querystring .= "id=id";
|
||||||
|
$query = doquery("UPDATE {{table}} SET $querystring WHERE id='".$guild["id"]."'", "guilds");
|
||||||
|
$updatemem = doquery("UPDATE {{table}} SET namecolor='$color2', tagcolor='$color1' WHERE guild='".$guild["id"]."'", "users");
|
||||||
|
|
||||||
|
// And we're done.
|
||||||
|
display("Edit Guild", "Your guild was successfully edited.<br /><br />You may now return to <a href=\"index.php\">town</a> or to your <a href=\"index.php?do=guildhome\">Guild Hall</a>.");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// Die gracefully on errors.
|
||||||
|
err("The following error(s) occurred when your account was being made:<br /><span style=\"color:red;\">$errorlist</span><br />Please <a href=\"users.php?do=register\">go back</a> and try again.");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
display("Edit Guild", parsetemplate(gettemplate("guild_edit"), $guild));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function guildapp() {
|
||||||
|
|
||||||
|
global $userrow;
|
||||||
|
|
||||||
|
$id = $_GET["id"];
|
||||||
|
if (!is_numeric($id)) { err("Invalid input. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
$guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='$id' LIMIT 1", "guilds"));
|
||||||
|
if ($guild == false) { err("Invalid input. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
|
||||||
|
// Errors.
|
||||||
|
if ($userrow["gold"] < $guild["joincost"]) { err("You do not have enough gold to join this Guild. Joining this Guild requires ".number_format($guild["joincost"])." gold. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($userrow["guild"] != 0) { err("You are already a member of another Guild. You must renounce your current membership before joining this Guild. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
$appquery = doquery("SELECT * FROM {{table}} WHERE charid='".$userrow["id"]."' LIMIT 1", "guildapps");
|
||||||
|
if (mysql_num_rows($appquery) != 0) { err("You have already applied to join another Guild. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
|
||||||
|
if (isset($_POST["yes"])) {
|
||||||
|
|
||||||
|
$query = doquery("INSERT INTO {{table}} SET id='',guild='$id',charid='".$userrow["id"]."',charname='".$userrow["charname"]."'", "guildapps");
|
||||||
|
$update = doquery("UPDATE {{table}} SET bank=bank+".$guild["joincost"]." WHERE id='".$guild["id"]."' LIMIT 1", "guilds");
|
||||||
|
$updatemem = doquery("UPDATE {{table}} SET gold=gold-".$guild["joincost"]." WHERE id='".$userrow["id"]."' LIMIT 1", "users");
|
||||||
|
$send = doquery("INSERT INTO {{table}} SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='".$guild["founder"]."', recipientname='Guild Leader', status='0', title='New Guild Application', message='Someone has applied to join your Guild.<br /><br /><b>Do not reply to this message!</b>', gold='0'", "messages");
|
||||||
|
display("Join a Guild", "Thank you for applying to this Guild. If the Guild Leader approves your application, you will be notified via the Post Office.<br /><br />You may now return to <a href=\"index.php\">the game</a>.");
|
||||||
|
|
||||||
|
} elseif (isset($_POST["no"])) {
|
||||||
|
|
||||||
|
die(header("Location: index.php?do=guilds"));
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$guild["joincost"] = number_format($guild["joincost"]);
|
||||||
|
$guild["statement"] = nl2br($guild["statement"]);
|
||||||
|
display("Join a Guild", parsetemplate(gettemplate("guild_apply"), $guild));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function guildmembers() {
|
||||||
|
|
||||||
|
$id = $_GET["id"];
|
||||||
|
if (!is_numeric($id)) { err("Invalid input. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
$guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='$id' LIMIT 1", "guilds"));
|
||||||
|
if ($guild == false) { err("Invalid input. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
|
||||||
|
$query = doquery("SELECT * FROM {{table}} WHERE guild='$id' ORDER BY guildrank DESC", "users");
|
||||||
|
$row["guildmembers"] = "<table style=\"width: 95%;\" cellspacing=\"0\" cellpadding=\"0\"><tr><td style=\"background-color: #dddddd; padding: 3px;\"><b>Name</b></td><td style=\"background-color: #dddddd; padding: 3px; text-align: right;\"><b>Rank</b></td></tr>\n";
|
||||||
|
$bgcolor = "background-color: #ffffff;";
|
||||||
|
if (mysql_num_rows($query) > 0) {
|
||||||
|
while ($guildrow = mysql_fetch_array($query)) {
|
||||||
|
$row["guildmembers"] .= "<tr><td style=\"$bgcolor padding: 3px;\">[<span style=\"color: ".$guild["color1"].";\"><b>".$guild["tagline"]."</b></span>]<span style=\"color: ".$guild["color2"].";\"><b>".$guildrow["charname"]."</b></span></td><td style=\"$bgcolor padding: 3px; text-align: right;\">".$guild["rank".$guildrow["guildrank"]]."</td></tr>\n";
|
||||||
|
if ($bgcolor == "background-color: #ffffff;") { $bgcolor = "background-color: #dddddd;"; } else { $bgcolor = "background-color: #ffffff;"; }
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$row["guildmembers"] .= "<tr><td>This Guild has no members yet.</td></tr>";
|
||||||
|
}
|
||||||
|
$row["guildmembers"] .= "</table><br />";
|
||||||
|
$row["name"] = $guild["name"];
|
||||||
|
display("Guild Hall", parsetemplate(gettemplate("guild_members"), $row));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function guildbank() {
|
||||||
|
|
||||||
|
global $userrow;
|
||||||
|
extract($_POST);
|
||||||
|
|
||||||
|
$guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds"));
|
||||||
|
|
||||||
|
|
||||||
|
if (isset($_POST["out"])) {
|
||||||
|
|
||||||
|
$member = dorow(doquery("SELECT * FROM {{table}} WHERE id='$charid' LIMIT 1", "users"));
|
||||||
|
|
||||||
|
// Errors.
|
||||||
|
if ($userrow["guildrank"] < 4) { err("You do not have permission to distribute Guild funds. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if (!is_numeric($charid)) { err("Invalid input. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if (!is_numeric($gold)) { err("Invalid input. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($gold < 0) { err("You can't send a negative amount of gold. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($gold > $guild["bank"]) { err("Your Guild does not have that much gold in the bank. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($member == false) { err("Invalid input. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($member["guild"] != $userrow["guild"]) { err("That player is not in your Guild. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($member["id"] == $userrow["id"]) { err("You cannot send Guild money to yourself. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
|
||||||
|
// Do stuff.
|
||||||
|
$send = doquery("INSERT INTO {{table}} SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='$charid', recipientname='".$member["charname"]."', status='0', title='Money from your Guild', message='Your Guild has sent you money from the Guild Bank.<br /><br /><b>Do not reply to this message!</b>', gold='$gold'", "messages");
|
||||||
|
$update = doquery("UPDATE {{table}} SET bank=bank-$gold WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds");
|
||||||
|
display("Post Office", gettemplate("mailbox_sent"));
|
||||||
|
|
||||||
|
} elseif (isset($_POST["in"])) {
|
||||||
|
|
||||||
|
// Errors.
|
||||||
|
if (!is_numeric($_POST["golddeposit"])) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($_POST["golddeposit"] < 1) { err("Deposit amount must be greater than 0."); }
|
||||||
|
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");
|
||||||
|
display("Guild Bank", "Thank you for depositing money to the Guild Bank.<br /><br />You may now return to <a href=\"index.php\">Town</a> or to your <a href=\"index.php?do=guildhome\">Guild Hall</a>.");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
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"));
|
||||||
|
|
||||||
|
if (isset($_POST["promote"])) {
|
||||||
|
|
||||||
|
// Errors.
|
||||||
|
if ($userrow["guildrank"] < 4) { err("You do not have permission to promote members. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($userrow["guildrank"] == 4 && $member["guildrank"] >= 3) { err("You do not have permission to promote this member any higher. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($member["guildrank"] == 5) { err("This member cannot be promoted any higher. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($member == false) { err("Invalid input. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($member["guild"] != $userrow["guild"]) { err("That player is not in your Guild. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
|
||||||
|
// Do stuff.
|
||||||
|
$update = doquery("UPDATE {{table}} SET guildrank=guildrank+1 WHERE id='$charid' LIMIT 1", "users");
|
||||||
|
|
||||||
|
} elseif (isset($_POST["demote"])) {
|
||||||
|
|
||||||
|
// Errors.
|
||||||
|
if ($userrow["guildrank"] < 4) { err("You do not have permission to demote members. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($userrow["guildrank"] == 4 && $member["guildrank"] > 3) { err("You do not have permission to demote this member. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($userrow["id"] == $member["id"]) { err("You cannot demote yourself. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($member == false) { err("Invalid input. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($member["guild"] != $userrow["guild"]) { err("That player is not in your Guild. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($member["guildrank"] == 1) { guildremove(); }
|
||||||
|
|
||||||
|
// Do stuff.
|
||||||
|
$update = doquery("UPDATE {{table}} SET guildrank=guildrank-1 WHERE id='$charid' LIMIT 1", "users");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
display("Guild Ranks", "Thank you for promoting/demoting this user.<br /><br />You may now return to <a href=\"index.php\">Town</a> or to your <a href=\"index.php?do=guildhome\">Guild Hall</a>.");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
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"));
|
||||||
|
|
||||||
|
// Errors.
|
||||||
|
if ($userrow["guildrank"] < 4) { err("You do not have permission to approve new members. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($app == false) { err("Invalid input. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
|
||||||
|
// Do stuff.
|
||||||
|
if (isset($_POST["approve"])) {
|
||||||
|
$updatemem = doquery("UPDATE {{table}} SET guild='".$userrow["guild"]."', guildrank='1', guildtag='".$guild["tagline"]."', tagcolor='".$guild["color1"]."', namecolor='".$guild["color2"]."' WHERE id='".$app["charid"]."' LIMIT 1", "users");
|
||||||
|
$updateguild = doquery("UPDATE {{table}} SET members=members+1 WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds");
|
||||||
|
$deleteapp = doquery("DELETE FROM {{table}} WHERE guild='".$userrow["guild"]."' AND charid='$charid' LIMIT 1", "guildapps");
|
||||||
|
$send = doquery("INSERT INTO {{table}} SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='$charid', recipientname='".$member["charname"]."', status='0', title='Guild Approval', message='The Guild has approved you for membership, and you are now a member of ".$guild["name"].". Congratulations!<br /><br /><b>Do not reply to this message!</b>', gold='0'", "messages");
|
||||||
|
display("Approve Members", "Thank you for approving this user.<br /><br />You may now return to <a href=\"index.php\">Town</a> or to your <a href=\"index.php?do=guildhome\">Guild Hall</a>.");
|
||||||
|
} else {
|
||||||
|
$deleteapp = doquery("DELETE FROM {{table}} WHERE guild='".$userrow["guild"]."' AND charid='$charid' LIMIT 1", "guildapps");
|
||||||
|
$send = doquery("INSERT INTO {{table}} SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='$charid', recipientname='".$member["charname"]."', status='0', title='Guild Denial', message='The Guild has denied your application for membership. Sorry.<br /><br /><b>Do not reply to this message!</b>', gold='0'", "messages");
|
||||||
|
display("Approve Members", "Thank you for denying this user.<br /><br />You may now return to <a href=\"index.php\">Town</a> or to your <a href=\"index.php?do=guildhome\">Guild Hall</a>.");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
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"));
|
||||||
|
|
||||||
|
if (isset($_POST["yes"])) {
|
||||||
|
|
||||||
|
$update = doquery("UPDATE {{table}} SET members=members-1 WHERE id='".$guild["id"]."' LIMIT 1", "guilds");
|
||||||
|
$updatemem = doquery("UPDATE {{table}} SET guild='0', guildrank='0', guildtag='', tagcolor='', namecolor='' WHERE id='$charid' LIMIT 1", "users");
|
||||||
|
$send = doquery("INSERT INTO {{table}} SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='$charid', recipientname='".$member["charname"]."', status='0', title='Guild Removal', message='The Guild has removed you from their membership. Sorry.<br /><br /><b>Do not reply to this message!</b>', gold='0'", "messages");
|
||||||
|
display("Remove Members", "Thank you for removing this user.<br /><br />You may now return to <a href=\"index.php\">Town</a> or to your <a href=\"index.php?do=guildhome\">Guild Hall</a>.");
|
||||||
|
|
||||||
|
} elseif (isset($_POST["no"])) {
|
||||||
|
|
||||||
|
die(header("Location: index.php?do=guildhome"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$pagerow["charid"] = $charid;
|
||||||
|
$pagerow["charname"] = $member["charname"];
|
||||||
|
display("Remove Member", parsetemplate(gettemplate("guild_remove"), $pagerow));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function guildnews() {
|
||||||
|
|
||||||
|
global $userrow;
|
||||||
|
|
||||||
|
$guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds"));
|
||||||
|
|
||||||
|
// Errors.
|
||||||
|
if ($userrow["guildrank"] < 5) { err("You do not have permission to edit Guild news. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
|
||||||
|
if (isset($_POST["submit"])) {
|
||||||
|
|
||||||
|
$query = doquery("UPDATE {{table}} SET news='".$_POST["news"]."' WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds");
|
||||||
|
display("Guild News", "Thank you for updating your Guild News.<br /><br />You may now return to <a href=\"index.php\">Town</a> or to your <a href=\"index.php?do=guildhome\">Guild Hall</a>.");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (trim($guild["news"]) == "") { $guild["news"] = "No news yet."; }
|
||||||
|
display("Guild News", parsetemplate(gettemplate("guild_news"), $guild));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function guilddisband() {
|
||||||
|
|
||||||
|
global $userrow;
|
||||||
|
|
||||||
|
$guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds"));
|
||||||
|
|
||||||
|
// Errors.
|
||||||
|
if ($userrow["id"] != $guild["founder"]) { err("You do not have permission to disband the Guild. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
|
||||||
|
if (isset($_POST["yes"])) {
|
||||||
|
|
||||||
|
$query = doquery("SELECT * FROM {{table}} WHERE guild='".$guild["id"]."'", "users");
|
||||||
|
while ($row = mysql_fetch_array($query)) {
|
||||||
|
$send = doquery("INSERT INTO {{table}} SET id='', postdate=NOW(), senderid='0', sendername='".$guild["name"]."', recipientid='".$row["id"]."', recipientname='".$row["charname"]."', status='0', title='Guild Disbanded', message='Your Guild leader has chosen to disband the guild. Your member status has been reset, and you can now apply to join another guild if you wish.<br /><br /><b>Do not reply to this message!</b>', gold='0'", "messages");
|
||||||
|
}
|
||||||
|
$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");
|
||||||
|
display("Disband Guild", "Thank you for disbanding your Guild.<br /><br />You may now return to <a href=\"index.php\">Town</a>.");
|
||||||
|
|
||||||
|
} elseif (isset($_POST["no"])) {
|
||||||
|
|
||||||
|
die(header("Location: index.php?do=guildhome"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
display("Disband Guild", gettemplate("guild_disband"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function guildleave() {
|
||||||
|
|
||||||
|
global $userrow;
|
||||||
|
|
||||||
|
$guild = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["guild"]."' LIMIT 1", "guilds"));
|
||||||
|
|
||||||
|
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");
|
||||||
|
display("Leave Guild", "Thank you for leaving your Guild.<br /><br />You may now return to <a href=\"index.php\">Town</a>.");
|
||||||
|
|
||||||
|
} elseif (isset($_POST["no"])) {
|
||||||
|
|
||||||
|
die(header("Location: index.php?do=guildhome"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
display("Leave Guild", gettemplate("guild_leave"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
BIN
images/Thumbs.db
Normal file
BIN
images/background.jpg
Normal file
After Width: | Height: | Size: 6.1 KiB |
BIN
images/background1.jpg
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
images/background2.jpg
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
images/background3.jpg
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
images/background4.jpg
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
images/background5.jpg
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
images/bars_green.gif
Normal file
After Width: | Height: | Size: 97 B |
BIN
images/bars_greenend.gif
Normal file
After Width: | Height: | Size: 97 B |
BIN
images/bars_grey.gif
Normal file
After Width: | Height: | Size: 89 B |
BIN
images/bars_red.gif
Normal file
After Width: | Height: | Size: 97 B |
BIN
images/bars_redend.gif
Normal file
After Width: | Height: | Size: 97 B |
BIN
images/bars_yellow.gif
Normal file
After Width: | Height: | Size: 97 B |
BIN
images/bars_yellowend.gif
Normal file
After Width: | Height: | Size: 97 B |
BIN
images/compass_01.png
Normal file
After Width: | Height: | Size: 674 B |
BIN
images/compass_02.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
images/compass_03.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
images/compass_04.png
Normal file
After Width: | Height: | Size: 681 B |
BIN
images/cup.gif
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
images/items/1.gif
Normal file
After Width: | Height: | Size: 511 B |
BIN
images/items/1.png
Normal file
After Width: | Height: | Size: 602 B |
BIN
images/items/2.gif
Normal file
After Width: | Height: | Size: 853 B |
BIN
images/items/2.png
Normal file
After Width: | Height: | Size: 893 B |
BIN
images/items/3.gif
Normal file
After Width: | Height: | Size: 771 B |
BIN
images/items/3.png
Normal file
After Width: | Height: | Size: 783 B |
BIN
images/items/4.gif
Normal file
After Width: | Height: | Size: 969 B |
BIN
images/items/4.png
Normal file
After Width: | Height: | Size: 930 B |
BIN
images/items/Thumbs.db
Normal file
BIN
images/items/noimage.gif
Normal file
After Width: | Height: | Size: 978 B |
BIN
images/logo.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
images/spacer.gif
Normal file
After Width: | Height: | Size: 43 B |
BIN
images/town_bank.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
images/town_buy.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
images/town_duel.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
images/town_gamble.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
images/town_guilds.png
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
images/town_hall.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
images/town_inn.png
Normal file
After Width: | Height: | Size: 1019 B |
BIN
images/town_maps.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
images/town_post.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
images/users/Thumbs.db
Normal file
BIN
images/users/nopicture.gif
Normal file
After Width: | Height: | Size: 1.0 KiB |
81
index.php
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
<?php // index.php :: Case switching to decide what function we need to be running.
|
||||||
|
|
||||||
|
include("lib.php");
|
||||||
|
include("globals.php");
|
||||||
|
|
||||||
|
if(isset($_GET["do"])) {
|
||||||
|
$do = explode(":",$_GET["do"]);
|
||||||
|
switch ($do[0]) {
|
||||||
|
|
||||||
|
// Exploring.
|
||||||
|
case "explore": include("explore.php"); move(); break;
|
||||||
|
case "travel": include("explore.php"); travel($do[1]); break;
|
||||||
|
case "humanity": include("explore.php"); botkillah(); break;
|
||||||
|
// Towns.
|
||||||
|
case "inn": include("town.php"); inn(); break;
|
||||||
|
case "maps": include("town.php"); map(); break;
|
||||||
|
case "duel": include("town.php"); duel(); break;
|
||||||
|
case "challenge": include("town.php"); duelchallenge(); break;
|
||||||
|
case "buy": include("town.php"); buy(); break;
|
||||||
|
case "gamble": include("town.php"); gamble(); break;
|
||||||
|
case "bank": include("town.php"); bank(); break;
|
||||||
|
case "top10": include("town.php"); halloffame(); break;
|
||||||
|
// Mailbox.
|
||||||
|
case "mailbox": include("mailbox.php"); mailbox(); break;
|
||||||
|
case "mailview": include("mailbox.php"); letter(); break;
|
||||||
|
case "maildelete": include("mailbox.php"); maildelete(); break;
|
||||||
|
case "mailnew": include("mailbox.php"); mailnew(); break;
|
||||||
|
case "mailreply": include("mailbox.php"); mailreply(); break;
|
||||||
|
case "mailsent": include("mailbox.php"); outbox(); break;
|
||||||
|
case "mailviewsent": include("mailbox.php"); letterout(); break;
|
||||||
|
// Fights.
|
||||||
|
// Guilds.
|
||||||
|
case "guilds": include("guilds.php"); guildmain(); break;
|
||||||
|
case "guildhome": include("guilds.php"); guildhome(); break;
|
||||||
|
case "guildcreate": include("guilds.php"); guildcreate(); break;
|
||||||
|
case "guildapp": include("guilds.php"); guildapp(); break;
|
||||||
|
case "guildmembers": include("guilds.php"); guildmembers(); break;
|
||||||
|
case "guildbank": include("guilds.php"); guildbank(); break;
|
||||||
|
case "guildpromote": include("guilds.php"); guildpromote(); break;
|
||||||
|
case "guildremove": include("guilds.php"); guildremove(); break;
|
||||||
|
case "guildapprove": include("guilds.php"); guildapprove(); break;
|
||||||
|
case "guildnews": include("guilds.php"); guildnews(); break;
|
||||||
|
case "guilddisband": include("guilds.php"); guilddisband(); break;
|
||||||
|
case "guildedit": include("guilds.php"); guildedit(); break;
|
||||||
|
case "guildleave": include("guilds.php"); guildleave(); break;
|
||||||
|
// Misc.
|
||||||
|
case "babblebox": include("misc.php"); babblebox2(); break;
|
||||||
|
case "showmap": include("misc.php"); showmap(); break;
|
||||||
|
case "version": include("misc.php"); version(); break;
|
||||||
|
case "iddqd": include("misc.php"); iddqd(); break;
|
||||||
|
default: donothing();
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
donothing();
|
||||||
|
}
|
||||||
|
|
||||||
|
function donothing() {
|
||||||
|
|
||||||
|
global $userrow;
|
||||||
|
if ($userrow["currentpvp"] != 0) {
|
||||||
|
die(header("Location: pvp.php"));
|
||||||
|
}
|
||||||
|
if ($userrow["currentaction"] == "In Town") {
|
||||||
|
include("town.php");
|
||||||
|
dotown();
|
||||||
|
}
|
||||||
|
if ($userrow["currentaction"] == "Exploring") {
|
||||||
|
include("explore.php");
|
||||||
|
doexplore();
|
||||||
|
}
|
||||||
|
if ($userrow["currentaction"] == "Fighting") {
|
||||||
|
die(header("Location: fight.php"));
|
||||||
|
}
|
||||||
|
if ($userrow["currentaction"] == "PVP") {
|
||||||
|
die(header("Location: pvp.php"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
225
lib.php
Normal file
|
@ -0,0 +1,225 @@
|
||||||
|
<?php // lib.php :: Common functions used throughout the program.
|
||||||
|
|
||||||
|
// Setup for superglobal stuff that can't go in globals.php.
|
||||||
|
$starttime = getmicrotime();
|
||||||
|
$numqueries = 0;
|
||||||
|
$link = opendb();
|
||||||
|
$version = "Beta 2";
|
||||||
|
$bnumber = "12";
|
||||||
|
$bname = "Eggs";
|
||||||
|
$bdate = "12.10.2005";
|
||||||
|
|
||||||
|
// 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('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);
|
||||||
|
|
||||||
|
function opendb() { // Open database connection.
|
||||||
|
|
||||||
|
include("config.php");
|
||||||
|
extract($dbsettings);
|
||||||
|
$link = mysql_connect($server, $user, $pass) or err(mysql_error(),true);
|
||||||
|
mysql_select_db($name) or err(mysql_error(),true);
|
||||||
|
return $link;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function doquery($query, $table) { // Something of a tiny little database abstraction layer.
|
||||||
|
|
||||||
|
include('config.php');
|
||||||
|
global $numqueries;
|
||||||
|
$sqlquery = mysql_query(str_replace("{{table}}", $dbsettings["prefix"] . "_" . $table, $query)) or die(mysql_error() . "<br /><br />$query");
|
||||||
|
$numqueries++;
|
||||||
|
return $sqlquery;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function dorow($sqlquery) { // Abstraction layer part deux.
|
||||||
|
|
||||||
|
switch(mysql_num_rows($sqlquery)) {
|
||||||
|
case 0:
|
||||||
|
$row = false;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
$row = mysql_fetch_array($sqlquery, MYSQL_ASSOC);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$row = array();
|
||||||
|
while ($array = mysql_fetch_array($sqlquery, MYSQL_ASSOC)) {
|
||||||
|
$row[] = $array;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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 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());
|
||||||
|
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 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 err($error, $system = false, $panels = true) { // Basic little error handler.
|
||||||
|
|
||||||
|
display("Error", $error, $panels);
|
||||||
|
/*
|
||||||
|
// Don't display major system errors (sql errors).
|
||||||
|
if ($system == true) {
|
||||||
|
if ($handle = fopen("errorlog/errorlog.txt", 'a')) {
|
||||||
|
$written = fwrite($handle, $error."\n");
|
||||||
|
fclose($handle);
|
||||||
|
}
|
||||||
|
if ($written != false) {
|
||||||
|
display("Error", "A critical game system error has occurred.<br /><br />Please have the game administrator check the game error logs and fix the problem.<br /><br />Please <a href=\"index.php\">go back</a> and try again.");
|
||||||
|
} else {
|
||||||
|
display("Error", "A critical game system error has occurred. Additionally, an error occurred when trying to create a game error log entry. Please have the game administrator check the server logs and fix the problem.<br /><br />Please <a href=\"index.php\">go back</a> and try again.");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
display("Error", $error);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateuserrow() {
|
||||||
|
|
||||||
|
global $userrow;
|
||||||
|
|
||||||
|
$querystring = "";
|
||||||
|
foreach($userrow as $a=>$b) {
|
||||||
|
$querystring .= "$a='$b',";
|
||||||
|
}
|
||||||
|
$querystring = rtrim($querystring, ",");
|
||||||
|
|
||||||
|
$query = doquery("UPDATE {{table}} SET $querystring WHERE id='".$userrow["id"]."' LIMIT 1", "users");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function display($title, $content, $panels = true) { // Finalize page and output to browser.
|
||||||
|
|
||||||
|
include('config.php');
|
||||||
|
global $controlrow, $userrow, $worldrow, $numqueries, $starttime, $version, $build;
|
||||||
|
|
||||||
|
if (!isset($controlrow)) {
|
||||||
|
$controlrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='1' LIMIT 1", "control"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make page tags for XHTML validation.
|
||||||
|
$page = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n"
|
||||||
|
. "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"DTD/xhtml1-transitional.dtd\">\n"
|
||||||
|
. "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n";
|
||||||
|
$page .= gettemplate("primary");
|
||||||
|
|
||||||
|
// Setup for primary page array indexes.
|
||||||
|
$row = array();
|
||||||
|
$row["gamename"] = $controlrow["gamename"];
|
||||||
|
$row["pagetitle"] = $title;
|
||||||
|
$row["background"] = "background";
|
||||||
|
$row["version"] = $version;
|
||||||
|
$row["numqueries"] = $numqueries;
|
||||||
|
$row["totaltime"] = round(getmicrotime()-$starttime,4);
|
||||||
|
$row["content"] = $content;
|
||||||
|
|
||||||
|
// Setup for side panels.
|
||||||
|
include("panels.php");
|
||||||
|
if ($panels == true) {
|
||||||
|
$row["leftnav"] = panelleft();
|
||||||
|
$row["rightnav"] = panelright();
|
||||||
|
$row["topnav"] = paneltop(true);
|
||||||
|
$row["bottomnav"] = panelbottom();
|
||||||
|
$row["middlenav"] = panelmiddle();
|
||||||
|
} else {
|
||||||
|
$row["leftnav"] = "";
|
||||||
|
$row["rightnav"] = "";
|
||||||
|
$row["topnav"] = paneltop(false);
|
||||||
|
$row["bottomnav"] = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
//if(md5_file("templates/primary.php") != "0aeec5eb64ff875a697142528afe8fc7") { die("Primary template modified. Cannot continue."); }
|
||||||
|
|
||||||
|
// Finalize control array for output.
|
||||||
|
$page = parsetemplate($page, $row);
|
||||||
|
|
||||||
|
if ($controlrow["compression"] == 1) { ob_start("ob_gzhandler"); }
|
||||||
|
echo $page;
|
||||||
|
die();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
49
login.php
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
<?php // login.php :: Handles user logins and logouts.
|
||||||
|
|
||||||
|
include("lib.php");
|
||||||
|
if (isset($_GET["do"])) { $do = $_GET["do"]; } else { $do = ""; }
|
||||||
|
|
||||||
|
switch($do) {
|
||||||
|
case "logout":
|
||||||
|
logout();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
login();
|
||||||
|
}
|
||||||
|
|
||||||
|
function login() {
|
||||||
|
|
||||||
|
if (isset($_POST["submit"])) {
|
||||||
|
|
||||||
|
// Setup.
|
||||||
|
include("config.php");
|
||||||
|
extract($_POST);
|
||||||
|
$query = doquery("SELECT id,password FROM {{table}} WHERE username='$username' LIMIT 1", "accounts");
|
||||||
|
$row = dorow($query);
|
||||||
|
|
||||||
|
// Errors.
|
||||||
|
if ($row == false) { err("Invalid username. Please <a href=\"index.php\">go back</a> and try again.", false, false); }
|
||||||
|
if ($row["password"] != md5($password)) { err("Invalid password. Please <a href=\"index.php\">go back</a> and try again.", false, false); }
|
||||||
|
|
||||||
|
// Finish.
|
||||||
|
$newcookie = $row["id"] . " " . $username . " " . md5($row["password"] . "--" . $dbsettings["secretword"]);
|
||||||
|
if (isset($remember)) { $expiretime = time()+31536000; $newcookie .= " 1"; } else { $expiretime = 0; $newcookie .= " 0"; }
|
||||||
|
setcookie("scourge", $newcookie, $expiretime, "/", "", 0);
|
||||||
|
die(header("Location: index.php"));
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
display("Log In", gettemplate("login"), false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function logout() {
|
||||||
|
|
||||||
|
setcookie("scourge", "", (time()-3600), "/", "", 0);
|
||||||
|
die(header("Location: login.php?do=login"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
217
mailbox.php
Normal file
|
@ -0,0 +1,217 @@
|
||||||
|
<?php // mailbox.php :: All Post Office functions.
|
||||||
|
|
||||||
|
// Before allowing anything else, we make sure the person is actually in town.
|
||||||
|
global $townrow;
|
||||||
|
if ($townrow == false) { die(header("Location: index.php")); }
|
||||||
|
|
||||||
|
function mailbox() {
|
||||||
|
|
||||||
|
global $userrow;
|
||||||
|
|
||||||
|
$messagequery = doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM {{table}} WHERE recipientid='".$userrow["id"]."' ORDER BY postdate DESC", "messages");
|
||||||
|
$messages = dorow($messagequery);
|
||||||
|
$row["messages"] = "<table width=\"97%\">\n";
|
||||||
|
|
||||||
|
if (mysql_num_rows($messagequery) == 0) {
|
||||||
|
$row["messages"] .= "<tr><td>You do not have any messages.</td></tr>";
|
||||||
|
} elseif (mysql_num_rows($messagequery) == 1) {
|
||||||
|
if ($messages["status"] == 0) { $messages["new"] = "<span class=\"red\">*</span>"; } else { $messages["new"] = ""; }
|
||||||
|
if ($messages["gold"] != 0) { $messages["money"] = "<span class=\"blue\">\$</span>"; } else { $messages["money"] = ""; }
|
||||||
|
$row["messages"] .= parsetemplate(gettemplate("mailbox_listrow"), $messages);
|
||||||
|
} else {
|
||||||
|
foreach($messages as $a=>$b) {
|
||||||
|
if ($b["status"] == 0) { $b["new"] = "<span class=\"red\">*</span>"; } else { $b["new"] = ""; }
|
||||||
|
if ($b["gold"] != 0) { $b["money"] = "<span class=\"blue\">\$</span>"; } else { $b["money"] = ""; }
|
||||||
|
$row["messages"] .= parsetemplate(gettemplate("mailbox_listrow"), $b);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$row["messages"] .= "</table><br />\n";
|
||||||
|
display("Post Office", parsetemplate(gettemplate("mailbox_list"), $row));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function outbox() {
|
||||||
|
|
||||||
|
global $userrow;
|
||||||
|
|
||||||
|
$messagequery = doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM {{table}} WHERE senderid='".$userrow["id"]."' ORDER BY postdate DESC", "messages");
|
||||||
|
$messages = dorow($messagequery);
|
||||||
|
$row["messages"] = "<table width=\"97%\">\n";
|
||||||
|
|
||||||
|
if (mysql_num_rows($messagequery) == 0) {
|
||||||
|
$row["messages"] .= "<tr><td>You do not have any sent messages.</td></tr>";
|
||||||
|
} elseif (mysql_num_rows($messagequery) == 1) {
|
||||||
|
$row["messages"] .= parsetemplate(gettemplate("mailbox_listoutrow"), $messages);
|
||||||
|
} else {
|
||||||
|
foreach($messages as $a=>$b) {
|
||||||
|
$row["messages"] .= parsetemplate(gettemplate("mailbox_listoutrow"), $b);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$row["messages"] .= "</table><br />\n";
|
||||||
|
display("Post Office", parsetemplate(gettemplate("mailbox_listout"), $row));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function letter() {
|
||||||
|
|
||||||
|
global $userrow;
|
||||||
|
|
||||||
|
if (!is_numeric($_GET["id"])) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
$message = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM {{table}} WHERE id='".$_GET["id"]."' LIMIT 1", "messages"));
|
||||||
|
if ($message == false) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($message["recipientid"] != $userrow["id"]) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
|
||||||
|
// Handle money transfers.
|
||||||
|
$message["moneytransfer"] = "";
|
||||||
|
if ($message["gold"] != 0) {
|
||||||
|
$userrow["gold"] += $message["gold"];
|
||||||
|
$message["moneytransfer"] = "<span class=\"blue\">You have received ".$message["gold"]." Gold with this message.</span><br />";
|
||||||
|
updateuserrow();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pull the sender's userrow so we can show avatars.
|
||||||
|
$sender = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$message["senderid"]."' LIMIT 1", "users"));
|
||||||
|
if ($sender["charpicture"] != "") {
|
||||||
|
$message["senderavatar"] = "<img src=\"".$sender["charpicture"]."\" alt=\"".$sender["charname"]."\" width=\"50\" height=\"50\" />";
|
||||||
|
} else {
|
||||||
|
$message["senderavatar"] = "<img src=\"images/users/nopicture.gif\" alt=\"".$sender["charname"]."\" width=\"50\" height=\"50\" />";
|
||||||
|
}
|
||||||
|
|
||||||
|
$message["message"] = nl2br($message["message"]);
|
||||||
|
display("Post Office", parsetemplate(gettemplate("mailbox_letter"), $message));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function letterout() {
|
||||||
|
|
||||||
|
global $userrow;
|
||||||
|
|
||||||
|
if (!is_numeric($_GET["id"])) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
$message = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM {{table}} WHERE id='".$_GET["id"]."' LIMIT 1", "messages"));
|
||||||
|
if ($message == false) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($message["senderid"] != $userrow["id"]) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
|
||||||
|
$message["message"] = nl2br($message["message"]);
|
||||||
|
display("Post Office", parsetemplate(gettemplate("mailbox_letterout"), $message));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function mailnew() {
|
||||||
|
|
||||||
|
global $userrow;
|
||||||
|
|
||||||
|
if (isset($_POST["submit"])) {
|
||||||
|
|
||||||
|
// Check for errors.
|
||||||
|
extract($_POST);
|
||||||
|
$errors = 0; $errorlist = "";
|
||||||
|
if ($userrow["gold"] < 5) { $errors++; $errorlist .= "You do not have enough gold to cover the postage fee.<br />"; }
|
||||||
|
$checkuser = dorow(doquery("SELECT * FROM {{table}} WHERE charname='$recipient' LIMIT 1", "users"));
|
||||||
|
if ($checkuser == false) { $errors++; $errorlist .= "There is no player with that Character Name.<br />"; }
|
||||||
|
if (trim($gold) != "") {
|
||||||
|
if (!is_numeric($gold)) { $errors++; $errorlist .= "The Send Gold field must be a number.<br />"; }
|
||||||
|
if ($gold < 1) { $errors++; $errorlist .= "Money Transfer amount must be greater than 0.<br />"; }
|
||||||
|
if ($userrow["gold"] < $gold + 5) { $errors++; $errorlist .= "You don't have that much gold to send.<br />"; }
|
||||||
|
if ($userrow["account"] == $checkuser["account"] && $gold >= ($userrow["gold"] / 10)) { $errors++; $errorlist .= "You are only allowed to send up to 10% of your gold to another character on your account.<br />"; }
|
||||||
|
}
|
||||||
|
if ($recipient == $userrow["charname"]) { $errors++; $errorlist .= "You cannot send a message to yourself. That would be a waste of 5 gold, dummy!"; }
|
||||||
|
if (trim($title) == "") { $errors++; $errorlist .= "You must enter a Subject.<br />"; }
|
||||||
|
|
||||||
|
if ($errors == 0) {
|
||||||
|
|
||||||
|
// Subtract gold.
|
||||||
|
$userrow["gold"] -= 5;
|
||||||
|
if (trim($gold) != "") { $userrow["gold"] -= $gold; }
|
||||||
|
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");
|
||||||
|
display("Post Office", gettemplate("mailbox_sent"));
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// Die gracefully on errors.
|
||||||
|
err("The following error(s) occurred when trying to send your letter:<br /><span style=\"color:red;\">$errorlist</span><br />Please <a href=\"index.php\">go back</a> and try again.");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
display("Post Office", gettemplate("mailbox_new"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function mailreply() {
|
||||||
|
|
||||||
|
global $userrow;
|
||||||
|
|
||||||
|
if (!is_numeric($_GET["id"])) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
$origmessage = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM {{table}} WHERE id='".$_GET["id"]."' LIMIT 1", "messages"));
|
||||||
|
if ($origmessage == false) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($origmessage["recipientid"] != $userrow["id"]) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
|
||||||
|
if (isset($_POST["submit"])) {
|
||||||
|
|
||||||
|
// Check for errors.
|
||||||
|
extract($_POST);
|
||||||
|
$errors = 0; $errorlist = "";
|
||||||
|
if ($userrow["gold"] < 5) { $errors++; $errorlist .= "You do not have enough gold to cover the postage fee.<br />"; }
|
||||||
|
$checkuser = dorow(doquery("SELECT * FROM {{table}} WHERE charname='".$origmessage["sendername"]."' LIMIT 1", "users"));
|
||||||
|
if ($checkuser == false) { $errors++; $errorlist .= "There is no player with that Character Name.<br />"; }
|
||||||
|
if (trim($gold) != "") {
|
||||||
|
if (!is_numeric($gold)) { $errors++; $errorlist .= "The Send Gold field must be a number.<br />"; }
|
||||||
|
if ($gold < 1) { $errors++; $errorlist .= "Money Transfer amount must be greater than 0.<br />"; }
|
||||||
|
if ($userrow["gold"] < $gold + 5) { $errors++; $errorlist .= "You don't have that much gold to send.<br />"; }
|
||||||
|
if ($userrow["account"] == $checkuser["account"] && $gold >= ($userrow["gold"] / 10)) { $errors++; $errorlist .= "You are only allowed to send up to 10% of your gold to another character on your account.<br />"; }
|
||||||
|
}
|
||||||
|
if (trim($title) == "") { $errors++; $errorlist .= "You must enter a Subject.<br />"; }
|
||||||
|
|
||||||
|
if ($errors == 0) {
|
||||||
|
|
||||||
|
// Subtract gold.
|
||||||
|
$userrow["gold"] -= 5;
|
||||||
|
if (trim($gold) != "") { $userrow["gold"] -= $gold; }
|
||||||
|
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");
|
||||||
|
display("Post Office", gettemplate("mailbox_sent"));
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
// Die gracefully on errors.
|
||||||
|
err("The following error(s) occurred when trying to send your letter:<br /><span style=\"color:red;\">$errorlist</span><br />Please <a href=\"index.php\">go back</a> and try again.");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$origmessage["message"] = nl2br($origmessage["message"]);
|
||||||
|
display("Post Office", parsetemplate(gettemplate("mailbox_reply"), $origmessage));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function maildelete() {
|
||||||
|
|
||||||
|
global $userrow;
|
||||||
|
|
||||||
|
if (!is_numeric($_GET["id"])) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
$message = dorow(doquery("SELECT *, DATE_FORMAT(postdate, '%m.%d.%Y ~ %H:%i') AS fpostdate FROM {{table}} WHERE id='".$_GET["id"]."' LIMIT 1", "messages"));
|
||||||
|
if ($message == false) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
if ($message["recipientid"] != $userrow["id"]) { err("Invalid action. Please <a href=\"index.php\">go back</a> and try again."); }
|
||||||
|
|
||||||
|
$delete = doquery("DELETE FROM {{table}} WHERE id='".$_GET["id"]."'", "messages");
|
||||||
|
die(header("Location: index.php?do=mailbox"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
49
mainindex.php
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||||
|
<head>
|
||||||
|
<title>Dragon Scourge Beta</title>
|
||||||
|
<style type="text/css">
|
||||||
|
body { font: 10px Verdana; background-image: url(images/background.jpg); padding: 0px; }
|
||||||
|
table { font: 10px Verdana; }
|
||||||
|
td { vertical-align: top; }
|
||||||
|
input { font: 10px Verdana; }
|
||||||
|
img { border-style: none; }
|
||||||
|
a { color: #996600; text-decoration: none; font-weight: bold; }
|
||||||
|
a:hover { color: #663300; }
|
||||||
|
.main { border: solid 1px black; }
|
||||||
|
.grey { color: #999999; }
|
||||||
|
.red { color: #ff0000; }
|
||||||
|
.blue { color: #0000ff; }
|
||||||
|
.big { font: 11px Verdana; background-color: #dddddd; border: solid 1px #aaaaaa; padding: 2px; margin-bottom: 3px; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body><center>
|
||||||
|
|
||||||
|
<table cellspacing="0" cellpadding="3" style="width: 800px; height: 570px; border: solid 1px black; background-color: white; ">
|
||||||
|
<tr>
|
||||||
|
<td colspan="3" style="border-bottom: solid 1px #cccccc;">
|
||||||
|
<a href="index.php"><img src="play/images/logo.png" alt="Dragon Scourge Beta" title="Dragon Scourge Beta" /></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td valign="top" style="height: 100%; padding: 10px;">
|
||||||
|
Please read <a href="http://se7enet.com/forums/showflat.php?Cat=&Number=7721&page=0&view=collapsed&sb=5&o=&fpart=&vc=#Post7721">THIS POST</a> on the forums before playing the game! This is very important, and if you don't read it, monkeys will come and eat your genitals.<br /><br />
|
||||||
|
Once you've done that, you are more than happy to...<br /><br />
|
||||||
|
<span class="big"><a href="http://dragonscourge.com/play">Play Dragon Scourge.</a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table cellspacing="0" cellpadding="3" style="width: 800px; border: solid 1px black; background-color: white; margin-top: 2px;">
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td width="50%">
|
||||||
|
</td>
|
||||||
|
<td width="50%" style="text-align:right;">
|
||||||
|
<a href="http://www.dragonscourge.com">Dragon Scourge</a> © 2003-2005 by <a href="http://www.renderse7en.com">renderse7en</a>
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</center></body>
|
||||||
|
</html>
|
49
map.php
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
<?php // map.php :: full map flash controller.
|
||||||
|
|
||||||
|
include("lib.php");
|
||||||
|
include("globals.php");
|
||||||
|
|
||||||
|
$perpix = 500 / ($worldrow["size"] * 2);
|
||||||
|
$text = "&";
|
||||||
|
|
||||||
|
// First do towns.
|
||||||
|
$towns = dorow(doquery("SELECT * FROM {{table}} WHERE world='".$worldrow["id"]."'", "towns"));
|
||||||
|
$text .= "towns=".sizeof($towns)."&";
|
||||||
|
$count = 0;
|
||||||
|
foreach($towns as $a=>$b) {
|
||||||
|
$lat = $b["latitude"];
|
||||||
|
$lon = $b["longitude"];
|
||||||
|
if ($lat >= 0) { $y = ceil(($worldrow["size"] - $lat) * $perpix); } else { $y = 250 + ceil(($lat * -1) * $perpix); }
|
||||||
|
if ($lon >= 0) { $x = 250 + ceil($lon * $perpix); } else { $x = ceil(($worldrow["size"] + $lon) * $perpix); }
|
||||||
|
$text .= "town".$count."_x=".$x."&";
|
||||||
|
$text .= "town".$count."_y=".$y."&";
|
||||||
|
$text .= "town".$count."_name=".$b["name"]."&";
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Then do your character.
|
||||||
|
$lat = $userrow["latitude"];
|
||||||
|
$lon = $userrow["longitude"];
|
||||||
|
if ($lat >= 0) { $y = ceil(($worldrow["size"] - $lat) * $perpix); } else { $y = 250 + ceil(($lat * -1) * $perpix); }
|
||||||
|
if ($lon >= 0) { $x = 250 + ceil($lon * $perpix); } else { $x = ceil(($worldrow["size"] + $lon) * $perpix); }
|
||||||
|
$text .= "player_x=".$x."&";
|
||||||
|
$text .= "player_y=".$y."&";
|
||||||
|
$text .= "player_name=".$userrow["charname"]."&";
|
||||||
|
|
||||||
|
$users = doquery("SELECT * FROM {{table}} WHERE world='".$worldrow["id"]."' AND UNIX_TIMESTAMP(onlinetime) >= '".(time()-600)."' AND id != '".$userrow["id"]."'", "users");
|
||||||
|
$text .= "users=".mysql_num_rows($users)."&";
|
||||||
|
$count = 0;
|
||||||
|
while ($b = mysql_fetch_array($users)) {
|
||||||
|
$lat = $b["latitude"];
|
||||||
|
$lon = $b["longitude"];
|
||||||
|
if ($lat >= 0) { $y = ceil(($worldrow["size"] - $lat) * $perpix); } else { $y = 250 + ceil(($lat * -1) * $perpix); }
|
||||||
|
if ($lon >= 0) { $x = 250 + ceil($lon * $perpix); } else { $x = ceil(($worldrow["size"] + $lon) * $perpix); }
|
||||||
|
$text .= "user".$count."_x=".$x."&";
|
||||||
|
$text .= "user".$count."_y=".$y."&";
|
||||||
|
$text .= "user".$count."_name=".$b["charname"]."&";
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo($text);
|
||||||
|
|
||||||
|
?>
|
46
mapmini.php
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
<?php // mapmini.php :: minimap flash controller.
|
||||||
|
|
||||||
|
include("lib.php");
|
||||||
|
include("globals.php");
|
||||||
|
|
||||||
|
$perpix = 100 / ($worldrow["size"] * 2);
|
||||||
|
$text = "&";
|
||||||
|
|
||||||
|
// First do towns.
|
||||||
|
$towns = dorow(doquery("SELECT * FROM {{table}} WHERE world='".$worldrow["id"]."'", "towns"));
|
||||||
|
$text .= "towns=".sizeof($towns)."&";
|
||||||
|
$count = 0;
|
||||||
|
foreach($towns as $a=>$b) {
|
||||||
|
$lat = $b["latitude"];
|
||||||
|
$lon = $b["longitude"];
|
||||||
|
if ($lat >= 0) { $y = ceil(($worldrow["size"] - $lat) * $perpix); } else { $y = 50 + ceil(($lat * -1) * $perpix); }
|
||||||
|
if ($lon >= 0) { $x = 50 + ceil($lon * $perpix); } else { $x = ceil(($worldrow["size"] + $lon) * $perpix); }
|
||||||
|
$text .= "town".$count."_x=".$x."&";
|
||||||
|
$text .= "town".$count."_y=".$y."&";
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Then do your character.
|
||||||
|
$lat = $userrow["latitude"];
|
||||||
|
$lon = $userrow["longitude"];
|
||||||
|
if ($lat >= 0) { $y = ceil(($worldrow["size"] - $lat) * $perpix); } else { $y = 50 + ceil(($lat * -1) * $perpix); }
|
||||||
|
if ($lon >= 0) { $x = 50 + ceil($lon * $perpix); } else { $x = ceil(($worldrow["size"] + $lon) * $perpix); }
|
||||||
|
$text .= "player_x=".$x."&";
|
||||||
|
$text .= "player_y=".$y."&";
|
||||||
|
|
||||||
|
$users = doquery("SELECT * FROM {{table}} WHERE world='".$worldrow["id"]."' AND UNIX_TIMESTAMP(onlinetime) >= '".(time()-600)."' AND id != '".$userrow["id"]."'", "users");
|
||||||
|
$text .= "users=".mysql_num_rows($users)."&";
|
||||||
|
$count = 0;
|
||||||
|
while ($b = mysql_fetch_array($users)) {
|
||||||
|
$lat = $b["latitude"];
|
||||||
|
$lon = $b["longitude"];
|
||||||
|
if ($lat >= 0) { $y = ceil(($worldrow["size"] - $lat) * $perpix); } else { $y = 50 + ceil(($lat * -1) * $perpix); }
|
||||||
|
if ($lon >= 0) { $x = 50 + ceil($lon * $perpix); } else { $x = ceil(($worldrow["size"] + $lon) * $perpix); }
|
||||||
|
$text .= "user".$count."_x=".$x."&";
|
||||||
|
$text .= "user".$count."_y=".$y."&";
|
||||||
|
$count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
echo($text);
|
||||||
|
|
||||||
|
?>
|
BIN
mapmini.swf
Normal file
94
misc.php
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
<?php // misc.php :: Random functions that really don't fit anywhere else.
|
||||||
|
|
||||||
|
function iddqd() {
|
||||||
|
|
||||||
|
global $acctrow;
|
||||||
|
doquery("UPDATE {{table}} SET extra1='1' WHERE id='".$acctrow["id"]."' LIMIT 1", "accounts");
|
||||||
|
$page = "\"Please don't take everything I say so seriously.\"<br /><i><a href=\"http://www.nin.com\">---Trent Reznor</a></i>";
|
||||||
|
display("LMFAO!", $page);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function version() {
|
||||||
|
|
||||||
|
global $version, $bname, $bdate, $bnumber;
|
||||||
|
|
||||||
|
$page = <<<END
|
||||||
|
<table width="90%">
|
||||||
|
<tr><td width="30%">Version Number:</td><td><b>$version</b></td></tr>
|
||||||
|
<tr><td>Build Number:</td><td><b>$bnumber</b></td></tr>
|
||||||
|
<tr><td>Build Name:</td><td><b>$bname</b></td></tr>
|
||||||
|
<tr><td>Build Date:</td><td><b>$bdate</b></td></tr>
|
||||||
|
<tr><td colspan="2"><a href="changelog.txt" target="_new">View the Changelog</a></td></tr>
|
||||||
|
</table>
|
||||||
|
END;
|
||||||
|
|
||||||
|
display("Version Information",$page);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function babblebox2() {
|
||||||
|
|
||||||
|
global $userrow, $controlrow;
|
||||||
|
|
||||||
|
if (isset($_GET["g"])) {
|
||||||
|
if (!is_numeric($_GET["g"])) { err("Invalid input."); }
|
||||||
|
$g = "WHERE guild='".$_GET["g"]."'";
|
||||||
|
$g2 = ", guild='".$_GET["g"]."'";
|
||||||
|
$row["guild"] = "&g=".$_GET["g"];
|
||||||
|
} else {
|
||||||
|
$g = "WHERE guild='0'";
|
||||||
|
$row["guild"] = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($_POST["babble"])) {
|
||||||
|
|
||||||
|
// 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");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only keep 20 shouts in DB at any one time.
|
||||||
|
$check = doquery("SELECT * FROM {{table}} $g", "babblebox");
|
||||||
|
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");
|
||||||
|
}
|
||||||
|
|
||||||
|
// And we're done.
|
||||||
|
die(header("Location: index.php?do=babblebox".$row["guild"]));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$shouts = doquery("SELECT * FROM {{table}} $g ORDER BY id LIMIT 20", "babblebox");
|
||||||
|
$row["shouts"] = "";
|
||||||
|
$background = 1;
|
||||||
|
if (mysql_num_rows($shouts) > 0) {
|
||||||
|
while ($b = mysql_fetch_array($shouts)) {
|
||||||
|
$row["shouts"] .= "<div class=\"babble$background\">[<a href=\"users.php?do=profile&uid=".$b["charid"]."\" target=\"_parent\">".$b["charname"]."</a>] ".$b["content"]."</div>\n";
|
||||||
|
if ($background == 1) { $background = 2; } else { $background = 1; }
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$row["shouts"] = "<div class=\"babble$background\">No shouts.</div>";
|
||||||
|
}
|
||||||
|
|
||||||
|
$page = parsetemplate(gettemplate("misc_babblebox"),$row);
|
||||||
|
if ($controlrow["compression"] == 1) { ob_start("ob_gzhandler"); }
|
||||||
|
echo $page;
|
||||||
|
die();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function showmap() {
|
||||||
|
|
||||||
|
global $controlrow;
|
||||||
|
|
||||||
|
$page = gettemplate("misc_showmap");
|
||||||
|
if ($controlrow["compression"] == 1) { ob_start("ob_gzhandler"); }
|
||||||
|
echo $page;
|
||||||
|
die();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
197
panels.php
Normal file
|
@ -0,0 +1,197 @@
|
||||||
|
<?php // panels.php :: Handling for left/right/top/bottom status panels.
|
||||||
|
|
||||||
|
function panelleft() {
|
||||||
|
|
||||||
|
global $controlrow, $userrow, $townrow, $worldrow;
|
||||||
|
$row = array();
|
||||||
|
|
||||||
|
// Action handling.
|
||||||
|
if ($userrow["currentaction"] == "In Town") {
|
||||||
|
$row["action"] = "In Town:";
|
||||||
|
$row["townname"] = $townrow["name"];
|
||||||
|
} else {
|
||||||
|
$row["action"] = $userrow["currentaction"];
|
||||||
|
$row["townname"] = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
// World handling.
|
||||||
|
$row["worldname"] = $worldrow["name"];
|
||||||
|
|
||||||
|
// Location handling.
|
||||||
|
if ($userrow["latitude"] < 0) {
|
||||||
|
$row["latitude"] = ($userrow["latitude"] * -1) . "S";
|
||||||
|
} else {
|
||||||
|
$row["latitude"] = $userrow["latitude"] . "N";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($userrow["longitude"] < 0) {
|
||||||
|
$row["longitude"] = ($userrow["longitude"] * -1) . "W";
|
||||||
|
} else {
|
||||||
|
$row["longitude"] = $userrow["longitude"] . "E";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Travel To handling.
|
||||||
|
$row["travelto"] = "";
|
||||||
|
|
||||||
|
// First we build the query string.
|
||||||
|
$townstring = "(";
|
||||||
|
$townslist = explode(",",$userrow["townslist"]);
|
||||||
|
foreach($townslist as $a=>$b) {
|
||||||
|
$townstring .= "id='$b' OR ";
|
||||||
|
}
|
||||||
|
$townstring = rtrim($townstring, " OR ");
|
||||||
|
$townstring .= ") AND world='".$userrow["world"]."'";
|
||||||
|
|
||||||
|
// Then we do the query.
|
||||||
|
$traveltoquery = doquery("SELECT id,name FROM {{table}} WHERE $townstring ORDER BY id", "towns");
|
||||||
|
$traveltorow = dorow($traveltoquery);
|
||||||
|
|
||||||
|
// Finally we build the link list.
|
||||||
|
if ($userrow["townslist"] != "0,1") { // Multiple towns means multiple arrays.
|
||||||
|
foreach($traveltorow as $c=>$d) {
|
||||||
|
$row["travelto"] .= "<a href=\"index.php?do=travel:".$d["id"]."\">".$d["name"]."</a><br />\n";
|
||||||
|
}
|
||||||
|
} else { // One town means one array.
|
||||||
|
$row["travelto"] .= "<a href=\"index.php?do=travel:".$traveltorow["id"]."\">".$traveltorow["name"]."</a><br />\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
// And then we're done with this panel.
|
||||||
|
return parsetemplate(gettemplate("panels_left"), $row);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function panelright() {
|
||||||
|
|
||||||
|
global $controlrow;
|
||||||
|
$row["babblebox"] = "";
|
||||||
|
$row["whosonline"] = "";
|
||||||
|
|
||||||
|
// Babblebox.
|
||||||
|
if ($controlrow["showshout"] == 1) {
|
||||||
|
$row["babblebox"] = "<div class=\"big\"><b>Babblebox</b></div>";
|
||||||
|
$row["babblebox"] .= "<iframe src=\"index.php?do=babblebox\" name=\"sbox\" width=\"100%\" height=\"200\" frameborder=\"0\" id=\"bbox\">Your browser does not support inline frames! The Babble Box will not be available until you upgrade to a newer <a href=\"http://www.mozilla.org\" target=\"_new\">browser</a>.</iframe>";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Who's Online.
|
||||||
|
if ($controlrow["showonline"] == 1) {
|
||||||
|
$row["whosonline"] = "<div class=\"big\"><b>Who's Online</b></div>";
|
||||||
|
$users = doquery("SELECT * FROM {{table}} WHERE UNIX_TIMESTAMP(onlinetime) >= '".(time()-600)."'", "users");
|
||||||
|
$number = mysql_num_rows($users);
|
||||||
|
$row["whosonline"] .= "There are <b>$number</b> user(s) online within the last 10 minutes: ";
|
||||||
|
while($b = mysql_fetch_array($users)) {
|
||||||
|
if ($b["guild"] != 0) {
|
||||||
|
$charname = "[<span style=\"color: ".$b["tagcolor"].";\">".$b["guildtag"]."</span>]<span style=\"color: ".$b["namecolor"].";\">".$b["charname"]."</span>";
|
||||||
|
} else {
|
||||||
|
$charname = $b["charname"];
|
||||||
|
}
|
||||||
|
$row["whosonline"] .= "<a href=\"users.php?do=profile&uid=".$b["id"]."\">$charname</a>, ";
|
||||||
|
}
|
||||||
|
$row["whosonline"] = rtrim($row["whosonline"], ", ");
|
||||||
|
}
|
||||||
|
|
||||||
|
// And then we're done with this panel.
|
||||||
|
return parsetemplate(gettemplate("panels_right"), $row);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function paneltop($loggedin = true) {
|
||||||
|
|
||||||
|
global $acctrow, $userrow;
|
||||||
|
if ($loggedin == true || isset($acctrow)) {
|
||||||
|
|
||||||
|
if ($userrow == false) { $userrow["charname"] = "No Characters Yet"; }
|
||||||
|
if ($acctrow["authlevel"] == 2) { $admin = " (<a href=\"admin/index.php\">Admin</a>)"; } else { $admin = ""; }
|
||||||
|
if ($userrow["guild"] != 0) {
|
||||||
|
$charname = "[<span style=\"color: ".$userrow["tagcolor"].";\">".$userrow["guildtag"]."</span>]<span style=\"color: ".$userrow["namecolor"].";\">".$userrow["charname"]."</span>";
|
||||||
|
} else {
|
||||||
|
$charname = $userrow["charname"];
|
||||||
|
}
|
||||||
|
$top = "<div class=\"big\">\n<center><b>$charname</b>$admin<br />\n";
|
||||||
|
$top .= "[ <a href=\"login.php?do=logout\">Log Out</a> | <a href=\"users.php?do=settings\">Account</a> | <a href=\"users.php?do=characters\">Characters</a> | <a href=\"help.php\">Help</a> ]\n";
|
||||||
|
$top .= "</center></div>\n";
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$top = "<div class=\"big\">\n<center><b>Not Logged In</b><br />\n";
|
||||||
|
$top .= "[ <a href=\"login.php?do=login\">Log In</a> | <a href=\"users.php?do=register\">Register</a> | <a href=\"help.php\">Help</a> ]\n";
|
||||||
|
$top .= "</center></div>\n";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return $top;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function panelbottom() {
|
||||||
|
|
||||||
|
global $userrow;
|
||||||
|
$row = array();
|
||||||
|
|
||||||
|
if ($userrow["charpicture"] != "") {
|
||||||
|
$row["charpicture"] = $userrow["charpicture"];
|
||||||
|
} else {
|
||||||
|
$row["charpicture"] = "images/users/nopicture.gif";
|
||||||
|
}
|
||||||
|
|
||||||
|
$row["level"] = $userrow["level"];
|
||||||
|
if ($userrow["levelup"] > 0) { $row["levelup"] = "<a href=\"users.php?do=levelup\" class=\"red\">(".$userrow["levelup"]." LP)</a>"; } else { $row["levelup"] = ""; }
|
||||||
|
if ($userrow["levelspell"] > 0) { $row["levelspell"] = "<a href=\"users.php?do=levelspell\" class=\"blue\">(".$userrow["levelspell"]." SP)</a>"; } else { $row["levelspell"] = ""; }
|
||||||
|
$row["experience"] = number_format($userrow["experience"]);
|
||||||
|
$row["gold"] = number_format($userrow["gold"]);
|
||||||
|
$row["weapon"] = $userrow["item1name"];
|
||||||
|
$row["armor"] = $userrow["item2name"];
|
||||||
|
$row["helmet"] = $userrow["item3name"];
|
||||||
|
$row["shield"] = $userrow["item4name"];
|
||||||
|
$row["hpbar"] = statusbars("hp", $userrow["currenthp"], $userrow["maxhp"]);
|
||||||
|
$row["mpbar"] = statusbars("mp", $userrow["currentmp"], $userrow["maxmp"]);
|
||||||
|
$row["tpbar"] = statusbars("tp", $userrow["currenttp"], $userrow["maxtp"]);
|
||||||
|
|
||||||
|
|
||||||
|
return parsetemplate(gettemplate("panels_bottom"),$row);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function panelmiddle() {
|
||||||
|
|
||||||
|
global $userrow, $townrow, $worldrow;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return gettemplate("panels_middle");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function statusbars($stat, $current, $max) {
|
||||||
|
|
||||||
|
$row = array();
|
||||||
|
switch ($stat) {
|
||||||
|
case "hp":
|
||||||
|
$row["bigname"] = "Hit Points";
|
||||||
|
$row["littlename"] = "HP";
|
||||||
|
break;
|
||||||
|
case "mp":
|
||||||
|
$row["bigname"] = "Magic Points";
|
||||||
|
$row["littlename"] = "MP";
|
||||||
|
break;
|
||||||
|
case "tp":
|
||||||
|
$row["bigname"] = "Travel Points";
|
||||||
|
$row["littlename"] = "TP";
|
||||||
|
break;
|
||||||
|
case "exp":
|
||||||
|
$row["bigname"] = "Experience";
|
||||||
|
$row["littlename"] = "Exp";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$row["width"] = ceil(($current / $max) * 100);
|
||||||
|
if ($row["width"] >= 66) { $row["color"] = "green"; }
|
||||||
|
if ($row["width"] < 66 && $row["width"] >= 33) { $row["color"] = "yellow"; }
|
||||||
|
if ($row["width"] < 33) { $row["color"] = "red"; }
|
||||||
|
|
||||||
|
$row["current"] = $current;
|
||||||
|
$row["max"] = $max;
|
||||||
|
return parsetemplate(gettemplate("statusbars"),$row);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
411
pvp.php
Normal file
|
@ -0,0 +1,411 @@
|
||||||
|
<?php // pvp.php :: primary duel controller.
|
||||||
|
|
||||||
|
include("lib.php");
|
||||||
|
include("globals.php");
|
||||||
|
include("fightmods.php");
|
||||||
|
|
||||||
|
global $userrow;
|
||||||
|
$monsterrow = array();
|
||||||
|
|
||||||
|
if ($userrow["currentpvp"] == 0) { die(header("Location: index.php")); }
|
||||||
|
donothing();
|
||||||
|
|
||||||
|
function donothing() {
|
||||||
|
|
||||||
|
global $userrow, $monsterrow, $fightrow;
|
||||||
|
$pvp = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp"));
|
||||||
|
|
||||||
|
// 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");
|
||||||
|
display("Duel Challenge", gettemplate("pvp_declined"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if they're dead.
|
||||||
|
if ($userrow["currenthp"] <= 0) { youlose(); }
|
||||||
|
|
||||||
|
// Check if it's their turn.
|
||||||
|
if ($pvp["playerturn"] == $userrow["id"]) { dofight(); }
|
||||||
|
|
||||||
|
// Not their turn, so wait.
|
||||||
|
dowait();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function challenged() {
|
||||||
|
|
||||||
|
global $userrow, $monsterrow, $fightrow;
|
||||||
|
$pvp = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp"));
|
||||||
|
if ($pvp == false) { die("Location: index.php"); }
|
||||||
|
$newuserrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$pvp["player1id"]."' LIMIT 1", "users"));
|
||||||
|
|
||||||
|
if ($newuserrow["charpicture"] != "") {
|
||||||
|
$newuserrow["avatar"] = "<img src=\"".$newuserrow["charpicture"]."\" alt=\"".$newuserrow["charname"]."\" width=\"50\" height=\"50\" />";
|
||||||
|
} else {
|
||||||
|
$newuserrow["avatar"] = "<img src=\"images/users/nopicture.gif\" alt=\"".$newuserrow["charname"]."\" width=\"50\" height=\"50\" />";
|
||||||
|
}
|
||||||
|
|
||||||
|
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");
|
||||||
|
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");
|
||||||
|
display("Duel Challenge",parsetemplate(gettemplate("pvp_decline"),$newuserrow));
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
display("Duel Challenge",parsetemplate(gettemplate("pvp_challenged"),$newuserrow));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function dowait() {
|
||||||
|
|
||||||
|
global $userrow, $monsterrow, $fightrow;
|
||||||
|
$pvp = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp"));
|
||||||
|
|
||||||
|
// "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"));
|
||||||
|
} else {
|
||||||
|
$monsterrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$pvp["player1id"]."' LIMIT 1", "users"));
|
||||||
|
}
|
||||||
|
|
||||||
|
$pagerow = array(
|
||||||
|
"message"=>$fightrow["message"],
|
||||||
|
"charname"=>$monsterrow["charname"],
|
||||||
|
"currenthp"=>$monsterrow["currenthp"],
|
||||||
|
"playerphysdamage"=>$fightrow["playerphysdamage"],
|
||||||
|
"playermagicdamage"=>$fightrow["playermagicdamage"],
|
||||||
|
"playerfiredamage"=>$fightrow["playerfiredamage"],
|
||||||
|
"playerlightdamage"=>$fightrow["playerlightdamage"]);
|
||||||
|
if ($monsterrow["charpicture"] != "") {
|
||||||
|
$pagerow["avatar"] = "<img src=\"".$monsterrow["charpicture"]."\" alt=\"".$monsterrow["charname"]."\" width=\"50\" height=\"50\" />";
|
||||||
|
} else {
|
||||||
|
$pagerow["avatar"] = "<img src=\"images/users/nopicture.gif\" alt=\"".$monsterrow["charname"]."\" width=\"50\" height=\"50\" />";
|
||||||
|
}
|
||||||
|
|
||||||
|
display("Duelling",parsetemplate(gettemplate("pvp_wait"),$pagerow));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function dofight() {
|
||||||
|
|
||||||
|
global $userrow, $monsterrow, $fightrow, $spells;
|
||||||
|
$pvp = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp"));
|
||||||
|
|
||||||
|
// "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"));
|
||||||
|
} else {
|
||||||
|
$nextplayer = $pvp["player1id"];
|
||||||
|
$monsterrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$pvp["player1id"]."' LIMIT 1", "users"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($_POST["fight"])) {
|
||||||
|
|
||||||
|
playerturn();
|
||||||
|
if ($monsterrow["currenthp"] <= 0) { youwin(); }
|
||||||
|
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");
|
||||||
|
|
||||||
|
$pagerow = array(
|
||||||
|
"message"=>$fightrow["message"],
|
||||||
|
"charname"=>$monsterrow["charname"],
|
||||||
|
"currenthp"=>$monsterrow["currenthp"],
|
||||||
|
"playerphysdamage"=>$fightrow["playerphysdamage"],
|
||||||
|
"playermagicdamage"=>$fightrow["playermagicdamage"],
|
||||||
|
"playerfiredamage"=>$fightrow["playerfiredamage"],
|
||||||
|
"playerlightdamage"=>$fightrow["playerlightdamage"]);
|
||||||
|
$pagerow["spells"] = dospellslist();
|
||||||
|
|
||||||
|
if ($monsterrow["charpicture"] != "") {
|
||||||
|
$pagerow["avatar"] = "<img src=\"".$monsterrow["charpicture"]."\" alt=\"".$monsterrow["charname"]."\" width=\"50\" height=\"50\" />";
|
||||||
|
} else {
|
||||||
|
$pagerow["avatar"] = "<img src=\"images/users/nopicture.gif\" alt=\"".$monsterrow["charname"]."\" width=\"50\" height=\"50\" />";
|
||||||
|
}
|
||||||
|
|
||||||
|
display("Duelling",parsetemplate(gettemplate("pvp_wait"),$pagerow));
|
||||||
|
|
||||||
|
} elseif (isset($_POST["spell"])) {
|
||||||
|
|
||||||
|
if (! is_numeric($_POST["spellid"])) { err("Invalid spell selection."); }
|
||||||
|
$isavailable = 0;
|
||||||
|
for ($i = 1; $i < 11; $i++) {
|
||||||
|
if ($userrow["spell".$i."id"] == $_POST["spellid"]) { $isavailable = 1; }
|
||||||
|
}
|
||||||
|
if ($isavailable == 0) { err("You don't have that spell."); }
|
||||||
|
|
||||||
|
include("spells.php");
|
||||||
|
$fightrow["message"] = $spells[$_POST["spellid"]]["fname"]($_POST["spellid"]);
|
||||||
|
$monsterrow["currenthp"] -= ($fightrow["playerphysdamage"] + $fightrow["playermagicdamage"] + $fightrow["playerfiredamage"] + $fightrow["playerlightdamage"]);
|
||||||
|
if ($monsterrow["currenthp"] <= 0) { youwin(); }
|
||||||
|
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");
|
||||||
|
|
||||||
|
$pagerow = array(
|
||||||
|
"message"=>$fightrow["message"],
|
||||||
|
"charname"=>$monsterrow["charname"],
|
||||||
|
"currenthp"=>$monsterrow["currenthp"],
|
||||||
|
"playerphysdamage"=>$fightrow["playerphysdamage"],
|
||||||
|
"playermagicdamage"=>$fightrow["playermagicdamage"],
|
||||||
|
"playerfiredamage"=>$fightrow["playerfiredamage"],
|
||||||
|
"playerlightdamage"=>$fightrow["playerlightdamage"]);
|
||||||
|
$pagerow["spells"] = dospellslist();
|
||||||
|
|
||||||
|
if ($monsterrow["charpicture"] != "") {
|
||||||
|
$pagerow["avatar"] = "<img src=\"".$monsterrow["charpicture"]."\" alt=\"".$monsterrow["charname"]."\" width=\"50\" height=\"50\" />";
|
||||||
|
} else {
|
||||||
|
$pagerow["avatar"] = "<img src=\"images/users/nopicture.gif\" alt=\"".$monsterrow["charname"]."\" width=\"50\" height=\"50\" />";
|
||||||
|
}
|
||||||
|
|
||||||
|
display("Fighting",parsetemplate(gettemplate("pvp_wait"),$pagerow));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($pvp["fightrow"] != "") {
|
||||||
|
|
||||||
|
$tempfightrow = explode(",",$pvp["fightrow"]);
|
||||||
|
$fightrow["playerphysdamage"] = $tempfightrow[0];
|
||||||
|
$fightrow["playermagicdamage"] = $tempfightrow[1];
|
||||||
|
$fightrow["playerfiredamage"] = $tempfightrow[2];
|
||||||
|
$fightrow["playerlightdamage"] = $tempfightrow[3];
|
||||||
|
$fightrow["message"] = $tempfightrow[4];
|
||||||
|
|
||||||
|
$pagerow = array(
|
||||||
|
"message"=>$fightrow["message"],
|
||||||
|
"charname"=>$monsterrow["charname"],
|
||||||
|
"currenthp"=>$monsterrow["currenthp"],
|
||||||
|
"playerphysdamage"=>$fightrow["playerphysdamage"],
|
||||||
|
"playermagicdamage"=>$fightrow["playermagicdamage"],
|
||||||
|
"playerfiredamage"=>$fightrow["playerfiredamage"],
|
||||||
|
"playerlightdamage"=>$fightrow["playerlightdamage"]);
|
||||||
|
$pagerow["spells"] = dospellslist();
|
||||||
|
|
||||||
|
if ($monsterrow["charpicture"] != "") {
|
||||||
|
$pagerow["avatar"] = "<img src=\"".$monsterrow["charpicture"]."\" alt=\"".$monsterrow["charname"]."\" width=\"50\" height=\"50\" />";
|
||||||
|
} else {
|
||||||
|
$pagerow["avatar"] = "<img src=\"images/users/nopicture.gif\" alt=\"".$monsterrow["charname"]."\" width=\"50\" height=\"50\" />";
|
||||||
|
}
|
||||||
|
|
||||||
|
display("Duelling",parsetemplate(gettemplate("pvp_turn"),$pagerow));
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$pagerow = array(
|
||||||
|
"charname"=>$monsterrow["charname"],
|
||||||
|
"currenthp"=>$monsterrow["currenthp"]);
|
||||||
|
$pagerow["spells"] = dospellslist();
|
||||||
|
|
||||||
|
if ($monsterrow["charpicture"] != "") {
|
||||||
|
$pagerow["avatar"] = "<img src=\"".$monsterrow["charpicture"]."\" alt=\"".$monsterrow["charname"]."\" width=\"50\" height=\"50\" />";
|
||||||
|
} else {
|
||||||
|
$pagerow["avatar"] = "<img src=\"images/users/nopicture.gif\" alt=\"".$monsterrow["charname"]."\" width=\"50\" height=\"50\" />";
|
||||||
|
}
|
||||||
|
|
||||||
|
display("Duelling",parsetemplate(gettemplate("pvp_new"),$pagerow));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function playerturn() {
|
||||||
|
|
||||||
|
global $userrow, $monsterrow, $fightrow;
|
||||||
|
|
||||||
|
// Calculate all damages.
|
||||||
|
if ($userrow["physattack"] != 0) {
|
||||||
|
$physhit = ceil(rand($userrow["physattack"]*.75, $userrow["physattack"]) / 3);
|
||||||
|
$physblock = ceil(rand($monsterrow["physdefense"]*.75, $monsterrow["physdefense"]) / 3);
|
||||||
|
$fightrow["playerphysdamage"] = max($physhit - $physblock, 0);
|
||||||
|
} else { $fightrow["playerphysdamage"] = 0; }
|
||||||
|
|
||||||
|
if ($userrow["magicattack"] != 0) {
|
||||||
|
$magichit = ceil(rand($userrow["magicattack"]*.75, $userrow["magicattack"]) / 3);
|
||||||
|
$magicblock = ceil(rand($monsterrow["magicdefense"]*.75, $monsterrow["magicdefense"]) / 3);
|
||||||
|
$fightrow["playermagicdamage"] = max($magichit - $magicblock, 0);
|
||||||
|
} else { $fightrow["playermagicdamage"] = 0; }
|
||||||
|
|
||||||
|
if ($userrow["fireattack"] != 0) {
|
||||||
|
$firehit = ceil(rand($userrow["fireattack"]*.75, $userrow["fireattack"]) / 3);
|
||||||
|
$fireblock = ceil(rand($monsterrow["firedefense"]*.75, $monsterrow["firedefense"]) / 3);
|
||||||
|
$fightrow["playerfiredamage"] = max($firehit - $fireblock, 0);
|
||||||
|
} else { $fightrow["playerfiredamage"] = 0; }
|
||||||
|
|
||||||
|
if ($userrow["lightattack"] != 0) {
|
||||||
|
$lighthit = ceil(rand($userrow["lightattack"]*.75, $userrow["lightattack"]) / 3);
|
||||||
|
$lightblock = ceil(rand($monsterrow["lightdefense"]*.75, $monsterrow["lightdefense"]) / 3);
|
||||||
|
$fightrow["playerlightdamage"] = max($lighthit - $lightblock, 0);
|
||||||
|
} else { $fightrow["playerlightdamage"] = 0; }
|
||||||
|
|
||||||
|
// Chance to make an excellent hit.
|
||||||
|
$toexcellent = rand(0,150);
|
||||||
|
if ($toexcellent <= sqrt($userrow["strength"])) {
|
||||||
|
$fightrow["playerphysdamage"] *= 2;
|
||||||
|
$fightrow["playermagicdamage"] *= 2;
|
||||||
|
$fightrow["playerfiredamage"] *= 2;
|
||||||
|
$fightrow["playerlightdamage"] *= 2;
|
||||||
|
$fightrow["message"] = "<b>Excellent hit!</b><br />";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Chance for monster to dodge.
|
||||||
|
$tododge = rand(0,200);
|
||||||
|
if ($tododge <= sqrt($monsterrow["physdefense"])) {
|
||||||
|
$fightrow["playerphysdamage"] = 0;
|
||||||
|
$fightrow["playermagicdamage"] = 0;
|
||||||
|
$fightrow["playerfiredamage"] = 0;
|
||||||
|
$fightrow["playerlightdamage"] = 0;
|
||||||
|
$fightrow["message"] = "<b>".$monsterrow["charname"]." dodged the hit!</b><br />";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now we add Per Turn mods.
|
||||||
|
hpleech("player");
|
||||||
|
mpleech("player");
|
||||||
|
|
||||||
|
// Subtract all damage from monster's hp.
|
||||||
|
$monsterrow["currenthp"] -= ($fightrow["playerphysdamage"] + $fightrow["playermagicdamage"] + $fightrow["playerfiredamage"] + $fightrow["playerlightdamage"]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function youwin() {
|
||||||
|
|
||||||
|
global $userrow, $monsterrow, $fightrow;
|
||||||
|
$pvp = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp"));
|
||||||
|
|
||||||
|
// "monsterrow" now becomes the other player's character.
|
||||||
|
if ($pvp["player1id"] == $userrow["id"]) {
|
||||||
|
$nextplayer = $pvp["player2id"];
|
||||||
|
} else {
|
||||||
|
$nextplayer = $pvp["player1id"];
|
||||||
|
}
|
||||||
|
|
||||||
|
$template = "pvp_win";
|
||||||
|
|
||||||
|
$userrow["currentaction"] = "In Town";
|
||||||
|
$userrow["currentfight"] = 0;
|
||||||
|
$userrow["currentpvp"] = 0;
|
||||||
|
|
||||||
|
// Now we add Per Kill mods.
|
||||||
|
hpgain();
|
||||||
|
mpgain();
|
||||||
|
|
||||||
|
// Update for new stats.
|
||||||
|
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");
|
||||||
|
|
||||||
|
// And we're done.
|
||||||
|
$pagerow = array(
|
||||||
|
"message"=>$fightrow["message"],
|
||||||
|
"monstername"=>$monsterrow["charname"],
|
||||||
|
"monsterhp"=>$userrow["currentmonsterhp"],
|
||||||
|
"playerphysdamage"=>$fightrow["playerphysdamage"],
|
||||||
|
"playermagicdamage"=>$fightrow["playermagicdamage"],
|
||||||
|
"playerfiredamage"=>$fightrow["playerfiredamage"],
|
||||||
|
"playerlightdamage"=>$fightrow["playerlightdamage"]);
|
||||||
|
|
||||||
|
if ($monsterrow["charpicture"] != "") {
|
||||||
|
$pagerow["avatar"] = "<img src=\"".$monsterrow["charpicture"]."\" alt=\"".$monsterrow["charname"]."\" width=\"50\" height=\"50\" />";
|
||||||
|
} else {
|
||||||
|
$pagerow["avatar"] = "<img src=\"images/users/nopicture.gif\" alt=\"".$monsterrow["charname"]."\" width=\"50\" height=\"50\" />";
|
||||||
|
}
|
||||||
|
|
||||||
|
display("Victory!",parsetemplate(gettemplate($template),$pagerow));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function youlose() {
|
||||||
|
|
||||||
|
global $userrow, $monsterrow, $fightrow;
|
||||||
|
$pvp = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$userrow["currentpvp"]."' LIMIT 1", "pvp"));
|
||||||
|
|
||||||
|
if ($pvp["player1id"] == $userrow["id"]) {
|
||||||
|
$monsterrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$pvp["player2id"]."' LIMIT 1", "users"));
|
||||||
|
} else {
|
||||||
|
$monsterrow = dorow(doquery("SELECT * FROM {{table}} WHERE id='".$pvp["player1id"]."' LIMIT 1", "users"));
|
||||||
|
}
|
||||||
|
|
||||||
|
$tempfightrow = explode(",",$pvp["fightrow"]);
|
||||||
|
$fightrow["playerphysdamage"] = $tempfightrow[0];
|
||||||
|
$fightrow["playermagicdamage"] = $tempfightrow[1];
|
||||||
|
$fightrow["playerfiredamage"] = $tempfightrow[2];
|
||||||
|
$fightrow["playerlightdamage"] = $tempfightrow[3];
|
||||||
|
$fightrow["message"] = $tempfightrow[4];
|
||||||
|
|
||||||
|
// Then put them in town & reset fight stuff.
|
||||||
|
$userrow["currentaction"] = "In Town";
|
||||||
|
$userrow["currentfight"] = 0;
|
||||||
|
$userrow["currentpvp"] = 0;
|
||||||
|
$userrow["currenthp"] = ceil($userrow["maxhp"] / 4);
|
||||||
|
|
||||||
|
// Update.
|
||||||
|
updateuserrow();
|
||||||
|
$query = doquery("DELETE FROM {{table}} WHERE id='".$pvp["id"]."' LIMIT 1", "pvp");
|
||||||
|
|
||||||
|
// And we're done.
|
||||||
|
$pagerow = array(
|
||||||
|
"message"=>$fightrow["message"],
|
||||||
|
"monstername"=>$monsterrow["charname"],
|
||||||
|
"monsterhp"=>$userrow["currentmonsterhp"],
|
||||||
|
"playerphysdamage"=>$fightrow["playerphysdamage"],
|
||||||
|
"playermagicdamage"=>$fightrow["playermagicdamage"],
|
||||||
|
"playerfiredamage"=>$fightrow["playerfiredamage"],
|
||||||
|
"playerlightdamage"=>$fightrow["playerlightdamage"]);
|
||||||
|
|
||||||
|
if ($monsterrow["charpicture"] != "") {
|
||||||
|
$pagerow["avatar"] = "<img src=\"".$monsterrow["charpicture"]."\" alt=\"".$monsterrow["charname"]."\" width=\"50\" height=\"50\" />";
|
||||||
|
} else {
|
||||||
|
$pagerow["avatar"] = "<img src=\"images/users/nopicture.gif\" alt=\"".$monsterrow["charname"]."\" width=\"50\" height=\"50\" />";
|
||||||
|
}
|
||||||
|
|
||||||
|
display("Thou Art Dead.",parsetemplate(gettemplate("pvp_lose"),$pagerow));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateopponent() {
|
||||||
|
|
||||||
|
global $monsterrow;
|
||||||
|
|
||||||
|
$querystring = "";
|
||||||
|
foreach($monsterrow as $a=>$b) {
|
||||||
|
$querystring .= "$a='$b',";
|
||||||
|
}
|
||||||
|
$querystring = rtrim($querystring, ",");
|
||||||
|
|
||||||
|
$query = doquery("UPDATE {{table}} SET $querystring WHERE id='".$monsterrow["id"]."' LIMIT 1", "users");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function dospellslist() {
|
||||||
|
|
||||||
|
global $userrow, $spells;
|
||||||
|
$options = "";
|
||||||
|
for ($i = 1; $i < 11; $i++) {
|
||||||
|
if ($userrow["spell".$i."id"] != 0) {
|
||||||
|
$options .= "<option value=\"".$userrow["spell".$i."id"]."\">".$userrow["spell".$i."name"]."</option>\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($options != "") {
|
||||||
|
$list = "<select name=\"spellid\">$options</select> <input type=\"submit\" name=\"spell\" value=\"Cast Spell\" />";
|
||||||
|
} else { $list = "<input type=\"submit\" name=\"spell\" value=\"Cast Spell\" disabled=\"disabled\" />"; }
|
||||||
|
return $list;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
54
pvpmini.php
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
<?php // pvpmini.php :: update tester for pvp.
|
||||||
|
|
||||||
|
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"));
|
||||||
|
|
||||||
|
// Check for timeout.
|
||||||
|
if ($row["fturntime"] < (time() - $controlrow["pvptimeout"])) {
|
||||||
|
|
||||||
|
$query = doquery("UPDATE {{table}} SET currentpvp='0', currentaction='In Town' WHERE id='".$row["player1id"]."' OR id='".$row["player2id"]."' LIMIT 2", "users");
|
||||||
|
$query2 = doquery("DELETE FROM {{table}} WHERE id='".$row["id"]."'", "pvp");
|
||||||
|
$pagerow["content"] = "The other player did not respond and this Duel has timed out. Thanks for playing.<br /><br />This window will refresh to the main screen in ".$controlrow["pvprefresh"]." seconds.";
|
||||||
|
$pagerow["target"] = "_top";
|
||||||
|
$pagerow["parentreload"] = "onload=\"setTimeout('top.location.href=\'index.php\'',".($controlrow["pvprefresh"] * 1000).")\"";
|
||||||
|
$pagerow["metareload"] = "";
|
||||||
|
|
||||||
|
$page = parsetemplate(gettemplate("pvp_mini"),$pagerow);
|
||||||
|
if ($controlrow["compression"] == 1) { ob_start("ob_gzhandler"); }
|
||||||
|
echo $page;
|
||||||
|
die();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// No timeout so check for whose turn it is.
|
||||||
|
if ($row["playerturn"] == $userrow["id"]) {
|
||||||
|
|
||||||
|
$pagerow["content"] = "Please hold while this window refreshes to the game screen...";
|
||||||
|
$pagerow["target"] = "_top";
|
||||||
|
$pagerow["metareload"] = "";
|
||||||
|
$pagerow["parentreload"] = "onload=\"setTimeout('top.location.href=\'pvp.php\'',".($controlrow["pvprefresh"] * 100).")\"";
|
||||||
|
$pagerow["metareload"] = "";
|
||||||
|
|
||||||
|
$page = parsetemplate(gettemplate("pvp_mini"),$pagerow);
|
||||||
|
if ($controlrow["compression"] == 1) { ob_start("ob_gzhandler"); }
|
||||||
|
echo $page;
|
||||||
|
die();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$pagerow["content"] = "Waiting for player to respond...";
|
||||||
|
$pagerow["target"] = "_self";
|
||||||
|
$pagerow["parentreload"] = "";
|
||||||
|
$pagerow["metareload"] = "<meta http-equiv=\"refresh\" content=\"".$controlrow["pvprefresh"].";url=pvpmini.php\">";
|
||||||
|
|
||||||
|
$page = parsetemplate(gettemplate("pvp_mini"),$pagerow);
|
||||||
|
if ($controlrow["compression"] == 1) { ob_start("ob_gzhandler"); }
|
||||||
|
echo $page;
|
||||||
|
die();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
97
spells.php
Normal file
|
@ -0,0 +1,97 @@
|
||||||
|
<?php // spells.php :: functions for spells.
|
||||||
|
|
||||||
|
function heal($id) {
|
||||||
|
|
||||||
|
global $userrow, $spells;
|
||||||
|
|
||||||
|
$failed = 0;
|
||||||
|
if ($userrow["currentmp"] < $spells[$id]["mp"]) { $return = "<span class=\"red\"><b>Spell Failed:</b> You do not have enough MP to cast that spell.</span><br />"; $failed = 1; }
|
||||||
|
|
||||||
|
if ($failed == 0) {
|
||||||
|
$userrow["currenthp"] += $spells[$id]["value"];
|
||||||
|
$userrow["currentmp"] -= $spells[$id]["mp"];
|
||||||
|
if ($userrow["currenthp"] > $userrow["maxhp"]) { $userrow["currenthp"] = $userrow["maxhp"]; }
|
||||||
|
$return = $userrow["charname"] . " casts " . $spells[$id]["name"] . " and gains " . $spells[$id]["value"] . " HP.<br />";
|
||||||
|
}
|
||||||
|
|
||||||
|
return($return);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function hurt($id) {
|
||||||
|
|
||||||
|
global $userrow, $monsterrow, $fightrow, $spells;
|
||||||
|
|
||||||
|
$failed = 0;
|
||||||
|
if ($userrow["currentmp"] < $spells[$id]["mp"]) { $return = "<span class=\"red\"><b>Spell Failed:</b> You do not have enough MP to cast that spell.</span><br />"; $failed = 1; }
|
||||||
|
|
||||||
|
if ($failed == 0) {
|
||||||
|
$userrow["currentmp"] -= $spells[$id]["mp"];
|
||||||
|
$magichit = ceil(rand($spells[$id]["value"]*.75, $spells[$id]["value"]));
|
||||||
|
$magicblock = ceil(rand($monsterrow["magicdefense"]*.75, $monsterrow["magicdefense"]) / 5);
|
||||||
|
$fightrow["playermagicdamage"] = max($magichit - $magicblock, 0);
|
||||||
|
$return = $userrow["charname"] . " casts " . $spells[$id]["name"] . " for " . $fightrow["playermagicdamage"] . " damage.<br />";
|
||||||
|
}
|
||||||
|
|
||||||
|
return($return);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function fire($id) {
|
||||||
|
|
||||||
|
global $userrow, $monsterrow, $fightrow, $spells;
|
||||||
|
|
||||||
|
$failed = 0;
|
||||||
|
if ($userrow["currentmp"] < $spells[$id]["mp"]) { $return = "<span class=\"red\"><b>Spell Failed:</b> You do not have enough MP to cast that spell.</span><br />"; $failed = 1; }
|
||||||
|
|
||||||
|
if ($failed == 0) {
|
||||||
|
$userrow["currentmp"] -= $spells[$id]["mp"];
|
||||||
|
$magichit = ceil(rand($spells[$id]["value"]*.75, $spells[$id]["value"]));
|
||||||
|
$magicblock = ceil(rand($monsterrow["firedefense"]*.75, $monsterrow["firedefense"]) / 5);
|
||||||
|
$fightrow["playerfiredamage"] = max($magichit - $magicblock, 0);
|
||||||
|
$return = $userrow["charname"] . " casts " . $spells[$id]["name"] . " for " . $fightrow["playerfiredamage"] . " damage.<br />";
|
||||||
|
}
|
||||||
|
|
||||||
|
return($return);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function light($id) {
|
||||||
|
|
||||||
|
global $userrow, $monsterrow, $fightrow, $spells;
|
||||||
|
|
||||||
|
$failed = 0;
|
||||||
|
if ($userrow["currentmp"] < $spells[$id]["mp"]) { $return = "<span class=\"red\"><b>Spell Failed:</b> You do not have enough MP to cast that spell.</span><br />"; $failed = 1; }
|
||||||
|
|
||||||
|
if ($failed == 0) {
|
||||||
|
$userrow["currentmp"] -= $spells[$id]["mp"];
|
||||||
|
$magichit = ceil(rand($spells[$id]["value"]*.75, $spells[$id]["value"]));
|
||||||
|
$magicblock = ceil(rand($monsterrow["lightdefense"]*.75, $monsterrow["lightdefense"]) / 5);
|
||||||
|
$fightrow["playerlightdamage"] = max($magichit - $magicblock, 0);
|
||||||
|
$return = $userrow["charname"] . " casts " . $spells[$id]["name"] . " for " . $fightrow["playerlightdamage"] . " damage.<br />";
|
||||||
|
}
|
||||||
|
|
||||||
|
return($return);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function prism($id) {
|
||||||
|
|
||||||
|
global $userrow, $monsterrow, $fightrow, $spells;
|
||||||
|
|
||||||
|
$failed = 0;
|
||||||
|
if ($userrow["currentmp"] < $spells[$id]["mp"]) { $return = "<span class=\"red\"><b>Spell Failed:</b> You do not have enough MP to cast that spell.</span><br />"; $failed = 1; }
|
||||||
|
|
||||||
|
if ($failed == 0) {
|
||||||
|
$userrow["currentmp"] -= $spells[$id]["mp"];
|
||||||
|
$magichit = ceil(rand($spells[$id]["value"]*.75, $spells[$id]["value"]));
|
||||||
|
$magicblock = ceil(rand($monsterrow["lightdefense"]*.75, $monsterrow["lightdefense"]) / 5);
|
||||||
|
$fightrow["playerlightdamage"] = max($magichit - $magicblock, 0);
|
||||||
|
$return = $userrow["charname"] . " casts " . $spells[$id]["name"] . " for " . $fightrow["playerlightdamage"] . " damage.<br />";
|
||||||
|
}
|
||||||
|
|
||||||
|
return($return);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
12
templates/botcheck.php
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
In order to prevent mouse macro bots from playing the game automatically, this game requires a periodic manual security code confirmation to ensure that only real people are playing the game. Please enter the code you see below into the box and click the Submit button. You will then be returned to the game.
|
||||||
|
<form action="index.php?do=botcheck" method="post">
|
||||||
|
{{images}}<br />
|
||||||
|
<input type="text" name="botcheck" size="10" maxlength="10" /><br />
|
||||||
|
<input type="submit" name="submit" value="Submit" />
|
||||||
|
</form>
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
7
templates/explore.php
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
You are exploring the map, and nothing has happened. Continue exploring using the direction buttons or the Travel To menus.
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
12
templates/explore_verify.php
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
<form action="index.php?do=humanity" method="post">
|
||||||
|
In order to prevent macros and robots from abusing the game, you must verify that you are able to read the following image. Please enter the 6 character code you see in the image into the form box below to continue playing. Thank you.<br /><br />
|
||||||
|
<img src="images/botcheck/{{exploreverifyimage}}" alt="Human Verification" style="border: solid 1px black;" /><br /><br />
|
||||||
|
Verification Code: <input type="text" name="verify" size="10" maxlength="6" /><br />
|
||||||
|
<input type="submit" name="submit" value="Submit" />
|
||||||
|
</form>
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
13
templates/fight_level.php
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
You are fighting a <b>{{monstername}}</b>.<br /><br />
|
||||||
|
{{message}}
|
||||||
|
You attack the monster for (<span style="color: black; font-weight: bold;">{{playerphysdamage}}</span>|<span style="color: green; font-weight: bold;">{{playermagicdamage}}</span>|<span style="color: red; font-weight: bold;">{{playerfiredamage}}</span>|<span style="color: blue; font-weight: bold;">{{playerlightdamage}}</span>) damage.<br /><br />
|
||||||
|
You have defeated the <b>{{monstername}}</b>.<br />
|
||||||
|
You gain <b>{{newexp}}</b> Experience.<br />
|
||||||
|
You gain <b>{{newgold}}</b> Gold.<br /><br />
|
||||||
|
You may now continue <a href="index.php">exploring</a>.
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
15
templates/fight_levelup.php
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
You are fighting a <b>{{monstername}}</b>.<br /><br />
|
||||||
|
{{message}}
|
||||||
|
You attack the monster for (<span style="color: black; font-weight: bold;">{{playerphysdamage}}</span>|<span style="color: green; font-weight: bold;">{{playermagicdamage}}</span>|<span style="color: red; font-weight: bold;">{{playerfiredamage}}</span>|<span style="color: blue; font-weight: bold;">{{playerlightdamage}}</span>) damage.<br /><br />
|
||||||
|
You have defeated the <b>{{monstername}}</b>.<br />
|
||||||
|
You gain <b>{{newexp}}</b> Experience.<br />
|
||||||
|
You gain <b>{{newgold}}</b> Gold.<br /><br />
|
||||||
|
<span class="red"><b>You have gained a level! You have 5 Level Points to spend on your character<br />
|
||||||
|
Level points can be accessed in your Extended Profile.</b></span><br /><br />
|
||||||
|
You may now continue <a href="index.php">exploring</a>.
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
15
templates/fight_levelupspell.php
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
You are fighting a <b>{{monstername}}</b>.<br /><br />
|
||||||
|
{{message}}
|
||||||
|
You attack the monster for (<span style="color: black; font-weight: bold;">{{playerphysdamage}}</span>|<span style="color: green; font-weight: bold;">{{playermagicdamage}}</span>|<span style="color: red; font-weight: bold;">{{playerfiredamage}}</span>|<span style="color: blue; font-weight: bold;">{{playerlightdamage}}</span>) damage.<br /><br />
|
||||||
|
You have defeated the <b>{{monstername}}</b>.<br />
|
||||||
|
You gain <b>{{newexp}}</b> Experience.<br />
|
||||||
|
You gain <b>{{newgold}}</b> Gold.<br /><br />
|
||||||
|
<span class="red"><b>You have gained a level! You have 5 Level Points and 1 Spell Point to spend on your character<br />
|
||||||
|
Level points can be accessed in your Extended Profile.</b></span><br /><br />
|
||||||
|
You may now continue <a href="index.php">exploring</a>.
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
14
templates/fight_lose.php
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
You are fighting a <b>{{monstername}}</b>.<br />
|
||||||
|
Monster's HP: {{monsterhp}}<br /><br />
|
||||||
|
{{message}}
|
||||||
|
You attack the monster for (<span style="color: black; font-weight: bold;">{{playerphysdamage}}</span>|<span style="color: green; font-weight: bold;">{{playermagicdamage}}</span>|<span style="color: red; font-weight: bold;">{{playerfiredamage}}</span>|<span style="color: blue; font-weight: bold;">{{playerlightdamage}}</span>) damage.<br /><br />
|
||||||
|
The monster attacks you for (<span style="color: black; font-weight: bold;">{{monsterphysdamage}}</span>|<span style="color: green; font-weight: bold;">{{monstermagicdamage}}</span>|<span style="color: red; font-weight: bold;">{{monsterfiredamage}}</span>|<span style="color: blue; font-weight: bold;">{{monsterlightdamage}}</span>) damage.<br /><br />
|
||||||
|
<b>You have died.</b><br /><br />
|
||||||
|
As a consequence, you've lost half of your gold and {{deathpenalty}} percent of your experience. You have been sent to town given back a portion of your hit points to continue your journey.<br /><br />
|
||||||
|
You may now continue <a href="index.php">playing</a>, and you should probably hope that you fair better next time.
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
14
templates/fight_new.php
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
You are fighting a <b>{{monstername}}</b>.<br />
|
||||||
|
Monster's HP: {{monsterhp}}<br /><br />
|
||||||
|
Command?
|
||||||
|
<form action="fight.php" method="post">
|
||||||
|
<input type="submit" name="fight" value="Fight" /> <br />
|
||||||
|
{{spells}}<br />
|
||||||
|
<input type="submit" name="run" value="Run" />
|
||||||
|
</form>
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
17
templates/fight_turn.php
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
You are fighting a <b>{{monstername}}</b>.<br />
|
||||||
|
Monster's HP: {{monsterhp}}<br /><br />
|
||||||
|
{{message}}
|
||||||
|
You attack the monster for (<span style="color: black; font-weight: bold;">{{playerphysdamage}}</span>|<span style="color: green; font-weight: bold;">{{playermagicdamage}}</span>|<span style="color: red; font-weight: bold;">{{playerfiredamage}}</span>|<span style="color: blue; font-weight: bold;">{{playerlightdamage}}</span>) damage.<br /><br />
|
||||||
|
The monster attacks you for (<span style="color: black; font-weight: bold;">{{monsterphysdamage}}</span>|<span style="color: green; font-weight: bold;">{{monstermagicdamage}}</span>|<span style="color: red; font-weight: bold;">{{monsterfiredamage}}</span>|<span style="color: blue; font-weight: bold;">{{monsterlightdamage}}</span>) damage.<br /><br />
|
||||||
|
Command?
|
||||||
|
<form action="fight.php" method="post">
|
||||||
|
<input type="submit" name="fight" value="Fight" /> <br />
|
||||||
|
{{spells}}<br />
|
||||||
|
<input type="submit" name="run" value="Run" />
|
||||||
|
</form>
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
13
templates/fight_win.php
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
You are fighting a <b>{{monstername}}</b>.<br /><br />
|
||||||
|
{{message}}
|
||||||
|
You attack the monster for (<span style="color: black; font-weight: bold;">{{playerphysdamage}}</span>|<span style="color: green; font-weight: bold;">{{playermagicdamage}}</span>|<span style="color: red; font-weight: bold;">{{playerfiredamage}}</span>|<span style="color: blue; font-weight: bold;">{{playerlightdamage}}</span>) damage.<br /><br />
|
||||||
|
You have defeated the <b>{{monstername}}</b>.<br />
|
||||||
|
You gain <b>{{newexp}}</b> Experience.<br />
|
||||||
|
You gain <b>{{newgold}}</b> Gold.<br /><br />
|
||||||
|
You may now continue <a href="index.php">exploring</a>.
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
15
templates/guild_apply.php
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
<center>
|
||||||
|
<div style="border: solid 1px #aaaaaa; background-color: #eeeeee; padding: 5px; width: 400px; text-align: left;">
|
||||||
|
<b>Guild Statement for {{name}}:</b><br /><br />
|
||||||
|
{{statement}}
|
||||||
|
</div></center><br /><br />
|
||||||
|
Applying for this Guild costs {{joincost}} gold. This is non-refundable. Are you sure you want to apply to this Guild?<br /><br />
|
||||||
|
<form action="index.php?do=guildapp&id={{id}}" method="post">
|
||||||
|
<input type="submit" name="yes" value="Yes" /> <input type="submit" name="no" value="No" />
|
||||||
|
</form>
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
23
templates/guild_create.php
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
<form action="index.php?do=guildcreate" method="post">
|
||||||
|
<table>
|
||||||
|
<tr><td width="30%">Name:</td><td><input type="text" name="name" size="30" maxlength="50" /><br />Your Guild's full name.<br /><br /><br /></td></tr>
|
||||||
|
<tr><td width="30%">Tagline:</td><td><input type="text" name="tagline" size="5" maxlength="4" /><br />A short abbreviation or tagline for your Guild. For example, if your Guild name is "Lords of Carnage," your tagline might be "LoC." This will appear in brackets in front of each member's name.<br /><br /><br /></td></tr>
|
||||||
|
<tr><td width="30%">Name Color:</td><td><input type="text" name="color2" size="10" maxlength="7" value="#" /><br />HTML color code used to display the name of your Guild, and the names of each member.<br />(<a href="http://hotwired.lycos.com/webmonkey/reference/color_codes/" target="_new">Click here</a> for a list of color codes.)<br /><br /><br /></td></tr>
|
||||||
|
<tr><td width="30%">Tagline Color:</td><td><input type="text" name="color1" size="10" maxlength="7" value="#" /><br />HTML color code used to display your Guild's tagline.<br />(<a href="http://hotwired.lycos.com/webmonkey/reference/color_codes/" target="_new">Click here</a> for a list of color codes.)<br /><br /><br /></td></tr>
|
||||||
|
<tr><td width="30%">Cost to Join:</td><td><input type="text" name="joincost" size="10" maxlength="7" /><br />How much gold it will cost for a member to join your guild.<br /><br /><br /></td></tr>
|
||||||
|
<tr><td width="30%">Rank 1 Title:</td><td><input type="text" name="rank1" size="30" maxlength="30" /><br />Lowest ranking Guild member's title. <br /><br /><br /></td></tr>
|
||||||
|
<tr><td width="30%">Rank 2 Title:</td><td><input type="text" name="rank2" size="30" maxlength="30" /><br />2nd ranking Guild member's title.<br /><br /><br /></td></tr>
|
||||||
|
<tr><td width="30%">Rank 3 Title:</td><td><input type="text" name="rank3" size="30" maxlength="30" /><br />3rd ranking Guild member's title.<br /><br /><br /></td></tr>
|
||||||
|
<tr><td width="30%">Rank 4 Title:</td><td><input type="text" name="rank4" size="30" maxlength="30" /><br />4th ranking Guild member's title. These are sub-leaders for your Guild.<br /><br /><br /></td></tr>
|
||||||
|
<tr><td width="30%">Rank 5 Title:</td><td><input type="text" name="rank5" size="30" maxlength="30" /><br />Highest ranking Guild member's title. This will be your title, as well as any other member you promote to this rank.<br /><br /><br /></td></tr>
|
||||||
|
<tr><td width="30%">Opening Statement</td><td><textarea name="statement" rows="5" cols="30"></textarea><br />Your Guild's introduction statement or creed.</td></tr>
|
||||||
|
<tr><td colspan="2"><input type="submit" name="submit" value="Submit" /> <input type="reset" name="reset" value="Reset" /></td></tr>
|
||||||
|
<tr><td colspan="2"><b>NOTES:</b> The cost for creating a guild is {{guildstartup}} gold.<br /><br />Ranks 1 through 3 are nominal only and are all treated identically in the game. Rank 4 members can distribute Guild funds, promote other members up to Rank 3, and demote/remove members. Rank 5 members are Guild Leaders, and can do all Rank 4 tasks as well as promote members to ranks 4 and 5, and disband the Guild.</td></tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
10
templates/guild_disband.php
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
Disbanding the Guild is permanent and cannot be undone. Are you sure you want to do this?<br /><br />
|
||||||
|
<form action="index.php?do=guilddisband" method="post">
|
||||||
|
<input type="submit" name="yes" value="Yes" /> <input type="submit" name="no" value="No" />
|
||||||
|
</form>
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
22
templates/guild_edit.php
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
<form action="index.php?do=guildedit" method="post">
|
||||||
|
<table>
|
||||||
|
<tr><td width="30%">Name:</td><td>{{name}}<br /><br /><br /></td></tr>
|
||||||
|
<tr><td width="30%">Tagline:</td><td>{{tagline}}<br /><br /><br /></td></tr>
|
||||||
|
<tr><td width="30%">Name Color:</td><td><input type="text" name="color2" size="10" maxlength="7" value="{{color2}}" /><br />HTML color code used to display the name of your Guild, and the names of each member.<br />(<a href="http://hotwired.lycos.com/webmonkey/reference/color_codes/" target="_new">Click here</a> for a list of color codes.)<br /><br /><br /></td></tr>
|
||||||
|
<tr><td width="30%">Tagline Color:</td><td><input type="text" name="color1" size="10" maxlength="7" value="{{color1}}" /><br />HTML color code used to display your Guild's tagline.<br />(<a href="http://hotwired.lycos.com/webmonkey/reference/color_codes/" target="_new">Click here</a> for a list of color codes.)<br /><br /><br /></td></tr>
|
||||||
|
<tr><td width="30%">Cost to Join:</td><td><input type="text" name="joincost" size="10" maxlength="7" value="{{joincost}}" /><br />How much gold it will cost for a member to join your guild.<br /><br /><br /></td></tr>
|
||||||
|
<tr><td width="30%">Rank 1 Title:</td><td><input type="text" name="rank1" size="30" maxlength="30" value="{{rank1}}" /><br />Lowest ranking Guild member's title. <br /><br /><br /></td></tr>
|
||||||
|
<tr><td width="30%">Rank 2 Title:</td><td><input type="text" name="rank2" size="30" maxlength="30" value="{{rank2}}" /><br />2nd ranking Guild member's title.<br /><br /><br /></td></tr>
|
||||||
|
<tr><td width="30%">Rank 3 Title:</td><td><input type="text" name="rank3" size="30" maxlength="30" value="{{rank3}}" /><br />3rd ranking Guild member's title.<br /><br /><br /></td></tr>
|
||||||
|
<tr><td width="30%">Rank 4 Title:</td><td><input type="text" name="rank4" size="30" maxlength="30" value="{{rank4}}" /><br />4th ranking Guild member's title. These are sub-leaders for your Guild.<br /><br /><br /></td></tr>
|
||||||
|
<tr><td width="30%">Rank 5 Title:</td><td><input type="text" name="rank5" size="30" maxlength="30" value="{{rank5}}" /><br />Highest ranking Guild member's title. This will be your title, as well as any other member you promote to this rank.<br /><br /><br /></td></tr>
|
||||||
|
<tr><td width="30%">Opening Statement</td><td><textarea name="statement" rows="5" cols="30">{{statement}}</textarea><br />Your Guild's introduction statement or creed.</td></tr>
|
||||||
|
<tr><td colspan="2"><input type="submit" name="submit" value="Submit" /> <input type="reset" name="reset" value="Reset" /></td></tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
52
templates/guild_homehigh.php
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
<center>
|
||||||
|
<table style="width: 450px;"><tr>
|
||||||
|
<td width="50%">
|
||||||
|
<div class="big"><b>News</b></div>
|
||||||
|
<div style="border: solid 1px #aaaaaa; background-color: #eeeeee; padding: 5px; text-align: left;">
|
||||||
|
{{news}}<br /><br />
|
||||||
|
<a href="index.php?do=guildnews">Edit</a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{babblebox}}
|
||||||
|
</td>
|
||||||
|
</tr><tr>
|
||||||
|
<td>
|
||||||
|
<div class="big"><b>Bank</b></div>
|
||||||
|
Your Guild has {{bank}} gold.<hr />
|
||||||
|
<form action="index.php?do=guildbank" method="post">
|
||||||
|
Send <input type="text" name="gold" size="5" maxlength="10" /> Gold to {{memberselect}} <input type="submit" name="out" value="Go" /><hr />
|
||||||
|
Deposit <input type="text" name="golddeposit" size="5" maxlength="10" /> Gold <input type="submit" name="in" value="Go" />
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="big"><b>Member Ranks</b></div>
|
||||||
|
Select a member to promote/demote.<br /><br />
|
||||||
|
<form action="index.php?do=guildpromote" method="post">
|
||||||
|
{{memberselect}}<br /><input type="submit" name="promote" value="Promote" /> <input type="submit" name="demote" value="Demote" />
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
</tr><tr>
|
||||||
|
<td>
|
||||||
|
<div class="big"><b>Applications</b></div>
|
||||||
|
Select a user to approve/deny.<br /><br />
|
||||||
|
<form action="index.php?do=guildapprove" method="post">
|
||||||
|
{{appselect}}
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="big"><b>More Guild Functions</b></div>
|
||||||
|
<ul>
|
||||||
|
<li /><a href="index.php?do=guildedit">Edit Settings</a>
|
||||||
|
<li /><a href="index.php?do=guildleave">Leave Guild</a>
|
||||||
|
<li /><a href="index.php?do=guilddisband">Disband Guild</a>
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
</tr></table><br /><br />
|
||||||
|
You may also return to <a href="index.php">town</a> or the <a href="index.php?do=guilds&list=list">Guild List</a>.
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
34
templates/guild_homelow.php
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
<center>
|
||||||
|
<table style="width: 450px;"><tr>
|
||||||
|
<td width="50%">
|
||||||
|
<div class="big"><b>News</b></div>
|
||||||
|
<div style="border: solid 1px #aaaaaa; background-color: #eeeeee; padding: 5px; text-align: left;">
|
||||||
|
{{news}}<br /><br />
|
||||||
|
<a href="index.php?do=guildnews">Edit</a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{babblebox}}
|
||||||
|
</td>
|
||||||
|
</tr><tr>
|
||||||
|
<td>
|
||||||
|
<div class="big"><b>Bank</b></div>
|
||||||
|
Your Guild has {{bank}} gold.<hr />
|
||||||
|
<form action="index.php?do=guildbank" method="post">
|
||||||
|
Deposit <input type="text" name="golddeposit" size="5" maxlength="10" /> Gold <input type="submit" name="in" value="Go" />
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="big"><b>More Guild Functions</b></div>
|
||||||
|
<ul>
|
||||||
|
<li /><a href="index.php?do=guildleave">Leave Guild</a>
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
</tr></table><br /><br />
|
||||||
|
You may also return to <a href="index.php">town</a> or the <a href="index.php?do=guilds&list=list">Guild List</a>.
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
52
templates/guild_homemid.php
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
<center>
|
||||||
|
<table style="width: 450px;"><tr>
|
||||||
|
<td width="50%">
|
||||||
|
<div class="big"><b>News</b></div>
|
||||||
|
<div style="border: solid 1px #aaaaaa; background-color: #eeeeee; padding: 5px; text-align: left;">
|
||||||
|
{{news}}<br /><br />
|
||||||
|
<a href="index.php?do=guildnews">Edit</a>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
{{babblebox}}
|
||||||
|
</td>
|
||||||
|
</tr><tr>
|
||||||
|
<td>
|
||||||
|
<div class="big"><b>Bank</b></div>
|
||||||
|
Your Guild has {{bank}} gold.<hr />
|
||||||
|
<form action="index.php?do=guildbank" method="post">
|
||||||
|
Send <input type="text" name="gold" size="5" maxlength="10" /> Gold to {{memberselect}} <input type="submit" name="out" value="Go" /><hr />
|
||||||
|
Deposit <input type="text" name="golddeposit" size="5" maxlength="10" /> Gold <input type="submit" name="in" value="Go" />
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="big"><b>Member Ranks</b></div>
|
||||||
|
Select a member to promote/demote.<br /><br />
|
||||||
|
<form action="index.php?do=guildpromote" method="post">
|
||||||
|
{{memberselect}}<br /><input type="submit" name="promote" value="Promote" /> <input type="submit" name="demote" value="Demote" />
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
</tr><tr>
|
||||||
|
<td>
|
||||||
|
<div class="big"><b>Applications</b></div>
|
||||||
|
Select a user to approve/deny.<br /><br />
|
||||||
|
<form action="index.php?do=guildapprove" method="post">
|
||||||
|
{{appselect}}
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div class="big"><b>More Guild Functions</b></div>
|
||||||
|
<ul>
|
||||||
|
<li /><a href="index.php?do=guildedit">Edit Settings</a>
|
||||||
|
<li /><a href="index.php?do=guildleave">Leave Guild</a>
|
||||||
|
<li /><a href="index.php?do=guilddisband">Disband Guild</a>
|
||||||
|
</ul>
|
||||||
|
</td>
|
||||||
|
</tr></table><br /><br />
|
||||||
|
You may also return to <a href="index.php">town</a> or the <a href="index.php?do=guilds&list=list">Guild List</a>.
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
10
templates/guild_leave.php
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
Leaving the Guild is permanent and cannot be undone. Are you sure you want to do this?<br /><br />
|
||||||
|
<form action="index.php?do=guildleave" method="post">
|
||||||
|
<input type="submit" name="yes" value="Yes" /> <input type="submit" name="no" value="No" />
|
||||||
|
</form>
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
11
templates/guild_list.php
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
If you are not currently affiliated with any Guild, you can <a href="index.php?do=guildcreate">start your own</a> or submit an application to join one of the Guilds listed below.<br /><br />
|
||||||
|
If you are a member of a Guild, you can also continue to your Guild's <a href="index.php?do=guildhome">Hall</a>.<br /><br />
|
||||||
|
{{guildlist}}
|
||||||
|
<br />
|
||||||
|
If you've changed your mind, you may also return to <a href="index.php">town</a>.
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
10
templates/guild_members.php
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
<b>{{name}} Members List</b><br /><br />
|
||||||
|
{{guildmembers}}
|
||||||
|
<br />
|
||||||
|
You may also return to <a href="index.php">town</a>.
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
11
templates/guild_news.php
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
<form action="index.php?do=guildnews" method="post">
|
||||||
|
Edit your Guild's news/info below.<br /><br />
|
||||||
|
<textarea name="news" rows="5" cols="30">{{news}}</textarea><br />
|
||||||
|
<input type="submit" name="submit" value="Submit" /> <input type="reset" name="reset" value="Reset" />
|
||||||
|
</form>
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
11
templates/guild_remove.php
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
{{charname}} is currently Rank 1. Demoting this member will remove him from your guild. Are you sure you want to do that?<br /><br />
|
||||||
|
<form action="index.php?do=guildremove" method="post">
|
||||||
|
<input type="hidden" name="charid" value="{{charid}}" />
|
||||||
|
<input type="submit" name="yes" value="Yes" /> <input type="submit" name="no" value="No" />
|
||||||
|
</form>
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
14
templates/login.php
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
<form action="login.php?do=login" method="post">
|
||||||
|
<table width="90%" cellspacing="0" cellpadding="5">
|
||||||
|
<tr><td width="20%">Username:</td><td><input type="text" name="username" size="30" maxlength="30" /></td></tr>
|
||||||
|
<tr><td>Password:</td><td><input type="password" name="password" size="30" maxlength="30" /></td></tr>
|
||||||
|
<tr><td>Remember Me?</td><td><input type="checkbox" name="remember" value="yes" /> Yes.</td></tr>
|
||||||
|
<tr><td colspan="2"><input type="submit" name="submit" value="Log In" /></td></tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
18
templates/mailbox_letter.php
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
<table width="95%">
|
||||||
|
<tr>
|
||||||
|
<td style="padding-right: 10px;"><a href="users.php?do=profile&uid={{senderid}}">{{senderavatar}}</a></td>
|
||||||
|
<td width="100%">
|
||||||
|
From: <a href="users.php?do=profile&uid={{senderid}}">{{sendername}}</a><br />
|
||||||
|
Date: {{fpostdate}}<br />
|
||||||
|
Subject: {{title}}<br />
|
||||||
|
{{moneytransfer}}
|
||||||
|
</td></tr></table><hr />
|
||||||
|
{{message}}<br /><hr />
|
||||||
|
<a href="index.php?do=mailreply&id={{id}}">Reply</a> | <a href="index.php?do=maildelete&id={{id}}">Delete</a> | <a href="index.php?do=mailnew">New Letter</a> | <a href="index.php?do=mailbox">Inbox</a> | <a href="index.php?do=mailsent">Outbox</a><br /><br />
|
||||||
|
You may also return to <a href="index.php">town</a>.
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
12
templates/mailbox_letterout.php
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
To: <a href="users.php?do=profile&uid={{recipientid}}">{{recipientname}}</a><br />
|
||||||
|
Date: {{fpostdate}}<br />
|
||||||
|
Subject: {{title}}<br /><hr />
|
||||||
|
{{message}}<br /><hr />
|
||||||
|
<a href="index.php?do=mailnew">New Letter</a> | <a href="index.php?do=mailbox">Inbox</a> | <a href="index.php?do=mailsent">Outbox</a><br /><br />
|
||||||
|
You may also return to <a href="index.php">town</a>.
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
13
templates/mailbox_list.php
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
The Post Office is where you can send and receive Letters and Money Transfers.<br /><br />
|
||||||
|
{{messages}}
|
||||||
|
<span class="red">*</span> = New Letter.<br />
|
||||||
|
<span class="blue">$</span> = Letter contains a Money Transfer.<br /><br />
|
||||||
|
<hr />
|
||||||
|
<a href="index.php?do=mailnew">New Letter</a> | <a href="index.php?do=mailbox">Inbox</a> | <a href="index.php?do=mailsent">Outbox</a><br /><br />
|
||||||
|
You may also return to <a href="index.php">town</a>.
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
11
templates/mailbox_listout.php
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
Your Outbox shows all letters that you have sent to other players. Any letters that have been deleted by the recipient will not be available in your Outbox.<br /><br />
|
||||||
|
{{messages}}
|
||||||
|
<hr />
|
||||||
|
<a href="index.php?do=mailnew">New Letter</a> | <a href="index.php?do=mailbox">Inbox</a> | <a href="index.php?do=mailsent">Outbox</a><br /><br />
|
||||||
|
You may also return to <a href="index.php">town</a>.
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
11
templates/mailbox_listoutrow.php
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
<tr>
|
||||||
|
<td width="40%"><a href="index.php?do=mailviewsent&id={{id}}">{{title}}</a></td>
|
||||||
|
<td width="30%">To: <a href="users.php?do=profile&uid={{recipientid}}">{{recipientname}}</a></td>
|
||||||
|
<td width="30%">{{fpostdate}}</td>
|
||||||
|
</tr>
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
11
templates/mailbox_listrow.php
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
<tr>
|
||||||
|
<td width="40%">{{new}}{{money}}<a href="index.php?do=mailview&id={{id}}">{{title}}</a></td>
|
||||||
|
<td width="30%">From: <a href="users.php?do=profile&uid={{senderid}}">{{sendername}}</a></td>
|
||||||
|
<td width="30%">{{fpostdate}}</td>
|
||||||
|
</tr>
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
24
templates/mailbox_new.php
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
You can send a letter to another player using the form below. Fields marked with a <span class="red">*</span> are required.
|
||||||
|
The Send Gold field allows you to attach money to the letter, which will be given to the recipient when they read it.<br /><br />
|
||||||
|
Note that there is a 5 Gold postage fee for sending all letters.<br /><br />
|
||||||
|
<form action="index.php?do=mailnew" method="post">
|
||||||
|
<table width="95%">
|
||||||
|
<tr><td width="20%">To:<span class="red">*</span></td><td><input type="text" name="recipient" size="30" maxlength="30" /> (Character Name)</td></tr>
|
||||||
|
<tr><td width="20%">Subject:<span class="red">*</span></td><td><input type="text" name="title" size="40" maxlength="200" /></td></tr>
|
||||||
|
<tr><td width="20%">Send Gold:</td><td><input type="text" name="gold" size="10" maxlength="10" /></td></tr>
|
||||||
|
<tr><td colspan="2">
|
||||||
|
Message:<br />
|
||||||
|
<textarea name="message" rows="7" cols="40"></textarea>
|
||||||
|
</td></tr>
|
||||||
|
<tr><td colspan="2"><input type="submit" name="submit" value="Send" /> <input type="reset" name="reset" value="Reset" /></td></tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
<hr />
|
||||||
|
<a href="index.php?do=mailnew">New Letter</a> | <a href="index.php?do=mailbox">Inbox</a> | <a href="index.php?do=mailsent">Outbox</a><br /><br />
|
||||||
|
You may also return to <a href="index.php">town</a>.
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
25
templates/mailbox_reply.php
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
You can send a letter to another player using the form below. Fields marked with a <span class="red">*</span> are required.
|
||||||
|
The Send Gold field allows you to attach money to the letter, which will be given to the recipient when they read it.<br /><br />
|
||||||
|
Note that there is a 5 Gold postage fee for sending all letters.<br /><br />
|
||||||
|
<form action="index.php?do=mailreply&id={{id}}" method="post">
|
||||||
|
<table width="95%">
|
||||||
|
<tr><td width="20%">To:</td><td>{{sendername}}</td></tr>
|
||||||
|
<tr><td width="20%">Subject:<span class="red">*</span></td><td><input type="text" name="title" size="40" maxlength="200" value="Re: {{title}}" /></td></tr>
|
||||||
|
<tr><td width="20%">Send Gold:</td><td><input type="text" name="gold" size="10" maxlength="10" /></td></tr>
|
||||||
|
<tr><td colspan="2">
|
||||||
|
Message:<br />
|
||||||
|
<textarea name="message" rows="7" cols="40"></textarea>
|
||||||
|
</td></tr>
|
||||||
|
<tr><td colspan="2"><input type="submit" name="submit" value="Send" /> <input type="reset" name="reset" value="Reset" /></td></tr>
|
||||||
|
</table>
|
||||||
|
</form><hr />
|
||||||
|
<b>Original Message:</b><br /><br />
|
||||||
|
{{message}}<br /><hr />
|
||||||
|
<a href="index.php?do=mailnew">New Letter</a> | <a href="index.php?do=mailbox">Inbox</a> | <a href="index.php?do=mailsent">Outbox</a><br /><br />
|
||||||
|
You may also return to <a href="index.php">town</a>.
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
8
templates/mailbox_sent.php
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
Thank you for sending this message.<br /><br />
|
||||||
|
You may now go back to your <a href="index.php?do=mailbox">Mailbox</a> or return to <a href="index.php">Town</a>.
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|
35
templates/misc_babblebox.php
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
$template = <<<END
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="refresh" content="45">
|
||||||
|
<title>Babblebox</title>
|
||||||
|
<style type="text/css">
|
||||||
|
body { font: 10px Verdana; background-color: white; padding: 0px; margin: 0px; }
|
||||||
|
table { font: 10px Verdana; }
|
||||||
|
td { vertical-align: top; }
|
||||||
|
input { font: 10px Verdana; }
|
||||||
|
img { border-style: none; }
|
||||||
|
a { color: #996600; text-decoration: none; font-weight: bold; }
|
||||||
|
a:hover { color: #663300; }
|
||||||
|
.main { border: solid 1px black; }
|
||||||
|
.grey { color: #999999; }
|
||||||
|
.red { color: #ff0000; }
|
||||||
|
.blue { color: #0000ff; }
|
||||||
|
.big { font: 11px Verdana; background-color: #dddddd; border: solid 1px #aaaaaa; padding: 2px; margin-bottom: 3px; }
|
||||||
|
.babble1 { background-color: #eeeeee; font: 10px Verdana; margin: 0px; padding: 2px; }
|
||||||
|
.babble2 { background-color: #ffffff; font: 10px Verdana; margin: 0px; padding: 2px; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body onload="window.scrollTo(0,99999)">
|
||||||
|
{{shouts}}
|
||||||
|
<div class="babble1">
|
||||||
|
<form action="index.php?do=babblebox{{guild}}" method="post">
|
||||||
|
<input type="text" name="babble" size="15" maxlength="100" /> <input type="submit" name="submit" value="Babble!" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
END;
|
||||||
|
|
||||||
|
?>
|