[ Pyton ] Tüm itemlerin Altına İstediğinizi Yazabilirsiniz [Recepin94]

  • Konbuyu başlatan Konbuyu başlatan Admin
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 71

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Bugün sizlere tüm itemlerin altına istediğiniz yazıyı yazmayı göstereceğim

root : uitooltip.py Dosyası üzerinden yapılır
Kod:
# ARAT     def AddItemData(self, itemVnum, metinSlot, attrSlot = 0, flags = 0, unbindTime = 0, cofres = 0):         self.itemVnum = itemVnum         item.SelectItem(itemVnum)         itemType = item.GetItemType()         itemSubType = item.GetItemSubType()

Kod:
# ALTINA EKLE         self.AppendTextLine("|cffffcc00BURAYA İSTEDİĞİNİZ YAZIYI YAZMALISINIZ")
Sistemden Görüntüler

item_yazi_1.jpg

item_yazi_2.jpg

item_yazi_3.jpg

Daha önce paylaşıldı ise kapatılabilir .

[ Metin2 Python Sistemi ]

Metin2 özel sunucularında gelişmiş sistemler oluşturmak isteyen geliştiriciler için Python dili önemli bir araçtır. Özellikle kullanıcı arayüzü (UI) geliştirme, oyun içi etkileşimler ve dinamik sistemler için Python, güçlü bir destek sağlar. Bu yazıda, Pyton ile Metin2 oyununda itemlere özel metinler eklemeyi ve bu özelliği nasıl özelleştireceğinizi ele alacağız.

Neden Item Altına Özel Metin Eklenir?

Metin2 özel sunucularında oyuncuların deneyimini artırmak için itemlere özel açıklamalar, özellikler veya easter egg gibi metinler eklemek önemlidir. Bu sayede itemler daha değerli hale gelir ve oyuncular arasında fark yaratılır. Python tabanlı sistemler sayesinde bu metinler dinamik olarak itemlere atanabilir.

Python GUI ve Uiscript Kullanımı

PyRoot ve uiscript gibi sistemler sayesinde Metin2 client tarafında Python ile yazılmış arayüzler entegre edilebilir. Bu sistemler, item bilgi panelleri, tooltip alanları ve özel metin gösterimleri için idealdir. Örneğin, bir itemin üzerine geldiğinizde alt satıra özel bir açıklama yazdırabilirsiniz.

Adım Adım Uygulama

1. Python dosyanızda ilgili item ID'sine göre özel bir metin tanımlayın.
2. Tooltip sınıfınıza özel bir fonksiyon yazarak bu metni itemin altına yazdırın.
3. uiscript.py dosyasında gerekli düzenlemeleri yaparak metnin görünmesini sağlayın.

Örnek Kod Yapısı:

def ShowItemTooltip(itemID):
customText = GetCustomTextByItemID(itemID)
if customText:
self.toolTip.SetText(customText)

Metin2 Server Src ve DB Entegrasyonu

Itemlere özel metinleri veritabanında da tutmak mümkündür. Bu sayede sunucu tarafında dinamik içerik yönetimi sağlanabilir. DB Core üzerinde özel tablolar oluşturarak, item ID'ye göre metinleri saklayabilir ve client tarafında Python ile çağırabilirsiniz.

Güvenlik ve Performans

Python ile yapılan değişikliklerin sunucu performansını etkilememesi için optimize edilmiş kodlar yazmak önemlidir. Ayrıca, herhangi bir güvenlik açığı oluşmaması için client-side işlemler dikkatlice planlanmalıdır.

Sonuç

Python kullanarak Metin2 oyununda itemlere özel metinler eklemek hem geliştirici hem de oyuncu tarafında keyifli bir deneyim sunar. Recepin94 gibi geliştiricilerin paylaştığı sistemler sayesinde bu tarz özelleştirmeler kolayca yapılabilir. Python GUI, uiscript, py root gibi yapılar sayesinde Metin2 özel sunucularınızda özgün sistemler geliştirebilirsiniz.


[ Metin2 Python System ]

For developers who want to create advanced systems on Metin2 private servers, the Python language is an important tool. Especially for user interface (UI) development, in-game interactions and dynamic systems, Python provides strong support. In this article, we will discuss how to add custom texts under items in Metin2 using Pyton and how you can customize this feature.

Why Add Custom Text Under Items?

To enhance the player experience on Metin2 private servers, adding special descriptions, attributes, or easter eggs to items is crucial. This makes items more valuable and creates distinction among players. With Python-based systems, these texts can be dynamically assigned to items.

Using Python GUI and Uiscript

Systems like PyRoot and uiscript allow integration of Python-written interfaces into the Metin2 client. These systems are ideal for item info panels, tooltip areas, and displaying custom texts. For example, you can print a custom message under an item when hovering over it.

Step-by-Step Implementation

1. Define a custom text based on the item ID in your Python file.
2. Write a custom function in your tooltip class to print the text under the item.
3. Edit the uiscript.py file to ensure the text appears correctly.

Sample Code Structure:

def ShowItemTooltip(itemID):
customText = GetCustomTextByItemID(itemID)
if customText:
self.toolTip.SetText(customText)

Metin2 Server Src and DB Integration

You can also store custom texts for items within the database. This allows for dynamic content management on the server side. By creating custom tables in DB Core, you can store texts by item ID and retrieve them via Python on the client side.

Security and Performance

It's important to write optimized code so that Python modifications do not affect server performance. Additionally, client-side operations should be carefully planned to avoid any security vulnerabilities.

Conclusion

Adding custom texts to items in Metin2 with Python offers a fun experience for both developers and players. Thanks to systems shared by developers like Recepin94, such customizations can easily be implemented. Through structures like Python GUI, uiscript, and py root, you can develop unique systems for your Metin2 private servers.
 

Şuan Bu Konuyu Görüntüleyen Kullanıcılar (Toplam : 0, Üye : 0, Misafir : 0)

Geri
Üst Alt