修改DLL实现赫拉迪克方块合成新红门
转载:http://diablo.phx.pl/forum/viewtopic.php?t=62242该教程仅限于暗黑1.13C
使用hex 16进制修改工具打开D2Common.dll
ctrl+G 跳转至94F60,在00 00区域写入Portal,或者直接修改16进制为:50 6F 72 74 61 6C
使用OD软件打开D2Common.dll,
1、ctrl+G,跳转到6FDD87EB,输入以下代码
PUSH6FDE4F60
PUSH EBP
MOV DWORD PTR SS:,ESI
CALL 6FD51EC0
ADD ESP,8
TEST EAX,EAX
JNE 6FD6BAD0
MOV BYTE PTR DS:,4
JMP 6FD6BB962、跳转到6FD6BAC5
JNE SHORT 6FD6BA5A3、跳转到6FD6BA5A
JMP 6FDD87EB使用OD软件打开D2Game.dll
1、跳转到6FD17B0F
SUB ESP,1C
PUSH EBP
MOV EBP,DWORD PTR SS:
MOV EAX,DWORD PTR SS:
MOV ECX,DWORD PTR DS:
MOV EAX,DWORD PTR DS:
PUSH EBX
PUSH ESI
PUSH EDI
PUSH 0B
PUSH 4
PUSH EAX
CALL 6FC2A568
MOV ESI,DWORD PTR SS:
PUSH ESI
CALL 6FC2A4C0
MOVZX ECX,BYTE PTR SS:
MOV EAX,DWORD PTR DS:
PUSH 0A
PUSH 4
PUSH EAX
CALL 6FC2A568
MOV EAX,DWORD PTR SS:
PUSH ESI
CALL 6FC2A4C0
MOVZX ECX,BYTE PTR SS:
MOV EAX,DWORD PTR DS:
PUSH 0
PUSH 28
PUSH EAX
CALL 6FC2A568
PUSH ESI
CALL 6FC2A478
MOV EDI,EAX
PUSH EDI
CALL 6FC2A556
CMP EAX,6D
JNE 6FD17C79
MOV CL,BYTE PTR SS:
CMP CL,2
JNE 6FD17C79
LEA EDX,
PUSH EDX
PUSH ESI
MOV DWORD PTR SS:,0
CALL 6FC2A544
PUSH 64
LEA EAX,
PUSH EAX
PUSH 400
PUSH 3
LEA ECX,
PUSH ECX
PUSH EDI
CALL 6FC54130
MOV EDI,DWORD PTR SS:
MOV EDX,DWORD PTR SS:
MOV EAX,DWORD PTR SS:
MOV DWORD PTR SS:,EDX
MOV DWORD PTR SS:,EAX
PUSH EDI
CALL 6FC2A808
PUSH 27
CALL 6FC2A56E
PUSH EDI
MOV BL,AL
CALL 6FC2A556
PUSH EAX
MOV DWORD PTR SS:,EAX
CALL 6FC2A56E
MOV ECX,DWORD PTR SS:
MOV EDX,DWORD PTR SS:
PUSH 0
PUSH 0C01
PUSH 3E01
PUSH 3
LEA EAX,
MOV DWORD PTR SS:,ECX
PUSH EAX
MOV ECX,EAX
PUSH ECX
PUSH EDI
MOV DWORD PTR SS:,EDX
CALL 6FC2AE98
MOV EBX,DWORD PTR SS:
MOV EDI,DWORD PTR SS:
MOV EAX,DWORD PTR SS:
MOV DWORD PTR SS:,EBX
MOV DWORD PTR SS:,EDI
CALL 6FC21280
MOV EDI,EAX
MOV EDX,DWORD PTR SS:
PUSH 0
PUSH 1
PUSH 1
PUSH EDI
PUSH EBP
PUSH EDX
MOV EAX,EBX
PUSH EAX
MOV EDX,3C
MOV ECX,2
CALL 6FD01D90
MOV ESI,EAX
PUSH 1
PUSH ESI
CALL 6FC2A4A2
MOV ECX,DWORD PTR SS:
PUSH ECX
PUSH 88
PUSH ESI
PUSH EBP
CALL 6FCC22E0
POP EDI
POP ESI
POP EBX
MOV EAX,1
POP EBP
ADD ESP,1C
RETN 8
PUSH ESI
MOV WORD PTR DS:,14
MOV DWORD PTR DS:,ESI
CALL 6FC2A4DE
MOV EAX,DWORD PTR DS:
OR EAX,00000400
POP EDI
MOV DWORD PTR DS:,EAX
POP ESI
POP EBX
XOR EAX,EAX
POP EBP
ADD ESP,1C
RETN 8上述代码为开启6boss红门,即为出火炬的地图,开启的限制也一样,需要在第五幕,难度地狱。
地址6FD17C5E |。68 88000000 PUSH 88,88转换10进制为136,这个136是levelid,对应地图就是出火炬的地图,想指定去其他地图的修改该处。
修改的限制代码为:
地址= 6FD17B75
CMP EAX,6D 6D为第五幕城内
JNE 6FD17C79 //跳转至无法合成的提示信息地址= 6FD17B7E
MOV CL,BYTE PTR SS: ; 6D为第五幕城内
CMP CL,2 ; 2为难度, 0=普通 1=噩梦2=地狱
JNE 6FD17C79 //跳转至无法合成的提示信息以上为红门设定部分,根据自己需求进行修改。
修改箱子合成部分
1、d2game.dll,跳转至6FC92417
JMP 6FD17AB82、跳转至6FD17AB8
CMP AL,4
JE SHORT 6FD17AE4
MOVZX ECX,AL
JMP 6FC9241E
3、跳转至6FD17AE4
MOV EDX,DWORD PTR SS:
MOV ECX,DWORD PTR SS:
CALL 6FD17A2B
JMP 6FC924394、跳转至6FD17A2B
PUSH EDX
PUSH ECX
CALL 6FD17B0F
RETN
DLL部分修改完毕。
在cubemain.txt 添加改红门开启的设定
条件设定自行定义,在output处填入Portal即可
MOV CL,BYTE PTR SS:中,EBP+6D不为城镇
经测试EBP = Game ,EBP + 6D为BYTEdifficultyLevel 费了很大的劲,才修改完毕,结果进游戏就error
然后这个修改是不是仅仅只是可以开6boss红门 我想制作官邸直达红门 比如5个官邸直达的道具这个修改是不是做不到?
页:
[1]