Results 1 to 12 of 12

Thread: Different Waiting Style..

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

    Default Different Waiting Style..

    Ok so I want add something to the end of a procedure so it doesn't finish until it sees certain text in the chatbox.

    I'm using it for an agility course runner,
    I don't want it to click on the next obstacle until it sees "...You make it safely to the other side"

    I was thinking of somthing like
    wait(FindText(x,y,'...You',smallchars,MCX1,MCY1,MC X2,MCY2));
    But obviously that wouldn't work.

    So yea, any help would be appreciated.

  2. #2
    Join Date
    Jan 2007
    Location
    Toronto.
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Do you mean this?

    SCAR Code:
    procedure YourProcedure;
    begin
      repeat
        // Your stuff here
      until(InChat('ou make it safely to the other side'))
    end;

  3. #3
    Join Date
    Feb 2007
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Cool, I think you solved half of my problem also. By any chance, do you know how I can get it to read an input even when it's not in RuneScape? Like if I wanted to run the program on Notepad, is there anyway for it to read the input from the user?

    Thanks in advance

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

    Default

    Thanks! That worked exactly as i needed it too XD

    Heres the procedure im using it in

    SCAR Code:
    procedure FindLog; //Log Procedure.
    begin
     repeat
      FindObjMultiText(x,y,'ross','ross','ross',LogColor,4)
      wait(300+(200))
      MMouse(x,y,0,0);
     until(IsUpText('ross'));
     if(IsUpText('ross'))then
       Mouse(x,y,0,0,true)
     else
      FindLog;
     begin
      repeat
      Status('Waiting to cross the log...')
      until(InChat('ou make it safely to the other side'))
     end;
    end;

  5. #5
    Join Date
    Mar 2006
    Posts
    3,051
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    You will want to add a wait in that loop or you will probably have some serious lag...

    Code:
    repeat
      wait(50);
      Status('Waiting to cross the log...')
    until(InChat('ou make it safely to the other side'));

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

    Default

    Quote Originally Posted by pdw40893 View Post
    Cool, I think you solved half of my problem also. By any chance, do you know how I can get it to read an input even when it's not in RuneScape? Like if I wanted to run the program on Notepad, is there anyway for it to read the input from the user?

    Thanks in advance
    I don't think you can, because of the difference in fonts; I tried before, but I could never get it to work.
    Interested in C# and Electrical Engineering? This might interest you.

  7. #7
    Join Date
    Feb 2007
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Smartzkid View Post
    I don't think you can, because of the difference in fonts; I tried before, but I could never get it to work.
    I was worried about that. Darn. Well, unless I'm going to run a memorization test in RuneScape, I'm going to have to find another way or something. Maybe Scar can read inputs and declare them as variables, like Java?

    EDIT: Can Scar read what's in the debugging box, instead of the RuneScape chat window? If it could, I would probably be able to skip the messy read input part and go straight to declaring it as a variable. Still, I would rather prefer Scar to read inputs from users in programs such as Notepad, for the sake of appearance.

  8. #8
    Join Date
    Feb 2007
    Posts
    215
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by pdw40893 View Post
    I was worried about that. Darn. Well, unless I'm going to run a memorization test in RuneScape, I'm going to have to find another way or something. Maybe Scar can read inputs and declare them as variables, like Java?

    EDIT: Can Scar read what's in the debugging box, instead of the RuneScape chat window? If it could, I would probably be able to skip the messy read input part and go straight to declaring it as a variable. Still, I would rather prefer Scar to read inputs from users in programs such as Notepad, for the sake of appearance.

    try this, not sure if its what your looking for.

    Code:
    program UserInput;
    var s:string;
    begin
    s:=Readln('Enter Whatever Below:')
    Writeln('You said: ' + s)
    end.

  9. #9
    Join Date
    Feb 2007
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Although that is not exactly what I'm looking for, it does help with another problem later on. What I need right now is that instead of 'Writeln('You said: ' +s)', I need Scar to compare what the user puts in with what Scar displays earlier. I'll try to post part my small script in here:

    Code:
    program Memorization;
    var
    a,b,c,d,e,f,g,h: Integer;
    s:string;
    
    const
    Message1=('Please remember these numbers:');
    
    begin
     begin
     a:= 0;
     b:= 8;
     c:= 2;
     d:= 9;
     e:= 0;
     f:= 5;
      Cleardebug;
      Writeln(Message1 +IntToStr(b) +IntToStr(c) +IntToStr(d) +IntToStr(e) +IntToStr(f) );
      Wait(3000);
       repeat
        a:= a + 1;
        Writeln('|');
       until(a >=10);
      Wait(3000);
      s:=readln('Enter Previous Number Here:');
      Writeln('The Correct Answer Was:' +IntToStr(b) +IntToStr(c) +IntToStr(d) +IntToStr(e) +IntToStr(f) );
      Wait(7000);
     end;
    end.
    I want Scar to compare the number 82905 with what the person puts in later when I ask them to reenter the number. Do you think this would be easier with just one integer, 'b', instead of 'b', 'c', 'd', 'e', and 'f'? Notice how I've incorporated your suggestion into the my script. After the 'Writeln('The Correct Answer Was:');' I want Scar to compare the input with the integers and say whether that is correct or not.

    Thanks in advance. (Might not respond for a little while, going to tennis.)

  10. #10
    Join Date
    Sep 2006
    Posts
    916
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Do this for comparing:

    If(s=82905)Then
    WriteLn('You Got It Right!');

    Or something like that.

  11. #11
    Join Date
    Feb 2007
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wow, it's that easy? Thanks!

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

    Default

    Quote Originally Posted by tarajunky View Post
    You will want to add a wait in that loop or you will probably have some serious lag...

    Code:
    repeat
      wait(50);
      Status('Waiting to cross the log...')
    until(InChat('ou make it safely to the other side'));
    Ahh thanks, it runs better now
    In a related topic, Im having ALOT of trouble with the Pipe Obstacle Procedure..
    The pipe only write text in the chatbox if it is already in use..
    So I used this so the procedure would find the text and relise the pipe was in use,
    then click on a different pipe.

    SCAR Code:
    if (FindText(x,y,'pipe is being',smallchars,MCX1,MCY1,MCX2,MCY2)) then
        begin
         FindPipe
         wait(50)
         Status('Pipe is being used... Looking for an other one.')
        end
     else
      Status('squeezing thru pipe')
      wait(5000+(1000))

    The only problem is, when it does find another pipe, and clicks on it, and its NOT in use, it still finds the "Already in use" text and keeps looking for one, even through im already in it.

    I hope that makes sense, its a bit early for me to be up on a sunday

    Thanks

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
  •