SRL Archive - SRL Archives

procedure PickUpMouse;


Daniel

2008-07-06 05:10:12

Well, i noticed that the procedure PickUpMouse is not that realistic, so i decided to make my own and will be included in Cut Em2 It's and Mine's project. Just replace the original one with:

{*******************************************************************************
procedure PickUpMouse;
By: Dan's The Man
Description: Acts just like you picked your mouse off the pad then sets it back
down.
*******************************************************************************}
procedure PickUpMouse;
var
cx, cy, i: Integer;
begin
i:=MouseSpeed;
MouseSpeed:=25+Random(6);
GetMousePos(cx, cy);
MMouse(cx-10-Random(11)-Random(11), cy-35-Random(21)-Random(11), 8, 8);
Wait(1000+Random(1501));
MMouse(cx+50+Random(51)+Random(31), cy+39+Random(51)+Random(31), 11, 11);
MouseSpeed:=i;
end;

Enjoy!

EvilChicken!

2008-07-06 07:10:19

I would prefer to do the weird movement a random amount of times. Liek.

procedure PickUpMouse;
var
cx, cy, i, x: Integer;
begin
i:=MouseSpeed;
MouseSpeed:=25+Random(6);
for X := 0 to 2 + random(5) do
begin
GetMousePos(cx, cy);
MMouse(cx-10-Random(11)-Random(11), cy-35-Random(21)-Random(11), 8, 8);
Wait(1000+Random(1501));
MMouse(cx+50+Random(51)+Random(31), cy+39+Random(51)+Random(31), 11, 11);
end;
MouseSpeed:=i;
end;

Not tested, but should work. And, good job.

ZephyrsFury

2008-07-06 08:48:50

From: EvilChicken!
I would prefer to do the weird movement a random amount of times. Liek.

procedure PickUpMouse;
var
cx, cy, i, x: Integer;
begin
i:=MouseSpeed;
MouseSpeed:=25+Random(6);
for X := 0 to 2 + random(5) do
begin
GetMousePos(cx, cy);
MMouse(cx-10-Random(11)-Random(11), cy-35-Random(21)-Random(11), 8, 8);
Wait(1000+Random(1501));
MMouse(cx+50+Random(51)+Random(31), cy+39+Random(51)+Random(31), 11, 11);
end;
MouseSpeed:=i;
end;

Not tested, but should work. And, good job.


But thats like picking up your mouse 7 times in a row… :rolleyes:

Daniel

2008-07-06 19:23:53

From: EvilChicken!
I would prefer to do the weird movement a random amount of times. Liek.

procedure PickUpMouse;
var
cx, cy, i, x: Integer;
begin
i:=MouseSpeed;
MouseSpeed:=25+Random(6);
for X := 0 to 2 + random(5) do
begin
GetMousePos(cx, cy);
MMouse(cx-10-Random(11)-Random(11), cy-35-Random(21)-Random(11), 8, 8);
Wait(1000+Random(1501));
MMouse(cx+50+Random(51)+Random(31), cy+39+Random(51)+Random(31), 11, 11);
end;
MouseSpeed:=i;
end;

Not tested, but should work. And, good job.

Nah, it's too un-realistic since it'll move, stop, move, stop etc.