Register for your free account! | Forgot your password?

You last visited: Today at 17:45

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

Advertisement



[Python] Management graphic mode

Discussion on [Python] Management graphic mode within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1
 
VegaS ♆'s Avatar
 
elite*gold: 10
Join Date: Jul 2013
Posts: 93
Received Thanks: 416
Lightbulb [Python] Management graphic mode


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 my shit code what i was make 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]

Code:
#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
VegaS ♆ is offline  
Thanks
10 Users
Old 01/04/2017, 11:18   #2
 
elite*gold: 0
Join Date: Sep 2014
Posts: 44
Received Thanks: 5
how can i edit enb effect ?
Bekir Akdemir is offline  
Old 01/05/2017, 01:41   #3
 
elite*gold: 0
The Black Market: 105/0/0
Join Date: May 2016
Posts: 8,679
Received Thanks: 1,638
The Code looks good, and definitely helpfull

Thanks for the RLS
悪地城 is offline  
Old 01/14/2017, 07:12   #4
 
elite*gold: 0
Join Date: Feb 2015
Posts: 4
Received Thanks: 1
Thanks for the release, very nice.
Sanielito32 is offline  
Old 01/14/2017, 17:45   #5
 
elite*gold: 0
Join Date: Oct 2007
Posts: 131
Received Thanks: 10
on my i have this error ??

0114 17:41:13775 :: KeyError
0114 17:41:13775 :: :
0114 17:41:13775 :: 'system_mode_button'
0114 17:41:13775 ::
FCPorto15 is offline  
Reply

Tags
graphic mode, python, vegas


Similar Threads Similar Threads
[Selling] GRAPHIC/PAGE/SCRIPTS(PHP,LUA,PYTHON)/C++/AUTOIT
10/28/2015 - League of Legends Trading - 0 Replies
Welcome. Today i want let you my offer via coding and developing. U can check my work here: www.elobosting24.eu _ _GRAPHIC _CODING
Graphic-RoMedic-V1.0 : Graphic Berry/Pot-Bot. Works on all servers!
10/23/2013 - RO Exploits, Hacks, Bots & Guides - 70 Replies
Dear elitepvpers-community, today I release my graphic-based Berry/Pot Bot. It works on 100% of all servers. Even on those protected by Harmony! I made it with autohotkey. This bot is a "true" Berry Bot. This means, it pots for you as soon as your HP drops below a choosen percentage. It will fit all your needs because it can be adjusted variably. Instruction: Start "Graphic-RoMedic.exe". A window appears, enter the hotkey your healing item is assigned to. For F-Keys, use {} (e.g....
[Release] (Incompleted) Django/Python server management files
12/29/2011 - Shaiya PServer Guides & Releases - 11 Replies
DOWNLOAD IS DOWN BOTTOM (AS ATTACHMENT) To put a long story short, I was going to enter the world of managing a Shaiya Private server and I saw alot of horribly coded sites, and aidsriffic ways of managing the server, so I figured.. Why not write my own way of managing the server, all from a Web control panel. The only worthy pre-existing code which someone out there (that actually knows a little about coding) is the models data which replicates the Shaiya SQL Server structure, basically...



All times are GMT +1. The time now is 17:47.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.