Guest User

Untitled

a guest
Jun 22nd, 2018
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 3.93 KB | None | 0 0
  1. // by begginer. thanks for using it. Enjoy it :)
  2.  
  3. program AttackCow;
  4. //{$DEFINE SMART}
  5. {$i SRL/srl.simba}
  6. {$i SRL/SRL/skill/fighting.simba}
  7.      var
  8.    x: Integer;
  9.    LootColours: TIntegerArray;
  10. const
  11.   SRLStats_Username = '';   //Insert your SRL stats username here.
  12.   SRLStats_Password = '';   //Insert your SRL stats password here.
  13.   BreakEvery        = 120;  //How many minutes before breaking?
  14.   BreakFor          = 5;    //How many minutes to break for?
  15.   Version           = '1';
  16.   NumbOfPlayers     = 1;    //How many players are you using?
  17.   StartPlayer       = 0;    //Which player will you start with? (0 means first)
  18.   Tolerance   = 2;
  19. procedure DeclarePlayers;
  20. begin
  21.   NumberOfPlayers(NumbOfPlayers);
  22.   CurrentPlayer := 0;
  23.  
  24.   Players[0].Name     :='';     //Insert player username here.
  25.   Players[0].Pass     :='';     //Insert player password here.
  26.   Players[0].Active   := True;  //Leave True to use this player.
  27. end;
  28.  
  29.  
  30. function FightCow:Boolean;
  31. var
  32.   x, y: Integer;
  33. Begin
  34. x:=MSCX;
  35. y:=MSCY;
  36. begin
  37.  
  38.   if FindObjCustom(x, y, ['att', 'ack', 'Cow', 'ow'], [4148562, 9018547, 3950926, 7112099, 5007241], 5) then
  39.   Mouse(x, y, 3, 3, true);
  40.  
  41.      wait(5000+Random(5000));   // Change this if you want for faster attacking. 1000 = 1SECOND
  42.   Writeln('We found a Cow. Attacking it');
  43. end;
  44.  
  45. end;
  46. procedure AntiBan;
  47.  
  48. begin
  49. Writeln ('Anti-banning');
  50.   x := Random(50)  case x of 0: HoverSkill('Attack', false);
  51.     1:
  52.       HoverSkill('Strength', false);
  53.     2:
  54.       HoverSkill('Defence', false);
  55.     3:
  56.       HoverSkill('hitpoints', false);
  57.     12..15:
  58.       PickUpMouse;
  59.     16..25:
  60.       RandomMovement;
  61.     26..27:
  62.       RandomRClick;
  63.     28..32:
  64.       BoredHuman;
  65.     33:
  66.       ExamineInv;
  67.      34..50:
  68.      RandomRClick;
  69.  
  70.  
  71.      end;
  72.  
  73.   Wait(RandomRange(800, 1200));
  74. end;
  75.  
  76. procedure EatIfLow;
  77. var
  78.   MMColor: string;
  79.   x, y, Lobster: Integer;
  80.   begin
  81.   Lobster := DTMFromString('mlwAAAHicY2dgYJjPxMCwGIoXAvFMIF4AxEuAuJ8RgicB8XQg7oLiDiDm4+NjKLcRZJjtJ86wJVqaYV2EFMP8AHGGbTHSDFxAc3FhRjwYCgD3pg8b');
  82.  
  83. begin
  84.   GetMMLevels('hp', MMColor);
  85.   if (MMColor = 'Red') then
  86.   repeat
  87.     if FindDTM(Lobster, x, y, MIX1, MIY1, MIX2, MIY2) then
  88.     begin
  89.       InvMouse(CoordsToItem(x, y), 3);
  90.       if WaitUpText('Eat Lobster', 100) then
  91.       begin
  92.         ClickMouse2(true);
  93.         Wait(RandomRange(350, 525));
  94.       end;
  95.     end else
  96.       Break;
  97.     GetMMLevels('hp', MMColor)
  98.   until((MMColor = 'Green'))
  99.  end;
  100.  FreeDTM(Lobster);
  101. end;
  102.  
  103. Function FindObjOnScreen(Up:String;Color,Tolerance:Integer;MC2:Variant;Hmod,Smod:Extended): Boolean;
  104.   var
  105.   X,Y:Integer;
  106.     CTS,I,T: Integer;
  107.     TPA: TPointArray;
  108.     begin
  109.   repeat
  110.     Result := False;
  111.     CTS := GetColorToleranceSpeed;
  112.  
  113.     ColorToleranceSpeed(2);
  114.  
  115.     SetColorSpeed2Modifiers(Hmod,Smod);//These are the modifiers you got from the ACA
  116.  
  117.      FindColorsSpiralTolerance(MSCX, MSCY, TPA,(Color), MSX1, MSY1, MSX2, MSY2, Tolerance);//This finds the actual item on screen calls the color and the tolerance when finding the o0bject.
  118.     ColorToleranceSpeed(CTS);
  119.  
  120.     if (Length(TPA) < 1) then
  121.       Exit;
  122.  
  123.     MMouse(TPA[0].X, TPA[0].Y, 5, 5);
  124.      if WaitUpText('chop', 400) then//This is the uptext that it waits to see.
  125.     begin
  126.       GetMousePos(X, Y);//this goes to the declared position from FindColorsSpiralTolerance
  127.       ClickMouse2(MC2);//This is the Is the type of mouse Click that you want it to do.
  128.       ChooseOptionMulti(Option);//If the MC2 Was false then you use this to choose the options!
  129.       Result := True;
  130.       Exit;
  131.     end;
  132.  
  133.     Until(Result)
  134.     end;
  135.  
  136.  
  137. begin
  138.   LootColours := [15594232, 15725562];
  139.   SetupSRL;
  140.   ActivateClient;
  141.   DeclarePlayers;
  142.   EatIfLow;
  143.   repeat
  144.     FightCow;                // this will be for repeating action
  145.     EatIfLow;                   // this will be for repating eating
  146.     AntiBan;
  147.     FindObjOnScreen('Take',8290940,1,False,1.73,0.01);
  148.  
  149.  
  150.  
  151.   until(false);
  152.  
  153. end.
Add Comment
Please, Sign In to add comment