Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/08/21 in all areas

  1. Download Metin2 Download Hello maniacs, I've made this post mostly to share knownledge, studies or questions about the Metin1 Server files (2008) I personally tried, and failed, to start the files correctly on a modern FreeBSD machine (due to issues with localization) I suppose some patching to the game will be required to get that running. This is the link to the server files: If you install FreeBSD 5 + Mysql 4 it should work I'll try to update this topic when I have time with some stuff I found on the files, but everyone can join I guess Here's some stuff I've discovered: Command lines "(-- )( --)" -> full screen "( --)(-- )" -> windowed Root files if the file "newpatch.exe" is found, MTS will launch "MetinPatchUpdater.exe" This behavour is similar to what METIN2 does when it launches PatchUpdater.exe is newpatch.exe is found if a file called "console" is found, MTS will create a probably DEBUG console If you create a file called "patch.exe" MTS will try to move "patch.exe" into "metin.exe" Tar unpacker This is a quick python unpacker of MTS files [Hidden Content] You can also find a complete explaination of the file format here: [Hidden Content] Good luck with your experiments
    5 points
  2. M2 Download Center Download Here ( Internal ) Files for root ( introselect.py , introcreate.py) Must make their self.
    1 point
  3. Hi, In this thread I'm going to show you how to make a game-client or client-game communication with packets, instead of using the old quest-client, client-quest communication. Lets start with the game-client, in this example I will send 1 variable to the client. First start with the HEADER, open your binary source and navigate to UserInterface/Packet.h. Now you will see many headers, create a new one, but search for an empty number. I will use 57, because its not used. GC means it's used for Game -> Client packet, it's just a prefix. HEADER_GC_METIN2DEV Now add the structure for the packet, this is most important part. Structure is the "body" of the packet, it contains the HEADER as BYTE and the other optional variables. As I said I just want to send one int type to the client, so add it. typedef struct command_metin2dev_packet { BYTE bHeader; int M2int; } TPacketGCMetin2Dev; Now navigate to UserInterface/PythonNetworkStream.cpp and add your header to the CMainPacketHeaderMap class. The first parameter of the Set is the HEADER, second is the size of the structure. We will use just static size packets in this tutorial, but the third argument can be dynamic size too. Set(HEADER_GC_METIN2DEV, CNetworkPacketHeaderMap::TPacketType(sizeof(TPacketGCMetin2Dev), STATIC_SIZE_PACKET)); Now navigate to UserInterface/PythonNtworkStreamPhaseGame.cpp and add the function to the switch. case HEADER_GC_METIN2DEV: ret = RecvM2DevPacket(); break; The name of the function will be RecvM2DevPacket: Now declarate the function, navigate to UserInterface/PythonNetworkStream.h and add it as public: bool RecvM2DevPacket(); Now add the receiver part of the code. Recv "picks" out xy bytes from the buffer and the return type of it is false if there was no data in the buffer by that size otherwise true, which means it was successful. xy = size of the structure bool CPythonNetworkStream::RecvM2DevPacket() { TPacketGCMetin2Dev Metin2DevGC; if (!Recv(sizeof(TPacketGCMetin2Dev), &Metin2DevGC)) { Tracen("Recv Metin2DevGC Packet Error"); return false; } } Now we are calling the BINARY_M2DEV_Test function in game.py and passing the received data. PyCallClassMemberFunc(m_apoPhaseWnd[PHASE_WINDOW_GAME], "BINARY_M2DEV_Test", Py_BuildValue("(i)", Metin2DevGC.M2int)); This was the client-side of the game-client communication, lets start the server-side: First of all we need to add the header again, navigate to game/packet.h and add this: And the structure: typedef struct packet_metin2dev_packet { BYTE byHeader; int M2int; } TPacketGCMetin2Dev; Now navigate to game/char.cpp and create a function which sends the packet. void CHARACTER::SendMetin2DevPacket() { } Declare it in the game/char.h: void SendMetin2DevPacket(); Now lets add the content of the function. Create a new instance of the structure, set the values of it and send it to the client. void CHARACTER::SendMetin2DevPacket() { if (!GetDesc()) { return; } TPacketGCMetin2Dev Metin2DevGC; Metin2DevGC.byHeader = HEADER_GC_METIN2DEV; Metin2DevGC.M2int = GetPlayerID(); GetDesc()->Packet(&Metin2DevGC, sizeof(TPacketGCMetin2Dev)); } Now add the last function to game.py, this will be called by the binary: def BINARY_M2DEV_Test(self, M2int): import dbg dbg.LogBox(str(M2int)) Finally, lets check how it works: If you have any question or suggestion, please just reply to this topic. Kind Regards, Sanchez
    1 point
  4. One possible problem is, transmutated weapon is not copied to the newly created item. Take a look at function called RefineWithScroll (or something similar) in char_item.cpp and add the missing part.
    1 point
  5. The content in that topic can be visualized in a single gif: The problem with the "speedy effects" after maximizing a minimized client lies here: As you can see the elapsed time is measured since... well... the last time the effect got updated. You might say that hey, thats ok... well it would be, but if you take a look at the messy game loop inside PythonApplication.cpp you will notice that the call for effect updates is only present in the RenderGame function, which is a render function as its name implies it, and its only called when the game is rendering. And since the game doesn't render anything if its minimized, the time for the effects basically stops, and when the game starts rendering again, it will resume it from that point when it got minimized. You might rightfully say that okay, but that doesn't explain the reason why is it "speedy" for a long time, since the time difference should be huge for only one call, then it should return to normal because the m_fLastTime got updated at the end of the function. And at this point I'm officially out of definitive answers. The real reason might be one of the following: On the first "big" time difference after maximizing the client destabilizes the effect instance, messing up the emission/decorator update on a weird way, making the following n updates unstable as well. The custom timer class is more than weird, it has a "real time" mode and a "custom time" mode, but as I see only the "custom time" mode is used, which works like advancing the timer every time the main loop is called. Since the advancing is always called (its in the update part, not the render part) I somewhat doubt that this is the real reason. Using a different timer (potentially std::chrono) here in the effect update would quickly evaluate this case. In short, fixing it could be done by: Using a maximum value for the elapsed time (like it cant be larger than 1/60). This would solve the "speedy" issue, but would cause another bug, making some effects stay longer alive (if you minimize the client). Calling effect update even when the client is minimized. This would make the client use somewhat more resource when its minimized, but would still use way more less resource compared to the "fix" in that topic. Digging a bit more deeper, finding more accurate solutions. (The effects are stateless, or at least it really seems so, so it should mean that the effect should work with any given "elapsed time" at any point, but like I said this might be violated somewhere. The effects are not stateless, since the particle positions are based on the last position + elapsedTime * acceleration.)
    1 point
  6. char_item.cpp bool IS_SUMMONABLE_ZONE(int map_index)
    1 point
  7. GF v21.0.8 Patch (Metin2 Download) (Full client) Contents: root-meta, dumped binary, locales with protos new monsters, maps, dungeon, armors, 2021 easter costumes and mount the package contains the separated folders(m00xxx) and the unpacked files together in one folder.
    1 point
  8. M2 Download Center Download Here ( Internal ) Download: [Hidden Content]
    1 point
  9. ../Srcs/Client/UserInterface/PythonPlayerInput.cpp Replace the whole function void CPythonPlayer::__SetAutoAttackTargetActorID(DWORD dwVID) with: [Hidden Content]
    1 point
  10. hey man. here fix:D Group mounts { Vnum 10030 1 71114 1 1 2 71116 1 1 3 71118 1 1 4 71120 1 1 5 71121 1 1 6 71124 1 1 7 71125 1 1 8 71126 1 1 9 71127 1 1 10 71128 1 1 11 71171 1 1 12 71172 1 1 13 71125 1 1 } add in special_item_group.txt
    1 point
  11. I was curious and tested it; this is soo crazy, the client was unable to carry the load
    0 points
  12. Hi Dev's! I have a little interesting problem and i dont have any idea what is it.. Problem: (database syslog) What is the solution for this? Thank you in advance for your help! Best Regards
    0 points
  13. Bump. @Mali61 Any idea my friend ?
    0 points
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.