Chat

12/29/2014 15:18 The2MrMetin2#1
Nach dem ich dieses Quick Privatchat eingefügt
wird alles was ich schreibe 2x gepostet im IG Chat
Screen :

[Only registered and activated users can see links. Click Here To Register...]


uichat.py

syserr:
12/29/2014 15:30 DasSchwarzeT#2
Liegt wohl daran, dass du
else:
net.SendChatPacket(text, type)
2mal drin hast. Wenn du zwei Sachen einbaust musst du die schon aufeinander abstimmen.
12/29/2014 15:31 Tuora#3
Lade uns mal deine unbearbeitete uichat.py hoch
12/29/2014 15:37 The2MrMetin2#4
12/29/2014 16:42 DasSchwarzeT#5
Code:
    def __SendChatPacket(self, text, type): 
#        if text[0] == '/': 
#            if ENABLE_CHAT_COMMAND or constInfo.CONSOLE_ENABLE: 
#                pass 
#            else: 
#                return
		
		
		if text.find("@") == 0:
			user,msg = text[1:].split(" ", 1)
			if len(msg) > 0:
				net.SendWhisperPacket(user, msg)
				chat.AppendChat(chat.CHAT_TYPE_INFO, "Du hast dem User %s eine private Nachricht geschickt" % user)
			else:
				chat.AppendChat(chat.CHAT_TYPE_INFO, "Bitte gib eine Nachricht an.")
        elif text == "(buff1)": 
            return 
        elif text == "(buff2)": 
            return 
        elif text == "(buff3)": 
            return 
        elif text == "(pot1)": 
            return 
        elif text == "(pot2)": 
            return 
        elif text == "(buff4)": 
            return 
        elif text == "(buff5)": 
            return 
        elif text == "(buff6)": 
            return     
        elif net.IsChatInsultIn(text): 
            chat.AppendChat(chat.CHAT_TYPE_INFO, locale.CHAT_INSULT_STRING) 
        else: 
            name = player.GetName() 
            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("[SA]")!=-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.") 
                     
                    #chat.AppendChat(chat.CHAT_TYPE_INFO, "Befehl nicht gefunden.") 
                else:  
                    net.SendChatPacket(text, type)
Einfach die gesamte Funktion ersetzen.
12/29/2014 17:16 The2MrMetin2#6
so ?
12/29/2014 17:29 DasSchwarzeT#7
d def __SendChatPacket(self, text, type):

da ist dir ein kleiner Fehler unterlaufen ;)
def __SendChatPacket(self, text, type):
ist richtig
12/29/2014 17:53 The2MrMetin2#8
Werde nach char auswahl jetzt gekickt

syserr
1229 17:54:15946 ::
networkModule.py(line:194) SetSelectCharacterPhase
system.py(line:130) __pack_import
system.py(line:110) _process_result
introSelect.py(line:28) ?
system.py(line:130) __pack_import
system.py(line:110) _process_result
interfaceModule.py(line:15) ?
system.py(line:130) __pack_import

networkModule.SetSelectCharacterPhase - exceptions.IndentationError:unindent does not match any outer indentation level (line 854)

1229 17:54:15947 :: ================================================== ================================================== ========
1229 17:54:15947 :: Abort!!!!
12/29/2014 18:01 Poccix#9
Schick Skype Addy privat..
12/29/2014 18:05 DasSchwarzeT#10
Quote:
Originally Posted by The2MrMetin2 View Post
Werde nach char auswahl jetzt gekickt

syserr
1229 17:54:15946 ::
networkModule.py(line:194) SetSelectCharacterPhase
system.py(line:130) __pack_import
system.py(line:110) _process_result
introSelect.py(line:28) ?
system.py(line:130) __pack_import
system.py(line:110) _process_result
interfaceModule.py(line:15) ?
system.py(line:130) __pack_import

networkModule.SetSelectCharacterPhase - exceptions.IndentationError:unindent does not match any outer indentation level (line 854)

1229 17:54:15947 :: ================================================== ================================================== ========
1229 17:54:15947 :: Abort!!!!
Versuchs mal hiermit
12/29/2014 18:34 The2MrMetin2#11
geht auch nicht

sysser
1229 18:34:14693 ::
networkModule.py(line:194) SetSelectCharacterPhase
system.py(line:130) __pack_import
system.py(line:110) _process_result
introSelect.py(line:28) ?
system.py(line:130) __pack_import
system.py(line:110) _process_result
interfaceModule.py(line:15) ?
system.py(line:130) __pack_import

networkModule.SetSelectCharacterPhase - exceptions.SyntaxError:invalid syntax (line 1)

1229 18:34:14693 :: ================================================== ================================================== ========
1229 18:34:14693 :: Abort!!!!
12/29/2014 18:54 DasSchwarzeT#12
Jo hab versehentlich keine TABs sondern Leerzeichen rauskopiert.