[NEW] Pagina bonusuri ( Bonus Page )

Ghiduri şi tutoriale despre cum să vă îmbunătăţiţi serverul/clientul dv. de metin2.
Neconectat
Avatar utilizator
[HF]White
Nivel 2

Nivel 2
Mesaje: 253
Membru din: 03 Iul 2018, 13:40
Localitate: Cluj - Napoca
Status: Pierd vremea ^w^
Server Metin2: Saga2- SOON
Regat: Jinno
Mulţumiri acordate: 68  
Mulţumiri primite: 33  
Contact:

[NEW] Pagina bonusuri ( Bonus Page )

Mesaj de [HF]White » 12 Mai 2020, 13:14

Salut salut ;;)

Azi am sa va prezint o pagina noua de bonusuri creata de REDDEV si modificata de mine sa arate mai estetic.


Imagine Imagine


1. Deschideti uicharacter.py din root si adaugati la import:

Cod: Selectaţi tot

#REDDEV_MULTI_BONUS_SHOWER
import item
import chat
#ENDOF_REDDEV_MULTI_BONUS_SHOWER
2. Cautati

Cod: Selectaţi tot

		self.emotionToolTip = None
		self.soloEmotionSlot = None
		self.dualEmotionSlot = None
Adaugati sub:

Cod: Selectaţi tot

		#REDDEV_MULTIBONUS_SHOW
		self.actualSubPage = 0
		#ENDOF_REDDEV_MULTIBONUS
3. Cautati

Cod: Selectaţi tot

		for i in xrange(quest.QUEST_MAX_NUM):
			self.questNameList.append(self.GetChild("Quest_Name_0" + str(i)))
			self.questLastTimeList.append(self.GetChild("Quest_LastTime_0" + str(i)))
			self.questLastCountList.append(self.GetChild("Quest_LastCount_0" + str(i)))
Adaugati sub:

Cod: Selectaţi tot

		#REDDEV_MULTIBONUS
		self.subPageText01 = ui.TextLine()
		self.subPageText01.SetPackedFontColor(0xffffffff)
		self.subPageText01.SetParent(self.GetChild("Status_Extent"))
		self.subPageText01.SetPosition(11,35)
		
		self.subPageText02 = ui.TextLine()
		self.subPageText02.SetPackedFontColor(0xffffffff)
		self.subPageText02.SetParent(self.GetChild("Status_Extent"))
		self.subPageText02.SetPosition(11,33+23+2)
		
		self.subPageText03 = ui.TextLine()
		self.subPageText03.SetPackedFontColor(0xffffffff)
		self.subPageText03.SetParent(self.GetChild("Status_Extent"))
		self.subPageText03.SetPosition(11,33+46+2)
		
		self.subPageText04 = ui.TextLine()
		self.subPageText04.SetPackedFontColor(0xffffffff)
		self.subPageText04.SetParent(self.GetChild("Status_Extent"))
		self.subPageText04.SetPosition(128,35)
		
		self.subPageText05 = ui.TextLine()
		self.subPageText05.SetPackedFontColor(0xffffffff)
		self.subPageText05.SetParent(self.GetChild("Status_Extent"))
		self.subPageText05.SetPosition(128,33+23+2)
		
		self.subPageText06 = ui.TextLine()
		self.subPageText06.SetPackedFontColor(0xffffffff)
		self.subPageText06.SetParent(self.GetChild("Status_Extent"))
		self.subPageText06.SetPosition(128,33+46+2)
		#ENDOF_REDDEV_MULTI_BONUS_SHOWER
4. Cautati

Cod: Selectaţi tot

		for titleBarValue in self.titleBarDict.itervalues():
		titleBarValue.SetCloseEvent(ui.__mem_func__(self.Hide))

		self.questSlot.SetSelectItemSlotEvent(ui.__mem_func__(self.__SelectQuest))
Adauga sub:

