SRL Archive - General Botting Help

[Server] fight bot


xX4m4zingXx

2014-10-07 14:33:53

I have made a fight bot with a lot of help from this community, but now the server had an update.
when you are max level in a skill the skill counter stopped counting up.
my code now is:
Program AttachMonster;
{$I RSPS/srlRSPS.Simba}
function differentCount(time:integer): Boolean;
var
_white_count:integer;
begin
_white_count := countColorTolerance(16646143, 429, 80, 516, 95, 5);
Wait(time);
result := (_white_count <> countColorTolerance(16646143, 429, 80, 516, 95, 5));
end;

function inCombat:boolean;
begin
result := differentCount(3300);
end;

Procedure LoggedOut
var
X,Y:Integer;
begin
writeln('Couldnt find any monsters');
MouseSpeed := 15;
Mouse(452, 313);
wait(500);
Mouse(311, 344);
wait(10000);
Mouse(538, 87);
wait(500);
end

Procedure AttackMonster
var
X,Y:Integer;
begin
if FindColorTolerance (X, Y, 10337744, 44, 91, 556, 425, 2) then
begin
MouseSpeed := 15;
Mouse(x, y);
end
else
begin
LoggedOut
end
end;

begin
repeat
while not inCombat() do
attackMonster();
until(false);
end.

but now it will attack another npc even if it's already in fight

can someone help me?
Can I make something like that it will search for an empty red bar, but then it will also attack again if someone else kills a monster?

Lipcot

2014-10-07 20:12:25

From: xX4m4zingXx
I have made a fight bot with a lot of help from this community, but now the server had an update.
when you are max level in a skill the skill counter stopped counting up.
my code now is:
Program AttachMonster;
{$I RSPS/srlRSPS.Simba}
function differentCount(time:integer): Boolean;
var
_white_count:integer;
begin
_white_count := countColorTolerance(16646143, 429, 80, 516, 95, 5);
Wait(time);
result := (_white_count <> countColorTolerance(16646143, 429, 80, 516, 95, 5));
end;

function inCombat:boolean;
begin
result := differentCount(3300);
end;

Procedure LoggedOut
var
X,Y:Integer;
begin
writeln('Couldnt find any monsters');
MouseSpeed := 15;
Mouse(452, 313);
wait(500);
Mouse(311, 344);
wait(10000);
Mouse(538, 87);
wait(500);
end

Procedure AttackMonster
var
X,Y:Integer;
begin
if FindColorTolerance (X, Y, 10337744, 44, 91, 556, 425, 2) then
begin
MouseSpeed := 15;
Mouse(x, y);
end
else
begin
LoggedOut
end
end;

begin
repeat
while not inCombat() do
attackMonster();
until(false);
end.

but now it will attack another npc even if it's already in fight

can someone help me?
Can I make something like that it will search for an empty red bar, but then it will also attack again if someone else kills a monster?


in rs3 i look for the bar the appears when you fight, if its not there, then target another npc. i Use DTM finder for this, although you should add failsafes

xX4m4zingXx

2014-10-09 11:22:53

From: undorak7
in rs3 i look for the bar the appears when you fight, if its not there, then target another npc. i Use DTM finder for this, although you should add failsafes


is it possible to do that in servers?
and also is it possible to check for a red bar near my player?

the bank

2014-10-09 14:30:20

Of course it is, grab the color of the bar from inside your server, then search for it with one of the spiral methods which start from the center of your screen.

This was one of the earliest ways of detecting whether someone is "inFight" in early SRL/SCAR.

xX4m4zingXx

2014-10-11 14:23:25

How can I make it then that it will always be around my player and not that if a player around me kills a monster that it will detect that?

xX4m4zingXx

2014-10-20 16:21:53

Bump

aran armath

2014-10-20 20:46:03

I have put a couple suggestions below, but they will only work if you are using SRL. From the look of your script, you're are currently not… https://villavu.com/forum/forumdisplay.php?f=648 I would take a look at atleast one of those.

This might be of assistance. Only works if you can see your player.

while (mainscreen.isPlayerAnimating()) do
begin
wait(randomrange(50,100));
AntiBan();
Or whatever you do while fighting
end;

This will attack said monster and if no monster is found will log out using your log out function.

Procedure AttackMonster
var
X,Y:Integer;
begin
if not mainscreen.findObject(x, y, 10337744, 2, ['ttack'], MOUSE_LEFT) then LoggedOut;
end;

Great effort so far!! Keep it up!!

xX4m4zingXx

2014-10-31 17:11:26

Ty, but this is not for RS3 I'm making a bot for an RSPS.