SRL Archive - SRL Archives

Drop all by 1 bitmap


m0u53m4t

2006-09-24 08:25:43

I had troubles with my autominer, so now I just use this. Feel free to use it with anything you want.
program Test;
{.include SRL\SRL.scar}
var copper: integer;

Procedure DropAllOf(ItemBmp: Integer; ItemName: String);
begin
Repeat
If (FindBitmapToleranceIn(ItemBmp, x, y, MIX1, MIY1, MIX2, MIY2,30)) Then
begin
MMouse(x, y, 5, 5);
Wait(300);
GetMousePos(x, y);
If (IsUpText(ItemName)) then
begin
Mouse(x, y, 0, 0, False);
Wait(300);
ChooseOption(x, y, 'Drop');
Wait(1000);
end;
end;
Until(Not (FindBitmapToleranceIn(ItemBmp, x, y, MIX1, MIY1, MIX2, MIY2,30)));
end;

begin
copper:= BitmapFromString(9, 14, 'z78DA3333333333777523119851499' +
'70106C0AF0B971A4C71625C48AA2E625C488C7AFCA1417C189217' +
'1A0678012D6279B0E90200AC99C219');
SetUpSRL;
ActivateClient;
DropAllOf(copper, 'Copper ore');
end.

WT-Fakawi

2006-09-24 08:29:50

Good thinking, but why not just use:

ClickAllItemsBmpTolWait('rop', copper, 50); 

Works too :)

_ChArMz

2006-09-24 11:55:31

From: WT-Fakawi
Good thinking, but why not just use:

ClickAllItemsBmpTolWait('rop', copper, 50); 

Works too :)


Yes, and if it is misclicking some, just do this:


Repeat
ClickAllItemsBmpTolWait('rop', Copper, 10);
Until(not(FindBitmapToleranceIn(Copper, x, y, MIX1, MIY1, MIX2, MIY2, 10));

WT-Fakawi

2006-09-24 13:02:07

haha n1!:duh:

Yakman

2006-09-24 13:39:47

you should add a fail-safe in that _ChArMz, something like this


var fs:integer;
marktime(fs)
Repeat
ClickAllItemsBmpTolWait('rop', Copper, 10);
if(timefrommark(fs)>25000)then break
findnormalrandoms
Until(not(FindBitmapToleranceIn(Copper, x, y, MIX1, MIY1, MIX2, MIY2, 10));

also you might want to add a FindNormalRandoms incase it misses one

m0u53m4t

2006-10-14 07:23:54

Ah.. good idea. I didn't think of that…