Results 1 to 5 of 5

Thread: Help Clicking

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

    Question Help Clicking

    Hi guys, this is my first post
    I've been reading through tut's and using some scripts and looking at the code trying to get a feel for the scripting thing. I think i'm on to something.
    I'm trying to make a bandit theiver, i got the right colors and when i start this up it logs in and everything. Then the mouse moves over the spot where the color is, but won't right click. I'm puzzled as to why? Any thoughts? Also i'm trying to set the angle to high i tried "SetAngle(Set_Angle_High)" but it didn't work so if you could help me with that also. If i could get it to pickpocket the I can move on to eating


    Edit: if in wrong section move to first script? plz

    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;



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

      if not (FindColorsTolerance(arP, 1976886, MSX1, MSY1, MSX2, MSY2, 7)) 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 Pickpocket;
    var
      x, y: integer;
    begin
      if(not(LoggedIn))then
        Exit;

      x:=MSCX;
      y:=MSCY;

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

      begin
        WriteLn('Found Bandit');

        GetMousePos(x, y);
        Mouse(x, y, 2, 2, False);
        Wait(100 + Random(100));
        ChooseOption('pick');

      end;

       Wait(3000);
    end;





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

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

    end.
    Last edited by Littellj; 03-07-2012 at 05:42 AM.

  2. #2
    Join Date
    Dec 2011
    Location
    Kosovo
    Posts
    831
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    * * Mouse(x, y, 2, 2, True);
    * * Wait(100 + Random(100));

    Try this. This will only left click on them
    Goals:
    Understanding TPAs
    Making Proggy for fighting
    Getting on SRL members
    Get 500 posts

  3. #3
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    How odd, the code you used is fine. Could you use ClickMouse? To see how that would work out. Also before setAngle you might want to try ActivateClient.
    Working on: Tithe Farmer

  4. #4
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

    Default

    Yeah I would think it would work...try increasing

    Wait(100 + Random(100));

    to Wait(1000);

    And if it works then, keep decreasing it to the 300 range or so?

  5. #5
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    You left your pass in the script. Changed pass and pm'd it to you.
    Working on: Tithe Farmer

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
  •