Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server > Metin2 PServer Guides & Strategies
You last visited: Today at 21:58

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

Advertisement



[RELEASE]Item zerstören Dialog mit erneuter Abfrage

Discussion on [RELEASE]Item zerstören Dialog mit erneuter Abfrage within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Reply
 
Old   #1


 
.UnknownUser™'s Avatar
 
elite*gold: 0
The Black Market: 100/0/1
Join Date: Jun 2011
Posts: 3,364
Received Thanks: 1,743
[RELEASE]Item zerstören Dialog mit erneuter Abfrage

Huhu,
Es geht um das Release von Mr. 'Avenue™


So wie dort releast wird das Item sofort nach dem klick auf "Zerstören" zerstört. Mit dieser "Erweiterung" oder nennen wir es Änderung hier wird nochmal gefragt, ob man das Item wirklich zerstören möchte..



An sich erstmal alles aus dem Release von Mr. 'Avenue™ so wie dort übernehmen. Die Änderungen sind wie folgt:

root/game.py

ORIGINAL:
Code:
	def RequestDestroyItem(self, answer):
		if not self.itemDropQuestionDialog:
			return

		if answer:
			dropType = self.itemDropQuestionDialog.dropType
			dropNumber = self.itemDropQuestionDialog.dropNumber

			if player.SLOT_TYPE_INVENTORY == dropType:
				if dropNumber == player.ITEM_MONEY:
					return
				else:
					self.__SendDestroyItemPacket(dropNumber)

	
		self.itemDropQuestionDialog.Close()
		self.itemDropQuestionDialog = None

		constInfo.SET_ITEM_DROP_QUESTION_DIALOG_STATUS(0)
Wird mit folgendem ersetzt:
Code:
	def RequestDestroyItem(self, answer):
		if not self.itemDropQuestionDialog:
			return

		if answer:
			dropType = self.itemDropQuestionDialog.dropType
			dropCount = self.itemDropQuestionDialog.dropCount
			dropNumber = self.itemDropQuestionDialog.dropNumber
			self.itemDropQuestionDialog.Close()
			self.itemDropQuestionDialog = None	
			questionText = "Bist du sicher?"
			itemDestroyQuestionDialog = uiCommon.QuestionDialog()
			itemDestroyQuestionDialog.SetText(questionText)
			itemDestroyQuestionDialog.SetAcceptEvent(lambda arg=True: self.RequestDestroyItemFinaly(arg))
			itemDestroyQuestionDialog.SetCancelEvent(lambda arg=False: self.RequestDestroyItemFinaly(arg))
			itemDestroyQuestionDialog.dropType = dropType
			itemDestroyQuestionDialog.dropNumber = dropNumber
			itemDestroyQuestionDialog.dropCount = dropCount
			itemDestroyQuestionDialog.Open()
			self.itemDestroyQuestionDialog = itemDestroyQuestionDialog
Zusätzlich wird eine neue Funktion unter die oben genannte Funktion hinzugefügt:
Code:
	def RequestDestroyItemFinaly(self, answer):
		if not self.itemDestroyQuestionDialog:
			return

		if answer:
			dropType = self.itemDestroyQuestionDialog.dropType
			dropNumber = self.itemDestroyQuestionDialog.dropNumber
			if player.SLOT_TYPE_INVENTORY == dropType:
				if dropNumber == player.ITEM_MONEY:
					return
				else:
					self.__SendDestroyItemPacket(dropNumber)
	
		self.itemDestroyQuestionDialog.Close()
		self.itemDestroyQuestionDialog = None

		constInfo.SET_ITEM_QUESTION_DIALOG_STATUS(0)
Wer den Text ändern möchte kann dies unter
Code:
questionText = "Bist du sicher?"
machen.

MfG
.UnknownUser™ is offline  
Thanks
16 Users
Old 11/24/2016, 22:49   #2
 
elite*gold: 0
The Black Market: 105/0/0
Join Date: May 2016
Posts: 8,679
Received Thanks: 1,638
Kann man gut gebrauchen

Danke für den RLS
悪地城 is offline  
Old 11/27/2016, 08:20   #3
 
elite*gold: 150
Join Date: Feb 2009
Posts: 643
Received Thanks: 613
Ich danke.

MfG
Cyber
Cyber36 is offline  
Old 11/27/2016, 18:18   #4
 
Martasovi2's Avatar
 
elite*gold: 0
Join Date: May 2012
Posts: 18
Received Thanks: 3
I can't click on yes or no at the confirmation dialog. Any soulution for that?
Martasovi2 is offline  
Old 11/27/2016, 23:46   #5
Trade Restricted
 
elite*gold: 0
Join Date: Jun 2013
Posts: 1,332
Received Thanks: 535
Kann man echt gut gebrauchen danke dir sehr nett!
Bostanin Edhe is offline  
Old 12/27/2016, 00:48   #6
 
