SRL Archive - General

Waiting?


Crazy Cat

2007-08-20 22:38:07

I am trying to make my script say stuff and I want it to wait in between saying stuff. this is the code I came up with but it doesnt work. does anyone know why?

Procedure WaitForStuff;
begin
marktime(time);
if timefrommark(time)=3000then
begin
RandomTalk;
marktime(time);
end;
end;

~alex~

2007-08-21 07:13:34

wait(amountInMilliseconds)

Example wait(1000) is wait one second.

Janilabo

2007-08-21 11:53:12

Here is a very BASIC example, so do NOT use it for RuneScape (very, VERY detectable). If you need it for RuneScape, you can improve it by using SRL. I just made it quickly…

procedure WaitPlusSayEvery(WaitTime: Integer; SayThis: string; SayEvery: Integer);
var
tempTime, tempSayMark: Integer;
begin
tempTime:= GetSystemTime;
tempSayMark:= tempTime;
repeat
Wait(1);
if(GetSystemTime - tempSayMark >= SayEvery)then
begin
SendKeys(SayThis + Chr(13));
tempSayMark:= GetSystemTime;
end
until(GetSystemTime - tempTime >= WaitTime);
end;

begin
WaitPlusSayEvery(5000, 'This is a test', 1000);
end.

But but, hopefully it's something you are looking for..

I don't use SRL, mostly because I don't script for RuneScape, just because I have quitted playing it already long time ago and I also enjoy doing things myself.