Results 1 to 3 of 3

Thread: Problems with Bone Burying

  1. #1
    Join Date
    Jul 2008
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Problems with Bone Burying

    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.

  2. #2
    Join Date
    Jun 2007
    Location
    La Mirada, CA
    Posts
    2,484
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    your repeating until FindBone, so if it finds a bone in the inventory it stops as easy as that...

    change until FindBone to Until Not(FindBone); and it should work

    that's in the BuryThem procedure..

    "Failure is the opportunity to begin again more intelligently" (Henry Ford)


  3. #3
    Join Date
    Jul 2008
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I HATE it when I make a stupid mistake like that!

    Thanks for pointing it out!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Bone?
    By Goodpeople in forum OSR Help
    Replies: 10
    Last Post: 01-27-2009, 03:41 AM
  2. Burying Bones?
    By D1zl3 in forum OSR Help
    Replies: 12
    Last Post: 11-05-2008, 07:07 AM
  3. New Zombie Bone-Burying Coffin Random?
    By Kik in forum News and General
    Replies: 0
    Last Post: 08-24-2007, 02:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •