Chest Wiew Drop eroare syserr

Totalitatea subiectelor care nu respectă regulamentul impus in sectiunea "Probleme şi Întrebări" vor fi stocate aici.
Avatar utilizator
Mr1Perfect
Nivel 3

Nivel 3
Mesaje: 302
Membru din: 26 Mai 2018, 14:54
Server: Metin
Regat: Chunjo
Aprecieri: 454  
Mulţumiri: 19  
  Rezolvări prob.: 2
Discord: Copiază ID
Medalii

cicaeu95 scrie: ↑31 Ian 2023, 21:18
Mr1Perfect scrie: ↑31 Ian 2023, 21:04
cicaeu95 scrie: ↑31 Ian 2023, 20:49 in uichestdrop.py modifica importurile asa

din

import uiCommon, snd, chat, app, net, player, item, wndMgr, mouseModule, localeInfo, constInfo, ui

in

import uiCommon, snd, chat, item, wndMgr, mouseModule, localeInfo, constInfo, ui

app = __import__(pyapi.GetModuleName("app"))
chr = __import__(pyapi.GetModuleName("chr"))
chrmgr = __import__(pyapi.GetModuleName("chrmgr"))
player = __import__(pyapi.GetModuleName("player"))
net = __import__(pyapi.GetModuleName("net"))

Acum imi da in syserr
Acum imi da eroarea asta in syserr bro


DEASUPRA LA
app = __import__(pyapi.GetModuleName("app"))

ADAUGA
import pyapi
Avatar utilizator
cicaeu95
Nou Venit

Nou Venit
Mesaje: 18
Membru din: 22 Mai 2022, 16:23
Server: ---
Regat: Jinno
Aprecieri: 1  
Mulţumiri: 2  
Medalii

uichestdrop.py:
import uiCommon, snd, chat, item, wndMgr, mouseModule, localeInfo, constInfo, ui

if __USE_DYNAMIC_MODULE__:
	import pyapi

app = __import__(pyapi.GetModuleName("app"))
chr = __import__(pyapi.GetModuleName("chr"))
chrmgr = __import__(pyapi.GetModuleName("chrmgr"))
player = __import__(pyapi.GetModuleName("player"))
net = __import__(pyapi.GetModuleName("net"))

