Results 1 to 4 of 4

Thread: it compiles but does nothing my script not working

  1. #1
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default it compiles but does nothing my script not working

    it compiles i putted some messages in the script he said he did things
    he wil write in the debug did walk to chickens but he didnt do it dont know why but he didnt do it
    SCAR Code:
    program LumbyAllInOne;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/skill/woodcutting.scar}
    {.include SRL/SRL/skill/cooking.scar}
    {.include SRL/SRL/skill/fighting.scar}

    var
    hometeleport, canthometeleport, SST2, lx, ly, x, HowWeClick, SST1,  FindFastRandomsTime, FindNorMalRandomsTime, y:integer;
    ky, kx:integer;
    const
     Location = 'other'; //You can use Chicken Pen, Lumbridge, or Other.
     Skill = 'attack';//skill you want to train
    {=====================================================================================]
                DONT TOUCH THIS BELOW IF YOU DONT KNOW WHAT YOUR DOING!
    [=====================================================================================}


    Function FindFastRandoms: Boolean;
    var
      i: Integer;
    begin
      for i:=1 to 9 do
      begin
        case I of
         1:  If FindDead then
               Result := True;
         2:  If FindMod then
               Result := True;
         3:  If FindMime then
               Result := True;
         4:  If FindMaze then
               Result := True;
         5:  If FindQuiz then
               Result := True;
         6:  If FindDemon then
               Result := True;
         7: begin
               if NoGameTab then
               begin
                 Result := True;
                 Players[CurrentPlayer].loc := 'No GameTab';
                 Logout;
                 Exit;
               end;
             end;
         8: begin
               if InBlack then
               begin
                 Result := True;
                 Players[CurrentPlayer].loc := 'InBlack';
                 Logout;
                 Exit;
               end;
             end;
         9: begin
               if FindFight then
               begin
                 RunTo('N',False);
               end;
             end;
        end;

      end;
    end;


    //credits to WT-FAWAKI-----------------------------------------//
    // -- Performs Wait and FindTalk. + calls FindNormalRandoms every 10 secs and
    // -- FindFastRandoms every 3 secs.
    //----------------------------------------------------------------------------//

    Procedure WaitPlus(Time:Integer);
    var T: integer;
      begin
        For T := 1 to Time do
        begin
          if not LoggedIn then exit;
          Wait(200 + Random(50));
          FindTalk;
          RC;
        end;

        FindTalk;
        MarkTime(FindNorMalRandomsTime);
        if FindNorMalRandomsTime - SST1 >(10000 + Random(5000)) then
          begin
            FindNorMalRandoms;
            MarkTime(SST1);
          end;

        MarkTime(FindFastRandomsTime);
        if FindFastRandomsTime - SST2 >(1500 + Random(1500)) then
          begin
            FindFastRandoms;
            MarkTime(SST2);
          end;
    end;

    procedure antiban;
    begin
      Case Random(10) Of
        1 : HoverSkill('defense', False);
        2 : HoverSkill('strenght', False);
        3 : begin
             GameTab(1+Random(12));
             Wait(2000+Random(400));
             GameTab(4);
            end;
        4 : RandomRClick;
        5 : PickUpMouse;
        6 : HoverSkill('attack', False);
        7 : almostlogout;
        8 : begin
            gametab(9);
            gametab(5);
            gametab(1);
            gametab(2);
            end;
        9 :begin
           mmouse(x,y,333,273);
           end;



      end;
    end;


    procedure loadbitmaps;
     begin
      hometeleport := BitmapFromString2(False, 'a84B1878DA8D8E510A0' +
           '3210C44AF944493D84F75F5FE47EA8E5B4C410A55181EE14D9488' +
           '58E93ECCF94E6D6063014F4316A469D9AC23D8247C4B7D9B52D63' +
           '6ED7BCFC75C5DD7894C17260DCF7BCBC1D2839DC27FC936F94297' +
           '5AA5F5F739701F3E274953B6E1D5EB2C4FFED33ABBDFCE797FB5D' +
           'E870');
     canthometeleport := BitmapFromString2(False, 'a046E278DA8D534BB2C' +
           '42008BC129AC1CF524D72FF233D119FC12853E3A2CB6A5AC01601' +
           'C0A40F54F415C0C58BD05842E7882F8D07D260700FFAF044318C5' +
           '39D09B4C70F65C37C0D8D0D2D0F92086FCAE32CD73D08BDA9E8DB' +
           '299F49E92E3AE5F1263C4E62323E51DEDBF2ECDB2DBA3EDAA14C8' +
           '118B8295B5D25E714F1845C22BE983366C652A998383AF8AA67A5' +
           'E4A592F7AC3C6D31B1A8286AF56C73746498A2CCCBCE5BC55EF72' +
           '83619B57FCEC01A815DC34C28982C2388C5B7967797CC2FD1B55B' +
           'D9A15CD219CDBD8D7271E6E573D17B50DFC2E42BC1EA98F44D5B9' +
           'A27DA2C6D7D189A75327BFEEFAFBC3AB69BC3AD63EB544F28BA52' +
           '1D13CCD4A1E2A1F62BB5591A2FFE9A81D5B1C9B7F5B7CACE8503B' +
           'D8AE4FFBD85E8A60CED2EDF1DEB3D2C7F6133E7B2BA32757FD5D');
     end;

    Procedure casthometeleport;
     begin
      loadbitmaps;//loadsbitmaps
      gametab(7);
      wait(400+Random(600));
       If(FindBitmap(hometeleport, lx, ly)) Then
        Begin
        wait(100 + Random(150));
        Mouse(lx, ly, 5, 5, True);
        if (FindBitmap(canthometeleport, kx, ky)) then
        begin
        writeln('cant use home teleport logging out');
        logout;
        end
        else
        wait(15000);
        WriteLn('your in limbridge, have a nice day!');
      end
       else
        If Not(FindBitmap(HomeTelePort, lx, ly)) Then
         begin
          WriteLn('couldnt fin spell.');
       end;
    freebitmap(hometeleport);
    end;



    procedure WalkToTree;
    begin
      HighestAngle;
      MakeCompass('N');
      FindRoadColor;
      SetRun(true);

      RadialRoadWalk(RoadColor, 60, 65, 66, 0, 0);       //radialroadwalking
       fflag(10);
       WriteLn('to bridge');
      RadialRoadWalk(RoadColor, 300, 335, 75, 0, 0);
        WriteLn('to shop');
      RadialRoadWalk(RoadColor, 300, 335, 65, 0, 0);
        WriteLn('at shop');
      RadialWalk(1403451 , 260, 280, 70, 0, 0);     //radial walk
        WriteLn('at tree,s');
    end;



    procedure WalkToChickens;
    begin
      if Location='Other' then
        begin

         writeln('did walk to chickens')

          casthometeleport;//casts home teleport
          HighestAngle;     //standard stuff
          MakeCompass('N');
          FindRoadColor;
          SetRun(true);

          RadialRoadWalk(RoadColor, 60, 65, 66, 0, 0);//radialroadwalking
            WriteLn('to bridge');
          RadialRoadWalk(RoadColor, 80, 120, 63, 0, 0);
            WriteLn('passed the bridge');
          RadialRoadWalk(RoadColor, 30, 50, 66, 0, 5);
            WriteLn('almost next to goblin house');
          RadialRoadWalk(RoadColor, 360, 335, 65, 0, 0);
            WriteLn('passed goblin house');
          RadialRoadWalk(RoadColor, 332, 350, 71, 0, 1);
            WriteLn('next to cows');
          RadialRoadWalk(RoadColor, 315, 330, 72, 0, 0);
            WriteLn('next to cows');
          RadialRoadWalk(RoadColor, 337, 350, 65, 0, 1);
            WriteLn('in chickenpen');

        SetRun(false);
      end
    if Location='Lumbridge'then
      begin
          HighestAngle;    //standard stuff
          MakeCompass('N');
          FindRoadColor;
          SetRun(true);

          RadialRoadWalk(RoadColor, 60, 65, 66, 0, 0); //radialroadwalking
            WriteLn('to bridge');
          RadialRoadWalk(RoadColor, 80, 120, 63, 0, 0);
            WriteLn('passed the bridge');
          RadialRoadWalk(RoadColor, 30, 50, 66, 0, 5);
            WriteLn('almost next to goblin house');
          RadialRoadWalk(RoadColor, 360, 335, 65, 0, 0);
            WriteLn('passed goblin house')
          RadialRoadWalk(RoadColor, 332, 350, 71, 0, 1);
            WriteLn('next to cows');
          RadialRoadWalk(RoadColor, 315, 330, 72, 0, 0);
            WriteLn('next to cows');
          RadialRoadWalk(RoadColor, 337, 350, 65, 0, 1);
            WriteLn('in chickenpen');
            SetRun(false);
          end;
       If Location='Chicken Pen' Then
         Begin
          Exit;
        end;
    end;


    procedure WalkTo;
    begin
    if skill='attack' then
      begin
        WalkToChickens;
        writeln('did walk to chickens')
      end;

    if skill='WoodCutting' then
      begin
        WalkToTree;
      end;


    end;


    function FindChicken(var x, y: Integer): Boolean;
    begin
      if(FindColorSpiralTolerance(x,y,857197,MSX1,MSY1,MSX2,MSY2,10))or
        (FindColorSpiralTolerance(x,y,6521491,MSX1,MSY1,MSX2,MSY2,10))or
        (FindColorSpiralTolerance(x,y,2638679,MSX1,MSY1,MSX2,MSY2,10))then
      begin
        WriteLn('found chicken color')
        Result:=True;
      end else
      begin
        WriteLn('cant find chicken color')
        Result:=False;
      end;
    end;

    procedure KillChicken;
    begin
      if FindChicken(x,y)then
      begin
      case HowWeClick of
        0: if findchicken(x,y)then
           begin
             MMouse(x,y,1,0);
             Mouse(x,y,0,1,true);
           end;
        1: if findchicken(x,y)then
           begin
             MMouse(x,y,0,1);
             Mouse(x,y,1,0,false);
           end;
         else
         WriteLn('cant find chicken color')
        end;
      end;
    end;


    begin
    SetupSrl;
    activateclient;
    WalkTo;
    end.
    ~Hermen

  2. #2
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    sorry for double post

    still need help!
    ~Hermen

  3. #3
    Join Date
    Feb 2006
    Location
    With mooncow on the moon
    Posts
    292
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    hmmm its apprent you are NOT using SRL 4 so no it wont work at alll! but ive made the nessacary changes for you for it to compile in SRL 4, so i sugest you update now. I beleive i fixed the bug for you also mate.

    Please update your srl then test.

    Code:
    program LumbyAllInOne;
    {.include SRL/SRL.scar}
    {.include SRL/skill/woodcutting.scar}
    {.include SRL/skill/cooking.scar}
    {.include SRL/skill/fighting.scar}
    
    var
    hometeleport, canthometeleport, SST2, lx, ly, x, HowWeClick, SST1,  FindFastRandomsTime, FindNorMalRandomsTime, y:integer;
    ky, kx:integer;
    const
     Location = 'other'; //You can use Chicken Pen, Lumbridge, or Other.
     Skill = 'attack';//skill you want to train
    {=====================================================================================]
                DONT TOUCH THIS BELOW IF YOU DONT KNOW WHAT YOUR DOING!
    [=====================================================================================}
    
    Function FindFastRandoms: Boolean;
    var
      i: Integer;
    begin
      for i:=1 to 9 do
      begin
        case I of
         1:  If FindDead then
               Result := True;
         2:  If FindMod then
               Result := True;
         3:  If FindMime then
               Result := True;
         4:  If FindMaze then
               Result := True;
         5:  If FindQuiz then
               Result := True;
         6:  If FindDemon then
               Result := True;
         7: begin
               if NoGameTab then
               begin
                 Result := True;
                 Players[CurrentPlayer].loc := 'No GameTab';
                 Logout;
                 Exit;
               end;
             end;
         8: begin
               if InBlack then
               begin
                 Result := True;
                 Players[CurrentPlayer].loc := 'InBlack';
                 Logout;
                 Exit;
               end;
             end;
         9: begin
               if FindFight then
               begin
                 RunTo('N',False);
               end;
             end;
        end;
    
      end;
    end;
    
    
    //credits to WT-FAWAKI-----------------------------------------//
    // -- Performs Wait and FindTalk. + calls FindNormalRandoms every 10 secs and
    // -- FindFastRandoms every 3 secs.
    //----------------------------------------------------------------------------//
    
    Procedure WaitPlus(Time:Integer);
    var T: integer;
      begin
        For T := 1 to Time do
        begin
          if not LoggedIn then exit;
          Wait(200 + Random(50));
          FindTalk;
          RC;
        end;
    
        FindTalk;
        MarkTime(FindNorMalRandomsTime);
        if FindNorMalRandomsTime - SST1 >(10000 + Random(5000)) then
          begin
            FindNorMalRandoms;
            MarkTime(SST1);
          end;
    
        MarkTime(FindFastRandomsTime);
        if FindFastRandomsTime - SST2 >(1500 + Random(1500)) then
          begin
            FindFastRandoms;
            MarkTime(SST2);
          end;
    end;
    
    procedure antiban;
    begin
      Case Random(10) Of
        1 : HoverSkill('defense', False);
        2 : HoverSkill('strenght', False);
        3 : begin
             GameTab(1+Random(12));
             Wait(2000+Random(400));
             GameTab(4);
            end;
        4 : RandomRClick;
        5 : PickUpMouse;
        6 : HoverSkill('attack', False);
        7 : almostlogout;
        8 : begin
            gametab(9);
            gametab(5);
            gametab(1);
            gametab(2);
            end;
        9 :begin
           mmouse(x,y,333,273);
           end;
    
    
    
      end;
    end;
    
    
    procedure loadbitmaps;
     begin
      hometeleport := BitmapFromString2(False, 'a84B1878DA8D8E510A0' +
           '3210C44AF944493D84F75F5FE47EA8E5B4C410A55181EE14D9488' +
           '58E93ECCF94E6D6063014F4316A469D9AC23D8247C4B7D9B52D63' +
           '6ED7BCFC75C5DD7894C17260DCF7BCBC1D2839DC27FC936F94297' +
           '5AA5F5F739701F3E274953B6E1D5EB2C4FFED33ABBDFCE797FB5D' +
           'E870');
     canthometeleport := BitmapFromString2(False, 'a046E278DA8D534BB2C' +
           '42008BC129AC1CF524D72FF233D119FC12853E3A2CB6A5AC01601' +
           'C0A40F54F415C0C58BD05842E7882F8D07D260700FFAF044318C5' +
           '39D09B4C70F65C37C0D8D0D2D0F92086FCAE32CD73D08BDA9E8DB' +
           '299F49E92E3AE5F1263C4E62323E51DEDBF2ECDB2DBA3EDAA14C8' +
           '118B8295B5D25E714F1845C22BE983366C652A998383AF8AA67A5' +
           'E4A592F7AC3C6D31B1A8286AF56C73746498A2CCCBCE5BC55EF72' +
           '83619B57FCEC01A815DC34C28982C2388C5B7967797CC2FD1B55B' +
           'D9A15CD219CDBD8D7271E6E573D17B50DFC2E42BC1EA98F44D5B9' +
           'A27DA2C6D7D189A75327BFEEFAFBC3AB69BC3AD63EB544F28BA52' +
           '1D13CCD4A1E2A1F62BB5591A2FFE9A81D5B1C9B7F5B7CACE8503B' +
           'D8AE4FFBD85E8A60CED2EDF1DEB3D2C7F6133E7B2BA32757FD5D');
     end;
    
    Procedure casthometeleport;
     begin
      loadbitmaps;//loadsbitmaps
      gametab(7);
      wait(400+Random(600));
       If(FindBitmap(hometeleport, lx, ly)) Then
        Begin
        wait(100 + Random(150));
        Mouse(lx, ly, 5, 5, True);
        if (FindBitmap(canthometeleport, kx, ky)) then
        begin
        writeln('cant use home teleport logging out');
        logout;
        end
        else
        wait(15000);
        WriteLn('your in limbridge, have a nice day!');
      end
       else
        If Not(FindBitmap(HomeTelePort, lx, ly)) Then
         begin
          WriteLn('couldnt fin spell.');
       end;
    freebitmap(hometeleport);
    end;
    
    
    
    procedure WalkToTree;
    begin
      HighestAngle;
      MakeCompass('N');
      FindRoadColor;
      SetRun(true);
    
      RadialRoadWalk(RoadColor, 60, 65, 66, 0, 0);       //radialroadwalking
       fflag(10);
       WriteLn('to bridge');
      RadialRoadWalk(RoadColor, 300, 335, 75, 0, 0);
        WriteLn('to shop');
      RadialRoadWalk(RoadColor, 300, 335, 65, 0, 0);
        WriteLn('at shop');
      RadialWalk(1403451 , 260, 280, 70, 0, 0);     //radial walk
        WriteLn('at tree,s');
    end;
    
    
    
    procedure WalkToChickens;
    begin
      if Location='other' then
        begin
    
         writeln('did walk to chickens')
    
          casthometeleport;//casts home teleport
          HighestAngle;     //standard stuff
          MakeCompass('N');
          FindRoadColor;
          SetRun(true);
    
          RadialRoadWalk(RoadColor, 60, 65, 66, 0, 0);//radialroadwalking
            WriteLn('to bridge');
          RadialRoadWalk(RoadColor, 80, 120, 63, 0, 0);
            WriteLn('passed the bridge');
          RadialRoadWalk(RoadColor, 30, 50, 66, 0, 5);
            WriteLn('almost next to goblin house');
          RadialRoadWalk(RoadColor, 360, 335, 65, 0, 0);
            WriteLn('passed goblin house');
          RadialRoadWalk(RoadColor, 332, 350, 71, 0, 1);
            WriteLn('next to cows');
          RadialRoadWalk(RoadColor, 315, 330, 72, 0, 0);
            WriteLn('next to cows');
          RadialRoadWalk(RoadColor, 337, 350, 65, 0, 1);
            WriteLn('in chickenpen');
    
        SetRun(false);
      end
    if Location='Lumbridge'then
      begin
          HighestAngle;    //standard stuff
          MakeCompass('N');
          FindRoadColor;
          SetRun(true);
    
          RadialRoadWalk(RoadColor, 60, 65, 66, 0, 0); //radialroadwalking
            WriteLn('to bridge');
          RadialRoadWalk(RoadColor, 80, 120, 63, 0, 0);
            WriteLn('passed the bridge');
          RadialRoadWalk(RoadColor, 30, 50, 66, 0, 5);
            WriteLn('almost next to goblin house');
          RadialRoadWalk(RoadColor, 360, 335, 65, 0, 0);
            WriteLn('passed goblin house')
          RadialRoadWalk(RoadColor, 332, 350, 71, 0, 1);
            WriteLn('next to cows');
          RadialRoadWalk(RoadColor, 315, 330, 72, 0, 0);
            WriteLn('next to cows');
          RadialRoadWalk(RoadColor, 337, 350, 65, 0, 1);
            WriteLn('in chickenpen');
            SetRun(false);
          end;
       If Location='Chicken Pen' Then
         Begin
          Exit;
        end;
    end;
    
    
    procedure WalkTo;
    begin
    if skill='attack'then
      begin
        writeln('did walk to chickens')
        WalkToChickens
        writeln('did walk to chickens')
      end;
    
    if skill='WoodCutting' then
      begin
        WalkToTree;
      end;
    
    
    end;
    
    
    function FindChicken(var x, y: Integer): Boolean;
    begin
      if(FindColorSpiralTolerance(x,y,857197,MSX1,MSY1,MSX2,MSY2,10))or
        (FindColorSpiralTolerance(x,y,6521491,MSX1,MSY1,MSX2,MSY2,10))or
        (FindColorSpiralTolerance(x,y,2638679,MSX1,MSY1,MSX2,MSY2,10))then
      begin
        WriteLn('found chicken color')
        Result:=True;
      end else
      begin
        WriteLn('cant find chicken color')
        Result:=False;
      end;
    end;
    
    procedure KillChicken;
    begin
      if FindChicken(x,y)then
      begin
      case HowWeClick of
        0: if findchicken(x,y)then
           begin
             MMouse(x,y,1,0);
             Mouse(x,y,0,1,true);
           end;
        1: if findchicken(x,y)then
           begin
             MMouse(x,y,0,1);
             Mouse(x,y,1,0,false);
           end;
         else
         WriteLn('cant find chicken color')
        end;
      end;
    end;
    
    
    begin
    SetupSrl;
    activateclient;
    WalkTo;
    end.
    ~ Solemn Wishes

  4. #4
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    dude it was for srl4 and what you changed please a change log so i can learn from it
    ~Hermen

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Function compiles, But nothing happens?
    By Macrosoft in forum OSR Help
    Replies: 19
    Last Post: 08-14-2008, 12:35 AM
  2. TPA Trouble [Compiles but does nothing]
    By Claymore in forum OSR Help
    Replies: 4
    Last Post: 07-08-2008, 06:00 PM
  3. Function Compiles and then...nothing?
    By Macrosoft in forum OSR Help
    Replies: 12
    Last Post: 06-07-2008, 10:40 PM
  4. need help, script compiles right but work?
    By shadowrec0n in forum OSR Help
    Replies: 9
    Last Post: 02-15-2008, 09:09 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
  •