Sign in to follow this  
Followers 0
Joke758

_InGamePing UDF

1 post in this topic

I saw some people on edgeofnowhere asking on how to read d2 ping. So I decided to write a function.

;By Joke758
#include <memory.au3>

; This is an example
MsgBox ( 0, "By Joke758", "Ping in game: " & _InGamePing() )



Func _InGamePing()
  ;By Joke758
Local $pid = ""
If ProcessExists ( "Diablo II.exe" ) Then
   $pid = ProcessExists ( "Diablo II.exe" )
EndIf

If ProcessExists ( "D2Loader-1.11b.exe" ) Then
   $pid = ProcessExists ( "D2Loader-1.11b.exe" )
EndIf

If $pid = "" Then
   Return 0
   SetError ( 1 )
  ;Can't find open diablo process
EndIf

$open = _MemOpen ( $pid )
$read = _MemRead ( $open, 0x6FBCA2A4, 4 )
$hping = StringRight( hex($read[3]), 2 ) & StringRight( hex($read[2]), 2 ) & StringRight ( hex($read[1]), 2 )  & StringRight ( hex($read[0]), 2 )
$ping = dec ( $hping )
_MemClose ( $open )
Return $ping
EndFunc;==>_InGamePing

require memory.au3 ( by w0uter )

:D


[u]My Programs:[/u]Word Search Creator - Make your own Word SearchShortHand - Hide a secret message in a jpg fileHex Editor - Edit your Binary fileIncrease file size - Increase the size of any filesArt Generator - A program that generate random picture[u]My Functions:[/u]16-Bits Hash - My Hash function similar to MD5Probabilities - My probabilities function (factorial, permuation, combination)_GetDate() - Convert a date to a day of the week_Base(), _Dec() - Convert a number in any base (bin, oct, hex, dec). Create your own!

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0