Results 1 to 9 of 9

Thread: HOpenBank

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

    Default HOpenBank

    Hey, I made a New bank opener!(for the blind people this is the junior section)

    Features:
    - Handles Pin
    - in 1 mouse move and fast!
    - I am pretty sureIi am going to use this in the future because it works great and does what it haves to do!

    SCAR Code:
    Program Hermpie;
    {.Include SRL/SRL.Scar}


    Function IsBankOpen(MaxTime:Integer; CheckForPinScreen:Boolean):Boolean;
    Var
      Timer :Integer;
    Begin
      MarkTime(Timer);
      Repeat
        Wait(100);
        If CheckForPinScreen Then Result:=PinScreen;
        If Result Then Break;
      Until (BankScreen or (TimeFromMark(Timer) > MaxTime));
      Result:= TimeFromMark(Timer) < Maxtime;
      If Not Result Then Writeln('Failed To Find The BankScreen.');
    End;


    //By Hermpie
    Function HOpenBank(WhichBank :String; HPin:Integer):Boolean;
    Var
      TempTpa: TpointArray;
      Temp: T2DPointArray;
      H, CTS, I, MSpeed, TempX, TempY, HColor, M:Integer;
    Begin
      M:=GetSystemTime;
      Case LowerCase(WhichBank) Of
        'feb','falador east':HColor:= 2243147;//4481401
        'fwb','falador west':HColor:= 3496051;//4481401
        'veb','varrock east':HColor:= 2050647;//2838878
        'vwb','varrock west':HColor:= 1653574;
        'akb','alkharid':HColor:= 738138;
        'dnb','draynor':HColor:= 5929095;
        'evb','edgevillage':HColor:= 2636871;
        'pcb','pestcontrol':HColor:=11647942;
      End;
      If HColor < 1 Then Writeln('Your Choice Is A Not Existing Bank.');
      If (lowercase(WhichBank)='dnb') or (lowercase(WhichBank)='draynor') Then MakeCompass('W') else MakeCompass('N');
      MSpeed:=MouseSpeed;
      MouseSpeed:=20;
      if not LoggedIn Then Exit;
      CTS := GetColorToleranceSpeed;
      If not CTS = 2 Then ColorToleranceSpeed(2);
      FindColorsSpiralTolerance(TempX, TempY, TempTPA, HColor, MSX1+10, MSY1+10, MSX2-10, MSY2-10, 10);
      Temp:= TPAtoATPAEx(TempTPA, 17, 18);
      SortATPASize(Temp, True);
      H:=High(Temp);
      For I := 0 To H Do
      Begin
        MiddleTPAEx(Temp[i], TempX, TempY);
        MMouse(TempX, TempY, 3, 3);
        Wait(30+random(10));
        Result:=IsUpText('ank');
        If Result Then Break;
      End;
      If Result Then
      Begin
        Mouse(TempX, TempY, 0, 0, False);
        Wait(40+random(10));
        Result:=ChooseOption('uickly');
        If Result Then Result:=IsBankOpen(5000,True);
        If Pinscreen Then Result:= InPin(InttoStr(HPin));
        If Result Then Result:=IsBankOpen(5000,False);
      end;
      If Result Then Writeln('HOpenBank Succesfully Openend The Bank. In '+IntToStr(GetSystemTime - M)+' MiliSecs.');
      If Not result Then Writeln('HOpenBank Did Not Open The Bank. ');
      ColorToleranceSpeed(CTS);
      MouseSpeed:=MSpeed;
      MakeCompass('N');
    End;

    Begin
      SetUpSRL;
      ActivateClient;
      HOpenBank('Draynor',1000);
    End.
    I could also take the 'Useless' Debug out of it but it works great!

    So What You Think Of It?

    Hermpie
    Yes, I should re pick all the colours.
    ~Hermen

  2. #2
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    I like this Hermpie, Because Instead of Doing it seperately, It checks for The Pin Screen aswell .

    I think SRL might need to take an idea based on this.
    Good Work

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

    Default

    Thanks,The good thing of this is it is fast, most of the time in 1 click and it handles click the bank + solving pin so kinda from clicking to the bank screen.
    i maybe have to take that changing mouse speed out else it will go to the bank like hell and then the normal mousespeed again.

    Hermpie
    ~Hermen

  4. #4
    Join Date
    Jul 2007
    Location
    Ohio
    Posts
    1,103
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I may want to use this in my script... Can I? It looks really good and I want to use it. I may add it after I am done with my script if i notice my banking isnt working well. Good Job!

  5. #5
    Join Date
    Sep 2007
    Posts
    415
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by king of the nites View Post
    I may want to use this in my script... Can I? It looks really good and I want to use it. I may add it after I am done with my script if i notice my banking isnt working well. Good Job!
    i'm not hermpie, but would he post it in the public test corner if he didn't want you to use it?

    nice function hermpie
    Quote Originally Posted by That guy that wrote forefeathers
    <munklez>haha im too lazy, girls annoy me
    <munklez> they always wanna like, do stuff
    <munklez> and i just wanna program
    <munklez> and they always take all my money

  6. #6
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    here is my universal bank finder:
    SCAR Code:
    function findbank(var x,y : integer): boolean;
    var
      tpa,tpa2,tpa3 : tpointarray;
      atpa : t2dpointarray;
      tcts,t : integer;
    begin
      tcts := getcolortolerancespeed;
      t := getsystemtime;
      colortolerancespeed(2);
      setcolorspeed2modifiers(0.5, 1.0);
      findcolorsspiraltolerance(mscx, mscy, tpa, 5002587, msx1, msy1, msx2, msy2, 4);
      setcolorspeed2modifiers(0.2, 0.2);
      colortolerancespeed(3);
      setcolorspeed3modifiers(8);
      findcolorsspiraltolerance(mscx, mscy, tpa2, 5199193, msx1, msy1, msx2, msy2, 2);
      setcolorspeed3modifiers(4);
      colortolerancespeed(tcts);
      tpa3 := combinetpa(tpa, tpa2);
      if length(tpa3) < 1 then exit;
      atpa := splittpaex(tpa3, 3, 1);
      if length(atpa) < 1 then exit;
      for i := 0 to high(atpa) do
      begin
        middletpaex(atpa[i], x, y);
        mmouse(x, y, 3, 3);
        wait(50 + random(50));
        if pos('ank', rs_getuptext) > 0 then
        begin
          writeln('finding a bank took: '+inttostr(getsystemtime - t));
          result := true;
          getmousepos(x, y);
          exit;
        end;
      end;
    end;
    A bit slower than your becouse it use HSL + XYZ. Anyway, good job hermpie


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

    Default

    Quote Originally Posted by Cazax View Post
    here is my universal bank finder:
    SCAR Code:
    function findbank(var x,y : integer): boolean;
    var
      tpa,tpa2,tpa3 : tpointarray;
      atpa : t2dpointarray;
      tcts,t : integer;
    begin
      tcts := getcolortolerancespeed;
      t := getsystemtime;
      colortolerancespeed(2);
      setcolorspeed2modifiers(0.5, 1.0);
      findcolorsspiraltolerance(mscx, mscy, tpa, 5002587, msx1, msy1, msx2, msy2, 4);
      setcolorspeed2modifiers(0.2, 0.2);
      colortolerancespeed(3);
      setcolorspeed3modifiers(8);
      findcolorsspiraltolerance(mscx, mscy, tpa2, 5199193, msx1, msy1, msx2, msy2, 2);
      setcolorspeed3modifiers(4);
      colortolerancespeed(tcts);
      tpa3 := combinetpa(tpa, tpa2);
      if length(tpa3) < 1 then exit;
      atpa := splittpaex(tpa3, 3, 1);
      if length(atpa) < 1 then exit;
      for i := 0 to high(atpa) do
      begin
        middletpaex(atpa[i], x, y);
        mmouse(x, y, 3, 3);
        wait(50 + random(50));
        if pos('ank', rs_getuptext) > 0 then
        begin
          writeln('finding a bank took: '+inttostr(getsystemtime - t));
          result := true;
          getmousepos(x, y);
          exit;
        end;
      end;
    end;
    A bit slower than your becouse it use HSL + XYZ. Anyway, good job hermpie
    Thanks good Job To!
    And Yes Every One can use it!
    ~Hermen

  8. #8
    Join Date
    Oct 2007
    Location
    brooklyn, new york
    Posts
    258
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

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

    Default

    Thanks
    ~Hermen

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. HOpenBank Is Not Working :'(
    By ShowerThoughts in forum OSR Help
    Replies: 10
    Last Post: 05-18-2008, 07:28 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
  •