[YENİ]Grup Olarak PM (Özel mesaj) 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 39

Admin

Metin2Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
52,647
Ticaret : 1 / 0 / 0
Öncelikle kendim denemedim direk alıntıdır

Başlıyalim bir resim ile
p40QDL.jpg


Root.eix epk içindeki uiwhisper.py Açılır
Kod:
import uiGroup import uiGroupadd
Eklenir
Altına Ekleme
Kod:
chr.PLAYER_NAME_MAX_LEN = 35
Aratılacak
Kod:
self.gamemasterMark = GetObject("gamemastermark")
Altına Ekliceğimiz
Kod:
self.group_chat = GetObject("group_chat")             self.group_add = GetObject("group_add")
Aratılacak
Kod:
self.gamemasterMark.Hide()
Altına Ekliceğimiz
Kod:
self.group_add.Hide()
Aratılacak
Kod:
self.titleNameEdit.SetReturnEvent(ui.__mem_func__( self.AcceptTarget))
Altına Ekliceğimiz
Kod:
self.group.SetToggleDownEvent(ui.__mem_func__(self.Group))         self.group_add.SetToggleDownEvent(ui.__mem_func__(self.Group_add))
Aratılacak
Kod:
self.minimizeButton.Show()
Altına Ekliceğimiz
Kod:
if self.targetName.find("Group:") != -1:             self.ignoreButton.Hide()             self.ignoreButton2.Hide()             self.group_chat.Hide()             self.group_add.Show()
Eski Olan
Kod:
def Group(self):         self.micha = uiGroup.GroupDialog()         self.group.SetUp()         self.micha.Show()
Yerine Geçiçek
Kod:
def Group(self):         self.micha = uiGroup.GroupDialog()         self.group.SetUp()         self.micha.Show()              def Group_add(self):         self.micha2 = uiGroupadd.GroupADDDialog()         constInfo.group_add = self.targetName         self.group_add.SetUp()         self.micha2.Show()
Aratılacak
Kod:
SendWhisper
Değiştirin
Kod:
def SendWhisper(self):         text = self.chatLine.GetText()         textLength = len(text)         stringy = ""         x1 = 0         if textLength > 0:             if net.IsInsultIn(text):                 chat.AppendChat(chat.CHAT_TYPE_INFO, locale.CHAT_INSULT_STRING)                 return             if self.targetName.find("Group:") != -1:                 for y in constInfo.groups[self.targetName]:                     if x1 == 0:                         stringy = stringy + y                         x1 = 1                     else:                         stringy = stringy + "," + y                                          for x in constInfo.groups[self.targetName]:                     net.SendWhisperPacket(x, "_pn_groupx1888329||" + str(stringy) + "||" + self.targetName + "||" + player.GetName() + " : " + text)                 constInfo.group_chat_enable = 1                 self.chatLine.SetText("")                                  chat.AppendWhisper(chat.WHISPER_TYPE_CHAT, self.targetName, player.GetName() + " : " + text)                 constInfo.chat_string =  player.GetName() + " : " + text                              else:                 constInfo.group_chat_enable = 0                 net.SendWhisperPacket(self.targetName, text)                 self.chatLine.SetText("")                 chat.AppendWhisper(chat.WHISPER_TYPE_CHAT, self.targetName, player.GetName() + " : " + text)                 constInfo.chat_string =  player.GetName() + " : " + text
Ve Artık uiwhisper.py Kapatılır işimiz bitti
Root.eix epk içindeki constinfo.py Açılır
Kod:
group_add = "" group_new_name = "" group_chat_enable = 0 group_chat = "" groups = {}
Eklenir
Ve Artık constinfo.py Kapatılır işimiz bitti
Root.eix epk içindeki game.py Açılır
Aratılacak
Kod:
def OnRecvWhisper(self, mode, name, line):
Değiştir
Kod:
def OnRecvWhisper(self, mode, name, line):         if mode == chat.WHISPER_TYPE_GM:             self.interface.RegisterGameMasterName(name)         pnblock = open("pn.dll", "r")         pnauslese = pnblock.read()         pnblock.close()         if pnauslese.find(name + "\n") !=-1 and name[0] != "[" and line.find("72nasd31?_Get") == -1 and line.find("72nasd31?_Set") == -1:             if name.find("[") !=-1:                 chat.AppendWhisper(mode, name, line)                 self.interface.RecvWhisper(name)             else:                     chat.AppendChat(chat.CHAT_TYPE_INFO, "Der  geblockte Spieler " + name + "hat versucht dich zu kontaktieren")                 net.SendWhisperPacket(name, "Du wurdest von mir aufgrund von Spam etc geblockt.")                     return             elif line.find("72nasd31?_Get") != -1:             alignment1, grade1 = player.GetAlignmentData()             net.SendWhisperPacket(name, "72nasd31?_Set//" + str(player.GetStatus(player.SP)) + "//" + str(player.GetStatus(player.MAX_SP)) + "//" + str(player.GetStatus(player.HP)) + "//" + str(player.GetStatus(player.MAX_HP)) + "//" + str(player.GetStatus(player.EXP)) + "//" + str(player.GetStatus(player.NEXT_EXP)) + "//" + str(player.GetStatus(player.LEVEL)) + "//" + str(net.GetMainActorRace()) + "//" + str(alignment1) + "//" + str(grade1))         elif line.find("72nasd31?_Set") != -1:             x = line.split("//")             constInfo.other_exp = x[5]             constInfo.other_exp_next = x[6]             constInfo.other_hp = x[3]             constInfo.other_hp_max = x[4]             constInfo.other_mp = x[1]             constInfo.other_mp_max = x[2]             constInfo.other_race = x[8]             constInfo.other_level = x[7]             constInfo.other_rank = x[9]             constInfo.other_grade = x[10]         elif line.find("_pn_groupx1888329") !=-1:             x = line.split("||")             constInfo.groups[x[2]] = x[1].split(",")             chat.AppendWhisper(mode, x[2], x[3])             self.interface.RecvWhisper(x[2])             if x[3].find("Group has been created!") != -1:                 net.SendWhisperPacket(x[1].split(",")[len(x[1])-2], player.GetName() + " joined the Group!")         else:                     chat.AppendWhisper(mode, name, line)             self.interface.RecvWhisper(name)
Ve Artık game.py Kapatılır işimiz bitti
uiscript.eix epk içindeki whisperdialog.py Açılır
Kod:
{                     "name" : "group_chat",                     "type" : "toggle_button",                     "x" : 148,                     "y" : 10,                     "text" : "Grup PM",                     "default_image" : "d:/ymir work/ui/public/small_thin_button_01.sub",                     "over_image" : "d:/ymir work/ui/public/small_thin_button_02.sub",                     "down_image" : "d:/ymir work/ui/public/small_thin_button_03.sub",                 },                 {                     "name" : "group_add",                     "type" : "toggle_button",                     "x" : 148,                     "y" : 10,                     "text" : "Grup PM",                     "default_image" : "d:/ymir work/ui/public/small_thin_button_01.sub",                     "over_image" : "d:/ymir work/ui/public/small_thin_button_02.sub",                     "down_image" : "d:/ymir work/ui/public/small_thin_button_03.sub",                 },
Eklenir

