Premium Sanchez 2468 Posted March 23, 2014 Premium Share Posted March 23, 2014 (edited) Hi everyone, In this thread I will show you how to use the compiled python files in the client. First of all we need to download Python 2.2 or 2.7 Python 2.2 download Python 2.7 download Let's start the tutorial: 1. Rename system.py to main.py or to anything you want, it doesn't matter.2. Change these stuffs in main.py: Search for this: filename = name + '.py' Replace with this: filename = name + '.pyc' Search for this: newmodule = _process_result(compile(pack_file(filename,'r').read(),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") 3. Create a new file called system.py4. Copy this to system.py: import pack import imp import marshal data = pack.Get('main.pyc') if data == None: raise IOError, 'Error happened...' if data[:4] != imp.get_magic(): raise ImportError, 'Error happened...' exec marshal.loads(data[8:]) 5. Let's continue with the compiling. Download this file and put to the Python 2.2 or 2.7 folder. Create a new folder called files and put all .py files from the root and the main.py to the folder. Drop the downloaded Compiler.py to the python.exe and wait few seconds, now it will compile the files. After the compiling finished copy back the .pyc files to the root and delete the old .py files.6. Copy the system.py to the root. (Example picture)7. Pack the root.eix/epk If you have any question or suggestion please just reply to this topic. Kind Regards,Sanchez Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal 1 1 21 Link to comment Share on other sites More sharing options...
Risan 115 Posted March 23, 2014 Share Posted March 23, 2014 Old but good 1 Link to comment Share on other sites More sharing options...
DasSchwarzeT 111 Posted March 23, 2014 Share Posted March 23, 2014 (edited) Hi everyone, In this thread I will show you how to use the compiled python files in the client. First of all we need to download Python 2.2 or 2.7 Python 2.2 download Python 2.7 download Let's start the tutorial: 1. Rename system.py to main.py or to anything you want, it doesn't matter. 2. Change these stuffs in main.py: Search for this: filename = name + '.py' Replace with this: filename = name + '.pyc' Search for this: newmodule = _process_result(compile(pack_file(filename,'r').read(),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") 3. Create a new file called system.py 4. Copy this to system.py: import pack import imp import marshal data = pack.Get('main.pyc') if data == None: raise IOError, 'Error happened...' if data[:4] != imp.get_magic(): raise ImportError, 'Error happened...' exec marshal.loads(data[8:]) 5. Let's continue with the compiling. Download this file and put to the Python 2.2 or 2.7 folder. Create a new folder called files and put all .py files from the root and the main.py to the folder. Drop the downloaded Compiler.py to the python.exe and wait few seconds, now it will compile the files. After the compiling finished copy back the .pyc files to the root and delete the old .py files. 6. Copy the system.py to the root. (Example picture) 7. Pack the root.eix/epk If you have any question or suggestion please just reply to this topic. Kind Regards, Sanchez Thanks, very useful Edited August 18, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Shichirojii 8 Posted March 24, 2014 Share Posted March 24, 2014 good! Link to comment Share on other sites More sharing options...
DasSchwarzeT 111 Posted July 26, 2014 Share Posted July 26, 2014 Is it necessary to use the same version of python for compiling like the client supports? (My client uses python 2.2 and I used python 2.7 to compile. it failed with RunMain Error) Link to comment Share on other sites More sharing options...
Hashirama 0 Posted April 19, 2015 Share Posted April 19, 2015 someone help me plzzz Link to comment Share on other sites More sharing options...
daredevil09 5 Posted April 20, 2015 Share Posted April 20, 2015 What is this? For protection ? How can I change my magic number in python22 ? Link to comment Share on other sites More sharing options...
tigerstefan 4 Posted February 12, 2016 Share Posted February 12, 2016 (edited) This error after making all like in the tutorial. Edited August 24, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
aaron 5 Posted February 12, 2016 Share Posted February 12, 2016 syserr? Link to comment Share on other sites More sharing options...
Nyor 0 Posted February 12, 2016 Share Posted February 12, 2016 Can you send me the Download`? pls.. Link to comment Share on other sites More sharing options...
tigerstefan 4 Posted February 13, 2016 Share Posted February 13, 2016 I have resolved the problems it works just fine.I changed but a little bit the tutorial and changed py to pyc to a python22 and python27 client. This compile is more picky then the normal py i had cuple of errors in the folders that worked in normal. Link to comment Share on other sites More sharing options...
xRooT 24 Posted June 3, 2016 Share Posted June 3, 2016 5. Let's continue with the compiling. Download this < Link no Files Link to comment Share on other sites More sharing options...
fabiwunn 1 Posted January 10, 2017 Share Posted January 10, 2017 reupload please Link to comment Share on other sites More sharing options...
Contributor MrQuin 6409 Posted September 21, 2018 Contributor Share Posted September 21, 2018 #Up Reupload request.. My only accounts are here and on M2D, Don't trust anyone else from other shitty sites. Link to comment Share on other sites More sharing options...
[Dev]Medo 4 Posted September 21, 2018 Share Posted September 21, 2018 reupload file Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now