Noticias:

SMF - Just Installed!

Menú principal

Source Custom AutoMove Season 6 Muemu

Publicado por Dakosmu, Feb 27, 2025, 03:10 PM

Tema anterior - Siguiente tema

Dakosmu

Source Custom AutoMove Season 6 Muemu

stdafx.h


#define AUTOMOVE          1

User.h

Dentro de class User

    #if(AUTOMOVE==1)
    //Auto Sendmove
    DWORD        IsSendMove;
    DWORD            MoveToX;
    DWORD            MoveToY;
    BYTE        KhongDiDuoc;
    int                m_MaxWarehouse;
    int                m_WarehouseNumber;
#endif


User.cpp

Dentro de void User::Load()

#if(AUTOMOVE==1)
    //Auto Move
    this->IsSendMove = 0;
    this->MoveToX = 0;
    this->MoveToY = 0;
    this->KhongDiDuoc = 0;
    //===========================
#endif

Protect.h

DWORD DisableAutoMove;
miniMap.h


struct AUTOMOVE_REQ
{
    PSBMSG_HEAD h;
    int    TYPE;
};

Dentro de class CMinimap

    //MoverMiniMapa
    DWORD DelayMove;
    bool Moving;
    short maxX;
    short maxY;
    DWORD ultimoX;
    DWORD ultimoY;
    void AutoSendMove();
    void CGAutoMove(int Type);


MiniMap.cpp



Dentro de void CMinimap::MiniMapload()

#if(AUTOMOVE==1)
if (gProtect.m_MainInfo.DisableAutoMove == 1)
{
SetCompleteHook(0xE9, 0x0082ABA0, &CMinimap::MapRender);

}
#endif



Dentro de char CMinimap::MapRender(int a1)

#if(AUTOMOVE==1)

    float MainWidth = 480.0;
    float MainHeight = 480.0;
    float StartX = (MAX_WIN_WIDTH / 2) - (MainWidth / 2);
    float StartY = (MAX_WIN_HEIGHT / 2) - (MainHeight / 2);

    if (CheckButtonPressed(StartX, StartY, 480, 480))
    {
        if ((GetTickCount() - gInterface.Data[ePLAYER_POINT].EventTick) < 2000) {
            return 0;
        }
        gInterface.Data[ePLAYER_POINT].EventTick = GetTickCount();
        //*((BYTE *)oUserPreviewStruct + 121) = 0;
        //====Debug===//
        *(DWORD*)0x81C038C = (float)((gObjUser.m_CursorX - StartX) / 1.8700005) - 3.0;
        *(DWORD*)0x81C0388 = (float)(255 - ((gObjUser.m_CursorY / 1.85)) - StartY);
        gObjUser.MoveToX = *(DWORD*)0x81C038C;
        gObjUser.MoveToY = *(DWORD*)0x81C0388;
        gObjUser.IsSendMove = 5;
        this->CGAutoMove(1);
    }


#endif


