Results 1 to 3 of 3

Thread: Work faster

  1. #1
    Join Date
    Feb 2012
    Posts
    119
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Post Work faster

    Ok so i would like to get it to move faster, I'm not sure exactly how CTS2 works but when i dont // out the 2nd debug it shows that it's generating a new color every round of pickpocketing. Is this how it is suppose to work? If this is true should i just try CTS1 or 0 to try and make it generate faster? Or is there a way to make it use just one Color the whole time its running.

    Simba Code:
    program testbandit;
    {$DEFINE SMART}
    {$i srl/srl.simba}



    Procedure DeclarePlayers;
    Begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

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




    procedure StatsGuise(wat:String);
    begin
      StatsGuise(wat);
      Disguise(wat);
    end;



    procedure Antiban;
    begin
      case Random(10) of
        20: HoverSkill('Thieving', False);
        30: PickUpMouse;
        40: RandomMovement;
        50: BoredHuman;
        59: ExamineInv;
      end;
      Writeln('Antiban in action!');
    end;



    function Bandit: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.42, 0.14);

      FindColorsSpiralTolerance(MSCX, MSCY, arP, 1714004, MSX1, MSY1, MSX2, MSY2, 7);
      if (Length(arP) = 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;



    ///////////////Taken from YoHoJo's powerminner////////////

    Procedure DropJunk;
    var
      x, y, Lockpick, Antipoision, I: Integer;
      SlotBox:TBox;
      DropingPattern:TIntegerArray;

    begin
       Lockpick:= DTMFromString('mrAAAAHic42BgYOhjZmCYD8QzgHgiELcDcQsQtwJxDxBXMDIwFAJxHhAXAXE9ELcAcQcQ1wKxnbU10BQmPBg/YCSAYQAA5GsJNg==');
       Antipoision:= DTMFromString('mAAEAAHiclc0xDkBQFETRebTWYGmCgiBYhpKSRiKhQmzRTX6j9G9ymmkmklSEToUaLXp0KJEiQYYch0kjJizYzG0nblzYsWLG8DS8BB7+F8M8fXsB8IkOcA==');
       DropingPattern:= [9,13,17,21,25,10,14,18,22,26,7,11,15,19,23,27,8,12,16,20,24,28];

       for I:= 0 to 21 do
       Begin
         SlotBox:= InvBox(DropingPattern[I]);
         if FindDTM(Lockpick,x,y,SlotBox.X1,SlotBox.Y1, SlotBox.X2, SlotBox.Y2) or
             FindDTm(Antipoision,x,y,SlotBox.X1,SlotBox.Y1, SlotBox.X2, SlotBox.Y2) Then
          Begin
            MouseItem(DropingPattern[I], Mouse_Right);
            ChooseOption('Dro');
          end;
       end;

       FreeDTM(Lockpick);
       FreeDTM(Antipoision);

    end;



    Procedure Pickpocket;
    var
      x, y: integer;
    begin
      repeat
      if(not(LoggedIn))then
        Exit;

        SetAngle(SRL_ANGLE_HIGH);
        x:=MSCX;
        y:=MSCY;

        If FindObjTPA(x, y, Bandit, 5, 2, 5, 10, 20,['Atta'])then

        begin
          WriteLn('Found Bandit');

          Mouse(x, y, 10, 10, False);
          WaitOption('Pick', 500)
        end;
       until(InvFull);
       begin
         FindNormalRandoms;
         WriteLn('Droping');

         DropJunk;     //Droping

       end;


    end;






    begin
      Smart_Server := 0;
      Smart_Members := True;
      Smart_Signed := True;
      Smart_SuperDetail := False;

      SetUpSRL;
      DeclarePlayers;
      LoginPlayer;
      repeat
        FindNormalRandoms;
        Pickpocket;
      Until(false);

    end.

  2. #2
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Generally the colour should stay the same, unless you're doing something which involves RS having to show the "Loading..." alert in the top-left corner. Just call it once to get your colour, store it in a variable, and you should be right
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  3. #3
    Join Date
    Feb 2012
    Posts
    119
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    How would I store it as a variable?

    Would I put a var section at the top and then Bandits: Integer ?

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
  •