kralhakan2009 1
kralhakan2009
Bodyguardd 1
Bodyguardd
Vahsi Uzman 1
Vahsi Uzman
noisiv 1
noisiv
Manwe Work 1
Manwe Work
Bvural41 1
Bvural41
Reklam vermek için turkmmo@gmail.com

Hesap Kayıt Sistemi [Python]

  • Konuyu başlatan Konuyu başlatan panherr
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 152
  • Görüntüleme Görüntüleme 33K
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Kodlarda sıkıntı var galiba yada bir yerde yanlış yaptım, root içerisindeki intrologin.py ve introselect.py atarsan daha iyi olur şimdiden teşekkürler
 
Arkadaşlar Öncelikle Video Koydum

Paylaşım Olarak Sanırım Herkezin Tarzına Uygun, Güzel Olacağına inanıyorum

Bu Sistemsiz Pvp Server Kalmaz Diye Düşünüyorum.




Kayıt Sistemi Yapımı: :ka19:

1. intrologin.py
2. introselect.py


1. Dosyamız Açılır.

Kod:
import os
import grp
import textTail
import uiPhaseCurtain
from binascii import unhexlify as unhex
import cPickle
import crypt

İmport Kısıma Ekleyin.

VIRTUAL_KEYBOARD_RAND_KEY = TRUE |Aratılır



Kod:
FACE_IMAGE_DICT = {
	0	: "icon/face/warrior_m.tga",
	1	: "icon/face/assassin_w.tga",
	2	: "icon/face/sura_m.tga",
	3	: "icon/face/shaman_w.tga",
	4	: "icon/face/warrior_w.tga",
	5	: "icon/face/assassin_m.tga",
	6	: "icon/face/sura_w.tga",
	7	: "icon/face/shaman_m.tga",
	
}
Atına Eklenir.

def __init__(self, stream): |içide.

net.SetAccountConnectorHandler(self) Altına


Kod:
		self.curtain = uiPhaseCurtain.PhaseCurtain()
		self.curtain.speed = 0.3
		self.curtain.Hide()
Eklenir.

self.loadingImage = None | Aratılır.

Kod:
		self.loginnedServer = None
		self.loginnedChannel = None			
		app.loggined = FALSE
Altına Eklenir.

def __del__(self): üst kısmındadır (bilgi)
def OnUpdate(self): Aratılır

Kod:
	def OnUpdate(self):
		app.UpdateGame()
		ServerStateChecker.Update()


	def OnRender(self):
		app.RenderGame()
		grp.PopState()
		grp.SetInterfaceRenderState()

		textTail.Render()
		textTail.HideAllTextTail()
Değiştirilir.

Kod:
self.__LoadLoginInfo("loginInfo.py") Satılır Aratılır ve Silinir.

global SKIP_LOGIN_PHASE içinde
self.serverBoard.Hide() Aratılır.

Kod:
				self.__RefreshAccountSystem()
Altına Eklenir.

self.connectBoard = None Aratılır.
Kod:
		self.AccountBoard = None
		self.NewAccountBoard = None
		self.showBoard = None
Altına Ekleyin.

ime.ClearExceptKey() Aratılır.
Kod:
		self.Hide()
		self.__del__()
Altına Eklenir.

self.loginExitButton = GetObject("LoginExitButton") |Aratılır..

