SCAR Code:
program New;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{.include srl/srl/reflection/reflection.scar}
var
g : integer;
procedure DeclarePlayers;//add more if needed
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := 'ham';
Players[0].Active := True; // Use this account?
Players[0].integers[0]:= 3885;
Players[0].BoxRewards := ['XP', 'ostume', 'mote', 'Gem', 'ithril', 'oal'];
end;
procedure antiban;
begin
case random(4) of
1: randommovement;
2: sleepandmovemouse(100 + random (35));
3: begin
hoverskill('Strength', false);
end;
4: boredhuman;
end;
end;
procedure writepos;
var
myposition: TPoint;
begin
MyPosition := GetMyPos;
writeln('Our tile is: '+inttostr(MyPosition.x)+','+inttostr(MyPosition.y));
end;
function pickupcowhides: Boolean;
var
Feathers : array of TGroundItem;
i : integer;
TP : Tpoint;
begin
if FindGroundItems( Feathers, [1739], 10) then
begin
for i := 0 to high(Feathers) do
begin
TP := TileToMS( Feathers[i].Tile, 0);
Mouse( tp.x, tp.y, 3, 3, false);
Wait(385+random(25));
R_ChooseOption('owhide');
repeat
Wait(1);
r_findrandoms;
until (not CharacterMoving);
Wait(650);
end;
end;
Result := True;
end;
function Findcow : boolean; // thnx kyle
var
Cow : TNPC;
TP : TPoint;
begin
repeat
if R_InvFull then
exit;
If FindFreeNPC('Cow', Cow) then
begin
if not TileOnMS(Cow.Tile.x, Cow.Tile.y , 5) then // error line
WalkToTile(Cow.Tile, 1, 0);
TP := TileToMS(Cow.Tile, 5);
Mouse(TP.x, TP.y, 2,3, True);
if WaitForOption('ttack', 5000) then
result := R_ChooseOption('ttack');
end;
//PickupCowhides;
if result then
Inc ;
until (R_InvFull);
end;
function Bankpath:TPointArray;
begin
setlength(result,5);
result[0] := point(3031,3312);
result[1] := point(3020,3319);
result[2] := point(3009,3327);
result[3] := point(3007,3342);
result[4] := point(3012,3356);
end;
function Penpath:TPointArray;
begin
setlength(result,5);
result[0] := point(3008,3326);
result[1] := point(3019,3314);
result[2] := point(3031,3314);
result[3] := point(3031,3304);
end;
function OpenGate : boolean; // gotta give credits
var
x, y : integer;
Begin
If FindObjCustom(x, y, ['Gate'], [4808555, 3559518, 1054232, 1053975], 25) Then
MMouse(x, y, 0, 0);
Wait(200 + Random(200));
Result := IsUpText('lose');
If Result Then Exit;
If IsUpText('pen') Then
Mouse(x, y, 0, 0, True);
Wait(1000 + Random(2000));
Result := True;
End;
procedure walktobank;
var
i :integer;
path : tpointarray;
begin
path := bankpath
if WalkToTile(point(3031,3312), 2, 1) then
opengate;
For I := 0 to High(bankPath) do
Begin
If (WalkToTile(path[i], 2, 1)) Then
R_Flag;
Flag;
R_FindRandoms;
FindNormalRandoms;
Wait(550+Random(300));
end;
end;
procedure Bank;
begin
R_OpenBankBooth('falador east');
R_MouseItemID(1740, 'All');
closewindow;
end;
begin
smart_server := 86;
smart_signed := true;
setupsrl;
declareplayers;
loginplayer;
repeat
if not loggedin then terminatescript;
Findcow;
//walktobank;
until (G = players[currentplayer].integers[0]);
end.