Greatı ekledikden sonra won sistemini uyarladım fakat birşeyi fark ettim bir kaç item satıldığında yang direk geliyor won pazar kapanınca geliyordu isteyenler şu şekilde düzeltebilirler.
Shop.cpp
DBManager::instance().DirectQuery("UPDATE player_shop SET cheque=cheque + %d WHERE id=%d", dwCheque, m_pkPC->GetPrivShop());
DBManager::instance().DirectQuery("INSERT INTO player_gift SET \
owner_id=%d,vnum=80020,count='%d',reason=\"%s\",`from`=replace(\"%s #%d\",' ','_'),status='WAIT',date_add=NOW()",
m_pkPC->GetPrivShopOwner(), dwCheque, LC_TEXT("SHOP_REASON"), m_pkPC->GetName(), m_pkPC->GetPrivShop());
KANIT
Great Offline Shop Won İçin Küçük Düzeltme
Metin2 özel sunucularında offline shop sistemleri, oyuncuların oynamadıkları zaman bile item alıp satmalarını sağlar. Bu sistemlerden birisi olan Great Offline Shop Won, Martysama tarafından geliştirilmiş güçlü bir sistemdir. Ancak bazı durumlarda küçük değişiklikler yapmak gerekebilir. Bu yazıda, bu sisteme yapılacak küçük bir düzeltmeden bahsedeceğiz.
Great Offline Shop Won Nedir?
Great Offline Shop Won, Metin2 özel sunucularında oyuncuların offline olarak mağaza açmalarını sağlayan gelişmiş bir sistemdir. Bu sistem sayesinde oyuncular, sunucuda bulunmadıkları zamanlarda dahi item satabilir ve para kazanabilirler. Sistem, Martysama tarafından C++ tabanlı olarak yazılmıştır ve py GUI arayüzü ile entegre çalışır. Oyuncular, kendi shoplarını kolayca yönetebilir ve item listelerini güncelleyebilirler.
Sorun: Item Satışı Yapılmıyor
Bazı özel sunucularda, Great Offline Shop Won sisteminde item satışı yapılamaması gibi bir sorun yaşanabiliyor. Bu durum, genellikle py_root veya client_src tarafında yapılan küçük eksikliklerden kaynaklanmaktadır. Özellikle 'item_buy' fonksiyonu doğru tanımlanmamışsa, oyuncuların item satın alma işlemi başarısız olur.
Çözüm: Py Root Dosyasında Küçük Değişiklik
Problemin çözümü için py_root dizininde bulunan 'offlineshop.py' dosyasında küçük bir düzenleme yapılmalıdır. Aşağıdaki kod parçası, item alım işlemini başlatan fonksiyondur:
Bu fonksiyonun, doğru şekilde çalışması için gerekli kontrolün yapıldığından emin olunmalıdır. Örneğin, 'net.SendShopBuyPacket' fonksiyonu doğru parametreleri alıyorsa ve server_src tarafında tanımlıysa, sorun çözülmüş olur. Eğer eksikse, ilgili fonksiyon auth veya game sunucusuna entegre edilmelidir.
Server Tarafında Gereken Ayarlar
Great Offline Shop Won sistemi, hem client hem de server tarafında uyumlu çalışmalıdır. Server_src kısmında 'shop_handler.cpp' dosyasında, 'SHOP_BUY_ITEM' mesajının doğru şekilde işlendiğinden emin olunmalıdır. Aksi takdirde, client'tan gelen istek server tarafından yorumlanamaz ve işlem iptal edilir.
Sonuç
Great Offline Shop Won sistemi, Metin2 özel sunucularında oldukça kullanışlı bir özelliktir. Ancak küçük yapısal eksiklikler, sistemin düzgün çalışmamasına neden olabilir. Bu yazıda değindiğimiz gibi, py_root ve server_src arasında doğru entegrasyon yapılması, sistemin sağlıklı çalışması için yeterlidir. Daha fazla Metin2 geliştiriciye yardımcı olmak amacıyla, bu tür küçük düzeltmeler paylaşılmalıdır.
Small Fix for Great Offline Shop Won
Offline shop systems in Metin2 private servers allow players to buy and sell items even while not playing. One such system is Great Offline Shop Won, a powerful system developed by Martysama. However, in some cases, small modifications may be necessary. In this article, we will discuss a minor fix for this system.
What is Great Offline Shop Won?
Great Offline Shop Won is an advanced system that allows players in Metin2 private servers to open shops while offline. With this system, players can still sell items and earn money even when they are not online. The system is written in C++ by Martysama and integrates with py GUI. Players can easily manage their shops and update item lists.
Issue: Items Cannot Be Sold
In some private servers, there might be an issue where item sales do not work properly in the Great Offline Shop Won system. This usually stems from minor omissions during the setup on the py_root or client_src side. If the 'item_buy' function is not properly defined, player attempts to purchase items will fail.
Solution: Small Change in Py Root File
To resolve this issue, a small adjustment must be made in the 'offlineshop.py' file located under the py_root directory. The following code snippet starts the item purchase function:
It must be ensured that this function operates correctly. For instance, if the 'net.SendShopBuyPacket' function receives correct parameters and is defined in server_src, the issue should be resolved. If missing, the corresponding function should be integrated into the auth or game server.
Required Settings on the Server Side
The Great Offline Shop Won system must operate compatibly on both the client and server sides. In the 'shop_handler.cpp' file within server_src, it must be ensured that the 'SHOP_BUY_ITEM' message is handled correctly. Otherwise, requests from the client will not be interpreted by the server and the transaction will be canceled.
Conclusion
Great Offline Shop Won is a highly useful feature in Metin2 private servers. However, minor structural deficiencies can prevent the system from operating correctly. As discussed in this article, ensuring proper integration between py_root and server_src is sufficient for the system to run smoothly. Such small fixes should be shared to assist more Metin2 developers.
Shop.cpp
DBManager::instance().DirectQuery("UPDATE player_shop SET cheque=cheque + %d WHERE id=%d", dwCheque, m_pkPC->GetPrivShop());
DBManager::instance().DirectQuery("INSERT INTO player_gift SET \
owner_id=%d,vnum=80020,count='%d',reason=\"%s\",`from`=replace(\"%s #%d\",' ','_'),status='WAIT',date_add=NOW()",
m_pkPC->GetPrivShopOwner(), dwCheque, LC_TEXT("SHOP_REASON"), m_pkPC->GetName(), m_pkPC->GetPrivShop());
KANIT
Great Offline Shop Won İçin Küçük Düzeltme
Metin2 özel sunucularında offline shop sistemleri, oyuncuların oynamadıkları zaman bile item alıp satmalarını sağlar. Bu sistemlerden birisi olan Great Offline Shop Won, Martysama tarafından geliştirilmiş güçlü bir sistemdir. Ancak bazı durumlarda küçük değişiklikler yapmak gerekebilir. Bu yazıda, bu sisteme yapılacak küçük bir düzeltmeden bahsedeceğiz.
Great Offline Shop Won Nedir?
Great Offline Shop Won, Metin2 özel sunucularında oyuncuların offline olarak mağaza açmalarını sağlayan gelişmiş bir sistemdir. Bu sistem sayesinde oyuncular, sunucuda bulunmadıkları zamanlarda dahi item satabilir ve para kazanabilirler. Sistem, Martysama tarafından C++ tabanlı olarak yazılmıştır ve py GUI arayüzü ile entegre çalışır. Oyuncular, kendi shoplarını kolayca yönetebilir ve item listelerini güncelleyebilirler.
Sorun: Item Satışı Yapılmıyor
Bazı özel sunucularda, Great Offline Shop Won sisteminde item satışı yapılamaması gibi bir sorun yaşanabiliyor. Bu durum, genellikle py_root veya client_src tarafında yapılan küçük eksikliklerden kaynaklanmaktadır. Özellikle 'item_buy' fonksiyonu doğru tanımlanmamışsa, oyuncuların item satın alma işlemi başarısız olur.
Çözüm: Py Root Dosyasında Küçük Değişiklik
Problemin çözümü için py_root dizininde bulunan 'offlineshop.py' dosyasında küçük bir düzenleme yapılmalıdır. Aşağıdaki kod parçası, item alım işlemini başlatan fonksiyondur:
Kod:
def OnBuyItem(self, slot):[BR][/BR] net.SendShopBuyPacket(slot)
Bu fonksiyonun, doğru şekilde çalışması için gerekli kontrolün yapıldığından emin olunmalıdır. Örneğin, 'net.SendShopBuyPacket' fonksiyonu doğru parametreleri alıyorsa ve server_src tarafında tanımlıysa, sorun çözülmüş olur. Eğer eksikse, ilgili fonksiyon auth veya game sunucusuna entegre edilmelidir.
Server Tarafında Gereken Ayarlar
Great Offline Shop Won sistemi, hem client hem de server tarafında uyumlu çalışmalıdır. Server_src kısmında 'shop_handler.cpp' dosyasında, 'SHOP_BUY_ITEM' mesajının doğru şekilde işlendiğinden emin olunmalıdır. Aksi takdirde, client'tan gelen istek server tarafından yorumlanamaz ve işlem iptal edilir.
Sonuç
Great Offline Shop Won sistemi, Metin2 özel sunucularında oldukça kullanışlı bir özelliktir. Ancak küçük yapısal eksiklikler, sistemin düzgün çalışmamasına neden olabilir. Bu yazıda değindiğimiz gibi, py_root ve server_src arasında doğru entegrasyon yapılması, sistemin sağlıklı çalışması için yeterlidir. Daha fazla Metin2 geliştiriciye yardımcı olmak amacıyla, bu tür küçük düzeltmeler paylaşılmalıdır.
Small Fix for Great Offline Shop Won
Offline shop systems in Metin2 private servers allow players to buy and sell items even while not playing. One such system is Great Offline Shop Won, a powerful system developed by Martysama. However, in some cases, small modifications may be necessary. In this article, we will discuss a minor fix for this system.
What is Great Offline Shop Won?
Great Offline Shop Won is an advanced system that allows players in Metin2 private servers to open shops while offline. With this system, players can still sell items and earn money even when they are not online. The system is written in C++ by Martysama and integrates with py GUI. Players can easily manage their shops and update item lists.
Issue: Items Cannot Be Sold
In some private servers, there might be an issue where item sales do not work properly in the Great Offline Shop Won system. This usually stems from minor omissions during the setup on the py_root or client_src side. If the 'item_buy' function is not properly defined, player attempts to purchase items will fail.
Solution: Small Change in Py Root File
To resolve this issue, a small adjustment must be made in the 'offlineshop.py' file located under the py_root directory. The following code snippet starts the item purchase function:
Kod:
def OnBuyItem(self, slot):[BR][/BR] net.SendShopBuyPacket(slot)
It must be ensured that this function operates correctly. For instance, if the 'net.SendShopBuyPacket' function receives correct parameters and is defined in server_src, the issue should be resolved. If missing, the corresponding function should be integrated into the auth or game server.
Required Settings on the Server Side
The Great Offline Shop Won system must operate compatibly on both the client and server sides. In the 'shop_handler.cpp' file within server_src, it must be ensured that the 'SHOP_BUY_ITEM' message is handled correctly. Otherwise, requests from the client will not be interpreted by the server and the transaction will be canceled.
Conclusion
Great Offline Shop Won is a highly useful feature in Metin2 private servers. However, minor structural deficiencies can prevent the system from operating correctly. As discussed in this article, ensuring proper integration between py_root and server_src is sufficient for the system to run smoothly. Such small fixes should be shared to assist more Metin2 developers.
