tootallmatt
2012-03-05 02:44:39
My first release…..
The Butcher!
What it does:
Make sure your inventory is empty because it will drop anything that isn't a bone. Thanks.
The Butcher!
What it does:
- Kills cows near Lumbridge.
- Collects the bones.
- Once inventory is full, it buries the bones.
- Trains multiple skills!
- High enough level to survive cows without eating.
Make sure your inventory is empty because it will drop anything that isn't a bone. Thanks.
program TheButcher;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i SRL/SRL/misc/paintsmart.simba}
CONST
NumbOfPlayers = 1; //How Many Players
StartPlayer = 0; //Starting Player
Version = 0.4; //Much More To Come!
VAR
CowColor : Array [0..4] of Integer;
CowText, DropsText : Array [0..1] of String;
AvoidText : Array [0..11] of String;
Procedure DeclarePlayers;
var
i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['XP', 'xp', 'lamp'];
with Players[0] do
begin
Name := '';
Pass := '';
Active := True;
end;
end;
procedure SetColorsAndText;
begin
CowColor[0] := 6186605; //dark
CowColor[1] := 3755606; //medium
CowColor[2] := 8819356; //light
CowColor[3] := 7378090; //calf
CowColor[4] := 7375530; //calf2
DropsText[0] := 'Bones';
DropsText[1] := 'ones';
CowText[0] := 'Attack Cow';
CowText[1] := 'ttack Cow';
AvoidText[0] := 'ilk';
AvoidText[1] := 'rized';
AvoidText[2] := 'airy';
AvoidText[3] := 'illie';
AvoidText[4] := 'roats';
AvoidText[5] := 'ick P';
AvoidText[6] := 'alk-t';
AvoidText[7] := 'hop';
AvoidText[8] := 'hicken';
AvoidText[9] := 'oblin';
AvoidText[10] := 'alk';
AvoidText[11] := 'xamine';
end;
procedure AdjustCompass;
Begin
MakeCompass(RandomRange(1, 360));
Wait(1500+Random(100));
WriteLn ('Searching...');
Smart_ClearCanvas;
end;
procedure AntiBan;
begin
if not LoggedIn then
TerminateScript;
case Random(5) of
0: BEGIN
Writeln('AntiBan in progress...');
case Random(500) of
0..10: begin GameTab(tab_stats) HoverSkill ('Attack', false) GameTab(Tab_Inv); end;
21..31: begin GameTab(tab_stats) HoverSkill ('Strength', false) GameTab(Tab_Inv); end;
42..52: begin GameTab(tab_stats) HoverSkill ('Defense', false) GameTab(Tab_Inv); end;
63..73: begin GameTab(tab_stats) HoverSkill ('Prayer', false) GameTab(Tab_Inv); end;
84..94: begin ExamineInv; end;
105..115: begin PickUpMouse; end;
126..136: begin
GameTab(RandomRange(tab_Combat, tab_Notes));
Wait(800+Random(300));
GameTab(Tab_Inv);
end;
137..142: begin
case Random(40) of
0: TypeSend('I love this game!');
1: TypeSend('Die!');
2: TypeSend('Stupid cows!');
3: TypeSend('How much is the hide worth?');
end;
end;
end;
END;
1..4: BEGIN
WriteLn ('AntiBan was bypassed!');
EXIT;
END;
end;
AdjustCompass;
end;
Function LocateBones: TPointArray;
var
B,HPB: TBox;
TP,MHPB,MNPCB: TPoint;
TPA,GPA,RPA,
GPB,RPB,RTPA,PBox: TPointArray;
i,l,CTS,R: Integer;
ATPA: T2DPointArray;
begin
CTS := GetColorToleranceSpeed;
PBox := TPAFromBox(IntToBox(245, 135, 280, 185));
ColorToleranceSpeed(3);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 13290707, MSX1, 25, MSX2, MSY2, 3); //12763851 15527671 14803948 15001070
if (Length(TPA) < 1) then
begin
ColorToleranceSpeed(CTS);
Exit;
end;
TPA := ClearTPAFromTPA(TPA, PBox);
ATPA := TPAtoATPAEx(TPA, 30, 30);
l := High(ATPA);
SetArrayLength(ATPA, l+1);
for i := 0 to l do
begin
if (Length(ATPA[i]) > 20) then
B := GetTPABounds(ATPA[i])
else
Continue;
with B do
begin
TP := Point(((B.X1+B.X2)/2), B.Y1);
if (TP.X < MSX1) then
TP.X := MSX1;
if (TP.Y < MSY1) then
TP.Y := MSY1;
HPB:= IntToBox(TP.X-30, TP.Y-40, TP.X+30, TP.Y+40);
if (HPB.X1 < MSX1) then
HPB.X1 := MSX1;
if (HPB.X2 > MSX2) then
HPB.X2 := MSX2;
if (HPB.Y1 < MSY1) then
HPB.Y1 := MSY1;
if (HPB.Y2 > MSY2) then
HPB.Y1 := MSY2;
MHPB := Point(((HPB.x1+HPB.x2)/2), ((HPB.y1+HPB.y2)/2));
MNPCB := Point(((B.x1+B.x2)/2), ((B.y1+B.y2)/2));
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MNPCB.X, MNPCB.Y, GPA, 52354, B.X1, B.Y1, B.X2, B.Y2, 10);
FindColorsSpiralTolerance(MNPCB.X, MNPCB.Y, RPA, 524459, B.X1, B.Y1, B.X2, B.Y2, 10);
FindColorsSpiralTolerance(MHPB.X, MHPB.Y, GPB, 52354, HPB.X1, HPB.Y1, HPB.X2, HPB.Y2, 10);
FindColorsSpiralTolerance(MHPB.X, MHPB.Y, RPB, 524459, HPB.X1, HPB.Y1, HPB.X2, HPB.Y2, 10);
ColorToleranceSpeed(CTS);
if ((Length(GPA) = 0) and (Length(RPA) = 0)
and (Length(GPB) = 0) and (Length(RPB) = 0)) then
begin
SetArrayLength(RTPA, (Length(RTPA)+1));
RTPA[R] := MNPCB;
Inc(R);
end;
end;
end;
SortTPAFrom(RTPA, Point(MSCX, MSCY));
Result := RTPA;
end;
Function GrabBones:Boolean;
var
TheBones: TPoint;
TPA: TPointArray;
begin
TPA := LocateBones;
if (Length(TPA) > 0) then
begin
TheBones := TPA[0];
Smart_DrawBoxEx(False, IntToBox(TheBones.X-3, TheBones.Y-3, TheBones.X+3, TheBones.Y+3), 196333);
MMouse(TheBones.X, TheBones.Y, 1, -1);
if WaitUpText('ake', 400) then
begin
ClickMouse2(False);
if WaitOption('ake Bo', 400) then
WriteLn ('Grabbing Bones!');
Smart_ClearCanvas;
end else
if WaitUpText('ttack Cow', 400) then
begin
ClickMouse2(False);
if WaitOption('ttack', 400) then
WriteLn ('Found bone color on a cow, so we attack!');
Smart_ClearCanvas;
end else
if WaitUpText('ilk ', 400) then
begin
Smart_ClearCanvas;
AntiBan;
WriteLn ('Hmm...We dont need any milk!');
end;
end;
Result := True;
end;
Function KillCows:Boolean;
Var
myX, myY: Integer;
Begin
myX:=MSCX;
myY:=MSCY;
if WaitUpTextMulti(AvoidText, 500+Random(25)) then
AntiBan;
if FindObjTPAMulti(myX, myY, CowColor, 2, 1, 20, 20, 7, CowText) then
ClickMouse2(False);
if WaitOption('ttack', 400) then
WriteLn ('Killing Cows!');
Result := True;
End;
procedure BuryAll;
var i: integer;
begin
repeat
for i:= 1 to 28 do
if ExistsItem(i) then
begin
MMouseItem(i);
if WaitUpTextMulti(['Bury', 'ones'], 400) then
begin
ClickMouse2(False);
if WaitOption('Bury', 400) then
end
else
begin
ClickMouse2(False);
if WaitOption('Drop', 400) then
end;
end;
until(InvEmpty);
WriteLn ('Inventory Emptied!');
end;
{|||||||||||||||||||||||||||||||||||||||||||
|| // ////// ////// /////// ||
|| // // // // // // // ||
|| // // // // // /////// ||
|| // // // // // // ||
|| ////// ////// ////// // ||
|||||||||||||||||||||||||||||||||||||||||||}
Var
Complete : Boolean;
begin
SetupSRL;
DeclarePlayers;
LoginPlayer;
SetColorsAndText;
SetAngle(SRL_ANGLE_HIGH);
Repeat
if not LoggedIn then
LoginPlayer;
SetAngle(SRL_ANGLE_HIGH);
if(InvFull)then
BuryAll
else
begin
Complete := KillCows;
Complete := GrabBones or Complete;
if(not Complete) then
AntiBan;
end;
Until(false);
end.