Skocz do zawartości
  • 👋 Witaj na MPCForum!

    Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

    • Pełny dostęp do działów i ukrytych treści
    • Możliwość pisania i odpowiadania w tematach
    • System prywatnych wiadomości
    • Zbieranie reputacji i rozwijanie swojego profilu
    • Członkostwo w jednej z największych społeczności graczy

    👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

    Zarejestruj się teraz

Slot na pasy w zmianie ekwipunku


Rekomendowane odpowiedzi

Opublikowano

Witam jak dodać do szybkiej zmiany ekwipunku slot na pasy ?
 
dodałem sobie
 

{"index":9, "x":75, "y":45, "width":32, "height":32},

ale slot się nie wyświetla ;/

Opublikowano

client 40k :

{"index":item.EQUIPMENT_BELT, "x":39, "y":106, "width":32, "height":32}

starsze :

{"index":101, "x":39, "y":106, "width":32, "height":32},
Opublikowano

 

client 40k :

{"index":item.EQUIPMENT_BELT, "x":39, "y":106, "width":32, "height":32}

starsze :

{"index":101, "x":39, "y":106, "width":32, "height":32},

@off A wiesz może, jaki mam problem u siebie?

 

Miałem GAME 34k zmieniłem na 2089, wgrałem diffy które chciałem i game nie działa. Nie można się zalogować..

ARIONE-MINI.png

Opublikowano

@2x UP Clienta mam 40k ale ten system kilku zmian eq jest dodany pod te stare indexy i dlatego są z tym takie problemy.

Dodałem coś ale nie chodzi (nie mogę nawet ubrać pasa do tego dodatkowego ekwipunku)
 
moje fasteqip.py

					"slot" : (
								{"index":1, "x":39, "y":37, "width":32, "height":64},
								{"index":2, "x":39, "y":2, "width":32, "height":32},
								{"index":3, "x":39, "y":145, "width":32, "height":32},
								{"index":4, "x":75, "y":67, "width":32, "height":32},
								{"index":5, "x":3, "y":3, "width":32, "height":96},
								{"index":6, "x":116, "y":84, "width":32, "height":32},
								{"index":7, "x":116, "y":52, "width":32, "height":32},
								{"index":8, "x":75, "y":35, "width":32, "height":32},
								{"index":101, "x":39, "y":106, "width":32, "height":32},
							),

kod eqchanger.py

 

Kod eqchanger w root

import ui
import player
import mouseModule
import net
import app
import chat
import snd
import item
import grp
import uiScriptLocale
import locale
import ime
import grpText
import uiToolTip
import os


