Log in

View Full Version : Randomisation not working?



eska
03-13-2012, 07:24 PM
EDIT: Found the solution, it was a silly mistake on my part.

Aright so I'm making a blind check for a mahogany table maker.

I need to get this done before bxw, plus I need to get 99 thieving by then so I don't have time to make it bullet proof, so a blind check to find the table will be good enough for me.

Long story short, I'm trying to use the MMouse function, but it seems like it is only moving randomly on the X axis. It is ALWAYS on the same Y axis, which is very suspicious looking.
I tried the MouseBox function, and it does the exact same thing.

Heres the code if that can help:


begin
SetUpScript;

If IsXPBarOpen Then OldXP := GetXPBarTotal;
Wait(Random(5000));
//MouseBox(xxx1, yyy2, xxx2, yyy2, 2);
WriteLn('xxx1: '+ inttostr(xxx1) +
'xxx2: '+ inttostr(xxx2) +
'yyy1: '+ inttostr(yyy1) +
'yyy2: '+ inttostr(yyy2));

//MMouse(xxx1, yyy1, RandomRange(xxx2, xxx1), RandomRange(yyy2, xxx1));
MMouse(xxx1, yyy1, Random(50), Random(50));
Wait(100+Random(50));
if WaitUpTextMulti(['alk', 'here', 'ptions'], 200) then
begin
WriteLn('Found table hotspot using blind check.');
ClickMouse2(false);
WaitOptionEx('uild', 'action', ClickLeft, 200+Random(100));
end;
end

The stuff in comment are things are tried that dosen't work either.
Before you ask, xxx1, xxx2, yyy1 and yyy2 are all different. This is the value I get when I excute the script.

xxx1: 207
xxx2: 307
yyy1: 128
yyy2: 218

Yet it always move the mouse on the same line!

footballjds
03-13-2012, 07:26 PM
Would you mind posting the whole script?
I know for a fact Random(50) will give you a random number and it works.

thanks,

Kyle Undefined
03-13-2012, 07:31 PM
You're using huge random points, your mouse is going to go all over the place.

eska
03-13-2012, 07:32 PM
I know Random() is working, I'm using it for my antiban in another script.

I just have no idea why the y axis isn't working

eska
03-13-2012, 07:33 PM
I just found the problem myself.

It's funny how the smallest, most silly mistake are the hardest to find. Thanks for your time.