class ChestDropWindow(ui.ScriptWindow):
	def __init__(self):
		ui.ScriptWindow.__init__(self)
		
		self.tooltipItem = None

		self.currentChest = 0
		self.currentPage = 1
		self.openAmount = 1
		self.invItemPos = -1
		
		self.chestDrop = { }

		self.__LoadWindow()

	def __del__(self):
		ui.ScriptWindow.__del__(self)
		
	def __LoadWindow(self):
		try:
			PythonScriptLoader = ui.PythonScriptLoader()
			PythonScriptLoader.LoadScriptFile(self, "UIScript/chestdropwindow.py")
		except:
			import exception
			exception.Abort("ChestDropWindow.__LoadWindow.LoadObject")

		try:
			self.titleBar = self.GetChild("TitleBar")

			self.openItemSlot = self.GetChild("OpenItemSlot")
			self.openCountController = self.GetChild("OpenCountController")
			self.openChestButtonSingle = self.GetChild("OpenChestButtonSingle")
			self.openChestButtonMultiple = self.GetChild("OpenChestButtonMultiple")
			
			self.prevButton = self.GetChild("prev_button")
			self.nextButton = self.GetChild("next_button")
			self.currentPageBack = self.GetChild("CurrentPageBack")
			self.currentPageText = self.GetChild("CurrentPage")
		except:
			import exception
			exception.Abort("ChestDropWindow.__LoadWindow.BindObject")
			
		self.titleBar.SetCloseEvent(ui.__mem_func__(self.Close))
		self.openCountController.SetEvent(ui.__mem_func__(self.OnChangeOpenAmount))
		
		self.openChestButtonSingle.SetEvent(ui.__mem_func__(self.OnClickOpenChest))
		self.openChestButtonMultiple.SetEvent(ui.__mem_func__(self.OnClickOpenChest))
		
		self.SetOpenAmount(1)
		
		self.prevButton.SetEvent(ui.__mem_func__(self.OnClickPrevPage))
		self.nextButton.SetEvent(ui.__mem_func__(self.OnClickNextPage))
		
		self.currentPageText.SetText(str(self.currentPage))

		wndItem = ui.GridSlotWindow()
		wndItem.SetParent(self)
		wndItem.SetPosition(8, 35)
		wndItem.SetSlotStyle(wndMgr.SLOT_STYLE_NONE)
		wndItem.SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
		wndItem.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))
		wndItem.ArrangeSlot(0, 15, 5, 32, 32, 0, 0)
		wndItem.RefreshSlot()
		wndItem.SetSlotBaseImage("d:/ymir work/ui/public/Slot_Base.sub", 1.0, 1.0, 1.0, 1.0)
		wndItem.Show()
		
		self.wndItem = wndItem
		
	def Close(self):
		self.invItemPos = -1
		self.Hide()
		
	def Destroy(self):
		self.ClearDictionary()
		
		self.tooltipItem = None
		self.wndItem = None
		
		self.currentChest = 0
		self.currentPage = 1
		self.openAmount = 1
		self.invItemPos = -1
		self.chestDrop = { }
		
	def SetOpenAmount(self, amount):
		self.openAmount = amount
		self.openChestButtonSingle.SetText("Deschide %d cufere" % self.openAmount)
		self.openChestButtonMultiple.SetText("Deschide %d cufere" % self.openAmount)
		
	def Open(self, invItemPos = -1):
		self.currentChest = 0
		self.currentPage = 1
		self.SetOpenAmount(1)
		self.openCountController.SetSliderPos(0.0)
		self.chestDrop = { }
		self.RefreshItemSlot()
		
		self.SetInvItemSlot(invItemPos)
	
		self.SetTop()
		self.SetCenterPosition()
		self.Show()

	def SetItemToolTip(self, tooltip):
		self.tooltipItem = tooltip
		
	def OnChangeOpenAmount(self):
		openTemp = int(self.openCountController.GetSliderPos() * 20)
		if openTemp == 0:
			self.SetOpenAmount(1)
		else:
			self.SetOpenAmount(openTemp)
			
	def AddChestDropItem(self, chestVnum, pageIndex, slotIndex, itemVnum, itemCount):
		if not self.chestDrop.has_key(chestVnum):
			self.chestDrop[chestVnum] = {}
			
		if not self.chestDrop[chestVnum].has_key(pageIndex):
			self.chestDrop[chestVnum][pageIndex] = {}
	
		if self.chestDrop[chestVnum].has_key(pageIndex):
			if self.chestDrop[chestVnum][pageIndex].has_key(slotIndex):
				if self.chestDrop[chestVnum][pageIndex][slotIndex][0] == itemVnum and self.chestDrop[chestVnum][pageIndex][slotIndex][1] == itemCount:
					return

		self.chestDrop[chestVnum][pageIndex][slotIndex] = [itemVnum, itemCount]

	def OnClickOpenChest(self):
		if self.invItemPos == -1:
			return
			
		itemCount = player.GetItemCount(self.invItemPos)

	#	if player.GetItemTypeBySlot(self.invItemPos) == item.ITEM_TYPE_GACHA:
	#		itemCount = player.GetItemMetinSocket(player.INVENTORY, self.invItemPos, 0)
			
		if itemCount >= self.openAmount:
			for i in xrange(self.openAmount):
				if itemCount == 1:
					net.SendItemUsePacket(self.invItemPos)
					self.OnPressEscapeKey()
					break
					
				net.SendItemUsePacket(self.invItemPos)
				itemCount = itemCount - 1
		else:
			for i in xrange(itemCount):
				if itemCount == 1:
					net.SendItemUsePacket(self.invItemPos)
					self.OnPressEscapeKey()
					break
					
				net.SendItemUsePacket(self.invItemPos)
				itemCount = itemCount - 1
					
	def OnClickPrevPage(self):
		if not self.chestDrop.has_key(self.currentChest):
			return
			
		if self.chestDrop[self.currentChest].has_key(self.currentPage - 1):
			self.currentPage = self.currentPage - 1
			self.currentPageText.SetText(str(self.currentPage))
			self.RefreshItemSlot()
		
	def OnClickNextPage(self):
		if not self.chestDrop.has_key(self.currentChest):
			return
			
		if self.chestDrop[self.currentChest].has_key(self.currentPage + 1):
			self.currentPage = self.currentPage + 1
			self.currentPageText.SetText(str(self.currentPage))
			self.RefreshItemSlot()
			
	def EnableMultiPage(self):
		self.openChestButtonSingle.Hide()
		self.openChestButtonMultiple.Show()
		
		self.prevButton.Show()
		self.nextButton.Show()
		self.currentPageBack.Show()
		
	def EnableSinglePage(self):
		self.openChestButtonSingle.Show()
		self.openChestButtonMultiple.Hide()
		
		self.prevButton.Hide()
		self.nextButton.Hide()
		self.currentPageBack.Hide()	
		
	def SetInvItemSlot(self, invItemPos):
		self.invItemPos = invItemPos
		
		itemVnum = player.GetItemIndex(invItemPos)
		itemCount = player.GetItemCount(invItemPos)
		if itemVnum:
			self.openItemSlot.SetItemSlot(0, itemVnum, itemCount)
			
	def GetInvItemSlot(self):
		return self.invItemPos
			
	def RefreshItems(self, chestVnum):
		if chestVnum:
			self.currentChest = chestVnum
			
		if not self.chestDrop.has_key(self.currentChest):
			chat.AppendChat(chat.CHAT_TYPE_INFO, "Acest cufar nu are drop. Raporteaza probleme unui administrator.")
			self.Close()
			return
			
		if self.chestDrop[self.currentChest].has_key(2):
			self.EnableMultiPage()
		else:
			self.EnableSinglePage()
			
		self.RefreshItemSlot()

	def RefreshItemSlot(self):
		for i in xrange(15 * 5):
			self.wndItem.ClearSlot(i)
			
		if not self.chestDrop.has_key(self.currentChest):
			return
			
		if not self.chestDrop[self.currentChest].has_key(self.currentPage):
			return
			
		for key, value in self.chestDrop[self.currentChest][self.currentPage].iteritems():
			itemVnum = value[0]
			itemCount = value[1]

			if itemCount <= 1:
				itemCount = 0
			
			self.wndItem.SetItemSlot(key, itemVnum, itemCount)
			
		wndMgr.RefreshSlot(self.wndItem.GetWindowHandle())
			
	def OverInItem(self, slotIndex):
		if mouseModule.mouseController.isAttached():
			return
			
		if not self.chestDrop.has_key(self.currentChest):
			return
			
		if not self.chestDrop[self.currentChest].has_key(self.currentPage):
			return
    
		if 0 != self.tooltipItem:
			self.tooltipItem.SetItemToolTip(self.chestDrop[self.currentChest][self.currentPage][slotIndex][0])
    
	def OverOutItem(self):
		if 0 != self.tooltipItem:
			self.tooltipItem.HideToolTip()
								
	def OnPressEscapeKey(self):
		self.Close()
		return True