Cod: Selectaţi tot

		#REDDEV_MULTI_BONUS_SHOWER
		for i in xrange(5):
			self.GetChild("SubPage"+str(i)).SetEvent(ui.__mem_func__(self.switchSubPage), i)
		
	def switchSubPage(self, num):
		for i in xrange(5):
			if i!=num:
				self.GetChild("SubPage"+str(i)).SetUp()
		if num==0:
			self.subPageText01.SetText("Vit. miscare")
			self.subPageText01.Show()
			self.subPageText02.SetText("Vit. atac")
			self.subPageText02.Show()
			self.subPageText03.SetText("Vit. vraja")
			self.subPageText03.Show()
			self.subPageText04.SetText("Atac magie")
			self.subPageText04.Show()
			self.subPageText05.SetText("Ap. magie")
			self.subPageText05.Show()
			self.subPageText06.SetText("Val. eschiva")
			self.subPageText06.Show()
		elif num==1:		
			self.subPageText01.SetText("Ap. sabie")
			self.subPageText01.Show()
			self.subPageText02.SetText("Ap. 2maini")
			self.subPageText02.Show()
			self.subPageText03.SetText("Ap. pumnal")
			self.subPageText03.Show()
			self.subPageText04.SetText("Ap. sageti")
			self.subPageText04.Show()
			self.subPageText05.SetText("Ap. evantai")
			self.subPageText05.Show()
			self.subPageText06.SetText("Rez. magie")
			self.subPageText06.Show()
		elif num==2:
			self.subPageText01.SetText("Vs. semi-om")
			self.subPageText01.Show()
			self.subPageText02.SetText("Critica")
			self.subPageText02.Show()
			self.subPageText03.SetText("Patrundere")
			self.subPageText03.Show()
			self.subPageText04.SetText("Vs. monstri")
			self.subPageText04.Show()
			self.subPageText05.SetText("Blocare")
			self.subPageText05.Show()
			self.subPageText06.SetText("Otravire")
			self.subPageText06.Show()
		
		elif num==3:
			self.subPageText01.SetText("Anti war")
			self.subPageText01.Show()
			self.subPageText02.SetText("Anti ninja")
			self.subPageText02.Show()
			self.subPageText03.SetText("Anti sura")
			self.subPageText03.Show()
			self.subPageText04.SetText("Anti saman")
			self.subPageText04.Show()
			self.subPageText05.SetText("Absorb. PV")
			self.subPageText05.Show()
			self.subPageText06.SetText("Absorb. PM")
			self.subPageText06.Show()
		
		elif num==4:
			self.subPageText01.SetText("Rez. war")
			self.subPageText01.Show()
			self.subPageText02.SetText("Rez. ninja")
			self.subPageText02.Show()
			self.subPageText03.SetText("Rez. sura")
			self.subPageText03.Show()
			self.subPageText04.SetText("Rez. saman")
			self.subPageText04.Show()
			self.subPageText05.SetText("P. medie")
			self.subPageText05.Show()
			self.subPageText06.SetText("P. comp.")
			self.subPageText06.Show()
		
		if num < 0 or num > 4:
			num = 0
		self.actualSubPage = num
		self.RefreshStatus()
	#ENDOF_REDDEV_MULTI_BONUS_SHOWER
5. Cautati:

Cod: Selectaţi tot

			self.GetChild("MATT_Value").SetText(self.__GetTotalMagAtkText())
			#self.GetChild("MATT_Value").SetText(str(player.GetStatus(player.MAG_ATT)))

			self.GetChild("MDEF_Value").SetText(str(player.GetStatus(player.MAG_DEF)))
			self.GetChild("ASPD_Value").SetText(str(player.GetStatus(player.ATT_SPEED)))
			self.GetChild("MSPD_Value").SetText(str(player.GetStatus(player.MOVING_SPEED)))
			self.GetChild("CSPD_Value").SetText(str(player.GetStatus(player.CASTING_SPEED)))
			self.GetChild("ER_Value").SetText(str(player.GetStatus(player.EVADE_RATE)))
Inlocuieste cu:

