SRL Archive - OSR Help

MouseCircle help


J J

2012-03-17 17:28:03

Hi

I'm looking to figure out how to use MouseCircle. I want to click on the summoning icon.


MouseCircle(MidX, MidY, Radius, clicktype: integer);

MidX, MidY looks like the middle coords of the circle to me. In my case, that's (706, 143). Clicktype is leftclick so that's 1.

–>

MouseCircle(706, 143, Radius, 1);

I've tried a couple different Radiusses but it hasn't been close to the MidX, MidY points yet. Can anyone explain how to use MouseCircle?

Thanks in advance :)

Velvet Glam

2012-03-17 17:34:49

circle mouse creates a circle around the midx & midy then clicks randomly within that circle

the summon circle is small, so u want your radius to reflect that

you probably want your radius to be 8-10

J J

2012-03-17 17:45:35

From: Velvet Glam
circle mouse creates a circle around the midx & midy then clicks randomly within that circle

the summon circle is small, so u want your radius to reflect that

you probably want your radius to be 8-10

I've even tried a "circle" as small as a radius of 1 and it still doesn't click near the summoning symbol.

Velvet Glam

2012-03-17 17:54:53

From: RuneScapeJJ
I've even tried a "circle" as small as a radius of 1 and it still doesn't click near the summoning symbol.


It may be broken inside the SRL include, for now you can use:

Mouse(RandomRange(StartX, EndX), RandomRange(StartY, EndY), 0, 0, True);

or

Mouse(X, Y, 10, 10, True); <——X & Y will be the top of the summoning bounds

that will click randomly inside a square box inside the summoning symbol..

begginer

2012-03-17 18:00:26

You can use coordinates to click and use bitmap to click that too.

J J

2012-03-17 18:17:24

From: Velvet Glam
It may be broken inside the SRL include, for now you can use:

Mouse(RandomRange(StartX, EndX), RandomRange(StartY, EndY), 0, 0, True);

or

Mouse(X, Y, 10, 10, True); <——X & Y will be the top of the summoning bounds

that will click randomly inside a square box inside the summoning symbol..

There is a funtion for that already called MouseBox. I've implemented MouseBox already to click on some parts of the summoning icon but I want to cover everything of the summoning icon. So I need a circle(MouseCircle) and a rectangle(MouseBox) to cover the whole summoning icon. It should be possible but I just don't know how MouseCircle works yet - or it's broken.

From: begginer
You can use coordinates to click and use bitmap to click that too.

Yeah I can click on the symbol already by using MouseBox I can cover 90% of the summoning icon range where you can click. But I want to cover the other 10% aswell for increased random clicking.

Nebula

2012-03-17 18:49:39

I can't tell if you've fixed your issue so sorry if this is worthless.

I tried using MouseCircle a while ago, it doesn't work. Just use something like Mouse(x, y, 7, 7, true) and it will work the same way as long as x and y are the coorinates of the center of the circle. I think I'll submit a fix to mouse circle.

Edit: I just realized that wouldn't work lol. That would make a box instead of a circle. Hang on I'll come up with something.

J J

2012-03-18 07:13:11

From: Nebula
I can't tell if you've fixed your issue so sorry if this is worthless.

I tried using MouseCircle a while ago, it doesn't work. Just use something like Mouse(x, y, 7, 7, true) and it will work the same way as long as x and y are the coorinates of the center of the circle. I think I'll submit a fix to mouse circle.

Edit: I just realized that wouldn't work lol. That would make a box instead of a circle. Hang on I'll come up with something.

Yeah I've already made a MouseBox that covers around 80-90% of the Clickable part of the summoning icon. However, there is still a small part left out which is the top and bottom part of the circle. The only way to add this is by a MouseCircle I think. Would be great if you could submit a fix. Good to know it's not my fault :P

Gu3st...

2012-03-18 07:41:38

Was an easy fix.
Use this:
(*
MouseCircle
~~~~~~~~~~~

.. code-block:: pascal

procedure MouseCircle(MidX, MidY, Radius, clickType: Integer);

Same as MouseOval, but clicks within a circle instead.

.. note::

by mixster

Example:

.. code-block:: pascal

*)
procedure MouseCircle(MidX, MidY, Radius, clickType: Integer);
begin
MouseOval(MidX - Radius, MidY - Radius, Radius, Radius, clickType);
end;

J J

2012-03-18 07:57:48

Thanks Zyt3x, it does nearly work now.

Simple test.
program Test;
{$i srl/srl.simba}

procedure Test;
begin
MouseCircle(706, 143, 8, 1);
end;


begin
SetUpSRL;
ActivateClient;
Test;
end.
It does click within the circle, but it will always click on the left side of the MidX & MidY coords.