client/eterpythonlib/pythonwindowmanagermodule.cpp
Kod:
void initwndMgr()
arat
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
ekle.
Kod:
{ "UnlockSlot", wndMgrUnlockSlot, METH_VARARGS },
arat
Kod:
{ "SetSlotCoolTimeInverse", wndMgrSetSlotCoolTimeInverse, METH_VARARGS },
ekle.
------------------------------------------------------------
client/eterpythonlib/pythonslotwindow.cpp
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
bloğu sonuna bir yere falan ekle.
Kod:
pSlot->bRenderBaseSlotImage = true;
arat ( void CSlotWindow::ClearSlot(TSlot * pSlot) bloğunda
Kod:
pSlot->bIsInverseCoolTime = false;
altına ekle.
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
arat ( void CSlotWindow::OnRender() bloğunda
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
değiştir.
------------------------------------------------------------
client/eterpythonlib/pythonslotwindow.h
Kod:
float fStartCoolTime;
arat
Kod:
bool bIsInverseCoolTime;
altına ekle.
Kod:
void SetSlotCoolTime(DWORD dwIndex, float fCoolTime, float fElapsedTime = 0.0f);
arat
Kod:
void SetSlotCoolTimeInverse(DWORD dwIndex, float fCoolTime, float fElapsedTime);
altına ekle.
------------------------------------------------------------
client/eterpythonlib/pythongraphic.cpp
Kod:
void CPythonGraphic::RenderCoolTimeBox
arat
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
altına ekle.
------------------------------------------------------------
client/eterpythonlib/pythongraphic.h
Kod:
void RenderCoolTimeBox(float fxCenter, float fyCenter, float fRadius, float fTime);
arat
Kod:
void RenderCoolTimeBoxInverse(float fxCenter, float fyCenter, float fRadius, float fTime);
ekle
------------------------------------------------------------
root/ui.py
Kod:
def SetSlotCoolTime(self, slotIndex, coolTime, elapsedTime = 0.0):
arat
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
ekle
------------------------------------------------------------
root/uiinventory.py
Kod:
def RefreshBagSlotWindow(self):
arat
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
kendi filesine göre ayar çek.
Kod:
def RefreshBagSlotWindow(self):
tekrar arat.
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
üstüne ekle.
------------------------------------------------------------
iyi forumlar.
Official Slot Cooldown Sistemi Nedir ve Metin2 Özel Sunucularda Nasıl Uygulanır?
Metin2 özel sunucu geliştirme sürecinde sunucuların dengeli ve adil oyun deneyimi sunması büyük önem taşır. Bu bağlamda Official Slot Cooldown, oyuncuların belirli slotları (örneğin envanter, takas veya özel item slotları) tekrar kullanabilmeleri için bir bekleme süresi getiren bir sistemdir. Bu sistem, özellikle PvP sunucularında item kullanımını kontrol altına alarak haksız avantajların önüne geçmeyi amaçlar.
Official Slot Cooldown Ne İşe Yarar?
Bu sistem sayesinde oyuncular belirli itemleri kullanıp hemen tekrar kullanamazlar. Bu durum hem oyun içi dengeyi korur hem de hile kullanımı riskini azaltır. Özellikle PvP sistemlerinde bu gibi mekanizmalar, güçlü itemlerin sürekli tekrar kullanılmasını engeller ve dengeli bir savaş ortamı sağlar.
Sistem Nasıl Çalışır?
Cooldown süresi genellikle milisaniye cinsindendir. Bir oyuncu slotu kullandığında, sistem bu süreyi başlatır. Süre dolmadan aynı slot kullanılamaz. Bu işlem genellikle client-side ve server-side olarak iki aşamada kontrol edilir. Client tarafında görsel olarak cooldown animasyonu gösterilirken, server tarafında ise bu işlem doğrulanır ve hileye izin verilmez.
C++ Kaynak Kodlarda Cooldown Uygulaması
Metin2 özel sunucularında bu sistemi uygulamak için genellikle C++ dilinde geliştirilmiş sistemler kullanılır. Game server programlama sürecinde bu tür sistemlerin doğru entegrasyonu, hem performans hem de güvenlik açısından kritik öneme sahiptir. Örneğin bir itemin kullanılması sırasında belirli bir fonksiyon çağrılır ve cooldown süresi veritabanına ya da o anki oturuma yazılır. Bu süreçte sunucu, aynı slot için tekrar istek gelirse bunu reddeder.
Python GUI ile Kontrol ve Geliştirme
Bazı geliştiriciler, bu gibi sistemleri daha kolay yönetebilmek adına Python GUI tabanlı araçlar kullanabilir. PyRoot ve UIScript gibi yapılar sayesinde, cooldown ayarları dinamik olarak değiştirilebilir ve test edilebilir. Bu sayede geliştirme süreci hızlanır ve sistemler daha esnek hale gelir.
Database Entegrasyonu
Cooldown verilerinin kalıcı olması için database (DB) kullanılır. Auth ve game serverlar arasında senkronizasyon sağlanarak, kullanıcıya ait cooldown bilgileri güvenli bir şekilde saklanır. Bu sayede sunucu yeniden başlatılsa bile veriler korunur.
Martysama ve Diğer Geliştirici Kaynakları
Metin2 geliştirme dünyasında Martysama gibi isimler, bu tür sistemlerin uygulanmasında önemli kaynaklardır. Onların sağladığı kaynak kodlar ve örnek uygulamalar, yeni başlayan geliştiriciler için rehber niteliğindedir. Metin2Dev toplulukları da bu konuda birçok faydalı bilgi sunar.
Sonuç
Official Slot Cooldown, Metin2 özel sunucularında denge ve adil oyun için kritik öneme sahip bir özelliktir. Doğru uygulandığında, oyuncuların deneyimini artırır ve haksız rekabeti önler. Hem C++ hem de Python tabanlı çözümlerle bu sistemler, Metin2 geliştiricileri tarafından özelleştirilebilir ve genişletilebilir.
What is the Official Slot Cooldown System and How Is It Implemented in Metin2 Private Servers?
In the process of developing Metin2 private servers, ensuring balanced and fair gameplay is highly important. In this context, the Official Slot Cooldown system introduces a waiting period for players before they can reuse certain slots (such as inventory, trade, or special item slots). This system aims to prevent unfair advantages by controlling item usage, especially in PvP-oriented servers.
What Does the Official Slot Cooldown Do?
Thanks to this system, players cannot immediately reuse specific items after using them once. This helps maintain in-game balance and reduces the risk of cheating. Particularly in PvP systems, mechanisms like these prevent powerful items from being reused continuously, creating a balanced combat environment.
How Does the System Work?
The cooldown duration is usually measured in milliseconds. When a player uses a slot, the system starts a timer. Until the time expires, the same slot cannot be used again. This process is typically verified on both the client-side and the server-side. While a visual cooldown animation is shown on the client side, the server validates the action and prevents cheating.
Implementing Cooldown in C++ Source Code
To implement such a system in Metin2 private servers, developers often use systems coded in C++. Correct integration of these systems during the game server programming phase is critical for performance and security. For instance, when an item is used, a function is triggered which saves the cooldown time either in the database or the current session. During this time, if another request comes for the same slot, the server rejects it.
Controlling and Developing with Python GUI
Some developers prefer using Python-based GUI tools to manage such systems more easily. With structures like PyRoot and UIScript, cooldown settings can be dynamically changed and tested. This speeds up the development process and makes systems more flexible.
Database Integration
To ensure cooldown data remains persistent, databases (DB) are used. By synchronizing between the auth and game servers, cooldown information tied to users is securely stored. This ensures that even if the server restarts, the data remains intact.
Resources from Martysama and Other Developers
In the world of Metin2 development, names like Martysama provide valuable resources for implementing such systems. Their source codes and sample implementations serve as guides for newcomers. Communities like Metin2Dev also offer many useful insights into these topics.
Conclusion
Official Slot Cooldown is a critical feature for balance and fairness in Metin2 private servers. When properly implemented, it enhances the player experience and prevents unfair competition. Whether using C++ or Python-based solutions, these systems can be customized and extended by Metin2 developers.
