SRL Archive - SRL Archives

RWait(ms:Integer,rms:Integer);


XabdullahX

2009-06-17 04:11:45

I think the Wait Function should be like in title,
RWait(ms:Integer,rms:Integer);

Ms = As we know it, how long to wait
rms = Random ms

—————–

You ask why ?

Well, it saves us typing '+Random()' everytime doing a wait!

—————–

Procedure RWait(MS:Integer;RMS:Integer);
Begin
Wait(MS+Random(RMS));
End;

osmm

2009-06-17 04:17:08

but…it could be like random 100,000,000,000,000,000 ms…then what?

XabdullahX

2009-06-17 04:20:54

huh?

Naike

2009-06-17 04:24:13

Don't be lazy…

XabdullahX

2009-06-17 04:33:38

From: N1ke!
Don't be lazy…


:(

Cmon, its usefull (h)

ian.

2009-06-17 04:52:53

^^ I'm super glad that you are trying to help, but things like these that are so simple are usually kept up the the user. This would break every script and so, it won't be added.

But you can put it in your scripts :] A lot of people do, it makes things a little easier, but for us old school scripters, we've been doing it as Wait(500 + RandomRange(150, 250)); for 2 years, and we don't need to change our ways. :]

Claymore

2009-06-17 04:53:10

no, wait(x: integer); is good enough +random(x: integer) makes it look so sexy rather than rwait(gayness);.

ian.

2009-06-17 05:08:38

You guys don't have to be so rude about it, I mean come on. He's just trying to help. :/

Tniffoc

2009-06-17 09:59:26

I like.. I remember writing functions like that.. heres an example.

function PA: Boolean; // Player Active
begin
Result := Players[CurrentPlayer].Active;
end;

Da 0wner

2009-06-17 11:59:30

From: 99_
^^ I'm super glad that you are trying to help, but things like these that are so simple are usually kept up the the user. This would break every script and so, it won't be added.

But you can put it in your scripts :] A lot of people do, it makes things a little easier, but for us old school scripters, we've been doing it as Wait(500 + RandomRange(150, 250)); for 2 years, and we don't need to change our ways. :]


Yea you've been here for two years…….you have only been here for like half a year.

XabdullahX

2009-06-17 14:40:17

From: 99_
^^ I'm super glad that you are trying to help, but things like these that are so simple are usually kept up the the user. This would break every script and so, it won't be added.

But you can put it in your scripts :] A lot of people do, it makes things a little easier, but for us old school scripters, we've been doing it as Wait(500 + RandomRange(150, 250)); for 2 years, and we don't need to change our ways. :]


I cant see why it should break anything :/

Its not a replacement for Wait; Since afaik Wait is built in scar (Not srl)

So, if we add RWait, it would just be.. like an extra function, optional to use.

Sir R. M8gic1an

2009-06-17 15:21:57

From: 99_
^^ I'm super glad that you are trying to help, but things like these that are so simple are usually kept up the the user. This would break every script and so, it won't be added.

But you can put it in your scripts :] A lot of people do, it makes things a little easier, but for us old school scripters, we've been doing it as Wait(500 + RandomRange(150, 250)); for 2 years, and we don't need to change our ways. :]


I beg to differ.


{************************************************* ******************************
procedure WWait(ttime: Integer);
By:
Description: Waits Time+10%. Once every ten times performs IdleTime aot Wait
************************************************** *****************************}
procedure WWait(ttime: Integer);
begin
if Random(10) = 1 then
IdleTime(ttime,(ttime/10),1.0)
else
Wait(ttime + Random(ttime / 10));
end;

that is oldschool. That is previous to SRL 4

~RM

Buckleyindahouse

2009-06-17 16:33:42

From: 99_
^^ I'm super glad that you are trying to help, but things like these that are so simple are usually kept up the the user. This would break every script and so, it won't be added.

But you can put it in your scripts :] A lot of people do, it makes things a little easier, but for us old school scripters, we've been doing it as Wait(500 + RandomRange(150, 250)); for 2 years, and we don't need to change our ways. :]


Been here almost 3 years and I never done it that way.


He tried to help, and this can help those who are lazy.

Good job.

Frt

2009-06-17 17:17:33

I made this once:
{function Randomize(x, P: Integer): Integer;
By: Frt
Description: Randomizes x by a percentage (P)
*******************************************************************************}
function Randomize(x, P: Integer): Integer;
var
T: Integer;
begin
T := Round(x / 100 * P);
Result := RandomRange(x - T, x + T);
end;

{*******************************************************************************
procedure W(a, b: Integer);
By: Frt
Description: Waits an amount of time specified by a. Also randomizes the number
*******************************************************************************}
procedure W(a: Integer);
begin
Wait(Randomize(a, 15));
end;

For those that are even more lazy ;)

Da 0wner

2009-06-18 00:31:11

Crap, I am sorry 99_. I forgot you had that one old account.

Camaro'

2009-06-18 06:09:50

From: Da 0wner
Crap, I am sorry 99_. I forgot you had that one old account.


Pwnt by pwnt is ftw :P..


Me n 99 / pwnt by pwnt are like

Peanut butter and jelly
Tooth paste and tooth brush
Creamchease and bread
Gatorade and powerade
Scar and srl
Smart and reflection
Whip cream and cool whip
Cake and ice cream
fork and knife

:P
oh and btw, i love these functions / procedures make life alot easier

examples


function LI:boolean;
begin
result := loggedin;
end;
or

procedure tell(s:string);
begin
writeln(s);
status(s);
disguise(s);
end;

XabdullahX

2009-06-20 04:23:14


function LI:boolean;
begin
result := loggedin;
end;

Oh.. Well, now you are getting a bit toooooo lazy :p ?

noidea

2009-06-20 08:47:26

From: Rasta Magician
I beg to differ.


{************************************************* ******************************
procedure WWait(ttime: Integer);
By:
Description: Waits Time+10%. Once every ten times performs IdleTime aot Wait
************************************************** *****************************}
procedure WWait(ttime: Integer);
begin
if Random(10) = 1 then
IdleTime(ttime,(ttime/10),1.0)
else
Wait(ttime + Random(ttime / 10));
end;

that is oldschool. That is previous to SRL 4

~RM


By the Fawk!