Lama
2014-10-13 17:06:58
I've been trying to figure out how to get a script to know when something has been said by an NPC that doesn't appear in the chatbox, and I stumbled upon the findText() function in the docs.
I also found this unresolved thread asking pretty much the same thing I am: https://villavu.com/forum/showthread.php?t=110143
So what I am trying to do is to let a script proceed when Pauline Polaris at Livid Farm says one of her phrases that resets the activity.
This is my function so far:
The docs say the usage of findText() is:
Which is what I am doing, and I have tried several difference font types. However, the function just doesn't seem to respond to those actions once they happen in game.
Ideas?
I also found this unresolved thread asking pretty much the same thing I am: https://villavu.com/forum/showthread.php?t=110143
So what I am trying to do is to let a script proceed when Pauline Polaris at Livid Farm says one of her phrases that resets the activity.
This is my function so far:
function proceed(): boolean;
var
p: TPoint;
i: integer;
begin
if g <= 0 then
writeLn('Waiting for advancement...');
if (findText(p, ['verything''s advance', 'elp, please!'], [UpChars], mainScreen.getBounds())) then
begin
writeLn('The cycle has begun ...');
result := true;
end;
if (findText(p, ['farm''s moved', 'next stage'], [UpChars], mainScreen.getBounds())) then
begin
writeLn('The cycle has begun ...');
result := true;
end;
if (findText(p, ['ore spellcasting', 'required'], [UpChars], mainScreen.getBounds())) then
begin
writeLn('The cycle has begun ...');
result := true;
end;
if (findText(p, ['ime for more work', 'Time for'], [UpChars], mainScreen.getBounds())) then
begin
writeLn('The cycle has begun ...');
result := true;
end;
g := 1;
end;The docs say the usage of findText() is:
findText(var p: TPoint; txt, fonts: TStringArray; searchBox: TBox)Which is what I am doing, and I have tried several difference font types. However, the function just doesn't seem to respond to those actions once they happen in game.
Ideas?

