Jump to content
For maintenance and updates, the community will be offline on 31 December 2022 ×

Bonus highlight


marvin

Recommended Posts

Before:174509SUyIAL3.png  After: 174509AN65R5Q.png174509yYFPPGv.png174509Ig126PW.png

 

Version with Tabs: PasteBin or M2Bin

 

uitooltip.py

Find def AppendTextLine(self, text, color = FONT_COLOR, centerAlign = True):

Delete or comment this

        if not self.CanEquip() and self.bCannotUseItemForceSetDisableColor:
            color = self.DISABLE_COLOR

Find def __SetNormalItemTitle(self):

Before add

    def __CheckAntiFlag(self):
        race = player.GetRace()
        job = chr.RaceToJob(race)
        
        if item.IsAntiFlag(self.ANTI_FLAG_DICT[job]):
            return True
        else:
            return False

    def __CheckSex(self):
        sex = chr.RaceToSex(player.GetRace())
        MALE = 1
        FEMALE = 0
        if item.IsAntiFlag(item.ITEM_ANTIFLAG_MALE) and sex == MALE:
            return True
        if item.IsAntiFlag(item.ITEM_ANTIFLAG_FEMALE) and sex == MALE:
            return False

Find and replace def __SetNormalItemTitle(self): and def __SetSpecialItemTitle(self): with

    def __SetNormalItemTitle(self):
        if self.__CheckAntiFlag() == True:
            self.AppendTextLine(item.GetItemName(), self.DISABLE_COLOR)
        else:
            if self.__CheckSex() == True:
                self.AppendTextLine(item.GetItemName(), self.DISABLE_COLOR)
            else:
                self.AppendTextLine(item.GetItemName(), self.TITLE_COLOR)
    def __SetSpecialItemTitle(self):
        if self.__CheckAntiFlag() == True:
            self.AppendTextLine(item.GetItemName(), self.DISABLE_COLOR)
        else:
            if self.__CheckSex() == True:
                self.AppendTextLine(item.GetItemName(), self.DISABLE_COLOR)
            else:
                self.AppendTextLine(item.GetItemName(), self.SPECIAL_TITLE_COLOR)

Find and replace def AppendWearableInformation(self): with

    def AppendWearableInformation(self):
        self.AppendSpace(5)
        if self.__CheckAntiFlag() == True:
            self.AppendTextLine(localeInfo.TOOLTIP_ITEM_WEARABLE_JOB, self.DISABLE_COLOR)
        else:
            self.AppendTextLine(localeInfo.TOOLTIP_ITEM_WEARABLE_JOB, self.NORMAL_COLOR)
        flagList = (
            not item.IsAntiFlag(item.ITEM_ANTIFLAG_WARRIOR),
            not item.IsAntiFlag(item.ITEM_ANTIFLAG_ASSASSIN),
            not item.IsAntiFlag(item.ITEM_ANTIFLAG_SURA),
            not item.IsAntiFlag(item.ITEM_ANTIFLAG_SHAMAN))
        characterNames = ""
        for i in xrange(self.CHARACTER_COUNT):
            name = self.CHARACTER_NAMES[i]
            flag = flagList[i]
            if flag:
                characterNames += " "
                characterNames += name
        if self.__CheckAntiFlag() == True:
            textLine = self.AppendTextLine(characterNames, self.DISABLE_COLOR, True)
        else:
            textLine = self.AppendTextLine(characterNames, self.NORMAL_COLOR, True)
        textLine.SetFeather()
        race = player.GetRace()
        sex = chr.RaceToSex(race)
        MALE = 1
        FEMALE = 0
        if item.IsAntiFlag(item.ITEM_ANTIFLAG_MALE):
            if sex == MALE:
                textLine = self.AppendTextLine(localeInfo.FOR_FEMALE, self.DISABLE_COLOR, True)
                textLine.SetFeather()
            else:
                textLine = self.AppendTextLine(localeInfo.FOR_FEMALE, self.NORMAL_COLOR, True)
                textLine.SetFeather()
        if item.IsAntiFlag(item.ITEM_ANTIFLAG_FEMALE):
            if sex == FEMALE:
                textLine = self.AppendTextLine(localeInfo.FOR_MALE, self.DISABLE_COLOR, True)
                textLine.SetFeather()
            else:
                textLine = self.AppendTextLine(localeInfo.FOR_MALE, self.NORMAL_COLOR, True)
                textLine.SetFeather()

 

Link to comment
Share on other sites

!-->
  • Distinguished Member
43 minutes ago, LikeWeed said:

But.. why? original code is made by me

Speaking to Jxxkub excuse that I've seen this modification too somewhere, but ofc this does not mean you just reposted it. 
This forum have a strict rule about leaks/reposts, and while the rule needed, it evokes this attitude in some people.

Anyway good code, keep it up👍

Edited by TMP4
Link to comment
Share on other sites



  • Similar Content

  • Activity

    1. 993

      [40250] Reference Serverfile + Client + Src [15 Available Languages]

    2. 1

      Looking for a good designer

    3. 0

      Cross channel friend request

    4. 2

      Where are those maps/dungeons coming from?

    5. 3

      Press F10 to close the client immediately

    6. 2

      Where are those maps/dungeons coming from?

    7. 2

      Where are those maps/dungeons coming from?

    8. 4

      Visual studio 2022 compiling issue

    9. 1

      Count players function

  • Recently Browsing

    • No registered users viewing this page.
!-->
×
×
  • 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.