python catch call

08/13/2013 13:09 3t3r4n#1
How can I catch a call from metin2client to game.py OnRecvWhisper function only from python script without modify anything on game file? I have saw a tutorial with OnKeyDown function from game.py but i don't remember where :|
08/15/2013 09:47 Xijezu#2
#moved
08/15/2013 12:41 noahrmal#3
do you mean the OnRecvWhisper hook by DaRealFreak?

PHP Code:
OldOnRecvWhisper game.GameWindow.OnRecvWhisper
MinimizedWhisper 
0
PrivateMessages 
= {}

def HookedOnRecvWhisper(selfmodenameline):
    global 
OldOnRecvWhisper
    
global PrivateMessages
    
global MinimizedWhisper
    OldOnRecvWhisper
(selfmodenameline)

    if 
not name in PrivateMessages:
        
PrivateMessages[name] = []
    
    
Message line.split(name " : ")[1]

    if 
MinimizedWhisper 0:
        
thread.start_new_thread(AnswerMinimizedWhisper, (nameMessage))
    else:
        
PrivateMessages[name].append([nameMessage""])
    
def HookOnRecvWhisper():
    
game.GameWindow.OnRecvWhisper HookedOnRecvWhisper
    chat
.AppendChat(1"OnRecvWhisper wurde erfolgreich gehooked.")
    
def UnHookHookOnRecvWhisper():
    global 
OldOnRecvWhisper
    game
.GameWindow.OnRecvWhisper OldOnRecvWhisper
    chat
.AppendChat(1"OnRecvWhisper Hook wurde erfolgreich entfernt."
08/23/2013 18:38 3t3r4n#4
tks man :D