SRL Archive - OSR Help

Could somebody tell my what im doing wrong?


iextremee

2013-11-22 11:13:31

So i have knowledge of java but no knowledge at all with srl, so far I've just used common sense and trial and error also a few Google's to solve some problems, but this i don't really know what to do, its a bot for Soulsplit btw, basically what i want to do is make it spin the camera around until it finds the color of the yak then it stops and starts the procedure AttackYak. Help would be appreciated here are the procedures im working on -
Procedure AttackYak;

begin
if(FindColorSpiralTolerance(x, y, Monster, MSX1, MSY1, MSX2, MSY2, 4)) then
begin Mouse(x, y, 3, 3, True);
wait(RandomRange(4500, 4800));
end;
end;

Procedure TurnCamera;
begin
repeat
KeyDown(39);
wait(RandomRange(50, 100));
KeyUp(39) until
(FindColorSpiralTolerance(x, y, Monster, MSX1, MSY1, MSX2, MSY2, 4)) then
AttackYak;
end;

Olly

2013-11-22 11:17:59

function AttackYak: boolean; //change this procedure to a function, so it outputs a boolean!
var
x, y: integer; //our integer vars for saving the color pos
begin
if(FindColorSpiralTolerance(x, y, Monster, MSX1, MSY1, MSX2, MSY2, 4)) then
begin
//Mouse(x, y, 3, 3, True);
wait(RandomRange(4500, 4800));
result := true // if we're here the result is true!
end;
end;

Procedure TurnCamera;
begin
repeat
KeyDown(39);
wait(RandomRange(50, 100));
KeyUp(39)
until (AttackYak);
end;

Should do the job.

iextremee

2013-11-22 11:22:40

ill give it a go mate, thanks!

iextremee

2013-11-22 11:30:58

Worked like a charm, thanks alot pal, btw whats the name of that character on your dp? its doing my head in haha i recognize it just cant put a name to it *facepalm*