SCAR Code:
program KIWthief;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{.include srl/srl/reflection/reflection.scar}
{**********************************************************************
__ __ ______ __ __ ______ __ ___
/\ \/\ \ /\__ _\ /\ \ __/\ \ /\__ _\/\ \ __ /'___\
\ \ \/'/'\/_/\ \/ \ \ \/\ \ \ \ \/_/\ \/\ \ \___ /\_\ __ /\ \__/
\ \ , < \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ _ `\/\ \ /'__`\ \ ,__\
\ \ \\`\ \_\ \__\ \ \_/ \_\ \ \ \ \ \ \ \ \ \ \ \/\ __/\ \ \_/
\ \_\ \_\ /\_____\\ `\___x___/ \ \_\ \ \_\ \_\ \_\ \____\\ \_\
\/_/\/_/ \/_____/ '\/__//__/ \/_/ \/_/\/_/\/_/\/____/ \/_/
By Kyleisntwild v2.0
Thanks to:
Seroko for all his help!
ZaSz for his awesome reflection tut.
Vilon for proof reading and various fixes.
Lancerawks aka Lance for his YakPwner script.
Runescapian and The Cnr Sport for their Ess Mining script.
Method for helping me with using reflection for experience tracking.
Only for use at : [url]http://www.villavu.com[/url]
************************************************************************}
var
Attempt, Fail, xp, exp: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
Players[0].Strings[0] := 'uard'; // NPC to pickpocket
Players[0].Integers[0] := 30; // Amount of Health to eat at
// Food Options : cakes, salmon, lobster, swordfish, monkfish, shark
end;
{******** Setup SMART ********}
procedure SetupSMART;
begin
Smart_Members := true;
Smart_Signed := true;
Smart_Server := 100;
Smart_SuperDetail := false;
end;
{******** Find Randoms ********}
procedure FindRandoms;
begin
FindNormalRandoms;
R_FindRandoms;
end;
{******** No Ban Hamma! ********}
procedure AntiBan;
begin
if (not (LoggedIn)) then
Exit;
case Random(60) of
0: RandomRClick;
1: GameTab(1 + Random(12));
2: PickUpMouse;
3: RandomMovement;
4: BoredHuman;
end;
end;
{******** Disguise Title ********}
//Thanks to Seroko!
procedure UpdateDisguise;
begin
Disguise(Players[CurrentPlayer].name + ' has had a ' + IntToStr(Round(fail/attempt*100)) + '% fail rate and has gained ' + IntToStr(GetMySkill(17, false) - xp) + ' exp!');
end;
{******** Proggy ********}
// Thanks to Runescapian and The Cnr Sport
procedure Report;
begin
exp := GetMySkill(17, false) - xp;
ClearReport;
Changereportwidth(400);
SRLRandomsReport;
addtoreport('===========================================');
addtoreport('| KIW Thief |');
addtoreport('===========================================');
addtoreport('|' + padr('Run Time: '+timerunning+'',35) +'|');
Addtoreport('|' + padr('Pickpocket Attempts: '+inttostr(Attempt)+'' , 35)+'|');
Addtoreport('|' + padr('Pickpocket Fails: '+inttostr(Fail)+'' , 35)+'|');
Addtoreport('|' + padr('EXP Gained: '+inttostr(exp)+'' , 35)+'|');
addtoreport('===========================================');
addtoreport('| By KyleIsntWild |');
addtoreport('===========================================');
UpdateDisguise;
end;
{******** End Script ********}
// Thanks to Lance
procedure Terminate(Reason : String);
begin
writeln('Ending script. Reason:' + Reason);
Report;
Logout;
TerminateScript;
end;
{******** Check HP and Eat ********}
// Thanks to Seroko
procedure CheckHP;
var
HP: integer;
FoodIDs, ISlots : TIntegerArray ;
begin
HP := SmartGetFieldArrayInt(0, CurrentLevels, 3);
FoodIDs := [1896, 1894, 1892, 330, 386, 7947, 374, 380]
if (HP < Players[CurrentPlayer].Integers[0]) and (InventoryContainsMulti(FoodIDs, ISlots)) then
MouseItem(ISlots[0],true)
Writeln('Eating.');
else
if (HP < Players[CurrentPlayer].Integers[0]) and not (InventoryContainsMulti(FoodIDs, ISlots)) then
Terminate('Out of food');
end;
{******** Find and thieve NPC ********}
// Thanks to Seroko
procedure FindnThieveNPC;
var
N, P: TNPC;
T: TPoint;
begin
repeat
FindRandoms;
case GetAnimation of
-1: begin
if FindNPC(Players[0].Strings[0], N) then
begin
if not TileOnMS(N.Tile, 0) then
WalkToTile(N.Tile, 1, 0);
FindNPC(N.NPCType, P);
T := TileToMS(P.Tile, 0);
MMouse(P.MS.x, P.MS.y, 5, 5);
if IsupText(Copy(Players[0].Strings[0], 2, 3)) then
begin
Mouse(P.MS.x, P.MS.y, 0, 0, false);
R_ChooseOption('pocket');
Writeln('Found NPC. Pickpocketing...');
Inc(Attempt);
repeat
wait(100+random(100));
until not CharacterMoving;
Wait(RandomRange(500,1000));
end;
end;
end;
881: Wait(RandomRange(500, 2000));
397, 424: begin
Writeln('Pickpocketing attempt failed. Stunned.');
Inc(Fail);
CheckHP;
AntiBan;
Wait(RandomRange(4500, 5000));
end;
end;
Report;
Until(false);
end;
begin
SetupSMART;
SetupSRL;
SetupReflection;
ClearDebug;
DeclarePlayers;
if not LoggedIn then LogInPlayer;
wait(1000);
xp := GetMySkill(17, false);
Attempt := 0;
Fail := 0;
SetAngle(True);
FindRandoms;
SetRun(true);
FindnThieveNPC;
end.