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:
minimap.cppCó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 hWnd, COLORREF cr, BYTE bAlpha, DWORD 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 hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
static CSplash * spl = NULL;
if(uMsg == WM_CREATE)
{
spl = (CSplash*)((LPCREATESTRUCT)lParam)->lpCreateParams;
}
if(spl)
return spl->WindowProc(hwnd, uMsg, wParam, lParam);
else
return DefWindowProc (hwnd, uMsg, wParam, lParam);
}
LRESULT CALLBACK CSplash::WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
// We need to handle on the WM_PAINT message
switch(uMsg)
{
HANDLE_MSG(hwnd, WM_PAINT, OnPaint);
}
return DefWindowProc (hwnd, uMsg, wParam, lParam) ;
}
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(hMemDC, m_hBitmap);
BitBlt(hDC, 0, 0, m_dwWidth, m_dwHeight, hMemDC, 0, 0, SRCCOPY);
::SelectObject(hMemDC, hOldBmp);
::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 lpszFileName, COLORREF 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 = ::LoadCursor( NULL, IDC_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_TOOLWINDOW, m_lpszClassName,
TEXT("Banner"), WS_POPUP, x, y,
m_dwWidth, m_dwHeight, NULL, NULL, NULL, this);
// =======================================================================
// Display the window
// =======================================================================
if(m_hwnd)
{
MakeTransparent();
ShowWindow (m_hwnd, SW_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 (&msg, NULL, 0, 0))
{
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(0, lpszFileName, IMAGE_BITMAP, 0, 0, LR_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(hBitmap, sizeof(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_hwnd, GWL_EXSTYLE, GetWindowLong(m_hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
// call it with 0 alpha for the given color
g_pSetLayeredWindowAttributes(m_hwnd, m_colTrans, 0, LWA_COLORKEY);
}
return TRUE;
}
Código PHP:
#include "stdafx.h"
#include "CustomMain.h"
#include "Minimap.h"
void LoadImageJgpForMap(char* ImagePatch, DWORD PrintCode)
{
_asm
{
Mov Edi, Main_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(FullMapName, 0x7B69);
return Map;
}
void ChangePath(const char* Map)
{
memcpy((DWORD*)0x8DC270,Map,17);
}
bool MapCheckerCore1(int Map)
{
if( Map == 0 || Map == 1 || Map == 2 || Map == 3 || Map == 4 || Map == 7 || Map == 8 ||
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 == 0 || Map == 1 || Map == 2 || Map == 3 || Map == 4 || Map == 7 || Map == 8 ||
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 EDI, 0x007747FF
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)&MapCheckerCore1, 0x006DE41A);
HookThis((DWORD)&MapCheckerCore2, 0x005E9409);
}
Código PHP:
#include "stdafx.h"
#include "3DCamera.h"
bool MoveCamera = false;
bool InitCamera = true;
int MouseX, MouseY;
/*
//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)KeyboardProc, hInstance, GetCurrentThreadId());
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_MOUSE, MouseProc, hInstance, GetCurrentThreadId());
if(!MouseHook){ return FALSE; }
}
} else { return UnhookWindowsHookEx(MouseHook); }
return TRUE;
}
LRESULT CALLBACK KeyboardProc(int nCode, WPARAM wParam, LPARAM 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(KeyboardHook, nCode, wParam, lParam);
}
LRESULT CALLBACK MouseProc(int code, WPARAM wParam, LPARAM lParam){
MOUSEHOOKSTRUCTEX* mhs = (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(MouseHook, code, wParam, lParam);
}
Qual versão do main?
os offsets do minimap e a base sao para 103k jpn mais tem offsets de outros main ai tbm para teste.
Se tiver como posta esse main
Última edição por levelx; 15-11-2010 às 01:21 PM.
Splash testado e aprovado 100% funcionando
levelx o Main 1.03K Bom de mais para ser trabalhar nele
Mais pra frente vou fazer um Cliente 1.03K Usando essa source tbm ;D
3D Testado 100%
todos os main sao bons de se trabalhar, somente ter paciencia e etc todos sao bomnzinhux
Há 1 usuários navegando neste tópico. (0 registrados e 1 visitantes)
Marcadores