我是比較鐵桿的英雄無敵3的fans,在網上看到這樣的文章:
http://game.china.com/zh_cn/play/10002765/20021113/11362720.html就是讓我方英雄學會所有技能,真的蠻爽的
學會28項技能修改法
首先,把你的英雄的士兵調到前面幾格來,接著用FPE來搜索。例如你的士兵數:第一格3,第二格14,第三格4,那么就用 3,0,14,0,4,0 來搜索,就可以找到地址。顯示為:
士兵種類- FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF 03 00 00 00-士兵數量
0E 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 01 02 03 04 05 06 07 08
09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
25 26 27 28 01 02 03 04 05 06 07 08 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
04 00 00 00 00 00 00 00 FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF或00作為一格,每4格是代表一種屬性,物品, 狀態等等。前面28格是士兵的種類,接下來28格是士兵的數量。例如: 英雄可帶7種士兵,你要每種都是天使,那么把
03 00 00 00 前面的FF FF FF FF 改為0D 00 00 00。 如果你要數量100, 那么把
03 00 00 00 改為64 00 00 00。 士兵的種類是這樣分的:00 00 00 00 是槍兵,
01 00 00 00 是 進化一級的槍兵,02 00 00 00 是弓箭手,03 00 00 00 是神箭手。
如此類推。
從03那一格開始數,28格后就是英雄的技能等級,接著的28格是英雄的技能,
也就是從01到28代表的是英雄的技能等級,技能等級最多只能是3。
01 箭術等級 02 尋路術等級 03 后勤學等級
04 偵察術等級 05 外交術等級 06 航海術等級
07 領導術等級 08 智慧術等級 09 神秘術等級
10 幸運術等級 11 彈道術等級 12 鷹眼術等級
13 招魂術等級 14 理財術等級 15 火系魔法等級
16 氣系魔法等級 17 水系魔法等級 18 土系魔法等級
19 學術等級 20 戰術等級 21 炮術等級
22 學習能力等級 23 進攻術等級 24 防御術等級
但是每次使用FPE真的很麻煩,我又是很懶的人。FPE可以做到的事情,我也可以做到。
其實游戲修改不過是使用
ReadProcessMemory和
WriteProcessMemory花了半天不斷的試驗,終于寫出一個可以用于英雄無敵3.1版的修改器,沒有寫界面(I'm lazy-:)),運行之后就是讓我方英雄學會所有技能。
#include <windows.h>
#include <tlhelp32.h>
#include <cstdio>
const char MODULE_NAME[] = "Heroes3.exe";
void printError( TCHAR* msg )
{
DWORD eNum;
TCHAR sysMsg[256];
TCHAR* p;
eNum = GetLastError( );
FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, eNum,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
sysMsg, 256, NULL );
// Trim the end of the line and terminate it with a null
p = sysMsg;
while( ( *p > 31 ) || ( *p == 9 ) )
++p;
do { *p-- = 0; } while( ( p >= sysMsg ) &&
( ( *p == '.' ) || ( *p < 33 ) ) );
// Display the message
printf( "WARNING: %s failed with error %d (%s)\n", msg, eNum, sysMsg );
}
DWORD findProcessId(const char *module)
{
DWORD result = -1;
HANDLE hProcessSnap;
// Take a snapshot of all processes in the system.
hProcessSnap = CreateToolhelp32Snapshot( TH32CS_SNAPPROCESS, 0 );
if( hProcessSnap == INVALID_HANDLE_VALUE )
{
printError( "CreateToolhelp32Snapshot (of processes)" );
return result;
}
PROCESSENTRY32 pe32;
// Set the size of the structure before using it.
pe32.dwSize = sizeof( PROCESSENTRY32 );
// Retrieve information about the first process,
// and exit if unsuccessful
if( !Process32First( hProcessSnap, &pe32 ) )
{
printError( "Process32First" ); // Show cause of failure
CloseHandle( hProcessSnap ); // Must clean up the snapshot object!
return result;
}
// Now walk the snapshot of processes, and
// display information about each process in turn
do
{
if(stricmp(pe32.szExeFile,module)==0)
{
printf( "find process: %s\n", module );
result = pe32.th32ProcessID;
break;
}
} while( Process32Next( hProcessSnap, &pe32 ) );
CloseHandle( hProcessSnap );
return result;
}
int main(int argc,char *argv[])
{
DWORD h3pid = -1;
h3pid = findProcessId(MODULE_NAME);
if(h3pid == -1)
{
printf("can't find %s in memory,please make sure the program started!\n",MODULE_NAME);
return 1;
}
HANDLE h3 = OpenProcess( PROCESS_ALL_ACCESS, FALSE, h3pid );
if( h3 == NULL )
{
printError( "OpenProcess" );
return 1;
}
unsigned long sideOffset=0x824994;
unsigned char side = 0xff;
if(!ReadProcessMemory(h3,(LPCVOID)sideOffset,&side,1,0)) //查找我方的顏色
{
printError( "ReadProcessMemory" );
return 1;
}
if(side!=0xff)
{
printf("find current side:%d\n",(int)side);
}
else
{
printf("can't find current side\n");
side = 0;
}
unsigned long heroBaseAddress = 0x15216ab; //hero name start
unsigned char name[20]={0};
unsigned long temp = heroBaseAddress-1;
char b[28]; //28種技能
int size = sizeof(b);
memset(b,3,size);
b[12]=0;//不學招魂術
for(int i=0;i<=155;++i) //一共156個Hero
{
if(!ReadProcessMemory(h3,(LPCVOID)temp,name,sizeof(name),0))
{
printError( "ReadProcessMemory" );
return 1;
}
if(name[0]==side)
{
printf("find:%s\t",name+1);
if(!WriteProcessMemory(h3,(LPVOID)(temp+0xA7),b,size,0))
{
printError( "WriteProcessMemory" );
return 1;
}
else
{
printf("update skill sucess!\n");
}
}
temp += 0x492;
}
CloseHandle(h3);
return 0;
}
附加:
讓我方英雄所有英雄學會除了招魂術的以外的27種技能的小程序
以前英雄世界也有一個這樣的程序,但是版本太老,不能用了。
使用版本:中文版3.1,其他版本沒有測試
使用方法:進入游戲后,運行程序
Download: http://www.shnenglu.com/Files/sandy/h3c.zip