class changeequip(ui.ScriptWindow):

	def __init__(self):
		import exception
		ui.ScriptWindow.__init__(self)
		self.wndEquip = None
		self.tokens = None		
		self.activeslot = 1
		self.tooltipItem = uiToolTip.ItemToolTip()
		self.tooltipItem.Hide()
		self.saveName = "lib/"+str(player.GetName())+"1.ddr"

	def __del__(self):
		ui.ScriptWindow.__del__(self)

	def Show(self):			
		self.__LoadWindow()
		ui.ScriptWindow.Show(self)

	def Close(self):
		self.Hide()

	def __LoadWindow(self):
		try:			
			pyScrLoader = ui.PythonScriptLoader()
			pyScrLoader.LoadScriptFile(self, "uiscript/fastequip.py")
		except:
			import exception
			exception.Abort("CostumeWindow.LoadWindow.LoadObject")
			
		self.wndEquip = self.GetChild("equipslot")
		self.bottone_change = self.GetChild("change_button")
		self.TitleBar = self.GetChild("TitleBar")		
		
		self.TitleBar.SetCloseEvent(ui.__mem_func__(self.Close))
		self.wndEquip.SetSelectEmptySlotEvent(ui.__mem_func__(self.SelectItemSlot))
		self.wndEquip.SetSelectItemSlotEvent(ui.__mem_func__(self.SelectItemSlot))
		self.wndEquip.SetOverInItemEvent(ui.__mem_func__(self.OverInItem))
		self.wndEquip.SetOverOutItemEvent(ui.__mem_func__(self.OnOverOutItem))
		self.bottone_change.SetEvent(ui.__mem_func__(self.__change_button))
		self.clear_button = self.GetChild("clear_button")
		self.clear_button.SetEvent(ui.__mem_func__(self.__clear_button))
		
		self.eq0 = self.GetChild("eq0")
		self.eq1 = self.GetChild("eq1")
		self.eq2 = self.GetChild("eq2")
		self.eq3 = self.GetChild("eq3")
		self.eq4 = self.GetChild("eq4")
		
		self.eq0.SetEvent(ui.__mem_func__(self.__SetSlot), 1)
		self.eq1.SetEvent(ui.__mem_func__(self.__SetSlot), 2)
		self.eq2.SetEvent(ui.__mem_func__(self.__SetSlot), 3)
		self.eq3.SetEvent(ui.__mem_func__(self.__SetSlot), 4)
		self.eq4.SetEvent(ui.__mem_func__(self.__SetSlot), 5)
		
		self.LoadData()

	
	def __change_button(self):
			for i in range(1,9):
				if self.tokens[i-1] != "@":
					net.SendItemUsePacket(int(self.tokens[i-1]))
	def __clear_button(self):
		open(self.saveName, "w").write("@\t@\t@\t@\t@\t@\t@\t@")					
					
	def	LoadData(self):
		if os.path.exists(self.saveName):
			self.tokens = open(self.saveName, "r").read().split()
		else:
			open(self.saveName, "w").write("@\t@\t@\t@\t@\t@\t@\t@")
			
	def __SetSlot(self, arg):
		self.saveName = "lib/"+str(player.GetName())+str(arg)+".ddr"
		self.LoadData()

	def OverInItem(self, slotNumber):
		if self.tooltipItem:
			self.tooltipItem.SetInventoryItem(int(self.tokens[slotNumber-1]))

	def OnOverOutItem(self):
		if self.tooltipItem:
			self.tooltipItem.HideToolTip()

	def SelectItemSlot(self, itemSlotIndex):
		isAttached = mouseModule.mouseController.isAttached()
		if isAttached:
			attachedSlotType = mouseModule.mouseController.GetAttachedType()
			attachedSlotPos = mouseModule.mouseController.GetAttachedSlotNumber()
			itemIndex = player.GetItemIndex(attachedSlotPos)
			itemCount = player.GetItemCount(attachedSlotPos)
			item.SelectItem(itemIndex)
			itemType = item.GetItemType()
			itemSubType = item.GetItemSubType()
				
			
			if itemSlotIndex == 1 and item.IsWearableFlag(item.WEARABLE_BODY):	
				self.tokens[itemSlotIndex-1] = attachedSlotPos
			elif itemSlotIndex == 2 and item.IsWearableFlag(item.WEARABLE_HEAD):	
				self.tokens[itemSlotIndex-1] = attachedSlotPos
			elif itemSlotIndex == 3 and item.IsWearableFlag(item.WEARABLE_FOOTS):	
				self.tokens[itemSlotIndex-1] = attachedSlotPos
			elif itemSlotIndex == 4 and item.IsWearableFlag(item.WEARABLE_WRIST):	
				self.tokens[itemSlotIndex-1] = attachedSlotPos
			elif itemSlotIndex == 5 and item.IsWearableFlag(item.WEARABLE_WEAPON):	
				self.tokens[itemSlotIndex-1] = attachedSlotPos	
			elif itemSlotIndex == 6 and item.IsWearableFlag(item.WEARABLE_NECK):		
				self.tokens[itemSlotIndex-1] = attachedSlotPos	
			elif itemSlotIndex == 7 and item.IsWearableFlag(item.WEARABLE_EAR):	
				self.tokens[itemSlotIndex-1] = attachedSlotPos
			elif itemSlotIndex == 8 and item.IsWearableFlag(item.WEARABLE_SHIELD):	
				self.tokens[itemSlotIndex-1] = attachedSlotPos
			elif itemSlotIndex == 101:	
				self.tokens[itemSlotIndex-1] = attachedSlotPos
			else:		
				return
				
			open(self.saveName, "w").write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % tuple(self.tokens))	
				
			mouseModule.mouseController.DeattachObject()
		
	def OnUpdate(self):	
		tokens = open(self.saveName, "r").read().split()		
		self.tokens = tokens
		for i in range(1,9):	
			if tokens[i-1] == "@":
				self.wndEquip.SetItemSlot(i, 0, 0)
			else:
				itemIndex = player.GetItemIndex(int(tokens[i-1]))
				if itemIndex != 0:
					item.SelectItem(itemIndex)
					if i == 1 and item.IsWearableFlag(item.WEARABLE_BODY):	
						self.wndEquip.SetItemSlot(i, itemIndex, 0)
					elif i == 2 and item.IsWearableFlag(item.WEARABLE_HEAD):	
						self.wndEquip.SetItemSlot(i, itemIndex, 0)
					elif i == 3 and item.IsWearableFlag(item.WEARABLE_FOOTS):	
						self.wndEquip.SetItemSlot(i, itemIndex, 0)
					elif i == 4 and item.IsWearableFlag(item.WEARABLE_WRIST):	
						self.wndEquip.SetItemSlot(i, itemIndex, 0)
					elif i == 5 and item.IsWearableFlag(item.WEARABLE_WEAPON):	
						self.wndEquip.SetItemSlot(i, itemIndex, 0)
					elif i == 6 and item.IsWearableFlag(item.WEARABLE_NECK):	
						self.wndEquip.SetItemSlot(i, itemIndex, 0)
					elif i == 7 and item.IsWearableFlag(item.WEARABLE_EAR):		
						self.wndEquip.SetItemSlot(i, itemIndex, 0)
					elif i == 8 and item.IsWearableFlag(item.WEARABLE_SHIELD):	
						self.wndEquip.SetItemSlot(i, itemIndex, 0)
					elif itemSlotIndex == 101:	
						self.wndEquip.SetItemSlot(i, itemIndex, 0)
					else:
						self.wndEquip.SetItemSlot(i, 0, 0)
						self.tokens[i-1] = "@"
						open(self.saveName, "w").write("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % tuple(self.tokens))
						continue
				else:
					self.wndEquip.SetItemSlot(i, 0, 0)				
		
	def OnPressEscapeKey(self):
		self.Close()
		return TRUE

 

 

Zarchiwizowany

Ten temat przebywa obecnie w archiwum. Dodawanie nowych odpowiedzi zostało zablokowane.

×
×
  • Dodaj nową pozycję...