Mining script
Posted: Mon May 21, 2012 2:51 pm
I would like to code a script for mining but my coding knowledge is really really basic.
I have an idea for this and would like to know it this could work.
Well, the idea is to scan the screen but the bars zone. So lets say this zone starts in pixel (1,200) and ends in pixel (1000,600).
Do you think this structure could work? Anything I'm missing there?
I have an idea for this and would like to know it this could work.
Well, the idea is to scan the screen but the bars zone. So lets say this zone starts in pixel (1,200) and ends in pixel (1000,600).
Code: Select all
Target = blue -- this in rgb values with a little offset
for i = 0,100 do
for j = 0,40 do
r,g,b = getPixel(win, 1+10*i, 200+10*j); -- this should scan every 10 pixels from zone start (not needed to scan every pixel)
if r,g,b = target then
movemouse to (1+10*i, 200+10*j)
click
yrest (7000) -- mining time
pickup
end
end