Okay, so I had a simple /petition that took over a day to answer,
eventually I'd have to get some work done.. so I figured.. make it go bing!
Simple rewrite here, in GUIFunc.dll
There's a little function beginning at offset:
?HandlePrivateMessage@ChatGUIModule_c@@AAEXPBUPrivateMessage_t@Client_c@ppj@@@Z
+ 0x48Ah
(couldn't be bothered demangling that) which is responsible for the 'AFK Reply Sent' text that pops up:
Address Hex dump Command Comments
010B15AA /. 8B7D EC MOV EDI,DWORD PTR SS:[EBP-14]
010B15AD |> 83BF 78020000 00 CMP DWORD PTR DS:[EDI+278],0
010B15B4 |. 74 11 JE SHORT 010B15C7
010B15B6 |. 68 CC0C1A01 PUSH OFFSET GUIFunc.011A0CCC ; ASCII " <font color=white>(AFK reply sent)</font>"
010B15BB |. 8D8D 74FFFFFF LEA ECX,[EBP-8C]
010B15C1 |. FF15 CC681901 CALL DWORD PTR DS:[<&Utils.??YString@@QAEAAV0@PBD@Z>]
010B15C7 |> 8D43 0C LEA EAX,[EBX+0C]
010B15CA |. 50 PUSH EAX
010B15CB |. 8D8D 24FFFFFF LEA ECX,[EBP-0DC]
just nop out that little section, and substitute it for:
CPU Disasm
Address Hex dump Command Comments
010B15B4 |. /74 11 JE SHORT 010B15C7
010B15B6 |6A FF PUSH -1
010B15B8 |E8 3A2FF175 CALL MessageBeep
010B15BD |90 NOP
010B15BE |90 NOP
010B15BF |90 NOP
010B15C0 |90 NOP
010B15C1 |90 NOP
010B15C2 |90 NOP
010B15C3 |90 NOP
010B15C4 |90 NOP
010B15C5 |90 NOP
010B15C6 |90 NOP
010B15C7 |> \8D43 0C LEA EAX,[EBX+0C]
Now simply hit
/afk, and your messages will announce themselves with a full and hearty bing!
There's even room in there to call the flashwindow function to make it a bit more obvious, and you
can change the sound constant to something more fun.
Known Issues:
1 - this is not a source...
No it's lazyness.
2 - 64bit systems.
The call assumes a staticly loaded user32.dll.
In all honesty I've never checked to see if the same addresses are valid from xp thru win7,
and no idea with regards to the 64 bit OSes, wine, etc.
3 - Is it allowed?
Actually asked an ARK about this one. Seemed to think it was a good idea. Told me to go ahead.
[/color]