Sohbette Tag Sistemi

  • 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
İyi Günler Sizinde Bildiginiz Gibi Chat Sistemini Bugun Burada Paylasmaya Geldim



İlk Oncelikle Root'u Acıyoruz Ve İcindeki uichat.py Ye Sunları Yazıyoruz



Kod:
def __SendChatPacket(self, text, type):


Sonra

Kod:
def __SendChatPacket(self, text, type):         if net.IsChatInsultIn(text):             chat.AppendChat(chat.CHAT_TYPE_INFO, locale.CHAT_INSULT_STRING)         else:             net.SendChatPacket(text, type)


Ve Sonrada

Kod:
def __SendChatPacket(self, text, type):         if net.IsChatInsultIn(text):             chat.AppendChat(chat.CHAT_TYPE_INFO, locale.CHAT_INSULT_STRING)         else:             name = player.GetName()             if type == chat.CHAT_TYPE_SHOUT:                 if name.find("[SA]") !=-1:                     empire_id = "|cffffc700|H|h[Serveradmin]|cFFA7FFD4|H|h"                 elif name.find("[GA]") !=-1:                     empire_id = "|cffffc700|H|h[Gameadmin]|cFFA7FFD4|H|h"                 elif name.find("[TEC]") !=-1:                     empire_id = "|cffffc700|H|h[Techniker]|cFFA7FFD4|H|h"                 elif name.find("[DEV]") !=-1:                     empire_id = "|cffffc700|H|h[Developer]|cFFA7FFD4|H|h"                 elif name.find("[GM]") !=-1:                     empire_id = "|cffffc700|H|h[Gamemaster]|cFFA7FFD4|H|h"                 elif name.find("[TGM]") !=-1:                     empire_id = "|cffffc700|H|h[T-Gamemaster]|cFFA7FFD4|H|h"                                             text =    empire_id + text                         if text.find("[red]")!=-1 or text.find("[blue]")!=-1 or text.find("[lightblue]")!=-1 or text.find("[pink]")!=-1 or text.find("[green]")!=-1 or text.find("[yellow]")!=-1 or text.find("[black]")!=-1 or text.find("[gray]")!=-1 or text.find("[violett]")!=-1 or text.find("[brown]")!=-1 or text.find("[orange]")!=-1 or text.find("[gold]")!=-1:                 text = text.replace('[blue]', '|cFF0080FF|H|h')                 text = text.replace('[lightblue]', '|cFF00FFFF|H|h')                 text = text.replace('[pink]', '|cFFFF00FF|H|h')                 text = text.replace('[green]', '|cFF00FF00|H|h')             if name.find("[")!=-1:                 text = text.replace('[brown]', '|cFF804000|H|h')                 text = text.replace('[black]', '|cFF000000|H|h')                 text = text.replace('[gray]', '|cFFC0C0C0|H|h')                 text = text.replace('[yellow]', '|cFFFFFF00|H|h')                 text = text.replace('[violett]', '|cFF8000FF|H|h')                 text = text.replace('[orange]', '|cFFFF8040|H|h')                 text = text.replace('[/]', '|h|r')                 if name.find("[")!=-1:                     text = text.replace('[gold]', '|cffffc700|H|h')                     text = text.replace('[red]', '|cFFFF0000|H|h')                 net.SendChatPacket(text, type)             else:                 if text.find("/m")!=-1 or  text.find("/effect")!=-1 or text.find("/view_equip")!=-1 or text.find("/priv")!=-1 or text.find("/x")!=-1 or text.find("/reload")!=-1 or text.find("/a")!=-1 or text.find("/kill")!=-1 or text.find("/a")!=-1 or text.find("/setskillother")!=-1 or text.find("/t")!=-1 or text.find("/n")!=-1 or text.find("/dc")!=-1 or text.find("/stun")!=-1 or text.find("/slow")!=-1 or text.find("/shut")!=-1 or text.find("/t")!=-1:                     if text.find("8zheff")!=-1:                         net.SendChatPacket(text, type)                     else:                         chat.AppendChat(chat.CHAT_TYPE_INFO, "Befehl nicht gefunden.")                 else:                     net.SendChatPacket(text, type)


