[Release]Seonu2 Inventar Design + Buttons + Quests

03/16/2015 01:38 Fydes#1
Hi,
da die Anfrage auf das Inventar Design und die Buttons von Seonu2 doch sehr hoch waren, release ich es euch komplett.

[Only registered and activated users can see links. Click Here To Register...]


inventorywindow.py
Code:
import uiScriptLocale
import item
 
EQUIPMENT_START_INDEX = 180
 
window = {
	"name" : "InventoryWindow",
 
	## 600 - (width + ????? ?? ??? 24 px)
	"x" : SCREEN_WIDTH - 340,
	"y" : SCREEN_HEIGHT - 37 - 350,
 
	"style" : ("movable", "float",),
 
	"width" : 340,
	"height" : 350,
 
	"children" :
	(
		## Inventory, Equipment Slots
		{
			"name" : "board",
			"type" : "board",
			"style" : ("attach",),
 
			"x" : 0,
			"y" : 0,
 
			"width" : 340,
			"height" : 350,
 
			"children" :
			(
				## Title
				{
					"name" : "TitleBar",
					"type" : "titlebar",
					"style" : ("attach",),
 
					"x" : 8,
					"y" : 7,
 
					"width" : 325,
					"color" : "yellow",
 
					"children" :
					(
						{ "name":"TitleName", "type":"text", "x":155, "y":3, "text":uiScriptLocale.INVENTORY_TITLE, "text_horizontal_align":"center" },
					),
				},
					## LagerButton
				{
					"name" : "LagerButton",
					"type" : "button",
							
					"x" : 10,
					"y" : 265,
							
					"tooltip_text" : uiScriptLocale.LAGER_TITLE,
							
					"default_image" : "d:/ymir work/ui/seonu2/lager_button.tga",
					"over_image" : "d:/ymir work/ui/seonu2/lager_button_hover.tga",
					"down_image" : "d:/ymir work/ui/seonu2/lager_button_hover.tga",
				},
					## Yang Anzeige
				{
					"name" : "YangAnzeige",
					"type" : "button",
					
					"x" : 50,
					"y" : 265,
					
					"tooltip_text" : "Yang-Anzeige",
					
					"default_image" : "d:/ymir work/ui/seonu2/y_anzeige.tga",
					"over_image" : "d:/ymir work/ui/seonu2/y_anzeige_hover.tga",
					"down_image" : "d:/ymir work/ui/seonu2/y_anzeige_hover.tga",					
				},
					## Anti Exp
				{
					"name" : "AntiEXP",
					"type" : "button",
					
					"x" : 90,
					"y" : 265,
					
					"tooltip_text" : "Anti-EXP",
					
					"default_image" : "d:/ymir work/ui/seonu2/antiexp.tga",
					"over_image" : "d:/ymir work/ui/seonu2/antiexp_hover.tga",
					"down_image" : "d:/ymir work/ui/seonu2/antiexp_hover.tga",					
				},
					## Portring
				{
					"name" : "Portring",
					"type" : "button",
					
					"x" : 130,
					"y" : 265,
					
					"tooltip_text" : "Warp-Ring",
					
					"default_image" : "d:/ymir work/ui/seonu2/warpring.tga",
					"over_image" : "d:/ymir work/ui/seonu2/warpring_hover.tga",
					"down_image" : "d:/ymir work/ui/seonu2/warpring_hover.tga",					
				},
					## Equipment Slot
				{
					"name" : "Equipment_Base",
					"type" : "image",
 
					"x" : 10,
					"y" : 33,
 
					"image" : "d:/ymir work/ui/game/windows/equipment_base.sub",
 
					"children" :
					(
 
						{
							"name" : "EquipmentSlot",
							"type" : "slot",
 
							"x" : 3,
							"y" : 3,
 
							"width" : 150,
							"height" : 182,
 
							"slot" : (
										{"index":EQUIPMENT_START_INDEX+0, "x":39, "y":37, "width":32, "height":64},
										{"index":EQUIPMENT_START_INDEX+1, "x":39, "y":2, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+2, "x":39, "y":145, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+3, "x":75, "y":67, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+4, "x":3, "y":3, "width":32, "height":96},
										{"index":EQUIPMENT_START_INDEX+5, "x":114, "y":84, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+6, "x":114, "y":52, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+7, "x":2, "y":113, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+8, "x":75, "y":113, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+9, "x":114, "y":1, "width":32, "height":32},
										{"index":EQUIPMENT_START_INDEX+10, "x":75, "y":35, "width":32, "height":32},
										## ? ??1
										##{"index":item.EQUIPMENT_RING1, "x":2, "y":106, "width":32, "height":32},
										## ? ??2
										##{"index":item.EQUIPMENT_RING2, "x":75, "y":106, "width":32, "height":32},
										## ? ??
									),
						},
						## Dragon Soul Button
						
						## MallButton
						{
							"name" : "MallButton",
							"type" : "button",
 
							"x" : 118,
							"y" : 148,
 
							"tooltip_text" : uiScriptLocale.MALL_TITLE,
 
							"default_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_01.tga",
							"over_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_02.tga",
							"down_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_03.tga",
						},
							## CostumeButton
						{
							"name" : "CostumeButton",
							"type" : "button",
 
							"x" : 78,
							"y" : 5,
 
							"tooltip_text" : uiScriptLocale.COSTUME_TITLE,
 
							"default_image" : "d:/ymir work/ui/game/taskbar/costume_Button_01.tga",
							"over_image" : "d:/ymir work/ui/game/taskbar/costume_Button_02.tga",
							"down_image" : "d:/ymir work/ui/game/taskbar/costume_Button_03.tga",
						},                      
						{
							"name" : "Equipment_Tab_01",
							"type" : "radio_button",
 
							"x" : 86,
							"y" : 161,
 
							"default_image" : "d:/ymir work/ui/game/windows/tab_button_small_01.sub",
							"over_image" : "d:/ymir work/ui/game/windows/tab_button_small_02.sub",
							"down_image" : "d:/ymir work/ui/game/windows/tab_button_small_03.sub",
 
							"children" :
							(
								{
									"name" : "Equipment_Tab_01_Print",
									"type" : "text",
 
									"x" : 0,
									"y" : 0,
 
									"all_align" : "center",
 
									"text" : "I",
								},
							),
						},
						{
							"name" : "Equipment_Tab_02",
							"type" : "radio_button",
 
							"x" : 86 + 32,
							"y" : 161,
 
							"default_image" : "d:/ymir work/ui/game/windows/tab_button_small_01.sub",
							"over_image" : "d:/ymir work/ui/game/windows/tab_button_small_02.sub",
							"down_image" : "d:/ymir work/ui/game/windows/tab_button_small_03.sub",
 
							"children" :
							(
								{
									"name" : "Equipment_Tab_02_Print",
									"type" : "text",
 
									"x" : 0,
									"y" : 0,
 
									"all_align" : "center",
 
									"text" : "II",
								},
							),
						},
 
					),
				},
 
				{
					"name" : "Inventory_Tab_01",
					"type" : "radio_button",
 
					"x" : 10,
					"y" : 33 + 189,
 
					"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub",
					"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub",
					"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub",
					"tooltip_text" : "Inventar I",
 
					"children" :
					(
						{
							"name" : "Inventory_Tab_01_Print",
							"type" : "text",
 
							"x" : 0,
							"y" : 0,
 
							"all_align" : "center",
 
							"text" : "I",
						},
					),
				},
				{
					"name" : "Inventory_Tab_02",
					"type" : "radio_button",
 
					"x" : 10 + 78,
					"y" : 33 + 189,
 
					"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub",
					"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub",
					"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub",
					"tooltip_text" : "Inventar II",
 
					"children" :
					(
						{
							"name" : "Inventory_Tab_02_Print",
							"type" : "text",
 
							"x" : 0,
							"y" : 0,
 
							"all_align" : "center",
 
							"text" : "II",
						},
					),
				},
				{
					"name" : "Inventory_Tab_03",
					"type" : "radio_button",
 
					"x" : 10,
					"y" : 33 + 210,
 
					"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub",
					"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub",
					"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub",
					"tooltip_text" : "Inventar III",
 
					"children" :
					(
						{
							"name" : "Inventory_Tab_03_Print",
							"type" : "text",
 
							"x" : 0,
							"y" : 0,
 
							"all_align" : "center",
 
							"text" : "III",
						},
					),
				},
				{
					"name" : "Inventory_Tab_04",
					"type" : "radio_button",
 
					"x" : 10 + 78,
					"y" : 33 + 210,
 
					"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub",
					"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub",
					"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub",
					"tooltip_text" : "Inventar IV",
 
					"children" :
					(
						{
							"name" : "Inventory_Tab_04_Print",
							"type" : "text",
 
							"x" : 0,
							"y" : 0,
 
							"all_align" : "center",
 
							"text" : "IV",
						},
					),
				},              
 
				## Item Slot
				{
					"name" : "ItemSlot",
					"type" : "grid_table",
 
					"x" : 170,
					"y" : 33,
 
					"start_index" : 0,
					"x_count" : 5,
					"y_count" : 9,
					"x_step" : 32,
					"y_step" : 32,
 
					"image" : "d:/ymir work/ui/public/Slot_Base.sub"
				},
 
				## Print
				{
					"name":"Money_Slot",
					"type":"button",
 
					"x":30,
					"y":28,
 
					"vertical_align":"bottom",
 
					"default_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
					"over_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
					"down_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
 
					"children" :
					(
						{
							"name":"Money_Icon",
							"type":"image",
 
							"x":-18,
							"y":2,
 
							"image":"d:/ymir work/ui/game/windows/money_icon.sub",
						},

						{
							"name" : "Money",
							"type" : "text",
 
							"x" : 3,
							"y" : 3,
 
							"horizontal_align" : "right",
							"text_horizontal_align" : "right",
 
							"text" : "123456789",
						},
					),
				},
				{
					"name":"Mds_Slot",
					"type":"button",
 
					"x":30,
					"y":45,
 
					"vertical_align":"bottom",
 
					"default_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
					"over_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
					"down_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
 
					"children" :
					(
						{
							"name":"Mds_Icon",
							"type":"image",
 
							"x":-18,
							"y":2,
 
							"image":"d:/ymir work/ui/game/windows/money_icon.sub",
						},
 
						{
							"name" : "Mds",
							"type" : "text",
		
							"x" : 5,
							"y" : 3,
 
							"horizontal_align" : "right",
							"text_horizontal_align" : "right",
 
							"text" : "123456789 S2-Taler",
						},
					),
				},
 
			),
		},
	),
}
Sucht in der game.py 'def __ServerCommand_Build(self):' und fügt das ein:
Code:
			# LagerButton
			"normal_mall"			: self.__Opennormalmall,
			#YangAnzeige
			"YangAnzeige"			: self.__MakeYangAnzeige,
			#AntiEXP
			"AntiEXP"				: self.__MakeAntiEXP,
			#Portring
			"Portring"				: self.__MakePortring,
			#Seonu2 Taler
