• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Error? adding samples - Gesior2012 - TFS 0.3.6

bury

Active Member
Joined
Jul 27, 2008
Messages
421
Solutions
7
Reaction score
25
Hello. I was trying one of the last gesior website for my o.3.6 rev and when I'm installing everything I dont know why server doesn't install the samples to the db so you can't create any character ingame.

STEP 4
Add samples to DB:
Added sample character: Rook Sample
Added sample character: Sorcerer Sample
Added sample character: Druid Sample
Added sample character: Paladin Sample
Added sample character: Knight Sample

This message appears, then I try localhost and website is working but I can't create characters because it doesn't create the samples (Checked db and they are not there lol)

I used a normal mysql.sql of 16kb of 0.3.6. I'm using last version of uniserver. If I try to manually create the samples I get this error:

#1054 - La columna 'created' en field list es desconocida -> English -> The column created in field list is unkown.

Thanks for your help.
 
I get that error with this one, for example, but I tried two or three different commands:

Code:
INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES
(NULL, "Sorcerer Sample", 0, 1, 1, 1, 1, 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, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "");
INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES
(NULL, "Druid Sample", 0, 1, 1, 1, 2, 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, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "");
INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES
(NULL, "Paladin Sample", 0, 1, 1, 1, 3, 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, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "");
INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `created`, `nick_verify`, `old_name`, `hide_char`, `comment`) VALUES
(NULL, "Knight Sample", 0, 1, 1, 1, 4, 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, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, "", 0, 0, "", 0, "");

I donw know why the instalation doesn't create samples. Tried removing db and doing the instalation again but... no samples. The mysql.sql creates the player "account maker" but idk.

Do you want me to export the players table and paste it here??
 
Yeah, i need to check the collumns (id, name etc.), they must be the same.
Btw, why dont you download again a clean version of the website? This is the repository of Gesior, click on BRANCH button and download the correct gesior for 0.3.6
https://github.com/gesior/Gesior2012

PS: If you do so, i warn you to open the install.php and remove these lines:
Code:
$installIP = trim(file_get_contents('install.txt'));
if($installIP != $_SERVER['REMOTE_ADDR'])
{
    echo('In file <b>install.txt</b> must be your IP!<br />In file is:<br /><b>' . $installIP . '</b><br />Your IP is:<br /><b>' . $_SERVER['REMOTE_ADDR'] . '</b>');
    exit;
}

After that you are good to go!
 
Yeah, i need to check the collumns (id, name etc.), they must be the same.
Btw, why dont you download again a clean version of the website? This is the repository of Gesior, click on BRANCH button and download the correct gesior for 0.3.6
https://github.com/gesior/Gesior2012

PS: If you do so, i warn you to open the install.php and remove these lines:
Code:
$installIP = trim(file_get_contents('install.txt'));
if($installIP != $_SERVER['REMOTE_ADDR'])
{
    echo('In file <b>install.txt</b> must be your IP!<br />In file is:<br /><b>' . $installIP . '</b><br />Your IP is:<br /><b>' . $_SERVER['REMOTE_ADDR'] . '</b>');
    exit;
}

After that you are good to go!

Yeah, I downloaded from there and use a db from 0.3.6 (mysql.sql inside of schemas)

