Results 1 to 1 of 1

Thread: How can I get it to stay on target

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

    Default How can I get it to stay on target

    Hi Im a very very begginer programmer and Im trying to learn so I took a script used it as a template and modified it. I was wondering how I can get this script to stay on target. I want to release it to the community but I dont know that many ways to do anti leech so if someone could help me and pm a basic anti leech it would be greatly appreiciated heres what I have so far. It targets them and ussually kills but when two are near eachother it will click one not in combat.
    EDIT!!!: So I used the search button and I found one but I removed the wait time on it so it can grab it before other players do. But now it looks like it spazzzing and the guy is on crack. Any other way to add wait time?

    Code:
    program Yourmom;
    
    {$I SRL/SRL.Simba}
    {$I SRL/SRL/Misc/Debug.Simba}
    {$I P07Include.Simba}
    
    
    
    var
    X, Y:Integer;
    
    procedure TargetYourMom;
    begin
     If P07_FindObjCustom(x, y, ['Attack', 'Cow calf', 'Cow'], [12107201, 5073289, 3949911, 4150639], 5) Then
          ClickMouse2(mouse_left);
    end;
    
    Function IsFighting: Boolean;
    var
      PBox: TBox;
    Begin
      PBox := IntToBox(238, 169, 279, 217);
      Result := (AveragePixelShift(PBox, 250, 350) > 15);
    End;   function fight:boolean;
    var
    x, y:integer;
    tmpCTS,i, L,Counter,Fighter: Integer;
     begin
     if IsFighting then
     begin
        repeat
        until (not IsFighting)
        end;
    TargetYourMom
     While IsFighting do
              Wait(RandomRange(400, 800));
                  if not IsFighting then
                           End;
    
     begin
     if IsFighting then
     begin
        repeat
        until (not IsFighting)
        end;
    begin
    SetupP07Include;
    repeat
     TargetYourMom;
     until False;
    end;
    end.
    Last edited by Strydr; 02-28-2013 at 12:11 AM.

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
  •