SRL Archive - Test corner

MMouse algorhythms


WT-Fakawi

2006-03-12 04:39:19

Below a small script to witness the difference between the two MMouse algorhythms.

[FONT="Courier New"]//----------------------------------------------------------------------------//
// SRL Mouse Demo
//----------------------------------------------------------------------------//
// This script demonstrates SRL two main mousemodes:
// - BenLand100 mouse mode
// - Mutant Squirrle/RsN mouse mode
//
// The different mouse modes are toggled using the global var BenMouse: Boolean
// You can set BenMouse to True or False anywhere inside your script, but
// recommended @ startup.
//----------------------------------------------------------------------------//
program MouseToggle;
{.include SRL/SRL.scar}
var
w,h: Integer;
toggle: Boolean;

begin
SetupSRL;

GetClientDimensions(w,h);
writeln('Width = '+ IntToStr(w)+' Height = '+ IntToStr(h));

repeat
if Toggle then
begin
Toggle:=False
writeln('BenMouse = False')
end
else
begin
Toggle:=True;
writeln('BenMouse = True')
end;
BenMouse:=Toggle;

MMouse(0, 0, 0, 0);
MMouse(w, h, 0, 0);
until(false);
end.[/FONT]

Pwnd

2006-03-12 07:31:36

You don't see toooo much of a difference, but you can tell that Ben's does put a litle more curve at its points on the next movement.

cause

2006-03-12 10:14:56

Bens seems to work good, mutante and RSN's went to fast if u ask me. bens seemed to waver back and forth as it was goin across, i drew a line from top left corner to bottom right corner in paint to see how strait it was. bens could use a little more *randomness* all it seems to do is waver, should be more random.

thanks for listening,

Cause

Bebe

2006-03-12 13:04:03

I see little difference, but bens does seem to run a little smother and more humanlike, but it is by very little. If you really want to show it, change the script to use different colors for the 2 mouse algorhythms. :)

weaselforce

2006-03-12 13:51:46

well i think benmouse is less humanlike personally, some curved lines might be a better show? and yes i agree with cause, it just seemed to waiver back and forth on its current line. could you slow down the non benmouse one a little cause its too fast.

No Significant difference

masquerader

2006-03-13 00:21:45

i think the coordinates for ben's mouse should be:
  case random(4)+1 of
1 :
begin
ex := ex + Random(randX);
ey := ey + Random(randY);
end;
2 :
begin
ex := ex - Random(randX);
ey := ey + Random(randY);
end;
3 :
begin
ex := ex + Random(randX);
ey := ey - Random(randY);
end;
4 :
begin
ex := ex - Random(randX);
ey := ey - Random(randY);
end;
end;

instead of just adding the random value
like mutant/RSN's

i might edit it later

Flyboy

2006-03-13 00:55:23

From: masquerader
i think the coordinates for ben's mouse should be:
.
.
instead of just adding the random value
like mutant/RSN's

i might edit it later

is that different from saying:

ex := ex - randX + Random(randX * 2);
ey := ey - randY + Random(randY * 2);

for general stuff, it would be nicer to have the supplyed x, y as the center and the random amount be to ether side… The drawback of this method is when you try to click on a known location like a dtm in the minimap. Using Ben's way you only have to find the top left corner and set that as x, y then find the width and height and set that as randX and randY… *poof* your done! What u suggest requires finding the exact center by calculating which can be tough when doing percission work.

My sugestion is to leave it as it is in SRL and in your own script add a function that makes it act as you want it to. For example add this in your script:


procedure FlyboyMMouse(x, y, randX, randY: Integer);
begin
MMouse(x - randX, y - randY, randX * 2, randY *2)
end;

Lorax

2006-03-13 06:27:11

Ben mouse is indeed the most human like trust me, we have observed the human way of moving your mouse and the algorhytms of ben mouse is amazing.
I would allways go for BenMouse indeed.

WT-Fakawi

2006-03-13 07:05:08

Oly one small minor issue concerning BenMouse:

It doesnt always click on the exact pixel! You can check this yourself by adding a GetMousePos and a Writeln to the script.
Now, this is normally not a problem, but for pixel accurate movements, such as withdrawing amounts of stuff from the bank, I would always prefer RsN/Muut Mouse!

BTW, try IdleTime(1000,1000,1.0) as opposed to Wait((1000)+Random(1000)). It is effectively the same thing, only IdleTime moves the mouse in really peculiar ways :)

XxKanexX

2006-03-13 07:27:44

From: WT-Fakawi
Oly one small minor issue concerning BenMouse:

It doesnt always click on the exact pixel! You can check this yourself by adding a GetMousePos and a Writeln to the script.
Now, this is normally not a problem, but for pixel accurate movements, such as withdrawing amounts of stuff from the bank, I would always prefer RsN/Muut Mouse!

BTW, try IdleTime(1000,1000,1.0) as opposed to Wait((1000)+Random(1000)). It is effectively the same thing, only IdleTime moves the mouse in really peculiar ways :)

I was going to suggest if getmousepos wasn't the same as the specified x and y destination co-ordinates, move there when bens mouse has finished moving. But, this would probably be detectable as it would flicker a bit. -.-

BenLand100

2006-03-14 23:42:53

You guys arn't picking on me behind my back again eh? And i think there is somthing wrong with my mmouse… the way it is being described does not sound charastic of the way it should be. and you guys do know that mutants moves in a straight line right?

Issue 1: The reason the randomness is the way it is is because everyone told me to change it to that to make it easier to adjust.
Issue 2: For the movement on the end… I can fix that if you guys think its a big problem but it may take a few mroe ms :)
Issue 3: Fo those of you who are new to the scene. MY MMouse looks like this (note that the curvyness is not quite as intense in SRL):

EDIT: Fakawi… there is a problem and your name is all over the blame list :p
EDIT2: Fixed the problem. apparently scar wasen't made to do math…