uiscrip/chestdropwindow.py:
import uiScriptLocale

BUTTON_ROOT = "d:/ymir work/ui/public/"

window = {
	"name" : "ChestDropWindow",

	"x" : 0,
	"y" : 0,

	"style" : ("movable", "float",),

	"width" : 500,
	"height" : 250,

	"children" :
	(
		{
			"name" : "board",
			"type" : "board",
			"style" : ("attach",),

			"x" : 0,
			"y" : 0,

			"width" : 500,
			"height" : 250,
		
			"children" :
			(
				## Title
				{
					"name" : "TitleBar",
					"type" : "titlebar",
					"style" : ("attach",),

					"x" : 6,
					"y" : 6,

					"width" : 500 - 12,					
					"color" : "yellow",

					"children" :
					(
						{ "name":"TitleName", "type":"text", "x": 250, "y":3, "text": "Chest Drop", "text_horizontal_align":"center" },
					),
				},
				
				{ 
					"name" : "SlotBG", 
					"type" : "expanded_image", 
					"style" : ("attach",), 
					
					"x" : 10, 
					"y" : 200, 
					
					"image" : "d:/ymir work/ui/pet/Pet_Incu_slot_001.tga",
					
					"children" :
					(
						{
							"name" : "OpenItemSlot",
							"type" : "slot",
								
							"x" : 4,
							"y" : 4,
							"width" : 32,
							"height" : 32,
		
							"slot" : (
								{"index":0, "x":0, "y":0, "width":32, "height":32,},
							),
						},
					),
				},
				
				{
					"name" : "OpenCountController",
					"type" : "sliderbar",

					"x" : 65,
					"y" : 215,
				},	
									
				{
					"name" : "OpenChestButtonSingle",
					"type" : "button",

					"x" : 300,
					"y" : 209,
					
					"default_image" : BUTTON_ROOT + "XLarge_Button_01.sub",
					"over_image" : BUTTON_ROOT + "XLarge_Button_02.sub",
					"down_image" : BUTTON_ROOT + "XLarge_Button_03.sub",
				},
				
				{
					"name" : "OpenChestButtonMultiple",
					"type" : "button",

					"x" : 300,
					"y" : 209,
					
					"default_image" : "d:/ymir work/ui/minigame/yutnori/yut_throw_button_default.sub",
					"over_image" : "d:/ymir work/ui/minigame/yutnori/yut_throw_button_over.sub",
					"down_image" : "d:/ymir work/ui/minigame/yutnori/yut_throw_button_down.sub",	
				},
				
				{
					"name" : "prev_button", 
					"type" : "button",
					
					"x" : 422, 
					"y" : 216,

					"default_image" : "d:/ymir work/ui/public/public_page_button/page_first_prev_btn_01.sub",
					"over_image" 	: "d:/ymir work/ui/public/public_page_button/page_first_prev_btn_02.sub",
					"down_image" 	: "d:/ymir work/ui/public/public_page_button/page_first_prev_btn_01.sub",
				},
				
				{
					"name" : "CurrentPageBack",
					"type" : "thinboard_circle",
					
					"x" : 440,
					"y" : 211,
					
					"width" : 30,
					"height" : 20,
					
					"children" :
					(
						{
							"name" : "CurrentPage",
							"type" : "text",
							
							"x" : 0,
							"y" : 0,
							
							"vertical_align" : "center",
							"horizontal_align" : "center",
							
							"text_vertical_align" : "center",
							"text_horizontal_align" : "center",

							"text" : "1",
						},
					),
				},
				
				{
					"name" : "next_button", 
					"type" : "button",

					"x" : 475, 
					"y" : 216,

					"default_image" : "d:/ymir work/ui/public/public_page_button/page_last_next_btn_01.sub",
					"over_image" 	: "d:/ymir work/ui/public/public_page_button/page_last_next_btn_02.sub",
					"down_image" 	: "d:/ymir work/ui/public/public_page_button/page_last_next_btn_01.sub",
				},
			),
		},
	),
}

