[Py]Smokin/Gelinlik , Buket ve Oklara Kadim Efsun Basılma Sorunu Çözümü

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

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Bildiğiniz üzere ok çantalarına , bukete, gelinliğe ve smokine kadim efsun eklenebiliyor. Sizlere bu sorunun çözümünü göstereceğim.
Kod:
def AttachBonusToItem(self, sourceSlotPos, targetSlotPos):
Kod:
if item.GetItemType() not in (item.ITEM_TYPE_WEAPON, item.ITEM_TYPE_ARMOR):
Kod:
if item.GetItemSubType() in (item.WEAPON_ARROW, item.WEAPON_UNLIMITED_ARROW):             return False         if item.GetItemName() == "Smokin" or item.GetItemName() == "Gelinlik" or item.GetItemName() == "Buket" :             return False

Tab ayarlarını kendinize göre yapınız.
PySmokin/Gelinlik, Buket ve Oklara Kadim Efsun Basılma Sorunu Çözümü


Giriş
Metin2 özel sunucularında geliştirme yaparken karşılaşılan sorunlardan birisi de oyuncuların bazı itemlere özel efsunlar basamamasıdır. Özellikle PySmokin olarak bilinen gelinlik seti, Buket veya Oklar gibi itemlere Kadim Efsun basılması sırasında ortaya çıkan hatalar geliştiricileri zorlamaktadır. Bu yazıda, bu sorunun neden kaynaklandığını ve nasıl çözüleceğini detaylıca inceleyeceğiz.

Sorun Nedir?
PySmokin, Buket ve benzeri özel itemlerde Kadim Efsun basma işlemi sırasında genellikle hata mesajı alınır veya işlem başarıyla tamamlansa bile efsun geçişmez. Bunun temel sebeplerinden biri, bu itemlerin özel item ID aralıklarında yer almasıdır. Bu ID'lerdeki itemler için sistemde farklı kontrol mekanizmaları çalışır ve bu da efsun basma işlemlerinde sınırlamalara neden olabilir.

Teknik Nedenler
Bu tür itemlerin özel olarak tanımlanmış item_proto verileri bulunur. Kadim Efsun basma sistemi genellikle standart itemler için tasarlanmıştır. Eğer bu itemlerin ID'si ya da özel nitelikleri sisteme tanıtılmamışsa, efsunlama işlemi engellenir. Ayrıca bazı itemlerde refine_type veya apply_type gibi alanlar farklı değerler taşır. Bu da efsun basma sırasında uyumsuzluk yaratır.

Çözüm Adımları
1. Item Protos Kontrolü:
Öncelikle, PySmokin, Buket gibi itemlerin doğru şekilde item_proto tablosuna tanımlandığından emin olunmalıdır. Bu itemlerin ID numaraları, refine_type ve apply_type gibi alanları gözden geçirilmelidir.

2. Efsun Sistemine Özel Tanımlama:
Kadim Efsun sisteminin bu özel itemlere izin vermesi için, ilgili Python veya C++ dosyalarında exception handling yapılmalıdır. Örneğin, refine.py veya smelt.py dosyalarında item ID'ye göre özel izinler verilebilir.

3. Client-Side Uyarlamalar:
Bazı durumlarda, efsunlama işlemi client tarafından da kontrol edilir. Bu yüzden UI scriptlerinde (örneğin uiscript) itemlere özel izinler eklenmelidir. Py Root dosyalarında bu kontroller yapılmadan, hatalar devam edebilir.

4. DB Core Ayarları:
Game DB'de bu itemlerin özel efsun kabul edip etmeyeceği item_attr veya item_addon gibi tablolarda tanımlanmalıdır. Eğer bu itemlerin attribute slotları eksikse veya hatalıysa, Kadim Efsun işlemi başarısız olur.

Pratik Kod Örneği (Python)
Aşağıda, Kadim Efsun sırasında PySmokin itemlerine özel izin veren örnek bir Python kod parçası yer almaktadır:

Kod:
def check_item_for_enchant(item_vnum):[BR][/BR]    special_items = [30215, 37030, 19999]  # PySmokin, Buket vs.[BR][/BR]    if item_vnum in special_items:[BR][/BR]        return True[BR][/BR]    return False


Sonuç
PySmokin, Buket ve benzeri özel itemlere Kadim Efsun basma sorunu, doğru tanımlamalar ve uygun sistem ayarlarıyla çözülebilir. Bu süreçte hem client-side hem de server-side değişikliklerin yapılması gerekir. Geliştiricilerin bu konuda dikkat etmesi gereken detaylar oldukça fazladır. Ancak doğru adımlarla bu sorunlar kolayca aşılabilir ve oyunculara daha zengin bir deneyim sunulabilir.

Kaynak: Metin2Lobby


Solution for Enchanting Kadim on PySmokin/Wedding Dress, Bouquet and Arrows Issue


Introduction
One of the issues encountered while developing Metin2 private servers is that players cannot enchant certain items with special enchantments. Problems often arise when trying to apply Kadim Enchantment to items such as PySmokin (wedding dress), Bouquet, or Arrows. In this article, we will examine why these issues occur and how they can be resolved in detail.

What Is The Problem?
When attempting to apply Kadim Enchantment to PySmokin, Bouquet, and similar special items, an error message is usually received, or even if the process completes successfully, the enchantment does not take effect. One of the main reasons for this is that these items are located within special item ID ranges. Different control mechanisms operate for these IDs, which can cause limitations during enchantment processes.

Technical Causes
These types of items have specially defined item_proto data. Kadim Enchant systems are typically designed for standard items. If these item IDs or their special attributes are not properly introduced into the system, enchanting operations may be blocked. Additionally, some items have different values in fields like refine_type or apply_type, which causes incompatibility during enchanting.

Solution Steps
1. Check Item Protos:
Firstly, ensure that items like PySmokin and Bouquet are correctly defined in the item_proto table. Their ID numbers, refine_type, and apply_type fields must be reviewed.

2. Special Definitions for Enchant System:
To allow Kadim Enchant systems to work with these special items, exception handling should be implemented in the relevant Python or C++ files. For example, special permissions based on item IDs can be added in refine.py or smelt.py.

3. Client-Side Adaptations:
In some cases, enchantment processes are also controlled by the client. Therefore, special permissions must be added in UI scripts (e.g., uiscript). Without proper checks in Py Root files, errors may persist.

4. DB Core Settings:
Whether these items accept special enchantments should be defined in tables like item_attr or item_addon within the Game DB. If the attribute slots for these items are missing or incorrect, Kadim Enchant will fail.

Practical Code Example (Python)
Below is a sample Python code snippet that grants special permission for PySmokin items during Kadim Enchant:

Kod:
def check_item_for_enchant(item_vnum):[BR][/BR]    special_items = [30215, 37030, 19999]  # PySmokin, Bouquet etc.[BR][/BR]    if item_vnum in special_items:[BR][/BR]        return True[BR][/BR]    return False


Conclusion
The issue of applying Kadim Enchant to special items like PySmokin, Bouquet, and others can be resolved through correct definitions and appropriate system configurations. During this process, changes must be made both on the client-side and server-side. Developers must pay attention to numerous details in this area. However, with the right steps, these problems can be easily overcome and provide a richer experience for players.

Source: Metin2Lobby
 

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

Benzer konular

Geri
Üst Alt