PDA

View Full Version : If something then ->



DaWu
12-09-2006, 12:28 PM
How could I add something like
if 10000+random(3000) passed then begin Gametabs; etc.

I'd definedly need to learn this to make my scripts antiban effective.

So please, if someone could bother to help me up ?

krunkjuice
12-09-2006, 02:47 PM
Well, I assume this is to easy to be what you ned but, couldn;t you just use


wait(10000+random(3000));
gametabs;

IronTeapot
12-09-2006, 04:51 PM
I think he means more about the count times, where its 10000+random 3000, from the time a function started? where other things are happening in the time that the 13000 time happened. i dont know how to use that systemcount/start/marktime features, so you will have to wait for some1 else to post about it or maybe there is a tutorial on it.

tarajunky
12-09-2006, 05:42 PM
To set up a timer you need 3 things. An integer to use as the counter and two functions.

Program new;
{.include SRL/SRL.scar}
var TabTimer:integer;
begin
SetupSRL;
MarkTime(TabTimer);
repeat
if TimeFromMark(TabTimer) > 10000 then
begin
GameTab(2);
Wait(500);
GameTab(3);
MarkTime(TabTimer);
end else Wait(500);
until false;
end.

MarkTime resets the timer. TimeFromMark checks the time without resetting it. And you need a unique integer variable to use for each timer you want to set up.

DaWu
12-09-2006, 07:23 PM
To set up a timer you need 3 things. An integer to use as the counter and two functions.

Program new;
{.include SRL/SRL.scar}
var TabTimer:integer;
begin
SetupSRL;
MarkTime(TabTimer);
repeat
if TimeFromMark(TabTimer) > 10000 then
begin
GameTab(2);
Wait(500);
GameTab(3);
MarkTime(TabTimer);
end else Wait(500);
until false;
end.

MarkTime resets the timer. TimeFromMark checks the time without resetting it. And you need a unique integer variable to use for each timer you want to set up.

Thats the thing I needed, thanks alot.