[C++] Affect potion System | Bykatil199

  • Konbuyu başlatan Konbuyu başlatan Admin
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 34

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0


Merhaba Arkadaşlar Coğu Kişinin Arayıp Bulamadığı Sistemi Sizler İçin Yapıp Paylaşıyorum İyi Kullanmalar..





Kurulum İçin Gerekli Dosyalar ,

İndirmek İçin :
VirusTotal :

1 Teşşekkürü Çok Görmeyin.. Sağlıcakla Kalın..

[GÜNCELLEME]

taskbara bırakıldığı zaman effect çıkmaması ; örnek;



Fixi ; UiTaskbar.py açılır def RefreshQuickSlot(self): aratılır ;

Kod:
if constInfo.IS_AUTO_POTION(itemIndex):                         # metinSocket - [0] : Ȱ¼ºÈ ¿©ºÎ, [1] : »ç¿ëÇÑ ¾ç, [2] : ÃÖ´ë ¿ë·®                         metinSocket = [player.GetItemMetinSocket(Position, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)]                                               if 0 != int(metinSocket[0]):                             slot.ActivateSlot(slotNumber)                         else:                             slot.DeactivateSlot(slotNumber)

bu kod bloğun altına eklenir ;

Kod:
if app.BYKATIL199_ITEM_SLOT_EFFECT:                         if ahmetatalayInfo.IS_NEW_SPEED_POTION(itemIndex):                             metinSocket = [player.GetItemMetinSocket(Position, j) for j in xrange(player.METIN_SOCKET_MAX_NUM)]                                                       if 0 != int(metinSocket[0]):                                 slot.ActivateAcceSlot(slotNumber)                             else:                                 slot.DeactivateAcceSlot(slotNumber)



DÜZELTME :

Metin2 Özel Sunucularında C++ Affect Potion Sistemi Oluşturma Rehberi

Metin2 özel sunucu geliştirme dünyasında oyuncuların karakterlerini güçlendirmek ve savaşlarda avantaj elde etmek amacıyla çeşitli sistemler geliştirilir. Bu sistemlerden biri de Affect Potion yani Etki İksiri sistemidir. Bu sistem sayesinde oyuncular belirli iksirler içerek geçici süreyle karakterlerine bonuslar kazandırabilirler. Bu rehberde C++ dilinde yazılmış bir Affect Potion sisteminin nasıl kurulacağını detaylı olarak ele alacağız.

Affect Potion Sistemi Nedir?
Affect Potion sistemi, oyuncunun bir iksir tükettiğinde karakterine belirli bir süre boyunca etki edecek bonusları aktif etmesini sağlar. Örneğin HP regenerasyonu, MP artışı,攻击力 veya savunma gibi özelliklerin geçici olarak artırılması sağlanabilir. Bu sistem genellikle PvP sunucularında çokça tercih edilir çünkü oyuncuların kısa sürede kendilerini savaşa hazırlamalarını sağlar.

Sistem Kurulumu İçin Gerekli Dosyalar
Bu sistemi kurabilmek için öncelikle Metin2 server kaynak kodlarını (SRC) düzenlememiz gerekir. Kurulum için aşağıdaki dosyalar üzerinde değişiklik yapmamız gerekebilir:
- char.cpp
- char.h
- packet.h
- item.cpp
- item.h
Bu dosyalara yeni fonksiyonlar eklenerek affect ekleme, kaldırma gibi işlemler yapılabilir. Ayrıca isterseniz Python tarafında bir GUI arayüzü ile bu iksirleri kolayca yönetebilirsiniz.

C++ Kod Örnekleri
Aşağıda basit bir affect ekleme fonksiyonuna dair örnek C++ kod parçası yer almaktadır:

Kod:
[B]void CHARACTER::AddAffectPotion(int type, int value, int duration)[/B]{[BR][/BR][B]    AddAffect(type, AFFECT_POTION, value, 0, duration * PassSecond(), true);[/B][BR][/BR][B]}[/B]


Bu fonksiyon, karaktere belirtilen türde bir affect ekler. Burada 'type' etkinin türüdür (örneğin攻击力 artışı), 'value' miktarıdır ve 'duration' ise ne kadar süreyle aktif kalacağıdır. Fonksiyonu item kullanımı sırasında çağırarak iksir tüketildiğinde etkisinin devreye girmesini sağlayabilirsiniz.

Önemli Notlar
Bu sistem özel sunucularda test edilmeli ve güvenlik açısından kontrol edilmelidir. Özellikle hile riskini azaltmak için sunucu tarafında tüm kontrollerin sağlanması gerekir. Ayrıca affect sisteminin doğru çalışması için DB Core üzerinde de bazı güncellemeler gerekebilir.

Sonuç
Metin2 özel sunucularında güçlü bir PvP deneyimi sunmak isteyen geliştiriciler için Affect Potion sistemi oldukça faydalıdır. Doğru kurulduğunda hem oyuncuların daha aktif olmasını sağlar hem de sunucunuzun rekabet gücünü artırır. C++ bilgisi olan geliştiriciler için oldukça keyifli ve faydalı bir sistemdir.


Guide to Creating a C++ Affect Potion System in Metin2 Private Servers

In the world of Metin2 private server development, various systems are developed to enhance player characters and provide advantages in battles. One of these systems is the Affect Potion system. With this system, players can grant temporary bonuses to their characters by consuming specific potions. In this guide, we will detail how to implement an Affect Potion system written in C++.

What is the Affect Potion System?
The Affect Potion system allows players to activate temporary bonuses on their character for a limited duration after consuming a potion. For example, it can temporarily increase HP regeneration, MP gain, attack power, or defense. This system is commonly preferred in PvP servers as it allows players to quickly prepare themselves for battle.

Required Files for Installation
To install this system, you need to modify the Metin2 server source code (SRC). The following files may require modifications:
- char.cpp
- char.h
- packet.h
- item.cpp
- item.h
New functions can be added to these files to handle adding and removing affects. Additionally, you can use a Python-based GUI to manage these potions more easily.

Sample C++ Code[/COORD]
Below is a simple example of a function that adds an affect via potion:

Kod:
[B]void CHARACTER::AddAffectPotion(int type, int value, int duration)[/B]{[BR][/BR][B]    AddAffect(type, AFFECT_POTION, value, 0, duration * PassSecond(), true);[/B][BR][/BR][B]}[/B]


This function adds a specified affect to the character. Here, 'type' is the kind of effect (e.g., attack boost), 'value' is its magnitude, and 'duration' specifies how long the effect will last. You can call this function when a potion item is used so that the effect activates upon consumption.

Important Notes
This system should be tested thoroughly in private servers and secured against exploits. To reduce cheating risks, all validations must be done on the server side. Additionally, updates might be needed in the DB Core for the system to work properly.

Conclusion
For developers aiming to offer a strong PvP experience in Metin2 private servers, the Affect Potion system is highly beneficial. When implemented correctly, it not only encourages more active gameplay but also enhances the competitiveness of your server. It's an enjoyable and useful system for developers with C++ knowledge.
 

Şuan Bu Konuyu Görüntüleyen Kullanıcılar (Toplam : 0, Üye : 0, Misafir : 0)

Benzer konular

Geri
Üst Alt