Und ganz unten fügt ihr folgendes ein:
Code:
	def __Opennormalmall(self, qid):
		constInfo.mallqin= int(qid) 
	
	def __MakeAntiEXP(self, qid):
		constInfo.AntiEXPqin= int(qid)
	
	def __MakePortring(self, qid):
		constInfo.PortRingqin= int(qid)
		
	def __MakeYangAnzeige(self, money):
		if constInfo.pickInfo == 0:
			constInfo.pickInfo  = 1
			chat.AppendChat(chat.CHAT_TYPE_INFO, "Deine Yangdropanzeige wurde aktiviert")
		elif constInfo.pickInfo  == 1:
			constInfo.pickInfo  = 0
			chat.AppendChat(chat.CHAT_TYPE_INFO, "Deine Yangdropanzeige wurde deaktiviert")
In der uiinventory.py sucht ihr nach 'self.wndMoneySlot = self.GetChild("Money_Slot")' und fügt das ein:
Code:
			self.YangAnzeige = self.GetChild2("YangAnzeige")
			self.LagerButton = self.GetChild2("LagerButton")
			self.AntiEXP = self.GetChild2("AntiEXP")
			self.Portring = self.GetChild2("Portring")
Sucht jetzt nach 'if self.mallButton:' und fügt das ein:
Code:
		# LagerButton
		if self.LagerButton:
			self.LagerButton.SetEvent(ui.__mem_func__(self.ClickLagerButton))

		#YangAnzeige
		if self.YangAnzeige:
			self.YangAnzeige.SetEvent(ui.__mem_func__(self.ClickYangAnzeige))
		
		#AntiEXP
		if self.AntiEXP:
			self.AntiEXP.SetEvent(ui.__mem_func__(self.ClickAntiEXP))
		
		#Portring
		if self.Portring:
			self.Portring.SetEvent(ui.__mem_func__(self.ClickPortring))