Cod: Selectaţi tot

			#REDDEV_MULTI_BONUS_SHOWER
			#self.GetChild("MATT_Value").SetText(self.__GetTotalMagAtkText())
			#self.GetChild("MATT_Value").SetText(str(player.GetStatus(player.MAG_ATT)))

			#self.GetChild("MDEF_Value").SetText(str(player.GetStatus(player.MAG_DEF)))
			#self.GetChild("ASPD_Value").SetText(str(player.GetStatus(player.ATT_SPEED)))
			#self.GetChild("MSPD_Value").SetText(str(player.GetStatus(player.MOVING_SPEED)))
			#self.GetChild("CSPD_Value").SetText(str(player.GetStatus(player.CASTING_SPEED)))
			#self.GetChild("ER_Value").SetText(str(player.GetStatus(player.EVADE_RATE)))
			
			if self.actualSubPage == 0:
				self.GetChild("MATT_Value").SetText(self.__GetTotalMagAtkText())
				self.GetChild("MDEF_Value").SetText(str(player.GetStatus(player.MAG_DEF)))
				self.GetChild("ASPD_Value").SetText(str(player.GetStatus(player.ATT_SPEED)))
				self.GetChild("MSPD_Value").SetText(str(player.GetStatus(player.MOVING_SPEED)))
				self.GetChild("CSPD_Value").SetText(str(player.GetStatus(player.CASTING_SPEED)))
				self.GetChild("ER_Value").SetText(str(player.GetStatus(player.EVADE_RATE)))
			elif self.actualSubPage == 1:
				self.GetChild("MSPD_Value").SetText(str(player.GetStatus(69)) + str("%")) #Resist sword
				self.GetChild("ASPD_Value").SetText(str(player.GetStatus(70)) + str("%")) #Resist 2hand
				self.GetChild("CSPD_Value").SetText(str(player.GetStatus(71)) + str("%")) #Resist dagger
				self.GetChild("MATT_Value").SetText(str(player.GetStatus(74)) + str("%")) #Resist bow
				self.GetChild("MDEF_Value").SetText(str(player.GetStatus(73)) + str("%")) #Resist fan
				self.GetChild("ER_Value").SetText(str(player.GetStatus(77)) + str("%")) #Resist magic
			elif self.actualSubPage == 2:
				self.GetChild("MSPD_Value").SetText(str(player.GetStatus(43)) + str("%")) #Anti semi-om
				self.GetChild("ASPD_Value").SetText(str(player.GetStatus(40)) + str("%")) #Critical chance
				self.GetChild("CSPD_Value").SetText(str(player.GetStatus(41)) + str("%")) #Penetrate chance
				self.GetChild("MATT_Value").SetText(str(player.GetStatus(53)) + str("%")) #Anti mobs
				self.GetChild("MDEF_Value").SetText(str(player.GetStatus(38)) + str("%")) #Stun chance
				self.GetChild("ER_Value").SetText(str(player.GetStatus(37)) + str("%")) #Poison chance
			
			elif self.actualSubPage == 3:
				self.GetChild("MSPD_Value").SetText(str(player.GetStatus(54)) + str("%")) #Anti Warrior
				self.GetChild("ASPD_Value").SetText(str(player.GetStatus(55)) + str("%")) #Anti Ninja
				self.GetChild("CSPD_Value").SetText(str(player.GetStatus(56)) + str("%")) #Anti sura
				self.GetChild("MATT_Value").SetText(str(player.GetStatus(57)) + str("%")) #Anti shaman
				self.GetChild("MDEF_Value").SetText(str(player.GetStatus(63)) + str("%")) #HP Steal
				self.GetChild("ER_Value").SetText(str(player.GetStatus(64)) + str("%")) #SP Steal
				
			elif self.actualSubPage == 4:
				self.GetChild("MSPD_Value").SetText(str(player.GetStatus(59)) + str("%")) #Res warrior
				self.GetChild("ASPD_Value").SetText(str(player.GetStatus(60)) + str("%")) #res Ninja
				self.GetChild("CSPD_Value").SetText(str(player.GetStatus(61)) + str("%")) #res sura
				self.GetChild("MATT_Value").SetText(str(player.GetStatus(62)) + str("%")) #res shaman
				self.GetChild("MDEF_Value").SetText(str(player.GetStatus(122)) + str("%")) #Block
				self.GetChild("ER_Value").SetText(str(player.GetStatus(121)) + str("%")) #Paguba Medie
			else:
				pass
			#ENDOF_REDDEV_MULTI_BONUS_SHOWER
6. Cauta def Show(self): si adauga in def astea:

Cod: Selectaţi tot

		self.subPageText01.SetText("Vit. miscare")
		self.subPageText01.Show()
		self.subPageText02.SetText("Vit. atac")
		self.subPageText02.Show()
		self.subPageText03.SetText("Vit. vraja")
		self.subPageText03.Show()
		self.subPageText04.SetText("Atac magie")
		self.subPageText04.Show()
		self.subPageText05.SetText("Ap. magie")
		self.subPageText05.Show()
		self.subPageText06.SetText("Val. eschiva")
		self.subPageText06.Show()
7. Deschideti characterwindow.py din uiscript si stergeti aceste 2 randuri:

Cod: Selectaţi tot

								{"name":"Status_Extent_ItemList1", "type" : "image", "x":11, "y":31, "image" : LOCALE_PATH+"label_ext_item1.sub", },
								{"name":"Status_Extent_ItemList2", "type" : "image", "x":128, "y":32, "image" : LOCALE_PATH+"label_ext_item2.sub", },
Dupa care cautati:

Cod: Selectaţi tot

								{ "name":"Status_Extent_Bar", "type":"horizontalbar", "x":12, "y":6, "width":223, },
								{ "name":"Status_Extent_Label", "type" : "image", "x" : 13, "y" : 8, "image" : LOCALE_PATH+"label_ext.sub", },

Si adaugi sub:

