Register for your free account! | Forgot your password?

You last visited: Today at 01:26

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

Advertisement



[Python]Problem

Discussion on [Python]Problem within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
OoKaMi_'s Avatar
 
elite*gold: 0
Join Date: Jun 2014
Posts: 269
Received Thanks: 96
[Python]Problem

Hey Com,

brauche mal wieder etwas Hilfe.
Ich versuche gerade den Ruf Chat weng zu modden.
Mein Problem ist, ich möchte gerne vom jedem Reich den Namen dabei stehen haben "Bund".
Aber im Game will er dann "Glas der Einsicht".

Und des mit SA Funktioniert auch nicht.

Wäre nett wenn jemand Helfen könnte

Hier mal mein Code.

PHP Code:
def __SendChatPacket(selftexttype):
        
#START BLACKLIST#
        
blacklist = ["(buff1)","(buff2)","(buff3)","(buff4)","(buff5)","(buff6)","(vip)"]
        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[Shinsoo]|cFFA7FFD4|H|h',
                
2'|cFFFFFF00|H|h[Chunjo]|cFFA7FFD4|H|h',
                
3'|cFF0080FF|H|h[Jinno]|cFFA7FFD4|H|h'
                
}
            
text_color str(empire_color[empire_id]) + text            
            net
.SendChatPacket(text_colortype)
        else:
        
#END EMPIRECHAT#
        #START COLORMODE#
            
colors = [
                
'[Rot]','[Orange]','[Pink]','[HellBlau]','[Blau]','[Grün]','[Black]','[Gelb]',
            ]
            
farbcodes = {
                
'[Rot]' '|cFFFF0000|H|h',
                
'[Orange]' "|cFFFF8040|H|h",
                
'[Pink]' "|cFFFF00FF|H|h",
                
'[HellBlau]' "|cFF00FFFF|H|h",
                
'[Blau]' "|cFF0080FF|H|h",
                
'[Grün]' "|cFF00FF00|H|h",
                
'[Black]' "|cFF000000|H|h",
                
'[Gelb]' "|cFFFFFF00|H|h",
            }
            for 
farben in colors:
                if 
text.find(farben) !=-1:
                    
textwithcolor text.replace(farben,farbcodes[farben])
                    
net.SendChatPacket(textwithcolortype)
                    return
            
net.SendChatPacket(texttype)
            
#END COLORMODE#
            
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) 
MFG
OoKaMi_ is offline  
Old 05/11/2015, 10:45   #2
 
elite*gold: 2785
Join Date: Dec 2014
Posts: 403
Received Thanks: 1,354
Dein proplem liegt nicht an dem code, Das müsstest du über die game machen.

Entweder über den Source oder einer Diff wenn ihr keine eigene Game benuzt


.Kori
.K0rí is offline  
Old 05/11/2015, 17:56   #3
 
OoKaMi_'s Avatar
 
elite*gold: 0
Join Date: Jun 2014
Posts: 269
Received Thanks: 96
Des habe ich schon gedift aber geht trotzdem nicht.
OoKaMi_ is offline  
Reply


Similar Threads Similar Threads
Python Problem
01/29/2014 - Metin2 Private Server - 9 Replies
Guten Abend ich hab eben ein Root server installiert und alles klappt komme sauber rein dies das wenn ich aber jetzt python installieren will kommt das *** Error code 1 Stop in /usr/ports/lang/python27. *** Error code 1 Stop in /usr/ports/lang/python27. *** Error code 1
Python Problem
12/12/2013 - Metin2 Private Server - 8 Replies
Habe gerade den Mod eingebaut -> http://www.elitepvpers.com/forum/metin2-pserver-gu ides-strategies/1117788-mod-easy-chatblock-kick.ht ml Leider habe ich das Problem wen ich mich Ingame Einloggen möchte das der Client beim Einloggen sich schließt. Syserr: networkModule.py(line:194) SetSelectCharacterPhase system.py(line:130) __pack_import system.py(line:110) _process_result introSelect.py(line:26) ?
Python Problem!!!
08/22/2012 - Metin2 - 2 Replies
HeyHo ich bins mal wieder mit einem Python Problem xD undzwar wollte ich einfach mal wissen wie man VID's über eine gnaze map scannen kann =) ich kriege es nur so hin das ich alle VID's in sichtweite gefasst kriege bitte um hilfe!!!:handsdown::handsdown:
Python Problem :S
07/12/2012 - Metin2 Private Server - 8 Replies
Haillo, wie euch schon mein Thread "vorraussagt" habe ich einen Python Problem. Das Problem ist folgendes, ich habe einen neuen Button eingebaut wenn ich jedoch auf dem Button drücke (Funktion eingebunden) passiert rein garnichts. Die Syserr sagt lediglich folgendes aus: 0709 16:40:40787 :: Traceback (most recent call last): 0709 16:40:40788 :: File "ui.py", line 1006, in CallEvent 0709 16:40:40788 :: File "ui.py", line 87, in __call__
[PROBLEM]Python Uhr
03/18/2012 - General Coding - 3 Replies
Hallo, Ich habe solch ein Script lt = time.localtime() jahr,monat,tag,stunde,minute,sekunde = lt zeit = "%02i:%02i:%02i" % (stunde, minute, sekunde) Nun mache ich z.b. "text" : zeit,



All times are GMT +2. The time now is 01:26.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.