Inside install.txt I put ::1 as I check in somewhere. The instalation is good (I check it adds columns in some tables, but then it doesn't add the samples).

Where could I upload the extract I made of the players table? Mediafire?
 
Code:
INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `comment`, `create_ip`, `create_date`, `hide_char`) VALUES
(1, 'Account Manager', 0, 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, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', '', 0, 0, 0),
(2, 'Rook Sample', 0, 1, 1, 1, 0, 150, 150, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', '', 0, 0, 0),
(3, 'Sorcerer Sample', 0, 1, 1, 1, 1, 150, 150, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', '', 0, 0, 0),
(4, 'Druid Sample', 0, 1, 1, 1, 2, 150, 150, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', '', 0, 0, 0),
(5, 'Paladin Sample', 0, 1, 1, 1, 3, 150, 150, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', '', 0, 0, 0),
(6, 'Knight Sample', 0, 1, 1, 1, 4, 150, 150, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', '', 0, 0, 0);

try to run this SQL. I resintalled my gesior just to add the samples, and checked with your table, name by name, hope i didnt miss any!

PS. The original schema sql does not create the following tables (or columns, idk):
`comment` text NOT NULL,
`create_ip` int(11) NOT NULL DEFAULT '0',
`create_date` int(11) NOT NULL DEFAULT '0',
`hide_char` int(11) NOT NULL DEFAULT '0'
Thats why u could not add it manualy.
 
Last edited:
Tried it and it says something about duplicated. I guess it's because I've already account manager created so I removed his line. Then with this code:

Code:
INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `comment`, `create_ip`, `create_date`, `hide_char`) VALUES
(2, 'Rook Sample', 0, 1, 1, 1, 0, 150, 150, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', '', 0, 0, 0),
(3, 'Sorcerer Sample', 0, 1, 1, 1, 1, 150, 150, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', '', 0, 0, 0),
(4, 'Druid Sample', 0, 1, 1, 1, 2, 150, 150, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', '', 0, 0, 0),
(5, 'Paladin Sample', 0, 1, 1, 1, 3, 150, 150, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', '', 0, 0, 0),
(6, 'Knight Sample', 0, 1, 1, 1, 4, 150, 150, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', '', 0, 0, 0);

I get the following error:

#1436 - Thread stack overrun: 8688 bytes used of a 131072 byte stack, and 128000 bytes needed. Use 'mysqld --thread_stack=#' to specify a bigger stack.

Anyway it seems that with the original schema it would be no problem (I guess I used a bad one?) so where can I download it?

Thanks!
 
idk where to download a original TFS 0.3.6. But as you are going to delete all your database, before that, erase de players table and run this:
Code:
CREATE TABLE `players` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `world_id` tinyint(2) UNSIGNED NOT NULL DEFAULT '0',
  `group_id` int(11) NOT NULL DEFAULT '1',
  `account_id` int(11) NOT NULL DEFAULT '0',
  `level` int(11) NOT NULL DEFAULT '1',
  `vocation` int(11) NOT NULL DEFAULT '0',
  `health` int(11) NOT NULL DEFAULT '150',
  `healthmax` int(11) NOT NULL DEFAULT '150',
  `experience` bigint(20) NOT NULL DEFAULT '0',
  `lookbody` int(11) NOT NULL DEFAULT '0',
  `lookfeet` int(11) NOT NULL DEFAULT '0',
  `lookhead` int(11) NOT NULL DEFAULT '0',
  `looklegs` int(11) NOT NULL DEFAULT '0',
  `looktype` int(11) NOT NULL DEFAULT '136',
  `lookaddons` int(11) NOT NULL DEFAULT '0',
  `maglevel` int(11) NOT NULL DEFAULT '0',
  `mana` int(11) NOT NULL DEFAULT '0',
  `manamax` int(11) NOT NULL DEFAULT '0',
  `manaspent` int(11) NOT NULL DEFAULT '0',
  `soul` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `town_id` int(11) NOT NULL DEFAULT '0',
  `posx` int(11) NOT NULL DEFAULT '0',
  `posy` int(11) NOT NULL DEFAULT '0',
  `posz` int(11) NOT NULL DEFAULT '0',
  `conditions` blob NOT NULL,
  `cap` int(11) NOT NULL DEFAULT '0',
  `sex` int(11) NOT NULL DEFAULT '0',
  `lastlogin` bigint(20) UNSIGNED NOT NULL DEFAULT '0',
  `lastip` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `save` tinyint(1) NOT NULL DEFAULT '1',
  `skull` tinyint(1) UNSIGNED NOT NULL DEFAULT '0',
  `skulltime` int(11) NOT NULL DEFAULT '0',
  `rank_id` int(11) NOT NULL DEFAULT '0',
  `guildnick` varchar(255) NOT NULL DEFAULT '',
  `lastlogout` bigint(20) UNSIGNED NOT NULL DEFAULT '0',
  `blessings` tinyint(2) NOT NULL DEFAULT '0',
  `balance` bigint(20) NOT NULL DEFAULT '0',
  `stamina` bigint(20) NOT NULL DEFAULT '151200000' COMMENT 'stored in miliseconds',
  `direction` int(11) NOT NULL DEFAULT '2',
  `loss_experience` int(11) NOT NULL DEFAULT '100',
  `loss_mana` int(11) NOT NULL DEFAULT '100',
  `loss_skills` int(11) NOT NULL DEFAULT '100',
  `loss_containers` int(11) NOT NULL DEFAULT '100',
  `loss_items` int(11) NOT NULL DEFAULT '100',
  `premend` int(11) NOT NULL DEFAULT '0' COMMENT 'NOT IN USE BY THE SERVER',
  `online` tinyint(1) NOT NULL DEFAULT '0',
  `marriage` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `promotion` int(11) NOT NULL DEFAULT '0',
  `deleted` int(11) NOT NULL DEFAULT '0',
  `description` varchar(255) NOT NULL DEFAULT '',
  `comment` text NOT NULL,
  `create_ip` int(11) NOT NULL DEFAULT '0',
  `create_date` int(11) NOT NULL DEFAULT '0',
  `hide_char` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

and then:

Code:
INSERT INTO `players` (`id`, `name`, `world_id`, `group_id`, `account_id`, `level`, `vocation`, `health`, `healthmax`, `experience`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `lookaddons`, `maglevel`, `mana`, `manamax`, `manaspent`, `soul`, `town_id`, `posx`, `posy`, `posz`, `conditions`, `cap`, `sex`, `lastlogin`, `lastip`, `save`, `skull`, `skulltime`, `rank_id`, `guildnick`, `lastlogout`, `blessings`, `balance`, `stamina`, `direction`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_containers`, `loss_items`, `premend`, `online`, `marriage`, `promotion`, `deleted`, `description`, `comment`, `create_ip`, `create_date`, `hide_char`) VALUES
(1, 'Account Manager', 0, 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, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', '', 0, 0, 0),
(2, 'Rook Sample', 0, 1, 1, 1, 0, 150, 150, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', '', 0, 0, 0),
(3, 'Sorcerer Sample', 0, 1, 1, 1, 1, 150, 150, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', '', 0, 0, 0),
(4, 'Druid Sample', 0, 1, 1, 1, 2, 150, 150, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', '', 0, 0, 0),
(5, 'Paladin Sample', 0, 1, 1, 1, 3, 150, 150, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', '', 0, 0, 0),
(6, 'Knight Sample', 0, 1, 1, 1, 4, 150, 150, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 50, 50, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, '', '', 0, 0, 0);

I found it in another site:
Code:
Although not a solution, but a quick fix could be to increase the thread_stack size by incrementing it in your my.cnf:

thread_stack = 256K
 
Thanks, that "semi" worked. I couldn't drop the players table because it was very important (mother table, or something like that) but renamed it to players2 and created a new one.

Now, I just tried to create a character and when I tried to make a Sorcerer....:

Error occured!
Error ID: Cannot save ItemsList. Player ID not set.
More info:

File: C:\UniServerZ\www\classes/itemslist.php Line: 67
File: C:\UniServerZ\www\classes/player.php Line: 87
File: C:\UniServerZ\www\pages/accountmanagement.php Line: 792
File: C:\UniServerZ\www\system/load.page.php Line: 7
File: C:\UniServerZ\www/index.php Line: 37

I don't know what's happening since I just downloaded the 0.3.6 branch of gesior and installed it... Could it be bugged? If I try to search characters I also got error. Just took and installed gesior branch.
 
I really dont know what to do now. I should recomend you to erase all your database, create it again, and use a new schema. I think the schema from TFS 0.4 is the same, i have this one, from TFS 0.4 rev 3777. Select all, copy and paste to a file called anything.sql, import to your new database, and then reinstall your gesior. Im sorry

Code:
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 `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(2) 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 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,
    `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,
    `balance` BIGINT NOT NULL DEFAULT 0,
    `stamina` BIGINT 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, 50, 50, 7, '', 400, 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(2) 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` INT UNSIGNED 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(2) 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 `house_auctions`
(
    `house_id` INT UNSIGNED NOT NULL,
    `world_id` TINYINT(2) 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(2) 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(2) 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(2) 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(2) 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(2) 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` INT UNSIGNED NOT NULL,
    `world_id` TINYINT(2) 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', 26);

CREATE TABLE `server_motd`
(
    `id` INT UNSIGNED NOT NULL,
    `world_id` TINYINT(2) 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(2) 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(2) 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 ;
 
Well gave it a fast try and the db worked 100%. I just created the name of db and put that sql code. The db was created successfully.

Tried to reinstall it and yeah exactly as the other one it doesn't create the samples, however, it creates the other columns (unless 3 that already exists). If I try to create a character...:

The Following Errors Have Occurred:
  • Wrong characters configuration. Try again or contact with admin. ADMIN: Edit file config/config.php and set valid characters to copy names. Character to copy Knight Sample doesn't exist.


Could be the problem in my config.lua?? The instalation asks me where is located although I think is just php problem... but gesior would have fixed it so the problem has to me mine :S
 
I really dont know, i used to remove all the comments from the config.lua (the lines started with -- ), thats all i remember when i used old tfs versions.
 
Back
Top