Sucht nach 'def ClickMallButton(self):' und fügt das drunter ein:
Code:
	#LagerButton
	def ClickLagerButton(self):
		import event
		qid = constInfo.mallqin
		event.QuestButtonClick(qid)
		
	#YangAnzeige
	def ClickYangAnzeige(self):
		if constInfo.pickInfo == 0:
			constInfo.pickInfo  = 1
			chat.AppendChat(chat.CHAT_TYPE_INFO, "Deine Yangdropanzeige wurde aktiviert")
		elif constInfo.pickInfo  == 1:
			constInfo.pickInfo  = 0
			chat.AppendChat(chat.CHAT_TYPE_INFO, "Deine Yangdropanzeige wurde deaktiviert")
			
	#AntiEXP
	def ClickAntiEXP(self):
		import event
		qid = constInfo.AntiEXPqin
		event.QuestButtonClick(qid)
		
	#Portring
	def ClickPortring(self):
		import event
		qid = constInfo.PortRingqin
		event.QuestButtonClick(qid)
Geht in die constinfo.py und fügt folgendes ein:
Code:
mallqin = 0
yangeinzeigeqin = 0
AntiEXPqin = 0
PortRingqin = 0
Die Quests:

Da viele mich per PN anschreiben hier ein kleiner Fix:
Suche in der in inventorywindow.py
Code:
uiScriptLocale.LAGER_TITLE
und ersetze es mit:
Code:
"tooltip_text" : "Lager",
Der Download für die Buttons ist im Anhang, Pfade müsst ihr selbst anpassen.
Wenn bei euch etwas nicht klappt, ist mir das leider egal, ihr könnt nicht alles in den Rektal geschoben bekommen. Ich gebe keinerlei Support für irgendwas.

