Envanter Efsun Kontrolü

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

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Merhaba arkadaşlar bugün yaşadığım bir problemi çözdüm ve muhtemelen bu problemi başkalarıda yaşayacak. Problem envanter efsun nesnesi arttırma kağıdı ve kutsama küresi için uygunluk kontrolü yani sürüklendiğinde yeşil veya kırmızı göstermesi. Problem 71084 , 71085 ve 70024 kodlu itemlerde yaşanıyor kaynakta problem yok ama görsel olarak biraz takıntılı olan kişiler için bu kodlar problemi ortadan kaldırır.

Not: Tam uygunluk kontrolü vardır. Örneğin eşyada hiç efsun yoksa efsun nesnesi sürüklendiğinde kırmızı gösterir veya kutsama küresi eşyaya sürüklendiğinde sadece 4 efsun ekliyse yeşil olur aksi halde hep kırmızı.

Yapılacak değişiklikler : def __IsUsableItemToItem(self, srcItemVNum, srcSlotPos): ve def __CanUseSrcItemToDstItem(self, srcItemVNum, srcSlotPos, dstSlotPos): komple bu kodlar değişecek ve yeni fonksiyonlar eklenecek;

Kod:
def __IsUsableItemToItem(self, srcItemVNum, srcSlotPos):         if item.IsRefineScroll(srcItemVNum):             return True         elif item.IsMetin(srcItemVNum):             return True         elif item.IsDetachScroll(srcItemVNum):             return True         elif item.IsKey(srcItemVNum):             return True         elif (player.GetItemFlags(srcSlotPos) & ITEM_FLAG_APPLICABLE) == ITEM_FLAG_APPLICABLE:             return True         elif constInfo.ENABLE_SELF_STACK_SCROLLS and srcItemVNum in (71052,71051,71084,71085,70024):             return True         else:             if item.GetUseType(srcItemVNum) in self.USE_TYPE_TUPLE:                 return True         return False     def __CanUseSrcItemToDstItem(self, srcItemVNum, srcSlotPos, dstSlotPos):         if srcSlotPos == dstSlotPos:             return False         if item.IsRefineScroll(srcItemVNum):             if player.REFINE_OK == player.CanRefine(srcItemVNum, dstSlotPos):                 return True             elif constInfo.ENABLE_SELF_STACK_SCROLLS and player.GetItemIndex(dstSlotPos) == srcItemVNum:                 return True         elif item.IsMetin(srcItemVNum):             if player.ATTACH_METIN_OK == player.CanAttachMetin(srcItemVNum, dstSlotPos):                 return True         elif item.IsDetachScroll(srcItemVNum):             if player.DETACH_METIN_OK == player.CanDetach(srcItemVNum, dstSlotPos):                 return True         elif item.IsKey(srcItemVNum):             if player.CanUnlock(srcItemVNum, dstSlotPos):                 return True         # 71084, 71085, 70024 özel kuralları         elif srcItemVNum in (71084, 71085, 70024):             dstVnum = player.GetItemIndex(dstSlotPos)             if not self.__IsWeaponOrArmor(dstVnum):                 return False             attr_count = self.__GetAttrCount(dstSlotPos)             if srcItemVNum == 71085:                 return attr_count < 4             if srcItemVNum == 71084:                 return attr_count > 0             if srcItemVNum == 70024:                 return attr_count == 4         elif (player.GetItemFlags(srcSlotPos) & ITEM_FLAG_APPLICABLE) == ITEM_FLAG_APPLICABLE:             return True         elif constInfo.ENABLE_SELF_STACK_SCROLLS and srcItemVNum in (71052,71051,71084,71085,70024):             return True         else:             useType=item.GetUseType(srcItemVNum)             if "USE_CLEAN_SOCKET" == useType:                 if self.__CanCleanBrokenMetinStone(dstSlotPos):                     return True             elif "USE_CHANGE_ATTRIBUTE" == useType:                 if self.__CanChangeItemAttrList(dstSlotPos):                     return True             elif "USE_ADD_ATTRIBUTE" == useType:                 if self.__CanAddItemAttr(dstSlotPos):                     return True             elif "USE_ADD_ATTRIBUTE2" == useType:                 if self.__CanAddItemAttr(dstSlotPos):                     return True             elif "USE_ADD_ACCESSORY_SOCKET" == useType:                 if self.__CanAddAccessorySocket(dstSlotPos):                     return True             elif "USE_PUT_INTO_ACCESSORY_SOCKET" == useType:                 if self.__CanPutAccessorySocket(dstSlotPos, srcItemVNum):                     return True             elif "USE_PUT_INTO_BELT_SOCKET" == useType:                 dstItemVNum = player.GetItemIndex(dstSlotPos)                 item.SelectItem(dstItemVNum)                 if item.ITEM_TYPE_BELT == item.GetItemType():                     return True             elif app.ENABLE_USE_COSTUME_ATTR and "USE_CHANGE_COSTUME_ATTR" == useType:                 if self.__CanChangeCostumeAttrList(dstSlotPos):                     return True             elif app.ENABLE_USE_COSTUME_ATTR and "USE_RESET_COSTUME_ATTR" == useType:                 if self.__CanResetCostumeAttr(dstSlotPos):                     return True         return False     def __DropSrcItemToDestItemInInventory(self, srcItemVID, srcItemSlotPos, dstItemSlotPos):         if srcItemSlotPos == dstItemSlotPos:             return         if app.ENABLE_SOULBIND_SYSTEM and item.IsSealScroll(srcItemVID):             self.__SendUseItemToItemPacket(srcItemSlotPos, dstItemSlotPos)         elif item.IsRefineScroll(srcItemVID):             if constInfo.ENABLE_SELF_STACK_SCROLLS and player.GetItemIndex(srcItemSlotPos) == player.GetItemIndex(dstItemSlotPos):                 self.__SendMoveItemPacket(srcItemSlotPos, dstItemSlotPos,0)             else:                 self.RefineItem(srcItemSlotPos, dstItemSlotPos)                 self.wndItem.SetUseMode(False)         elif item.IsMetin(srcItemVID):             self.AttachMetinToItem(srcItemSlotPos, dstItemSlotPos)         elif item.IsDetachScroll(srcItemVID):             self.DetachMetinFromItem(srcItemSlotPos, dstItemSlotPos)         elif item.IsKey(srcItemVID):             self.__SendUseItemToItemPacket(srcItemSlotPos, dstItemSlotPos)         elif (player.GetItemFlags(srcItemSlotPos) & ITEM_FLAG_APPLICABLE) == ITEM_FLAG_APPLICABLE:             self.__SendUseItemToItemPacket(srcItemSlotPos, dstItemSlotPos)         elif item.GetUseType(srcItemVID) in self.USE_TYPE_TUPLE:             self.__SendUseItemToItemPacket(srcItemSlotPos, dstItemSlotPos)         elif constInfo.ENABLE_SELF_STACK_SCROLLS and srcItemVID in (71052,71051,71084,71085,70024):             self.__SendUseItemToItemPacket(srcItemSlotPos, dstItemSlotPos)         else:             if player.IsEquipmentSlot(dstItemSlotPos):                 if item.IsEquipmentVID(srcItemVID):                     self.__UseItem(srcItemSlotPos)             else:                 self.__SendMoveItemPacket(srcItemSlotPos, dstItemSlotPos, 0)     def __get_attr_limit(self):         try:             return player.ATTRIBUTE_SLOT_MAX_NUM         except:             return 7     def __GetAttrCount(self, dstSlotPos):         limit = self.__get_attr_limit()         cnt = 0         for i in xrange(limit):             if player.GetItemAttribute(dstSlotPos, i)[0] != 0:                 cnt += 1         return cnt     def __IsWeaponOrArmor(self, vnum):         if vnum == 0:             return False         item.SelectItem(vnum)         t = item.GetItemType()         return t == item.ITEM_TYPE_WEAPON or t == item.ITEM_TYPE_ARMOR

