Results 1 to 2 of 2

Thread: What's wrong with this script?

  1. #1
    Join Date
    Oct 2008
    Posts
    16
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default What's wrong with this script?

    Hey,

    This script used to work fine but now it stuffs up major, I was wondering if anyone could point out any mistakes.

    SCAR Code:
    program New;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Mining.scar}
    {C:\Program Files\SCAR 3.15\includes\SRL\Logs.scar}

    Var
      x, y: integer;

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].Name := 'Username';
      Players[0].Pass := 'Password';
      Players[0].Nick := 'Nick';
      Players[0].Active := True;
    end;

    Procedure RunningFromFights;
    begin
    FindNormalRandoms;
    If (FindFight) then
    RunAway('N', True, 1, 5000);
    end;

    Procedure randomcompass;
    Begin
            Case Random(15) Of
            1: makecompass('E');
            2: makecompass('W');
            3: makecompass('N');
            4: makecompass('S');
            5: setangle(true);
        End;
    End;

    Procedure FindRandoms;
    Begin
        If Not (LoggedIn) Or Not (Players[CurrentPlayer].Active) Then
            NextPlayer(false);
        FindNormalRandoms;
        wait(400)
            Findtalk;
        RunningFromFights;
        FindLamp('Mining');
    End;

    procedure AntiBan;
    begin
      case random(30) of
        0: RandomRClick;
        1: BoredHuman;
        2: HoverSkill('Mining', False);
          end;
    end;

    begin
      SetupSRL;
      DeclarePlayers;
      wait(200+random(100))
      Repeat
        Mousespeed := 15
        DropAll;
        Repeat
          LoadRockRecords;
          FindObjRock(x, y, Rimmington_Iron);
          ClickMouse(x, y, True);
          FindRandoms;
          AntiBan;
          randomcompass;
          Wait(3000+random(2000));
        Until (InvFull= True);
       until false
    end.

    Thanks.

  2. #2
    Join Date
    Feb 2007
    Posts
    211
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    First off there is several lines where you should have a ; but don't this more for neatness of the script then anything, along with some things like,

    SCAR Code:
    Until (InvFull= True);

    InvFull is a function that returns a boolean, true if the inv is full, and false if its not. So there is no reason to have = True.

    SCAR Code:
    Until (InvFull);

    Also I strongly recommend using Mouse(x, y, xrand, yrand, LClick); over ClickMouse, so you could do something like

    SCAR Code:
    Mouse(x, y, 5, 5, True);

    You also should try making your own functions to find the ore

    Another random thing you have a procedure specially for running away from fights, you could just include that with your find randoms

    SCAR Code:
    Procedure FindRandoms;
    Begin
        If Not (LoggedIn) Or Not (Players[CurrentPlayer].Active) Then
            NextPlayer(false);
        FindNormalRandoms;
        wait(400)
            Findtalk;
        If (FindFight) then
          RunAway('N', True, 1, 5000);
        FindLamp('Mining');
    End;
    Current Project: Catching up on what I missed, re-writing some old includes I done in the past.
    Upcoming Project: Open For Suggestions

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. What Am I doing wrong with script?
    By mrpickle in forum OSR Help
    Replies: 6
    Last Post: 08-17-2008, 04:44 PM
  2. What's wrong with this script.
    By igotgrapes in forum OSR Help
    Replies: 4
    Last Post: 04-06-2008, 12:44 AM
  3. Replies: 3
    Last Post: 01-20-2008, 05:29 PM
  4. What's wrong with my script?
    By Zeta in forum OSR Help
    Replies: 2
    Last Post: 08-01-2007, 08:19 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
  •