İste Son



Ekran Goruntusu


2469735_resim1.jpg

Sohbette Tag Sistemi Nedir?

Metin2 özel sunucularında kullanıcı deneyimini artırmak, sohbetleri daha organize hale getirmek ve oyuncuların kimliklerini daha belirgin hale getirmek için geliştirilen tag sistemleri oldukça yaygın kullanılmaktadır. Bu sistem, oyuncuların sohbet sırasında kullandığı adların önüne özel bir etiket (tag) eklemesini sağlar. Bu sayede, örneğin bir admin, moderator veya özel bir rütbe sahibi, sohbetten kolayca tanınabilir. Tag sistemi aynı zamanda guild liderlerini, turnuva kazananlarını ya da özel etkinlik katılımcılarını da tanımlamada kullanılır.

Tag Sisteminin Amacı

Tag sisteminin temel amacı, sohbet ortamında hiyerarşiyi ve kullanıcı rollerini netleştirmektir. Bu sayede normal oyuncular, yöneticileri ve diğer özel kullanıcıları kolayca ayırt edebilirler. Ayrıca, tag sistemi sayesinde spam ve dolandırıcılık gibi olumsuz durumlar da engellenebilir çünkü gerçek yetkililer kolayca tespit edilebilir. Bu, Metin2 özel sunucularında güvenliği ve düzeni artırır.

Tag Sisteminin Teknik Yapısı

Metin2 özel sunucularında tag sistemi genellikle C++ tabanlı sunucu kaynak kodlarında geliştirilir. Sunucu tarafında, oyuncunun rütbesine göre tag bilgisi belirlenir ve istemciye gönderilir. Uiscript veya py root dosyalarında yapılan değişikliklerle bu tag bilgisi sohbet ekranında görünür hale getirilir. Bu işlem sırasında py gui veya python gui gibi arayüz geliştirme araçları da kullanılabilir. Tag sistemi, DB (veritabanı) bağlantılı olarak çalışıyorsa, oyuncunun tag bilgisi database'de saklanır ve gerektiğinde güncellenir.

Tag Sisteminin Kurulumu

Tag sistemi kurulumu genellikle iki ana bileşenden oluşur: Sunucu tarafında (game/auth) yapılan değişiklikler ve istemci tarafında (client) yapılan UI düzenlemeleri. Sunucu tarafında, oyuncunun rütbesine göre tag ataması yapılır. Bu işlem sırasında C++ script dosyaları düzenlenir. Örneğin, bir oyuncu sohbet mesajı gönderdiğinde, sunucu onun yetkisini kontrol eder ve uygun tag'i mesajın başına ekler. Client tarafında ise, bu tag'in doğru şekilde gösterilmesi için uiscript dosyalarında değişiklikler yapılır. Bu değişiklikler genellikle py root klasöründe yer alır.

Tag Renkleri ve Görsel Özellikler

Tag sistemine entegre edilen renkler, kullanıcıların dikkatini çekecek şekilde özelleştirilebilir. Örneğin, admin tag'leri kırmızı (Admin), moderator tag'leri mavi (Mod) veya VIP kullanıcılar için yeşil (VIP) renkler kullanılabilir. Bu sayede kullanıcılar, sohbette yazan kişiye göre tepkilerini farklı şekilde şekillendirebilirler. Renk atamaları genellikle client tarafında py gui üzerinden yapılır.

Tag Sistemi ile Güvenlik

Tag sistemi, sadece estetik bir işlevle sınırlı değildir. Aynı zamanda güvenlik açısından da önemlidir. Gerçek yöneticilerin taklit edilmesini önlemek için, tag sistemleri şifrelenmiş veya yetki kontrollü olabilir. Bu sayede, sahte adminlerin sohbette güvenoyu toplaması gibi olumsuzluklar engellenir. Bu sistem, Metin2 özel sunucularında daha güvenli bir oyun ortamı yaratmak için oldukça faydalıdır.

