This is an old revision of the document!


BeBot Default Tables

BeBot 0.6 Default Tables

access_control

TABLE `access_control` (
`command` VARCHAR(50) NOT NULL DEFAULT '',
`subcommand` VARCHAR(50) NOT NULL DEFAULT '*',
`channel` VARCHAR(20) NOT NULL DEFAULT '',
`minlevel` enum('ANONYMOUS','GUEST','MEMBER','LEADER','ADMIN','SUPERADMIN','OWNER','DISABLED','DELETED') NOT NULL DEFAULT 'DISABLED',
PRIMARY KEY  (`command`,`subcommand`,`channel`)
)

access_control_saves

TABLE `access_control_saves` (
`name` VARCHAR(50) NOT NULL DEFAULT '',
`description` VARCHAR(150) DEFAULT NULL,
`commands` text NOT NULL,
PRIMARY KEY  (`name`)
)

alias

TABLE `alias` (
`alias` VARCHAR(30) NOT NULL,
`nickname` VARCHAR(30) DEFAULT NULL,
`main` INT(1) DEFAULT '0',
PRIMARY KEY  (`alias`)
)

alts

TABLE `alts` (
`alt` VARCHAR(255) NOT NULL,
`main` VARCHAR(255) DEFAULT NULL,
`confirmed` INT(11) DEFAULT '1',
PRIMARY KEY  (`alt`)
)

bots

TABLE `bots` (
`ID` INT(11) NOT NULL AUTO_INCREMENT,
`bot` VARCHAR(20) DEFAULT NULL,
`dim` VARCHAR(20) NOT NULL DEFAULT '',
`online` INT(11) NOT NULL DEFAULT '0',
`time` INT(11) NOT NULL DEFAULT '0',
`start` INT(11) NOT NULL DEFAULT '0',
`total` INT(11) NOT NULL DEFAULT '0',
`restarts` INT(11) NOT NULL DEFAULT '0',
PRIMARY KEY  (`ID`)
)

bots_log

TABLE `bots_log` (
`ID` INT(11) NOT NULL AUTO_INCREMENT,
`bot` VARCHAR(20) DEFAULT NULL,
`dim` VARCHAR(20) NOT NULL DEFAULT '',
`start` INT(11) NOT NULL DEFAULT '0',
`end` INT(11) NOT NULL DEFAULT '0',
PRIMARY KEY  (`ID`)
)

colors

TABLE `colors` (
`name` VARCHAR(25) NOT NULL DEFAULT '',
`code` VARCHAR(25) NOT NULL DEFAULT '',
PRIMARY KEY  (`name`)
)

color_schemes

TABLE `color_schemes` (
`module` VARCHAR(25) NOT NULL DEFAULT '',
`name` VARCHAR(25) NOT NULL DEFAULT '',
`color_code` VARCHAR(25) NOT NULL DEFAULT '',
PRIMARY KEY  (`module`,`name`)
)

command_alias

TABLE `command_alias` (
`alias` VARCHAR(100) NOT NULL,
`command` VARCHAR(30) NOT NULL
)

land_control_zones

TABLE `land_control_zones` (
`id` INT(11) NOT NULL DEFAULT '0',
`lrange` INT(10) DEFAULT NULL,
`hrange` INT(10) DEFAULT NULL,
`area` VARCHAR(50) DEFAULT NULL,
`huge` VARCHAR(10) DEFAULT NULL,
`x` VARCHAR(10) DEFAULT NULL,
`y` VARCHAR(10) DEFAULT NULL,
`name` VARCHAR(250) DEFAULT NULL,
PRIMARY KEY  (`id`),
UNIQUE KEY `area` (`area`,`name`),
KEY `lrange` (`lrange`),
KEY `hrange` (`hrange`),
KEY `area_2` (`area`)
)

log_message

TABLE `log_message` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`message` VARCHAR(500) NOT NULL,
`first` VARCHAR(45) NOT NULL,
`second` VARCHAR(45) NOT NULL,
`timestamp` INT(10) UNSIGNED NOT NULL,
PRIMARY KEY  (`id`)
)

logon

TABLE `logon` (
`id` INT(11) NOT NULL,
`message` VARCHAR(255) DEFAULT NULL,
PRIMARY KEY  (`id`)
)

