![]() |
|
|
#1 | |
|
Архивный участник
Join Date: May 2005
Posts: 367
|
i found something in a forum you devs should look at it
Quote:
Code:
/*
MAP GENERATOR V1.0
Coded by: Torune(torune at gmail dot com)
*/
#include <iostream.h>
#include <fstream.h>
#include <stdio.h>
int main () {
int MAP_HEIGHT[] = {
//38-3F
(0xE318E318), (0xE46DE46D), (0xE5C2E5C2), (0xE717E717),
(0xE86CE86C), (0xE9C1E9C1), (0xEB16EB16), (0xec6bec6b),
//40-4f
(0xedc0edc0), (0xef15ef15), (0xf06af06a), (0xf1bff1bf),
(0xf314f314), (0xf469f469), (0xf5bef5be), (0xf713f713),
(0xf868f868), (0xf9bdf9bd), (0xfb12fb12), (0xfc67fc67),
(0xfdbcfdbc), (0xff11ff11), (0x00670067), (0x01bc01bc),
//50-5f
(0x03110311), (0x04660466), (0x05bb05bb), (0x07100710),
(0x08650865), (0x09ba09ba), (0x0b0f0b0f), (0x0c640c64),
(0x0db90db9), (0x0f0e0f0e), (0x10631063), (0x11b811b8),
(0x130d130d), (0x14621462), (0x15b715b7), (0x170c170c),
//60-6f
(0x18611861), (0x19b619b6), (0x1b0b1b0b), (0x1c601c60),
(0x1db51db5), (0x1f0a1f0a), (0x205f205f), (0x21b421b4),
(0x23092309), (0x245e245e), (0x25b325b3), (0x27082708),
(0x285d285d), (0x29b229b2), (0x2b072b07), (0x2c5c2c5c),
//70-7f
(0x2db12db1), (0x2f062f06), (0x305b305b), (0x31b031b0),
(0x33053305), (0x345a345a), (0x35af35af), (0x37043704),
(0x38593859), (0x39ae39ae), (0x3b033b03), (0x3c583c58),
(0x3dad3dad), (0x3f023f02), (0x40574057), (0x41ac41ac),
//80-8f
(0x43014301), (0x44564456), (0x45ab45ab), (0x47004700),
(0x48554855), (0x49aa49aa), (0x4aff4aff), (0x4c544c54),
(0x4da94da9), (0x4efe4efe), (0x50535053), (0x51a851a8),
(0x52fd52fd), (0x54525452), (0x55a755a7), (0x56fc56fc),
//90-9f
(0x58515851), (0x59a659a6), (0x5afb5afb), (0x5c505c50),
(0x5da55da5), (0x5efa5efa), (0x604f604f), (0x61a461a4),
(0x62f962f9), (0x644e644e), (0x65a365a3), (0x66f866f8),
(0x684d684d), (0x69a269a2), (0x6af76af7), (0x6c4c6c4c),
//a0-a5
(0x6da16da1), (0x6ef66ef6), (0x704b704b), (0x71a071a0),
(0x72F572F5), (0x744A744A)
**;
int RGB[] = {//0x3
(0x38), (0x39), (0x3a), (0x3b), (0x3C), (0x3D), (0x3E), (0x3F),
//0x4
(0x40), (0x41), (0x42), (0x43), (0x44), (0x45), (0x46), (0x47),
(0x48), (0x49), (0x4a), (0x4b), (0x4c), (0x4d), (0x4e), (0x4f),
//0x5
(0x50), (0x51), (0x52), (0x53), (0x54), (0x55), (0x56), (0x57),
(0x58), (0x59), (0x5a), (0x5b), (0x5c), (0x5d), (0x5e), (0x5f),
//0x6
(0x60), (0x61), (0x62), (0x63), (0x64), (0x65), (0x66), (0x67),
(0x68), (0x69), (0x6a), (0x6b), (0x6c), (0x6d), (0x6e), (0x6f),
//0x7
(0x70), (0x71), (0x72), (0x73), (0x74), (0x75), (0x76), (0x77),
(0x78), (0x79), (0x7a), (0x7b), (0x7c), (0x7d), (0x7e), (0x7f),
//0x8
(0x80), (0x81), (0x82), (0x83), (0x84), (0x85), (0x86), (0x87),
(0x88), (0x89), (0x8a), (0x8b), (0x8c), (0x8d), (0x8e), (0x8f),
//0x9
(0x90), (0x91), (0x92), (0x93), (0x94), (0x95), (0x96), (0x97),
(0x98), (0x99), (0x9a), (0x9b), (0x9c), (0x9d), (0x9e), (0x9f),
//0xA
(0xa0), (0xa1), (0xa2), (0xa3), (0xa4), (0xa5)
**;
char BREAK = '00';
char MAP_HEAD[] = { 22, 25, 128**;
char MAP_NAME[] = "output_conv.dat";
int HEADER[] = {0x00001000,0x00,0x00000100,0x00000100**;
int count = 0,ch;
char BmpFile[256] = "lineage2.bmp";
ifstream fin(BmpFile, ios::binary);
ofstream fout(MAP_NAME, ios::binary);
cout << "\n\n\t MAP GENERATOR V1.0\n";
cout << "\t Coded by: Torune\n\n";
fout.write((&MAP_HEAD));
fout.write((&HEADER));
while (!fin.eof()) {
ch = fin.get();
fin.get();
fin.get();
for (int i = 0; i < 110; i++){
if (ch == RGB[i]){
fout.write((&BREAK));
fout.write((&MAP_HEIGHT[i]));
fout.write((&BREAK));
**
**
**
fout.close();
return 0;
**
|
|
|
|
|
|
#2 |
|
Архивный участник
Join Date: Mar 2005
Posts: 40
|
can u post the link where u get that?
i guess i can code it to finish the geodata stuff |
|
|
|
|
#3 |
|
Архивный участник
Join Date: May 2005
Posts: 367
|
this is the full post i didnt want to paste the other forum
|
|
|
|
|
#4 |
|
Архивный участник
Join Date: Mar 2005
Posts: 40
|
so please add me in yahoo messegner rodo_beban tnx.
|
|
|
|
|
#5 |
|
Архивный участник
Join Date: Mar 2005
Posts: 77
|
It is from ragezone but it isn't complete code, only the idea. And seems - it is wrong idea
There are a lot of bugs here and seems every piece of MAP_HEIGHT data should be tested in real location. For example I think nodes (six bytes like 0x00 00 C0 ED C0 ED) have zero 3rd byte for positive values and 3rd byte is equal to 5th if negative value.
|
|
|
|
|
#6 |
|
Архивный участник
Join Date: Mar 2005
Posts: 280
|
actually that code is what is used in the C2 Geodata thread - its from a chinese forum and uses a so called "blank" or "fake" header which basicly makes the l2server bypass it :P
At least this is how i got it explained |
|
|
|
|
#7 |
|
Архивный участник
Join Date: Mar 2005
Posts: 77
|
Not really bypassed. There are a few REAL locations in C1 server with the same size (385k) and format and with different hieght, few underwater locations. And you can really walk on it.
|
|
|
|
|
#8 |
|
Архивный участник
Join Date: Mar 2005
Posts: 280
|
just like l2j :-)
Im talking about the header.. |
|
|
|
|
#9 |
|
Архивный участник
Join Date: Mar 2005
Posts: 77
|
Do you know right header fr C2 off?
|
|
|
|
|
#10 |
|
Архивный участник
Join Date: Mar 2005
Posts: 280
|
The header isnt related to C2 offi, its simply C1 server..
Anywho - seems like another guy beat me to it in another post ![]() Since i only know 90% of the correct headers, still having issues with a 4byte one. |
|
|
|
|
#11 |
|
Архивный участник
Join Date: Apr 2005
Posts: 306
|
some hints , bad transalation from a sina forum
The map document geodata/xxxxx.dat knowledge first said some, my time is also insufficient. First said increase map question. This estimate has the very many people all should clear, I first said for person which does not know. Each map dat document all has the symbol, first said each map dat document the first line. Certainly is not says simple trades the document name may use. Entire DATA document all codes must have to let SERVER approve. Otherwise the speech then is unable to read. We first have a look each DATA document the first line. Everybody may use one tool software UE opens the document then has a look inside the code first line. Note: The map dat document opens after UE demonstrates is 16 enters the system number, therefore the greatly home use computer transforms then may know this map the accurate document name When we use UE to open this document,22_24_conv.dat (I say main, other later will be saying belt institutional records of a reign exited) first line of 1618............................................. we has a look, first turned on the calculator, then carried on this number 16 enters makes -->10 enters the system. We then may discover, 16--->22 18--->24 that this map then is 22_24_conv.dat this the thing which begins two rights and wrongs often important this then SERVER must read takes, also is the thing which must confirm. Everybody may each document open has a look, whether and I did say same. Greatly home use 16 enters the system transfers 10 enters the system has a look. If this map opening two characters are 1618. Then he then is belongs 22_24_conv.dat regardless of does join INDEX you how revision duplication same document to GEODATA under the navigation also is does not have usefully. Because he reads takes or 22_24_conv.dat everybody may own begin to have a look. Good I had first to exit, everybody played happy ~original: 地图文件geodata/xxxxx.dat小知识 先说一些吧,我时间也不够。 首先说说加载地图的问题。 这个估计有很多人都应该清楚的,我å… ˆ说说给不知道的人。 每个地图dat文件都有标志,先说说每ä¸ ª地图dat文件的第一行吧。 并不是说简单的换换文件名就可以用çš „。整个DATA文件的所有代码必须要让SER VER认可。不然的话便无法读过。我们å… ˆ看看每个DATA文件的第一行吧。 大家可以使用一个工具软件UE打开文件 然后看看里面的代码第一行。 注:地图dat文件用UE打开后显示的是16è ¿›制数,所以大家用计算机转换一下便 可知道这个地图的的准确文件名:) 当我们用UE打开这个文件,22_24_conv.dat( 我说点主要的,其他的以后在说吧带ä¼ š要出去了) 第一行 16 18 ............................................. 我们来看看,先打开计算器,然后把è¿ ™数进行16进制-->10进制。 我们便可以发现, 16--->22 18--->24 那么这个地图便是22_24_conv.dat 这个开头两个是非常重要的这便SERVERè¦ �读取的东西,也是要确认的东西。大å ®¶可以每个文件都打开来看看,是否和 我说的一样的。大家用16进制转为10进å ˆ¶看看。 如果这个地图的开头两个字是 16 18。。。。。。。。。 那么他便是属于22_24_conv.dat 无论你如何的修改复制相同的文件到GE ODATA下加入INDEX的导航也是没有用的。 因为他读取的还是22_24_conv.dat 大家可以自己动手去看看。好了我要å… ˆ出去了,大家玩的愉快~ |
|
|
|
|