Ir para conteúdo

warotserv

Membro
  • Registro em

  • Última visita

Tudo que warotserv postou

  1. Nome: FCTF (Ou o que você escolher Versão: 8.60 Banco de Dados: MySQL Créditos: À quem fez o Warots (por ter sido apenas a base). - não quero créditos pelo o que eu fiz. _______________________________________________________________________________________ Qual a diferença do FCTF para o CTF? O FCTF, ao contrário do CTF, é flexível em relação à quantidade de times. Posso configurar alguma coisa nesse ot? Sim. Onde posso configurar? Em "mods/ctf.xml". O que posso configurar? Segue abaixo, comentado. -- initial level INITIAL_LEVEL = 450 __________________________________________________________________ -- initial items sorcereritems = { 2520, -- demon shield 2187, -- wand of inferno 8871, -- blue robe 7730, -- blue legs 2323, -- magician hat 2195 -- boots of haste } druiditems = { 2520, -- demon shield 2183, -- hailstorm rod 8871, -- blue robe 7730, -- blue legs 2323, -- magician hat 2195 -- boots of haste } paladinitems = { 2520, -- demon shield 7368, -- assassin star 2492, -- golden armor 7730, -- golden legs 2498, -- golden helme 2195 -- boots of haste } knightitems = { 2520, -- demon shield 2421, -- thunder hammer 2492, -- golden armor 7730, -- golden legs 2498, -- golden helmet 2195 -- boots of haste } __________________________________________________________________ SCORE_BY_DELIVER = 5 -- when a team delivers an opponent flag SCORE_LOSS_BY_HAVE_FLAG_DELIVERED = 2 -- when a team has it flags delivered by an opponent team __________________________________________________________________ -- by default, the map will change after 900 SECONDS TIME_TO_CHANGE_MAP = 900 -- 15 minutes __________________________________________________________________ -- at each map, which teams will participate? teamsPerMap = { [MAP_1] = {[0] = TEAM_1, [1] = TEAM_2}, [MAP_2] = {[0] = TEAM_1, [1] = TEAM_2}, [MAP_3] = {[0] = TEAM_1, [1] = TEAM_2}, [MAP_4] = {[0] = TEAM_1, [1] = TEAM_2, [2] = TEAM_3, [3] = TEAM_4}, [MAP_5] = {[0] = TEAM_1, [1] = TEAM_2, [2] = TEAM_3, [3] = TEAM_4}, [MAP_6] = {[0] = TEAM_1, [1] = TEAM_2, [2] = TEAM_3, [3] = TEAM_4} } __________________________________________________________________ -- name of teams teamName = { [TEAM_1] = "A", [TEAM_2] = "B", [TEAM_3] = "C", [TEAM_4] = "D" } __________________________________________________________________ -- id of flags flagItem = { [TEAM_1] = 1860, -- green [TEAM_2] = 1863, -- yellow [TEAM_3] = 1872, -- blue [TEAM_4] = 1880 -- white } __________________________________________________________________ -- DO NOT CHANGE IF YOU DON'T KNOW WHAT ARE YOU DOING! flagUID = { [TEAM_1] = 50000, [TEAM_2] = 50001, [TEAM_3] = 50002, [TEAM_4] = 50003 } __________________________________________________________________ -- DO NOT CHANGE IF YOU DON'T KNOW WHAT ARE YOU DOING! flagCoverUID = { [TEAM_1] = 50020, [TEAM_2] = 50021, [TEAM_3] = 50022, [TEAM_4] = 50023 } __________________________________________________________________ -- flag positions per MAP flagPosition = { [MAP_1] = { [TEAM_1] = {x = 289, y = 514, z = 4}, [TEAM_2] = {x = 404, y = 513, z = 4} }, [MAP_2] = { [TEAM_1] = {x = 267, y = 329, z = 4}, [TEAM_2] = {x = 333, y = 329, z = 4} }, [MAP_3] = { [TEAM_1] = {x = 241, y = 100, z = 6}, [TEAM_2] = {x = 307, y = 101, z = 6} }, [MAP_4] = { [TEAM_1] = {x = 88, y = 134, z = 5}, [TEAM_2] = {x = 125, y = 174, z = 6}, [TEAM_3] = {x = 151, y = 139, z = 5}, [TEAM_4] = {x = 123, y = 115, z = 5} }, [MAP_5] = { [TEAM_1] = {x = 106, y = 315, z = 6}, [TEAM_2] = {x = 162, y = 382, z = 6}, [TEAM_3] = {x = 215, y = 325, z = 6}, [TEAM_4] = {x = 163, y = 287, z = 6} }, [MAP_6] = { [TEAM_1] = {x = 102, y = 538, z = 7}, [TEAM_2] = {x = 182, y = 534, z = 7}, [TEAM_3] = {x = 181, y = 467, z = 7}, [TEAM_4] = {x = 99, y = 465, z = 7} } } __________________________________________________________________ -- outfit of teams teamLook = { [TEAM_1] = { [V_S] = {lookType = 130, lookHead = 81, lookBody = 81, lookLegs = 81, lookFeet = 81, lookTypeEx = 0, lookAddons = 3}, [V_D] = {lookType = 144, lookHead = 81, lookBody = 81, lookLegs = 81, lookFeet = 81, lookTypeEx = 0, lookAddons = 3}, [V_P] = {lookType = 129, lookHead = 81, lookBody = 81, lookLegs = 81, lookFeet = 81, lookTypeEx = 0, lookAddons = 3}, [V_K] = {lookType = 131, lookHead = 81, lookBody = 81, lookLegs = 81, lookFeet = 81, lookTypeEx = 0, lookAddons = 3} }, [TEAM_2] = { [V_S] = {lookType = 130, lookHead = 79, lookBody = 79, lookLegs = 79, lookFeet = 79, lookTypeEx = 0, lookAddons = 3}, [V_D] = {lookType = 144, lookHead = 79, lookBody = 79, lookLegs = 79, lookFeet = 79, lookTypeEx = 0, lookAddons = 3}, [V_P] = {lookType = 129, lookHead = 79, lookBody = 79, lookLegs = 79, lookFeet = 79, lookTypeEx = 0, lookAddons = 3}, [V_K] = {lookType = 131, lookHead = 79, lookBody = 79, lookLegs = 79, lookFeet = 79, lookTypeEx = 0, lookAddons = 3} }, [TEAM_3] = { [V_S] = {lookType = 130, lookHead = 88, lookBody = 88, lookLegs = 88, lookFeet = 88, lookTypeEx = 0, lookAddons = 3}, [V_D] = {lookType = 144, lookHead = 88, lookBody = 88, lookLegs = 88, lookFeet = 88, lookTypeEx = 0, lookAddons = 3}, [V_P] = {lookType = 129, lookHead = 88, lookBody = 88, lookLegs = 88, lookFeet = 88, lookTypeEx = 0, lookAddons = 3}, [V_K] = {lookType = 131, lookHead = 88, lookBody = 88, lookLegs = 88, lookFeet = 88, lookTypeEx = 0, lookAddons = 3} }, [TEAM_4] = { [V_S] = {lookType = 130, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}, [V_D] = {lookType = 144, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}, [V_P] = {lookType = 129, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3}, [V_K] = {lookType = 131, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 3} } } __________________________________________________________________ -- teams spawns points per map spawnPoints = { [MAP_1] = { [TEAM_1] = {x = 288, y = 521, z = 6}, [TEAM_2] = {x = 400, y = 515, z = 6} }, [MAP_2] = { [TEAM_1] = {x = 267, y = 329, z = 3}, [TEAM_2] = {x = 333, y = 329, z = 3} }, [MAP_3] = { [TEAM_1] = {x = 242, y = 100, z = 7}, [TEAM_2] = {x = 306, y = 101, z = 7} }, [MAP_4] = { [TEAM_1] = {x = 82, y = 137, z = 6}, [TEAM_2] = {x = 125, y = 170, z = 5}, [TEAM_3] = {x = 138, y = 137, z = 4}, [TEAM_4] = {x = 117, y = 118, z = 6} }, [MAP_5] = { [TEAM_1] = {x = 103, y = 322, z = 7}, [TEAM_2] = {x = 155, y = 384, z = 7}, [TEAM_3] = {x = 217, y = 332, z = 7}, [TEAM_4] = {x = 170, y = 285, z = 7} }, [MAP_6] = { [TEAM_1] = {x = 141, y = 505, z = 7}, [TEAM_2] = {x = 147, y = 505, z = 7}, [TEAM_3] = {x = 147, y = 499, z = 7}, [TEAM_4] = {x = 141, y = 499, z = 7} } } __________________________________________________________________ -- sorcerer initial skills V_S_SKILLS = { ML = '118', SHIELDING = '50' } __________________________________________________________________ -- druid initial skills V_D_SKILLS = { ML = '118', SHIELDING = '50' } __________________________________________________________________ -- paladin initial skills V_P_SKILLS = { ML = '30', DISTANCE = '136', SHIELDING = '125' } __________________________________________________________________ -- knight initial skills V_K_SKILLS = { ML = '10', CLUB = '125', SWORD = '125', AXE = '125', SHIELDING = '125' } Onde posso fazer o download do servidor? Em: http://www.4shared.com/zip/lITbrSUj/CTF.html Onde posso visualizar o scan do arquivo? Em: https://www.virustotal.com/pt/file/256a6bb1db2d6ce3fbe27faf88a9e1c4a11f4c66f006bf547b7f7eaa32159139/analysis/1380406216/ Até.
  2. De nada. Precisando de ajuda, é só pedir.
  3. Se eu não me engano, unit_16 é um unsigned integer de 16 bits, cujos valores variam de 0 a 65535. tente trocar para uint_32 ou uint_64.
  4. Nunca vi a source do cliente, mas provavelmente no trecho de código que mostra a quantidade de hp/mana que o player tem deve ter um "%65.400"
  5. Na verdade ele fica com "slots extras" de hp/mana. Está tudo normal Creio que para mostrar a quantidade correta de mana/hp somente mexendo no client.
  6. Segue o link, http://dev.mysql.com/downloads/installer/5.6.html
  7. Pelo Workbench?
  8. Você está usando MySQL? Se sim, dê um drop schema na sua DB, crie uma nova e execute o sql completo que eu lhe passe pelo MySQL Workbench.
  9. Dã pra saber o erro por esse log que vocë postou: "Table 'ot.bans' doesn't exist" O seu banco de dados está sem a tabela "bans" e sem a tabela "player_depotitems". Veja se ajuda: 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 `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; Triggers: 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 `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 SQL COMPLETO: 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 ; ALTER TABLE `players` ADD `points` INT ( 32 ) NOT NULL DEFAULT 0; ALTER TABLE `players` ADD `deaths` INT ( 32 ) NOT NULL DEFAULT 0;
  10. Boa tarde Legnus. Aprenda sozinho, não é difícil. Comecei a mexer com LUA semana passada e já desenvolvi muita coisa interessante, inclusive um otserv CTF. O que você precisa fazer é ver o script de outras pessoas e tentar entendê-los, testá-los e claro, usar o Google. Até.
  11. Estão grandes, mas aqui vai um resumo: "a.lua" tab = { [0] = {}, [1] = {}, [2] = {} } insertInTab(i,j,val) tab[i][j] = val end "b.lua" onLogin (cid) insertInTab(0,cid,true) end
  12. tipo, eu tenho uma tabela de tabelas em "a.lua". em "b.lua" eu chamo uma função de "a.lua" que modifica o valor de uma posição da tabela de "a.lua". Mas quando vou verificar em "a.lua" se o valor foi modificado, tenho resposta negativa, continua o mesmo valor =/ (porém, quando verifico através de "b.lua", a tabela foi alterada com sucesso)
  13. Ceritifique-se se o seu modem esteja trabalhando em modo bridge.
  14. Boa noite, pessoal! Estou tendo um problema de atualização de valores. Vou explicar. Eu tenho uma arquivo "a.lua" na pasta \lib que contém a variável var_x = 10 (percebam, uma vez que ela não tem o local, ela é global). Porém, quando um outro arquivo, exemplo "b.lua", modifica essa variável, modifica apenas para ele, continuando para "a.lua" com o valor 10. Como faço para arrumar isso? Muito obrigado.
  15. warotserv postou uma resposta no tópico em Suporte Tibia OTServer
    Se não me engano, quando você muda o worldid para 1, ele já faz isso automaticamente.
  16. Olá, Rodrigo! Muito obrigado pela ajuda. Funcionou direitinho! "Você já atingiu seu limite de reputações positivas para hoje" assim que eu puder, lhe dou a rep++
  17. Tentei também, e não deu =/
  18. Deve ter algum meio de burlar isso, igual acontece com o acc manager, hehehe
  19. Estou rezando para não ter de mexer nas sources. Por que todo server que eu compilo aqui,na hora de abrir o executável dá erro. Mas obrigado!
  20. Daaniel, o comando dessa linha permite que entre em personagens diferentes da conta, eu preciso que possa entrar no mesmo, hehehe.
  21. warotserv postou uma resposta no tópico em Suporte Tibia OTServer
    Olá, joellg. Tente mudar apenas o worldId.
  22. Olá Daaniel, eu já tinha tentado procurar nos scripts, mas não obtive sucesso. Seria este o script do Account Manager ("login.lua") ? Em relação a direction, coloquei direction 0 (MySql), porém continua não podendo entrar no mesmo char. Obrigado.
  23. Boa tarde, peassoal. Alguém sabe como eu posso fazer para que mais de uma pessoas logue em um mesmo char ao mesmo tempo (como se fosse o account manager)? Obrigado.
  24. Este sistema faz com que o server seja divido em 2 times, o time vermelho e o time azul. em "data\creaturescripts\scripts" crie um arquivo chamado "pvpTeam.lua" e cole o seguinte código redTeamSpawn = { x = 218, y = 172, z = 7} -- red team spawn position blueTeamSpawn = { x = 218, y = 170, z = 7} -- blue team spawn position redTeamParticipants = {} blueTeamParticipants = {} function teamLength(team) -- return the number of players in team local count = 0 for _ in pairs(team) do count = count + 1 end return count end function playerJoin(cid) -- try to join player in event if ableToJoin(cid) then redTeamParticipantsLength = teamLength(redTeamParticipants) blueTeamParticipantsLength = teamLength(blueTeamParticipants) if redTeamParticipantsLength <= blueTeamParticipantsLength then redTeamParticipants[cid] = true doPlayerSendTextMessage(cid,22,"Voce foi escolhido para ser do time vermelho.") doTeleportThing(cid, redTeamSpawn) else blueTeamParticipants[cid] = true doPlayerSendTextMessage(cid,22,"Voce foi escolhido para ser do time azul.") doTeleportThing(cid, blueTeamSpawn) end return TRUE else return FALSE end end function playerRemove(cid) -- remove player from event (if its participating) if isParticipating(cid) then if redTeamParticipants[cid] == true then redTeamParticipants[cid] = nil else blueTeamParticipants[cid] = nil end return TRUE else return FALSE end end function isParticipating (cid) -- verify if player is participating of the event if blueTeamParticipants[cid] == true or redTeamParticipants[cid] == true then return TRUE else return FALSE end end function ableToJoin (cid) -- checks if players are able to join if isPlayer(cid) and not isParticipating(cid) then return TRUE else return FALSE end end function arePlayersOfSameTeam (cid1, cid2) -- checks if the players are of the same team if ((blueTeamParticipants[cid1] == true and blueTeamParticipants[cid2] == true) or (redTeamParticipants[cid1] and redTeamParticipants[cid2])) then return TRUE else return FALSE end end function onLogin(cid) -- checks if it's really a player and if it's only if isPlayer(cid) then if isParticipating(cid) == true then return FALSE -- Ooops! If the script reachs here, we gotta verify what's going wrong else if playerJoin(cid) == true then return TRUE -- everything gone as expected else return FALSE -- Ooops! If the script reachs here, we gotta verify what's going wrong end end else return TRUE end end function onLogout(cid) -- this function is essential to not unbalance the teams if isParticipating (cid) then return playerRemove(cid) end return TRUE end function onAttack(cid, attacker) -- verify if both are players if not isPlayer(cid) or not isPlayer(attacker) then return TRUE end -- are those players participating of the event? if not isParticipating(cid) or not isParticipating (attacker) then return TRUE end if arePlayersOfSameTeam(cid, attacker) then -- a player of the same team cannot attack the other!! return FALSE else return TRUE end end function onStatsChange(cid, attacker, t, combat, value) -- verify if both are players if not isPlayer(cid) or not isPlayer(attacker) then return TRUE end -- verify if both are participating of PVP if isParticipating(cid) and isParticipating(attacker) then -- both are participating of event -- verify if both are of the same team if arePlayersOfSameTeam(cid, attacker) then -- they're of the same team. Only heals are acceptable if t == STATSCHANGE_HEALTHGAIN or t == STATSCHANGE_MANAGAIN then return TRUE else return FALSE end else -- they're not of the same team. Only damages are acceptable if t == STATSCHANGE_HEALTHGAIN or t == STATSCHANGE_MANAGAIN then return FALSE else return TRUE end end else -- one or both are not participating of event return TRUE end -- getting local player1Team = monstersTeam[getCreatureName(cid)] -- return if it has no team if player1Team == nil then return TRUE end -- getting monster that is attacking team local monster2Team = monstersTeam[getCreatureName(attacker)] -- return if it has no team if monster2Team == nil then return TRUE end -- check if they're of the same team if monster1Team == monster2Team then -- if they're of the same team, returning false will not allow the damage to be done to its partner return FALSE else return TRUE end return TRUE end agora, em "creaturescripts.xml" adicione o seguinte <event type="attack" name="PvpTeam1" event="script" value="pvpTeam.lua"/> <event type="statschange" name="PvpTeam2" event="script" value="pvpTeam.lua"/> <event type="login" name="PvpTeam3" event="script" value="pvpTeam.lua"/> <event type="logout" name="PvpTeam4" event="script" value="pvpTeam.lua"/> depois, no arquivo "login.lua" que se encontra em "data\creaturescripts\scripts" adicione registerCreatureEvent(cid, "PvpTeam1") registerCreatureEvent(cid, "PvpTeam2") registerCreatureEvent(cid, "PvpTeam3") registerCreatureEvent(cid, "PvpTeam4") Bom, é isso. Espero ter ajudado. P.S.: Não me importo que roubem meus créditos e/ou postem em outros fórums.

Informação Importante

Confirmação de Termo