Siga-nos em...
Follow us on Twitter Follow us on Facebook Watch us on YouTube
Registro

Alpha Servers
Resultados 1 a 8 de 8

Visão do Encadeamento

  1. #1

    Avatar de levelx
    Data de Ingresso
    Nov 2010
    Localização
    fail Cave
    Idade
    41
    Posts
    559
    Agradecido
    28
    Agradeceu
    23
    Peso da Avaliação
    23

    Smile source completa 3d+splash+minimap

    bom nao tenho fotos entao postarei o cpp dela para melhor compreendimento
    o splash screen é uma imagem que carrega ao iniciar o main. compativels com todos os main basta alterar os offsets.

    creditos: xong.


    [Somente usuários registrados podem vem os links. ]

    spalsh cpp:
    Código PHP:
    //  ===========================================================================
    //  File    Splash.cpp
    //  Desc    The implementation file for the CSplash class.
    //  ===========================================================================

    #include "splash.h"
    #include "windowsx.h"

    //  ===========================================================================
    //  The following is used for layering support which is used in the 
    //  splash screen for transparency. In VC 6 these are not defined in the headers
    //  for user32.dll and hence we use mechanisms so that it can work in VC 6.
    //  We define the flags here and write code so that we can load the function
    //  from User32.dll explicitely and use it. This code requires Win2k and above
    //  to work.
    //  ===========================================================================
    typedef BOOL (WINAPI *lpfnSetLayeredWindowAttributes)
            (
    HWND hWndCOLORREF crBYTE bAlphaDWORD dwFlags);

    lpfnSetLayeredWindowAttributes g_pSetLayeredWindowAttributes;

    #define WS_EX_LAYERED 0x00080000 
    //Only VC++ 6 need this
    //#define LWA_COLORKEY 1 // Use color as the transparency color.
    //#define LWA_ALPHA    2 // Use bAlpha to determine the opacity of the layer

    //  ===========================================================================
    //  Func    ExtWndProc
    //  Desc    The windows procedure that is used to forward messages to the 
    //          CSplash class. CSplash sends the "this" pointer through the
    //          CreateWindowEx call and the pointer reaches here in the 
    //          WM_CREATE message. We store it here and use it for message 
    //          forwarding.
    //  ===========================================================================
    static LRESULT CALLBACK ExtWndProc(HWND hwndUINT uMsgWPARAM wParamLPARAM lParam)
    {
        static 
    CSplash spl NULL;
        if(
    uMsg == WM_CREATE)
        {
            
    spl = (CSplash*)((LPCREATESTRUCT)lParam)->lpCreateParams;
        }
        if(
    spl)
            return 
    spl->WindowProc(hwnduMsgwParamlParam);
        else
            return 
    DefWindowProc (hwnduMsgwParamlParam);
    }

    LRESULT CALLBACK CSplash::WindowProc(HWND hwndUINT uMsgWPARAM wParamLPARAM lParam)
    {
        
    //  We need to handle on the WM_PAINT message
        
    switch(uMsg)
        {
            
    HANDLE_MSG(hwndWM_PAINTOnPaint);
        }

        return 
    DefWindowProc (hwnduMsgwParamlParam) ;
    }

    void CSplash:: OnPaint(HWND hwnd)
    {
        if (!
    m_hBitmap)
            return;

        
    //  =======================================================================
        //  Paint the background by BitBlting the bitmap
        //  =======================================================================
        
    PAINTSTRUCT ps ;
        
    HDC hDC BeginPaint (hwnd, &ps) ;

        
    RECT   rect;
        ::
    GetClientRect(m_hwnd, &rect);
        
        
    HDC hMemDC      = ::CreateCompatibleDC(hDC);
        
    HBITMAP hOldBmp = (HBITMAP)::SelectObject(hMemDCm_hBitmap);
        
        
    BitBlt(hDC00m_dwWidthm_dwHeighthMemDC00SRCCOPY);

        ::
    SelectObject(hMemDChOldBmp);

        ::
    DeleteDC(hMemDC);
        
        
    EndPaint (hwnd, &ps) ;
    }

    void CSplash::Init()
    {
        
    //  =======================================================================
        //  Initialize the variables
        //  =======================================================================
        
    m_hwnd NULL;
        
    m_lpszClassName TEXT("SPLASH");
        
    m_colTrans 0;

        
    //  =======================================================================
        //  Keep the function pointer for the SetLayeredWindowAttributes function
        //  in User32.dll ready
        //  =======================================================================
        
    HMODULE hUser32 GetModuleHandle(TEXT("USER32.DLL"));

        
    g_pSetLayeredWindowAttributes = (lpfnSetLayeredWindowAttributes)
                            
    GetProcAddress(hUser32"SetLayeredWindowAttributes");
    }

    CSplash::CSplash()
    {
        
    Init();
    }

    CSplash::CSplash(LPCTSTR lpszFileNameCOLORREF colTrans)
    {
        
    Init();

        
    SetBitmap(lpszFileName);
        
    SetTransparentColor(colTrans);
    }

    CSplash::~CSplash()
    {
        
    FreeResources();
    }

    HWND CSplash::RegAndCreateWindow()
    {
        
    //  =======================================================================
        //  Register the window with ExtWndProc as the window procedure
        //  =======================================================================
        
    WNDCLASSEX wndclass;
        
    wndclass.cbSize         sizeof (wndclass);
        
    wndclass.style          CS_BYTEALIGNCLIENT CS_BYTEALIGNWINDOW;
        
    wndclass.lpfnWndProc    ExtWndProc;
        
    wndclass.cbClsExtra     0;
        
    wndclass.cbWndExtra     DLGWINDOWEXTRA;
        
    wndclass.hInstance      = ::GetModuleHandle(NULL);
        
    wndclass.hIcon          NULL;
        
    wndclass.hCursor        = ::LoadCursorNULLIDC_WAIT );
        
    wndclass.hbrBackground  = (HBRUSH)::GetStockObject(LTGRAY_BRUSH);
        
    wndclass.lpszMenuName   NULL;
        
    wndclass.lpszClassName  m_lpszClassName;
        
    wndclass.hIconSm        NULL;

        if(!
    RegisterClassEx (&wndclass))
            return 
    NULL;

        
    //  =======================================================================
        //  Create the window of the application, passing the this pointer so that
        //  ExtWndProc can use that for message forwarding
        //  =======================================================================
        
    DWORD nScrWidth  = ::GetSystemMetrics(SM_CXFULLSCREEN);
        
    DWORD nScrHeight = ::GetSystemMetrics(SM_CYFULLSCREEN);

        
    int x = (nScrWidth  m_dwWidth) / 2;
        
    int y = (nScrHeight m_dwHeight) / 2;
        
    m_hwnd = ::CreateWindowEx(WS_EX_TOPMOST|WS_EX_TOOLWINDOWm_lpszClassName
                                  
    TEXT("Banner"), WS_POPUPxy
                                  
    m_dwWidthm_dwHeightNULLNULLNULLthis);

        
    //  =======================================================================
        //  Display the window
        //  =======================================================================
        
    if(m_hwnd)
        {
            
    MakeTransparent();
            
    ShowWindow   (m_hwndSW_SHOW) ;
            
    UpdateWindow (m_hwnd);
        }
        return 
    m_hwnd;
    }

    int CSplash::DoLoop()
    {
        
    //  =======================================================================
        //  Show the window
        //  =======================================================================
        
    if(!m_hwnd)
            
    ShowSplash();

        
    //  =======================================================================
        //  Get into the modal loop
        //  =======================================================================
        
    MSG msg ;
        while (
    GetMessage (&msgNULL00))
        {
            
    TranslateMessage (&msg) ;
            
    DispatchMessage  (&msg) ;
        }

        return 
    msg.wParam ;

    }

    void CSplash::ShowSplash()
    {
        
    CloseSplash();
        
    RegAndCreateWindow();
    }


    DWORD CSplash::SetBitmap(LPCTSTR lpszFileName)
    {
        
    //  =======================================================================
        //  load the bitmap
        //  =======================================================================
        
    HBITMAP    hBitmap       NULL;
        
    hBitmap = (HBITMAP)::LoadImage(0lpszFileNameIMAGE_BITMAP00LR_LOADFROMFILE);
        return 
    SetBitmap(hBitmap);
    }

    DWORD CSplash::SetBitmap(HBITMAP hBitmap)
    {
        
    int nRetValue;
        
    BITMAP  csBitmapSize;
        
        
    //  =======================================================================
        //  Free loaded resource
        //  =======================================================================
        
    FreeResources();
        
        if (
    hBitmap)
        {
            
    m_hBitmap hBitmap;
            
            
    //  ===================================================================
            //  Get bitmap size
            //  ===================================================================
            
    nRetValue = ::GetObject(hBitmapsizeof(csBitmapSize), &csBitmapSize);
            if (
    nRetValue == 0)
            {
                
    FreeResources();
                return 
    0;
            }
            
    m_dwWidth = (DWORD)csBitmapSize.bmWidth;
            
    m_dwHeight = (DWORD)csBitmapSize.bmHeight;
        }
           
        return 
    1;
    }

    void CSplash::FreeResources()
    {
        if (
    m_hBitmap)
            ::
    DeleteObject (m_hBitmap);
        
    m_hBitmap NULL;
    }

    int CSplash::CloseSplash()
    {
        
        if(
    m_hwnd)
        {
            
    DestroyWindow(m_hwnd);
            
    m_hwnd 0;
            
    UnregisterClass(m_lpszClassName, ::GetModuleHandle(NULL));
            return 
    1;
        }
        return 
    0;
    }

    bool CSplash::SetTransparentColor(COLORREF col)
    {
        
    m_colTrans col;

        return 
    MakeTransparent();
    }

    bool CSplash::MakeTransparent()
    {
        
    //  =======================================================================
        //  Set the layered window style and make the required color transparent
        //  =======================================================================
        
    if(m_hwnd && g_pSetLayeredWindowAttributes && m_colTrans )
        {
            
    //  set layered style for the window
            
    SetWindowLong(m_hwndGWL_EXSTYLEGetWindowLong(m_hwndGWL_EXSTYLE) | WS_EX_LAYERED);
            
    //  call it with 0 alpha for the given color
            
    g_pSetLayeredWindowAttributes(m_hwndm_colTrans0LWA_COLORKEY);
        }    
        return 
    TRUE;

    minimap.cpp
    Código PHP:
    #include "stdafx.h"
    #include "CustomMain.h"
    #include "Minimap.h"
    void LoadImageJgpForMap(charImagePatchDWORD PrintCode)
    {
        
    _asm
        
    {
            
    Mov EdiMain_LoadImageOzt
            Push 0x1
            Push 0x2900
            Push 0x2601
            Push 0x7B69
            Push ImagePatch
            Call Edi
            Add Esp
    ,0x14
        
    }
    }

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

    void ChangePath(const charMap)
    {
        
    memcpy((DWORD*)0x8DC270,Map,17);
    }

    bool MapCheckerCore1(int Map)
    {
        if( 
    Map == || Map == || Map == || Map == || Map == || Map == || Map == ||
            
    Map == 10 || Map == 24 || Map == 30 || Map == 33 || Map == 34 || Map == 37 || Map == 38 ||
            
    Map == 41 || Map == 51 || Map == 56 || Map == 57 || Map == 63)
        {
            return 
    1;
        }
        return 
    0;
    }

    char FullMapName[200];

    void MapCheckerCore2(int Map)
    {
        if( 
    Map == || Map == || Map == || Map == || Map == || Map == || Map == ||
            
    Map == 10 || Map == 24 || Map == 30 || Map == 33 || Map == 34 || Map == 37 || Map == 38 ||
            
    Map == 41 || Map == 51 || Map == 56 || Map == 57 || Map == 63)
        {
            
    LoadMap(Map);
            
            
    _asm
            

                
    MOV EDI0x007747FF
                CALL EDI
                MOV ECX
    ,EAX
                MOV EDI
    0x00774B8D
                CALL EDI
                MOV ECX
    ,EAX
                MOV EDI
    0x006DE48E
                CALL EDI
            
    }
            
    Sleep(100);
        }
        
        else
        {
            
    SetByte(0x006DE429,0x75);
        }
    }



    void InitMiniMap()
    {

        
    SetByte(0x00730AC9,0x90);
        
    SetByte(0x00730ACA,0x90);

        
    HookThis((DWORD)&MapCheckerCore10x006DE41A);
        
    HookThis((DWORD)&MapCheckerCore20x005E9409);

    Código PHP:
    #include "stdafx.h"
    #include "3DCamera.h"

        
    bool MoveCamera false;
        
    bool InitCamera true;
        
    int MouseXMouseY;
    /*
        //1.07H
        float *Camera_Zoom    = (float*) 0x0061E7B9;//OK
        float *Camera_RotY    = (float*) 0x008D22CC;//OK
        float *Camera_RotZ    = (float*) 0x081772B8;//OK
        float *Camera_PosZ    = (float*) 0x008D1350;//OK
        float *Camera_ClipX   = (float*) 0x008D2194;//OK
        float *Camera_ClipY   = (float*) 0x005C87E9;//OK
        float *Camera_GlClip  = (float*) 0x0070A8AD;//OK

     */
        /*
        //1.05X
        float *Camera_Zoom    = (float*) 0x005EFEC9;//OK
        float *Camera_RotY    = (float*) 0x00825C28;//OK
        float *Camera_RotZ    = (float*) 0x0826030;//OK
        float *Camera_PosZ    = (float*) 0x00824CBC;//OK
        float *Camera_ClipX   = (float*) 0x00825AD8;//OK
        float *Camera_ClipY   = (float*) 0x005A0C7D;//OK
        float *Camera_GlClip  = (float*) 0x005F00B4;//OK
        */
        // ver.1.03K JPN Main.exe Offsets
        
    float *Camera_Zoom    = (float*) 0x006001E9//Default: 35 - zooming in/out (9 times section .text)
        
    float *Camera_RotY    = (float*) 0x0088BC78//Default: -48.5 - rotate up/down (1 time section .rdata)
        
    float *Camera_RotZ    = (float*) 0x0809F150//Default: -45 - rotate left/right (1 time section .data)
        
    float *Camera_PosZ    = (float*) 0x0088ACFC//Default: 150 - additional value for corrent Y rotating (1 time section .rdata)
        
    float *Camera_ClipX   = (float*) 0x0088BB18//Default: 1190 - area filled with textures, x value (1 time section .rdata)
        
    float *Camera_ClipY   = (float*) 0x005AB4CD//Default: 2400- area filled with textures, y value (2 time section .text)
        
    float *Camera_GlClip  = (float*) 0x006D7B35//Default: 3000 - unknown (5 times section .text)

        
    struct CameraStruct {
            
    float Zoom;
            
    float RotY;
            
    float RotZ;
            
    float PosZ;
            
    float ClipX;
            
    float ClipY;
            
    float GlClip;
        } 
    Camera;
        

    BOOL KeyboardSetHook(BOOL set_or_remove){
        if(
    set_or_remove == TRUE){
            if(
    KeyboardHook == NULL){
                
    KeyboardHook SetWindowsHookExA(WH_KEYBOARD, (HOOKPROC)KeyboardProchInstanceGetCurrentThreadId());
                if(!
    KeyboardHook){ return FALSE; }
            }
        } else {
            return 
    UnhookWindowsHookEx(KeyboardHook);
            
    KeyboardHook NULL;
        }
        return 
    TRUE;
    }

    BOOL MouseSetHook(BOOL set_or_remove){
        if(
    set_or_remove == TRUE){
            if(
    MouseHook == NULL){
                
    MouseHook SetWindowsHookExA(WH_MOUSEMouseProchInstanceGetCurrentThreadId());
                if(!
    MouseHook){ return FALSE; }
            }
        } else { return 
    UnhookWindowsHookEx(MouseHook); }
        return 
    TRUE;
    }

    LRESULT CALLBACK KeyboardProc(int nCodeWPARAM wParamLPARAM lParam){    
        if(((
    lParam>>31)&1) && (nCode == HC_ACTION)){
            if(
    wParam == VK_F9){
                *
    Camera_RotY = -48.5;
                *
    Camera_RotZ = -45;
                *
    Camera_PosZ 150;
                *
    Camera_ClipX 1190;
                *
    Camera_ClipY 2400;
                *
    Camera_GlClip 3000;
                *
    Camera_Zoom 35;
            }

            if(
    wParam == VK_F8){
                if(!
    InitCamera)
                { 
    InitCamera true;
                } else {
                
    InitCamera false;
                }
            }

        }    
        return 
    CallNextHookEx(KeyboardHooknCodewParamlParam);
    }

    LRESULT CALLBACK MouseProc(int codeWPARAM wParamLPARAM lParam){
        
    MOUSEHOOKSTRUCTEXmhs = (MOUSEHOOKSTRUCTEX*)lParam;
        
    HWND MuWnd FindWindowA("MU"NULL);
        if(
    GetForegroundWindow() == MuWnd){
            if(
    InitCamera == true){
                
    Camera.ClipX = *Camera_ClipX;
                
    Camera.ClipY = *Camera_ClipY;
                
    Camera.GlClip = *Camera_GlClip;
                
    Camera.PosZ = *Camera_PosZ;
                
    Camera.RotY = *Camera_RotY;
                
    Camera.RotZ = *Camera_RotZ;
                
    Camera.Zoom = *Camera_Zoom;
            }

        if(
    InitCamera == true) {
            
            if(
    wParam == WM_MBUTTONDOWN){
                
    MoveCamera true;
            }

            if(
    wParam == WM_MBUTTONUP){
                
    MoveCamera false;
            }

            if(
    wParam == WM_MOUSEWHEEL){
                
    int direction mhs->mouseData;
                if(
    direction 0){
                    if(*
    Camera_Zoom 60){ *Camera_Zoom += 2; }
                }
                else if(
    direction 0){
                    if(*
    Camera_Zoom 12){ *Camera_Zoom -= 2; }
                }
                *
    Camera_ClipX  1190 + (abs(*Camera_PosZ 150) * 3) + 3000;
                *
    Camera_ClipY  2400 + (abs(*Camera_PosZ 150) * 3) + 3000;
                *
    Camera_GlClip 3000 + (abs(*Camera_PosZ 150) * 3) + 1500;
            }
            else if(
    wParam == WM_MBUTTONDOWN){
                
    MouseX mhs->pt.x;
                
    MouseY mhs->pt.y;
            }

            else if(
    wParam == WM_MOUSEMOVE){
                
                if(
    MoveCamera){
                    if(
    MouseX mhs->pt.x){
                        *
    Camera_RotZ += 8;
                        if (*
    Camera_RotZ 315) *Camera_RotZ = -45;
                    }
                    else if(
    MouseX mhs->pt.x){
                        *
    Camera_RotZ -= 8;
                        if (*
    Camera_RotZ < -405) *Camera_RotZ = -45;
                    }

                    if(
    MouseY mhs->pt.y){
                        if(*
    Camera_RotY < -45){    
                            *
    Camera_PosZ -= 44;
                            *
    Camera_RotY += (float)2.42;
                        }
                    }
                    else if(
    MouseY mhs->pt.y){
                        if(*
    Camera_RotY > -90){
                            *
    Camera_PosZ += 44;
                            *
    Camera_RotY -= (float)2.42;
                        }
                    }

                    
    MouseX mhs->pt.x;
                    
    MouseY mhs->pt.y;


                    *
    Camera_ClipX 1190 + (abs(*Camera_PosZ 150) * 3) + 1500;
                    *
    Camera_ClipY 2400 + (abs(*Camera_PosZ 150) * 3) + 1500;
                    *
    Camera_GlClip 3000 + (abs(*Camera_PosZ 150) * 3) + 1500;
                }

                }
            }
        }
        return 
    CallNextHookEx(MouseHookcodewParamlParam);


  2. O Seguinte Usuário Agradeceu levelx Por este Post Útil:


 

 

Informações de Tópico

Usuários Navegando neste Tópico

Há 1 usuários navegando neste tópico. (0 registrados e 1 visitantes)

Tópicos Similares

  1. |Download| 97d99i 3D Main + Minimap
    Por hidy no fórum Patchs
    Respostas: 11
    Último Post: 14-09-2012, 07:20 PM
  2. |Pedido| Adicionar efeito Fog+Minimap main 1.02c
    Por usabr no fórum Pedidos
    Respostas: 4
    Último Post: 04-09-2012, 05:50 PM
  3. |Atendido| Splash
    Por prosens no fórum Pedidos entregues
    Respostas: 1
    Último Post: 05-05-2012, 06:43 PM
  4. |Pedido| Tutorial de Como Colocar Minimap no Cliente
    Por Mr.TwoHam no fórum Arquivos MuOnline
    Respostas: 0
    Último Post: 17-06-2010, 01:35 PM

Marcadores

Permissões de Postagem

  • Você não pode iniciar novos tópicos
  • Você não pode enviar respostas
  • Você não pode enviar anexos
  • Você não pode editar suas mensagens
  •