Results 1 to 7 of 7

Thread: Draynor Bank Opener

  1. #1
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Draynor Bank Opener

    Idk...Just started really messing with it today. First function I've made along the lines of this. Criticism accepted.

    SCAR Code:
    function FindDBank : boolean;
    var
      DBankCol: array of integer;
      x, y, DBankCols, Started, Count: integer;
      Result1: boolean;
    begin
      repeat
        MakeCompass('W');
        Inc(Count);
      until(Count=5);
      SetArrayLength(DBankCol, 9);
      DBankCol := [4871001, 2049368, 7566199, 5598072, 3421240, 5462111, 2247776, 5461592, 3422267];
      MarkTime(Started);
      repeat
        for DBankCols := 0 to 8 do
          if FindColorSpiralTolerance(x, y, DBankCol[DBankCols], MSCX-200, MSCY-200, MSCX+200, MSCY+200, 15) then
            Result1 := True;
      until(Result1);
        MMouse(x, y, 2, 2);
        Wait(100);
        if IsUpText('ank booth') then
          Mouse(x, y, 1, 1, False);
        ChooseOption('uickly');
        if BankScreen then
          Result := True;
        WriteLn('Found in: ' + IntToStr(TimeFromMark(Started)) + ' msec.');
    end;

    Also, tell me what I can improve on.

    Usage:
    SCAR Code:
    if FindDBank then
      Withdraw(1, 1, 5);

    Requirements: Be standing in front or very close to one of the bank booths.

  2. #2
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Why you use result1? you could just use result and not bad, for a first time?
    ~Hermen

  3. #3
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I used Result1 because I didn't want the script to stop right after it found the bank color. And, thanks!

    This is honestly the first time I've ever used FindColorSpiralTolerance =/.

  4. #4
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Result doesn't make the whole procedure end
    ~Hermen

  5. #5
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh. I thought that whenever the function became true that it was exited.

  6. #6
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    LOL, that would be an disaster.
    ~Hermen

  7. #7
    Join Date
    Apr 2007
    Posts
    2,593
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I know. That's why I put that in there. Lol. I guess I was wrong =/.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Draynor Willow Cut N Bank
    By kingstun in forum RS3 Outdated / Broken Scripts
    Replies: 9
    Last Post: 07-29-2009, 12:55 PM
  2. Fally bank opener
    By ~alex~ in forum RS3 Outdated / Broken Scripts
    Replies: 3
    Last Post: 04-02-2007, 02:58 AM

Posting Permissions

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