AOWiki :: AODevs Forums :: Arcanum :: AO Official Forums :: AOC US/EU Official Forums
Welcome, Guest. Please login or register.
Did you miss your activation email?
+  FC 3rd Party Dev
|-+  Anarchy Online» General Discussion» Audio Alert on /tell receipt. [source]
Username:
Password:
 
Pages: [1]
  Print  
Author Topic: Audio Alert on /tell receipt. [source]  (Read 723 times)
wopsy
Rollerrat
*

Reetness: +0/-0
Offline Offline

Posts: 18



View Profile WWW
« on: June 04, 2010, 14:33:30 »

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:
Code:
?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:


Code:
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:



Code:
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]
« Last Edit: June 04, 2010, 14:55:51 by wopsy » Logged

Looking good is nine tenths of the fight.
int23h
Rollerrat
*

Reetness: +0/-0
Offline Offline

Posts: 1


View Profile
« Reply #1 on: June 10, 2010, 17:15:34 »

Very nice.. it would also be great if I could play a MessageBeep on a team invite.. sometimes it takes forever until someone invites you when you're LFT.
What API would I have to intercept for the "Want to join XX's team?" message? Is it in the same dll?
Logged
Pages: [1]
  Print  

 
Jump to:  

Page created in 0.059 seconds with 17 queries.