Quote:
Originally Posted by Đurek
Kannst du mal den Inhalt deiner uichat.py von
Code:
def __SendChatPacket(self, text, type):
bis zum nächsten def .. posten?
|
da ist inklusive die nächste def:
Code:
def __SendChatPacket(self, text, type):
if text == "(halbmondring)":
chat.AppendChat(chat.CHAT_TYPE_INFO, "Du bist kein VIP!")
return
elif text == "(vip)":
chat.AppendChat(chat.CHAT_TYPE_INFO, "Du bist kein VIP!")
return
else:
net.SendChatPacket(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("[") !=-1:
empire_id = "|cffffc700|H|h[Team]|cFFA7FFD4|H|h"
else:
empire_id = str(net.GetEmpireID())
if empire_id == "1":
empire_id = "|cFFFF0000|H|h[Rot]|cFFA7FFD4|H|h"
elif empire_id == "2":
empire_id = "|cFFFFFF00|H|h[Gelb]|cFFA7FFD4|H|h"
elif empire_id == "3":
empire_id = "|cFF0080FF|H|h[Blau]|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)
def __SendPartyChatPacket(self, text):
if 1 == len(text):
self.RunCloseEvent()
return
self.__SendChatPacket(text[1:], chat.CHAT_TYPE_PARTY)
self.__ResetChat()