SRL Archive - Discussions and Debates

Fixing the Mouse Procedures


Nava2

2008-08-16 21:20:40

So, why is it such a big deal? To be honest, I thought that the Mouse function already did that.

Would changing it really make that much of a difference?

Here is what it is:
{*******************************************************************************
procedure MMouse(x, y, rx, ry: integer);
By: Benland100
Description: Moves the mouse.
*******************************************************************************}
//Randomness is just added to the x,y. Might want to change that.
procedure MMouse(x, y, rx, ry: integer);
var
cx, cy: integer;
randSpeed: extended;
begin
randSpeed:= (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
if randSpeed = 0.0 then
randSpeed := 0.1;
getMousePos(cx,cy);
x:= x + random(rx);
y:= y + random(ry);
WindMouse(cx,cy,x,y,9.0,3.0,10.0/randSpeed,15.0/randSpeed,10.0*randSpeed,10.0*randSpeed);
end;

Here is what it should be:
{*******************************************************************************
procedure MMouse(x, y, rx, ry: integer);
By: Benland100
Description: Moves the mouse.
*******************************************************************************}

procedure MMouse(x, y, rx, ry: integer);
var
cx, cy: integer;
randSpeed: extended;
begin
randSpeed:= (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
if randSpeed = 0.0 then
randSpeed := 0.1;
getMousePos(cx,cy);
x:= RandomRange(x - Random(rx), x + Random(rx)); // < - CHANGES
y:= RandomRange(y - Random(ry), y + Random(ry)); // < -
WindMouse(cx,cy,x,y,9.0,3.0,10.0/randSpeed,15.0/randSpeed,10.0*randSpeed,10.0*randSpeed);
end;

It has been said that it will cause scripts to malfunction, and kill some SRL Procedures, I don't see how a few pixel difference to one side or the other will make a difference.

Discuss.

JuKKa

2008-08-16 21:58:29

noooop not this again….

n3ss3s

2008-08-17 04:47:09

Jesus christ can't you just move on to the 21th century and start using telepathy?

Everyone is suggesting it, and it was discussed through in the SRL Development's instance of this kind of a thread.

n3ss3s

2008-08-17 08:27:45

No need to delete it, and you shouldn't be embarrassed or anything about it :)

Markus

2008-08-17 08:50:30

Next one to suggest this gets a free ban. Sorry.

Wizzup?

2008-08-17 08:57:02

Ah, there has been discussion about this before.
The reasons are very simple.
Let's say you look for a bitmap. SCAR returns the top left coordinates. Randomness moves your move to -x and -y, you misclick.
The entire SRL was made for the Randomness is currently has, and changing it would result in a disaster, plus it is simply not logical. :)

GoF

2008-08-17 09:05:52

Why this is just silly.

n3ss3s

2008-08-17 09:06:30

http://www.youtube.com/watch?v=gUP5GzHIojU

GoF

2008-08-17 09:12:57

From: n3ss3s
http://www.youtube.com/watch?v=gUP5GzHIojU


o.O

…

This video represents my view of this case: http://www.youtube.com/watch?v=Seh9_sFv1Z4

Wizzup?

2008-08-17 09:19:40

SRL started mis clicking the box too. ;)

Nava2

2008-08-17 11:19:37

Why does everyone jump down my throat, I didn't understand why it always happens. The bitmap, I can see making sense. But, why does scar pick that point. Should it not return the center?

From: markus
Next one to suggest this gets a free ban. Sorry.

Power abuse much?

Wizzup?

2008-08-17 16:23:34

From: Nava2
Power abuse much?


He can't even ban you.
I agree though. Guys, you misbehaved. Don't do this again. You should be happy you are not infracted for spam.