rj
2012-12-01 20:06:00
In my script, the procedures walkbank and use bank repeat for some reason and its making me mad.
Heres what the script does:
withdraws raw fish
uses them on range
chooses cook all
waits for all the raw fish to disapear.
walks to the bank(clicking the bank minimap icon)
opens the bank
hits store all
clicks the minimap icon
opens the bank
hits store all
clicks the minimap icon
opens the bank
hits store all
clicks the minimap icon
opens the bank
hits store all
so on and so on until i stop it..
Heres the script:
Heres what the script does:
withdraws raw fish
uses them on range
chooses cook all
waits for all the raw fish to disapear.
walks to the bank(clicking the bank minimap icon)
opens the bank
hits store all
clicks the minimap icon
opens the bank
hits store all
clicks the minimap icon
opens the bank
hits store all
clicks the minimap icon
opens the bank
hits store all
so on and so on until i stop it..
Heres the script:
program Cook;
{$i srl/srl.simba}
const
rawfishcol=5927257;
cookrange=7633898;
cookfish=12868;
minimap=2216175;
bank=1857394;
bankx=305;
banky=61;
bankxtwo=404;
bankytwo=131;
var
cookall,usebank,cookicon: Integer;
procedure backpack;
var
X, Y: Integer;
begin
if FindColorTolerance(X,Y,4578368,350,296,381,320,5) then
begin
MouseSpeed:=15;
mmouse(x, y,1,1);
Wait(250 + Random(150));
ClickMouse(X, Y, mouse_Left);
Wait(1200 + Random(900));
end;
end;
procedure bankfish;
var
X, Y: Integer;
begin
Writeln('Looking for bank . . .')
if FindColorTolerance(X,Y,bank,bankx,banky,bankxtwo,bankytwo,5) then
begin
MouseSpeed:=15;
mmouse(x, y,1,1);
Writeln('Found bank.')
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Right);
Wait(900 + Random(250));
FindBitmapToleranceIn(usebank, X, Y,31, 93, 455, 304, 165)
MouseSpeed:=40;
mmouse(x, y,1,1);
WriteLn('Opened Bank!');
Wait(500 + Random(120));
ClickMouse(X, Y, mouse_Left);
Wait(1500 + Random(250));
backpack;
end;
end;
procedure walkbank;
var
X, Y: Integer;
begin
if FindColorTolerance(X,Y,minimap,555,85,630,122,5) then
begin
mmouse(x, y,1,1);
Wait(600 + Random(150));
ClickMouse(x, y, mouse_Left);
Wait(6500 + Random(1500));
bankfish;
end;
end;
procedure checkcook;
var
X, Y: Integer;
begin
if FindColorTolerance(X,Y,rawfishcol,566,217,715,454,5) then
begin
Wait(600 + Random(150));
checkcook;
end;
walkbank;
end;
procedure choosefish;
var
X, Y: Integer;
begin
if FindColorTolerance(X,Y,cookfish,207,379,300,452,5) then
begin
MouseSpeed:=17;
mmouse(x, y,1,1);
Wait(600 + Random(150));
ClickMouse(x, y, mouse_Right);
Wait(800 + Random(150));
FindBitmapToleranceIn(cookall, X, Y,194, 351, 311, 478, 155)
mmouse(x, y,1,1);
Wait(600 + Random(150));
ClickMouse(x, y, mouse_Left);
checkcook;
end;
end;
procedure cookfisha;
var
X, Y: Integer;
begin
if FindColorTolerance(X,Y,cookrange,374,12,503,121,5) then
begin
if FindColorTolerance(X,Y,rawfishcol,558,218,718,455,5) then
begin
MouseSpeed:=17;
mmouse(x, y,1,1);
Wait(600 + Random(150));
ClickMouse(x, y, mouse_Left);
Wait(600 + Random(150));
if FindColorTolerance(X,Y,cookrange,374,12,503,121,5) then
begin
mmouse(x, y,1,1);
Wait(600 + Random(150));
ClickMouse(x, y, mouse_Left);
Wait(7800 + Random(150));
choosefish;
end;
end;
end;
end;
procedure closecook;
var
X, Y: Integer;
begin
if FindColorTolerance(X,Y,8421504,423,29,491,45,15) then
begin
Wait(800 + Random(150));
Writeln('Closing bank . . .')
MouseSpeed:=20;
mmouse(x, y,1,1);
Wait(250 + Random(150));
ClickMouse(x, y, mouse_Left);
Wait(700 + Random(150));
cookfisha;
end;
end;
procedure withdrawfish;
var
X, Y: Integer;
begin
if FindColorTolerance(X,Y,rawfishcol,261,124,389,235,5) then
begin
MouseSpeed:=15;
mmouse(x, y,1,1);
Wait(350 + Random(150));
ClickMouse(x, y, mouse_Right);
MouseSpeed:=10;
Wait(750 + Random(150));
mmouse(x, y+65,1,1);
ClickMouse(x, y, mouse_Left);
closecook;
end;
end;
begin
cookall := BitmapFromString(21, 15, 'meJyTUdeWGVA0dccxICJSGaZKiC' +
'ADAwNBvUA1mCYQ1A5XAFGDZgLx2vFzcQUC3NfICE07mgtxOR5uC6Z' +
'2rHqJdDye6KOK3wlqx5WE8GsHImRfYw0BNEFcoURnBAAo+e/w');
usebank := BitmapFromString(38, 13, 'meJyTUdeWoTuauuMYEOHiko3+/2' +
'dARpg2MjAwYOVSaCMEoFlKaxvR2IPQRggXjtBCBk+ko8UjBBC0Ec5' +
'GBmjiuCwlOx7xeBDNdirGI6Zf0IIaOcSIsVEGKQ8iG4JmAv7QJinl' +
'4HI2fr/gSlHEpBy00ENzNlZBglJEKqAPAgANRYUm');
cookicon := BitmapFromString(9, 11, 'meJw7cICaQPDfP2HrFAiSjV4DJOH' +
'iTH/+MDIwICNeJWseRT+gOBBBFAMRUASIIFJANQx372JKLQADoCxW' +
'KYiNaFIQLXB3LkACRHoNAJkkmKw=');
repeat
withdrawfish;
until False;
FreeBitmap(cookall);
FreeBitmap(usebank);
FreeBitmap(cookicon);
end.