Arven oyununda great offlineshop kullanıyorduk mysql tablosuna 0 idli yani sahibi olmayan eşya kaydediliyordu ve sürekli olarak yapıyordu bunu
tablolar gereksiz verilerle doluyordu bunun dışında doldukça mysql kullanımı arttırıyordu %39'a kadar mysql arttırdı uyguladıktan sonra
mysql kullanımı düştü askere gitmeden önce sizlere bir hediyem olsun hadi 6 ay sonra görüşürüz o zamana kadar
enable bevis durmuşkeeeee
Kod:
-> Açılır (item_manager.cpp) -> Arat item->SetSkipSave(false); -> Değiştir veya sil //item->SetSkipSave(false); -> Arat item->SetID(GetNewID()); -> Altına Ekle item->SetSkipSave(bSkipSave); Ne yaptık ? Tablolara sıfır 0 id li eşya eklemeyi kapattık arven oyununda aldığımız %30luk mysql kullanımının sebebi :) ve fixi
Buradan süleyman baruta selamlar aynı yere düştük acemilikte görüşürüz kanka
Sivas altı çimdir aç kapıyı o kimdir zaten ben yaralıyım belki gelen . nLwArchief dir
Frozen Yere Item Sat ve Sil (İnat Paylaşım vol4)
Metin2 özel sunucularında gelişmiş sistemler oluşturmak isteyen geliştiriciler için önemli ve yaratıcı sistemlerden birisi olan Frozen Yere Item Sat ve Sil sistemi, oyuncuların oyun içi deneyimini ciddi anlamda artırabilir. Bu sistem, oyuncuların belirli itemleri doğrudan harita üzerine koymasına ve diğer oyuncularla paylaşmasına veya onları silmesine olanak tanır. Bu makalede, bu sistemin nasıl kurulacağı, hangi dosyalarda değişiklik yapılması gerektiği ve C++ tabanlı bir sistem olarak nasıl entegre edileceği detaylı bir şekilde ele alınacaktır.
Öncelikle, bu sistemin temel amacı, oyuncular arasında doğrudan item transferi sağlayarak ekonomiyi hareketlendirmek ve PvP ortamında stratejik bir unsur olarak item paylaşımını öne çıkarmaktır. Özellikle PvP odaklı sunucularda, oyuncuların düşmanlarının itemlerini alıp satması ya da yerleştirmesi gibi eylemler, oyun içi dengeleri etkileyebilir. Bu nedenle, bu sistem aynı zamanda güvenlik önlemleri ile desteklenmelidir.
Sistem Nasıl Çalışır?
Bu sistem sayesinde oyuncular, belirli itemleri doğrudan harita üzerine bırakabilir. Oyuncu, bir itemi sol tık ile seçip 'Yere Bırak' komutunu verdiğinde, item haritada belirir. Aynı şekilde, bu itemi yerleştiren kişi veya başka bir oyuncu tarafından silinmesi mümkündür. Bu işlem, C++ kaynak kodlarda yazılmış özel bir fonksiyon aracılığıyla gerçekleştirilir. Sistem, auth ve game sunucusu arasında güvenli bir veri akışı sağlar.
Geliştirme Süreci
Bu sistemi kurabilmek için öncelikle game_src klasöründe bulunan item_manager.cpp dosyasında gerekli değişiklikler yapılmalıdır. Item yönetimi bu dosya üzerinden yapılır. Yeni bir komut tanımlanarak, belirli itemlerin haritaya bırakılması sağlanabilir. Bu işlem sırasında itemin ID'si, konumu ve sahibi gibi bilgiler veritabanına yazılır. Aynı zamanda, itemin silinme izni de sahibine aittir. Bu izin sistemi sayesinde, diğer oyuncuların rastgele item silmesi engellenir.
Python tarafında uiscript dosyasında UI düzenlemeleri yapılarak oyuncuya 'Yere Bırak' ve 'Sil' butonları gösterilir. Bu butonlar, item sağ tıklaması sonrası açılan menüye entegre edilir. Bu butonların işlevselliği, py_root klasöründe tanımlanan fonksiyonlarla aktive edilir. Python GUI sistemleri sayesinde kullanıcı dostu bir arayüz elde edilir.
Sistem Güvenliği
Oyuncuların itemleri rastgele bırakıp silmesi, sunucuda bazı güvenlik açıklarına yol açabilir. Bu nedenle, sistemde item bırakma işlemi sadece belirli alanlarda (örneğin, safezone dışındaki bölgelerde) yapılabilir. Ayrıca, item sahipliği kontrolü mutlaka yapılmalıdır. Bu kontroller, C++ tabanlı güvenlik filtreleriyle sağlanır.
Sonuç
Frozen Yere Item Sat ve Sil sistemi, Metin2 özel sunucularında oyun içi deneyimi ciddi anlamda artıran gelişmiş bir özelliktir. Hem PvP hem de PvE odaklı sunucularda kullanılabilir. Sistemin doğru kurulabilmesi için hem C++ hem de Python bilgisi gereklidir. Bu sistem sayesinde oyuncular, kendi itemlerini doğrudan haritaya yerleştirebilir ve diğer oyuncularla etkileşim kurabilir. Bu tür sistemler, Metin2 geliştirme camiasında Martysama ve benzeri kaynaklarla birlikte popülerleşmektedir. Geliştiriciler, bu sistemleri özelleştirerek kendi sunucularında benzersiz özellikler sunabilirler.
Frozen Place and Remove Item on Ground (Inat Share Vol4)
An important and creative system for developers aiming to build advanced features on Metin2 private servers is the Frozen Place and Remove Item on Ground system. This system allows players to directly place specific items onto the map and share them with other players or remove them. In this article, we will thoroughly examine how to set up this system, which files require modifications, and how to integrate it as a C++ based system.
Firstly, the main purpose of this system is to allow direct item transfers between players, enhancing the in-game economy and promoting item sharing as a strategic element in PvP environments. Especially in PvP-focused servers, actions such as taking and selling opponents' items or placing them on the ground can affect in-game balances. Therefore, this system must also be supported by security measures.
How Does the System Work?
Thanks to this system, players can directly drop certain items onto the map. When a player selects an item with a left-click and executes the 'Drop on Ground' command, the item appears on the map. Similarly, the item can be removed by the original dropper or another player. This action is performed via a custom function written in C++ source code. The system ensures secure data flow between the auth and game servers.
Development Process
To implement this system, necessary modifications must first be made to the item_manager.cpp file located in the game_src folder. Item management is handled through this file. By defining a new command, placing certain items on the map becomes possible. During this process, information such as the item's ID, location, and owner are recorded in the database. Additionally, removal permission belongs solely to the item's owner. Thanks to this permission system, random deletion of items by other players is prevented.
In the Python side, UI modifications are made within the uiscript file, showing 'Place on Ground' and 'Remove' buttons to the player. These buttons are integrated into the context menu that appears after right-clicking an item. Their functionality is activated through functions defined in the py_root folder. User-friendly interfaces are achieved thanks to Python GUI systems.
System Security
Allowing players to randomly drop and remove items might cause some security vulnerabilities on the server. For this reason, item dropping should only be allowed in specific areas (e.g., outside safezone regions). Moreover, item ownership checks must be performed. These checks are ensured via C++ based security filters.
Conclusion
The Frozen Place and Remove Item on Ground system is an advanced feature significantly enhancing the in-game experience on Metin2 private servers. It can be used in both PvP and PvE focused servers. Correct implementation of this system requires knowledge of both C++ and Python. With this system, players can directly place their items on the map and interact with others. Such systems are gaining popularity within the Metin2 development community alongside resources like Martysama. Developers can customize these systems to offer unique features on their own servers.
