Results 1 to 9 of 9

Thread: is it a glitch in scar?

  1. #1
    Join Date
    Jun 2008
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default is it a glitch in scar?

    im still in the process of perfecting my first script, but when i try to check if it compiles, it asks for a "begin" where "program" is

    SCAR Code:
    {-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-)
    ( ---------------I'm new to SRL, and hopefully, this--------------- )
    ( ----------------will be my first functional script--------------- )
    (-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-)
    ( ------ v1: Features: Chicken finder------------------------------ )
    ( ---------------------Feather picker------------------------------ )
    (-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-)
    ( Lines of Setup: 20-24,28-45-------------------------------------- )
    (-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-}


    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Fighting.scar}
    program FeatherFarmer;

    var
     i,x,y,k,f
     FeatherDTM, feathertext, chickencolor1, chickencolor2,
     chickencolor3, chickenkills, antibans: integer

    const MySRLID             = '';
    const MySRLPassword       = '';
    const chickencolor1       = ''; //crest
    const chickencolor2       = ''; //dark shadow
    const chickencolor3       = ''; //another dark shadow


    Procedure AntiRandoms;
    Begin
      Status('Doing AntiRandoms');
      for i:=0 to 3 do
      begin
        FindNormalRandoms;
        Wait(30+random(50));
      end;
    end;


    procedure Antiban;
    begin
      if not LoggedIn then Exit;
      case Random(68) of
        0:
          begin
            HoverSkill('Hitpoints', False);
            Antibans:=Antibans+1;
          end;
        1:
          begin
            HoverSkill('Defence', false);
            Antibans:=Antibans+1;
          end;
        2:
          begin
            GameTab(1 + Random(12));
            wait(800 + random(500));
            GameTab(4);
            Antibans:=Antibans+1;
          end;
        3:
          begin
            BoredHuman;
            Antibans:=Antibans+1;
          end;
    end;


    Procedure LoadDTM;
    begin

      FeatherDTM := DTMFromString('78DA630C60606030634001AC1A6C609A11CA6' +
           '70C0412A6A86AB6AE5A89AAC60753CDCEF5EB50D5780209735435' +
           '270F1D4455E30B242C08A809C4547374EF5E5435C184FD0500665' +
           '30F0E');
    end;

    procedure findfeather;
    begin
    if (FindDTM(FeatherDTM: x, y, MSX1, MSY1, MSX2, MSY2)then
      begin
      wait(800 + random(600));
      Mouse(x, y, 2, 2, True);
      break
      end else
      f:=f+1
    end

    procedure chickenfight;
    begin
    if NotLoggedIn then exit
     case Random(3) of

      1:
        Begin
         if FindColorSpiralTolerance(x, y, chickencolor1, MSX1, MSY1, MSX2, MSY2, 15) then
      Mouse(x, y, 2, 2, True);
        end else
        writeln('cannot find chicken...attempting again');
        k:= k + 1
        if k > 10 then writeln('chickens out of range...stopping script');
        exit else
        chickenfight;
        end;


      2:
        Begin
         if FindColorSpiralTolerance(x, y, chickencolor2, MSX1, MSY1, MSX2, MSY2, 15) then
      Mouse(x, y, 2, 2, True);
        end else
        writeln('cannot find chicken...attempting again');
        k:= k + 1
        if k > 10 then writeln('chickens out of range...stopping script');
        exit else
        chickenfight;
        end;

      3:
        Begin
         if FindColorSpiralTolerance(x, y, chickencolor3, MSX1, MSY1, MSX2, MSY2, 15) then
      Mouse(x, y, 2, 2, True);
        end else
        writeln('cannot find chicken...attempting again');
        k:= k + 1
        if k > 10 then writeln('chickens out of range...stopping script');
        exit else
        chickenfight;
        end;


    wait(9999 + 1 + random(5000));

    repeat
    findfeather;
    if f > 5 then break
    until(false)

    chickenkills:= chickenkills + 1

    end;


    procedure Proggy;
    begin
      cleardebug;
      writeln('+++++++++++++++++++++++++++++++++++++');
      writeln('Killed ' +IntToStr(chickenkills)+' Chickens!');
      writeln('Performed ' +IntToStr(Antibans)+ ' Antibans');
      writeln('Ran for '  +TimeRunning);
      writeln('+++++++++++++++++++++++++++++++++++++');
    end;

    procedure SRLStats;
    begin
      SRLID         := MySRLID;
      SRLPassword   := MySRLPassword;
    end;



    begin
    SetupSRL
    SRLStats;
    repeat
    AntiRandoms;
    Antiban;
    LoadBitmap;
    ColorPicker;
    k:=0
    f:=0
    chickenfight;
    FreeDTM(FeatherDTM);
    until(TimeRunning:=60)
    Proggy;
    end.

  2. #2
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Post your script so I can look at it.

  3. #3
    Join Date
    Mar 2008
    Posts
    1,492
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    put begin under program...

  4. #4
    Join Date
    Dec 2007
    Location
    Colombia. Bogotá D.C
    Posts
    720
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)
    Quote Originally Posted by sirlaughsalot View Post
    put begin under program...
    Thats the answer..., maybe it says you are missing a begin, and the cursor stops at program, but it doesnt mean the error is there, you need to add begin below it , maybe you are missing a begin in some Function/Procedure, or Mainloop...

    Spongebob is stupidly funny
    -------------------------------------------------------------------


  5. #5
    Join Date
    Jun 2007
    Location
    Liverpool ,Nsw,Australia
    Posts
    740
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Is your set up like this?

    SCAR Code:
    Program Whatever;
    {.include srl/srl.scar}

    Begin Procedure;
    Do Stuff;
    End





    Begin
    //MainLoop here
    End
    Quote Originally Posted by Darkmage View Post
    I got 2 questions'
    #1. When i run the script will it automatically pick up the mouse and move?

  6. #6
    Join Date
    Jun 2008
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Dracody View Post
    Thats the answer..., maybe it says you are missing a begin, and the cursor stops at program, but it doesnt mean the error is there, you need to add begin below it , maybe you are missing a begin in some Function/Procedure, or Mainloop...

    Spongebob is stupidly funny
    i tried what he said before, and it says "error at line 13"

  7. #7
    Join Date
    Oct 2006
    Location
    finland, helsinki
    Posts
    2,501
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    SCAR Code:
    {-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-)
    ( ---------------I'm new to SRL, and hopefully, this--------------- )
    ( ----------------will be my first functional script--------------- )
    (-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-)
    ( ------ v1: Features: Chicken finder------------------------------ )
    ( ---------------------Feather picker------------------------------ )
    (-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-)
    ( Lines of Setup: 20-24,28-45-------------------------------------- )
    (-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-}

    program FeatherFarmer;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/Fighting.scar}

    var
     x, y, f, FeatherDTM, chickenkills, antibans: integer;

    const
      MySRLID             = '';
      MySRLPassword       = '';
      chickencolor1       = 0; //crest
      chickencolor2       = 0; //dark shadow
      chickencolor3       = 0; //another dark shadow

    Procedure DeclarePlayers;
    Begin

         HowManyPlayers:= 1;
         CurrentPlayer:= 0;
         NumberOfPlayers(HowManyPlayers);

      Players[0].Name  := '';
      Players[0].Pass  := '';
      Players[0].Nick  := '';
      Players[0].Active:= True;

      Writeln('Starting '+IntToStr(CurrentPlayer)+'/' + IntToStr(HowManyPlayers-1) + '');
    End;

    Procedure AntiRandoms;
    Begin
      Status('Doing AntiRandoms');
      FindNormalRandoms;
    end;

    procedure Antiban;
    begin
      if not LoggedIn then Exit;
      case Random(68) of
        0:
          begin
            HoverSkill('Hitpoints', False);
            Antibans:=Antibans+1;
          end;
        1:
          begin
            HoverSkill('Defence', false);
            Antibans:=Antibans+1;
          end;
        2:
          begin
            GameTab(1 + Random(12));
            wait(800 + random(500));
            GameTab(4);
            Antibans:=Antibans+1;
          end;
        3:
          begin
            BoredHuman;
            Antibans:=Antibans+1;
          end;
      end;
    end;


    Procedure LoadDTM;
    begin
      FeatherDTM := DTMFromString('78DA630C60606030634001AC1A6C609A11CA6' +
           '70C0412A6A86AB6AE5A89AAC60753CDCEF5EB50D5780209735435' +
           '270F1D4455E30B242C08A809C4547374EF5E5435C184FD0500665' +
           '30F0E');
    end;

    procedure findfeather;
    begin
      if (FindDTM(FeatherDTM, x, y, MSX1, MSY1, MSX2, MSY2))then
      begin
        wait(800 + random(600));
        Mouse(x, y, 2, 2, True);
      end else
        f:=f+1
    end;

    procedure chickenfight;
    Var
      I, X, Y: Integer;
      arChickenColor: TIntegerArray;
    begin
      if Not LoggedIn then exit;

      arChickenColor := [ChickenColor1, ChickenColor2, ChickenColor3];

      For I:= 0 To 2 Do
        If(FindObjTPA(X, Y, arChickenColor[0], 5, 2, 20, 20, 5, ['tack', 'hick']))Then
        Begin
          Mouse(X, Y, 0, 0, True);
          FFlag(0);
        End;

      wait(10000 + random(5000));
      f := 0;

      repeat
        findfeather;
        FTWait(1);
        if f > 5 then
          break;
      until(not loggedin);

      chickenkills:= chickenkills + 1

    end;

    procedure Proggy;
    begin
      cleardebug;
      writeln('+++++++++++++++++++++++++++++++++++++');
      writeln('Killed ' +IntToStr(chickenkills)+' Chickens!');
      writeln('Performed ' +IntToStr(Antibans)+ ' Antibans');
      writeln('Ran for '  +TimeRunning);
      writeln('+++++++++++++++++++++++++++++++++++++');
    end;

    begin
      SetupSRL;
      DeclarePlayers;
      SRLID         := MySRLID;
      SRLPassword   := MySRLPassword;
      LoadDTM;
      LoginPlayer;
      repeat
        AntiRandoms;
        Antiban;
        chickenfight;
      until(GetTimeRunning / 1000 / 60 >= 60)Or(Not LoggedIn);
      Logout;
      Proggy;
      FreeDTM(FeatherDTM);
    end.

    there i even fixed alot of bugs etc. added a better chicken finder etc...

    Code:
    • Narcle: I recall Jukka releasing a bunch of scripts like this before... Its how he rolls I think. rofl
    • Solarwind: Dude, you are like... t3h s3x.
    • Hy71194: JuKKa you're a machine! You released 3 scripts in 10 minutes! :O
    • benjaa: woah.... Jukka is the man Guildminer pwns all
    • NaumanAkhlaQ: And JuKKa Is my Her0!

  8. #8
    Join Date
    Apr 2008
    Location
    Northwest england
    Posts
    1,179
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    no comma after the f varbiable

    jukka dont do the work for people i think you should show them whats wrong give an example of how to fix and let them fix
    if you just fix it they may not be sure why =]
    Blank!

  9. #9
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    LOL, good point Waddo. Thats the only way to learn. Now he has to credit you lol.
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Possible glitch?
    By Runescapian321 in forum SRL Site Discussion
    Replies: 18
    Last Post: 04-19-2008, 09:20 PM
  2. Glitch? Wtf?
    By Ultra in forum RuneScape News and General
    Replies: 6
    Last Post: 03-02-2008, 12:29 AM
  3. SRL-ID Glitch...
    By yanix in forum News and General
    Replies: 12
    Last Post: 12-14-2007, 05:28 PM
  4. SCAR Glitch
    By addy771 in forum News and General
    Replies: 4
    Last Post: 04-24-2007, 09: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
  •