Jump to content

Recommended Posts

Hey guys, i wanted to change the tooltip for my items for example level 1 weapon id :10-19 would have a green item name if you hover over it and lvl 5 weapon id 20-29 would have a red tooltip, possible to do?

 

if 10 == itemVnum or 11 == itemVnum :(and so on)

    self.AppendTextLine(item.GetItemName(), grp.GenerateColor(46, 208, 95, 1.0))
return
 
 would that make any sense?
Link to comment
https://metin2.dev/topic/5189-uitooltippy/
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Honorable Member

You can do it here:

	def __SetNormalItemTitle(self):
		self.SetTitle(item.GetItemName())

	def __SetSpecialItemTitle(self):
		self.AppendTextLine(item.GetItemName(), self.SPECIAL_TITLE_COLOR)

	def __SetItemTitle(self, itemVnum, metinSlot, attrSlot):
		if localeInfo.IsCANADA():
			if 72726 == itemVnum or 72730 == itemVnum:
				self.AppendTextLine(item.GetItemName(), grp.GenerateColor(1.0, 0.7843, 0.0, 1.0))
				return

		if self.__IsPolymorphItem(itemVnum):
			self.__SetPolymorphItemTitle(metinSlot[0])
		else:
			if self.__IsAttr(attrSlot):
				self.__SetSpecialItemTitle()
				return

			self.__SetNormalItemTitle()

Link to comment
https://metin2.dev/topic/5189-uitooltippy/#findComment-32656
Share on other sites

so for example will that work? will only item with Vnum 10, 20, 30 have the colour defined below? thanks for your help anyway :D

def __SetItemTitle(self, itemVnum, metinSlot, attrSlot):
    if localeInfo.IsCANADA():
        if 72726 == itemVnum or 72730 == itemVnum:
            self.AppendTextLine(item.GetItemName(), grp.GenerateColor(1.0, 0.7843, 0.0, 1.0))
            return
    if 10 == itemVnum or 20 == itemVnum or 30 == itemVnum
       self.AppemdTextLine(item.GeetItemName(),grp.GenerateColor(46, 208, 95, 1.0))
       return
Link to comment
https://metin2.dev/topic/5189-uitooltippy/#findComment-32703
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.