[Search] Alarm script for private message

11/12/2009 11:33 nonojjj#1
After much research on the forum I can't find the script that allows for an alarm when someone make private message.
If someone can help me :)

Sorry for my english

Thanks
11/12/2009 12:36 rLy7e#2
Ok , i think thats a really good idea , really usefully for some situations , but while playin it could be very annoying ;D

Sry I cant help you that much cos i dont know that something like this script allready exist.
May someone of our metin2 staff can help u later...
best regards ,]
11/12/2009 12:40 Tyrar#3
M2XT ->
Code:
#include <d3d8.h>
#include <d3dx8.h>
#include "M2XT.h"
DWORD dwOrigReceiveMessage = NULL;
DWORD dwReceiveMessage = 0x12345678; //<--- address of the function!
__declspec(naked) void hookReceiveMessage()
{
__asm pushad
// alarm!
__asm popad
__asm jmp [dwOrigReceiveMessage]
};
extern "C" __declspec(dllexport) void InitHack(DWORD ver)
{
dwOrigReceiveMessage = (DWORD)AttachHook((void*)dwReceiveMessage,(void*)hookReceiveMessage);
};
try it! ^.^

edit:
it's possible that you must hook this function later!
create a callback for python init or python import, and try to hook this function!