Log in

View Full Version : Randoms question



Dangerous Garden Tools
08-27-2007, 11:28 AM
In a script, how would i get it to call on randoms? i know how to put them in but not have the script call on them when the player gets a random.

TravisV10
08-27-2007, 11:30 AM
function FindFastRandoms: Boolean; //By WT-Fakawi.
var
i: Integer;
begin
for i := 1 to 8 do
begin
case I of
1: if FindDead then
begin
playsound('');//RIGHT HERE!
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
7: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
8: RC;
end;
wait(1);
end;
end;

solemn wishes
08-27-2007, 11:32 AM
function FindFastRandoms: Boolean; //By WT-Fakawi.
var
i: Integer;
begin
for i := 1 to 8 do
begin
case I of
1: if FindDead then
begin
playsound('');//RIGHT HERE!
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
7: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
8: RC;
end;
wait(1);
end;
end;


achurly findfastrandoms; is now FindNormalRandoms; so simply call upon your random checks by using -

FindNormalRandoms;

Dangerous Garden Tools
08-27-2007, 11:34 AM
wow thanks alot guys, b2c ill post a proggy of your new script in a bit

The Claw
08-27-2007, 11:59 AM
That's what you use for the finding of the randoms, but you want to be calling them at the right points in time. In my scripts I generally try to call the FindNormalRandoms at least once every 250ms, or 4 times a second, constantly throughout the script.

Dangerous Garden Tools
08-27-2007, 12:17 PM
@ theclaw
how can i make it call on them i just started making my power miner xD

edit: also with the find fast randoms function i get this error

Line 37: [Error] (12268:1): Identifier expected in script