生活情怀-神话暗黑-暗黑破坏神2

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 2118|回复: 1
收起左侧

1.13c制作超大背包不完全攻略

[复制链接]
  • TA的每日心情
    开心
    16 小时前
  • 签到天数: 6 天

    [LV.2]石门叩响

    912

    主题

    20万

    元宝

    2370 小时

    在线时间

    管理员

    Rank: 9Rank: 9Rank: 9

    积分
    200878
    发表于 2020-12-24 00:50:53 | 显示全部楼层 |阅读模式
    转载
    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[256][256])
    {
            //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 : [esp + 0x38]
                    push eax
                    push dword ptr ss : [esp + 0x38]
                    push dword ptr ss : [esp + 0x38]
                    lea eax, dword ptr ss : [esp + 0x38]
                    push eax
                    lea eax, dword ptr ss : [esp + 0x38]
                    push eax
                    push dword ptr ss : [esp + 0x38]
                    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[256][256])
    {
            //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 : [esp + 0x38]
                    push eax
                    push dword ptr ss : [esp + 0x38]
                    push dword ptr ss : [esp + 0x38]
                    lea eax, dword ptr ss : [esp + 0x38]
                    push eax
                    lea eax, dword ptr ss : [esp + 0x38]
                    push eax
                    push dword ptr ss : [esp + 0x38]
                    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[256][256])
    {
            if (*nXpos > D2Client::ptScreenSize->x / 2)
            {
                    *nXpos = getXGoldCoinFixBtn();
                    *nYpos = getYGoldCoinFixBtn();
            }
    }
    __declspec(naked) void caller_goldcoinimg()
    {
            __asm
            {
                    PUSHAD
                    lea eax, dword ptr ss : [esp + 0x38]
                    push eax
                    push dword ptr ss : [esp + 0x38]
                    push dword ptr ss : [esp + 0x38]
                    lea eax, dword ptr ss : [esp + 0x38]
                    push eax
                    lea eax, dword ptr ss : [esp + 0x38]
                    push eax
                    push dword ptr ss : [esp + 0x38]
                    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,[ESP+0X4+0X10]
                    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[256][256])
    {
            *nXpos = getXInvCloseFixBtn();
            *nYpos = getYInvCloseFixBtn();
    }
    __declspec(naked) void caller_closeimg()
    {
            __asm
            {
                    PUSHAD
                    lea eax, dword ptr ss : [esp + 0x38]
                    push eax
                    push dword ptr ss : [esp + 0x38]
                    push dword ptr ss : [esp + 0x38]
                    lea eax, dword ptr ss : [esp + 0x38]
                    push eax
                    lea eax, dword ptr ss : [esp + 0x38]
                    push eax
                    push dword ptr ss : [esp + 0x38]
                    call m_NewStatShow_closeimg
                    POPAD
                    JMP D2Gfx::D2DrawImage
            }
    }


    神话战网出品,必出精品!

    嫌怪物和地图素材太小???赶紧找我定制吧!!!
    QQ:281886256
    回复

    使用道具 举报

    该用户从未签到

    4

    主题

    0

    元宝

    8 小时

    在线时间

    罗格猎人

    Rank: 1

    积分
    0
    发表于 2021-2-23 16:59:27 | 显示全部楼层
    修改效果没有图片呢?
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    QQ|Archiver|手机版|小黑屋|神话暗黑 ( 陕ICP备18004004号-1 )

    GMT+8, 2026-1-27 16:40 , Processed in 0.072350 second(s), 24 queries .

    Powered by Discuz! X3.4

    © 2001-2023 Discuz! Team.

    快速回复 返回顶部 返回列表