Pentru acest mesaj, cicaeu95 for the post:
Mr1Perfect
Avatar utilizator
Mr1Perfect
Nivel 3

Nivel 3
Mesaje: 302
Membru din: 26 Mai 2018, 14:54
Server: Metin
Regat: Chunjo
Aprecieri: 454  
Mulţumiri: 19  
  Rezolvări prob.: 2
Discord: Copiază ID
Medalii

cicaeu95 scrie: ↑31 Ian 2023, 21:44 uichestdrop.py:
import uiCommon, snd, chat, item, wndMgr, mouseModule, localeInfo, constInfo, ui

if __USE_DYNAMIC_MODULE__:
	import pyapi

app = __import__(pyapi.GetModuleName("app"))
chr = __import__(pyapi.GetModuleName("chr"))
chrmgr = __import__(pyapi.GetModuleName("chrmgr"))
player = __import__(pyapi.GetModuleName("player"))
net = __import__(pyapi.GetModuleName("net"))

class ChestDropWindow(ui.ScriptWindow):
	def __init__(self):
		ui.ScriptWindow.__init__(self)
		
		self.tooltipItem = None

		self.currentChest = 0
		self.currentPage = 1
		self.openAmount = 1
		self.invItemPos = -1
		
		self.chestDrop = { }

		self.__LoadWindow()

	def __del__(self):
		ui.ScriptWindow.__del__(self)
		
	def __LoadWindow(self):
		try:
			PythonScriptLoader = ui.PythonScriptLoader()
			PythonScriptLoader.LoadScriptFile(self, "UIScript/chestdropwindow.py")
		except:
			import exception
			exception.Abort("ChestDropWindow.__LoadWindow.LoadObject")

		try:
			self.titleBar = self.GetChild("TitleBar")

			self.openItemSlot = self.GetChild("OpenItemSlot")
			self.openCountController = self.GetChild("OpenCountController")
			self.openChestButtonSingle = self.GetChild("OpenChestButtonSingle")
			self.openChestButtonMultiple = self.GetChild("OpenChestButtonMultiple")
			
			self.prevButton = self.GetChild("prev_button")
			self.nextButton = self.GetChild("next_button")
			self.currentPageBack = self.GetChild("CurrentPageBack")
			self.currentPageText = self.GetChild("CurrentPage")
		except:
			import exception
			exception.Abort("ChestDropWindow.__LoadWindow.BindObject")
			
		self.titleBar.SetCloseEvent(ui.__mem_func__(self.Close))
		self.openCountController.SetEvent(ui.__mem_func__(self.OnChangeOpenAmount))
		
		self.openChestButtonSingle.SetEvent(ui.__mem_func__(self.OnClickOpenChest))
		self.openChestButtonMultiple.SetEvent(ui.__mem_func__(self.OnClickOpenChest))
		
		self.SetOpenAmount(1)
		
		self.prevButton.SetEvent(ui.__mem_func__(self.OnClickPrevPage))
		self.nextButton.SetEvent(ui.__mem_func__(self.OnClickNextPage))
		
		self.currentPageText.SetText(str(self.currentPage))

		wndItem = ui.GridSlotWindow()
		wndItem.SetParent(self)
		wndItem.SetPosition(8, 35)
		wndItem.SetSlotStyle(wndMgr.SLOT_STYLE_NONE)
		wndItem.SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
		wndItem.SetOverOutItemEvent(ui.__mem_func__(self.OverOutItem))
		wndItem.ArrangeSlot(0, 15, 5, 32, 32, 0, 0)
		wndItem.RefreshSlot()
		wndItem.SetSlotBaseImage("d:/ymir work/ui/public/Slot_Base.sub", 1.0, 1.0, 1.0, 1.0)
		wndItem.Show()
		
		self.wndItem = wndItem
		
	def Close(self):
		self.invItemPos = -1
		self.Hide()
		
	def Destroy(self):
		self.ClearDictionary()
		
		self.tooltipItem = None
		self.wndItem = None
		
		self.currentChest = 0
		self.currentPage = 1
		self.openAmount = 1
		self.invItemPos = -1
		self.chestDrop = { }
		
	def SetOpenAmount(self, amount):
		self.openAmount = amount
		self.openChestButtonSingle.SetText("Deschide %d cufere" % self.openAmount)
		self.openChestButtonMultiple.SetText("Deschide %d cufere" % self.openAmount)
		
	def Open(self, invItemPos = -1):
		self.currentChest = 0
		self.currentPage = 1
		self.SetOpenAmount(1)
		self.openCountController.SetSliderPos(0.0)
		self.chestDrop = { }
		self.RefreshItemSlot()
		
		self.SetInvItemSlot(invItemPos)
	
		self.SetTop()
		self.SetCenterPosition()
		self.Show()

	def SetItemToolTip(self, tooltip):
		self.tooltipItem = tooltip
		
	def OnChangeOpenAmount(self):
		openTemp = int(self.openCountController.GetSliderPos() * 20)
		if openTemp == 0:
			self.SetOpenAmount(1)
		else:
			self.SetOpenAmount(openTemp)
			
	def AddChestDropItem(self, chestVnum, pageIndex, slotIndex, itemVnum, itemCount):
		if not self.chestDrop.has_key(chestVnum):
			self.chestDrop[chestVnum] = {}
			
		if not self.chestDrop[chestVnum].has_key(pageIndex):
			self.chestDrop[chestVnum][pageIndex] = {}
	
		if self.chestDrop[chestVnum].has_key(pageIndex):
			if self.chestDrop[chestVnum][pageIndex].has_key(slotIndex):
				if self.chestDrop[chestVnum][pageIndex][slotIndex][0] == itemVnum and self.chestDrop[chestVnum][pageIndex][slotIndex][1] == itemCount:
					return

		self.chestDrop[chestVnum][pageIndex][slotIndex] = [itemVnum, itemCount]

	def OnClickOpenChest(self):
		if self.invItemPos == -1:
			return
			
		itemCount = player.GetItemCount(self.invItemPos)

	#	if player.GetItemTypeBySlot(self.invItemPos) == item.ITEM_TYPE_GACHA:
	#		itemCount = player.GetItemMetinSocket(player.INVENTORY, self.invItemPos, 0)
			
		if itemCount >= self.openAmount:
			for i in xrange(self.openAmount):
				if itemCount == 1:
					net.SendItemUsePacket(self.invItemPos)
					self.OnPressEscapeKey()
					break
					
				net.SendItemUsePacket(self.invItemPos)
				itemCount = itemCount - 1
		else:
			for i in xrange(itemCount):
				if itemCount == 1:
					net.SendItemUsePacket(self.invItemPos)
					self.OnPressEscapeKey()
					break
					
				net.SendItemUsePacket(self.invItemPos)
				itemCount = itemCount - 1
					
	def OnClickPrevPage(self):
		if not self.chestDrop.has_key(self.currentChest):
			return
			
		if self.chestDrop[self.currentChest].has_key(self.currentPage - 1):
			self.currentPage = self.currentPage - 1
			self.currentPageText.SetText(str(self.currentPage))
			self.RefreshItemSlot()
		
	def OnClickNextPage(self):
		if not self.chestDrop.has_key(self.currentChest):
			return
			
		if self.chestDrop[self.currentChest].has_key(self.currentPage + 1):
			self.currentPage = self.currentPage + 1
			self.currentPageText.SetText(str(self.currentPage))
			self.RefreshItemSlot()
			
	def EnableMultiPage(self):
		self.openChestButtonSingle.Hide()
		self.openChestButtonMultiple.Show()
		
		self.prevButton.Show()
		self.nextButton.Show()
		self.currentPageBack.Show()
		
	def EnableSinglePage(self):
		self.openChestButtonSingle.Show()
		self.openChestButtonMultiple.Hide()
		
		self.prevButton.Hide()
		self.nextButton.Hide()
		self.currentPageBack.Hide()	
		
	def SetInvItemSlot(self, invItemPos):
		self.invItemPos = invItemPos
		
		itemVnum = player.GetItemIndex(invItemPos)
		itemCount = player.GetItemCount(invItemPos)
		if itemVnum:
			self.openItemSlot.SetItemSlot(0, itemVnum, itemCount)
			
	def GetInvItemSlot(self):
		return self.invItemPos
			
	def RefreshItems(self, chestVnum):
		if chestVnum:
			self.currentChest = chestVnum
			
		if not self.chestDrop.has_key(self.currentChest):
			chat.AppendChat(chat.CHAT_TYPE_INFO, "Acest cufar nu are drop. Raporteaza probleme unui administrator.")
			self.Close()
			return
			
		if self.chestDrop[self.currentChest].has_key(2):
			self.EnableMultiPage()
		else:
			self.EnableSinglePage()
			
		self.RefreshItemSlot()

	def RefreshItemSlot(self):
		for i in xrange(15 * 5):
			self.wndItem.ClearSlot(i)
			
		if not self.chestDrop.has_key(self.currentChest):
			return
			
		if not self.chestDrop[self.currentChest].has_key(self.currentPage):
			return
			
		for key, value in self.chestDrop[self.currentChest][self.currentPage].iteritems():
			itemVnum = value[0]
			itemCount = value[1]

			if itemCount <= 1:
				itemCount = 0
			
			self.wndItem.SetItemSlot(key, itemVnum, itemCount)
			
		wndMgr.RefreshSlot(self.wndItem.GetWindowHandle())
			
	def OverInItem(self, slotIndex):
		if mouseModule.mouseController.isAttached():
			return
			
		if not self.chestDrop.has_key(self.currentChest):
			return
			
		if not self.chestDrop[self.currentChest].has_key(self.currentPage):
			return
    
		if 0 != self.tooltipItem:
			self.tooltipItem.SetItemToolTip(self.chestDrop[self.currentChest][self.currentPage][slotIndex][0])
    
	def OverOutItem(self):
		if 0 != self.tooltipItem:
			self.tooltipItem.HideToolTip()
								
	def OnPressEscapeKey(self):
		self.Close()
		return True

