Ir para conteúdo
  • 0

Otserv Não Conecta


fitaisolante

Pergunta

Após eu passar o meu servidor global 8.7 para mysql,deu um erro.Configurei o site,ele ficou online,tudo normal,mais quando eu vou conectar o meu servidor ele dá o seguinte erro:

 

[07/06/2012 22:24:54] > MySQL ERROR mysql_real_connect: Access denied for user 'root'@'localhost' (using password: NO)
[07/06/2012 22:24:54] > ERROR: Failed to connect to database, read doc/MYSQL_HELP for information or try SqLite which doesn't require any connection.

 

Consegui resolver sozinho,mas agora quando vou entrar no servidor ele account number or password incorrect

e quando olho no server log dá o seguinte erro

MySQL ERROR mysql_real_query: SELECT `ip`, `mask`, `time` FROM `bans` WHERE `type` = 1; Unknown column 'ip' in 'field list'

Link para o comentário
Compartilhar em outros sites

12 respostass a esta questão

Posts Recomendados

  • 0

Eu havia conseguido resolver,ai deu um erro e percebi que puis

sqlType = "sqlite"

ai eu modifiquei novamente e puis:

sqlType = "mysql"

e veio o erro denovo..

 

 

 

[08/06/2012 00:36:43] > MySQL ERROR mysql_real_query: SELECT `ip`, `mask`, `time` FROM `bans` WHERE `type` = 1; Unknown column 'ip' in 'field list'

[08/06/2012 00:36:43] > MySQL ERROR mysql_real_query: SELECT `id`, `password`, `type`, `premdays`, `lastday`, `key`, `warnings` FROM `accounts` WHERE `id` = 1 LIMIT 1; Unknown column 'type' in 'field list'

 

Veja como está a minha configuração:

 

 

mysqlHost = "localhost"

mysqlUser = "root"

mysqlPass = "11a22s33d"

mysqlDatabase = "forgottenserver"

mysqlPort = 3306

 

sqlFile = "forgottenserver.s3db"

 

sqlType = "mysql"

passwordType = "plain"

OBS: meu server é 8.7

Editado por Keilost
Link para o comentário
Compartilhar em outros sites

  • 0

Qual database você recomenda para eu usar,tenho um real map global 8.7,poderia me ajudar?

 

Quero saber outra coisa também..Os chars do meu otserv 8.6 que é mysql,tão começando level 1 e em carlin..Como modifico isso?

Link para o comentário
Compartilhar em outros sites

  • 0

baixar um server aki no xtibia e pegue a data base dele !!

 

config.lua

accountManager = true
namelockManager = true
newPlayerChooseVoc = true
newPlayerSpawnPosX = 1088
newPlayerSpawnPosY = 1062
newPlayerSpawnPosZ = 7
newPlayerTownId = 1  
newPlayerLevel = 8
newPlayerMagicLevel = 0
generateAccountNumber = false

 

newPlayerSpawnPosX,newPlayerSpawnPosY,newPlayerSpawnPosZ = local do account manager

newPlayerTownId = cidade aonde o novo player ira nascer, olhe no seu mapa editor qual os id das cidades

newPlayerLevel = level do novo player que ira nascer

newPlayerMagicLeve = magic leve do novo player que ira nascer

Editado por gustavo010
Link para o comentário
Compartilhar em outros sites

  • 0
DROP TRIGGER IF EXISTS `oncreate_players`;
DROP TRIGGER IF EXISTS `oncreate_guilds`;
DROP TRIGGER IF EXISTS `ondelete_players`;
DROP TRIGGER IF EXISTS `ondelete_guilds`;
DROP TRIGGER IF EXISTS `ondelete_accounts`;

DROP TABLE IF EXISTS `player_depotitems`;
DROP TABLE IF EXISTS `tile_items`;
DROP TABLE IF EXISTS `tiles`;
DROP TABLE IF EXISTS `map_store`;
DROP TABLE IF EXISTS `bans`;
DROP TABLE IF EXISTS `house_lists`;
DROP TABLE IF EXISTS `houses`;
DROP TABLE IF EXISTS `player_items`;
DROP TABLE IF EXISTS `player_skills`;
DROP TABLE IF EXISTS `player_storage`;
DROP TABLE IF EXISTS `player_viplist`;
DROP TABLE IF EXISTS `player_spells`;
DROP TABLE IF EXISTS `player_deaths`;
DROP TABLE IF EXISTS `guild_ranks`;
DROP TABLE IF EXISTS `guilds`;
DROP TABLE IF EXISTS `guild_invites`;
DROP TABLE IF EXISTS `global_storage`;
DROP TABLE IF EXISTS `players`;
DROP TABLE IF EXISTS `accounts`;
DROP TABLE IF EXISTS `groups`;

CREATE TABLE `groups`
(
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL COMMENT 'group name',
`flags` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`access` INT NOT NULL,
`maxdepotitems` INT NOT NULL,
`maxviplist` INT NOT NULL,
PRIMARY KEY (`id`)
) ENGINE = InnoDB;

