├── .gitattributes ├── .gitignore ├── Classes ├── GUI Class.h ├── Init Class.h ├── Metin2 Class.h └── Strings.h ├── InviDropper ├── InviDropper.sln └── InviDropper │ ├── GUI-Funcs.h │ ├── GUI-Variables.h │ ├── GUI.h │ ├── Init.cpp │ ├── InviDropper.h │ ├── InviDropper.rc │ ├── InviDropper.vcxproj │ ├── InviDropper.vcxproj.filters │ ├── Variables.h │ └── resource.h ├── LICENSE ├── PickUp-Bot ├── PickUp-Bot.sln └── PickUp-Bot │ ├── GUI-Funcs.h │ ├── GUI-Variables.h │ ├── GUI.h │ ├── Init.cpp │ ├── PickUp-Bot.h │ ├── PickUp-Bot.rc │ ├── PickUp-Bot.vcxproj │ ├── PickUp-Bot.vcxproj.filters │ ├── Variables.h │ └── resource.h ├── README.md ├── SendAttackToTarget ├── SendAttackToTarget.sln └── SendAttackToTarget │ ├── GUI-Funcs.h │ ├── GUI-Variables.h │ ├── GUI.h │ ├── Init.cpp │ ├── SendAttackToTarget.rc │ ├── SendAttackToTarget.vcxproj │ ├── SendAttackToTarget.vcxproj.filters │ ├── TesTProjekt.h │ ├── Variables.h │ └── resource.h ├── Spam-Bot ├── Spam-Bot.sln └── Spam-Bot │ ├── GUI-Funcs.h │ ├── GUI-Variables.h │ ├── GUI.h │ ├── Init.cpp │ ├── Spam-Bot.h │ ├── Spam-Bot.rc │ ├── Spam-Bot.vcxproj │ ├── Spam-Bot.vcxproj.filters │ ├── Variables.h │ └── resource.h ├── Switch-Bot ├── Switch-Bot.sln └── Switch-Bot │ ├── GUI-Funcs.h │ ├── GUI-Variables.h │ ├── GUI.h │ ├── Init.cpp │ ├── Switch-Bot.h │ ├── Switch-Bot.rc │ ├── Switch-Bot.vcxproj │ ├── Switch-Bot.vcxproj.filters │ ├── Variables.h │ └── resource.h └── Upp-Tool ├── Upp-Tool.sln └── Upp-Tool ├── GUI-Funcs.h ├── GUI-Variables.h ├── GUI.h ├── Init.cpp ├── Upp-Tool.h ├── Upp-Tool.rc ├── Upp-Tool.vcxproj ├── Upp-Tool.vcxproj.filters ├── Variables.h └── resource.h /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.sln.docstates 8 | 9 | # Build results 10 | [Dd]ebug/ 11 | [Dd]ebugPublic/ 12 | [Rr]elease/ 13 | x64/ 14 | build/ 15 | bld/ 16 | [Bb]in/ 17 | [Oo]bj/ 18 | 19 | # MSTest test Results 20 | [Tt]est[Rr]esult*/ 21 | [Bb]uild[Ll]og.* 22 | 23 | #NUNIT 24 | *.VisualState.xml 25 | TestResult.xml 26 | 27 | # Build Results of an ATL Project 28 | [Dd]ebugPS/ 29 | [Rr]eleasePS/ 30 | dlldata.c 31 | 32 | *_i.c 33 | *_p.c 34 | *_i.h 35 | *.ilk 36 | *.meta 37 | *.obj 38 | *.pch 39 | *.pdb 40 | *.pgc 41 | *.pgd 42 | *.rsp 43 | *.sbr 44 | *.tlb 45 | *.tli 46 | *.tlh 47 | *.tmp 48 | *.tmp_proj 49 | *.log 50 | *.vspscc 51 | *.vssscc 52 | .builds 53 | *.pidb 54 | *.svclog 55 | *.scc 56 | 57 | # Chutzpah Test files 58 | _Chutzpah* 59 | 60 | # Visual C++ cache files 61 | ipch/ 62 | *.aps 63 | *.ncb 64 | *.opensdf 65 | *.sdf 66 | *.cachefile 67 | 68 | # Visual Studio profiler 69 | *.psess 70 | *.vsp 71 | *.vspx 72 | 73 | # TFS 2012 Local Workspace 74 | $tf/ 75 | 76 | # Guidance Automation Toolkit 77 | *.gpState 78 | 79 | # ReSharper is a .NET coding add-in 80 | _ReSharper*/ 81 | *.[Rr]e[Ss]harper 82 | *.DotSettings.user 83 | 84 | # JustCode is a .NET coding addin-in 85 | .JustCode 86 | 87 | # TeamCity is a build add-in 88 | _TeamCity* 89 | 90 | # DotCover is a Code Coverage Tool 91 | *.dotCover 92 | 93 | # NCrunch 94 | *.ncrunch* 95 | _NCrunch_* 96 | .*crunch*.local.xml 97 | 98 | # MightyMoose 99 | *.mm.* 100 | AutoTest.Net/ 101 | 102 | # Web workbench (sass) 103 | .sass-cache/ 104 | 105 | # Installshield output folder 106 | [Ee]xpress/ 107 | 108 | # DocProject is a documentation generator add-in 109 | DocProject/buildhelp/ 110 | DocProject/Help/*.HxT 111 | DocProject/Help/*.HxC 112 | DocProject/Help/*.hhc 113 | DocProject/Help/*.hhk 114 | DocProject/Help/*.hhp 115 | DocProject/Help/Html2 116 | DocProject/Help/html 117 | 118 | # Click-Once directory 119 | publish/ 120 | 121 | # Publish Web Output 122 | *.[Pp]ublish.xml 123 | *.azurePubxml 124 | 125 | # NuGet Packages Directory 126 | packages/ 127 | ## TODO: If the tool you use requires repositories.config uncomment the next line 128 | #!packages/repositories.config 129 | 130 | # Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets 131 | # This line needs to be after the ignore of the build folder (and the packages folder if the line above has been uncommented) 132 | !packages/build/ 133 | 134 | # Windows Azure Build Output 135 | csx/ 136 | *.build.csdef 137 | 138 | # Windows Store app package directory 139 | AppPackages/ 140 | 141 | # Others 142 | sql/ 143 | *.Cache 144 | ClientBin/ 145 | [Ss]tyle[Cc]op.* 146 | ~$* 147 | *~ 148 | *.dbmdl 149 | *.dbproj.schemaview 150 | *.pfx 151 | *.publishsettings 152 | node_modules/ 153 | 154 | # RIA/Silverlight projects 155 | Generated_Code/ 156 | 157 | # Backup & report files from converting an old project file to a newer 158 | # Visual Studio version. Backup files are not needed, because we have git ;-) 159 | _UpgradeReport_Files/ 160 | Backup*/ 161 | UpgradeLog*.XML 162 | UpgradeLog*.htm 163 | 164 | # SQL Server files 165 | *.mdf 166 | *.ldf 167 | 168 | # Business Intelligence projects 169 | *.rdl.data 170 | *.bim.layout 171 | *.bim_*.settings 172 | 173 | # Microsoft Fakes 174 | FakesAssemblies/ 175 | 176 | # ========================= 177 | # Operating System Files 178 | # ========================= 179 | 180 | # OSX 181 | # ========================= 182 | 183 | .DS_Store 184 | .AppleDouble 185 | .LSOverride 186 | 187 | # Icon must ends with two \r. 188 | Icon 189 | 190 | # Thumbnails 191 | ._* 192 | 193 | # Files that might appear on external disk 194 | .Spotlight-V100 195 | .Trashes 196 | 197 | # Windows 198 | # ========================= 199 | 200 | # Windows image file caches 201 | Thumbs.db 202 | ehthumbs.db 203 | 204 | # Folder config file 205 | Desktop.ini 206 | 207 | # Recycle Bin used on file shares 208 | $RECYCLE.BIN/ 209 | 210 | # Windows Installer files 211 | *.cab 212 | *.msi 213 | *.msm 214 | *.msp 215 | -------------------------------------------------------------------------------- /Classes/GUI Class.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "Variables.h" 4 | #include "..\..\Classes\Strings.h" 5 | #include "GUI-Variables.h" 6 | 7 | #pragma comment(lib, "comctl32.lib") 8 | 9 | HFONT hFont; 10 | HINSTANCE hPInstance; 11 | HWND WindowHandle; 12 | 13 | LRESULT CALLBACK WndThread(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam); 14 | 15 | int MessageLoop() 16 | { 17 | MSG msg; 18 | while (GetMessage(&msg, 0, 0, 0)) 19 | { 20 | TranslateMessage(&msg); 21 | DispatchMessage(&msg); 22 | } 23 | DeleteObject(hFont); 24 | return msg.wParam; 25 | } 26 | 27 | void RegisterClasses() 28 | { 29 | WNDCLASS wc; 30 | wc.cbClsExtra = 0; 31 | wc.cbWndExtra = 0; 32 | wc.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1); 33 | wc.hCursor = LoadCursor(0, IDC_ARROW); 34 | wc.hIcon = LoadIcon(0, IDI_APPLICATION); 35 | wc.hInstance = hPInstance; 36 | wc.lpszMenuName = 0; 37 | wc.style = CS_PARENTDC | CS_DBLCLKS; 38 | wc.lpfnWndProc = WndThread; 39 | wc.lpszClassName = WND_CLASS_NAME; 40 | 41 | RegisterClass(&wc); 42 | } -------------------------------------------------------------------------------- /Classes/Init Class.h: -------------------------------------------------------------------------------- 1 | #if !defined(InviDropper) 2 | #include 3 | #endif 4 | #include 5 | #if !defined(InviDropper) 6 | #include 7 | #include 8 | #include 9 | #endif 10 | 11 | char TBD[256]; 12 | #if !defined(InviDropper) 13 | #include 14 | #include 15 | #include 16 | 17 | EXTERN_C IMAGE_DOS_HEADER __ImageBase; 18 | 19 | char IniPath[2048], IniFullPath[2048]; 20 | char ServerName[2048], WorkingDir[2048]; 21 | int iClientMod; 22 | HANDLE hProcess; 23 | DWORD ProcessID; 24 | 25 | std::string GetEditText(HWND hControl); 26 | #endif 27 | std::string to_hexstring(unsigned int _Val); 28 | 29 | 30 | __forceinline bool DataCompare(const unsigned char* address, const unsigned char* signature, const char* mask); 31 | DWORD FindPatternInternal(const unsigned char* address, size_t size, const unsigned char* signature, const char* mask, unsigned short ignore); 32 | DWORD FindPattern(const unsigned char* address, size_t size, const unsigned char* signature, const char* mask, unsigned short ignore); 33 | DWORD RelativeToAbsolute(DWORD Offset); 34 | 35 | #if !defined(InviDropper) 36 | BOOL CheckIni(BOOL Loading); 37 | bool ForceValidation(bool bAsk); 38 | bool ValidateIni(); 39 | void SetNewIniLocation(char OldLocation[2048]); 40 | #endif 41 | void PrintDbg(std::string sText, std::string sTitle); 42 | void InitComponents(); 43 | void SetAddies(); 44 | 45 | #include "..\..\Classes\GUI Class.h" 46 | #include "..\..\Classes\Metin2 Class.h" 47 | #include "GUI.h" 48 | 49 | #if !defined(InviDropper) 50 | #pragma comment(lib, "Shlwapi.lib") 51 | #pragma comment(lib, "Psapi.lib") 52 | #endif 53 | #pragma comment(lib, "Version.lib") 54 | 55 | #if (!XP) 56 | #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") 57 | #endif 58 | 59 | __declspec(dllexport) BOOL WINAPI Init() 60 | { 61 | return 0; 62 | } 63 | 64 | std::string to_hexstring(unsigned int _Val) 65 | { 66 | char _Buf[2 * _MAX_INT_DIG]; 67 | _CSTD _TOSTRING(_Buf, "%x", _Val); 68 | return (std::string(_Buf)); 69 | } 70 | 71 | #if (DbgSession) 72 | void PrintDbg(std::string sText, std::string sTitle) 73 | { 74 | MessageBox(0, sText.c_str(), sTitle.c_str(), MB_ICONASTERISK); 75 | return; 76 | } 77 | #endif 78 | 79 | #if !defined(InviDropper) 80 | std::string GetEditText(HWND hControl) 81 | { 82 | char tValue[2048]; 83 | GetWindowText(hControl, tValue, 2048); 84 | return (std::string)tValue; 85 | } 86 | 87 | BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lparam) 88 | { 89 | char *toIgnore[] = {"", "DIEmWin"}; 90 | char buffer[256]; 91 | DWORD id = 0; 92 | GetWindowThreadProcessId(hwnd, &id); 93 | if (ProcessID == id) 94 | { 95 | GetWindowText(hwnd, buffer, 255); 96 | for (int i = 0; i < _countof(toIgnore);i++) 97 | { 98 | if (StrCmp(buffer, toIgnore[i]) == 0) 99 | return true; 100 | 101 | } 102 | GetWindowText(hwnd, ServerName, 2048); 103 | return false; 104 | } 105 | 106 | return true; 107 | } 108 | 109 | bool GetServerNameByModule() 110 | { 111 | //forbidden 112 | const char *Replacements[] = {"metin2", "mt2", " ", ",", "64bit", "client", "starter", "vista", "win7", "win8", "-"}; 113 | std::regex e = (std::regex)"^\\S{3,}mt\\d?$"; 114 | //bool bReplaced = false; 115 | std::string PName, tPName; 116 | std::smatch m; 117 | 118 | GetModuleFileName(0, ServerName, 2048); 119 | PathStripPath(ServerName); 120 | PathRemoveExtension(ServerName); 121 | 122 | PName = ServerName; 123 | sprintf_s(TBD, "M-%s", PName.c_str()); 124 | tPName = PName; 125 | std::transform(tPName.begin(), tPName.end(), tPName.begin(), tolower); 126 | if (std::regex_search(PName, m, e)) 127 | { 128 | sprintf_s(ServerName, 2048, "%s\0", PName.c_str()); 129 | sprintf_s(TBD, "#M-%s", PName.c_str()); 130 | return true; 131 | } 132 | if (tPName.find(Replacements[0]) == std::string::npos && tPName.find(Replacements[1]) == std::string::npos) 133 | { 134 | for (int i = 0;i < _countof(Replacements);i++) 135 | { 136 | if (tPName.length()) 137 | { 138 | int Pos = tPName.find(Replacements[i]); 139 | if (Pos != std::string::npos) 140 | { 141 | if (i == _countof(Replacements) - 1 && Pos != PName.length() - 1)//last replacement and not last pos 142 | break; 143 | PName.erase(Pos, strlen(Replacements[i])); 144 | tPName = PName; 145 | std::transform(tPName.begin(), tPName.end(), tPName.begin(), tolower); 146 | //bReplaced = true; 147 | i--; 148 | } 149 | } 150 | else 151 | return false; 152 | } 153 | PName[0] = toupper(PName[0]); 154 | sprintf_s(ServerName, 2048, "%s\0", PName.c_str()); 155 | 156 | sprintf_s(TBD, "#M-%s", PName.c_str()); 157 | return true; 158 | } 159 | return false; 160 | } 161 | 162 | bool GetServerNameByWindow() 163 | { 164 | const char *Replacements[] = {"metin2", "client", "starter", "pvp", "fun", ",", ":", ".", "!"}; 165 | const char *e[4] = {"\\d{2,}", "\\s\\S{1}\\s", "\\s", "\\S{2,}\\-\\S{3,}"}; 166 | std::smatch m; 167 | //bool bReplaced = false; 168 | std::string PName, tPName; 169 | sprintf_s(ServerName, ""); 170 | while (StrCmp(ServerName, "") == 0) 171 | { 172 | EnumDesktopWindows(0, &EnumWindowsProc, 0); 173 | Sleep(1000); 174 | } 175 | 176 | sprintf_s(TBD, "W-%s", PName.c_str()); 177 | PName = ServerName; 178 | tPName = PName; 179 | std::transform(tPName.begin(), tPName.end(), tPName.begin(), tolower); 180 | if (tPName.find(Replacements[0]) == std::string::npos) 181 | { 182 | for (int i = 0;i < _countof(Replacements);i++) 183 | { 184 | if (tPName.length()) 185 | { 186 | int Pos = tPName.find(Replacements[i]); 187 | if (Pos != std::string::npos) 188 | { 189 | PName.erase(Pos, Pos + strlen(Replacements[i])); 190 | tPName = PName; 191 | std::transform(tPName.begin(), tPName.end(), tPName.begin(), tolower); 192 | //bReplaced = true; 193 | } 194 | } 195 | else 196 | return false; 197 | } 198 | 199 | if (std::regex_search(PName, m, (std::regex)e[3])) 200 | PName = m[0]; 201 | PName[0] = toupper(PName[0]); 202 | sprintf_s(ServerName, 2048, "%s\0", PName.c_str()); 203 | 204 | sprintf_s(TBD, "#W-%s", PName.c_str()); 205 | return true; 206 | } 207 | return false; 208 | } 209 | 210 | bool GetServerName() 211 | { 212 | if (GetServerNameByModule()) 213 | return true; 214 | else if (GetServerNameByWindow()) 215 | return true; 216 | 217 | return false; 218 | } 219 | #endif 220 | 221 | DWORD GetModuleSize() 222 | { 223 | DWORD ModuleSize; 224 | 225 | DWORD Base = (DWORD)hPInstance; 226 | DWORD PEOffset = *(DWORD*)(Base + 0x3C); 227 | 228 | MODULEINFO module_info; 229 | memset(&module_info, 0, sizeof(module_info)); 230 | if (GetModuleInformation(GetCurrentProcess(), hPInstance, &module_info, sizeof(module_info))) 231 | ModuleSize = module_info.SizeOfImage; 232 | else 233 | ModuleSize = *(DWORD*)(Base + PEOffset + 0x1C) + Base; 234 | 235 | return ModuleSize - 0x1000; 236 | } 237 | 238 | __forceinline bool DataCompare(const unsigned char* address, const unsigned char* signature, const char* mask) 239 | { 240 | while (*mask) 241 | { 242 | if (*reinterpret_cast(mask) == 'xxxx') 243 | { 244 | if (*reinterpret_cast(address) != *reinterpret_cast(signature)) 245 | return false; 246 | 247 | address += 4; 248 | signature += 4; 249 | mask += 4; 250 | continue; 251 | } 252 | else if (*reinterpret_cast(mask) == 'xx') 253 | { 254 | if (*reinterpret_cast(address) != *reinterpret_cast(signature)) 255 | return false; 256 | 257 | address += 2; 258 | signature += 2; 259 | mask += 2; 260 | continue; 261 | } 262 | else if(*mask == 'x' && *address != *signature) 263 | { 264 | return false; 265 | } 266 | 267 | ++address; 268 | ++signature; 269 | ++mask; 270 | } 271 | 272 | return *mask == 0; 273 | } 274 | 275 | DWORD FindPatternInternal(const unsigned char* address, size_t size, const unsigned char* signature, const char* mask, unsigned short ignore) 276 | { 277 | WORD Ign = 0; 278 | for(size_t i = 0; i < size; i++) 279 | { 280 | if(DataCompare(address + i, signature, mask)) 281 | { 282 | if (Ign < ignore) 283 | Ign++; 284 | else 285 | return (DWORD)address + i; 286 | } 287 | } 288 | return 0; 289 | } 290 | 291 | DWORD FindPattern(const unsigned char* address, size_t size, const unsigned char* signature, const char* mask, unsigned short ignore) 292 | { 293 | size_t mask_length = strlen(mask); 294 | return FindPatternInternal(address, size - mask_length, signature, mask, ignore); 295 | } 296 | 297 | DWORD RelativeToAbsolute (DWORD Offset) 298 | { 299 | return *(DWORD*)(Offset) + Offset + 0x4; 300 | } 301 | 302 | #if !defined(InviDropper) 303 | BOOL CheckIni(BOOL Loading) 304 | { 305 | BOOL FileSelected; 306 | CreateDirectory(IniPath, 0); 307 | 308 | OPENFILENAME ofn = {0}; 309 | ofn.lStructSize = sizeof(ofn); 310 | ofn.hwndOwner = 0; 311 | ofn.lpstrFilter = "Einstellungen(*.ini)\0*.ini\0"; 312 | ofn.nMaxFile = 2048; 313 | ofn.lpstrFile = IniFullPath; 314 | ofn.lpstrTitle = (Loading) ? "Konfigurationsdatei laden..." : "Konfigurationsdatei speichern"; 315 | ofn.Flags = (Loading) ? OFN_DONTADDTORECENT + OFN_FILEMUSTEXIST + OFN_NONETWORKBUTTON : OFN_DONTADDTORECENT + OFN_NONETWORKBUTTON; 316 | ofn.lpstrDefExt = sExt; 317 | FileSelected = (Loading) ? GetOpenFileName(&ofn) : GetSaveFileName(&ofn); 318 | if (!FileSelected) 319 | PathRemoveExtension(IniFullPath); 320 | else 321 | CloseHandle(CreateFile(IniFullPath, GENERIC_READ | GENERIC_WRITE, 0, 0, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, 0)); 322 | 323 | #if (DbgSession) 324 | DbgOutput = "File selected:" + std::to_string(FileSelected) + " (" + (std::string)IniFullPath + ")"; 325 | MessageBox(0, DbgOutput.c_str(), sDbgOutput, MB_ICONASTERISK); 326 | #endif 327 | 328 | SetCurrentDirectory(WorkingDir); 329 | return FileSelected; 330 | #if (DbgSession) 331 | DbgOutput = "No ini found in default dir (" + (std::string)IniPath + ")"; 332 | MessageBox(0, DbgOutput.c_str(), sDbgOutput, MB_ICONASTERISK); 333 | #endif 334 | return 0; 335 | } 336 | 337 | bool ValidateIni() 338 | { 339 | if (PathFindExtension(IniFullPath) != sExt) 340 | { 341 | if (!CheckIni(FALSE)) 342 | return false; 343 | } 344 | return true; 345 | } 346 | 347 | bool ForceValidation(bool bAsk) 348 | { 349 | if (!bAsk && (PathFindExtension(IniFullPath) != sExt)) 350 | { 351 | std::string sPathEx; 352 | sPathEx = (std::string)IniFullPath + (std::string)sExt; 353 | if (PathFileExists(sPathEx.c_str())) 354 | { 355 | PathAddExtension(IniFullPath, sExt); 356 | #if (DbgSession) 357 | DbgOutput = "ForceValidation returns true!"; 358 | MessageBox(0, DbgOutput.c_str(), sDbgOutput, MB_ICONASTERISK); 359 | #endif 360 | return true; 361 | } 362 | } 363 | #if (DbgSession) 364 | PrintDbg("ForceValidation returns false!", DbgOutput); 365 | #endif 366 | return false; 367 | } 368 | 369 | void GetIniFullPath() 370 | { 371 | hProcess = GetCurrentProcess(); 372 | ProcessID = GetCurrentProcessId(); 373 | GetModuleFileName((HINSTANCE)&__ImageBase, IniPath, 2048); 374 | PathRemoveFileSpec(IniPath); 375 | PathAppend(IniPath, sSettings); 376 | if (GetServerName()) 377 | PathCombine(IniFullPath, IniPath, ServerName); 378 | else 379 | PathCombine(IniFullPath, IniPath, "Servername\0"); 380 | 381 | #if (DbgSession) 382 | MessageBox(0, IniFullPath, "", 0); 383 | #endif 384 | } 385 | 386 | void CleanupOldSettings() 387 | { 388 | bool IsOldIncompatibleIni, IsOldCompatibleIni, IsCompatibleIni; 389 | std::string OldIncompatibleIni, OldCompatibleDir, OldCompatibleIni, CompatibleDir, CompatibleIni; 390 | 391 | if (GetCurrentDirectory(2048, WorkingDir))//check for error while getting workingdir 392 | { 393 | PathCombine(IniFullPath, WorkingDir, "Ultimate-Tool.ini"); 394 | // Case 1 395 | if (PathFileExists(IniFullPath)) 396 | { 397 | OldIncompatibleIni = IniFullPath; 398 | IsOldIncompatibleIni = true; 399 | } 400 | // Case 2 401 | PathCombine(IniPath, WorkingDir, "Ultimate-Tool"); 402 | PathCombine(IniFullPath, WorkingDir, "Ultimate-Tool\\Settings.ini"); 403 | if (PathFileExists(IniFullPath)) 404 | { 405 | OldCompatibleDir = IniPath; 406 | OldCompatibleIni = IniFullPath; 407 | IsOldCompatibleIni = true; 408 | } 409 | //Case 3 410 | PathCombine(IniPath, WorkingDir, "Tools by Unpublished"); 411 | PathCombine(IniFullPath, WorkingDir, "Tools by Unpublished\\Settings.ini"); 412 | if (PathFileExists(IniFullPath)) 413 | { 414 | CompatibleDir = IniPath; 415 | CompatibleIni = IniFullPath; 416 | IsCompatibleIni = true; 417 | } 418 | GetIniFullPath(); 419 | } 420 | else 421 | { 422 | MessageBox(0, sErrorGettingWorkingDir, sError, MB_ICONERROR); 423 | } 424 | if (IsOldIncompatibleIni) 425 | { 426 | if (MessageBox(0, "Es wurde eine alte inkompatible Konfigurationsdatei gefunden (Ultimate-Tool.ini).\n\nSoll diese nun gelöscht werden (empfohlen)?", sConfigFile, MB_YESNO | MB_ICONQUESTION) == IDYES) 427 | { 428 | DeleteFile(OldIncompatibleIni.c_str()); 429 | } 430 | } 431 | if (IsOldCompatibleIni && !IsCompatibleIni) 432 | { 433 | SetNewIniLocation(&CompatibleIni[0]); 434 | } 435 | else if (IsOldCompatibleIni && IsCompatibleIni) 436 | { 437 | DeleteFile(OldCompatibleIni.c_str()); 438 | RemoveDirectory(OldCompatibleDir.c_str()); 439 | } 440 | if (IsCompatibleIni && PathFileExists(IniFullPath)) 441 | { 442 | int Antwort = MessageBox(0, "Es wurde eine alte Konfigurationsdatei gefunden (Tools by Unpublished\\Settings.ini).\n\nJa um diese zu löschen.\n\nNein um die aktuelle Konfigurations zu ersetzen.\n\nAbbrechen um die Entscheidung zu überspringen.", sConfigFile, MB_YESNOCANCEL | MB_ICONQUESTION); 443 | if (Antwort == IDYES) 444 | { 445 | DeleteFile(CompatibleIni.c_str()); 446 | RemoveDirectory(CompatibleDir.c_str()); 447 | } 448 | else if (Antwort == IDNO) 449 | { 450 | MoveFileEx(CompatibleDir.c_str(), IniFullPath, MOVEFILE_WRITE_THROUGH + MOVEFILE_REPLACE_EXISTING); 451 | } 452 | } 453 | else if (IsCompatibleIni && PathFindExtension(IniFullPath) == sExt) 454 | { 455 | MoveFileEx(CompatibleIni.c_str(), IniFullPath, MOVEFILE_WRITE_THROUGH + MOVEFILE_REPLACE_EXISTING); 456 | RemoveDirectory(CompatibleDir.c_str()); 457 | } 458 | else if (IsCompatibleIni) 459 | { 460 | SetNewIniLocation(&CompatibleIni[0]); 461 | } 462 | if (PathFileExists((CompatibleDir + "vote.mix").c_str())) 463 | iClientMod = 1; 464 | } 465 | 466 | void SetNewIniLocation(char OldLocation[2048]) 467 | { 468 | MessageBox(0, "Es wurde eine veraltete Konfigurationsdatei gefunden.\r\n\r\nIm nächsten Schritt kann ein neuer Speicherort festgelegt werden.", sConfigFile, 0); 469 | if (CheckIni(FALSE)) 470 | { 471 | MoveFileEx(OldLocation, IniFullPath, MOVEFILE_WRITE_THROUGH + MOVEFILE_REPLACE_EXISTING); 472 | PathRemoveFileSpec(OldLocation); 473 | RemoveDirectory(OldLocation); 474 | } 475 | } 476 | #endif 477 | 478 | void InitComponents() 479 | { 480 | #if !defined(InviDropper) 481 | CleanupOldSettings(); 482 | #endif 483 | int i = 2000; 484 | for (int j = 0; j < _countof(IDC_BUTTON); j++) 485 | { 486 | IDC_BUTTON[j] = i; 487 | i++; 488 | } 489 | #if !defined(InviDropper) 490 | #if defined(TAB) 491 | for (int j = 0;j < _countof(IDC_TAB);j++) 492 | { 493 | IDC_TAB[j] = i; 494 | i++; 495 | } 496 | #endif 497 | #if defined(LABEL) 498 | for (int j = 0; j < _countof(IDC_STATIC); j++) 499 | { 500 | IDC_STATIC[j] = i; 501 | i++; 502 | } 503 | #endif 504 | #if defined(COMBO) 505 | for (int j = 0;j < _countof(IDC_COMBO);j++) 506 | { 507 | IDC_COMBO[j] = i; 508 | i++; 509 | } 510 | #endif 511 | #if defined(EDIT) 512 | for (int j = 0; j < _countof(IDC_EDIT); j++) 513 | { 514 | IDC_EDIT[j] = i; 515 | i++; 516 | } 517 | #endif 518 | #endif 519 | i = 0; 520 | MainWindow(); 521 | } 522 | -------------------------------------------------------------------------------- /Classes/Metin2 Class.h: -------------------------------------------------------------------------------- 1 | DWORD NetPointer, PlayerPointer, ShopPointer; 2 | 3 | DWORD PickCloseItemCall; 4 | DWORD SendChatCall; 5 | DWORD SendAttackCall; 6 | DWORD SendDropItemCall; 7 | DWORD SendItemUseCall; 8 | DWORD SendItemUseToItemCall, SendShopBuyCall; 9 | DWORD SendRefineCall; 10 | 11 | DWORD ItemIndexOffset, SlotOffset; 12 | DWORD TargetVIDOffset; 13 | DWORD ItemAttributeValueOffset, ItemAttributeTypeOffset, ShopSlotOffset, ShopItemIDOffset, ShopItemCountOffset; 14 | 15 | bool IsInGame(); 16 | int SearchItem(int ID); 17 | int ShopSearchItem(int ID); 18 | 19 | int GetItemIndex(int Slot); 20 | int ShopGetItemID(int Slot); 21 | 22 | //simplified functions 23 | bool IsInGame() 24 | { 25 | bool i = false; 26 | for (int j = 0; j < 20; j++) 27 | { 28 | if (GetItemIndex(j) == 0) 29 | continue; 30 | 31 | i = true; 32 | } 33 | return i; 34 | } 35 | 36 | int SearchItem(int ID) 37 | { 38 | for (int i = 0; i < 90; i++) 39 | { 40 | if (GetItemIndex(i) == ID) 41 | return i; 42 | } 43 | return -1; 44 | } 45 | 46 | int ShopSearchItem(int ID) 47 | { 48 | for (int i = 0; i < 40; i++) 49 | { 50 | if (ShopGetItemID(i) == ID) 51 | return i; 52 | } 53 | return -1; 54 | } 55 | 56 | 57 | //returning Standard-Functions 58 | //Inventar 59 | int GetItemAttributeValue(int Slot, int Zeile) 60 | { 61 | if (Slot > 89 && Slot < 0) 62 | return -1; 63 | else if (Zeile > 6 && Zeile < 0) 64 | return -1; 65 | 66 | DWORD *SlotPointer = (DWORD*) (PlayerPointer); 67 | DWORD Offset = ItemAttributeValueOffset + SlotOffset*Slot + 0x3 * Zeile; 68 | DWORD SlotPointerValue = *SlotPointer; 69 | short *SlotAdresse = (short*) (SlotPointerValue + Offset); 70 | 71 | return *SlotAdresse; 72 | } 73 | 74 | int GetItemAttributeType(int Slot, int Zeile) 75 | { 76 | if (Slot > 89 && Slot < 0) 77 | return -1; 78 | else if (Zeile > 6 && Zeile < 0) 79 | return -1; 80 | 81 | DWORD *SlotPointer = (DWORD*) (PlayerPointer); 82 | DWORD Offset = ItemAttributeTypeOffset + SlotOffset*Slot + 0x3*Zeile; 83 | DWORD SlotPointerValue = *SlotPointer; 84 | char *SlotAdresse = (char*) (SlotPointerValue + Offset); 85 | 86 | return *SlotAdresse; 87 | } 88 | 89 | int GetItemIndex(int Slot) 90 | { 91 | if (Slot > 89 && Slot < 0) 92 | return -1; 93 | 94 | DWORD *SlotPointer = (DWORD*) (PlayerPointer); 95 | DWORD Offset = ItemIndexOffset + SlotOffset*Slot; 96 | DWORD PointerValue = *SlotPointer; 97 | DWORD *SlotAdresse = (DWORD*) (PointerValue + Offset); 98 | 99 | return *SlotAdresse; 100 | } 101 | 102 | //Environment 103 | int GetTargetVID() 104 | { 105 | DWORD *SlotPointer = (DWORD*)(PlayerPointer); 106 | DWORD SlotPointerValue = *SlotPointer; 107 | DWORD *SlotAdresse = (DWORD*) (SlotPointerValue + TargetVIDOffset); 108 | 109 | //char dbg[8]; 110 | //sprintf_s(dbg, 8, "%i", *SlotAdresse); 111 | //MessageBox(0, dbg, "D", 0); 112 | 113 | return *SlotAdresse; 114 | } 115 | 116 | //Shop 117 | int ShopGetItemID(int Slot) 118 | { 119 | if (Slot > 40 && Slot < 0) 120 | return -1; 121 | 122 | DWORD *SlotPointer = (DWORD*)(ShopPointer); 123 | DWORD Offset = ShopItemIDOffset + ShopSlotOffset*Slot; 124 | DWORD SlotPointerValue = *SlotPointer; 125 | DWORD *SlotAdresse = (DWORD*)(SlotPointerValue + Offset); 126 | 127 | return *SlotAdresse; 128 | } 129 | 130 | int ShopGetItemCount(int Slot) 131 | { 132 | if (Slot > 40 && Slot < 0) 133 | return -1; 134 | 135 | DWORD *SlotPointer = (DWORD*)(ShopPointer); 136 | DWORD Offset = ShopItemIDOffset + ShopItemCountOffset + ShopSlotOffset*Slot;//(0x10 + 0xC)=0x1C #(Hardcore Reloaded) 137 | DWORD SlotPointerValue = *SlotPointer; 138 | DWORD *SlotAdresse = (DWORD*)(SlotPointerValue + Offset); 139 | 140 | return *SlotAdresse; 141 | } 142 | 143 | int ShopIsOpen() 144 | { 145 | DWORD *SlotPointer = (DWORD*)(ShopPointer); 146 | DWORD Offset = 0x4; 147 | DWORD SlotPointerValue = *SlotPointer; 148 | DWORD *SlotAdresse = (DWORD*)(SlotPointerValue + Offset); 149 | 150 | return *SlotAdresse; 151 | } 152 | 153 | //void functions 154 | void PickCloseItem() 155 | { 156 | DWORD Addie = *(DWORD*) PlayerPointer; 157 | __asm 158 | { 159 | MOV ECX, [Addie] 160 | CALL PickCloseItemCall 161 | } 162 | } 163 | 164 | void SendAttack(int VID) 165 | { 166 | DWORD Addie = *(DWORD*) NetPointer; 167 | __asm 168 | { 169 | MOV ECX, Addie 170 | PUSH VID 171 | PUSH 0 172 | CALL SendAttackCall 173 | } 174 | } 175 | 176 | void SendChat(const char *Text, int Modus) 177 | { 178 | DWORD Addie = *(DWORD*) NetPointer; 179 | __asm 180 | { 181 | MOV ECX, Addie 182 | PUSH Modus 183 | PUSH Text 184 | CALL SendChatCall 185 | } 186 | } 187 | 188 | void SendDropItem(int Slot, int Count) 189 | { 190 | DWORD Addie = *(DWORD*) NetPointer; 191 | __asm 192 | { 193 | MOV ECX, Addie 194 | PUSH Count 195 | PUSH 0 196 | PUSH Slot 197 | CALL SendDropItemCall 198 | } 199 | } 200 | 201 | void SendItemUse(int Slot) 202 | { 203 | DWORD Addie = *(DWORD*)NetPointer; 204 | __asm 205 | { 206 | PUSH Slot 207 | MOV ECX, Addie 208 | CALL SendItemUseCall 209 | } 210 | } 211 | 212 | //int(*SendItemUseToItem)(int, int) = (int(*)(int, int))0x4E2420; 213 | /* Try to make it compatible with latest binary 214 | 215 | void SendItemUseToItem(int Target, int Slot) 216 | { 217 | DWORD Addie = *(DWORD*)NetPointer; 218 | //DWORD dwTarget = *(DWORD*)Target; 219 | WORD lwTarget = *(WORD*)Target; 220 | BYTE lbTarget = *(BYTE*)Target; 221 | WORD lwSlot = *(WORD*)Slot; 222 | BYTE lbSlot = *(BYTE*)Slot; 223 | __asm 224 | { 225 | PUSH Target 226 | MOVZX EAX, ESP 227 | PUSH Target 228 | MOV ECX, ESP 229 | PUSH ECX 230 | MOV WORD PTR DS : [ECX], AX 231 | MOV AL, lbTarget 232 | MOV BYTE PTR DS : [ECX + 2], AL 233 | MOVZX EAX, lwSlot 234 | MOV ECX, ESP 235 | MOV WORD PTR DS : [ECX], AX 236 | MOV AL, lbSlot 237 | MOV BYTE PTR DS : [ECX + 2], AL 238 | MOV ECX, Addie 239 | CALL SendItemUseToItemCall 240 | } 241 | }*/ 242 | 243 | void SendItemUseToItem(int Target, int Slot) 244 | { 245 | DWORD Addie = *(DWORD*)NetPointer; 246 | __asm 247 | { 248 | MOV ECX, Addie 249 | PUSH Target 250 | PUSH Slot 251 | CALL SendItemUseToItemCall 252 | } 253 | //Note: this is untested...got lost of the original function while trying the above but this should be fine 254 | } 255 | void SendShopBuy(int Slot) 256 | { 257 | DWORD Addie = *(DWORD*)NetPointer; 258 | __asm 259 | { 260 | MOV ECX, Addie 261 | PUSH Slot 262 | CALL SendShopBuyCall 263 | } 264 | } 265 | 266 | void SendRefine(int iMode, int iSlot) 267 | { 268 | DWORD Addie = *(DWORD*)NetPointer; 269 | __asm 270 | { 271 | MOV ECX, Addie 272 | PUSH iMode //0 = Stadt-Schmied, 2 = Segi, 4 = DT 273 | PUSH iSlot 274 | CALL SendRefineCall 275 | } 276 | } 277 | -------------------------------------------------------------------------------- /Classes/Strings.h: -------------------------------------------------------------------------------- 1 | //PickUp-Bot Defaults 2 | #if defined(PickUpBot) 3 | const char *sDefMinSleep = "25"; 4 | const int iDefMinSleep = atoi(sDefMinSleep); 5 | #endif 6 | 7 | //PickUp-Bot & Switch-Bot Defaults 8 | #if defined(PickUpBot) || defined(SwitchBot) 9 | const char *sDefSleep = "500"; 10 | const int iDefSleep = atoi(sDefSleep); 11 | #endif 12 | 13 | //SpamBot Defaults 14 | #if defined(SpamBot) 15 | const char *sDefMinSleep = "750"; 16 | const int iDefMinSleep = atoi(sDefMinSleep); 17 | #endif 18 | 19 | //InviDropper - GUI 20 | #if defined(InviDropper) 21 | const char *sInviDropper = "InviDropper"; 22 | const char *sDroppen = "Droppen"; 23 | #endif 24 | 25 | //Spam-Bot - GUI 26 | #if defined(SpamBot) 27 | const char *Spam_Bot = "Spam-Bot"; 28 | const char *sSpammen = "Spammen"; 29 | const char *sSpamText = "Spam-Text"; 30 | const char *sChatTyp = "Chat-Typ"; 31 | const char *sAnzahl = "Anzahl"; 32 | 33 | const char *sChatModes[4] = {"Normaler-Chat", "Ruf-Chat", "Gilden-Chat", "Gruppen-Chat"}; 34 | #endif 35 | 36 | //Switch-Bot - GUI 37 | #if defined(SwitchBot) 38 | char *SwitchBotOptions = "Optionen"; 39 | const char *sSwitchBot = "Switch-Bot"; 40 | const char *SwitchBotFirstCat = "1. - 5. Bonus"; 41 | const char *SwitchBotSecondCat = "6. && 7. Bonus"; 42 | const char *SwitchBotSettingOne = "Einstellung #1"; 43 | const char *SwitchBotSettingTwo = "Einstellung #2"; 44 | 45 | //Switch-Bot - Messages 46 | 47 | //Switch-Bot - Boni 48 | const char *Boni[80] = 49 | { 50 | "Max. TP", 51 | "Max. MP", 52 | "Vitalität (VIT)", 53 | "Intelligenz (INT)", 54 | "Stärke (STR)", 55 | "Beweglichkeit (DEX)", 56 | "Angriffsgeschwindigkeit", 57 | "Bewegungsgeschwindigkeit", 58 | "Zaubergeschwindigkeit", 59 | "TP-Regeneration", 60 | "MP-Regeneration", 61 | "Vergiftungschance", 62 | "Ohnmachtschance", 63 | "Verlangsamungschance", 64 | "Kritischer Treffer", 65 | "Durchbohrender Treffer", 66 | "Stark gg Halbmenschen", 67 | "Stark gg Tiere", 68 | "Stark gg Orks", 69 | "Stark gg Esoterische", 70 | "Stark gg Untote", 71 | "Stark gg Teufel", 72 | "Schaden v. TP absorbieren", 73 | "Schaden v. MP absorbieren", 74 | "Manaraub", 75 | "MP bei Treffer erhalten", 76 | "Nahkampf-Ang. abblocken", 77 | "Pfeilangriff ausweichen", 78 | "Schwertverteidigung", 79 | "Zweihänderverteidigung", 80 | "Dolchverteidigung", 81 | "Glockenverteidigung", 82 | "Fächerverteidigung", 83 | "Pfeilwiederstand", 84 | "Feuerwiederstand", 85 | "Blitzwiederstand", 86 | "Magiewiederstand", 87 | "Windwiederstand", 88 | "Nahkampftreffer refl.", 89 | "Fluch reflektieren", 90 | "Giftwiederstand", 91 | "MP wiederherstellen", "EXP-Bonus", 92 | "Dopp. Menge Yang", 93 | "Dopp. Menge Gegenstände", 94 | "Trank Effektzuwachs", 95 | "TP wiederherstellen", 96 | "Immun gg Ohnmacht", 97 | "Immun gg Verlangsamen", 98 | "Immun gg Stürzen", 99 | "", 100 | "Bogenreichweite", 101 | "Angriffswert", 102 | "Verteidigung", 103 | "Magischer Angriffswert", 104 | "Magische Verteidigung", 105 | "", 106 | "Max. Ausdauer", 107 | "Stark gg Krieger", 108 | "Stark gg Ninja", 109 | "Stark gg Sura", 110 | "Stark gg Schamane", 111 | "Stark gg Monster", 112 | "Angriffswert", 113 | "Verteidigung", 114 | "EXP", "Dropchance v. Gegenständen", 115 | "Dropchance v. Yang", 116 | "", 117 | "Fertigkeitsschaden (FKS)", 118 | "Durchschnittsschaden (DSS)", 119 | "Wiederstand gg FKS", 120 | "Wiederstand gg DSS", 121 | "", 122 | "iCafe-EXP-Bonus", 123 | "iCafe-Gegenstände-Bonus", 124 | "Abwehr gg Krieger", 125 | "Abwehr gg Ninja", 126 | "Abwehr gg Sura", 127 | "Abwehr gg Schamanen" 128 | }; 129 | #endif 130 | 131 | //Tools einstellen - GUI 132 | #if defined(ToolsEinstellen) 133 | const char *sSearchPatterns[2] = {"Suchmuster #1 2010+ (Standart)", "Suchmuster #2 2008- (Hamachi)"}; 134 | #endif 135 | 136 | //Upp-Tool - GUI 137 | #if defined(UppTool) 138 | const char *sUppTool = "Upp-Tool"; 139 | //Save strings 140 | const char *sCountedUpp = "Anzahl Upp-Vorgänge aktiviert"; 141 | const char *sUppCount = "Anzahl Upp-Vorgänge"; 142 | const char *sSegiValue = "Segi Value"; 143 | const char *sMagMetallValue = "Magisches Metall Value"; 144 | const char *sMaxSlotUpp = "Uppen Max Slot aktiviert"; 145 | const char *sUppMaxSlot = "Uppen Max Slot"; 146 | #endif 147 | //Message Strings 148 | const char *sErrorGettingWorkingDir = "Fehler beim Auslesen des Ordner!"; 149 | const char *sError = "Fehler"; 150 | const char *sWarning = "Achtung!"; 151 | const char *CloseDialog = "Möchtest du das Tool (%s) zusammen mit dem Metin2 Prozess wirklich beenden?"; 152 | 153 | 154 | //Button Strings 155 | const char *sStart = "Starten"; 156 | const char *sStop = "Stoppen"; 157 | const char *sSave = "Speichern"; 158 | const char *sReset = "Zurücksetzen"; 159 | const char *sLoad = "Laden"; 160 | 161 | //Misc Strings 162 | const char *sConfigFile = "Konfigurationsdatei"; 163 | const char *sExt = ".ini"; 164 | const char *sFont = "Tahoma"; 165 | const char *sSettings = "Einstellungen"; 166 | const char *sSearchPattern = "Suchmuster"; 167 | const char *UserAgent = "Tools by Unpublished"; 168 | #define win_endl "\r\n" 169 | 170 | #if (DbgSession) 171 | const char *sDbgOutput = "DbgOutput"; 172 | std::string DbgOutput; 173 | #endif -------------------------------------------------------------------------------- /InviDropper/InviDropper.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.20623.1 VSUPREVIEW 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "InviDropper", "InviDropper\InviDropper.vcxproj", "{1DE846F7-DA1C-45C7-92CD-F0638D6403A4}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Release|Win32 = Release|Win32 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {1DE846F7-DA1C-45C7-92CD-F0638D6403A4}.Debug|Win32.ActiveCfg = Debug|Win32 15 | {1DE846F7-DA1C-45C7-92CD-F0638D6403A4}.Debug|Win32.Build.0 = Debug|Win32 16 | {1DE846F7-DA1C-45C7-92CD-F0638D6403A4}.Release|Win32.ActiveCfg = Release|Win32 17 | {1DE846F7-DA1C-45C7-92CD-F0638D6403A4}.Release|Win32.Build.0 = Release|Win32 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /InviDropper/InviDropper/GUI-Funcs.h: -------------------------------------------------------------------------------- 1 | int GetSearchPattern() 2 | { 3 | char Wert[3]; 4 | 5 | GetPrivateProfileStringA(sSettings, sSearchPattern, "-1", Wert, 3, IniFullPath); 6 | return atoi(Wert); 7 | } -------------------------------------------------------------------------------- /InviDropper/InviDropper/GUI-Variables.h: -------------------------------------------------------------------------------- 1 | int IDC_BUTTON[1]; 2 | HWND InviDroppenButton; 3 | 4 | #define WND_CLASS_NAME sInviDropper 5 | 6 | #define XP 0 -------------------------------------------------------------------------------- /InviDropper/InviDropper/GUI.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unpublished/Tools-Metin2/840a1066031099540a98f18cd5568aee274049d8/InviDropper/InviDropper/GUI.h -------------------------------------------------------------------------------- /InviDropper/InviDropper/Init.cpp: -------------------------------------------------------------------------------- 1 | #include "..\..\Classes\Init Class.h" 2 | 3 | void SetAddies() 4 | { 5 | DWORD Base = (DWORD)hPInstance; 6 | const unsigned char* StartBase = reinterpret_cast(Base + 0x1000); 7 | 8 | DWORD SizeOfCode = GetModuleSize(); 9 | 10 | switch (GetSearchPattern()) 11 | { 12 | case 1: //Hamachi 13 | { 14 | BYTE P_PickCloseItem [] = { 0xCC, 0xCC, 0xCC, 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE9, 0x00, 0x00, 0x00, 0x00 }; 15 | char M_PickCloseItem [] = "xxxxx---xx----x---x"; 16 | DWORD B_PickCloseItem = FindPattern(StartBase, SizeOfCode, P_PickCloseItem, M_PickCloseItem, 11); 17 | PlayerPointer = *(DWORD*)(B_PickCloseItem + 5); 18 | 19 | #if (DbgSession) 20 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 21 | MessageBox(0, "PlayerPointer gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 22 | #endif 23 | 24 | BYTE P_SendDropItem [] = { 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6A, 0x00, 0x50, 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00 }; 25 | char M_SendDropItem [] = "xx---xxxxxx---xx---x"; 26 | DWORD B_SendDropItem = FindPattern(StartBase, SizeOfCode, P_SendDropItem, M_SendDropItem, 0); 27 | NetPointer = *(DWORD*)(B_SendDropItem + 2); 28 | SendDropItemCall = RelativeToAbsolute(B_SendDropItem + 11); 29 | break; 30 | } 31 | default: 32 | { 33 | BYTE P_PickCloseItem [] = { 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0xFF, 0xE9, 0x00, 0x00, 0x00, 0x00, 0x51, 0x8B, 0x4C, 0x24, 0x00, 0x8D, 0x04, 0x24, 0x50 }; 34 | char M_PickCloseItem [] = "xx---xx---xx----xxxx-xxxx"; 35 | DWORD B_PickCloseItem = FindPattern(StartBase, SizeOfCode, P_PickCloseItem, M_PickCloseItem, 2); 36 | PlayerPointer = *(DWORD*)(B_PickCloseItem + 2); 37 | 38 | #if (DbgSession) 39 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 40 | MessageBox(0, "PlayerPointer gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 41 | #endif 42 | 43 | BYTE P_SlotAndItemIndexOffset [] = { 0x8B, 0x44, 0x24, 0x04, 0x83, 0xF8, 0x00, 0x72, 0x05, 0x33, 0xC0, 0xC2, 0x04, 0x00, 0x6B, 0xC0, 0x00, 0x8D, 0x00, 0x08 }; 44 | char M_SlotAndItemIndexOffset [] = "xxxxxx-xxxxxxxxx-x-x"; 45 | DWORD B_SlotAndItemIndexOffset = FindPattern(StartBase, SizeOfCode, P_SlotAndItemIndexOffset, M_SlotAndItemIndexOffset, 0); 46 | SlotOffset = *(BYTE*)(B_SlotAndItemIndexOffset + 16); 47 | ItemIndexOffset = *(BYTE*)(B_SlotAndItemIndexOffset + 20); 48 | 49 | #if (DbgSession) 50 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 51 | MessageBox(0, "SlotOffset & ItemIndexOffset gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 52 | #endif 53 | 54 | BYTE P_SendDropItem [] = { 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x52, 0x6A, 0x00, 0x50, 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00 }; 55 | char M_SendDropItem [] = "xx---xxxxxx---xx---x"; 56 | DWORD B_SendDropItem = FindPattern(StartBase, SizeOfCode, P_SendDropItem, M_SendDropItem, 0); 57 | NetPointer = *(DWORD*)(B_SendDropItem + 2); 58 | SendDropItemCall = RelativeToAbsolute(B_SendDropItem + 11); 59 | break; 60 | } 61 | } 62 | #if (DbgSession) 63 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 64 | MessageBox(0, "NetPointer & SendDropItemCall gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 65 | DbgOutput = "PlayerPointer: " + to_hexstring(PlayerPointer) + win_endl 66 | "SlotOffset: " + to_hexstring(SlotOffset) + win_endl 67 | "ItemIndexOffset: " + to_hexstring(ItemIndexOffset) + win_endl 68 | "NetPointer: " + to_hexstring(NetPointer) + win_endl 69 | "SendDropItemCall: " + to_hexstring(SendDropItemCall); 70 | MessageBox(0, DbgOutput.c_str(), sDbgOutput, MB_ICONASTERISK); 71 | #endif 72 | ExitThread(0); 73 | } 74 | 75 | BOOL WINAPI DllMain (HANDLE hDll, DWORD dwReason, LPVOID lpReserved) 76 | { 77 | switch (dwReason) 78 | { 79 | case DLL_PROCESS_ATTACH: 80 | CreateThread(0, 0, (LPTHREAD_START_ROUTINE)InitComponents, 0, 0, 0); 81 | break; 82 | 83 | case DLL_PROCESS_DETACH: 84 | break; 85 | 86 | case DLL_THREAD_ATTACH: 87 | break; 88 | } 89 | return true; 90 | } 91 | -------------------------------------------------------------------------------- /InviDropper/InviDropper/InviDropper.h: -------------------------------------------------------------------------------- 1 | void DropItems() 2 | { 3 | for (int i = 0;i < 90;i++) 4 | { 5 | if (GetItemIndex(i)) 6 | SendDropItem(i, 200); 7 | } 8 | } -------------------------------------------------------------------------------- /InviDropper/InviDropper/InviDropper.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unpublished/Tools-Metin2/840a1066031099540a98f18cd5568aee274049d8/InviDropper/InviDropper/InviDropper.rc -------------------------------------------------------------------------------- /InviDropper/InviDropper/InviDropper.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {1DE846F7-DA1C-45C7-92CD-F0638D6403A4} 15 | Win32Proj 16 | InviDropper 17 | 18 | 19 | 20 | DynamicLibrary 21 | true 22 | v120 23 | Unicode 24 | 25 | 26 | DynamicLibrary 27 | false 28 | v120_xp 29 | true 30 | MultiByte 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | true 44 | 45 | 46 | false 47 | 48 | 49 | 50 | 51 | 52 | Level3 53 | Disabled 54 | WIN32;_DEBUG;_WINDOWS;_USRDLL;INVIDROPPER_EXPORTS;%(PreprocessorDefinitions) 55 | true 56 | 57 | 58 | Windows 59 | true 60 | 61 | 62 | 63 | 64 | Level3 65 | 66 | 67 | Full 68 | true 69 | true 70 | WIN32;NDEBUG;_WINDOWS;_USRDLL;INVIDROPPER_EXPORTS;%(PreprocessorDefinitions) 71 | true 72 | true 73 | MultiThreaded 74 | None 75 | 76 | 77 | Windows 78 | false 79 | true 80 | true 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /InviDropper/InviDropper/InviDropper.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Quelldateien 20 | 21 | 22 | 23 | 24 | Headerdateien 25 | 26 | 27 | Headerdateien 28 | 29 | 30 | Headerdateien 31 | 32 | 33 | Headerdateien 34 | 35 | 36 | Headerdateien 37 | 38 | 39 | Headerdateien 40 | 41 | 42 | Headerdateien 43 | 44 | 45 | Headerdateien 46 | 47 | 48 | Headerdateien 49 | 50 | 51 | Headerdateien 52 | 53 | 54 | 55 | 56 | Ressourcendateien 57 | 58 | 59 | -------------------------------------------------------------------------------- /InviDropper/InviDropper/Variables.h: -------------------------------------------------------------------------------- 1 | const char *Version = "1.0.1.0"; 2 | 3 | #define InviDropper 4 | #define DbgSession FALSE -------------------------------------------------------------------------------- /InviDropper/InviDropper/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unpublished/Tools-Metin2/840a1066031099540a98f18cd5568aee274049d8/InviDropper/InviDropper/resource.h -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | -------------------------------------------------------------------------------- /PickUp-Bot/PickUp-Bot.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.20623.1 VSUPREVIEW 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PickUp-Bot", "PickUp-Bot\PickUp-Bot.vcxproj", "{87DD23DC-FF91-4DB0-8CEC-8C98FB9DB643}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Release|Win32 = Release|Win32 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {87DD23DC-FF91-4DB0-8CEC-8C98FB9DB643}.Debug|Win32.ActiveCfg = Debug|Win32 15 | {87DD23DC-FF91-4DB0-8CEC-8C98FB9DB643}.Debug|Win32.Build.0 = Debug|Win32 16 | {87DD23DC-FF91-4DB0-8CEC-8C98FB9DB643}.Release|Win32.ActiveCfg = Release|Win32 17 | {87DD23DC-FF91-4DB0-8CEC-8C98FB9DB643}.Release|Win32.Build.0 = Release|Win32 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /PickUp-Bot/PickUp-Bot/GUI-Funcs.h: -------------------------------------------------------------------------------- 1 | void Initialize() 2 | { 3 | switch (IsDlgButtonChecked(WindowHandle, IDC_BUTTON[0])) 4 | { 5 | case BST_CHECKED: 6 | ActivateInstantPickUp(); 7 | break; 8 | 9 | default: 10 | DeactivateInstantPickUp(); 11 | break; 12 | } 13 | } 14 | 15 | void DeleteUnused(char *KeyName) 16 | { 17 | const char *sNotFound = ""; 18 | char sValue[8]; 19 | if (PathFileExists(IniFullPath)) 20 | { 21 | GetPrivateProfileString(PickUp_Bot, KeyName, sNotFound, sValue, 8, IniFullPath); 22 | if (strcmp(sValue, sNotFound)) 23 | WritePrivateProfileString(PickUp_Bot, KeyName, 0, IniFullPath); 24 | } 25 | } 26 | 27 | int Save() 28 | { 29 | #if (DbgSession) 30 | PrintDbg("Saving ini", DbgOutput); 31 | #endif 32 | if (!ValidateIni()) 33 | { 34 | #if (DbgSession) 35 | PrintDbg("Error while validating ini to be saved (" + (std::string)IniFullPath + ")", DbgOutput); 36 | #endif 37 | return 1; 38 | } 39 | 40 | std::string tValue; 41 | tValue = GetEditText(PickUpBotEdit[0]); 42 | WritePrivateProfileString(PickUp_Bot, "Sleep-Zeit", (std::stoi(tValue) < iDefMinSleep) ? sDefMinSleep : tValue.c_str(), IniFullPath); 43 | tValue = std::to_string(IsDlgButtonChecked(WindowHandle, IDC_BUTTON[1])); 44 | WritePrivateProfileString(PickUp_Bot, "Instant-PickUp", tValue.c_str(), IniFullPath); 45 | return 0; 46 | } 47 | 48 | int Load(int iMode) 49 | { 50 | #if (DbgSession) 51 | PrintDbg("Loading ini", sDbgOutput); 52 | #endif 53 | switch (iMode) 54 | { 55 | case 0: 56 | { 57 | if (PathFindExtension(IniFullPath) != sExt) 58 | { 59 | std::string sPathEx; 60 | sPathEx = (std::string)IniFullPath + (std::string)sExt; 61 | if (!PathFileExists(sPathEx.c_str())) 62 | return 1; 63 | PathAddExtension(IniFullPath, sExt); 64 | } 65 | break; 66 | } 67 | case 1: 68 | { 69 | if (!CheckIni(TRUE)) 70 | return 2; 71 | break; 72 | } 73 | } 74 | 75 | char sValue[2048]; 76 | GetPrivateProfileString(PickUp_Bot, "Sleep-Zeit", sDefSleep, sValue, 8, IniFullPath); 77 | SetWindowText(PickUpBotEdit[0], sValue); 78 | 79 | GetPrivateProfileString(PickUp_Bot, "Instant-PickUp", "0", sValue, 8, IniFullPath); 80 | SendMessage(PickUpBotButton[0], BM_SETCHECK, atoi(sValue), 0); 81 | 82 | Initialize(); 83 | return 0; 84 | } 85 | 86 | void Reset() 87 | { 88 | if (PathFindExtension(IniFullPath) != sExt && PathFileExists(IniFullPath)) 89 | { 90 | WritePrivateProfileString(PickUp_Bot, "Sleep-Zeit", sDefSleep, IniFullPath); 91 | WritePrivateProfileString(PickUp_Bot, "Instant-PickUp", "0", IniFullPath); 92 | } 93 | 94 | Load(2); 95 | return; 96 | } 97 | 98 | int GetSearchPattern() 99 | { 100 | char sValue[3]; 101 | 102 | GetPrivateProfileString(sSettings, sSearchPattern, "-1", sValue, 3, IniFullPath); 103 | return atoi(sValue); 104 | } 105 | 106 | void GUI() 107 | { 108 | char sValue[8]; 109 | while (true) 110 | { 111 | if (!PickUpBotThread) 112 | { 113 | GetWindowText(PickUpBotEdit[0], sValue, 8); 114 | 115 | if (atoi(sValue) < iDefSleep && IsDlgButtonChecked(WindowHandle, IDC_BUTTON[0]) == BST_UNCHECKED) 116 | { 117 | EnableWindow(PickUpBotButton[1], false); 118 | while (atoi(sValue) < iDefSleep && IsDlgButtonChecked(WindowHandle, IDC_BUTTON[0]) == BST_UNCHECKED) 119 | { 120 | GetWindowText(PickUpBotEdit[0], sValue, 8); 121 | Sleep(250); 122 | } 123 | } 124 | else if (atoi(sValue) < iDefMinSleep && IsDlgButtonChecked(WindowHandle, IDC_BUTTON[0]) == BST_CHECKED) 125 | { 126 | EnableWindow(PickUpBotButton[1], false); 127 | while (atoi(sValue) < iDefMinSleep && IsDlgButtonChecked(WindowHandle, IDC_BUTTON[0]) == BST_CHECKED) 128 | { 129 | GetWindowText(PickUpBotEdit[0], sValue, 8); 130 | Sleep(250); 131 | } 132 | } 133 | else 134 | { 135 | EnableWindow(PickUpBotButton[1], true); 136 | } 137 | 138 | SleepTime = (atoi(sValue) < iDefSleep) ? iDefSleep : atoi(sValue); 139 | Sleep(250); 140 | } 141 | else 142 | { 143 | Sleep(SleepTime); 144 | } 145 | } 146 | } -------------------------------------------------------------------------------- /PickUp-Bot/PickUp-Bot/GUI-Variables.h: -------------------------------------------------------------------------------- 1 | char PickUp_Bot[11] = "PickUp-Bot"; 2 | 3 | int IDC_BUTTON[5], IDC_STATIC[1], IDC_EDIT[1]; 4 | HWND PickUpBotLabel[1], PickUpBotEdit[1], PickUpBotButton[5]; 5 | HANDLE GUIThread; 6 | 7 | #define WND_CLASS_NAME PickUp_Bot 8 | #define LABEL 9 | #define EDIT 10 | 11 | #define XP 0 -------------------------------------------------------------------------------- /PickUp-Bot/PickUp-Bot/GUI.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unpublished/Tools-Metin2/840a1066031099540a98f18cd5568aee274049d8/PickUp-Bot/PickUp-Bot/GUI.h -------------------------------------------------------------------------------- /PickUp-Bot/PickUp-Bot/Init.cpp: -------------------------------------------------------------------------------- 1 | #include "..\..\Classes\Init Class.h" 2 | 3 | void SetAddies() 4 | { 5 | DWORD Base = (DWORD)hPInstance; 6 | const unsigned char* StartBase = reinterpret_cast(Base + 0x1000); 7 | 8 | DWORD SizeOfCode = GetModuleSize(); 9 | 10 | switch (GetSearchPattern()) 11 | { 12 | case 1:// Hamachi 13 | { 14 | BYTE P_PickCloseItem [] = { 0xCC, 0xCC, 0xCC, 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE9, 0x00, 0x00, 0x00, 0x00 }; 15 | char M_PickCloseItem [] = "xxxxx---xx----x---x"; 16 | DWORD B_PickCloseItem = FindPattern(StartBase, SizeOfCode, P_PickCloseItem, M_PickCloseItem, 11); 17 | PlayerPointer = *(DWORD*) (B_PickCloseItem + 5); 18 | PickCloseItemCall = RelativeToAbsolute(B_PickCloseItem + 10); 19 | 20 | #if (DbgSession) 21 | DbgOutput = "Debug - Zeile ", std::to_string(__LINE__); 22 | MessageBox(0, "PlayerPointer & PickCloseItemCall gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 23 | #endif 24 | 25 | BYTE P_InstantPickUp [] = { 0x8B, 0x4D, 0x08, 0x05, 0xF4, 0x01, 0x00, 0x00, 0xA3, 0x00, 0x00, 0x00, 0x00, 0x8D, 0x45, 0xFC }; 26 | char M_InstantPickUp [] = "xxxxxxxxx---xxxx"; 27 | DWORD B_InstantPickUp = FindPattern(StartBase, SizeOfCode, P_InstantPickUp, M_InstantPickUp, 0); 28 | InstantPickUpAddie = B_InstantPickUp + 3; 29 | break; 30 | } 31 | default: 32 | { 33 | BYTE P_PickCloseItem [] = { 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0xFF, 0xE9, 0x00, 0x00, 0x00, 0x00, 0x51, 0x8B, 0x4C, 0x24, 0x00, 0x8D, 0x04, 0x24, 0x50 }; 34 | char M_PickCloseItem[] = "xx---xx---xx----xxxx-xxxx"; 35 | DWORD B_PickCloseItem = FindPattern(StartBase, SizeOfCode, P_PickCloseItem, M_PickCloseItem, 1); 36 | PlayerPointer = *(DWORD*) (B_PickCloseItem + 2); 37 | PickCloseItemCall = RelativeToAbsolute(B_PickCloseItem + 7); 38 | 39 | if (PickCloseItemCall < 0x44DB00)//43A840 (XtremeMt2) # 0x44DA40 PlayWorld3 40 | { 41 | DWORD B_PickCloseItem = FindPattern(StartBase, SizeOfCode, P_PickCloseItem, M_PickCloseItem, 2); 42 | PlayerPointer = *(DWORD*) (B_PickCloseItem + 2); 43 | PickCloseItemCall = RelativeToAbsolute(B_PickCloseItem + 7); 44 | } 45 | 46 | #if (DbgSession) 47 | DbgOutput = "Debug - Zeile ", std::to_string(__LINE__); 48 | MessageBox(0, "PlayerPointer & PickCloseItemCall gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 49 | #endif 50 | 51 | switch (PickCloseItemCall) 52 | { 53 | case 0x465490://if XtremeMt2 54 | { 55 | switch (IsDlgButtonChecked(WindowHandle, IDC_BUTTON[0]))//if Instant-PickUp is deactivated 56 | { 57 | case BST_UNCHECKED: 58 | { 59 | if (PathFindExtension(IniFullPath) == sExt && PathFileExists(IniFullPath)) 60 | { 61 | WritePrivateProfileString(PickUp_Bot, "Instant-PickUp", "1", IniFullPath);//automatically activate 62 | CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Load, 0, 0, 0); 63 | break; 64 | } 65 | } 66 | } 67 | EnableWindow(PickUpBotButton[0], false); 68 | break; 69 | } 70 | default: 71 | { 72 | BYTE P_InstantPickUp[] = {0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x05, 0xF4, 0x01, 0x00, 0x00, 0x00, 0x8B, 0x00, 0x24, 0x10, 0xA3, 0x00, 0x00, 0x00, 0x00}; 73 | char M_InstantPickUp[] = "xx---xxxxxx-x-xxx---x"; 74 | DWORD B_InstantPickUp = FindPattern(StartBase, SizeOfCode, P_InstantPickUp, M_InstantPickUp, 0); 75 | InstantPickUpAddie = B_InstantPickUp + 6; 76 | break; 77 | } 78 | } 79 | break; 80 | } 81 | } 82 | DWORD Buffer = 0; 83 | ReadProcessMemory(hProcess, (void*)(InstantPickUpAddie), &InstantPickUpInitialBytes, sizeof(InstantPickUpInitialBytes), &Buffer); 84 | Buffer = 0; 85 | #if (DbgSession) 86 | DbgOutput = "Debug - Zeile ", std::to_string(__LINE__); 87 | MessageBox(0, "InstantPickUpAddie gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 88 | DbgOutput = "PlayerPointer: " + to_hexstring(PlayerPointer) + win_endl 89 | "PickCloseItemCall: " + to_hexstring(PickCloseItemCall) + win_endl 90 | "InstantPickUpAddie: " + to_hexstring(InstantPickUpAddie); 91 | MessageBox(0, DbgOutput.c_str(), sDbgOutput, MB_ICONASTERISK); 92 | #endif 93 | ExitThread(0); 94 | } 95 | 96 | BOOL WINAPI DllMain (HANDLE hDll, DWORD dwReason, LPVOID lpReserved) 97 | { 98 | switch (dwReason) 99 | { 100 | case DLL_PROCESS_ATTACH: 101 | CreateThread(0, 0, (LPTHREAD_START_ROUTINE)InitComponents, 0, 0, 0); 102 | break; 103 | 104 | case DLL_PROCESS_DETACH: 105 | break; 106 | 107 | case DLL_THREAD_ATTACH: 108 | break; 109 | 110 | case DLL_THREAD_DETACH: 111 | break; 112 | } 113 | return true; 114 | } -------------------------------------------------------------------------------- /PickUp-Bot/PickUp-Bot/PickUp-Bot.h: -------------------------------------------------------------------------------- 1 | DWORD InstantPickUpAddie; 2 | 3 | void ActivatePickUpBot(); 4 | void DeactivatePickUpBot(); 5 | void ActivateInstantPickUp(); 6 | void DeactivateInstantPickUp(); 7 | void Picken(); 8 | 9 | void ActivatePickUpBot() 10 | { 11 | PickUpBotThread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Picken, 0, 0, 0); 12 | EnableWindow(PickUpBotButton[1], false); 13 | EnableWindow(PickUpBotButton[2], true); 14 | } 15 | 16 | void DeactivatePickUpBot() 17 | { 18 | EnableWindow(PickUpBotButton[1], true); 19 | EnableWindow(PickUpBotButton[2], false); 20 | if (PickUpBotThread) 21 | { 22 | TerminateThread(PickUpBotThread, 0); 23 | CloseHandle(PickUpBotThread); 24 | PickUpBotThread = 0; 25 | } 26 | } 27 | 28 | void ActivateInstantPickUp() 29 | { 30 | BYTE PatchBytes[5] = {0x83, 0xC0, 0x00, 0x90, 0x90}; 31 | DWORD buffer = 0; 32 | WriteProcessMemory(hProcess, (void*)(InstantPickUpAddie), &PatchBytes, sizeof(PatchBytes), &buffer); 33 | buffer = 0; 34 | SetWindowText(PickUpBotEdit[0], sDefMinSleep); 35 | } 36 | 37 | void DeactivateInstantPickUp() 38 | { 39 | DWORD buffer = 0; 40 | WriteProcessMemory(hProcess, (void*)(InstantPickUpAddie), &InstantPickUpInitialBytes, sizeof(InstantPickUpInitialBytes), &buffer); 41 | buffer = 0; 42 | SetWindowText(PickUpBotEdit[0], sDefSleep); 43 | } 44 | 45 | void Picken() 46 | { 47 | char sValue[8]; 48 | while(true) 49 | { 50 | PickCloseItem(); 51 | GetWindowText(PickUpBotEdit[0], sValue, 8); 52 | Sleep(atoi(sValue)); 53 | } 54 | } -------------------------------------------------------------------------------- /PickUp-Bot/PickUp-Bot/PickUp-Bot.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unpublished/Tools-Metin2/840a1066031099540a98f18cd5568aee274049d8/PickUp-Bot/PickUp-Bot/PickUp-Bot.rc -------------------------------------------------------------------------------- /PickUp-Bot/PickUp-Bot/PickUp-Bot.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {87DD23DC-FF91-4DB0-8CEC-8C98FB9DB643} 15 | Win32Proj 16 | PickUpBot 17 | 18 | 19 | 20 | DynamicLibrary 21 | true 22 | v120 23 | Unicode 24 | 25 | 26 | DynamicLibrary 27 | false 28 | v120_xp 29 | true 30 | MultiByte 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | true 44 | 45 | 46 | false 47 | 48 | 49 | 50 | 51 | 52 | Level3 53 | Disabled 54 | WIN32;_DEBUG;_WINDOWS;_USRDLL;PICKUPBOT_EXPORTS;%(PreprocessorDefinitions) 55 | true 56 | 57 | 58 | Windows 59 | true 60 | 61 | 62 | 63 | 64 | Level3 65 | 66 | 67 | Full 68 | true 69 | true 70 | WIN32;NDEBUG;_WINDOWS;_USRDLL;PICKUPBOT_EXPORTS;%(PreprocessorDefinitions) 71 | true 72 | true 73 | None 74 | MultiThreaded 75 | 76 | 77 | Windows 78 | false 79 | true 80 | true 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /PickUp-Bot/PickUp-Bot/PickUp-Bot.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Headerdateien 20 | 21 | 22 | Headerdateien 23 | 24 | 25 | Headerdateien 26 | 27 | 28 | Headerdateien 29 | 30 | 31 | Headerdateien 32 | 33 | 34 | Headerdateien 35 | 36 | 37 | Headerdateien 38 | 39 | 40 | Headerdateien 41 | 42 | 43 | Headerdateien 44 | 45 | 46 | Headerdateien 47 | 48 | 49 | 50 | 51 | Quelldateien 52 | 53 | 54 | 55 | 56 | Ressourcendateien 57 | 58 | 59 | -------------------------------------------------------------------------------- /PickUp-Bot/PickUp-Bot/Variables.h: -------------------------------------------------------------------------------- 1 | const char *Version = "1.0.2.0"; 2 | 3 | HANDLE PickUpBotThread; 4 | BYTE InstantPickUpInitialBytes[5]; 5 | int SleepTime; 6 | 7 | #define PickUpBot 8 | #define DbgSession FALSE -------------------------------------------------------------------------------- /PickUp-Bot/PickUp-Bot/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unpublished/Tools-Metin2/840a1066031099540a98f18cd5568aee274049d8/PickUp-Bot/PickUp-Bot/resource.h -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Tooly by Unpublished (Metin2) 2 | 3 | This a snapshop of my latest source code, switch-bot is quite a mess due to 4 | heavy testing with latest binary. 5 | 6 | I appreciate questions, feedback and improvements but don't be too 7 | strict it's my first C++ project ;) I lately started to structure it a 8 | bit...but yeah it's still a mess :D 9 | 10 | PLEASE DON'T ASK HOW TO GET THIS TO WORK OR FOR TUTORIALS!!! 11 | There are a lot of on YouTube 12 | -------------------------------------------------------------------------------- /SendAttackToTarget/SendAttackToTarget.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.20623.1 VSUPREVIEW 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SendAttackToTarget", "SendAttackToTarget\SendAttackToTarget.vcxproj", "{8F778A4A-16E3-4CE6-92D2-BD3B82ED1741}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Release|Win32 = Release|Win32 11 | EndGlobalSection 12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 13 | {8F778A4A-16E3-4CE6-92D2-BD3B82ED1741}.Release|Win32.ActiveCfg = Release|Win32 14 | {8F778A4A-16E3-4CE6-92D2-BD3B82ED1741}.Release|Win32.Build.0 = Release|Win32 15 | EndGlobalSection 16 | GlobalSection(SolutionProperties) = preSolution 17 | HideSolutionNode = FALSE 18 | EndGlobalSection 19 | EndGlobal 20 | -------------------------------------------------------------------------------- /SendAttackToTarget/SendAttackToTarget/GUI-Funcs.h: -------------------------------------------------------------------------------- 1 | int GetSearchPattern() 2 | { 3 | char tValue[3]; 4 | 5 | GetPrivateProfileString(sSettings, sSearchPattern, "-1", tValue, 3, IniFullPath); 6 | return atoi(tValue); 7 | } -------------------------------------------------------------------------------- /SendAttackToTarget/SendAttackToTarget/GUI-Variables.h: -------------------------------------------------------------------------------- 1 | const char *sSendAttackToTarget = "SendAttackToTarget"; 2 | 3 | int IDC_BUTTON[1], IDC_EDIT[1], IDC_STATIC[1]; 4 | HWND CheckButton, SleepEdit, SleepLabel; 5 | 6 | #define WND_CLASS_NAME sSendAttackToTarget 7 | #define XP 0 8 | #define LABEL 9 | #define EDIT -------------------------------------------------------------------------------- /SendAttackToTarget/SendAttackToTarget/GUI.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unpublished/Tools-Metin2/840a1066031099540a98f18cd5568aee274049d8/SendAttackToTarget/SendAttackToTarget/GUI.h -------------------------------------------------------------------------------- /SendAttackToTarget/SendAttackToTarget/Init.cpp: -------------------------------------------------------------------------------- 1 | #include "..\..\Classes\Init Class.h" 2 | 3 | HANDLE hSearchPatternThread; 4 | 5 | void SetAddies() 6 | { 7 | DWORD Base = (DWORD)hPInstance; 8 | const unsigned char* StartBase = reinterpret_cast(Base + 0x1000); 9 | 10 | DWORD SizeOfCode = GetModuleSize(); 11 | 12 | DWORD dwSeachPattern; 13 | GetExitCodeThread(hSearchPatternThread, &dwSeachPattern); 14 | CloseHandle(hSearchPatternThread); 15 | 16 | //TargetVIDOffset (0)F24C(Metin2 DE), 0x4148 (Cyperia/Metin2 DE Binary 2013/14?), 0x41AC/0x454C (PServer 2013)/Metin2 DE Binary (2013/12?), 0x3E10 (Other) 17 | switch (dwSeachPattern) 18 | { 19 | case 1:// Hamachi 20 | { 21 | BYTE P_PlayerPointer [] = { 0x85, 0xC9, 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x95, 0xC2, 0x52, 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x8B, 0xE5 }; 22 | char M_PlayerPointer [] = "xxxx---xxxxxx----x---xxx"; 23 | DWORD B_PlayerPointer = FindPattern(StartBase, SizeOfCode, P_PlayerPointer, M_PlayerPointer, 2); 24 | PlayerPointer = *(DWORD*) (B_PlayerPointer + 4); 25 | 26 | #if (DbgSession) 27 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 28 | MessageBox(0, "PlayerPointer gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 29 | #endif 30 | 31 | BYTE P_SendAttack [] = { 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x57, 0x50, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x8B, 0xCE, 0xE8, 0x00, 0x00, 0x00, 0x00 }; 32 | char M_SendAttack [] = "xx---xxxx----xxx---x"; 33 | DWORD B_SendAttack = FindPattern(StartBase, SizeOfCode, P_SendAttack, M_SendAttack, 0); 34 | NetPointer = *(DWORD*) (B_SendAttack + 2); 35 | SendAttackCall = RelativeToAbsolute(B_SendAttack + 9); 36 | 37 | #if (DbgSession) 38 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 39 | MessageBox(0, "NetPointer & SendAttackCall gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 40 | #endif 41 | 42 | TargetVIDOffset = 0x3E10; 43 | break; 44 | } 45 | 46 | default:// Metin2 PServer 2010 - 2013 47 | { 48 | BYTE P_PlayerPointer [] = { 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x84, 0xC0, 0x74, 0x00, 0x32, 0xC0 }; 49 | char M_PlayerPointer [] = "xx---xx---xxxx-xx"; 50 | DWORD B_PlayerPointer = FindPattern(StartBase, SizeOfCode, P_PlayerPointer, M_PlayerPointer, 0); 51 | PlayerPointer = *(DWORD*) (B_PlayerPointer + 2); 52 | 53 | #if (DbgSession) 54 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 55 | MessageBox(0, "PlayerPointer gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 56 | #endif 57 | 58 | BYTE P_SendAttack [] = { 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x53, 0x50, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x8B, 0xCE, 0xE8, 0x00, 0x00, 0x00, 0x00 }; 59 | char M_SendAttack [] = "xx---xxxx----xxx---x"; 60 | DWORD B_SendAttack = FindPattern(StartBase, SizeOfCode, P_SendAttack, M_SendAttack, 0); 61 | NetPointer = *(DWORD*) (B_SendAttack + 2); 62 | SendAttackCall = RelativeToAbsolute(B_SendAttack + 9); 63 | 64 | #if (DbgSession) 65 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 66 | MessageBox(0, "NetPointer & SendAttackCall gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 67 | #endif 68 | 69 | BYTE P_TargetVIDOffset [] = { 0x8B, 0x44, 0x24, 0x00, 0x89, 0x81, 0x00, 0x00, 0x00, 0x00, 0xC2, 0x04 }; 70 | char M_TargetVIDOffset [] = "xxx-xx----xx"; 71 | for (int i = 3; i < 5; i++) 72 | { 73 | DWORD B_TargetVIDOffset = FindPattern(StartBase, SizeOfCode, P_TargetVIDOffset, M_TargetVIDOffset, i); 74 | TargetVIDOffset = (*(BYTE*)(B_TargetVIDOffset + 6)) | (*(BYTE*)(B_TargetVIDOffset + 7) << 8) | (0x00 << 16) | (0x00 << 24); 75 | if (TargetVIDOffset == 0x41AC) break; 76 | } 77 | 78 | if (TargetVIDOffset != 0x41AC) 79 | { 80 | BYTE P_TargetVIDOffset[] = { 0x8B, 0x81, 0x00, 0x00, 0x00, 0x00, 0xC3 }; 81 | char M_TargetVIDOffset[] = "xx----x"; 82 | DWORD B_TargetVIDOffset = FindPattern(StartBase, SizeOfCode, P_TargetVIDOffset, M_TargetVIDOffset, 11); 83 | TargetVIDOffset = (*(BYTE*)(B_TargetVIDOffset + 2)) | (*(BYTE*)(B_TargetVIDOffset + 3) << 8) | (0x00 << 16) | (0x00 << 24); 84 | //B_TargetVIDOffset = FindPattern(StartBase, SizeOfCode, P_TargetVIDOffset, M_TargetVIDOffset, 11); 85 | //TargetVIDOffset = (*(BYTE*) (B_TargetVIDOffset + 6)) | (*(BYTE*) (B_TargetVIDOffset + 7) << 8) | (0x00 << 16) | (0x00 << 24); 86 | //if (TargetVIDOffset != 0x3E10) 87 | //{ 88 | // 89 | // BYTE P_TargetVIDOffsetXtreme [] = { 0x8B, 0x81, 0x00, 0x00, 0x00, 0x00, 0xC3}; 90 | // char M_TargetVIDOffsetXtreme [] = "xx----x"; 91 | // B_TargetVIDOffset = FindPattern(StartBase, SizeOfCode, P_TargetVIDOffsetXtreme, M_TargetVIDOffsetXtreme, 12); 92 | // TargetVIDOffset = (*(BYTE*) (B_TargetVIDOffset + 2)) | (*(BYTE*) (B_TargetVIDOffset + 3) << 8) | (0x00 << 16) | (0x00 << 24); 93 | //} 94 | if ((*(BYTE*)(B_TargetVIDOffset + 3)) < 0x40 || (*(BYTE*)(B_TargetVIDOffset + 3)) > 0x50)//i = 11 95 | TargetVIDOffset = 0x3E10; 96 | #if (DbgSession) 97 | else 98 | { 99 | DbgOutput = to_hexstring((*(BYTE*)(B_TargetVIDOffset + 3))); 100 | MessageBox(0, DbgOutput.c_str(), "Erster gefundener Byte (TargetVIDOffset)", 0); 101 | } 102 | #endif 103 | } 104 | #if (DbgSession) 105 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 106 | MessageBox(0, "TargetVIDOffset gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 107 | #endif 108 | break; 109 | } 110 | } 111 | #if (DbgSession) 112 | DbgOutput = "PlayerPointer: " + to_hexstring(PlayerPointer) + win_endl 113 | "NetPointer: " + to_hexstring(NetPointer) + win_endl 114 | "SendAttackCall: " + to_hexstring(SendAttackCall) + win_endl 115 | "TargetVIDOffset: " + to_hexstring(TargetVIDOffset); 116 | MessageBox(0, DbgOutput.c_str(), "DbgOutput", MB_ICONASTERISK); 117 | #endif 118 | ExitThread(0); 119 | } 120 | 121 | BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved) 122 | { 123 | switch (dwReason) 124 | { 125 | case DLL_PROCESS_ATTACH: 126 | hSearchPatternThread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)GetSearchPattern, 0, 0, 0); 127 | CreateThread(0, 0, (LPTHREAD_START_ROUTINE)InitComponents, 0, 0, 0); 128 | break; 129 | 130 | case DLL_PROCESS_DETACH: 131 | break; 132 | 133 | case DLL_THREAD_ATTACH: 134 | break; 135 | 136 | case DLL_THREAD_DETACH: 137 | break; 138 | } 139 | return true; 140 | } -------------------------------------------------------------------------------- /SendAttackToTarget/SendAttackToTarget/SendAttackToTarget.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unpublished/Tools-Metin2/840a1066031099540a98f18cd5568aee274049d8/SendAttackToTarget/SendAttackToTarget/SendAttackToTarget.rc -------------------------------------------------------------------------------- /SendAttackToTarget/SendAttackToTarget/SendAttackToTarget.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {8F778A4A-16E3-4CE6-92D2-BD3B82ED1741} 15 | Win32Proj 16 | SendAttackToTarget 17 | 18 | 19 | 20 | DynamicLibrary 21 | true 22 | v120 23 | Unicode 24 | 25 | 26 | DynamicLibrary 27 | false 28 | v120_xp 29 | true 30 | MultiByte 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | true 44 | 45 | 46 | false 47 | 48 | 49 | 50 | 51 | 52 | Level3 53 | Disabled 54 | WIN32;_DEBUG;_WINDOWS;_USRDLL;SENDATTACKTOTARGET_EXPORTS;%(PreprocessorDefinitions) 55 | true 56 | 57 | 58 | Windows 59 | true 60 | 61 | 62 | 63 | 64 | Level3 65 | 66 | 67 | Full 68 | true 69 | true 70 | WIN32;NDEBUG;_WINDOWS;_USRDLL;SENDATTACKTOTARGET_EXPORTS;%(PreprocessorDefinitions) 71 | true 72 | None 73 | true 74 | MultiThreaded 75 | 76 | 77 | Windows 78 | false 79 | true 80 | true 81 | 82 | 83 | 0x0407 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /SendAttackToTarget/SendAttackToTarget/SendAttackToTarget.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Headerdateien 20 | 21 | 22 | Headerdateien 23 | 24 | 25 | Headerdateien 26 | 27 | 28 | Headerdateien 29 | 30 | 31 | Headerdateien 32 | 33 | 34 | Headerdateien 35 | 36 | 37 | Headerdateien 38 | 39 | 40 | Headerdateien 41 | 42 | 43 | Headerdateien 44 | 45 | 46 | Headerdateien 47 | 48 | 49 | 50 | 51 | Quelldateien 52 | 53 | 54 | 55 | 56 | Ressourcendateien 57 | 58 | 59 | -------------------------------------------------------------------------------- /SendAttackToTarget/SendAttackToTarget/TesTProjekt.h: -------------------------------------------------------------------------------- 1 | void TesTProjekt() 2 | { 3 | char szSleep[8]; 4 | int iSleep; 5 | while (true) 6 | { 7 | if (IsDlgButtonChecked(WindowHandle, IDC_BUTTON[0]) == BST_CHECKED) 8 | { 9 | int TargetVID = GetTargetVID(); 10 | SendAttack(TargetVID); 11 | } 12 | GetWindowText(SleepEdit, szSleep, 8); 13 | iSleep = atoi(szSleep); 14 | Sleep((iSleep < 250) ? 250 : iSleep); 15 | } 16 | } -------------------------------------------------------------------------------- /SendAttackToTarget/SendAttackToTarget/Variables.h: -------------------------------------------------------------------------------- 1 | const char *Version = "1.0.3.0"; 2 | 3 | #define SendAttackToTarget 4 | #define DbgSession FALSE -------------------------------------------------------------------------------- /SendAttackToTarget/SendAttackToTarget/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unpublished/Tools-Metin2/840a1066031099540a98f18cd5568aee274049d8/SendAttackToTarget/SendAttackToTarget/resource.h -------------------------------------------------------------------------------- /Spam-Bot/Spam-Bot.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.20623.1 VSUPREVIEW 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Spam-Bot", "Spam-Bot\Spam-Bot.vcxproj", "{F6C730AC-DA1B-4BEA-B89F-CD0515F071DA}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Release|Win32 = Release|Win32 11 | EndGlobalSection 12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 13 | {F6C730AC-DA1B-4BEA-B89F-CD0515F071DA}.Release|Win32.ActiveCfg = Release|Win32 14 | {F6C730AC-DA1B-4BEA-B89F-CD0515F071DA}.Release|Win32.Build.0 = Release|Win32 15 | EndGlobalSection 16 | GlobalSection(SolutionProperties) = preSolution 17 | HideSolutionNode = FALSE 18 | EndGlobalSection 19 | EndGlobal 20 | -------------------------------------------------------------------------------- /Spam-Bot/Spam-Bot/GUI-Funcs.h: -------------------------------------------------------------------------------- 1 | int Save() 2 | { 3 | #if (DbgSession) 4 | PrintDbg("Saving ini", DbgOutput); 5 | #endif 6 | if (!ValidateIni()) 7 | { 8 | #if (DbgSession) 9 | PrintDbg("Error while validating ini to be saved (" + (std::string)IniFullPath + ")", DbgOutput); 10 | #endif 11 | return 1; 12 | } 13 | 14 | std::string tValue; 15 | tValue = GetEditText(SpamBotEdit[0]); 16 | WritePrivateProfileString(Spam_Bot, sSpamText, tValue.c_str(), IniFullPath); 17 | 18 | tValue = std::to_string(SendMessage(SpamBotCombo[0], CB_GETCURSEL, (WPARAM)0, (LPARAM)0)); 19 | WritePrivateProfileString(Spam_Bot, sChatTyp, tValue.c_str(), IniFullPath); 20 | 21 | tValue = GetEditText(SpamBotEdit[1]); 22 | WritePrivateProfileString(Spam_Bot, sAnzahl, (std::stoi(tValue) == 0) ? "0" : tValue.c_str(), IniFullPath); 23 | 24 | tValue = GetEditText(SpamBotEdit[2]); 25 | WritePrivateProfileString(Spam_Bot, "Sleep-Zeit", (std::stoi(tValue) < iDefMinSleep) ? sDefMinSleep : tValue.c_str(), IniFullPath); 26 | return 0; 27 | } 28 | 29 | int Load(int iMode) 30 | { 31 | switch (iMode) 32 | { 33 | case 0: 34 | { 35 | if (PathFindExtension(IniFullPath) != sExt) 36 | { 37 | std::string sPathEx; 38 | sPathEx = (std::string)IniFullPath + (std::string)sExt; 39 | if (!PathFileExists(sPathEx.c_str())) 40 | return 1; 41 | PathAddExtension(IniFullPath, sExt); 42 | } 43 | break; 44 | } 45 | case 1: 46 | { 47 | if (!CheckIni(TRUE)) 48 | return 2; 49 | break; 50 | } 51 | } 52 | 53 | char Wert[2048]; 54 | 55 | GetPrivateProfileString(Spam_Bot, "ChatOccurrence", "-1", Wert, 128, IniFullPath); 56 | ChatOccurrence = atoi(Wert); 57 | 58 | GetPrivateProfileString(Spam_Bot, sSpamText, "", Wert, 128, IniFullPath); 59 | SetWindowText(SpamBotEdit[0], Wert); 60 | 61 | GetPrivateProfileString(Spam_Bot, sChatTyp, "0", Wert, 128, IniFullPath); 62 | SendMessage(SpamBotCombo[0], CB_SETCURSEL, atoi(Wert), 0); 63 | 64 | GetPrivateProfileString(Spam_Bot, sAnzahl, "0", Wert, 128, IniFullPath); 65 | SetWindowText(SpamBotEdit[1], Wert); 66 | 67 | GetPrivateProfileString(Spam_Bot, "Sleep-Zeit", "750", Wert, 128, IniFullPath); 68 | SetWindowText(SpamBotEdit[2], Wert); 69 | return 0; 70 | } 71 | 72 | void Reset() 73 | { 74 | WritePrivateProfileString(Spam_Bot, "ChatOccurrence", "-1", IniFullPath); 75 | WritePrivateProfileString(Spam_Bot, sSpamText, "", IniFullPath); 76 | WritePrivateProfileString(Spam_Bot, sChatTyp, "0", IniFullPath); 77 | WritePrivateProfileString(Spam_Bot, sAnzahl, "0", IniFullPath); 78 | WritePrivateProfileString(Spam_Bot, "Sleep-Zeit", "750", IniFullPath); 79 | 80 | Load(2); 81 | } 82 | 83 | int GetSearchPattern() 84 | { 85 | char Wert[3]; 86 | 87 | GetPrivateProfileString(sSettings, sSearchPattern, "-1", Wert, 3, IniFullPath); 88 | return atoi(Wert); 89 | } 90 | 91 | void GUI() 92 | { 93 | std::string tValue; 94 | while (true) 95 | { 96 | if (!SpamBotThread) 97 | { 98 | SpamText = GetEditText(SpamBotEdit[0]); 99 | tValue = GetEditText(SpamBotEdit[2]); 100 | 101 | if (SpamText.empty()) 102 | { 103 | EnableWindow(SpamBotButton[0], false); 104 | while (SpamText.empty()) 105 | { 106 | SpamText = GetEditText(SpamBotEdit[0]); 107 | Sleep(250); 108 | } 109 | } 110 | else 111 | { 112 | EnableWindow(SpamBotButton[0], true); 113 | } 114 | 115 | if (std::stoi(tValue) < 750) 116 | { 117 | EnableWindow(SpamBotButton[0], false); 118 | while (std::stoi(tValue) < 750) 119 | { 120 | tValue = GetEditText(SpamBotEdit[2]); 121 | Sleep(250); 122 | } 123 | } 124 | else 125 | { 126 | EnableWindow(SpamBotButton[0], true); 127 | } 128 | 129 | SleepTime = (std::stoi(tValue) < 750) ? 750 : std::stoi(tValue); 130 | Sleep(200); 131 | } 132 | else 133 | { 134 | Sleep(SleepTime); 135 | } 136 | } 137 | } -------------------------------------------------------------------------------- /Spam-Bot/Spam-Bot/GUI-Variables.h: -------------------------------------------------------------------------------- 1 | int IDC_BUTTON[5], IDC_EDIT[3], IDC_COMBO[1], IDC_STATIC[4]; 2 | HWND SpamBotLabel[4], SpamBotCombo[1], SpamBotEdit[3], SpamBotButton[5]; 3 | 4 | #define WND_CLASS_NAME Spam_Bot 5 | #define LABEL 6 | #define COMBO 7 | #define EDIT 8 | 9 | #define XP 0 -------------------------------------------------------------------------------- /Spam-Bot/Spam-Bot/GUI.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unpublished/Tools-Metin2/840a1066031099540a98f18cd5568aee274049d8/Spam-Bot/Spam-Bot/GUI.h -------------------------------------------------------------------------------- /Spam-Bot/Spam-Bot/Init.cpp: -------------------------------------------------------------------------------- 1 | #include "..\..\Classes\Init Class.h" 2 | 3 | void SetAddies() 4 | { 5 | DWORD Base = (DWORD)hPInstance; 6 | const unsigned char* StartBase = reinterpret_cast(Base + 0x1000); 7 | 8 | DWORD SizeOfCode = GetModuleSize(); 9 | 10 | switch (GetSearchPattern()) 11 | { 12 | case 1:// Hamachi 13 | { 14 | BYTE P_SendChat[] = {0x8B, 0x55, 0xFC, 0x8B, 0x45, 0xF8, 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50, 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x5E}; 15 | char M_SendChat[] = "xxxxxxxx---xxxx---xx---xx"; 16 | DWORD B_SendChat = FindPattern(StartBase, SizeOfCode, P_SendChat, M_SendChat, 5); 17 | NetPointer = *(DWORD*)(B_SendChat + 8); 18 | SendChatCall = RelativeToAbsolute(B_SendChat + 15); 19 | break; 20 | } 21 | default: 22 | { 23 | 24 | BYTE P_SlotAndItemIndexOffset[] = {0x8B, 0x44, 0x24, 0x04, 0x83, 0xF8, 0x00, 0x72, 0x05, 0x33, 0xC0, 0xC2, 0x04, 0x00, 0x6B, 0xC0, 0x00, 0x8D, 0x00, 0x08}; 25 | char M_SlotAndItemIndexOffset[] = "xxxxxx-xxxxxxxxx-x-x"; 26 | DWORD B_SlotAndItemIndexOffset = FindPattern(StartBase, SizeOfCode, P_SlotAndItemIndexOffset, M_SlotAndItemIndexOffset, 0); 27 | SlotOffset = *(BYTE*)(B_SlotAndItemIndexOffset + 16); 28 | 29 | #if (DbgSession) 30 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 31 | MessageBox(0, "SlotOffset gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 32 | #endif 33 | 34 | BYTE P_SendChat[] = {0x8B, 0x54, 0x24, 0x04, 0x8B, 0x44, 0x24, 0x08, 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50, 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x5E}; 35 | char M_SendChat[] = "xxxxxxxxxx---xxxx---xx---xx"; 36 | DWORD B_SendChat = FindPattern(StartBase, SizeOfCode, P_SendChat, M_SendChat, 5); 37 | if (SlotOffset == 0x2E) 38 | B_SendChat = FindPattern(StartBase, SizeOfCode, P_SendChat, M_SendChat, 7); 39 | 40 | NetPointer = *(DWORD*)(B_SendChat + 10); 41 | SendChatCall = RelativeToAbsolute(B_SendChat + 17); 42 | break; 43 | } 44 | } 45 | #if (DbgSession) 46 | DbgOutput = "NetPointer: " + to_hexstring(NetPointer) + win_endl 47 | "SendChatCall: " + to_hexstring(SendChatCall); 48 | MessageBox(0, DbgOutput.c_str(), sDbgOutput, MB_ICONASTERISK); 49 | #endif 50 | ExitThread(0); 51 | } 52 | 53 | BOOL WINAPI DllMain (HANDLE hDll, DWORD dwReason, LPVOID lpReserved) 54 | { 55 | switch (dwReason) 56 | { 57 | case DLL_PROCESS_ATTACH: 58 | CreateThread(0, 0, (LPTHREAD_START_ROUTINE)InitComponents, 0, 0, 0); 59 | break; 60 | 61 | case DLL_PROCESS_DETACH: 62 | break; 63 | 64 | case DLL_THREAD_ATTACH: 65 | break; 66 | 67 | case DLL_THREAD_DETACH: 68 | break; 69 | } 70 | return true; 71 | } -------------------------------------------------------------------------------- /Spam-Bot/Spam-Bot/Spam-Bot.h: -------------------------------------------------------------------------------- 1 | void ActivateSpamBot(); 2 | void DeactivateSpamBot(); 3 | void Spammen(); 4 | 5 | void ActivateSpamBot() 6 | { 7 | if (ChatOccurrence == -1) 8 | { 9 | ChatOccurrence = 2; 10 | WritePrivateProfileString(Spam_Bot, "ChatOccurrence", "1", IniFullPath); 11 | } 12 | 13 | SpamBotThread = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Spammen, 0, 0, 0); 14 | EnableWindow(SpamBotButton[0], false); 15 | EnableWindow(SpamBotButton[1], true); 16 | } 17 | 18 | void DeactivateSpamBot() 19 | { 20 | EnableWindow(SpamBotButton[0], true); 21 | EnableWindow(SpamBotButton[1], false); 22 | if (SpamBotThread) 23 | { 24 | TerminateThread(SpamBotThread, 0); 25 | CloseHandle(SpamBotThread); 26 | SpamBotThread = 0; 27 | } 28 | if (ChatOccurrence == 2) 29 | { 30 | WritePrivateProfileString(Spam_Bot, "ChatOccurrence", "0", IniFullPath); 31 | } 32 | } 33 | 34 | void Spammen() 35 | { 36 | char Temp[8]; 37 | int ChatModus = SendMessage(SpamBotCombo[0], CB_GETCURSEL, (WPARAM)0, (LPARAM)0); 38 | switch (ChatModus) 39 | { 40 | case 1: 41 | ChatModus = 6; 42 | break; 43 | case 2: 44 | ChatModus = 4; 45 | break; 46 | } 47 | GetWindowText(SpamBotEdit[1], Temp, 8); 48 | int Anzahl = atoi(Temp); 49 | int Counter = 1; 50 | memset(&Temp[0], 0, sizeof(Temp)); 51 | while(true) 52 | { 53 | SendChat(SpamText.c_str(), ChatModus); 54 | if (Anzahl > 0) 55 | { 56 | if (Counter == Anzahl) 57 | { 58 | CreateThread(0, 0, (LPTHREAD_START_ROUTINE)DeactivateSpamBot, 0, 0, 0); 59 | break; 60 | } 61 | 62 | Counter++; 63 | } 64 | Sleep(SleepTime); 65 | } 66 | } -------------------------------------------------------------------------------- /Spam-Bot/Spam-Bot/Spam-Bot.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unpublished/Tools-Metin2/840a1066031099540a98f18cd5568aee274049d8/Spam-Bot/Spam-Bot/Spam-Bot.rc -------------------------------------------------------------------------------- /Spam-Bot/Spam-Bot/Spam-Bot.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {F6C730AC-DA1B-4BEA-B89F-CD0515F071DA} 15 | Win32Proj 16 | SpamBot 17 | 18 | 19 | 20 | DynamicLibrary 21 | true 22 | v120 23 | Unicode 24 | 25 | 26 | DynamicLibrary 27 | false 28 | v120_xp 29 | true 30 | MultiByte 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | true 44 | 45 | 46 | false 47 | 48 | 49 | 50 | 51 | 52 | Level3 53 | Disabled 54 | WIN32;_DEBUG;_WINDOWS;_USRDLL;SPAMBOT_EXPORTS;%(PreprocessorDefinitions) 55 | true 56 | 57 | 58 | Windows 59 | true 60 | 61 | 62 | 63 | 64 | Level3 65 | 66 | 67 | MaxSpeed 68 | true 69 | WIN32;NDEBUG;_WINDOWS;_USRDLL;SPAMBOT_EXPORTS;%(PreprocessorDefinitions) 70 | true 71 | None 72 | true 73 | MultiThreaded 74 | 75 | 76 | Windows 77 | false 78 | true 79 | true 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /Spam-Bot/Spam-Bot/Spam-Bot.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Headerdateien 20 | 21 | 22 | Headerdateien 23 | 24 | 25 | Headerdateien 26 | 27 | 28 | Headerdateien 29 | 30 | 31 | Headerdateien 32 | 33 | 34 | Headerdateien 35 | 36 | 37 | Headerdateien 38 | 39 | 40 | Headerdateien 41 | 42 | 43 | Headerdateien 44 | 45 | 46 | Headerdateien 47 | 48 | 49 | 50 | 51 | Ressourcendateien 52 | 53 | 54 | 55 | 56 | Quelldateien 57 | 58 | 59 | -------------------------------------------------------------------------------- /Spam-Bot/Spam-Bot/Variables.h: -------------------------------------------------------------------------------- 1 | const char *Version = "1.0.1.0"; 2 | 3 | HANDLE SpamBotThread; 4 | std::string SpamText; 5 | int SleepTime, ChatOccurrence; 6 | 7 | #define SpamBot 8 | #define DbgSession FALSE -------------------------------------------------------------------------------- /Spam-Bot/Spam-Bot/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unpublished/Tools-Metin2/840a1066031099540a98f18cd5568aee274049d8/Spam-Bot/Spam-Bot/resource.h -------------------------------------------------------------------------------- /Switch-Bot/Switch-Bot.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.20623.1 VSUPREVIEW 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Switch-Bot", "Switch-Bot\Switch-Bot.vcxproj", "{991C4DBF-5BF2-44C7-8F4E-FF3D77E191C4}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Release|Win32 = Release|Win32 11 | EndGlobalSection 12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 13 | {991C4DBF-5BF2-44C7-8F4E-FF3D77E191C4}.Release|Win32.ActiveCfg = Release|Win32 14 | {991C4DBF-5BF2-44C7-8F4E-FF3D77E191C4}.Release|Win32.Build.0 = Release|Win32 15 | EndGlobalSection 16 | GlobalSection(SolutionProperties) = preSolution 17 | HideSolutionNode = FALSE 18 | EndGlobalSection 19 | EndGlobal 20 | -------------------------------------------------------------------------------- /Switch-Bot/Switch-Bot/GUI-Funcs.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unpublished/Tools-Metin2/840a1066031099540a98f18cd5568aee274049d8/Switch-Bot/Switch-Bot/GUI-Funcs.h -------------------------------------------------------------------------------- /Switch-Bot/Switch-Bot/GUI-Variables.h: -------------------------------------------------------------------------------- 1 | int IDC_TAB[1], IDC_BUTTON[77], IDC_STATIC[12], IDC_EDIT[74], IDC_COMBO[70]; 2 | HWND AlternativBoni[5][2], SwitchBotBonusCombo[5][14], SwitchBotBonusEdit[5][14], SwitchBotButtonSave[5][4], SwitchBotButtonReset[5][4], SwitchBotButtonStarten[5][2], SwitchBotButtonStoppen[5][2]; 3 | HWND SwitchBotTab[1], SwitchBotLabel[12], SwitchBotEdit[5], SwitchBotButton[7]; 4 | 5 | #define WND_CLASS_NAME sSwitchBot 6 | #define XP 0 7 | #define LABEL 8 | #define TAB 9 | #define COMBO 10 | #define EDIT 11 | -------------------------------------------------------------------------------- /Switch-Bot/Switch-Bot/GUI.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unpublished/Tools-Metin2/840a1066031099540a98f18cd5568aee274049d8/Switch-Bot/Switch-Bot/GUI.h -------------------------------------------------------------------------------- /Switch-Bot/Switch-Bot/Init.cpp: -------------------------------------------------------------------------------- 1 | #include "..\..\Classes\Init Class.h" 2 | 3 | void SetAddies() 4 | { 5 | DWORD Base = (DWORD)hPInstance; 6 | const unsigned char* StartBase = reinterpret_cast(Base + 0x1000); 7 | 8 | DWORD SizeOfCode = GetModuleSize(); 9 | 10 | switch (GetSearchPattern()) 11 | { 12 | case 1: 13 | { 14 | BYTE P_PlayerPointer [] = { 0x85, 0xC9, 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x95, 0xC2, 0x52, 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x8B, 0xE5 }; 15 | char M_PlayerPointer [] = "xxxx---xxxxxx----x---xxx"; 16 | DWORD B_PlayerPointer = FindPattern(StartBase, SizeOfCode, P_PlayerPointer, M_PlayerPointer, 2); 17 | PlayerPointer = *(DWORD*) (B_PlayerPointer + 4); 18 | 19 | #if (DbgSession) 20 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 21 | MessageBox(0, "PlayerPointer gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 22 | #endif 23 | 24 | BYTE P_SendItemUseToItem [] = { 0x8B, 0x45, 0xF8, 0x8B, 0x4D, 0xF4, 0x50, 0x51, 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00 }; 25 | char M_SendItemUseToItem [] = "xxxxxxxxxx---xx---xx---x"; 26 | DWORD B_SendItemUseToItem = FindPattern(StartBase, SizeOfCode, P_SendItemUseToItem, M_SendItemUseToItem, 0); 27 | NetPointer = *(DWORD*) (B_SendItemUseToItem + 10); 28 | SendItemUseToItemCall = RelativeToAbsolute(B_SendItemUseToItem + 15); 29 | 30 | #if (DbgSession) 31 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 32 | MessageBox(0, "NetPointer & SendItemUseToItemCall gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 33 | #endif 34 | 35 | BYTE P_SendShopBuy [] = { 0x8B, 0x55, 0xFC, 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x52, 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x8B, 0xE5 }; 36 | char M_SendShopBuy [] = "xxxxx---xxx---xx---xxx"; 37 | DWORD B_SendShopBuy = FindPattern(StartBase, SizeOfCode, P_SendShopBuy, M_SendShopBuy, 9); 38 | SendShopBuyCall = RelativeToAbsolute(B_SendShopBuy + 11); 39 | 40 | #if (DbgSession) 41 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 42 | MessageBox(0, " SendShopBuyCall gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 43 | #endif 44 | 45 | BYTE P_ShopPointer[] = { 0xA1, 0x00, 0x00, 0x00, 0x00, 0x33, 0xC9, 0x89, 0x48, 0x04, 0x89, 0x48, 0x08, 0x89, 0x48, 0x0C, 0xE9, 0x00, 0x00, 0x00, 0x00 }; 46 | char M_ShopPointer[] = "x---xxxxxxxxxxxxx---x"; 47 | DWORD B_ShopPointer = FindPattern(StartBase, SizeOfCode, P_ShopPointer, M_ShopPointer, 0); 48 | ShopPointer = *(DWORD*) (B_ShopPointer + 1); 49 | } 50 | default: 51 | { 52 | break; 53 | BYTE P_EP[] = { 0xA1, 0x00, 0x00, 0x00, 0x00, 0x33, 0xC4, 0x50 }; 54 | char M_EP[] = { "x----xxx" }; 55 | DWORD B_EP = FindPattern(StartBase, SizeOfCode, P_EP, M_EP, 0); 56 | DWORD EP = *(DWORD*)(B_EP + 1); 57 | 58 | #if (DbgSession) 59 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 60 | MessageBox(0, ("EP: " + to_hexstring(EP)).c_str(), DbgOutput.c_str(), MB_ICONASTERISK); 61 | #endif 62 | if (EP > 0x70A000)//Shiro2 63 | { 64 | BYTE P_PlayerPointer[] = { 0x55, 0x8B, 0xEC, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xC3 }; 65 | char M_PlayerPointer[] = "xxxx---xxx"; 66 | DWORD B_PlayerPointer = FindPattern(StartBase, SizeOfCode, P_PlayerPointer, M_PlayerPointer, 3); 67 | PlayerPointer = *(DWORD*)(B_PlayerPointer + 4); 68 | } 69 | else 70 | { 71 | BYTE P_PlayerPointer [] = { 0x8B, 0x4C, 0x24, 0x0C, 0x8D, 0x54, 0x24, 0x08, 0x52, 0x8B, 0x54, 0x24, 0x14, 0x8D, 0x44, 0x24, 0x0B, 0x50, 0x51, 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x52, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xBF, 0x44, 0x24, 0x08, 0x0F, 0xB6, 0x4C, 0x24, 0x07 }; 72 | char M_PlayerPointer [] = "xxxxxxxxxxxxxxxxxxxxx---xxx----xxxxxxxxxx"; 73 | DWORD B_PlayerPointer = FindPattern(StartBase, SizeOfCode, P_PlayerPointer, M_PlayerPointer, 0); 74 | PlayerPointer = *(DWORD*)(B_PlayerPointer + 21); 75 | } 76 | 77 | #if (DbgSession) 78 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 79 | MessageBox(0, "PlayerPointer gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 80 | #endif 81 | 82 | DWORD B_SendItemUseToItem; 83 | if (iClientMod) 84 | { 85 | //LongDong2 modification 86 | BYTE P_NetPointer[] = { 0x55, 0x8B, 0xEC, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xC3 }; 87 | char M_NetPointer[] = "xxxx---x"; 88 | DWORD B_NetPointer = FindPattern(StartBase, SizeOfCode, P_NetPointer, M_NetPointer, 17); 89 | NetPointer = *(DWORD*)(B_NetPointer + 4); 90 | 91 | #if DbgSession 92 | //DbgOutput = "Debug - Zeile " + std::to_string(i); 93 | MessageBox(0, ("NetPointer: " + to_hexstring(NetPointer)).c_str(), DbgOutput.c_str(), MB_ICONASTERISK); 94 | #endif 95 | BYTE P_SendItemUseToItemLD2[] = {0x8B, 0x4C, 0xE4, 0x0C, 0x8B, 0x44, 0xE4, 0x08, 0x50, 0x51, 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x5E}; 96 | char M_SendItemUseToItemLD2[] = "xxxxxxxxxxxx---xx---xx---xx"; 97 | B_SendItemUseToItem = FindPattern(StartBase, SizeOfCode, P_SendItemUseToItemLD2, M_SendItemUseToItemLD2, 0); 98 | } 99 | else 100 | { 101 | if (EP > 0x70A000)//Shiro2 102 | { 103 | BYTE P_NetPointer[] = { 0x55, 0x8B, 0xEC, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xC3 }; 104 | char M_NetPointer[] = "xxxx---xxx"; 105 | DWORD B_NetPointer = FindPattern(StartBase, SizeOfCode, P_NetPointer, M_NetPointer, 18); 106 | NetPointer = *(DWORD*)(B_NetPointer + 4); 107 | BYTE P_SendItemUseToItem[] = { 0x51, 0x8B, 0xCC, 0x66, 0x8B, 0x55, 0xF4, 0x66, 0x89, 0x11, 0x8A, 0x45, 0xF6, 0x88, 0x41, 0x02, 0x8B, 0x4D, 0xFC, 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x8B, 0xE5, 0x5D, 0xC3 }; 108 | char M_SendItemUseToItem[] = "xxxxxxxxxxxxxxxxxxxx---xx---xxxxx"; 109 | B_SendItemUseToItem = FindPattern(StartBase, SizeOfCode, P_SendItemUseToItem, M_SendItemUseToItem, 0); 110 | SendItemUseToItemCall = RelativeToAbsolute(B_SendItemUseToItem + 25); 111 | } 112 | else 113 | { 114 | BYTE P_SendItemUseToItem[] = { 0x8B, 0x44, 0x24, 0x08, 0x8B, 0x4C, 0x24, 0x0C, 0x50, 0x51, 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x5E }; 115 | char M_SendItemUseToItem[] = "xxxxxxxxxxxx---xx---xx---xx"; 116 | B_SendItemUseToItem = FindPattern(StartBase, SizeOfCode, P_SendItemUseToItem, M_SendItemUseToItem, 0); 117 | SendItemUseToItemCall = RelativeToAbsolute(B_SendItemUseToItem + 17); 118 | NetPointer = *(DWORD*)(B_SendItemUseToItem + 12); 119 | } 120 | } 121 | BYTE NetPointerBytes[3]; 122 | NetPointerBytes[0] = *(BYTE*) (B_SendItemUseToItem + 12); 123 | NetPointerBytes[1] = *(BYTE*) (B_SendItemUseToItem + 13); 124 | NetPointerBytes[2] = *(BYTE*) (B_SendItemUseToItem + 14); 125 | 126 | #if (DbgSession) 127 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 128 | MessageBox(0, "NetPointer & SendItemUseToItemCall gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 129 | #endif 130 | 131 | BYTE P_SlotAndItemIndexOffset [] = { 0x8B, 0x44, 0x24, 0x04, 0x83, 0xF8, 0x00, 0x72, 0x05, 0x33, 0xC0, 0xC2, 0x04, 0x00, 0x6B, 0xC0, 0x00, 0x8D, 0x00, 0x08 }; 132 | char M_SlotAndItemIndexOffset [] = "xxxxxx-xxxxxxxxx-x-x"; 133 | //DWORD B_SlotAndItemIndexOffset = FindPattern(StartBase, SizeOfCode, P_SlotAndItemIndexOffset, M_SlotAndItemIndexOffset, 0); 134 | //SlotOffset = *(BYTE*) (B_SlotAndItemIndexOffset + 16); 135 | //ItemIndexOffset = *(BYTE*) (B_SlotAndItemIndexOffset + 20); 136 | 137 | #if (DbgSession) 138 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 139 | MessageBox(0, "SlotOffset & ItemIndexOffset gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 140 | #endif 141 | 142 | //ItemIndexOffset = 0x78, SlotOffset = 0x2A; 143 | //ItemIndexOffset = 0x8C, SlotOffset = 0x2E; 144 | 145 | BYTE P_SendShopBuy [] = { 0x8B, 0x14, 0x24, 0x8B, 0x0D, 0x00, 0x00, 0x7D, 0x00, 0x52, 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x59 }; 146 | /*P_SendShopBuy[5] = NetPointerBytes[0]; 147 | P_SendShopBuy[6] = NetPointerBytes[1]; 148 | P_SendShopBuy[7] = NetPointerBytes[2]; 149 | char M_SendShopBuy [] = "xxxxxxxxxxx---xx---xx"; 150 | DWORD B_SendShopBuy = FindPattern(StartBase, SizeOfCode, P_SendShopBuy, M_SendShopBuy, (SlotOffset == 0x2E) ? 9 : 8); 151 | SendShopBuyCall = RelativeToAbsolute(B_SendShopBuy + 11); 152 | 153 | #if (DbgSession) 154 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 155 | MessageBox(0, " SendShopBuyCall gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 156 | #endif 157 | 158 | BYTE P_ItemAttributeOffset [] = { 0x88, 0x00, 0x00, 0x00, 0x00, 0x66, 0x8B, 0x94 }; 159 | char M_ItemAttributeOffset [] = "x----xxx"; 160 | DWORD B_ItemAttributeOffset = FindPattern(StartBase, SizeOfCode, P_ItemAttributeOffset, M_ItemAttributeOffset, 0); 161 | ItemAttributeValueOffset = *(BYTE*) (B_ItemAttributeOffset + 9); 162 | ItemAttributeTypeOffset = ItemAttributeValueOffset - 0x1; 163 | 164 | if (ItemAttributeValueOffset == 0xDD) 165 | { 166 | BYTE P_ItemAttributeOffsetNew[] = { 0x88, 0x0E, 0x66, 0x8B, 0x90 }; 167 | char M_ItemAttributeOffsetNew[] = "xxxx"; 168 | DWORD B_ItemAttributeOffsetNew = FindPattern(StartBase, SizeOfCode, P_ItemAttributeOffsetNew, M_ItemAttributeOffsetNew, 0); 169 | ItemAttributeValueOffset = *(BYTE*)(B_ItemAttributeOffsetNew + 5); 170 | ItemAttributeTypeOffset = ItemAttributeValueOffset - 0x1; 171 | 172 | #if (DbgSession) 173 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 174 | MessageBox(0, "ItemAttributeValueOffset & ItemAttributeTypeOffset gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 175 | #endif 176 | BYTE P_ShopItemCountOffset[] = { 0x0F, 0xB6, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0xFF }; 177 | char M_ShopItemCountOffset[] = "xx---x---xx"; 178 | DWORD B_ShopItemCountOffset = FindPattern(StartBase, SizeOfCode, P_ShopItemCountOffset, M_ShopItemCountOffset, 14); 179 | ShopItemCountOffset = *(BYTE*)(B_ShopItemCountOffset + 3); 180 | 181 | #if (DbgSession) 182 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 183 | MessageBox(0, "ShopItemCountOffset gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 184 | #endif 185 | } 186 | 187 | BYTE P_ShopSlotAndItemIDOffset [] = { 0x6B, 0xC0, 0x00, 0x8D, 0x44, 0x00, 0x00, 0x8B }; 188 | char M_ShopSlotAndItemIDOffset [] = "xx-xx--x"; 189 | DWORD B_ShopSlotAndItemIDOffset = FindPattern(StartBase, SizeOfCode, P_ShopSlotAndItemIDOffset, M_ShopSlotAndItemIDOffset, 0); 190 | ShopSlotOffset = *(BYTE*) (B_ShopSlotAndItemIDOffset + 2); 191 | ShopItemIDOffset = *(BYTE*)(B_ShopSlotAndItemIDOffset + 6); 192 | 193 | #if (DbgSession) 194 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 195 | MessageBox(0, "ShopSlotOffset & ShopItemIDOffset gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 196 | #endif 197 | 198 | if (!ShopItemCountOffset) 199 | { 200 | ShopItemCountOffset = 0x8; 201 | // Following not compatible with Karidarah2 202 | /*for (int i = 0; i < 20; i++) 203 | { 204 | BYTE P_ShopItemCountOffset[] = { 0x0F, 0xB6, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0xFF }; 205 | char M_ShopItemCountOffset[] = "xx---x---xx"; 206 | DWORD B_ShopItemCountOffset = FindPattern(StartBase, SizeOfCode, P_ShopItemCountOffset, M_ShopItemCountOffset, 12); 207 | ShopItemCountOffset = *(BYTE*)(B_ShopItemCountOffset + 3); 208 | //if (ShopItemCountOffset == 0x8) 209 | //{ 210 | DbgOutput = "Debug - Zeile " + std::to_string(i); 211 | MessageBox(0, ("ShopItemCountOffset: " + to_hexstring(ShopItemCountOffset)).c_str(), DbgOutput.c_str(), MB_ICONASTERISK); 212 | //} 213 | 214 | }*/ 215 | /* 216 | #if (DbgSession) 217 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 218 | MessageBox(0, "ShopItemCountOffset gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 219 | #endif 220 | } 221 | 222 | 223 | BYTE P_ShopPointer [] = { 0xA1, 0x00, 0x00, 0x00, 0x00, 0x8B, 0x4C, 0x24, 0x1C, 0x8B, 0x54, 0x24, 0x20 }; 224 | char M_ShopPointer [] = "x---xxxxxxxxx"; 225 | BYTE P_ShopPointerNew [] = { 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x83, 0xC4, 0x18, 0x52, 0x50 }; 226 | char M_ShopPointerNew [] = "xx---xxxxxx"; 227 | switch (SlotOffset) 228 | { 229 | case 0x2E://8B 0D ?? ?? ?? 00 83 C4 18 52 50 230 | switch (*(BYTE*)(B_ItemAttributeOffset + 9)) 231 | { 232 | case 0xDD: 233 | ShopPointer = *(DWORD*)((DWORD)FindPattern(StartBase, SizeOfCode, P_ShopPointer, M_ShopPointer, 0) + 1); 234 | break; 235 | default: 236 | ShopPointer = *(DWORD*)((DWORD)FindPattern(StartBase, SizeOfCode, P_ShopPointerNew, M_ShopPointerNew, 0) + 2); 237 | break; 238 | } 239 | 240 | break; 241 | 242 | default: 243 | ShopPointer = *(DWORD*)((DWORD)FindPattern(StartBase, SizeOfCode, P_ShopPointer, M_ShopPointer, 0) + 1); 244 | break; 245 | }*/ 246 | } 247 | } 248 | #if (DbgSession) 249 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 250 | MessageBox(0, "ShopPointer gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 251 | DbgOutput = 252 | "PlayerPointer: " + to_hexstring(PlayerPointer) + win_endl 253 | "NetPointer: " + to_hexstring(NetPointer) + win_endl 254 | "SendItemUseToItemCall: " + to_hexstring(SendItemUseToItemCall) + win_endl 255 | "SlotOffset: " + to_hexstring(SlotOffset) + win_endl 256 | "ItemIndexOffset: " + to_hexstring(ItemIndexOffset) + win_endl 257 | "SendShopBuyCall: " + to_hexstring(SendShopBuyCall) + win_endl 258 | "ItemAttributeValueOffset: " + to_hexstring(ItemAttributeValueOffset) + win_endl 259 | "ItemAttributeTypeOffset: " + to_hexstring(ItemAttributeTypeOffset) + win_endl 260 | "ShopSlotOffset: " + to_hexstring(ShopSlotOffset) + win_endl 261 | "ShopItemIDOffset: " + to_hexstring(ShopItemIDOffset) + win_endl 262 | "ShopItemCountOffset: " + to_hexstring(ShopItemCountOffset) + win_endl 263 | "ShopPointer: " + to_hexstring(ShopPointer); 264 | MessageBox(0, DbgOutput.c_str(), sDbgOutput, MB_ICONASTERISK); 265 | #endif 266 | ExitThread(0); 267 | } 268 | 269 | BOOL WINAPI DllMain (HANDLE hDll, DWORD dwReason, LPVOID lpReserved) 270 | { 271 | switch (dwReason) 272 | { 273 | case DLL_PROCESS_ATTACH: 274 | CreateThread(0, 0, (LPTHREAD_START_ROUTINE)InitComponents, 0, 0, 0); 275 | break; 276 | 277 | case DLL_PROCESS_DETACH: 278 | break; 279 | 280 | case DLL_THREAD_ATTACH: 281 | break; 282 | 283 | case DLL_THREAD_DETACH: 284 | break; 285 | } 286 | return true; 287 | } -------------------------------------------------------------------------------- /Switch-Bot/Switch-Bot/Switch-Bot.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unpublished/Tools-Metin2/840a1066031099540a98f18cd5568aee274049d8/Switch-Bot/Switch-Bot/Switch-Bot.h -------------------------------------------------------------------------------- /Switch-Bot/Switch-Bot/Switch-Bot.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unpublished/Tools-Metin2/840a1066031099540a98f18cd5568aee274049d8/Switch-Bot/Switch-Bot/Switch-Bot.rc -------------------------------------------------------------------------------- /Switch-Bot/Switch-Bot/Switch-Bot.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {991C4DBF-5BF2-44C7-8F4E-FF3D77E191C4} 15 | Win32Proj 16 | SwitchBot 17 | 18 | 19 | 20 | DynamicLibrary 21 | true 22 | v120_xp 23 | MultiByte 24 | 25 | 26 | DynamicLibrary 27 | false 28 | v120_xp 29 | true 30 | MultiByte 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | true 44 | 45 | 46 | false 47 | 48 | 49 | 50 | 51 | 52 | Level3 53 | Full 54 | WIN32;_DEBUG;_WINDOWS;_USRDLL;SWITCHBOT_EXPORTS;%(PreprocessorDefinitions) 55 | true 56 | true 57 | MultiThreaded 58 | None 59 | 60 | 61 | Windows 62 | false 63 | 64 | 65 | 66 | 67 | Level3 68 | 69 | 70 | Full 71 | true 72 | true 73 | WIN32;NDEBUG;_WINDOWS;_USRDLL;SWITCHBOT_EXPORTS;%(PreprocessorDefinitions) 74 | true 75 | true 76 | MultiThreaded 77 | None 78 | 79 | 80 | Windows 81 | false 82 | true 83 | true 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /Switch-Bot/Switch-Bot/Switch-Bot.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Headerdateien 20 | 21 | 22 | Headerdateien 23 | 24 | 25 | Headerdateien 26 | 27 | 28 | Headerdateien 29 | 30 | 31 | Headerdateien 32 | 33 | 34 | Headerdateien 35 | 36 | 37 | Headerdateien 38 | 39 | 40 | Headerdateien 41 | 42 | 43 | Headerdateien 44 | 45 | 46 | Headerdateien 47 | 48 | 49 | 50 | 51 | Quelldateien 52 | 53 | 54 | 55 | 56 | Ressourcendateien 57 | 58 | 59 | -------------------------------------------------------------------------------- /Switch-Bot/Switch-Bot/Variables.h: -------------------------------------------------------------------------------- 1 | const char *Version = "1.0.2.1"; 2 | 3 | HANDLE OptionenThread, SwitchBotThread; 4 | bool IsSwitchBotRunning; 5 | int SwitchBots; 6 | int SleepTime; 7 | 8 | #define SwitchBot 9 | #define DbgSession FALSE -------------------------------------------------------------------------------- /Switch-Bot/Switch-Bot/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unpublished/Tools-Metin2/840a1066031099540a98f18cd5568aee274049d8/Switch-Bot/Switch-Bot/resource.h -------------------------------------------------------------------------------- /Upp-Tool/Upp-Tool.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.20623.1 VSUPREVIEW 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Upp-Tool", "Upp-Tool\Upp-Tool.vcxproj", "{B0FD84E0-63B3-41A3-8742-464F30880E06}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Release|Win32 = Release|Win32 11 | EndGlobalSection 12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 13 | {B0FD84E0-63B3-41A3-8742-464F30880E06}.Release|Win32.ActiveCfg = Release|Win32 14 | {B0FD84E0-63B3-41A3-8742-464F30880E06}.Release|Win32.Build.0 = Release|Win32 15 | EndGlobalSection 16 | GlobalSection(SolutionProperties) = preSolution 17 | HideSolutionNode = FALSE 18 | EndGlobalSection 19 | EndGlobal 20 | -------------------------------------------------------------------------------- /Upp-Tool/Upp-Tool/GUI-Funcs.h: -------------------------------------------------------------------------------- 1 | int Load(int iMode) 2 | { 3 | #if (DbgSession) 4 | PrintDbg("Loading ini", sDbgOutput); 5 | #endif 6 | switch (iMode) 7 | { 8 | case 0: 9 | { 10 | if (PathFindExtension(IniFullPath) != sExt) 11 | { 12 | std::string sPathEx; 13 | sPathEx = (std::string)IniFullPath + (std::string)sExt; 14 | if (!PathFileExists(sPathEx.c_str())) 15 | return 1; 16 | PathAddExtension(IniFullPath, sExt); 17 | } 18 | break; 19 | } 20 | case 1: 21 | { 22 | if (!CheckIni(TRUE)) 23 | return 2; 24 | break; 25 | } 26 | } 27 | 28 | char sValue[32]; 29 | GetPrivateProfileString(sUppTool, sCountedUpp, "0", sValue, 32, IniFullPath); 30 | SendMessage(UppToolButton[0], BM_SETCHECK, atoi(sValue), 0); 31 | GetPrivateProfileString(sUppTool, sUppCount, "", sValue, 32, IniFullPath); 32 | SetWindowText(UppToolEdit[0], (atoi(sValue) < 1) ? "1" : sValue); 33 | 34 | GetPrivateProfileString(sUppTool, sSegiValue, "25040", sValue, 32, IniFullPath); 35 | SetWindowText(UppToolEdit[1], sValue); 36 | GetPrivateProfileString(sUppTool, sMagMetallValue, "25041", sValue, 32, IniFullPath); 37 | SetWindowText(UppToolEdit[2], sValue); 38 | 39 | GetPrivateProfileString(sUppTool, sMaxSlotUpp, "0", sValue, 32, IniFullPath); 40 | SendMessage(UppToolButton[1], BM_SETCHECK, atoi(sValue), 0); 41 | GetPrivateProfileString(sUppTool, sUppMaxSlot, "45", sValue, 32, IniFullPath); 42 | SetWindowText(UppToolEdit[3], sValue); 43 | #if (DbgSession) 44 | PrintDbg("Successfully loaded (" + (std::string)IniFullPath + ")", "Mode " + std::to_string(iMode)); 45 | #endif 46 | return 0; 47 | } 48 | 49 | int Save() 50 | { 51 | #if (DbgSession) 52 | PrintDbg("Saving ini", DbgOutput); 53 | #endif 54 | if (!ValidateIni()) 55 | { 56 | #if (DbgSession) 57 | PrintDbg("Error while validating ini to be saved (" + (std::string)IniFullPath + ")", DbgOutput); 58 | #endif 59 | return 1; 60 | } 61 | 62 | std::string tValue; 63 | 64 | tValue = std::to_string(IsDlgButtonChecked(WindowHandle, IDC_BUTTON[0])); 65 | WritePrivateProfileString(sUppTool, sCountedUpp, tValue.c_str(), IniFullPath); 66 | tValue = GetEditText(UppToolEdit[0]); 67 | WritePrivateProfileString(sUppTool, sUppCount, (std::stoi(tValue) < 1) ? "1" : tValue.c_str(), IniFullPath); 68 | tValue = GetEditText(UppToolEdit[1]); 69 | 70 | WritePrivateProfileString(sUppTool, sSegiValue, tValue.c_str(), IniFullPath); 71 | tValue = GetEditText(UppToolEdit[2]); 72 | WritePrivateProfileString(sUppTool, sMagMetallValue, tValue.c_str(), IniFullPath); 73 | 74 | tValue = std::to_string(IsDlgButtonChecked(WindowHandle, IDC_BUTTON[1])); 75 | WritePrivateProfileString(sUppTool, sMaxSlotUpp, tValue.c_str(), IniFullPath); 76 | tValue = GetEditText(UppToolEdit[3]); 77 | WritePrivateProfileString(sUppTool, sUppMaxSlot, (std::stoi(tValue) > 90) ? "90" : tValue.c_str(), IniFullPath); 78 | #if (DbgSession) 79 | PrintDbg("Successfully saved to (" + (std::string)IniFullPath + ")", DbgOutput); 80 | #endif 81 | return 0; 82 | } 83 | 84 | void Reset() 85 | { 86 | const char* sDefDeactivated = "0"; 87 | const char* sDefUppCount = "1"; 88 | const char* sDefSegiValue = "25040"; 89 | const char* sDefMagMetallValue = "25041"; 90 | const char* sDefUppMaxSlot = "45"; 91 | int iDefDeactivated = atoi(sDefDeactivated); 92 | int iDefUppCount = atoi(sDefUppCount); 93 | int iDefSegiValue = atoi(sDefSegiValue); 94 | int iDefMagMetallValue = atoi(sDefMagMetallValue); 95 | 96 | if (PathFindExtension(IniFullPath) != sExt && PathFileExists(IniFullPath)) 97 | { 98 | WritePrivateProfileString(sUppTool, sCountedUpp, sDefDeactivated, IniFullPath); 99 | WritePrivateProfileString(sUppTool, sUppCount, sDefUppCount, IniFullPath); 100 | WritePrivateProfileString(sUppTool, sSegiValue, sDefSegiValue, IniFullPath); 101 | WritePrivateProfileString(sUppTool, sMagMetallValue, sDefMagMetallValue, IniFullPath); 102 | WritePrivateProfileString(sUppTool, sMaxSlotUpp, sDefDeactivated, IniFullPath); 103 | WritePrivateProfileString(sUppTool, sUppMaxSlot, sDefUppMaxSlot, IniFullPath); 104 | } 105 | 106 | Load(2); 107 | return; 108 | } 109 | 110 | int GetSearchPattern() 111 | { 112 | char Wert[3]; 113 | 114 | GetPrivateProfileStringA(sSettings, sSearchPattern, "-1", Wert, 3, IniFullPath); 115 | return atoi(Wert); 116 | } -------------------------------------------------------------------------------- /Upp-Tool/Upp-Tool/GUI-Variables.h: -------------------------------------------------------------------------------- 1 | int IDC_BUTTON[9], IDC_EDIT[4], IDC_STATIC[2]; 2 | HWND UppToolButton[9], UppToolEdit[4], UppToolLabel[2]; 3 | 4 | #define WND_CLASS_NAME sUppTool 5 | #define LABEL 6 | #define EDIT 7 | 8 | #define XP 0 -------------------------------------------------------------------------------- /Upp-Tool/Upp-Tool/GUI.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unpublished/Tools-Metin2/840a1066031099540a98f18cd5568aee274049d8/Upp-Tool/Upp-Tool/GUI.h -------------------------------------------------------------------------------- /Upp-Tool/Upp-Tool/Init.cpp: -------------------------------------------------------------------------------- 1 | #include "..\..\Classes\Init Class.h" 2 | 3 | void SetAddies() 4 | { 5 | DWORD Base = (DWORD)hPInstance; 6 | const unsigned char* StartBase = reinterpret_cast(Base + 0x1000); 7 | 8 | DWORD SizeOfCode = GetModuleSize(); 9 | 10 | switch (GetSearchPattern()) 11 | { 12 | case 1: 13 | { 14 | BYTE P_PlayerPointer[] = {0x85, 0xC9, 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x95, 0xC2, 0x52, 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x8B, 0xE5}; 15 | char M_PlayerPointer[] = "xxxx---xxxxxx----x---xxx"; 16 | DWORD B_PlayerPointer = FindPattern(StartBase, SizeOfCode, P_PlayerPointer, M_PlayerPointer, 2); 17 | PlayerPointer = *(DWORD*)(B_PlayerPointer + 4); 18 | 19 | #if (DbgSession) 20 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 21 | MessageBox(0, "PlayerPointer gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 22 | #endif 23 | 24 | BYTE P_SendRefine [] = { 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50, 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x5E }; 25 | char M_SendRefine [] = "xx---xxxx---xx---xx"; 26 | DWORD B_SendRefine = FindPattern(StartBase, SizeOfCode, P_SendRefine, M_SendRefine, (SlotOffset == 0x2E) ? 25 : 23); 27 | NetPointer = *(DWORD*) (B_SendRefine + 2); 28 | SendRefineCall = RelativeToAbsolute(B_SendRefine + 9); 29 | 30 | #if (DbgSession) 31 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 32 | MessageBox(0, "NetPointer & SendRefineCall gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 33 | #endif 34 | 35 | BYTE P_SendItemUseToItem[] = {0x8B, 0x45, 0xF8, 0x8B, 0x4D, 0xF4, 0x50, 0x51, 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00}; 36 | char M_SendItemUseToItem[] = "xxxxxxxxxx---xx---xx---x"; 37 | DWORD B_SendItemUseToItem = FindPattern(StartBase, SizeOfCode, P_SendItemUseToItem, M_SendItemUseToItem, 0); 38 | SendItemUseToItemCall = RelativeToAbsolute(B_SendItemUseToItem + 15); 39 | break; 40 | } 41 | default: 42 | { 43 | BYTE P_PlayerPointer[] = {0x8B, 0x4C, 0x24, 0x0C, 0x8D, 0x54, 0x24, 0x08, 0x52, 0x8B, 0x54, 0x24, 0x14, 0x8D, 0x44, 0x24, 0x0B, 0x50, 0x51, 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x52, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xBF, 0x44, 0x24, 0x08, 0x0F, 0xB6, 0x4C, 0x24, 0x07}; 44 | char M_PlayerPointer[] = "xxxxxxxxxxxxxxxxxxxxx---xxx----xxxxxxxxxx"; 45 | DWORD B_PlayerPointer = FindPattern(StartBase, SizeOfCode, P_PlayerPointer, M_PlayerPointer, 0); 46 | PlayerPointer = *(DWORD*)(B_PlayerPointer + 21); 47 | 48 | #if (DbgSession) 49 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 50 | MessageBox(0, "PlayerPointer gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 51 | #endif 52 | 53 | BYTE P_SlotAndItemIndexOffset[] = {0x8B, 0x44, 0x24, 0x04, 0x83, 0xF8, 0x00, 0x72, 0x05, 0x33, 0xC0, 0xC2, 0x04, 0x00, 0x6B, 0xC0, 0x00, 0x8D, 0x00, 0x08}; 54 | char M_SlotAndItemIndexOffset[] = "xxxxxx-xxxxxxxxx-x-x"; 55 | DWORD B_SlotAndItemIndexOffset = FindPattern(StartBase, SizeOfCode, P_SlotAndItemIndexOffset, M_SlotAndItemIndexOffset, 0); 56 | SlotOffset = *(BYTE*)(B_SlotAndItemIndexOffset + 16); 57 | ItemIndexOffset = *(BYTE*)(B_SlotAndItemIndexOffset + 20); 58 | 59 | #if (DbgSession) 60 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 61 | MessageBox(0, "SlotOffset & ItemIndexOffset gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 62 | #endif 63 | 64 | BYTE P_SendRefine [] = { 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x52, 0x50, 0xE8, 0x00, 0x00, 0x00, 0x00 }; 65 | char M_SendRefine [] = "xx---xxxx---x"; 66 | DWORD B_SendRefine = FindPattern(StartBase, SizeOfCode, P_SendRefine, M_SendRefine, 26); 67 | if (SlotOffset == 0x2E) 68 | B_SendRefine = FindPattern(StartBase, SizeOfCode, P_SendRefine, M_SendRefine, 29); 69 | 70 | NetPointer = *(DWORD*) (B_SendRefine + 2); 71 | SendRefineCall = RelativeToAbsolute(B_SendRefine + 9); 72 | 73 | #if (DbgSession) 74 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 75 | MessageBox(0, "NetPointer & SendRefineCall gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 76 | #endif 77 | DWORD B_SendItemUseToItem; 78 | if (iClientMod) 79 | { 80 | //LongDong2 modification 81 | BYTE P_SendItemUseToItemLD2[] = {0x8B, 0x4C, 0xE4, 0x0C, 0x8B, 0x44, 0xE4, 0x08, 0x50, 0x51, 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x5E}; 82 | char M_SendItemUseToItemLD2[] = "xxxxxxxxxxxx---xx---xx---xx"; 83 | B_SendItemUseToItem = FindPattern(StartBase, SizeOfCode, P_SendItemUseToItemLD2, M_SendItemUseToItemLD2, 0); 84 | } 85 | else 86 | { 87 | BYTE P_SendItemUseToItem[] = {0x8B, 0x44, 0x24, 0x08, 0x8B, 0x4C, 0x24, 0x0C, 0x50, 0x51, 0x8B, 0x0D, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x00, 0x00, 0x5E}; 88 | char M_SendItemUseToItem[] = "xxxxxxxxxxxx---xx---xx---xx"; 89 | B_SendItemUseToItem = FindPattern(StartBase, SizeOfCode, P_SendItemUseToItem, M_SendItemUseToItem, 0); 90 | } 91 | SendItemUseToItemCall = RelativeToAbsolute(B_SendItemUseToItem + 17); 92 | break; 93 | } 94 | } 95 | #if (DbgSession) 96 | DbgOutput = "Debug - Zeile " + std::to_string(__LINE__); 97 | MessageBox(0, "SendItemUseToItemCall gefunden", DbgOutput.c_str(), MB_ICONASTERISK); 98 | DbgOutput = "PlayerPointer: " + to_hexstring(PlayerPointer) + win_endl 99 | "SlotOffset: " + to_hexstring(SlotOffset) + win_endl 100 | "ItemIndexOffset: " + to_hexstring(ItemIndexOffset) + win_endl 101 | "NetPointer: " + to_hexstring(NetPointer) + win_endl 102 | "SendRefineCall: " + to_hexstring(SendRefineCall) + win_endl 103 | "SendItemUseToItemCall: " + to_hexstring(SendItemUseToItemCall); 104 | MessageBox(0, DbgOutput.c_str(), sDbgOutput, MB_ICONASTERISK); 105 | DbgOutput._Tidy(); 106 | #endif 107 | CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Load, 0, 0, 0); 108 | ExitThread(0); 109 | } 110 | 111 | BOOL WINAPI DllMain(HANDLE hDll, DWORD dwReason, LPVOID lpReserved) 112 | { 113 | switch (dwReason) 114 | { 115 | case DLL_PROCESS_ATTACH: 116 | CreateThread(0, 0, (LPTHREAD_START_ROUTINE)InitComponents, 0, 0, 0); 117 | break; 118 | 119 | case DLL_PROCESS_DETACH: 120 | break; 121 | 122 | case DLL_THREAD_ATTACH: 123 | break; 124 | 125 | case DLL_THREAD_DETACH: 126 | break; 127 | } 128 | return true; 129 | } -------------------------------------------------------------------------------- /Upp-Tool/Upp-Tool/Upp-Tool.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unpublished/Tools-Metin2/840a1066031099540a98f18cd5568aee274049d8/Upp-Tool/Upp-Tool/Upp-Tool.h -------------------------------------------------------------------------------- /Upp-Tool/Upp-Tool/Upp-Tool.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unpublished/Tools-Metin2/840a1066031099540a98f18cd5568aee274049d8/Upp-Tool/Upp-Tool/Upp-Tool.rc -------------------------------------------------------------------------------- /Upp-Tool/Upp-Tool/Upp-Tool.vcxproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {B0FD84E0-63B3-41A3-8742-464F30880E06} 15 | Win32Proj 16 | UppTool 17 | 18 | 19 | 20 | DynamicLibrary 21 | true 22 | v120 23 | Unicode 24 | 25 | 26 | DynamicLibrary 27 | false 28 | v120_xp 29 | true 30 | MultiByte 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | true 44 | 45 | 46 | false 47 | 48 | 49 | 50 | 51 | 52 | Level3 53 | Disabled 54 | WIN32;_DEBUG;_WINDOWS;_USRDLL;UPPTOOL_EXPORTS;%(PreprocessorDefinitions) 55 | true 56 | 57 | 58 | Windows 59 | true 60 | 61 | 62 | 63 | 64 | Level3 65 | 66 | 67 | Full 68 | true 69 | true 70 | WIN32;NDEBUG;_WINDOWS;_USRDLL;UPPTOOL_EXPORTS;%(PreprocessorDefinitions) 71 | true 72 | None 73 | true 74 | MultiThreaded 75 | 76 | 77 | Windows 78 | false 79 | true 80 | true 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | -------------------------------------------------------------------------------- /Upp-Tool/Upp-Tool/Upp-Tool.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Headerdateien 20 | 21 | 22 | Headerdateien 23 | 24 | 25 | Headerdateien 26 | 27 | 28 | Headerdateien 29 | 30 | 31 | Headerdateien 32 | 33 | 34 | Headerdateien 35 | 36 | 37 | Headerdateien 38 | 39 | 40 | Headerdateien 41 | 42 | 43 | Headerdateien 44 | 45 | 46 | Headerdateien 47 | 48 | 49 | 50 | 51 | Quelldateien 52 | 53 | 54 | 55 | 56 | Ressourcendateien 57 | 58 | 59 | -------------------------------------------------------------------------------- /Upp-Tool/Upp-Tool/Variables.h: -------------------------------------------------------------------------------- 1 | const char *Version = "1.0.3.0"; 2 | 3 | #define UppTool 4 | #define DbgSession FALSE -------------------------------------------------------------------------------- /Upp-Tool/Upp-Tool/resource.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Unpublished/Tools-Metin2/840a1066031099540a98f18cd5568aee274049d8/Upp-Tool/Upp-Tool/resource.h --------------------------------------------------------------------------------