Results 1 to 7 of 7

Thread: InvFull and more

  1. #1
    Join Date
    Jan 2009
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default InvFull and more

    Well i have been looking over all the tut's and i have made a power cutter but can't get it working and not sure how many problems
    Code:
    program RyasPowerChopTillYaDrop;
    {.include SRL\SRL.scar}
    
    
      procedure DeclarePlayers;
    begin
       HowManyPlayers := 1; //How many Players
       NumberOfPlayers(HowManyPlayers);
       CurrentPlayer :=0; //Starting Player
    
       Players[0].Name := 'rib a rab';
       Players[0].Pass := 'ribsribs';
       Players[0].Nick := 'rab';
       Players[0].Active := True;
       Players[0].Integers[0]:= 50;        // Loads to Do.
       Players[0].Strings[0] := 'normal'; // ALL lowercase; normal
       Players[0].Strings[1] := 'True';   // Is your axe equipped?
    end;
    
    var x, y, i, Dropped, Loads, LoadsCompleted, LoadsUntilSwitch: integer;
    
         procedure CutTrees;
       begin
        if (not LoggedIn) then Exit;
    
    
    case lowercase(Players[CurrentPlayer].strings[0]) of
    
     'normal':begin
               if not LoggedIn
          then Exit;
               repeat                        {Text to find}              {colour}                          {change}
                    if (FindObjCustom(X, Y, ['Tree','ee','ree','tre'], [3562102,3242348,3232620,2704986], 4)) then
                    MMouse(X, Y, 4, 4 );
                    begin
                     Wait(100 + Random(200));
                     Wait(100 + Random(200));
                    case Random(2) of
                  0: begin
                      Mouse(x, y, 4, 4, False);
                      Wait(100 + Random(200));
                      ChooseOption('hop');
                      WriteLn('Cutting');;
                     end;
                  1: begin
                      Mouse(x, y, 4, 4, True);
                      WriteLn('Cutting');
                     end;
                    end;
                  Until(InvFull);
    end;
       
          procedure Logo;
          begin
    WriteLn('Thank you for using')
    Wait(300)
    WriteLn('    _______         ')
      Wait(300)
    WriteLn('   / Ryas  \           ')
     Wait(300)
    WriteLn('  /  Power  \        ')
     Wait(300)
    WriteLn('  |  Cutter |             ')
      Wait(300)
    WriteLn('   \_______/              ')
     Wait(300)
    WriteLn('     |   |                 ')
      Wait(300)
    WriteLn('     |   |                 ')
      Wait(300)
    WriteLn('     |   |                 ')
        Wait(300)
    WriteLn('     |   |                 ')
       Wait(300)
    WriteLn('     |___|                 ')
        end;
        procedure PowerDrop;
    begin
          if not LoggedIn
          then Exit
          
        case lowercase(Players[CurrentPlayer].Strings[1]) of
    
        'true': begin
                DropAll;
    
        'false': begin
                 for i:= 2 to 28 do
                   begin
                    DropItem(2-28)
                   end;
                 end;
                end;
    
            
            
    
    
            Procedure AntiBan;
    Begin
    
      Case Random(10) Of
        0: RandomRClick;
        1: BoredHuman;
        2: HoverSkill('Woodcutting', False);
        3: PickUpMouse;
        4: RandomMovement;
        5: BoredHuman;
        end;
    end;
    
    
            procedure AntiRandoms;
    begin
      if not LoggedIn then
      Exit;
      FindNormalRandoms;
      Wait(10000 +(5000));
      if FindFight then
      begin
        writeln('found fight');
        RunAway('E', True, 1, 6500);
        writeln('Ran away should be safe');
    end;
    
    
     procedure DoOnce;
    begin
      ClearDebug;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
    end;
    
      procedure ProgressReport;
    begin
      ClearDebug;
      Writeln(',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,');
      Writeln('/\   Time Running : ' + TimeRunning + '   /\');
      Writeln('/\                   Done '+ IntToStr(Loads) +' loads             /\');
      Writeln('/\                  Dropped '+ IntToStr(Dropped) +' logs           /\');
      Writeln('`````````````````````````````````````````````````');
    
    end;
    
    procedure MainLoop;
    begin
      LoadsCompleted:= 0;
      SetAngle(True);
      Wait(1000);
      SetRun(True);
      repeat
        repeat
          LoadsUntilSwitch := Players[CurrentPlayer].integers[0];
          CutTree;
            if Invfull then
            begin
              PowerDrop;
              Inc(Loads);
            end;
          Inc(LoadsCompleted);
          ProgressReport;
        until (LoadsCompleted = LoadsUntilSwitch) or (not LoggedIn)[/u]
        if LoadsCompleted = LoadsUntilSwitch then
           NextPlayer(True);
        if (not LoggedIn) then
           NextPlayer(False);
        ProgressReport;
        LoginPlayer;
      until (AllPlayersInactive);
      ProgressReport;
      TerminateScript;
    end;
    
    
     begin
      DoOnce;
      MainLoop;
      ProgressReport;
    end.
    Plz try to help
    Thanks
    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly. - put this in your sig

  2. #2
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    What's your problem?

  3. #3
    Join Date
    Feb 2009
    Location
    Philipines
    Posts
    600
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hey you left your account on the script I changed your password, I will PM you the new one.

  4. #4
    Join Date
    Jan 2009
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well i bit i get is
    Until(InvFull);
    but there many be more could you and try get it working or point me the right way thanks
    and thanks
    Dark Arcana
    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly. - put this in your sig

  5. #5
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Quote Originally Posted by rya729 View Post
    well i bit i get is
    Until(InvFull);
    but there many be more could you and try get it working or point me the right way thanks
    and thanks
    Dark Arcana
    Hey man add me on msn SO i can help you out

    ~Home
    Last edited by Home; 05-11-2011 at 01:42 PM.

  6. #6
    Join Date
    Mar 2008
    Location
    In a cave
    Posts
    345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    First of all: try sticking to standards, makes it a lot easier to read the code and then you can find all your fault easier too.
    By standards your code would be like this:
    SCAR Code:
    program RyasPowerChopTillYaDrop;
    {.include SRL\SRL.scar}

    procedure DeclarePlayers;
    begin
       HowManyPlayers := 1; //How many Players
       NumberOfPlayers(HowManyPlayers);
       CurrentPlayer :=0; //Starting Player

       Players[0].Name := 'rib a rab';
       Players[0].Pass := 'ribsribs';
       Players[0].Nick := 'rab';
       Players[0].Active := True;
       Players[0].Integers[0]:= 50;        // Loads to Do.
       Players[0].Strings[0] := 'normal'; // ALL lowercase; normal
       Players[0].Strings[1] := 'True';   // Is your axe equipped?
    end;

    var x, y, i, Dropped, Loads, LoadsCompleted, LoadsUntilSwitch: integer;

    procedure CutTrees;
    begin
      if (not LoggedIn) then Exit;
      case lowercase(Players[CurrentPlayer].strings[0]) of
        'normal':begin
                     if not LoggedIn then Exit;
                     repeat                        {Text to find}              {colour}                          {change}
                       if (FindObjCustom(X, Y, ['Tree','ee','ree','tre'], [3562102,3242348,3232620,2704986], 4)) then
                       MMouse(X, Y, 4, 4 );
                       begin
                         Wait(100 + Random(200));
                         Wait(100 + Random(200));
                         case Random(2) of
                           0: begin
                                 Mouse(x, y, 4, 4, False);
                                 Wait(100 + Random(200));
                                 ChooseOption('hop');
                                 WriteLn('Cutting');;
                               end;
                           1: begin
                                 Mouse(x, y, 4, 4, True);
                                 WriteLn('Cutting');
                               end;
                         end;
                     Until(InvFull);
                  end;

    procedure Logo;
    begin
      WriteLn('Thank you for using')
      Wait(300)
      WriteLn('    _______         ')
      Wait(300)
      WriteLn('   / Ryas  \           ')
      Wait(300)
      WriteLn('  /  Power  \        ')
      Wait(300)
      WriteLn('  |  Cutter |             ')
      Wait(300)
      WriteLn('   \_______/              ')
      Wait(300)
      WriteLn('     |   |                 ')
      Wait(300)
      WriteLn('     |   |                 ')
      Wait(300)
      WriteLn('     |   |                 ')
      Wait(300)
      WriteLn('     |   |                 ')
      Wait(300)
      WriteLn('     |___|                 ')
    end;

    procedure PowerDrop;
    begin
      if not LoggedIn then Exit
      case lowercase(Players[CurrentPlayer].Strings[1]) of
        'true': begin
                DropAll;
        'false': begin
                   for i:= 2 to 28 do
                   begin
                     DropItem(2-28)
                   end;
                 end;
    end;
    Procedure AntiBan;
    Begin
      Case Random(10) Of
        0: RandomRClick;
        1: BoredHuman;
        2: HoverSkill('Woodcutting', False);
        3: PickUpMouse;
        4: RandomMovement;
        5: BoredHuman;
      end;
    end;

    procedure AntiRandoms;
    begin
      if not LoggedIn then Exit;
      FindNormalRandoms;
      Wait(10000 +(5000));
      if FindFight then
      begin
        writeln('found fight');
        RunAway('E', True, 1, 6500);
        writeln('Ran away should be safe');
      end;
    procedure DoOnce;
    begin
      ClearDebug;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
    end;
    procedure ProgressReport;
    begin
      ClearDebug;
      Writeln(',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,');
      Writeln('/\   Time Running : ' + TimeRunning + '   /\');
      Writeln('/\                   Done '+ IntToStr(Loads) +' loads             /\');
      Writeln('/\                  Dropped '+ IntToStr(Dropped) +' logs           /\');
      Writeln('`````````````````````````````````````````````````');
    end;
    procedure MainLoop;
    begin
      LoadsCompleted:= 0;
      SetAngle(True);
      Wait(1000);
      SetRun(True);
      repeat
        repeat
          LoadsUntilSwitch := Players[CurrentPlayer].integers[0];
          CutTree;
          if Invfull then
          begin
            PowerDrop;
            Inc(Loads);
          end;
          Inc(LoadsCompleted);
          ProgressReport;
        until (LoadsCompleted = LoadsUntilSwitch) or (not LoggedIn)[/u]
        if LoadsCompleted = LoadsUntilSwitch then NextPlayer(True);
        if (not LoggedIn) then NextPlayer(False);
        ProgressReport;
        LoginPlayer;
      until (AllPlayersInactive);
      ProgressReport;
      TerminateScript;
    end;

    begin
      DoOnce;
      MainLoop;
      ProgressReport;
    end.

    This way you can see that you are missing some 'end;'s. All begins and cases need an end; If you follow the standards then the indenting before a begin or a case would be the same as before its end;

    In your mainloop you call the procedure CutTree. This is probably the most fishy part of your script as it first finds the tree, moves the mouse to the tree, moves the mouse again+clicks then waits 100+random(200) ms and repeats all the above mentioned. You should work out timers or ways to detect if tree is gone. Otherwise it just keeps constantly clicking the tree(s) until inventory is full. That is a bit bannable.

    Oh and a few more things:
    SCAR Code:
    procedure PowerDrop;
    begin  
      if not LoggedIn then Exit

    and

    procedure PowerDrop;
    begin
      if not LoggedIn then Exit
    You are missing a semicolon after the Exit and then one after PowerDrop's DropItem(2-28).
    In the procedure Logo; you have totally forgotten semicolons. You need to have them after all WriteLn('')s and Waits.

    SCAR Code:
    if (not LoggedIn) then NextPlayer(False);
        ProgressReport;
        LoginPlayer;
    You don't need the LoginPlayer as NextPlayer(Active: boolean); already does it

    Ok, here's how it compiles:
    SCAR Code:
    program RyasPowerChopTillYaDrop;
    {.include SRL\SRL.scar}

    var x, y, i, Dropped, Loads, LoadsCompleted, LoadsUntilSwitch: integer;

    procedure DeclarePlayers;
    begin
       HowManyPlayers := 1; //How many Players
       NumberOfPlayers(HowManyPlayers);
       CurrentPlayer :=0; //Starting Player

       Players[0].Name := 'rib a rab';
       Players[0].Pass := 'ribsribs';
       Players[0].Nick := 'rab';
       Players[0].Active := True;
       Players[0].Integers[0]:= 50;        // Loads to Do.
       Players[0].Strings[0] := 'normal'; // ALL lowercase; normal
       Players[0].Booleans[0] := True;   // Is your axe equipped?
    end;

    procedure CutTrees;
    begin
      if (not LoggedIn) then Exit;
      case lowercase(Players[CurrentPlayer].strings[0]) of
        'normal':begin
                   if not LoggedIn then Exit;
                   repeat                        {Text to find}              {colour}                          {change}
                     if (FindObjCustom(X, Y, ['Tree','ee','ree','tre'], [3562102,3242348,3232620,2704986], 4)) then
                     begin
                       MMouse(X, Y, 4, 4 );
                       Wait(100 + Random(200));
                       Wait(100 + Random(200));
                       case Random(2) of
                         0: begin
                              Mouse(x, y, 4, 4, False);
                              Wait(100 + Random(200));
                              ChooseOption('hop');
                              WriteLn('Cutting');;
                            end;
                         1: begin
                              Mouse(x, y, 4, 4, True);
                              WriteLn('Cutting');
                            end;
                       end;
                     end;
                   Until InvFull;
                 end;
      end;
    end;
    procedure Logo;
    begin
      WriteLn('Thank you for using')
      Wait(300)
      WriteLn('    _______         ')
      Wait(300)
      WriteLn('   / Ryas  \           ')
      Wait(300)
      WriteLn('  /  Power  \        ')
      Wait(300)
      WriteLn('  |  Cutter |             ')
      Wait(300)
      WriteLn('   \_______/              ')
      Wait(300)
      WriteLn('     |   |                 ')
      Wait(300)
      WriteLn('     |   |                 ')
      Wait(300)
      WriteLn('     |   |                 ')
      Wait(300)
      WriteLn('     |   |                 ')
      Wait(300)
      WriteLn('     |___|                 ')
    end;
    procedure PowerDrop;
    begin
      if not LoggedIn then Exit;
      if Players[CurrentPlayer].Booleans[0] then
      begin
        DropAll;
      end else
      begin
        for i:= 2 to 28 do
        begin
          DropItem(i)
        end;
      end;
    end;
    Procedure AntiBan;
    Begin
      Case Random(10) Of
        0: RandomRClick;
        1: BoredHuman;
        2: HoverSkill('Woodcutting', False);
        3: PickUpMouse;
        4: RandomMovement;
        5: BoredHuman;
      end;
    end;
    procedure AntiRandoms;
    begin
      if not LoggedIn then Exit;
      FindNormalRandoms;
      Wait(10000 +(5000));
      if FindFight then
      begin
        writeln('found fight');
        RunAway('E', True, 1, 6500);
        writeln('Ran away should be safe');
      end;
    end;
    procedure DoOnce;
    begin
      ClearDebug;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
    end;
    procedure ProgressReport;
    begin
      ClearDebug;
      Writeln(',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,');
      Writeln('/\   Time Running : ' + TimeRunning + '   /\');
      Writeln('/\                   Done '+ IntToStr(Loads) +' loads             /\');
      Writeln('/\                  Dropped '+ IntToStr(Dropped) +' logs           /\');
      Writeln('`````````````````````````````````````````````````');
    end;
    procedure MainLoop;
    begin
      LoadsCompleted:= 0;
      SetAngle(True);
      Wait(1000);
      SetRun(True);
      repeat
        repeat
          LoadsUntilSwitch := Players[CurrentPlayer].integers[0];
          CutTrees;
          if Invfull then
          begin
            PowerDrop;
            Inc(Loads);
          end;
          Inc(LoadsCompleted);
          ProgressReport;
        until (LoadsCompleted = LoadsUntilSwitch) or not LoggedIn;
        if LoadsCompleted = LoadsUntilSwitch then NextPlayer(True);
        if (not LoggedIn) then NextPlayer(False);
        ProgressReport;
      until (AllPlayersInactive);
      ProgressReport;
      TerminateScript;
    end;

    begin
      DoOnce;
      MainLoop;
      ProgressReport;
    end.
    Last edited by bugger0001; 06-05-2009 at 03:06 AM.
    A Chinese wiseman once said: "Shu ciu!", it was considered very smart, but now people know it means: "Something stinks here!"
    FalBuggySmelter v.1.31
    [Updated on the 1st of March 2010]
    RimmBugger BETA V1.8

  7. #7
    Join Date
    Jan 2009
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No more help need thanks to home sorry you where are bit to late bugger0001
    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly. - put this in your sig

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
  •