Jump to content
metin2dev
Sign in to follow this  
Necro

[R] Pets - bonus in description

Recommended Posts

There is a small configuration to get bonus of pet.

Maybe somebody use it. 

How it looks in game:

4e9b58d9e48c49f09b777408c8ea3cfe.png

In uitooltip.py -. search (item.ITEM_TYPE_QUEST == itemType:)

and after this statement:

            if itemVnum >= 53001 and itemVnum <= 53026:
                self.AppendSpace(5)
                for g in xrange(item.ITEM_APPLY_MAX_NUM):
                    (affectType, affectValue) = item.GetAffect(g)
                    affectString = self.__GetAffectString(affectType, affectValue)
                    if affectString:
                        affectColor = self.GetChangeTextLineColor(affectValue)
                        self.AppendTextLine(affectString, affectColor)

its all.

PS: If you dont have a item.ITEM_TYPE_QUEST == itemType:

Just find         elif item.ITEM_TYPE_USE == itemType:

and after add item.ITEM_TYPE_QUEST == itemType:

Looks like:

 elif item.ITEM_TYPE_USE == itemType:

.....

.....

elif  item.ITEM_TYPE_QUEST == itemType:

 

This is nothing special but i think it looks good :D 

  • Like 5

Share this post


Link to post
Share on other sites

i tried to make it also with costume mount

Spoiler

        elif item.ITEM_TYPE_COSTUME == itemType:
            self.__AppendLimitInformation()

 

and this for show the bounses

Spoiler

        elif item.ITEM_TYPE_COSTUME == itemType:
            if itemVnum >= 52001 and itemVnum <= 52200:
                self.AppendSpace(5)
                for g in xrange(item.ITEM_APPLY_MAX_NUM):
                    (affectType, affectValue) = item.GetAffect(g)
                    affectString = self.__GetAffectString(affectType, affectValue)
                    if affectString:
                        affectColor = self.GetChangeTextLineColor(affectValue)
                        self.AppendTextLine(affectString, affectColor)
            for i in xrange(item.LIMIT_MAX_NUM):
                (limitType, limitValue) = item.GetLimit(i)

Spoiler

        if app.ENABLE_COSTUME_SYSTEM:
            if item.ITEM_TYPE_COSTUME == itemType:
                isCostumeItem = 1
                isCostumeHair = item.COSTUME_TYPE_HAIR == itemSubType
                isCostumeBody = item.COSTUME_TYPE_BODY == itemSubType
                isCostumeMount = item.COSTUME_TYPE_MOUNT == itemSubType
                if app.ENABLE_COSTUME_WEAPON_SYSTEM:
                    isCostumeWeapon = item.COSTUME_TYPE_WEAPON == itemSubType
                isCostumeAcce = item.COSTUME_TYPE_ACCE == itemSubType

but it doesn't work

btw syserr is clean

Share this post


Link to post
Share on other sites

Code updated, that one posted wasn`t complete on my client (wasn`t appending the info to the space).

 

        ## Start of Pet System Bonus info ##
        elif itemVnum >= 53001 and itemVnum <= 53999:
            self.AppendSpace(5)
            for g in xrange(item.ITEM_APPLY_MAX_NUM):
                (affectType, affectValue) = item.GetAffect(g)
                affectString = self.__GetAffectString(affectType, affectValue)
                if affectString:
                    affectColor = grp.GenerateColor(0.3824, 0.5804, 0.9824, 1.0) # You can play here for the text color.
                    self.AppendTextLine(affectString, affectColor)
            self.__AppendAttributeInformation(attrSlot)
        ## End of Pet System Bonus info ##


Some screenshots:

dVIxszi.jpg

 

 

