Nottinghster
Tibia World RPG Developer
- Joined
- Oct 24, 2007
- Messages
- 1,575
- Solutions
- 6
- Reaction score
- 438
- Location
- Brazil - Rio de Janeiro
- GitHub
- Nottinghster
Credits: Ferrus
Here it is, latest revision (3570+) of otserv development branch Avesta for 7.6 protocol. I hardly can say it's click and run server, even though I consider this server to be better then most of distros released here, including servers with protocols up to 8.2x. Mainly I just made sure you can login and do most things without crashing server/getting debugged.
I bet you wonder now what is so superior about this server, eh?
Download Avesta
Here is the link for Dev-Cpp Project file + binary and source.
source.zip
My Database:
Here it is, latest revision (3570+) of otserv development branch Avesta for 7.6 protocol. I hardly can say it's click and run server, even though I consider this server to be better then most of distros released here, including servers with protocols up to 8.2x. Mainly I just made sure you can login and do most things without crashing server/getting debugged.
I bet you wonder now what is so superior about this server, eh?
- Revnetsys
- Redesigned IO model using asynchronous sockets
- Revbattlesys
- New Formula of Armor/Defense
- Weapons configurable in XML and Lua
- Wands, Rods, Burst Arrows and Poison Arrows
- Drunk and Paralyze System
- Creatures can move diagonally
- New Lua Interface (Actions, NPCs)
- Big Changes in Spells
- New Decay System
- Rings and Amulets
- New Monster AI
- Vocations configurable in XML
- Players can summon monsters (utevo res)
- Check if the player knows the spell
- Soul Points
- Last Writer of letters
- Revdbsys
- XML as database removed
- Code cleaned up
- Flexible interface for database drivers
- Transparent database drivers
- Speed up
- Much less memory used (even 1000 times less for database queries!)
- Code optimization
- GCC 4.2 compatibility
- Skull System
- Party System
- Bed System
- Save System
- Clean System
- Rule Violations Report system [ctrl + r]
- Bug report system [ctrl + z]
- Violation window system [ctrl + y]
- Mute System
- Walk to item
- Push, death, walk delays
- Magic effect displayed on air
- Wildcard~ for spells with params
- Bursts missing target
- many many more....
Download Avesta
Here is the link for Dev-Cpp Project file + binary and source.
source.zip
My Database:
Code:
CREATE TABLE `groups` (
`id` INT UNSIGNED 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', 547104989176, 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 UNSIGNED NOT NULL AUTO_INCREMENT,
`password` VARCHAR(255) NOT NULL,
`email` VARCHAR(255) NOT NULL DEFAULT '',
`premend` INT UNSIGNED NOT NULL DEFAULT 0,
`blocked` TINYINT(1) NOT NULL DEFAULT FALSE,
`deleted` TINYINT(1) NOT NULL DEFAULT FALSE,
`warned` TINYINT(1) NOT NULL DEFAULT FALSE,
PRIMARY KEY (`id`)
) ENGINE = InnoDB;
INSERT INTO `accounts` VALUES (1, '1', 0, 0, 0, 0, 0);
INSERT INTO `accounts` VALUES (2, '2', 0, 0, 0, 0, 0);
CREATE TABLE `players` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`account_id` INT UNSIGNED NOT NULL,
`group_id` INT UNSIGNED NOT NULL COMMENT 'users group',
`sex` INT UNSIGNED NOT NULL DEFAULT 0,
`vocation` INT UNSIGNED NOT NULL DEFAULT 0,
`experience` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`level` INT UNSIGNED NOT NULL DEFAULT 1,
`maglevel` INT UNSIGNED NOT NULL DEFAULT 0,
`health` INT UNSIGNED NOT NULL DEFAULT 100,
`healthmax` INT UNSIGNED NOT NULL DEFAULT 100,
`mana` INT UNSIGNED NOT NULL DEFAULT 100,
`manamax` INT UNSIGNED NOT NULL DEFAULT 100,
`manaspent` INT UNSIGNED NOT NULL DEFAULT 0,
`soul` INT UNSIGNED NOT NULL DEFAULT 0,
`direction` INT UNSIGNED NOT NULL DEFAULT 0,
`lookbody` INT UNSIGNED NOT NULL DEFAULT 10,
`lookfeet` INT UNSIGNED NOT NULL DEFAULT 10,
`lookhead` INT UNSIGNED NOT NULL DEFAULT 10,
`looklegs` INT UNSIGNED NOT NULL DEFAULT 10,
`looktype` INT UNSIGNED NOT NULL DEFAULT 136,
`posx` INT NOT NULL DEFAULT 0,
`posy` INT NOT NULL DEFAULT 0,
`posz` INT NOT NULL DEFAULT 0,
`cap` INT NOT NULL DEFAULT 0,
`lastlogin` INT UNSIGNED NOT NULL DEFAULT 0,
`lastip` INT UNSIGNED NOT NULL DEFAULT 0,
`save` TINYINT(1) NOT NULL DEFAULT TRUE,
`conditions` BLOB NOT NULL COMMENT 'drunk, poisoned etc (maybe also food and redskull)',
`redskulltime` INT UNSIGNED NOT NULL DEFAULT 0,
`redskull` TINYINT(1) NOT NULL DEFAULT FALSE,
`guildnick` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'additional nick in guild - mostly for web interfaces i think',
`loss_experience` INT NOT NULL DEFAULT 10,
`loss_mana` INT NOT NULL DEFAULT 10,
`loss_skills` INT NOT NULL DEFAULT 10,
`loss_items` INT NOT NULL DEFAULT 10,
`rank_id` INT UNSIGNED NOT NULL COMMENT 'by this field everything with guilds is done - player has a rank which belongs to certain guild',
`town_id` INT NOT NULL COMMENT 'old masterpos, temple spawn point position',
`balance` INT NOT NULL DEFAULT 0 COMMENT 'money balance of the player for houses paying',
PRIMARY KEY (`id`),
UNIQUE (`name`),
FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE,
FOREIGN KEY (`group_id`) REFERENCES `groups` (`id`)
) ENGINE = InnoDB;
INSERT INTO `players` (`id`, `name`, `account_id`, `group_id`, `sex`, `vocation`, `health`, `healthmax`, `mana`, `manamax`, `manaspent`, `soul`, `direction`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `posx`, `posy`, `posz`, `cap`, `lastlogin`, `lastip`, `save`, `conditions`, `redskulltime`, `redskull`, `guildnick`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_items`, `rank_id`, `town_id`, `balance`) VALUES
(1, 'Game Master', 1, 3, 1, 0, 150, 150, 100, 100, 0, 100, 1, 110, 0, 0, 0, 110, 32360, 31782, 7, 300, 0, 0, 0, '', 0, 0, '', 0, 0, 0, 0, 0, 5, 0);
INSERT INTO `players` (`id`, `name`, `account_id`, `group_id`, `sex`, `vocation`, `health`, `healthmax`, `mana`, `manamax`, `manaspent`, `soul`, `direction`, `lookbody`, `lookfeet`, `lookhead`, `looklegs`, `looktype`, `posx`, `posy`, `posz`, `cap`, `lastlogin`, `lastip`, `save`, `conditions`, `redskulltime`, `redskull`, `guildnick`, `loss_experience`, `loss_mana`, `loss_skills`, `loss_items`, `rank_id`, `town_id`, `balance`) VALUES
(2, 'Player', 2, 0, 1, 0, 150, 150, 100, 100, 0, 100, 1, 110, 0, 0, 0, 110, 32360, 31782, 7, 300, 0, 0, 0, '', 0, 0, '', 0, 0, 0, 0, 0, 5, 0);
CREATE TABLE `guilds` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL COMMENT 'guild name - nothing else needed here',
`ownerid` INT NOT NULL,
`creationdata` INT NOT NULL,
PRIMARY KEY (`id`)
) ENGINE = InnoDB;
CREATE TABLE `guild_ranks` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`guild_id` INT UNSIGNED 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 `player_viplist` (
`player_id` INT UNSIGNED NOT NULL COMMENT 'id of player whose viplist entry it is',
`vip_id` INT UNSIGNED 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 `player_spells` (
`player_id` INT UNSIGNED NOT NULL,
`name` VARCHAR(255) NOT NULL,
FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE `server_record` (
`record` INT NOT NULL,
PRIMARY KEY(`record`)
) ENGINE = InnoDB;
INSERT INTO `server_record` VALUES (0);
CREATE TABLE `player_storage` (
`player_id` INT UNSIGNED NOT NULL,
`key` INT NOT NULL,
`value` INT NOT NULL,
FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE `player_skills` (
`player_id` INT UNSIGNED NOT NULL,
`skillid` INT UNSIGNED NOT NULL,
`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_items` (
`player_id` INT UNSIGNED NOT NULL,
`sid` INT NOT NULL,
`pid` INT NOT NULL DEFAULT 0,
`itemtype` INT NOT NULL,
`count` INT NOT NULL DEFAULT 0,
`attributes` BLOB COMMENT 'replaces unique_id, action_id, text, special_desc',
FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE,
UNIQUE (`player_id`, `sid`)
) ENGINE = InnoDB;
CREATE TABLE `houses` (
`id` INT UNSIGNED NOT NULL,
`owner` INT NOT NULL,
`paid` INT UNSIGNED NOT NULL DEFAULT 0,
`warnings` INT NOT NULL DEFAULT 0,
`lastwarning` INT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE = InnoDB;
CREATE TABLE `house_lists` (
`house_id` INT UNSIGNED NOT NULL,
`listid` INT NOT NULL,
`list` TEXT NOT NULL,
FOREIGN KEY (`house_id`) REFERENCES `houses` (`id`) ON DELETE CASCADE
) ENGINE = InnoDB;
CREATE TABLE `bans` (
`id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`type` INT NOT NULL COMMENT 'this field defines if its ip, account, player, or any else ban',
`value` INT UNSIGNED NOT NULL COMMENT 'ip, player guid, account number',
`param` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'mask',
`active` TINYINT(1) NOT NULL DEFAULT TRUE,
`expires` INT UNSIGNED NOT NULL,
`added` INT UNSIGNED NOT NULL,
`admin_id` INT UNSIGNED NOT NULL DEFAULT 0,
`reason` VARCHAR(255) NOT NULL DEFAULT '',
`comment` VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY (`type`, `value`),
KEY (`expires`)
) ENGINE = InnoDB;
CREATE TABLE `tiles` (
`id` INT UNSIGNED NOT NULL,
`x` INT NOT NULL,
`y` INT NOT NULL,
`z` INT NOT NULL,
PRIMARY KEY(`id`)
) ENGINE = InnoDB;
CREATE TABLE `tile_items` (
`tile_id` INT UNSIGNED 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
) ENGINE = InnoDB;
CREATE TABLE `player_depotitems` (
`player_id` INT UNSIGNED 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,
INDEX (`player_id`, `depot_id`),
UNIQUE (`player_id`, `sid`)
) ENGINE = InnoDB;
CREATE TABLE `global_storage` (
`key` INT UNSIGNED NOT NULL,
`value` INT NOT NULL,
PRIMARY KEY(`key`)
) ENGINE = InnoDB;
DELIMITER |
CREATE TRIGGER `ondelete_accounts`
BEFORE DELETE
ON `accounts`
FOR EACH ROW
BEGIN
DELETE FROM `bans` WHERE `type` = 3 AND `value` = 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`);
DELETE 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 `value` = 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 ('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 `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 ;
Last edited: