Paylaşım tarihi : 2025-05-15
Görüntüleme : 486
Genel Bakış
Metin2 sunucularında oyuncular arası etkileşimi artırmak ve iletişimi kolaylaştırmak amacıyla geliştirilen "PM At Eklentisi + Oto Bağırma Uyarılı" sistemi, otomatik bağırma mesajlarına özel bir [PM AT] butonu ekleyerek, kullanıcıların doğrudan özel mesaj göndermesini sağlar.
Özellikler
importların altına ekle
BagirmaPm = ""arat :
net.SendChatPacket(str(constInfo.auto_shout_text),chat.CHAT_TYPE_SHOUT)
değiştir :
net.SendChatPacket(constInfo.BagirmaPm + '|cff00ff00|Hchattanpmyolla:' + str(player.GetName()) + '|h - |h|r' +'|cff00ff00|Hchattanpmyolla:' + str(player.GetName()) + '|h[PM AT]|h|r' + " : " + str(constInfo.auto_shout_text), chat.CHAT_TYPE_SHOUT)arat :
if (CHAT_TYPE_SHOUT == pinfo->type)
{
LogManager::instance().ShoutLog(g_bChannel, ch->GetEmpire(), chatbuf);
}
değiştir :
if (CHAT_TYPE_SHOUT == pinfo->type)
{
len = snprintf(chatbuf, sizeof(chatbuf), "|cFF98FF33|h[Lv %d] |Hchattanpmyolla:%s|h%s|h|r : %s", ch->GetLevel(), ch->GetName(), ch->GetName(), buf);
}
else
{
len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s", ch->GetName(), buf);
}bu kodun altına :
def MakeHyperlinkTooltip(self, hyperlink):
tokens = hyperlink.split(":")
if tokens and len(tokens):
type = tokens[0]
if "item" == type:
self.hyperlinkItemTooltip.SetHyperlinkItem(tokens)
bunu ekle :
elif "chattanpmyolla" == type:
self.OpenWhisperDialog(str(tokens[1]))arat : def __SendChatPacket
değiştir :
def __SendChatPacket(self, text, type):
if net.IsChatInsultIn(text):
chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.CHAT_INSULT_STRING)
else:
if type == chat.CHAT_TYPE_SHOUT and not text.startswith("!"):
net.SendChatPacket(constInfo.BagirmaPm + '|cff00ff00|Hchattanpmyolla:' + str(player.GetName()) + '|h - |h|r' +'|cff00ff00|Hchattanpmyolla:' + str(player.GetName()) + '|h[PM AT]|h|r' + " : " + text, chat.CHAT_TYPE_SHOUT)
elif text.startswith("!"):
net.SendChatPacket(constInfo.BagirmaPm + '|cff00ff00|Hchattanpmyolla:' + str(player.GetName()) + '|h - |h|r' +'|cff00ff00|Hchattanpmyolla:' + str(player.GetName()) + '|h[PM AT]|h|r' + " : " + text[1:], chat.CHAT_TYPE_SHOUT)
else:
net.SendChatPacket(text, type)![[Resim: 241202_ee4a32ebce8aaba55402cc8f942814c4.png]](https://dosya.turkmmo.com/2025/05/241202_ee4a32ebce8aaba55402cc8f942814c4.png)
![[Resim: 241204_59ffbd7d735a81f208e69393b768f361.png]](https://dosya.turkmmo.com/2025/05/241204_59ffbd7d735a81f208e69393b768f361.png)