SRL Archive - General Botting Help

How Would you suggest to do it ?


ikbennietniels

2014-02-07 11:35:25

I think this can be writen way more easy an less compicated , and i dont actually know how to put the (wait 1000) in to the " if then" and should i even use the IF then ?

[PHP]repeat
if FindColorTolerance (x, y,14126082, Bounds.X1, Bounds.Y1, Bounds.X2, Bounds.Y2, 5)then
MoveMouse(x, y, 4, 4 true) //start battle & lage continue
Wait(100)
if FindColorTolerance(x, y, 14126082, Bounds2.X1, Bounds2.Y1, Bounds2.X2, Bounds2.Y2, 5)then //attack
MoveMouse(x, y, 4 , 4, true);
Wait(1000)
if FindColorTolerance(x, y, 14126082, Bounds2.X1, Bounds2.Y1, Bounds2.X2, Bounds2.Y2, 5)then
MoveMouse(x, y, 4 , 4, true); //continue
Wait(1000)
if FindColorTolerance (x, y,14126082, Bounds.X1, Bounds.Y1, Bounds.X2, Bounds.Y2, 5)then //Continue
MoveMouse(x, y, 4 , 4, true);
Wait(1000)
if FindColorTolerance(x, y, 14126082, Bounds2.X1, Bounds2.Y1, Bounds2.X2, Bounds2.Y2, 5)then //attack
MoveMouse(x, y, 4 , 4, true);
Wait(1000)
if FindColorTolerance(x, y, 14126082, Bounds2.X1, Bounds2.Y1, Bounds2.X2, Bounds2.Y2, 5)then //Continue
MoveMouse(x, y, 4 , 4, true);
Wait(1000)
if FindColorTolerance (x, y,14126082, Bounds.X1, Bounds.Y1, Bounds.X2, Bounds.Y2, 5)then //Continue
MoveMouse(x, y, 4 , 4, true);
Wait(1000)
if FindColorTolerance(x, y, 14126082, Bounds2.X1, Bounds2.Y1, Bounds2.X2, Bounds2.Y2, 5)then //attack
MoveMouse(x, y, 4 , 4, true);
Wait(1000)
if FindColorTolerance(x, y, 14126082, Bounds2.X1, Bounds2.Y1, Bounds2.X2, Bounds2.Y2, 5)then //Continue
MoveMouse(x, y, 4 , 4, true);
Wait(1000)
if FindColorTolerance (x, y,14126082, Bounds.X1, Bounds.Y1, Bounds.X2, Bounds.Y2, 5)then //Continue
MoveMouse(x, y, 4 , 4, true);
Wait(1000)
if FindColorTolerance(x, y, 14126082, Bounds2.X1, Bounds2.Y1, Bounds2.X2, Bounds2.Y2, 5)then //attack
MoveMouse(x, y, 4 , 4, true);
Wait(1000)
if FindColorTolerance(x, y, 14126082, Bounds2.X1, Bounds2.Y1, Bounds2.X2, Bounds2.Y2, 5)then //Continue
MoveMouse(x, y, 4 , 4, true);
Wait(1000)
if FindColorTolerance (x, y,14126082, Bounds.X1, Bounds.Y1, Bounds.X2, Bounds.Y2, 5)then //Continue
MoveMouse(x, y, 4 , 4, true);
Wait(1000)
if FindColorTolerance(x, y, 14126082, Bounds2.X1, Bounds2.Y1, Bounds2.X2, Bounds2.Y2, 5)then //attack
MoveMouse(x, y, 4 , 4, true);
Wait(1000)
if FindColorTolerance(x, y, 14126082, Bounds2.X1, Bounds2.Y1, Bounds2.X2, Bounds2.Y2, 5)then //continue
MoveMouse(x, y, 4 , 4, true);
Wait(1000)
if FindColorTolerance (x, y,14126082, Bounds.X1, Bounds.Y1, Bounds.X2, Bounds.Y2, 5)then //continue
MoveMouse(x, y, 4 , 4, true);
Wait(1000)
if FindColorTolerance(x, y, 14126082, Bounds2.X1, Bounds2.Y1, Bounds2.X2, Bounds2.Y2, 5)then //Attack
MoveMouse(x, y, 4 , 4, true);
Wait(1000)
if FindColorTolerance(x, y, 14126082, Bounds2.X1, Bounds2.Y1, Bounds2.X2, Bounds2.Y2, 5)then //Continue
MoveMouse(x, y, 4 , 4, true);
Wait(1000)
if FindColorTolerance(x, y, 14126082, Bounds3.X1, Bounds3.Y1, Bounds3.X2, Bounds3.Y2, 5)then
MoveMouse(x, y, 4, 4, true); //Battle Same User
until(false);
end. [/PHP]

Zeta Matt

2014-02-07 22:57:27

var
i: integer;
repeat
if FindColorTolerance(x, y,14126082, Bounds.X1, Bounds.Y1, Bounds.X2, Bounds.Y2, 5) then //start battle & lage continue
begin //Everything between 'begin' and 'end' are inside of the if..then condition. If there is only 1 action, they aren't needed.
MoveMouse(x, y, 4, 4, true);
Wait(100);
end;

