Metin2 Chatten Pm Atma (@Vectors mesaj)

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

Admin

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



Root uichat.py
aratılır;
Kod:
def __SendChatPacket(self, text, type):

Blok full değiştirilir

Kod:
def __SendChatPacket(self, text, type):         if net.IsChatInsultIn(text):             chat.AppendChat(chat.CHAT_TYPE_INFO, locale.CHAT_INSULT_STRING)         elif text.find("@") == 0:             user,msg = text[1:].split(" ", 1)             if len(msg) > 0:                 net.SendWhisperPacket(user, msg)                 chat.AppendChat(chat.CHAT_TYPE_INFO, "%s Nickli oyuncuya ozel mesaj gonderildi." % user)             else:                 chat.AppendChat(chat.CHAT_TYPE_INFO, "Bos mesaj gonderemezsiniz.")         else:             net.SendChatPacket(text, type)


Kod:
def __SendChatPacket(self, text, type):         if net.IsChatInsultIn(text):             chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.CHAT_INSULT_STRING)         elif text.find("@") == 0:             user,msg = text[1:].split(" ", 1)             if len(msg) > 0:                 net.SendWhisperPacket(user, msg)                 chat.AppendChat(chat.CHAT_TYPE_INFO, "%s Nickli oyuncuya ozel mesaj gonderildi." % user)             else:                 chat.AppendChat(chat.CHAT_TYPE_INFO, "Bos mesaj gonderemezsiniz.")         else:             net.SendChatPacket(text, type)

Kodları verdiğim sitelerden alt kısımdan kopyalayın.


@Nick Mesaj
Metin2 Chatten PM Atma Sistemi (@Vectors Mesaj)

Metin2 özel sunucularında kullanıcı deneyimini artırmak için birçok geliştirici, chat üzerinden doğrudan özel mesaj gönderme (PM) özelliğini entegre eder. Bu özellik, oyuncuların birbirleriyle daha hızlı ve kolay iletişim kurmasını sağlar. Bu yazıda, @Vectors mesaj sisteminin nasıl çalıştığını ve Metin2 özel sunucularında nasıl uygulanacağını ele alacağız.

Metin2 Chat Sistemi ve Özel Mesajlar
Metin2, standart olarak açık chat sistemine sahiptir. Ancak bazı sunucularda, oyuncular bir oyuncunun adını tıkladığında ona özel mesaj gönderebilirler. Bu işlem genellikle sağ tıklayarak yapılır. Ancak bu standart bir özelliktir. Gerçek gelişmiş PM sistemi, chat üzerinden '@' karakteriyle başlayan kullanıcı adlarına otomatik olarak özel mesaj göndermeyi sağlar. Örneğin:@Vectors şeklinde yazıldığında, Vectors adlı kullanıcıya özel mesaj gönderilir.

@Vectors Mesaj Sistemi Nasıl Çalışır?
Bu sistem, genellikle C++ tabanlı bir script ile geliştirilir. Oyuncu chat'e '@' karakteriyle başlayan bir mesaj yazdığında, sunucu bu mesajı yakalar ve '@' karakterinden sonraki kullanıcı adını ayrıştırır. Eğer kullanıcı adı geçerliyse, mesaj doğrudan hedef oyuncuya özel mesaj olarak iletilir. Bu sayede oyuncular, chat'te birbirlerine kolayca ulaşabilirler.

Python Tarafında Uygulama
Metin2 özel sunucularında genellikle hem C++ hem de Python dilleri aktif rol oynar. Chat üzerinden PM atma sistemi, genellikle client tarafında Python ile yazılmış bir script yardımıyla sağlanır. Bu script, kullanıcıdan gelen mesajları dinler ve '@' karakteriyle başlayanları özel mesaj olarak yönlendirir.

Client-Side ve Server-Side Entegrasyon
Bu sistemin tam olarak çalışması için hem client-side hem de server-side tarafında değişiklikler yapılması gerekir. Client tarafında, kullanıcı girdisi kontrol edilir ve '@' ile başlayan metinler özel mesaj olarak işaretlenir. Sunucu tarafında ise bu özel mesaj istekleri karşılanır ve hedef oyuncuya yönlendirilir.

Python GUI ve Chat Sistemi
Python GUI (PyGUI), Metin2 client üzerinde görsel arayüz ile etkileşim kurmamızı sağlar. Chat sistemine entegre edilen bu arayüz sayesinde kullanıcı, '@' karakteriyle başlayan kullanıcı adlarını otomatik tanıyabilir ve özel mesaj kutusu açabilir. Bu sayede kullanıcı dostu bir sistem ortaya çıkar.

Martysama ve Script Geliştirme
Metin2 geliştirme dünyasında Martysama gibi isimler, birçok script ve GUI çözümü sunmuştur. Bu tür scriptler sayesinde geliştiriciler, chat üzerinden özel mesaj sistemi gibi gelişmiş yapıları kolayca entegre edebilirler. Martysama'nın sunduğu kaynaklar, özellikle PyRoot ve UIScript tabanlı yapılarda büyük kolaylık sağlar.

Sonuç
Metin2 chatten PM atma sistemi, kullanıcı deneyimini ciddi anlamda artırır. Özellikle PvP sunucularında, takım içi iletişim çok önemlidir. '@' karakteriyle başlayan kullanıcı adlarına otomatik özel mesaj gönderilmesi, bu iletişimi kolaylaştırır. C++, Python ve GUI sistemlerinin birleşimiyle güçlü bir chat sistemi oluşturulabilir.


Sending PM from Chat in Metin2 (@Vectors Message)

To enhance user experience on Metin2 private servers, many developers integrate a direct private messaging (PM) feature through the chat. This allows players to communicate with each other more quickly and easily. In this article, we will examine how the @Vectors message system works and how it can be implemented on Metin2 private servers.

Metin2 Chat System and Private Messages
Metin2 has a standard open chat system. However, on some servers, players can send a private message by clicking on a player's name, usually done via right-click. However, this is a standard feature. The advanced PM system sends a private message automatically to usernames that start with '@' in the chat. For example, typing @Vectors sends a private message directly to the player named Vectors.

How Does the @Vectors Message System Work?
This system is typically developed using a C++ based script. When a player writes a message starting with '@', the server captures this message and parses the username after the '@' symbol. If the username is valid, the message is sent directly to the targeted player as a private message, allowing players to easily reach out to each other in chat.

Implementation in Python
In Metin2 private servers, both C++ and Python are often actively used. The PM system through chat is usually supported by a Python-based script on the client side. This script listens for messages from the user and forwards those starting with '@' as private messages.

Client-Side and Server-Side Integration
For this system to work properly, modifications are required on both the client-side and server-side. On the client side, user input is checked and texts starting with '@' are marked as private messages. On the server side, these private message requests are handled and forwarded to the target player.

Python GUI and Chat System
Python GUI (PyGUI) allows interaction with visual interfaces on the Metin2 client. Thanks to this integrated interface, users can automatically recognize usernames starting with '@' and open a private message window. This creates a user-friendly system.

Martysama and Script Development
In the world of Metin2 development, names like Martysama have provided many script and GUI solutions. These scripts allow developers to easily integrate advanced structures such as chat-based PM systems. Resources provided by Martysama offer significant convenience especially in PyRoot and UIScript-based implementations.

Conclusion
The PM sending system from chat in Metin2 significantly enhances user experience. Especially in PvP servers, team communication is very important. Automatically sending private messages to usernames starting with '@' facilitates this communication. Combining C++, Python, and GUI systems can result in a powerful chat system.​
 

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

Benzer konular

Geri
Üst Alt