Neler yeni

Foruma hoş geldin, Ziyaretçi

Metin2Lobby.com Metin2 Private Server Tanıtım Advertising Ve Geliştirme Forumudur.Metin2 pvp serverler,1-99,1-105,1-120,55-120 global serverları paylaş yada ara.
Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı ya da giriş yapmalısınız. Foruma üye olmak tamamen ücretsizdir.

MaviAyGames | Yere Düşme İle İlgili Engeller

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Konular
48,270
Mesajlar
48,580
Tepkime puanı
74
M2 Yaşı
3 yıl 11 ay 10 gün
Trophy Puan
48
Konum
Web sitesi
M2 Yang
488,669
Ticaret : 1 / 0 / 0
Ticaret Oranı : 100%
Örneğin güçlü beden skili açık iken mavi ejder skil attığındaki yere düşmenin çözümü aşağıdadır.
Service.h
Ekle:
Kod:
#define ENABLE_FALL_FIX

BlueDragon_Skill.h

Arat:
Kod:
ch->Sync(tx, ty);                     ch->Goto(tx, ty);                     ch->CalculateMoveDuration();                     ch->SyncPacket();

Değiştir:
Kod:
#ifdef ENABLE_FALL_FIX                     if (ch->CanFall())                     {                         ch->Sync(tx, ty);                         ch->Goto(tx, ty);                         ch->CalculateMoveDuration();                         ch->SyncPacket();                     } #else                     ch->Sync(tx, ty);                     ch->Goto(tx, ty);                     ch->CalculateMoveDuration();                     ch->SyncPacket(); #endif

Arat:
Kod:
LPREGEN CHARACTER::GetRegen() {     return m_pkRegen; }

Altına ekle:

Kod:
#ifdef ENABLE_FALL_FIX bool CHARACTER::CanFall() {     if (IsAffectFlag(AFF_CHEONGEUN) && !IsAffectFlag(AFF_CHEONGEUN_WITH_FALL)) //Taichi skill         return false;     if (IsImmune(IMMUNE_FALL)) //Immune flag         return false;     if (!IsPC() &&         GetRaceNum() == 1097 &&         GetRaceNum() == 1098 &&         GetRaceNum() == 1099 &&         GetRaceNum() == 2496 &&         GetRaceNum() == 2497 &&         GetRaceNum() == 2498         )         return false;     return true; } #endif

Char.h
Arat:
Kod:
private:     std::shared_ptr<CInventory> m_inventory;

Üstüne ekle:

Kod:
#ifdef ENABLE_FALL_FIX public:     bool            CanFall(); #endif

char_skill.cpp
Arat:
Kod:
GetDeltaByDegree(degree, fCrushSlidingLength, &fx, &fy);                 sys_log(0, "CRUSH! %s -> %s (%d %d) -> (%d %d)", m_pkChr->GetName(), pkChrVictim->GetName(), pkChrVictim->GetX(), pkChrVictim->GetY(), (long)(pkChrVictim->GetX() + fx), (long)(pkChrVictim->GetY() + fy));                 long tx = (long)(pkChrVictim->GetX() + fx);                 long ty = (long)(pkChrVictim->GetY() + fy);                 pkChrVictim->Sync(tx, ty);                 pkChrVictim->Goto(tx, ty);                 pkChrVictim->CalculateMoveDuration();

Değiştir:
Kod:
#ifdef ENABLE_FALL_FIX                 GetDeltaByDegree(degree, fCrushSlidingLength, &fx, &fy);                 bool victimCanFall = pkChrVictim->CanFall();                 sys_log(0, "CRUSH! %s -> %s (%d %d) -> (%d %d) executed (fall): %d", m_pkChr->GetName(), pkChrVictim->GetName(), pkChrVictim->GetX(), pkChrVictim->GetY(), static_cast<int32_t>(pkChrVictim->GetX() + fx), static_cast<int32_t>(pkChrVictim->GetY() + fy), victimCanFall);                 if (victimCanFall)                 {                     int32_t tx = static_cast<int32_t>(pkChrVictim->GetX() + fx);                     int32_t ty = static_cast<int32_t>(pkChrVictim->GetY() + fy);                     if (true == SECTREE_MANAGER::instance().IsMovablePosition(pkChrVictim->GetMapIndex(), tx, ty))                         return;                     pkChrVictim->Sync(tx, ty);                     pkChrVictim->Goto(tx, ty);                     pkChrVictim->CalculateMoveDuration();                 } #else                 GetDeltaByDegree(degree, fCrushSlidingLength, &fx, &fy);                 sys_log(0, "CRUSH! %s -> %s (%d %d) -> (%d %d)", m_pkChr->GetName(), pkChrVictim->GetName(), pkChrVictim->GetX(), pkChrVictim->GetY(), (long)(pkChrVictim->GetX() + fx), (long)(pkChrVictim->GetY() + fy));                 long tx = (long)(pkChrVictim->GetX() + fx);                 long ty = (long)(pkChrVictim->GetY() + fy);                 pkChrVictim->Sync(tx, ty);                 pkChrVictim->Goto(tx, ty);                 pkChrVictim->CalculateMoveDuration(); #endif

MaviAyGames | Yere Düşme İle İlgili Engeller

Metin2 özel sunucularında oyun deneyimini zenginleştirmek ve daha adil bir PVP ortamı yaratmak adına birçok geliştirici tarafından çeşitli sistemler entegre edilmektedir. Bu sistemlerden birisi de Yere Düşme Sistemi'dir. Bu sistem, oyuncuların belirli yüksekliklerden düştüklerinde hasar alması prensibine dayanır. Ancak bazı haritalarda ya da özel alanlarda bu sistem istenmeyen durumlara sebep olabilir. İşte tam bu noktada Yere Düşme Engeli devreye girer.

