hmm, irgendwie will das nicht, hier die funktion (hab die auf AutoIt umgebaut), manches ist noch auskommentiert, da ich am testen bin, mein derzeitiges Problem ist, dass ich schon nach dem ersten _BMReadMemory nur ein "0" zurückbekomme, ist das richtig? Soll ich da einfach auf das nächste Object switchen? In einem anderen Forum wird geschrieben das man mit 0x4 das nächset Object erreicht nicht mit 0x8, bin jetzt bisserl verwirrt :(
Code:
func IsSpellReady($spellid)
$spellsOnCooldown = 0x00D3F5A4
$currentListObject = _BMReadMemory($hProcess, $spellsOnCooldown + 0x8, "uint")
;while (($currentListObject <> 0) AND (($currentListObject & 1) = 0))
while 1
$currentSpellId = _BMReadMemory($hProcess, $currentListObject + 0x8, "uint");
if ($currentSpellId == $spellid) then
$start = _BMReadMemory($hProcess, $currentListObject + 0x10, "uint");
$cd1 = _BMReadMemory($hProcess, $currentListObject + 0x14, "uint");
$cd2 = _BMReadMemory($hProcess, $currentListObject + 0x20, "uint");
$length = $cd1 + $cd2;
$globalLength = _BMReadMemory($hProcess, $currentListObject + 0x2C, "uint");
;$cdleft = Math.Max(Math.Max(length, globalLength) - (Environment.TickCount - start), 0);
;if ($cdleft <> 0) then
;return 0;
;endif
endif
$currentListObject = _BMReadMemory($hProcess, $currentListObject + 4, "uint");
wend
return 1;
EndFunc