Kod:
			###Account 
			##AccountBoard
			self.NewAccountBoard			= GetObject("NewAccountBoard")
			self.showBoard					= GetObject("ShowBoard")
			#Panher:
			self.AccidEditLine				= GetObject("Account_ID_EditLine")
			self.AccpwEditLine				= GetObject("Account_Password_EditLine")
			self.AccountSaveButton			= GetObject("SaveAccountButton")
			self.AccountBackButton			= GetObject("AccountBackButton")
			self.AccountBoard				= GetObject("AccountBoard")
			self.NewAccount1Button			= GetObject("NewAccount1Button")
			self.NewAccount2Button			= GetObject("NewAccount2Button")
			self.NewAccount3Button			= GetObject("NewAccount3Button")
			self.NewAccount4Button			= GetObject("NewAccount4Button")
			self.Account1Button				= GetObject("Account1Button")
			self.Account2Button				= GetObject("Account2Button")
			self.Account3Button				= GetObject("Account3Button")
			self.Account4Button				= GetObject("Account4Button")
			self.DeleteAccount1Button		= GetObject("DeleteAcc1Button")
			self.DeleteAccount2Button		= GetObject("DeleteAcc2Button")
			self.DeleteAccount3Button		= GetObject("DeleteAcc3Button")
			self.DeleteAccount4Button		= GetObject("DeleteAcc4Button")	
			
			##Loginlines
			self.loginBoard				= GetObject("LoginBoard")
			self.idEditLine				= GetObject("ID_EditLine")
			self.pwdEditLine			= GetObject("Password_EditLine")
			self.serverInfo				= GetObject("ConnectName")
			self.selectConnectButton	= GetObject("SelectConnectButton")
			self.loginButton			= GetObject("LoginButton")
			self.loginExitButton		= GetObject("LoginExitButton")
			
			##direclogin
			self.DirectLogin1Button				= GetObject("MemoryPg1_button")
			self.DirectLogin2Button				= GetObject("MemoryPg2_button")
			self.DirectLogin1Icon				= GetObject("MemoryPg1_icon")
			self.DirectLogin2Icon				= GetObject("MemoryPg2_icon")
			self.DirectLogin1Name				= GetObject("MemoryPg1_name_txt")
			self.DirectLogin2Name				= GetObject("MemoryPg2_name_txt")
			self.DirectLogin1Level				= GetObject("MemoryPg1_lvl_txt")
			self.DirectLogin2Level				= GetObject("MemoryPg2_lvl_txt")
			self.Delete1PgDLButton				= GetObject("DeletePg1Button")
			self.Delete2PgDLButton				= GetObject("DeletePg2Button")


Altına Ekleyin.

self.pwdEditLine.SetTabEvent(ui.__mem_func__(self.idEditLine.SetFocus)) |Aratılır..

Kod:
		##Panher:Account
		self.NewAccount1Button.SetEvent(lambda : self.__OnClickNewAccountButton(1))
		self.NewAccount2Button.SetEvent(lambda : self.__OnClickNewAccountButton(2))
		self.NewAccount3Button.SetEvent(lambda : self.__OnClickNewAccountButton(3))
		self.NewAccount4Button.SetEvent(lambda : self.__OnClickNewAccountButton(4))
		
		self.AccountBackButton.SetEvent(ui.__mem_func__(self.__OnClickAccountBackButton))
		self.AccountSaveButton.SetEvent(ui.__mem_func__(self.__OnClickAccountSaveButton))
		
		self.AccidEditLine.SetReturnEvent(ui.__mem_func__(self.AccpwEditLine.SetFocus))
		self.AccidEditLine.SetTabEvent(ui.__mem_func__(self.AccpwEditLine.SetFocus))
		self.AccpwEditLine.SetReturnEvent(ui.__mem_func__(self.__OnClickAccountSaveButton))
		self.AccpwEditLine.SetTabEvent(ui.__mem_func__(self.AccidEditLine.SetFocus))

		self.Account1Button.SetEvent(lambda : self.__OnClickAccountButton(1))
		self.Account2Button.SetEvent(lambda : self.__OnClickAccountButton(2))
		self.Account3Button.SetEvent(lambda : self.__OnClickAccountButton(3))
		self.Account4Button.SetEvent(lambda : self.__OnClickAccountButton(4))
		
		self.DeleteAccount1Button.SetEvent(lambda : self.__OnClickDeleteAccountButton(1))
		self.DeleteAccount2Button.SetEvent(lambda : self.__OnClickDeleteAccountButton(2))
		self.DeleteAccount3Button.SetEvent(lambda : self.__OnClickDeleteAccountButton(3))
		self.DeleteAccount4Button.SetEvent(lambda : self.__OnClickDeleteAccountButton(4))
		
		##DirectLogin
		self.DirectLogin1Button.SetEvent(lambda : self.__OnClickDirctLogInButton(1))
		self.DirectLogin2Button.SetEvent(lambda : self.__OnClickDirctLogInButton(2))
		
		self.Delete1PgDLButton.SetEvent(lambda : self.__OnClickDeletePgDLButton(1))
		self.Delete2PgDLButton.SetEvent(lambda : self.__OnClickDeletePgDLButton(2))

