Results 1 to 5 of 5

Thread: recognizing bmps

  1. #1
    Join Date
    Nov 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default recognizing bmps

    I was just wondering if someone could link me to a tutorial..

    I know how to pass a pic to a string and a bit about the DTM, but how does one find the location on the screen and would it recognize it if the screen rotates facing south? (or does scar default to always face north?)

    edit
    also i couldnt find any General exchange scripts and was wondering if there was a screen detect or anything for it as of late, (planning on making a script and if i have to i might make a main scar)

  2. #2
    Join Date
    Sep 2007
    Posts
    638
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Procedure GetPick;
    SCAR Code:
    begin
      FindDtm(Pick, x, y, MIX1,MIY1,MIX2,MIY2);
      mouse(x, y, 5, 5, true);
      wait(300);
    end;

    This is from http://www.villavu.com/forum/showthr...=32990?t=35731

    Search If statements on that link and it will take you to it.

    also

    SCAR Code:
    Procedure GetPick;
    begin
     if( FindDtm(Pick, x, y, MIX1,MIY1,MIX2,MIY2)) then // This is how If statements are declared If….. Then
      begin // We want to execute an entire chunk of code not just one line. One line would suffice, but for the  purposes of this.
        mouse(x, y, 5, 5, true);
        writeln(‘Pick found’);
        wait(300);
      end;
    end;

    If it doesn't find DTM's facing south (which it should) you can do

    SCAR Code:
    MAkeCompass('n');

    It makes the compass face north, if you replace n with s it will be south, e =east ect.

  3. #3
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Check the Public Test Corner - MetaGen has lots of GE functions in his include.

  4. #4
    Join Date
    Nov 2008
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by NaumanAkhlaQ View Post
    Check the Public Test Corner - MetaGen has lots of GE functions in his include.
    Is that for subforum members only? (think im under the post count or join date)..

    also why wont this work?
    if Pos('grimy',lowercase(GetUpText))

    function pos(substr, s: string): LongInt;
    Returns position of substring in string. Returns 0 if not found.

    function Lowercase(s: string): string;
    Returns the specified string in lowercase.

    am i missing an include or something?

    edit
    great help here btw ^^

  5. #5
    Join Date
    Feb 2007
    Location
    Toronto, Ontario, Canada
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Pos() returns an integer, and you're trying to evaluate it as a boolean.
    Try
    SCAR Code:
    if(Pos('grimy',lowercase(GetUpText)) > 0)then
    //...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Making BMP/Universal power of BMPs/How to use BMPs
    By Cazax in forum OSR Advanced Scripting Tutorials
    Replies: 7
    Last Post: 03-05-2009, 07:51 AM
  2. Idea for item/NPC recognizing
    By marpis in forum RS3 Outdated / Broken Scripts
    Replies: 4
    Last Post: 10-24-2008, 02:06 PM
  3. Cooking Item DTMs or BMPs
    By travo in forum OSR Help
    Replies: 5
    Last Post: 12-07-2007, 11:46 PM
  4. Recognizing text in a popup
    By Esteban in forum OSR Help
    Replies: 6
    Last Post: 07-17-2007, 12:34 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
  •