Results 1 to 13 of 13

Thread: IsUpText, simple question.

  1. #1
    Join Date
    Nov 2009
    Location
    Seattle, WA
    Posts
    589
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default IsUpText, simple question.

    I just need a quick answer, I used to know how to do this but I forgot xD =[.

    example.
    SCAR Code:
    WaitUpText('ree','ak',1200);

    Is this the way I would seperate tree and oak for the UpText? I forgot xD. Is it a comma used in between or what? lol.
    Don't Troll, Don't Fight, Just keep the Respect
    Status : Offline

    Feel free to re-make my scripts ;D
    Community Member

  2. #2
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    I cant find WaitUpText in srl? but
    IsUpTextMultiCustom(Text: TStringArray): Boolean;
    IsUpTextMultiCustom(['ree','oak']);

    Is what you would do for that
    So try brackets around your strings.

  3. #3
    Join Date
    Nov 2009
    Location
    Seattle, WA
    Posts
    589
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    The Script worked, It was just meant to practice making my own AutoColor(Which I think is the best way of finding a color) and it worked, but the thing is I never understood Arrays, and I think I'm just gonna learn about it in Coh3n's guide for TArrays and stuff. Anyways heres the script :

    SCAR Code:
    program ClickTheTree;
    {.include SRL/SRL.scar}

    Function ChopTree : Boolean;
    var
      x, y : Integer;
    begin
      if not LoggedIn then Exit;
      MakeCompass('n');
      SetRun(True);
      x := MSCX;
      y := MSCY;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.06, 1.39);
      if FindColorSpiralTolerance(x, y, 1922119, MSX1, MSY1, MSX2, MSY2, 10) then
      begin
        Writeln('Found Tree, Saved its Coordinates to X and Y.');
        MMouse(x, y, 4, 4);
        if IsUpTextMultiCustom(['ree','ak']) then
        begin
          Writeln('UpText Found, Chopping Tree');
          Mouse(x, y, 0, 0, True);
          Result := True;
        end else
          Writeln('UpText not Found');
      end else
        Writeln('Did not find the Tree =[');
    end;

    begin
      SetupSRL;
      ClearDebug;
      ActivateClient;
      if ChopTree then
        Writeln('Chopped the Tree')
      else
        Writeln('Did not Chop the Tree');
    end.

    It found the uptext.
    SCAR Code:
    if IsUpTextMultiCustom(['ree','ak']) then
    I know theres some way of doing it like this.
    SCAR Code:
    if WaitUpText('ree','oak', 1020) then
    God I cant believe I forgot >.>
    Don't Troll, Don't Fight, Just keep the Respect
    Status : Offline

    Feel free to re-make my scripts ;D
    Community Member

  4. #4
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    I cant find WaitUpText in srl? but
    IsUpTextMultiCustom(Text: TStringArray): Boolean;
    IsUpTextMultiCustom(['ree','oak']);

    Is what you would do for that
    So try brackets around your strings.
    Its in Timing.scar

    I believe the function you want is WaitUpText(['ree', 'oak'], TIMEOUT);
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  5. #5
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    An uptext in timing.scar grrr!

  6. #6
    Join Date
    Nov 2009
    Location
    Seattle, WA
    Posts
    589
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Yeah! that was it >.> Im mentally deficient lol.
    Don't Troll, Don't Fight, Just keep the Respect
    Status : Offline

    Feel free to re-make my scripts ;D
    Community Member

  7. #7
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Heavenguard View Post
    Yeah! that was it >.> Im mentally deficient lol.
    No, its called learning.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  8. #8
    Join Date
    Nov 2009
    Location
    Seattle, WA
    Posts
    589
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Ugh, I just got a Type mismatch error.
    SCAR Code:
    if WaitUpText(['ree','ak'], 1500) then
    Line 16: [Error] (20672:35): Type mismatch in script Any reason why?
    Don't Troll, Don't Fight, Just keep the Respect
    Status : Offline

    Feel free to re-make my scripts ;D
    Community Member

  9. #9
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    SCAR Code:
    // * function WaitUptextMulti(S: TStringArray; Time: integer): Boolean; // By Marpis & N1ke!
    // * function WaitUptext(S: String; Time: Integer): Boolean;            // By N1ke!

    Only WaitUpTextMulti supports an array of strings

  10. #10
    Join Date
    Nov 2009
    Location
    Seattle, WA
    Posts
    589
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Ohz >.>
    SCAR Code:
    {*******************************************************************************
    function WaitUptext(S: String; Time: Integer): Boolean;
    By: Marpis edited by N1ke!
    Description: Waits for an UpText, returns true if found
    *******************************************************************************}
    Taken from Timing.Scar >.> isnt it a boolean? I mean, it sais it there I think, And Isn't it a fail safe?
    Don't Troll, Don't Fight, Just keep the Respect
    Status : Offline

    Feel free to re-make my scripts ;D
    Community Member

  11. #11
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    WaitUpText('ak', 1500);
      WaitUpTextMulti(['ree','ak'], 1500);

    You're mixing up regular and multi, one uses a string array i.e. [ill'', 'llo', 'low'] the other uses 1 string for ONE uptext i.e. 'illow' for willow.

  12. #12
    Join Date
    Nov 2009
    Location
    Seattle, WA
    Posts
    589
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Ohz...

    Guess ill stop being lazy and just make it
    SCAR Code:
    Wait(1000);
    if IsUpTextMultiCustom(['ree','ak']) then

    thanks for the help guys, didn't go over arrays and stuff so it didn't point out to me.
    God bless you!
    Last edited by Heavenguard; 12-08-2009 at 12:30 AM.
    Don't Troll, Don't Fight, Just keep the Respect
    Status : Offline

    Feel free to re-make my scripts ;D
    Community Member

  13. #13
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Yeah Heavenguard, I edited my post after I realized I made a mistake .
    Don't give up, you are my favorite Jr member by far keep striving and learning! I love you dedication!!!

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
  •