SRL Archive - OSR Help

Mouse(x, y, 5, 5, true)


cmxz1

2012-02-04 07:19:52

How can i make mouse click urn when its done?

This is not my code, im trying to make it use 2 urns at once.

 Procedure CheckUrn;
begin
if FindColorTolerance(x, y, 5006162, 576, 203, 584, 239, 4) then
begin
Mouse(x, y, 5, 5, true); //Clicks the urn found
Wait(1000+random(100));
FindColorTolerance(x, y, 1907518, 256, 333, 258, 441, 4); //Finds Food
Mouse(x, y, 5, 5, true);
Writeln('Urn Sent! Yay XP');
CUrn:= False;
Inc(UrnsTeled)
Wait(1000+random(100));
end else
Curn:= True; //This is why an urn is needed on startup >.<
end;

How can i make it click the textbox where teleporting urn option appears?
Atm it just click urn twice in invetory.

weeps

2012-02-04 07:23:03

You need to find the item first, so it should be a findcolor at the top.

cmxz1

2012-02-04 07:32:59

From: weeps
You need to find the item first, so it should be a findcolor at the top.


My bad, added whole procedure

lilcmp1

2012-02-04 11:00:59

Find a color you can click in the text box after the urn appears. DTM might work too. You can use functions that search for a color/dtm within a specific area such as the textbox.

I'd help you more but I've never used urns lol. Just play around with the functions.

cmxz1

2012-02-05 08:37:36

From: lilcmp1
Find a color you can click in the text box after the urn appears. DTM might work too. You can use functions that search for a color/dtm within a specific area such as the textbox.

I'd help you more but I've never used urns lol. Just play around with the functions.


This is the part that gets hard for me, how do i find coordinates?

Full urn colour is here
 FindColorTolerance(x, y, 5006162, x1, y1, x2, y2) then

When urn is full some green shit appears on top of it.

Rawrasaurus

2012-02-05 08:58:10

From: cmxz1
This is the part that gets hard for me, how do i find coordinates?

Full urn colour is here
 FindColorTolerance(x, y, 5006162, x1, y1, x2, y2) then

When urn is full some green shit appears on top of it.


Use the colour picker to find the place you want the co-ords for, then it shows it on the right hand side of the box that appears


cmxz1

2012-02-05 10:32:13

From: Rawrasaurus
Use the colour picker to find the place you want the co-ords for, then it shows it on the right hand side of the box that appears



Yea but that only works on my resolution and i have to place rs client always on same spot.

So the question is, how can i get only rs clients resolution to show up, not only my whole screen.

Brandon

2012-02-05 10:33:22

FindNPCChatText("eleport");

That will choose the teleport option.

cmxz1

2012-02-05 12:55:25

From: ggzz
FindNPCChatText("eleport");

That will choose the teleport option.


So it will look like this?
 Procedure CheckUrn;
begin
if FindColorTolerance(x, y, 5006162, 576, 203, 584, 239, 4) then
begin
Mouse(x, y, 5, 5, true); //Clicks the urn found
Wait(1000+random(100));
FindColorTolerance(x, y, 1907518, 256, 333, 258, 441, 4); //Finds Food
FindNPCChatText("eleport");
Mouse(x, y, 5, 5, true);
Writeln('Urn Sent! Yay XP');
CUrn:= False;
Inc(UrnsTeled)
Wait(1000+random(100));
end else
Curn:= True; //This is why an urn is needed on startup >.<
end;

What Mouse(x, y, 5, 5, true); even does? I understand it makes mouse use left button but where is 5,5?

Nataurs

2012-02-05 13:06:55

randomness of the click, so when it finds the item it will click the range of which u set it (5 along the x-axis and y-axis)

cmxz1

2012-02-05 14:27:46

From: Nataurs
randomness of the click, so when it finds the item it will click the range of which u set it (5 along the x-axis and y-axis)

So its just antiban? if i put both 0 then it clicks at same spot every time?

Borland

2012-02-08 14:53:23

From: cmxz1
So its just antiban? if i put both 0 then it clicks at same spot every time?


Yup…