Results 1 to 9 of 9

Thread: My Script Can't Find Anything. Need Help

  1. #1
    Join Date
    Jul 2008
    Location
    US
    Posts
    104
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default My Script Can't Find Anything. Need Help

    Okay, I was wondering, I've updated my SRL Folder, but some of the update icons are still red. Do they all need updating or something, Because my script can not find the bank. If not, Is there something wrong with my script. The Script is in no way perfect. I haven't spent a lot of time on it just yet. A few things aren't done. I tried to keep the standards up, so I hope it's easy to read.

    SCAR Code:
    Program AlKaridSmetler;

    {-----------------------------------------------------|
    |   Title        :  Al-Karid Auto Smelter             |
    |   Author       :  RedDevil12312                     |
    |   Description  :  Smelts Ores Into Bars DUH!        |
    |   Version      :  1.0                               |
    |-----------------------------------------------------|
    |    Credits :  YoHoJo, For overall help with many    |
    |                 questions over scripting.           |
    |               Narlces, I have learned a lot from    |
    |                 just reading his scripts.           |
    |               3Garret3, His tut on TPA Walking      |
    |                 helped me out alot.                 |
    |-----------------------------------------------------|
    |   Instructions                                      |
    |  ~~~~~~~~~~~~~~~                                    |
    |  [1] Fill Out Script Setup Section                  |
    |  [2] Fill Out Declare Players Section               |
    |  [3] Start In Bank                                  |
    |  [4] Read, To Know's Section                        |
    |  [5] Push Play, And Watch A Few Times               |
    |  [6] Enjoy Result :)                               |
    |                                                     |
    |   To Know's                                        |
    |  ~~~~~~~~~~~~                                      |
    |  [1] Its Best To Start With A Empty Inventory      |
    |  [2] Put Ores, In the First and Second Places      |
    |  [3] Put Rings Of Forging In Bank Screen Veiw      |
    |  [4] Its Easy To Add New Ores, So Just Learn       |
    |        And Add To [Procedure BankInst]            |
    |  [5] Report Any Bugs Or Suggestions Please         |
    |-----------------------------------------------------}

       
       
    {.include SRL/SRL.scar}
    {.include srl/srl/Skill/Smithing.scar}
    {.include SRL/SRL/Misc///Reports.scar}
    {.include SRL/SRL/Misc///Debug.scar}

    //  current job :=  Walk to furnace 2

    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    //                  SCRIPT SETUP
    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
       {Default= 15,3,24}
    Const MouseSpeedRate  = 15;  // Speed of Mouse Movements
    Const SmeltingSpeed   = 3;   // Time In Between Inventory Checks, for Smelting- Seconds
    Const AntiBanRate     = 24;  // Chances- 6=100% 12=50% 24=25%   and so on


    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    //                 DECLARE PLAYERS
    //           **************************
    //   To Add More Players, Just Add More Player Forms
    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*


    procedure DeclarePlayers;
    begin
      HowManyPlayers:= 1;              //how many players
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;              //Current player

      With Players[0] Do
      Begin
        Name      := '';    // username
        Pass        := '';   // password
        Nick         := '';         // 3-4 letters of your username, no caps or first letter
        Strings[0]  := 'Bronze';        // Ore To Smelt
        Booleans[0] := False;          // If Smelting Iron, Use Rings Of Forgings?
        Integers[0] := 150;          // Amount to Smelt
        Integers[1] := 60;            // Total time in minutes
        Active      := True;          //Active or not. Until Multiplayer, leave true
       End;
       
    {   With Players[1] Do
       Begin
         Name        := 'UserName';  // Username
         Pass        := 'PassWord';  // Password
         Nick        := 'ser';       // 3-4 letters of your username, no caps or first letter
         Strings[0]  := 'iron';      // Ore To Smelt
         Booleans[0] := True;        // If Smelting Iron, Use Rings Of Forgings?
         Integers[0] := 1000;        //  Amount to Smelt
         Integers[1] := 60;          //  Total time in minutes 0=No Time Limit
         Active      := False;       // Active or not.
       End; }

    end;







    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    //                 DONT TOUCH BELOW THIS
    //             *****************************
    //           Unless you know what you're doing
    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*






    Var
      FirstInvCheck: Boolean;
      BarsMade, RingValue: Integer;
      ShopWalk1,ShopWalk2,BankWalk1, BankWalk2:Integer; //DTM's


    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    //           Debug Signature
    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*

    Procedure DevilSig;
    Begin
      ClearReport;
      ChangeReportWidth(200);
      AddToReport('  _ _                        _  ');
      AddToReport('  |   \    made by        _ | | ');
      AddToReport('  | |\ \                 |_|| | ');
      AddToReport('  | ||  |  _ _  __    __  _ | | ');
      AddToReport('  | ||  | / _ \ \ \  / / | || | ');
      AddToReport('  | |/ / |  __/  \ \/ /  | || | ');
      AddToReport('  |_ _/   \___|   \__/   |_||_| ');
    End;


    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    //          ENDING SIGNATURE AND THANK YOU
    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*`*`*~*~*~*~*~*~*~*
    Procedure EndSig;
    Begin
      ClearReport;
      AddToReport('Thank You Very Much For Using Reddevils');
      AddToReport('  Auto Smelter.                        ');
      AddToReport('******************                     ');
      AddToReport('Please Post Any Known Bugs, Theyll be  ');
      AddToReport('   FiXed as Soon as Possible           ');
      AddToReport('******************                     ');
      AddToReport('I Want This Script to be as Good as It ');
      AddToReport('Can Get, So Please Post any Suggestions');
    End;

    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    //              Progress Report
    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*

    Procedure Report;
    Begin
      WriteLn(' Al-Karid Auto Smelter - ' + 'Made By RedDevil');
      Writeln('*********************************************');
      WriteLN('  Player       = ' + Players[CurrentPlayer].Name)
      Writeln('  Time Running = ' + TimeRunning);
      Writeln('  Bars Made    = ' + IntToStr(BarsMade));
      WriteLn('**********************************************');
    end;



    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    //               Sets Up Script
    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*

    Procedure ScriptStart;    //I have a lot left to do to this...
    Begin
      SetupSRL;
      DevilSig;
      WriteLn('     Script Setup is Good!'   );
      WriteLN('  Here we go, and good luck :)');
    end;


    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    //       My Faster to Use Version of Wait(I)
    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    Procedure EasyWait(Min, MaX: integer);
    Begin
      Wait(Min + Random(MaX-Min));
    End;


    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    //         Find Randoms While Wait
    //                   Got the idea from Narcles Scripts
    //                   Thank you Narcles, please tell me, if you want more
    //                   Creddit
    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    Procedure RandomWait;
    Begin
      WaitFunc(@BankScreen, 40, 750);
      EasyWait(600, 1200);
    End;



    //************************************************
    //      Withdrawing Directions
    //************************************************
    Procedure BankInst;
    Begin
      EasyWait(400, 700);
      Case LowerCase(Players[CurrentPlayer].Strings[0]) Of
        'bronze' : Begin
                     Withdraw(0, 0, 14);
                     EasyWait(1000, 1450);
                     WithDraw(0, 1, 14)
                     EasyWait(1000, 1450);
                   End;
        'iron'   : Begin
                     WithDraw(0,0,0)
                     EasyWait(1000, 1450);
                   End;

        'steel'  : Begin
                     WithDraw(0, 0, 9);
                      EasyWait(1000, 1450);
                     WithDraw(0, 1, 0);
                      EasyWait(1000, 1450);
                   End;
      End;
    End;

    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    //           Sets Up Rings Of Forgings
    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    Procedure EquipRing;
    Var RubyRingBTM, TpaLength, I, X, Y: Integer;
        FoundRing: Boolean;
        BmpTPA: Array of Tpoint;
    Begin
      If Not LoggedIn Then EXit;
      If (InvCount > 0) Then DepositAll;

      RubyRingBTM := SRL_GetBitmap(bmp_Ring_Ruby);
      If FindBitmapsTolerance(RubyRingBTM, BmpTPA ,MSX1, MSY1, MSX2, MSY2, 4) Then
      Begin
        TpaLength := Length(BmpTPA);
        For I := 0 To (TpaLength-1) Do
        Begin
          MMouse(BmpTPA[I].X, BmpTPA[I].Y, 4, 4);
          If (GetUpTeXt = 'orging') Then
          Begin
            FoundRing := True;
             EasyWait(400,750);
            Mouse(X,Y, 5, 5, False);
             EasyWait(1000, 1500);
            WaitOption('1',5000);
            WriteLn('Equiped Another Ring');
            FreeBitmap(BMP_Ring_Ruby);
            Break;
          End;
        End;
        If (Not(FoundRing)) Then
        Begin
          WriteLn('Make Sure You Have the Right Rings in Bank');
          WriteLn('Or Put Rings of Forgings in Bank Veiw' );
          LogOut;
          Report;
          EndSig;
          TerminateScript; // Stays Like this, Until I Come Up With A Fail Safe
        End;
        CloseBank;
        InvMouse(1, 1);
        If (Not(OpenBank('akb', True, True))) Then
        Begin
          WriteLn(' Equiping Ring = Fail')
          Report;
          LogOut;
          NeXtPlayer(False);
        End;
      End Else
      Begin
        WriteLn('Please Make Sure You Have Rings Of Forging In Bank Veiw');
        LogOut;
        Report;
        LogOut;
        NeXtPlayer(False);
      End;
    End;

    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    //           Sets Up Players Inventory
    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*

    Procedure PlayerSetup;
    begin
      If not LoggedIn then
        LoginPlayer;
      MakeCompass('e');
      FirstInvCheck := InvCount > 0;
      If (FirstInvCheck)Then
        Writeln('Beginning Script') Else
          Writeln('Banking On Start');
    end;


    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    //            Declares All DTM's
    //                Alot of updates to come
    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*

    Procedure DeclareAllPics;
    begin
      ShopWalk1 := DTMFromString('78DA63DCC3C4C0D0C0C8800C9EBFFDC22002A' +
        '461A28CDB88500332A78A809A1D403535A86A16B6E4A0A80100B3A50' +
        'F2A');
      ShopWalk2 := DTMFromString('78DA634C676260C862644006DE05660C5C401' +
        'A26CA9801549347404D0E504D26AA9A43ABF350D52401D5A4E357030' +
        '07087091A');
      BankWalk1 := DTMFromString('78DA63F46662608861644006CFDF7E61E002D' +
        '2305146909A60026AEC816A6209A8F104AA8944555319E38AAAC61DA' +
        '8261ABF1A00B0C10DFD');
       BankWalk2   := DTMFromString('78DA63F4676260C8606440064736353370016' +
        '99828A327504D26AA9A431B9A50D580CC494655737C6B1BAA9A504C3' +
        '5187681CCC9C2AF0600E9450DB9');
    End;


    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    //               Regular ole Antiban
    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*

    procedure AntiBan;
    begin
      if not LoggedIn then EXit;
      case Random(AntiBanRate) of
        0: RandomWait;
        1: begin
             RandomMovement;
             SetAngle(true);
           end;
        3: PickUpMouse;
        4: HoverSkill('smithing', False);
        5: EasyWait(10000, 30000);
        6: BoredHuman;
      end;
    end;


    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    //    FiXes the Inventory to start the Script
    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*

    Procedure PreBank;
    var T: integer;
    Begin
      If (Not(Loggedin)) Then LoginPlayer;
      If (FirstInvCheck = False) Then
      Begin
        REPEAT
          INC(T);
          OpenBank('akb', True, True);
        Until Bankscreen Or (T=3);
      end;
      If Bankscreen Then
      Begin
         EasyWait(400, 700);
        DepositAll;
         EasyWait(450, 750);
        WithDraw(1,1,0);
      End Else
      Begin
        WriteLn('Could Not Find Bank!!!')
        WriteLn('Script Closing');
        NeXtPlayer(False);
      End;
    End;
       


    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    //               Banking Procedures
    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*

    Procedure Banking;
    var TP:TPoint;
    Begin
      If (Not(Loggedin)) Then EXit;
      TP := BankIndeXToMSPoint(1);
      FindNormalRandoms;
      Writeln('Atempting to Bank');
      If OpenBank('akb', True, True) then
        Begin
          WaitFunc(@Bankscreen, 25, 3000);
          DepositAll;

          IF LowerCase(Players[CurrentPlayer].Strings[0]) = 'iron' Then
          Begin
            If Players[CurrentPlayer].Booleans[0] Then
            Begin
              IF (RingValue = 5) Then
              Begin
                EquipRing;
                RingValue := 0;  //Resets Ring Value
              End;
            End;
          End;
         
          BankInst;
          If (Not(InvCount = 28)) then
            begin
              If ((InvCount + GetAmount(TP.X,TP.y))< 28) Then //Reason for tpoint above
                Begin
                  WriteLn('Ran Out Of Ore')
                  CloseBank;
                  EasyWait(500, 1000);
                  AntiBan;
                  LogOut;
                  NeXtPlayer(False);
                End Else
                Begin
                  EasyWait(1000, 1500);
                  BankInst;
                  WriteLn('Continued After Bank Check');
                  CloseBank;
                  RandomWait;
                End;
            End;
      End Else
        Begin
          LogOut;
          WriteLn('Can Not Find Bank!!!');
          Report;
          NeXtPlayer(False);
        end;
    End;



    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    //            Smelting Timer
    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    Procedure SmeltCheck;
    Var BAmount, EAmount, Color, L: Integer;
        TPA: TPointArray;
        ATPA: T2DPointArray;
    Begin
      BAmount := InvCount;
      Color := GetColor(581, 227);
      Repeat
        FindColors(TPA, Color,   MIX1, MIY1, MIX2, MIY2);
        ATPA := TPAtoATPAEX(TPA, 20, 20);
        L := Length(ATPA);
        Wait(SmeltingSpeed+Random(500));
      Until (L = 0);
      EAmount := InvCount;
      WriteLN('Came With/Ended With  ' + IntToStr(BAmount) + '/' + IntToStr(EAmount));
    End;


    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    //            Smelting Procedure
    //                Some Updates to Come
    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*

    Procedure SmeltingTime;
    var InvTotal:integer;
    Begin
      If (Not(Loggedin)) Then EXit;
      If OpenFurnace then
        Begin
           RandomWait;
          Smelt(Players[0].strings[3], IntToStr(35+Random(50)));
           SmeltCheck;
          InvTotal := InvCount;
          BarsMade := (BarsMade + InvTotal);
          RingValue := (RingValue + 1);
          AntiBan;
          FindNormalRandoms;
        End Else
        Begin
          WriteLn('Could Not Find Furnace');
          LogOut;
          Report;
          NeXtPlayer(False);
        End;
    End;


    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    //            Walk to Furnace
    //          *******************
    //          Many Differnt Parts
    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*


    Function WAlktoFurnace1: Boolean;
    var X,y:Integer;
    Begin
      If (Not(Loggedin)) Then EXit;
      MakeCompass('e');
      If DTMRotated(ShopWalk1,X,Y,MMX1,MMY1,MMX2,MMY2) Then
      Begin
        Result := True;
        Mouse((X+4),(y+5),4,5, true);
        FFlag(8);
      End Else
      Begin
        If DTMRotated(ShopWalk2,X,Y, MMX1,MMY1,MMX2,MMY2) Then
        Begin
          Result := True;
          Mouse((X+2),(y+7),3,4,True);
          FFlag(5);
        End Else
        Begin
          WriteLn('Shop DTMs dont Work!');
          Result := False;
        End;
      End;
    End;

           
    Procedure WalkToFurnace2;
    Var X, Y, H, I: Integer;
        TPA: TPointArray;
        ATPA: T2DPointArray;
    Begin
      If (Not(LoggedIn)) Then EXit;
      MakeCompass('e');
      FindColorsSpiralTolerance(MMCX+20, MMCY+15, TPA, 9025477, MMCX,MMCY, MMX2, MMY2, 15);
      If (Length(TPA)=0) Then
        FindColorsSpiralTolerance(MMCX+20, MMCY+15, TPA, 2830858, MMCX,MMCY, MMX2, MMY2, 30);
      ATPA :=  SplitTPAEX(TPA, 5, 5);
      SortATPASize(ATPA, True);
      H := High(ATPA)
      For I := 0 to H Do
      Begin
        MiddleTPAEX(ATPA[i], X, Y);
        If  RS_OnMinimap(X,Y) Then
        Begin
          WriteLn('Used TPA Walking, to Furnace');
          If (MFF(X, Y, 4, 1)) Then EXit;
        End;
       End;
       WriteLn('Walking To Furnace := Fail')
       Report;
       NeXtPlayer(False);
    End;

    Procedure FindFurnaceSymbol;
    Var X2, Y2: Integer;
    Begin
      If FindSymbol(X2,Y2,'furnace') Then
      Begin
        Mouse(X2,(Y2+6),3,3,True);
        If FlagPresent Then
        Begin
          FFlag(0);
          WriteLn('Succesfully Made Trip to Furnace');
          EasyWait(0, 2000);
          EXit;
         End Else
         Begin
           MFF(X2, Y2, 1, 1)
           WriteLn('Finally Found Symbol');
         End;
       End Else
       Begin
         WriteLn('Could Not Find Furnace Symbol');
         WriteLN('Got Lost Walk to Furnace');
         LogOut;
         Report;
         NeXtPlayer(False);
       End;
    End;
    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    //                WAlk to Bank
    //              ****************
    //            Many Different Parts
    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*

    Function WAlktoBank1: Boolean;
    var X, y :Integer;
    Begin
      If (Not(LoggedIn)) Then EXit;
      MakeCompass('e');
      If DTMRotated(BankWalk1,X,y,MMX1,MMY1,MMX2,MMY2) Then
      Begin
        Mouse((X+4),(y+5),4,5, true);
        FFlag(8);
        Result := True;
        FreeDTM(BankWalk1);
      End Else
      Begin
        If DTMRotated(BankWalk2,X,Y, MMX1,MMY1,MMX2,MMY2) Then
        Begin
          Result := True;
          Mouse((X+2),(y+7),3,4,True);
          FFlag(5);
          FreeDTM(BankWalk2);
        End Else
        Begin
          Result := False;
          WriteLn('Bank DTMs dont Work!');
        End;
      End;
    End;

    Procedure WalkToBank2;
    Begin
    End;


    Procedure FindBankSymbol;
    Var X2, Y2 : Integer;
    Begin
      If FindSymbol(X2,Y2,'bank') Then
      Begin
        Mouse(X2,(Y2+6),3,3,True);
        If FlagPresent Then
        Begin
          FFlag(0);
          WriteLn('Succesfully Made Trip to Bank');
          Wait(0+random(2000));
          EXit;
         End Else
         Begin
           MFF(X2, Y2, 1, 1)
           WriteLn('Finally Found Symbol');
         End;
       End Else
       Begin
         WriteLn('Could Not Find Bank Symbol');
         WriteLN('Got Lost Walking to Bank');
         LogOut;
         Report;
         NeXtPlayer(False);
       End;
    End;







    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
    //    //***********Main Operation************\\
    //~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*



    Begin
      MouseSpeed := MouseSpeedRate;
      ScriptStart;
      DeclarePlayers;
      DeclareAllPics;
      Repeat
        PlayerSetup;
        PreBank;
        Repeat
          Banking;
          If (Not(WalkToFurnace1)) Then WalkToFurnace2;
          FindFurnaceSymbol;
          SmeltingTime;
          IF (Not(WalkToBank1)) Then WalkToBank2;
          FindBankSymbol;
        Until (BarsMAde >= Players[CurrentPlayer].Integers[0])
          or (GetTimeRunning >= (Players[CurrentPlayer].Integers[1] * 60000))
            or (Not(LoggedIn));
        NeXtplayer(False);
        BarsMade   := 0;
        RingValue  := 0;
      Until AllPlayersInactive;
      EndSig;
    End.

  2. #2
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    If OpenBank('akb', True, True) then
        Begin
    Im pretty sure that should be
    SCAR Code:
    OpenBank('akb', True, True)
    //code....
    because openbank would open the bank.
    If openbank then results true or false, does not do the command.
    And maybe some
    SCAR Code:
    repeat
    antiban;//repeats antban
    until(bankscreen)//returns if bank screen is up
    or
    SCAR Code:
    While (Not(bankscreen)) do antiban;//while bankscreen is not found does anti
    Because im not clear that you have wait until bank screen.
    That may be the problem but im not 100%, maybe 75%. Try it.

  3. #3
    Join Date
    Jul 2008
    Location
    US
    Posts
    104
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    OpenBank is a function. It works threw the function till till it finds a result. I checked just in case, and inside one of Narcle's scripts was:

    SCAR Code:
    function RWait(t:integer): boolean;
    var
      i: integer;
    begin
      if not LoggedIn then
       Exit;
      for i := 1 to t do
      begin
        if FindNormalRandoms then
          Result := true;
        if ClickContinue(true,true) then
          Result := true;
        if Result then
          Exit;
        Wait(200+random(50));
      end;
    end;

    If findnormalrandoms, does the same thing, just different situation of course.

    And all the banking includes, their Results, is based on whether bankscreen or pinscreen came up.

    SCAR Code:
    Result := (BankScreen) or (PinScreen);

  4. #4
    Join Date
    Feb 2009
    Posts
    1,447
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

  5. #5
    Join Date
    Jul 2008
    Location
    US
    Posts
    104
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by TRiLeZ View Post
    What exactly can your script not find?
    At the moment, it can't find the bank, when I'm standing right against it. I'm thinking about just using TPA's and stuff to find the bankER. Do NPC's need autocoloring?

    You should call "SetupSRL" at the beginning of your script.
    I do. I just have it placed in my [ Procedure ScriptStart; ]

  6. #6
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Well its possible that SRLs Openbank just isnt working. Use ACA to make your own or something much more fun! Also, if any folders inside your SRL folder have a red X or whatever on them, that normally means that you have edited them in some way. But I'm pretty sure when an update comes, it will overwrite your edited version with the most current version, so no big deal.

  7. #7
    Join Date
    Jul 2008
    Location
    US
    Posts
    104
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    Well its possible that SRLs Openbank just isnt working. Use ACA to make your own or something much more fun! Also, if any folders inside your SRL folder have a red X or whatever on them, that normally means that you have edited them in some way. But I'm pretty sure when an update comes, it will overwrite your edited version with the most current version, so no big deal.
    Okay thanks. Oh and if OpenBank dont work. that means that all the banks don't work, so that's a bummer. And how many colors you think I'll need? Speaking of ACA, My RS client lagged for like 1 sec, and all the colors got like a greenish tint added to them. weird....

  8. #8
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Not sure how many, juts make sure when picking, they are all darkish, or all lightish not a mix. And ALWAYS ALWAYS test it on ACA (click mark colors) and make sure it only/mostly finds the bank teller/book/whatever you're coloring. Its nice to switch servers/log out wait a few minutes/login as the rs colors change a lot too. God luck.

    You should make maybe 2 or 3 autocolors and loop though them to find the banker, ore reliable..

  9. #9
    Join Date
    Jul 2008
    Location
    US
    Posts
    104
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Okay, I'm not very good at auto coloring junk. So if I have any Problems, I know who to go to. But I'm sure a tut will do just fine

Thread Information

Users Browsing this Thread

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

Posting Permissions

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