müsste man halt am anfang die ids auslesen :>
;-Hero1 Healthstack $1_Hero1Health = _MemoryRead($PTR_HEALTH, $hprocess, 'dword') $2_Hero1Health = _MemoryRead($1_Hero1Health + $PTR_GLOBAL_OFFSET, $hprocess, 'dword') $3_Hero1Health = _MemoryRead($2_Hero1Health - $PTR_HEALTH_HERO1, $hprocess, 'float') $CUR_HP_HERO1 = Int($3_Hero1Health*100) ;-Hero2 Healthstack $1_Hero2Health = _MemoryRead($PTR_HEALTH, $hprocess, 'dword') $2_Hero2Health = _MemoryRead($1_Hero2Health + $PTR_GLOBAL_OFFSET, $hprocess, 'dword') $3_Hero2Health = _MemoryRead($2_Hero2Health - $PTR_HEALTH_HERO2, $hprocess, 'float') $CUR_HP_HERO2 = Int($3_Hero2Health*100) ;-Hero3 Healthstack $1_Hero3Health = _MemoryRead($PTR_HEALTH, $hprocess, 'dword') $2_Hero3Health = _MemoryRead($1_Hero3Health + $PTR_GLOBAL_OFFSET, $hprocess, 'dword') $3_Hero3Health = _MemoryRead($2_Hero3Health - $PTR_HEALTH_HERO3, $hprocess, 'float') $CUR_HP_HERO3 = Int($3_Hero3Health*100)
If $Hero1'Hp < 1/4 Then ... Elseif $Hero2'Hp < 1/4 Then ... Elseif $Hero3'Hp < 1/4 Then ... Elseif $Own'Hp < 1/4 Then ... EndIf
Func Check()
$1_Hero1Health = _MemoryRead($PTR_HEALTH, $hprocess, 'dword')
$2_Hero1Health = _MemoryRead($1_Hero1Health + $PTR_GLOBAL_OFFSET, $hprocess, 'dword')
$3_Hero1Health = _MemoryRead($2_Hero1Health - $PTR_HEALTH_HERO1, $hprocess, 'float')
$CUR_HP_HERO1 = $3_Hero1Health
;-Hero2 Healthstack
$1_Hero2Health = _MemoryRead($PTR_HEALTH, $hprocess, 'dword')
$2_Hero2Health = _MemoryRead($1_Hero2Health + $PTR_GLOBAL_OFFSET, $hprocess, 'dword')
$3_Hero2Health = _MemoryRead($2_Hero2Health - $PTR_HEALTH_HERO2, $hprocess, 'float')
$CUR_HP_HERO2 = $3_Hero2Health
;-Hero3 Healthstack
$1_Hero3Health = _MemoryRead($PTR_HEALTH, $hprocess, 'dword')
$2_Hero3Health = _MemoryRead($1_Hero3Health + $PTR_GLOBAL_OFFSET, $hprocess, 'dword')
$3_Hero3Health = _MemoryRead($2_Hero3Health - $PTR_HEALTH_HERO3, $hprocess, 'float')
$CUR_HP_HERO3 = $3_Hero3Health
EndFunc ;==>Check
Func Heal()
ControlClick($hwnd, "", "", "left", 1, 0, 0) ;-betreten
While _MemoryRead($MEM_MAP, $hprocess) <> 1
Sleep(500)
WEnd
KeySend("f") ;-selbst anvisieren
$Player1 = _MemoryRead($MEM_NPCIDSELECT, $hprocess)
_ArrayAdd($PLAYERLIST, $Player1)
KeySend("tab")
If _MemoryRead($MEM_NPCIDSELECT, $hprocess) = Not $PLAYERLIST[1] Then
$Player2 = _MemoryRead($MEM_NPCIDSELECT, $hprocess)
_ArrayAdd($PLAYERLIST, $Player2)
EndIf
KeySend("tab")
If _MemoryRead($MEM_NPCIDSELECT, $hprocess) = Not $PLAYERLIST[1] Or $PLAYERLIST[2] Then
$Player3 = _MemoryRead($MEM_NPCIDSELECT, $hprocess)
_ArrayAdd($PLAYERLIST, $Player3)
EndIf
KeySend("tab")
If _MemoryRead($MEM_NPCIDSELECT, $hprocess) = Not $PLAYERLIST[1] Or $PLAYERLIST[2] Or $PLAYERLIST[3] Then
$Player4 = _MemoryRead($MEM_NPCIDSELECT, $hprocess)
_ArrayAdd($PLAYERLIST, $Player4)
EndIf
AdlibEnable("Check", 1000)
If ($CUR_HP_HERO1 * 100) < 25 Then
;-Wie zur hölle soll ich ihn anvisieren????????!!!!!!!
KeySend("heal")
EndIf
EndFunc ;==>Heal
Func Check()
$1_Hero1Health = _MemoryRead($PTR_HEALTH, $hprocess, 'dword')
$2_Hero1Health = _MemoryRead($1_Hero1Health + $PTR_GLOBAL_OFFSET, $hprocess, 'dword')
$3_Hero1Health = _MemoryRead($2_Hero1Health - $PTR_HEALTH_HERO1, $hprocess, 'float')
$CUR_HP_HERO1 = $3_Hero1Health
;-Hero2 Healthstack
$1_Hero2Health = _MemoryRead($PTR_HEALTH, $hprocess, 'dword')
$2_Hero2Health = _MemoryRead($1_Hero2Health + $PTR_GLOBAL_OFFSET, $hprocess, 'dword')
$3_Hero2Health = _MemoryRead($2_Hero2Health - $PTR_HEALTH_HERO2, $hprocess, 'float')
$CUR_HP_HERO2 = $3_Hero2Health
;-Hero3 Healthstack
$1_Hero3Health = _MemoryRead($PTR_HEALTH, $hprocess, 'dword')
$2_Hero3Health = _MemoryRead($1_Hero3Health + $PTR_GLOBAL_OFFSET, $hprocess, 'dword')
$3_Hero3Health = _MemoryRead($2_Hero3Health - $PTR_HEALTH_HERO3, $hprocess, 'float')
$CUR_HP_HERO3 = $3_Hero3Health
EndFunc ;==>Check
Func Heal()
ControlClick($hwnd, "", "", "left", 1, 0, 0) ;-betreten
While _MemoryRead($MEM_MAP, $hprocess) <> 1
Sleep(500)
WEnd
KeySend("f") ;-selbst anvisieren
$Player1 = _MemoryRead($MEM_NPCIDSELECT, $hprocess)
_ArrayAdd($PLAYERLIST, $Player1)
KeySend("tab")
If _MemoryRead($MEM_NPCIDSELECT, $hprocess) = Not $PLAYERLIST[1] Then
$Player2 = _MemoryRead($MEM_NPCIDSELECT, $hprocess)
_ArrayAdd($PLAYERLIST, $Player2)
EndIf
KeySend("tab")
If _MemoryRead($MEM_NPCIDSELECT, $hprocess) = Not $PLAYERLIST[1] Or $PLAYERLIST[2] Then
$Player3 = _MemoryRead($MEM_NPCIDSELECT, $hprocess)
_ArrayAdd($PLAYERLIST, $Player3)
EndIf
KeySend("tab")
If _MemoryRead($MEM_NPCIDSELECT, $hprocess) = Not $PLAYERLIST[1] Or $PLAYERLIST[2] Or $PLAYERLIST[3] Then
$Player4 = _MemoryRead($MEM_NPCIDSELECT, $hprocess)
_ArrayAdd($PLAYERLIST, $Player4)
EndIf
AdlibEnable("Check", 1000)
If ($CUR_HP_HERO1 * 100) < 25 Then
_Memorywrite($MEM_NPCIDSELECT, $hprocess, $Player1)
KeySend("heal")
EndIf
EndFunc ;==>Heal]
Dim $PLAYERLIST[1]
$MAXHP_PLAYER = _MemoryRead($2_OwnHealth + $PTR_HEALTH_MAX_HP, $hprocess) * 100
$MAXHP_HERO1 = _MemoryRead($2_Hero1Health - $PTR_HEALTH_HERO1, $hprocess, 'float') * 100
$MAXHP_HERO2 = _MemoryRead($2_Hero2Health - $PTR_HEALTH_HERO2, $hprocess, 'float') * 100
$MAXHP_HERO3 = _MemoryRead($2_Hero3Health - $PTR_HEALTH_HERO3, $hprocess, 'float') * 100
Func Start()
While True
ControlClick($hwnd, "", "", "left", 1, 515, 124)
While _MemoryRead($MEM_MAP, $hprocess) <> 1
Sleep(500)
WEnd
Sleep(5000)
ControlClick($hwnd, "", "", "left", 1, 526, 31)
$PLAYER = _MemoryRead($MEM_NPCIDSELECT, $hprocess)
_ArrayAdd($PLAYERLIST, $PLAYER)
Sleep(500)
ControlClick($hwnd, "", "", "left", 1, 525, 49)
$HERO1 = _MemoryRead($MEM_NPCIDSELECT, $hprocess)
_ArrayAdd($PLAYERLIST, $HERO1)
Sleep(500)
ControlClick($hwnd, "", "", "left", 1, 526, 68)
$HERO2 = _MemoryRead($MEM_NPCIDSELECT, $hprocess)
_ArrayAdd($PLAYERLIST, $HERO2)
Sleep(500)
ControlClick($hwnd, "", "", "left", 1, 526, 86)
$HERO3 = _MemoryRead($MEM_NPCIDSELECT, $hprocess)
_ArrayAdd($PLAYERLIST, $HERO3)
AdlibEnable("Heilen", 1000)
While _MemoryRead($MEM_MAP, $hprocess) <> 2
Sleep(1000)
WEnd
While _MemoryRead($MEM_MAP, $hprocess) <> Not 2
Sleep(1000)
WEnd
Sleep(1000)
ContinueLoop
WEnd
EndFunc ;==>Start
Func Heilen()
;-Healthstack
$1_OwnHealth = _MemoryRead($PTR_HEALTH, $hprocess)
$2_OwnHealth = _MemoryRead($1_OwnHealth + $PTR_GLOBAL_OFFSET, $hprocess)
$3_OwnHealth = _MemoryRead($2_OwnHealth + $PTR_HEALTH_CUR_HP, $hprocess, "float")
$CUR_HP_PLAYER = $3_OwnHealth
$1_Hero1Health = _MemoryRead($PTR_HEALTH, $hprocess, 'dword')
$2_Hero1Health = _MemoryRead($1_Hero1Health + $PTR_GLOBAL_OFFSET, $hprocess, 'dword')
$3_Hero1Health = _MemoryRead($2_Hero1Health - $PTR_HEALTH_HERO1, $hprocess, 'float')
$CUR_HP_HERO1 = $3_Hero1Health
;-Hero2 Healthstack
$1_Hero2Health = _MemoryRead($PTR_HEALTH, $hprocess, 'dword')
$2_Hero2Health = _MemoryRead($1_Hero2Health + $PTR_GLOBAL_OFFSET, $hprocess, 'dword')
$3_Hero2Health = _MemoryRead($2_Hero2Health - $PTR_HEALTH_HERO2, $hprocess, 'float')
$CUR_HP_HERO2 = $3_Hero2Health
;-Hero3 Healthstack
$1_Hero3Health = _MemoryRead($PTR_HEALTH, $hprocess, 'dword')
$2_Hero3Health = _MemoryRead($1_Hero3Health + $PTR_GLOBAL_OFFSET, $hprocess, 'dword')
$3_Hero3Health = _MemoryRead($2_Hero3Health - $PTR_HEALTH_HERO3, $hprocess, 'float')
$CUR_HP_HERO3 = $3_Hero3Health
If ($CUR_HP_PLAYER * 100) < $MAXHP_PLAYER / 4 Then
_MemoryWrite($MEM_NPCIDSELECT, $hprocess, $PLAYERLIST[1])
KeySend(Random(1, 8, 1))
EndIf
If ($CUR_HP_HERO1 * 100) < $MAXHP_HERO1 / 4 Then
_MemoryWrite($MEM_NPCIDSELECT, $hprocess, $PLAYERLIST[2])
KeySend(Random(1, 8, 1))
EndIf
If ($CUR_HP_HERO2 * 100) < $MAXHP_HERO2 / 4 Then
_MemoryWrite($MEM_NPCIDSELECT, $hprocess, $PLAYERLIST[3])
KeySend(Random(1, 8, 1))
EndIf
If ($CUR_HP_HERO3 * 100) < $MAXHP_HERO3 / 4 Then
_MemoryWrite($MEM_NPCIDSELECT, $hprocess, $PLAYERLIST[4])
KeySend(Random(1, 8, 1))
EndIf
EndFunc ;==>Heilen
start()