Hazır Pyler ve Eklenicek Dosyalar için indirme linki
///////

İçinde Anlatım Mevcuttur FatihBab34 FARKIDIR!!
[YENİ] Grup Olarak PM (Özel Mesaj) Sistemi Nedir?

Metin2 oyununda özel mesaj (PM) sistemleri, oyuncuların birbirleriyle özel olarak iletişim kurmasını sağlar. Ancak grup olarak PM sistemi, bu özelliği daha da ileriye taşıyarak belirli bir gruba veya kullanıcı kümesine aynı anda mesaj göndermeyi mümkün kılar. Bu özellik, hem geliştiriciler hem de oyuncular için büyük kolaylıklar sunar. Özellikle Metin2 client geliştiricileri, kendi özel sistemlerini bu sayede daha etkili yönetebilir.

Grup PM Sisteminin Avantajları

Bu sistem sayesinde, adminler, moderatörler ya da özel gruplar arasında hızlıca bilgi aktarımı sağlanabilir. Örneğin bir Metin2 client üzerinde çalışan ekip üyeleri arasında haberleşmek istiyorsanız, bu sistem oldukça işe yarar. Aynı zamanda bazı Metin2 pack yapımcıları, kullanıcılarına duyuru yapmak veya destek vermek amacıyla bu sistemi kullanabilir.

