Python Mostrare i bonus dal proto sui sigilli pet/mount

Stato
Discussione chiusa ad ulteriori risposte.
U

Utente cancellato 236678

Ultima modifica da un moderatore:
### Guarda in basso per la versione aggiornata ###

Yo,

Questa "relase" potrebbe essere utile a chi non ha sbatta di tradursi le cose dall`itemdesc e vuole fare un lavoro pulito in caso di multiple lingue nel server senza starsi ad ammazzare in caso di update.

Questo codice e` stato preso da un utente "Necro" di un altro forum, ma a quanto pare il suo codice non era completo e me lo sono leggermente personalizzato, quindi lui prende i crediti per questa relase, io ho solo aggiustato una svista penso e cambiato il colore.

Ma bando alla chiacchiere eccovi degli screen del funzionamento & codice:

Inserire il codice in root/uitooltip.py inseritevi sotto un elif esistente.

Python:
        ## 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 ##

Screen ingame:

dVIxszi.jpg


Tabulazione (per i senza mani):

0mI3Jjp.png
 
  • Mi piace
Reazioni: Cappuccino e Razr
Farai felici tanti fat kids, ben fatto Fili :patt:
Ovviamente il funzionamento e` inteso anche per le mount o anelli/amuleti particolari, potreste anche selezionarle tramite un array
esempio
MOUNT_VNUM = 1,2,3,4,5,6,7
if ItemVnum in MOUNT_VNUM :
// do something
 
  • Mi piace
Reazioni: Razr
Script aggiornato per mostrare anche i LIMIT VALUE se presenti (realtime per intenderci sull`item proto)


Python:
        ## 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 ##

Risultato:

3Y9a0iT.png
 
Scusate, ri-aggiornato con le mount comprese, conteggeranno anche eventuali limit (tempo)

NnBPZkO.jpg



Python:
        ## 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 ##
 
Stato
Discussione chiusa ad ulteriori risposte.