*Poze / Video:
https://prnt.sc/dY3I6JMeFZRF
[/b]
Te așteptăm și pe serverul de Discord - aici ne-am strâns toată comunitatea de Metin2 din România.
Alătură-te acum! def __GetTotalAtkText(self):
minAtk = player.GetStatus(player.ATT_MIN)
maxAtk = player.GetStatus(player.ATT_MAX)
atkBonus = player.GetStatus(player.ATT_BONUS)
attackerBonus = player.GetStatus(player.ATTACKER_BONUS)
min = int(minAtk + atkBonus)
max = int(maxAtk + atkBonus)
attack = int(attackerBonus)
groupbonusattack = self.GetChild("ATT_Slot")
if minAtk == maxAtk:
if attack == 0:
return "%s" % (localeInfo.NumberToDecimalString((min)))
else:
return "%s |cff00ff00|h+ (%s)" % (localeInfo.NumberToDecimalString(min), localeInfo.NumberToDecimalString(attack))
else:
if attack == 0:
return "%s - %s" % (localeInfo.NumberToDecimalString(min), localeInfo.NumberToDecimalString(max))
else:
return "%s - %s |cff00ff00|h+ (%s)" % (localeInfo.NumberToDecimalString(min), localeInfo.NumberToDecimalString(max), localeInfo.NumberToDecimalString(attack))
def __GetTotalMagAtkText(self):
minMagAtk = player.GetStatus(player.MAG_ATT) + player.GetStatus(player.MIN_MAGIC_WEP)
maxMagAtk = player.GetStatus(player.MAG_ATT) + player.GetStatus(player.MAX_MAGIC_WEP)
if minMagAtk == maxMagAtk:
return "%s" % (localeInfo.NumberToDecimalString(minMagAtk))
else:
return "%s - %s" % (localeInfo.NumberToDecimalString(minMagAtk), localeInfo.NumberToDecimalString(maxMagAtk))
def __GetTotalDefText(self):
defValue = player.GetStatus(player.DEF_GRADE)
if constInfo.ADD_DEF_BONUS_ENABLE:
defValue += player.GetStatus(player.DEF_BONUS)
return "%s" % (localeInfo.NumberToDecimalString(defValue))
self.GetChild("Level_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.LEVEL)))
self.GetChild("Exp_Value").SetText(localeInfo.NumberToDecimalString(unsigned32(player.GetEXP())))
self.GetChild("RestExp_Value").SetText(localeInfo.NumberToDecimalString(unsigned32(player.GetStatus(player.NEXT_EXP))))
self.GetChild("HP_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.HP)) + ' / ' + localeInfo.NumberToDecimalString(player.GetStatus(player.MAX_HP)))
self.GetChild("SP_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.SP)) + ' / ' + localeInfo.NumberToDecimalString(player.GetStatus(player.MAX_SP)))
self.GetChild("STR_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.ST)))
self.GetChild("DEX_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.DX)))
self.GetChild("HTH_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.HT)))
self.GetChild("INT_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.IQ)))
self.GetChild("ATT_Value").SetText(self.__GetTotalAtkText())
self.GetChild("DEF_Value").SetText(self.__GetTotalDefText())
self.GetChild("MATT_Value").SetText(self.__GetTotalMagAtkText())
self.GetChild("MDEF_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.MAG_DEF)))
self.GetChild("ASPD_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.ATT_SPEED)))
self.GetChild("MSPD_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.MOVING_SPEED)))
self.GetChild("CSPD_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.CASTING_SPEED)))
self.GetChild("ER_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.EVADE_RATE)))
def NumberToDecimalString(n):
return str('.'.join([i-3 < 0 and str(n)[:i] or str(n)[i-3:i] for i in xrange(len(str(n)) % 3, len(str(n)) + 1, 3) if i]))
Multumim frumos! O sa editez topic-ul original:)Daanu scrie: ↑15 Dec 2024, 00:46 Functional![]()
Am sa adaug tab-urile pentru voi :Code:def __GetTotalAtkText(self): minAtk = player.GetStatus(player.ATT_MIN) maxAtk = player.GetStatus(player.ATT_MAX) atkBonus = player.GetStatus(player.ATT_BONUS) attackerBonus = player.GetStatus(player.ATTACKER_BONUS) min = int(minAtk + atkBonus) max = int(maxAtk + atkBonus) attack = int(attackerBonus) groupbonusattack = self.GetChild("ATT_Slot") if minAtk == maxAtk: if attack == 0: return "%s" % (localeInfo.NumberToDecimalString((min))) else: return "%s |cff00ff00|h+ (%s)" % (localeInfo.NumberToDecimalString(min), localeInfo.NumberToDecimalString(attack)) else: if attack == 0: return "%s - %s" % (localeInfo.NumberToDecimalString(min), localeInfo.NumberToDecimalString(max)) else: return "%s - %s |cff00ff00|h+ (%s)" % (localeInfo.NumberToDecimalString(min), localeInfo.NumberToDecimalString(max), localeInfo.NumberToDecimalString(attack)) def __GetTotalMagAtkText(self): minMagAtk = player.GetStatus(player.MAG_ATT) + player.GetStatus(player.MIN_MAGIC_WEP) maxMagAtk = player.GetStatus(player.MAG_ATT) + player.GetStatus(player.MAX_MAGIC_WEP) if minMagAtk == maxMagAtk: return "%s" % (localeInfo.NumberToDecimalString(minMagAtk)) else: return "%s - %s" % (localeInfo.NumberToDecimalString(minMagAtk), localeInfo.NumberToDecimalString(maxMagAtk)) def __GetTotalDefText(self): defValue = player.GetStatus(player.DEF_GRADE) if constInfo.ADD_DEF_BONUS_ENABLE: defValue += player.GetStatus(player.DEF_BONUS) return "%s" % (localeInfo.NumberToDecimalString(defValue))
Code:self.GetChild("Level_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.LEVEL))) self.GetChild("Exp_Value").SetText(localeInfo.NumberToDecimalString(unsigned32(player.GetEXP()))) self.GetChild("RestExp_Value").SetText(localeInfo.NumberToDecimalString(unsigned32(player.GetStatus(player.NEXT_EXP)))) self.GetChild("HP_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.HP)) + ' / ' + localeInfo.NumberToDecimalString(player.GetStatus(player.MAX_HP))) self.GetChild("SP_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.SP)) + ' / ' + localeInfo.NumberToDecimalString(player.GetStatus(player.MAX_SP))) self.GetChild("STR_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.ST))) self.GetChild("DEX_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.DX))) self.GetChild("HTH_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.HT))) self.GetChild("INT_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.IQ))) self.GetChild("ATT_Value").SetText(self.__GetTotalAtkText()) self.GetChild("DEF_Value").SetText(self.__GetTotalDefText()) self.GetChild("MATT_Value").SetText(self.__GetTotalMagAtkText()) self.GetChild("MDEF_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.MAG_DEF))) self.GetChild("ASPD_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.ATT_SPEED))) self.GetChild("MSPD_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.MOVING_SPEED))) self.GetChild("CSPD_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.CASTING_SPEED))) self.GetChild("ER_Value").SetText(localeInfo.NumberToDecimalString(player.GetStatus(player.EVADE_RATE)))
Code:def NumberToDecimalString(n): return str('.'.join([i-3 < 0 and str(n)[:i] or str(n)[i-3:i] for i in xrange(len(str(n)) % 3, len(str(n)) + 1, 3) if i]))
Te așteptăm și pe serverul de Discord - aici ne-am strâns toată comunitatea de Metin2 din România.
Alătură-te acum!Trebuie să fii membru pentru a răspunde
Înregistrează-te și alătură-te comunității noastre
Membrii pot crea subiecte noi și pot descărca resurse Metin2 Gratuit!
Te poți înregistra rapid utilizând contul tău de Discord sau Github
Utilizatori ce navighează pe acest forum: root500 și 5 vizitatori