Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Adding new maps to GameServer (1.00.18)

Newbie Spellweaver
Joined
Jan 22, 2008
Messages
37
Reaction score
66
Re: [Guide] Adding new maps to GameServer (1.00.18)

why are you giving when it compiles?

error C3861: 'LoadMap': identifier not found
error C2061: syntax error : identifier 'DWORD'
 
Initiate Mage
Joined
Dec 12, 2008
Messages
4
Reaction score
0
Re: [Guide] Adding new maps to GameServer (1.00.18)

@pegasus128

why are you giving when it compiles?

error C3861: 'LoadMap': identifier not found
error C2061: syntax error : identifier 'DWORD

=============================================

You have to do so

mapas.h

PHP:
# include <stdio.h>
# include <windows.h>

void LoadMaps ();
void LoadMap  (char * mapname, DWORD mapnr);

and mapas.cpp

PHP:
# include "mapas.h"

void LoadMaps ()
{
LoadMap ("..\\ Data\\Terrain41.att", 40);
LoadMap ("..\\ Data\\Terrain42.att", 41);
}

__declspec (naked) void LoadMap (char * mapname, DWORD mapnr)
{
_asm
{
PUSH EBP
MOV EBP, ESP
SUB ESP, 4
MOV ECX, mapnr
IMUL ECX, ECX, 0x51068
ADD ECX, 0x9FF4BD0
MOV EDX, 0x403A6C
CALL EDX

MOV EAX, mapname
PUSH EAX
MOV ECX, mapnr
IMUL ECX, ECX, 0x51068
ADD ECX, 0x9FF4BD0
MOV EDX, 0x403698
CALL EDX

MOV ESP, EBP
POP EBP
RETN
}
}
 
Last edited:
Newbie Spellweaver
Joined
Jun 6, 2008
Messages
71
Reaction score
8
Re: [Guide] Adding new maps to GameServer (1.00.18)

Delete this line: LoadMap void (char * mapname, DWORD mapnr); and it will work, but it's a bad method to do this.
 
Joined
Jun 17, 2009
Messages
2
Reaction score
0
Re: [Guide] Adding new maps to GameServer (1.00.18)

Nice job, DMCahir.
But I think it will occur some problems
With GS 1.00.18:
0x9FF4BD0 is the BASE Offset of MapArray
The default Max number of Map is 0x28
The Map size is 0x51068
The BASE Dir Offset is 0xAC9DC10
You can see: 0x9FF4BD0 + 0x28 * 0x51068 = 0xAC9DC10
So, If we increase the Max number (sample to: 0x33), and after _asm code execute, the memory of MapArray overwrite the value at offset 0xAC9DC10, or if some thing done by GameServer orverwrite the memory of Map number 0x29 ect...
I think some problem will occur!
 
Newbie Spellweaver
Joined
Nov 2, 2007
Messages
51
Reaction score
7
Hello, I have a question

First: how to do this? "We Must call to make Our ​​DLL. The best place is GameMainInit function"

Second: If I create a. dll with the given source, it compiled and hook it works?

Greetings..
 
Newbie Spellweaver
Joined
May 2, 2014
Messages
67
Reaction score
5
someone could be so kind as to do the same guide for versions 97d or 97 + 99

thank you very much
 
Newbie Spellweaver
Joined
May 26, 2012
Messages
24
Reaction score
5
Para la 97D

#include "mapas.h"

CHAR MapBuff[21][15] = {
"Terrain1.att",
"Terrain2.att",
"Terrain3.att",
"Terrain4.att",
"Terrain5.att",
"Terrain6.att",
"Terrain7.att",
"Terrain8.att",
"Terrain9.att",
"Terrain10.att",
"Terrain11.att",
"Terrain12.att",
"Terrain17.att",
"Terrain18.att",
"Terrain19.att",
"Terrain20.att",
"Terrain21.att",
};

void MapLoad()
{
for(int i=0;i<0x15;i++)
{
_asm
{
Mov Ecx, i
Imul Ecx, Ecx, 0x4DB68
Add Ecx, 0x6354C78
Mov Eax, 0x00402225
Call Eax
Mov Eax, i
Push Eax
Mov Ecx, i
Imul Ecx, Ecx, 0FH
Add Ecx, offset MapBuff
Push Ecx
Mov Ecx, 0x0687DE60
Mov Eax, 0x00401A7D
Call Eax
Push Eax
Mov Ecx, i
Imul Ecx, Ecx, 0x4DB68
Add Ecx, 0x6354C78
Mov Eax, 0x00401FC3
Call Eax
}
}
}






//LoadMaps 100%
SetByte(0x00489424,0x15);
SetByte(0x0048948F,0x15);
SetByte(0x0047C7D4,0x15);
SetByte(0x0047334E,0x15);
SetByte(0x0047C499,0x15);
SetByte(0x0047C7D4,0x15);
SetByte(0x0047C7FE,0x15);
SetByte(0x0045D153,0x15);
SetByte(0x00443782,0x14);
SetByte(0x00497B30,0x14);
SetByte(0x00497C00,0x14);
SetByte(0x0045C620,0x14);
SetByte(0x0045C77B,0x14);
SetByte(0x0045BA63,0x14);
*(DWORD*)(0x004D0A00) = (DWORD)&MapLoad;
 
Back
Top