Thursday, February 27, 2014

Lineage 1 Server Stuff

Been trying to get this to work. Spent most of yesterday. Built the server from the trunk.

But I keep getting the version mismatch error.

Figured out that you have to change the FIRST_PACKET to the 2.70C one and then Mac Crack of Time will be happy. This is the key packet that is sent by Lineage15. They send the version packet 0x32, not 0x7D. At least that's what it appears. Weird.

I also noticed there is a Tikal Antharas server project on github by uglyoldbob and specialdarkwolf. Uglyoldbob is who runs Doors Software and has made a special Mac client that supposedly lets you run the Mac version on Intel, though I couldn't get it to even get me to the login screen on most attempts.

It could have been my router setup since I had ports 2000 & 2001 directing to my computer, maybe that was messing things up. Or maybe there are other ports that need to be configured.

I think uglyoldbob is the same dude who runs the Frisky Cow private server, but I'm not 100% sure.

I suspect my issues relate to There are various versions with the different FIRST_PACKETs. I found this one too that has a different one, on the Google Code site. It later gets updated to something newer. It also mentions a 3.2 English Version check and has an "Opcodes.S_OPCODE_INITPACKET" value inserted there, something that's not in the milestone build! This is DarkWolf's and it's from his latest commit of the DarkWolf3.2 branch. It was from late 2012 I think. I haven't tried compiling it yet. In src/server/encryptions/java the value of the S_OPCODE_INITPACKET is 125, which is 0x7D like it's set everywhere. That further confuses me because then why does my client think it's an older version? Or I guess Tikal Antharas *is* 3.2. I guess that would make sense because it's supposedly "Episode 1.2" of "Season 3.0". But then 3.0's version must be something other than 7D, right? O.o.

So I found Darkwolf3.2 branch and got it by doing:

svn checkout l1j-darkwolf

I built that in Eclipse. I notice he has done a lot of custom shit in here vs. the main trunk. Nice.

I deleted my db and now I made the milepost 6:

mysql -p -u root l1jdb < l1jdb_m6.sql

Also I realized mysql was not in my path so I added it to /etc/profile.

I made executable. Had to replace out the backslashes with regular slashes in there. (Un-windows-ize it). Also had to replace ; with :. Final result:


# exit codes of GameServer:

# 0 normal shutdown

# 2 reboot attempt

while :: do

[ -f log/java0.log.0 ] && mv log/java0.log.0 "log/`date +%Y-%m-%d_%H-%M-%S`_java.log"

[ -f log/stdout.log ] && mv log/stdout.log "log/`date +%Y-%m-%d_%H-%M-%S`_stdout.log"

java -Xms1024m -Xmx1024m -cp l1jen.jar:lib/c3p0- l1j.server.Server > log/stdout.log 2>&1

[ $? -ne 2 ] && break

# /etc/init.d/mysql restart

sleep 10


When the client connects to lin 1.5 on port 2001, first they handshake. Then the client PSH: 0x4400. Server ACK. Client PSH: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855. That's the result of:

cksum -a sha256 /dev/null

(according to Hackpedia).

Anyway, server PSH: 0a000101000000 then 255.255.255. ... etc. a bunch of times for 473 bytes. Then the client went and talked to geotrust?? Anyway.

Later server does the standard first packet bullshit:


Then the client comes back with

0E 00 9F 41 51 02 90 56 7A 9B C4 49 E6 C8

And the server's all like

1E (30?)


00 2F D3 D2 92 62 5B 88 53 98 9F 31 05 BF 86 55 45 6A 6D C3 2B C4 D7 8C 4D FF F8 56 78

That was with Tikal Antharas client. I think. Lets try a virgin Crack!

Client comes back on mine with:

0A 00 A7 05 AE 47 2A 13 C0 01

So that's different. Why? I got an exception when I used the 3.0 key:

char peer1_0[] = {

0x12 };

char peer1_1[] = {

0x00, 0x32, 0xec, 0x90, 0xc6, 0x5c, 0xb1, 0x3c,

0x2c, 0x28, 0xf6, 0x65, 0x1d, 0xdd, 0x56, 0xe3,

0xef };

char peer0_0[] = {

0x0e, 0x00, 0x84, 0x5a, 0x4a, 0x19, 0x70, 0x49,

0x9a, 0x09, 0xc9, 0x47, 0x71, 0xef };

char peer1_2[] = {

0x0a, 0x00, 0xa7, 0x05, 0xae, 0x47, 0x2a, 0x13,

0xc0, 0x01 };

When I connected TA with 0x32 it gave version mismatch. The mid flush was commented.

Sunday - Test 7

I put in the Darkwolf 3.2 opcodes. I'm also using 0x7d version and Darkwolf first packet. No mid flush.

Version mismatch!

With mid flush: same.

Found a set of C versions here on a TW board. Trying with mid flush on their 3.1.

No comments:

Post a Comment