farkmt2official 1
farkmt2official
BlackFullMoon 1
BlackFullMoon
mavzermete 1
mavzermete
Bvural41 1
Bvural41
Hikaye Ekle
Kaynak ikonu

[Python] Management graphic mode 1

indirmek için izniniz yok
de8aa74753f543c79ae4c3cc6fce6255.png


One guy asked in one forum if it possible to do this (already he have in settings to disable/enable via shift+f12 but is shit for player ^^, so i was think is nice to post and here what i did for him free.

Graphic mode you can find here (already is public from long years ago and you can find him in a lot a forums): [You need to extract all files from archive in directory where is launcher]



Kod:
#root/uiSystem.py:
#1.) Search:
    def OnPressExitKey(self):
        self.Close()
        return TRUE
#2.) Add after function:
    if app.ENABLE_GRAPHIC_MODE:
###################################################################
# title_name        : Features for graphic mode
# date_created      : 2017.01.04
# author            : VegaS
###################################################################
        def IsActiveModeGraphic(self):
            idx = open("enbconvertor.ini", "r").readlines()

            if int(idx[1][-2]) > 0:
                return TRUE

            return FALSE

        def __ClickSystemModeButton(self):
            import dbg, os, app, localeInfo

            if self.IsActiveModeGraphic():
                dam = 0
            else:
                dam = 1

            idxCurMode = "EnableProxyLibrary=%d" % (dam)
            f = []
            getLine = 2

            if os.path.exists("enbconvertor.ini"):
                idx = open("enbconvertor.ini", "r")

                for it in idx:
                    f.append(it)
                idx.close()

            while len(f) < int(getLine):
                f.append("")

            f[int(getLine)-1] = str(idxCurMode)
            idx = open("enbconvertor.ini", "w")

            for it in f:
                idx.write(it)
                if (len(it) > 0 and it[-1:] != "\n") or len(it) == 0:
                    idx.write("\n")

            idx.close()
            self.Close()

            if dam > 0:
                dbg.LogBox(localeInfo.GRAPHIC_MODE_ENABLE)
            else:
                dbg.LogBox(localeInfo.GRAPHIC_MODE_DISABLE)

            dbg.LogBox(localeInfo.GRAPHIC_MODE_RESTART)
            os.system('start metin2client.exe') ### Change with your name of application.
            app.Exit()
          
#1.) Search:
        self.GetChild("exit_button").SAFE_SetEvent(self.__ClickExitButton)
#2.) Add bellow:
        if app.ENABLE_GRAPHIC_MODE:
            self.GetChild("system_mode_button").SAFE_SetEvent(self.__ClickSystemModeButton)

#locale/en/locale_game.txt:
GRAPHIC_MODE_ENABLE    [i] The graphic mode was enabled.
GRAPHIC_MODE_DISABLE    [i] The graphic mode was disabled.
GRAPHIC_MODE_RESTART    [i] Client will restart.

#locale/en/ui/systemdialog.py
                {
                    "name" : "system_mode_button",
                    "type" : "button",
                    "x" : 10, # Position X
                    "y" : 5, # Position Y
                    "text" : "Graphic Mode (Enable/Disable)",
                    "default_image" : ROOT + "XLarge_Button_01.sub",
                    "over_image" : ROOT + "XLarge_Button_02.sub",
                    "down_image" : ROOT + "XLarge_Button_03.sub",
                },
              
//@Src/Client/UserInterface/Locale_inc.h
#define ENABLE_GRAPHIC_MODE

//@Src/Client/UserInterface/PythonApplicationModule.cpp
//1.) Search:
#ifdef ENABLE_COSTUME_SYSTEM
    PyModule_AddIntConstant(poModule, "ENABLE_COSTUME_SYSTEM",    1);
#else
    PyModule_AddIntConstant(poModule, "ENABLE_COSTUME_SYSTEM",    0);
#endif
//2.) Add bellow:
#ifdef ENABLE_GRAPHIC_MODE
    PyModule_AddIntConstant(poModule, "ENABLE_GRAPHIC_MODE",    1);
#else
    PyModule_AddIntConstant(poModule, "ENABLE_GRAPHIC_MODE",    0);
#endif

Kanıt Statu;
l0MYO3vXOAP0sVWus.gif
Yazar
Bekir.CANPOLAT
Kaynak İndirilme
9
Görüntüleme
292
İlk yayınlama
Son Güncelleme

Ratings

0.00 yıldız(lar) 0 rating

Bekir.CANPOLAT - Kaynakları

Geri
Üst