Cod: Selectaţi tot

								#REDDEV_MULTIBONUS_SHOW
								{ "name" : "SubPage0", "type" : "radio_button", "x" : 130+14, "y" : 8, "text" : "1", "text_color" : 0xFFFFE3AD,
									"default_image" : "d:/ymir work/ui/subpgbtnnorm.tga",
									"over_image" : "d:/ymir work/ui/subpgbtnhov.tga",
									"down_image" : "d:/ymir work/ui/subpgbtnpress.tga",
								},
								{ "name" : "SubPage1", "type" : "radio_button", "x" : 148+14, "y" : 8, "text" : "2", "text_color" : 0xFFFFE3AD,
									"default_image" : "d:/ymir work/ui/subpgbtnnorm.tga",
									"over_image" : "d:/ymir work/ui/subpgbtnhov.tga",
									"down_image" : "d:/ymir work/ui/subpgbtnpress.tga",
								},
								{ "name" : "SubPage2", "type" : "radio_button", "x" : 166+14, "y" : 8, "text" : "3", "text_color" : 0xFFFFE3AD,
									"default_image" : "d:/ymir work/ui/subpgbtnnorm.tga",
									"over_image" : "d:/ymir work/ui/subpgbtnhov.tga",
									"down_image" : "d:/ymir work/ui/subpgbtnpress.tga",
								},
								{ "name" : "SubPage3", "type" : "radio_button", "x" : 184+14, "y" : 8, "text" : "4", "text_color" : 0xFFFFE3AD,
									"default_image" : "d:/ymir work/ui/subpgbtnnorm.tga",
									"over_image" : "d:/ymir work/ui/subpgbtnhov.tga",
									"down_image" : "d:/ymir work/ui/subpgbtnpress.tga",
								},
								{ "name" : "SubPage4", "type" : "radio_button", "x" : 202+14, "y" : 8, "text" : "5", "text_color" : 0xFFFFE3AD,
									"default_image" : "d:/ymir work/ui/subpgbtnnorm.tga",
									"over_image" : "d:/ymir work/ui/subpgbtnhov.tga",
									"down_image" : "d:/ymir work/ui/subpgbtnpress.tga",
								},
								#ENDOF_REDDEV_MULTIBONUS_SHOW
Ultima oară modificat 12 Mai 2020, 15:35 de către [HF]White, modificat de 9 ori în total.
Pentru acest mesaj, [HF]White for the post:
Vicentiu Costi
Aproape 3,000 abonati!! Hai si tu :x



Neconectat
Avatar utilizator
[HF]White
Nivel 2

Nivel 2
Mesaje: 253
Membru din: 03 Iul 2018, 13:40
Localitate: Cluj - Napoca
Status: Pierd vremea ^w^
Server Metin2: Saga2- SOON
Regat: Jinno
Mulţumiri acordate: 68  
Mulţumiri primite: 33  
Contact:

Re: [NEW] Pagina bonusuri

Mesaj de [HF]White » 12 Mai 2020, 15:16

updated - am adaugat si tab-urile corect
Aproape 3,000 abonati!! Hai si tu :x



Neconectat
Avatar utilizator
Mr1Perfect
Nivel 1

Nivel 1
Mesaje: 149
Membru din: 26 Mai 2018, 14:54
Status: Sunt bine mersi
Server Metin2: Metin
Regat: Chunjo
Mulţumiri acordate: 179  
Mulţumiri primite: 7  
Discord: MrPerfect #7059

Re: [NEW] Pagina bonusuri ( Bonus Page )

Mesaj de Mr1Perfect » 18 Iul 2020, 15:25

Nu merge...

Conectat
Avatar utilizator
FineteMt2
Nou Venit
Nou Venit
Mesaje: 20
Membru din: 30 Iul 2020, 19:08
Status: Sunt bine mersi
Server Metin2: Metin2
Regat: Jinno
Mulţumiri acordate: 12  
Mulţumiri primite: 1  

Re: [NEW] Pagina bonusuri ( Bonus Page )

Mesaj de FineteMt2 » 30 Iul 2020, 19:50

Nu deschide pagina de bonusuri bro

Neconectat
Avatar utilizator
[HF]White
Nivel 2

Nivel 2
Mesaje: 253
Membru din: 03 Iul 2018, 13:40
Localitate: Cluj - Napoca
Status: Pierd vremea ^w^
Server Metin2: Saga2- SOON
Regat: Jinno
Mulţumiri acordate: 68  
Mulţumiri primite: 33  
Contact:

Re: [NEW] Pagina bonusuri ( Bonus Page )

Mesaj de [HF]White » 30 Iul 2020, 20:16

FineteMt2 scrie:
30 Iul 2020, 19:50
Nu deschide pagina de bonusuri bro
lasa un syserr si rezolvam
Aproape 3,000 abonati!! Hai si tu :x



Scrie răspuns

Înapoi la “Ghiduri şi Tutoriale”