[MU] [AddOn] MiniMap
Hello & Welcome to our community. Is this your first visit? Đăng Ký
Follow us on
Follow us on Facebook Follow us on Twitter Linked In Flickr Watch us on YouTube My Space Blogger
 
Kết quả 1 đến 1 của 1

Chủ đề: [AddOn] MiniMap

  1. #1
    Thành Viên Trong's Avatar
    Ngày tham gia
    Sep 2014
    Đang ở
    vndev.games
    Bài viết
    430
    Thanks
    91
    Thanked 424 Times in 128 Posts

    Icon14 [AddOn] MiniMap

    1. MiniMap Source Code (to client side) 1.04.04 GMO
    [Only registered and activated users can see links. ]
    MiniMap.cpp file:

    PHP Code:
    #include "stdafx.h"
    #include "MiniMap.h"
    #include "TMemory.h"
    #include "Interface.h"

    // Buffers -> Using this method.. is not necesary mov esi, 0x00XXX or: mov edi, //0x00XX and prevents.. possible problems with information registers


    DWORD LoadImg1    0x007721E0;
    DWORD LoadMap1    0x00860FC0;
    DWORD LoadMap2    0x008615F0;
    DWORD LoadMap3    0x00886C20;
    DWORD LoadMap4    0x004E65C0;


    MiniMap        gMiniMap//Small MiniMap Class Initialization (Only for: Hook Main Function)


    bool IsValidMap(int MapId)
    {
        
    char FullMapName[200];
        
    sprintf_s(FullMapName"World%d\\Map1.jpg"MapId 1);


        
    struct stat buffer;


        if (
    stat(FullMapName, &buffer)) // -> On this way Minimap not have crashs on Event Maps... xD
        
    {
            switch (
    MapId)
            {
            case 
    0: return true;//Lorencia
            
    case 1: return true;//Dungeon
            
    case 2: return true;//Devias
            
    case 3: return true;//Noria
            
    case 4: return true;//LostTower
            
    case 6: return true;//Stadium
            
    case 7: return true;//Atlans
            
    case 8: return true;//Tarkan
            
    case 10: return true;//Icarus
            
    case 24: return true;//Kalima 1
            
    case 25: return true;//Kalima 2
            
    case 26: return true;//Kalima 3
            
    case 27: return true;//Kalima 4
            
    case 28: return true;//Kalima 5
            
    case 29: return true;//Kalima 6
            
    case 30: return true;//Valley of Loren
            
    case 31: return true;//Land of Trials
            
    case 33: return true;//Aida
            
    case 34: return true;//Crywolf
            
    case 36: return true;//Kanturu 1
            
    case 37: return true;//Kanturu 2
            
    case 38: return true;//Kanturu 3
            
    case 42: return true;//Barracks
            
    case 51: return true;//Elbeland
            
    case 56: return true;//Swamp of Calmness
            
    case 57: return true;//Raklion
            
    case 58: return true;//Raklion Boss
            
    case 63: return true;//Vulcanus
            
    case 80: return true;//Kalrutan 1
            
    case 81: return true;//Kalrutan 2


            // Invalid MiniMap
            
    default: return false;
            }
        }
        return 
    false;
    }


    void LoadImageJpgForMap(charImagePatchDWORD PrintCode)
    {
        
    _asm
        
    {
            
    PUSH 0
            PUSH 1
            PUSH 0x2900
            PUSH 0x2601
            PUSH 0x7B7A
            PUSH ImagePatch
            CALL LoadImg1 
    // -> Here is not used: mov edi and anothers bad instructions to memory is only direct CALL to Main Offset :D:
            
    ADD ESP,0x18
        
    }
    }


    int LoadMap(int Map)
    {
        
    char FullMapName[200];
        
    sprintf(FullMapName"World%d\\Map1.jpg"Map 1);
        
    ChangePath(FullMapName);
        
    LoadImageJpgForMap(FullMapName0x7B7A);
        return 
    Map;
    }


    void ChangePath(const charMap)
    {
        
    memset((DWORD*)0xD4A654019);
        
    memcpy((DWORD*)0xD4A654Map17);
    }


    bool MapCheckerCore1(int Map)
    {
        if (
    IsValidMap(Map))
        {
            return 
    1;
        }
        return 
    0;
    }


    void MapCheckerCore2(int Map)
    {
        if (
    IsValidMap(Map))
        {
            
    LoadMap(Map);


            
    _asm
            
    {
                
    CALL LoadMap1
                MOV ECX
    EAX
                CALL LoadMap2
                MOV ECX
    EAX
                CALL LoadMap3
            
    }
        }


        
    _asm
        
    {
            
    PUSH Map
            CALL LoadMap4 
    // -> Here on: 1.04d main.exe is not necesary POP EBP instruction.. I don't know why ^^ I like think that is by call convention type (__cdecl or __stdcall on original main function).
        
    }
    }


    #define oMapCheckerHook1    0x007D3B6D
    #define oMapCheckerHook2    0x00886B87
    #define oMapCheckerHook3    0x0062EB3D


    //--------------------------------------------------------------------------------------------
    // Cool Info ^^
    //--------------------------------------------------------------------------------------------
    #define oMiniMapKeyPushOffset    0x007D3B55    //0x09 = TAB - 0x10 = SHIFT
    #define oMiniMapKeyCallOffset    0x007D3B6D    //This call must be hook to MapCheckerCore1 proc
    // -------------------------------------------------------------------------------------------
    #define oScreenMapKeyOffset        0x007D3BA5    //0x09 = TAB - 0x10 = SHIFT


    void MiniMap::Load()
    {
        
    SetOp((LPVOID)oMapCheckerHook1, (LPVOID)MapCheckerCore1ASM::CALL);
        
    SetOp((LPVOID)oMapCheckerHook2, (LPVOID)MapCheckerCore1ASM::CALL);
        
    SetOp((LPVOID)oMapCheckerHook3, (LPVOID)MapCheckerCore2ASM::CALL);

    MiniMap.h file:
    PHP Code:
    #pragma once
    // ----------------------------------------------------------------------------------------------

    #include <sys\stat.h>
    #include "Import.h" // -> This is not necesary.. on my zClient Modified Source I only use this.. to make a small new mod (is TEST) xD

    // ----------------------------------------------------------------------------------------------


    int        LoadMap(int Map);
    void        LoadImageJpgForMap(charImagePathDWORD PrintCode);
    bool        MapCheckerCore1(int Map);
    void        MapCheckerCore2(int Map);
    void        ChangePath(const char*Map);
    bool        IsValidMap(int MapId);


    class 
    MiniMap
    {
    public:
        
    void        Load();
        
    // ----
    }; extern 

    dllmain.cpp
    PHP Code:
    #include "MiniMap.h"
    extern "C" __declspec(dllexport)void Init()
    {
        
    DWORD OldProtect;
        
    // ----
        
    if(VirtualProtect(LPVOID(0x401000),0x00D21FFF,PAGE_EXECUTE_READWRITE,&OldProtect))
        {

        
    gMiniMap.Load();

        }



    2. Other MiniMap
    Trích dẫn Gửi bởi scrome [Only registered and activated users can see links. ]

    I don't have originals: .tga files from Nemesis, but maybe this: .jpg from my minimap can help to you bro:

    [Only registered and activated users can see links. ]

    ps: and here I leave too: .tga from Interface for external minimap that: Nemesis, use in his code:

    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]

    and my own modified from original (without Illusion Event buttons that not works xD in the same .rar file):

    [Only registered and activated users can see links. ]

    ps 2: I leave here too.. a small experiment that I make.. a long time ago.. (without Success xD) sorry, but I don't know so much of programming... to try to implement something like this:

    [Only registered and activated users can see links. ]

    I make this textures .tga using.. directX texture tool and my brain xD look:

    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]

    [Only registered and activated users can see links. ]

    ps3: YES, this is from another knowded game... I know : Hahaha.. is my failed trying.. to re-create Arieth Radar Mini Map...

    ps4: and here I leave.. pseudo-code decompiled from: 1.04d GMO main.exe with my IDA 6.6 from original Webzen MiniMap Proc (maybe to some person here is util this):

    Code:
    //----- (00887490) --------------------------------------------------------
    char __usercall sub_887490@<al>(int a1@<ecx>, int a2@<ebx>, int a3@<edi>, int a4@<esi>)
    {
      int alpha; // ST2C_4@1
      int v5; // eax@1
      int v6; // eax@1
      int v7; // eax@1
      float v8; // ST34_4@1
      float v9; // ST30_4@1
      float v10; // ST08_4@1
      float v11; // ST04_4@1
      float green; // ST24_4@1
      float red; // ST20_4@1
      float v14; // ST24_4@1
      float v15; // ST20_4@1
      int v16; // ST2C_4@2
      int v17; // eax@2
      GLfloat v18; // ST2C_4@6
      GLfloat v19; // ST2C_4@7
      GLfloat v20; // ST2C_4@10
      GLfloat v21; // ST2C_4@11
      int v22; // ST18_4@12
      int v23; // ST14_4@12
      int v24; // eax@12
      float v25; // ST1C_4@13
      float v26; // ST18_4@13
      float v27; // ST24_4@14
      float v28; // ST20_4@14
      int v29; // edx@14
      int v30; // edx@14
      int v31; // edx@15
      int v33; // [sp+34h] [bp-104h]@1
      char v34; // [sp+38h] [bp-100h]@1
      char v35; // [sp+39h] [bp-FFh]@1
    
      v33 = a1;
      v34 = 0;
      sub_9CF4B0((int)&v35, 0, 255);
      sub_635FD0(1);
      glColor4f(1.0, 1.0, 1.0, *(float *)(v33 + 128));
      alpha = (int)dword_E8C58C;
      v5 = (int)sub_41FE10(a2, a3);
      sub_420120(v5, alpha);
      v6 = (int)sub_41FE10(a2, a3);
      sub_420040(v6, 0xFFu, 0xFFu, 0xFFu, 0xFFu);
      v7 = (int)sub_41FE10(a2, a3);
      sub_4200B0(v7, 0, 0, 0, 0);
      v8 = (double)*(signed int *)(v33 + 124) * 0.5;
      v9 = (double)*(signed int *)(v33 + 124) * 0.5;
      v10 = (double)*(signed int *)(v33 + 16);
      v11 = (double)*(signed int *)(v33 + 12);
      sub_637C60(a2, a3, a4, 31610, v11, v10, 128.0, 128.0, *(float *)(v33 + 116), *(float *)(v33 + 120), v9, v8, 1, 1, 0.0);
      green = (double)*(signed int *)(v33 + 8);
      red = (double)*(signed int *)(v33 + 4);
      sub_790A00(a2, a3, a4, 31608, red, green, 154.0, 162.0);
      v14 = (double)*(signed int *)(v33 + 24);
      v15 = (double)*(signed int *)(v33 + 20);
      sub_790A00(a2, a3, a4, 31609, v15, v14, 134.0, 37.0);
      glColor4f(1.0, 1.0, 1.0, *(float *)(v33 + 128));
      if ( sub_8CAF90() )
      {
        v16 = (int)dword_E8C590;
        v17 = (int)sub_41FE10(a2, a3);
        sub_420120(v17, v16);
        if ( flt_5EF5A1C - *(float *)(v33 + 144) > 500.0 )
        {
          *(float *)(v33 + 144) = flt_5EF5A1C;
          *(_BYTE *)(v33 + 134) = 1;
        }
        if ( *(_BYTE *)(v33 + 134) )
        {
          if ( *(_DWORD *)(v33 + 140) >= 10 )
          {
            v19 = *(float *)(v33 + 140);
            sub_50D100(a3, a4, (int)&v34, (int)"%d:%d", *(_DWORD *)(v33 + 136));
          }
          else
          {
            v18 = *(float *)(v33 + 140);
            sub_50D100(a3, a4, (int)&v34, (int)"%d:0%d", *(_DWORD *)(v33 + 136));
          }
        }
        else if ( *(_DWORD *)(v33 + 140) >= 10 )
        {
          v21 = *(float *)(v33 + 140);
          sub_50D100(a3, a4, (int)&v34, (int)"%d %d", *(_DWORD *)(v33 + 136));
        }
        else
        {
          v20 = *(float *)(v33 + 140);
          sub_50D100(a3, a4, (int)&v34, (int)"%d 0%d", *(_DWORD *)(v33 + 136));
        }
        v22 = *(_DWORD *)(v33 + 24) + 10;
        v23 = *(_DWORD *)(v33 + 20);
        v24 = (int)sub_41FE10(a2, a3);
        sub_420150(v24, v23, v22, (int)&v34, 134, 0, 3, 0);
      }
      (*(void (__thiscall **)(int))(*(_DWORD *)v33 + 12))(v33);
      glColor4f(1.0, 1.0, 0.0, *(float *)(v33 + 128));
      v25 = (double)*(signed int *)(v33 + 104);
      v26 = (double)*(signed int *)(v33 + 100);
      sub_6378A0(v26, v25, 3.0, 3.0, 0.0, 0);
      sub_635F50();
      sub_635FD0(1);
      glColor4f(1.0, 1.0, 1.0, *(float *)(v33 + 128));
      if ( *(_BYTE *)(v33 + 132) == 1 )
      {
        v27 = (double)*(signed int *)(v33 + 32);
        v28 = (double)*(signed int *)(v33 + 28);
        sub_790A00(a2, a3, a4, 31614, v28, v27, 128.0, 53.0);
        sub_888730(v33, a2, a3, a4);
        sub_779540(v33 + 188, v29, *(float *)(v33 + 128), 1);
        sub_779540(v33 + 360, v30, *(float *)(v33 + 128), 1);
        sub_7797A0(v33 + 188, a2, a3, a4, 0);
        sub_7797A0(v33 + 360, a2, a3, a4, 0);
      }
      sub_790880(v33 + 532, (int)dword_E8C58C);
      sub_779540(v33 + 532, v31, *(float *)(v33 + 128), 1);
      sub_7797A0(v33 + 532, a2, a3, a4, 0);
      sub_635F50();
      return 1;
    }
    // 5EF5A1C: using guessed type float flt_5EF5A1C;
    Lần sửa cuối bởi Trong, ngày 11-06-16 lúc 07:16 PM.
    Khách viếng thăm hãy cùng Trong xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  2. The Following 5 Users Say Thank You to Trong For This Useful Post:

    DAMMEMU (11-06-16), lovemu2012 (11-06-16), stevenit (12-06-16), thanhchung (21-08-16), thanhluan_lndh (02-07-16)

 

 

