In this Thread i will show you how to compile and then using the compiled .pyc files in the game client. First of all....what we need:
-

- Python 2.2
- Notepad++
After you installed all required applications then unpack the root.epk/eix files from your client pack folder. Now locate the installed Python 2.2 and copy the .py files from the unpacked Source folder to the Python 2.2 root folder. When you done with it open up the python.exe and start the compiling. This part is so easy, just write import <nameofthefile.py> to the Command Prompt and then press Enter on your keyboard. After this command you will see the compiled file in the Python root folder, just copy back it to the Source folder where you unpacked the root.epk/eix, and then delete the .py version of this file. Example:
- intrologin.py > intrologin.pyc
Now do this with all .py files, exception the system.py becouse later we need add things to it. When you compiled and copied all files then go back to the Source folder and open up the System.py file with Notepad++. We need to update 3 things in this file, press Ctrl+F and search for this:
filename = name + '.py'
Replace this line with this:
filename = name + '.pyc'
Search for this:
newmodule = _process_result(compile(pack_file(filename,'r').re ad(),filename,'exec'),name)
Replace with this:
newmodule = _process_result(marshal.loads(pack_file(filename,' rb').read()[8:]),name)
Search for this:
RunMainScript("prototype.py")
Replace with this:
RunMainScript("prototype.pyc")
That's all, now just pack the root.epk/eix and copy to the client pack folder with overwriting the existing root.epk/eix. After this just start the game with your preferred starter, "metin2client.exe". Now you're done, you using compiled py files.
Sources:
-

Changelog:
3. Juli 2013 - Thread opened
4. Juli 2013 - Added easy compiler
Hope this help, if you have question or suggestion, please contact me via my profile page, or just reply to this topic.
Kind Regards,
Sanchez_x