Altına Ekleyin.

self.stream.popupWindow.Open(locale.LOGIN_CONNETING, self.SetPasswordEditLineFocus, locale.UI_CANCEL)
Aratılır.

Kod:
		lastdata = {
					"lastid": id,
					"lastpwd": pwd
				}
		self.__EncryptLastLoginInfo("lastlogin.cfg", lastdata)
Eklenir. Altında 2 Kod daha Olacaktır.
self.stream.SetLoginInfo(id, pwd)
self.stream.Connect()
Bunlar normalde Olan Kodlardır Bunlara Değişiklik Yapmıyoruz.(Bilgi)


def __SetServerInfo(self, name): |Aratılır.

Kod:
	def __SaveLoginInfo(self, autoLogin, id, pwd, addr, port, addr2, port2):
		loginInfoF=open("loginsetting1.cfg", "wb");
		if not autoLogin:
			rememberData=1
		else:
			rememberData=0
		data = {
			"id": id,
			"pwd": pwd,
			"addr": addr,
			"server_name": "UniversalElements",
			"port": port,
			"account_addr": addr2,
			"account_port": port2,
			"autoSelect": 1,
			"autoLogin": autoLogin,
			"rememberData": rememberData
		}
		loginInfo = cPickle.dumps(data)
		dInfo = crypt.triple_des(unhex("F3B720EBDA328EE2190DA9DA9D212E0A8DCBD326CDACBE98"))
		cryptedInfo = dInfo.encrypt(loginInfo, " ")
		loginInfoF.write(cryptedInfo)
		loginInfoF.close()

Altına Eklenir.

def __LoadLoginInfo | Aratılır Kopmle Değiştirilmeli.

Kod:
	def __LoadLoginInfo(self, pgInfo):
		id=pgInfo.get("id", "")
		pwd=pgInfo.get("pwd", "")

		if self.IS_TEST:
			try:
				addr=pgInfo["addr"]
				port=pgInfo["port"]
				account_addr=addr
				account_port=port

				net.SetMarkServer(addr, port)
				self.__SetServerInfo(locale.CHANNEL_TEST_SERVER_ADDR % (addr, port))
			except:
				try:
					addr=serverInfo.TESTADDR["ip"]
					port=serverInfo.TESTADDR["tcp_port"]

					net.SetMarkServer(addr, port)
					self.__SetServerInfo(locale.CHANNEL_TEST_SERVER)
				except:
					import exception
					exception.Abort("LoginWindow.__LoadLoginInfo - Å×½ºÆ®¼*¹ö ÁÖ¼Ò°¡ ¾ø½À´Ï´Ù")

		else:
			addr = pgInfo["addr"]
			serverName = pgInfo.get("Panher")
			port = pgInfo.get("port", 0)
			account_addr = pgInfo["account_addr"]
			account_port = pgInfo["account_port"]

			addr=pgInfo.get("addr", "")
			port=pgInfo.get("port", 0)
			serverName = pgInfo.get("Panher")
			account_addr=pgInfo.get("account_addr", addr)
			account_port=pgInfo.get("account_port", port)

			if addr and port:
				net.SetMarkServer(addr, port)

				net.SetServerInfo(serverName)
				self.serverInfo.SetText(serverName)

		slot = pgInfo["slot"]
		isAutoLogin=pgInfo["autoLogin"]
		isAutoSelect=pgInfo["autoSelect"]

		if isAutoLogin:
			self.stream.SetCharacterSlot(slot)
			self.stream.SetConnectInfo(addr, port, account_addr, account_port)
			self.stream.isAutoLogin=isAutoLogin
			self.stream.isAutoSelect=isAutoSelect

		self.id = id
		self.pwd = pwd	
		self.loginnedServer = None
		self.loginnedChannel = None			
		app.loggined = FALSE

		if self.id and self.pwd and isAutoLogin:
			app.loggined = TRUE

		if isAutoLogin:
			self.Connect(id, pwd)

Değiştirilir.

def __OnClickMatrixAnswerCancel(self): |Aratın içinde
self.loginBoard.Show() |Aratın

Kod:
		self.__RefreshAccountSystem()
