Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Guides & Templates
You last visited: Today at 03:32

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Python] Modules after GameForge-Update (01.10.2013)

Discussion on [Python] Modules after GameForge-Update (01.10.2013) within the Metin2 Guides & Templates forum part of the Metin2 category.

Reply
 
Old   #1
 
Mi4uric3's Avatar
 
elite*gold: 405
Join Date: Dec 2007
Posts: 6,615
Received Thanks: 6,358
[Python] Modules after GameForge-Update (01.10.2013)

Good afternoon Elitepvpers.
The update from the 01.10.2013 has changed a few things in the Metin2Client concerning Python.
Some Pythonmodules have been removed from the Root-Eterpack and were moved directly into the client-executable.

Dump:

Important for making Clientmods work again are the functions:
Code:
rootlib.isExist(char* moduleName)
rootlib.moduleImport(char* moduleName)
They can be used like this:
Code:
import rootlib
moduleName = "playerSettingModule"
if rootlib.isExist(moduleName):
	module = rootlib.moduleImport(moduleName)
The available modules are:
Code:
utils
uiUploadMark
uiTest
uiSystemOption
uiselectitem
uiRestart
uiRefine
uiQuest
uiPointReset
uiPlayerGauge
uiPickMoney
uiPhaseCurtain
uiGameButton
uiExchange
uiEquipmentDialog
uiCommon
uiCandidate
uiAttachMetin
system
Prototype
playerSettingModule
musicInfo
introLogo
introLoading
exception
debugInfo
colorInfo
I didn't test it, but it should work.

€dit:
Quote:
Originally Posted by !Beni! View Post
Code:
import __builtin__, sys
from rootlib import moduleImport

org = __builtin__.__import__
def new_import(*data):
    name = data[0]
    try:
        module = moduleImport(name)
    except SystemError:
        module = org(*data)
    if module.__name__ not in sys.modules:
        sys.modules[module.__name__] = module
    return module
__builtin__.__import__ = new_import
This should work but I didn't test it as I only use my DetourFunction-Class.
This code enables using "import ui" and such things again.
(Freely translated from German by me)

HF with it,
Mi4uric3
Mi4uric3 is offline  
Thanks
15 Users
Old 10/02/2013, 21:28   #2
 
[uLow]Beni's Avatar
 
elite*gold: 0
Join Date: May 2011
Posts: 1,781
Received Thanks: 618
Danke... hab mich gefreut das niemand das weiß :P

naja, aber für alle denen das zuviel arbeit ist:
Code:
import __builtin__, sys
from rootlib import moduleImport

org = __builtin__.__import__
def new_import(*data):
    name = data[0]
    try:
        module = moduleImport(name)
    except SystemError:
        module = org(*data)
    if module.__name__ not in sys.modules:
        sys.modules[module.__name__] = module
    return module
__builtin__.__import__ = new_import
sollte gehen ist aber so nicht getestet, da ich eigentlich nur mehr meine DetourFunction Klasse verwendet.

dieser Code ermöglicht euch wieder "import ui" und so zum machen

to lazy for english :b
[uLow]Beni is offline  
Thanks
5 Users
Old 10/02/2013, 22:27   #3
 
KaMeR1337's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 1,415
Received Thanks: 5,444
modules still can be used normal way. any method to extract them ?
KaMeR1337 is offline  
Thanks
3 Users
Old 10/03/2013, 17:39   #4
 
[uLow]Beni's Avatar
 
elite*gold: 0
Join Date: May 2011
Posts: 1,781
Received Thanks: 618
Quote:
Originally Posted by KaMeR1337 View Post
modules still can be used normal way. any method to extract them ?
You could import the module and decompyle it.

i don't know if the sources of the root-py's are in the binary.
[uLow]Beni is offline  
Old 10/04/2013, 09:10   #5
 
KaMeR1337's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 1,415
Received Thanks: 5,444
they are in binary but looks like compressed or something
KaMeR1337 is offline  
Old 10/04/2013, 09:55   #6
 
Mi4uric3's Avatar
 
elite*gold: 405
Join Date: Dec 2007
Posts: 6,615
Received Thanks: 6,358
Quote:
Originally Posted by KaMeR1337 View Post
they are in binary but looks like compressed or something
I will take a look at it
Mi4uric3 is offline  
Thanks
1 User
Old 10/04/2013, 13:01   #7
 
