How do I make a wait procedure
wait(until(isblacktest 'blah'))); ?
How do I make a wait procedure
wait(until(isblacktest 'blah'))); ?
"SRL is the best SCAR community in the World, with the most talented programmers: adjust your volume."
-Wizzup?
Explain it better. For rs? (if so, when is text even black)?
If its not for rs, then your going to have to create bitmap masks for every letter :/
for rs(you have mined rock)
"SRL is the best SCAR community in the World, with the most talented programmers: adjust your volume."
-Wizzup?
Ohh ok.
// * function GetChatBoxText(Line, TextCol: Integer): string;
// * function FindChatBoxText(Line: Integer; Text: string; TextCol: Integer): Boolean;
// * Function FindBlackChatMessage(ChatMsg: String): Boolean;
// * function LastChatter(var name: String): Boolean;
// * function GetLastChatText(var chat: String): Boolean; // * by masquerader
// * function InChat(Text: String): Boolean;
All from Chat.scar would be useful.

from my AirCrafter.SCAR Code:function FindBlackChatMessageArr(Text: TStringArray) : Boolean;
var
i, o: Integer;
begin
o := High(Text);
for i := 0 to o do
if FindBlackChatMessage(Text[i]) then
begin
Result := True;
Exit;
end;
end;
function WaitBlackText(Text: TStringArray; MaxTime: Integer) : Boolean;
var
fs: Integer;
begin
MarkTime(fs);
repeat
Result := FindBlackChatMessageArr(Text);
Wait(RandomRange(50, 100));
until Result or (TimeFromMark(fs) >= MaxTime);
end;
Usage: if WaitBlackText(['mined the rock', 'we have mined the rock', 'whatever string here'], 3000) then we-can-go-on
MaxTime in ms.
EDIT: Oh, and please credit if you decide to use this.![]()
This could also be done with a while..do loop
SCAR Code:var
T : Integer;
begin
T := GetSystemTime + 2000
while Condition or (GetSystemTime > T) do
Wait(100);
end.
There are currently 1 users browsing this thread. (0 members and 1 guests)