Results 1 to 18 of 18

Thread: DTMs And Bitmaps Are Not Being Freed?

  1. #1
    Join Date
    Oct 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default DTMs And Bitmaps Are Not Being Freed?

    I have tried a multivariate of options to fix this problem.
    I have made sure I had the latest updates for everything. (SnL, S.M.A.R.T, etc)
    I have tried re-installing Simba about eight to ten times now.
    I have searched the F.A.Q about it and nothing is working.
    I have removed my Java, and re-installed an older version (6).
    I have tried different scripts.. I do not know what to do!!

    Earlier today, I was running an alching script just fantastic. It was running smoothly. I tried a few of them out to get the hang of it. I went back to my alching script, and all of a sudden, I get errors such as:

    The following DTMs were not freed: [SRL - Lamp bitmap, 1]
    The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap, SRL - NavBar Bitmap]

    Hmm..

    Even more interesting, sometimes I get error such as: Error: Out Of Range at line 882
    The following DTMs were not freed: [Bronze Pickaxe, Iron Pickaxe, Steel Pickaxe, Mithril Pickaxe, Adamant Pickaxe, Rune Pickaxe, Dragon Pickaxe, Bronze Hatchet, Iron Hatchet, Steel Hatchet, Mithril Hatchet, Adamant Hatchet, Rune Hatchet; and a good fifty or sixty more items .

    I really need help on this.. Before you ask.. I DO have the latest version of everything. Including Simba. I just do not understand how it could of worked earlier and now it does not.

    If it helps at all.. after I click play on the script, it loads S.M.A.R.T, it then types in my name and password, and when it gets to the loading screen, the red dot (cursor) stops moving and all these error start bombarding the screen.

    If you have any suppositions, predilections, or know what the banana you are talking about, help a brotha out.

  2. #2
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    We need the error before bitmaps aren't free. Cause that isn't an error. It is just simba saying: "He dude, you loaded some bitmaps to your PCs memory, but since we stopped running I freed them for you".

    This is an error:
    Even more interesting, sometimes I get error such as: Error: Out Of Range at line 882

    But we would like to know which line.
    Working on: Tithe Farmer

  3. #3
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    A recent SRL update unintentionally induced an out of range error
    http://villavu.com/forum/showthread.php?t=91133

    For now revert back the update by replacing Simba/Includes/SRL/srl/core/login.simba with my file attached.

    EDIT: i changed the file to my fix:
    https://github.com/SRL/SRL-5/pull/95

    Do help test it and report any errors.

  4. #4
    Join Date
    Aug 2012
    Posts
    144
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It seems like this is an error from the "Login" or "LoginPlayer" function. I am getting this same compiling error as well on a few different scripts. I have not tried them all yet.

    Error: Out Of Range at line 869
    Error: Out Of Range at line 873


    I am not sure what other information I can provide.

    Edit: Fix seems to be working fine. That was easy ><
    Last edited by Scorched; 10-22-2012 at 09:41 AM.

  5. #5
    Join Date
    Feb 2011
    Location
    Vancouver Island
    Posts
    85
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks! the fix works great for me

  6. #6
    Join Date
    Oct 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I am now getting this error for all of the different scripts I tried out: [Hint] C:\Simba\Includes\SRL/SRL/core/globals.simba(55:3): Variable 'WORLDSWITCHERENABLED' never used at line 54

    My alching script does not fill out the name and password. However, this fishing script I am using right at this moment, is working just great.

    Would you be able to tell me what the above error means? Or if it will be a problem? My alching script showed the same error, but did not work. However, this fishing script works with the same error?

    P.s.. THANK YOU Riwu for your beautiful mind! If I could, I would kiss you on the lips right now.

  7. #7
    Join Date
    Oct 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well... This is fantastic.. I am NOW getting this error message with that amazing fishing script.
    Error: Exception: Access violation at line 311
    The following DTMs were not freed: [SRL - Lamp bitmap, 1, 2]
    The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap, SRL - NavBar Bitmap, 4, 5, 7]

    Any clues?

  8. #8
    Join Date
    Oct 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Here is an even better one!
    [Error] C:\Simba\Includes\srl/srl/misc/smart.simba(46:19): Invalid number of parameters at line 45
    Compiling failed.

  9. #9
    Join Date
    Oct 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I really need help :/

  10. #10
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    Your script shouldn't be using Smart.Simba. SmartParams.Simba is the correct file name. Though I'm not sure why it hasn't been renamed yet since the Beta include update was quite some time ago. The old file was only kept for backwards compatibility with an old version of Smart which no one should be using so I'd say it should be safe to rename the new file, get rid of the old but meh..

    If your script is using Smart.simba instead of SmartParams.simba, your script is outdated.
    I am Ggzz..
    Hackintosher

  11. #11
    Join Date
    Oct 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Brandon View Post
    Your script shouldn't be using Smart.Simba. SmartParams.Simba is the correct file name. Though I'm not sure why it hasn't been renamed yet since the Beta include update was quite some time ago. The old file was only kept for backwards compatibility with an old version of Smart which no one should be using so I'd say it should be safe to rename the new file, get rid of the old but meh..

    If your script is using Smart.simba instead of SmartParams.simba, your script is outdated.
    So you are saying that the scripts are outdated... And I have to wait for the developers to update them?

    Or I have to rename the file myself...?
    I am so sorry... I just do not understand.

  12. #12
    Join Date
    Apr 2012
    Location
    Bawtville
    Posts
    61
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I am very confused with what you guys are saying to fix it.
    This is one of the many scripts that are not working with simba anymore,
    for this particular script i get this error:
    [Error] C:\Simba\Includes\SRL/SRL/core/login.simba(896:1): Identifier expected at line 895
    Compiling failed.


    Code:
                      {/////////////////////////////////////////
                      //       ~Heavy-Rodder by Flight~       //
                      //                                      //
                      //             Version: 1.51            //
                      /////////////////////////////////////////}
    
    program HeavyRodder;
      {$DEFINE SMART}   //Comment this out if using a standard browser
    
      {$i SRL/srl.simba}
      {$i SPS/sps.simba}
      {$i SRL/SRL/misc/reports.simba}
      {$i SRL/SRL/misc/MouseHandler.simba}
    
      {$IFDEF SMART}
        {$I SRL/SRL/Misc/SmartGraphics.Simba}
      {$ENDIF}
    
    Const
    
    //SRL Stats
      SRLStats_Username = '';
      SRLStats_Password = '';
    
    //General settings
      AlchFish      = False;  //Fish 'n alch method? (False for standard fish 'n drop)
      SwitchWorlds  = True;   //Switch worlds after break?
      FishTimer     = 2000;
    
    //Break settings
      BreakIn      = 135;     //How long before we take a break? (minutes)
      BreakFor     = 15;      //How long will we break for? (minutes)
      Bir          = 13;      //Random minutes to add/subtract from how long until we break
      Bfr          = 7;       //Random minutes to add/subjtract from break duraction
    
      Procedure DeclarePlayers;
      begin
        HowManyPlayers := 1;
        NumberOfPlayers(HowManyPlayers);
        CurrentPlayer := 0;
        with Players[0] do
        begin
          Name         := '';
          Pass         := '';
          BoxRewards   := ['XP','xp','lamp'];
          LampSkill    := Skill_Slayer;
          Active       := True;
        end;
      end;
    
    Var
      Version: String;
      ReportTime,CommitTime,PostID: Integer;
      Trout_Caught,Trout_Ca,
      Salmon_Caught,Salmon_Ca,
      Sturgeon_Caught,Sturgeon_Ca,
      FishXP,Fish_XP,MagicXP,Magic_XP: Integer;
    
    //Import painting
      Prog: Integer;
      PaintArray: TStringArray;
    
    //Break variables
      w,x,y,z,RealBTime,CurrentBTime,
      BreakRounds,TotalBreaks: Integer;
    
    
      //By Dgby714
      function DownloadToFile(const URL, Filename: string): boolean;
      var
        FileI: LongInt;
        FileC, FileH: string;
      begin
        Result := False;
    
        FileI := InitializeHTTPClient(False,False);
        try
          FileC := GetHTTPPage(FileI, URL);
          FileH := GetRawHeaders(FileI);
    
          if ((FileC = '') or (FileH = '')) then
          begin
            WriteLn('Error downloading "' + URL + '".');
            Exit;
          end;
    
          FileH := Copy(GetRawHeaders(FileI), 10, Pos(#13, FileH) - 10);
    
          if (FileH <> '200 OK') then
          begin
            WriteLn('Couldn''t download "' + URL + '", Error Code: ' + FileH + '.');
            Exit;
          end;
    
        finally
          FreeHTTPClient(FileI);
        end;
    
        try
          if not FileExists(Filename) then
            FileI := CreateFile(Filename)
          else
            FileI := OpenFile(Filename, False);
    
          CloseFile(FileI);
    
          FileI := RewriteFile(Filename, False);
          Result := WriteFileString(FileI, FileC);
        finally
          CloseFile(FileI);
        end;
      end;
    
      Procedure Loadvars;
      begin
        Version := '1.5';
        PostID := 841068;
        MarkTime(CommitTime);
        MarkTime(ReportTime);
        MouseSpeed := 14;
    
        w := (BreakIn * 60000);
        x := (BreakFor * 60000);
        y := RandomRange(-Bir * 60000, Bir * 60000);
        z := RandomRange(-Bfr * 60000, Bfr * 60000);
    
        if not FileExists(AppPath + '/Scripts/HRImg.png') then
          DownloadToFile('http://i.imgur.com/LF7iq.png', AppPath + '/Scripts/HRImg.png');
    
        if not FileExists(AppPath + '/Includes/SPS/img/runescape_other/baxtorianfalls.png') then
        begin
          Writeln('Downloading new SPS map...');
          DownloadToFile('http://i.imgur.com/cCNUH.png', AppPath + '/Includes/SPS/img/runescape_other/baxtorianfalls.png');
        end;
    
        SPS_Setup(RUNESCAPE_OTHER, ['baxtorianfalls']);
        SetupSRLStats(201, SRLStats_Username, SRLStats_Password);
    
      end;
    
      {$IFDEF SMART}
      procedure OnScreen;
      var
       XPH,Portion,I: Integer;
       TP: TPoint;
       V: string;
      begin
        if (FishXP < 1) then
          FishXP := 1;
    
        XPH := Round((FishXP * 3600) / (GetTimeRunning / 1000));
    
        for I := 0 to 6 do
        begin
          case I of
            0:
            begin
              V  := 'V.'+Version;
              TP := Point(435, 20);
            end;
    
            1:
            begin
              V  := MsToTime(GetTimeRunning, Time_Bare);
              TP := Point(88, 55);
            end;
    
            2:
            begin
              V  := IntToStr(FishXP);
              TP := Point(88, 81);
            end;
    
            3:
            begin
              V  := IntToStr(XPH);
              TP := Point(88, 107);
            end;
    
            4:
            begin
              V  := IntToStr(Trout_Caught);
              TP := Point(397, 58);
            end;
    
            5:
            begin
              V  := IntToStr(Salmon_Caught);
              TP := Point(397, 83);
            end;
    
            6:
            begin
              V  := IntToStr(Sturgeon_Caught);
              TP := Point(397, 109);
            end;
          end;
    
          if V = PaintArray[I] then
            Continue;
    
          Portion := GetMufasaBitmap(Prog).Copy(TP.x, TP.y, TP.x + (Length(V)*10), TP.y + 17).Index;
          SMART_DrawBitmap(False, Portion, Point(MCX1 + TP.x, MCY1 + TP.y));
    
          FreeBitmap(Portion);
    
          SMART_DrawTextEx(False, MCX1 + TP.x, MCY1 + TP.y, SmallCharsNS, V, clWhite);
        end;
        PaintArray := ['V.'+Version, MsToTime(GetTimeRunning, Time_Bare), IntToStr(FishXP), IntToStr(XPH),
          IntToStr(Trout_Caught), IntToStr(Salmon_Caught), IntToStr(Sturgeon_Caught)];
      end;
    
      procedure LoadImg;
      begin
        Prog := LoadBitmap(AppPath + '/Scripts/HRImg.png');
        SMART_DrawBitmap(True, Prog, Point(MCX1, MCY1));
        SetLength(PaintArray, 7);
      end;
      {$ENDIF}
    
      Procedure FreeGlobals;
      begin
        FreeBitmap(Prog);
      end;
    
      Procedure Report;
      var
        TTB: Integer;
      begin
        ClearDebug;
        TTB := (((w) + (y) + BreakRounds)-GetTimeRunning);
        SRLProgressReport(ResultDebugBox, 'Heavy-Rodder', 'Flight', Version,
          ['Run time', 'Trout caught', 'Salmon caught', 'Sturgeon caught',
           'Fishing XP', 'Breaks'],
        [MsToTime(GetTimeRunning, Time_Abbrev), Trout_Caught, Salmon_Caught, Sturgeon_Caught, FishXP, TotalBreaks]);
    
        Writeln('Time until break: '+MsToTime(TTB, Time_Bare));
    
        MarkTime(ReportTime);
      end;
    
      Procedure Commit;
      begin
    
        stats_IncVariable('Leaping Trout (Caught)',(Trout_Caught-Trout_Ca));
        stats_IncVariable('Leaping Salmon (Caught)',(Salmon_Caught-Salmon_Ca));
        stats_IncVariable('Leaping Sturgeon (Caught)',(Sturgeon_Caught-Sturgeon_Ca));
        stats_IncVariable('Fishing EXP (Gained)',(FishXP-Fish_XP));
        stats_IncVariable('Magic EXP (Gained)',(MagicXP-Magic_XP));
        Stats_Commit;
    
        Trout_Ca := Trout_Caught;
        Salmon_Ca := Salmon_Caught;
        Sturgeon_Ca := Sturgeon_Caught;
        Fish_XP := FishXP;
        Magic_XP := MagicXP;
    
        MarkTime(CommitTime);
    
      end;
    
      Function IsMoving_F: Boolean;
      begin
        Result := PixelShift(IntToBox(MMCX-30, MMCY-30, MMCX+30, MMCY+30), 200) > 200;
      end;
    
      Function AddToBelt(What: String): Boolean;
      var
        X,Y,Slot,T,Tool: Integer;
      begin
        Result := False;
        case What of
          'Tinderbox':
            Tool := DTMFromString('mggAAAHicY2NgYDjMxMBwAojPAPFpID4IxDuA+CVQ7hkQPwLiN0D8AYpNdNgZoiPDgSwmFMwFJEEYHTDiwBAAAIohC78=');
          'Barbarian rod':
            Tool := DTMFromString('mggAAAHicY2NgYChlYmDIAOJKIC4C4hwgzgXi+0C5d0B8D4ifAfFbIH4IxDaB0Qy6hiZAFhMK5gKSIIwOGHFgCAAAnhsJrw==');
          'Knife':
            Tool := DTMFromString('mbQAAAHicY2VgYHBkYmBwAGJzILYBYk8g5mJkYOAFYjEgFgZiBiBurK5miLfjBXKY4JgLSIIwMmDEgsEAAB4RA9I=');
          'Hammer':
            Tool := DTMFromString('mggAAAHicY2NgYLBnYmCwBmIPIDYHYisg9gXiUEYGhhAg9gTiWCCOA2IvILbT5GTw0Odi8PfxAepmgmMuIAnDyIARB4YAAPp7BZI=');
          'Chisel':
            Tool := DTMFromString('mbQAAAHicY2VgYNjNxMBwCIi3A/E+IN4BxCKMDAzsQCwIxSB+iDkPg56ODlAHExxzAUkQRgaMWDAYAADN9QVM');
          'Small fishing net':
            Tool := DTMFromString('mbQAAAHicY2VgYDjCxMBwGIjPAvFJIN4HxAaMDAwmQKwDxBZQtqOxKoORugxQBxMccwFJEEYGjFgwGAAAEFgGGQ==');
          'Fishing rod':
            Tool := DTMFromString('mbQAAAHicY2VgYOhjYmCYCMQLgHg2EE8FYl5GBgY+IGYCYi4gFgZiPR0dhjB7HqAOJjjmApIgjAwYsWAwAACBxQSE');
          'Harpoon':
            Tool := DTMFromString('mggAAAHicY2NgYMhmYmAoBuIKIE4G4iwgLgViLkYGhv9A+T9ALA5k8zFC2Gbq7Awerq4M/j4+QB4THHMBSRhGBow4MAQAAPbNCBs=');
          'Lobster pot':
            Tool := DTMFromString('mrAAAAHic42BgYJjFBMETgXgaEM8D4iVAPAXKfg5U8xGIPwDxJyB+C8RPgfgdEL8E4jALHjBmYGBCwcnx8WDMBeSBMDqAiTMSwDAAAK4jD/k=');
        end;
    
        if ExistsItemDTM(Tool, X, Y) then
        begin
          Slot := CoordsToItem(X, Y);
          MouseItem(Slot, mouse_right);
          Wait(RandomRange(20, 75));
          WaitOption('toolbelt', 300);
        end else
          Result := False;
    
        MarkTime(T);
        repeat
          if (TimeFromMark(T) > 3000) then
            break;
          if not ExistsItemDTM(Tool, X, Y) then
            break;
          if FindBlackChatMessage('already on') then
            break;
        until(false)
    
        Result := not ExistsItemDTM(Tool, X, Y);
    
        FreeDTM(Tool);
      end;
    
      Function IsFishing: Boolean;
      var
        CTS,i: Integer;
        TPA: TPointArray;
        PColors,Tols: TIntegerArray;
        HMods,SMods: Array of Extended;
      begin
        CTS := GetColorToleranceSpeed;
    
        PColors := [727590, 727848, 793897, 793897, 727589];
        HMods := [0.26, 0.21, 0.15, 0.16, 0.15];
        SMods := [0.50, 1.39, 0.47, 0.78, 0.65];
        Tols  := [2, 2, 3, 5, 4];
    
        for i := 0 to High(PColors) do
        begin
          ColorToleranceSpeed(2);
          SetColorSpeed2Modifiers(HMods[i], SMods[i]);
          FindColorsSpiralTolerance(257, 200, TPA, PColors[i], 240, 190, 273, 225, Tols[i]);
          ColorToleranceSpeed(CTS);
          Result := (Length(TPA) > 0);
    
          if Result then Exit;
    
        end;
    
      end;
    
      Function MagicTab: Boolean;
      begin
        Result := GameTab(Tab_Magic);
      end;
    
      Procedure NextSpot;
      Var
        Me,MM: TPoint;
      begin
        if not LoggedIn then Exit;
        FindNormalRandoms;
        Writeln('Next spot');
        ClickNorth(SRL_ANGLE_HIGH);
    
        Me := SPS_GetMyPos();
      {West spot}
        if (Distance(Me.X, Me.Y, 75, 83) < 10) then
        begin
          MM := SPS_PosToMM(Point(75, 75));
          BrakeMMouse(MM.X, MM.Y, 3, 3);
          ClickMouse2(True);
          WaitFunc(@IsMoving_F, 10, 1000);
          While IsMoving_F do
            Wait(1);
          FFlag(3);
      {North spot}
        end else if (Distance(Me.X, Me.Y, 75, 75) < 10) then
        begin
          MM := SPS_PosToMM(Point(75, 83));
          BrakeMMouse(MM.X, MM.Y, 3, 3);
          ClickMouse2(True);
          WaitFunc(@IsMoving_F, 10, 1000);
          While IsMoving_F do
            Wait(1);
          FFlag(3);
        end else
        begin
          //Default walk to West spot
          MM := SPS_PosToMM(Point(75, 83));
          BrakeMMouse(MM.X, MM.Y, 3, 3);
          ClickMouse2(True);
          WaitFunc(@IsMoving_F, 10, 1000);
          While IsMoving_F do
            Wait(1);
          FFlag(3);
        end;
    
        MakeCompass('W');
      end;
    
      Function Antiban: Boolean;
      var
        i: Integer;
      begin
        if not LoggedIn then Exit;
        FindNormalRandoms;
    
        i := Random(300);
        case i of
          1:
            begin
              RandomRClick;
              Result := True;
            end;
          2..5:
            begin
              KeyDown(40);
              Wait(RandomRange(500, 1100));
              KeyUp(40);
              Wait(RandomRange(310, 865));
              SetAngle(SRL_Angle_High);
              Result := True;
            end;
          6:
            begin
              HoverSkill('Fishing', False);
              Result := True;
            end;
          7..300:
          begin
            Wait(RandomRange(250, 350));
            Exit;
          end;
        end;
    
        Wait(RandomRange(250, 350));
      end;
    
      Procedure GetFishType;
      var
        A,B,C,X,Y: Integer;
      begin
        A := DTMFromString('mbQAAAHicY2VgYFjNxMCwAIjXA/FOJgg/gZGBIRaI04A4HYijgbi7OxuomgkF8zNgAkYsGAwARQMG9Q==');
        B := DTMFromString('mbQAAAHicY2VgYLjCxMBwAogvAvEjID4LxDaMDAxmQGwPxE5AbAzEhUmJQNVMKJifARMwYsFgAABAigan');
        C := DTMFromString('mbQAAAHicY2VgYLjMxMBwC4hPA/EpIL4PxImMDAwRQJwMxDlAHAPEmnZ2QNVMKJifARMwYsFgAABXgAbb');
    
        if ExistsItemDTM(A, X, Y) then
        begin
          if (CoordsToItem(X, Y) = 4) then
          begin
            Inc(Trout_Caught);
            IncEx(FishXP, 50);
          end;
        end else if ExistsItemDTM(B, X, Y) then
        begin
          if (CoordsToItem(X, Y) = 4) then
          begin
            Inc(Salmon_Caught);
            IncEx(FishXP, 70);
          end;
        end else if ExistsItemDTM(C, X, Y) then
        begin
          if (CoordsToItem(X, Y) = 4) then
          begin
            Inc(Sturgeon_Caught);
            IncEx(FishXP, 80);
          end;
        end;
    
        FreeDTM(A);
        FreeDTM(B);
        FreeDTM(C);
      end;
    
      Procedure FastDropSlot(Slot: Integer);
      Var
        TB: TBox;
        ME: MEvent;
      begin
        Case Slot of
          1: TB := IntToBox(564,214,598,244);
          2: TB := IntToBox(606,214,640,244);
          3: TB := IntToBox(648,214,682,244);
          4: TB := IntToBox(690,214,724,244);
    
          5: TB := IntToBox(564,250,598,280);
          6: TB := IntToBox(606,250,640,280);
          7: TB := IntToBox(648,250,682,280);
          8: TB := IntToBox(690,250,724,280);
    
          9: TB := IntToBox(564,286,598,316);
          10: TB := IntToBox(606,286,640,316);
          11: TB := IntToBox(648,286,682,316);
          12: TB := IntToBox(690,286,724,316);
    
          13: TB := IntToBox(564,322,598,352);
          14: TB := IntToBox(606,322,640,352);
          15: TB := IntToBox(648,322,682,352);
          16: TB := IntToBox(690,322,724,352);
    
          17: TB := IntToBox(564,358,598,388);
          18: TB := IntToBox(606,358,640,388);
          19: TB := IntToBox(648,358,682,388);
          20: TB := IntToBox(690,358,724,388);
    
          21: TB := IntToBox(564,394,598,424);
          22: TB := IntToBox(606,394,640,424);
          23: TB := IntToBox(648,394,682,424);
          24: TB := IntToBox(690,394,724,424);
    
          25: TB := IntToBox(564,430,598,460);
          26: TB := IntToBox(606,430,640,460);
          27: TB := IntToBox(648,430,682,460);
          28: TB := IntToBox(690,430,724,460);
        end;
        MouseSpeed := RandomRange(26, 39);
        ME := ConMEvent('brake', RandomRange(MiddleBox(TB).X-8, MiddleBox(TB).X+8), RandomRange(MiddleBox(TB).Y-8, MiddleBox(TB).Y+8),
              0, 0, mouse_right);
        StreamMouse(ME, [], ['Drop'], 0, 400);
      end;
    
      Procedure DropRemaining;
      Var
        I,MS,T: Integer;
      begin
        MS := MouseSpeed;
        T  := GetTimeRunning;
    
        if not AlchFish then
        begin
          FastDropSlot(2);
          FastDropSlot(3);
        end;
    
        FastDropSlot(4);
    
        For I := 8 downto 5 do
        begin
          if (I = 9) then
            Break;
          FastDropSlot(I);
        end;
    
        For I := 9 to high(12) do
        begin
          if (I = 13) then
            Break;
          FastDropSlot(I);
        end;
    
        For I := 16 downto 13 do
        begin
          if (I = 17) then
            Break;
          FastDropSlot(I);
        end;
    
        For I := 17 to high(20) do
        begin
          if (I = 21) then
            Break;
          FastDropSlot(I);
        end;
    
        For I := 24 downto 21 do
        begin
          if (I = 25) then
            Break;
          FastDropSlot(I);
        end;
    
        For I := 25 to high(28) do
        begin
          if (I = 29) then
            Break;
          FastDropSlot(I);
        end;
    
        Writeln('Dropped fish in '+IntToStr(GetTimeRunning-T)+' ms.');
        MouseSpeed := MS;
      end;
    
      Procedure ReadyAlch;
      var
        X,Y,AlchBMP: Integer;
      begin
        AlchBMP := BitmapFromString(10, 6, 'meJwLuf2Kd8o6JkYmVl1+sVgVpk0' +
            'y8sez4Uhi10WILLsQO4sHG1MOC1ABHAGl2OKaILJABDQBGQGlIAii' +
            'AFOWtbwfiICyaAq+n0oEigMNZ/HJZjFwhyuA2wIAwl0jlg==');
    
        if FindBitmapIn(AlchBMP, X, Y, MIX1, MIY1, MIX2, MIY2) then
        begin
          BrakeMMouse(X, Y, 5, 5);
          FastClick(mouse_left);
        end else if not FindBitmapIn(AlchBMP, X, Y, MIX1, MIY1, MIX2, MIY2) then
        begin
          GameTab(tab_Magic);
          if FindBitmapIn(AlchBMP, X, Y, MIX1, MIY1, MIX2, MIY2) then
          begin
            BrakeMMouse(X, Y, 5, 5);
            FastClick(mouse_left);
            MMouseItem(4);
          end;
        end;
        FreeBitmap(AlchBMP);
      end;
    
      Procedure FishnAlch;
      var
        X,Y,T,DTM: Integer;
      begin
        MarkTime(T);
        ReadyAlch;
    
        repeat
          FindNonInventoryRandoms;
          ClickToContinue;
    
          if FindNPCChatText('these fish', Nothing) then
            Logout;
    
          if IsFishing then
            Marktime(T);
    
          if InvFull then
            break;
    
          if ExistsItem(4) then
          begin
            MMouseItem(4);
            if WaitUpTextMulti(['Cast', 'ow L', 'evel', 'lchem'], 400) then
            begin
              GetFishType;
              FastClick(mouse_right);
              IncEx(MagicXP, 31);
              ClickToContinue;
    
              DTM := DTMFromString('mQwAAAHicY2ZgYChiYmDIYILQEowMDFJALAjEMpuYGA4tEGA4d+UWAz9QHQwzIWEgAAD7eAaN');
              WaitFindDTM(X, Y, DTM, 4000);
              FreeDTM(DTM);
    
              ReadyAlch;
              MarkTime(T);
            end else
              ReadyAlch;
          end;
    
        until(TimeFromMark(T) >= FishTimer)
      end;
    
      Procedure FishingWait;
      var
        T: Integer;
      begin
    
        Marktime(T);
        repeat
          FindNormalRandoms;
          ClickToContinue;
    
          if FindNPCChatText('these fish', Nothing) then
            Logout;
    
          if IsFishing then
            Marktime(T);
    
          if InvFull then
            break;
    
          if AntiBan then
            Marktime(T);
    
        until(TimeFromMark(T) >= FishTimer)
    
      end;
    
      Procedure ReturnValues(colors: TIntegerArray; var HueMods, SatMods: Extended; var color, Tolerance: Integer);
      Var
        h, s, t: Extended;
        I,II : integer;
        HSLColor : Array[1..3] of Extended;
        HSL : Array[0..1] of Array[1..3] of Extended;
      begin;
        For I:= 1 to 3 do
        begin;
          HSL[0][i] := 255;
        end;
    
        For I:= 0 to High(Colors) do
        begin;
          ColortoHSL(Colors[i],HSLColor[1],HSLColor[2],HSLColor[3]);
          For II:= 1 to 3 do
          begin;
            HSL[0][II] := MinE(HSLColor[II],HSL[0][II]);
            HSL[1][II] := MaxE(HSLColor[II],HSL[1][II]);
          end;
        end;
    
        H := (HSL[1][1] - HSL[0][1]);
        S := (HSL[1][2] - HSL[0][2]);
        T := (HSL[1][3] - HSL[0][3]);
    
        try
          HueMods := (H/T);
          SatMods := (S/T);
          Tolerance := Round(t);
        except
          HueMods := 0;
          SatMods := 0;
          Tolerance := Round(0.0);
        end;
    
        Color := HSLToColor((HSL[1][1] + HSL[0][1]) div 2,(HSL[1][2] + HSL[0][2]) div 2,(HSL[1][3] + HSL[0][3]) div 2);
      end;
    
      Function FindFishingSpot2(Var X,Y: Integer): Boolean;
      var
        B: TBox;
        TPA: TPointArray;
        Hmod,Smod: Extended;
        i,Tol,CTS,Col: Integer;
        ATPA: T2DPointArray;
      begin
        Result := False;
    
        ReturnValues([11970978, 12169386, 12433588], Hmod, Smod, Col, Tol);
        CTS := GetColorToleranceSpeed;
        ColorToleranceSpeed(2);
        SetColorSpeed2Modifiers(Hmod, SMod);
        FindColorsSpiralTolerance(MSCX, MSCY, TPA, Col, MSX1, MSY1, MSX2, MSY2, Tol);
        ColorToleranceSpeed(CTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
    
        if (Length(TPA) < 1) then
          Exit;
    
        SplitTPAExWrap(TPA, 40, 40, ATPA);
    
        SortATPAFromFirstpoint(ATPA, Point(MSCX, MSCY+45));
    
        for i := 0 to High(ATPA) do
        begin
          if (GetArrayLength(ATPA[i]) > 20) then
          begin
            B := GetTPABounds(ATPA[i]);
    
            MiddleTPAEx(ATPA[i], X, Y);
            BrakeMMouse(X, Y, 15, 15);
            if WaitUptextMulti(['se-Rod','Fishing','spot'], 500) then
            begin
              Result := True;
              GetMousePos(X, Y);
              Exit;
            end else
              Result := False;
    
          end;
        end;
    
      end;
    
      Function FindFishingSpot(Var X,Y: Integer): Boolean;
      var
        Loop: Boolean;
        TPA: TPointArray;
        i,CTS,F: Integer;
        ATPA: T2DPointArray;
      label
        Start;
      begin
        Result := False;
        Loop := False;
        CTS := GetColorToleranceSpeed;
    
        Start:
        ColorToleranceSpeed(2);
        SetColorSpeed2Modifiers(0.34, 0.66);
        FindColorsSpiralTolerance(MSCX, MSCY, TPA, 12103593, MSX1, MSY1, MSX2, MSY2, 6);
        ColorToleranceSpeed(CTS);
        SetColorSpeed2Modifiers(0.2, 0.2)
    
        if (Length(TPA) < 1) then
          Exit;
    
        SplitTPAExWrap(TPA, 40, 40, ATPA);
        SortATPAFromFirstpoint(ATPA, Point(MSCX, MSCY+45));
    
        for i := 0 to High(ATPA) do
        begin
    
          MiddleTPAEx(ATPA[i], X, Y);
          BrakeMMouse(X, Y, 15, 15);
          if WaitUptextMulti(['se-Rod','Fishing','spot'], 500) then
          begin
            Result := True;
            GetMousePos(X, Y);
            Exit;
          end else
          begin
            Inc(F);
            if (F > 7) then
              Exit;
            Loop := True;
            Break;
          end;
        end;
        if Loop then
          goto Start;
    
      end;
    
      Procedure StartFishing;
      var
        XP1,XP2,XP3,TroutDTM,
        SalmonDTM,SturgeonDTM,
        TC,SaC,StC,X,Y: Integer;
      label
        Start;
      begin
        if not LoggedIn then
          Exit;
    
        if InvFull then
        begin
    
          TroutDTM := DTMFromString('mbQAAAHicY2VgYFjNxMCwAIjXA/FOJgg/gZGBIRaI04A4HYijgbi7OxuomgkF8zNgAkYsGAwARQMG9Q==');
          SalmonDTM := DTMFromString('mbQAAAHicY2VgYLjCxMBwAogvAvEjID4LxDaMDAxmQGwPxE5AbAzEhUmJQNVMKJifARMwYsFgAABAigan');
          SturgeonDTM := DTMFromString('mbQAAAHicY2VgYLjMxMBwC4hPA/EpIL4PxImMDAwRQJwMxDlAHAPEmnZ2QNVMKJifARMwYsFgAABXgAbb');
    
          TC := CountItems('dtm', TroutDTM, []);
          SaC := CountItems('dtm', SalmonDTM, []);
          StC := CountItems('dtm', SturgeonDTM, []);
    
          IncEx(Trout_Caught, TC);
          IncEx(Salmon_Caught, SaC);
          IncEx(Sturgeon_Caught, StC);
          XP1 := (TC*50);
          XP2 := (SaC*70);
          XP3 := (StC*80);
          IncEx(FishXP, XP1+XP2+XP3);
          Report;
          FreeDTM(TroutDTM);
          FreeDTM(SalmonDTM);
          FreeDTM(SturgeonDTM);
          DropRemaining;
          {$IFDEF SMART}
            OnScreen;
          {$ENDIF}
        end;
    
        Start:
        MakeCompass('W');
        if (FindFishingSpot(X, Y) or FindFishingSpot2(X, Y)) then
        begin
          {$IFDEF SMART}
            OnScreen;
          {$ENDIF}
          ClickMouse2(True);
    
          if not DidRedClick then
            goto Start;
    
          While IsMoving_F do
            Wait(1);
    
          Wait(RandomRange(2000, 2500));
    
          if AlchFish then
            FishnAlch
          else
            FishingWait;
        end else
          NextSpot;
    
      end;
    end;
    
      Function BreakHandler(BreakIn, BreakFor, randBreakIn, randBreakFor: Integer): Boolean;
      Var
        h,m,s: integer;
      begin
        if not LoggedIn then Exit;
    
        if (HowManyPlayers = 1) then
        begin
          if (GetTimeRunning < ((w) + (y) + BreakRounds)) then Exit
          else
            if (GetTimeRunning > ((w) + (y) + BreakRounds)) then
            begin
              RealBTime := ((x+z)/60000);
              Writeln('Taking a break for about ' + IntToStr(RealBTime) + ' minutes.');
              Logout;
              MarkTime(CurrentBTime);
              repeat
                Wait(21000);
                ConvertTime((x+z)-TimeFromMark(CurrentBTime), h, m, s);
                ClearDebug;
                Writeln('Breaktime left: '+IntToStr(h)+':'+IntToStr(m)+':'+IntToStr(s));
              until(TimeFromMark(CurrentBTime)>(x+z));
              Writeln('Logging in.');
              if SwitchWorlds then
                if LoginPlayerToLob then
                  ChangeWorld(RandomWorld(True, False))
              else
                LoginPlayer;
              Wait(4000);
              Result := LoggedIn;
              SetAngle(SRL_ANGLE_HIGH);
              MakeCompass('W');
              IncEx(BreakRounds, (w) + (x));
              Inc(TotalBreaks);
              Writeln('The next break will occur in about ' + IntToStr(BreakIn) + ' minutes.');
              w := (BreakIn * 60000);
              x := (BreakFor * 60000);
              y := RandomRange(-Bir * 60000, Bir * 60000);
              z := RandomRange(-Bfr * 60000, Bfr * 60000);
            end;
        end;
      end;
    
    begin
      {$IFDEF SMART}
        Smart_FixSpeed := True;
      {$ENDIF}
    
      setupSRL();
      DeclarePlayers;
    
      Loadvars;
      {$IFDEF SMART}
        LoadImg;
      {$ENDIF}
    
      AddOnTerminate('FreeGlobals');
    
      if (not LoggedIn) then
        LogInPlayer;
    
      SetAngle(SRL_ANGLE_HIGH);
      MakeCompass('W');
    
      AddToBelt('Barbarian rod');
    
      Repeat
        if (not LoggedIn) then
        begin
          LoginPlayer;
          SetAngle(SRL_ANGLE_HIGH);
          MakeCompass('W');
        end;
    
        if (TimeFromMark(CommitTime)>=60000) then
          Commit;
    
        if (TimeFromMark(ReportTime)>=21000) then
          Report;
    
        BreakHandler(BreakIn,BreakFor,Bir,Bfr);
    
        FindNormalRandoms;
        StartFishing;
    
      Until(AllPlayersInactive)
    
    end.

  13. #13
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    have you tried force updating your srl?

  14. #14
    Join Date
    Oct 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Ollybest View Post
    have you tried force updating your srl?
    Yes. Everything is fully updated.

  15. #15
    Join Date
    Apr 2012
    Location
    Bawtville
    Posts
    61
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I have. It doesn't do diddly squat

  16. #16
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

    Default

    download riwu's login.simba and replace your old login.simba file. That is a temp fix at least

  17. #17
    Join Date
    Jan 2012
    Posts
    2,568
    Mentioned
    35 Post(s)
    Quoted
    356 Post(s)

    Default

    Quote Originally Posted by Parfilo View Post
    I am very confused with what you guys are saying to fix it.
    This is one of the many scripts that are not working with simba anymore,
    for this particular script i get this error:
    The updated login.simba is already on SRL autoupdater, also the error you received is not related to the previous update, maybe you accidentally removed or added in some junk to the file.

    To force update you have to SRL>Settings>Override update, then SRL> Update. (dont check for update).
    If it still don't work then it's script related so report it to the thread of the script.

    Also if you get an error in the SmartParams file then you have to remove a -1 in the param of SmartSpawnClient few lines below the error.

  18. #18
    Join Date
    Apr 2012
    Location
    Bawtville
    Posts
    61
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by riwu View Post
    The updated login.simba is already on SRL autoupdater, also the error you received is not related to the previous update, maybe you accidentally removed or added in some junk to the file.

    To force update you have to SRL>Settings>Override update, then SRL> Update. (dont check for update).
    If it still don't work then it's script related so report it to the thread of the script.

    Also if you get an error in the SmartParams file then you have to remove a -1 in the param of SmartSpawnClient few lines below the error.
    Thank you very much for explaining it to me, simba is now working for me 100%!

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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