![]() |
Здравствуйте, гость ( Вход | Регистрация )
![]() |
![]() ![]()
Сообщение
#1
|
|
![]() laughed as one fey Сообщений: 12 167 Спасибо сказали: 20596 раз ![]() |
Плагин, добавляющий в чат несколько дополнительных команд и возможность исполнения ERM.
https://dl.dropboxusercontent.com/u/61759222/HoMM/chalk.era (v001) https://dl.dropbox.com/u/61759222/HoMM/chalk.rar (исходники) ![]() Команды:
Код #include <windows.h> #include <stdio.h> #include "..\..\include\era.h" #include "..\..\include\heroes.h" #include "..\..\include\patcher_x86_commented.hpp" void InitWoGSpecials() { if (*(int *)(*(int*)0x69CCFC + 4)!=-1) { HERO* currhero = (HERO*)GetHeroRecord(*(int *)(*(int*)0x69CCFC + 4)); *(int*)0x27F9970 = (int)currhero; ErmV[998] = currhero->x; ErmV[999] = currhero->y; ErmV[1000] = currhero->l; ErmF[1000]= !CALL_1(int, __thiscall, 0x4BAA60, *(int*)0x69CCFC); } } void PrintString(char* str) { char buf[1024]; sprintf(buf,"IF:L^{~green}%s{~}^;",str); ExecErmCmd(buf); /*sprintf(buf,"IF:L^%s^;",str); EventParams[1] = str*/ } void __stdcall OnChat(PEvent e) { if(EventParams[0] == 1) { EventParams[2] = 1; char *buf=(char*)malloc(32+strlen((const char*)EventParams[1])); sprintf(buf,"IF:L^{~%s}%s{~}^;\0","lime",EventParams[1]); ExecErmCmd(buf); free(buf); char str[256]; if(!stricmp((const char*)EventParams[1],"/showfps")) { *(int*)((*(int*)0x6992B8)+0x3C) = !*(int*)((*(int*)0x6992B8)+0x3C); PrintString("FPS switched off"); } if(!stricmp((const char*)EventParams[1],"/leveldebugger")) { *(int*)0x698A18 = !*(int*)0x698A18; PrintString(*(int*)0x698A18?"Level debugger switched on":"Level debugger switched off"); } if(!stricmp((const char*)EventParams[1],"/heroid")) { int id = *(int *)(*(int*)0x69CCFC + 4); if (id!=-1) { sprintf(str,"%s: id %i, struct at 0x%08X", ((HERO*)GetHeroRecord(id))->Name, id, GetHeroRecord(id) ); } else { strcpy(str,"Hero not selected"); } PrintString(str); } if(!strnicmp((const char*)EventParams[1],"/execerm",strlen("/execerm"))) { InitWoGSpecials(); ExecErmCmd((char*)(strlen("/execerm")+1+EventParams[1])); PrintString("Executed"); } if(!strnicmp((const char*)EventParams[1],"!!",strlen("!!"))) { InitWoGSpecials(); ExecErmCmd((char*)(strlen("!!")+EventParams[1])); PrintString("Executed"); } //ExecErmCmd(str); //MessageBoxA(0,(LPCSTR)(EventParams[1]),(LPCSTR)str,0); } } BOOL APIENTRY DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { if (ul_reason_for_call == DLL_PROCESS_ATTACH) { ConnectEra(); RegisterHandler(OnChat, "OnChat"); } return TRUE; } Сорцы и нормальная заливка будут позже. Спасибо сказали: |
|
|
![]() ![]() |
Текстовая версия | Сейчас: 13 June 2025 - 20:40 |
Copyright by Алексей Крючков
![]() Programming by Degtyarev Dmitry |
|