Kết quả 1 đến 1 của 1
Chủ đề: [AddOn] MiniMap
-
11-06-16, 07:09 PM #1
- Ngày tham gia
- Sep 2014
- Đang ở
- vndev.games
- Bài viết
- 430
- Thanks
- 91
- Thanked 425 Times in 128 Posts
[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(char* ImagePatch, DWORD 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(FullMapName, 0x7B7A);
return Map;
}
void ChangePath(const char* Map)
{
memset((DWORD*)0xD4A654, 0, 19);
memcpy((DWORD*)0xD4A654, Map, 17);
}
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)MapCheckerCore1, ASM::CALL);
SetOp((LPVOID)oMapCheckerHook2, (LPVOID)MapCheckerCore1, ASM::CALL);
SetOp((LPVOID)oMapCheckerHook3, (LPVOID)MapCheckerCore2, ASM::CALL);
}
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(char* ImagePath, DWORD 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
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é!
-
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ự
-
[TLBB] MiniMap - Kinh Mạch?
Bởi omasa trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 9Bài viết cuối: 31-07-15, 03:54 AM -
Main 1.05D + minimap + 3D
Bởi minhchau0309 trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 1Bài viết cuối: 06-12-11, 09:44 PM -
Add dùm or hướng dẫn add minimap
Bởi doiphieubat trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 0Bài viết cuối: 03-11-10, 12:56 AM -
Main 1.05x + 3D Cam + Minimap
Bởi Alexi_Laiho trong diễn đàn ReleasesTrả lời: 15Bài viết cuối: 11-08-09, 06:26 PM