PDA

View Full Version : Help with antiban



newguy45
12-11-2020, 07:34 PM
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?



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.

Lucidity
12-12-2020, 12:34 AM
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.

newguy45
12-12-2020, 04:07 AM
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