mail_message

TABLE `mail_message` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`recieved` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
`expires` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
`is_read` tinyint(1) DEFAULT '0',
`mailbox` VARCHAR(13) DEFAULT NULL,
`recipient` VARCHAR(13) DEFAULT NULL,
`sender` VARCHAR(13) DEFAULT NULL,
`message` text,
PRIMARY KEY  (`id`)
)

news

TABLE `news` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`type` INT(11) DEFAULT '1',
`time` INT(11) NOT NULL DEFAULT '0',
`name` VARCHAR(30) DEFAULT NULL,
`news` text,
PRIMARY KEY  (`id`)
)

online

TABLE `online` (
`nickname` VARCHAR(25) NOT NULL,
`botname` VARCHAR(25) NOT NULL,
`status_gc` INT(1) DEFAULT '0',
`status_gc_changetime` INT(11) DEFAULT '0',
`status_pg` INT(1) DEFAULT '0',
`status_pg_changetime` INT(11) DEFAULT '0',
`reinvite` INT(1) DEFAULT '0',
`level` INT(1) DEFAULT '0',
PRIMARY KEY  (`nickname`,`botname`)
)

org_city

TABLE `org_city` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`time` INT(11) DEFAULT NULL,
`action` VARCHAR(10) DEFAULT NULL,
`player` VARCHAR(15) DEFAULT NULL,
PRIMARY KEY  (`id`)
)

player_notes

TABLE `player_notes` (
`pnid` INT(11) NOT NULL AUTO_INCREMENT,
`player` VARCHAR(30) NOT NULL,
`author` VARCHAR(30) NOT NULL,
`note` VARCHAR(255) NOT NULL,
`class` tinyint(4) NOT NULL DEFAULT '0',
`timestamp` INT(10) UNSIGNED NOT NULL,
PRIMARY KEY  (`pnid`)
)

pocketbosses

TABLE `pocketbosses` (
`ID` INT(11) NOT NULL AUTO_INCREMENT,
`is_pocket` tinyint(1) DEFAULT '1',
`name` VARCHAR(50) NOT NULL DEFAULT 'Broken!',
`level` INT(11) DEFAULT NULL,
`Playfield` VARCHAR(30) DEFAULT NULL,
`Place` VARCHAR(50) DEFAULT NULL,
`pattern_mobs` VARCHAR(50) DEFAULT NULL,
PRIMARY KEY  (`ID`)
)

preferences

TABLE `preferences` (
`ID` INT(11) NOT NULL AUTO_INCREMENT,
`pref_id` INT(11) NOT NULL,
`owner` INT(11) DEFAULT NULL,
`value` VARCHAR(25) DEFAULT NULL,
PRIMARY KEY  (`ID`)
)

preferences_def

TABLE `preferences_def` (
`ID` INT(11) NOT NULL AUTO_INCREMENT,
`module` VARCHAR(30) DEFAULT NULL,
`name` VARCHAR(30) DEFAULT NULL,
`description` VARCHAR(255) DEFAULT NULL,
`default_value` VARCHAR(25) DEFAULT NULL,
`possible_values` VARCHAR(255) DEFAULT NULL,
PRIMARY KEY  (`ID`)
)

raid_points

TABLE `raid_points` (
`id` INT(11) NOT NULL,
`nickname` VARCHAR(20) DEFAULT NULL,
`points` DECIMAL(11,2) DEFAULT '0.00',
`raiding` tinyint(4) DEFAULT '0',
`raidingas` VARCHAR(20) DEFAULT NULL,
PRIMARY KEY  (`id`)
)

raid_points_log

TABLE `raid_points_log` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(20) DEFAULT NULL,
`points` DECIMAL(11,2) DEFAULT '0.00',
`by_who` VARCHAR(20) DEFAULT NULL,
`time` INT(11) DEFAULT NULL,
`why` VARCHAR(500) DEFAULT NULL,
PRIMARY KEY  (`id`)
)

relay

TABLE `relay` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`botname` VARCHAR(20) DEFAULT NULL,
`type` VARCHAR(30) DEFAULT NULL,
`time` INT(11) DEFAULT NULL,
`msg` text,
PRIMARY KEY  (`id`)
)

