Results 1 to 7 of 7

Thread: Look For Symbol !!

  1. #1
    Join Date
    May 2007
    Location
    Some where fun.
    Posts
    2,891
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default Look For Symbol !!

    This function finds any symbol in symbol.scar .
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    This function lowers its symbol accuracy if it doesn't find it.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    This function resets the symbol accuracy if it finds the symbol, or symbol accuracy is 0.01
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


    Thank KAVE for fixing it up

    SCAR Code:
    Function LookForSymbol(Symbol:string):boolean;
    var
    SymbolAcc2: Extended;
    begin
      SymbolAcc2 := SymbolAccuracy;
      repeat
        SymbolAccuracy := SymbolAccuracy - 0.01;
      until FindSymbol(x, y, Symbol) or (SymbolAccuracy = 0.01)
      if (SymbolAccuracy > 0.01) then
        begin
          Mouse(x,y,1,1,True);
          Writeln('Clicked Symbol');
          repeat
            wait(25);
          until FlagPresent;
          FFlag(0);
          Result := True;
        end
      else
        begin
          Writeln('Symbol not found');
          Result := False;
        end;
      SymbolAccuracy := SymbolAcc2;
    end;

    I haven't tested but this does compile. Enjoy

  2. #2
    Join Date
    Nov 2006
    Location
    NSW, Australia
    Posts
    3,487
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    This doesn't even have a repeat?
    [CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
    [CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]

    [CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]

  3. #3
    Join Date
    May 2007
    Location
    Some where fun.
    Posts
    2,891
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by Santa_Clause View Post
    This doesn't even have a repeat?
    For what purpose?

    Its just like find symbol...

    if lookforsymbol('bank') then..

  4. #4
    Join Date
    Nov 2006
    Location
    Location, Location
    Posts
    1,126
    Mentioned
    6 Post(s)
    Quoted
    41 Post(s)

    Default

    he says no repeat because you say it lowers symbol accuracy, so the best thing to do would be to put a repeat...

    SCAR Code:
    Function LookForSymbol(Symbol:string):boolean;
    var
    SymbolAcc2: Extended;
    begin
      SymbolAcc2 := SymbolAccuracy;
      repeat
        SymbolAccuracy := SymbolAccuracy - 0.01;
      until FindSymbol(x, y, Symbol) or (SymbolAccuracy = 0.01)
      if (SymbolAccuracy > 0.01) then
        begin
          Mouse(x,y,1,1,True);
          Writeln('Clicked Symbol');
          repeat
            wait(25);
          until FlagPresent;
          FFlag(0);
          Result := True;
        end
      else
        begin
          Writeln('Symbol not found');
          Result := False;
        end;
      SymbolAccuracy := SymbolAcc2;
    end;

  5. #5
    Join Date
    May 2007
    Location
    Some where fun.
    Posts
    2,891
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default

    Ty cave and santa..

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

    Default

    Haha, easy way to do this, minus the clicking would be:

    SCAR Code:
    function SymbolFind(var x, y: integer; Symbol: string): boolean
    var TSA: extended;
    begin
      TSA := SymbolAccuracy;
      result := false;
      While (not FindSymbol(x, y, Symbol)) or (SymbolAccuracy <> 0.01) do
        SymbolAccuracy:= SymbolAccuracy - 0.01;
      if SymbolAccuracy <> 0.01 then
        result := true;
      SymbolAccuracy := TSA;
    end;

    I just cut a few lines essentially, and made it return x, and y, instead of click.

    No idea if that even compiles... :O

    Nava2
    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

  7. #7
    Join Date
    May 2007
    Location
    Some where fun.
    Posts
    2,891
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by Nava2 View Post
    Haha, easy way to do this, minus the clicking would be:

    SCAR Code:
    function SymbolFind(var x, y: integer; Symbol: string): boolean
    var TSA: extended;
    begin
      TSA := SymbolAccuracy;
      result := false;
      While (not FindSymbol(x, y, Symbol)) or (SymbolAccuracy <> 0.01) do
        SymbolAccuracy:= SymbolAccuracy - 0.01;
      if SymbolAccuracy <> 0.01 then
        result := true;
      SymbolAccuracy := TSA;
    end;

    I just cut a few lines essentially, and made it return x, and y, instead of click.

    No idea if that even compiles... :O

    Nava2
    Ok, but the one on the first post works fine.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. New MM symbol.
    By the flea in forum RS has been updated.
    Replies: 5
    Last Post: 05-13-2007, 02:26 AM
  2. Symbol help
    By Rambozin in forum OSR Help
    Replies: 16
    Last Post: 04-25-2007, 03:12 PM
  3. Symbol Name
    By 3Garrett3 in forum OSR Help
    Replies: 3
    Last Post: 03-31-2007, 05:43 PM
  4. clicking the quest symbol then the bank symbol
    By RudeBoiAlex in forum OSR Help
    Replies: 7
    Last Post: 03-22-2007, 11:14 PM
  5. Symbol help
    By fugate in forum OSR Help
    Replies: 4
    Last Post: 01-21-2007, 02:18 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
  •