Nebula
2011-12-25 23:57:52
Hello I'm working on a script that requires the withdrawal of items. Everything works fine, however once the bank opens up it does not withdraw the items as I would like it to. could someone please read-over my script and help me? Thanks :)
program NebulaPastries;
{$I SRL/SRL.scar}
var
a, b, count:integer;
procedure Banking;
begin
wait(50+random(100));
SetAngle(true);
writeln('banking');
repeat
inc(count);
a :=MSCX
b :=MSCY
FindColorSpiralTolerance(a, b, 6898000, MSX1, MSY1, MSX2, MSY2, 12);
Mouse(a, b, 2, 2, false);
until
(ChooseOption('nk Ba')) or (count>8);
if (count>8) then
begin
writeln('couldnt find the banker, ending');
TerminateScript;
end else
if PinScreen then
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin)
else
begin
writeln('No pin entered');
TerminateScript;
end;
wait(750+random(500));
withdraw(10, 4, 14);
wait(400+random(300));
withdraw(10, 5, 14);
end;
begin
SetupSRL;
ActivateClient;
Banking;
end.