#if(AUTOMOVE==1)
int MoveAutoLoad = 0;
void CMinimap::AutoSendMove()
{

    /*char TDebugTExt[65] = {0};
    sprintf(TDebugTExt, "81F6BD8 [%d]",*(DWORD *)0x81F6BD8);
    pDrawMessage(TDebugTExt, 1); */
    if (!gObjUser.MoveToX && !gObjUser.MoveToY) {
        return;
    }
    if (GetKeyState(VK_ESCAPE) < 0 && gObjUser.MoveToX && gObjUser.MoveToY || *(DWORD *)0x81C038C != gObjUser.MoveToX && *(DWORD *)0x81C0388 != gObjUser.MoveToY)
    {
        if ((GetTickCount() - gInterface.Data[ePLAYER_POINT].EventTick) < 1000) {
            return;
        }
        gInterface.Data[ePLAYER_POINT].EventTick = GetTickCount();
        gObjUser.MoveToX = 0;
        gObjUser.MoveToY = 0;
        *(DWORD *)0x81C038C = 0;
        *(DWORD *)0x81C0388 = 0;
        gObjUser.IsSendMove = 0;
        pDrawMessage(gCustomMessage.GetMessage(94), 1); // Huy Lenh Di Chuyen
        this->CGAutoMove(0);
        return;
    }

    if (gObjUser.MoveToX != 0 && gObjUser.MoveToY != 0) {
        HFONT FontTextMiniMap = CreateFontA(16, Main_Font_Width, 0, 0, 700, 0, 0, 0, 1u, 0, 0, 3u, 0, Main_Font_Name);
        CustomFont.Draw(FontTextMiniMap, (int)(MAX_WIN_WIDTH / 2) - (300 / 2), (int)30, 0xBBFF00FF, 0x0000008D, 300, 25, 3, gCustomMessage.GetMessage(93), *(DWORD *)0x81C038C, *(DWORD *)0x81C0388);
        //CustomFont.Draw(FontTextMiniMap, (int)(MAX_WIN_WIDTH / 2)-(300/2), (int)30, 0xBBFF00FF, 0x0000008D, 300, 25, 3,"Test %d/%d %d",*(DWORD *)0x81C038C,*(DWORD *)0x81C0388,gObjUser.lpViewPlayer->Unknown120);

        if (MoveAutoLoad == 1)
        {
            CustomFont.Draw(FontTextMiniMap, (int)(MAX_WIN_WIDTH / 2) - (50 / 2), (int)42, 0xBBFF00FF, 0x0, 0, 0, 1, "AUTO RUNNING ..");
            MoveAutoLoad = 2;
        }
        else if (MoveAutoLoad == 2)
        {
            CustomFont.Draw(FontTextMiniMap, (int)(MAX_WIN_WIDTH / 2) - (50 / 2), (int)42, 0xBBFF00FF, 0x0, 0, 0, 1, "AUTO RUNNING ...");
            MoveAutoLoad = 3;
        }
        else if (MoveAutoLoad == 3)
        {
            CustomFont.Draw(FontTextMiniMap, (int)(MAX_WIN_WIDTH / 2) - (50 / 2), (int)42, 0xBBFF00FF, 0x0, 0, 0, 1, "AUTO RUNNING ....");
            MoveAutoLoad = 4;
        }
        else if (MoveAutoLoad == 4)
        {
            CustomFont.Draw(FontTextMiniMap, (int)(MAX_WIN_WIDTH / 2) - (50 / 2), (int)42, 0xBBFF00FF, 0x0, 0, 0, 1, "AUTO RUNNING .....");
            MoveAutoLoad = 0;
        }
        else
        {
            CustomFont.Draw(FontTextMiniMap, (int)(MAX_WIN_WIDTH / 2) - (50 / 2), (int)42, 0xBBFF00FF, 0x0, 0, 0, 1, "AUTO RUNNING .");
            MoveAutoLoad = 1;
        }
        DeleteObject(FontTextMiniMap);
    }
    //if ( *(DWORD *)0x81C03B4 >= *(DWORD *)0xE616D0 && !*(BYTE *)0x81C042C )
    if ((GetTickCount() - gObjUser.IsSendMove) < 2000 && gObjUser.lpViewPlayer->Unknown120 > 0){
        return;
    }
    if (*(DWORD *)0x81C038C == gObjUser.MoveToX  && *(DWORD *)0x81C0388 == gObjUser.MoveToY) {
        gObjUser.Refresh();
        if (PathFinding2(gObjUser.lpViewPlayer->MapPosX,
            gObjUser.lpViewPlayer->MapPosY,
            *(DWORD *)0x81C038C,
            *(DWORD *)0x81C0388,
            oUserPreviewStruct + 628,
            0.0,
            2))
        {
            gObjUser.IsSendMove = GetTickCount();
            SendMove(oUserPreviewStruct, oUserPreviewStruct + 776);
            if (gObjUser.KhongDiDuoc >= 1) {
                gObjUser.KhongDiDuoc--;
            }
        }
        else if (gObjUser.KhongDiDuoc > 3) {
            gObjUser.MoveToX = 0;
            gObjUser.MoveToY = 0;
            *(DWORD *)0x81C038C = 0;
            *(DWORD *)0x81C0388 = 0;
            gObjUser.IsSendMove = 0;
            gObjUser.KhongDiDuoc = 0;
            pDrawMessage(gCustomMessage.GetMessage(96), 1); // Không Cho Hiện Thông Báo Trên Màn Hình*/
            SendAction(oUserPreviewStruct, oUserPreviewStruct + 776);
            return;
        }
        else {
            gObjUser.KhongDiDuoc++;
        }

        if (gObjUser.lpViewPlayer->MapPosX == *(DWORD *)0x81C038C && gObjUser.lpViewPlayer->MapPosY == *(DWORD *)0x81C0388)
        {
            gObjUser.MoveToX = 0;
            gObjUser.MoveToY = 0;
            *(DWORD *)0x81C038C = 0;
            *(DWORD *)0x81C0388 = 0;
            gObjUser.IsSendMove = 0;
            pDrawMessage(gCustomMessage.GetMessage(95), 1); // Không Cho Hiện Thông Báo Trên Màn Hình*/
            this->CGAutoMove(0);
            return;
        }

    }

}
void CMinimap::CGAutoMove(int Type)
{
    AUTOMOVE_REQ pRequest;
    pRequest.h.set(0xF3, 0x37, sizeof(pRequest));
    pRequest.TYPE = Type;
    DataSend((LPBYTE)&pRequest, pRequest.h.size);
}

#endif

Dentro de if (CheckButtonPressed(StartX, StartY, 480, 480))

#if(AUTOMOVE==1)
            *(DWORD *)0x81C038C = (float)((gObjUser.m_CursorX - StartX) / 1.8700005) - 3.0;
            *(DWORD *)0x81C0388 = (float)(255 - ((gObjUser.m_CursorY / 1.85)) - StartY);
            gObjUser.MoveToX = *(DWORD *)0x81C038C;
            gObjUser.MoveToY = *(DWORD *)0x81C0388;
            gObjUser.IsSendMove = 5;
            this->CGAutoMove(1);
#endif




Import.h
#if(AUTOMOVE==1)
#define PathFinding2 ((char(__cdecl*)(int a1, int a2, int a3, int a4, int a5, float a6, int a7))0x00542D20)
#define SendMove ((char(__cdecl*)(int a1, int a2))0x005A3C70)
#define SendAction ((char(__cdecl*)(int a1, int a2))0x005A13C0)
#endif


Common.cpp

#if(AUTOMOVE==1)
char Main_Font_Name[100];
int Main_Font_Width;
#endif

Common.h

#if(AUTOMOVE==1)
extern int Main_Font_Width;
extern char Main_Font_Name[100];
#endif

WindowsStruct.cpp

#if(AUTOMOVE==1)
bool CheckButtonPressed(int x, int y, int w, int h)
{
    return pCheckMouseOver(x, y, w, h) && *(BYTE*)0x8793386;
}
#endif


WindowsStruct.h

#if(AUTOMOVE==1)
bool CheckButtonPressed(int x, int y, int w, int h);
#endif










Bon Dia

🡱 🡳