Results 1 to 6 of 6

Thread: If my targeted NPC keeps moving?

  1. #1
    Join Date
    Dec 2012
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default If my targeted NPC keeps moving?

    Hey, I was wondering if there was a way to keep up with my targeted NPC if it keeps moving? I've tried the Painter, but sometimes it clicks the painted spot right as the NPC moves away from it, Is there like any Object ID reader or something, that could help with this? (I.E, trying to buy items from shop-keeper, but he keeps moving, as he moves away, it F***s up the entire script, causing me to have to restart it.

    Also, if anyone has time, Is there a way for the script/simba to know if your standing right over your selected target? So it'll right click your body and select the target?

  2. #2
    Join Date
    Dec 2009
    Posts
    380
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    If you're standing on the target, you can always have the script hover the mouse over you, and if the specified uptext is found do whatever you want it to do.
    Currently: Playing OSRS legit until I get bored

  3. #3
    Join Date
    Dec 2012
    Posts
    191
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try to get him stuck before running the script OR use TPA/ATPA on your script :\ There are tutorials for this in the Tutorial Island section.

  4. #4
    Join Date
    Oct 2011
    Location
    Australia, Vic
    Posts
    1,517
    Mentioned
    2 Post(s)
    Quoted
    120 Post(s)

    Default

    You could just increase the mouse speed and add uptext checks so It doesn't click some random place.

  5. #5
    Join Date
    Dec 2012
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thank you all for the replies Very Helpful!. I'll go do some studying and try it out again

  6. #6
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    Quote Originally Posted by JMCross View Post
    Thank you all for the replies Very Helpful!. I'll go do some studying and try it out again
    I would read this tutorial ~ http://villavu.com/forum/showthread.php?t=90767

    Taught me TPA's very well. Make sure you change the TPA to right click then check the uiptext, with a TPA it wont even click unless he is there, then it will be near instant

    Example from my beer buying script to find the bartender

    Simba Code:
    Function FindBartender:Boolean;
    var
      tmpCTS, i, l, r, counter: integer;
      BTTPA:TPointArray;
        begin  tmpCTS := GetToleranceSpeed;
          SetColorToleranceSpeed(2);
          SetToleranceSpeed2Modifiers(0.06, 0.34);
          FindColorsTolerance(BTTPA, 6973285, MSX1, MSY1, MSX2, MSY2, 10);
          SetColorToleranceSpeed(tmpCTS);
          SetToleranceSpeed2Modifiers(0.02, 0.02);
          L := High(BTTPA)
          marktime(counter);
          for i := 0 to L do
           begin
            r := random(L);
            wait(randomrange(60, 200));
            mmouse(BTTPA[r].x, BTTPA[r].y, 2, 2);
            if waituptext('tender', 300) then
              Break;
            if timefrommark(counter) > 3000 then
              begin
                writeln('Failed to find the bartender');
              end;
          end;
          writeln('Found the bartender');
          clickmouse2(mouse_right);
          WaitOption('Talk-to', 500);
          MarkTime(b);
          repeat
            wait(50+random(5));
          until((FindNPCChatText('yer', nothing)) or (TimeFromMark(b) > 2000));
      end;

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
  •