This part of my script is driving me crazy.
Although it clearly doesn't find the sailor, it prints out "Found.". The uptexts are, of course wrong but it still emits a positive result..
Anyone know why ?

This part of my script is driving me crazy.
Although it clearly doesn't find the sailor, it prints out "Found.". The uptexts are, of course wrong but it still emits a positive result..
Anyone know why ?
I've realised as well there's been a problem (very) recently with uptexts...
I use WaitOption() but it just never seems to select the option...
Simply a GOD beast...
My Tutorials

Happening to me atm.. I just tried running my nature bot.. my god the uptext recognition is totally screwed in castlewars.
Not sure what's causing it but the font is either broken or all the colours changed :S
I use the uptext from my waterfiends script now:
Simba Code:{$I SRL/SRL.Simba}
const
UptextFS = true; //UptextFailSafe
Function FindTextCustom(TextToSearchFor: TStringArray; Box: TBox; Colour, Tolerance: Integer; PrintResult: Boolean; Font: String): boolean;
var
Data: string;
ListOfFonts, AllFonts: TStringArray;
I, J: Integer;
begin
Result:= False;
AllFonts:= ['BigChars', 'CharsNPC', 'CharsTrade', 'FriendChars', 'LoginChars', 'SmallChars', 'SmallCharsNS', 'StatChars', 'UPChars', 'UpCharsEx', 'XPChars'];
if (LowerCase(Font) = 'all') then
ListOfFonts:= AllFonts
else
begin
if (Not InStrArr(Font, AllFonts, false)) then
begin
SRL_WARN('FindTextCustom', 'Invalid Font!', 0);
exit;
end;
ListOfFonts:= [Font];
end;
For J:= 0 To High(ListOfFonts) do
begin
Data:= GetTextAtExWrap(Box.X1, Box.Y1, Box.X2, Box.Y2, 0, 5, 2, Colour, Tolerance, ListOfFonts[J]);
For I:= 0 To High(TextToSearchFor) do
begin
if (TextToSearchFor[I] <> '') then
begin
TextToSearchFor[I] := Replace(TextToSearchFor[I], '?', '.');
Result:= ExecRegExpr('.*'+TextToSearchFor[I]+'.*', Data);
end;
if Result then
begin
If PrintResult then
writeln(Data);
exit;
end;
end;
end;
end;
Function FindAllText(Uptexts: TStringArray; Box: TBox; Colours: TIntegerArray; Tolerance: Integer; PrintResults: Boolean; Font: String): Boolean;
var
I: Integer;
begin
For I:= 0 To High(Colours) do
begin
Result:= FindTextCustom(UpTexts, Box, Colours[I], Tolerance, PrintResults, Font);
If Result then
exit;
end;
end;
Function UptextsBroken(Uptexts: TStringArray): Boolean;
var
ListOfColours: TIntegerArray;
begin
If UptextFS then
begin
try
ListOfColours := [14211799, 6667731, 14672351, 1169359, 2721999, 14212565,
13751822, 14474972, 13816530, 1803484, 2656464, 3249636,
3380704, 2461153, 14803936, 15067364, 13684943, 15198949,
15396073, 15593452, 15659246, 14474460, 6338516, 6207445,
3552820, 8641269, 8181491, 16645627, 183554, 5941953, 184322,
185813];
Result:= FindAllText(Uptexts, IntToBox(5, 9, 338, 23), ListOfColours, 60, True, 'UpChars');
except
Result:= true;
end;
end;
end;
begin
SetupSRL;
If UptextsBroken(['Ring', 'ing']) then
if UptextsBroken(['ele', 'eleport', 'port']) then
begin
//Run some func.
end;
end.
I am Ggzz..
Hackintosher
Simply a GOD beast...
My Tutorials

Simply a GOD beast...
My Tutorials
He's thinking of WaitUpText();
Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
{ MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }
When posting a bug, please post debug! Help us, help you!
I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.
SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.
Simply a GOD beast...
My Tutorials

So all text recognition would be broken..? Quite a grave issue, anything I can do ?
Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
{ MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }
When posting a bug, please post debug! Help us, help you!
I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.
SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.
Simply a GOD beast...
My Tutorials

Found a temporary solution for my problem : a DTM of the uptext, simple but it works.
I'm not a good enough scripter to work with text recognition algorithms abu_jwka.
Simply a GOD beast...
My Tutorials
I had a similar problem with finding UpText of items in the bank when I was writing my stringer script, may look into just using DTMs of the UpText if this is happening for alot of people.
There are currently 1 users browsing this thread. (0 members and 1 guests)