Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 00:28

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Reichchat uichat.py FAIL?

Discussion on Reichchat uichat.py FAIL? within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1


 
elite*gold: 1860
Join Date: Jan 2012
Posts: 2,209
Received Thanks: 1,630
Reichchat uichat.py FAIL?

Nabend,

ich habe den Reichchat mit einer dif gepatcht und wollte nun in der uichat.py bei jedem shout das Reich zu dem Spieler anzeigen. lassen.
Z.B [Blau]Testspieler: Hallo

Ich habe folgendes eingefügt:
PHP Code:
    def __SendChatPacket(selftexttype):
        if 
text == "(buff1)":
            return
        
elif text == "(buff2)":
            return
        
elif text == "(buff3)":
            return
        
elif text == "(buff4)":
            return
        
elif text == "(buff5)":
            return
        
elif text == "(buff6)":
            return
        
elif net.IsChatInsultIn(text):
            
chat.AppendChat(chat.CHAT_TYPE_INFOlocale.CHAT_INSULT_STRING)
        else:
            if 
type == chat.CHAT_TYPE_SHOUT:
                
name player.GetName()
                
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
            net
.SendChatPacket(texttype
Wenn ich jetzt aber im Spiel bin und etwas im Shout schreiben will, schließt sich das Chatfenster einfach. Es passiert sonst nix weiter. Weiß einer vielleicht, woran der Fehler liegt?
MaxChri is offline  
Thanks
1 User
Old 06/18/2015, 07:34   #2
 
Poccix's Avatar
 
elite*gold: 44
Join Date: Dec 2009
Posts: 1,696
Received Thanks: 3,833
Syserr.txt Inhalt bitte.
Poccix is offline  
Thanks
1 User
Old 06/18/2015, 09:52   #3

 
elite*gold: 83
Join Date: Nov 2013
Posts: 2,891
Received Thanks: 2,764
Kommt nicht erst der type und dann der Text?

Code:
net.SendChatPacket(type, text)
rollback is offline  
Thanks
2 Users
Old 06/18/2015, 17:07   #4


 
elite*gold: 1860
Join Date: Jan 2012
Posts: 2,209
Received Thanks: 1,630
Achso sorry, hier ist die syserr.txt

PHP Code:
0618 17:06:11629 :: GRANNYr:/granny/rt/granny_file_info.cpp(145): File has run-time type tag of 0x8000000fwhich doesn't match this version of Granny (0x80000010).  Automatic conversion will be attempted.
0618 17:06:14091 :: CreateFromMemoryFile: Cannot create texture
0618 17:06:20165 :: Traceback (most recent call last):

0618 17:06:20165 ::   File "uiChat.py", line 376, in OnIMEReturn

0618 17:06:20165 ::   File "uiChat.py", line 278, in __SendTalkingChatPacket

0618 17:06:20166 ::   File "uiChat.py", line 240, in __SendChatPacket

0618 17:06:20166 :: UnboundLocalError
0618 17:06:20166 :: : 
0618 17:06:20166 :: local variable '
empire_id' referenced before assignment
0618 17:06:20166 :: 

0618 17:06:20166 :: Traceback (most recent call last):

0618 17:06:20166 ::   File "uiChat.py", line 376, in OnIMEReturn

0618 17:06:20166 ::   File "uiChat.py", line 278, in __SendTalkingChatPacket

0618 17:06:20166 ::   File "uiChat.py", line 240, in __SendChatPacket

0618 17:06:20166 :: UnboundLocalError
0618 17:06:20166 :: : 
0618 17:06:20166 :: local variable '
empire_id' referenced before assignment
0618 17:06:20166 :: 
Quote:
Originally Posted by It's me, 1093 View Post
Kommt nicht erst der type und dann der Text?

Code:
net.SendChatPacket(type, text)
Hab ich versucht, dann kam aber eine meterlange syserr
MaxChri is offline  
Old 06/18/2015, 17:57   #5
 
Poccix's Avatar
 
elite*gold: 44
Join Date: Dec 2009
Posts: 1,696
Received Thanks: 3,833
Code:
def __SendChatPacket(self, text, type):
	if text == "(buff1)":
		return
	elif text == "(buff2)":
		return
	elif text == "(buff3)":
		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:
		if type == chat.CHAT_TYPE_SHOUT:
			name = player.GetName()
			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

		net.SendChatPacket(text, type)
Poccix is offline  
Thanks
1 User
Old 06/18/2015, 18:05   #6
wild wild son




 
Nick's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 5,996
Received Thanks: 3,391
Quote:
Originally Posted by It's me, 1093 View Post
Kommt nicht erst der type und dann der Text?

Code:
net.SendChatPacket(type, text)
Nein, nicht mit chat.AppendChat() verwechseln.

Versuch es bestenfalls , sollte funktionieren, auch der Code fällt besser aus.

lg
Nick is offline  
Thanks
1 User
Old 06/18/2015, 18:21   #7


 
elite*gold: 1860
Join Date: Jan 2012
Posts: 2,209
Received Thanks: 1,630
Quote:
Originally Posted by .JayZoN View Post
Nein, nicht mit chat.AppendChat() verwechseln.

Versuch es bestenfalls , sollte funktionieren, auch der Code fällt besser aus.

lg
Danke habe ich eingebaut, aber die Chatbox schließt sich jetzt trotzdem noch, wenn ich in den Rufchat schreibe. Normal schreiben geht aber im Vergleich zum alten Skript.

Quote:
Originally Posted by Poccix View Post
Code:
def __SendChatPacket(self, text, type):
	if text == "(buff1)":
		return
	elif text == "(buff2)":
		return
	elif text == "(buff3)":
		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:
		if type == chat.CHAT_TYPE_SHOUT:
			name = player.GetName()
			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

		net.SendChatPacket(text, type)
Da kommt jetzt im Chat: Glas der Einsicht benötigt O.o Obwohl ich eine dif habe, womit man das eigentlich nicht benötigt
MaxChri is offline  
Old 06/18/2015, 18:26   #8
 
Poccix's Avatar
 
elite*gold: 44
Join Date: Dec 2009
Posts: 1,696
Received Thanks: 3,833
Oben "import player" bei den anderen Import's
Poccix is offline  
Thanks
1 User
Old 06/18/2015, 18:32   #9


 
elite*gold: 1860
Join Date: Jan 2012
Posts: 2,209
Received Thanks: 1,630
Quote:
Originally Posted by Poccix View Post
Oben "import player" bei den anderen Import's
Ja ist mir auch eben aufgefallen xD Aber da kommt jetzt dann im Shout: "Glas der Einsicht wird benötigt" Gibt es dafür auch einen Fix? Normal kann man ohne Glas der Einsicht Items auswählen.
MaxChri is offline  
Old 06/18/2015, 18:47   #10
wild wild son




 
Nick's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 5,996
Received Thanks: 3,391
Quote:
Originally Posted by MaxChri View Post
Ja ist mir auch eben aufgefallen xD Aber da kommt jetzt dann im Shout: "Glas der Einsicht wird benötigt" Gibt es dafür auch einen Fix? Normal kann man ohne Glas der Einsicht Items auswählen.
Den Import darfst du natürlich nicht vergessen, das ist klar, hat DasKuchen auch im Startpost erwähnt. Welche Gamefile ist aktuell in Verwendung?

lg
Nick is offline  
Thanks
1 User
Old 06/18/2015, 18:53   #11


 
elite*gold: 1860
Join Date: Jan 2012
Posts: 2,209
Received Thanks: 1,630
Quote:
Originally Posted by .JayZoN View Post
Den Import darfst du natürlich nicht vergessen, das ist klar, hat DasKuchen auch im Startpost erwähnt. Welche Gamefile ist aktuell in Verwendung?

lg
Ja genau Benutze die 20k files von invoice unbugged by gr33n.
MaxChri is offline  
Old 06/18/2015, 18:57   #12
wild wild son




 
Nick's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 5,996
Received Thanks: 3,391
Quote:
Originally Posted by MaxChri View Post
Ja genau Benutze die 20k files von invoice unbugged by gr33n.
2089M != 20k. Umso besser, die zweite DIF dürfte den gewünschten Effekt erzeugen.

lg
Nick is offline  
Thanks
1 User
Old 06/18/2015, 19:07   #13


 
elite*gold: 1860
Join Date: Jan 2012
Posts: 2,209
Received Thanks: 1,630
Quote:
Originally Posted by .JayZoN View Post
2089M != 20k. Umso besser, die zweite DIF dürfte den gewünschten Effekt erzeugen.

lg
Okay dann weiß ich Bescheid. Jeeeetzt weiß ich, was der mit dieser zweiten dif meint xD Die erste hatte ich schon für den Reichchat benutzt. Nun funktioniert es, Vielen Dank an euch allen.
MaxChri is offline  
Old 06/21/2015, 15:49   #14
 
elite*gold: 6442
Join Date: Jun 2015
Posts: 366
Received Thanks: 70
Am besten nimmst du die Uichat ausm Atimera client wenn du noch nicht so viel ahnung von Python hast Lg. und hoffe hat geklappt
Yunora is offline  
Thanks
1 User
Old 06/21/2015, 19:12   #15


 
elite*gold: 1860
Join Date: Jan 2012
Posts: 2,209
Received Thanks: 1,630
Quote:
Originally Posted by Yunora View Post
Am besten nimmst du die Uichat ausm Atimera client wenn du noch nicht so viel ahnung von Python hast Lg. und hoffe hat geklappt
Ja hat teilweise geklappt. Das Reich wird erst hinter dem Namen angezeigt
Ich habe testweise den Clienten von Abizu2 genommen, wo ebenfalls der Reichchat drin war, aber da ist der Aufbau genau so und bei den wurde es richtig angezeigt
MaxChri is offline  
Reply


Similar Threads Similar Threads
Frage: uichat.py
05/01/2015 - Metin2 Private Server - 14 Replies
Hallo, Ich wollte gerne etwas einfügen und jedes mal gibt es ein Fehler. elif net.IsChatInsultIn(text): chat.AppendChat(chat.CHAT_TYPE_INFO, locale.CHAT_INSULT_STRING) else: if type == chat.CHAT_TYPE_SHOUT: name = player.GetName() empire_id = str(net.GetEmpireID())
[Suche]Reichchat ( uichat.py )
04/26/2015 - Metin2 Private Server - 7 Replies
Morgen, Bin auf der Suche nach dieser Uichat.py http://i.imgur.com/AO66voB.png Bin ettliche Foren durchgegangen, habe aber nur das Script mit den Farben beim Chat schreiben gefunden. Benutze 2089M Gamefiles + 2011 Client. Könnt mir da jemand helfen.?
problem mit uichat
06/05/2013 - Metin2 Private Server - 5 Replies
syserr: 0602 23:02:36676 :: Traceback (most recent call last): 0602 23:02:36676 :: File "uiChat.py", line 399, in OnIMEReturn 0602 23:02:36676 :: File "uiChat.py", line 297, in __SendShoutChatPacket 0602 23:02:36676 :: File "uiChat.py", line 242, in __SendChatPacket 0602 23:02:36676 :: UnboundLocalError



All times are GMT +1. The time now is 00:28.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.