Results 1 to 3 of 3

Thread: Best Way.

  1. #1
    Join Date
    Apr 2007
    Posts
    50
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Best Way.

    I am trying to think of the best way to open an NPC ingame.

    Got a few ways in mind but nothing too solid, Advice would be great.


    For example the npc sells scimi's what way would be best to locate the NPC ?

    Im thinking DTM, BIT, or possibly a mask, but as it moves a mask DTM and BitMap are going to be less efficient, colour clicking may be the way to go but then i may get it right clicking on things i dont want, help appreciated

    Thanks,
    Jason.
    Thanks -
    Your Friend,
    Chwiggy // Jason.

    -----
    "Great acts are made up of small deeds"

    "He who does not trust enough, Will not be trusted."

    "If you would take, you must first give, this is the beginning of intelligence."

    "A leader is best when people barely know he exists, when his work is done, his aim fulfilled, they will say: we did it ourselves."

    "Respond intelligently even to unintelligent treatment."
    -----

  2. #2
    Join Date
    Jun 2007
    Location
    New Yawk
    Posts
    943
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Open an NPC? Surely you mean open a dialogue window or some other. Not to create one ingame.
    I guess the holidays are over - no sig for now.

  3. #3
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try a color With Sub Points..

    Example.

    SCAR Code:
    Procedure FindNPC(Tol : Integer; Click, Left : Boolean; Option : String);
    Var
      NPCx, NPCy, NPCx2, NPCy2 : Integer;
    Begin
      Repeat
        If FindColorTolerance(NPCx, NPCy, {Color}, MSX1, MSY1, MSX2, MSY2, Tol) Then
          If FindColorTolerance(NPCx2, NPCy2, {Color}, NPCx-20, NPCy-20, NPCx+20, NPCy+20, Tol) Then
            If FindColorTolerance(NPCx2, NPCy2, {Color}, NPCx-20, NPCy-20, NPCx+20, NPCy+20, Tol) Then
              If FindColorTolerance(NPCx2, NPCy2, {Color}, NPCx-20, NPCy-20, NPCx+20, NPCy+20, Tol) Then
                If FindColorTolerance(NPCx2, NPCy2, {Color}, NPCx-20, NPCy-20, NPCx+20, NPCy+20, Tol) Then
                  If FindColorTolerance(NPCx2, NPCy2, {Color}, NPCx-20, NPCy-20, NPCx+20, NPCy+20, Tol) Then
                    Break;
      Until(Not LoggedIn)
      If Click Then
        If Left Then Mouse(NPCx, NPCy, 0, 0, True);
      Else
      If Not Left Then
        Begin
          Mouse(NPCx, NPCy, 0, 0, False);
          Wait(40+random(70));
          ChooseOption(Option);
        end;
    end;

    Use It As
    SCAR Code:
    FindNPC(4, True, False, 'Trade');

    Explanitory...

    SCAR Code:
    FindNPC(4{Tol Of The Color To Look For Vary TO What You Want / Need}, True{Use Any Click At All?}, False{Left Click?}, '{Text To Click On}');

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
  •