GWCA Deathcheck

02/03/2010 02:57 G1337#1
Hey...irgendwie bekomm ichs nicht hin, nen vernünftigen Deathcheck in GWCA zu schreiben. Der hier funktioniert nicht:
PHP Code:
$cbType "int"
   
Do
      
Sleep(250)
      
CmdCB($CA_GETDEAD)
   
Until $cbVar[0] = 
Kann mir jemand helfen? Wäre nett ;-)
02/03/2010 06:30 solos#2
Func DeathCheck()
$cbType = "int"
CmdCB($CA_GETDEAD)
If $cbVar[0] = 1 Then
Resign()
EndIf
EndFunc
02/03/2010 14:09 G1337#3
Hmm also irgendiwe klappt das nicht bei mir...weder so:
PHP Code:
shellExecute("fight.exe")

While 
1
    $cbType 
"int"
    
CmdCB($CA_GETISDEAD, -2)
    If(
$cbVar[0] = 1Then
            UpdateStatus
("Dead, waiting")
            
ProcessClose("fight.exe"
Noch so:
PHP Code:
shellExecute("fight.exe")

While 
1
Adlibenable
("Deathcheck")



 
Func DeathCheck()
$cbType "int"
CmdCB($CA_GETDEAD)
If 
$cbVar[0] = 1 Then
UpdateStatus
("Dead, waiting")
ProcessClose("fight.exe")
EndIf
EndFunc 
Wäre schön wenn mir wer helfen kann!
02/04/2010 13:52 Cr33p#4
Hmm...machs einfach mit der HP-Abfrage:

PHP Code:
  shellExecute("fight.exe"

  Do
            
Sleep(200)
            
$cbType "float"
            
CmdCB($CA_GetHP, -2)
         
Until $cbVar[0] = 0        
                      UpdateStatus
("Dead, waiting")
                      
ProcessClose("fight.exe"