Jump to content

Recommended Posts

I got tired of pressing F1 or logging in manually every time I started the client.

So I built my own solution.

This system enables direct login from the LoginWindow using a predefined account.

It is designed for developers who frequently restart the client, repack/unpack, and test, without wasting time on repetitive login steps.

 

An optional auto-login mode is available:

Once the EXE is launched, the login is executed automatically without any hotkey.

Alternatively, login can be triggered manually via a hotkey, depending on the configuration.

 

Configuration:

DEV_AUTO_LOGIN = 1

Automatic login on startup, no hotkey required

DEV_AUTO_LOGIN = 0

Manual login via hotkey (e.g. F1)

 

Suitable for developers who want to streamline their workflow.

 

# intrologin.py

# 1.) Add at the very top, directly after the imports:
DEV_AUTO_LOGIN = 1 # 1 = no hotkey required | 0 = hotkey required


# 2.) In LoginWindow.Open() directly AFTER app.ShowCursor() insert:
if DEV_AUTO_LOGIN:
	self.DEV_QuickLogin()


# 3.) Add this at the very end of the file:
def DEV_QuickLogin(self):
	DEV_ID = "USERNAME" # enter username
	DEV_PW = "PASSWORD" # enter password

	if self.serverBoard.IsShow():
		self.__OnClickSelectServerButton()

	self.Connect(DEV_ID, DEV_PW)


def OnKeyDown(self, key):
	if key == app.DIK_F1: # DIK_F1 #F2 #F3 can be changed
		self.DEV_QuickLogin()
		return True

	return False

 

# Optional: (Automatic Enter in Character Select)

 

# introselect.py

# 1.) Add at the very top, directly after the imports:
DEV_AUTO_ENTER_CHAR = 1 # 1 = auto enter | 0 = disabled


# 2.) Search:
app.ShowCursor()

# 3.) Insert below:

if DEV_AUTO_ENTER_CHAR:
	if self.slot >= 0:
		self.SelectSlot(self.slot)
		self.StartGame()

 

  • Facepalm 1
  • Love 1
Link to comment
https://metin2.dev/topic/34417-quick-auto-login/
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.