SRL Archive - SRL Bugs

FindNPCChatText


DeSnob

2011-12-21 19:29:33

I noticed LevelUp wasn't working at all. After some debugging I found out there's an issue with FindNPCChatText. I believe it was updated to the current NPC chat, but not for things like level up screens.
Debugged LevelUp:

{*******************************************************************************
function LevelUp : Boolean;
By: R1ch
Description: Checks if you've leveled up - click Continue and returns True.
*******************************************************************************}
function LevelUp : Boolean;
var
X, Y : Integer;
begin
if (not(FindColor(X, Y, 0, 7, 460, 69, 474))) then
//Result:= FindNPCChatText('gratu', Nothing);
Writeln(':P');
Writeln('.');
if (Result) then
Writeln(':)');
if Result then
begin
ClickContinue(True, True);
WriteLn(Players[CurrentPlayer].Name + ' leveled up');
end;
end;
:P
.
Successfully executed.
Wasn't capable of reading the text.

mormonman

2011-12-21 19:42:15

What was the old font used?

DeSnob

2011-12-21 19:47:15

From: mormonman
What was the old font used?


I really don't remember, I haven't touched the text.scar too much.

E: CharsNPC. I guess all that has to be done is change UpChars to that?

mormonman

2011-12-21 20:02:42

Yes, but only do it in the LevelUp function.

Narcle

2011-12-22 08:30:36

Simple fix. LevelUp will get its custom text finding for now.

E: Fixed.

DeSnob

2011-12-22 15:59:05

Guys, I think the actual function itself isn't working. I've been tweaking the Freaky Forester random to make the NPC finder work. After doing that, it wasn't able to read the NPC text. It's unable to read the task given by the guy!

Narcle

2011-12-22 17:39:31

From: DeSnob
Guys, I think the actual function itself isn't working. I've been tweaking the Freaky Forester random to make the NPC finder work. After doing that, it wasn't able to read the NPC text. It's unable to read the task given by the guy!


What text is it using? The large text or small text. Screenshot if possible plz.

I'll mention that they did change the text for majority of NPCs. Its the small text now, not the old NPC chat text it use to be.

DeSnob

2011-12-22 18:19:23

I'm rerunning it right now. Screeny in a sec.
E:

TRiLeZ

2011-12-22 20:37:43

From: DeSnob
I'm rerunning it right now. Screeny in a sec.
E:


Only used to search for the white select option text like so:


I've made the function search for both the black and white text now.

DeSnob

2011-12-23 08:19:23

Thanks TRi. :)

Wizzup?

2011-12-24 09:04:41

Nice work.

mormonman

2011-12-25 00:59:36

Doesn't read this right, and I couldn't get it to work.

SantWrong

2012-01-20 14:06:57

Post about FindNPCChatText

Well if finds but works strangely, everything is described there.

By the way is there function tu check upper text of NPC chat, in this case I mean "What ould ou liek to say", I tried FindTextTPA, - didn't work out

Coh3n

2012-01-20 14:44:59

From: SantWrong
Post about FindNPCChatText

Well if finds but works strangely, everything is described there.

By the way is there function tu check upper text of NPC chat, in this case I mean "What ould ou liek to say", I tried FindTextTPA, - didn't work out
I'm not sure if we have a font for that. That's one of the methods Demise used to check if the player was in a random event. Since there wasn't a font, GetText returned a unique string (that made no sense) that can be used. But a font should be made, I'm just not sure how.

Can you please make a new thread for the bug you posted in that link?