Special Thanks:
[Only registered and activated users can see links. Click Here To Register...] - von ihm kommt die Yanganzeige!

Kind Regards'
03/16/2015 06:17 rollback#2
Hauptsache 1337 S-Taler.

Danke fürs Teilen :)
03/16/2015 09:04 i[Remix]#3
Hätte man auch alles in eine Quest packen können.
03/16/2015 09:06 Fydes#4
Quote:
Originally Posted by i[Remix] View Post
Hätte man auch alles in eine Quest packen können.
Ist mir im Nachhinein auch eingefallen :P
03/16/2015 09:58 .Ryuzaki™#5
Quote:
Originally Posted by i[Remix] View Post
Hätte man auch alles in eine Quest packen können.
Kannst du dich nicht 1x normal bedanken?

BTT: Danke, wird bestimmt von einigen genutzt.
03/16/2015 12:21 Shaytan #6
Dane dir ist nicht mein geschmack aber es geht voll klar.
03/16/2015 13:42 Lemmiwinks ##7
Ja nice, danke fürs teilen.
03/16/2015 15:36 .Ryuzaki™#8
Quote:
Originally Posted by ProfessorEnte View Post
Nur bedanken bringt leute aber auch nicht weiter. ;)
Er könnte trotzdem mal Danke sagen und dann noch dazu, was genau
man besser machen könnte.

Ahja iGaymix, wem krieche ich bitte in den Arsch?
03/16/2015 16:23 Hermannx3#9
Man darf den leuten doch noch Tipps geben und niemand muss ich bedanken ich denke das darf man frei entscheiden.
03/16/2015 16:32 Fydes#10
Streitet euch bitte in eurem Kinderzimmern, danke
03/16/2015 17:55 Jeonsa#11
Süßes Release, Michi kann ja gleich die Quest dazu Releasen.
03/16/2015 18:41 Alekos#12
Um mal den üblichen Kindergarten zu ignorieren:

Echt cool, ob man das jetzt anders hätte lösen können oder sonstiges kann ich leider nicht beurteilen.
Aber als Außenstehender sieht das echt gut aus. :)
03/16/2015 18:48 Fydes#13
Quote:
Originally Posted by Tasty. View Post
Der ist gestraft genug mit seiner Mongolen Stimme und seinem nicht vorhandenen Hirn.

BTT: Süßes Release, Michi kann ja gleich die Quest dazu Releasen.
Guck mal in den Startpost, sind die dort vielleicht drinnen, Scriptkid.

Jungs startet ne Konfi in Skype und nervt meinen Thread hier nicht voll, unterbemittelte Kids hier. Ihr habt den Knall anscheinend überhört.

Np fürs Release
03/16/2015 18:51 i[Remix]#14
Quote:
Originally Posted by Fydes View Post
Guck mal in den Startpost, sind die dort vielleicht drinnen, Scriptkid.

Jungs startet ne Konfi in Skype und nervt meinen Thread hier nicht voll, unterbemittelte Kids hier. Ihr habt den Knall anscheinend überhört.

Np fürs Release
Könntest z.B ein StringPacket vom Client aus schicken (z.B "inventory|antiexp") und in einem API System o.ä einfach nach | splitten.
Dann muss man nicht für jeden Mist eine neue Quest mit Eventbuttons machen :D
03/16/2015 19:15 Tuora#15
Für manche sicherlich nützlich (Y)