Ir para conteúdo

texzin

Membro
  • Registro em

  • Última visita

Tudo que texzin postou

  1. ALGUÉM AJUDA CONCERTAR ? TFS 0.3.6 Versão 8.60 Adicione a "data/creaturescripts/antmagebomb.xml" function onLogin(cid, words, param, channel) local _ip = nil local p = 0 local list, ips = {}, {} local players = getPlayersOnline() local max = 3 -- Maximo de players no mesmo IP. for i, pid in ipairs(players) do local ip = getPlayerIp(pid) local tmp = table.find(ips, ip) if(tmp ~= nil and (not _ip or _ip == ip)) then if(table.countElements(list, ip) == 0) then list[players[tmp]] = ip end list[pid] = ip end table.insert(ips, ip) end if(table.maxn(list) > 0) then meip = getPlayerIp(cid) mename = getCreatureName(cid) for pid, ip in pairs(list) do local metmp = table.find(ips, meip) if (metmp ~= nil) then p = p + 1 end end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce tem ".. p .." chars online!") if p > max then doRemoveCreature(cid, mename) end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Voce tem ".. p+1 .." char online!") end return true end Em "data/creaturescripts/creaturescripts.xml" adicione essa linha: <event type="login" name="AntMageBomb" event="script" value="AntMageBomb.lua"/> ERRO : ele funciona melhor que todos os outros que eu testei ate hoje, porem... quando entro com varias accounts manager ao mesmo tempo ( magebomb ) da esse erro. e acaba dado CRASH.. ALGUÉM AJUDA CONCERTAR ?
  2. texzin postou uma resposta no tópico em Suporte Tibia OTServer
    UPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP Por favor alguem me ajuda???
  3. texzin postou uma resposta no tópico em Suporte Tibia OTServer
    up up up up up up ele funciona melhor que todos os outros que eu testei ate hoje, porem... quando entro com varias accounts manager ao mesmo tempo ( magebomb ) da esse erro. e acaba dado CRASH.. Obs:Meu distro/scripts não possui erros !! apenas depois que adicionei o script.
  4. texzin postou uma resposta no tópico em Suporte Tibia OTServer
    Obrigado pelo Post, mais não deu certo. ele kica os player de forma até q mais rapida . mais nao enibi o acesso, até q ele kick os account ja lagou tudo
  5. bombaaaa ( up )
  6. texzin postou uma resposta no tópico em Suporte Tibia OTServer
    Bom, boa noite, Estou a procura de algum Account manager que funcione de maneira mais eficaz. Antes de mais nada ( EU JA FIZ A PESQUISA DE SCRIPTS AQUI NO FORUM ) ja utilizei diversos scripts e sem muito resultado . Uso Windows, < INFELIZMENTE > e na versão 8.60 TFS 0.3.6 SE ALGUEM PUDER ME AJUDAR COM UM SCRIPT MAIS EFICAZ, ACHEI BEM INTERESANTE UM DO VODKART QUE BANI O IP DO CARA, mais ele costuma bugar meu distro quando algum FD# entra com mage bomb, e nao consigo ver qual o erro que aparece
  7. UPPPPPP !!!!!!!!!!!!
  8. Boa Noite, Gostaria de criar um site de divulgação de Open Server, Similar ao OTSERVLIST entre outros ai.
  9. Sei que pode ser considerado (FLOOD). Mais eu nao quero criar outro topico, e a pouco voltei a mexer com Otserv e ainda preciso do script. se alguem souber como fazer eu agradeço !
  10. texzin postou uma resposta no tópico em Suporte Tibia OTServer
    REP+ Obrigado, faltou apenas aquela que combinamos por WHATS.
  11. texzin postou uma resposta no tópico em Suporte Tibia OTServer
    Conforme contato via whatsapp : http://www.speedyshare.com/yVFvZ/cryingdamson-0.3.6-8.60-V8.2-Source.rar
  12. http://www.tibiaking.com/forum/topic/52600-compilando-tfs-gui/
  13. texzin postou uma resposta no tópico em Suporte Tibia OTServer
    Compilador: Default compiler Building Makefile: "C:\Users\Itamar\Desktop\Nova pasta\cryingdamson 0.3.6 (8.60) V8.2 Source\dev-cpp\Makefile.win" Executando make... make.exe -f "C:\Users\Itamar\Desktop\Nova pasta\cryingdamson 0.3.6 (8.60) V8.2 Source\dev-cpp\Makefile.win" all g++.exe -c ../databaseodbc.cpp -o obj/databaseodbc.o -I"C:/Users/Itamar/Desktop/Nova pasta/Stian's Repack Dev-Cpp/include" -D__ENABLE_SERVER_DIAGNOSTIC__ -D__ROOT_PERMISSION__ -D__GROUND_CACHE__ -D__USE_SQLITE__ -D__USE_MYSQL__ -fexpensive-optimizations -O1 ../databaseodbc.cpp: In constructor `ODBCResult::ODBCResult(void*)': ../databaseodbc.cpp:351: error: `res' was not declared in this scope make.exe: *** [obj/databaseodbc.o] Error 1 Execução terminada //////////////////////////////////////////////////////////////////////// // 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/>. //////////////////////////////////////////////////////////////////////// // C++ Implementation: databaseodbc // Description: Frontend for ODBC connections // // Author: Bruno R Ferreira <brf_coldf@yahoo.com.br>, (C) 2007 //////////////////////////////////////////////////////////////////////// #include "otpch.h" #include <iostream> #include "database.h" #include "databaseodbc.h" #include "configmanager.h" extern ConfigManager g_config; #define RETURN_SUCCESS(ret) (ret == SQL_SUCCESS || ret == SQL_SUCCESS_WITH_INFO) DatabaseODBC::DatabaseODBC() { m_connected = false; char* dns = new char[SQL_MAX_DSN_LENGTH]; char* user = new char[32]; char* pass = new char[32]; strcpy((char*)dns, g_config.getString(ConfigManager::SQL_DB).c_str()); strcpy((char*)user, g_config.getString(ConfigManager::SQL_USER).c_str()); strcpy((char*)pass, g_config.getString(ConfigManager::SQL_PASS).c_str()); SQLRETURN ret = SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &m_env); if(!RETURN_SUCCESS(ret)) { std::cout << "Failed to allocate ODBC SQLHENV enviroment handle." << std::endl; m_env = NULL; return; } ret = SQLSetEnvAttr(m_env, SQL_ATTR_ODBC_VERSION, (SQLPOINTER*)SQL_OV_ODBC3, 0); if(!RETURN_SUCCESS(ret)) { std::cout << "SQLSetEnvAttr(SQL_ATTR_ODBC_VERSION): Failed to switch to ODBC 3 version." << std::endl; SQLFreeHandle(SQL_HANDLE_ENV, m_env); m_env = NULL; } if(m_env == NULL) { std::cout << "ODBC SQLHENV enviroment not initialized." << std::endl; return; } ret = SQLAllocHandle(SQL_HANDLE_DBC, m_env, &m_handle); if(!RETURN_SUCCESS(ret)) { std::cout << "Failed to allocate ODBC SQLHDBC connection handle." << std::endl; m_handle = NULL; return; } ret = SQLSetConnectAttr(m_handle, SQL_ATTR_CONNECTION_TIMEOUT, (SQLPOINTER*)5, 0); if(!RETURN_SUCCESS(ret)) { std::cout << "SQLSetConnectAttr(SQL_ATTR_CONNECTION_TIMEOUT): Failed to set connection timeout." << std::endl; SQLFreeHandle(SQL_HANDLE_DBC, m_handle); m_handle = NULL; return; } ret = SQLConnect(m_handle, (SQLCHAR*)dns, SQL_NTS, (SQLCHAR*)user, SQL_NTS, (SQLCHAR*)pass, SQL_NTS); if(!RETURN_SUCCESS(ret)) { std::cout << "Failed to connect to ODBC via DSN: " << dns << " (user " << user << ")" << std::endl; SQLFreeHandle(SQL_HANDLE_DBC, m_handle); m_handle = NULL; return; } m_connected = true; } DatabaseODBC::~DatabaseODBC() { if(m_connected) { SQLDisconnect(m_handle); SQLFreeHandle(SQL_HANDLE_DBC, m_handle); m_handle = NULL; m_connected = false; } SQLFreeHandle(SQL_HANDLE_ENV, m_env); } bool DatabaseODBC::getParam(DBParam_t param) { switch(param) { case DBPARAM_MULTIINSERT: default: break; } return false; } bool DatabaseODBC::beginTransaction() { return true; // return executeQuery("BEGIN"); } bool DatabaseODBC::rollback() { return true; // SQL_RETURN ret = SQLTransact(m_env, m_handle, SQL_ROLLBACK); // return RETURN_SUCCESS(ret); } bool DatabaseODBC::commit() { return true; // SQL_RETURN ret = SQLTransact(m_env, m_handle, SQL_COMMIT); // return RETURN_SUCCESS(ret); } bool DatabaseODBC::executeQuery(const std::string& query) { if(!m_connected) return false; #ifdef __SQL_QUERY_DEBUG__ std::cout << "ODBC QUERY: " << query << std::endl; #endif SQLHSTMT stmt; SQLRETURN ret = SQLAllocHandle(SQL_HANDLE_STMT, m_handle, &stmt); if(!RETURN_SUCCESS(ret)) { std::cout << "Failed to allocate ODBC SQLHSTMT statement." << std::endl; return false; } std::string buf = _parse(query); ret = SQLExecDirect(stmt, (SQLCHAR*)buf.c_str(), buf.length()); if(!RETURN_SUCCESS(ret)) { std::cout << "SQLExecDirect(): " << query << ": ODBC ERROR." << std::endl; return false; } return true; } DBResult* DatabaseODBC::storeQuery(const std::string& query) { if(!m_connected) return NULL; #ifdef __SQL_QUERY_DEBUG__ std::cout << "ODBC QUERY: " << query << std::endl; #endif SQLHSTMT stmt; SQLRETURN ret = SQLAllocHandle(SQL_HANDLE_STMT, m_handle, &stmt); if(!RETURN_SUCCESS(ret)) { std::cout << "Failed to allocate ODBC SQLHSTMT statement." << std::endl; return NULL; } std::string buf = _parse(query); ret = SQLExecDirect(stmt, (SQLCHAR*)buf.c_str(), buf.length() ); if(!RETURN_SUCCESS(ret)) { std::cout << "SQLExecDirect(): " << query << ": ODBC ERROR." << std::endl; return NULL; } DBResult* results = (DBResult*)new ODBCResult(stmt); return verifyResult(results); } std::string DatabaseODBC::escapeBlob(const char *s, uint32_t length) { std::string buf = "'"; for(uint32_t i = 0; i < length; i++) { switch(s[i]) { case '\'': buf += "\'\'"; break; case '\0': buf += "\\0"; break; case '\\': buf += "\\\\"; break; case '\r': buf += "\\r"; break; case '\n': buf += "\\n"; break; default: buf += s[i]; } } buf += "'"; return buf; } std::string DatabaseODBC::_parse(const std::string& s) { std::string query = ""; query.reserve(s.size()); bool inString = false; for(uint32_t a = 0; a < s.length(); a++) { uint8_t ch = s[a]; if(ch == '\'') { if(inString && s[a + 1] != '\'') inString = false; else inString = true; } if(ch == '`' && !inString) ch = '"'; query += ch; } return query; } int32_t ODBCResult::getDataInt(const std::string& s) { listNames_t::iterator it = m_listNames.find(s); if(it != m_listNames.end()) { int32_t value; SQLRETURN ret = SQLGetData(m_handle, it->second, SQL_C_SLONG, &value, 0, NULL); if(RETURN_SUCCESS(ret)) return value; else std::cout << "Error during getDataInt(" << s << ")." << std::endl; } std::cout << "Error during getDataInt(" << s << ")." << std::endl; return 0; // Failed } int64_t ODBCResult::getDataLong(const std::string& s) { listNames_t::iterator it = m_listNames.find(s); if(it != m_listNames.end()) { int64_t value; SQLRETURN ret = SQLGetData(m_handle, it->second, SQL_C_SBIGINT, &value, 0, NULL); if(RETURN_SUCCESS(ret)) return value; else std::cout << "Error during getDataLong(" << s << ")." << std::endl; } std::cout << "Error during getDataLong(" << s << ")." << std::endl; return 0; // Failed } std::string ODBCResult::getDataString(const std::string& s) { listNames_t::iterator it = m_listNames.find(s); if(it != m_listNames.end()) { char* value = new char[1024]; SQLRETURN ret = SQLGetData(m_handle, it->second, SQL_C_CHAR, value, 1024, NULL); if(RETURN_SUCCESS(ret)) { std::string buff = std::string(value); return buff; } else std::cout << "Error during getDataString(" << s << ")." << std::endl; } std::cout << "Error during getDataString(" << s << ")." << std::endl; return std::string(""); // Failed } const char* ODBCResult::getDataStream(const std::string& s, uint64_t& size) { listNames_t::iterator it = m_listNames.find(s); if(it != m_listNames.end()) { char* value = new char[1024]; if(RETURN_SUCCESS(SQLGetData(m_handle, it->second, SQL_C_BINARY, value, 1024, (SQLLEN*)&size))) return value; } std::cout << "Error during getDataStream(" << s << ")." << std::endl; size = 0; return 0; // Failed } void ODBCResult::free() { if(m_handle) { SQLFreeHandle(SQL_HANDLE_STMT, m_handle); delete this; } else std::cout << "[Warning - ODBCResult::free] Trying to free already freed result." << std::endl; } bool ODBCResult::next() { SQLRETURN ret = SQLFetch(m_handle); return RETURN_SUCCESS(ret); } ODBCResult::ODBCResult(SQLHSTMT stmt) { if(!res) { delete this; return; } m_handle = stmt; int16_t numCols = 0; SQLNumResultCols(m_handle, &numCols); for(int32_t i = 1; i <= numCols; i++) { char* name = new char[129]; SQLDescribeCol(m_handle, i, (SQLCHAR*)name, 129, NULL, NULL, NULL, NULL, NULL); m_listNames[name] = i; } }
  14. texzin postou uma resposta no tópico em Suporte Tibia OTServer
    Boa Noite, vou ser pratico e obejetivo... preciso compilar uma Source aqui 0,3,6 TFS, mais eu preciso fazer em GUI e nao CONSOLE. Como fazer isso ?
  15. Desculpe ,Sei que suas respostas são visando ajudar . Porém vce so está fazendo comentarios desnecessarios, Pois este script está perfeito e foi criado por um dos cara mais top que eu ja vi.. VODKART.
  16. Não quero outro script.. até pq se fosse este o caso existem vários outros aqui no fórum... Porem quero usar este mesmo =( Mesmo assim Obrigado
  17. rank frags ... usa com talkactions !rank frags.. o script esta funcionando mais aparece esse erro ai..
  18. ERRO DISTRO : [Warning - Event::loadScript] Event onLogin not found (data/creaturescripts/scripts/rankfrags.lua) rankfrags.lua function onKill(cid, target, lastHit) if isPlayer(cid) and isPlayer(target) then addEvent(setFrags, 1, cid) end return true end Login.lua registerCreatureEvent(cid, "Rankfrags") setFrags(cid) Creaturescripts.xml <event type="login" name="Rankfrags" event="script" value="rankfrags.lua"/>
  19. Obrigado.. REP + DUVIDA SANADA.. TOPICO REPORTADO !!
  20. Voce so copiou as duas linhas e modificou os id.. Mesmo assim muito obg por tentar ajudar !! 16/01/2014 01:01:31] [Error - LuaScriptInterface::loadFile] data/talkactions/scripts/addondoll.lua:26: 'end' expected (to close 'function' at line 1) near '<eof>' [16/01/2014 01:01:31] [Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/addondoll.lua) [16/01/2014 01:01:31] data/talkactions/scripts/addondoll.lua:26: 'end' expected (to close 'function' at line 1) near '<eof>'
  21. Mais eu nao sei onde estao essas houses ;(
  22. function onSay(cid, words, param) local femaleOutfits = { ["citizen"]={136}, ["hunter"]={137}, ["mage"]={138}, ["knight"]={139}, ["nobleman"]={140}, ["summoner"]={141}, ["warrior"]={142}, ["barbarian"]={147}, ["druid"]={148}, ["wizard"]={149}, ["oriental"]={150}, ["pirate"]={155}, ["assassin"]={156}, ["beggar"]={157}, ["shaman"]={158}, ["norseman"]={252}, ["nightmare"]={269}, ["jester"]={270}, ["brotherhood"]={279}, ["demonhunter"]={288}, ["yalaharian"]={324}, ["warmaster"]={336}, ["wayfarer"]={367} } local maleOutfits = { ["citizen"]={128}, ["hunter"]={129}, ["mage"]={130}, ["knight"]={131}, ["nobleman"]={132},["summoner"]={133}, ["warrior"]={134}, ["barbarian"]={143}, ["druid"]={144}, ["wizard"]={145}, ["oriental"]={146}, ["pirate"]={151}, ["assassin"]={152}, ["beggar"]={153}, ["shaman"]={154}, ["norseman"]={251}, ["nightmare"]={268}, ["jester"]={273}, ["brotherhood"]={278}, ["demonhunter"]={289}, ["yalaharian"]={325}, ["warmaster"]={335}, ["wayfarer"]={366} } local msg = {"Digite o nome correto!", "Voçe não tem um Addon Doll!", "Bad param!", "Full Addon Adicionado!"} local param = string.lower(param) if(getPlayerItemCount(cid, 2112) > 0) then if(param ~= "" and maleOutfits[param] and femaleOutfits[param]) then doPlayerRemoveItem(cid, 2112, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[4]) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS) if(getPlayerSex(cid) == 0)then doPlayerAddOutfit(cid, femaleOutfits[param][1], 3) else doPlayerAddOutfit(cid, maleOutfits[param][1], 3) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[1]) end else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, msg[2]) end end Olá, tenho esse script basico de ADDON para otserv.. Para receber seu addon é necessario um Addon Doll ( com ID 2112 ) Eu gostaria que alem deste item fosse necessario 1KK.. ID 2112 + 2160,100 Para que possa ser realizado cada um dos addons.. Alguem pode ajudar ? Server 8.60 Tfs 0.36
  23. Aew galeraa !! Estou com esses ERROS no meu distro .. Será que alguém pode me ajudar a removê los ? [15/01/2014 23:11:07] [Warning - Houses::loadFromXml] House entry not set for: Forgotten headquarter (Flat 1, Area 42) (95) [15/01/2014 23:11:07] [Warning - Houses::loadFromXml] House entry not set for: Forgotten headquarter (Flat 1, Area 42) (96) [15/01/2014 23:11:07] [Warning - Houses::loadFromXml] House entry not set for: Forgotten headquarter (Flat 1, Area 42) (97) [15/01/2014 23:11:07] [Warning - Houses::loadFromXml] House entry not set for: Forgotten headquarter (Flat 1, Area 42) (98) [15/01/2014 23:11:07] [Warning - Houses::loadFromXml] House entry not set for: Forgotten headquarter (Flat 1, Area 42) (99) [15/01/2014 23:11:07] [Warning - Houses::loadFromXml] House entry not set for: Forgotten headquarter (Flat 1, Area 42) (100) [15/01/2014 23:11:07] [Warning - Houses::loadFromXml] House entry not set for: Forgotten headquarter (Flat 1, Area 42) (101) [15/01/2014 23:11:07] [Warning - Houses::loadFromXml] House entry not set for: Forgotten headquarter (Flat 1, Area 42) (102) [15/01/2014 23:11:07] [Warning - Houses::loadFromXml] House entry not set for: Forgotten headquarter (Flat 1, Area 42) (103) [15/01/2014 23:11:07] [Warning - Houses::loadFromXml] House entry not set for: Forgotten headquarter (Flat 1, Area 42) (104) [15/01/2014 23:11:07] [Warning - Houses::loadFromXml] House entry not set for: Forgotten headquarter (Flat 1, Area 42) (105) [15/01/2014 23:11:07] [Warning - Houses::loadFromXml] House entry not set for: Forgotten headquarter (Flat 1, Area 42) (106) [15/01/2014 23:11:07] [Warning - Houses::loadFromXml] House entry not set for: Forgotten headquarter (Flat 1, Area 42) (118) [15/01/2014 23:11:07] [Warning - Houses::loadFromXml] House entry not set for: Forgotten headquarter (Flat 1, Area 42) (126) [15/01/2014 23:11:07] [Warning - Houses::loadFromXml] House entry not set for: Forgotten headquarter (Flat 1, Area 42) (160) Como resolver esses ERROS no meu distro ?????
  24. olá galera estou com uma duvida referentes a alguns servers. ainda vendo alguns servidores na versão 8.60 que possuem items das versões mais recentes do tibia.. mesmo usando A versão 8.60 e nao possuindo custom client.. eu gostaria de saber como eh possivel fazer isso.. Obrigado desde já !!

Informação Importante

Confirmação de Termo