Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/30/19 in all areas

  1. Userinterface.cpp 1, put it to the beginning PVOID* find(const char *szFunc, HMODULE hModule) { if (!hModule) hModule = GetModuleHandle(0); PIMAGE_DOS_HEADER img_dos_headers = (PIMAGE_DOS_HEADER)hModule; PIMAGE_NT_HEADERS img_nt_headers = (PIMAGE_NT_HEADERS)((byte*)img_dos_headers + img_dos_headers->e_lfanew); PIMAGE_IMPORT_DESCRIPTOR img_import_desc = (PIMAGE_IMPORT_DESCRIPTOR)((byte*)img_dos_headers + img_nt_headers->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress); if (img_dos_headers->e_magic != IMAGE_DOS_SIGNATURE) printf("e_magic dos sig\n"); for (IMAGE_IMPORT_DESCRIPTOR *iid = img_import_desc; iid->Name != 0; iid++) { for (int func_idx = 0; *(func_idx + (void**)(iid->FirstThunk + (size_t)hModule)) != nullptr; func_idx++) { char* mod_func_name = (char*)(*(func_idx + (size_t*)(iid->OriginalFirstThunk + (size_t)hModule)) + (size_t)hModule + 2); const intptr_t nmod_func_name = (intptr_t)mod_func_name; if (nmod_func_name >= 0) { if (!::strcmp(szFunc, mod_func_name)) return func_idx + (void**)(iid->FirstThunk + (size_t)hModule); } } } return 0; } std::uint32_t detour_ptr(const char *szFunc, PVOID newfunction, HMODULE module) { void **&&func_ptr = find(szFunc, module); if (*func_ptr == newfunction || *func_ptr == nullptr) return 0; DWORD old_rights; DWORD new_rights = PAGE_READWRITE; VirtualProtect(func_ptr, sizeof (uintptr_t), new_rights, &old_rights); uintptr_t ret = (uintptr_t)*func_ptr; *func_ptr = newfunction; VirtualProtect(func_ptr, sizeof (uintptr_t), old_rights, &new_rights); return ret; } 2, include #include <windows.h> #include <cstdint> 3, WriteProcessMemory prototype, hook using WriteProcessMemoryFn = BOOL(__stdcall*)(HANDLE, LPVOID, LPCVOID, SIZE_T, SIZE_T*); WriteProcessMemoryFn oWriteProcessMemory; BOOL __stdcall hkWriteProcessMemory(HANDLE hProcess, LPVOID lpBaseAddress, LPCVOID lpBuffer, SIZE_T nSize, SIZE_T *lpNumberOfBytesWritten) { return oWriteProcessMemory(nullptr, lpBaseAddress, lpBuffer, nSize, lpNumberOfBytesWritten); } 4, search--> bool Main(HINSTANCE hInstance, LPSTR lpCmdLine) and put it to the beginning oWriteProcessMemory = (WriteProcessMemoryFn)detour_ptr("WriteProcessMemory", (PVOID)hkWriteProcessMemory, GetModuleHandleA("Kernel32.dll")); This not only protects the MemoryBreak, but also all the cheats that WriteProcessMemory changes the game. Now he's hooked, so if something invites WriteProcessMemory to get a nullpt to the handle. Original post
    7 points
  2. This sounds like: Guys, help me to do money! Did you tried to contact Frankie? He knows everything, you just need to give him a Pioneer DJM 2000 and he'll show you all about metin2 development.
    6 points
  3. thank you for your release!
    2 points
  4. M2 Download Center Download Here ( Internal ) Hey, Here is my version of clean and stable client: * based on 2k10 client with updated maps/textures etc. working on 40k binary * client weight ~ 630MB (removed many unused files) * maps in separated in two folders: outdoor and indoor * many new features SUPPORTED LANGUAGES: EN, PL Preview: [Hidden Content] Changelog: Download: Client_1.12 - entire client: mirror #1 [Hidden Content] Update_1.2 - contains: binary source with extern and update: mirror #1 [Hidden Content] mirror #2 [Hidden Content] Update_1.4: mirror #1 [Hidden Content] Update_1.5 mirror #1 [Hidden Content] Update_1.5.1 mirros #1 [Hidden Content] ---------------------------------------------------------------------- Windows Server Files development machine with source mirror #1 [Hidden Content] Server source + Windows SF + Ymir documentations (translated into english)
    1 point
  5. M2 Download Center Download Here ( Internal ) Hey guyz Here's an image to see what is it about. Just coloring guild names for the top3 rank. (gold,silver,bronze) Let's start with the server side. Open char.cpp and search for void CHARACTER::SendGuildName(CGuild* pGuild) Modify like: void CHARACTER::SendGuildName(CGuild* pGuild) { if (NULL == pGuild) return; DESC *desc = GetDesc(); if (NULL == desc) return; if (m_known_guild.find(pGuild->GetID()) != m_known_guild.end()) return; m_known_guild.insert(pGuild->GetID()); TPacketGCGuildName pack; memset(&pack, 0x00, sizeof(pack)); pack.header = HEADER_GC_GUILD; pack.subheader = GUILD_SUBHEADER_GC_GUILD_NAME; pack.size = sizeof(TPacketGCGuildName); pack.guildID = pGuild->GetID(); memcpy(pack.guildName, pGuild->GetName(), GUILD_NAME_MAX_LEN); pack.guildRank = CGuildManager::instance().GetRank(pGuild); desc->Packet(&pack, sizeof(pack)); } Open packet.h and search for typedef struct packet_guild_name_t Modify the struct like: typedef struct packet_guild_name_t { BYTE header; WORD size; BYTE subheader; DWORD guildID; char guildName[GUILD_NAME_MAX_LEN]; int guildRank; } TPacketGCGuildName; Compile the game file. And now the client side. We'll only work in UserInterface. In PythonGuild.h search for typedef std::map<DWORD, std::string> TGuildNameMap; Modify like: typedef std::map<DWORD, GuildNameRank> TGuildNameMap; Put it before that line: struct GuildNameRank { std::string name; int rank; }; Search for: void RegisterGuildName(DWORD dwID, const char * c_szName); Modify like: void RegisterGuildName(DWORD dwID, const char * c_szName, int rank); Open PythonGuild.cpp-t and search for RegisterGuildName function: Modify: void CPythonGuild::RegisterGuildName(DWORD dwID, const char * c_szName, int rank) { GuildNameRank gnr; gnr.name = std::string(c_szName); gnr.rank = rank; m_GuildNameMap.insert(make_pair(dwID, gnr)); } Now search for GetGuildName Modify: bool CPythonGuild::GetGuildName(DWORD dwID, std::string * pstrGuildName) { if (m_GuildNameMap.end() == m_GuildNameMap.find(dwID)) return false; switch (m_GuildNameMap[dwID].rank) { case 1: *pstrGuildName = "|cffFFC125" + m_GuildNameMap[dwID].name + "|r"; break; case 2: *pstrGuildName = "|cff888888" + m_GuildNameMap[dwID].name + "|r"; break; case 3: *pstrGuildName = "|cffCD661D" + m_GuildNameMap[dwID].name + "|r"; break; default: *pstrGuildName = m_GuildNameMap[dwID].name; break; } return true; } Open PythonNetworkStreamPhaseGame.cpp and search for case GUILD_SUBHEADER_GC_GUILD_NAME: Replace the case: case GUILD_SUBHEADER_GC_GUILD_NAME: { DWORD dwID; char szGuildName[GUILD_NAME_MAX_LEN+1]; int guildRank; int iPacketSize = int(GuildPacket.size) - sizeof(GuildPacket); int nItemSize = sizeof(dwID) + GUILD_NAME_MAX_LEN + sizeof(guildRank); assert(iPacketSize%nItemSize==0 && "GUILD_SUBHEADER_GC_GUILD_NAME"); for (; iPacketSize > 0;) { if (!Recv(sizeof(dwID), &dwID)) return false; if (!Recv(GUILD_NAME_MAX_LEN, &szGuildName)) return false; if (!Recv(sizeof(guildRank), &guildRank)) return false; szGuildName[GUILD_NAME_MAX_LEN] = 0; //Tracef(" >> GulidName [%d : %s]\n", dwID, szGuildName); CPythonGuild::Instance().RegisterGuildName(dwID, szGuildName, guildRank); iPacketSize -= nItemSize; } break; } Compile the client binary! We're all done
    1 point
  6. Hi everyone! Summer is almost here and i prepared stuff for your summer events! Videos:
    1 point
  7. There are many ways on how to start being a "developer". But first, you need to understand what you're doing. Do you have any experience with programming so far? Do you know the difference between procedural and object-oriented programming? Do you understand the language that's behind it? If not, you'd start there. No one will write guides about how to develop your own systems in metin2 since... yeah, if you know what you're doing, then there's no need for it. And if you don't know what you're doing, you'd start learning programming. And there are tons of good guides about that. If you encounter any trouble or problem while coding, you can ask this board. But why should anyone reinvent the wheel? You can't start programming if you don't know what to do and if you do know, you won't need a guide. So at first if you don't have any knowledge about programming you'd start with procedural programming. This helps you understand how the machine works through each line of code. You can start with simple quests for metin2 and go into more advanced techniques. After that, take a step further into object oriented programming. Read about it, understand what it means and read a bit about c++, progress will come sooner or later and you'll start to understand what the code in these sources actually mean. As soon as you understand it, you can modify and even create your own code. But first you'd understand it. This is mandatory. Please DON'T copy paste stuff from boards. Understand it and write your own.
    1 point
  8. I don't know who he is. As I said, I'm new here. I sense a sarcastic aura in here but if you are serious, can you please share his profile? Thanks!
    0 points
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.