Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // by begginer. thanks for using it. Enjoy it :)
- program AttackCow;
- //{$DEFINE SMART}
- {$i SRL/srl.simba}
- {$i SRL/SRL/skill/fighting.simba}
- var
- x: Integer;
- LootColours: TIntegerArray;
- const
- SRLStats_Username = ''; //Insert your SRL stats username here.
- SRLStats_Password = ''; //Insert your SRL stats password here.
- BreakEvery = 120; //How many minutes before breaking?
- BreakFor = 5; //How many minutes to break for?
- Version = '1';
- NumbOfPlayers = 1; //How many players are you using?
- StartPlayer = 0; //Which player will you start with? (0 means first)
- Tolerance = 2;
- procedure DeclarePlayers;
- begin
- NumberOfPlayers(NumbOfPlayers);
- CurrentPlayer := 0;
- Players[0].Name :=''; //Insert player username here.
- Players[0].Pass :=''; //Insert player password here.
- Players[0].Active := True; //Leave True to use this player.
- end;
- function FightCow:Boolean;
- var
- x, y: Integer;
- Begin
- x:=MSCX;
- y:=MSCY;
- begin
- if FindObjCustom(x, y, ['att', 'ack', 'Cow', 'ow'], [4148562, 9018547, 3950926, 7112099, 5007241], 5) then
- Mouse(x, y, 3, 3, true);
- wait(5000+Random(5000)); // Change this if you want for faster attacking. 1000 = 1SECOND
- Writeln('We found a Cow. Attacking it');
- end;
- end;
- procedure AntiBan;
- begin
- Writeln ('Anti-banning');
- x := Random(50) case x of 0: HoverSkill('Attack', false);
- 1:
- HoverSkill('Strength', false);
- 2:
- HoverSkill('Defence', false);
- 3:
- HoverSkill('hitpoints', false);
- 12..15:
- PickUpMouse;
- 16..25:
- RandomMovement;
- 26..27:
- RandomRClick;
- 28..32:
- BoredHuman;
- 33:
- ExamineInv;
- 34..50:
- RandomRClick;
- end;
- Wait(RandomRange(800, 1200));
- end;
- procedure EatIfLow;
- var
- MMColor: string;
- x, y, Lobster: Integer;
- begin
- Lobster := DTMFromString('mlwAAAHicY2dgYJjPxMCwGIoXAvFMIF4AxEuAuJ8RgicB8XQg7oLiDiDm4+NjKLcRZJjtJ86wJVqaYV2EFMP8AHGGbTHSDFxAc3FhRjwYCgD3pg8b');
- begin
- GetMMLevels('hp', MMColor);
- if (MMColor = 'Red') then
- repeat
- if FindDTM(Lobster, x, y, MIX1, MIY1, MIX2, MIY2) then
- begin
- InvMouse(CoordsToItem(x, y), 3);
- if WaitUpText('Eat Lobster', 100) then
- begin
- ClickMouse2(true);
- Wait(RandomRange(350, 525));
- end;
- end else
- Break;
- GetMMLevels('hp', MMColor)
- until((MMColor = 'Green'))
- end;
- FreeDTM(Lobster);
- end;
- Function FindObjOnScreen(Up:String;Color,Tolerance:Integer;MC2:Variant;Hmod,Smod:Extended): Boolean;
- var
- X,Y:Integer;
- CTS,I,T: Integer;
- TPA: TPointArray;
- begin
- repeat
- Result := False;
- CTS := GetColorToleranceSpeed;
- ColorToleranceSpeed(2);
- SetColorSpeed2Modifiers(Hmod,Smod);//These are the modifiers you got from the ACA
- 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.
- ColorToleranceSpeed(CTS);
- if (Length(TPA) < 1) then
- Exit;
- MMouse(TPA[0].X, TPA[0].Y, 5, 5);
- if WaitUpText('chop', 400) then//This is the uptext that it waits to see.
- begin
- GetMousePos(X, Y);//this goes to the declared position from FindColorsSpiralTolerance
- ClickMouse2(MC2);//This is the Is the type of mouse Click that you want it to do.
- ChooseOptionMulti(Option);//If the MC2 Was false then you use this to choose the options!
- Result := True;
- Exit;
- end;
- Until(Result)
- end;
- begin
- LootColours := [15594232, 15725562];
- SetupSRL;
- ActivateClient;
- DeclarePlayers;
- EatIfLow;
- repeat
- FightCow; // this will be for repeating action
- EatIfLow; // this will be for repating eating
- AntiBan;
- FindObjOnScreen('Take',8290940,1,False,1.73,0.01);
- until(false);
- end.
Add Comment
Please, Sign In to add comment