SRL Archive - Help

how do i make simba click a color ?


print

2012-08-10 10:24:10

see im tryng to make a better alcher and i want to know how to make it click randomly the color =)
i dont want it to click same spot becouse that easy ban

riwu

2012-08-10 10:27:55

If FindColorTolerance(x,y,blabla) then
Mouse(x,y,5,5,true); //where 5,5 is the random offset for x and y coordinates respectively.
I suggest u head to the beginners' tutorial section and read up more first.

Footy

2012-08-10 10:30:07

I'd suggest using a dtm to find the high alch button, then using mouse with randomness once you find it. Look for yohojos dtm tut, it's really easy to learn and follow!

Nebula

2012-08-10 10:30:50

function FindColorTolerance(var x, y: Integer; col, x1, y1, x2, y2, tol: Integer): Boolean;

FindColorTolerance returns true if a colour within the given tolerance range tol of the given colour col is found in the box defined by x1, y1, x2, y2. Only the first point is returned in x and y. It searches from the top left to the bottom right and will stop after matching a point.


If FindColorTolerance(x, y, Color here, MIX1, MIY1, MIX2, MIY2, tolerance) then
Mouse(x, y, 2, 2, true);

This would left click the first alch color found in the inventory box. Use simba's color picking tool to choose the color, set the tolerance to 6-12.

of course you would have to learn to define variables.

You do that like this at the beginning of the script, after you include SRL.


program ScriptName;
{$i SRL\SRL.simba}

var
x, y: Integer;

This means that you can use x and y to store any number, which in this case you are storing the x+y coordinates of the color found.

print

2012-08-10 11:10:10

program alchpro;
{$i SRL\SRL.simba}

var
x, y: Integer;
begin
If FindColorTolerance(x, y, 900849, MIX1, MIY1, MIX2, MIY2,6) then
Mouse(791,393, 2, 2, true);
end.
when i press plzy it moves the mouse very slowly what did i do wrong?

Footy

2012-08-10 11:15:16

Put setupSRL after your begin, before everything else.