SRL Archive - First Scripts

ok so why wont this work =b


351bryce

2014-02-10 05:41:15

ok so it runs but its stop straight after all i wont it to do it find the colour click on that colour if found cast f1 then when the colour comes in close hold ctrl this is a 2d game im useing it for and i havnt done scripting in like 5 years so its almost like starting again.

program new;

var x, y: integer;


function busy: boolean;
begin
if findColorTolerance(x, y, 9599291, 169, 276, 298, 363, 15) then
result := true;
end

Function checknpc: Boolean;
begin
if findColorTolerance(x, y, 9599291, 0, 0, 838, 632, 15) then
result := true;
end


procedure mainloop;
begin
wait(5000)
repeat
if (not busy) then
begin
if checknpc then
begin
wait(50);
movemouse(x, y);
wait(50);
clickmouse(x, y, mouse_left);
wait(50);
presskey(112);
wait(5000)
end
end
if busy then
begin
keydown(17);
wait (10000);
keyup(17);
end
until (false);
end

351bryce

2014-02-10 05:45:21

Fixed i shouldnt make the main loop a procedure it will just skip the whole script ok now i have the problem that it wont click any ideas!

it wont click on the game only if i click on simba will it find the colour but it wont have anything to do with the game maybe protected by something?

Brotein

2014-02-10 09:09:08

You should post in the Help section next time ;)

http://villavu.com/forum/forumdisplay.php?f=488

351bryce

2014-02-10 11:41:35

ok will next time kinda got lost so many threads. =)