Altına Ekleyin.
def __OnClickNEWCIBNPasspodAnswerCancel(self): |Aratılır içinde
self.loginBoard.Show() | Aratılır

Kod:
			self.__RefreshAccountSystem()
Altına Eklenir.

def __OnCloseInputDialog(self): | Aratılır

Kod:
	def OnPressExitKey(self):
		if os.path.exists("lastlogin.cfg"):
			os.remove("lastlogin.cfg")

		self.stream.popupWindow.Close()
		self.stream.SetPhaseWindow(0)
		return TRUE
Altına Eklenir.

self.serverBoard.SetPosition(self.xServerBoard, self.yServerBoard) | Aratılır..
Kod:
		self.NewAccountBoard.Hide()
Altına Eklenir.

self.virtualKeyboard.Hide() |Aratılır altına

self.showBoard.Hide()
Eklenir.

elif not self.stream.isAutoLogin: Aratılır içinde
self.loginBoard.Show() Aratılır
self.__RefreshAccountSystem()
Altına Eklenir.



def __OnClickLoginButton(self): Aratın içinde

self.Connect(id, pwd) Bu Kodu Bulun Altına Verdiğim Tüm Kodları Ekleyin.

Kod:
	def __EncryptLastLoginInfo(self, fileName, data):
		loginInfoF=open(fileName, "wb");
		loginInfo = cPickle.dumps(data)
		dInfo = crypt.triple_des(unhex("F3B720EBDA328EE2190DA9DA9D212E0A8DCBD326CDACBE98"))
		cryptedInfo = dInfo.encrypt(loginInfo, " ")
		loginInfoF.write(cryptedInfo)
		loginInfoF.close()
	
	def __EncryptLoginInfo(self, fileName, data):
		datafull = {}
		if os.path.exists(fileName):
			self.__DecryptLoginInfo(fileName)
			for i in xrange(1, 5):
				if "account" + str(i) in data:
					self.decryptedLoginInfo["account" + str(i)] = data.get("account" + str(i))
					datafull = self.decryptedLoginInfo
					self.decryptedLoginInfo = None
		else:
			for i in xrange(1, 5):
				if "account" + str(i) in data:
					datafull["account" + str(i)] = data.get("account" + str(i))
		loginInfoF=open(fileName, "wb");
		loginInfo = cPickle.dumps(datafull)
		dInfo = crypt.triple_des(unhex("F3B720EBDA328EE2190DA9DA9D212E0A8DCBD326CDACBE98"))
		cryptedInfo = dInfo.encrypt(loginInfo, " ")
		loginInfoF.write(cryptedInfo)
		loginInfoF.close()
		
	def __EncryptLoginAndPgInfo(self, fileName, data):
		loginInfoF=open(fileName, "wb");
		loginInfo = cPickle.dumps(data)
		dInfo = crypt.triple_des(unhex("F3B720EBDA328EE2190DA9DA9D212E0A8DCBD326CDACBE98"))
		cryptedInfo = dInfo.encrypt(loginInfo, " ")
		loginInfoF.write(cryptedInfo)
		loginInfoF.close()
		
	def __DecryptLoginInfo(self, fileName):
		self.decryptedLoginInfo = {}
		loginInfoF=open(fileName, "rb");
		if not loginInfoF:
			return
		dInfo = crypt.triple_des(unhex("F3B720EBDA328EE2190DA9DA9D212E0A8DCBD326CDACBE98"))
		decryptedInfo = dInfo.decrypt(loginInfoF.read(), " ")
		self.decryptedLoginInfo = cPickle.loads(decryptedInfo)
		loginInfoF.close()
	
	def __OnClickDeleteAccountButton(self, index):
		self.__DecryptLoginInfo("loginsetting.cfg")
		os.remove("loginsetting.cfg")
		del self.decryptedLoginInfo["account" + str(index)]
		self.__EncryptLoginInfo("loginsetting.cfg", self.decryptedLoginInfo)
		getattr(self, "DeleteAccount" +  str(index) +"Button").Hide()
		getattr(self, "Account" +  str(index) +"Button").Hide()
		getattr(self, "NewAccount" +  str(index) +"Button").Show()
		self.decryptedLoginInfo = None
		
	def __OnClickDeletePgDLButton(self, index):
		self.__DecryptLoginInfo("loginsetting.cfg")
		os.remove("loginsetting.cfg")
		del self.decryptedLoginInfo["pg" + str(index)]
		self.__EncryptLoginAndPgInfo("loginsetting.cfg", self.decryptedLoginInfo)
		getattr(self,"DirectLogin" + str(index) + "Button").Hide()
		getattr(self,"DirectLogin" + str(index) + "Icon").Hide()
		getattr(self,"Delete" + str(index) + "PgDLButton").Hide()
		getattr(self,"DirectLogin" + str(index) + "Name").SetText("")
		getattr(self,"DirectLogin" + str(index) + "Level").SetText("")
		self.decryptedLoginInfo = None
		
	def __OnClickAccountButton(self, index):
		self.__DecryptLoginInfo("loginsetting.cfg")
		datadumped = self.decryptedLoginInfo.get("account" + str(index))
		id = datadumped.get("id", "")
		pwd = datadumped.get("pwd", "")
		self.decryptedLoginInfo = None
		
		self.Connect(id, pwd)
		
	def __OnClickDirctLogInButton(self, index):
		self.__DecryptLoginInfo("loginsetting.cfg")
		pgInfo = self.decryptedLoginInfo.get("pg" + str(index))
		self.decryptedLoginInfo = None
		
		self.__LoadLoginInfo(pgInfo)

	def __OnClickNewAccountButton(self, index):
		self.AccountIndex = index
		self.NewAccountBoard.Show()
		self.loginBoard.Hide()
		
		self.AccidEditLine.SetFocus()
		self.AccidEditLine.SetText("")
		self.AccpwEditLine.SetText("")

	def __OnClickAccountBackButton(self):
		self.NewAccountBoard.Hide()
		self.loginBoard.Show()
		self.AccidEditLine.SetText("")
		self.AccpwEditLine.SetText("")
		self.idEditLine.SetFocus()								
		self.idEditLine.SetText("")								
		self.pwdEditLine.SetText("")	
		self.AccountIndex = None		

	def __OnClickAccountSaveButton(self):
		i = self.AccountIndex
		AccountID = self.AccidEditLine.GetText()
		AccountPW = self.AccpwEditLine.GetText()
		self.AccountIndex = None
		data = { "account" + str(i) : { "id": AccountID, 
										"pwd": AccountPW } 
				}
		
		if len(AccountID)==0:
			self.PopupNotifyMessage(locale.LOGIN_INPUT_ID, self.AccidEditLine.SetFocus())
			return

		if len(AccountPW)==0:
			self.PopupNotifyMessage(locale.LOGIN_INPUT_PASSWORD, self.AccpwEditLine.SetFocus())
			return
		
		if len(data) == 0:
			return
			
	#	self.__SaveLoginInfo(1, AccountID, AccountPW, "94.23.2.112", 12201, "94.23.2.112", 12200)
			
		self.__EncryptLoginInfo("loginsetting.cfg", data)
		getattr(self, "DeleteAccount" + str(i) + "Button").Show()
		getattr(self, "Account" + str(i) + "Button").Show()
		getattr(self, "Account" + str(i) + "Button").SetText(AccountID)
		getattr(self, "NewAccount" + str(i) + "Button").Hide()
		
		self.PopupNotifyMessage(locale.LOGIN_ACCOUNT_SAVED)
		self.NewAccountBoard.Hide()
		self.loginBoard.Show()
		self.idEditLine.SetFocus()															
		self.idEditLine.SetText("")								
		self.pwdEditLine.SetText("")

	def __RefreshAccountSystem(self):
		if os.path.exists("loginsetting.cfg"):
			self.__DecryptLoginInfo("loginsetting.cfg")
			for i in xrange(1, 5):
				account = self.decryptedLoginInfo.get("account" + str(i))
				if account:
					id = account.get("id")
					getattr(self,"DeleteAccount" + str(i) + "Button").Show()
					getattr(self,"Account" + str(i) + "Button").Show()
					getattr(self,"Account" + str(i) + "Button").SetText(id)
					getattr(self,"NewAccount" + str(i) + "Button").Hide()
				else:
					getattr(self,"DeleteAccount" + str(i) + "Button").Hide()
					getattr(self,"Account" + str(i) + "Button").Hide()
					getattr(self,"NewAccount" + str(i) + "Button").Show()
			for i in xrange(1, 3):
				if "pg" + str(i) in self.decryptedLoginInfo:
					pginfo = self.decryptedLoginInfo.get("pg" + str(i))
					race = pginfo.get("race")
					name = pginfo.get("name", "")
					lvl = pginfo.get("level", "")
					getattr(self,"DirectLogin" + str(i) + "Icon").LoadImage(FACE_IMAGE_DICT[race])
					getattr(self,"DirectLogin" + str(i) + "Name").SetText(name)
					getattr(self,"DirectLogin" + str(i) + "Level").SetText("Lv " + str(lvl))
					getattr(self,"DirectLogin" + str(i) + "Button").Show()
					getattr(self,"DirectLogin" + str(i) + "Icon").Show()
					getattr(self,"Delete" + str(i) + "PgDLButton").Show()
				else:
					getattr(self,"DirectLogin" + str(i) + "Button").Hide()
					getattr(self,"DirectLogin" + str(i) + "Icon").Hide()
					getattr(self,"Delete" + str(i) + "PgDLButton").Hide()
			self.decryptedLoginInfo = None
		else:
			self.DirectLogin1Icon.Hide()
			self.DirectLogin2Icon.Hide()
			self.DirectLogin1Button.Hide()
			self.DirectLogin2Button.Hide()
			self.Delete1PgDLButton.Hide()
			self.Delete2PgDLButton.Hide()


	def __SetMapBg(self):
		iWarpX = 145202 # X Coordinate
		iWarpY = 270818 # Y Coordinate
	#	app.SetCenterPosition(0.0, 0.0, 0.0)
	#	app.SetCamera(1550.0, 15.0, 180.0, 95.0)
		app.SetCamera(2000.0, 5.0, 25.0, 0.0) #Prospettiva(Distanza Camera, Altezza Talecamera??, vertical rotation, horizontal rotation)!
		net.Warp(iWarpX, iWarpY);


	def __OnClickSelectConnectButton(self):
		self.__RefreshServerList()
		self.__OpenServerBoard()


