Bvural41 1
Bvural41
PrimeAC 1
PrimeAC
Payidar2 1
Payidar2
Fethi Polat 1
Fethi Polat
Wizard' 1
Wizard'
shrpnl 1
shrpnl
Queinn 1
Queinn
NovaLst 1
NovaLst
InfernoShade 1
InfernoShade
MysticBlade 1
MysticBlade
SolarPhantom 1
SolarPhantom
Riftas 1
Riftas
Hikaye Ekle

Cevaplanmadı Aligmnet Bonus

  • Konuyu başlatan Konuyu başlatan Zebster
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 3
  • Görüntüleme Görüntüleme 349

HERAKLES Otomatik Avlı kalıcı sunucu. 19 Haziran'da açılıyor. Atius & Wizard güvencesiyle hemen kayıt ol, ön kayıt ödülleri aktif. HEMEN TIKLA!

Hello everybody.
When I trying to add Alignment bonus-t for the clinet

I got this error

uiCharacter.py(line:1317) RefreshStatus
uiCharacter.py(line:1440) RefreshAlignment

CharacterWindow.RefreshStatus - <type 'exceptions.UnboundLocalError'>: a hozzárendelés előtt hivatkozott 'pont' helyi változó

Here is my uicharacter.py-m:

I added from: ### #define ENABLE_ALIGNMENT_BONUS ###

Thank you.
 

Ekli dosyalar

Son düzenleme:
def RefreshAlignment(self): Delete and Try the code below.

Kod:
    def RefreshAlignment(self):
        COLOR_NORMAL = 0xffa08784
        point, grade = player.GetAlignmentData()

        import colorInfo
        COLOR_DICT = {    0 : colorInfo.TITLE_RGB_GOOD_4,
                        1 : colorInfo.TITLE_RGB_GOOD_3,
                        2 : colorInfo.TITLE_RGB_GOOD_2,
                        3 : colorInfo.TITLE_RGB_GOOD_1,
                        4 : colorInfo.TITLE_RGB_NORMAL,
                        5 : colorInfo.TITLE_RGB_EVIL_1,
                        6 : colorInfo.TITLE_RGB_EVIL_2,
                        7 : colorInfo.TITLE_RGB_EVIL_3,
                        8 : colorInfo.TITLE_RGB_EVIL_4, }

        colorList = COLOR_DICT.get(grade, colorInfo.TITLE_RGB_NORMAL)
        gradeColor = ui.GenerateColor(colorList[0], colorList[1], colorList[2])

        self.toolTipAlignment.ClearToolTip()
        self.toolTipAlignment.AutoAppendTextLine(localeInfo.TITLE_NAME_LIST[grade], gradeColor)
        self.toolTipAlignment.AutoAppendTextLine(localeInfo.ALIGNMENT_NAME + str(point), COLOR_NORMAL)

        self.toolTipAlignment.AppendSpace(2)

        ### #define ENABLE_ALIGNMENT_BONUS ###
        if point >= 1000 and point <= 3999:
            self.toolTipAlignment.AutoAppendTextLine("Max. HP +500", NORMAL_COLOR)
            self.toolTipAlignment.AutoAppendTextLine("Strong against Half Humans +3%", NORMAL_COLOR)
            self.toolTipAlignment.AppendSpace(2)
        elif point >= 4000 and point <= 7999:
            self.toolTipAlignment.AutoAppendTextLine("Max. HP +1000", NORMAL_COLOR)
            self.toolTipAlignment.AutoAppendTextLine("Strong against Half Humans +6%", NORMAL_COLOR)
            self.toolTipAlignment.AppendSpace(2)
        elif point >= 8000 and point <= 11999:
            self.toolTipAlignment.AutoAppendTextLine("Max. HP +1500", NORMAL_COLOR)
            self.toolTipAlignment.AutoAppendTextLine("Strong against Half Humans +9%", NORMAL_COLOR)   
            self.toolTipAlignment.AppendSpace(2)
        elif point >= 12000:
            self.toolTipAlignment.AutoAppendTextLine("Max. HP +2000", NORMAL_COLOR)
            self.toolTipAlignment.AutoAppendTextLine("Strong against Half Humans +12%", NORMAL_COLOR)
            self.toolTipAlignment.AppendSpace(2)
        else:
            self.toolTipAlignment.AutoAppendTextLine("You can increase your rank for special bonuses", NORMAL_COLOR)
            self.toolTipAlignment.AppendSpace(2)
        ### #define ENABLE_ALIGNMENT_BONUS ###

        self.toolTipAlignment.AlignHorizonalCenter()
 
i tried but:
1669759404210.png

1669759442676.png

1669761630992.png
 
Son düzenleme:
AlignHorizalCenter and ShowTooltip 1 tab(keyboard key)next.

Also, the bottom else belongs to which if function.

What is the problem with the function I gave?
 
Son düzenleme:

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst