SRL Archive - SRL Archives

Function RedMouse;


Pancakes

2007-07-17 21:53:14

Hey all, how are you going?

I was in the shower just before, and I got thinking. When we use Mouse, there is no way to tell if we actually clicked on an object or not. Sometimes, for whatever reason, we can check for uptext and then click, but sometimes we will not click on the actual object that we want.

For every object in Runescape, on the mainscreen, if you click on it, it will have a little red 'click'. If we missed the object for whatever reason, we will have a little yellow 'click'. I have not built this function yet, but I might if anyone thinks it is worth it.

It would be great if we actually knew if we clicked on an object or not.

I'll write a little bit of Psuedo-code for anyone that wants to know how it will work.


function RedMouse (RandomPixels : Integer) : Boolean;
MainMark : Integer;
begin
Mouse(x, y, RandomPixels, RandomPixels, True);
MarkTime(MainMark); //Not sure if this is correct...?
repeat
result := Check For Red Color within a 50 x 50 box of the mouse position.
Wait(50);
until (TimeFromMark > 1000);
end;

Obviously that wont compile in SCAR, but its just showing you how it would work.

Anyone think that this would be valuable?

-Pancakes.

bullzeye95

2007-07-17 22:00:00

Yeah I think Fawki uses something like that in Ratz!

Dan Cardin

2007-07-17 22:00:24

yea its valuable(WT-Fakawi has this in Ratz)

Bobarkinator

2007-07-17 23:38:20

Someone suggested this for Tara's chicken killer but I don't think he implemented. I didn't know Fakawi had this. It would be useful.

Pancakes

2007-07-17 23:57:36

Especially for attacking moving objects, such as monsters.

-Pancakes

tarajunky

2007-07-18 00:24:01

Personally, I would only want to implement this if it worked pretty much 100% of the time.

I would also have it check for either red or yellow instead of just red.

The point of a function like this is to prevent your character from standing around doing nothing, but if you implement it wrong it will actually make you do more standing around waiting for this type of function to time out than the mis-click waiting you're trying to solve.

Ruroken

2007-07-18 00:34:12

huh…

never thought of that :p Good idea! You too Fakawi :p

rkroxpunk

2007-07-18 03:09:45

aww. I was about to make this rofl

Pancakes

2007-07-18 03:23:09

From: rkroxpunk
aww. I was about to make this rofl


Go ahead, I haven't made it yet :)

And, if the function didn't return true, then we can assume that it was a yellow click.

-Pancakes.

Pentti

2007-07-18 04:30:27

I first used this in my autofighter(=pretty old script), and now I use something like this in my Multi City Miner too.

n3ss3s

2007-07-18 06:28:05

Especially for attacking moving objects, such as monsters.

-Pancakes


MouseSpeed := 7 + Random(1);
if(Urmonsterfindingthingy)then
begin
Mouse(x, y, 1, 1, False);
if(ChooseOption(x, y, Name))then
begin
Result := True;
end;
end;

Thats another way to do it lol
but good idea.

Pancakes

2007-07-19 18:43:30

You always right click then - suspicious no?

grindisbest

2007-07-20 04:03:49

What happens if something under a yellow arrow happens to be the same red color as the arrow would have been if it hit the right place. It would then think it has clicked the right point and so you would have it do the wrong thing.
Pretty unlikely but still, maybe DTMs could help.

Pentti

2007-07-20 04:20:48

From: grindisbest
What happens if something under a yellow arrow happens to be the same red color as the arrow would have been if it hit the right place. It would then think it has clicked the right point and so you would have it do the wrong thing.
Pretty unlikely but still, maybe DTMs could help.

You can always have failsafes… :D I check first for click and then text in my MCMB.
In my autofighter, I checked first the click and then if it was in fight.
Like that.