security_flexible

TABLE `security_flexible` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`gid` INT(10) UNSIGNED NOT NULL,
`field` enum('join','level','profession','faction','rank_id','org_id','at_id') DEFAULT NULL,
`op` enum('=','<','<=','>','>=','!=','&&','||') DEFAULT NULL,
`compareto` VARCHAR(100) NOT NULL DEFAULT '',
PRIMARY KEY  (`id`)
)

security_groups

TABLE `security_groups` (
`gid` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(35) DEFAULT NULL,
`description` VARCHAR(80) DEFAULT NULL,
`access_level` tinyint(3) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY  (`gid`),
UNIQUE KEY `name` (`name`)
)

security_members

TABLE `security_members` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(50) NOT NULL DEFAULT '',
`gid` INT(11) NOT NULL DEFAULT '0',
PRIMARY KEY  (`name`,`gid`),
UNIQUE KEY `id` (`id`),
KEY `id_2` (`id`)
)

security_org

TABLE `security_org` (
`org_gov` VARCHAR(25) NOT NULL,
`org_rank` VARCHAR(25) NOT NULL,
`org_rank_id` tinyint(3) UNSIGNED NOT NULL,
`access_level` tinyint(3) UNSIGNED NOT NULL DEFAULT '2',
PRIMARY KEY  (`org_gov`,`org_rank`,`org_rank_id`)
)

settings

TABLE `settings` (
`module` VARCHAR(25) NOT NULL,
`setting` VARCHAR(50) NOT NULL,
`value` VARCHAR(255) NOT NULL,
`datatype` VARCHAR(25) DEFAULT NULL,
`longdesc` VARCHAR(255) DEFAULT NULL,
`defaultoptions` VARCHAR(255) DEFAULT NULL,
`hidden` tinyint(1) DEFAULT '0',
`disporder` INT(10) UNSIGNED NOT NULL DEFAULT '1',
PRIMARY KEY  (`module`,`setting`)
)

shortcuts

TABLE `shortcuts` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`shortcut` VARCHAR(20) NOT NULL,
`long_desc` VARCHAR(255) NOT NULL,
PRIMARY KEY  (`shortcut`),
UNIQUE KEY `id` (`id`),
UNIQUE KEY `long_desc` (`long_desc`)
)

statistics

TABLE `statistics` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`module` VARCHAR(100) NOT NULL,
`action` VARCHAR(100) NOT NULL,
`comment` VARCHAR(100) DEFAULT '',
`count` INT(10) UNSIGNED NOT NULL,
PRIMARY KEY  (`id`)
)

string_filter

TABLE `string_filter` (
`search` VARCHAR(255) NOT NULL,
`new` VARCHAR(255) NOT NULL DEFAULT '**bleep**',
PRIMARY KEY  (`search`)
)

symbiants

TABLE `symbiants` (
`boss_id` INT(11) NOT NULL,
`QL` INT(11) DEFAULT NULL,
`slot` VARCHAR(10) DEFAULT NULL,
`unit` VARCHAR(50) DEFAULT NULL,
`Name` VARCHAR(59) DEFAULT NULL,
`itemref` INT(11) DEFAULT NULL
)

tablenames

TABLE `tablenames` (
`internal_name` VARCHAR(255) NOT NULL,
`prefix` VARCHAR(100) DEFAULT NULL,
`use_prefix` VARCHAR(10) NOT NULL DEFAULT 'false',
`schemaversion` INT(3) NOT NULL DEFAULT '1',
PRIMARY KEY  (`internal_name`)
)

table_versions

TABLE `table_versions` (
`internal_name` VARCHAR(255) NOT NULL,
`schemaversion` INT(3) NOT NULL DEFAULT '1',
PRIMARY KEY  (`internal_name`)
)

timer

TABLE `timer` (
`id` BIGINT(100) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(200) NOT NULL DEFAULT '',
`timerclass` INT(21) NOT NULL DEFAULT '-1',
`endtime` INT(20) NOT NULL DEFAULT '0',
`owner` VARCHAR(20) NOT NULL DEFAULT '',
`channel` enum('tell','gc','pgmsg','both','global','internal') NOT NULL DEFAULT 'both',
`repeatinterval` INT(8) NOT NULL DEFAULT '0',
PRIMARY KEY  (`id`),
KEY `endtime` (`endtime`)
)

