Read Strings from Aion

11/09/2009 05:12 Hunter_1#1
I couldn't find anything about reading strings from Aion Memory when I had problems with mine.

Using Autoit3 and Nomad Memory, I was unable to get strings correctly.

I used Nomad's Memory read with type of "byte[32]" and Then called this function on the return data. Aion uses Unicode for the GUI strings and I didn't see any way of converting Unicode Strings in Autoit. So I felt I'd share my little code snippet with the rest of you.

Code:
;==================================================================================
; Function:			UniToString($string, $length)
; Description:		Detects adds while in combat and kills them
; Parameter(s):		$string - Input hex string
;					$length - length of $string
; Requirement(s):	$string must be in hex and begin with '0x'
; Return Value(s): 	Empty string or string of unicode values
;==================================================================================
Func UniToString($string, $length)
	$stringOut = ""
	$array = StringSplit(($string),"",2)
	$i = 2
	While $i < $length
		If Not($array[$i] == 0 And $array[$i+1] == 0) Then
			$temp = "" &$array[$i] & $array[$i+1]
			$temp = ChrW(Dec($temp))
			$stringOut = $stringOut & $temp
		EndIf
		$i = $i + 2
	WEnd
	Return $stringOut
EndFunc