Jump to content
Maintenance ×
×
×
  • Create New...

Save Account System


Recommended Posts

M2 Download Center

This is the hidden content, please
( Internal )

Spoiler

172914Immagine.png.671f47d6a3e25201df714


Extract root and open intrologin.py
At the beginning add:

import os
from _winreg import *


Search:

self.loginExitButton        = GetObject("LoginExitButton")


Add:

            self.saveLoginButton        = GetObject("SaveLoginButton")
            self.loadCredentialButton    = GetObject("LoadCredentials")


Finally at the end add:
 

def ICDev_ECRYPT(self,data):
        Data = ''
        for l in data:
            Data = Data+str(int(ord(l) + 2) * 2)+' '
        return Data

    def ICDev_DECRYPT(self,data):
        Data = ''
        data = data.split()
        for l in data:
            Data = Data+chr((int(l) / 2) - 2)
        return Data
 
    def __OnClickSaveLoginButton(self):
        id = self.idEditLine.GetText()
        pwd = self.pwdEditLine.GetText()
        if (len(id) != 0 and len(pwd) != 0):
            if not os.path.exists("SOFTWARE\ICDev"):
                key = CreateKey(HKEY_CURRENT_USER,"SOFTWARE\ICDev")
            SetValueEx(key, "UserID", 0, REG_SZ, self.ICDev_ECRYPT(id))
            SetValueEx(key, "Passwd", 0, REG_SZ, self.ICDev_ECRYPT(pwd))
            CloseKey(key)
            self.PopupNotifyMessage("Datele au fost salvate!",self.SetIDEditLineFocus)
 
 
    def __OnClickLoadInfoButton(self):
        try:
            key = OpenKey(HKEY_CURRENT_USER, "SOFTWARE\ICDev", 0, KEY_ALL_ACCESS)
            self.Connect(self.ICDev_DECRYPT(QueryValueEx(key, "UserID")[0]),self.ICDev_DECRYPT(QueryValueEx(key, "Passwd")[0]))
        except:
            self.PopupNotifyMessage("Nu exista nici un account salvat!",self.SetIDEditLineFocus)


Extract locale_xx and open loginwindow.py
Search:
 

"text" : uiScriptLocale.LOGIN_CONNECT,
                },
            ),
        },

Add: 

        ## userDataBoard
        {
            "name" : "UserDataBoard",
            "type" : "thinboard",

            "x" : (SCREEN_WIDTH - 208) / 2,
            "y" : (SCREEN_HEIGHT - 355),
            "width" : 205,
            "height" : 55,

            "children" :
            (
                {
                    "name" : "SaveLoginButton",
                    "type" : "button",

                    "x" : 10,
                    "y" : 0,
                    "vertical_align" : "center",
                    "default_image" : "d:/ymir work/ui/public/large_button_01.sub",
                   
                    "over_image" : "d:/ymir work/ui/public/large_button_02.sub",
                    "down_image" : "d:/ymir work/ui/public/large_button_03.sub",

                    "text" : uiScriptLocale.LOGIN_SAVE_BUTTON,
                },
                {
                    "name" : "LoadCredentials",
                    "type" : "button",

                    "x" : 105,
                    "y" : 0,
                    "vertical_align" : "center",
                    "default_image" : "d:/ymir work/ui/public/large_button_01.sub",
                   
                    "over_image" : "d:/ymir work/ui/public/large_button_02.sub",
                    "down_image" : "d:/ymir work/ui/public/large_button_03.sub",

                    "text" : uiScriptLocale.LOGIN_LOAD_BUTTON,
                },
            ),
        },

In local_interface.txt (local_xx) add:

LOGIN_SAVE_BUTTON Save 
LOGIN_LOAD_BUTTON Load 

Now add in YourClient/lib: 

This is the hidden content, please

  • Metin2 Dev 51
  • kekw 1
  • Love 20
  • Love 2
  • Good 17
  • Scream 1
  • Think 2
  • Smile Tear 1
  • Confused 1
  • Angry 2
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

i have the error:

1126 11:28:00353 ::   File "
1126 11:28:00353 :: introLogin.py
1126 11:28:00353 :: ", line
1126 11:28:00353 :: 1376
1126 11:28:00353 ::

1126 11:28:00353 ::     
1126 11:28:00353 :: Data = ''

1126 11:28:00353 ::     
1126 11:28:00353 ::  
1126 11:28:00353 ::  
1126 11:28:00353 ::  
1126 11:28:00353 :: ^

1126 11:28:00353 :: IndentationError
1126 11:28:00353 :: :
1126 11:28:00353 :: expected an indented block
1126 11:28:00353 ::

 

Link to comment
Share on other sites

  • 3 months later...
  • 1 year later...

Under:


		self.pwdEditLine.SetTabEvent(ui.__mem_func__(self.idEditLine.SetFocus))

Add:


		self.saveLoginButton.SetEvent(ui.__mem_func__(self.__OnClickSaveLoginButton))
		self.loadCredentialButton.SetEvent(ui.__mem_func__(self.__OnClickLoadInfoButton))

 

Link to comment
Share on other sites

  • 2 years later...

I did all the copy & paste stuff. But dont know where do I put the winreg.pyc data? 

17 minutes ago, Historia said:

I did all the copy & paste stuff. But dont know where do I put the winreg.pyc data? 

Now the Client shut downs, I did put the winreg in filezilla usr/home/game/quest..

Link to comment
Share on other sites

  • Distinguished Member
Posted (edited)
2 hours ago, Historia said:

I did all the copy & paste stuff. But dont know where do I put the winreg.pyc data? 

Now the Client shut downs, I did put the winreg in filezilla usr/home/game/quest..

why did you put it on serverside, when it is a clientside thing?

Anyway put it to the lib folder clientside (or even root should work).

Edited by TMP4
Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
0306 07:25:00721 :: Traceback (most recent call last):

0306 07:25:00721 ::   File "introLogo.py", line 60, in OnUpdate

0306 07:25:00721 ::   File "networkModule.py", line 177, in SetLoginPhase

0306 07:25:00721 ::   File "system.py", line 130, in __pack_import

0306 07:25:00721 ::   File "
0306 07:25:00721 :: <string>
0306 07:25:00721 :: ", line 
0306 07:25:00721 :: 530
0306 07:25:00722 :: 

0306 07:25:00722 ::     
0306 07:25:00722 :: self.saveLoginButton        = GetObject("SaveLoginButton")

0306 07:25:00722 ::     
0306 07:25:00722 ::  
0306 07:25:00722 ::  
0306 07:25:00722 ::  
0306 07:25:00722 ::  
0306 07:25:00722 ::  
0306 07:25:00722 ::  
0306 07:25:00722 ::  
0306 07:25:00722 ::  
0306 07:25:00722 ::  
0306 07:25:00722 ::  
0306 07:25:00722 ::  
0306 07:25:00722 ::  
0306 07:25:00722 ::  
0306 07:25:00723 ::  
0306 07:25:00723 ::  
0306 07:25:00723 ::  
0306 07:25:00723 ::  
0306 07:25:00723 ::  
0306 07:25:00723 ::  
0306 07:25:00723 ::  
0306 07:25:00723 ::  
0306 07:25:00723 ::  
0306 07:25:00723 ::  
0306 07:25:00723 ::  
0306 07:25:00723 ::  
0306 07:25:00723 ::  
0306 07:25:00723 ::  
0306 07:25:00723 ::  
0306 07:25:00723 ::  
0306 07:25:00723 ::  
0306 07:25:00723 ::  
0306 07:25:00723 ::  
0306 07:25:00724 ::  
0306 07:25:00724 ::  
0306 07:25:00724 ::  
0306 07:25:00724 ::  
0306 07:25:00724 ::  
0306 07:25:00724 ::  
0306 07:25:00724 ::  
0306 07:25:00724 ::  
0306 07:25:00724 ::  
0306 07:25:00724 ::  
0306 07:25:00724 ::  
0306 07:25:00724 ::  
0306 07:25:00724 ::  
0306 07:25:00724 ::  
0306 07:25:00724 ::  
0306 07:25:00724 ::  
0306 07:25:00724 ::  
0306 07:25:00724 ::  
0306 07:25:00724 ::  
0306 07:25:00725 ::  
0306 07:25:00725 ::  
0306 07:25:00725 ::  
0306 07:25:00725 ::  
0306 07:25:00725 ::  
0306 07:25:00725 ::  
0306 07:25:00725 :: ^

0306 07:25:00725 :: IndentationError
0306 07:25:00725 :: : 
0306 07:25:00725 :: unindent does not match any outer indentation level
0306 07:25:00725 :: 

I have blackscreen and this says my client syserr.txt

 