uiscrip/chestdropwindow.py:
import uiScriptLocale

BUTTON_ROOT = "d:/ymir work/ui/public/"

window = {
	"name" : "ChestDropWindow",

	"x" : 0,
	"y" : 0,

	"style" : ("movable", "float",),

	"width" : 500,
	"height" : 250,

	"children" :
	(
		{
			"name" : "board",
			"type" : "board",
			"style" : ("attach",),

			"x" : 0,
			"y" : 0,

			"width" : 500,
			"height" : 250,
		
			"children" :
			(
				## Title
				{
					"name" : "TitleBar",
					"type" : "titlebar",
					"style" : ("attach",),

					"x" : 6,
					"y" : 6,

					"width" : 500 - 12,					
					"color" : "yellow",

					"children" :
					(
						{ "name":"TitleName", "type":"text", "x": 250, "y":3, "text": "Chest Drop", "text_horizontal_align":"center" },
					),
				},
				
				{ 
					"name" : "SlotBG", 
					"type" : "expanded_image", 
					"style" : ("attach",), 
					
					"x" : 10, 
					"y" : 200, 
					
					"image" : "d:/ymir work/ui/pet/Pet_Incu_slot_001.tga",
					
					"children" :
					(
						{
							"name" : "OpenItemSlot",
							"type" : "slot",
								
							"x" : 4,
							"y" : 4,
							"width" : 32,
							"height" : 32,
		
							"slot" : (
								{"index":0, "x":0, "y":0, "width":32, "height":32,},
							),
						},
					),
				},
				
				{
					"name" : "OpenCountController",
					"type" : "sliderbar",

					"x" : 65,
					"y" : 215,
				},	
									
				{
					"name" : "OpenChestButtonSingle",
					"type" : "button",

					"x" : 300,
					"y" : 209,
					
					"default_image" : BUTTON_ROOT + "XLarge_Button_01.sub",
					"over_image" : BUTTON_ROOT + "XLarge_Button_02.sub",
					"down_image" : BUTTON_ROOT + "XLarge_Button_03.sub",
				},
				
				{
					"name" : "OpenChestButtonMultiple",
					"type" : "button",

					"x" : 300,
					"y" : 209,
					
					"default_image" : "d:/ymir work/ui/minigame/yutnori/yut_throw_button_default.sub",
					"over_image" : "d:/ymir work/ui/minigame/yutnori/yut_throw_button_over.sub",
					"down_image" : "d:/ymir work/ui/minigame/yutnori/yut_throw_button_down.sub",	
				},
				
				{
					"name" : "prev_button", 
					"type" : "button",
					
					"x" : 422, 
					"y" : 216,

					"default_image" : "d:/ymir work/ui/public/public_page_button/page_first_prev_btn_01.sub",
					"over_image" 	: "d:/ymir work/ui/public/public_page_button/page_first_prev_btn_02.sub",
					"down_image" 	: "d:/ymir work/ui/public/public_page_button/page_first_prev_btn_01.sub",
				},
				
				{
					"name" : "CurrentPageBack",
					"type" : "thinboard_circle",
					
					"x" : 440,
					"y" : 211,
					
					"width" : 30,
					"height" : 20,
					
					"children" :
					(
						{
							"name" : "CurrentPage",
							"type" : "text",
							
							"x" : 0,
							"y" : 0,
							
							"vertical_align" : "center",
							"horizontal_align" : "center",
							
							"text_vertical_align" : "center",
							"text_horizontal_align" : "center",

							"text" : "1",
						},
					),
				},
				
				{
					"name" : "next_button", 
					"type" : "button",

					"x" : 475, 
					"y" : 216,

					"default_image" : "d:/ymir work/ui/public/public_page_button/page_last_next_btn_01.sub",
					"over_image" 	: "d:/ymir work/ui/public/public_page_button/page_last_next_btn_02.sub",
					"down_image" 	: "d:/ymir work/ui/public/public_page_button/page_last_next_btn_01.sub",
				},
			),
		},
	),
}

