SRL Archive - SRL Archives

procedure HitOrMiss(x, y, rx, ry: integer);


ollie

2006-05-28 13:12:58

i Thought, Like a Real Human, You Sometimes Miss The Target you want.
i made it have more chance of getting the Right Target..
i havent Tested it so tell me if its complete bollocks or if its ok :P


procedure HitOrMiss(x, y, rx, ry: integer);
var
HitnMiss : Integer;
begin
repeat
MouseSpeed:= 10 + Random(6);
HitnMiss:= random(7);
case HitnMiss of
0: MMouse(x - 2 + random(164), y - 5 + random(23), rx - 3 + random(56), ry + random(5));
1: MMouse(x - 2 + random(73), y - 5 + random(97), rx - 3 + random(62), ry + random(105));
2: MMouse(x - 2 + random(30), y - 5 + random(27), rx - 3 + random(12), ry + random(45));
3: MMouse(x, y, rx, ry);
4: MMouse(x, y, rx, ry);
5: MMouse(x, y, rx, ry);
6: MMouse(x, y, rx, ry);
end;
until(HitnMiss > 2)
end;

The Un-Named

2006-05-28 19:26:33

From: ollie
MMouse(x - 2 + random(164), y - 5 + random(23), rx - 3 + random(56), ry + random(5));


That seems a little too high for a random miss.

ollie

2006-05-29 05:18:01

its meant to be for when a human isnt concentrating fully, but after that it will correct itself

Rictoo

2006-05-30 15:11:24

That's actually a great idea :P

-chaos-

2006-05-31 22:36:07

that is a very good function very nice soon SRL will be completely human like :D

ollie

2006-06-01 05:26:32

Thats The Idea Chaos :)
too bad no SRL Devs like it :(

The Prince of Randomness?

2006-06-01 15:58:00

Yeah but i wouldnt miss at a Randomness of 52, well probably id be more random ;)

z92

2006-06-01 16:05:35

Nice, this was what i suggested too, but noone really liked it! Cool that you made it, i hope people will begun using it in their scripts as it would work out very fine! :)