Results 1 to 3 of 3

Thread: My OpenDoor and BuyRune function

  1. #1
    Join Date
    May 2007
    Location
    Canada
    Posts
    261
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default My OpenDoor and BuyRune function

    Well, all this does is pretty much open a door. Returns true if the door was found and opened.
    SCAR Code:
    function OpenDoor(bmp: Integer): Boolean;
    var
      t, tx, ty: Integer;
    begin
      while (t < 65) do
      begin
        t := t + 5;
        if (FindBitmapToleranceIn(BMP, tx, ty, MSX1, MSY1, MSX2, MSY2, t)) then
        begin
          Mmouse(tx, ty, 0, 0);
          if(IsUpTextMulti('Open', 'pe', 'pen')) then
          begin
            Mouse(tx, ty, 0, 0, True);
            Result := True;
            WriteLn('Somebody closed the door! He is teh neebcake =O Door opened.');
          end;
        break;
        end;
      end;
      FreeBitmap(BMP);
    end;


    For these next procedures to work you must have {.include SRL/SRL/Misc/Amount.scar} included in your script.

    Procedure BuyRune will check to see if shop has that specific rune in stock, and will buy the rune until the shop runes out of stock or you run out of money.
    SCAR Code:
    procedure ClickRune(runetype : String);
    var
      rBMP, i: Integer;
    begin
      rBMP := LoadRune(runetype);
      i:= Random(6);
      if(FindBitmapToleranceIn(rBMP, x, y, 23, 61, 494, 315, 90)) then
       begin
         wait(200 + random(100));
         Mouse(x, y, 4, 4, false);
         wait(200 + random(100));
         Case Random(5) of
           0: ChooseOption(x,y,'uy 10');
           1: ChooseOption(x,y,'uy 1');
           2: ChooseOption(x,y,'uy 5');
           3: ChooseOption(x,y,'uy 10');
           4: ChooseOption(x,y,'uy 10');
         end;
         if(i = 0) then PickUpMouse else wait(400 + random(300)); // My antiban
         FreeBitmap(rBMP);
         end;
    end;

    procedure BuyRune(runetype: String);
    begin
      wait(200 + random(100));
      if(((RuneAmount('shop',runetype)) > 0))then
      repeat
        ClickRune(runetype);
      until(((RuneAmount('shop',runetype)) = 0) or(InChat('enough coin')));
    end;


    Hope these functions/procedures were usefull to you in some way
    On vacation from July 2nd till middle of August


    Account Creator and Tutorial Island Runner (member | public) Errors fixed


    Check out my Complete forms tutorial. It will teach you everything you need to know about forms.

  2. #2
    Join Date
    Nov 2006
    Location
    NSW, Australia
    Posts
    3,487
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Oo it opens doors. I hope it's as good as Nielsie's door opener...
    [CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
    [CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]

    [CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]

  3. #3
    Join Date
    May 2007
    Location
    Canada
    Posts
    261
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I doubt its as good, but it does its job right Never failed me yet.
    On vacation from July 2nd till middle of August


    Account Creator and Tutorial Island Runner (member | public) Errors fixed


    Check out my Complete forms tutorial. It will teach you everything you need to know about forms.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 02-26-2008, 08:26 PM
  2. OpenDoor
    By n3ss3s in forum Research & Development Lounge
    Replies: 21
    Last Post: 12-29-2007, 02:15 PM
  3. [FUNCTION] FindDoorColour: integer; By ZephyrsFury [FUNCTION]
    By ZephyrsFury in forum Research & Development Lounge
    Replies: 10
    Last Post: 07-27-2007, 08:45 AM
  4. My opendoor Function(worked on everydoor i tried)
    By Bramble in forum RS3 Outdated / Broken Scripts
    Replies: 7
    Last Post: 12-12-2006, 10:43 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
  •