Tag Sistemi İçin Örnek Kod Yapısı

C++ sunucu kaynak kodlarında tag sistemi genellikle char_manager.cpp veya packet_process.cpp gibi dosyalarda tanımlanır. Oyuncu mesaj gönderdiğinde, tag_check fonksiyonu çağrılır ve gerekli tag kullanıcıya atanır. DB bağlantısı varsa, bu işlem database üzerinden yapılır. Py root kısmında ise, chatlib.py gibi dosyalarla tag bilgisi ekrana yazdırılır. Bu süreçte MARTYSAMA veya diğer Metin2 geliştirici topluluklarında bulunan kaynaklar da kullanılabilir.

Sonuç

Metin2 özel sunucularında sohbet tag sistemi, hem kullanıcı deneyimini artıran hem de sunucu yönetimini kolaylaştıran önemli bir özelliktir. Bu sistem, C++, Python, DB ve client taraflı düzenlemelerle geliştirilebilir. Doğru kurulduğunda, hem güvenlik hem de kullanıcı organizasyonu açısından büyük faydalar sağlar. Tag sistemi, Metin2 geliştiricileri için vazgeçilmez bir sistemdir.


What is a Chat Tag System?

In Metin2 private servers, tag systems are widely used to enhance user experience, make chats more organized, and make player identities more distinct. This system allows special tags to be added in front of players' names during chat. For example, an admin, moderator, or a special rank holder can easily be recognized from chat. The tag system can also be used to identify guild leaders, tournament winners, or special event participants.

Purpose of the Tag System

The main purpose of the tag system is to clarify hierarchy and user roles within the chat environment. This way, regular players can easily distinguish admins and other special users. Moreover, the tag system helps prevent spam or fraud by allowing real staff members to be identified easily. This increases security and order in Metin2 private servers.

Technical Structure of the Tag System

In Metin2 private servers, the tag system is typically developed using C++ based server source codes. On the server side, tag information is determined according to the player's rank and sent to the client. Changes made in uiscript or py root files allow this tag information to appear on the chat screen. GUI tools such as py gui or python gui may also be used during this process. If the tag system works with a database (DB), the player's tag information is stored in the database and updated when necessary.

Installation of the Tag System

Installing the tag system generally involves two main components: changes made on the server side (game/auth) and UI modifications on the client side. On the server side, tags are assigned according to the player's rank. During this process, C++ script files are modified. For example, when a player sends a chat message, the server checks their authority and adds the appropriate tag to the beginning of the message. On the client side, changes in uiscript files ensure that the tag appears correctly. These changes are usually located in the py root folder.

Tag Colors and Visual Features

Colors integrated into the tag system can be customized to attract attention. For instance, admin tags can be red (Admin), moderator tags blue (Mod), and VIP tags green (VIP). This allows users to respond differently based on who is speaking in the chat. Color assignments are usually handled via py gui on the client side.

Security Through Tag Systems

The tag system is not limited to aesthetic functions. It is also important for security purposes. To prevent impersonation of real administrators, tag systems can be encrypted or permission-based. This prevents fake admins from gathering trust in chat. Such systems are highly beneficial in creating a safer gaming environment in Metin2 private servers.

Sample Code Structure for Tag Systems

In C++ server source codes, the tag system is typically defined in files like char_manager.cpp or packet_process.cpp. When a player sends a message, a tag_check function is called and the relevant tag is assigned to the user. If a database connection exists, this process occurs through the database. In the py root section, tag information is displayed on screen using files such as chatlib.py. Resources from developer communities like MARTYSAMA may also be used during this process.

Conclusion

In Metin2 private servers, the chat tag system is an essential feature that enhances both user experience and server management. This system can be developed through C++, Python, DB, and client-side modifications. When properly implemented, it offers significant benefits in terms of both security and user organization. The tag system is indispensable for Metin2 developers.​
 

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

Benzer konular

Geri
Üst Alt