Results 1 to 11 of 11

Thread: whats wrong with this code?

  1. #1
    Join Date
    Nov 2008
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default whats wrong with this code?

    Code:
    program new;
    {$i srl/srl.scar}
    
    function Sheepcolor: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.00, 0.00);
    
      if not (FindColorsTolerance(arP, 3487288, MSX1, MSY1, MSX2, MSY2, 0)) then
      begin
        Writeln('Failed to find the color, no result.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;
    
      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);
    
      for i := 0 to arL do
      begin
        Result := arC[i];
        Writeln('AutoColor = ' + IntToStr(arC[i]));
        Break;
      end;
    
      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);
    
      if (i = arL + 1) then
        Writeln('AutoColor failed in finding the color.');
    end;
    
    procedure shearsheep;
    var x, y: integer;
    begin
     if FindObj(x, y, 'hear', sheepcolor, 35) then
      begin
        Mouse(x, y, 2, 2, false);
        ChooseOption('hear');
      end;
    
    end;
    
    
    
    
    
    
    
    
    begin
      ClearDebug();
      SetupSRL();
      shearsheep;
    end.

    and when i run it...it gives this:
    Code:
    SRL Compiled in 16 msec
    AutoColor = 3487288
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Successfully executed.

  2. #2
    Join Date
    Nov 2008
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by sibeliina View Post
    Code:
    program new;
    {$i srl/srl.scar}
    
    function Sheepcolor: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.00, 0.00);
    
      if not (FindColorsTolerance(arP, 3487288, MSX1, MSY1, MSX2, MSY2, 0)) then
      begin
        Writeln('Failed to find the color, no result.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;
    
      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);
    
      for i := 0 to arL do
      begin
        Result := arC[i];
        Writeln('AutoColor = ' + IntToStr(arC[i]));
        Break;
      end;
    
      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);
    
      if (i = arL + 1) then
        Writeln('AutoColor failed in finding the color.');
    end;
    
    procedure shearsheep;
    var x, y: integer;
    begin
     if FindObj(x, y, 'hear', sheepcolor, 35) then
      begin
        Mouse(x, y, 2, 2, false);
        ChooseOption('hear');
      end;
    
    end;
    
    
    
    
    
    
    
    
    begin
      ClearDebug();
      SetupSRL();
      shearsheep;
    end.

    and when i run it...it gives this:
    Code:
    SRL Compiled in 16 msec
    AutoColor = 3487288
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong xs to a finder function: -16. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    Successfully executed.
    and it wont use smart's build in mouse-.- it keeps using mine

  3. #3
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    To use smart you need to put this at the top:

    {$Define Smart}

    then in your main loop:
    Simba Code:
    begin
      Smart_Server:= 1;
      Smart_Members:= False;
      Smart_SuperDetailed:= False;
      Smart_Signed:= True;
      ClearDebug();
      SetupSRL();
      shearsheep;
    end.
    I am Ggzz..
    Hackintosher

  4. #4
    Join Date
    Nov 2008
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by ggzz View Post
    To use smart you need to put this at the top:

    {$Define Smart}

    then in your main loop:
    Simba Code:
    begin
      Smart_Server:= 1;
      Smart_Members:= False;
      Smart_SuperDetailed:= False;
      Smart_Signed:= True;
      ClearDebug();
      SetupSRL();
      shearsheep;
    end.
    allright that helped for shearing thanks but when i tried to make the bot att to a bear it just dont find/click it <,< i changed the color etc and ''ttack'' etc but dont work : l any ideas?

  5. #5
    Join Date
    Dec 2011
    Posts
    392
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It's hard to tell what is happening with the bear unless you show the code.

  6. #6
    Join Date
    Nov 2008
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Code:
    program new;
    {$Define Smart}
    {$i srl/srl.scar}
    
    Procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
    
      Players[0].Name :='ojd67';
      Players[0].Pass :='juhorock';
      Players[0].Nick :='jd67';
      Players[0].Active:=True;
    end;
    
    
    function BearColor: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
      H, S, L: Extended;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(1);
    
      FindColorsSpiralTolerance(MMCX, MMCY, arP, 3290164, MMX1, MMY1, MMX2, MMY2, 3);
      if (Length(arP) = 0) then
      begin
        Writeln('Failed to find the color, no result.');
        ColorToleranceSpeed(tmpCTS);
        Exit;
      end;
    
      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);
    
      for i := 0 to arL do
      begin
        ColorToHSL(arC[i], H, S, L);
    
        if (H >= 16.65) and (H <= 16.69) and (S >= 1.90) and (S <= 3.05) and (L >= 19.39) and (L <= 20.41) then
        begin
          ColorToXYZ(arC[i], X, Y, Z);
    
          if (X >= 3.06) and (X <= 3.36) and (Y >= 3.26) and (Y <= 3.56) and (Z >= 3.25) and (Z <= 3.66) then
          begin
            Result := arC[i];
            Writeln('AutoColor = ' + IntToStr(arC[i]));
            Break;
          end;
        end;
      end;
    
      ColorToleranceSpeed(tmpCTS);
    
      if (i = arL + 1) then
        Writeln('AutoColor failed in finding the color.');
    end;
    
    procedure Bearkiller;
    var x, y: integer;
    begin
     if FindObj(x, y, 'ttack', Bearcolor, 35) then
      begin
        Mouse(x, y, 2, 2, false);
        ChooseOption('ttack');
      end;
    
    end;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    begin
     Smart_Server:= 11;
      Smart_Members:= False;
      Smart_Signed:= True;
      ClearDebug();
      SetupSRL();
      DeclarePlayers;
      LoginPlayer;
      bearkiller;
    
    end.
    there is the code

  7. #7
    Join Date
    Jul 2007
    Posts
    238
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    you left your account details in it ?
    ....

  8. #8
    Join Date
    Nov 2008
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by sjlou View Post
    you left your account details in it ?
    lol i dont care its fully botted account anyway lol + i never play on it

  9. #9
    Join Date
    Nov 2008
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    any help ?

  10. #10
    Join Date
    Apr 2007
    Posts
    581
    Mentioned
    1 Post(s)
    Quoted
    2 Post(s)

    Default

    You should still change your password.. considering there are over a thousand people on daily, theres bound to be someone who will hijack your account without even looking back.

  11. #11
    Join Date
    Nov 2008
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol changed it already

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
  •