Results 1 to 12 of 12

Thread: Best way to find an Npc?

  1. #1
    Join Date
    Oct 2006
    Location
    Ireland
    Posts
    855
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Best way to find an Npc?

    Whats the most effecient way of finding an npc and clicking on them? I couldn't find any functions in the Srl manual specificly for it, and findobject doesn't work well.. Any ideas?

  2. #2
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    I've often run into the same problem.

    My advice: Make your own. Then you'll know exactly how it works, and you'll be able to fix it should anything stop working
    Interested in C# and Electrical Engineering? This might interest you.

  3. #3
    Join Date
    Oct 2006
    Location
    Ireland
    Posts
    855
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'll see if anybody else has some ideas first, or I might look at some other peoples scripts, see how they did it..

  4. #4
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Use the one By Jason, its in utilities i think, but if not, i could send you a copy later, this comp doesnt have scar, and the one that does is using LAME right now, but try to find the one by jason, it works pretty well for me

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  5. #5
    Join Date
    Oct 2006
    Location
    Ireland
    Posts
    855
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Great I'll check it out, can you pm me it? Just incase I can't find it. I gotta go now.

  6. #6
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    SCAR Code:
    procedure NPCFinderTol(NPCColor, NPCColor2, Tol: Integer; Name: String);  //Procedure by Jason2gs. Heavily modded by Smartzkid.
    var
     Tries, Resets, fx, fy, cx, cy:integer;
    begin
     repeat
     if(FindColorSpiralTolerance(fx, fy, NPCColor, MSX1, MSY1, MSX2, MSY2, Tol))then
     if(FindColorCircleTolerance(cx,cy,NPCColor2,100,fx,fy,tol))then
      MMouse(fx, fy, 1, 1);
      Tries := Tries + 1;
      if(Tries >= 5)then
      begin
       KeyDown(37);
       Wait(700 + Random(700));
       KeyUp(37);
       Tries := 0;
       Resets := Resets + 1;
      end;
      wait(20+random(500));
     until(IsUpText(Name)) or (Resets>10)
     if(Resets>10)then
     begin
      result:=false;
     end else
     begin
      Mouse(x, y, 0, 0, False);
      result:=ChooseOption(x, y, 'Talk');
     end;
    end;

    Try that.

    If you want it to do something other than talk to the npc, change the third line up from 'Talk' to whatever you want it to do
    Interested in C# and Electrical Engineering? This might interest you.

  7. #7
    Join Date
    Sep 2006
    Location
    West U.S.
    Posts
    2,172
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    thats one thing that everyone will have trouble with including me and thats the main reason why my script hasnt been updated for a while

    They are sisters...
    Runescape Classic

  8. #8
    Join Date
    Dec 2006
    Posts
    354
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    why, what's so bad about it?
    Thick As Blood

  9. #9
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    Well, jason's proc works all the time for me,, unless it chooses the keeper and someone else is standing on them and it trades that person, so i made a bitmap of the trade option, a few letters, and used that instead of choosoption but other than that, it works great...

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  10. #10
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    I remade his, so it has failsafes, will search for 2 of the NPC's colors (more accurate), and so it won't stop your whole script if the NPC cannot be found (example: you die, your script doesn't realize it. Jason's procedure will just continue to search for the color)
    Interested in C# and Electrical Engineering? This might interest you.

  11. #11
    Join Date
    Feb 2007
    Location
    Australia
    Posts
    358
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    lol SmartzKid, why arent you a SRL Member yet?
    You know so much about scripting you could easily get in.

    Anyway, finding NPCs aye...
    Well I would use a FindObject function, look through in object.scar to find one that suites ur needs.
    Then I would add failsafes with GetMousePos and IsUpText.
    Ill throw something together for you tonight cause right now im at school and the computers dont have SCAR

  12. #12
    Join Date
    Oct 2006
    Location
    Ireland
    Posts
    855
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hey guys thanks fdor the replies. I tried jason procedure and it works great, I'm gunna add soem failsafes in and edit it slightly though, but ill give credit where due.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. how did i ever find this...?
    By legendaryhero90 in forum Music, Movies and TV
    Replies: 9
    Last Post: 02-03-2008, 12:53 AM
  2. Find Gas
    By Lacky in forum Research & Development Lounge
    Replies: 4
    Last Post: 11-04-2007, 12:56 PM
  3. have to find out
    By the scar noob in forum OSR Help
    Replies: 5
    Last Post: 01-13-2007, 10:19 PM

Posting Permissions

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