KaMeR1337's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 1,415
Received Thanks: 5,444
Quote:
Originally Posted by Mi4uric3 View Post
I will take a look at it
is there any good method to inject python without detour ? everytime i try i get mt2 crash with bigger py codes
KaMeR1337 is offline  
Thanks
1 User
Old 10/04/2013, 13:23   #8
 
Mi4uric3's Avatar
 
elite*gold: 405
Join Date: Dec 2007
Posts: 6,615
Received Thanks: 6,358
Quote:
Originally Posted by KaMeR1337 View Post
is there any good method to inject python without detour ? everytime i try i get mt2 crash with bigger py codes
python27.PyRun_SimpleFile()
python27.PyRun_SimpleString()

..?
Mi4uric3 is offline  
Thanks
2 Users
Old 10/04/2013, 15:03   #9
 
elite*gold: 726
Join Date: Jul 2010
Posts: 14,233
Received Thanks: 7,915
I have no c++ knowledge so i have to wait until someone release a new python loader. Where are all the python modules for example in the root?
noahrmal is offline  
Old 10/04/2013, 15:42   #10
 
Mi4uric3's Avatar
 
elite*gold: 405
Join Date: Dec 2007
Posts: 6,615
Received Thanks: 6,358
Quote:
Originally Posted by 123klo View Post
I have no c++ knowledge so i have to wait until someone release a new python loader. Where are all the python modules for example in the root?
Versuchs mal so: Öffne die PythonLoader.dll (Name geraten) von musicinstructor mit nem Hex-Editor und ersetz jedes "python22" mit "python27" (Unicode und Ansi). Da es ja die selben Funktionsnamen sind sollte es klappen, solange die Funktionen die selben Parameter behalten haben..
Mi4uric3 is offline  
Thanks
4 Users
Old 10/04/2013, 22:14   #11
 
KaMeR1337's Avatar
 
elite*gold: 0
Join Date: May 2008
Posts: 1,415
Received Thanks: 5,444
Quote:
Originally Posted by Mi4uric3 View Post
python27.PyRun_SimpleFile()
python27.PyRun_SimpleString()

..?
yeah i know but it doesn't work well and crash game a lot. sure it works good for smaller python codes but not bigger
KaMeR1337 is offline  
Thanks
1 User
Old 10/07/2013, 19:58   #12
 
Zetsu WoC™'s Avatar
 
elite*gold: 0
Join Date: Jan 2013
Posts: 212
Received Thanks: 178
Thank you @_@ now i have a big ideea
Zetsu WoC™ is offline  
Old 10/10/2013, 02:39   #13
 
elite*gold: 0
Join Date: Sep 2013
Posts: 23
Received Thanks: 3
Quote:
Originally Posted by KaMeR1337 View Post
yeah i know but it doesn't work well and crash game a lot. sure it works good for smaller python codes but not bigger
I`d love if you could fix it. I used to login with your Client and everything was ok, however i just got kicked within 1 min.
ASDFWarrior is offline  
Old 12/21/2013, 23:58   #14
 
elite*gold: 0
Join Date: Nov 2011
Posts: 395
Received Thanks: 29
friends what is bonus add "command" like "71051" and "71052" jobs command its need for me
Laben is offline  
Old 12/22/2013, 01:52   #15
 
Mi4uric3's Avatar
 
elite*gold: 405
Join Date: Dec 2007
Posts: 6,615
Received Thanks: 6,358
Quote:
Originally Posted by Laben View Post
friends what is bonus add "command" like "71051" and "71052" jobs command its need for me
I don't understand your question..
Mi4uric3 is offline  
Reply

Tags
gameforge, python, root, rootlib, update


Similar Threads Similar Threads
ERROR : Failed To Update Protection Modules
03/23/2013 - Combat Arms - 2 Replies
Hallo liebe Community, mein Combat Arms leidet seid gestern Abend ärgerlicherweise unter dem Fehler : Failed to Update Protection modules, wenn ich es starten will. Ich suche schnell & dringend Hilfe. Für den helfenden Tipp würde ich auch NX gift locker machen. MFG



All times are GMT +1. The time now is 03:32.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.