I suggest using scan to check if the last row is filled instead of notcol for the last object.
The rational behind this is that the color of the object can easily change (weather in game, you could move, and a few other things) and I say last row because the last object could be an argate. Either one of those would cause the selling portion to fire constantly and it would not be as efficient.
I don't think you understand what the scan function does. It will search for multiple colors (separated by ":") and then execute the code until endscript is found.
For example, this is part of the fishing script I use:
Code:
here;f, => Difines position F in the script
scan;112;128;184;168;210, => Scans for the color 210 within 112:128 and 184:168
mov;sx;sy, => Move mouse where the color was found
rck, => Right click
mov;450;450, => Move the mouse
lck => Left click
mov;672;436, lck, => Move the mouse to a button and click it
endscan, => End loop.
As long as the color 210 is found within those 2 coords, the script will loop. It will only move past the scan loop when the color(s) is(are) not found anymore.