For who doesn`t have a brain, here is the tabulation:

0mI3Jjp.png
Hope it will be useful to someone.

Share this post


Link to post
Share on other sites

Snippet updated to show the LIMIT information in the proto if there are any.

 

		## Start of Pet System Bonus info ##
		elif itemVnum >= 53001 and itemVnum <= 53999:
			self.AppendSpace(5)
			for g in xrange(item.ITEM_APPLY_MAX_NUM):
				(affectType, affectValue) = item.GetAffect(g)
				affectString = self.__GetAffectString(affectType, affectValue)
				if affectString:
					affectColor = grp.GenerateColor(0.3824, 0.5804, 0.9824, 1.0) # You can play here for the text color.
					self.AppendTextLine(affectString, affectColor) 
			self.__AppendAttributeInformation(attrSlot)
			bHasRealtimeFlag = 0
			for i in xrange(item.LIMIT_MAX_NUM):
				(limitType, limitValue) = item.GetLimit(i)
				if item.LIMIT_REAL_TIME == limitType:
					bHasRealtimeFlag = 1
			if bHasRealtimeFlag == 1:
				self.AppendMallItemLastTime(metinSlot[0])
		## End of Pet System Bonus info ##

Result:

3Y9a0iT.png

Share this post


Link to post
Share on other sites


[IMG]

 

 
        ## Start of Pet/Mount System Bonus info ##
        elif itemVnum >= 53001 and itemVnum <= 53999 or item.GetItemSubType() == item.COSTUME_TYPE_MOUNT:
            self.AppendSpace(5)
            for g in xrange(item.ITEM_APPLY_MAX_NUM):
                (affectType, affectValue) = item.GetAffect(g)
                affectString = self.__GetAffectString(affectType, affectValue)
                if affectString:
                    affectColor = grp.GenerateColor(0.3824, 0.5804, 0.9824, 1.0) # You can play here for the text color.
                    self.AppendTextLine(affectString, affectColor)
            self.__AppendAttributeInformation(attrSlot)
            bHasRealtimeFlag = 0
            for i in xrange(item.LIMIT_MAX_NUM):
                (limitType, limitValue) = item.GetLimit(i)
                if item.LIMIT_REAL_TIME == limitType:
                    bHasRealtimeFlag = 1
            if bHasRealtimeFlag == 1:
                self.AppendMallItemLastTime(metinSlot[0])
        ## End of Pet/Mount System Bonus info ##





Sorry, reupdated with the mount in the check aswell, i didn`t have any limits on that seal but if you have any they will apply as for the pets.

Share this post


Link to post
Share on other sites

make this improvement I hope it's useful
 

			if itemVnum >= 53001 and itemVnum <= 53026:
				self.AppendSpace(5)
				self.__AppendPetIcon(itemVnum)
				for g in xrange(item.ITEM_APPLY_MAX_NUM):
					(affectType, affectValue) = item.GetAffect(g)
					affectString = self.__GetAffectString(affectType, affectValue)
					if affectString:
						# affectColor = self.GetChangeTextLineColor(affectValue)
						affectColor = grp.GenerateColor(0.3824, 0.5804, 0.9824, 1.0) # You can play here for the text color.
						self.AppendTextLine(affectString, affectColor)
				self.__AppendAttributeInformation(attrSlot)
				bHasRealtimeFlag = 0
				for i in xrange(item.LIMIT_MAX_NUM):
					(limitType, limitValue) = item.GetLimit(i)
					if item.LIMIT_REAL_TIME == limitType:
						bHasRealtimeFlag = 1
				if bHasRealtimeFlag == 1:
					self.AppendMallItemLastTime(metinSlot[0])

search:
def __AppendItemIcon(self, itemVnum):

paste:

 

	def __AppendPetIcon(self, itemVnum):
		itemImage = ui.ImageBox()
		itemImage.SetParent(self)
		itemImage.Show()
		
		itemImage.LoadImage(item.GetIconImageFileName())
		itemImage.SetPosition((self.toolTipWidth/2) - itemImage.GetWidth()/2, self.toolTipHeight)
		self.toolTipHeight += itemImage.GetHeight()
		self.childrenList.append(itemImage)
		self.ResizeToolTip()

 

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.

×