drizzt
2008-03-17 19:27:44
i was thinking about using idletime in my antiban procedure, and the gravity requires an extended variable, so does anyone know how i could find a random extended number?
2008-03-17 19:27:44
2008-03-17 19:34:26
2008-03-17 19:35:29
From: Mylesmadness
function Rand: Extended;
Returns a random extended value between 0 and 1.
2008-03-17 20:50:23
2008-03-21 11:21:54
//Returns a random extended number between High and Low with Digits amount of digits
function RandomExtended(Low, High, Digits: integer): Extended;
var
Number: string;
i: integer;
begin
Number:= '0.' + FloatToStr(RandomRange(Low, High));
for i:= 1 to (Digits - 1) do
Number:= Number + IntToStr(Random(10));
Result:= StrToFloat(Number);
end;
2008-03-21 11:29:25
From: almost
I created this for my MoveMouseCircle procedure.
Just adds a little more customization.//Returns a random extended number between High and Low with Digits amount of digits
function RandomExtended(Low, High, Digits: integer): Extended;
var
Number: string;
i: integer;
begin
Number:= '0.' + FloatToStr(RandomRange(Low, High));
for i:= 1 to (Digits - 1) do
Number:= Number + IntToStr(Random(10));
Result:= StrToFloat(Number);
end;
2008-03-22 16:40:14
RandomIn := Random(60000);
RandomSt := IntToStr(RandomInt);
RandomSt2:= Insert('.', RandomSt, 1); //6.0000
//Insert(..., ..., 2) -> 60.000
RandomEx := StrToFloat(RandomSt2);
2008-03-22 16:43:24
2008-03-25 00:10:47
2008-03-25 03:13:02
2008-03-25 19:46:27
2008-03-25 23:28:17
2008-03-26 03:25:21
program New;
var
a: array[0..5] of Integer;
High: Integer;
begin
High := 1;
Writeln(IntToStr(High(a)));
end.
High is a Scar function, not a SRL one - uncomment the High := 1 and var declaration for it and you'll see it work :)
2008-03-26 10:54:42
program New;
procedure HelloThere(High, Low: Integer);
begin
WriteLn('High = '+IntToStr(High)+', Low = '+IntToStr(Low));
end;
var
a: TIntegerArray;
begin
SetLength(a, 2);
WriteLn('High a: '+IntToStr(High(a)));
HelloThere(High(a), Low(a));
end.
program New;
function High(a: variant): Integer;
begin
Result := 100;
end;
procedure HelloThere(High, Low: Integer);
begin
WriteLn('High = '+IntToStr(High)+', Low = '+IntToStr(Low));
end;
var
a: TIntegerArray;
begin
SetLength(a, 2);
WriteLn('High a: '+IntToStr(High(a)));
HelloThere(High(a), Low(a));
end.
2008-03-26 12:47:49
From: drizzt
i was thinking about using idletime in my antiban procedure, and the gravity requires an extended variable, so does anyone know how i could find a random extended number?
function RandomExtended(Range: Extended): Extended;
begin
Result := Range*Rand;
end;