Main
2009-09-03 09:28:36
This is something I'd like to see in the future. Ive never found anything like that in the previouse srl version (Except this one procedure, but it was for rev 34), I think this will be very useful.
2009-09-03 09:28:36
2009-09-03 09:56:10
2009-09-03 09:59:36
2009-09-03 10:54:50
function InRandom: Boolean;
begin
if(Rand_GetRandomType > 0)then
Result := True;
end;
2009-09-03 10:58:53
2009-09-03 11:00:50
2009-09-03 11:53:28
function m_FindRandoms: boolean;
var
TypeID, H, HH, I, J: integer;
B: TBox;
Rand_Music: string;
RandResult: boolean;
begin
TypeID := Rand_GetRandomType;
H := High(TeleRandoms);
for I := 0 to H do
begin
if (TypeID = TeleRandoms[I].TypeID) then
begin
if (TeleRandoms[I].IsInRandom <> nil) then
RandResult := TeleRandoms[I].IsInRandom();
if (TeleRandoms[I].IsInRandom = nil) or (RandResult) then
begin
Result := (Length(TeleRandoms[I].Texts) = 0) and (TeleRandoms[I].Music = '');
if (not(Result)) and (TeleRandoms[I].Music <> '') then
begin
if (Rand_Music = '') then Rand_Music := Lowercase(GetMusic);
Result := (Rand_Music = TeleRandoms[I].Music);
end;
if (not(Result)) and (Length(TeleRandoms[I].Texts) > 0) then
begin
HH := High(TeleRandoms[I].Texts)
for J := 0 to HH do
begin
B := TeleRandoms[I].TextBoxes[J];
Result := (FindTextTPA(TeleRandoms[I].TextColors[J], 0, B.X1, B.Y1, B.X2, B.Y2, TeleRandoms[I].Texts[J], TeleRandoms[I].TextFonts[J], Nothing));
if (Result) then
begin
players[currentplayer].Loc := TeleRandoms[I].Name; // <-- you can comment this out
Alert('Random detected!'); // <-- you can comment this out
Break;
end;
end;
end;
end;
end;
end;
FindNormalRandoms; // <-- you can comment this out
end;
2009-09-03 12:00:46
2009-09-03 14:27:09
From: ian.
Err.. Marpis, mine will work just the same, I think. :p
2009-09-03 22:09:41
2009-09-03 23:43:07
From: Main_Ftw
Which 1 or 2 declare that its in random? (Don't have srl atm)
2009-09-04 12:04:04
function InRandom: Boolean;
begin
Result := Rand_GetRandomType > 0;
end;