Management Karbust 4907 Posted April 2, 2018 Management Share Posted April 2, 2018 Hello, How can I put 2 bonus on the spirit stones? I put 2 bonus, but only the first one shows on the ToolTip, but both bonus are applied (checked using the state command) Thanks 1 Link to comment Share on other sites More sharing options...
Premium WeedHex 636 Posted April 3, 2018 Premium Share Posted April 3, 2018 def AppendMetinInformation(self): affectType, affectValue = item.GetAffect(0) affectString = self.__GetAffectString(affectType, affectValue) if affectString: self.AppendSpace(5) self.AppendTextLine(affectString, self.GetChangeTextLineColor(affectValue)) 1 Link to comment Share on other sites More sharing options...
Management Karbust 4907 Posted April 3, 2018 Author Management Share Posted April 3, 2018 2 minutes ago, WeedHex said: def AppendMetinInformation(self): affectType, affectValue = item.GetAffect(0) affectString = self.__GetAffectString(affectType, affectValue) if affectString: self.AppendSpace(5) self.AppendTextLine(affectString, self.GetChangeTextLineColor(affectValue)) But, how can I edit that to show 2 bonus? I only pretend on some stones, not all... Link to comment Share on other sites More sharing options...
Premium Solution WeedHex 636 Posted April 3, 2018 Premium Solution Share Posted April 3, 2018 def AppendMetinInformation(self): for i in xrange(item.ITEM_APPLY_MAX_NUM): (affectType, affectValue) = item.GetAffect(i) affectString = self.__GetAffectString(affectType, affectValue) if affectString: self.AppendTextLine(affectString, self.GetChangeTextLineColor(affectValue)) TRY LIKE THIS 2 Link to comment Share on other sites More sharing options...
Management Karbust 4907 Posted April 3, 2018 Author Management Share Posted April 3, 2018 (edited) 5 minutes ago, WeedHex said: def AppendMetinInformation(self): for i in xrange(item.ITEM_APPLY_MAX_NUM): (affectType, affectValue) = item.GetAffect(i) affectString = self.__GetAffectString(affectType, affectValue) if affectString: self.AppendTextLine(affectString, self.GetChangeTextLineColor(affectValue)) TRY LIKE THIS Thanks man!!! Edited August 24, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Premium WeedHex 636 Posted April 3, 2018 Premium Share Posted April 3, 2018 You're welcome Link to comment Share on other sites More sharing options...
Silver Sonitex 1443 Posted April 3, 2018 Silver Share Posted April 3, 2018 def __AppendMetinSlotInfo_AppendMetinSocketData(self, index, metinSlotData, custumAffectString="", custumAffectString2="", leftTime=0): slotType = self.GetMetinSocketType(metinSlotData) itemIndex = self.GetMetinItemIndex(metinSlotData) if 0 == slotType: return self.AppendSpace(5) slotImage = ui.ImageBox() slotImage.SetParent(self) slotImage.Show() ## Name nameTextLine = ui.TextLine() nameTextLine.SetParent(self) nameTextLine.SetFontName(self.defFontName) nameTextLine.SetPackedFontColor(self.NORMAL_COLOR) nameTextLine.SetOutline() nameTextLine.SetFeather() nameTextLine.Show() self.childrenList.append(nameTextLine) if player.METIN_SOCKET_TYPE_SILVER == slotType: slotImage.LoadImage("d:/ymir work/ui/game/windows/metin_slot_silver.sub") elif player.METIN_SOCKET_TYPE_GOLD == slotType: slotImage.LoadImage("d:/ymir work/ui/game/windows/metin_slot_gold.sub") self.childrenList.append(slotImage) if localeInfo.IsARABIC(): slotImage.SetPosition(self.toolTipWidth - slotImage.GetWidth() - 9, self.toolTipHeight-1) nameTextLine.SetPosition(self.toolTipWidth - 50, self.toolTipHeight + 2) else: slotImage.SetPosition(9, self.toolTipHeight-1) nameTextLine.SetPosition(50, self.toolTipHeight + 2) metinImage = ui.ImageBox() metinImage.SetParent(self) metinImage.Show() self.childrenList.append(metinImage) if itemIndex: item.SelectItem(itemIndex) ## Image try: metinImage.LoadImage(item.GetIconImageFileName()) except: dbg.TraceError("ItemToolTip.__AppendMetinSocketData() - Failed to find image file %d:%s" % (itemIndex, item.GetIconImageFileName()) ) nameTextLine.SetText(item.GetItemName()) ## Affect affectTextLine = ui.TextLine() affectTextLine.SetParent(self) affectTextLine.SetFontName(self.defFontName) affectTextLine.SetPackedFontColor(self.POSITIVE_COLOR) affectTextLine.SetOutline() affectTextLine.SetFeather() affectTextLine.Show() affectTextLine1 = ui.TextLine() affectTextLine1.SetParent(self) affectTextLine1.SetFontName(self.defFontName) affectTextLine1.SetPackedFontColor(self.POSITIVE_COLOR) affectTextLine1.SetOutline() affectTextLine1.SetFeather() affectTextLine1.Show() if localeInfo.IsARABIC(): metinImage.SetPosition(self.toolTipWidth - metinImage.GetWidth() - 10, self.toolTipHeight) affectTextLine.SetPosition(self.toolTipWidth - 50, self.toolTipHeight + 16 + 2) else: metinImage.SetPosition(10, self.toolTipHeight) affectTextLine.SetPosition(50, self.toolTipHeight + 16 + 2) if localeInfo.IsARABIC(): metinImage.SetPosition(self.toolTipWidth - metinImage.GetWidth() - 10, self.toolTipHeight) affectTextLine1.SetPosition(self.toolTipWidth - 50, self.toolTipHeight + 31 + 2) else: metinImage.SetPosition(10, self.toolTipHeight) affectTextLine1.SetPosition(50, self.toolTipHeight + 31 + 2) if custumAffectString: affectTextLine.SetText(custumAffectString) elif itemIndex!=constInfo.ERROR_METIN_STONE: affectType, affectValue = item.GetAffect(0) affectString = self.__GetAffectString(affectType, affectValue) if affectString: affectTextLine.SetText(affectString) else: affectTextLine.SetText(localeInfo.TOOLTIP_APPLY_NOAFFECT) if itemIndex!=constInfo.ERROR_METIN_STONE: affectType1, affectValue1 = item.GetAffect(1) affectString1 = self.__GetAffectString(affectType1, affectValue1) if affectString1: affectTextLine1.SetText(affectString1) self.childrenList.append(affectTextLine) self.childrenList.append(affectTextLine1) if custumAffectString2: affectTextLine = ui.TextLine() affectTextLine.SetParent(self) affectTextLine.SetFontName(self.defFontName) affectTextLine.SetPackedFontColor(self.POSITIVE_COLOR) affectTextLine.SetPosition(50, self.toolTipHeight + 16 + 2 + 16 + 2) affectTextLine.SetOutline() affectTextLine.SetFeather() affectTextLine.Show() affectTextLine.SetText(custumAffectString2) self.childrenList.append(affectTextLine) self.toolTipHeight += 16 + 2 if 0 != leftTime: timeText = (localeInfo.LEFT_TIME + " : " + localeInfo.SecondToDHM(leftTime)) timeTextLine = ui.TextLine() timeTextLine.SetParent(self) timeTextLine.SetFontName(self.defFontName) timeTextLine.SetPackedFontColor(self.POSITIVE_COLOR) timeTextLine.SetPosition(50, self.toolTipHeight + 16 + 2 + 16 + 2) timeTextLine.SetOutline() timeTextLine.SetFeather() timeTextLine.Show() timeTextLine.SetText(timeText) self.childrenList.append(timeTextLine) self.toolTipHeight += 16 + 2 else: nameTextLine.SetText(localeInfo.TOOLTIP_SOCKET_EMPTY) self.toolTipHeight += 40 self.ResizeToolTip() You'll need this too It is for the refine & attach stone windows. 2 Link to comment Share on other sites More sharing options...
Management Karbust 4907 Posted April 3, 2018 Author Management Share Posted April 3, 2018 (edited) 6 minutes ago, Sonitex said: You'll need this too It is for the refine & attach stone windows. You're right man Thank you!!! Edited August 24, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now