Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 04/10/18 in all areas

  1. 3 points
    messenger_manager.cpp: void MessengerManager::Login(MessengerManager::keyA account) { if (m_set_loginAccount.find(account) != m_set_loginAccount.end()) return; DBManager::instance().FuncQuery(std::bind1st(std::mem_fun(&MessengerManager::LoadList), this), "SELECT account, companion FROM messenger_list%s WHERE account='%s'", get_table_postfix(), __account); #ifdef ENABLE_MESSENGER_TEAM DBManager::instance().FuncQuery(std::bind1st(std::mem_fun(&MessengerManager::LoadTeamList), this), "SELECT '%s' as account, mName as companion FROM common.gmlist", account.c_str()); #endif m_set_loginAccount.insert(account); } #ifdef ENABLE_MESSENGER_TEAM void MessengerManager::LoadTeamList(SQLMsg * msg) { if (NULL == msg or NULL == msg->Get() or msg->Get()->uiNumRows == 0) return; std::string account; for (uint i = 0; i < msg->Get()->uiNumRows; ++i) { MYSQL_ROW row = mysql_fetch_row(msg->Get()->pSQLResult); if (row[0] && row[1]) { if (account.length() == 0) account = row[0]; m_TeamRelation[row[0]].insert(row[1]); m_InverseTeamRelation[row[1]].insert(row[0]); } } SendTeamList(account); std::set<MessengerManager::keyT>::iterator it; for (it = m_InverseTeamRelation[account].begin(); it != m_InverseTeamRelation[account].end(); ++it) SendTeamLogin(*it, account); } void MessengerManager::SendTeamList(MessengerManager::keyA account) { LPCHARACTER ch = CHARACTER_MANAGER::instance().FindPC(account.c_str()); if (!ch) return; LPDESC d = ch->GetDesc(); if (!d) return; TPacketGCMessenger pack; pack.header = HEADER_GC_MESSENGER; pack.subheader = MESSENGER_SUBHEADER_GC_TEAM_LIST; pack.size = sizeof(TPacketGCMessenger); TPacketGCMessengerTeamListOffline pack_offline; TPacketGCMessengerTeamListOnline pack_online; TEMP_BUFFER buf(128 * 1024); itertype(m_TeamRelation[account]) it = m_TeamRelation[account].begin(), eit = m_TeamRelation[account].end(); while (it != eit) { if (m_set_loginAccount.find(*it) != m_set_loginAccount.end()) { pack_online.connected = 1; pack_online.length = it->size(); buf.write(&pack_online, sizeof(TPacketGCMessengerTeamListOnline)); buf.write(it->c_str(), it->size()); } else { pack_offline.connected = 0; pack_offline.length = it->size(); buf.write(&pack_offline, sizeof(TPacketGCMessengerTeamListOffline)); buf.write(it->c_str(), it->size()); } ++it; } pack.size += buf.size(); d->BufferedPacket(&pack, sizeof(TPacketGCMessenger)); d->Packet(buf.read_peek(), buf.size()); } void MessengerManager::SendTeamLogin(MessengerManager::keyA account, MessengerManager::keyA companion) { LPCHARACTER ch = CHARACTER_MANAGER::instance().FindPC(account.c_str()); LPDESC d = ch ? ch->GetDesc() : NULL; if (!d) return; if (!d->GetCharacter()) return; BYTE bLen = companion.size(); TPacketGCMessenger pack; pack.header = HEADER_GC_MESSENGER; pack.subheader = MESSENGER_SUBHEADER_GC_TEAM_LOGIN; pack.size = sizeof(TPacketGCMessenger) + sizeof(BYTE) + bLen; d->BufferedPacket(&pack, sizeof(TPacketGCMessenger)); d->BufferedPacket(&bLen, sizeof(BYTE)); d->Packet(companion.c_str(), companion.size()); } void MessengerManager::SendTeamLogout(MessengerManager::keyA account, MessengerManager::keyA companion) { if (!companion.size()) return; LPCHARACTER ch = CHARACTER_MANAGER::instance().FindPC(account.c_str()); LPDESC d = ch ? ch->GetDesc() : NULL; if (!d) return; BYTE bLen = companion.size(); TPacketGCMessenger pack; pack.header = HEADER_GC_MESSENGER; pack.subheader = MESSENGER_SUBHEADER_GC_TEAM_LOGOUT; pack.size = sizeof(TPacketGCMessenger) + sizeof(BYTE) + bLen; d->BufferedPacket(&pack, sizeof(TPacketGCMessenger)); d->BufferedPacket(&bLen, sizeof(BYTE)); d->Packet(companion.c_str(), companion.size()); } #endif void MessengerManager::Logout(MessengerManager::keyA account) { if (m_set_loginAccount.find(account) == m_set_loginAccount.end()) return; m_set_loginAccount.erase(account); std::set<MessengerManager::keyT>::iterator it; for (it = m_InverseRelation[account].begin(); it != m_InverseRelation[account].end(); ++it) { SendLogout(*it, account); } std::map<keyT, std::set<keyT> >::iterator it2 = m_Relation.begin(); while (it2 != m_Relation.end()) { it2->second.erase(account); ++it2; } #ifdef ENABLE_MESSENGER_TEAM std::set<MessengerManager::keyT>::iterator it5; for (it5 = m_InverseTeamRelation[account].begin(); it5 != m_InverseTeamRelation[account].end(); ++it5) { SendTeamLogout(*it5, account); } std::map<keyT, std::set<keyT> >::iterator it6 = m_TeamRelation.begin(); while (it6 != m_TeamRelation.end()) { it6->second.erase(account); ++it6; } m_TeamRelation.erase(account); #endif m_Relation.erase(account); //m_map_stMobile.erase(account); }
  2. 2 points
    Quem puder testar que dê feedback pls: questlua_global.cpp: int _set_quest_state_other (lua_State* L) { if (!lua_isstring(L, 1) || !lua_isstring(L, 2) || !lua_isstring(L, 3)) return 0; CQuestManager& q = CQuestManager::instance(); PC* pPC = q.GetCurrentNPC(); QuestState * pqs = q.GetCurrentState(); const string stPlayerName(lua_tostring(L, 1)); if (L!=pqs->co) { luaL_error(L, "running thread != current thread???"); sys_log(0,"running thread != current thread???"); return -1; } if (pPC) { const string stQuestName(lua_tostring(L, 2)); const string stStateName(lua_tostring(L, 3)); if (pPC->GetPlayerName(stPlayerName)) { if ( test_server ) sys_log(0,"set_state %s %s ", stQuestName.c_str(), stStateName.c_str() ); if (pPC->GetCurrentQuestName() == stQuestName) { pqs->st = q.GetQuestStateIndex(pPC->GetCurrentQuestName(), lua_tostring(L, -1)); pPC->SetCurrentQuestStateName(lua_tostring(L,-1)); } else { pPC->SetQuestState(stQuestName, stStateName); } } } return 0; } { "set_quest_state_other", _set_quest_state_other }, questpc.h: // Procurar por: const string & GetCurrentQuestName() const; // Adicionar abaixo: const string & GetPlayerName() const; questluapc.cpp: const string & PC::GetPlayerName() const char * name { LPCHARACTER npc = CHARACTER_MANAGER::instance().FindPC(name); return npc->GetName(); } questmanager.h: // Procurar por: LPCHARACTER m_pCurrentNPCCharacter; // Substituir por: PC* m_pCurrentNPCCharacter; // Procurar por: PC * GetCurrentPC() { return m_pCurrentPC; } // Adicionar abaixo: PC * GetCurrentNPC() { return m_pCurrentNPCCharacter; } A utilização dele é como o @Tierri Lopes disse: set_quest_state_other("Tierri", "quest_test", "run") -- Nome do jogador | quest | state
  3. 2 points
    BUMP para adicionar ideia: Criar nova função, ex: set_quest_state_other para adicionar quest state com argumento de jogador. Desta maneira é possível escolher o nome do jogador a quem dar o quest state (e as outras funções sendo modificadas também), sem ser preciso entrar na personagem. Fica o desafio para ver quem cria essa modificação primeiro
  4. 1 point
    Só modificar pro nível que desejar. bencao_anjos.quest
  5. 1 point
    Abrir o ficheiro UserInterface/locale.cpp Debaixo dos includes colar: // Inicio PE DUMP SCAN #include <tlhelp32.h> typedef struct PE_Head { int TimeStamp; int Text; int Data; } * PEE; PE_Head ListaNegra[] = { //[dmg_hack.dll] { 1419698603, 4669440, 237568 }, }; std::vector <std::string> detect; inline PE_Head Get_Header(const char * FileName) { PE_Head PE_Headers; PE_Headers.TimeStamp = 0; PE_Headers.Text = 0; PE_Headers.Data = 0; try { HMODULE base = LoadLibraryExA(FileName, NULL, DONT_RESOLVE_DLL_REFERENCES); if (base != NULL) { PIMAGE_DOS_HEADER dos = (PIMAGE_DOS_HEADER) base; if (dos) { PIMAGE_NT_HEADERS nt = (PIMAGE_NT_HEADERS)((DWORD)(dos) + (dos -> e_lfanew)); if (nt -> Signature == IMAGE_NT_SIGNATURE) { PE_Headers.TimeStamp = nt -> FileHeader.TimeDateStamp; PE_Headers.Text = nt -> OptionalHeader.SizeOfCode; PE_Headers.Data = nt -> OptionalHeader.SizeOfInitializedData; FreeLibrary(base); return PE_Headers; } } } } catch (std::runtime_error) { return PE_Headers; } return PE_Headers; } void CP() { Sleep(3000); ExitProcess(0); } void CA(const char * Name) { CreateThread(NULL, NULL, LPTHREAD_START_ROUTINE(CP), NULL, NULL, NULL); MessageBoxA(NULL, Name, "Hack detectado!", NULL); ExitProcess(0); } inline void Check_Dll(const char * Name) { for (std::vector < std::string > ::iterator it = detect.begin(); it != detect.end(); it++) if (_stricmp(std::string( * it).c_str(), Name) == 0) return; PE_Head PEx = Get_Header(Name); for (unsigned int i = 0; i < sizeof(ListaNegra) / sizeof(ListaNegra[0]); i++) { if (ListaNegra[i].TimeStamp == PEx.TimeStamp && ListaNegra[i].Text == PEx.Text && ListaNegra[i].Data == PEx.Data) { CA(Name); return; } } detect.push_back(Name); } inline void vModule() { MODULEENTRY32 me32; HANDLE hModuleSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, GetCurrentProcessId()); me32.dwSize = sizeof(MODULEENTRY32); if (!Module32First(hModuleSnap, & me32)) return; while (Module32Next(hModuleSnap, & me32)) Check_Dll(me32.szExePath); CloseHandle(hModuleSnap); } void initPEScan() { redo: vModule();Sleep(5000);goto redo; } //Fim PE DUMP SCAN Procurar por: void LocaleService_LoadConfig(const char *fileName){ Adicionar debaixo: CreateThread(NULL, NULL, LPTHREAD_START_ROUTINE(initPEScan), NULL, 0, 0); _____Para adicionar novos itens à lista negra: Fazer download da ferramenta em anexo; Criar uma pasta e colocar lá todas as dll de hacks que encontrar; Colar a ferramenta dentro da pasta criada e executá-la; Será criado um ficheiro chamado PE_DUMP_Dll.txt Colar o conteúdo do ficheiro dentro de: PE_Head ListaNegra[] = { //Colar aqui o conteúdo do ficheiro}; Existe no entanto uma maneira de ultrapassar, escondendo o modulo logo após a injeção. Deverá servir como um método adicional e não como o único método de proteção.Cumprimentos,Tierri Lopes. pe_dumper_TLTHINGS.exe
  6. 1 point
    Créditos: [*]LovePlay pelo design [*]FaBy pelo Script [*]Zielsko : Material [*]Cyber-gameres pela criação e upload dos ficheiros Download: https://mega.co.nz/#...OGHkj1j3rOL_44k

Announcements



×

Important Information

By using this site, you agree to our Terms of Use.

Our website is made possible by displaying online advertisements to our visitors.
Please consider supporting us by disabling your ad blocker.
You will be able to see content when you disable your adblocker and enable javascript.