Results 1 to 5 of 5

Thread: Out Of Range

  1. #1
    Join Date
    Nov 2011
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Out Of Range

    Error: Out Of Range at line 156
    The following DTMs were not freed: [SRL - Lamp bitmap, 1, SRL - Lamp bitmap, 3]
    The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap, SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

    Simba Code:
    program Ardougne_Iron_Miner;
    {$DEFINE SRL5}
    {$Define Smart}
    {$i srl/srl.simba}
    {$i sps/sps.simba}
    {$i ObjectDTM\ObjDTMInclude.simba}

    var
      NPCBox :TBox;
      Colors, NPCArray :TPointArray;
      ATPA: T2DPointArray;
      MSNPC, NPCPoint :TPoint;
      TempCTS, C, HiNPC, II, I :Integer;
      x, y: integer;
      MinePath: TStringArray;




    Procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name :='';
      Players[0].Pass :='';
      Players[0].Nick :='';
      Players[0].Active:=True;
    end;

    procedure SetupLogin;
    begin
      ClearDebug;
      Smart_Server := 87;
      Smart_Members := True;
      Smart_Signed := True;
      Smart_SuperDetail := False;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
      ObjDTM_Setup;
      ObjDTM_Debug := True;
    end;


    Procedure PathToMine;
    begin

      SetupLogin;

        MinePath := ['604:45:3:0:7:623:54:0:7:603:30:0:7:667:54:4:647:109:571:104:581:37:652:37',
        '677:49:4:0:7:631:70:0:7:651:94:1:7:597:48:1:7:688:108:4:586:36:606:100:690:98:682:39',
        '675:81:4:0:7:690:102:0:7:685:60:0:7:653:136:0:7:607:136:4:613:39:613:111:681:112:678:44',
        '683:87:5:1:7:668:47:1:7:676:72:1:7:664:106:1:7:673:126:1:7:647:127:4:610:68:611:119:693:113:690:65',
        '667:46:7:1:7:648:76:1:7:652:100:1:7:672:71:1:7:681:75:1:7:668:84:1:7:664:101:1:7:659:42:4:604:29:613:116:687:105:682:38',
        '662:47:7:1:7:630:50:1:7:673:63:1:7:635:71:1:7:656:89:1:7:647:93:1:7:664:76:1:7:689:59:12:617:101:617:34:697:99:689:43:654:40:652:100:693:96:630:26:633:96:654:94:684:90:657:68',
        '680:69:7:1:7:670:93:1:7:699:85:1:7:643:106:1:7:613:93:5:7:663:63:5:7:629:50:5:7:685:59:4:615:27:617:109:695:106:681:39']
    end;

    procedure Antiban;
    begin
      case Random(80) of
        10: BoredHuman;
        20: HoverSkill('random', False);
        30: HoverSkill('mining', False);
        40: PickUpMouse;
        60: RandomRClick;
        90: ExamineInv;
      end;
    end;



    function Banking :Boolean;
    var
      NPCBox :TBox;
      Colors, NPCArray :TPointArray;
      ATPA: T2DPointArray;
      MSNPC, NPCPoint :TPoint;
      TempCTS, C, HiNPC, II, I :Integer;
    begin
      Result := False;
      Result := (BankScreen) or (PinScreen);
      If Result then Exit;

      NPCArray := GetMinimapDots('NPC');
      HiNPC := High(NPCArray);

      If Length(NPCArray) = 0 then Exit;
      SortTPAFrom(NPCArray, Point(MMCX, MMCY));
      for I := 0 to HiNPC do
      begin
        NPCPoint := MMToMS(NPCArray[I])
        If NPCPoint = Point(-1, -1) then Continue;
        NPCBox := IntToBox(NPCPoint.X - 40, NPCPoint.Y - 40, NPCPoint.X + 40, NPCPoint.Y + 40)
        If PixelShift(NPCBox, 200) > 500 then Continue;

        TempCTS := GetColorToleranceSpeed;
        ColorToleranceSpeed(2);
        SetColorSpeed2Modifiers(0.13, 1.52);
        FindColorsTolerance(Colors, 6067652, NPCBox.X1, NPCBox.Y1, NPCBox.X2, NPCBox.Y2, 13);
        ATPA := TPAToATPAEx(Colors, 15, 20);
        SortATPASize(ATPA, True);

        for II := 0 to High(ATPA) do
        begin
          MSNPC := MiddleTPA(ATPA[II]);
          MMouse(MSNPC.X, MSNPC.Y, 3, 3);
          If WaitUpTextMulti(['ooth', 'anker'], 200) then
          begin
            Mouse(MSNPC.X, MSNPC.Y, 1, 1, False);
            If WaitOptionMulti(['ank B', 'quick'], 300) then
              MarkTime(c);
              Repeat
                Wait(RandomRange(50, 100));
              Until (BankScreen) or (PinScreen) or (TimeFromMark(C) > 4500);
              if (Players[CurrentPlayer].Pin <> '') then
                InPin(Players[CurrentPlayer].Pin);
              Result := (BankScreen) or (PinScreen);
              If Result then
              begin
               ColorToleranceSpeed(TempCTS);
               DepositAll;
               CloseBank;
               exit;
              end

          end;
        end;
      end;
    end;

    Procedure WalkToBank;

    var ToBank:TpointArray;
    begin
       ClickNorth(SRL_ANGLE_HIGH);
       if(FindSymbol(x,y,'bank'))then
       begin
        Wait(1500 + random (278));
        Banking;
       end;
    end;


    Procedure WalkToMine;
    begin
      If (InvFull) Then
    begin
      WalkToBank;
    end;
    begin
       Setrun(true);
         if ObjDTM_InArea(MinePath[0], True) then
      begin

        WriteLn('Checking to see if you are in the bank..');
        WriteLn('Good, you are in the bank!');

        for I := 0 to 18 do
        begin

          WriteLn(i);
          ObjDTM_Walk(MinePath[i], 0, 100, 80, True);
        end;

        if ObjDTM_InArea(MinePath[High(MinePath)], True) then
          WriteLn('You made it to the mine!');
      end else
      begin

        WriteLn('You need to start in the bank, please!');
      end;
    end;
    end;


    Procedure Mining;
    begin
      repeat
        if FindObj(x, y, 'ocks', 2701148, 15) or FindObj (x,y, 'ocks',3359859,15) or FindObj (x,y, 'ocks',3030633,15) or FindObj (x,y, 'ocks',3030633,15)  then
      begin
        Mouse(x, y, 0, 0, false);
        ChooseOption('ocks');
        WaitOption('Mine', 600);
        sleepandmovemouse(1000 + Random(800));
      end;
        repeat
        AntiBan;
        wait(100);
        Until not IsUpText('ocks') or (InvFull);
      Until (InvFull)
      writeLn('Going To Bank');
    end;

    begin
      ClearDebug;
      SetupLogin;
      SetupSRL;
      DeclarePlayers;
      ActivateClient;
      repeat
        WalkToMine;
        Mining
        WalkToBank;
        Banking;
      until(false);
    end.

    Any help?
    Last edited by jannu22; 01-16-2012 at 05:12 PM.

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

    Default

    Did u type ur acc's password?
    Proud to be Albanian.

  3. #3
    Join Date
    Nov 2011
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes, it will log in to rs, then it give out of range error.

  4. #4
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    In your "SetupLogin" procedure, you're calling:

    Simba Code:
    SetupSRL;
      DeclarePlayers;
      LoginPlayer;

    But calling SetupSRL and DeclarePlayers again right after that.

    Also, what is line 156?
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  5. #5
    Join Date
    Nov 2011
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Kyle Undefined View Post
    In your "SetupLogin" procedure, you're calling:

    Simba Code:
    SetupSRL;
      DeclarePlayers;
      LoginPlayer;

    But calling SetupSRL and DeclarePlayers again right after that.

    Also, what is line 156?
    Line 156 is "if ObjDTM_InArea(MinePath[0], True) then".

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
  •