Results 1 to 5 of 5

Thread: Nvm

  1. #1
    Join Date
    Sep 2007
    Location
    newcastle australia
    Posts
    240
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Elementalelfs non/junior members scripting competition

    ok, the object of this scripting competition is to take the procedure that WT-Fawaki has provided in the 2nd post, and make it work so that it will find the closest fire to the player.

    the best one gets a copy of the completed tutorial island runner script(usually an SRL members only script)

  2. #2
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    6,136
    Mentioned
    28 Post(s)
    Quoted
    17 Post(s)

    Default

    SCAR Code:
    //----------------------------------------------------------------------------//

    Function ThereIsFire(var WhereX,WhereY:integer):boolean;
    var
      acc,ref : Extended;
    var
      XT, YT,times,tol, Fire : Integer;
    begin
      Fire := BitmapFromString(1, 11, '3B3000F4C63FF8C83FF4C73EE6' +
           'BC39E6BC39BC922CE6BE45BC9E38BC9E3B352A00');

      ref:=0.8; tol:=1;
      for times:=1 to 4 do
      begin
        FindDeformedBitmapToleranceIn(Fire, XT, YT, MSCX-(25*times),MSCY-(25*times),MSCX+(25*times),MSCY+(25*times), tol, 2, True, acc);
        if (acc >= ref) then
        begin
          WhereX:=XT;
          WhereY:=YT;
          Result := True;
          FreeBitMap(Fire);
          Exit;
        end;
        ref := ref - 0.1;
        tol:=tol+10;
        wait(1);
      end;
      Result:=False;
      FreeBitMap(Fire);

    end;

    Finds it, returns the coords in WhereX and WhereY.

    EDIT: sry, didnt see it was for non members
    SRL is a Library of routines made by the SRL community written for the Program Simba.
    We produce Scripts for the game Runescape.

  3. #3
    Join Date
    Sep 2007
    Location
    newcastle australia
    Posts
    240
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by WT-Fakawi View Post
    SCAR Code:
    //----------------------------------------------------------------------------//

    Function ThereIsFire(var WhereX,WhereY:integer):boolean;
    var
      acc,ref : Extended;
    var
      XT, YT,times,tol, Fire : Integer;
    begin
      Fire := BitmapFromString(1, 11, '3B3000F4C63FF8C83FF4C73EE6' +
           'BC39E6BC39BC922CE6BE45BC9E38BC9E3B352A00');

      ref:=0.8; tol:=1;
      for times:=1 to 4 do
      begin
        FindDeformedBitmapToleranceIn(Fire, XT, YT, MSCX-(25*times),MSCY-(25*times),MSCX+(25*times),MSCY+(25*times), tol, 2, True, acc);
        if (acc >= ref) then
        begin
          WhereX:=XT;
          WhereY:=YT;
          Result := True;
          FreeBitMap(Fire);
          Exit;
        end;
        ref := ref - 0.1;
        tol:=tol+10;
        wait(1);
      end;
      Result:=False;
      FreeBitMap(Fire);

    end;

    Finds it, returns the coords in WhereX and WhereY.

    EDIT: sry, didnt see it was for non members
    1. this thread has already been deleted, i know forum admins can see deleted posts, but i thought you would be able to tell the difference

    2. hmm, you do realise you can see my script anyway?

    3. thank you very much man, i will use this.

    4. script should be completed within the next 24 hours.
    edit:
    btw this was the one i was working on, but it didnt work, i thin i mixed up the begin/end nesting.

    SCAR Code:
    procedure cookshrimp;
    var countr:integer;
    begin
      repeat
      if(countr=8)then
      begin
        logout;
        writeln('sorry mate, got stuck at the fire');
        terminatescript;
      end else
      begin
        if(findcolortolerance(lulx,luly,360275,msx1,msy1,msx2,msy2,10))then
        begin
          mouse(705, 229, 1, 1, true);
          wait(50);
          if(findobj(lulx, luly, 'Fire',  3650275, 10))then
          begin
            mouse(lulx, luly, 1, 1, true);
            flag;
            wait(5000);
          end;
          if(findnpcchattext('right cli')) then
          begin
            cookshrimp;
            exit;
          end;
        end;
      end;
      countr:=countr+1;
      until(findnpcchattext('urnt'));
    end;

    edit: just thought of something to make this stilll a valid competition with a decent prize... see top post for details

  4. #4
    Join Date
    Feb 2006
    Location
    London, England
    Posts
    2,045
    Mentioned
    2 Post(s)
    Quoted
    0 Post(s)

    Default

    This thread hasn't been deleted, otherwise you wouldn't even be able to see it.

    It is still available for all to see
    SRL Wiki | SRL Rules | SRL Stats
    Ultimate SCAR Scripting Tutorial | Starblaster100's Auth System | Join the official SRL IRC now!


    Help Keep SRL Alive! Please disable Advert Blockers on SRL! Help Keep SRL Alive!


  5. #5
    Join Date
    Aug 2007
    Location
    England
    Posts
    734
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I can see it
    The truth finally came out...


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
  •