Func CheckRare()
Send("{i}")
$unidRare1 = PixelSearch(772,463,790,490,0xFFFFFF,5) ; looks at the question mark which is white
$unidRare2 = PixelSearch(745,463,763,490,0xFFFFFF,5)
If (Not IsArray(
$unidRare1)) Or (Not IsArray($unidRare2)) Then ; not a rare in last slot
Send("{i}")
Return 1
EndIf
; rare in last slot
Send("{i}")
Return 0
EndFunc
That said $unidRare before. That variable did not exist. But the CheckRare() function is incorrect. It should be If (Not IsArray($unidRare1))
And (Not IsArray($unidRare2)) Then...
It should work find after that. The only case it wasn''t storing a rare is if it was a 1 slot rare (ring, amulet, follower token, etc) in the bottom row (row 6) column 9 and 10.
Here's the final with the logic fix in the If statement and storing in every case when it detects full. Again, it does not store every rare, only those that are cause an infinite loop in the bottom right 4 corners. Oh, and for some reason the pixel colors were off in the CheckInv() function. Those are updated too.
Script