Results 1 to 3 of 3

Thread: Help with antiban

  1. #1
    Join Date
    May 2006
    Posts
    120
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default Help with antiban

    So I've been playing trailblazers and am fishing but my script does not run the antiban function on a random number between 8-20 like I would expect it too, where have I gone wrong?

    Code:
    program Train;
    {$I SRL-6/SRL.Simba}
    
    var
    Count, AntiBanCount, X, Y: Integer;
    
    procedure EquClick
    
     begin
        mouseSpeed := (randomRange(6, 45));
        Mouse(814, 627, 20, 30, MOUSE_LEFT);
        wait(randomRange(1500, 2500));
        Count := Count +1;
     end;
    
    procedure SomthingDiffrent
    begin
     AntiBanCount := AntiBanCount +1;
       if(AntiBanCount = (randomRange(8, 20)))then               // THIS IS THE PART I NEED HELP WITH
       begin
        mouseSpeed := (randomRange(28, 40));
        Mouse(830, 639, 5, 1, MOUSE_LEFT);
        wait(randomRange(312, 743));
        Mouse(1524, 698, 5, 1, MOUSE_LEFT);
        wait(randomRange(312, 743));
        writeln('Antiban Completed on count '+IntToStr(AntiBanCount));
        AntiBanCount := 0;
       end else
       begin
       end
    end;
    
    
    
     begin
       Count := 0;
       AntiBanCount := 0;
        repeat
        EquClick;
        SomthingDiffrent;
        //writeln('count is '+IntToStr(Count));
        //if not(Findcolor(X,Y, 7494225, 756, 575, 934, 728))then
        //begin
          //Mouse(1521, 995, 5, 1, MOUSE_LEFT);
         // wait(randomRange(300, 456));
          //Mouse(1516, 945, 5, 1, MOUSE_LEFT);
          //writeln('Lost fishing spot, Logged out');
         // Count := 101;
       // end
     writeln('Antiban count '+IntToStr(AntiBanCount));
      until(Count=101);
      Mouse(1521, 995, 5, 1, MOUSE_LEFT);
      wait(randomRange(300, 456));
      Mouse(1516, 945, 5, 1, MOUSE_LEFT);
     end.

  2. #2
    Join Date
    Jun 2014
    Posts
    463
    Mentioned
    27 Post(s)
    Quoted
    229 Post(s)

    Default

    Your issue is specifically with that line.

    if(AntiBanCount = (randomRange(8, 20)))then

    Right now you're only checking if it's equal to, you should check if the antibancount is greater than OR equal to.

    Since you're changing the value (randomRange(8,20) and say it's 13 on the first time around but your antibancount is at 12, then it runs again and your antiban count is now at 13, but now the randomrange is lower. It'll never reach the number.

    Now if you do greater than or equal to, it'll eventually have no choice but to execute.
    Last edited by Lucidity; 12-12-2020 at 12:36 AM.
    Tsunami

  3. #3
    Join Date
    May 2006
    Posts
    120
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Quote Originally Posted by Lucidity View Post
    Your issue is specifically with that line.

    if(AntiBanCount = (randomRange(8, 20)))then

    Right now you're only checking if it's equal to, you should check if the antibancount is greater than OR equal to.

    Since you're changing the value (randomRange(8,20) and say it's 13 on the first time around but your antibancount is at 12, then it runs again and your antiban count is now at 13, but now the randomrange is lower. It'll never reach the number.

    Now if you do greater than or equal to, it'll eventually have no choice but to execute.

    Thankyou <3

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
  •