SRL Archive - SRL Archives

Text.Scar


Nose Smasher

2008-11-04 03:19:30

I figured since there's an "IsUpTextMultiCustom" why not an "IsBlackTextMulti" and "IsChatBlackTextAnylineMulti" so I made them :p

They're not as super 1337 as most SRL functions, but they work :)
The first one is the same as "IsBlackText" wit a TStringArray
and the second one is "IsChatBlackTextAnyline" wit a TStringArray… Lemme know what you guys think! :)


function BlackTextMultiSingle(Text: TstringArray; ChatLine: Integer): Boolean;
var
n, i: Integer;
begin
n := Length(Text) - 1;
for i := 0 to n do
if (Pos(Text[i], GetBlackText(ChatLine)) <> 0) then
begin
Result := True;
Exit;
end;
end;


function BlackTextMultiAnyLine(ChatTxt: TStringArray): Boolean;
var
I: Byte;
begin
for I := 1 downto 8 do
if (BlackTextMultiSingle(ChatTxt, I)) then
begin
Result := True;
Exit;
end;
end;

Naum

2008-11-04 12:04:09

From top down?

function BlackTextMultiAnyLine(ChatTxt: TStringArray): Boolean;
var
I: Byte;
begin
for I := 8 downto 1 do
if (BlackTextMultiSingle(ChatTxt, I)) then
begin
Result := True;
Exit;
end;
end;

Looks good, but the scripter should make these functions themselves :)

Nose Smasher

2008-11-04 12:13:42

From: NaumanAkhlaQ
From top down?

function BlackTextMultiAnyLine(ChatTxt: TStringArray): Boolean;
var
I: Byte;
begin
for I := 8 downto 1 do
if (BlackTextMultiSingle(ChatTxt, I)) then
begin
Result := True;
Exit;
end;
end;

Looks good, but the scripter should make these functions themselves :)


good call, forgot it looks at 8 first thanks! ;)

"but the scripter should make these functions themselves" I know, I jus figured since IsUpTextMultiCustom was in there I'd give it a shot ;)

Naum

2008-11-04 12:17:12

Meh much easier to use an or e.g

If FindBlackChatMessage('lol') Or FindBlackChatMessage('ha') Then

:)

Nava2

2008-11-04 17:09:49

Good ideas! :)

I like them. These are much like my multi chat line.

Nose Smasher

2008-11-04 19:46:51

From: NaumanAkhlaQ
Meh much easier to use an or e.g

If FindBlackChatMessage('lol') Or FindBlackChatMessage('ha') Then

:)

yea i guess… jus figured writing the function once was easier than 5 or 6 times ;)

From: Nava2
Good ideas! :)

I like them. These are much like my multi chat line.


thanks. :)

NiCbaZ

2008-11-06 01:49:46

Looks nice could be Heaps Shorter Tho :o

Nose Smasher

2008-11-06 10:20:33

From: NiCbaZ
Looks nice could be Heaps Shorter Tho :o


thanks - how so?

HarryJames

2008-11-10 19:10:43

Can you search for an array of preset words?