Các Chủ đề tương tự

  1. [TLBB] MiniMap - Kinh Mạch?
    Bởi omasa trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 9
    Bài viết cuối: 31-07-15, 03:54 AM
  2. Main 1.05D + minimap + 3D
    Bởi minhchau0309 trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 1
    Bài viết cuối: 06-12-11, 09:44 PM
  3. Add dùm or hướng dẫn add minimap
    Bởi doiphieubat trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 0
    Bài viết cuối: 03-11-10, 12:56 AM
  4. Main 1.05x + 3D Cam + Minimap
    Bởi Alexi_Laiho trong diễn đàn Releases
    Trả lời: 15
    Bài viết cuối: 11-08-09, 06:26 PM

Quyền viết bài

  • Bạn Không thể gửi Chủ đề mới
  • Bạn Không thể Gửi trả lời
  • Bạn Không thể Gửi file đính kèm
  • Bạn Không thể Sửa bài viết của mình
  •  
Múi giờ GMT +7. Bây giờ là 04:10 PM.
vBulletin®, Copyright ©2000-2011, Jelsoft Enterprises Ltd.
CLBGamesVN không chịu trách nhiệm về Luật Bản Quyền của các tài liệu, bài viết v.v...được đăng tải trên diễn đàn này.
Diễn đàn phát triển dưới sự đóng góp của tất cả thành viên. BQT chỉ là những người thành lập ra sân chơi, quản lý và duy trì về mặt kỹ thuật, nội dung khi hợp lệ.