GetMousePos(Orex,Orey);
MMouse(Orex,Orey,0,0);
wait(600);
What's that for???
Make a DTM of any ore (not clay), by clicking the black (65536) outline in about 10 places, with the first dot being near the top. Test it to make sure it picks up on ores but not gems. You'll have to add in clay separately if you want to.
SCAR Code:
function CoordsToInvSpot(gx,gy:integer):integer;
var col,row:integer;
begin
if ((gx>569) and(gx<600)) then col:=1;
if ((gx>611) and(gx<642)) then col:=2;
if ((gx>653) and(gx<684)) then col:=3;
if ((gx>695) and(gx<723)) then col:=4;
if ((gy>213) and(gy<244)) then row:=1;
if ((gy>249) and(gy<280)) then row:=2;
if ((gy>285) and(gy<316)) then row:=3;
if ((gy>322) and(gy<352)) then row:=4;
if ((gy>357) and(gy<387)) then row:=5;
if ((gy>393) and(gy<424)) then row:=6;
if ((gy>429) and(gy<459)) then row:=7;
result:=((row-1)*4)+col;
end;
procedure DropOres;
var ex,ey:integer;
begin
repeat
if finddtm(dtmOre,ex,ey,MIX1, MIY1, MIX2, MIY2) then
begin
mouseitem(coordstoinvspot(ex,ey+10),false);
chooseoption(x,y,'rop');
end;
until not(finddtm(dtmOre,ex,ey,MIX1, MIY1, MIX2, MIY2));
end;