Link to comment
Share on other sites

  • 1 month later...

 With tabs, working for me.

Spoiler

spacer.png

Extract root and open intrologin.py
At the beginning add:

import os
from _winreg import *


Search:

self.loginExitButton		= GetObject("LoginExitButton")


Add:

			self.saveLoginButton		= GetObject("SaveLoginButton")
			self.loadCredentialButton	= GetObject("LoadCredentials")

 

Search

self.pwdEditLine.SetTabEvent(ui.__mem_func__(self.idEditLine.SetFocus))

Add:

self.saveLoginButton.SetEvent(ui.__mem_func__(self.__OnClickSaveLoginButton))
self.loadCredentialButton.SetEvent(ui.__mem_func__(self.__OnClickLoadInfoButton))


Finally at the end add:
 

	def ICDev_ECRYPT(self,data):
		Data = ''
		for l in data:
			Data = Data+str(int(ord(l) + 2) * 2)+' '
		return Data

	def ICDev_DECRYPT(self,data):
		Data = ''
		data = data.split()
		for l in data:
			Data = Data+chr((int(l) / 2) - 2)
		return Data
 
	def __OnClickSaveLoginButton(self):
		id = self.idEditLine.GetText()
		pwd = self.pwdEditLine.GetText()
		if (len(id) != 0 and len(pwd) != 0):
			if not os.path.exists("SOFTWARE\ICDev"):
				key = CreateKey(HKEY_CURRENT_USER,"SOFTWARE\ICDev")
			SetValueEx(key, "UserID", 0, REG_SZ, self.ICDev_ECRYPT(id))
			SetValueEx(key, "Passwd", 0, REG_SZ, self.ICDev_ECRYPT(pwd))
			CloseKey(key)
			self.PopupNotifyMessage("Saved successfully.",self.SetIDEditLineFocus)
            
	def __OnClickLoadInfoButton(self):
		try:
			key = OpenKey(HKEY_CURRENT_USER, "SOFTWARE\ICDev", 0, KEY_ALL_ACCESS)
			self.Connect(self.ICDev_DECRYPT(QueryValueEx(key, "UserID")[0]),self.ICDev_DECRYPT(QueryValueEx(key, "Passwd")[0]))
		except:
			self.PopupNotifyMessage("Save before load.",self.SetIDEditLineFocus)


Extract locale_xx and open loginwindow.py
Search:
 

					"text" : uiScriptLocale.LOGIN_EXIT,
				},
			),
		},

Add: 

		## userDataBoard
		{
			"name" : "UserDataBoard",
			"type" : "thinboard",

			"x" : (SCREEN_WIDTH - 208) / 2,
			"y" : (SCREEN_HEIGHT - 410 - 70),
			"width" : 208,
			"height" : 35,

			"children" :
			(
				{
					"name" : "SaveLoginButton",
					"type" : "button",

					"x" : 10,
					"y" : 0,
					"vertical_align" : "center",
					"default_image" : "d:/ymir work/ui/public/large_button_01.sub",
				   
					"over_image" : "d:/ymir work/ui/public/large_button_02.sub",
					"down_image" : "d:/ymir work/ui/public/large_button_03.sub",

					"text" : uiScriptLocale.LOGIN_SAVE_BUTTON,
				},
				{
					"name" : "LoadCredentials",
					"type" : "button",

					"x" : 105,
					"y" : 0,
					"vertical_align" : "center",
					"default_image" : "d:/ymir work/ui/public/large_button_01.sub",
				   
					"over_image" : "d:/ymir work/ui/public/large_button_02.sub",
					"down_image" : "d:/ymir work/ui/public/large_button_03.sub",

					"text" : uiScriptLocale.LOGIN_LOAD_BUTTON,
				},
			),
		},

In local_interface.txt (local_xx) add:

LOGIN_SAVE_BUTTON	Save
LOGIN_LOAD_BUTTON	Load
Edited by Sparta21
Link to comment
Share on other sites

  • 1 month later...

Hello i have this problem please help me
 

0609 20:19:00880 :: 
introLogin.py(line:533) __LoadScript
ui.py(line:2704) GetChild

LoginWindow.__LoadScript.BindObject - <type 'exceptions.KeyError'>:'SaveLoginButton'

0609 20:19:00880 :: ============================================================================================================
0609 20:19:00880 :: Abort!!!!
 

Link to comment
Share on other sites

  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.


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.