Changelog
Alterações, informações e updates a respeito do Tibiaking.
-
Quem Está Navegando 0 membros estão online
Nenhum usuário registrado visualizando esta página.
-
TK Destaques 2023:
-
Posts Recentes
-
Salve pessoal, estou com problemas em um script de reset o problema esta na hora de salvar o resets, ele esta salvando em storage e quero que salve na tabela players coluna resets ja consegui mudar umas coisas no script, mas parei nessa parte local function doPlayerAddResets(count) player:setStorageValue(500, getPlayerResets() + count) < como seria para salvar na base? end
-
Alterei a função canWalkthrough para Impedir o atravessamento de pisos específicos (como 11059 e 11060) se já houver um jogador sobre eles e assim ninguem entra no mesmo depot que é comum em pvp então vamos retirar isso. Verificar o tipo de mundo (PVP / non-PVP / etc..) e zonas de proteção. No PVP, jogadores podem atravessar se estiverem fora de uma zona de proteção ou quando ambos não estiverem em combate. Segue as alterações: vá em Player.cpp e ache: bool Player::canWalkthrough(const Creature* creature) const { if(creature == this || hasFlag(PlayerFlag_CanPassThroughAllCreatures) || creature->isWalkable() || std::find(forceWalkthrough.begin(), forceWalkthrough.end(), creature->getID()) != forceWalkthrough.end() || (creature->getMaster() && creature->getMaster() != this && canWalkthrough(creature->getMaster()))) return true; const Player* player = creature->getPlayer(); if(!player) return false; if((((g_game.getWorldType() == WORLDTYPE_OPTIONAL && #ifdef __WAR_SYSTEM__ !player->isEnemy(this, true) && #endif player->getVocation()->isAttackable()) || player->getTile()->hasFlag(TILESTATE_PROTECTIONZONE) || (player->getVocation()->isAttackable() && player->getLevel() < (uint32_t)g_config.getNumber(ConfigManager::PROTECTION_LEVEL))) && player->getTile()->ground && Item::items[player->getTile()->ground->getID()].walkStack) && (!player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges) || player->getAccess() <= getAccess())) return true; return (player->isGhost() && getGhostAccess() < player->getGhostAccess()) || (isGhost() && getGhostAccess() > player->getGhostAccess()); } altere para bool Player::canWalkthrough(const Creature* creature) const { if(creature == this || hasCustomFlag(PlayerCustomFlag_CanTurnhop) || creature->isWalkable() || (creature->getMaster() && creature->getMaster() != this && canWalkthrough(creature->getMaster()))) return true; const Player* player = creature->getPlayer(); if(!player) return false; const Tile* tile = player->getTile(); if(tile && tile->ground) { // Verifica se o tile e o chão existem uint16_t groundID = tile->ground->getID(); if(groundID == 11059 || groundID == 11060) { return false; // Bloqueia atravessamento para esses pisos } } if((((g_game.getWorldType() == WORLDTYPE_OPTIONAL && !player->isEnemy(this, true) && #ifdef __WAR_SYSTEM__ !player->isEnemy(this, true) && #endif player->getVocation()->isAttackable()) || player->getTile()->hasFlag(TILESTATE_PROTECTIONZONE) || (player->getVocation()->isAttackable() && player->getLevel() < (uint32_t)g_config.getNumber(ConfigManager::PROTECTION_LEVEL))) && player->getTile()->ground && Item::items[player->getTile()->ground->getID()].walkStack) && (!player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges) || player->getAccess() <= getAccess())) return true; return (player->isGhost() && getGhostAccess() < player->getGhostAccess()) || (isGhost() && getGhostAccess() > player->getGhostAccess()); } pronto só recompilar e testar.
-
Base Bayak Hype 8.6 Alguem tem como Disponibilizar um Reset Do Baiak Hype Por Stages ? Lib Reset Dela e esse Aqui ResetSystem = { back_to_level = 50, Reset = { [1] = {needed_level = 10000, damage_percent = 1}, [2] = {needed_level = 10000, damage_percent = 2}, [3] = {needed_level = 10000, damage_percent = 3}, [4] = {needed_level = 10000, damage_percent = 4}, [5] = {needed_level = 10000, damage_percent = 5}, [6] = {needed_level = 50000, damage_percent = 6}, [7] = {needed_level = 50000, damage_percent = 7}, [8] = {needed_level = 50000, damage_percent = 8}, [9] = {needed_level = 50000, damage_percent = 9}, [10] = {needed_level = 50000, damage_percent = 10}, [11] = {needed_level = 100000, damage_percent = 12}, [12] = {needed_level = 100000, damage_percent = 14}, [13] = {needed_level = 100000, damage_percent = 16}, [14] = {needed_level = 100000, damage_percent = 18}, [15] = {needed_level = 100000, damage_percent = 20}, [16] = {needed_level = 150000, damage_percent = 22}, [17] = {needed_level = 150000, damage_percent = 24}, [18] = {needed_level = 150000, damage_percent = 26}, [19] = {needed_level = 150000, damage_percent = 28}, [20] = {needed_level = 150000, damage_percent = 30}, [21] = {needed_level = 200000, damage_percent = 32}, [22] = {needed_level = 200000, damage_percent = 34}, [23] = {needed_level = 200000, damage_percent = 36}, [24] = {needed_level = 200000, damage_percent = 38}, [25] = {needed_level = 200000, damage_percent = 40}, [26] = {needed_level = 250000, damage_percent = 42}, [27] = {needed_level = 250000, damage_percent = 44}, [28] = {needed_level = 250000, damage_percent = 46}, [29] = {needed_level = 250000, damage_percent = 48}, [30] = {needed_level = 250000, damage_percent = 50}, [31] = {needed_level = 300000, damage_percent = 52}, [32] = {needed_level = 300000, damage_percent = 54}, [33] = {needed_level = 300000, damage_percent = 56}, [34] = {needed_level = 300000, damage_percent = 58}, [35] = {needed_level = 300000, damage_percent = 60}, [36] = {needed_level = 350000, damage_percent = 62}, [37] = {needed_level = 350000, damage_percent = 64}, [38] = {needed_level = 350000, damage_percent = 66}, [39] = {needed_level = 350000, damage_percent = 68}, [40] = {needed_level = 350000, damage_percent = 70}, [41] = {needed_level = 400000, damage_percent = 72}, [42] = {needed_level = 400000, damage_percent = 74}, [43] = {needed_level = 400000, damage_percent = 76}, [44] = {needed_level = 400000, damage_percent = 78}, [45] = {needed_level = 400000, damage_percent = 80}, [46] = {needed_level = 450000, damage_percent = 82}, [47] = {needed_level = 450000, damage_percent = 84}, [48] = {needed_level = 450000, damage_percent = 86}, [49] = {needed_level = 450000, damage_percent = 88}, [50] = {needed_level = 450000, damage_percent = 90}, [51] = {needed_level = 500000, damage_percent = 92}, [52] = {needed_level = 500000, damage_percent = 94}, [53] = {needed_level = 500000, damage_percent = 96}, [54] = {needed_level = 500000, damage_percent = 98}, [55] = {needed_level = 500000, damage_percent = 100}, [56] = {needed_level = 500000, damage_percent = 102}, [57] = {needed_level = 500000, damage_percent = 104}, [58] = {needed_level = 500000, damage_percent = 106}, [59] = {needed_level = 500000, damage_percent = 108}, [60] = {needed_level = 500000, damage_percent = 110}, } } function ResetSystem:getCount(pid) return getPlayerResets(pid) end function ResetSystem:setCount(pid, value) setPlayerResets(pid, value) end function ResetSystem:addCount(pid) self:setCount(pid, self:getCount(pid) + 1) end function ResetSystem:getInfo(pid) return self.Reset[math.min(self:getCount(pid), #self.Reset)] end function ResetSystem:addBonuses(pid) local bonus = self:getInfo(pid) if (bonus and bonus.damage_percent) then setPlayerDamageMultiplier(pid, getPlayerDamageMultiplier(pid) + (bonus.damage_percent / 100.0)) end end function ResetSystem:removeBonuses(pid) local bonus = self:getInfo(pid) if (bonus and bonus.damage_percent) then setPlayerDamageMultiplier(pid, getPlayerDamageMultiplier(pid) - (bonus.damage_percent / 100.0)) end end function ResetSystem:execute(pid) self:removeBonuses(pid) local oldMaxHealth = getCreatureMaxHealth(pid) local oldMaxMana = getCreatureMaxMana(pid) local playerLevel = getPlayerLevel(pid) if (playerLevel > self.back_to_level) then doPlayerAddExperience(pid, getExperienceForLevel(self.back_to_level) - getPlayerExperience(pid)) playerLevel = self.back_to_level end self:addCount(pid) self:addBonuses(pid) setCreatureMaxHealth(pid, oldMaxHealth) setCreatureMaxMana(pid, oldMaxMana) doCreatureAddHealth(pid, oldMaxHealth) doCreatureAddMana(pid, oldMaxMana) local bonus = self:getInfo(pid) if (bonus) then local message = "[RESETANDO]\nVocê efetuou seu " .. self:getCount(pid) .. "° RESET." if (bonus.damage_percent) then message = message .. "\nAgora você tem +" .. bonus.damage_percent .. "% de dano." end doPlayerSendTextMessage(pid, MESSAGE_EVENT_ADVANCE, message) doRemoveCreature(pid) end end
-
TibiaKing
Open Tibia Server
Quer aprender a criar seu próprio servidor de Tibia? Então está no lugar certo, aqui você encontrará milhares de tutorias, scripts, códigos, mapas e utilitários para que você possa fazer o seu próprio servidor de Tibia começando do zero.
Anuncie no TibiaKing
Precisa de mais visibilidade em seus projetos? Quer fazer um plano publicitário para o seu servidor? Anuncie no OTKing e faça sua divulgação, possuímos centenas de acessos simultâneos e milhares diários, com certeza será a sua solução!