Results 1 to 14 of 14

Thread: FindNPCChatText

  1. #1
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default FindNPCChatText

    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:
    Simba Code:
    {*******************************************************************************
    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;
    Progress Report:
    :P
    .
    Successfully executed.

    Wasn't capable of reading the text.

  2. #2
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    What was the old font used?

  3. #3
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by mormonman View Post
    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?

  4. #4
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default

    Yes, but only do it in the LevelUp function.

  5. #5
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

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

    E: Fixed.
    Last edited by Narcle; 12-22-2011 at 02:35 PM.
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

  6. #6
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    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!

  7. #7
    Join Date
    Sep 2007
    Location
    Michigan
    Posts
    3,862
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by DeSnob View Post
    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.
    Last edited by Narcle; 12-22-2011 at 10:44 PM.
    (Scripts outdated until I update for new SRL changes)
    AK Smelter & Crafter [SRL-Stats] - Fast Fighter [TUT] [SRL-Stats]
    If you PM me with a stupid question or one listed in FAQ I will NOT respond. -Narcle
    Summer = me busy, won't be around much.

  8. #8
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I'm rerunning it right now. Screeny in a sec.
    E:
    Last edited by DeSnob; 12-22-2011 at 11:25 PM.

  9. #9
    Join Date
    Feb 2009
    Posts
    1,447
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by DeSnob View Post
    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.

  10. #10
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Thanks TRi.

  11. #11
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Nice work.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  12. #12
    Join Date
    Sep 2008
    Location
    Not here.
    Posts
    5,422
    Mentioned
    13 Post(s)
    Quoted
    242 Post(s)

    Default


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

  13. #13
    Join Date
    Dec 2011
    Location
    Lithuania
    Posts
    71
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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

  14. #14
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by SantWrong View Post
    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?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •