Tekrardan Merhaba arkadaşlar
Oyunum için yaptığım sistemleri paylaşıyorum.
Sistem amacı atak halindeyken item değiştirelemez bu sistem sayesinde costume mount takabileceksiniz.
game/src/char_item.cpp
arat
&& (dwCurTime - GetLastAttackTime() <= 1500 || dwCurTime - m_dwLastSkillTime <= 1500))
Kod bloğunu tamamen değiştir:
Kanıt:
Oyunum için yaptığım sistemleri paylaşıyorum.
Sistem amacı atak halindeyken item değiştirelemez bu sistem sayesinde costume mount takabileceksiniz.
game/src/char_item.cpp
arat
&& (dwCurTime - GetLastAttackTime() <= 1500 || dwCurTime - m_dwLastSkillTime <= 1500))
Kod bloğunu tamamen değiştir:
Ziyaretçiler için gizlenmiş link,görmek için üye olmalısınız!
Giriş yap veya üye ol.
Kanıt:
Kanıt atarsanız sevinirim
Attack Halindeyken Bineğe Binme Sistemi
Metin2 özel sunucularında oyuncuların savaş sırasında binek sistemlerinden faydalanabilmesi, hem stratejik avantaj sağlar hem de oyun deneyimini zenginleştirir. Bu yazıda, attack halindeyken bineğe binme özelliğini nasıl uygulayacağınızı, hangi dosyaları düzenlemeniz gerektiğini ve bu sistemin C++ kaynak kodları üzerinden nasıl entegre edileceğini detaylıca inceleyeceğiz.
Önemli Not: Bu sistem, Metin2 özel sunucularında PvP odaklı oynanışa katkı sunar. Ancak doğru yapılandırılmazsa sunucu dengesi bozulabilir. Bu nedenle dikkatli bir geliştirme süreci gereklidir.
Nasıl Çalışır?
Varsayılan olarak Metin2'de bir karakter saldırı modundayken bineğe binemez. Bu davranış, güvenlik amaçlıdır. Ancak bazı özel sunucular bu kuralı gevşeterek, oyuncuların attack durumunda dahi bineğe binmelerine izin verebilir. Bu sayede hızlı hareket etme, geri çekilmek veya takviye çağırmak gibi taktiksel hamleler yapılabilir.
Sistem Uygulama Adımları
Bu sistemi aktif etmek için game server source üzerinde değişiklik yapmanız gerekir. Özellikle char.cpp ve char.h dosyalarında bazı fonksiyonlar düzenlenmelidir.
1. char.cpp Dosyasında Değişiklik
Oyuncu bineğe binme isteğinde bulunduğunda çalışan fonksiyon, karakterin attack modunda olup olmadığını kontrol eder. Burada bu kontrolü pas geçecek şekilde ayarlamak gerekir.
2. Client-side Ayarlamalar
Client tarafında da binek sistemleri ile ilgili uiscript dosyalarında düzenleme yapılması gerekebilir. Bu işlem, kullanıcı arayüzünden bineğe binme butonunun aktif kalmasını sağlar.
3. Python ve Py GUI Entegrasyonu
Bazı özel sunucular, Python tabanlı GUI sistemleriyle binek yönetimi sağlar. Bu durumda py root dosyalarında da gerekli kontrollerin yapılması önemlidir.
Sunucu Performansı ve DB Etkisi
Bu tür sistemler, DB üzerinde fazladan yük oluşturabilir. Özellikle binek kullanım sıklığı arttıkça, auth ve game server arasında veri trafiği artar. Bu nedenle compile öncesi performans testleri yapmanız önerilir.
Kaynak Kod Paylaşımı
Bu sistemi uygulamak isteyen geliştiriciler için örnek C++ kod parçacığı aşağıda verilmiştir:
Kod:
if (ch->IsInWarMap() && ch->GetHorseLevel() > 0) {[BR][/BR] ch->RideHorse();[BR][/BR]}
Bu kod, savaş haritasında iken bineğe binme izni verir. Ancak saldırı moduna göre ayarlamak için ek kontroller yapılmalıdır.
Sonuç
Attack halindeyken bineğe binme sistemi, Metin2 özel sunucularında PvP oyun deneyimini geliştiren bir özelliktir. Ancak bu sistemin doğru uygulanması için hem server-side hem de client-side üzerinde dikkatli değişiklikler yapılması gerekir. Yanlış uygulamalar sunucu dengesini bozabileceği için, bu sistemleri yalnızca profesyonel geliştiricilerin entegre etmesi önerilir.
Mounting System While in Attack State
On Metin2 private servers, allowing players to use mount systems during combat provides both strategic advantages and enriches the gaming experience. In this article, we will examine in detail how to implement the feature that allows mounting while in attack state, which files you need to modify, and how this system can be integrated through C++ source code.
Important Note: This system contributes to PvP-oriented gameplay on Metin2 private servers. However, if not configured properly, it may disrupt server balance. Therefore, careful development is necessary.
How Does It Work?
By default, Metin2 does not allow characters to mount while in attack mode. This behavior is for security purposes. However, some private servers relax this rule, allowing players to mount even when in attack mode. This enables tactical moves such as fast movement, retreating, or calling for reinforcements.
Implementation Steps
To activate this system, modifications must be made on the game server source. Particularly, some functions in char.cpp and char.h files need to be adjusted.
1. Modifications in char.cpp File
The function triggered when a player attempts to mount checks whether the character is in attack mode. To bypass this check, adjustments must be made accordingly.
2. Client-Side Adjustments
Adjustments may also be required in uiscript files related to mount systems on the client side. This ensures that the mount button remains active from the user interface.
3. Python and Py GUI Integration
Some private servers manage mounts using Python-based GUI systems. In this case, necessary checks must also be made in py root files.
Server Performance and DB Impact
Such systems may cause additional load on the DB. Especially when mount usage frequency increases, data traffic between auth and game server rises. Therefore, performance tests before compile are recommended.
Source Code Sharing
An example C++ code snippet for developers looking to implement this system is provided below:
Kod:
if (ch->IsInWarMap() && ch->GetHorseLevel() > 0) {[BR][/BR] ch->RideHorse();[BR][/BR]}
This code grants permission to mount while in war maps. However, additional checks should be made to adjust based on attack state.
Conclusion
The attack state mounting system is a feature that enhances the PvP gaming experience on Metin2 private servers. However, implementing this system correctly requires careful modifications on both server-side and client-side. Because incorrect implementations may disrupt server balance, it is recommended that only professional developers integrate these systems.