Envanter Efsun Kontrolü Nedir?


Metin2 özel sunucularında oyun deneyimini zenginleştirmek ve oyuncuların envanterde taşıdıkları eşyalar üzerinde daha fazla kontrol sahibi olmalarını sağlamak adına geliştirilen sistemlerden birisi de 'Envanter Efsun Kontrolü'dür.

Bu sistem, oyuncuların envanterlerinde bulunan efsunlanmış eşyaların durumlarını, seviyelerini veya etkilerini doğrudan görebilmelerine ve yönetebilmelerine olanak tanır.

Envanter Efsun Kontrolü Sistemi Nasıl Çalışır?

Bu sistem genellikle C++ tabanlı sunucu tarafında geliştirilir ve oyun içi kullanıcı arayüzü (UI) ile entegre çalışır.

Oyuncu bir efsunlu eşya taşıdığında, bu eşyanın efsun seviyesi, bonusları ve diğer nitelikleri doğrudan envanter ekranında gösterilebilir.

Bu sayede oyuncu, efsun seviyesini yükseltmek, koruma kullanmak veya bir sonraki yükseltme için gereken malzemeleri görmek gibi işlemleri daha kolay yapabilir.

Python GUI Entegrasyonu

Python tabanlı UI Script sistemleri ile birlikte geliştirilen bu sistemde, efsun kontrolleri için özel bir pencere veya arayüz tasarlanabilir.