timer_class_entries

TABLE `timer_class_entries` (
`id` INT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`next_id` INT(21) NOT NULL DEFAULT '-1',
`class_id` INT(10) UNSIGNED NOT NULL,
`notify_delay` INT(8) NOT NULL,
`notify_prefix` VARCHAR(255) NOT NULL DEFAULT '',
`notify_suffix` VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY  (`id`),
UNIQUE KEY `class_id` (`class_id`,`notify_delay`),
KEY `next_id` (`next_id`)
)

timer_classes

TABLE `timer_classes` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(25) NOT NULL DEFAULT '',
`description` VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY  (`name`),
UNIQUE KEY `id` (`id`)
)

timer_class_settings

TABLE `timer_class_settings` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(25) NOT NULL DEFAULT '',
`current_class` INT(10) UNSIGNED NOT NULL,
`default_class` INT(10) UNSIGNED NOT NULL,
`description` VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY  (`name`),
UNIQUE KEY `id` (`id`)
)

tower_attack

TABLE `tower_attack` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`time` INT(11) DEFAULT NULL,
`off_guild` VARCHAR(50) DEFAULT NULL,
`off_side` VARCHAR(10) DEFAULT NULL,
`off_player` VARCHAR(20) DEFAULT NULL,
`off_level` INT(11) DEFAULT NULL,
`off_profession` VARCHAR(15) DEFAULT NULL,
`def_guild` VARCHAR(50) DEFAULT NULL,
`def_side` VARCHAR(10) DEFAULT NULL,
`zone` VARCHAR(50) DEFAULT NULL,
`x_coord` INT(11) DEFAULT NULL,
`y_coord` INT(11) DEFAULT NULL,
PRIMARY KEY  (`id`),
UNIQUE KEY `time` (`time`,`off_guild`,`off_side`,`off_player`,`def_guild`,`def_side`,`zone`,`x_coord`,`y_coord`),
KEY `off_guild` (`off_guild`),
KEY `off_side` (`off_side`),
KEY `def_guild` (`def_guild`),
KEY `def_side` (`def_side`),
KEY `zone` (`zone`)
)

tower_result

TABLE `tower_result` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`time` INT(11) DEFAULT NULL,
`win_guild` VARCHAR(50) DEFAULT NULL,
`win_side` VARCHAR(10) DEFAULT NULL,
`lose_guild` VARCHAR(50) DEFAULT NULL,
`lose_side` VARCHAR(10) DEFAULT NULL,
`zone` VARCHAR(50) DEFAULT NULL,
PRIMARY KEY  (`id`),
UNIQUE KEY `time` (`time`,`win_guild`,`win_side`,`lose_guild`,`lose_side`,`zone`),
UNIQUE KEY `time_2` (`time`,`win_guild`,`win_side`,`lose_guild`,`lose_side`,`zone`),
KEY `win_guild` (`win_guild`),
KEY `win_side` (`win_side`),
KEY `zone` (`zone`),
KEY `win_guild_2` (`win_guild`),
KEY `win_side_2` (`win_side`),
KEY `zone_2` (`zone`)
)

users

TABLE `users` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`char_id` INT(11) NOT NULL,
`nickname` VARCHAR(25) DEFAULT NULL,
`password` VARCHAR(64) DEFAULT NULL,
`password_salt` VARCHAR(5) DEFAULT NULL,
`last_seen` INT(11) DEFAULT '0',
`last_raid` INT(11) DEFAULT '0',
`added_by` VARCHAR(25) DEFAULT NULL,
`added_at` INT(11) DEFAULT '0',
`deleted_by` VARCHAR(25) DEFAULT NULL,
`deleted_at` INT(11) DEFAULT NULL,
`banned_by` VARCHAR(25) DEFAULT NULL,
`banned_at` INT(11) DEFAULT NULL,
`banned_for` VARCHAR(100) DEFAULT NULL,
`banned_until` INT(11) DEFAULT '0',
`notify` INT(1) DEFAULT '0',
`user_level` INT(1) DEFAULT '0',
`updated_at` INT(11) DEFAULT '0',
PRIMARY KEY  (`id`),
UNIQUE KEY `char_id` (`char_id`),
UNIQUE KEY `nickname` (`nickname`),
KEY `user_level` (`user_level`),
KEY `banned_until` (`banned_until`),
KEY `notify` (`notify`),
KEY `user_level_2` (`user_level`),
KEY `banned_until_2` (`banned_until`),
KEY `notify_2` (`notify`)
)

