Results 1 to 12 of 12

Thread: ClickNpcChatText

  1. #1
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default ClickNpcChatText

    I need a better function than this.

    It doesnt seem to work at all.

    I'm trying to click this text:



    Which is at the top of a list of 3 options. Its the first.

    When my script reaches ClickNpcChatText('go.'); (have tried 'go.','ure','give it a go.', etc) it doesnt click it, just terminates the script.

    Can anbody provide a better function to click npc chat text?

    Help is greatly appreciated.

    Really don't want to use co-ords.

  2. #2
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try creating a bitmap mask from the text... But i suggest not using such a large bitmap.. Try:

    SCAR Code:
    Procedure ClickTxt;
    Var
    ToClick:Integer;
    Begin
      ToClick:= CreateBitmapMasKFromText('give', CharsNPC);
      If FindBitmapMaskTolerance(ToClick, x, y, MCX1, MCY1, MCX2, MCY2, 2, 2)then
         Mouse(x, y, 2, 2, True);
    End;

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

    Default

    Quote Originally Posted by itschris917 View Post
    Try creating a bitmap mask from the text... But i suggest not using such a large bitmap.. Try:

    SCAR Code:
    Procedure ClickTxt;
    Var
    ToClick:Integer;
    Begin
      ToClick:= CreateBitmapMasKFromText('give', CharsNPC);
      If FindBitmapMaskTolerance(ToClick, x, y, MCX1, MCY1, MCX2, MCY2, 2, 2)then
         Mouse(x, y, 2, 2, True);
    End;
    Ya, sounds like a good idea, I was going to suggest making a bitmap

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

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  4. #4
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    I'll try it. Thank you very much for the help, I'll tell you how it goes. =)

    Edit:

    Code:
    Unknown identifier 'CharsNPC'
    Am I missing an include in my script?

    I don't think so, looked over some other scripts that create bitmap masks from text using upchars and they work fine.

    Wth is going on >_<"

  5. #5
    Join Date
    Jan 2007
    Location
    Illinois.. >.<
    Posts
    1,158
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Shit, i switched it around it should be: NPCChars.. Sorry about the confusion.

  6. #6
    Join Date
    Jun 2006
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Post the code. I know ClickNPCChatText works, for a fact

  7. #7
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah, im using findnpcchattext now, but clicknpcchattext still isnt working, so im resorting to co-ords with random add on's.

  8. #8
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    That's messed up... It should work.

    Run this in any SCAR except 3.11 (I think):
    SCAR Code:
    program New;
    begin
      writeln(booltostr(IsFontSmoothingEnabled));
    end.
    If it says True in the debug box, then that MIGHT BE your problem, and you need to run this
    SCAR Code:
    program New;
    begin
      SetFontSmoothing(False);
    end.

    EDIT: Nah, actually, it should work even with font smoothing.

  9. #9
    Join Date
    Jan 2007
    Location
    Not here
    Posts
    1,604
    Mentioned
    2 Post(s)
    Quoted
    19 Post(s)

    Default

    that's not NPC chat ....NPCChat for me was like the stuff u get thats like a pop up like click here to continue except it's not click here to continue....it worked for me when I had to choose an option for fletching bows whether short or long bow ladi da....try some different chats....if thats just some chat in the text box try InChat.....
    Sleeping...

  10. #10
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    I use this in my Rune Mysteries Runner, I works well for me:

    SCAR Code:
    function ClickAnswer(Answer: string): Boolean;     //Based on SRL's ClickToContinue function
    begin
      if (not(LoggedIn)) then Exit;
      if (FindNpcChatText(Answer)) then
      begin
        Mouse(x + Random(35),  y + Random(8),  0,  0,  True);
        Wait(100);
        Result := True;
      end;
    end;

    I think its exactly the same as ClickNpcChatText though.

  11. #11
    Join Date
    May 2007
    Posts
    468
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i wouldnt know what the problem is. try looking over n3s33s tut runner, as there must be allooottt of chat there =Þ µ ® ±3h µb3® n§§b
    Originally Posted by YoHoJo
    I like hentai.

  12. #12
    Join Date
    Feb 2007
    Location
    SparklesProd.com
    Posts
    2,406
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    I just used co-ords. Works fine. +random amounts for anti ban of course.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. clicknpcchattext = not working...
    By ShowerThoughts in forum OSR Help
    Replies: 11
    Last Post: 08-30-2007, 03:52 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
  •