PyRoot ve UIScript gibi araçlarla bu arayüzler kullanıcı dostu hale getirilir ve sunucu tarafındaki verilerle senkronize edilir.

Sistem Güvenliği ve Hile Önleme

Metin2 özel sunucularda hilelere karşı önlem almak büyük önem taşır.

Envanter Efsun Kontrol sistemi, sunucu tarafında güvenli veri aktarımı sağlayacak şekilde geliştirilmelidir.

Bu sayede, efsun seviyeleri veya bonuslar istemci tarafında manipüle edilemez.

C++ Kaynak Kod ile Geliştirme

Sunucu tarafında geliştirilen bu sistem, genellikle Game Server Source Code üzerinde C++ ile yazılır.

Auth ve DB Core ile entegre çalışan bu yapı, eşyaların veritabanındaki durumlarını doğru şekilde okuyup, istemciye güvenli bir şekilde iletir.

Nasıl Kurulur?

Envanter Efsun Kontrol sistemi, Martysama veya benzeri kaynaklar üzerinden dağıtılan paketlerle birlikte gelmeyebilir.

Ancak, mevcut sunucu kaynak koduna entegre edilebilir.

Kurulum sırasında dikkat edilmesi gereken konular arasında SQL tablosu güncellemesi, UI dosyalarının düzenlenmesi ve C++ kaynak kodda gerekli fonksiyonların eklenmesi yer alır.

Faydaları Nelerdir?

Bu sistem, oyuncuların efsun yönetimi konusunda daha bilinçli hareket etmelerini sağlar.

Ayrıca sunucu operatörlerinin PvP sistemlerini daha dengeli hale getirmesine yardımcı olabilir.

Oyuncuların hangi efsun seviyesinde hangi eşyaları kullandığını görmesi sayesinde, sunucu içi dengeler daha iyi analiz edilebilir.

Sonuç

Envanter Efsun Kontrolü, Metin2 özel sunucularında kullanıcı deneyimini artırmak ve hile önleme konularında önemli bir rol oynar.

Doğru şekilde uygulandığında, oyuncular hem daha fazla kontrol sahibi olur hem de sunucu operatörleri için daha şeffaf bir yapı sağlanır.


What Is Inventory Enchant Control?


In Metin2 private servers, one of the systems developed to enhance the gameplay experience and provide players with more control over items they carry in their inventory is 'Inventory Enchant Control'.

This system allows players to directly view and manage the status, level, or effects of enchanted items in their inventory.

How Does the Inventory Enchant Control System Work?

This system is typically developed on the server-side using C++ and integrated with the in-game user interface (UI).

When a player carries an enchanted item, its enchant level, bonuses, and other attributes can be displayed directly in the inventory screen.

Thus, players can more easily perform actions such as upgrading enchant levels, applying protections, or viewing required materials for the next upgrade.

Python GUI Integration

With Python-based UI Script systems, a special window or interface can be designed for enchant controls.

Using tools like PyRoot and UIScript, these interfaces are made user-friendly and synchronized with server-side data.

System Security and Anti-Cheat Measures

Preventing cheats is highly important in Metin2 private servers.

The Inventory Enchant Control system must be developed to ensure secure data transmission from the server side.

This prevents enchant levels or bonuses from being manipulated on the client side.

Development with C++ Source Code

This system, developed on the server-side, is usually written in C++ on top of the Game Server Source Code.

Integrated with Auth and DB Core, this structure securely reads the status of items from the database and transmits them to the client.

How to Install?

The Inventory Enchant Control system may not come included with packages distributed via sources like Martysama.

However, it can be integrated into existing server source code.

Important aspects during installation include updating SQL tables, modifying UI files, and adding necessary functions to the C++ source code.

Benefits

This system helps players make more informed decisions regarding enchant management.

It also assists server operators in balancing PvP systems more effectively.

By seeing which enchant levels players use for specific items, server-wide balances can be analyzed more accurately.

Conclusion

Inventory Enchant Control plays a significant role in enhancing user experience and preventing cheating in Metin2 private servers.

When implemented correctly, players gain more control, while a more transparent structure is provided for server administrators.
 

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

Benzer konular

Geri
Üst Alt