+ Basarken var yok eklentisi

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

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Görselde gördüğünüz gibi + basarken var yok eklentisidir.Yalnızca python tabanlıdır.

Diğer paylaşılanlar gibi kendi ui dosyalarımı yazdırtmıyorum. :)

İyi kullanımlar. :behindsofa:


Screenshot_1.png

Kod:
root/uirefine.py aç ve arat         textLine.SetFontName(localeInfo.UI_DEF_FONT) altında bul :     textLine.SetPackedFontColor(0xffdddddd)         textLine.SetText("%s x %02d" % (item.GetItemName(), count)) değiştir:         if player.GetItemCountByVnum(vnum) < count:             textLine.SetPackedFontColor(0xffFF0033)         else:             textLine.SetPackedFontColor(0xff40EF37)         textLine.SetText("|cFFdddddd|H|h%s x%d|h|r (%d)" % (item.GetItemName(), count, player.GetItemCountByVnum(vnum))) örnek : https://prnt.sc/1xtufd4 oran yazılarının rengi için ise : locale_game.txt içerisinde arat : REFINE_SUCCESS_PROBALITY değiştir : REFINE_SUCCESS_PROBALITY    |cffffcc00Yükseltme Oranı : |cff00ccff%% %d tekrar arat : REFINE_COST değiştir: REFINE_COST    |cffffcc00Yükseltme bedeli : |cff00ccff%d |cffffcc00Yang

Metin2'de + Basarken Var Yok Eklentisi Nasıl Geliştirilir?

Metin2 özel sunucularında kullanıcı deneyimini artırmak için birçok sistem geliştirilmektedir. Bu sistemlerden biri de oyuncunun + tuşuna basması durumunda var/yok bildirimi göndermesini sağlayan eklentidir.

Metin2 Özel Sunucularında + Tuşu ile Var Yok Sistemi Nedir?

Metin2 özel sunucularında PvP odaklı oyunlar yapılmaktadır. Bu nedenle oyuncuların birbirleriyle iletişim kurabilmesi büyük önem taşır. + basıldığında var yok mesajı gönderilmesi, oyuncuların hızlıca birbirlerine durumlarını bildirmelerini sağlar. Bu özellikle grup oyunlarında ya da savaş anında oldukça faydalıdır.

Sistem Nasıl Çalışır?

Bu sistemde, oyuncu klavyede + tuşuna bastığında bir komut tetiklenir. Bu komut, istemci tarafında bir mesaj oluşturur ve sunucuya gönderilir. Sunucu, bu mesajı alıp çevresinde bulunan diğer oyunculara_broadcast_ eder. Böylece çevrede bulunan herkes + tuşuna basan oyuncunun 'var' veya 'yok' durumunu görür.

Python Tarafında Uygulama

Bu sistemi uygulamak için öncelikle uiscript dosyasında bir buton veya tuş tanımlaması yapılmalıdır. Oyuncu + tuşuna bastığında bu sinyal py root üzerinden işlenerek bir fonksiyona yönlendirilir.

Kod:
def OnKeyDown(self, key):[BR][/BR]    if key == app.VK_ADD:[BR][/BR]        self.__SendVarYokMessage()


C++ Tarafında Sunucu Kodları

Sunucu tarafında, bu mesajı almak için game server üzerinde bir handler yazılır. Bu handler, gelen mesajı kontrol eder ve uygun formatta diğer oyunculara iletir. Bu işlem genellikle db core ile entegre çalışarak loglanabilir veya istatistiksel olarak değerlendirilebilir.

Oluşturulan Mesaj Formatı

Mesaj formatı, sistemsel tutarlılığı korumak açısından önemlidir. Örneğin:

Oyuncu Ahmet var!
Oyuncu [B=Mehmet[/B] yok!

Bu mesajlar, sadece belirli bir menzildeki oyuncular tarafından görülebilir. Bu menzil, PvP sistem ayarlarına göre dinamik olarak değiştirilebilir.

Avantajları Nelerdir?

• Hızlı iletişim sağlar.
• Grup içi koordinasyonu artırır.
• PvP savaşlarında stratejik avantaj sağlar.
• Oyuncu deneyimini geliştirir.

Zorluklar ve Çözümler

Bu sistemi kurarken bazı teknik engellerle karşılaşılabilir. Örneğin, farklı klavye düzenlerinde + tuşu farklı karakter olarak algılanabilir. Bu durumda, py gui üzerinden tuş haritalaması yapılması gerekir.

Sonuç

Metin2 özel sunucularında + tuşu ile var yok bildirimi göndermek, oyuncuların birbirleriyle daha etkili iletişim kurmasını sağlar. Bu sistem, PvP sistemlerinde stratejik bir araç olarak kullanılabilir ve genel oyun atmosferini olumlu yönde etkiler. Metin2Lobby gibi platformlar sayesinde bu tarz sistemlerin geliştirilmesi kolaylaşmaktadır.


How to Develop a Present/Absent Add-on When Pressing + in Metin2

In Metin2 private servers, many systems are developed to enhance the user experience. One such system allows players to send present/absent notifications by pressing the + key.

What Is the + Key Present/Absent System in Metin2 Private Servers?

In Metin2 private servers, PvP-oriented gameplay is common. Therefore, communication between players is crucial. Sending a present/absent message upon pressing the + key allows players to quickly inform each other of their status. This is especially useful during group play or combat situations.

How Does the System Work?

In this system, when a player presses the + key on their keyboard, a command is triggered. This command generates a message on the client side and sends it to the server. The server receives the message and broadcasts it to other nearby players. Thus, everyone in the vicinity sees whether the pressing player is 'present' or 'absent'.

Implementation in Python

To implement this system, first, a button or key mapping must be defined in the uiscript file. When the player presses the + key, this signal is processed through py root and directed to a function.

Kod:
def OnKeyDown(self, key):[BR][/BR]    if key == app.VK_ADD:[BR][/BR]        self.__SendVarYokMessage()


Server-Side Code in C++

On the server side, a handler must be written in the game server to receive this message. The handler checks the incoming message and forwards it in the appropriate format to other players. This process can work in integration with db core to log or analyze statistics.

Generated Message Format

The message format is important to maintain systemic consistency. For example:

Player Ahmet is present!
Player Mehmet is absent!

These messages may only be visible to players within a certain range, which can be adjusted dynamically based on PvP system settings.

Advantages

• Enables fast communication.
• Improves coordination within groups.
• Offers strategic advantages in PvP battles.
• Enhances overall gaming experience.

Challenges and Solutions

Some technical challenges might arise when implementing this system. For example, the + key might be recognized differently across various keyboard layouts. In this case, a key mapping should be implemented via py gui.

Conclusion

Sending present/absent notifications by pressing the + key in Metin2 private servers allows more effective communication between players. This system can serve as a strategic tool in PvP systems and positively affects the general gaming atmosphere. Platforms like Metin2Lobby make developing such systems easier.
 

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

Benzer konular

Geri
Üst Alt