You last visited: Today at 20:53
Advertisement
[Release]uichat.py modded [Einfach]
Discussion on [Release]uichat.py modded [Einfach] within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.
03/12/2013, 18:57
#1
elite*gold: 5
Join Date: Oct 2010
Posts: 1,692
Received Thanks: 1,773
[Release]uichat.py modded [Einfach]
Brauche es nicht wirklich villeicht ihr.
Ist eigentlich nichts besonderes nur sehe immer wie Leute 20 if text.find() in ihrer uichat.py haben
Sachen die drinne sind:
Blacklist wenn jemand das Wort schreibt dann passiert nichts.
blacklist = [ einfach die Liste ausfüllen
Reichschat je nach Reich schreibt er Farbig in den Rufchat
Colormode von mir (Hab nicht alle Farben getestet) wenn jemand z.b.
[Red] schreibt schreibt er alles Rot.
Farben sind leicht änderbar
PHP Code:
colors = [ '[Red]' , '[LightGreen]' , '[DarkGreen]' , '[Orange]' , '[Purple]' , '[Pink]' , '[LightBlue]' , '[Blue]' , '[Silver]' , ] farbcodes = { '[Red]' : '|cFFFF0000|H|h' , '[LightGreen]' : "|cFF00FF00|H|h" , '[DarkGreen]' : "|cFF008000|H|h" , '[Orange]' : "|cFFFFA500|H|h" , '[Purple]' : "|cFF800080|H|h" , '[Pink]' : "|cFFC0CB|H|h" , '[LightBlue]' : "|cFF00FFFF|H|h" , '[Blue]' : "|cCFF0042FF|H|h" , '[Silver]' : "|cFFC0C0C0|H|h" , }
Oben Tragt ihr den Code ein z.b. [Red] und unten tragt ihr den Code und den Farbcode ein.
Ersatz die ganze Funktion __SendChatPacket durch:
Code:
def __SendChatPacket(self, text, type):
#START BLACKLIST#
blacklist = ["(buff1)","(buff2)","(buff3)","(buff4)","(buff5)","(buff6)","(prestige1)","(prestige2)","(prestige3)","(prestige4)","(prestige5)","(prestige6)"]
for x in xrange(len(blacklist)):
if text == blacklist[x]:
return
#END BLACKLIST#
#START EMPIRECHAT#
if type == chat.CHAT_TYPE_SHOUT:
name = player.GetName()
empire_id = int(net.GetEmpireID(name))
empire_color = {
1: '|cFFFF0000|H|h',
2: '|cFFFFFF00|H|h',
3: '|cFF0080FF|H|h'
}
text_color = str(empire_color[empire_id]) + text
net.SendChatPacket(text_color, type)
else:
#END EMPIRECHAT#
#START COLORMODE#
colors = [
'[Red]','[LightGreen]','[DarkGreen]','[Orange]','[Purple]','[Pink]','[LightBlue]','[Blue]','[Silver]',
]
farbcodes = {
'[Red]' : '|cFFFF0000|H|h',
'[LightGreen]' : "|cFF00FF00|H|h",
'[DarkGreen]' : "|cFF008000|H|h",
'[Orange]' : "|cFFFFA500|H|h",
'[Purple]' : "|cFF800080|H|h",
'[Pink]' : "|cFFC0CB|H|h",
'[LightBlue]' : "|cFF00FFFF|H|h",
'[Blue]' : "|cCFF0042FF|H|h",
'[Silver]' : "|cFFC0C0C0|H|h",
}
for farben in colors:
if text.find(farben) !=-1:
textwithcolor = text.replace(farben,farbcodes[farben])
net.SendChatPacket(textwithcolor, type)
return
net.SendChatPacket(text, type)
#END COLORMODE#
Put
import player
at the first line
03/12/2013, 19:17
#2
elite*gold: 748
Join Date: Jul 2012
Posts: 1,597
Received Thanks: 1,981
Danke, wird einigen helfen.
03/12/2013, 19:18
#3
elite*gold: 0
Join Date: Feb 2012
Posts: 262
Received Thanks: 200
This is present in ic3 client with more color.
There are only a part:
PHP Code:
def ChangeChatColor ( self ):
text = self . GetText ()
self . __ResetChat ()
name = player . GetName ()
if name . find ( "]" )!=- 1 :
if text . find ( "[blue]" )!=- 1 :
self . ccolor = "LB"
if self . GetChatMode () == chat . CHAT_TYPE_PARTY :
self . SetText ( "#[lightblue]" )
elif self . GetChatMode () == chat . CHAT_TYPE_GUILD :
self . SetText ( "%[lightblue]" )
elif self . GetChatMode () == chat . CHAT_TYPE_SHOUT :
self . SetText ( "![lightblue]" )
elif self . GetChatMode () == chat . CHAT_TYPE_TALKING :
self . SetText ( "[lightblue]" )
elif text . find ( "[lightblue]" )!=- 1 :
self . ccolor = "P"
if self . GetChatMode () == chat . CHAT_TYPE_PARTY :
self . SetText ( "#[pink]" )
elif self . GetChatMode () == chat . CHAT_TYPE_GUILD :
self . SetText ( "%[pink]" )
elif self . GetChatMode () == chat . CHAT_TYPE_SHOUT :
self . SetText ( "![pink]" )
elif self . GetChatMode () == chat . CHAT_TYPE_TALKING :
self . SetText ( "[pink]" )
elif text . find ( "[pink]" )!=- 1 :
self . ccolor = "G"
if self . GetChatMode () == chat . CHAT_TYPE_PARTY :
self . SetText ( "#[green]" )
elif self . GetChatMode () == chat . CHAT_TYPE_GUILD :
self . SetText ( "%[green]" )
elif self . GetChatMode () == chat . CHAT_TYPE_SHOUT :
self . SetText ( "![green]" )
elif self . GetChatMode () == chat . CHAT_TYPE_TALKING :
self . SetText ( "[green]" )
elif text . find ( "[green]" )!=- 1 :
self . ccolor = "V"
if self . GetChatMode () == chat . CHAT_TYPE_PARTY :
self . SetText ( "#[violett]" )
elif self . GetChatMode () == chat . CHAT_TYPE_GUILD :
self . SetText ( "%[violett]" )
elif self . GetChatMode () == chat . CHAT_TYPE_SHOUT :
self . SetText ( "![violett]" )
elif self . GetChatMode () == chat . CHAT_TYPE_TALKING :
self . SetText ( "[violett]" )
elif text . find ( "[violett]" )!=- 1 :
self . ccolor = "O"
if self . GetChatMode () == chat . CHAT_TYPE_PARTY :
self . SetText ( "#[orange]" )
elif self . GetChatMode () == chat . CHAT_TYPE_GUILD :
self . SetText ( "%[orange]" )
elif self . GetChatMode () == chat . CHAT_TYPE_SHOUT :
self . SetText ( "![orange]" )
elif self . GetChatMode () == chat . CHAT_TYPE_TALKING :
self . SetText ( "[orange]" )
elif text . find ( "[orange]" )!=- 1 :
self . ccolor = "BR"
if self . GetChatMode () == chat . CHAT_TYPE_PARTY :
self . SetText ( "#[brown]" )
elif self . GetChatMode () == chat . CHAT_TYPE_GUILD :
self . SetText ( "%[brown]" )
elif self . GetChatMode () == chat . CHAT_TYPE_SHOUT :
self . SetText ( "![brown]" )
elif self . GetChatMode () == chat . CHAT_TYPE_TALKING :
self . SetText ( "[brown]" )
elif text . find ( "[brown]" )!=- 1 :
self . ccolor = "BL"
if self . GetChatMode () == chat . CHAT_TYPE_PARTY :
self . SetText ( "#[black]" )
elif self . GetChatMode () == chat . CHAT_TYPE_GUILD :
self . SetText ( "%[black]" )
elif self . GetChatMode () == chat . CHAT_TYPE_SHOUT :
self . SetText ( "![black]" )
elif self . GetChatMode () == chat . CHAT_TYPE_TALKING :
self . SetText ( "[black]" )
elif text . find ( "[black]" )!=- 1 :
self . ccolor = "GR"
if self . GetChatMode () == chat . CHAT_TYPE_PARTY :
self . SetText ( "#[gray]" )
elif self . GetChatMode () == chat . CHAT_TYPE_GUILD :
self . SetText ( "%[gray]" )
elif self . GetChatMode () == chat . CHAT_TYPE_SHOUT :
self . SetText ( "![gray]" )
elif self . GetChatMode () == chat . CHAT_TYPE_TALKING :
self . SetText ( "[gray]" )
elif text . find ( "[gray]" )!=- 1 :
self . ccolor = "Y"
if self . GetChatMode () == chat . CHAT_TYPE_PARTY :
self . SetText ( "#[yellow]" )
elif self . GetChatMode () == chat . CHAT_TYPE_GUILD :
self . SetText ( "%[yellow]" )
elif self . GetChatMode () == chat . CHAT_TYPE_SHOUT :
self . SetText ( "![yellow]" )
elif self . GetChatMode () == chat . CHAT_TYPE_TALKING :
self . SetText ( "[yellow]" )
elif text . find ( "[yellow]" )!=- 1 :
self . ccolor = "R"
if self . GetChatMode () == chat . CHAT_TYPE_PARTY :
self . SetText ( "#[red]" )
elif self . GetChatMode () == chat . CHAT_TYPE_GUILD :
self . SetText ( "%[red]" )
elif self . GetChatMode () == chat . CHAT_TYPE_SHOUT :
self . SetText ( "![red]" )
elif self . GetChatMode () == chat . CHAT_TYPE_TALKING :
self . SetText ( "[red]" )
elif text . find ( "[red]" )!=- 1 :
self . ccolor = "GO"
if self . GetChatMode () == chat . CHAT_TYPE_PARTY :
self . SetText ( "#[gold]" )
elif self . GetChatMode () == chat . CHAT_TYPE_GUILD :
self . SetText ( "%[gold]" )
elif self . GetChatMode () == chat . CHAT_TYPE_SHOUT :
self . SetText ( "![gold]" )
elif self . GetChatMode () == chat . CHAT_TYPE_TALKING :
self . SetText ( "[gold]" )
elif text . find ( "[gold]" )!=- 1 :
self . ccolor = "N"
if self . GetChatMode () == chat . CHAT_TYPE_PARTY :
self . SetText ( "#" )
elif self . GetChatMode () == chat . CHAT_TYPE_GUILD :
self . SetText ( "%" )
elif self . GetChatMode () == chat . CHAT_TYPE_SHOUT :
self . SetText ( "!" )
elif self . GetChatMode () == chat . CHAT_TYPE_TALKING :
self . SetText ( "" )
else:
self . ccolor = "B"
if self . GetChatMode () == chat . CHAT_TYPE_PARTY :
self . SetText ( "#[blue]" )
elif self . GetChatMode () == chat . CHAT_TYPE_GUILD :
self . SetText ( "%[blue]" )
elif self . GetChatMode () == chat . CHAT_TYPE_SHOUT :
self . SetText ( "![blue]" )
elif self . GetChatMode () == chat . CHAT_TYPE_TALKING :
self . SetText ( "[blue]" )
else:
if text . find ( "[blue]" )!=- 1 :
self . ccolor = "LB"
if self . GetChatMode () == chat . CHAT_TYPE_PARTY :
self . SetText ( "#[lightblue]" )
elif self . GetChatMode () == chat . CHAT_TYPE_GUILD :
self . SetText ( "%[lightblue]" )
elif self . GetChatMode () == chat . CHAT_TYPE_SHOUT :
self . SetText ( "![lightblue]" )
elif self . GetChatMode () == chat . CHAT_TYPE_TALKING :
self . SetText ( "[lightblue]" )
elif text . find ( "[lightblue]" )!=- 1 :
self . ccolor = "P"
if self . GetChatMode () == chat . CHAT_TYPE_PARTY :
self . SetText ( "#[pink]" )
elif self . GetChatMode () == chat . CHAT_TYPE_GUILD :
self . SetText ( "%[pink]" )
elif self . GetChatMode () == chat . CHAT_TYPE_SHOUT :
self . SetText ( "![pink]" )
elif self . GetChatMode () == chat . CHAT_TYPE_TALKING :
self . SetText ( "[pink]" )
elif text . find ( "[pink]" )!=- 1 :
self . ccolor = "G"
if self . GetChatMode () == chat . CHAT_TYPE_PARTY :
self . SetText ( "#[green]" )
elif self . GetChatMode () == chat . CHAT_TYPE_GUILD :
self . SetText ( "%[green]" )
elif self . GetChatMode () == chat . CHAT_TYPE_SHOUT :
self . SetText ( "![green]" )
elif self . GetChatMode () == chat . CHAT_TYPE_TALKING :
self . SetText ( "[green]" )
elif text . find ( "[green]" )!=- 1 :
self . ccolor = "N"
if self . GetChatMode () == chat . CHAT_TYPE_PARTY :
self . SetText ( "#" )
elif self . GetChatMode () == chat . CHAT_TYPE_GUILD :
self . SetText ( "%" )
elif self . GetChatMode () == chat . CHAT_TYPE_SHOUT :
self . SetText ( "!" )
elif self . GetChatMode () == chat . CHAT_TYPE_TALKING :
self . SetText ( "" )
else:
self . ccolor = "B"
if self . GetChatMode () == chat . CHAT_TYPE_PARTY :
self . SetText ( "#[blue]" )
elif self . GetChatMode () == chat . CHAT_TYPE_GUILD :
self . SetText ( "%[blue]" )
elif self . GetChatMode () == chat . CHAT_TYPE_SHOUT :
self . SetText ( "![blue]" )
elif self . GetChatMode () == chat . CHAT_TYPE_TALKING :
self . SetText ( "[blue]" )
self . SetEndPosition ()
self . __CheckChatMark ()
03/12/2013, 19:29
#4
elite*gold: 205
Join Date: Jun 2010
Posts: 5,334
Received Thanks: 2,510
ich bekomme dies nach dem einfügen in die syserr
Quote:
0312 19:26:06458 :: Traceback (most recent call last):
0312 19:26:06459 :: File "uiChat.py", line 389, in OnIMEReturn
0312 19:26:06459 :: File "uiChat.py", line 287, in __SendShoutChatPacket
0312 19:26:06459 :: File "uiChat.py", line 224, in __SendChatPacket
0312 19:26:06459 :: NameError
0312 19:26:06460 :: :
0312 19:26:06460 :: global name 'player' is not defined
0312 19:26:06460 ::
0312 19:26:06460 :: Traceback (most recent call last):
0312 19:26:06461 :: File "uiChat.py", line 389, in OnIMEReturn
0312 19:26:06461 :: File "uiChat.py", line 287, in __SendShoutChatPacket
0312 19:26:06461 :: File "uiChat.py", line 224, in __SendChatPacket
0312 19:26:06461 :: NameError
0312 19:26:06461 :: :
0312 19:26:06461 :: global name 'player' is not defined
0312 19:26:06461 ::
0312 19:26:10312 :: Traceback (most recent call last):
0312 19:26:10312 :: File "uiChat.py", line 389, in OnIMEReturn
0312 19:26:10313 :: File "uiChat.py", line 287, in __SendShoutChatPacket
0312 19:26:10313 :: File "uiChat.py", line 224, in __SendChatPacket
0312 19:26:10313 :: NameError
0312 19:26:10313 :: :
0312 19:26:10313 :: global name 'player' is not defined
0312 19:26:10313 ::
0312 19:26:10313 :: Traceback (most recent call last):
0312 19:26:10313 :: File "uiChat.py", line 389, in OnIMEReturn
0312 19:26:10313 :: File "uiChat.py", line 287, in __SendShoutChatPacket
0312 19:26:10314 :: File "uiChat.py", line 224, in __SendChatPacket
0312 19:26:10314 :: NameError
0312 19:26:10314 :: :
0312 19:26:10314 :: global name 'player' is not defined
0312 19:26:10314 ::
schreiben geht alles nur der Rufchat halt nicht
03/12/2013, 20:12
#5
elite*gold: 0
Join Date: Oct 2010
Posts: 115
Received Thanks: 14
import player on top of uichat.py
03/12/2013, 20:24
#6
elite*gold: 205
Join Date: Jun 2010
Posts: 5,334
Received Thanks: 2,510
thanks for the tip
but i need "glas der einsicht"
gibts nicht auch nen weg es ohne dieses item zunutzen?
gibts da ne dif für ne 1765 game vllt?
03/12/2013, 22:16
#7
elite*gold: 139
Join Date: Sep 2010
Posts: 583
Received Thanks: 546
Quote:
Originally Posted by
lfcmaus
thanks for the tip
but i need "glas der einsicht"
gibts nicht auch nen weg es ohne dieses item zunutzen?
gibts da ne dif für ne 1765 game vllt?
ne aber für die 2089
@B2T nice
03/13/2013, 08:59
#8
elite*gold: 0
Join Date: Dec 2009
Posts: 1,807
Received Thanks: 866
kanns du noch einfügen für (VIP) hinter denn namen das die gold schreiben ?
py ist nicht so meins :/
03/13/2013, 10:35
#9
elite*gold: 350
Join Date: Oct 2011
Posts: 176
Received Thanks: 49
Thanks for sharing !
03/13/2013, 11:28
#10
elite*gold: 0
Join Date: Oct 2009
Posts: 382
Received Thanks: 161
How i can add color for [SA] [VIP]
Code:
name = player.GetName()
if type == chat.CHAT_TYPE_SHOUT:
if name.find("[SA]") !=-1: # Wenn im [SA] im Namen gefunden wird dann...
empire_id = "|cFFFF0000|H|h[Serveradmin]|cFFA7FFD4|H|h" # ...Reaktion auf ^ (1 Zeile drüber)
like this
thread :
03/14/2013, 16:38
#11
elite*gold: 5
Join Date: Oct 2010
Posts: 1,692
Received Thanks: 1,773
Quote:
Originally Posted by
vpser
How i can add color for [SA] [VIP]
Code:
name = player.GetName()
if type == chat.CHAT_TYPE_SHOUT:
if name.find("[SA]") !=-1: # Wenn im [SA] im Namen gefunden wird dann...
empire_id = "|cFFFF0000|H|h[Serveradmin]|cFFA7FFD4|H|h" # ...Reaktion auf ^ (1 Zeile drüber)
like this
thread :
A GM should use the GM Chat
03/14/2013, 17:33
#12
elite*gold: 0
Join Date: Jan 2013
Posts: 212
Received Thanks: 178
Code:
'[Red]' : '|cFFFF0000|H|h',
'[LightGreen]' : "|cFF00FF00|H|h",
'[DarkGreen]' : "|cFF008000|H|h",
'[Orange]' : "|cFFFFA500|H|h",
'[Purple]' : "|cFF800080|H|h",
'[Pink]' : "|cFFC0CB|H|h",
'[LightBlue]' : "|cFF00FFFF|H|h",
'[Blue]' : "|cCFF0042FF|H|h",
'[Silver]' : "|cFFC0C0C0|H|h",
oh good! thx
05/04/2014, 15:19
#13
elite*gold: 0
Join Date: Aug 2013
Posts: 301
Received Thanks: 88
Wo bekommt man die Farbcodes her, bzw was ist das für eine Sprache? ^^
MFG
Similar Threads
[Release]Modified uichat.py
03/08/2015 - Metin2 PServer Guides & Strategies - 31 Replies
You need this dif-files:
Empire-Shoutchat: This difference file has been created by IDA Pro
game
000E7C8D: 0F E9
000E7C8E: 84 01
000E7C8F: A4 00
000E7D51: 97 00
000E7D52: 51 00
000E7D53: 0E 00
[B]Reichschat-Dif + uichat.py [S]PSC/Paypal
02/05/2013 - Metin2 Trading - 6 Replies
Ja hier biete ich euch die Metin2 Reichschat-Dif an + eine perfekt angepasste uichat.py für das System.
Also Reichat = Alle 3 Reiche in einem Rufchat
Addet mich in Skype für näheres: darkmoon232
color > uichat.py
02/14/2012 - Metin2 Private Server - 10 Replies
Hi,
How do such a thing?
I do not know what to call it xD
8233065/kvbkodc
[RELEASE]New-modded Client
12/06/2010 - Metin2 PServer Guides & Strategies - 4 Replies
Hey community,
ich möchte euch hier meinen neu erstellten client vorstellen,
welcher ursprünglich (vor 2wochen) ein neonblue modified Client 4.5 war.
Den DL-link verschicke ich per PN
Warum sollte ich diesen Client für meinen Server benutzen ?
Weil in diesem Client einfach so ziemlich alle Pub. Waffen und Rüstungen
eingefügt sind und die Werte davon angepasst sind und weil einige andere Dinge entbugt /eingefügt sind die ich euch jetzt vorstelle:
All times are GMT +1. The time now is 20:54 .