IkarusV2 Pazarı olduğu yere açması için küçük değişiklik

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

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Birkaç seferdir hem burada hem farklı yerlerde görüyordum bu soruyu. Çok daha basit ve iyi kodlarla bu çözülebilir belki bilmiyorum. Ben bu düzenlemeyi yaparak güncellemiş oldum. Umarım birilerinin işine yarar.



Kod:
bool CShopManager::RecvShopRestoreDurationDBPacket(DWORD owner)

Yapılan düzenlemeden sonra ufak bir bug olmuş. Pazar kurulmaması gereken haritalarda ( Zindanlar vs ) da pazar açılıyormuş. Bu sayede 1 pazarı 2 ayrı pazar açmışız gibi oluyordu. Hem bu hem de pazarların üst üste binmemesi için ufak bir düzenleme yapıldı.

Kod:
bool CShopManager::RecvShopRestoreDurationDBPacket(DWORD owner)     {         if(auto shop = GetShopByOwnerID(owner))         {             LPCHARACTER ch = CHARACTER_MANAGER::instance().FindByPID(shop->GetOwnerPID());             if (ch && ch->GetIkarusShop())             {                 if (!ALLOWED_SPAWN_MAPS.contains(ch->GetMapIndex()))                 {                     ch->ChatPacket(CHAT_TYPE_INFO, "[IkarusShop] Bu haritada pazar kuramazsiniz.");                     return false;                 }                 if (IsShopAlreadySpawnedAt(ch->GetMapIndex(), ch->GetX(), ch->GetY(), shop->GetOwnerPID()))                 {                     ch->ChatPacket(CHAT_TYPE_INFO, "[IkarusShop] Bu konumda zaten bir pazar var.");                     return false;                 } #ifdef EXTEND_IKASHOP_ULTIMATE      #ifd#ifdef auto oldDuration = shop->GetD#ifdefn();                 shop->ChangeDuration(OFFLINESHOP_DURATION_MAX_MINUTES); #else                 shop->SetDurat#els#elseNESHOP_DURATION_MAX_MINUTES);                 shop->RefreshToOwner(); #endif #ifdef EXTEND_IKASHOP_ULTIMAT#end#endifd#ifdef if(oldDuration == 0) #endif  #ifdef         {            #end#endifestroyShopEntity(shop);       #endif        TShopSpawn spawn;                     spawn.map = ch->GetMapIndex();                     spawn.x = ch->GetX();                     spawn.y = ch->GetY();                     shop->SetSpawn(spawn);                     CreateShopEntity(shop);                 }             }         }         return true;     } #endif
#endif#endif
IkarusV2 Pazarı olduğu Yere Açması için Küçük Değişiklik

Metin2 özel sunucularında IkarusV2 sistemi, oyuncuların eşya alım-satım yapabildiği popüler bir pazar sistemidir. Ancak bazı özel sunucularda bu pazar menüsü, doğrudan açılmak yerine bir buton aracılığıyla açılması gibi bir durum söz konusu olabilir. Bu yazıda, IkarusV2 pazarının doğrudan açılıp, oyuncuların daha kolay erişebilmesi için gerekli küçük değişiklikleri ele alacağız.

Neden IkarusV2 Kullanılır?
IkarusV2, Metin2 özel sunucularında yaygın olarak kullanılan, Python tabanlı bir pazar sistemidir. Güvenli ve kullanıcı dostu arayüzü sayesinde, oyuncular eşyalarını kolayca sergileyip satabilirler. Bu sistem genellikle py_root klasörüne entegre edilir ve uiscript üzerinden arayüz kontrolü yapılır.

Sorun Nedir?
Bazı Metin2 özel sunucularında, IkarusV2 pazarı doğrudan menüden açılmaz. Bunun yerine bir butona basılması gerekir. Bu durum, oyuncuların deneyimini azaltabilir. Bu nedenle, pazar menüsünün doğrudan ESC menüsüne entegre edilmesi tercih edilebilir.

Çözüm: Uiscript Dosyasında Küçük Değişiklik
Öncelikle, client side dosyalarında bulunan uiscript/InventoryWindow.py dosyasını açmalısınız. Bu dosya, oyuncunun envanter penceresini kontrol eder. Burada, IkarusV2 menüsünü doğrudan buraya ekleyerek açılışını otomatik hale getirebilirsiniz.

Kod Düzenlemesi
Aşağıdaki gibi bir kod parçası eklenmelidir:
Kod:
[BR][/BR]if app.ENABLE_IKARUS_SYSTEM:[BR][/BR]    self.__LoadIkarusDialog()[BR][/BR]

Bu kod, sistem aktifse IkarusV2 penceresini doğrudan yükler. Böylece oyuncu, menüye girmeden doğrudan pazarı açabilir.

Sunucu Tarafında Gerekli Ayarlar
Ayrıca game server tarafında da, srcs içindeki constantsmanager.cpp veya benzeri dosyalarda IkarusV2 sisteminin aktif olduğundan emin olunmalıdır. Python tarafında tanımlanan fonksiyonların C++ tarafında destekleniyor olması gerekir.

Sonuç
Bu küçük değişiklik sayesinde, Metin2 özel sunucularında IkarusV2 pazarı daha hızlı ve kullanıcı dostu bir hale gelir. Oyuncular artık menüye girmeden doğrudan pazarı açabilir, eşya alım-satımı işlemlerini daha hızlı gerçekleştirebilirler. Bu tip sistemsel iyileştirmeler, Metin2 özel sunucularında oyuncu memnuniyetini artırır.


Small Change for IkarusV2 Market to Open Directly Where It Is

In Metin2 private servers, the IkarusV2 system is a popular marketplace where players can buy and sell items. However, on some private servers, this market menu may not open directly and instead requires clicking a button. In this article, we will address how to make the IkarusV2 market open directly to ensure easier access for players.

Why Use IkarusV2?
IkarusV2 is a widely used marketplace system in Metin2 private servers based on Python. Thanks to its secure and user-friendly interface, players can easily display and sell their items. This system is typically integrated into the py_root folder and controlled through uiscript.

What Is The Problem?
On certain Metin2 private servers, the IkarusV2 market does not open directly from the menu. Instead, a button must be clicked. This can reduce player experience. Therefore, integrating the market menu directly into the ESC menu might be preferred.

Solution: Small Modification in Uiscript File
First, you need to open the uiscript/InventoryWindow.py file located in the client side files. This file controls the player's inventory window. By adding the IkarusV2 menu here, you can make its opening automatic.

Code Adjustment
Add the following code snippet:
Kod:
[BR][/BR]if app.ENABLE_IKARUS_SYSTEM:[BR][/BR]    self.__LoadIkarusDialog()[BR][/BR]

This code loads the IkarusV2 window directly if the system is active. Thus, the player can open the market without entering the menu.

Required Settings on Server Side
Also, in the game server side, ensure that the IkarusV2 system is activated within the srcs such as in constantsmanager.cpp or similar files. Functions defined in Python must be supported on the C++ side.

Conclusion
Thanks to this small change, the IkarusV2 market becomes faster and more user-friendly in Metin2 private servers. Players can now open the market directly without going to the menu, making item transactions quicker. Such systematic improvements increase player satisfaction in Metin2 private servers.
 

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

Benzer konular

Geri
Üst Alt