Open Source C++ Metin2 pvp (radar source )

ImparatorHacker

Bronz Üye
Katılım
13 Şub 2023
Mesajlar
40
Beğeniler
11
Kod 1 :D
C++:
struct c_entity
{
    int type;
    float x;
    float y;
    float z;
    int IsDead;
    DWORD VIDS;
}c_entity[355];

struct c_players
{
    float x;
    float y;
    float z;
    DWORD SkillHacks;
}c_players;

bool entity_render = true;
bool local_render = true;
DWORD WINAPI ProcessMemory(HMODULE hModule)
{
    if (!PointModule)// ugrasmamak icin direk null olarak tanımlıyorum
    {
        metin2client = (DWORD)GetModuleHandleA(NULL);
        PointModule = TRUE;
    }
    while (true)
    {
        if (ServerSelector == 1) //Seishin Online
        {
            try
            {
                if (entity_render)
                {   // entitylist den x y z read lıyorum
                    for (int i = 0; i < 331; i += 4) {
                        for (int i = 0; i < 231; i += 4) {
                            // X
                            DWORD m_iName = metin2client + Client->SeishinOnline->ent_entitylist;
                            DWORD OFF1, OFF2;
                            ReadProcessMemory(MEMORY, (LPVOID)(m_iName), &OFF1, 4, NULL);
                            ReadProcessMemory(MEMORY, (LPVOID)(OFF1 + i), &OFF2, 4, NULL);
                            ReadProcessMemory(MEMORY, (LPVOID)(OFF2 + Client->SeishinOnline->ent_x), &c_entity[i].x, 4, NULL);
                            // Y
                            DWORD m_iName1 = metin2client + Client->SeishinOnline->ent_entitylist;
                            DWORD OFF3, OFF4;
                            ReadProcessMemory(MEMORY, (LPVOID)(m_iName1), &OFF3, 4, NULL);
                            ReadProcessMemory(MEMORY, (LPVOID)(OFF3 + i), &OFF4, 4, NULL);
                            ReadProcessMemory(MEMORY, (LPVOID)(OFF4 + Client->SeishinOnline->ent_y), &c_entity[i].y, 4, NULL);
                            // Z
                            DWORD m_iName2 = metin2client + Client->SeishinOnline->ent_entitylist;
                            DWORD OFF5, OFF6;
                            ReadProcessMemory(MEMORY, (LPVOID)(m_iName2), &OFF5, 4, NULL);
                            ReadProcessMemory(MEMORY, (LPVOID)(OFF5 + i), &OFF6, 4, NULL);
                            ReadProcessMemory(MEMORY, (LPVOID)(OFF6 + Client->SeishinOnline->ent_z), &c_entity[i].z, 4, NULL);
                        }
                    }
                }
                if (entity_render)
                {
                    for (int i = 0; i < 331; i += 4) {
                        DWORD m_iName = metin2client + Client->SeishinOnline->ent_entitylist;
                        DWORD OFF1, OFF2;
                        ReadProcessMemory(MEMORY, (LPVOID)(m_iName), &OFF1, 4, NULL);
                        ReadProcessMemory(MEMORY, (LPVOID)(OFF1 + i), &OFF2, 4, NULL);
                        ReadProcessMemory(MEMORY, (LPVOID)(OFF2 + Client->SeishinOnline->ent_type), &c_entity[i].type, 4, NULL);
                    }
                }
                if (entity_render)
                {
                    for (int i = 0; i < 231; i += 4) {
                        DWORD m_iName = metin2client + Client->SeishinOnline->ent_entitylist;
                        DWORD OFF1, OFF2;
                        ReadProcessMemory(MEMORY, (LPVOID)(m_iName), &OFF1, 4, NULL);
                        ReadProcessMemory(MEMORY, (LPVOID)(OFF1 + i), &OFF2, 4, NULL);
                        ReadProcessMemory(MEMORY, (LPVOID)(OFF2 + Client->SeishinOnline->ent_VIDS), &c_entity[i].VIDS, 4, NULL);
                    }
                }
                // IsDead
                if (entity_render)
                {
                    for (int i = 0; i < 231; i += 4) {
                        DWORD m_iName = metin2client + Client->SeishinOnline->ent_entitylist;
                        DWORD OFF1, OFF2;
                        ReadProcessMemory(MEMORY, (LPVOID)(m_iName), &OFF1, 4, NULL);
                        ReadProcessMemory(MEMORY, (LPVOID)(OFF1 + i), &OFF2, 4, NULL);
                        ReadProcessMemory(MEMORY, (LPVOID)(OFF2 + Client->SeishinOnline->ent_IsDead), &c_entity[i].IsDead, 4, NULL);
                    }
                }
                if (local_render)
                {
                    for (int i = 0; i < 331; i += 4) {
                        DWORD m_iName = metin2client + Client->SeishinOnline->ent_localplayer;
                        DWORD OFF1, OFF2;
                        ReadProcessMemory(MEMORY, (LPVOID)(m_iName), &OFF1, 4, NULL);
                        ReadProcessMemory(MEMORY, (LPVOID)(OFF1 + Client->SeishinOnline->ent_globalptr), &OFF2, 4, NULL);
                        ReadProcessMemory(MEMORY, (LPVOID)(OFF2 + Client->SeishinOnline->ent_x), &c_players.x, 4, NULL);

                        DWORD m_iName1 = metin2client + Client->SeishinOnline->ent_localplayer;
                        DWORD OFF3, OFF4;
                        ReadProcessMemory(MEMORY, (LPVOID)(m_iName1), &OFF3, 4, NULL);
                        ReadProcessMemory(MEMORY, (LPVOID)(OFF3 + Client->SeishinOnline->ent_globalptr), &OFF4, 4, NULL);
                        ReadProcessMemory(MEMORY, (LPVOID)(OFF4 + Client->SeishinOnline->ent_y), &c_players.y, 4, NULL);

                        DWORD m_iName2 = metin2client + Client->SeishinOnline->ent_localplayer;
                        DWORD OFF6, OFF7;
                        ReadProcessMemory(MEMORY, (LPVOID)(m_iName1), &OFF6, 4, NULL);
                        ReadProcessMemory(MEMORY, (LPVOID)(OFF3 + Client->SeishinOnline->ent_globalptr), &OFF7, 4, NULL);
                        ReadProcessMemory(MEMORY, (LPVOID)(OFF4 + Client->SeishinOnline->ent_z), &c_players.z, 4, NULL);
                    }
                }
                if (local_render) // Skill Hack
                {
                    DWORD m_iName = metin2client + Client->SeishinOnline->ent_localplayer;
                    DWORD OFF1, OFF2;
                    ReadProcessMemory(MEMORY, (LPVOID)(m_iName), &OFF1, 4, NULL);
                    ReadProcessMemory(MEMORY, (LPVOID)(OFF1 + Client->SeishinOnline->ent_globalptr), &OFF2, 4, NULL);
                    ReadProcessMemory(MEMORY, (LPVOID)(OFF2 + Client->SeishinOnline->ent_SkillHack), &c_players.SkillHacks, 4, NULL);
                }

                
        }

kod 2 :D
C++:
static ImVec2 pRadar;
#define DegreeToRadian( Degree )            ( ( Degree ) * ( M_PI / 180.0f ) )
D3DXVECTOR2 WorldToRadar(Vector localposs, Vector Entity, float yaw, float radarX, float radarY, float size)
{
    auto cosYaw = cos(DegreeToRadian(-yaw));
    auto sinYaw = sin(DegreeToRadian(-yaw));

    auto deltaX = localposs.x - Entity.x; // Player VecOrigin
    auto deltaY = localposs.y - Entity.y; // Player VecOrigin

    auto locationX = (float)(deltaY * cosYaw + deltaX * sinYaw) / 75.f;
    auto locationY = (float)(deltaX * cosYaw - deltaY * sinYaw) / 75.f;

    if (locationX > (size - 2.f))
        locationX = (size - 2.f);
    else if (locationX < -(size - 2.f))
        locationX = -(size - 2.f);

    if (locationY > (size - 6.f))
        locationY = (size - 6.f);
    else if (locationY < -(size - 6.f))
        locationY = -(size - 6.f);

    return D3DXVECTOR2((int)(locationX + radarX), (int)(locationY + radarY));
}

void DrawRadar(Vector localposs, Vector Entity, float yaw, int size, ImColor EntityColor)
{
    auto radar_posX = pRadar.x + 135;
    auto radar_posY = pRadar.y + 135;

    auto Radar2D = WorldToRadar(localposs, Entity, yaw, radar_posX, radar_posY, 135.f);// Radar,
    DrawCircleFilled(Radar2D.x, Radar2D.y, size, EntityColor,50);
}
kod 3 :D
C++:
static void DrawCircleFilled(int x, int y, int radius, ImColor color, int segments)
{
    //ImGui::GetOverlayDrawList()->AddCircleFilled(ImVec2(x, y), radius, color, segments);
    ImGui::GetOverlayDrawList()->AddCircleFilled(ImVec2(x, y), radius, color, segments);
    ImGui::GetOverlayDrawList()->AddCircle(ImVec2(x, y), radius, ImColor(255,255,255), segments);
}

static void Draw_RadarText(float x, float y, const char* txt, ImColor Colors)
{
    ImGui::GetOverlayDrawList()->AddText(ImGui::GetFont(), ImGui::GetFontSize(), ImVec2(x, y), Colors, Convert(txt), 0, 0.00f, 0);
}

static void DrawLine(int x1, int y1, int x2, int y2, ImColor color, int thickness)
{
    ImGui::GetOverlayDrawList()->AddLine(ImVec2(x1, y1), ImVec2(x2, y2), color, thickness);
}
// Overlay
static void Overlay(int x, int y, float fov, float round, ImColor color)
{
    ImGui::GetOverlayDrawList()->AddCircle(ImVec2(x, y), fov, color, round);
}
static void Overlayv2(int x, int y, float fov, float round, ImColor color)
{
    ImGui::GetOverlayDrawList()->AddCircleFilled(ImVec2(x, y), fov, color, round);
}

final kod :D
C++:
    if (Ezgi->Radar->m_iminimap)
    {
        ImVec4 silverwhitee = ImVec4(ImColor(64, 64, 64));

        Vector silverwhitee_ = Vector(255 * silverwhitee.x, 255 * silverwhitee.y, 255 * silverwhitee.z);

        static ImVec2 radarPosition = ImVec2(pRadar.x, pRadar.y); 

        if (ImGui::IsMouseDragging(0)) 
        {
            ImVec2 delta = ImGui::GetIO().MouseDelta;
            radarPosition.x += delta.x;
            radarPosition.y += delta.y;
        }

        pRadar.x = radarPosition.x;
        pRadar.y = radarPosition.y;


        ImGui::GetOverlayDrawList()->AddRectFilled(ImVec2(pRadar.x, pRadar.y), ImVec2(pRadar.x + 270, pRadar.y + 270), ImGui::ColorConvertFloat4ToU32(ImVec4(0.00f, 0.00f, 0.00f, 0.70f)),5);
        ImGui::GetOverlayDrawList()->AddRect(ImVec2(pRadar.x, pRadar.y), ImVec2(pRadar.x + 272, pRadar.y + 272), ImGui::ColorConvertFloat4ToU32(ImVec4(ImColor(125,125,125))), 5);
        auto radar_posX = pRadar.x + 135;
        auto radar_posY = pRadar.y + 135;

        DrawLine(radar_posX, radar_posY, radar_posX, radar_posY + 135, ImColor(125, 125, 125), 1);
        DrawLine(radar_posX, radar_posY, radar_posX, radar_posY - 135, ImColor(125, 125, 125), 1);

        DrawLine(radar_posX, radar_posY, radar_posX + 95, radar_posY - 135, ImColor(125, 125, 125), 1);
        DrawLine(radar_posX, radar_posY, radar_posX - 90, radar_posY - 135, ImColor(125, 125, 125), 1);

        DrawLine(radar_posX, radar_posY, radar_posX + 135, radar_posY, ImColor(125, 125, 125), 1);
        DrawLine(radar_posX, radar_posY, radar_posX - 135, radar_posY, ImColor(125, 125, 125), 1);

        Overlay(radar_posX, radar_posY, Ezgi->Radar->m_iAreaSize, Ezgi->Radar->m_iAreaSize, ImColor(61, 142, 185));


        Vector Localpos;
        Localpos.x = c_players.x;
        Localpos.y = c_players.y;
        Vector EntityOrigin;
        for (int i = 0; i < 200; i += 4)
        {
            EntityOrigin.x = c_entity[i].x;
            EntityOrigin.y = c_entity[i].y;
            float MinimapDistance = (Distance2D(c_entity[i].x, c_entity[i].y, c_players.x, c_players.y));
            float new_distance;
            if (MinimapDistance < Ezgi->Radar->new_fov)
            {
                // Players
                if (Ezgi->Radar->m_iPlayers)
                {
                    animate();
                    RGBA ESPColor = { espWave.R ,espWave.G, espWave.B, espWave.A };
                    if (c_entity[i].type == 6)
                    {
                        if (c_entity[i].IsDead > 0 || c_entity[i].IsDead < 1) {
                            DrawRadar(Localpos, EntityOrigin, 360.0f, Ezgi->Radar->m_iPlayerSize, ImColor{ ESPColor.R,ESPColor.G,ESPColor.B ,ESPColor.A });
                        }
                    }
                }
                // Npc
                if (Ezgi->Radar->m_iNPC) {
                    if (c_entity[i].type == 1)
                    {
                        DrawRadar(Localpos, EntityOrigin, 360.0f, Ezgi->Radar->m_iNPCSize, FLOAT4TOD3DCOLOR(Colors::NPC));
                    }
                }
                // Entity
                if (Ezgi->Radar->m_iEnemy)
                {
                    if (c_entity[i].type == 0)
                    {
                        DrawRadar(Localpos, EntityOrigin, 360.0f, Ezgi->Radar->m_iEnemySize, FLOAT4TOD3DCOLOR(Colors::Entıty));
                        if (ServerSelector == 1) //Seishin Online
                        {
                            if (Ezgi->Player->m_iMobber) {
                                *(float*)(*(DWORD*)(*(DWORD*)((DWORD)GetModuleHandleA(NULL) + Client->SeishinOnline->ent_entitylist) + i) + Client->SeishinOnline->ent_x) = c_players.x;
                                *(float*)(*(DWORD*)(*(DWORD*)((DWORD)GetModuleHandleA(NULL) + Client->SeishinOnline->ent_entitylist) + i) + Client->SeishinOnline->ent_y) = c_players.y;
                                *(float*)(*(DWORD*)(*(DWORD*)((DWORD)GetModuleHandleA(NULL) + Client->SeishinOnline->ent_entitylist) + i) + Client->SeishinOnline->ent_z) = c_players.z;
                            }
                            // ==================== FarmBot ====================//
                            if (Ezgi->Player->m_iFarmBot)
                            {
                                if (Ezgi->Player->walk_mob)
                                {
                                    *(DWORD*)Ez_memory::Adres(Ez_game_base + Client->SeishinOnline->ent_Walk, { Client->SeishinOnline->ent_walk_ptr }) = c_entity[i].VIDS;
                                }
                            }
                        }
                    }
                }
                // Stone
                if (Ezgi->Radar->m_iStone) {
                    if (c_entity[i].type == 2)
                    {
                        DrawRadar(Localpos, EntityOrigin, 360.0f, Ezgi->Radar->m_iStoneSize, FLOAT4TOD3DCOLOR(Colors::Stone));
                        // ==================== FarmBot ====================//
                        if (ServerSelector == 1) //Seishin Online
                        {
                            if (Ezgi->Player->m_iFarmBot)
                            {
                                if (Ezgi->Player->walk_stone)
                                {
                                    *(DWORD*)Ez_memory::Adres(Ez_game_base + Client->SeishinOnline->ent_Walk, { Client->SeishinOnline->ent_walk_ptr }) = c_entity[i].VIDS;
                                }
                            }
                        }
                    }
                }
                // Teleport
                if (Ezgi->Radar->m_iPortal) {
                    if (c_entity[i].type == 3)
                    {
                        DrawRadar(Localpos, EntityOrigin, 360.0f, Ezgi->Radar->m_iPortalSize, FLOAT4TOD3DCOLOR(Colors::Teleport));
                    }
                }
            }
            if (GetAsyncKeyState(VK_SHIFT)) {
                
            }
        }
        //ImGui::End();
    }
ImGui Projenize Eklemeyi Unutmayınız :D
 
ölmüş konuları hortlatmayın
 

  Şuanda konuyu görüntüleyen kullanıcılar


Üst Alt