1. Ekelemeler Bitti.

2. Eklenecek Dosyamızı Açalım.

Kod:
import os
from binascii import unhexlify as unhex
import cPickle
import crypt
import serverInfo

importların En Altına. Eklenir.

self.btnExit = GetObject("exit_button") |Aratılır..

Kod:
			self.SaveSlot1		= GetObject("SaveinSlot1_button")
			self.SaveSlot2		= GetObject("SaveinSlot2_button")
Altına Eklenir.

self.btnRight.SetEvent(ui.__mem_func__(self.IncreaseSlotIndex)) || Aratılır..
Kod:
		self.SaveSlot1.SetEvent(lambda : self.__OnClickPgSaveButton(1))
		self.SaveSlot2.SetEvent(lambda : self.__OnClickPgSaveButton(2))
Altına Eklenir.

self.chrRenderer.Show() Aratılır
return 1 Altında Bu Kod vardır.
Aşağıdaki Kodlar.


Kod:
	def __EncryptPgInfo(self, fileName, data):
		if os.path.exists(fileName):
			self.__DecryptPgInfo(fileName)
			for i in xrange(1, 3):
				if "pg" + str(i) in data:
					self.decryptedPgInfo["pg" + str(i)] = data.get("pg" + str(i))
					data = self.decryptedPgInfo
		else:
			for i in xrange(1, 3):
				if "pg" + str(i) in data:
					self.decryptedPgInfo["pg" + str(i)] = data.get("pg" + str(i))
					data = self.decryptedPgInfo
		
		loginInfoF=open(fileName, "wb");
		loginInfo = cPickle.dumps(data)
		dInfo = crypt.triple_des(unhex("F3B720EBDA328EE2190DA9DA9D212E0A8DCBD326CDACBE98"))
		cryptedInfo = dInfo.encrypt(loginInfo, " ")
		loginInfoF.write(cryptedInfo)
		loginInfoF.close()
		
	def __DecryptPgInfo(self, fileName):
		self.decryptedPgInfo = {}
		loginInfoF=open(fileName, "rb");
		if not loginInfoF:
			return
		dInfo = crypt.triple_des(unhex("F3B720EBDA328EE2190DA9DA9D212E0A8DCBD326CDACBE98"))
		decryptedInfo = dInfo.decrypt(loginInfoF.read(), " ")
		self.decryptedPgInfo = cPickle.loads(decryptedInfo)
		loginInfoF.close()
		
		
	def __OnClickPgSaveButton(self, index):

		decryptedlastLoginInfo = {}
		loginInfoF=open("lastlogin.cfg", "rb");
		if not loginInfoF:
			return
		dInfo = crypt.triple_des(unhex("F3B720EBDA328EE2190DA9DA9D212E0A8DCBD326CDACBE98"))
		decryptedInfo = dInfo.decrypt(loginInfoF.read(), " ")
		decryptedlastLoginInfo = cPickle.loads(decryptedInfo)
		loginInfoF.close()
		
		try:
			file=open("channel.inf")
			lines=file.readlines()
			
			if len(lines)>0:
				tokens=lines[0].split()

				ServerID=int(tokens[0])
				ChannelID=int(tokens[1])
				
				if len(tokens) == 3:
					regionID = int(tokens[2])

		except:
			print "LoginWindow.__LoadChannelInfo - OpenError"
			
		
			
		race=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_RACE)
		level=net.GetAccountCharacterSlotDataInteger(self.slot, net.ACCOUNT_CHARACTER_SLOT_LEVEL)
		name=net.GetAccountCharacterSlotDataString(self.slot, net.ACCOUNT_CHARACTER_SLOT_NAME)
			
		AccountID = decryptedlastLoginInfo.get("lastid")
		AccountPW = decryptedlastLoginInfo.get("lastpwd")
		Slot = self.slot
		
		Name = serverInfo.REGION_DICT[regionID][ServerID]["name"]
		
		Account_Addr = serverInfo.REGION_AUTH_SERVER_DICT[regionID][ServerID]["ip"]
		Account_Port = serverInfo.REGION_AUTH_SERVER_DICT[regionID][ServerID]["port"]
		
		Game_Addt = serverInfo.REGION_DICT[regionID][ServerID]["channel"][1]["ip"]
		Game_port = serverInfo.REGION_DICT[regionID][ServerID]["channel"][1]["tcp_port"]

		data = {"pg"+ str(index) : {
										"id": AccountID,
										"pwd": AccountPW,
										"addr": Game_Addt,
										"port": Game_port,
										"server_name": Name,
										"account_addr": Account_Addr,
										"account_port": Account_Port,
										"autoSelect": 1,
										"autoLogin": 1,
										"slot": Slot,
										"race": race,
										"level": level,
										"name": name
									}
				}

		self.__EncryptPgInfo("loginsetting.cfg", data)
		
		self.PopupNotifyMessage(locale.SELECT_PG_SAVED)
		
	def PopupNotifyMessage(self, msg, func=0):
		if not func:
			func=self.EmptyFunc

		self.stream.popupWindow.Close()
		self.stream.popupWindow.Open(msg, func, locale.UI_OK)

def MakeCharacter 'e Kadar Eklenir.


chr.PushOnceMotion(chr.MOTION_INTRO_NOT_SELECTED, 0.1)
Aratılır..

Kod:
if os.path.exists("lastlogin.cfg"):
			os.remove("lastlogin.cfg")

		self.stream.isAutoLogin = 0
		self.stream.isAutoSelect = 0
Alt Kısıma Eklenir.

if LEAVE_BUTTON_FOR_POTAL: |Aratılır içinde
self.stream.SetLoginPhase() Aratılır


Kod:
		if os.path.exists("lastlogin.cfg"):
			os.remove("lastlogin.cfg")

self.Hide() ||Kadar Eklenir.

if 4 == key: Aratılır

if 5 == key:
self.SelectSlot(3)

if 28 == key or 156 == key : |Değiştirin.

Altına eklenir.
Bitti.




Samet kardeşim güzel çalışma devamını bekleriz :)
 
Kodlarda eksiklik var, birde tab sorunu var. Kendi root'unu atarsan daha kolay yapılır diye düşünüyorum. Aksi takdirde konuyu kapatırlar.
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst