SRL Archive - OSR Help

FindNormalRandoms


klamse

2012-07-27 03:30:22

How do I implement it into my script? Is there a thread on this?
I couldn't find one.

P1ng

2012-07-27 03:34:14

In a procedure where there is the possibility of randoms appearing you can place

FindNormalRandoms;

before it performs a task (that way it will not perform the task if it is stuck in a random).

or alternatively if you want it to completely get out of the procedure/function if it is in a random

if FindNormalRandoms then
Exit;{or TerminateScript;}

klamse

2012-07-27 03:50:44

Thanks!

litoris

2012-07-27 03:57:51

Just to be safe, make sure you add it to every single loop you have.

klamse

2012-07-27 09:58:29

From: litoris
Just to be safe, make sure you add it to every single loop you have.


I was thinking about doing this, but would that slow the script down at all?
May be a dumb question.

riwu

2012-07-27 10:14:49

From: klamse
I was thinking about doing this, but would that slow the script down at all?
May be a dumb question.

It takes <0.1 sec for it to check if u r in a random. But it will switch ur game tab to inventory if its not already.

klamse

2012-07-28 04:09:21

One last question. Here is a procedure:
{*
Author: Google

Deposits five pure essence from the inventory.
*}
Procedure DEssence;
Begin
Begin
If FindBitMapTolerancein(Ess, X, Y, 612, 223, 711, 344, 65) Then
Begin
HumanMMouse(X, Y, 5, 5);
ClickMouse2(False);
ChooseOption('Deposit-5');
End;
End;
End;

Where in the Procedure would I put FindNormalRandoms?
Thanks everyone for helping me learn! :)

P1ng

2012-07-28 04:19:59

Something like this should work -

procedure DEssence;
begin
if FindNormalRandoms then
Exit;
if FindBitMapTolerancein(Ess, X, Y, 612, 223, 711, 344, 65) Then
begin
HumanMMouse(X, Y, 5, 5);
ClickMouse2(False);
ChooseOption('Deposit-5');
end;
end;

klamse

2012-07-28 15:10:31

Thanks for you help