uitooltip.py aç ve
<blockquote data-attributes="" data-quote="" data-source="" class="bbCodeBlock bbCodeBlock--expandable bbCodeBlock--quote js-expandWatch">
Kod:
def __SetFeaturesToolTip(self, itemVnum): image = ui.ImageBox() image.SetParent(self) image.Show() self.main = { "vnums" : [ 140, 150, 3130, 270, 12010, 12020, 12030, 12040, 480, 460, 470, 5120, 7120, 20250, 20750, 20000, 180, 190#(hangi itemlerden balataca縱n??ayarlayaca縱n? blok!) ] } ###################################################################################################### # Example: vnums[480] = 480, 481, 482, 483, 484, 485, 486, 487, 488, 489 Daha Fazla Item ekleyebilirsiniz. (+0 dan +9a kadar olan b?? y?sek level itemlerde ileyecektir!) for k in xrange(10): for v in xrange(len(self.main["vnums"])): tokens, index, iterator = self.main["vnums"][v], str(itemVnum)[-1:], str(k) if ((tokens <= itemVnum and itemVnum <= tokens + 9) and (index == iterator)): image.LoadImage("icon/item/df2_tooltip/%d.tga" % (k)) image.SetPosition(self.toolTipWidth/2 - 75, self.toolTipHeight) self.toolTipHeight += 18 self.childrenList.append(image) self.ResizeToolTip()
son olarak burayı bulmak için aşağıdaki kodu arat
Kod:
self.__SetItemTitle(itemVnum, metinSlot, attrSlot)
altına ekle
Kod:
self.__SetFeaturesToolTip(itemVnum)
Metin2'de Belirli Itemlerde Nadirlik İkonu Nasıl Eklenir?
Metin2 özel sunucularında kullanıcı deneyimini artırmak için itemlerin nadirlik seviyesini görsel olarak belirtmek oldukça faydalıdır. Özellikle PvP sistemlerinde veya özel drop edilen eşyalar için bu ikonlar, oyuncuların hangi itemin daha değerli olduğunu anlamasını sağlar. Bu rehberde, belirli itemlerde nadirlik ikonunun nasıl ekleneceğini detaylıca inceleyeceğiz.
Nadirlik Sistemi Nedir?
Nadirlik sistemi, bir itemin ne kadar değerli veya nadir olduğunu belirtmek için kullanılır. Genellikle renkli ikonlar veya simgelerle ifade edilir. Bu sistem, oyuncuların hızlıca bir itemin önem derecesini anlamasını sağlar. Metin2 özel sunucularında bu sistem genellikle C++ backend tarafında geliştirilir ve client tarafında UIScript ile desteklenir.
Nadirlik İkonları Nerede Kullanılır?
Nadirlik ikonları özellikle şu durumlarda kullanılır:
- PvP ödüllerinde
- Özel etkinliklerden gelen itemlerde
- Drop edilen nadir eşyalarda
- Marketten satın alınan premium itemlerde
Nadirlik Sisteminin Uygulanması
Nadirlik ikonlarını uygulamak için öncelikle itemlerin özel niteliklerle tanımlanması gerekir. Bu tanım genellikle DB tablosunda veya C++ kodlarında yapılır. Örneğin, bir itemin nadirlik seviyesi 1 ile 7 arasında değişebilir. Bu değerler, farklı renkler veya sembollerle eşleştirilir. Client tarafında ise bu ikonlar UI elementleri olarak eklenir.
UYARI:[/BR][/BR]Client tarafında yapılan değişikliklerin doğru şekilde paketlenmesi ve sunucuya aktarılması gerekir. Yanlış bir UI dosyası, oyunun çökmesine neden olabilir.
Python GUI ve Script Kullanımı
Metin2 geliştirme ortamlarında Python GUI arayüzleri ile item veritabanları kolayca düzenlenebilir. PyRoot ve UIScript dosyaları yardımıyla nadirlik ikonları dinamik olarak yüklenebilir. Bu sistem, geliştiricilerin daha hızlı ve esnek bir şekilde çalışmasını sağlar.
Sonuç
Belirli itemlerde nadirlik ikonu eklemek, Metin2 özel sunucularında kullanıcı deneyimini ciddi anlamda artırır. Doğru yapılandırılmış bir sistem, oyuncuların dikkatini çekecek ve oyun içi etkileşimleri daha keyifli hale getirecektir.
How to Add Rarity Icons to Specific Items in Metin2?
To enhance user experience on Metin2 private servers, visually indicating the rarity level of items can be very beneficial. Especially in PvP systems or for special drop items, these icons help players identify which items are more valuable. In this guide, we will examine in detail how to add rarity icons to specific items.
What Is the Rarity System?
The rarity system indicates how valuable or rare an item is. It is usually expressed with colorful icons or symbols. This system allows players to quickly understand the importance level of an item. In Metin2 private servers, this system is typically developed on the C++ backend side and supported on the client side with UIScript.
Where Are Rarity Icons Used?
Rarity icons are particularly used in the following cases:
- PvP rewards
- Items from special events
- Rare dropped items
- Premium items purchased from the market
Implementing the Rarity System
To apply rarity icons, items must first be defined with special attributes. This definition is usually done in DB tables or C++ code. For example, an item's rarity level can range from 1 to 7. These values are matched with different colors or symbols. On the client side, these icons are added as UI elements.
WARNING:[/BR][/BR]Changes made on the client side must be correctly packaged and transferred to the server. An incorrect UI file may cause the game to crash.
Using Python GUI and Scripts
In Metin2 development environments, item databases can easily be edited using Python GUI interfaces. With PyRoot and UIScript files, rarity icons can be loaded dynamically. This system enables developers to work faster and more flexibly.
Conclusion
Adding rarity icons to specific items significantly improves user experience on Metin2 private servers. A well-configured system will attract players' attention and make in-game interactions more enjoyable.