INSERT INTO `groups` VALUES (3, 'a god', 134788128760, 1, 0, 0);
INSERT INTO `groups` VALUES (2, 'a gamemaster', 137438953471, 1, 0, 0);
INSERT INTO `groups` VALUES (1, 'player', 0, 0, 0, 0);

CREATE TABLE `accounts`
(
`id` INT NOT NULL AUTO_INCREMENT,
`password` VARCHAR(255) /* VARCHAR(32) for MD5*/ NOT NULL DEFAULT '',
`type` INT NOT NULL DEFAULT 1,
`premdays` INT NOT NULL DEFAULT 0,
`lastday` INT UNSIGNED NOT NULL DEFAULT 0,
`key` VARCHAR(20) NOT NULL DEFAULT '0',
`email` VARCHAR(255) NOT NULL DEFAULT '',
`blocked` TINYINT(1) NOT NULL DEFAULT FALSE,
`warnings` INT NOT NULL DEFAULT 0,
`group_id` INT NOT NULL DEFAULT 1,
PRIMARY KEY (`id`),
FOREIGN KEY (`group_id`) REFERENCES `groups` (`id`)
) ENGINE = InnoDB;

INSERT INTO `accounts` VALUES (1, '1', 1, 65535, 0, '0', '', 0, 0, 1);

CREATE TABLE `players`
(
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`group_id` INT NOT NULL DEFAULT 1,
`account_id` INT NOT NULL DEFAULT 0,
`level` INT NOT NULL DEFAULT 1,
`vocation` INT NOT NULL DEFAULT 0,
`health` INT NOT NULL DEFAULT 150,
`healthmax` INT NOT NULL DEFAULT 150,
`experience` BIGINT NOT NULL DEFAULT 0,
`lookbody` INT NOT NULL DEFAULT 0,
`lookfeet` INT NOT NULL DEFAULT 0,
`lookhead` INT NOT NULL DEFAULT 0,
`looklegs` INT NOT NULL DEFAULT 0,
`looktype` INT NOT NULL DEFAULT 136,
`lookaddons` INT NOT NULL DEFAULT 0,
`maglevel` INT NOT NULL DEFAULT 0,
`mana` INT NOT NULL DEFAULT 0,
`manamax` INT NOT NULL DEFAULT 0,
`manaspent` INT NOT NULL DEFAULT 0,
`soul` INT UNSIGNED NOT NULL DEFAULT 0,
`town_id` INT NOT NULL DEFAULT 0,
`posx` INT NOT NULL DEFAULT 0,
`posy` INT NOT NULL DEFAULT 0,
`posz` INT NOT NULL DEFAULT 0,
`conditions` BLOB NOT NULL,
`cap` INT NOT NULL DEFAULT 0,
`sex` INT NOT NULL DEFAULT 0,
`lastlogin` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`lastip` INT UNSIGNED NOT NULL DEFAULT 0,
`save` TINYINT(1) NOT NULL DEFAULT 1,
`redskull` TINYINT(1) NOT NULL DEFAULT 0,
`redskulltime` INT NOT NULL DEFAULT 0,
`rank_id` INT NOT NULL DEFAULT 0,
`guildnick` VARCHAR(255) NOT NULL DEFAULT '',
`lastlogout` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`blessings` TINYINT(2) NOT NULL DEFAULT 0,
`direction` INT NOT NULL DEFAULT 0 COMMENT 'NOT IN USE BY THE SERVER',
`loss_experience` INT NOT NULL DEFAULT '10' COMMENT 'NOT IN USE BY THE SERVER',
`loss_mana` INT NOT NULL DEFAULT '10' COMMENT 'NOT IN USE BY THE SERVER',
`loss_skills` INT NOT NULL DEFAULT '10' COMMENT 'NOT IN USE BY THE SERVER',
`premend` INT NOT NULL DEFAULT 0 COMMENT 'NOT IN USE BY THE SERVER',
`online` TINYINT NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY (`name`),
FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`) ON DELETE CASCADE,
FOREIGN KEY (`group_id`) REFERENCES `groups`(`id`)
) ENGINE = InnoDB;

INSERT INTO `players` VALUES (1, 'Account Manager', 1, 1, 1, 0, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 10, 10, 10, 0, 0);

CREATE TABLE `bans`
(
`type` INT NOT NULL COMMENT 'this field defines if its ip, accountban or namelock',
`ip` INT UNSIGNED NOT NULL DEFAULT 0,
`mask` INT UNSIGNED NOT NULL DEFAULT 4294967295,
`player` INT UNSIGNED NOT NULL DEFAULT 0,
`account` INT UNSIGNED NOT NULL DEFAULT 0,
`time` INT UNSIGNED NOT NULL DEFAULT 0,
`reason_id` INT NOT NULL DEFAULT 0,
`action_id` INT NOT NULL DEFAULT 0,
`comment` VARCHAR(60) NOT NULL DEFAULT '',
`banned_by` INT UNSIGNED NOT NULL DEFAULT 0
) ENGINE = InnoDB;

CREATE TABLE `global_storage`
(
`key` INT UNSIGNED NOT NULL,
`value` INT NOT NULL,
PRIMARY KEY  (`key`)
) ENGINE = InnoDB;

CREATE TABLE `guilds`
(
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL COMMENT 'guild name - nothing else needed here',
`ownerid` INT NOT NULL,
`creationdata` INT NOT NULL,
`motd` VARCHAR(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE = InnoDB;

CREATE TABLE `guild_invites`
(
`player_id` INT UNSIGNED NOT NULL DEFAULT 0,
`guild_id` INT UNSIGNED NOT NULL DEFAULT 0
) ENGINE = InnoDB;

CREATE TABLE `guild_ranks`
(
`id` INT NOT NULL AUTO_INCREMENT,
`guild_id` INT NOT NULL COMMENT 'guild',
`name` VARCHAR(255) NOT NULL COMMENT 'rank name',
`level` INT NOT NULL COMMENT 'rank level - leader, vice, member, maybe something else',
PRIMARY KEY (`id`),
FOREIGN KEY (`guild_id`) REFERENCES `guilds`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `house_lists`
(
`house_id` INT NOT NULL,
`listid` INT NOT NULL,
`list` TEXT NOT NULL
) ENGINE = InnoDB;

CREATE TABLE `houses`
(
`id` INT NOT NULL AUTO_INCREMENT,
`owner` INT NOT NULL,
`paid` INT UNSIGNED NOT NULL DEFAULT 0,
`warnings` TEXT NOT NULL,
PRIMARY KEY (`id`)
) ENGINE = InnoDB;

CREATE TABLE `player_deaths`
(
`player_id` INT NOT NULL,
`time` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`level` INT NOT NULL DEFAULT 1,
`killed_by` VARCHAR(255) NOT NULL,
`is_player` TINYINT(1) NOT NULL DEFAULT 1,
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `player_depotitems`
(
`player_id` INT NOT NULL,
`depot_id` INT NOT NULL DEFAULT 0,
`sid` INT NOT NULL COMMENT 'any given range eg 0-100 will be reserved for depot lockers and all > 100 will be then normal items inside depots',
`pid` INT NOT NULL DEFAULT 0,
`itemtype` INT NOT NULL,
`count` INT NOT NULL DEFAULT 0,
`attributes` BLOB NOT NULL,
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE,
KEY (`player_id`, `depot_id`),
UNIQUE KEY (`player_id`, `sid`)
) ENGINE = InnoDB;

CREATE TABLE `player_items`
(
`player_id` INT NOT NULL DEFAULT 0,
`pid` INT NOT NULL DEFAULT 0,
`sid` INT NOT NULL DEFAULT 0,
`itemtype` INT NOT NULL DEFAULT 0,
`count` INT NOT NULL DEFAULT 0,
`attributes` BLOB NOT NULL,
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `player_skills`
(
`player_id` INT NOT NULL DEFAULT 0,
`skillid` tinyint(4) NOT NULL DEFAULT 0,
`value` INT UNSIGNED NOT NULL DEFAULT 0,
`count` INT UNSIGNED NOT NULL DEFAULT 0,
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `player_spells`
(
`player_id` INT NOT NULL,
`name` VARCHAR(255) NOT NULL,
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `player_storage`
(
`player_id` INT NOT NULL DEFAULT 0,
`key` INT UNSIGNED NOT NULL DEFAULT 0,
`value` INT NOT NULL DEFAULT 0,
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `player_viplist`
(
`player_id` INT NOT NULL COMMENT 'id of player whose viplist entry it is',
`vip_id` INT NOT NULL COMMENT 'id of target player of viplist entry',
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE,
FOREIGN KEY (`vip_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `map_store`
(
`house_id` int(10) unsigned NOT NULL,
`data` blob NOT NULL,
KEY `house_id` (`house_id`)
) ENGINE = InnoDB;

CREATE TABLE `tiles`
(
`id` INT NOT NULL AUTO_INCREMENT,
`x` INT NOT NULL,
`y` INT NOT NULL,
`z` INT NOT NULL,
PRIMARY KEY(`id`)
) ENGINE = InnoDB;

CREATE TABLE `tile_items`
(
`tile_id` INT NOT NULL,
`sid` INT NOT NULL,
`pid` INT NOT NULL DEFAULT 0,
`itemtype` INT NOT NULL,
`count` INT NOT NULL DEFAULT 0,
`attributes` BLOB NOT NULL,
FOREIGN KEY (`tile_id`) REFERENCES `tiles` (`id`) ON DELETE CASCADE,
INDEX (`sid`)
) ENGINE = InnoDB;

DELIMITER |

CREATE TRIGGER `ondelete_accounts`
BEFORE DELETE
ON `accounts`
FOR EACH ROW
BEGIN
   DELETE FROM `bans` WHERE `account` = OLD.`id`;
END|

CREATE TRIGGER `ondelete_guilds`
BEFORE DELETE
ON `guilds`
FOR EACH ROW
BEGIN
   UPDATE `players` SET `guildnick` = '', `rank_id` = 0 WHERE `rank_id` IN (SELECT `id` FROM `guild_ranks` WHERE `guild_id` = OLD.`id`);
END|

CREATE TRIGGER `ondelete_players`
BEFORE DELETE
ON `players`
FOR EACH ROW
BEGIN
   DELETE FROM `bans` WHERE `type` = 2 AND `player` = OLD.`id`;
   UPDATE `houses` SET `owner` = 0 WHERE `owner` = OLD.`id`;
END|

CREATE TRIGGER `oncreate_guilds`
AFTER INSERT
ON `guilds`
FOR EACH ROW
BEGIN
   INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('the Leader', 3, NEW.`id`);
   INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('a Vice-Leader', 2, NEW.`id`);
   INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('a Member', 1, NEW.`id`);
END|

CREATE TRIGGER `oncreate_players`
AFTER INSERT
ON `players`
FOR EACH ROW
BEGIN
   INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 0, 10);
   INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 1, 10);
   INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 2, 10);
   INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 3, 10);
   INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 4, 10);
   INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 5, 10);
   INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 6, 10);
