mirror of
https://github.com/moparisthebest/MoparClassic
synced 2024-12-21 23:18:52 -05:00
Removed a bunch of junk from the database that had nothing to do with the server itself
Changed some queries to reflect these changes
This commit is contained in:
parent
e184117109
commit
824a54cc8f
456
Database.sql
456
Database.sql
@ -1,7 +1,7 @@
|
|||||||
-- MoparRSC DB Structure
|
-- MoparRSC DB Structure
|
||||||
--
|
--
|
||||||
-- ------------------------------------------------------
|
-- ------------------------------------------------------
|
||||||
-- Server version 5.1.49-1ubuntu8.1
|
-- Server version 5.1.49-1ubuntu8.1-log
|
||||||
|
|
||||||
|
|
||||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||||
@ -20,42 +20,24 @@
|
|||||||
|
|
||||||
CREATE DATABASE IF NOT EXISTS moparclassic;
|
CREATE DATABASE IF NOT EXISTS moparclassic;
|
||||||
USE moparclassic;
|
USE moparclassic;
|
||||||
CREATE TABLE `moparclassic`.`bans` (
|
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
||||||
`username` varchar(200) DEFAULT NULL,
|
|
||||||
`ip` varchar(255) DEFAULT NULL,
|
|
||||||
`email` varchar(80) DEFAULT NULL,
|
|
||||||
`message` varchar(255) DEFAULT NULL,
|
|
||||||
`expire` int(10) unsigned DEFAULT NULL,
|
|
||||||
`ban_creator` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
KEY `bans_username_idx` (`username`(25))
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
|
||||||
CREATE TABLE `moparclassic`.`categories` (
|
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
||||||
`cat_name` varchar(80) NOT NULL DEFAULT 'New Category',
|
|
||||||
`disp_position` int(10) NOT NULL DEFAULT '0',
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
|
|
||||||
|
|
||||||
CREATE TABLE `moparclassic`.`censoring` (
|
--
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
-- Definition of table `moparclassic`.`drops`
|
||||||
`search_for` varchar(60) NOT NULL DEFAULT '',
|
--
|
||||||
`replace_with` varchar(60) NOT NULL DEFAULT '',
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
|
||||||
CREATE TABLE `moparclassic`.`config` (
|
|
||||||
`conf_name` varchar(255) NOT NULL DEFAULT '',
|
|
||||||
`conf_value` text,
|
|
||||||
PRIMARY KEY (`conf_name`)
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`drops`;
|
||||||
CREATE TABLE `moparclassic`.`drops` (
|
CREATE TABLE `moparclassic`.`drops` (
|
||||||
`id` int(11) DEFAULT NULL,
|
`id` int(11) DEFAULT NULL,
|
||||||
`item` varchar(255) DEFAULT NULL,
|
`item` varchar(255) DEFAULT NULL,
|
||||||
`amount` int(11) DEFAULT NULL,
|
`amount` int(11) DEFAULT NULL,
|
||||||
`weight` int(11) DEFAULT NULL
|
`weight` int(11) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Definition of table `moparclassic`.`dupe_data`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`dupe_data`;
|
||||||
CREATE TABLE `moparclassic`.`dupe_data` (
|
CREATE TABLE `moparclassic`.`dupe_data` (
|
||||||
`user` varchar(255) NOT NULL,
|
`user` varchar(255) NOT NULL,
|
||||||
`userhash` varchar(255) NOT NULL,
|
`userhash` varchar(255) NOT NULL,
|
||||||
@ -63,92 +45,33 @@ CREATE TABLE `moparclassic`.`dupe_data` (
|
|||||||
`time` varchar(255) DEFAULT NULL
|
`time` varchar(255) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Definition of table `moparclassic`.`error_reports`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`error_reports`;
|
||||||
CREATE TABLE `moparclassic`.`error_reports` (
|
CREATE TABLE `moparclassic`.`error_reports` (
|
||||||
`data` text,
|
`data` text,
|
||||||
`email` varchar(255) DEFAULT NULL,
|
`email` varchar(255) DEFAULT NULL,
|
||||||
`ip` varchar(255) DEFAULT NULL,
|
`ip` varchar(255) DEFAULT NULL,
|
||||||
`unix` varchar(255) DEFAULT NULL
|
`unix` varchar(255) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||||
CREATE TABLE `moparclassic`.`forum_perms` (
|
|
||||||
`group_id` int(10) NOT NULL DEFAULT '0',
|
|
||||||
`forum_id` int(10) NOT NULL DEFAULT '0',
|
|
||||||
`read_forum` tinyint(1) NOT NULL DEFAULT '1',
|
|
||||||
`post_replies` tinyint(1) NOT NULL DEFAULT '1',
|
|
||||||
`post_topics` tinyint(1) NOT NULL DEFAULT '1',
|
|
||||||
PRIMARY KEY (`group_id`,`forum_id`)
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
|
||||||
CREATE TABLE `moparclassic`.`forums` (
|
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
||||||
`forum_name` varchar(80) NOT NULL DEFAULT 'New forum',
|
|
||||||
`forum_desc` text,
|
|
||||||
`redirect_url` varchar(100) DEFAULT NULL,
|
|
||||||
`moderators` text,
|
|
||||||
`num_topics` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`num_posts` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`last_post` int(10) unsigned DEFAULT NULL,
|
|
||||||
`last_post_id` int(10) unsigned DEFAULT NULL,
|
|
||||||
`last_poster` varchar(200) DEFAULT NULL,
|
|
||||||
`sort_by` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`disp_position` int(10) NOT NULL DEFAULT '0',
|
|
||||||
`cat_id` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Definition of table `moparclassic`.`gp_count`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`gp_count`;
|
||||||
CREATE TABLE `moparclassic`.`gp_count` (
|
CREATE TABLE `moparclassic`.`gp_count` (
|
||||||
`unixtime` varchar(255) DEFAULT NULL,
|
`unixtime` varchar(255) DEFAULT NULL,
|
||||||
`amount` varchar(255) DEFAULT NULL
|
`amount` varchar(255) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||||
CREATE TABLE `moparclassic`.`groups` (
|
|
||||||
`g_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
||||||
`g_title` varchar(50) NOT NULL DEFAULT '',
|
|
||||||
`g_user_title` varchar(50) DEFAULT NULL,
|
|
||||||
`g_moderator` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`g_mod_edit_users` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`g_mod_rename_users` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`g_mod_change_passwords` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`g_mod_ban_users` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`g_read_board` tinyint(1) NOT NULL DEFAULT '1',
|
|
||||||
`g_view_users` tinyint(1) NOT NULL DEFAULT '1',
|
|
||||||
`g_post_replies` tinyint(1) NOT NULL DEFAULT '1',
|
|
||||||
`g_post_topics` tinyint(1) NOT NULL DEFAULT '1',
|
|
||||||
`g_edit_posts` tinyint(1) NOT NULL DEFAULT '1',
|
|
||||||
`g_delete_posts` tinyint(1) NOT NULL DEFAULT '1',
|
|
||||||
`g_delete_topics` tinyint(1) NOT NULL DEFAULT '1',
|
|
||||||
`g_set_title` tinyint(1) NOT NULL DEFAULT '1',
|
|
||||||
`g_search` tinyint(1) NOT NULL DEFAULT '1',
|
|
||||||
`g_search_users` tinyint(1) NOT NULL DEFAULT '1',
|
|
||||||
`g_send_email` tinyint(1) NOT NULL DEFAULT '1',
|
|
||||||
`g_post_flood` smallint(6) NOT NULL DEFAULT '30',
|
|
||||||
`g_search_flood` smallint(6) NOT NULL DEFAULT '30',
|
|
||||||
`g_email_flood` smallint(6) NOT NULL DEFAULT '60',
|
|
||||||
PRIMARY KEY (`g_id`)
|
|
||||||
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
|
|
||||||
|
|
||||||
CREATE TABLE `moparclassic`.`invites` (
|
--
|
||||||
`owner` varchar(255) NOT NULL DEFAULT '',
|
-- Definition of table `moparclassic`.`items`
|
||||||
`code` varchar(255) NOT NULL DEFAULT '',
|
--
|
||||||
`time` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`invites` varchar(255) NOT NULL DEFAULT '1',
|
DROP TABLE IF EXISTS `moparclassic`.`items`;
|
||||||
`email` varchar(255) NOT NULL DEFAULT ''
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
||||||
CREATE TABLE `moparclassic`.`irc_online` (
|
|
||||||
`username` varchar(255) NOT NULL,
|
|
||||||
`rank` int(1) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`username`)
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
||||||
CREATE TABLE `moparclassic`.`irc_stats` (
|
|
||||||
`username` varchar(255) NOT NULL,
|
|
||||||
`messages` int(10) DEFAULT NULL,
|
|
||||||
`modes` int(10) DEFAULT NULL,
|
|
||||||
`kicks` int(10) DEFAULT NULL,
|
|
||||||
`kicked` int(10) DEFAULT NULL,
|
|
||||||
`lastTimeSpoken` bigint(11) DEFAULT NULL,
|
|
||||||
`joins` int(10) DEFAULT NULL,
|
|
||||||
`parts` int(10) DEFAULT NULL,
|
|
||||||
`randomstring` text,
|
|
||||||
`moderatedchan` int(10) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`username`)
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
||||||
CREATE TABLE `moparclassic`.`items` (
|
CREATE TABLE `moparclassic`.`items` (
|
||||||
`id` int(11) DEFAULT NULL,
|
`id` int(11) DEFAULT NULL,
|
||||||
`name` varchar(255) DEFAULT NULL,
|
`name` varchar(255) DEFAULT NULL,
|
||||||
@ -157,41 +80,22 @@ CREATE TABLE `moparclassic`.`items` (
|
|||||||
`stackable` varchar(255) DEFAULT NULL,
|
`stackable` varchar(255) DEFAULT NULL,
|
||||||
`wieldable` varchar(255) DEFAULT NULL
|
`wieldable` varchar(255) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||||
CREATE TABLE `moparclassic`.`logins` (
|
|
||||||
`id` int(10) DEFAULT NULL,
|
--
|
||||||
`login_ip` varchar(15) DEFAULT NULL,
|
-- Definition of table `moparclassic`.`online_count`
|
||||||
`time` int(10) DEFAULT NULL
|
--
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
||||||
CREATE TABLE `moparclassic`.`messages` (
|
DROP TABLE IF EXISTS `moparclassic`.`online_count`;
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
||||||
`owner` int(10) NOT NULL DEFAULT '0',
|
|
||||||
`subject` varchar(120) NOT NULL DEFAULT '',
|
|
||||||
`message` text,
|
|
||||||
`sender` varchar(120) NOT NULL DEFAULT '',
|
|
||||||
`sender_id` int(10) NOT NULL DEFAULT '0',
|
|
||||||
`posted` int(10) NOT NULL DEFAULT '0',
|
|
||||||
`sender_ip` varchar(120) NOT NULL DEFAULT '0.0.0.0',
|
|
||||||
`smileys` tinyint(1) NOT NULL DEFAULT '1',
|
|
||||||
`status` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`showed` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
KEY `messages_owner_idx` (`owner`)
|
|
||||||
) ENGINE=MyISAM AUTO_INCREMENT=23964 DEFAULT CHARSET=latin1;
|
|
||||||
CREATE TABLE `moparclassic`.`online` (
|
|
||||||
`user_id` int(10) unsigned NOT NULL DEFAULT '1',
|
|
||||||
`ident` varchar(200) NOT NULL DEFAULT '',
|
|
||||||
`logged` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`idle` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`last_post` int(10) unsigned DEFAULT NULL,
|
|
||||||
`last_search` int(10) unsigned DEFAULT NULL,
|
|
||||||
UNIQUE KEY `online_user_id_ident_idx` (`user_id`,`ident`(25)),
|
|
||||||
KEY `online_ident_idx` (`ident`(25)),
|
|
||||||
KEY `online_logged_idx` (`logged`)
|
|
||||||
) ENGINE=MEMORY DEFAULT CHARSET=utf8;
|
|
||||||
CREATE TABLE `moparclassic`.`online_count` (
|
CREATE TABLE `moparclassic`.`online_count` (
|
||||||
`unixtime` varchar(255) DEFAULT NULL,
|
`unixtime` varchar(255) DEFAULT NULL,
|
||||||
`online` int(20) DEFAULT NULL
|
`online` int(20) DEFAULT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Definition of table `moparclassic`.`pk_bank`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`pk_bank`;
|
||||||
CREATE TABLE `moparclassic`.`pk_bank` (
|
CREATE TABLE `moparclassic`.`pk_bank` (
|
||||||
`user` varchar(255) DEFAULT NULL,
|
`user` varchar(255) DEFAULT NULL,
|
||||||
`id` int(10) unsigned NOT NULL,
|
`id` int(10) unsigned NOT NULL,
|
||||||
@ -202,6 +106,11 @@ CREATE TABLE `moparclassic`.`pk_bank` (
|
|||||||
KEY `amount` (`amount`)
|
KEY `amount` (`amount`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Definition of table `moparclassic`.`pk_banlog`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`pk_banlog`;
|
||||||
CREATE TABLE `moparclassic`.`pk_banlog` (
|
CREATE TABLE `moparclassic`.`pk_banlog` (
|
||||||
`user` varchar(255) DEFAULT NULL,
|
`user` varchar(255) DEFAULT NULL,
|
||||||
`staff` varchar(255) DEFAULT NULL,
|
`staff` varchar(255) DEFAULT NULL,
|
||||||
@ -210,6 +119,12 @@ CREATE TABLE `moparclassic`.`pk_banlog` (
|
|||||||
KEY `time` (`time`),
|
KEY `time` (`time`),
|
||||||
KEY `user` (`user`)
|
KEY `user` (`user`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Definition of table `moparclassic`.`pk_curstats`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`pk_curstats`;
|
||||||
CREATE TABLE `moparclassic`.`pk_curstats` (
|
CREATE TABLE `moparclassic`.`pk_curstats` (
|
||||||
`user` varchar(255) NOT NULL,
|
`user` varchar(255) NOT NULL,
|
||||||
`cur_attack` int(5) unsigned NOT NULL DEFAULT '1',
|
`cur_attack` int(5) unsigned NOT NULL DEFAULT '1',
|
||||||
@ -235,6 +150,11 @@ CREATE TABLE `moparclassic`.`pk_curstats` (
|
|||||||
KEY `user` (`user`)
|
KEY `user` (`user`)
|
||||||
) ENGINE=MyISAM AUTO_INCREMENT=350943 DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM AUTO_INCREMENT=350943 DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Definition of table `moparclassic`.`pk_experience`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`pk_experience`;
|
||||||
CREATE TABLE `moparclassic`.`pk_experience` (
|
CREATE TABLE `moparclassic`.`pk_experience` (
|
||||||
`user` varchar(255) NOT NULL,
|
`user` varchar(255) NOT NULL,
|
||||||
`exp_attack` int(10) unsigned NOT NULL DEFAULT '0',
|
`exp_attack` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
@ -278,18 +198,35 @@ CREATE TABLE `moparclassic`.`pk_experience` (
|
|||||||
KEY `user` (`user`)
|
KEY `user` (`user`)
|
||||||
) ENGINE=MyISAM AUTO_INCREMENT=350943 DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM AUTO_INCREMENT=350943 DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Definition of table `moparclassic`.`pk_friends`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`pk_friends`;
|
||||||
CREATE TABLE `moparclassic`.`pk_friends` (
|
CREATE TABLE `moparclassic`.`pk_friends` (
|
||||||
`user` varchar(255) NOT NULL,
|
`user` varchar(255) NOT NULL,
|
||||||
`friend` varchar(255) NOT NULL,
|
`friend` varchar(255) NOT NULL,
|
||||||
KEY `user` (`user`),
|
KEY `user` (`user`),
|
||||||
KEY `friend` (`friend`)
|
KEY `friend` (`friend`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Definition of table `moparclassic`.`pk_ignores`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`pk_ignores`;
|
||||||
CREATE TABLE `moparclassic`.`pk_ignores` (
|
CREATE TABLE `moparclassic`.`pk_ignores` (
|
||||||
`user` varchar(255) NOT NULL,
|
`user` varchar(255) NOT NULL,
|
||||||
`ignore` varchar(255) NOT NULL,
|
`ignore` varchar(255) NOT NULL,
|
||||||
KEY `ignore` (`ignore`),
|
KEY `ignore` (`ignore`),
|
||||||
KEY `user` (`user`)
|
KEY `user` (`user`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Definition of table `moparclassic`.`pk_invitems`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`pk_invitems`;
|
||||||
CREATE TABLE `moparclassic`.`pk_invitems` (
|
CREATE TABLE `moparclassic`.`pk_invitems` (
|
||||||
`user` varchar(255) NOT NULL,
|
`user` varchar(255) NOT NULL,
|
||||||
`id` int(10) unsigned NOT NULL,
|
`id` int(10) unsigned NOT NULL,
|
||||||
@ -299,17 +236,34 @@ CREATE TABLE `moparclassic`.`pk_invitems` (
|
|||||||
KEY `user` (`user`)
|
KEY `user` (`user`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Definition of table `moparclassic`.`pk_ipbans`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`pk_ipbans`;
|
||||||
CREATE TABLE `moparclassic`.`pk_ipbans` (
|
CREATE TABLE `moparclassic`.`pk_ipbans` (
|
||||||
`ip` varchar(15) NOT NULL,
|
`ip` varchar(15) NOT NULL,
|
||||||
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
PRIMARY KEY (`ip`)
|
PRIMARY KEY (`ip`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Definition of table `moparclassic`.`pk_kills`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`pk_kills`;
|
||||||
CREATE TABLE `moparclassic`.`pk_kills` (
|
CREATE TABLE `moparclassic`.`pk_kills` (
|
||||||
`user` varchar(255) NOT NULL,
|
`user` varchar(255) NOT NULL,
|
||||||
`type` tinyint(1) NOT NULL DEFAULT '0',
|
`type` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
`killed` varchar(45) NOT NULL,
|
`killed` varchar(45) NOT NULL,
|
||||||
`time` int(10) NOT NULL
|
`time` int(10) NOT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Definition of table `moparclassic`.`pk_logins`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`pk_logins`;
|
||||||
CREATE TABLE `moparclassic`.`pk_logins` (
|
CREATE TABLE `moparclassic`.`pk_logins` (
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`user` varchar(45) NOT NULL,
|
`user` varchar(45) NOT NULL,
|
||||||
@ -317,8 +271,13 @@ CREATE TABLE `moparclassic`.`pk_logins` (
|
|||||||
`ip` varchar(15) NOT NULL DEFAULT '0.0.0.0',
|
`ip` varchar(15) NOT NULL DEFAULT '0.0.0.0',
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `ip` (`ip`)
|
KEY `ip` (`ip`)
|
||||||
) ENGINE=MyISAM AUTO_INCREMENT=4254489 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
|
) ENGINE=MyISAM AUTO_INCREMENT=4254616 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Definition of table `moparclassic`.`pk_market`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`pk_market`;
|
||||||
CREATE TABLE `moparclassic`.`pk_market` (
|
CREATE TABLE `moparclassic`.`pk_market` (
|
||||||
`owner` int(10) NOT NULL,
|
`owner` int(10) NOT NULL,
|
||||||
`item_id` int(10) NOT NULL,
|
`item_id` int(10) NOT NULL,
|
||||||
@ -326,6 +285,12 @@ CREATE TABLE `moparclassic`.`pk_market` (
|
|||||||
`selling_price` int(10) NOT NULL,
|
`selling_price` int(10) NOT NULL,
|
||||||
PRIMARY KEY (`owner`)
|
PRIMARY KEY (`owner`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Definition of table `moparclassic`.`pk_mutelog`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`pk_mutelog`;
|
||||||
CREATE TABLE `moparclassic`.`pk_mutelog` (
|
CREATE TABLE `moparclassic`.`pk_mutelog` (
|
||||||
`user` varchar(255) NOT NULL,
|
`user` varchar(255) NOT NULL,
|
||||||
`staff` varchar(255) NOT NULL,
|
`staff` varchar(255) NOT NULL,
|
||||||
@ -333,6 +298,12 @@ CREATE TABLE `moparclassic`.`pk_mutelog` (
|
|||||||
`report_id` int(11) NOT NULL,
|
`report_id` int(11) NOT NULL,
|
||||||
`duration` int(10) NOT NULL
|
`duration` int(10) NOT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Definition of table `moparclassic`.`pk_online`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`pk_online`;
|
||||||
CREATE TABLE `moparclassic`.`pk_online` (
|
CREATE TABLE `moparclassic`.`pk_online` (
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`user` varchar(45) NOT NULL,
|
`user` varchar(45) NOT NULL,
|
||||||
@ -342,6 +313,12 @@ CREATE TABLE `moparclassic`.`pk_online` (
|
|||||||
`world` int(10) unsigned NOT NULL,
|
`world` int(10) unsigned NOT NULL,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC COMMENT='InnoDB free: 9216 kB';
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC COMMENT='InnoDB free: 9216 kB';
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Definition of table `moparclassic`.`pk_players`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`pk_players`;
|
||||||
CREATE TABLE `moparclassic`.`pk_players` (
|
CREATE TABLE `moparclassic`.`pk_players` (
|
||||||
`user` varchar(255) NOT NULL,
|
`user` varchar(255) NOT NULL,
|
||||||
`username` varchar(255) NOT NULL DEFAULT '',
|
`username` varchar(255) NOT NULL DEFAULT '',
|
||||||
@ -393,6 +370,11 @@ CREATE TABLE `moparclassic`.`pk_players` (
|
|||||||
KEY `user` (`user`)
|
KEY `user` (`user`)
|
||||||
) ENGINE=MyISAM AUTO_INCREMENT=350944 DEFAULT CHARSET=latin1 COMMENT='InnoDB free: 9216 kB';
|
) ENGINE=MyISAM AUTO_INCREMENT=350944 DEFAULT CHARSET=latin1 COMMENT='InnoDB free: 9216 kB';
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Definition of table `moparclassic`.`pk_quests`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`pk_quests`;
|
||||||
CREATE TABLE `moparclassic`.`pk_quests` (
|
CREATE TABLE `moparclassic`.`pk_quests` (
|
||||||
`id` int(11) DEFAULT NULL,
|
`id` int(11) DEFAULT NULL,
|
||||||
`stage` int(11) DEFAULT NULL,
|
`stage` int(11) DEFAULT NULL,
|
||||||
@ -400,6 +382,11 @@ CREATE TABLE `moparclassic`.`pk_quests` (
|
|||||||
KEY `user` (`user`)
|
KEY `user` (`user`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Definition of table `moparclassic`.`pk_reports`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`pk_reports`;
|
||||||
CREATE TABLE `moparclassic`.`pk_reports` (
|
CREATE TABLE `moparclassic`.`pk_reports` (
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`from` varchar(255) NOT NULL,
|
`from` varchar(255) NOT NULL,
|
||||||
@ -418,6 +405,12 @@ CREATE TABLE `moparclassic`.`pk_reports` (
|
|||||||
`sendToMod` int(11) DEFAULT '0',
|
`sendToMod` int(11) DEFAULT '0',
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=MyISAM AUTO_INCREMENT=4340 DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM AUTO_INCREMENT=4340 DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Definition of table `moparclassic`.`pk_reports_comments`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`pk_reports_comments`;
|
||||||
CREATE TABLE `moparclassic`.`pk_reports_comments` (
|
CREATE TABLE `moparclassic`.`pk_reports_comments` (
|
||||||
`id` int(10) NOT NULL AUTO_INCREMENT,
|
`id` int(10) NOT NULL AUTO_INCREMENT,
|
||||||
`report_id` int(10) NOT NULL,
|
`report_id` int(10) NOT NULL,
|
||||||
@ -426,6 +419,12 @@ CREATE TABLE `moparclassic`.`pk_reports_comments` (
|
|||||||
`text` text NOT NULL,
|
`text` text NOT NULL,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=MyISAM AUTO_INCREMENT=4222 DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM AUTO_INCREMENT=4222 DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Definition of table `moparclassic`.`pk_stat_reduction`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`pk_stat_reduction`;
|
||||||
CREATE TABLE `moparclassic`.`pk_stat_reduction` (
|
CREATE TABLE `moparclassic`.`pk_stat_reduction` (
|
||||||
`user` int(10) NOT NULL,
|
`user` int(10) NOT NULL,
|
||||||
`account` varchar(255) NOT NULL,
|
`account` varchar(255) NOT NULL,
|
||||||
@ -434,6 +433,12 @@ CREATE TABLE `moparclassic`.`pk_stat_reduction` (
|
|||||||
`voucher` varchar(255) DEFAULT NULL,
|
`voucher` varchar(255) DEFAULT NULL,
|
||||||
`time` int(11) NOT NULL
|
`time` int(11) NOT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Definition of table `moparclassic`.`pk_tradelog`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`pk_tradelog`;
|
||||||
CREATE TABLE `moparclassic`.`pk_tradelog` (
|
CREATE TABLE `moparclassic`.`pk_tradelog` (
|
||||||
`from` varchar(255) DEFAULT NULL,
|
`from` varchar(255) DEFAULT NULL,
|
||||||
`to` varchar(255) DEFAULT NULL,
|
`to` varchar(255) DEFAULT NULL,
|
||||||
@ -448,6 +453,11 @@ CREATE TABLE `moparclassic`.`pk_tradelog` (
|
|||||||
KEY `tradelog_time` (`time`)
|
KEY `tradelog_time` (`time`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Definition of table `moparclassic`.`pk_worlds`
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `moparclassic`.`pk_worlds`;
|
||||||
CREATE TABLE `moparclassic`.`pk_worlds` (
|
CREATE TABLE `moparclassic`.`pk_worlds` (
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
`location` varchar(45) NOT NULL,
|
`location` varchar(45) NOT NULL,
|
||||||
@ -455,182 +465,6 @@ CREATE TABLE `moparclassic`.`pk_worlds` (
|
|||||||
`port` varchar(45) NOT NULL,
|
`port` varchar(45) NOT NULL,
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
|
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
|
||||||
CREATE TABLE `moparclassic`.`posts` (
|
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
||||||
`poster` varchar(200) NOT NULL DEFAULT '',
|
|
||||||
`poster_id` int(10) unsigned NOT NULL DEFAULT '1',
|
|
||||||
`poster_ip` varchar(39) DEFAULT NULL,
|
|
||||||
`poster_email` varchar(80) DEFAULT NULL,
|
|
||||||
`message` text,
|
|
||||||
`hide_smilies` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`posted` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`edited` int(10) unsigned DEFAULT NULL,
|
|
||||||
`edited_by` varchar(200) DEFAULT NULL,
|
|
||||||
`topic_id` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
KEY `posts_topic_id_idx` (`topic_id`),
|
|
||||||
KEY `posts_multi_idx` (`poster_id`,`topic_id`)
|
|
||||||
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
|
|
||||||
|
|
||||||
CREATE TABLE `moparclassic`.`ranks` (
|
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
||||||
`rank` varchar(50) NOT NULL DEFAULT '',
|
|
||||||
`min_posts` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
|
|
||||||
|
|
||||||
CREATE TABLE `moparclassic`.`reports` (
|
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
||||||
`post_id` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`topic_id` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`forum_id` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`reported_by` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`created` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`message` text,
|
|
||||||
`zapped` int(10) unsigned DEFAULT NULL,
|
|
||||||
`zapped_by` int(10) unsigned DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
KEY `reports_zapped_idx` (`zapped`)
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
|
||||||
CREATE TABLE `moparclassic`.`reputation` (
|
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
||||||
`user_id` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`from_user_id` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`time` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`post_id` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`reason` text NOT NULL,
|
|
||||||
`rep_plus` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`rep_minus` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`topics_id` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
KEY `rep_post_id_idx` (`post_id`),
|
|
||||||
KEY `rep_multi_user_id_idx` (`topics_id`,`from_user_id`)
|
|
||||||
) ENGINE=MyISAM AUTO_INCREMENT=15940 DEFAULT CHARSET=latin1;
|
|
||||||
CREATE TABLE `moparclassic`.`search_cache` (
|
|
||||||
`id` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`ident` varchar(200) NOT NULL DEFAULT '',
|
|
||||||
`search_data` mediumtext,
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
KEY `search_cache_ident_idx` (`ident`(8))
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
|
||||||
CREATE TABLE `moparclassic`.`search_matches` (
|
|
||||||
`post_id` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`word_id` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`subject_match` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
KEY `search_matches_word_id_idx` (`word_id`),
|
|
||||||
KEY `search_matches_post_id_idx` (`post_id`)
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
|
||||||
|
|
||||||
CREATE TABLE `moparclassic`.`search_words` (
|
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
||||||
`word` varchar(20) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
|
|
||||||
PRIMARY KEY (`word`),
|
|
||||||
KEY `search_words_id_idx` (`id`)
|
|
||||||
) ENGINE=MyISAM AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
|
|
||||||
|
|
||||||
CREATE TABLE `moparclassic`.`stats` (
|
|
||||||
`date` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`posts` varchar(255) NOT NULL DEFAULT '',
|
|
||||||
`users` varchar(255) NOT NULL DEFAULT '',
|
|
||||||
`players` varchar(255) NOT NULL DEFAULT '',
|
|
||||||
`active_users` varchar(255) NOT NULL DEFAULT '',
|
|
||||||
`active_players` varchar(255) NOT NULL DEFAULT '',
|
|
||||||
`topics` varchar(255) DEFAULT NULL
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
||||||
CREATE TABLE `moparclassic`.`stats_2` (
|
|
||||||
`logins` int(5) DEFAULT NULL,
|
|
||||||
`unique_logins` int(5) DEFAULT NULL,
|
|
||||||
`updated` int(11) DEFAULT NULL,
|
|
||||||
`hits` int(5) DEFAULT NULL,
|
|
||||||
`unique_hits` int(5) DEFAULT NULL,
|
|
||||||
`alexa_rank` int(5) DEFAULT NULL,
|
|
||||||
`kills` int(5) DEFAULT NULL,
|
|
||||||
`total_kills` int(5) DEFAULT NULL
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
||||||
CREATE TABLE `moparclassic`.`subs` (
|
|
||||||
`user_id` int(10) DEFAULT NULL,
|
|
||||||
`months` int(10) DEFAULT NULL,
|
|
||||||
`google_no` varchar(255) DEFAULT NULL,
|
|
||||||
`redeem` int(10) DEFAULT NULL,
|
|
||||||
`status` int(5) DEFAULT NULL,
|
|
||||||
`order_time` int(10) DEFAULT NULL,
|
|
||||||
`last_time` int(10) DEFAULT NULL
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
||||||
CREATE TABLE `moparclassic`.`subscriptions` (
|
|
||||||
`user_id` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`topic_id` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`forum_id` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
PRIMARY KEY (`user_id`,`topic_id`,`forum_id`)
|
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
|
||||||
CREATE TABLE `moparclassic`.`topics` (
|
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
||||||
`poster` varchar(200) NOT NULL DEFAULT '',
|
|
||||||
`subject` varchar(255) NOT NULL DEFAULT '',
|
|
||||||
`posted` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`first_post_id` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`last_post` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`last_post_id` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`last_poster` varchar(200) DEFAULT NULL,
|
|
||||||
`num_views` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`num_replies` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`closed` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`sticky` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`moved_to` int(10) unsigned DEFAULT NULL,
|
|
||||||
`forum_id` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
KEY `topics_forum_id_idx` (`forum_id`),
|
|
||||||
KEY `topics_moved_to_idx` (`moved_to`),
|
|
||||||
KEY `topics_last_post_idx` (`last_post`),
|
|
||||||
KEY `topics_first_post_id_idx` (`first_post_id`)
|
|
||||||
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
|
|
||||||
|
|
||||||
CREATE TABLE `moparclassic`.`users` (
|
|
||||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
|
||||||
`group_id` int(10) unsigned NOT NULL DEFAULT '3',
|
|
||||||
`username` varchar(200) NOT NULL DEFAULT '',
|
|
||||||
`password` varchar(40) NOT NULL DEFAULT '',
|
|
||||||
`email` varchar(80) NOT NULL DEFAULT '',
|
|
||||||
`title` varchar(50) DEFAULT NULL,
|
|
||||||
`realname` varchar(40) DEFAULT NULL,
|
|
||||||
`url` varchar(100) DEFAULT NULL,
|
|
||||||
`jabber` varchar(80) DEFAULT NULL,
|
|
||||||
`icq` varchar(12) DEFAULT NULL,
|
|
||||||
`msn` varchar(80) DEFAULT NULL,
|
|
||||||
`aim` varchar(30) DEFAULT NULL,
|
|
||||||
`yahoo` varchar(30) DEFAULT NULL,
|
|
||||||
`location` varchar(30) DEFAULT NULL,
|
|
||||||
`signature` text,
|
|
||||||
`disp_topics` tinyint(3) unsigned DEFAULT NULL,
|
|
||||||
`disp_posts` tinyint(3) unsigned DEFAULT NULL,
|
|
||||||
`email_setting` tinyint(1) NOT NULL DEFAULT '1',
|
|
||||||
`notify_with_post` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`auto_notify` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`show_smilies` tinyint(1) NOT NULL DEFAULT '1',
|
|
||||||
`show_img` tinyint(1) NOT NULL DEFAULT '1',
|
|
||||||
`show_img_sig` tinyint(1) NOT NULL DEFAULT '1',
|
|
||||||
`show_avatars` tinyint(1) NOT NULL DEFAULT '1',
|
|
||||||
`show_sig` tinyint(1) NOT NULL DEFAULT '1',
|
|
||||||
`timezone` float NOT NULL DEFAULT '0',
|
|
||||||
`dst` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`time_format` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`date_format` tinyint(1) NOT NULL DEFAULT '0',
|
|
||||||
`language` varchar(25) NOT NULL DEFAULT 'English',
|
|
||||||
`style` varchar(25) NOT NULL DEFAULT 'Air',
|
|
||||||
`num_posts` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`last_post` int(10) unsigned DEFAULT NULL,
|
|
||||||
`last_search` int(10) unsigned DEFAULT NULL,
|
|
||||||
`last_email_sent` int(10) unsigned DEFAULT NULL,
|
|
||||||
`registered` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`registration_ip` varchar(39) NOT NULL DEFAULT '0.0.0.0',
|
|
||||||
`last_visit` int(10) unsigned NOT NULL DEFAULT '0',
|
|
||||||
`admin_note` varchar(30) DEFAULT NULL,
|
|
||||||
`activate_string` varchar(80) DEFAULT NULL,
|
|
||||||
`activate_key` varchar(8) DEFAULT NULL,
|
|
||||||
`sub_expires` int(10) unsigned DEFAULT '0',
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
UNIQUE KEY `users_username_idx` (`username`(25)),
|
|
||||||
KEY `users_registered_idx` (`registered`)
|
|
||||||
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
|
|
||||||
|
|
||||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||||
|
@ -1,96 +0,0 @@
|
|||||||
16:42:16 21-07-11: 98042 [SocketAcceptorIoProcessor-0.1] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:56013] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
16:42:16 21-07-11: 98042 [SocketAcceptorIoProcessor-0.1] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:56013] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
16:42:16 21-07-11: 98043 [SocketAcceptorIoProcessor-0.1] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:56013] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
16:42:18 21-07-11: 99678 [SocketAcceptorIoProcessor-0.2] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:56014] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
16:42:18 21-07-11: 99679 [SocketAcceptorIoProcessor-0.2] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:56014] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
16:44:24 21-07-11: 29594 [SocketAcceptorIoProcessor-0.1] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:38801] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
16:44:24 21-07-11: 29594 [SocketAcceptorIoProcessor-0.1] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:38801] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
16:44:24 21-07-11: 29595 [SocketAcceptorIoProcessor-0.1] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:38801] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:07:37 21-07-11: 1422061 [SocketAcceptorIoProcessor-0.2] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:44822] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:07:37 21-07-11: 1422065 [SocketAcceptorIoProcessor-0.2] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:44822] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:07:38 21-07-11: 1423046 [SocketAcceptorIoProcessor-0.3] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:44823] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:07:38 21-07-11: 1423046 [SocketAcceptorIoProcessor-0.3] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:44823] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:07:38 21-07-11: 1423047 [SocketAcceptorIoProcessor-0.3] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:44823] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:07:50 21-07-11: 1434937 [SocketAcceptorIoProcessor-0.4] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:44824] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:07:50 21-07-11: 1434938 [SocketAcceptorIoProcessor-0.4] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:44824] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:12:42 21-07-11: 23771 [SocketAcceptorIoProcessor-0.1] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:51126] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:12:42 21-07-11: 23771 [SocketAcceptorIoProcessor-0.1] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:51126] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:12:42 21-07-11: 23772 [SocketAcceptorIoProcessor-0.1] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:51126] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:16:06 21-07-11: 228206 [SocketAcceptorIoProcessor-0.2] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:57276] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:16:06 21-07-11: 228215 [SocketAcceptorIoProcessor-0.2] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:57276] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:18:43 21-07-11: 58789 [SocketAcceptorIoProcessor-0.1] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:57290] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:18:43 21-07-11: 58789 [SocketAcceptorIoProcessor-0.1] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:57290] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:18:43 21-07-11: 58790 [SocketAcceptorIoProcessor-0.1] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:57290] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:25:03 21-07-11: 31491 [SocketAcceptorIoProcessor-0.1] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:55779] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:25:03 21-07-11: 31491 [SocketAcceptorIoProcessor-0.1] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:55779] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:25:03 21-07-11: 31492 [SocketAcceptorIoProcessor-0.1] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:55779] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:28:41 21-07-11: 249783 [SocketAcceptorIoProcessor-0.3] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:55858] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:28:41 21-07-11: 249783 [SocketAcceptorIoProcessor-0.3] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:55858] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:28:41 21-07-11: 249784 [SocketAcceptorIoProcessor-0.3] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:55858] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:28:43 21-07-11: 251317 [SocketAcceptorIoProcessor-0.4] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:55859] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:28:43 21-07-11: 251318 [SocketAcceptorIoProcessor-0.4] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:55859] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:28:43 21-07-11: 252004 [SocketAcceptorIoProcessor-0.0] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:55860] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:28:43 21-07-11: 252005 [SocketAcceptorIoProcessor-0.0] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:55860] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:38:08 21-07-11: 328092 [SocketAcceptorIoProcessor-0.4] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:58598] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:38:08 21-07-11: 328092 [SocketAcceptorIoProcessor-0.4] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:58598] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:38:08 21-07-11: 328093 [SocketAcceptorIoProcessor-0.4] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:58598] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:46:48 21-07-11: 20397 [SocketAcceptorIoProcessor-0.4] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:56380] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:46:48 21-07-11: 20397 [SocketAcceptorIoProcessor-0.4] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:56380] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:46:48 21-07-11: 20398 [SocketAcceptorIoProcessor-0.4] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:56380] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:46:56 21-07-11: 27810 [SocketAcceptorIoProcessor-0.0] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:56381] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:46:56 21-07-11: 27811 [SocketAcceptorIoProcessor-0.0] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:56381] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:49:39 21-07-11: 191174 [SocketAcceptorIoProcessor-0.1] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:47775] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:49:39 21-07-11: 191176 [SocketAcceptorIoProcessor-0.1] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:47775] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:50:18 21-07-11: 230515 [SocketAcceptorIoProcessor-0.0] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:47785] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
17:50:18 21-07-11: 230516 [SocketAcceptorIoProcessor-0.0] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:47785] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
18:01:12 21-07-11: 75002 [SocketAcceptorIoProcessor-0.4] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:43808] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
18:01:12 21-07-11: 75002 [SocketAcceptorIoProcessor-0.4] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:43808] Remote address in the blacklist; closing.
|
|
||||||
|
|
||||||
18:01:12 21-07-11: 75004 [SocketAcceptorIoProcessor-0.4] INFO org.moparscape.msc.gs.connection.RSCConnectionHandler - [/127.0.0.1:43808] Remote address in the blacklist; closing.
|
|
||||||
|
|
@ -8,33 +8,30 @@ import java.util.HashMap;
|
|||||||
import org.moparscape.msc.ls.Server;
|
import org.moparscape.msc.ls.Server;
|
||||||
import org.moparscape.msc.ls.util.DataConversions;
|
import org.moparscape.msc.ls.util.DataConversions;
|
||||||
|
|
||||||
|
|
||||||
public class PlayerSave {
|
public class PlayerSave {
|
||||||
public static final String[] statArray = { "attack", "defense", "strength",
|
public static final String[] statArray = { "attack", "defense", "strength",
|
||||||
"hits", "ranged", "prayer", "magic", "cooking", "woodcut", "fletching", "fishing",
|
"hits", "ranged", "prayer", "magic", "cooking", "woodcut",
|
||||||
"firemaking", "crafting", "smithing", "mining", "herblaw", "agility", "thieving" };
|
"fletching", "fishing", "firemaking", "crafting", "smithing",
|
||||||
|
"mining", "herblaw", "agility", "thieving" };
|
||||||
|
|
||||||
public static PlayerSave loadPlayer(long user) {
|
public static PlayerSave loadPlayer(long user) {
|
||||||
PlayerSave save = new PlayerSave(user);
|
PlayerSave save = new PlayerSave(user);
|
||||||
ResultSet result;
|
ResultSet result;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
result = Server.db.getQuery("SELECT r.*, u.username AS owner_username, u.group_id as gid, u.sub_expires as subexp FROM `pk_players` AS r INNER JOIN `users` AS u ON u.id=r.owner WHERE `user`='" + save.getUser() + "'");
|
result = Server.db
|
||||||
|
.getQuery("SELECT * FROM `pk_players` WHERE `user`='"
|
||||||
|
+ save.getUser() + "'");
|
||||||
if (!result.next()) {
|
if (!result.next()) {
|
||||||
return save;
|
return save;
|
||||||
}
|
}
|
||||||
|
|
||||||
long eventcd = result.getLong("eventcd");
|
long eventcd = result.getLong("eventcd");
|
||||||
@SuppressWarnings("unused")
|
long subexp = result.getLong("sub_expires");
|
||||||
int subexp = result.getInt("subexp");
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
long now = System.currentTimeMillis() / 1000;
|
long now = System.currentTimeMillis() / 1000;
|
||||||
int sowner = result.getInt("owner");
|
int sowner = result.getInt("owner");
|
||||||
if (result.getInt("gid") == 8) {
|
save.setOwner(sowner, result.getInt("group_id"), subexp);
|
||||||
save.setOwner(sowner, Integer.parseInt("5"), result.getLong("subexp"));
|
|
||||||
} else {
|
|
||||||
save.setOwner(sowner, result.getInt("group_id"), result.getLong("subexp"));
|
|
||||||
}
|
|
||||||
save.setMuted(result.getLong("muted"));
|
save.setMuted(result.getLong("muted"));
|
||||||
/*
|
/*
|
||||||
* if(subexp - now < 1) {
|
* if(subexp - now < 1) {
|
||||||
@ -43,21 +40,37 @@ public class PlayerSave {
|
|||||||
* result.getLong("subexp")); }
|
* result.getLong("subexp")); }
|
||||||
*/
|
*/
|
||||||
|
|
||||||
save.setLogin(result.getLong("login_date"), DataConversions.IPToLong(result.getString("login_ip")));
|
save.setLogin(result.getLong("login_date"),
|
||||||
|
DataConversions.IPToLong(result.getString("login_ip")));
|
||||||
save.setLocation(result.getInt("x"), result.getInt("y"));
|
save.setLocation(result.getInt("x"), result.getInt("y"));
|
||||||
|
|
||||||
save.setFatigue(result.getInt("fatigue"));
|
save.setFatigue(result.getInt("fatigue"));
|
||||||
save.setCombatStyle((byte) result.getInt("combatstyle"));
|
save.setCombatStyle((byte) result.getInt("combatstyle"));
|
||||||
|
|
||||||
save.setPrivacy(result.getInt("block_chat") == 1, result.getInt("block_private") == 1, result.getInt("block_trade") == 1, result.getInt("block_duel") == 1);
|
save.setPrivacy(result.getInt("block_chat") == 1,
|
||||||
save.setSettings(result.getInt("cameraauto") == 1, result.getInt("onemouse") == 1, result.getInt("soundoff") == 1, result.getInt("showroof") == 1, result.getInt("autoscreenshot") == 1, result.getInt("combatwindow") == 1);
|
result.getInt("block_private") == 1,
|
||||||
|
result.getInt("block_trade") == 1,
|
||||||
|
result.getInt("block_duel") == 1);
|
||||||
|
save.setSettings(result.getInt("cameraauto") == 1,
|
||||||
|
result.getInt("onemouse") == 1,
|
||||||
|
result.getInt("soundoff") == 1,
|
||||||
|
result.getInt("showroof") == 1,
|
||||||
|
result.getInt("autoscreenshot") == 1,
|
||||||
|
result.getInt("combatwindow") == 1);
|
||||||
|
|
||||||
save.setAppearance((byte) result.getInt("haircolour"), (byte) result.getInt("topcolour"), (byte) result.getInt("trousercolour"), (byte) result.getInt("skincolour"), (byte) result.getInt("headsprite"), (byte) result.getInt("bodysprite"), result.getInt("male") == 1, result.getInt("skulled"));
|
save.setAppearance((byte) result.getInt("haircolour"),
|
||||||
|
(byte) result.getInt("topcolour"),
|
||||||
|
(byte) result.getInt("trousercolour"),
|
||||||
|
(byte) result.getInt("skincolour"),
|
||||||
|
(byte) result.getInt("headsprite"),
|
||||||
|
(byte) result.getInt("bodysprite"),
|
||||||
|
result.getInt("male") == 1, result.getInt("skulled"));
|
||||||
|
|
||||||
save.setQuestPoints(result.getInt("quest_points"));
|
save.setQuestPoints(result.getInt("quest_points"));
|
||||||
|
|
||||||
|
result = Server.db
|
||||||
result = Server.db.getQuery("SELECT * FROM `pk_experience` WHERE `user`='" + save.getUser() + "'");
|
.getQuery("SELECT * FROM `pk_experience` WHERE `user`='"
|
||||||
|
+ save.getUser() + "'");
|
||||||
if (!result.next()) {
|
if (!result.next()) {
|
||||||
return save;
|
return save;
|
||||||
}
|
}
|
||||||
@ -65,7 +78,9 @@ public class PlayerSave {
|
|||||||
save.setExp(i, result.getInt("exp_" + statArray[i]));
|
save.setExp(i, result.getInt("exp_" + statArray[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
result = Server.db.getQuery("SELECT * FROM `pk_curstats` WHERE `user`='" + save.getUser() + "'");
|
result = Server.db
|
||||||
|
.getQuery("SELECT * FROM `pk_curstats` WHERE `user`='"
|
||||||
|
+ save.getUser() + "'");
|
||||||
if (!result.next()) {
|
if (!result.next()) {
|
||||||
return save;
|
return save;
|
||||||
}
|
}
|
||||||
@ -73,49 +88,64 @@ public class PlayerSave {
|
|||||||
save.setLvl(i, result.getInt("cur_" + statArray[i]));
|
save.setLvl(i, result.getInt("cur_" + statArray[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
result = Server.db.getQuery("SELECT id,amount,wielded FROM `pk_invitems` WHERE `user`='" + save.getUser() + "' ORDER BY `slot` ASC");
|
result = Server.db
|
||||||
|
.getQuery("SELECT id,amount,wielded FROM `pk_invitems` WHERE `user`='"
|
||||||
|
+ save.getUser() + "' ORDER BY `slot` ASC");
|
||||||
while (result.next()) {
|
while (result.next()) {
|
||||||
save.addInvItem(result.getInt("id"), result.getInt("amount"), result.getInt("wielded") == 1);
|
save.addInvItem(result.getInt("id"), result.getInt("amount"),
|
||||||
|
result.getInt("wielded") == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
result = Server.db.getQuery("SELECT id,amount FROM `pk_bank` WHERE `user`='" + save.getUser() + "' ORDER BY `slot` ASC");
|
result = Server.db
|
||||||
|
.getQuery("SELECT id,amount FROM `pk_bank` WHERE `user`='"
|
||||||
|
+ save.getUser() + "' ORDER BY `slot` ASC");
|
||||||
while (result.next()) {
|
while (result.next()) {
|
||||||
save.addBankItem(result.getInt("id"), result.getInt("amount"));
|
save.addBankItem(result.getInt("id"), result.getInt("amount"));
|
||||||
}
|
}
|
||||||
|
|
||||||
result = Server.db.getQuery("SELECT friend FROM `pk_friends` WHERE `user`='" + save.getUser() + "'");
|
result = Server.db
|
||||||
|
.getQuery("SELECT friend FROM `pk_friends` WHERE `user`='"
|
||||||
|
+ save.getUser() + "'");
|
||||||
while (result.next()) {
|
while (result.next()) {
|
||||||
save.addFriend(result.getLong("friend"));
|
save.addFriend(result.getLong("friend"));
|
||||||
}
|
}
|
||||||
|
|
||||||
result = Server.db.getQuery("SELECT `ignore` FROM `pk_ignores` WHERE `user`='" + save.getUser() + "'");
|
result = Server.db
|
||||||
|
.getQuery("SELECT `ignore` FROM `pk_ignores` WHERE `user`='"
|
||||||
|
+ save.getUser() + "'");
|
||||||
while (result.next()) {
|
while (result.next()) {
|
||||||
save.addIgnore(result.getLong("ignore"));
|
save.addIgnore(result.getLong("ignore"));
|
||||||
}
|
}
|
||||||
result = Server.db.getQuery("SELECT * FROM `pk_quests` WHERE `user`='" + save.getUser() + "'");
|
result = Server.db
|
||||||
|
.getQuery("SELECT * FROM `pk_quests` WHERE `user`='"
|
||||||
|
+ save.getUser() + "'");
|
||||||
while (result.next()) {
|
while (result.next()) {
|
||||||
save.setQuestStage(result.getInt("id"), result.getInt("stage"));
|
save.setQuestStage(result.getInt("id"), result.getInt("stage"));
|
||||||
}
|
}
|
||||||
save.setEventCD(eventcd);
|
save.setEventCD(eventcd);
|
||||||
|
|
||||||
|
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
Server.error("SQL Exception Loading " + DataConversions.hashToUsername(user) + ": " + e.getMessage());
|
Server.error("SQL Exception Loading "
|
||||||
|
+ DataConversions.hashToUsername(user) + ": "
|
||||||
|
+ e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
return save;
|
return save;
|
||||||
}
|
}
|
||||||
|
|
||||||
private long eventcd = 0;
|
private long eventcd = 0;
|
||||||
private long muted;
|
private long muted;
|
||||||
private ArrayList<BankItem> bankItems = new ArrayList<BankItem>();
|
private ArrayList<BankItem> bankItems = new ArrayList<BankItem>();
|
||||||
private boolean blockChat, blockPrivate, blockTrade, blockDuel;
|
private boolean blockChat, blockPrivate, blockTrade, blockDuel;
|
||||||
private boolean cameraAuto, oneMouse, soundOff, showRoof, autoScreenshot, combatWindow;
|
private boolean cameraAuto, oneMouse, soundOff, showRoof, autoScreenshot,
|
||||||
|
combatWindow;
|
||||||
private int combat, skillTotal;
|
private int combat, skillTotal;
|
||||||
private byte combatStyle;
|
private byte combatStyle;
|
||||||
private long[] exp = new long[18];
|
private long[] exp = new long[18];
|
||||||
private int fatigue;
|
private int fatigue;
|
||||||
private ArrayList<Long> friendList = new ArrayList<Long>();
|
private ArrayList<Long> friendList = new ArrayList<Long>();
|
||||||
private byte hairColour, topColour, trouserColour, skinColour, headSprite, bodySprite;
|
private byte hairColour, topColour, trouserColour, skinColour, headSprite,
|
||||||
|
bodySprite;
|
||||||
|
|
||||||
private ArrayList<Long> ignoreList = new ArrayList<Long>();
|
private ArrayList<Long> ignoreList = new ArrayList<Long>();
|
||||||
private ArrayList<InvItem> invItems = new ArrayList<InvItem>();
|
private ArrayList<InvItem> invItems = new ArrayList<InvItem>();
|
||||||
@ -340,63 +370,88 @@ public class PlayerSave {
|
|||||||
try {
|
try {
|
||||||
String query;
|
String query;
|
||||||
|
|
||||||
Server.db.updateQuery("DELETE FROM `pk_bank` WHERE `user`='" + user + "'");
|
Server.db.updateQuery("DELETE FROM `pk_bank` WHERE `user`='" + user
|
||||||
|
+ "'");
|
||||||
if (bankItems.size() > 0) {
|
if (bankItems.size() > 0) {
|
||||||
query = "INSERT INTO `pk_bank`(`user`, `id`, `amount`, `slot`) VALUES";
|
query = "INSERT INTO `pk_bank`(`user`, `id`, `amount`, `slot`) VALUES";
|
||||||
int slot = 0;
|
int slot = 0;
|
||||||
for (BankItem item : bankItems) {
|
for (BankItem item : bankItems) {
|
||||||
query += "('" + user + "', '" + item.getID() + "', '" + item.getAmount() + "', '" + (slot++) + "'),";
|
query += "('" + user + "', '" + item.getID() + "', '"
|
||||||
|
+ item.getAmount() + "', '" + (slot++) + "'),";
|
||||||
}
|
}
|
||||||
Server.db.updateQuery(query.substring(0, query.length() - 1));
|
Server.db.updateQuery(query.substring(0, query.length() - 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
Server.db.updateQuery("DELETE FROM `pk_invitems` WHERE `user`='" + user + "'");
|
Server.db.updateQuery("DELETE FROM `pk_invitems` WHERE `user`='"
|
||||||
|
+ user + "'");
|
||||||
|
|
||||||
ResultSet result = Server.db.getQuery("Select 1 FROM `pk_players` WHERE `user`='" + user + "' AND `owner`='" + owner + "'");
|
ResultSet result = Server.db
|
||||||
|
.getQuery("Select 1 FROM `pk_players` WHERE `user`='"
|
||||||
|
+ user + "' AND `owner`='" + owner + "'");
|
||||||
if (!result.next())
|
if (!result.next())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Server.db.updateQuery("UPDATE `pk_players` SET `combat`=" + combat + ", skill_total=" + skillTotal + ", `x`=" + x + ", `y`='" + y + "', `fatigue`='" + fatigue + "', `haircolour`=" + hairColour + ", `topcolour`=" + topColour + ", `trousercolour`=" + trouserColour + ", `skincolour`=" + skinColour + ", `headsprite`=" + headSprite + ", `bodysprite`=" + bodySprite + ", `male`=" + (male ? 1 : 0) + ", `skulled`=" + skulled + ", `combatstyle`=" + combatStyle + ", `quest_points`=" + questPoints + " WHERE `user`='" + user + "'");
|
Server.db.updateQuery("UPDATE `pk_players` SET `combat`=" + combat
|
||||||
|
+ ", skill_total=" + skillTotal + ", `x`=" + x + ", `y`='"
|
||||||
|
+ y + "', `fatigue`='" + fatigue + "', `haircolour`="
|
||||||
|
+ hairColour + ", `topcolour`=" + topColour
|
||||||
|
+ ", `trousercolour`=" + trouserColour + ", `skincolour`="
|
||||||
|
+ skinColour + ", `headsprite`=" + headSprite
|
||||||
|
+ ", `bodysprite`=" + bodySprite + ", `male`="
|
||||||
|
+ (male ? 1 : 0) + ", `skulled`=" + skulled
|
||||||
|
+ ", `combatstyle`=" + combatStyle + ", `quest_points`="
|
||||||
|
+ questPoints + " WHERE `user`='" + user + "'");
|
||||||
|
|
||||||
query = "UPDATE `pk_experience` SET ";
|
query = "UPDATE `pk_experience` SET ";
|
||||||
for (int i = 0; i < 18; i++)
|
for (int i = 0; i < 18; i++)
|
||||||
query += "`exp_" + statArray[i] + "`=" + exp[i] + ",";
|
query += "`exp_" + statArray[i] + "`=" + exp[i] + ",";
|
||||||
|
|
||||||
Server.db.updateQuery(query.substring(0, query.length() - 1) + " WHERE `user`='" + user + "'");
|
Server.db.updateQuery(query.substring(0, query.length() - 1)
|
||||||
|
+ " WHERE `user`='" + user + "'");
|
||||||
|
|
||||||
query = "UPDATE `pk_curstats` SET ";
|
query = "UPDATE `pk_curstats` SET ";
|
||||||
for (int i = 0; i < 18; i++)
|
for (int i = 0; i < 18; i++)
|
||||||
query += "`cur_" + statArray[i] + "`=" + lvl[i] + ",";
|
query += "`cur_" + statArray[i] + "`=" + lvl[i] + ",";
|
||||||
|
|
||||||
Server.db.updateQuery(query.substring(0, query.length() - 1) + " WHERE `user`='" + user + "'");
|
Server.db.updateQuery(query.substring(0, query.length() - 1)
|
||||||
|
+ " WHERE `user`='" + user + "'");
|
||||||
|
|
||||||
if (invItems.size() > 0) {
|
if (invItems.size() > 0) {
|
||||||
query = "INSERT INTO `pk_invitems`(`user`, `id`, `amount`, `wielded`, `slot`) VALUES";
|
query = "INSERT INTO `pk_invitems`(`user`, `id`, `amount`, `wielded`, `slot`) VALUES";
|
||||||
int slot = 0;
|
int slot = 0;
|
||||||
for (InvItem item : invItems)
|
for (InvItem item : invItems)
|
||||||
query += "('" + user + "', '" + item.getID() + "', '" + item.getAmount() + "', '" + (item.isWielded() ? 1 : 0) + "', '" + (slot++) + "'),";
|
query += "('" + user + "', '" + item.getID() + "', '"
|
||||||
|
+ item.getAmount() + "', '"
|
||||||
|
+ (item.isWielded() ? 1 : 0) + "', '" + (slot++)
|
||||||
|
+ "'),";
|
||||||
|
|
||||||
Server.db.updateQuery(query.substring(0, query.length() - 1));
|
Server.db.updateQuery(query.substring(0, query.length() - 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
Server.db.updateQuery("DELETE FROM `pk_quests` WHERE `user`='" + user + "'");
|
Server.db.updateQuery("DELETE FROM `pk_quests` WHERE `user`='"
|
||||||
|
+ user + "'");
|
||||||
query = "INSERT INTO `pk_quests` (`user`, `id`, `stage`) VALUES";
|
query = "INSERT INTO `pk_quests` (`user`, `id`, `stage`) VALUES";
|
||||||
java.util.Set<Integer> keys = questStage.keySet();
|
java.util.Set<Integer> keys = questStage.keySet();
|
||||||
for (int id : keys)
|
for (int id : keys)
|
||||||
query += "('" + user + "', '" + id + "', '" + questStage.get(id) + "'),";
|
query += "('" + user + "', '" + id + "', '"
|
||||||
|
+ questStage.get(id) + "'),";
|
||||||
|
|
||||||
Server.db.updateQuery(query.substring(0, query.length() - 1));
|
Server.db.updateQuery(query.substring(0, query.length() - 1));
|
||||||
|
|
||||||
Server.db.updateQuery("UPDATE `pk_players` SET eventcd='" + getEventCD() + "' WHERE user='" + user + "'");
|
Server.db.updateQuery("UPDATE `pk_players` SET eventcd='"
|
||||||
|
+ getEventCD() + "' WHERE user='" + user + "'");
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
|
e.printStackTrace();
|
||||||
Server.error(e);
|
Server.error(e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAppearance(byte hairColour, byte topColour, byte trouserColour, byte skinColour, byte headSprite, byte bodySprite, boolean male, long skulled) {
|
public void setAppearance(byte hairColour, byte topColour,
|
||||||
|
byte trouserColour, byte skinColour, byte headSprite,
|
||||||
|
byte bodySprite, boolean male, long skulled) {
|
||||||
this.hairColour = hairColour;
|
this.hairColour = hairColour;
|
||||||
this.topColour = topColour;
|
this.topColour = topColour;
|
||||||
this.trouserColour = trouserColour;
|
this.trouserColour = trouserColour;
|
||||||
@ -478,7 +533,8 @@ public class PlayerSave {
|
|||||||
this.subExpires = subExpires;
|
this.subExpires = subExpires;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPrivacy(boolean blockChat, boolean blockPrivate, boolean blockTrade, boolean blockDuel) {
|
public void setPrivacy(boolean blockChat, boolean blockPrivate,
|
||||||
|
boolean blockTrade, boolean blockDuel) {
|
||||||
this.blockChat = blockChat;
|
this.blockChat = blockChat;
|
||||||
this.blockPrivate = blockPrivate;
|
this.blockPrivate = blockPrivate;
|
||||||
this.blockTrade = blockTrade;
|
this.blockTrade = blockTrade;
|
||||||
@ -510,7 +566,9 @@ public class PlayerSave {
|
|||||||
questStage.put(index, stage);
|
questStage.put(index, stage);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSettings(boolean cameraAuto, boolean oneMouse, boolean soundOff, boolean showRoof, boolean autoScreenshot, boolean combatWindow) {
|
public void setSettings(boolean cameraAuto, boolean oneMouse,
|
||||||
|
boolean soundOff, boolean showRoof, boolean autoScreenshot,
|
||||||
|
boolean combatWindow) {
|
||||||
this.cameraAuto = cameraAuto;
|
this.cameraAuto = cameraAuto;
|
||||||
this.oneMouse = oneMouse;
|
this.oneMouse = oneMouse;
|
||||||
this.soundOff = soundOff;
|
this.soundOff = soundOff;
|
||||||
|
@ -68,7 +68,7 @@ public class PlayerLoginHandler implements PacketHandler {
|
|||||||
byte returnVal = 0;
|
byte returnVal = 0;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ResultSet result = Server.db.getQuery("SELECT r.pass, r.banned, r.owner, u.group_id, b.id AS b_id FROM `pk_players` AS r INNER JOIN `users` AS u ON u.id=r.owner LEFT JOIN `bans` AS b on (b.username LIKE u.username OR b.ip LIKE '" + ip + "') WHERE `user`='" + user + "'");
|
ResultSet result = Server.db.getQuery("SELECT banned, owner, group_id FROM `pk_players` WHERE `user` = '" + user + "'");
|
||||||
if (!result.next()) {
|
if (!result.next()) {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
@ -76,12 +76,12 @@ public class PlayerLoginHandler implements PacketHandler {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.getInt("banned") == 1 || result.getInt("b_id") != 0) {
|
if (result.getInt("banned") == 1) {
|
||||||
System.out.println("Banned player: " + DataConversions.hashToUsername(user) + " trying to login.");
|
System.out.println("Banned player: " + DataConversions.hashToUsername(user) + " trying to login.");
|
||||||
return 6;
|
return 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.getInt("group_id") == 1 || result.getInt("group_id") == 2) {
|
if (result.getInt("group_id") >= 5) {
|
||||||
returnVal = 99;
|
returnVal = 99;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user