Page 2 of 2 FirstFirst 12
Results 26 to 30 of 30

Thread: need help with first script

  1. #26
    Join Date
    May 2009
    Posts
    32
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    like u said i would have to know tree finding so say im all rady at the trees would i find them by like searching the screen some how and if symbol is not found than search tell it is found if found chop

  2. #27
    Join Date
    May 2009
    Posts
    32
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    and how would i deal with axe breaking and what not

    and is normalrandom a built in function so it just deals with all the randoms for u?

  3. #28
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Axes don't break anymore.

    FindNormalRandoms will deal with randoms, you just have to use it effectively (at the right places and what not).

  4. #29
    Join Date
    May 2009
    Posts
    32
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    wow so much has changed lol


    ok can u just explain declareplayers as a hole y use it what does it do and y use it

  5. #30
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I'm sorry for the late reply to your question.

    SCAR Code:
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer  := 0;

      with Players[0] do
      begin
        Name := '';
        Pass := '';
        Nick := '';
        Pin  := '';
        Active:=True;
      end;
    end;

    What "DeclarePlayers" is:
    DeclarePlayers is for character information that is used to log in to the game and detecting. This is a very needed procedure. All you have to do is "Call" on it in your main loop procedure and then you are set!

    What "DeclarePlayers" is used for:
    Logging in your character and random detection.

    --

    "with Players[0] do":
    This is a neater and more "Advanced" way to say this:
    SCAR Code:
    Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Nick := '';
      Players[0].Pin  := '';
      Players[0].Active:=True;

    Name: Character username
    Pass: Character password
    Nick: Character nickname (3 ~ 4 letters of the username)
    Pin: Character bank pin
    Active:=True: This tells your script that this character / player is active and is to be used in the script.


    Here is a script that uses DeclarePlayers and MainLoop procedures. It is a very rough example of what could be done with a MainLoop procedure. It should be self explanatory though.

    SCAR Code:
    program new;
    {$i SRL/SRL.scar}

    var X, Y : Integer;

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer  := 0;

      with Players[0] do
      begin
        Name := '';
        Pass := '';
        Nick := '';
        Pin  := '';
        Active:=True;
      end;
    end;

    procedure MainLoop;
    begin
      SetupSRL;
      DeclarePlayers;
      ActivateClient;
      LogInPlayer;
      ClearDebug;
      if InvFull then
      begin
        WalkToBank;
        UseBank;
        WalkToTrees;
      end else
        repeat
          ChopTrees;
          WalkToBank;
          UseBank;
          WalkToTrees;
        until(Runs >= 1);
    end;

    begin
    MainLoop;
    end.

    Quote Originally Posted by hopetobedabest View Post
    wow so much has changed lol


    ok can u just explain declareplayers as a hole y use it what does it do and y use it
    If you need anymore help, feel free to ask.
    Last edited by RISK; 10-18-2010 at 01:02 PM.

Page 2 of 2 FirstFirst 12

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
  •