END|

DELIMITER ;

Link para o comentário
Compartilhar em outros sites

  • 0

Esse schema ai é da versão 8.40 menos, o tfs 8.7 não é compativel com ela, usa essa aqui.

 

DROP TRIGGER IF EXISTS `oncreate_players`;
DROP TRIGGER IF EXISTS `oncreate_guilds`;
DROP TRIGGER IF EXISTS `ondelete_players`;
DROP TRIGGER IF EXISTS `ondelete_guilds`;
DROP TRIGGER IF EXISTS `ondelete_accounts`;
DROP TABLE IF EXISTS `player_depotitems`;
DROP TABLE IF EXISTS `tile_items`;
DROP TABLE IF EXISTS `tile_store`;
DROP TABLE IF EXISTS `tiles`;
DROP TABLE IF EXISTS `bans`;
DROP TABLE IF EXISTS `house_lists`;
DROP TABLE IF EXISTS `houses`;
DROP TABLE IF EXISTS `player_items`;
DROP TABLE IF EXISTS `player_namelocks`;
DROP TABLE IF EXISTS `player_skills`;
DROP TABLE IF EXISTS `player_storage`;
DROP TABLE IF EXISTS `player_viplist`;
DROP TABLE IF EXISTS `player_spells`;
DROP TABLE IF EXISTS `player_deaths`;
DROP TABLE IF EXISTS `killers`;
DROP TABLE IF EXISTS `environment_killers`;
DROP TABLE IF EXISTS `player_killers`;
DROP TABLE IF EXISTS `guild_ranks`;
DROP TABLE IF EXISTS `guilds`;
DROP TABLE IF EXISTS `guild_invites`;
DROP TABLE IF EXISTS `global_storage`;
DROP TABLE IF EXISTS `players`;
DROP TABLE IF EXISTS `accounts`;
DROP TABLE IF EXISTS `server_record`;
DROP TABLE IF EXISTS `server_motd`;
DROP TABLE IF EXISTS `server_reports`;
DROP TABLE IF EXISTS `server_config`;
DROP TABLE IF EXISTS `account_viplist`;
CREATE TABLE `accounts`
(
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(32) NOT NULL DEFAULT '',
`password` VARCHAR(255) NOT NULL/* VARCHAR(32) NOT NULL COMMENT 'MD5'*//* VARCHAR(40) NOT NULL COMMENT 'SHA1'*/,
`salt` VARCHAR(40) NOT NULL DEFAULT '',
`premdays` INT NOT NULL DEFAULT 0,
`lastday` INT UNSIGNED NOT NULL DEFAULT 0,
`email` VARCHAR(255) NOT NULL DEFAULT '',
`key` VARCHAR(32) NOT NULL DEFAULT '0',
`blocked` TINYINT(1) NOT NULL DEFAULT FALSE COMMENT 'internal usage',
`warnings` INT NOT NULL DEFAULT 0,
`group_id` INT NOT NULL DEFAULT 1,
PRIMARY KEY (`id`), UNIQUE (`name`)
) ENGINE = InnoDB;
INSERT INTO `accounts` VALUES (1, '1', '1', '', 65535, 0, '', '0', 0, 0, 1);
CREATE TABLE `players`
(
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`world_id` TINYINT(4) UNSIGNED NOT NULL DEFAULT 0,
`group_id` INT NOT NULL DEFAULT 1,
`account_id` INT NOT NULL DEFAULT 0,
`level` INT NOT NULL DEFAULT 1,
`vocation` INT NOT NULL DEFAULT 0,
`health` INT NOT NULL DEFAULT 150,
`healthmax` INT NOT NULL DEFAULT 150,
`experience` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`lookbody` INT NOT NULL DEFAULT 0,
`lookfeet` INT NOT NULL DEFAULT 0,
`lookhead` INT NOT NULL DEFAULT 0,
`looklegs` INT NOT NULL DEFAULT 0,
`looktype` INT NOT NULL DEFAULT 136,
`lookaddons` INT NOT NULL DEFAULT 0,
`lookmount` INT NOT NULL DEFAULT 0,
`maglevel` INT NOT NULL DEFAULT 0,
`mana` INT NOT NULL DEFAULT 0,
`manamax` INT NOT NULL DEFAULT 0,
`manaspent` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`soul` INT UNSIGNED NOT NULL DEFAULT 0,
`town_id` INT NOT NULL DEFAULT 0,
`posx` INT NOT NULL DEFAULT 0,
`posy` INT NOT NULL DEFAULT 0,
`posz` INT NOT NULL DEFAULT 0,
`conditions` BLOB NOT NULL,
`cap` INT NOT NULL DEFAULT 0,
`sex` INT NOT NULL DEFAULT 0,
`lastlogin` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`lastip` INT UNSIGNED NOT NULL DEFAULT 0,
`save` TINYINT(1) NOT NULL DEFAULT 1,
`skull` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
`skulltime` INT NOT NULL DEFAULT 0,
`rank_id` INT NOT NULL DEFAULT 0,
`guildnick` VARCHAR(255) NOT NULL DEFAULT '',
`lastlogout` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`blessings` TINYINT(2) NOT NULL DEFAULT 0,
`pvp_blessing` TINYINT(1) NOT NULL DEFAULT 0,
`balance` BIGINT NOT NULL DEFAULT 0,
`stamina` BIGINT UNSIGNED NOT NULL DEFAULT 151200000 COMMENT 'stored in miliseconds',
`direction` INT NOT NULL DEFAULT 2,
`loss_experience` INT NOT NULL DEFAULT 100,
`loss_mana` INT NOT NULL DEFAULT 100,
`loss_skills` INT NOT NULL DEFAULT 100,
`loss_containers` INT NOT NULL DEFAULT 100,
`loss_items` INT NOT NULL DEFAULT 100,
`premend` INT NOT NULL DEFAULT 0 COMMENT 'NOT IN USE BY THE SERVER',
`online` TINYINT(1) NOT NULL DEFAULT 0,
`marriage` INT UNSIGNED NOT NULL DEFAULT 0,
`promotion` INT NOT NULL DEFAULT 0,
`deleted` INT NOT NULL DEFAULT 0,
`description` VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`), UNIQUE (`name`, `deleted`),
KEY (`account_id`), KEY (`group_id`),
KEY (`online`), KEY (`deleted`),
FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
INSERT INTO `players` VALUES (1, 'Account Manager', 0, 1, 1, 1, 0, 150,  150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0,  0, 0, 0, 0, 0, 0, '', 0, 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0,  0, 0, 0, 0, '');
CREATE TABLE `account_viplist`
(
`account_id` INT NOT NULL,
`world_id` TINYINT(4) UNSIGNED NOT NULL DEFAULT 0,
`player_id` INT NOT NULL,
KEY (`account_id`), KEY (`player_id`), KEY (`world_id`), UNIQUE (`account_id`, `player_id`),
FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`) ON DELETE CASCADE,
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE `player_deaths`
(
`id` INT NOT NULL AUTO_INCREMENT,
`player_id` INT NOT NULL,
`date` BIGINT UNSIGNED NOT NULL,
`level` INT UNSIGNED NOT NULL,
PRIMARY KEY (`id`), INDEX (`date`),
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE `player_depotitems`
(
`player_id` INT NOT NULL,
`sid` INT NOT NULL COMMENT 'any given range, eg. 0-100 is reserved for depot lockers and all above 100 will be normal items inside depots',
`pid` INT NOT NULL DEFAULT 0,
`itemtype` INT NOT NULL,
`count` INT NOT NULL DEFAULT 0,
`attributes` BLOB NOT NULL,
KEY (`player_id`), UNIQUE (`player_id`, `sid`),
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE `player_items`
(
`player_id` INT NOT NULL DEFAULT 0,
`pid` INT NOT NULL DEFAULT 0,
`sid` INT NOT NULL DEFAULT 0,
`itemtype` INT NOT NULL DEFAULT 0,
`count` INT NOT NULL DEFAULT 0,
`attributes` BLOB NOT NULL,
KEY (`player_id`), UNIQUE (`player_id`, `sid`),
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE `player_namelocks`
(
`player_id` INT NOT NULL DEFAULT 0,
`name` VARCHAR(255) NOT NULL,
`new_name` VARCHAR(255) NOT NULL,
`date` BIGINT NOT NULL DEFAULT 0,
KEY (`player_id`),
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE `player_skills`
(
`player_id` INT NOT NULL DEFAULT 0,
`skillid` TINYINT(2) NOT NULL DEFAULT 0,
`value` INT UNSIGNED NOT NULL DEFAULT 0,
`count` INT UNSIGNED NOT NULL DEFAULT 0,
KEY (`player_id`), UNIQUE (`player_id`, `skillid`),
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE `player_spells`
(
`player_id` INT NOT NULL,
`name` VARCHAR(255) NOT NULL,
KEY (`player_id`), UNIQUE (`player_id`, `name`),
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE `player_storage`
(
`player_id` INT NOT NULL DEFAULT 0,
`key` VARCHAR(32) NOT NULL DEFAULT '0',
`value` VARCHAR(255) NOT NULL DEFAULT '0',
KEY (`player_id`), UNIQUE (`player_id`, `key`),
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE `player_viplist`
(
`player_id` INT NOT NULL,
`vip_id` INT NOT NULL,
KEY (`player_id`), KEY (`vip_id`), UNIQUE (`player_id`, `vip_id`),
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE,
FOREIGN KEY (`vip_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE `killers`
(
`id` INT NOT NULL AUTO_INCREMENT,
`death_id` INT NOT NULL,
`final_hit` TINYINT(1) UNSIGNED NOT NULL DEFAULT FALSE,
`unjustified` TINYINT(1) UNSIGNED NOT NULL DEFAULT FALSE,
PRIMARY KEY (`id`),
FOREIGN KEY (`death_id`) REFERENCES `player_deaths`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE `player_killers`
(
`kill_id` INT NOT NULL,
`player_id` INT NOT NULL,
FOREIGN KEY (`kill_id`) REFERENCES `killers`(`id`) ON DELETE CASCADE,
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE `environment_killers`
(
`kill_id` INT NOT NULL,
`name` VARCHAR(255) NOT NULL,
FOREIGN KEY (`kill_id`) REFERENCES `killers`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE `houses`
(
`id` INT UNSIGNED NOT NULL,
`world_id` TINYINT(4) UNSIGNED NOT NULL DEFAULT 0,
`owner` INT NOT NULL,
`paid` INT UNSIGNED NOT NULL DEFAULT 0,
`warnings` INT NOT NULL DEFAULT 0,
`lastwarning` INT UNSIGNED NOT NULL DEFAULT 0,
`name` VARCHAR(255) NOT NULL,
`town` INT UNSIGNED NOT NULL DEFAULT 0,
`size` INT UNSIGNED NOT NULL DEFAULT 0,
`price` INT UNSIGNED NOT NULL DEFAULT 0,
`rent` INT UNSIGNED NOT NULL DEFAULT 0,
`doors` INT UNSIGNED NOT NULL DEFAULT 0,
`beds` INT UNSIGNED NOT NULL DEFAULT 0,
`tiles` INT UNSIGNED NOT NULL DEFAULT 0,
`guild` TINYINT(1) UNSIGNED NOT NULL DEFAULT FALSE,
`clear` TINYINT(1) UNSIGNED NOT NULL DEFAULT FALSE,
UNIQUE (`id`, `world_id`)
) ENGINE = InnoDB;
CREATE TABLE `tile_store`
(
`house_id` INT UNSIGNED NOT NULL,
`world_id` TINYINT(4) UNSIGNED NOT NULL DEFAULT 0,
`data` LONGBLOB NOT NULL,
FOREIGN KEY (`house_id`) REFERENCES `houses` (`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE `house_auctions`
(
`house_id` INT UNSIGNED NOT NULL,
`world_id` TINYINT(4) UNSIGNED NOT NULL DEFAULT 0,
`player_id` INT NOT NULL,
`bid` INT UNSIGNED NOT NULL DEFAULT 0,
`limit` INT UNSIGNED NOT NULL DEFAULT 0,
`endtime` BIGINT UNSIGNED NOT NULL DEFAULT 0,
UNIQUE (`house_id`, `world_id`),
FOREIGN KEY (`house_id`, `world_id`) REFERENCES `houses`(`id`, `world_id`) ON DELETE CASCADE,
FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE `house_lists`
(
`house_id` INT UNSIGNED NOT NULL,
`world_id` TINYINT(4) UNSIGNED NOT NULL DEFAULT 0,
`listid` INT NOT NULL,
`list` TEXT NOT NULL,
UNIQUE (`house_id`, `world_id`, `listid`),
FOREIGN KEY (`house_id`, `world_id`) REFERENCES `houses`(`id`, `world_id`) ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE `house_data`
(
`house_id` INT UNSIGNED NOT NULL,
`world_id` TINYINT(4) UNSIGNED NOT NULL DEFAULT 0,
`data` LONGBLOB NOT NULL,
UNIQUE (`house_id`, `world_id`),
FOREIGN KEY (`house_id`, `world_id`) REFERENCES `houses`(`id`, `world_id`) ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE `tiles`
(
`id` INT UNSIGNED NOT NULL,
`world_id` TINYINT(4) UNSIGNED NOT NULL DEFAULT 0,
`house_id` INT UNSIGNED NOT NULL,
`x` INT(5) UNSIGNED NOT NULL,
`y` INT(5) UNSIGNED NOT NULL,
`z` TINYINT(2) UNSIGNED NOT NULL,
UNIQUE (`id`, `world_id`),
KEY (`x`, `y`, `z`),
FOREIGN KEY (`house_id`, `world_id`) REFERENCES `houses`(`id`, `world_id`) ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE `tile_items`
(
`tile_id` INT UNSIGNED NOT NULL,
`world_id` TINYINT(4) UNSIGNED NOT NULL DEFAULT 0,
`sid` INT NOT NULL,
`pid` INT NOT NULL DEFAULT 0,
`itemtype` INT NOT NULL,
`count` INT NOT NULL DEFAULT 0,
`attributes` BLOB NOT NULL,
UNIQUE (`tile_id`, `world_id`, `sid`), KEY (`sid`),
FOREIGN KEY (`tile_id`) REFERENCES `tiles`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE `guilds`
(
`id` INT NOT NULL AUTO_INCREMENT,
`world_id` TINYINT(4) UNSIGNED NOT NULL DEFAULT 0,
`name` VARCHAR(255) NOT NULL,
`ownerid` INT NOT NULL,
`creationdata` INT NOT NULL,
`checkdata` INT NOT NULL,
`motd` VARCHAR(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE (`name`, `world_id`)
) ENGINE = InnoDB;
CREATE TABLE `guild_invites`
(
`player_id` INT NOT NULL DEFAULT 0,
`guild_id` INT NOT NULL DEFAULT 0,
UNIQUE (`player_id`, `guild_id`),
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE,
FOREIGN KEY (`guild_id`) REFERENCES `guilds`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE `guild_ranks`
(
`id` INT NOT NULL AUTO_INCREMENT,
`guild_id` INT NOT NULL,
`name` VARCHAR(255) NOT NULL,
`level` INT NOT NULL COMMENT '1 - leader, 2 - vice leader, 3 - member',
PRIMARY KEY (`id`),
FOREIGN KEY (`guild_id`) REFERENCES `guilds`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE `bans`
(
`id` INT UNSIGNED NOT NULL auto_increment,
`type` TINYINT(1) NOT NULL COMMENT '1 - ip banishment, 2 - namelock, 3 - account banishment, 4 - notation, 5 - deletion',
`value` INT UNSIGNED NOT NULL COMMENT 'ip address (integer), player guid or account number',
`param` INT UNSIGNED NOT NULL DEFAULT 4294967295 COMMENT 'used only for ip banishment mask (integer)',
`active` TINYINT(1) NOT NULL DEFAULT TRUE,
`expires` INT NOT NULL,
`added` INT UNSIGNED NOT NULL,
`admin_id` INT UNSIGNED NOT NULL DEFAULT 0,
`comment` TEXT NOT NULL,
`reason` INT UNSIGNED NOT NULL DEFAULT 0,
`action` INT UNSIGNED NOT NULL DEFAULT 0,
`statement` VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `type` (`type`, `value`),
KEY `active` (`active`)
) ENGINE = InnoDB;
CREATE TABLE `global_storage`
(
`key` VARCHAR(32) NOT NULL,
`world_id` TINYINT(4) UNSIGNED NOT NULL DEFAULT 0,
`value` VARCHAR(255) NOT NULL DEFAULT '0',
UNIQUE  (`key`, `world_id`)
) ENGINE = InnoDB;
CREATE TABLE `server_config`
(
`config` VARCHAR(35) NOT NULL DEFAULT '',
`value` VARCHAR(255) NOT NULL DEFAULT '',
UNIQUE (`config`)
) ENGINE = InnoDB;
INSERT INTO `server_config` VALUES ('db_version', 31);
CREATE TABLE `server_motd`
(
`id` INT UNSIGNED NOT NULL,
`world_id` TINYINT(4) UNSIGNED NOT NULL DEFAULT 0,
`text` TEXT NOT NULL,
UNIQUE (`id`, `world_id`)
) ENGINE = InnoDB;
INSERT INTO `server_motd` VALUES (1, 0, 'Welcome to The Forgotten Server!');
CREATE TABLE `server_record`
(
`record` INT NOT NULL,
`world_id` TINYINT(4) UNSIGNED NOT NULL DEFAULT 0,
`timestamp` BIGINT NOT NULL,
UNIQUE (`record`, `world_id`, `timestamp`)
) ENGINE = InnoDB;
INSERT INTO `server_record` VALUES (0, 0, 0);
CREATE TABLE `server_reports`
(
`id` INT NOT NULL AUTO_INCREMENT,
`world_id` TINYINT(4) UNSIGNED NOT NULL DEFAULT 0,
`player_id` INT NOT NULL DEFAULT 1,
`posx` INT NOT NULL DEFAULT 0,
`posy` INT NOT NULL DEFAULT 0,
`posz` INT NOT NULL DEFAULT 0,
`timestamp` BIGINT NOT NULL DEFAULT 0,
`report` TEXT NOT NULL,
`reads` INT NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY (`world_id`), KEY (`reads`),
FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
DELIMITER |
CREATE TRIGGER `ondelete_accounts`
BEFORE DELETE
ON `accounts`
FOR EACH ROW
BEGIN
DELETE FROM `bans` WHERE `type` IN (3, 4) AND `value` = OLD.`id`;
END|
CREATE TRIGGER `oncreate_guilds`
AFTER INSERT
ON `guilds`
FOR EACH ROW
BEGIN
INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('Leader', 3, NEW.`id`);
INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('Vice-Leader', 2, NEW.`id`);
INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('Member', 1, NEW.`id`);
END|
CREATE TRIGGER `ondelete_guilds`
BEFORE DELETE
ON `guilds`
FOR EACH ROW
BEGIN
UPDATE `players` SET `guildnick` = '', `rank_id` = 0 WHERE `rank_id` IN (SELECT `id` FROM `guild_ranks` WHERE `guild_id` = OLD.`id`);
END|
CREATE TRIGGER `oncreate_players`
AFTER INSERT
ON `players`
FOR EACH ROW
BEGIN
INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 0, 10);
INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 1, 10);
INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 2, 10);
INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 3, 10);
INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 4, 10);
INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 5, 10);
INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 6, 10);
END|
CREATE TRIGGER `ondelete_players`
BEFORE DELETE
ON `players`
FOR EACH ROW
BEGIN
DELETE FROM `bans` WHERE `type` IN (2, 5) AND `value` = OLD.`id`;
UPDATE `houses` SET `owner` = 0 WHERE `owner` = OLD.`id`;
END|
DELIMITER ;

Link para o comentário
Compartilhar em outros sites

  • 0

Poderia identificar se esse config.lua é 8.7

-- The Forgotten Server Config
-- Account Manager
accountManager = "yes"
newPlayerChooseVoc = "yes"
newPlayerSpawnPosX = 32360
newPlayerSpawnPosY = 31782
newPlayerSpawnPosZ = 7
newPlayerTownId = 2
newPlayerLevel = 8
newPlayerMagicLevel = 0
generateAccountNumber = "yes"
-- Banishments
broadcastBanishments = "yes"
banDays = 7
finalBanDays = 30
killsToBan = 5
-- Battle
worldType = "pvp"
hotkeyAimbotEnabled = "yes"
protectionLevel = 1
killsToRedSkull = 3
pzLocked = 30000
deathLosePercent = 10
criticalHitChance = 7
removeAmmoWhenUsingDistanceWeapon = "yes"
removeChargesFromRunes = "yes"
removeChargesFromWeapons = "yes"
timeToDecreaseFrags = 24 * 60 * 60 * 1000
whiteSkullTime = 15 * 60 * 1000
oldConditionAccuracy = "no"
stairJumpExhaustion = 2000
animationTextOnHeal = "yes"
-- Commands
displayGamemastersWithOnlineCommand = "no"
-- Connection Config
ip = "127.0.0.1"
bindOnlyGlobalAddress = "no"
loginProtocolPort = 7171
gameProtocolPort = 7172
adminProtocolPort = 7171
statusProtocolPort = 7171
loginTries = 10
retryTimeout = 5 * 1000
loginTimeout = 60 * 1000
maxPlayers = "1000"
motd = "Welcome to the Forgotten Server TESTE!"
onePlayerOnlinePerAccount = "yes"
allowClones = "no"
serverName = "Forgotten TESTE"
loginMessage = "Welcome to the Forgotten Server TEST!"
adminLogsEnabled = "no"
statusTimeout = 5 * 60 * 1000
replaceKickOnLogin = "yes"
-- Deathlist
deathListEnabled = "yes"
maxDeathRecords = 5
-- Guilds
ingameGuildSystem = "yes"
levelToCreateGuild = 8
-- Highscores
highscoreDisplayPlayers = 15
updateHighscoresAfterMinutes = 60
-- Houses
housePriceEachSQM = 1000
houseRentPeriod = "never"
-- Idle
kickIdlePlayerAfterMinutes = 15
-- Item Usage
timeBetweenActions = 200
timeBetweenExActions = 1000
-- Map
mapName = "real"
mapAuthor = "Komic"
randomizeTiles = "yes"
mapStorageType = "relational"
-- Messaging
maxMessageBuffer = 4
-- MySQL
mysqlHost = "localhost"
mysqlUser = "root"
mysqlPass = ""
mysqlDatabase = "theforgottenserver"
mysqlPort = 3306
-- Premium Account
freePremium = "no"
-- PVP Server
displayOnOrOffAtCharlist = "no"
allowChangeOutfit = "yes"
noDamageToSameLookfeet = "no"
experienceByKillingPlayers = "no"
-- Rates
rateExp = 5
rateSkill = 3
rateLoot = 2
rateMagic = 3
rateSpawn = 1
-- Real Server Save
-- note: serverSaveHour means like 03:00, not that it will save every 3 hours,
-- if you want such a system use autoSaveEachMinutes. this serversave method
-- may be unstable, we recommend using otadmin if you want real serversaves.
serverSaveEnabled = "no"
serverSaveHour = 3
shutdownAtServerSave = "yes"
cleanMapAtServerSave = "yes"
-- Server saving
autoSaveEachMinutes = 15
saveGlobalStorage = "no"
-- Spawns
deSpawnRange = 2
deSpawnRadius = 50
-- SqLite
sqliteDatabase = "forgottenserver.s3db"
-- SQL
sqlType = "sqlite"
passwordType = "plain"
-- Startup
defaultPriority = "high"
-- Shutdown
freeMemoryAtShutdown = "yes"
-- Status
ownerName = ""
ownerEmail = "@otland.net"
url = "http://otland.net/"
location = "Europe"

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...