here are good offsets for 1.04D (searched by chris05 or me, i dont remember who post first):
Quote:
int *MainState = (int*)0x00E609E8; //1.04D ok
int *Map = (int*)0x00E61E18; //1.0D ok
Printable View
thank for aecrimch, I added but still do not work :( . this is my code you can fix me ? : source code
thank you verry much !
ps: google translate
here it is: project_minimap_104D.rar - 4shared.com - обмен, хранение, загрузка файлов
added karutan maps too, in source and map1.ozj
http://i297.photobucket.com/albums/m...16_57-0000.jpghttp://i297.photobucket.com/albums/m...16_57-0001.jpg
thank you aecrimch very much ^^!.
minimap src must be re-structed for example this:
Code:void MiniLoad(){
int Map;
char FullMapName[200];
Map = *(unsigned char*)0x00E61E18;
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)
{
sprintf_s(FullMapName,"World%d\\Map1.jpg",Map+1);
*(BYTE*)(0x0087E119) = 0xEB;
memcpy((DWORD*)0xD30008,FullMapName,17);
}
else if( Map == 77 || Map == 78)
{
*(BYTE*)(0x00886B94) = 0x75;
}
else
{
*(BYTE*)(0x00886B94) = 0x75;
}
if( Map == 12 || Map == 13 || Map == 14 || Map == 15 || Map == 16 || Map == 17 || Map == 18 ||
Map == 19 || Map == 20 || Map == 21 || Map == 22 || Map == 23)
{
IsMiniMap = 0;
}
else
{
IsMiniMap = 1;
}
}
Another good option would be to do the same work as sobieh made in older versions of old: AriethMu, with radar minimap custom style, or as I did in: Kalimdor Project V2, for: 0.99B+, but is more difficult to find offsets functions needed in this version of main.exe
mauro07 not work
Minimap.h
Minimap.cppQuote:
#include "stdafx.h"
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string>
char * GetMap(int map);
void MiniMap();
main.cppQuote:
#include "Stdafx.h"
#include "Minimap.h"
void HookExactOffset(DWORD my, DWORD tohook, BYTE type)
{
*(BYTE*)tohook = type;
*(DWORD*)(tohook+1) = my;
}
void HookThis(DWORD dwMyFuncOffset,DWORD dwJmpOffset)
{
*(DWORD*)(dwJmpOffset+1)=dwMyFuncOffset-(dwJmpOffset+5);
}
void ChangePath(const char* Map, ...)
{
memcpy((DWORD*)0xD4A654,Map,17);//good
HookExactOffset(0xD4A654,0x00888C0A,0x68);//good
}
void LoadImageJpgForMap(char* ImagePatch, DWORD PrintCode)
{
_asm
{
Mov Edi, 0x007721E0//good
Push 0x1
Push 0x2900
Push 0x2601
Push 0x7B7A
Push 0xD4A654//good
Call Edi
Add Esp,0x18
}
}
int LoadMap(int Map)
{
char FullMapName[200];
sprintf_s(FullMapName,"World%d\\Map1.jpg",Map+1);
ChangePath(FullMapName);
LoadImageJpgForMap(FullMapName, 0x7B7A);
return Map;
}
bool MapChecker1(int Map)
{
if( Map == 0 || Map == 1 || Map == 2 || Map == 3 || Map == 4 || Map == 6 || Map == 7 || Map == 8 ||
Map == 10 || Map == 24 || Map == 30 || Map == 31 || Map == 33 || Map == 34 || Map == 37 || Map == 38 ||
Map == 41 || Map == 42 || Map == 51 || Map == 52 || Map == 57 || Map == 63 || Map == 80 || Map == 81)
{
return 1;
}
return 0;
}
char FullMapName[200];
void MapChecker2(int Map)
{
if( Map == 0 || Map == 1 || Map == 2 || Map == 3 || Map == 4 || Map == 6 || Map == 7 || Map == 8 ||
Map == 10 || Map == 24 || Map == 30 || Map == 31 || Map == 33 || Map == 34 || Map == 37 || Map == 38 ||
Map == 41 || Map == 42 || Map == 51 || Map == 52 || Map == 57 || Map == 63 || Map == 80 || Map == 81)
{
LoadMap(Map);
_asm
{
MOV EDI, 0x00860FC0
CALL EDI
MOV ECX,EAX
MOV EDI, 0x008615F0
CALL EDI
MOV ECX,EAX
MOV EDI, 0x00886C20
CALL EDI
}
Sleep(100);
}
else if( Map == 77 || Map == 78)
{
*(BYTE*)(0x00886B94) = 0x75;
}
else
{
*(BYTE*)(0x00886B94) = 0x75;
}
}
void MiniLoad()
{
int Map;
char FullMapName[200];
Map = *(unsigned char*)0x00E61E18;
if( Map == 0 || Map == 1 || Map == 2 || Map == 3 || Map == 4 || Map == 6 || Map == 7 || Map == 8 ||
Map == 10 || Map == 24 || Map == 30 || Map == 31 || Map == 33 || Map == 34 || Map == 37 || Map == 38 ||
Map == 41 || Map == 42 || Map == 51 || Map == 52 || Map == 56 || Map == 57 || Map == 63 || Map == 80 || Map == 81)
{
sprintf_s(FullMapName,"World%d\\Map1.jpg",Map+1);
*(BYTE*)(0x0087E119) = 0xEB;
memcpy((DWORD*)0xD30008,FullMapName,17);
}
else if( Map == 77 || Map == 78)
{
*(BYTE*)(0x00886B94) = 0x75;
}
else
{
*(BYTE*)(0x00886B94) = 0x75;
}
if( Map == 12 || Map == 13 || Map == 14 || Map == 15 || Map == 16 || Map == 17 || Map == 18 ||
Map == 19 || Map == 20 || Map == 21 || Map == 22 || Map == 23)
{
int IsMiniMap = 0;
}
else
{
int IsMiniMap = 1;
}
}
void MiniMap()
{
*(BYTE*)(0x007D3B7B) = 0x90;
*(BYTE*)(0x007D3B7B+1) = 0x90;
HookThis((DWORD)&MapChecker1, 0x00886B87);
HookThis((DWORD)&MapChecker2, 0x0062EB3D);
}
Quote:
#include <windows.h>
#include "Minimap.h"
int *MAP_CHECK = (int*)0x00E61E18; //1.04D
int *MAIN_STATE = (int*)0x00E609E8; //1.04D
int IsMiniMap = GetPrivateProfileIntA("TuyChinh","Bat_Tat_MiniMap",1,"./config.ini");
BOOL APIENTRY DllMain(HINSTANCE hDll, DWORD callReason, LPVOID lpReserved) {
if(callReason == DLL_PROCESS_ATTACH){
if(IsMiniMap == 1 )
{
MiniMap();
}
}
This is my design for Minimap src in my new project called: "GameEngine":
Minimap src part of: GameEngine.cpp
Minimap src part of GameEngine.hCode:#include "GameEngine.h"
int IsMiniMap = GetPrivateProfileIntA("Engine","MiniMap",0,".\\Engine.ini");
void HookExactOffset(DWORD my, DWORD tohook, BYTE type)
{
*(BYTE*)tohook = type;
*(DWORD*)(tohook+1) = my;
}
void HookThis(DWORD dwMyFuncOffset,DWORD dwJmpOffset)
{
*(DWORD*)(dwJmpOffset+1)=dwMyFuncOffset-(dwJmpOffset+5);
}
void ChangePath(const char* Map, ...)
{
memcpy((DWORD*)0xD4A654,Map,17);
HookExactOffset(0xD4A654,0x00888C0A,0x68);
}
void LoadImageJpgForMap(char* ImagePatch, DWORD PrintCode)
{
_asm
{
Mov Edi,0x007721E0
Push 0x1
Push 0x2900
Push 0x2601
Push 0x7B7A
Push 0xD4A654
Call Edi
Add Esp,0x18
}
}
int LoadMap(int Map)
{
char FullMapName[200];
sprintf_s(FullMapName,"World%d\\Map1.jpg",Map+1);
ChangePath(FullMapName);
LoadImageJpgForMap(FullMapName, 0x7B7A);
return Map;
}
bool MapChecker1(int Map)
{
if(IsMiniMap == 0)
{
return 0;
}
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 || Map == 64 || Map == 65 ||
Map == 80 || Map == 81)
{
return 1;
}
return 0;
}
char FullMapName[200];
void MapChecker2(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 || Map == 64 || Map == 65 ||
Map == 80 || Map == 81)
{
LoadMap(Map);
_asm
{
MOV EDI, 0x00860FC0
CALL EDI
MOV ECX,EAX
MOV EDI, 0x008615F0
CALL EDI
MOV ECX,EAX
MOV EDI, 0x00886C20
CALL EDI
}
Sleep(100);
}
else if( Map == 77 || Map == 78)
{
*(BYTE*)(0x00886B94) = 0x75;
}
else
{
*(BYTE*)(0x00886B94) = 0x75;
}
}
void MiniLoad()
{
int Map;
char FullMapName[200];
Map = *(unsigned char*)0x00E61E18;
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)
{
sprintf_s(FullMapName,"World%d\\Map1.jpg",Map+1);
*(BYTE*)(0x0087E119) = 0xEB;
memcpy((DWORD*)0xD30008,FullMapName,17);
}
else if( Map == 77 || Map == 78)
{
*(BYTE*)(0x00886B94) = 0x75;
}
else
{
*(BYTE*)(0x00886B94) = 0x75;
}
if( Map == 12 || Map == 13 || Map == 14 || Map == 15 || Map == 16 || Map == 17 || Map == 18 ||
Map == 19 || Map == 20 || Map == 21 || Map == 22 || Map == 23)
{
IsMiniMap = 0;
}
else
{
IsMiniMap = 1;
}
}
void MiniMap()
{
*(BYTE*)(0x007D3B7B) = 0x90;
*(BYTE*)(0x007D3B7B+1) = 0x90;
HookThis((DWORD)&MapChecker1, 0x00886B87);
HookThis((DWORD)&MapChecker2, 0x0062EB3D);
}
extern "C" _declspec(dllexport) void Init()
{
DWORD OldProtect;
if(VirtualProtect(LPVOID(0x401000),0x00A60F74,PAGE_EXECUTE_READWRITE,&OldProtect))
{
MiniMap();
}
else
{
MessageBoxA(NULL,"Cannot load GameEngine.dll","Error",MB_OK);
ExitProcess(0);
}
}
Code:#pragma once
#include <stdio.h>
#include <math.h>
#include <windows.h>
#include <process.h>
int LoadMap(int Map);
int GetMap();
bool MapChecker1(int Map);
void MapChecker2(int Map);
void LoadImageJpgForMap(char* ImagePatch,DWORD PrintCode);
void MiniMap();
mauro07 not work
:D
Each BC 1 -> 8
Including MAP 20 -> 24 (CC) OK
newpsp88: For me, my source code: GameEngine, works perfectly... I upload some pictures later in the game, to show that it works effectively.
PS: A clear exception, the BloodCastle 8, for that reason that I decided to remove the minimap of all maps that are of Events.
Look this section of my code:
Code:if( Map == 12 || Map == 13 || Map == 14 || Map == 15 || Map == 16 || Map == 17 ||
Map == 18 || Map == 19 || Map == 20 || Map == 21 || Map == 22 || Map == 23)
{
IsMiniMap = 0;
}
else
{
IsMiniMap = 1;
}
minimap is in trouble when you go every Blood Castle..:(
it seems is a lack of code...
original vcorp minimap:
i think one of the bold line is responsible with Blood Castle map (do not know which and i do not have main.exe for this source to compare offsets...)Quote:
void MiniMap()
{
*(BYTE*)(0x60D907) = 0x90;
*(BYTE*)(0x60D907+1) = 0x90;
*(DWORD*)(0x6D4E9A+1) = (DWORD)MapChecker1 - 0x6D4E9F;
*(DWORD*)(0x723CD3+1) = (DWORD)MapChecker1 - 0x723CD8;
*(DWORD*)(0x5E296A+1) = (DWORD)MapChecker2 - 0x5E296F;
}
mauro07,
none of your solution can not solve problem, because you do not usefunction anywhere...!!Quote:
MiniLoad()
trying something like this:
but unsuccessful :((Quote:
void checkmapload()
{
if (IsMiniMap == 1)
{
if (*MAP_CHECK != 0xC || *MAP_CHECK != 0xD || *MAP_CHECK != 0xE || *MAP_CHECK != 0xF || *MAP_CHECK != 0x10 || *MAP_CHECK != 0x11 || *MAP_CHECK != 0x34)
{
MiniMap();
}
}
}
yes, is true... vcorp original code use: 2 hooks for the function of: TAB switcher in: MapChecker1... but.. dosn't necesseary compare nothing... is only make 1 research, the vcorp src is for: 1.03g main.exe version, I have too (complete src), but I don't know that protocol: KOR or JPN... because all main.exe of series: 1.03 of KOREA, are: Season 2 and.. in: S2 not exist: Vulcanus Map, and this src of vcorp have Vulcanus in a case for minimap xD is really confused, but if this main.exe is: 1.03 of: JPN Protocol, then all have more logic... JPN 1.03 Series are: Season 4 xD.