for i:=1 to 5 do //Will repeat 5 times.
begin
if FindColorTolerance(x, y, 14126082, Bounds2.X1, Bounds2.Y1, Bounds2.X2, Bounds2.Y2, 5) then //attack
begin
MoveMouse(x, y, 4 , 4, true);
Wait(1000);
end;
if FindColorTolerance(x, y, 14126082, Bounds2.X1, Bounds2.Y1, Bounds2.X2, Bounds2.Y2, 5) then //continue
begin
MoveMouse(x, y, 4 , 4, true);
Wait(1000);
end;
if FindColorTolerance (x, y,14126082, Bounds.X1, Bounds.Y1, Bounds.X2, Bounds.Y2, 5) then //Continue
begin
MoveMouse(x, y, 4 , 4, true);
Wait(1000);
end;
end;

if FindColorTolerance(x, y, 14126082, Bounds2.X1, Bounds2.Y1, Bounds2.X2, Bounds2.Y2, 5) then //Attack
begin
MoveMouse(x, y, 4 , 4, true);
Wait(1000);
end;
if FindColorTolerance(x, y, 14126082, Bounds2.X1, Bounds2.Y1, Bounds2.X2, Bounds2.Y2, 5) then //Continue
begin
MoveMouse(x, y, 4 , 4, true);
Wait(1000);
end;
if FindColorTolerance(x, y, 14126082, Bounds3.X1, Bounds3.Y1, Bounds3.X2, Bounds3.Y2, 5) then //Battle Same User
begin
MoveMouse(x, y, 4, 4, true);
end; //didn't need to put 'begin' and 'end' here, since there is only 1 action. But I did put.
until(false);
end.

Try this. All I did was check what fragment was repeated and how many times it repeated, and then making a loop to make it repeat the given amount of times (5). Everything between 'begin' and 'end' are inside the if..then condition. To learn more about conditional statements, read this tut: http://villavu.com/forum/showthread.php?t=58935

Zeta Matt

2014-02-07 23:08:54

By the way, is that a bot for Pockie Ninja or something like that? Just wondering lol. I made bots for Las Noches, Valhalla, Tailed Beast Invasion and Trial Events, but they only work on my size of screen (1920x1080) and on google chrome >.>

Brandon

2014-02-08 02:32:42

I feel like there should be an Optimisation and Simplification tutorial.. By now at least..


var
I, X, Y: Integer;
Bounds, Bounds1, Bounds2, Bounds3: TBox;
begin
For I := 0 To 19 do
Begin
case I of
0, 3, 6, 9, 12, 15: Bounds := Bounds1;
1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17: Bounds := Bounds2;
18: Bounds := Bounds3;
End;

if FindColorTolerance (X, Y, 14126082, Bounds.X1, Bounds.Y1, Bounds.X2, Bounds.Y2, 5)then
begin
Mouse(X, Y, 4, 4, True);
Wait(1000);
end;
End;
end.


OR:


var
I, X, Y: Integer;
Bounds, Bounds1, Bounds2, Bounds3: TBox;
begin
For I := 0 To 19 do
Begin
If I mod 3 = 0 Then
Bounds := Bounds1
Else If I = 18 Then
Bounds := Bounds3
Else
Bounds := Bounds2;

if FindColorTolerance (X, Y, 14126082, Bounds.X1, Bounds.Y1, Bounds.X2, Bounds.Y2, 5)then
begin
Mouse(X, Y, 4, 4, True);
Wait(1000);
end;
End;
end.

ikbennietniels

2014-02-08 12:17:55

From: archermaths
By the way, is that a bot for Pockie Ninja or something like that? Just wondering lol. I made bots for Las Noches, Valhalla, Tailed Beast Invasion and Trial Events, but they only work on my size of screen (1920x1080) and on google chrome >.>


Thanks for helping me out ! and not really this bot is actually for a pokemon clicking game. I'd like to start small with botting… Really thanks for the help now i can investigate it and check what i should've done!

ikbennietniels

2014-02-08 12:18:59

From: Brandon
I feel like there should be an Optimisation and Simplification tutorial.. By now at least..


var
I, X, Y: Integer;
Bounds, Bounds1, Bounds2, Bounds3: TBox;
begin
For I := 0 To 19 do
Begin
case I of
0, 3, 6, 9, 12, 15: Bounds := Bounds1;
1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17: Bounds := Bounds2;
18: Bounds := Bounds3;
End;

if FindColorTolerance (X, Y, 14126082, Bounds.X1, Bounds.Y1, Bounds.X2, Bounds.Y2, 5)then
begin
Mouse(X, Y, 4, 4, True);
Wait(1000);
end;
End;
end.


OR:


var
I, X, Y: Integer;
Bounds, Bounds1, Bounds2, Bounds3: TBox;
begin
For I := 0 To 19 do
Begin
If I mod 3 = 0 Then
Bounds := Bounds1
Else If I = 18 Then
Bounds := Bounds3
Else
Bounds := Bounds2;

if FindColorTolerance (X, Y, 14126082, Bounds.X1, Bounds.Y1, Bounds.X2, Bounds.Y2, 5)then
begin
Mouse(X, Y, 4, 4, True);
Wait(1000);
end;
End;
end.


WAUW , this one looks really ' hightec' for me or how should i say it ill try to find what you did there ! appreciate the help man! thanks alot!

Zeta Matt

2014-02-08 16:28:56

From: ikbennietniels
WAUW , this one looks really ' hightec' for me or how should i say it ill try to find what you did there ! appreciate the help man! thanks alot!


Lol, that is really nice :O owned me haha