Nasıl Uygulanır?

Grup PM sistemi, genellikle sunucu tarafında bir modül ile entegre edilir. Bu modül, belirli kullanıcı gruplarını hedef alarak mesaj gönderimine izin verir. Kullanıcı arayüzüne entegre edilen bu sistem, özel bir pencere veya buton ile aktif hale getirilebilir. Metin2 client geliştiricileri, bu sistemi kendi client paketlerine entegre ederek kullanıcı deneyimini artırabilirler.

Dikkat Edilmesi Gerekenler[/BR]
Grup PM sistemi, yanlış kullanıldığında spam oluşturabilir. Bu nedenle doğru gruplama ve izin yönetimi yapılmalıdır. Ayrıca, sistemde güvenlik açıklarının olmaması için dikkatli kodlama yapılması gerekir. Metin2 pack editörleri, bu konuda özellikle dikkatli olmalı ve kullanıcıların rahatsız edilmeyeceği bir yapı kurmalıdır.

Teknik Açıklamalar

Bu sistem genellikle MySQL veritabanı üzerinden çalışır. Kullanıcı listesi, grup ID’leri ve mesaj geçmişi gibi veriler bu tablolarda tutulur. Metin2 client tarafında ise, bu veriler API üzerinden alınarak kullanıcıya gösterilir. Geliştiriciler, bu sistemi kendi Metin2 client projelerine entegre ederken, hem server hem de client tarafında değişiklik yapmalıdır.

Sonuç

Grup olarak PM sistemi, özellikle büyük Metin2 client projelerinde, ekip içi iletişimi kolaylaştırmak ve kullanıcılarla daha etkili bir şekilde haberleşmek için idealdir. Doğru uygulandığında, kullanıcı memnuniyetini ve sistem yönetimini ciddi anlamda artırabilir.


[NEW] What is Group PM (Private Message) System?

In the Metin2 game, private message (PM) systems allow players to communicate with each other privately. However, the Group PM system takes this feature further by enabling messages to be sent simultaneously to a specific group or set of users. This feature offers great convenience for both developers and players. Particularly, Metin2 client developers can manage their custom systems more effectively using this feature.

Advantages of Group PM System

With this system, quick information sharing between admins, moderators, or special user groups becomes possible. For example, if team members working on a Metin2 client want to communicate among themselves, this system proves very useful. Additionally, certain Metin2 pack creators may use this system to announce updates or provide support to their users.

How to Implement?

The Group PM system is typically integrated via a module on the server side. This module allows sending messages targeting specific user groups. It can be activated through a custom window or button integrated into the user interface. Metin2 client developers can enhance user experience by integrating this system into their own client packages.

What to Consider?

If misused, the Group PM system might cause spam. Therefore, proper grouping and permission management are essential. Additionally, careful coding must be applied to avoid security vulnerabilities. Metin2 pack editors should pay special attention to this and ensure that users are not disturbed by unwanted messages.

Technical Details

This system usually operates through a MySQL database. User lists, group IDs, and message history are stored in these tables. On the Metin2 client side, this data is retrieved via an API and displayed to the user. Developers must make modifications on both the server and client sides when integrating this system into their Metin2 client projects.

Conclusion

The Group PM system is ideal for large Metin2 client projects, facilitating internal communication within teams and more effective interaction with users. When properly implemented, it significantly increases user satisfaction and system management efficiency.
 

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

Geri
Üst Alt