Results 1 to 8 of 8

Thread: Need help getting my script to compile. Again. :(

  1. #1
    Join Date
    Jan 2007
    Posts
    580
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Need help getting my script to compile. Again. :(

    SCAR Code:
    program CutNSell;
    {.include srl/srl.scar}
    {.include srl/srl/skill/woodcutting.scar}

    //////////////////////////////////////////
    // By Jahuro//////////////////////////////
    // Cuts and sells logs in lumbridge.//////
    // V1.0///////////////////////////////////
    //////////////////////////////////////////

    //////////////////////////////////////////////
    /////////////////{SETUP}//////////////////////
    //////////////////////////////////////////////
    Const                                       //
    Color = 2132088;                            //
    TreeTime = 2000; {Time it takes to cut Oak} //
    ShopKeep = 0; {Colour of shop keeper}       //
    //////////////////////////////////////////////
    procedure DeclarePlayers;                   //
    begin                                       //
      HowManyPlayers := 1;                      //
      NumberOfPlayers(HowManyPlayers);          //
      CurrentPlayer:= 0;                        //
                                                //
      Players[0].Name :='';                     //
      Players[0].Pass :='';                     //
      Players[0].Nick :='';                     //
      Players[0].Active:=True;                  //
    end;                                        //
    //////////////////////////////////////////////
    //////////////////////////////////////////////
    var x,y,OakLogs,WoodLoads,i: Integer;

    Function FindFastRandoms:Boolean;
    begin
      for i := 1 to 16 do
      begin
        case I of
          1: CloseWindow;
          2: if FindTalk then
              Result := True;
          3: if FindDead then
              Result := True;
          4: if FindMod then
              Result := True;
          5: if FindMime then
              Result := True;
          6: if FindMaze then
              Result := True;
          7: if FindQuiz then
              Result := True;
          8: if FindDemon then
              Result := True;
          9: if FindScapeRune then
              Result := True;
          10: if FindTalk then
              Result := True;
          11: if FindLamp(LampSkill) then
              Result := True;
          12: if (FindNewBox) then
            begin
              Result := True;
              if (UseBoxSolver) then
                SolveBox
              else
                GambleNewBox;
            end;

          14:
            begin
              if NoGameTab then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'No GameTab';
                Logout;
                Exit;
              end;
            end;
            16: if RC then
              Result := True;
        end;
        Wait(1);
      end;
    end;
    ////////////////////////////////////////////
    procedure DeclareBMPS;
    begin
    := BitmapFromString(14, 9, 'z78DAB5914B6E04210C44AFE4BFCD9' +
           '2A69BFB1F69CC2709A351945558942C300F53552D4CEF00108168' +
           '760B6E250B7EC2A7AEFA3CFD543185BDEA64126719851D850A581' +
           '70AB00A43EF7C0B0C05D6FE6F9A3DF0CEAC1CA2CD7BD2EFA2CE22' +
           '9B7FBCF2273380163324AB1B1004DA1B6DCCB6FBD398D92B0A948' +
           'D0EA33D66FD0C359CA7F835A777432E81CAD94C03BAD44873CB7A' +
           '2A3928E57ED1C6EE4D1F76C0792B3DE4B63DAF56B99FCC9110A15' +
           'FA905DC80E34DF39487ABC4D7F02D39F4C389C85FEFA416531F51' +
           'C24AC3CF9A69EB9533F77475FE7D67BA6E2DC20767EB4C732DA13' +
           '161CD29927926B5982BF7937C10967E278542F06FEB0523C99DCC' +
           '');
    end;
    ////////////////////////////////////////////
    ////////////////////////////////////////////
    Procedure TheAntiBan;

    begin

    RotateEvery(1+random(4));
    RandomChatEvery(2+random(4));
    RandomRClickEvery(3+random(4));
    LeaveScreenEvery(1+random(4));
    AntiBan;

    end;
    ////////////////////////////////////////////
    ////////////////////////////////////////////
    procedure Report;
    begin
      Writeln('[]-------------------------------------------[]');
      Writeln('[]------------JAHURO WOOD WHACKER------------[]');
      Writeln('Worked For : '+ScriptTime2(2));
      Writeln('Cut-N-Sold '+ IntToStr(WoodLoads) + ' Loads');
      Writeln('[]-------------------------------------------[]');
    end;
    ////////////////////////////////////////////
    ////////////////////////////////////////////

    procedure ClickTree;

        begin

        repeat

        if(FindColor(x,y,color,0,0,400,500))then
        MMouse(x,y,0,0);
        wait(100+random(50));

        If(IsUpText('Oak'))then
        Mouse(x,y,0,0,true);

        Report;
        FindFastRandoms;
        wait(TreeTime+random(50));
        TheAntiban;

        until(InvFull);

        end;
    //////////////////////////////////////////
    //////////////////////////////////////////
    procedure Shopwalk;
    begin
    if(FindSymbol(x, y, "shop")) then
    begin

      repeat
        Wait(50+random(100))
      until(FindSymbol(x, y, Shop))

      Mouse(x, y, 5, 5, true)
      Flag;
      Result:=True;

    end;

    end;
    /////////////////////////////////////////
    /////////////////////////////////////////
    procedure Sell;
    begin

    procedure Sell;
    begin
      if(FindColor(x,y,ShopKeep,0,0,400,500))then
          MMouse(x,y,0,0);
          wait(100+random(50));
          If(IsUpText('hop K'))then
            begin
              Mouse(x,y,0,0,false);
              wait(100+random(50));
              ChooseOption(x,y,'rade');
              Wait(300+random(150));
              If(FindBitmap(OakLogs,x,y))then
                begin
                  Mouse(x,y,0,0,False);
                  Wait(100+random(5));
                  ChooseOption('ell 10');
                end;
            end;
    end;
    begin
    RadialWalk( 612139 , 297, 585, 48, {Xmod}, {Ymod});
    end;

    end;
    ////////////////////////////////////////
    ////////////////////////////////////////

    begin
         setupsrl;
         DeclarePlayers;
         DeclareBMPS;
         LoginPlayer;
         Report;
         SRLRandomsReport;
         TheAntiBan;

    repeat
    ClickTree;
    Report;
    shopwalk;
    Sell;
    Report;
    SRLRandomsReport;
    MakeCompass ('N');
    until false;
     
    end.
    ///////////////////////////////////////

    Thanks for all you support, people of srl.
    I like cats.
    Narcle's AK Smelter 1.1.6
    Run Time : 7 Hr 53 Min 5 Sec
    Total Bars : 3371
    Total XP : 58995

  2. #2
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wow dude. that was amazing. I got atleast 15 errors when trying to do that.. I'm just going to post working version and it would take me a half hour to tell you what lines I fixed. just look at every line and check if there was a change (I changed something on about every 10 lines at least..)

    SCAR Code:
    program CutNSell;
    {.include srl/srl.scar}
    {.include srl/srl/skill/woodcutting.scar}

    //////////////////////////////////////////
    // By Jahuro//////////////////////////////
    // Cuts and sells logs in lumbridge.//////
    // V1.0///////////////////////////////////
    //////////////////////////////////////////

    //////////////////////////////////////////////
    /////////////////{SETUP}//////////////////////
    //////////////////////////////////////////////
    Const                                       //
    Color = 2132088;                            //
    TreeTime = 2000; {Time it takes to cut Oak} //
    ShopKeep = 0; {Colour of shop keeper}       //
    //////////////////////////////////////////////
    procedure DeclarePlayers;                   //
    begin                                       //
      HowManyPlayers := 1;                      //
      NumberOfPlayers(HowManyPlayers);          //
      CurrentPlayer:= 0;                        //
                                                //
      Players[0].Name :='';                     //
      Players[0].Pass :='';                     //
      Players[0].Nick :='';                     //
      Players[0].Active:=True;                  //
    end;                                        //
    //////////////////////////////////////////////
    //////////////////////////////////////////////
    var OakLogs,WoodLoads,i: Integer;

    Function FindFastRandoms:Boolean;
    begin
      for i := 1 to 16 do
      begin
        case I of
          1: CloseWindow;
          2: if FindTalk then
              Result := True;
          3: if FindDead then
              Result := True;
          4: if FindMod then
              Result := True;
          5: if FindMime then
              Result := True;
          6: if FindMaze then
              Result := True;
          7: if FindQuiz then
              Result := True;
          8: if FindDemon then
              Result := True;
          9: if FindScapeRune then
              Result := True;
          10: if FindTalk then
              Result := True;
          11: if FindLamp(LampSkill) then
              Result := True;
          12: if (FindNewBox) then
            begin
              Result := True;
              if (UseBoxSolver) then
                SolveBox
              else
                GambleNewBox;
            end;

          14:
            begin
              if NoGameTab then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'No GameTab';
                Logout;
                Exit;
              end;
            end;
            16: if RC then
              Result := True;
        end;
        Wait(1);
      end;
    end;
    ////////////////////////////////////////////
    var WhatEver: Integer;
    procedure DeclareBMPS;
    begin
    Whatever:= BitmapFromString(14, 9, 'z78DAB5914B6E04210C44AFE4BFCD9' +
           '2A69BFB1F69CC2709A351945558942C300F53552D4CEF00108168' +
           '760B6E250B7EC2A7AEFA3CFD543185BDEA64126719851D850A581' +
           '70AB00A43EF7C0B0C05D6FE6F9A3DF0CEAC1CA2CD7BD2EFA2CE22' +
           '9B7FBCF2273380163324AB1B1004DA1B6DCCB6FBD398D92B0A948' +
           'D0EA33D66FD0C359CA7F835A777432E81CAD94C03BAD44873CB7A' +
           '2A3928E57ED1C6EE4D1F76C0792B3DE4B63DAF56B99FCC9110A15' +
           'FA905DC80E34DF39487ABC4D7F02D39F4C389C85FEFA416531F51' +
           'C24AC3CF9A69EB9533F77475FE7D67BA6E2DC20767EB4C732DA13' +
           '161CD29927926B5982BF7937C10967E278542F06FEB0523C99DCC' +
           '');
    end;
    ////////////////////////////////////////////
    ////////////////////////////////////////////
    Procedure TheAntiBan;

    begin

    RotateEvery(1+random(4));
    RandomChatEvery(2+random(4));
    RandomRClickEvery(3+random(4));
    LeaveScreenEvery(1+random(4));
    AntiBan;

    end;
    ////////////////////////////////////////////
    ////////////////////////////////////////////
    procedure Report;
    begin
      Writeln('[]-------------------------------------------[]');
      Writeln('[]------------JAHURO WOOD WHACKER------------[]');
      Writeln('Worked For : '+ScriptTime2(2));
      Writeln('Cut-N-Sold '+ IntToStr(WoodLoads) + ' Loads');
      Writeln('[]-------------------------------------------[]');
    end;
    ////////////////////////////////////////////
    ////////////////////////////////////////////

    procedure ClickTree;

        begin

        repeat

        if(FindColor(x,y,color,0,0,400,500))then
        MMouse(x,y,0,0);
        wait(100+random(50));

        If(IsUpText('Oak'))then
        Mouse(x,y,0,0,true);

        Report;
        FindFastRandoms;
        wait(TreeTime+random(50));
        TheAntiban;

        until(InvFull);

        end;
    //////////////////////////////////////////
    //////////////////////////////////////////
    function Shopwalk: Boolean;
    begin
    if(FindSymbol(x, y, 'shop')) then
    begin

      repeat
        Wait(50+random(100))
      until(FindSymbol(x, y, 'Shop'))

      Mouse(x, y, 5, 5, true)
      Flag;
      Result:=True;

    end;

    end;
    /////////////////////////////////////////
    /////////////////////////////////////////
    procedure Sell;
    begin
      if(FindColor(x,y,ShopKeep,0,0,400,500))then
      begin
          MMouse(x,y,0,0);
          wait(100+random(50));
          If(IsUpText('hop K'))then
            begin
              Mouse(x,y,0,0,false);
              wait(100+random(50));
              ChooseOption(x,y,'rade');
              Wait(300+random(150));
              If(FindBitmap(OakLogs,x,y))then
                begin
                  Mouse(x,y,0,0,False);
                  Wait(100+random(5));
                  ChooseOption(x,y,'ell 10');
                end;
            end;
    end;
    RadialWalk( 612139 , 297, 585, 48, 2, 2);
    end;
    ////////////////////////////////////////
    ////////////////////////////////////////

    begin
         setupsrl;
         DeclarePlayers;
         DeclareBMPS;
         LoginPlayer;
         Report;
         SRLRandomsReport;
         TheAntiBan;

    repeat
    ClickTree;
    Report;
    shopwalk;
    Sell;
    Report;
    SRLRandomsReport;
    MakeCompass ('N');
    until false;

    end.
    ///////////////////////////////////////
    No offense, not trying to be harsh, but for RadialWalk, you had (xmod),(ymod) and things like that. don't just copy what people tell you to do without understanding it.. read some tutorials or check out the SRL wiki

  3. #3
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    ok here is fixed code...there were a lot of issues...too many to name...but heres an important 1...sicne variable x and y are used in srl you cant declaire in var at begining of script you need to delaire it everytime in each procedure is your useing it..look how i did it too see...and look at the differences between the 2 to learn some stuff

    edite: JAD you beat me!!

    SCAR Code:
    program CutNSell;
    {.include srl/srl.scar}
    {.include srl/srl/skill/woodcutting.scar}

    //////////////////////////////////////////
    // By Jahuro//////////////////////////////
    // Cuts and sells logs in lumbridge.//////
    // V1.0///////////////////////////////////
    //////////////////////////////////////////

    //////////////////////////////////////////////
    /////////////////{SETUP}//////////////////////
    //////////////////////////////////////////////
    Const                                       //
    Color = 2132088;                            //
    TreeTime = 2000; {Time it takes to cut Oak} //
    ShopKeep = 0; {Colour of shop keeper}       //
    //////////////////////////////////////////////
    procedure DeclarePlayers;                   //
    begin                                       //
      HowManyPlayers := 1;                      //
      NumberOfPlayers(HowManyPlayers);          //
      CurrentPlayer:= 0;                        //
                                                //
      Players[0].Name :='';                     //
      Players[0].Pass :='';                     //
      Players[0].Nick :='';                     //
      Players[0].Active:=True;                  //
    end;                                        //
    //////////////////////////////////////////////
    //////////////////////////////////////////////
    var OakLogs,WoodLoads,i: Integer;


    Function FindFastRandoms:Boolean;
    begin
      for i := 1 to 16 do
      begin
        case I of
          1: CloseWindow;
          2: if FindTalk then
              Result := True;
          3: if FindDead then
              Result := True;
          4: if FindMod then
              Result := True;
          5: if FindMime then
              Result := True;
          6: if FindMaze then
              Result := True;
          7: if FindQuiz then
              Result := True;
          8: if FindDemon then
              Result := True;
          9: if FindScapeRune then
              Result := True;
          10: if FindTalk then
              Result := True;
          11: if FindLamp(LampSkill) then
              Result := True;
          12: if (FindNewBox) then
            begin
              Result := True;
              if (UseBoxSolver) then
                SolveBox
              else
                GambleNewBox;
            end;

          14:
            begin
              if NoGameTab then
              begin
                Result := True;
                Players[CurrentPlayer].loc := 'No GameTab';
                Logout;
                Exit;
              end;
            end;
            16: if RC then
              Result := True;
        end;
        Wait(1);
      end;
    end;
    ////////////////////////////////////////////
    procedure DeclareBMPS;
    begin
    OakLogs:= BitmapFromString(14, 9, 'z78DAB5914B6E04210C44AFE4BFCD9' +
           '2A69BFB1F69CC2709A351945558942C300F53552D4CEF00108168' +
           '760B6E250B7EC2A7AEFA3CFD543185BDEA64126719851D850A581' +
           '70AB00A43EF7C0B0C05D6FE6F9A3DF0CEAC1CA2CD7BD2EFA2CE22' +
           '9B7FBCF2273380163324AB1B1004DA1B6DCCB6FBD398D92B0A948' +
           'D0EA33D66FD0C359CA7F835A777432E81CAD94C03BAD44873CB7A' +
           '2A3928E57ED1C6EE4D1F76C0792B3DE4B63DAF56B99FCC9110A15' +
           'FA905DC80E34DF39487ABC4D7F02D39F4C389C85FEFA416531F51' +
           'C24AC3CF9A69EB9533F77475FE7D67BA6E2DC20767EB4C732DA13' +
           '161CD29927926B5982BF7937C10967E278542F06FEB0523C99DCC' +
           '');
    end;
    ////////////////////////////////////////////
    ////////////////////////////////////////////
    Procedure TheAntiBan;

    begin

    RotateEvery(1+random(4));
    RandomChatEvery(2+random(4));
    RandomRClickEvery(3+random(4));
    LeaveScreenEvery(1+random(4));
    AntiBan;

    end;
    ////////////////////////////////////////////
    ////////////////////////////////////////////
    procedure Report;
    begin
      Writeln('[]-------------------------------------------[]');
      Writeln('[]------------JAHURO WOOD WHACKER------------[]');
      Writeln('Worked For : '+ScriptTime2(2));
      Writeln('Cut-N-Sold '+ IntToStr(WoodLoads) + ' Loads');
      Writeln('[]-------------------------------------------[]');
    end;
    ////////////////////////////////////////////
    ////////////////////////////////////////////

    procedure ClickTree;
    var x,y :integer;
        begin

        repeat

        if(FindColor(x,y,color,0,0,400,500))then
        MMouse(x,y,0,0);
        wait(100+random(50));

        If(IsUpText('Oak'))then
        Mouse(x,y,0,0,true);

        Report;
        FindFastRandoms;
        wait(TreeTime+random(50));
        TheAntiban;

        until(InvFull);

        end;
    //////////////////////////////////////////
    //////////////////////////////////////////
    procedure Shopwalk;
    var x,y :integer;
    begin
      if(FindSymbol(x, y, 'shop')) then
        begin

      repeat
        Wait(50+random(100))
      until(FindSymbol(x, y, 'Shop'))

      Mouse(x, y, 5, 5, true)
      Flag;


    end;

    end;
    /////////////////////////////////////////
    /////////////////////////////////////////
    procedure Sell;
    var x,y :integer;
    begin
      if(FindColor(x,y,ShopKeep,0,0,400,500))then
          MMouse(x,y,0,0);
          wait(100+random(50));
          If(IsUpText('hop K'))then
            begin
              Mouse(x,y,0,0,false);
              wait(100+random(50));
              ChooseOption(x,y,'rade');
              Wait(300+random(150));
              If(FindBitmap(OakLogs,x,y))then
                begin
                  Mouse(x,y,0,0,False);
                  Wait(100+random(5));
                  ChooseOption(x,y,'ell 10');
                end;
            end;
      RadialWalk( 612139 , 297, 585, 48, 1, 1);
    end;

    ////////////////////////////////////////
    ////////////////////////////////////////

    begin
         setupsrl;
         DeclarePlayers;
         DeclareBMPS;
         LoginPlayer;
         Report;
         SRLRandomsReport;
         TheAntiBan;

    repeat
    ClickTree;
    Report;
    shopwalk;
    Sell;
    Report;
    SRLRandomsReport;
    MakeCompass ('N');
    until false;

    end.
    ///////////////////////////////////////
    STOP PM'ING ME

  4. #4
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh, Hobit! lol beat you to it by less then a minute.

  5. #5
    Join Date
    Jan 2007
    Posts
    580
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by JAD View Post
    Wow dude. that was amazing.
    Do you mean that in a good or bad way ?
    Btw thanks
    I like cats.
    Narcle's AK Smelter 1.1.6
    Run Time : 7 Hr 53 Min 5 Sec
    Total Bars : 3371
    Total XP : 58995

  6. #6
    Join Date
    Jan 2007
    Posts
    580
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    And also do you think it was a good atempt for my second script?
    I like cats.
    Narcle's AK Smelter 1.1.6
    Run Time : 7 Hr 53 Min 5 Sec
    Total Bars : 3371
    Total XP : 58995

  7. #7
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah, good attempt. sorry to say it badly like that, you just have like 17 errors lol. good attempt, just learn what things mean before using them in your script was the message I was trying to get across.

  8. #8
    Join Date
    Jan 2007
    Posts
    580
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks.
    I like cats.
    Narcle's AK Smelter 1.1.6
    Run Time : 7 Hr 53 Min 5 Sec
    Total Bars : 3371
    Total XP : 58995

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. First script, won't compile
    By igotgrapes in forum OSR Help
    Replies: 18
    Last Post: 04-12-2008, 07:29 PM
  2. Script wont compile. again. :(
    By Johura in forum OSR Help
    Replies: 2
    Last Post: 04-02-2007, 12:20 PM
  3. Need help getting my script to compile
    By Johura in forum OSR Help
    Replies: 5
    Last Post: 03-30-2007, 10:25 AM

Posting Permissions

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