1.13c制作超大背包不完全攻略
转载BY SJ
首先你要会搞D2MuitlRes113C.dll与D2MultiResExt.dll(后者我是跟狂三要的)
D2Gfx::D2DrawImage-10041
1、修复技能的背景(不需要可以不要)
offset = D2Client::GetAddress(0x77AA8);
Memory::SetCursor(offset);
Memory::ChangeCallB((DWORD)D2Gfx::D2DrawImage, (DWORD)caller_SpellBackGroundFix);
void __stdcall m_NewStatShow_SpellBackGroundFix(sDrawImageInfo* pData, DWORD* nXpos, DWORD* nYpos, DWORD nGamma, DWORD nDrawType, BYTE pPalette)
{
//Init data for print image
sDrawImageInfo data;
ZeroMemory(&data, sizeof(data));
//print background
setImage(&data, spellBackgroundImages);
setFrame(&data, 0);
int fixx = 511;
int fixy = 9;
D2Gfx::D2DrawImage(&data, RX(0+ fixx), RY(256 + fixy), -1, 5, 0);
setFrame(&data, 1);
D2Gfx::D2DrawImage(&data, RX(256 + fixx), RY(256 + fixy), -1, 5, 0);//256
setFrame(&data, 2);
D2Gfx::D2DrawImage(&data, RX(0 + fixx), RY(0 + fixy), -1, 5, 0);//432
setFrame(&data, 3);
D2Gfx::D2DrawImage(&data, RX(256 + fixx), RY(0 + fixy), -1, 5, 0);
}
__declspec(naked) void caller_SpellBackGroundFix()
{
__asm
{
PUSHAD
lea eax, dword ptr ss :
push eax
push dword ptr ss :
push dword ptr ss :
lea eax, dword ptr ss :
push eax
lea eax, dword ptr ss :
push eax
push dword ptr ss :
call m_NewStatShow_SpellBackGroundFix
POPAD
JMP D2Gfx::D2DrawImage
}
}
2、我们如法炮制小站的背景
offset = D2Client::GetAddress(0xAB010);
Memory::SetCursor(offset);
Memory::ChangeCallB((DWORD)D2Gfx::D2DrawImage, (DWORD)caller_WayPointBackGroundFix);
void __stdcall m_NewStatShow_WayPointBackGroundFix(sDrawImageInfo* pData, DWORD* nXpos, DWORD* nYpos, DWORD nGamma, DWORD nDrawType, BYTE pPalette)
{
//Init data for print image
sDrawImageInfo data;
ZeroMemory(&data, sizeof(data));
//print background
setImage(&data, waypointBackgroundImages);
setFrame(&data, 0);
int fixx = 0;
int fixy = 9;
D2Gfx::D2DrawImage(&data, RX(0 + fixx), RY(256 + fixy), -1, 5, 0);
setFrame(&data, 1);
D2Gfx::D2DrawImage(&data, RX(256 + fixx), RY(256 + fixy), -1, 5, 0);//256
setFrame(&data, 2);
D2Gfx::D2DrawImage(&data, RX(0 + fixx), RY(0 + fixy), -1, 5, 0);//432
setFrame(&data, 3);
D2Gfx::D2DrawImage(&data, RX(256 + fixx), RY(0 + fixy), -1, 5, 0);
}
__declspec(naked) void caller_WayPointBackGroundFix()
{
__asm
{
PUSHAD
lea eax, dword ptr ss :
push eax
push dword ptr ss :
push dword ptr ss :
lea eax, dword ptr ss :
push eax
lea eax, dword ptr ss :
push eax
push dword ptr ss :
call m_NewStatShow_WayPointBackGroundFix
POPAD
JMP D2Gfx::D2DrawImage
}
}
3、以下可以搞16*16超级箱子-腾出我们需要的边缘
腾出我们需要的边缘(事实上可能会出现一些黑边,但是我没有修复)
{
class D2MultiRes : public Library<D2MultiRes>
{
public:
static void Init()
{
Name = "D2MultiRes.dll";
Offset = LoadDiabloLibrary();
}
};
D2MultiRes::Init();
D2MultiRes::HookLibrary();
MiscFunctionsOffset = D2MultiRes::GetAddress(0x2468);
Memory::SetCursor(MiscFunctionsOffset);
Memory::ChangeDword(0x1b0, 0x200);
MiscFunctionsOffset = D2MultiRes::GetAddress(0x2b0a);
Memory::SetCursor(MiscFunctionsOffset);
Memory::ChangeDword(0x140, 0x200);
MiscFunctionsOffset = D2MultiRes::GetAddress(0x2b10);
Memory::SetCursor(MiscFunctionsOffset);
Memory::ChangeDword(-0x234, -0x299);//280-295 290是上面多一块 310是下面多一块
MiscFunctionsOffset = D2MultiRes::GetAddress(0x2bfe);
Memory::SetCursor(MiscFunctionsOffset);
Memory::ChangeDword(0x200,0x299);//下边缘 299最大
MiscFunctionsOffset = D2MultiRes::GetAddress(0x3301);
Memory::SetCursor(MiscFunctionsOffset);
Memory::ChangeDword(-0x280, -0x400);//这个不要动
}
4、快完成了,是不是发现金币啥的位置不对??
//这里修正我们的装备栏
offset = D2Client::GetAddress(0x99B6C);
Memory::SetCursor(offset);
Memory::ChangeCallB((DWORD)D2Gfx::D2DrawImage, (DWORD)caller_Char6Fix);
offset = D2Client::GetAddress(0x99BA7);
Memory::SetCursor(offset);
Memory::ChangeCallB((DWORD)D2Gfx::D2DrawImage, (DWORD)caller_Char6Fix);
offset = D2Client::GetAddress(0x99BE2);
Memory::SetCursor(offset);
Memory::ChangeCallB((DWORD)D2Gfx::D2DrawImage, (DWORD)caller_Char6Fix);
offset = D2Client::GetAddress(0x99C1C);
Memory::SetCursor(offset);
Memory::ChangeCallB((DWORD)D2Gfx::D2DrawImage, (DWORD)caller_Char6Fix);
//取消两个popup,偷偷懒不过分
offset = D2Client::GetAddress(0x9386d);
Memory::SetCursor(offset);
Memory::ChangeByte(0x8b, 0x33);
Memory::ChangeByte(0xc8, 0xC9);
offset = D2Client::GetAddress(0x9390b);
Memory::SetCursor(offset);
Memory::ChangeByte(0x8b, 0x33);
Memory::ChangeByte(0xc8, 0xC9);
//修正提取金币
offset = D2Client::GetAddress(0x8D3E5);
Memory::SetCursor(offset);
Memory::ChangeByte(0xA1, 0xE9);
Memory::ChangeCallA((DWORD)D2Client::ptNegWindowStartY, (DWORD)caller_goldcoin);
offset = D2Client::GetAddress(0x6FB3D2E0-0x6FAB0000);
Memory::SetCursor(offset);
Memory::ChangeCallB((DWORD)D2Gfx::D2DrawImage, (DWORD)caller_goldcoinimg);
offset = D2Client::GetAddress(0x6FB3D267 - 0x6FAB0000);
Memory::SetCursor(offset);
Memory::ChangeCallB((DWORD)D2Win::D2PrintString, (DWORD)caller_goldcointext);
//修正关闭按钮
offset = D2Client::GetAddress(0x8BD90);
Memory::SetCursor(offset);
Memory::ChangeByte(0xA1, 0xE9);
Memory::ChangeCallA((DWORD)D2Client::ptScreenSize, (DWORD)caller_close);
offset = D2Client::GetAddress(0x6FB4A721 - 0x6FAB0000);
Memory::SetCursor(offset);
Memory::ChangeCallB((DWORD)D2Gfx::D2DrawImage, (DWORD)caller_closeimg);
//以下是细节
#define getXGoldCoinFixBtn() RX(0x2d0)
#define getLGoldCoinFixBtn() 32
#define getYGoldCoinFixBtn() RY(-0x59)
#define getHGoldCoinFixBtn() 32
#define isOnGoldCoinFixBtn(x,y) isOnRect(x, y, getXGoldCoinFixBtn(), getYGoldCoinFixBtn(), getLGoldCoinFixBtn(), getHGoldCoinFixBtn())
#define getXInvCloseFixBtn() RX(0x3db)
#define getLInvCloseFixBtn() 32
#define getYInvCloseFixBtn() RY(-0x63)
#define getHInvCloseFixBtn() 32
#define isOnInvCloseFixBtn(x,y) isOnRect(x, y, getXInvCloseFixBtn(), getYInvCloseFixBtn(), getLInvCloseFixBtn(), getHInvCloseFixBtn())
BOOL __fastcall m_NewStatShow_goldcoin(DWORD x,DWORD y)
{
DWORD mx = *D2Client::ptMouseX;
DWORD my = *D2Client::ptMouseY;
if(isOnGoldCoinFixBtn(mx, my))
return TRUE;
return FALSE;
}
__declspec(naked) void caller_goldcoin()
{
__asm
{
push ebx
mov ecx, esi
mov edx, edi
call m_NewStatShow_goldcoin
pop ebx
pop esi
retn
}
}
void __stdcall m_NewStatShow_goldcoinimg(sDrawImageInfo* pData, DWORD* nXpos, DWORD* nYpos, DWORD nGamma, DWORD nDrawType, BYTE pPalette)
{
if (*nXpos > D2Client::ptScreenSize->x / 2)
{
*nXpos = getXGoldCoinFixBtn();
*nYpos = getYGoldCoinFixBtn();
}
}
__declspec(naked) void caller_goldcoinimg()
{
__asm
{
PUSHAD
lea eax, dword ptr ss :
push eax
push dword ptr ss :
push dword ptr ss :
lea eax, dword ptr ss :
push eax
lea eax, dword ptr ss :
push eax
push dword ptr ss :
call m_NewStatShow_goldcoinimg
POPAD
JMP D2Gfx::D2DrawImage
}
}
DWORD __fastcall m_NewStatShow_goldcointext(DWORD x,DWORD* y)//返回x坐标
{
if (x > D2Client::ptScreenSize->x / 2)
{
*y = getYGoldCoinFixBtn();
return getXGoldCoinFixBtn() + 32;
}
return x;
}
__declspec(naked) void caller_goldcointext()
{
__asm
{
PUSH ECX
PUSH EDI
PUSH ESI
PUSH EAX
MOV ECX, EDX
LEA EDX,
CALL m_NewStatShow_goldcointext
MOV EDX,EAX
POP EAX
POP ESI
POP EDI
POP ECX
jmp D2Win::D2PrintString;
}
}
BOOL __fastcall m_NewStatShow_close(DWORD x, DWORD y)
{
DWORD mx = *D2Client::ptMouseX;
DWORD my = *D2Client::ptMouseY;
if (isOnInvCloseFixBtn(mx, my))
return TRUE;
return FALSE;
}
__declspec(naked) void caller_close()
{
__asm
{
PUSH ESI
push ebx
call m_NewStatShow_close
pop ebx
pop esi
retn
}
}
void __stdcall m_NewStatShow_closeimg(sDrawImageInfo* pData, DWORD* nXpos, DWORD* nYpos, DWORD nGamma, DWORD nDrawType, BYTE pPalette)
{
*nXpos = getXInvCloseFixBtn();
*nYpos = getYInvCloseFixBtn();
}
__declspec(naked) void caller_closeimg()
{
__asm
{
PUSHAD
lea eax, dword ptr ss :
push eax
push dword ptr ss :
push dword ptr ss :
lea eax, dword ptr ss :
push eax
lea eax, dword ptr ss :
push eax
push dword ptr ss :
call m_NewStatShow_closeimg
POPAD
JMP D2Gfx::D2DrawImage
}
}
修改效果没有图片呢?
页:
[1]