Bro,ai tot respectul meu pentru ca incerci sa ma ajuti,dar acm imi da asta....
Avatar utilizator
cicaeu95
Nou Venit

Nou Venit
Mesaje: 18
Membru din: 22 Mai 2022, 16:23
Server: ---
Regat: Jinno
Aprecieri: 1  
Mulţumiri: 2  
Medalii

posteaza si cubewindow.py din folderul uiscript sau cauta in mai multe fisiere si vezi ce ai in loc de import uiscriptlocale

sau poti incerca sa stergi
import uiScriptLocale
din uiscript/chestdropwindow.py
si vezi daca merge
Avatar utilizator
Mr1Perfect
Nivel 3

Nivel 3
Mesaje: 302
Membru din: 26 Mai 2018, 14:54
Server: Metin
Regat: Chunjo
Aprecieri: 454  
Mulţumiri: 19  
  Rezolvări prob.: 2
Discord: Copiază ID
Medalii

cicaeu95 scrie: ↑31 Ian 2023, 22:21 posteaza si cubewindow.py din folderul uiscript sau cauta in mai multe fisiere si vezi ce ai in loc de import uiscriptlocale

sau poti incerca sa stergi
import uiScriptLocale
din uiscript/chestdropwindow.py
si vezi daca merge



import uiscriptlocale peste tot..
Avatar utilizator
cicaeu95
Nou Venit

Nou Venit
Mesaje: 18
Membru din: 22 Mai 2022, 16:23
Server: ---
Regat: Jinno
Aprecieri: 1  
Mulţumiri: 2  
Medalii

da-mi accept la cerere pe discord si dupa postezi tu rezolvarea
Avatar utilizator
Wizzard
Utilizator neserios / Untrustworthy user !

Utilizator neserios / Untrustworthy user !
Mesaje: 901
Membru din: 05 Iul 2021, 13:37
Server: 911.Projects
Regat: Chunjo
Aprecieri: 525  
Mulţumiri: 3420  
Discord: Copiază ID
 Contact:
Medalii

Subiect vechi , utilizatorul nu a mai aratat interes fata de acest subiect.
Închis
Răspunsuri
10
Vizualizări
1037
Răspunsuri
3
Vizualizări
509
Răspunsuri
8
Vizualizări
430
Răspunsuri
4
Vizualizări
562

Înapoi la “Arhivă Probleme şi Întrebări”

  • Informaţie