Yere Düşme Sisteminin Amacı
Metin2 özel sunucularında PVP (Player vs Player) mekanikleri, oyuncuların stratejik düşünmesini ve becerilerini kullanmasını teşvik eder. Yere düşme sistemi, oyuncuların yüksek yerlerden düşerek kaçınmak ya da saldırılarını planlamaları için önemli bir stratejik unsur haline gelir. Örneğin, bir kale savaşı sırasında rakip karakterin yüksekten düşürülmesi, onun hasar almasına ve mağlup olmasına neden olabilir.

Yere Düşme Engelinin Gerekliliği
Ancak bazı özel alanlar veya harita tasarımları nedeniyle oyuncuların istemeden yüksekten düşmesi ve bu sebeple ciddi hasar almaları mümkündür. Bu tür durumlar, oyuncu deneyimini olumsuz etkileyebilir. Özellikle Martysama gibi gelişmiş sistemlerde bu tür engeller, belirli koordinatlar arasında otomatik olarak devreye alınabilmektedir. Bu sayede oyuncular, belirlenen bölgelerde yere düşme cezası almadan oynamaya devam edebilirler.

C++ Kaynak Kodları ile Entegrasyon
Metin2 özel sunucularında yere düşme engeli sistemi, genellikle C++ dilinde yazılmış sunucu kaynak kodlarına entegre edilir. Bu işlem sırasında, belirli koordinatlar için bir kontrol fonksiyonu yazılır. Eğer oyuncu bu koordinatlar içindeyse, sistem onun yüksekten düştüğünü algılamaz ve hasar uygulanmaz. Bu tür sistemler, Game Core ve DB Core[/COORD] yapılarıyla uyumlu çalışarak veritabanı üzerinden de konfigüre edilebilir.

Python GUI Kullanımı[/COORD]
Geliştiriciler, bu tür sistemleri kolayca yönetebilmek için Python GUI tabanlı arayüzler geliştirebilir. Böylece harita koordinatlarını görsel olarak seçip, yere düşme engeli aktif bölgelerini daha kolay yönetebilirler. Bu tür arayüzler genellikle Py Root yapısı üzerinde çalışır ve UIScript ile birlikte kullanılır.

Sunucu Tarafında Uygulama
Yere düşme engeli, Auth ve Game Server yapıları arasında senkronize çalışmalıdır. Bu sistemler, oyuncunun konumunu ve yüksekliğini sürekli takip eder. Belirlenen sınırlar dışına çıkıldığında ise hasar sistemi devreye girer. Ancak belirli bölgelerde bu kontrol iptal edilir. Bu sayede hem PVP deneyimi korunur hem de kullanıcı dostu bir oyun yapısı sağlanır.

Sonuç
Metin2 özel sunucularında yere düşme engeli, hem adil bir PVP ortamı yaratmak hem de kullanıcı deneyimini artırmak için önemli bir özelliktir. MaviAyGames gibi gelişmiş sistemlerle birlikte, bu tür kontroller oldukça verimli ve esnek bir şekilde uygulanabilmektedir. Bu sayede hem sunucu sahipleri hem de oyuncular için daha keyifli bir oyun ortamı sağlanabilir.


MaviAyGames | Obstacles Related to Fall Damage

In order to enhance the gaming experience in Metin2 private servers and create a fairer PVP environment, many developers integrate various systems. One such system is the Fall Damage System. This system is based on the principle that players receive damage when falling from certain heights. However, in some maps or special areas, this system can lead to unwanted situations. At this point, Fall Damage Obstacle comes into play.

Purpose of the Fall Damage System
In Metin2 private servers, PVP (Player vs Player) mechanics encourage players to think strategically and use their skills. The fall damage system becomes an important strategic element by allowing players to avoid falling from high places or plan their attacks. For example, during a castle war, dropping an enemy character from a height might cause them to take damage and lose the fight.

The Necessity of Fall Damage Obstacles
However, due to specific map designs or special areas, players may accidentally fall from heights and suffer significant damage. Such scenarios can negatively affect the player experience. Particularly in advanced systems like Martysama, these kinds of obstacles can be automatically activated between defined coordinates. Thus, players can continue playing in designated areas without taking fall damage penalties.

Integration with C++ Source Code
In Metin2 private servers, the fall damage obstacle system is typically integrated into server-side source codes written in C++. During this process, a control function for specific coordinates is written. If the player is within those coordinates, the system does not recognize a fall from height, and no damage is applied. These types of systems work harmoniously with Game Core and DB Core structures and can also be configured via database connections.

Using Python GUI
Developers can create Python GUI-based interfaces to easily manage such systems. This allows map coordinates to be visually selected and fall-damage-free zones to be managed more efficiently. Such interfaces usually operate on Py Root structures and are used together with UIScript.

Implementation on Server Side
The fall damage obstacle must work synchronously between Auth and Game Server structures. These systems continuously track the player's position and height. When limits are exceeded, the damage system kicks in. However, in certain areas, this check is canceled. This ensures both a fair PVP environment and a user-friendly game structure.

Conclusion
In Metin2 private servers, fall damage obstacles are an important feature to create both a fair PVP environment and improve user experience. With advanced systems like MaviAyGames, such controls can be implemented very efficiently and flexibly. This way, a more enjoyable gaming environment can be provided for both server owners and players.
 

Forumdan daha fazla yararlanmak için giriş yapın yada üye olun!

Forumdan daha fazla yararlanmak için giriş yapın veya kayıt olun!

Kaydol

Forumda bir hesap oluşturmak tamamen ücretsizdir.

Üye ol
Giriş Yap

Eğer bir hesabınız var ise lütfen giriş yapın

Giriş Yap

Tema düzenleyici

Tema özelletirmeleri