SRL Archive - General Botting Help

[RSPS] Fighter bot


xX4m4zingXx

2014-03-16 15:17:09

I want to create a fighter bot that checks if npc is dead and attacks new npc
how can i make that?

rj

2014-03-16 15:27:10

Does this RSPS have an XP bar like this?


xX4m4zingXx

2014-03-16 15:34:41

Yep but it doesn't count it good because i already got it 99 and now it's glitching

rj

2014-03-16 15:37:07

From: xX4m4zingXx
Yep


Is the server called soulsplit?

xX4m4zingXx

2014-03-16 15:39:04

read my edit. and no. it's an pi. aggroth i believe

rj

2014-03-16 15:48:05

From: xX4m4zingXx
read my edit. and no. it's an pi. aggroth i believe


So does it have a XP bar on the mainscreen or not?

xX4m4zingXx

2014-03-16 16:02:29

yes it does but it's glitchy but it does

rj

2014-03-16 16:11:11

From: xX4m4zingXx
yes it does but it's glitchy but it does


You can count the number of colors in the XP bar, and check if that number changed. If it did not, then you can assume you're no longer in combat and thus killed a monster

function differentCount(time:integer): Boolean;
var
_white_count:integer;
begin
_white_count := countColorTolerance(16777215, 410, 110, 508, 123, 5);
wait(time);
result := (_white_count <> countColorTolerance(16777215, 410, 110, 508, 123, 5));
end;

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

xX4m4zingXx

2014-03-16 16:23:57

oh yeh that's a good one, but what do all that numbers mean because i got an xp bar but it's other colors

xX4m4zingXx

2014-03-17 12:02:21

Bump

xX4m4zingXx

2014-03-22 13:18:01

Ok, i now got this code
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 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
writeln('Couldnt find any monsters')
end;
end;
begin
AttackMonster;
end.

but it doesn't attack again after it killed the monster
can you help me?