Results 1 to 4 of 4

Thread: clicking npc text help

  1. #1
    Join Date
    Apr 2007
    Location
    Australia
    Posts
    4,163
    Mentioned
    9 Post(s)
    Quoted
    19 Post(s)

    Default clicking npc text help

    well in my kebab buyer I have this piece of code to click the text that Karim says so it buys the kebab.

    SCAR Code:
    // Clicks on the text down the bottom of the screen to buy the kebabs. \\
    procedure BuyKebabs;
    begin
      if(not(LoggedIn)) then exit;
      KebabCount:=KebabCount;
      ClickToContinue;
      Wait(1000 + random(100));
      ClickNPCChatText('Yes please.');
      Wait(1000 + random(100));
      ClickToContinue;
    end;

    The problem is, due to lag or whatever, sometimes the next screen to click on takes longer than 1 second to come up, but the script doesnt realise this so it thinks it has bought the kebab, and restarts the loop to click on karim, then BuyKebabs.

    so is there any better way to make sure that the text is down the bottom of the screen before attempting to click on it? so that way i wont need waits.

    help appreciated

  2. #2
    Join Date
    Mar 2007
    Posts
    937
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by The Claw View Post
    well in my kebab buyer I have this piece of code to click the text that Karim says so it buys the kebab.

    SCAR Code:
    // Clicks on the text down the bottom of the screen to buy the kebabs. \\
    procedure BuyKebabs;
    begin
      if(not(LoggedIn)) then exit;
      KebabCount:=KebabCount;
      ClickToContinue;
      Wait(1000 + random(100));
      ClickNPCChatText('Yes please.');
      Wait(1000 + random(100));
      ClickToContinue;
    end;

    The problem is, due to lag or whatever, sometimes the next screen to click on takes longer than 1 second to come up, but the script doesnt realise this so it thinks it has bought the kebab, and restarts the loop to click on karim, then BuyKebabs.

    so is there any better way to make sure that the text is down the bottom of the screen before attempting to click on it? so that way i wont need waits.

    help appreciated
    Instead of ClickToContinue, Use TalktoRand; It keeps clicking on the continue bar if its there . Hope that helped.


    -Ashur
    Exam period.

  3. #3
    Join Date
    Apr 2007
    Location
    Australia
    Posts
    4,163
    Mentioned
    9 Post(s)
    Quoted
    19 Post(s)

    Default

    ill give it a shot, thx
    but the problem is the time between the clicktocontinue and clicking "yes please", I need something that will wait until the text is there before it tries to click it.

    something like
    SCAR Code:
    if(text is there) then
    click it
    but not sure if thats the right way..

  4. #4
    Join Date
    Mar 2007
    Posts
    937
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by The Claw View Post
    ill give it a shot, thx
    but the problem is the time between the clicktocontinue and clicking "yes please", I need something that will wait until the text is there before it tries to click it.

    something like
    SCAR Code:
    if(text is there) then
    click it
    but not sure if thats the right way..

    Hmm, maybe you could use talk to rand, then the NPC procedure, then talk to rand again Get what i mean?

    Hope that helped :P

    -Ashur
    Exam period.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Grabbing or reading Text from a game text box
    By British in forum OSR Help
    Replies: 16
    Last Post: 02-27-2009, 08:02 AM
  2. Getting text from text window?
    By Gone Fishing in forum OSR Help
    Replies: 8
    Last Post: 04-24-2008, 07:33 PM
  3. Clicking Skill up text in MC window
    By Bramble in forum OSR Help
    Replies: 2
    Last Post: 12-05-2006, 04:49 PM
  4. Clicking text from npc talk
    By da_professa in forum OSR Help
    Replies: 6
    Last Post: 10-29-2006, 11:30 AM

Posting Permissions

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