SRL Archive - OSR Help

How would I do something like this?


Chen Monopoly

2012-05-06 14:02:19

I'm rather new to this since I only really do Java/C++ stuff so I was wondering how to translate something like this.

int x = (int)(Math.random() * 5)
if(x == 3) {
//moves the mouse to (3, 5)
}

Harry

2012-05-06 14:06:18

var eee: integer;
eee := Random(3);
if (eee = 0) then
MMouse(3,5,0,0);

random(3) = 4 chances, 0..3. MMouse's 2nd parms are for randomness.

Chen Monopoly

2012-05-06 14:55:45

Thank you.

Abu

2012-05-06 15:05:44

Goodness Harry, at least promote decent standards…

var 
eee: integer;
begin
eee := Random(3);
if (eee = 0) then
MMouse(3,5,0,0);
end;