Log in

View Full Version : [Bug] I am using FindNormalRandoms correctly?



Nemesis3X
03-15-2012, 12:41 AM
Hello everyone, Today, I got a random with my script and it never got detected and I thought it was simba, but someone just posted on my thread saying the it got the beekeeper and it didn't detect the random Also. So, I am wondering if I am using this procedure correctly. That's strange because My script has always detected the randoms until today.

Here is my code and I hope someone can help me out with my problem.

Thanks you!


procedure EnterTrapDoor; //Procedure pour ouvrir la Trap
var EnterTraps : integer;

begin
Repeat
inc(EnterTraps);
Wait(100 + random(50));
until (FindDTMRotated(OpenTrap, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound) or (EnterTraps > 3));
MMouse(x, y, 3, 3);
wait(500 + random(100));
if IsUpText('own')then
begin
ClickMouse2(True);
sleep(1000+random(1000));
repeat
wait(50 + random(25));
until (IsMoving = false);
wait(500 + random (500));
FindNormalRandoms;
Makecompass('s');
end else
begin
Stuck := 1;
end;
end;

Sin
03-15-2012, 12:43 AM
if FindNormalRandoms then
if Not LoggedIn then
TerminateScript;

PatDuffy
03-15-2012, 12:43 AM
If the random occurs in any of those repeats you have, then it will not be detected.

You are using potentially infinite loops, create a time-check to break out of the repeats once a set time has passed.

Sin
03-15-2012, 12:46 AM
As Pat said, once Tries = 3, it'll just continue, it wont matter if it finds the TrapDoor or not.

Nemesis3X
03-15-2012, 12:52 AM
NVm, I found it :-)