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!

MINERVA Emulator - Dignity Team - Official

Would you like to keep developing this emulator?


  • Total voters
    62
Status
Not open for further replies.
┌П┐(•_•)┌П┐
Joined
Dec 22, 2009
Messages
958
Reaction score
317
Not long ago, we've decided to close the development on this emulator.
Thank you all for contributions.

Minerva

when this emulator becomes stable, the thread will be updated

This Minerva - CABAL Online Server Emulator, written in C# language. Initially started by The Divinity Project, now being managed by Dignity Team.

Information


  • It's open-source and always will be.
  • It's not a beta. It's something like pre-alpha, buggy, small functionality(yet).
  • Currently Login, Channel(World) and Master(Database/Sync) servers are working.
  • Using MySQL as database. Dropped support for MSSQL.
  • Using EP8 as a base and WILL NOT JUMP to another EP's while work hasn't been done for EP8.
  • As a client, using CABAL EU with v1421 patchedmain to skip login details encryption.
  • Yes, scripting will be available for adding npc's and other functionality. But for the moment, it's not a essential part and won't be targeted.


Client, patch, and other stuff


  • Always use latest commit.
  • Keep your databases up-date to the latest structures in bin/sql directory.



Compatible with


  • .NET Framework 4;
  • MariaDB (you can grab xampp with all required tools here);
  • MySQL 5.x (partially)


  • Why can i not start this?
  • Why can i not connect to the database?
  • How can i run the queries?
  • and the list goes on...


Wiki

Gathering and analysing CABAL Online packets

Before reading further, you must proceed these steps:


  • Know about binary, heximal and decimal numeral systems, and how to convert to one and another;
  • Know about data types in computing systems and their sizes, bit, byte, short, int, long, float, double, etc
  • Have a working CABAL server outside(VM's can do the job), although it is not neccesary if you are going to record packets from official server;
  • Install ;
  • Get Ostara Legacy or Ostara newer;
  • And of course, have a working CABAL client.


Now, first things first:


  • CABAL Network Protocol uses TCP;
  • There are four calls used in packets: REQ, C2S, S2C and NFY;
  • REQ stands for Request, usually when client 'asks' for something, like permission to move, etc;
  • C2S stands for Client 2 Server, when client sends some information, like login details;
  • S2C stands for Server 2 Client, this can be used to verify client, if his C2S packet was right or just sending some information to which client asked for;
  • NFY stands for Notify, this is used to inform all nearby or all channel players about specific action, such as player moves.
  • In Ostara, you might see CSC, which is ClientServerCommunication so either its equal to C2S or S2C.


Okay, so now, we will gonna capture some packets and we will try to analyse them.

Both Ostara versions(legacy and newer) does not harm neither your cabal account, your OS and else. It is not detectable for XTRAP/Gameguad/XignCode3/etc.

Now, launch preferred Ostara version(we gonna use legacy, but in the near future there might be an update for this article with newer Ostara). Also launch CABAL client.

When you are in login screen, select the right network interface to capture in Ostara.

Press green button named 'Start logging' and Ostara should be ready to capture packets. Now, you are ready to log in game.

Yay! Packets showed up. Now, proceed to lobby, select character and log into world.

When you will log in, you will notice a lot of packets showing up, thats good. Green color means that packet is received from the server.

You can also notice on left side from which server packets goes, Login, World, Chat, etc.

Okay, so table list seems to be easily understandable, time, packet size, src, dest ip, ports, and opcode - it is packet description or just id.

Now this is where analysing goes, lets click somewhere on map with mouse, to move our character. Scroll down, and you will see different color packet, with opcode REQ_MoveBegined. Also, you will notice a packet named NFY_MoveBegined, click on both of them, copy heximal data from the bottom of the table list, to your favorite editor, for analysing packets, mine is notepad(cuz it starts fast, unless you will need more power, for searching, then notepad++ or anything else).

While scrolling, you might see packets REQ_MoveEnded00 and NFY_MoveEnded00, copy their data to editor aswell.

Can you see anything familiar? Well, i can see, that every packet starts with E2 B7 - 0xB7E2. It is called a magic code, and it is same for any cabal network packet.

If you would look closer, you would notice that after magic code there is a short 0x0018(for first packet) which converted to decimal would be 24 and this is packet size.

Now, looking at packets, which were sent from client(REQ ones), you will notice a four empty bytes, thats a padding, unused.

Next, there is packet opcode, short 0x00BE for first packet.

What we just did is we discovered a packet structure for client and server packets. Structure never changes, except their data(size, opcode).

Now, data comes up. If you would had opened map, and notice your start x, y coordinates before you move your character, you would notice that on the first packet, the first 4 bytes are 2 shorts, X and Y start position, and after it 4 bytes which are 2 shorts target X and Y.

What is rest? Well you need to test it, move more, change maps, and etc. Seems like if we would skip that 4 bytes(which are X and Y positions probably) and get the last short, it shows that is map id.

First one solved, time for second, NFY packet. Since we already decoded structure, lets skip it. 0x017EA509, strange number, it either can be 2 shorts or one integer... Most likely it is integer. And i will tell you a secret: every NFY packet must contain client id, since this packet is broadcasted to nearby players. So yeah, it is an int, with player id. Next 4 bytes, looks like it is an int, just do not think for a half day, it might be timestamp of when player started moving. Next 4 bytes or 8 bytes... But wait, what i can see? It has a 4 shorts, with same data as MoveBegined packet we decoded earlier as 'start and target position'.

Now, time to analyse that MoveEnded packet. Again, it has a 2 shorts, with same data as in MoveBegined target position.

And last one, Notify MoveEnded packet. Again, we got here target position coordinates.

Well, thats all.

By the way, ALWAYS look at ending and leading zero's, it might tell you which datatype you trying to decode is. To verify what you have decoded, you need to repeat steps(walk, use skill, etc) to receive/send same packets, and check if your decoded structure is right.

Copyright © 2010 The Divinity Project; 2013-2016 Dignity Team.


Content restored for its useful information and thread locked due to project discontinuation- edited by AzureSensei
 
Last edited by a moderator:
Trying to be developer ^^
Member
Joined
Jul 21, 2010
Messages
1,072
Reaction score
358
Code:
/*
 * 정의
 * ====
 * [ ] : 생략가능
 * { } : 세트
 *
 * 패킷 구조
 * ===========================
 * Magic Code(2) + PayLoad Len(2) + [ CheckSum(4) ] + PayLoad(*)
 * ------------------------------   ---------------   ----------
 *              Header                  CheckSum         Body
 *
 * Magic Code
 * ==========
 * 0xB7D9 + version(x)
 *
 * PayLoad Len
 * ===========
 * 헤더 크기 포함 (중요)
 *
 * PayLoad
 * =======
 * Main Command(1) + [ Main Command Extend(2) ] + Description
 *
 * C - > S
 * =======
 * PLL : 2 byte ( Header Len : 4 byte )
 *
 * S -> C
 * ======
 * PLL : 2 byte ( Header Len : 4 byte )
 *
 * 인코딩 방법
 * ===========
 * C -> S
 * 키 테이블을 참조하여 계속 변형시킴 ( CRC 와 비슷한 방법 )
 * S -> C
 * 정해진 동일키 사용
 *
 * 정책
 * ====
 * 비교문보다는 코드가 커지는 것을 선택함
 * Byte Align
 *
 *
 */
 
Junior Spellweaver
Joined
Jan 16, 2014
Messages
150
Reaction score
189
You should definitely use the newer Ostara and avoid using the old (legacy) version. The old version has some serious bugs in it, which the new one fixes. The newer version also adds a way of documenting your packet structures, and makes it really easy to share these files.
You can get the source code here:
 
Joined
Mar 31, 2007
Messages
31
Reaction score
23
I was studying a little about the C # language in the past month, be able to make some packages catches , and modify some things .
I am very glad to see you have created a new team to develop this tool.

some images when I was testing and trying to develop it.


 
Joined
Mar 21, 2014
Messages
74
Reaction score
4
I was studying a little about the C # language in the past month, be able to make some packages catches , and modify some things .
I am very glad to see you have created a new team to develop this tool.

some images when I was testing and trying to develop it.


Nicely done. Any intentions on releasing it in public?
 
Initiate Mage
Joined
Jul 18, 2012
Messages
42
Reaction score
59
Just a quick update, if some1 doesn't follow repo ;p
since this , patchedmain is removed, and won't be used anymore. Other clients(TGCabal and other EP8's clients) should work, but not tested.

Also, we might switch to EP14 soon.
 
Initiate Mage
Joined
Jul 18, 2012
Messages
42
Reaction score
59
There will be a wiki page of how to launch Minerva soon. As for client, the only thing you need is to download it, and put internal.txt file in Data folder. That's it, you can even use a launcher and start the game.
 
Banned
Banned
Joined
Aug 2, 2011
Messages
1,427
Reaction score
979
There will be a wiki page of how to launch Minerva soon. As for client, the only thing you need is to download it, and put internal.txt file in Data folder. That's it, you can even use a launcher and start the game.

and where Server File for Support EP14
 
Joined
Mar 21, 2014
Messages
74
Reaction score
4
There will be a wiki page of how to launch Minerva soon. As for client, the only thing you need is to download it, and put internal.txt file in Data folder. That's it, you can even use a launcher and start the game.

Great, thanks alot.

Could you also upload the pre-compiled bin with the internal.txt?
 
Status
Not open for further replies.
Back
Top