SRL Archive - OSR Help

Need help, One line answer


RsExploit

2013-06-30 06:02:40

Hey guys this is my first post in here, but I have been looking around a lot.
I am working on learning to script, and I am using the minimap to find a color on it, and move my character, but instead of searching in the right areas I have listed my mouse cursor is just moved to the 0,0 coordinates on my computer. The error is in these lines
procedure FindStall;
var x, y: integer;
begin
FindColor(x, y, 2441027, 940, 135, 947, 141);
MoveMouse(x, y);
ClickMouse(x, y, 1)
end;

It moves like the x, y are set to 0,0 and then left clicks. Should take an experienced person 30s to answer =0

The Mayor

2013-06-30 06:08:51

From: RsExploit
Hey guys this is my first post in here, but I have been looking around a lot.
I am working on learning to script, and I am using the minimap to find a color on it, and move my character, but instead of searching in the right areas I have listed my mouse cursor is just moved to the 0,0 coordinates on my computer. The error is in these lines
procedure FindStall;
var x, y: integer;
begin
FindColor(x, y, 2441027, 940, 135, 947, 141);
MoveMouse(x, y);
ClickMouse(x, y, 1)
end;

It moves like the x, y are set to 0,0 and then left clicks. Should take an experienced person 30s to answer =0


You should use an if…then…else statement.

If it finds the colour…then move the mouse and click….else we didn't find the colour

procedure FindStall;
var x, y: integer;

begin // these are the minimap coordinates built into SRL already. MM colours change so use a tolerance, in this case 10.
if FindColorTolerance(x, y, 2441027, MMX1, MMY1, MMX2, MMY2, 10) then
begin //we need a begin and end because there is more than one statement after then
MMouse(x, y, 2, 2); //MMouse is less detectable and the 2 px of randomness in each direction
ClickMouse2(mouse_left); //ClickMouse2 is also less detectable
end else
WriteLn('We didnt find the colour on the MM');
end;



SjoeIsCool

RsExploit

2013-06-30 15:17:26

I would use the minimap cordinates already built in, but on the minimap in the starting location there are
actually about 10 different spots it could click with the exact same color…