SRL Archive - SRL Archives

New wait procedure.


Krazy_Meerkat

2006-03-13 15:28:45

I thought this sounded like a pretty good idea.
It would be the basic wait command, bundled with anti-random checking and anti-idle. I've already made an anti-idle include but it wouldn't run anything other than the include because of the waiting! I thought, if we based it from how long the script actually waits, then the user wouldn't need to worry about auto-logouts.
The script would also check for randoms at regular intervals (keeping lag in mind) during the waiting, I also happen to think my anti-idle has more potential than benlands just because benland has only used the mouse. My version will change the camera angle, wait a little, and change it back.

I will definately be putting this together for my next script but does anyone else like the idea? Maybe someone knows how to jockey the regular wait command?

To give you a sample of what I mean:

procedure wait2 (var timetowait : integer);

var
totalwaittime : Integer;
randcounter : Integer;
idlecounter : Integer;

begin
repeat
wait(1);
totalwaittime:= totalwaittime + 1;
randcounter:= randcounter + 1;
idlecounter:= idlecounter + 1;
if (randcounter = 100) then
begin
randcounter:= 0;
Antirandoms;
end;
if (idlecounter = 5000) then
begin
idlecounter:= 0;
RandomMovement;
end;
until (totalwaittime = timetowait)
end;
It would obviously be a lot more complex than that.

BenLand100

2006-03-13 23:08:57

Mine was made specificly to move the mouse around pointlessly while doing somthing else :).
(Hint, run it with the timeout so you can do other things while its idleing :p)

XxKanexX

2006-03-14 00:19:35

Why is the parameter, "timetowait", var?

Why do you need to save it into a variable? :p
And i think we have to many waits as such. It would only take a few seconds to write one.

But thanx for commiting.

Krazy_Meerkat

2006-03-14 01:48:55

Ok kane ;) I'm still going to use mine but I was just checking if it'd be useful. Btw, what do you mean too many waits? I was only aware of benlands :p
I like yours ben, mine just moves the cam too. Not really much for me to brag about lol.

XxKanexX

2006-03-14 05:39:04

People always make things like these, that's what i meant. :p

The Un-Named

2006-03-14 09:31:23

Here's a little one I made for my autofighter but it just stops the script, I don't know why. If you need it you can keep it.

var
Time : Integer;
begin
Time:=0
repeat
repeat
Wait(1)
Time:=Time+1
until(Time=Random(1)) // Time to wait before checking for npc's
FindRandoms;
until(Time=WaitTime)
end;

WT-Fakawi

2006-03-14 09:42:42

Random(1) will ONLY output 0 :)
Random(2) will output 0 and 1

The Un-Named

2006-03-14 12:34:04

Yeah, forgot the random was in there. Thanks anyway. :)

This should work:

var
Time : Integer;

begin
Time:=0
repeat
Wait(1)
Time:=Time+1
FindRandoms
until(Time=100)
end.

I've tested this:

var
Time : Integer;

begin
Time:=0
repeat
Wait(1)
Time:=Time+1
Writeln(InttoStr(Time))
until(Time=100)
end.

Just replace Writeln with FindRandoms, so it should check for randoms every 1 milisecond.

Wizzup?

2006-03-14 15:16:05

From: BenLand100
Mine was made specificly to move the mouse around pointlessly while doing somthing else :).


Yeah! I just love IdleTime! :D

moparisthebest

2006-03-14 15:18:14

From: The Un-Named
Just replace Writeln with FindRandoms, so it should check for randoms every 1 milisecond.


which is waaaaay to fast for about anyone's computer (besides a useless waste of resources) ;) :D

XxKanexX

2006-03-14 15:34:59

From: moparisthebest
From: The Un-Named
Just replace Writeln with FindRandoms, so it should check for randoms every 1 milisecond.

which is waaaaay to fast for about anyone's computer (besides a useless waste of resources) ;) :D

1 ms a second? -See's computer blow up-

Renax

2006-03-14 15:48:28

SetTimeOut('FindRandoms', 2000); :P

The Un-Named

2006-03-14 16:14:29

I haven't really tested it but it dose seem too fast, but I'm having fun with SendInterScarMessage through 1 scripts, 1 timing for an acurate progress report but it's alot of hassle. :P

Krazy_Meerkat

2006-03-14 18:46:46

Mine is finished. Thanks fawk, I thought random(1) was random between 0 and 1.. *fixes*
Yeah it all works fine for me, at first it would wait double the wait time but I fixed it. If you change your mind just say so. I'm going to make it more advanced.
I used ReadFile and WriteFile too keep the idle count cumulative ;)