Results 1 to 4 of 4

Thread: Putting SRL Functions Into Your Scripts

  1. #1
    Join Date
    Dec 2006
    Posts
    43
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Putting SRL Functions Into Your Scripts

    I am currently making a willow cutter/banker. I know how to put SRL procedures into your own scripts (thats fairly obvious) but I don't know how to put the functions in. The function I want is--

    SCAR Code:
    {*******************************************************************************
    function FindEnt(TreeColor: Integer): Boolean;
    By:
    Description: Will look for an Ent
    *******************************************************************************}

    function FindEnt(TreeColor: Integer): Boolean;
    var
      i : Integer;
    begin
      if(Option2('Chop'))then
      begin
        if(FindColorTolerance(x, y, 383705, 9, 9, 233, 24, 20))or
          (FindColorTolerance(x, y, 65535, 9, 9, 233, 24, 20))then
        begin
          GetMousePos(x,y);
          Mouse(x, y, 5, 5,false);
          if(FindText(x, y, 'Chop down', UpChars, x - 50, y - 50, x + 100, y + 50))then
          begin
            if(FindColor(x, y, 65535, x + 70, y, x + 100, y + 10))then
            begin
              for i := 1 to 2 do
              begin
                Mouse(648, 83, 1, 1, True)
                Flag;
              end;
              WriteLn('Found ent! Waiting for it to go away');
              Wait(30000 + random(5000));
              Result := True;
              EntsAvoided := EntsAvoided + 1;
            end;
          end else
              ChooseOption(x, y, 'Cancel');
        end;
      end;
    end;

    I tried typing in FindEnt; and FindEnt(TreeColor: Integer): Boolean; but neither worked.

    Anybody know?

  2. #2
    Join Date
    Oct 2006
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    FindEnt(TreeColor: Integer): Boolean;

    change that too:
    SCAR Code:
    FindEnt(PUTTREECOLORHERE): True;

  3. #3
    Join Date
    Dec 2006
    Posts
    43
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Kaldo View Post
    FindEnt(TreeColor: Integer): Boolean;

    change that too:
    SCAR Code:
    FindEnt(PUTTREECOLORHERE): True;
    thanks =D

    I figured it out like 2 seconds after i posted but thanks anyways

  4. #4
    Join Date
    Oct 2006
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Putting retaliate OFF
    By The Intern in forum OSR Help
    Replies: 10
    Last Post: 02-10-2008, 12:54 PM
  2. Putting 2 digits together
    By Pietpatat in forum OSR Help
    Replies: 2
    Last Post: 12-05-2007, 05:10 PM
  3. Help With putting srl stats into my script?
    By Dangerous Garden Tools in forum OSR Help
    Replies: 1
    Last Post: 09-27-2007, 05:10 AM
  4. 2 new functions, could be useful for your scripts!
    By JAD in forum RS3 Outdated / Broken Scripts
    Replies: 12
    Last Post: 05-25-2007, 08:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •