Results 1 to 11 of 11

Thread: HOpenBank Is Not Working :'(

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

    Default HOpenBank Is Not Working :'(

    I worked in the beginning but now it always says, HOpenBank Did Not Open The Bank. But It always opens the bank! so there is something wrong :S.

    SCAR Code:
    Program LMAO;
    {.Include SRL/SRL.Scar}
    Var
      X, Y:Integer;

    Function HIsBankOpen(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;

    Function HUptext(Text:TStringArray):boolean;
    Var
      MaxTime:Integer;
    Begin
      MarkTime(MaxTime);
      Repeat
        Wait(10);
        Result:= IsUpTextMultiCustom(Text);
      Until (result Or (TimeFromMark(MaxTime)>100));
      Result:=TimefromMark(MaxTime)<100
    End;

    Function HOption(Text:string):boolean;
    Var
      MaxTime:Integer;
    Begin
      MarkTime(MaxTime);
      repeat
        Wait(10);
        Result:= ChooseOption(Text);
      Until result Or (TimeFromMark(MaxTime) > 100);
      Result:= TimefromMark(MaxTime) < 100 ;
    End;

    Function HOpenBank:Boolean;
    Var
      TempTpa: TpointArray;
      Temp: T2DPointArray;
      H, CTS, I, TempX, TempY, M:Integer;
    Begin
      If Not BankScreen Then If Not LoggedIn Then Exit;
      M:=GetSystemTime;
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      FindColorsSpiralTolerance(TempX, TempY, TempTPA, 2575958, MSX1+120, MSY1+120, MSX2-120, MSY2-120, 10);//738138
      Temp:= TPAtoATPAEx(TempTPA, 15, 15);
      SortATPASize(Temp, True);
      H:=High(Temp);
      For I := 0 To H Do
      Begin
        MiddleTPAEx(Temp[i], TempX, TempY);
        Writeln('Found The Bank In '+IntToStr(GetSystemTime - M)+' MiliSecs.');
        MMouse(TempX, TempY, 0, 0);
        Result:=HUpText(['erald']);
        If Result Then Break;
        Wait(100);
      End;
      If Result Then
      Begin
        Mouse(TempX, TempY, 0, 0, False);
        Result:=HOption('ank');
        If Result Then Result:=HIsBankOpen(10000,True);
        If Pinscreen Then Result:= InPin(InttoStr(Players[CurrentPlayer].Integers[0]));
        If Result Then Result:=HIsBankOpen(10000,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);
      MakeCompass('N');
    End;

    Begin
      SetUpSRL;

    End.
    ~Hermen

  2. #2
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    First of all, why are you doing MSX1 + 120, MSY1 + 120, etc?
    Second, try using CTS2 modifiers. They're very useful.

  3. #3
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    @bullzeye: He said it opens it, but WriteLn's that it was not opened =]

    Try changing
    SCAR Code:
    If Result Then
      Begin
        Mouse(TempX, TempY, 0, 0, False);
        Result:=HOption('ank');
        If Result Then Result:=HIsBankOpen(10000,True);
        If Pinscreen Then Result:= InPin(InttoStr(Players[CurrentPlayer].Integers[0]));
        If Result Then Result:=HIsBankOpen(10000,False);
      end;
    to
    SCAR Code:
    If Result Then
      Begin
        Mouse(TempX, TempY, 0, 0, False);
        Result:=HOption('ank');
        If Result Then Result:=HIsBankOpen(10000,True);
        If Pinscreen Then Result:= InPin(InttoStr(Players[CurrentPlayer].Integers[0]));
        If Result Then Result:=HIsBankOpen(10000,False);
        Result := True;
      end;
    and tell me how it works then Just a guess...


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  4. #4
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    Come on BullZeye he doesn't need them for that

    0.2, 0.2 are just fine for finding the bank booth, otherwise it'd be like changing the CTS to find 65536

    Harry, your "fix" beats the entire purpose of that part of the function, the result is supposed to depend on the functions...

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

    Default

    Becouse you set it back to the original CTS at the end, you should do that after you find the color with cts at 2.


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

    Default

    Good Advices! Harry N3ss3s is right.
    But still no fix :s
    ~Hermen

  7. #7
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    @n3ss3s: He only has it begin if Result = True already...


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

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

    Default

    Quote Originally Posted by Hy71194 View Post
    @n3ss3s: He only has it begin if Result := True already...
    Open Your eyes

    in those 3 lines 3 times if something = true Then Result:= Booleanhere
    ~Hermen

  9. #9
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Why do you have this?:
    SCAR Code:
    Result:= ChooseOption(Text);
      Until result Or (TimeFromMark(MaxTime) > 100);
      Result:= TimefromMark(MaxTime) < 100 ;
    Instead, replace it with:
    SCAR Code:
    Result:= ChooseOption(Text);
      Until result;
    The timing is probably the reason why it is causing it, because maybe it is going over time.

    Or you could do something like this:
    SCAR Code:
    Function HOption(Text:string; Time: Integer):boolean;
    Var
      MaxTime:Integer;
    Begin
      MarkTime(MaxTime);
      repeat
        Wait(10);
        Result:= ChooseOption(Text);
      Until result Or (TimeFromMark(MaxTime) > Time);
      Result:= TimefromMark(MaxTime) < Time;
    End;
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  10. #10
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    IP-Drowner's seems like the most likely solution if you aren't getting any debug messages saying that something didn't work, though to actually pin point the problem, I would say throw in a crap load of WriteLn's everywhere so you find out where Result is assigned to False, though if it does open it and everything, then I would say the problem would be "If Result Then Result:=HIsBankOpen(10000,False);" as that's the last possible place Result could be assigned to False while the script still opens the bank
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

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

    Default

    I Fixed it it was HOption it is working great now
    ~Hermen

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. HOpenBank
    By ShowerThoughts in forum Research & Development Lounge
    Replies: 8
    Last Post: 05-15-2008, 06:26 PM
  2. ~~~~Working Edge cooker WORKING~~~
    By NiCbaZ in forum RS3 Outdated / Broken Scripts
    Replies: 5
    Last Post: 10-29-2007, 11:16 PM
  3. not working
    By s1cky in forum OSR Help
    Replies: 6
    Last Post: 10-16-2007, 12:07 AM
  4. [Working on].:Autoseller:.[/Working on]
    By dritar in forum First Scripts
    Replies: 10
    Last Post: 10-07-2007, 06:13 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
  •