Ir para conteúdo

mullino

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    mullino deu reputação a FeeTads em AutoLoot Sources pra Otx2 (modificando o script do naze)   
    esse não me engano funciona em tfs 0.x e OTX 2.x, em TFS 1.x, creio que eh usado o sistema de quick loot veja aqui.
    creio que esse autoloot funciona em qualquer TFS tbm, só testar, eh o mesmo do naze.
  2. Obrigado
    mullino deu reputação a FeeTads em AutoLoot Sources pra Otx2 (modificando o script do naze)   
    salve rapaziada, do TK, esses tempos eu tava a procura de um autoloot bom e eficiente, e como vocês devem saber, o autoloot usado nos scripts .lua são bem "pesados"
    o @Naze fez um excelentíssimo trabalho e disponibilizou um script de autoloot na source, porém como a vida é dificil, ele tem alguns bugs de função e um deles é no 
    "remove autoloot" que quando o player digita "!autoloot remove, nome-do-item" nada acontece, eu decidi mexer e vim disponibilizar arrumado pra vcs.
    LEMBRANDO QUE 100% DOS CRÉDITOS SÃO AO @Naze porém se vc procurar no tópico dele ainda vai estar bugado, então resolvi deixar aqui certinho pra ajudar quem precisar.


    Link do tópico do naze: https://tibiaking.com/forums/topic/101086-otimizado-autoloot-in-sources-for-otx2-ou-menor/
     

    caso alguém ja utilize esse autoloot e esteja com o problema de remover items do autoloot
    só ir em player.cpp e trocar

    isso:
     
    void Player::removeAutoLoot(uint16_t id) { if(checkAutoLoot(id)) { return; } AutoLoot.remove(id); }
    por isso:
    void Player::removeAutoLoot(uint16_t id) { if(!checkAutoLoot(id)) return; for(std::list<uint16_t>::iterator it = AutoLoot.begin(); it != AutoLoot.end(); ++it) { if((*it) == id) { AutoLoot.erase(it); break; } } }
    todos os créditos ao Naze, não sei se alguém mais fez esse código, mas como peguei do link citado acima que é post dele deixo aqui o autoloot 100% funcional direto nas sources
  3. Gostei
    mullino deu reputação a FeeTads em AutoLoot Sources pra Otx2 (modificando o script do naze)   
    acho que funciona sim, tenta procurar as funções, ve se são parecidas, n custa tentar kkkkkk, mas creio que funciona sim.
  4. Obrigado
    mullino deu reputação a FeeTads em Otimizado: AutoLoot in Sources for Otx(2 ou menor)   
    arrumei em um script aki no TK mesmo
  5. Gostei
    mullino deu reputação a carloos em (Resolvido)Alguem me ajuda com esse erro no potions   
    usa esse:
     
  6. Gostei
    mullino deu reputação a FeeTads em (Resolvido)item que da dano adicional a arma equipada   
    ja fiz essa function uma vez, se não me engano foi pra um post seu, cuidado com post duplicado!

    NECESSÁRIO mudar o numero do "itemDeDano" pro id do seu item
     
    function isWeapon(uid) -- By Killua return getItemWeaponType(uid) ~= 0 end local itemDeDano = 1522 -- ID do item que irá no slot function onStatsChange(cid, attacker, type, combat, value) if not isPlayer(cid) then return false end if (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) and (combat ~= COMBAT_HEALING and value > 0) then local itemEquipado = getPlayerSlotItem(cid, CONST_SLOT_AMMO).itemid -- pega o ID do ring no slot local armaEquipadaEsquerda = getPlayerSlotItem(cid, CONST_SLOT_LEFT).uid -- pega uid doq ta na mão esquerda local armaEquipadaDireita = getPlayerSlotItem(cid, CONST_SLOT_RIGHT).uid -- pega uid doq ta na mão direita if isWeapon(armaEquipadaEsquerda) or isWeapon(armaEquipadaDireita) then -- se tiver arma na mão direita ou esquerda if itemEquipado and itemEquipado == itemDeDano then -- se tiver ring equipado E o ring for o escolhido local dano = value*0.5 -- 0.5 = 50% a mais de dano, 1 = 100% a mais.... local target = getCreatureTarget(cid) doTargetCombatHealth(cid, target, combat, -dano, -dano, 255) -- função de dar dano end end end return true end  
  7. Gostei
    mullino recebeu reputação de Raizen em [OTX 12.64] Baiak Styller   
    chamei la
     
  8. Curtir
    mullino deu reputação a FeeTads em (Resolvido)effect com storage   
    o efeito tem que ser colocado em creatureScripts

    creaturescripts = coisas que acontecem nos players
    globalEvents = coisas que acontecem no OT em GERAL

    então:
    data > creaturescripts > scripts > effectStorage.lua
     
    function sendVipEffect(cid) if not isCreature(cid) then return true end if getPlayerStorageValue(cid, 19332) > 0 then doSendMagicEffect(getThingPos(cid), 66) addEvent(sendVipEffect, 200, cid) end end function onLogin(cid) sendVipEffect(cid) return true end  
  9. Curtir
    mullino deu reputação a FeeTads em Item que ao ser equipado da dano a uma arma.   
    acho que esse erro ai é de outro script, não foi mexido nada nele.

     
     

     
    function isWeapon(uid) -- By Killua return getItemWeaponType(uid) ~= 0 end local itemDeDano = 1522 -- ID do item que irá no slot function onStatsChange(cid, attacker, type, combat, value) if not isPlayer(cid) then return false end if (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) and (combat ~= COMBAT_HEALING and value > 0) then local itemEquipado = getPlayerSlotItem(cid, CONST_SLOT_AMMO).itemid -- pega o ID do ring no slot local armaEquipadaEsquerda = getPlayerSlotItem(cid, CONST_SLOT_LEFT).uid -- pega uid doq ta na mão esquerda local armaEquipadaDireita = getPlayerSlotItem(cid, CONST_SLOT_RIGHT).uid -- pega uid doq ta na mão direita if isWeapon(armaEquipadaEsquerda) or isWeapon(armaEquipadaDireita) then -- se tiver arma na mão direita ou esquerda if itemEquipado and itemEquipado == ringDeDano then -- se tiver ring equipado E o ring for o escolhido local dano = value*0.5 -- 0.5 = 50% a mais de dano, 1 = 100% a mais.... local target = getCreatureTarget(cid) doTargetCombatHealth(cid, target, combat, -dano, -dano, 255) -- função de dar dano end end end return true end  
  10. Curtir
    mullino deu reputação a FeeTads em Item que ao ser equipado da dano a uma arma.   
    ai regista no XML
     
    <event type="statschange" name="RingMaisDano" event="script" value="NOME-DO-SCRIPT.lua"/>
    E registrar ele la no login.lua
    registerCreatureEvent(cid, "RingMaisDano")  
    creatureScripts
     
  11. Obrigado
    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_statements`; 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 UNSIGNED 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, 853, 921, 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, `description` VARCHAR( 128 ) NOT NULL, `icon` INT( 11 ) UNSIGNED NOT NULL, `notify` BOOLEAN 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, `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, `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_statements` ( `id` INT NOT NULL AUTO_INCREMENT, `player_id` INT NOT NULL, `channel_id` INT NOT NULL DEFAULT 0, `text` VARCHAR (255) NOT NULL, `date` BIGINT NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY (`player_id`), KEY (`channel_id`), FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB; CREATE TABLE `player_skills` ( `player_id` INT NOT NULL, `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, `key` VARCHAR(32) NOT NULL DEFAULT '0', `value` TEXT NOT NULL, 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, `description` VARCHAR( 128 ) NOT NULL, `icon` INT( 11 ) UNSIGNED NOT NULL, `notify` BOOLEAN 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, `war` INT NOT NULL DEFAULT 0, 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, `balance` BIGINT UNSIGNED NOT NULL DEFAULT 0, 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 `guild_wars` ( `id` INT NOT NULL AUTO_INCREMENT, `guild_id` INT NOT NULL, `enemy_id` INT NOT NULL, `begin` BIGINT NOT NULL DEFAULT 0, `end` BIGINT NOT NULL DEFAULT 0, `frags` INT UNSIGNED NOT NULL DEFAULT 0, `payment` BIGINT UNSIGNED NOT NULL DEFAULT 0, `guild_kills` INT UNSIGNED NOT NULL DEFAULT 0, `enemy_kills` INT UNSIGNED NOT NULL DEFAULT 0, `status` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id`), KEY `status` (`status`), KEY `guild_id` (`guild_id`), KEY `enemy_id` (`enemy_id`), FOREIGN KEY (`guild_id`) REFERENCES `guilds`(`id`) ON DELETE CASCADE, FOREIGN KEY (`enemy_id`) REFERENCES `guilds`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB; CREATE TABLE `guild_kills` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `guild_id` INT NOT NULL, `war_id` INT NOT NULL, `death_id` INT NOT NULL, FOREIGN KEY (`guild_id`) REFERENCES `guilds`(`id`) ON DELETE CASCADE, FOREIGN KEY (`war_id`) REFERENCES `guild_wars`(`id`) ON DELETE CASCADE, FOREIGN KEY (`death_id`) REFERENCES `player_deaths`(`id`) ON DELETE CASCADE ) ENGINE = InnoDB; CREATE TABLE `bans` ( `id` INT UNSIGNED NOT NULL auto_increment, `type` TINYINT(1) NOT NULL COMMENT '1 - ip, 2 - player, 3 - account, 4 - notation', `value` INT UNSIGNED NOT NULL COMMENT 'ip - ip address, player - player_id, account - account_id, notation - account_id', `param` INT UNSIGNED NOT NULL COMMENT 'ip - mask, player - type (1 - report, 2 - lock, 3 - ban), account - player, notation - player', `active` TINYINT(1) NOT NULL DEFAULT TRUE, `expires` INT NOT NULL DEFAULT -1, `added` INT UNSIGNED NOT NULL, `admin_id` INT UNSIGNED NOT NULL DEFAULT 0, `comment` TEXT NOT NULL, 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` TEXT NOT NULL, 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 ; salva como notpad++ e nome db limpa e importa para o banco de dados
  12. Obrigado
    mullino deu reputação a El Capitchi em (Resolvido)Ajuda Com O PHPMYADMIN   
    Você está com o XAMPP aberto ? E se estiver quais funções estão ativas.
  13. Gostei
    mullino deu reputação a FeeTads em (Resolvido)menssagem no defalt e nao no server log   
    sua source nao deve ter a função de mandar no default então, vai ter que fazer isso de outra forma
     Tenta assim:
     
    local config = { storage = 19400, -- storage em que será salvo o tempo cor = "red", -- de acordo com o constant.lua da lib tempo = 3, -- em minutos price = 20000, -- quantidade de dinheiro que irá custar level = 10 -- level pra poder utilizar o broadcast } function onSay(cid, words, param) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end if getPlayerLevel(cid) >= config.level then if getPlayerStorageValue(cid, config.storage) - os.time() <= 0 then if doPlayerRemoveMoney(cid, config.price) then setPlayerStorageValue(cid, config.storage, os.time() + (config.tempo*10)) local pid = getPlayersOnline() for i=1, #pid do doPlayerSendTextMessage(pid[i], MESSAGE_STATUS_CONSOLE_RED, "[/all]: ["..getCreatureName(cid).."]: "..param.."") end else doPlayerSendCancel(cid, "You don't have " ..config.price.. " gp's for broadcasting.") return true end else doPlayerSendCancel(cid, "You have to wait " ..(getPlayerStorageValue(cid, config.storage) - os.time()).. " seconds until you can broadcast again.") return true end else doPlayerSendCancel(cid, "You have to be level " ..config.level.. " or more in order to use broadcast.") end return true end  
  14. Gostei
    mullino deu reputação a King Laker em (Resolvido)menssagem no defalt e nao no server log   
    Boa noite, eu tenho um script similar ao que você precisa no meu servidor.

    <talkaction log="yes" words="/all" event="script" value="nome do script.lua"/>


     
    local config = { storage = 19400, -- storage em que sera salvo o tempo cor = "green", -- de acordo com o constant.lua da sua lib tempo = 10, -- em minutos price = 200000, -- quantidade de dinheiro que ira custar level = 700 -- level pra poder utilizar o broadcast } function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end if getPlayerLevel(cid) >= config.level then if getPlayerStorageValue(cid, config.storage) - os.time() <= 0 then if doPlayerRemoveMoney(cid, config.price) then setPlayerStorageValue(cid, config.storage, os.time() + (config.tempo*60)) doBroadcastMessage(""..getCreatureName(cid).." [ANUNCIO]: "..param.."", config.cor) doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Voce mandou um anuncio com sucesso, agora voce precisa esperar " ..config.tempo.. " minuto(s) para mandar ou anuncio.") else doPlayerSendCancel(cid, "Voce nao tem " ..config.price.. " gp's for broadcasting.") return true end else doPlayerSendCancel(cid, "Voce precisa esperar " ..(getPlayerStorageValue(cid, config.storage) - os.time()).. " segundos para mandar outro anuncio.") return true end else doPlayerSendCancel(cid, "Voce precisa ser " ..config.level.. " ou mais para mandar um broadcast.") end end  
  15. Gostei
    mullino deu reputação a Imperius em (Resolvido)menssagem no defalt e nao no server log   
    Se o objetivo é enviar a mensagem para todos os players, somente no DEFAULT. (sem que apareça no meio da tela / server log).
     
    Veja se desta forma, o problema é ou não resolvido:
     
    local config = { storage = 19400, -- storage em que será salvo o tempo cor = "red", -- de acordo com o constant.lua da lib tempo = 3, -- em minutos price = 20000, -- quantidade de dinheiro que irá custar level = 10 -- level pra poder utilizar o broadcast } function onSay(cid, words, param, channel) if(param == '') then -- Mensagem em branco. doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end if getPlayerLevel(cid) < config.level then -- Caso o player seja level abaixo do que o permitido. doPlayerSendCancel(cid, "You have to be level " ..config.level.. " or more in order to use broadcast.") return true end if getPlayerStorageValue(cid, config.storage) - os.time() >= 1 then -- Caso o player use o comando antes do tempo de espera. doPlayerSendCancel(cid, "You have to wait " ..(getPlayerStorageValue(cid, config.storage) - os.time()).. " seconds until you can broadcast again.") return true end if not doPlayerRemoveMoney(cid, config.price) then -- Caso o player não tenha dinheiro o suficiente. doPlayerSendCancel(cid, "You don't have " ..config.price.. " gp's for broadcasting.") return true end --== Caso esteja tudo certo ==-- setPlayerStorageValue(cid, config.storage, os.time() + (config.tempo*60)) for _, pid in ipairs(getPlayersOnline()) do doPlayerSendTextMessage(pid, MESSAGE_STATUS_CONSOLE_RED, getCreatureName(cid)..": "..param) end return true end  
  16. Gostei
    mullino deu reputação a FeeTads em (Resolvido)menssagem no defalt e nao no server log   
    testou esse script que fiz e deu reload talk?

     
    local config = { storage = 19400, -- storage em que será salvo o tempo cor = "red", -- de acordo com o constant.lua da lib tempo = 3, -- em minutos price = 20000, -- quantidade de dinheiro que irá custar level = 10 -- level pra poder utilizar o broadcast } function onSay(cid, words, param) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end if getPlayerLevel(cid) >= config.level then if getPlayerStorageValue(cid, config.storage) - os.time() <= 0 then if doPlayerRemoveMoney(cid, config.price) then setPlayerStorageValue(cid, config.storage, os.time() + (config.tempo*10)) local pid = getPlayersOnline() for i=1, #pid do doPlayerSendTextMessage(pid[i], MESSAGE_STATUS_CONSOLE_RED, "[/all]: ["..getCreatureName(cid).."]: "..param.."") end else doPlayerSendCancel(cid, "You don't have " ..config.price.. " gp's for broadcasting.") return true end else doPlayerSendCancel(cid, "You have to wait " ..(getPlayerStorageValue(cid, config.storage) - os.time()).. " seconds until you can broadcast again.") return true end else doPlayerSendCancel(cid, "You have to be level " ..config.level.. " or more in order to use broadcast.") end return true end  
  17. Gostei
    mullino deu reputação a Imperius em erro tabela mysql   
    Acesse o banco de dados do seu servidor, lá na tabela z_ots_guildcomunication, veja se existe uma coluna chamada type.
     
    Se não existir, execute isso no SQL:
     
    ALTER TABLE `z_ots_guildcomunication` ADD `type` VARCHAR(255) NOT NULL  
    e veja se o problema ainda persiste.
  18. Gostei
    mullino deu reputação a klipstyle em (Resolvido)Ajuda "Duvida Cruel Sample Login"   
    Rook Sample, Sorcerer Sample, Druid Sample, Paladin Sample, e Knight Sample.

    Edite cada um deles modificando a seguinte linha:
    deleted = 1

    motivo? para que estes chars não apareçam na lista de chars quando os novos players entrarem na account 1/1 (account manager) para criar suas contas.
  19. Gostei
    mullino deu reputação a Imperius em (Resolvido)Ajuda Com O PHPMYADMIN   
    Consegue enviar uma captura de tela mostrando a mensagem de erro que é exibida ao tentar acessar o phpmyadmin?
  20. Gostei
    mullino deu reputação a Diiego Liima em COMPILANDO NO LINUX   
    qual src vc esta usando. otx 2?
  21. Gostei
    mullino deu reputação a Diiego Liima em COMPILANDO NO LINUX   
    estala ai o 16.04 ubuntu e compila com o makefile q te mandei
     
  22. Gostei
    mullino deu reputação a Diiego Liima em COMPILANDO NO LINUX   
  23. Gostei
    mullino deu reputação a jq123 em COMPILANDO NO LINUX   
    Comecei mexer com otserv em linux a pouco tempo e não conseguindo compilar minha source está aprecendo esse erro g++: error: /usr/lib/libtcmalloc_minimal.so.4: No such file or directory
    Makefile:37: recipe for target 'theotxserver' failed
    make: *** [theotxserver] Error 1  
     
    Alguem pode ajudar?
  24. Gostei
    mullino deu reputação a Heitorzera13 em Compilando tfs otx   
    Usei os comandos acima e consegui! porem, Deu um erro quase no final da compilação.
     

     
    [erro]:
    g++: error: /usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4: No such file or directory Makefile:37: recipe for target 'theotxserver' failed make: *** [theotxserver] Error 1
     
    essa base é OTX 1.0?
     
    Estou usando ubuntu 16.04.

     
  25. Curtir
    mullino recebeu reputação de Avante em Segmentation Fault (Urgente pfvr)   
    como colocar esse restarter no meu serve ajuda ae
     

Informação Importante

Confirmação de Termo