Putnam
2011-02-19 23:51:10
10 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
HTML (and CSS, JavaScript), PHP, VB, A teensy bit of JavaScript & Pascal
Are you a member of any other communities?
programmingseo.com Admin/Owner
linuxadept.com Admin/Owner
theadminzone.com Staff
forums.digitalpoint.com
and about 100 others…
Tell us about yourself…
From: Putnam
I hand out at #SRL and decided I'd take a stab at becoming a member after being here for 3 years. :P
Most of my free time is spent on computers. I like to trade stocks.
If you want to know more just ask around.
I haven't really played RS for 10 years+ but my oldest account was made in 2001. I rarely play RuneScape.
Please show us one (or multiple) of your scripts.
program PutnamsCowRaper;
{$i SRL/SRL/misc/smart.scar}
{$i SRL/SRL.scar}
{$i Reflection/Reflection.simba}
//{---- Putnam's Cow Raper! ----}///
//{------- Version: 0.12 --------}///
//{--- Start at Lumby Castle ---}///
/////////// --Features-- ///////////
//Cow Hide and/or Raw Beef Banking//
/////////////Reflection/////////////
/////////Beefy Bill Banking/////////
///////////Multiple Players/////////
{----------------------------------}
/////// --Upcoming Features-- //////
/////////////SRL-Stats//////////////
//////Accurate Progress Reports/////
/////////////Loads To Do////////////
///////////Cowhide Tanning//////////
///////////World Switching//////////
//////////////Deathwalk/////////////
////////////////////////////////////
{---Credits---)
#SRL
People from #SRL
end Credits---}
{Official Support Thread: [url]http://villavu.com/forum/showthread.php?t=62508[/url] }
procedure DeclarePlayers;
begin
HowManyPlayers := 1; //How many players do you want to run in this script?
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := 'Username'; // Username
Pass := 'password'; // Password
Nick := 'rnam'; // 3-4 lowercase letters from middle of username
Active := True; // Will you be using this player?
//Booleans[0] := True; //Would you like to take breaks? {-- Not Functional Yet --}
Booleans[1] := True; //Collect Beef?
end;
{Simply remove the brackets in order for more players.
Do not forget to change HowManyPlayers!}
{ with Players[1] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
//Booleans[0] := True; //Would you like to take breaks? (if False, when you obtain the specified amount of cowhides, script will log out)
Booleans[1] := True; //Collect Beef?
end; }
{ with Players[2] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
//Booleans[0] := True; //Would you like to take breaks? (if False, when you obtain the specified amount of cowhides, script will log out)
Booleans[1] := True; //Collect Beef?
end; }
{ with Players[3] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
//Booleans[0] := True; //Would you like to take breaks? (if False, when you obtain the specified amount of cowhides, script will log out)
Booleans[1] := True; //Collect Beef?
end; }
end;
Var
I, gained, banked, deaded, ReportTimer :integer;
{--You do not have to edit anything after this line, you're good to go!--}
procedure AntiBan;
Var
X, Y : Integer;
begin
case random(40) of
0..4: BoredHuman;
5..9: MakeCompass('N');
10..14: PickupMouse;
15..19: HoverSkill('random', false);
20..24: Wait(50 + Random(2000));
25..29:
begin //Random Gametab
for I := 0 to Random(2) do
GameTab(21 + RandomRange(0, 16));
end;
30..34: begin
MMouse(Random(500), Random(500), Random(MIX2), Random(MIX2));
Wait(200 + Random(100));
if IsUpText('xamine') then
begin
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, False);
Wait(200 + Random(100));
ChooseOption('xamine');
end;
end;
35..39: RandomRClick;
40: IdleTime(Random(5000), 2, 5.2);
end;
GameTab(Tab_Inv); //Selects inventory tab
end;
function OpenGate: Boolean;
var
TheGate: TRSObject;
MSPos: TPoint;
begin
TheGate:= GetObjectByID(45208, OBJECT_TYPE_WALLOBJECT, 15);
MSPos:= TileToMS(TheGate.Tile, 10);
Mouse(MSPos.x, MSPos.y, 0, 0, False);
Result:= ChooseOptionMulti(['pen', 'ate']);
end;
procedure GetLoot;
var
items: TGroundItemArray;
TempMS: TPoint;
CowHide, Beef: integer;
begin
if not LoggedIn then
Exit;
Items := GetItemsNear(6);
if GetArrayLength(Items) > 0 then
begin
for CowHide := 0 to high(items) do
if items[CowHide].ID = 1739 then // Cow Hide ID #1739
begin
TempMS := TileToMSEx(Items[CowHide].Tile, 0.5, 0.5, 0);
Mouse(TempMS.X, TempMS.Y, 1, 1, false);
if R_WaitOption('owhide', 1000) then
IncEx(gained,1);
IncEx(deaded,1);
IncEx(Players[CurrentPlayer].Integers[0],1);
Wait(400+Random(500));
end;
end;
if Players[CurrentPlayer].Booleans[1] = True then
begin
for Beef := 0 to high(items) do
if items[Beef].ID = 2132 then // Raw Beef ID #2132
begin
TempMS := TileToMSEx(Items[Beef].Tile, 0.5, 0.5, 0);
Mouse(TempMS.X, TempMS.Y, 0, 0, false);
if R_WaitOption('aw beef', 1000) then
IncEx(gained,1);
IncEx(Players[CurrentPlayer].Integers[0],1);
Wait(400+Random(500));
end;
end;
end;
function Slaughter: Boolean; //Player kills the innocent cow
var
CowSpot: TTileArray;
Cow: TNPC;
P: TPoint;
KillCowTime: Integer;
begin
Result := False;
if not LoggedIn then Exit;
R_FindRandoms;
if (TimeFromMark(KillCowTime) > 30000)then
begin
CowSpot := [Tile(3164,3323)];
WalkPath(CowSpot);
end;
SetAngle(True);
FindNPC('Cow', Cow);
P := TileToMSEx(Cow.Tile, 0, 0, 200+Random(300));
Mouse(P.X - Random(1), P.Y - Random(1), 0, 0, False);
Result := r_WaitOption('ttack', 100);
Wait(1000+Random(500));
if not AreWeInteracting(Cow) then
MarkTime(KillCowTime);
GetLoot;
end;
function hInvFull: Boolean; // n3s
begin
if (not LoggedIn) or LobbyScreen then
begin
Result := False;
Exit;
end;
Result := (InvCount = 28);
end;
procedure Bill; //Player finds Beefy Bill, gives him his shit
var
P, B, C, D : TPoint;
HideDTM, BeefDTM, tx, ty :Integer;
BeefyTile: TNPC;
ToBill: TTileArray;
begin
if not LoggedIn then
Exit;
HideDTM := DTMFromString('mggAAAHicY2NgYAhmYmCIA+IoIPYBYk8g9gNiJkYGht9AeQ4gzckI4f8E8pfMncswZ+pUhsVzZjNsXrOaYevatQwbVqxg4AfKYcOMODAEAAC35RAF');
BeefDTM := DTMFromString('mlwAAAHicY2dgYKhhYmBoBeI2Jgi7CIprgZiNkYHhC1ANA5DmBWIuIGYG4n9AoRULFzD0tLUxNNfWMqxespjhxP79DG0ywgxrly5l4AfK48KMeDAUAABqrhHj');
if hInvFull then
Writeln('Walkin to Mr. Bill');
SetRun(True);
if (FindSymbol(D.X, D.Y, 'store')) then
begin
Writeln('Found the General Store symbol');
Mouse(D.X, D.Y, 5, 5, True);
Wait(100+Random(2000));
end else
begin
Writeln('Could not find store symbol, using Reflection');
ToBill :=[Tile(3169, 3321)];
WalkPath(ToBill);
if (FindSymbol(D.X, D.Y, 'store')) then
begin
Mouse(D.X, D.Y, 5, 5, True);
Wait(100+Random(3000));
Writeln('Found the General Store symbol');
end;
SetAngle(True);
end;
FFlag(0);
Wait(1000+Random(500));
if FindNPC('eefy', BeefyTile) then
begin
if Players[CurrentPlayer].Booleans[1] = True then
begin
if FindDTM(BeefDTM, B.X, B.Y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(B.X, B.Y, 5, 5, True);
Wait(500);
FindNPC('eefy', BeefyTile);
P := TileToMS(BeefyTile.Tile, 614);
Mouse(P.X, P.Y, 5, 5, True);
Wait(500);
ClickToContinue;
Wait(500)
if FindTextTPAEx(clBlack, 0, MCX1, MCY1, MCX2, MCY2, tx, ty, ', Bill keeps 1', CharsNPC, Nothing) then
begin
Mouse(tx, ty, 1, 1, True);
end else
begin
FindTextTPAEx(clBlack, 0, MCX1, MCY1, MCX2, MCY2, tx, ty, ', Bill keeps 2', CharsNPC, Nothing);
Mouse(tx, ty, 1, 1, True);
end;
ClickToContinue;
Wait(500+Random(1000));
IncEx(Banked,9);
end else
Writeln('No Beef');
Wait(500);
end;
if FindDTM(HideDTM, C.X, C.Y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(C.X, C.Y, 5, 5, True);
Wait(500);
FindNPC('eefy', BeefyTile);
P := TileToMS(BeefyTile.Tile, 614);
Mouse(P.X, P.Y, 5, 5, True);
Wait(300+Random(5000));
ClickToContinue;
Wait(500+Random(500));
if FindTextTPAEx(clBlack, 0, MCX1, MCY1, MCX2, MCY2, tx, ty, ', Bill keeps 1', CharsNPC, Nothing) then
begin
Mouse(tx, ty, 1, 1, True);
end else
begin
FindTextTPAEx(clBlack, 0, MCX1, MCY1, MCX2, MCY2, tx, ty, ', Bill keeps 2', CharsNPC, Nothing);
Mouse(tx, ty, 1, 1, True);
end;
ClickToContinue;
Wait(500+Random(1000));
IncEx(Banked,9);
end else
Writeln('No Hides');
Wait(100+Random(2000));
end;
end;
//Ohai
procedure CowWalker;
var
ToCows, CowSpot : TTileArray;
begin
ToCows := [Tile(3225, 3235), Tile(3218, 3250), Tile(3215,3269), Tile(3199, 3278), Tile(3189, 3285), Tile(3187, 3302), Tile(3176, 3312)];
CowSpot := [Tile(3164,3323)];
MakeCompass('N');
SetAngle(True);
WalkPath(ToCows);
OpenGate;
Wait(100+Random(500));
WalkPath(CowSpot);
end;
procedure PrintOnSmart(TP: TStringArray; Placement: TPoint; Colour, Shadow: integer); //BobboHobbo
var
mx, my, Pic, I, B, H, TPH, Numb: Integer;
TTP: TPointArray;
Canvas: TCanvas;
begin
SmartSetDebug(True);
GetClientDimensions(mx,my);
Pic := BitmapFromString(mx,my,'');
TPH := High(TP);
for I := 0 to TPH do
begin
TTP := LoadTextTPA(TP[i], SmallChars, H);
for B := 0 to High(TTP) do
begin
Numb := ((I + 1) * 13);
FastSetPixel(Pic, TTP[b].x + 1, TTP[b].y + Numb + 1, Shadow);
FastSetPixel(Pic, TTP[b].x, TTP[b].y + Numb, Colour);
end;
end;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(Pic, Canvas, Placement.x, Placement.y);
FreeBitmap(Pic);
end;
procedure BasicProggy;
begin
PrintOnSmart([' Putnam''s Cow raper'],Point(15, 30), 62207, 131072);
PrintOnSmart([
'Time Running: ' + TimeRunning,
'Players active: ' + ToStr(PlayersActive) + '/' + ToStr(HowManyPlayers),
'Gained: ' + IntToStr(Gained) + ' cow parts',
'Banked: ' + IntToStr(Banked) + ' cow parts',
'Rate: ' + IntToStr(Round((Gained * 3600) / (GetTimeRunning / 1000))) + ' Cow Parts Per Hour',
'',
''], Point(20, 60), 1959605, 131072);
end;
procedure Perogy; { Jason2gs, :3 }
begin
ClearDebug;
SRLRandomsReport;
Writeln('[REPORT]');
Writeln('PCR Perogy Report');
Writeln('Script Worked for ' + TimeRunning);
Writeln('Gained ' + IntToStr(Gained) + ' cow hides/beef.');
Writeln('Banked ' + IntToStr(Banked) + ' cow hides/beef.');
Writeln('Deaded ' + IntToStr(Deaded) + ' cows.');
Writeln('Rate: ' + IntToStr(Round((Gained * 3600) / (GetTimeRunning / 1000))) + ' Cow Parts/Hour');
Writeln('[/REPORT]');
end;
end;
procedure MainLoop;
var
Cow: TNPC;
begin
LogInPlayer;
SetAngle(True);
MakeCompass('North');
repeat
repeat
CowWalker;
repeat
if (TimeFromMark(ReportTimer) > 60000)then // 1 minute
begin
Perogy;
AntiBan;
MarkTime(ReportTimer);
end;
BasicProggy
if hInvFull then
begin
Wait(200+Random(600));
Writeln('Inv Full');
Bill;
Perogy;
end;
Slaughter;
until False;
if (not LoggedIn) or LobbyScreen then
begin
Wait(5000+Random(5000));
if (not LoggedIn) or LobbyScreen then Break else Wait(1);
end;
until False;
if LobbyScreen then
LeaveLobby;
WriteLn('Detected as logged out, NPlayer');
NextPlayer(Players[CurrentPlayer].Active);
until False;
end;
begin
ClearDebug;
SetupSRL;
DeclarePlayers;
LoginPlayer;
Mainloop;
end.
Updated version of script here: http://villavu.com/forum/showthread.php?t=62508
