OK, this is part of a Bone Burying script I'm going to make for my First Script.
Basically, this part should be able to bury a full inventory of bones. However, when I test it it only buries 1, and then stops.
Can someone tell me what I've done wrong and how to fix it?
Thanks.
SCAR Code:
program BoneBurier;
{.include SRL\SRL.scar}
var
BoneDTM, xpos, ypos, BuryCount: integer;
function FindBone: Boolean;
begin
if(FindDTM(BoneDTM, xpos, ypos, 550, 200, 740, 470)) then
begin
Writeln('Found a bone...');
Result := True
end else
begin
Result := False
end;
end;
procedure RightClickBury;
begin
Mouse(xpos, ypos, 5, 5, False);
if(ChooseOption('ury')) then
begin
BuryCount := BuryCount + 1;
end else
begin
WriteLn('Could not press Bury :O');
end;
end;
procedure BuryThem;
begin
repeat
FindBone;
if(RBoolEx(6)) then
begin
RightClickBury; // AntiBan - randomly right clicks and chooses Bury
end else
begin
Mouse(xpos, ypos, 5, 5, True);
BuryCount := BuryCount + 1;
end;
Wait(600 + random(70));
until (FindBone);
end;
procedure SetUp;
begin
SetupSRL;
ActivateClient;
BoneDTM := DTMFromString('78DA633CC0C4C0F09801055CBB70814104483' +
'302F17F2060DC0C54F390010D302291407A3F50CD6D026ACE02D5' +
'3C455561A0A080AA662F50CD5B02E61C05AAB9875F0D00A8F510E' +
'3');
end;
begin
SetUp;
BuryThem;
Writeln(IntToStr(BuryCount));
end.