Code:
Func CheckUIItemVisible($ValueToCheckFor, $Visibility)
$ptr1 = _MemoryRead($ofs_ObjectManager, $d3, 'ptr')
$ptr2 = _MemoryRead($ptr1 + 0x924, $d3, 'ptr')
$ptr3 = _MemoryRead($ptr2 + 0x0, $d3, 'ptr')
$ofs_uielements = _MemoryRead($ptr3 + 0x08, $d3, 'ptr')
$ptr1 = _MemoryRead($ofs_ObjectManager, $d3, 'ptr')
$ptr2 = _MemoryRead($ptr1 + 0x924, $d3, 'ptr')
$ptr3 = _MemoryRead($ptr2 + 0x0, $d3, 'ptr')
$UIelementCount = _MemoryRead($ptr3 + 0x40, $d3, 'int')
$counter = 0
While ($counter < $UIelementCount)
$counter += 1
$uielemePointer = _MemoryRead($ofs_uielements + $counter * 4, $d3, 'ptr')
While ($uielemePointer <> 0)
$nPnt = _MemoryRead($uielemePointer + 0x210, $d3, 'ptr')
$name = BinaryToString(_MemoryRead($nPnt + 0x38, $d3, 'byte[256]'), 4) ;Name
$visible = _MemoryRead($nPnt + 0x28, $d3, 'int') ;Visible
If($visible = $Visibility) Then
$foundValue = StringInStr($name, $ValueToCheckFor)
If($foundValue >=1) Then
return true
EndIf
EndIf
$uielemePointer = _MemoryRead($uielemePointer, $d3, 'ptr')
WEnd
WEnd
return false
EndFunc
Func CheckDeath()
;deathmenu_dialog
$deadLookFor = "deathmenu_dialog"
return CheckUIItemVisible($deadLookFor, 1)
EndFunc
That will tell you if you are dead or not, implement any way you would like.