F
Firefox5330
Guest
Im new to scar and i was just playing around with the Unmatched Scar Scripting Tutorial For Beginners by WhoCares357 and i made my own script to just drop all coal in my invy again i wouldnt drop my coal just a test but when i run the script it just drop everything but keeps going and the script doesnt stop... heres the script. You probally cant run it because it has a bmp in it but that just drops it. I used
procedure FindCoal;
begin
if(findcolor(z,c,coal,550,200,740,465)) then
begin
writeln('Found color.');
MoveMouse(z,c);
wait(200+random(100));
ClickMouse(z,c,false);
wait(200+random(100));
FindBMP;
end else
writeln('Didn''t find color.');
wait(200)
i:= i + 1
writeln('I equals ' + inttostr(i) + '.')
end;
begin
LoadBMP;
repeat
FindCoal
wait(200);
until(i = 1)
end.
and it just keeps going so plz write back. Also can u give me hints to make it more efficiant later on. thx
procedure FindCoal;
begin
if(findcolor(z,c,coal,550,200,740,465)) then
begin
writeln('Found color.');
MoveMouse(z,c);
wait(200+random(100));
ClickMouse(z,c,false);
wait(200+random(100));
FindBMP;
end else
writeln('Didn''t find color.');
wait(200)
i:= i + 1
writeln('I equals ' + inttostr(i) + '.')
end;
begin
LoadBMP;
repeat
FindCoal
wait(200);
until(i = 1)
end.
and it just keeps going so plz write back. Also can u give me hints to make it more efficiant later on. thx
Code:
program coalDropper;
var
x,y,z,c,i,drop:Integer;
const
coal= 2571067;
procedure LoadBMP;
begin
Drop := BitmapFromString2(False, 'aC9C8378DAED93410AC0200C0' +
'4BF946A12EDB1B5F8FF27D558288228112F169AC3A2610D23AE00' +
'00874F021492D853D66C65CD9B111501E3512CD94391DF3EE6BED' +
'B65E3288ABA6798380D87D828BA08D1ADA3251BE45A93B6E6ACFB' +
'5FE12CFB5FE1D4E77934F97DFF3C2714D53ADB4FBEC63FC35913C' +
'EDF5DF37633337F4E4D69B237FA2FFA335BFE1B2B0');
end;
procedure FindBMP;
begin
if(findBitmap(drop,x,y)) then
begin
MoveMouse(x,y)
wait(200+random(100));
ClickMouse(x,y,true);
end else
writeln('Didn''t find BMP.');
wait(200);
end;
procedure FindCoal;
begin
if(findcolor(z,c,coal,550,200,740,465)) then
begin
writeln('Found color.');
MoveMouse(z,c);
wait(200+random(100));
ClickMouse(z,c,false);
wait(200+random(100));
FindBMP;
end else
writeln('Didn''t find color.');
wait(200)
i:= i + 1
writeln('I equals ' + inttostr(i) + '.')
end;
begin
LoadBMP;
repeat
FindCoal
wait(200);
until(i = 1)
end.