whois

TABLE `whois` (
`ID` INT(15) NOT NULL DEFAULT '0',
`nickname` VARCHAR(15) NOT NULL DEFAULT '',
`firstname` VARCHAR(20) NOT NULL DEFAULT '',
`lastname` VARCHAR(20) NOT NULL DEFAULT '',
`level` tinyint(3) UNSIGNED NOT NULL DEFAULT '1',
`gender` enum('Female','Male','Neuter') NOT NULL DEFAULT 'Female',
`breed` enum('Atrox','Nano','Opifex','Solitus') NOT NULL DEFAULT 'Atrox',
`faction` enum('Clan','N/A','Neutral','Omni') NOT NULL DEFAULT 'Clan',
`profession` enum('Adventurer','Agent','Bureaucrat','Doctor','Enforcer','Engineer','Fixer','Keeper','Martial Artist','Meta-Physicist','Nano-Technician','Shade','Soldier','Trader') NOT NULL DEFAULT 'Adventurer',
`defender_rank` enum('Able','Accomplished','Adept','Amateur','Backer','Beginner','Challenger','Champ','Common','Competent','Defender','Fair','Fledgling','Guardian','Hero','Intermediate','Medalist','Mediocre','Newcomer','None','Patron','Protector','Qualified','Starter','Student','Suited','Supporter','Talented','Trustworthy','Vanquisher','Vindicator') NOT NULL DEFAULT 'None',
`defender_rank_id` enum('0','1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30') NOT NULL DEFAULT '0',
`org_id` BIGINT(10) NOT NULL DEFAULT '0',
`org_name` VARCHAR(50) NOT NULL DEFAULT '',
`org_rank` VARCHAR(20) NOT NULL DEFAULT '',
`org_rank_id` enum('0','1','2','3','4','5','6','7','8','9','10') NOT NULL DEFAULT '0',
`pictureurl` VARCHAR(100) NOT NULL DEFAULT '',
`used` BIGINT(25) NOT NULL DEFAULT '0',
`updated` INT(10) NOT NULL DEFAULT '0',
PRIMARY KEY  (`nickname`),
KEY `ID` (`ID`),
KEY `Profession` (`profession`),
KEY `Faction` (`faction`),
KEY `OrgID` (`org_id`),
KEY `Orgname` (`org_name`),
KEY `Level` (`level`),
KEY `Alienlevel` (`defender_rank_id`),
KEY `updated` (`updated`),
KEY `used` (`used`)
)

PHP Script to Generate this Documentation from a MySQL Dump

<?php
$subject = file_get_contents('aobots.sql');
$pattern = "/CREATE (TABLE .+?\)) ENGINE.+?/s";
if (preg_match_all ($pattern, $subject, $matches))
{
	$outfile = fopen("tables.txt", "w");
	foreach ($matches[1] as $table)
	{
		$lines = explode("\n", $table);
		$headline = $lines[0];
		$headline = str_replace("TABLE `", "", $headline);
		$headline = str_replace("` (", "", $headline);
		$headline = "==== ".trim($headline)." ====";
		fwrite($outfile, $headline."\n");
		$i = 0;
		fwrite($outfile, "&lt;code sql&gt;");
		while($i < count($lines)):
			fwrite($outfile, trim($lines[$i])."\n");
			$i = $i+1;
		endwhile;
		fwrite($outfile, "&lt;/code&gt;\n");
	}
	fclose($outfile);
}
else
{
	print_r("No matches.\n");
	die();
}
?>

Note: Replace &lt with < and &gt with > in the code above.

 
database_tables.1244239279.txt.bz2 · Last modified: 2013/09/12 22:49 (external edit)
[unknown button type]
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
WikiForumIRCBugs
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki