Jump to content

MasterToma

Members
  • Posts

    158
  • Joined

  • Last visited

  • Days Won

    5
  • Feedback

    100%

Everything posted by MasterToma

  1. Great! Btw, just if you missed - there are C1 services with fixes :)
  2. Why does it ask for l2comm... Write lin2db after cleaning the registry.
  3. Hi, As you know, there is no separate "Admin" socket for GM. But iv you send packet 00 (Version) with negative values, it will dump some information: import socket import struct port = 7777 # client accepting port host = '127.0.0.1' # game server IP clientsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) clientsocket.connect((host, port)) # Preparing request my_bytes = bytearray() # size my_bytes.append(7) my_bytes.append(0) # packetId my_bytes.append(0) # -3 my_bytes.append(253) my_bytes.append(255) my_bytes.append(255) my_bytes.append(255) clientsocket.sendall(my_bytes) # Response unpacker = struct.Struct('h') size = unpacker.unpack(clientsocket.recv(unpacker.size))[0] - 2 #print "got packet with payload's size: %s" % size data = clientsocket.recv(size) #print('Received', repr(data)) # format: cdddddS unpacker = struct.Struct('<bIIIII') # c i i i i i msgId, npcConnected, maxUsers, usersConnected, usersPlaying, privateStores = unpacker.unpack(data[0:unpacker.size]) str_unpacker = struct.Struct('%ss' % (size - unpacker.size)) stats = str_unpacker.unpack(data[unpacker.size:])[0].decode('utf-16') print('msgId: %s, npcStatus (2 - Off, 1 - On): %s, maxUsers: %s, usersConnected: %s, usersPlaying: %s, privateStores: %s, stats (free memory, allocated objects, free pool slots, server Up time minutes): %s') % (msgId, npcConnected, maxUsers, usersConnected, usersPlaying, privateStores, stats) And results: This doesn't work for C4, they changed format a bit. But if you have IDA, you can check yourself
  4. This is inside L2OFF, so... You have to use Admin socket of CacheD... Otherwise you will get old data, races, and performance/security issues. Oh, also my kitty might get pregnant. Seriously, idea is very nice, I was looking for something like that, but all data should be taken from CacheD, because this module doesn't modify SQL each time, it's a CACHE. Also, taking something already prepared from memory is much more faster, then SQL query. About races - when your module get mature, and you would like to change data, no way to use SQL, since changes won't be visible in game, and even probably overridden by CacheD module.
  5. Try to remove everything under Software\\NCSoft\\L2AUTHD And start again (remember, there might be few keys Software\\NCSoft\\L2AUTHD in registry)
  6. All possible startup SQL queries are failed. Probably this user doesn't have rights to the lin2db, or something else is wrong in DB settings
  7. Take into account, that only L2NPC will load them at once, and send all 10000 packets to L2Server. But L2Server (at least C1) has 100 ms timeout for each NPC create packet, so you have also remove/reduce this on server side in order to show NPC
  8. Do you think I should comment every new message here? :) I'm still working on L2Server, have done skilldata parser/lexer (about 120 skill classes, 20 conditions, all parameters are parsed). Now I'm preparing testing environment in C#, to test whole stack (L2Server, L2AuthD, CacheD and L2NPC). It is needed, since I already have first messages from my L2Server. So, heads-up, work is in progress ;)
  9. Looks like I haven't published whole code. import socket port = 2108 host = '192.168.0.110' clientsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) clientsocket.connect((host, port)) clientsocket.sendall(b'0\t6666\n') # kick user with UID=6666 from login server data = clientsocket.recv(1024) print('Received', repr(data)) clientsocket.sendall(b'1\t100\n') # change socket limit data = clientsocket.recv(1024) print('Received', repr(data)) clientsocket.sendall(b'2\n') # get socket size data = clientsocket.recv(1024) print('Received', repr(data)) clientsocket.sendall(b'3\tacc_name\n') # kick by acc name data = clientsocket.recv(1024) print('Received', repr(data)) clientsocket.sendall(b'4\t1\n') # GM mode ON data = clientsocket.recv(1024) print('Received', repr(data)) clientsocket.sendall(b'4\t0\n') # GM mode OFF data = clientsocket.recv(1024) print('Received', repr(data)) clientsocket.sendall(b'6\t192.168.0.110\n') # change GM IP data = clientsocket.recv(1024) print('Received', repr(data)) clientsocket.sendall(b'8\t0\n') # change servere mode to Paid data = clientsocket.recv(1024) print('Received', repr(data)) clientsocket.sendall(b'8\t1\n') # change servere mode to Free data = clientsocket.recv(1024) print('Received', repr(data)) clientsocket.sendall(b'9\tasdf\tasdf\tkey\n') # get login flag (acc name, pass, key) data = clientsocket.recv(1024) print('Received', repr(data)) clientsocket.sendall(b'10\tasdf\tasdf\tkey\n') # check user(acc name, pass, key) data = clientsocket.recv(1024) print('Received', repr(data)) # 0 means OK, 3 means user not found (wrong acc/pass) clientsocket.sendall(b'11\tasdf\tasdf\tkey\0\n') # kick user from game server user(acc name, pass, key, serverId) data = clientsocket.recv(1024) print('Received', repr(data)) # 4 means wrong server ID, 0 means OK, 5 means user not found Basic principles 1. data is sent in text format 2. first param - command ID 3. parameters are separated by tabulation (\t) 4. end of message is \n
  10. When completing C1, I will add SDK with API, which will allow you to extend it to C3, or write any other customs. If you want to contribute and join the project, PM me with your skype.
  11. Thank you for the complete answer!
  12. You are in section [L2OFF]... Are you looking for the extender sources? Or for the datapack Check this one
  13. Don't worry, those who contribute to my "private" project, receive back those "knowledge". BTW, topic might be resolved, looks like PP Retail C4 files are original. Tnx to @zconll and @Jamba
  14. Code is private, but I share binaries with fixes
  15. C4 was my goal too, since I would like to open server C1 -> C2 -> C3 -> C4 -> C5 -> C6, and provide new content each 2 weeks or 2 months (for later chronicles) There are a lot of extenders, based on C4. I explained many times, that path "decompile easiest parts C1 -> complex parts C1 -> use them as a base to decompile C4" is much more efficient, then decompiling C4 from scratch.
  16. Hello, As a part of C1 decompilation project, I'm starting decompiling C4. Having source codes for all (except L2Server.exe) parts, C4 reverse should go 5x times faster. But I can't find clean C4 PTS files. Every share has some modifications, in binaries as well. I mean, it's even not clear some times, whether binaries were "extended" or not - licenses somewhere disabled, etc. If you 99% sure you have clean leaked C4 pack - please, PM me, or post it here
  17. Hello, As a part of C1 decompilation project, together with NASC compiler, I publish QuestCompiler 1.1.3. It's C0-based original compiler with few fixes. Suitable for C1 as well. Fell free to check it and report bugs if any. I compared results from QuestDataChecker from C0 with my quest compiler. Except of few changes (fixes), everything is 100% identical. QuestData.txt from SINA C1 has been used for tests.
  18. Not yet. But I've posted extended compiler NASC-C1 compilator is on done. Extended compiler might be found here (use --extmode) and will publish Quest Compiler soon.
  19. Sources are closed, sorry for that. In order to get them you have to join the community, and to be skilled C++ programmer. BTW, thanks for bumping. My status about L2NPC: Only 15 functions left in L2NPC.exe. All other is working (AI priority queue, script virtual machine, etc) QuestDataChecker is completed on 85% NASC-C1 compilator is on done. Extended compilator might be found here (use --extmode)
  20. I would like to request minor (is it?) improvement. There are a lot of cases, where strings are present inside decompiled NAS file. E.g. TelPosList Position = { {"古鲁丁城镇"; -80749; 149834; -3043; 18000; 0} }; But actually, there should be ID from fstring.txt file. Originally, NAS Lexer translates ID from fstring.txt for TelPosList, and Code-Generator inserts string in ai.obj So, this should be like this TelPosList Position = { {1000003; -80749; 149834; -3043; 18000; 0} }; It allowed NCSoft to do script language-agnostic. Similar for AddChoise, but case is more complicated there, since it requires QuestDataChecker.exe
  21. Great! 1. I've decompiled C1 ai.obj from leaked CHN server using @verbrannt's decompiler (branch c1-support) 2. Compiled back ai.nasc without any changes, using my C1 AI compiler 3. Splited compiled AI classes from original ai.obj and recompiled ai_decompiled.obj in separate files 4. Compared 2 directories (with ignore L\d* and fetch_i\s*//\s*(npc_)class_id Here is result https://ibb.co/jSNsBy Original obj code 1. extra jump is present in 10 files. This jump jumps to next line, so it's completely useless. Don't know, why compiler generates it 2. empty parameters in 4 classes (selected ones on picture) are present in original obj and missed after recompilation. This also could be ignored class party_leader_ag_casting_curse : party_leader_casting_curse parameter_define_begin parameter_define_end ... So, I could say, it's first decompiler for ai.obj, which works (I mean it) at least for C1. But in general, code syntax wasn't changed much in NAS language (I've checked compiler from C4 - only diagnostics were improved and few minor generator changes, but lexer/parser are the same).
  22. Some of them are not crucial (like empty parameters), some - might be, deeper check is needed. But there is not "only jump" :)
  23. Const pushing looks like in wrong place (tor) tutorial_quest_npc original: push_const 4194304 push_const 2097152 bit_or push_const 8388608 bit_or not bit_and assign recompiled push_const 4194304 not bit_and push_const 2097152 bit_or push_const 8388608 bit_or assign
  24. I think there is no point to be so pathetic. I'm trying to help you to complete this big work finally, since you've made it public, and probably you want it to be as much usable as it could be. Have to remove your smile mod, since it's done for all cases, instead of doing it properly, where it's needed. But let's skip it finally. I don't know which diff you are using, and don't want to know, but it's obvious that this diff is not right. Ors are missed in about 20 classes (corpse_of_kurtz 1 of them) More complicated case fairy_mymyu Empty parameers here and in quest_0503_imperial_gravekeeper , rodd class party_leader_ag_casting_curse : party_leader_casting_curse parameter_define_begin parameter_define_end
  25. Well I think it's not so hard to do proper (), if this info present in ai.obj. But I understand your sarcasm. Why should I replace labels If I ignore them during diff? I have 35 files with differences (labels are ignored, and few more filters are ignored), but you don't want to hear :) And it's not "only jump" Okay I will fix it manually, not a big deal. Tnx for your work, this decompiler at least somehow usefull
×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock