Jump to content
metin2dev
Sign in to follow this  
Noa_

[Release]Equip Items from Chat(Hyperlink)

Recommended Posts

 

You have the option of trying on items to see how they are, even though you do not have them.

qpvin6dp.jpg

 

How To:

1. unpack root

2.open open uitooltip.py

2. search for "def AddItemData"

3. add this above 

	## Noa ItemPreview
	def CanEquipPreview(self):
		race = player.GetRace()
		job = chr.RaceToJob(race)
		if not self.ANTI_FLAG_DICT.has_key(job):
			return FALSE
		if item.IsAntiFlag(self.ANTI_FLAG_DICT[job]):
			return FALSE
		sex = chr.RaceToSex(race)
		MALE = 1
		FEMALE = 0
		if item.IsAntiFlag(item.ITEM_ANTIFLAG_MALE) and sex == MALE:
			return FALSE
		if item.IsAntiFlag(item.ITEM_ANTIFLAG_FEMALE) and sex == FEMALE:
			return FALSE
		return TRUE
	def AddItemPreview(self, itemVnum):
		item.SelectItem(itemVnum)
		itemType = item.GetItemType()
		itemSubType = item.GetItemSubType()
		if itemType == item.ITEM_TYPE_WEAPON or item.ITEM_TYPE_ARMOR == itemType and itemSubType in [0]:
			ROOT_PATH = "d:/ymir work/ui/game/windows/"
			PreviewBtn = ui.Button()
			PreviewBtn.SetParent(self)
			PreviewBtn.SetUpVisual(ROOT_PATH+"btn_plus_up.sub")
			PreviewBtn.SetOverVisual(ROOT_PATH+"btn_plus_over.sub")
			PreviewBtn.SetDownVisual(ROOT_PATH+"btn_plus_down.sub")
			PreviewBtn.SetToolTipText("Anprobieren")
			PreviewBtn.SetPosition(2,2)
			PreviewBtn.Show()
			PreviewBtn.SetEvent(self.EquipPreview, itemType, itemVnum)
			self.childrenList.append(PreviewBtn)
	def EquipPreview(self, itemType,itemVnum):
		if itemType == 1:
			chr.SetWeapon(itemVnum)
		if 2 == itemType:
			chr.SetArmor(itemVnum)
		player.SetSingleDIKKeyState(app.DIK_UP, TRUE)
		player.SetSingleDIKKeyState(app.DIK_UP, FALSE)

4.Edit def AddItemData(self, itemVnum, metinSlot, attrSlot = 0): to def AddItemData(self, itemVnum, metinSlot, attrSlot = 0, hyper = None):

5.Search def AddItemData(self, itemVnum, metinSlot, attrSlot = 0, hyper = None): add this above 

		### Noa ItemPreview
		if hyper and self.CanEquipPreview():
			self.AddItemPreview(itemVnum)

6.Search this ItemToolTip.OnUpdate(self) and add this above

			## Noa
			self.AddItemData(itemVnum, metinSlot, attrSlot, hyper = 1)

 

Have fun with this shit

  • Like 2
  • Confused 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×