elite*gold: 157
Join Date: May 2014
Posts: 504
Received Thanks: 603
Du hattest einen kleinen Fehler in deinem Code, der Teil muss ersetzt werden:


durch:


ersetzen.
DevBlade is offline  
Old 12/27/2016, 18:25   #7
 
EULOG1SON's Avatar
 
elite*gold: 0
Join Date: Jun 2013
Posts: 196
Received Thanks: 50
This is from Legend:

locale_game.py

localeinfo.py

game.py
EULOG1SON is offline  
Old 12/27/2016, 21:01   #8


 
.UnknownUser™'s Avatar
 
elite*gold: 0
The Black Market: 100/0/1
Join Date: Jun 2011
Posts: 3,364
Received Thanks: 1,743
Quote:
Originally Posted by EULOG1SON View Post
This is from Legend:

locale_game.py

localeinfo.py

game.py

Same result ..
.UnknownUser™ is offline  
Old 12/27/2016, 21:30   #9
 
EULOG1SON's Avatar
 
elite*gold: 0
Join Date: Jun 2013
Posts: 196
Received Thanks: 50
This is how should be.
EULOG1SON is offline  
Old 12/27/2016, 21:32   #10
 
elite*gold: 0
Join Date: Sep 2013
Posts: 1,527
Received Thanks: 233
Sehr nett von dir ! danke!
zeraptor is offline  
Old 01/06/2017, 11:03   #11



 
.Zitrus's Avatar
 
elite*gold: 60
Join Date: May 2013
Posts: 6,828
Received Thanks: 1,041
Sehr nett, danke für den Release!
.Zitrus is offline  
Old 03/30/2017, 22:22   #12
 
elite*gold: 0
Join Date: Dec 2016
Posts: 29
Received Thanks: 6
Nett nett aber nach dem Wegwerfen kann man kein item mehr anklicken
Titan_Phantom is offline  
Old 03/31/2017, 19:26   #13


 
.UnknownUser™'s Avatar
 
elite*gold: 0
The Black Market: 100/0/1
Join Date: Jun 2011
Posts: 3,364
Received Thanks: 1,743
Quote:
Originally Posted by Titan_Phantom View Post
Nett nett aber nach dem Wegwerfen kann man kein item mehr anklicken
Dann hast du irgendwas falsch gemacht. Bei mir geht alles wunderbar.
.UnknownUser™ is offline  
Old 03/31/2017, 20:10   #14
 
elite*gold: 0
Join Date: Dec 2016
Posts: 29
Received Thanks: 6
Ich hab es mehrmal gecheckt und ist auch richtig drin...


Kann durch Änderung der Kodierung so ein fehler kommen?
Titan_Phantom is offline  
Thanks
1 User
Old 04/01/2017, 02:43   #15


 
.UnknownUser™'s Avatar
 
elite*gold: 0
The Black Market: 100/0/1
Join Date: Jun 2011
Posts: 3,364
Received Thanks: 1,743
Poste mal bitte die Syserr ausm Client nachdem du ein Item zerstört hast und ein andere anklicken willst was ja bei dir aktuell buggt..
.UnknownUser™ is offline  
Reply


Similar Threads Similar Threads
[RELEASE] Item zerstören 'neuer Dropdialog' (Python, C++)
04/04/2019 - Metin2 PServer Guides & Strategies - 24 Replies
Screenshot http://puu.sh/kTlIn/ca41d0cbf2.jpg Serverside - C++ packet.h: sucht nach HEADER_CG_ITEM_DROP2 = 20, & fügt darunter HEADER_CG_ITEM_DESTROY = 21, ein. packet.h: sucht nach typedef struct command_item_drop2 { } TPacketCGItemDrop2; & fügt darunter typedef struct command_item_destroy
[Python-Release] Inventory Bonus Dialog
04/26/2015 - Metin2 PServer Guides & Strategies - 91 Replies
Hey e*pvper's! I saw like this window on a pic on this forum, and I wrote it for all. So I make pub is my which I wrote 3-4 or 5 hrs and I translate to english and german languages. I think not needed too big instruction for the usage, only put the files their correct places and perfect. uiinventory.py --> root files inventorywindow.py --> locale/** files (locale/**/ui/) + My little portable/injectable version, but that a new window, not inventory.
Warp Quest item abfrage
04/07/2013 - Metin2 Private Server - 7 Replies
Hey, such eine Warp quest : map XY ab level XY ITEM :XY
[Release!]NPC Dialog Creator!
07/30/2011 - CO2 PServer Guides & Releases - 11 Replies
NPC Creator Credits: xBlackPlaug3x For the Console Code ( I had permission to use the code and release after I got finished.) drakejoe67 For help when needed Me(FatalAddiction/xTwiztedKidx) Making GUI and what not. Do NOT post this on any other forum without my permission. The source coding will not be given at this time. Pictures Below. (Click Spoiler.)



All times are GMT +2. The time now is 21:58.


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