Results 1 to 6 of 6

Thread: Talking To NPC

  1. #1
    Join Date
    Jan 2012
    Posts
    468
    Mentioned
    3 Post(s)
    Quoted
    200 Post(s)

    Default Talking To NPC

    How can i make it click something and check to make sure it clicked the option!

  2. #2
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    DoConversation('', True);
    FindNPCChatText(.....);
    DidRedClick.

    should suffice..
    Last edited by Brandon; 05-31-2012 at 07:24 PM.
    I am Ggzz..
    Hackintosher

  3. #3
    Join Date
    Dec 2011
    Location
    -bash
    Posts
    515
    Mentioned
    0 Post(s)
    Quoted
    27 Post(s)

    Default

    Use a findobj() function to click whatever you are trying to click then look for the npc chathead in the chatbox by checking for the dtm. Then use an if statement with a findtext() function to find the option you are looking for.

    Simba Code:
    (*
    FindText
    ~~~~~~~~

    .. code-block:: pascal

        function FindText(var cx, cy: Integer; txt,font: string; xs, ys, xe, ye: Integer): Boolean;

    Searches for text in specified box with specified font.

    .. note::

        by Coh3n

    Example:

    .. code-block:: pascal

    *)

    function FindText(var cx, cy: integer; txt, font: string; xs, ys, xe, ye: integer): boolean;
    begin
      result := findTextEx(cx, cy, [txt], [font], xs, ys, xe, ye);
    end;

    Can't explain how to get the dtm, but if you are interested in this method, pm me

    Here is a function by Mat that finds an obj whereever...

    Simba Code:
    function FindObj_pX(Mouse:Boolean;pX, pY,Null,Null2: Integer; Mod1,Mod2:Extended;Lol1:String): Boolean;
    var
      CTS, I: Integer;
      TPA: TPointArray;
      ATPA: Array of TPointArray;
    begin
      CTS := GetColorToleranceSpeed;
      FindNormalRandoms;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(Mod1, Mod2);
      If Not Mouse then
      FindColorsSpiralTolerance(MSCX, MSCY, TPA,Null, 190, 140, 320, 230, Null2) else
      FindColorsSpiralTolerance(MSCX, MSCY, TPA,Null, MSX1, MSY1, MSX2, MSY2, Null2);

      ColorToleranceSpeed(CTS);
      ATPA := TPAToATPAEx(TPA, 15, 15);
      For I := 0 to High(ATPA) do
      begin
        MiddleTPAEx(ATPA[i], pX, pY);
        If Mouse then
        begin
          MMouse(pX, pY, 2, 2);
          Wait(300+Random(75));
          If(IsUpTextMultiCustom([Lol1]))  then
          begin
            Result := True;
            GetMousePos(pX, pY);
            Break;
          end;
        end else
          Result := True;
      end;
    end;

    Or Pm the user known as Flight, he is beastly at making obj finding functions (referring to his ZMI crafter ofc )
    Last edited by Recursive; 05-31-2012 at 07:18 PM.

  4. #4
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Tutorial island section is for tutorials, NOT scripting help.
    This belongs in the scripting help section.

  5. #5
    Join Date
    Jan 2012
    Posts
    468
    Mentioned
    3 Post(s)
    Quoted
    200 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    Tutorial island section is for tutorials, NOT scripting help.
    This belongs in the scripting help section.
    FYI THis is the Development! And Not Only for Tutorials!
    Last edited by BigRedJapan; 05-31-2012 at 11:09 PM.

  6. #6
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Rules of Joe View Post
    FYI THis is the Development! And Not Only for Tutorials!
    I didn't even know you could know more about the forum than a mod.

    FYI, this section is for development tutorials, which only tutorials can be posted here. From the threads you created, it doesn't looks like a development to me.

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
  •