TekaZudo
seuserver.com.br
DESCRIÇÃO
Anuncie aqui neste countdown e dê maior visibilidade ao seu lançamento |
Full Global • Custom Quests • Custom Outfits • Lottery System • Version 15x
Inicia em:
--
Participar
-
- Gesior - Baiak-PvP 2020
- TicTacWar
-
Projeto Global 11+, procuro um SCRIPTER
Já tenho o projeto em mãos, com varias atualizações... Por enquanto procuramos apenas desenvolvedores, logo mais abriremos novas vagas! Se estiver interessado deixe seu whats ou face, insta, skype, discord, que entraremos em contato!
-
Novo otserver 8.60
Estou interessado, contato (17)98184-4451 Att: Samuel Bertanha
- [TFS 1.3 10.98] ALUNIA 2020 - Styller Custom
- Gesior 1.2 Premium Pack - ANTI SQL INJECTION - TFS [1.x / OTX]
- Como diminuir o speed dos players
-
Citywar com erro
a 1ª vez a war anti-entrosa funciona normalmente, já na segunda da o seguinte erro. [Error - TalkAction Interface] data/talkactions/scripts/citywar.lua:onSay Description: data/talkactions/scripts/citywar.lua:104: attempt to index local 'v' (a boolean value) stack traceback: data/talkactions/scripts/citywar.lua:104: in function 'cityWarGo' data/talkactions/scripts/citywar.lua:167: in function <data/talkactions/scripts/citywar.lua:136> --------------- tudo que tem dentro do arquivo --------------- -- /citywar invite, guild, cidade, numero, modo, tempo local function cityWarInvite(cid, param) local guildId = getGuildId(param[2]) if guildId == false then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid guild name.") return false end if guildId == getPlayerGuildId(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid guild invite.") return false end if isGuildAntiEntrosa(guildId) or isGuildAntiEntrosa(getPlayerGuildId(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Guild already on war.") return false end local nomeB = param[2] --if not cityWarExtraRequirements(cid, guildId) then --return false --end local ret, instance = isInAnyArray(War.cidade_string, param[3]) if ret then instanceid = Instance:getFree(instance) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid city name.") return false end local numero = 0 if tonumber(param[4]) and isInAnyArray(War.numero, tonumber(param[4])) then numero = tonumber(param[4]) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid number of players.") return false end local ret, modo = isInAnyArray(War.modo_string, param[5]) if not ret then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid type name.") return false end local preco, tempo = 0, 0 if tonumber(param[6]) then tempo = tonumber(param[6]) ret, preco = isInAnyArray(War.tempo, tonumber(param[6])) if not ret then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid duration time.") return false end if not doPlayerWithdrawMoney(cid, War.preco[preco]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Not enough money.") return false end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid duration time.") return false end local config = { desafiante = cid, nomeA = getPlayerGuildName(cid), nomeB = nomeB, tempo = tempo, valor = War.preco[preco], modo = modo, numero = numero, cidade = instance, instanceid = instanceid, guildA = getPlayerGuildId(cid), guildB = guildId } Wars(config) end -- /citywar accept, guild local function cityWarAccept(cid, param) local selfGuild = getPlayerGuildId(cid) local invitingGuild = getGuildId(param[2]) if selfGuild == invitingGuild then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot accept your own request.") return end for _, v in pairs(Wars) do if type(v) == 'table' then if v:isGuildOnWar(invitingGuild) and v:isGuildOnWar(selfGuild) then if doPlayerWithdrawMoney(cid, v.valor) then v:start() else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Not enough money.") end end end end end -- /citywar go local function cityWarGo(cid) selfGuild = getPlayerGuildId(cid) for _, v in pairs(Wars) do if not v == false then if v:isGuildOnWar(selfGuild) then if getTileInfo(getThingPosition(cid)).protection == false then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Please go to a protection zone.") return true end return v:newPlayer(cid) end end end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your guild is not in a war.") return true end -- /citywar exit local function cityWarExit(cid) if getPlayerWarType(cid) <= 0 then return false end selfGuild = getPlayerGuildId(cid) for _, v in pairs(Wars) do if type(v) == 'table' then if v:isGuildOnWar(selfGuild) then if getTileInfo(getThingPosition(cid)).protection == false then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Please go to a protection zone.") return true end v:removePlayer(cid) end end end end function onSay(cid, words, param, channel) if(param == '') then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.") return true end local t = string.explode(param, ",") local ret = RETURNVALUE_NOERROR local comando = t[1] if comando == "accept" then if isGuildLeader(cid) then if getPlayerWarType(cid) < 1 then cityWarAccept(cid, t) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You are already in a war.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You are not a guild leader.") end elseif comando == "invite" then if isGuildLeader(cid) then if getPlayerWarType(cid) < 1 then cityWarInvite(cid, t) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You are already in a war.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You are not a guild leader.") end elseif comando == "go" then if not cityWarGo(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player number limit reached.") end elseif comando == "exit" then if not cityWarExit(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You are not in war.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid command param.") end return true end
-
Erro na compilação da nova regra da OTserverlist
@UP
-
Erro na compilação da nova regra da OTserverlist
Olá pessoal do Tibiaking!! estou com um problema de compilação de distro, estou tentando adicionar, (melhor dizendo), estou tentando colocar a nova regra do otserverlist sobre players xlogout https://otland.net/threads/how-to-not-count-x-logged-players.81370/ Porém está dando o erro a baixo, já tentei varias vezes, alguém poderia tentar solucionar o problema, minha distro é a TFS 4.0 ==================Erro que ocorre na hora da compilação=========== status.cpp: In member function ‘std::string Status::getStatusString(bool) const’: status.cpp:142:24: error: ‘connectionCount’ is not a member of ‘Connection’ sprintf(buffer, "%d", Connection::connectionCount()); ^ status.cpp: In member function ‘void Status::getInfo(uint32_t, OutputMessage_ptr, NetworkMessage&) const’: status.cpp:240:25: error: ‘connectionCount’ is not a member of ‘Connection’ output->put<uint32_t>(Connection::connectionCount()); ==================Status.cpp============================== //////////////////////////////////////////////////////////////////////// // OpenTibia - an opensource roleplaying game //////////////////////////////////////////////////////////////////////// // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. //////////////////////////////////////////////////////////////////////// #include "otpch.h" #include <libxml/xmlmemory.h> #include <libxml/parser.h> #include "status.h" #include "const.h" #include "tools.h" #include "connection.h" #include "networkmessage.h" #include "outputmessage.h" #include "configmanager.h" #include "game.h" #include "resources.h" extern ConfigManager g_config; extern Game g_game; #ifdef __ENABLE_SERVER_DIAGNOSTIC__ uint32_t ProtocolStatus::protocolStatusCount = 0; #endif IpConnectMap ProtocolStatus::ipConnectMap; void ProtocolStatus::onRecvFirstMessage(NetworkMessage& msg) { uint32_t ip = getIP(); if(ip != LOCALHOST) { IpConnectMap::const_iterator it = ipConnectMap.find(ip); if(it != ipConnectMap.end() && OTSYS_TIME() < it->second + g_config.getNumber(ConfigManager::STATUSQUERY_TIMEOUT)) { getConnection()->close(); return; } ipConnectMap[ip] = OTSYS_TIME(); } uint8_t type = msg.get<char>(); switch(type) { case 0xFF: { if(msg.getString(false, 4) == "info") { if(OutputMessage_ptr output = OutputMessagePool::getInstance()->getOutputMessage(this, false)) { TRACK_MESSAGE(output); if(Status* status = Status::getInstance()) { bool sendPlayers = false; if(msg.size() > msg.position()) sendPlayers = msg.get<char>() == 0x01; output->putString(status->getStatusString(sendPlayers), false); } setRawMessages(true); // we dont want the size header, nor encryption OutputMessagePool::getInstance()->send(output); } } break; } case 0x01: { uint32_t requestedInfo = msg.get<uint16_t>(); // only a byte is necessary, though we could add new infos here if(OutputMessage_ptr output = OutputMessagePool::getInstance()->getOutputMessage(this, false)) { TRACK_MESSAGE(output); if(Status* status = Status::getInstance()) status->getInfo(requestedInfo, output, msg); OutputMessagePool::getInstance()->send(output); } break; } default: break; } getConnection()->close(); } #ifdef __DEBUG_NET_DETAIL__ void ProtocolStatus::deleteProtocolTask() { std::clog << "Deleting ProtocolStatus" << std::endl; Protocol::deleteProtocolTask(); } #endif std::string Status::getStatusString(bool sendPlayers) const { xmlDocPtr doc = xmlNewDoc((const xmlChar*)"1.0"); doc->children = xmlNewDocNode(doc, NULL, (const xmlChar*)"tsqp", NULL); xmlNodePtr root = doc->children; char buffer[90]; xmlSetProp(root, (const xmlChar*)"version", (const xmlChar*)"1.0"); xmlNodePtr p = xmlNewNode(NULL,(const xmlChar*)"serverinfo"); sprintf(buffer, "%u", (uint32_t)getUptime()); xmlSetProp(p, (const xmlChar*)"uptime", (const xmlChar*)buffer); xmlSetProp(p, (const xmlChar*)"ip", (const xmlChar*)g_config.getString(ConfigManager::IP).c_str()); xmlSetProp(p, (const xmlChar*)"servername", (const xmlChar*)g_config.getString(ConfigManager::SERVER_NAME).c_str()); sprintf(buffer, "%d", (int32_t)g_config.getNumber(ConfigManager::LOGIN_PORT)); xmlSetProp(p, (const xmlChar*)"port", (const xmlChar*)buffer); xmlSetProp(p, (const xmlChar*)"location", (const xmlChar*)g_config.getString(ConfigManager::LOCATION).c_str()); xmlSetProp(p, (const xmlChar*)"url", (const xmlChar*)g_config.getString(ConfigManager::URL).c_str()); xmlSetProp(p, (const xmlChar*)"server", (const xmlChar*)SOFTWARE_NAME); xmlSetProp(p, (const xmlChar*)"version", (const xmlChar*)SOFTWARE_VERSION); xmlSetProp(p, (const xmlChar*)"client", (const xmlChar*)CLIENT_VERSION_STRING); xmlAddChild(root, p); p = xmlNewNode(NULL,(const xmlChar*)"owner"); xmlSetProp(p, (const xmlChar*)"name", (const xmlChar*)g_config.getString(ConfigManager::OWNER_NAME).c_str()); xmlSetProp(p, (const xmlChar*)"email", (const xmlChar*)g_config.getString(ConfigManager::OWNER_EMAIL).c_str()); xmlAddChild(root, p); p = xmlNewNode(NULL,(const xmlChar*)"players"); sprintf(buffer, "%d", g_game.getPlayersOnline()); xmlSetProp(p, (const xmlChar*)"online", (const xmlChar*)buffer); sprintf(buffer, "%d", (int32_t)g_config.getNumber(ConfigManager::MAX_PLAYERS)); xmlSetProp(p, (const xmlChar*)"max", (const xmlChar*)buffer); sprintf(buffer, "%d", g_game.getPlayersRecord()); xmlSetProp(p, (const xmlChar*)"peak", (const xmlChar*)buffer); if(sendPlayers) { std::stringstream ss; for(AutoList<Player>::iterator it = Player::autoList.begin(); it != Player::autoList.end(); ++it) { if(it->second->isRemoved() || it->second->isGhost()) continue; if(!ss.str().empty()) ss << ";"; ss << it->second->getName() << "," << it->second->getVocationId() << "," << it->second->getLevel(); } xmlNodeSetContent(p, (const xmlChar*)ss.str().c_str()); } xmlAddChild(root, p); p = xmlNewNode(NULL,(const xmlChar*)"monsters"); sprintf(buffer, "%d", g_game.getMonstersOnline()); xmlSetProp(p, (const xmlChar*)"total", (const xmlChar*)buffer); xmlAddChild(root, p); p = xmlNewNode(NULL,(const xmlChar*)"npcs"); sprintf(buffer, "%d", g_game.getNpcsOnline()); xmlSetProp(p, (const xmlChar*)"total", (const xmlChar*)buffer); xmlAddChild(root, p); p = xmlNewNode(NULL,(const xmlChar*)"map"); xmlSetProp(p, (const xmlChar*)"name", (const xmlChar*)g_config.getString(ConfigManager::MAP_NAME).c_str()); xmlSetProp(p, (const xmlChar*)"author", (const xmlChar*)g_config.getString(ConfigManager::MAP_AUTHOR).c_str()); uint32_t mapWidth, mapHeight; g_game.getMapDimensions(mapWidth, mapHeight); sprintf(buffer, "%u", mapWidth); xmlSetProp(p, (const xmlChar*)"width", (const xmlChar*)buffer); sprintf(buffer, "%u", mapHeight); xmlSetProp(p, (const xmlChar*)"height", (const xmlChar*)buffer); xmlAddChild(root, p); xmlNewTextChild(root, NULL, (const xmlChar*)"motd", (const xmlChar*)g_config.getString(ConfigManager::MOTD).c_str()); xmlChar* s = NULL; int32_t len = 0; xmlDocDumpMemory(doc, (xmlChar**)&s, &len); std::string xml; if(s) xml = std::string((char*)s, len); xmlFree(s); xmlFreeDoc(doc); return xml; } void Status::getInfo(uint32_t requestedInfo, OutputMessage_ptr output, NetworkMessage& msg) const { if(requestedInfo & REQUEST_BASIC_SERVER_INFO) { output->put<char>(0x10); output->putString(g_config.getString(ConfigManager::SERVER_NAME).c_str()); output->putString(g_config.getString(ConfigManager::IP).c_str()); char buffer[10]; sprintf(buffer, "%d", (int32_t)g_config.getNumber(ConfigManager::LOGIN_PORT)); output->putString(buffer); } if(requestedInfo & REQUEST_SERVER_OWNER_INFO) { output->put<char>(0x11); output->putString(g_config.getString(ConfigManager::OWNER_NAME).c_str()); output->putString(g_config.getString(ConfigManager::OWNER_EMAIL).c_str()); } if(requestedInfo & REQUEST_MISC_SERVER_INFO) { output->put<char>(0x12); output->putString(g_config.getString(ConfigManager::MOTD).c_str()); output->putString(g_config.getString(ConfigManager::LOCATION).c_str()); output->putString(g_config.getString(ConfigManager::URL).c_str()); uint64_t uptime = getUptime(); output->put<uint32_t>((uint32_t)(uptime >> 32)); output->put<uint32_t>((uint32_t)(uptime)); } if(requestedInfo & REQUEST_PLAYERS_INFO) { output->put<char>(0x20); output->put<uint32_t>(g_game.getPlayersOnline()); output->put<uint32_t>((uint32_t)g_config.getNumber(ConfigManager::MAX_PLAYERS)); output->put<uint32_t>(g_game.getPlayersRecord()); } if(requestedInfo & REQUEST_SERVER_MAP_INFO) { output->put<char>(0x30); output->putString(g_config.getString(ConfigManager::MAP_NAME).c_str()); output->putString(g_config.getString(ConfigManager::MAP_AUTHOR).c_str()); uint32_t mapWidth, mapHeight; g_game.getMapDimensions(mapWidth, mapHeight); output->put<uint16_t>(mapWidth); output->put<uint16_t>(mapHeight); } if(requestedInfo & REQUEST_EXT_PLAYERS_INFO) { output->put<char>(0x21); std::list<std::pair<std::string, uint32_t> > players; for(AutoList<Player>::iterator it = Player::autoList.begin(); it != Player::autoList.end(); ++it) { if(!it->second->isRemoved() && !it->second->isGhost()) players.push_back(std::make_pair(it->second->getName(), it->second->getLevel())); } output->put<uint32_t>(players.size()); for(std::list<std::pair<std::string, uint32_t> >::iterator it = players.begin(); it != players.end(); ++it) { output->putString(it->first); output->put<uint32_t>(it->second); } } if(requestedInfo & REQUEST_PLAYER_STATUS_INFO) { output->put<char>(0x22); const std::string name = msg.getString(); Player* p = NULL; if(g_game.getPlayerByNameWildcard(name, p) == RET_NOERROR && !p->isGhost()) output->put<char>(0x01); else output->put<char>(0x00); } if(requestedInfo & REQUEST_SERVER_SOFTWARE_INFO) { output->put<char>(0x23); output->putString(SOFTWARE_NAME); output->putString(SOFTWARE_VERSION); output->putString(CLIENT_VERSION_STRING); } }
-
Projeto Fiskur town
Uma dica minha, deleta tudo isso, porque está muito feio mano, o ot está todo quadrado, tenta fazer algo dinâmico e grande, porque isso parece aqueles ot antigo 7.9 que as coisas eram quadradas. Tudo bem que é seu primeiro projeto, mas pelo amor, no TK tem muitas coisas boas para se aprender a mexer com remeres, ou baixe um mapa diferente desconhecido e edite ele no seu estilo, a concelho você fazer isso..... Se quiser ajuda depois manda uma msg que eu trabalho com mais 1 amigo e nos juntos temos boas ideias. TMJ!!!
- ANTI MC [EVENTOS]
- Baiak-ice 8.60 Atualizado com Real Castle e Varios sistemas
-
samersz reagiu a uma resposta no tópico:
Baiak-ice 8.60 Atualizado com Real Castle e Varios sistemas
-
Procuro por Mapper Editor e scripter
Olá Tibiaking.. Estou procurando alguém que manja editar muito bem mapas, nada quadrado, mais sim detalhadamente, e procuro também um scripter que manja balancear, criar anti-mc nos eventos, e algumas outras coisas.. Estou com um projeto já em andamento, por favor entrem em contato comigo urgente...
-
Templates "RealBaiak" 25/08/16
Como eu coloco em meu servidor aquele Realcastle?