Simba Code:
program BurthorpeCowKiller;
{$DEFINE SMART}
{$DEFINE PAINT}
{$i SRL\SRL.simba}
{$i SRL\SRL\Misc\PaintSmart.simba}
{$i sps\sps.simba}
// By GUCCI
// Coooooochie
{ Instructions:
1. Make sure your SPS maps have been updated.
2. Start at new Taverly Bank with inventory empty.
3. Hit Run. }
const
SRLStats_User = ''; // Your SRL Stats Username
SRLStats_Password = ''; // Your SRL Stats Password
SERVER = 0; // Enter "0" to pick a random server.
MEMBERS = True;
NumbOfPlayers = 1;
StartPlayer = 0;
var
x, y, CowKilled, Hide, HidesCollected:integer;
ToCows, ToBank: TPointArray;
Drops: TStringArray;
procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['XP'];
With Players[0] do
begin
Name := ''; //Username.
Pass := ''; //Password.
Active := True;
end;
end;
function InFight: Boolean;
begin
Result := srl_InFight;
end;
Function OthersInFight: Boolean;
var
x, y, i: integer;
Colors: TIntegerArray;
begin
Colors := [HP_BAR_COLOR1, HP_BAR_COLOR2];
for i := 0 to High(Colors) do
if FindColorTolerance(x, y, Colors[i], MSX1, MSY1, MFBox.X1, MSY2, 0) or
FindColorTolerance(x, y, Colors[i], MSX1, MSY1, MSX2, MFBox.Y1, 0) or
FindColorTolerance(x, y, Colors[i], MFBox.X2, MSY1, MSX2, MSY2, 0) or
FindColorTolerance(x, y, Colors[i], MSX1, MFBox.Y2, MSX2, MSY2, 0) then
begin
Result := True;
Exit;
end;
end;
function IsFightAt(var X, Y: Integer): Boolean;
var
B: TBox;
H, I: integer;
ATPA: T2DPointArray;
Colors: TIntegerArray;
begin
Colors := [HP_BAR_COLOR1, HP_BAR_COLOR2];
H := High(Colors);
SetArrayLength(ATPA, H+1);
B := IntToBox(x-20, y-40, x+20, y+10);
for i := 0 to H do
with B do
FindColorsSpiralTolerance(x, y, ATPA[i], Colors[i], Max(X1, MSX1), Max(Y1, MSY1), X2, Y2, 0);
Result := Length(MergeATPA(ATPA)) > 0;
end;
procedure CowCounting;
begin
IncEx(CowKilled, 28);
IncEx(HidesCollected, 28);
end;
procedure Report;
begin
begin
Writeln('############### Cow Pwner #############');
Writeln('|= Player : ' + Players[CurrentPlayer].Name);
Writeln('|= Time Running : ' + TimeRunning);
Writeln('|= Cows Killed : ' + IntToStr(CowKilled));
Writeln('|= Hides Gotten : ' + IntToStr(HidesCollected));
Writeln('########################################');
end;
end;
{function FindCow(x, y: Integer): Boolean;
var
CTS, I: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.09, 0.62);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 12305611, MSX1, MSY1, MSX2, MSY2, 15);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(TPA, 15, 15);
For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 5, 5);
If(IsUpTextMultiCustom(['ttack, ow, k C'])) then
begin
Result := True;
GetMousePos(x, y);
Break;
end;
end;
end;}
procedure KillCows;
var
Xi, Yi, x: Integer;
begin
SetAngle(SRL_ANGLE_LOW);
Wait(RandomRange(1575, 5686));
if InFight then
begin
repeat
FindNormalRandoms;
until (not (OthersInFight) or (not LoggedIn) or (not InFight))
end;
x := Random(8)
if FindObj(x, y, 'ow', 11974591, 5) then
begin
if not (IsFightAt(Xi, Yi) and not InFight) then
begin
GetMousePos(Xi, Yi);
Mouse(Xi, Yi, 8, 8, True);
end;
while IsMoving do
begin
Wait(225);
end;
end
else
begin
wait(800)
end;
end;
procedure FailSafe (Reason:String);
begin
Players[CurrentPlayer].Loc:=Reason;
Logout;
Stats_Commit;
TerminateScript;
end;
procedure DropVars;
begin
Drops :=['one']
end;
function LootColor: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.04, 0.39);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 9676521, MSX1, MSY1, MSX2, MSY2, 23);
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
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 29.16) and (X <= 88.45) and (Y >= 19.99) and (Y <= 91.36) and (Z >= 6.86) and (Z <= 96.19) then
begin
Result := arC[i];
Writeln('AutoColor = ' + IntToStr(arC[i]));
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
procedure WalkToCows;
begin
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE, ['8_7', '8_6']);
ToCows := [Point(3340, 2981), Point(3362, 2980), Point(3367, 2943),
Point(3374, 2920), Point(3364, 2894), Point(3363, 2872), Point(3374, 2854),
Point(3390, 2836), Point(3406, 2804), Point(3409, 2785), Point(3409, 2756),
Point(3406, 2723), Point(3380, 2699)];
SPS_WalkPath(ToCows);
end;
procedure WalkToBank;
begin
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE, ['8_6', '8_7']);
ToBank := [Point(3377, 2702), Point(3400, 2738), Point(3410, 2757),
Point(3413, 2785), Point(3408, 2815), Point(3393, 2838), Point(3359, 2863),
Point(3365, 2886), Point(3375, 2918), Point(3373, 2948), Point(3368, 2967),
Point(3357, 2981), Point(3342, 2983)];
SPS_WalkPath(ToBank);
end;
procedure Banking;
begin
if SPS_WalkPath(ToBank) then
begin
MakeCompass('E');
SetAngle(SRL_ANGLE_LOW);
OpenBankFast('tavb');
if BankScreen then
DepositAll;
end;
end;
function FindLoot(Var X,Y: Integer): Boolean;
var
CTS: Integer;
TPA: TPointArray;
begin
Result := False;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.04, 0.39);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, LootColor, MSX1, MSY1, MSX2, MSY2, 23);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then
Exit;
MMouse(TPA[0].X, TPA[0].Y, 5, 5);
if WaitUpText('ake', 250) then
begin
GetMousePos(X, Y);
Mouse(x, y, 0, 0, False);
ChooseOptionMulti(Drops);
Result := True;
Inc(Hide);
Exit;
end;
end;
function PickupLoot:Boolean;
var
x, y: Integer;
begin
FindNormalRandoms;
If FindLoot(x, y) Then
begin
While IsMoving do
Wait(25);
FindNormalRandoms;
Wait(RandomRange(300,470));
Mouse(x, y, 0, 0, False);
ChooseOption('ide');
Result := True;
ChooseOption('row');
Result := True;
ChooseOption('arm');
Result := True;
end;
end;
procedure AntiBan;
begin
if(not(LoggedIn))then
exit;
FindNormalRandoms;
case Random(2) of
0:
begin
WriteLn('Skill Check');
RandomRClick;
HoverSkill('random', False);
Wait(900 + Random(500));
end;
end;
end;
procedure FailSafe2 (Reason:String);
var
Z:TPoint;
begin
Z:= SPS_GetMyPos;
if (Not (Distance(Z.X, Z.Y, 3377, 2700) < 35)) then//Change the 25 to whatever you want your distance checking to be.
Begin
BoredHuman;
RandomRClick;
SPS_WalkToPos(Point(3377, 2700));
end;
end;
begin
Smart_Signed := True;
Smart_Members := MEMBERS;
Smart_SuperDetail := FALSE;
Smart_Server := 104;
ActivateClient;
SetupSRL;
DeclarePlayers;
if not (LoggedIn) then
LoginPlayer;
Wait(4000+random(400));
Repeat
WalkToCows;
KillCows;
PickupLoot;
AntiBan;
if InvFull then
WalkToBank;
Banking;
Report;
Until(False)
end.