Runaway
2011-12-13 04:09:49
KleptoMage
Version: 0.8
———————————————–
Version: 0.8
———————————————–
Description
KleptoMage thieves nature runes from the Ardougne nature chest for profit or uses them to high/low alch any item you choose.
How to Use
- Fill in the required areas of the script
- Place the item you want to alch in the first slot of your inventory.
- Place one or more nature runes in the second slot of your inventory.
- Equip a fire staff, equivalent staff, or place fire runes in the 3rd slot.
- Go to the nature chest and run!
Current Bugs
- Spellbook not working
program KleptoMage;
//{$i SRL\SRL\Misc\Smart.scar}
{$i SRL\SRL.scar}
{$i SRL\SRL\Skill\Magic.SCAR}
const
TimeToRun = 120; // Minutes to run the script for
ItemToAlch = 'une arrow'; // Uptext of the item you want to alch
Version = '0.8';
var
StartTime, Steals1, Steals2, Alchs, MageLevel: integer;
ToCast: string;
procedure DeclarePlayers;
var
i:integer;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
for i := 0 to (HowManyPlayers-1) do
Players[i].BoxRewards := ['XP', 'ostume', 'mote', 'oins', 'une', 'ssence'];
with Players[0] do
begin
Name := ''; // Player username
Pass := ''; // Player password
Nick := ''; // Player nickname ~ 3-4 letters of Player username.
Active := True;
Booleans[0] := False; // Set to true to alch after every steal
end;
end;
procedure Currently(doing: string);
begin
Status(doing);
Disguise(doing);
end;
procedure Antiban;
begin
Currently('Antiban...');
case Random(40) of
1: PickUpMouse;
2: BoredHuman;
3: RandomAngle(1);
4: RandomRClick;
5,6: Wait(500+random(1000));
end;
end;
procedure RandomSpins;
var
ToSpin: integer;
begin
Currently('Rotating screen...');
ToSpin := Random(10)
if (ToSpin = 1) then RandomMovement;
end;
procedure AntiRandoms;
begin
Currently('Antirandoms...');
FindNormalRandoms;
LampSkill := 'thieving';
LevelUp;
end;
procedure ProgressReport;
begin
ClearDebug;
WriteLn(' Runaways Version: ' + Version + '!');
WriteLn(' _ _ _ ___ ___ ___ ___ _ _ ___ ___ ___ ');
WriteLn(' | / /| |_ / o_| o_|_ _| o |/ \/ \| o |_o \/ o_| ');
WriteLn(' |_\_\|___|\___|_| |_||___|_|\/|_|_|_|___/\___| ');
WriteLn('------------------------------------------------- ');
WriteLn('\ Running for: ' + IntToStr(TimeFromMark(StartTime) / 60000) + ' Minutes');
WriteLn('| Thieving XP gained: ' + IntToStr((Steals1*25)+(Steals2*125)) + ' XP');
Writeln('| Magic XP gained: '+ IntToStr(Alchs*65) + ' XP');
Writeln('| Coins stolen: '+ IntToStr((Steals1*3)+(Steals2*50)) + ' GP');
Writeln('/ Natures stolen: '+ IntToStr(Steals1) + ' Nats');
WriteLn('------------------------------------------------- ');
end;
function FindChest: Boolean;
var
x1, y1, x, y, w, h, i:integer;
TPA: TPointArray;
begin
Currently('Searching for chest...');
GetClientDimensions(w, h);
x1 := ((w-250)/2) + 5;
y1 := ((h-170)/2) + 5;
FindColorsSpiralTolerance(x1, y1, TPA, 4875107, 5, 5, w-255, h-165, 1);
for i := 0 to High(TPA) do
begin
MMouse(TPA[i].x, TPA[i].y, 5, 5);
if WaitUptext('hest', 1000) then
begin
Currently('Found chest, opening...');
GetMousePos(x, y);
Mouse(x, y, 0, 0, false);
Result := WaitOption('earch', 2000)
Currently('Winning.');
Wait(5000+random(1000));
break;
end;
end;
end;
function CheckNats: Boolean;
begin
GameTab(tab_Inv);
MMouseItem(2);
Result := WaitUptext('ature', 1000)
end;
procedure Alch;
begin
if CheckNats then
begin
Currently('Alching...');
GameTab(tab_Magic);
Cast(ToCast, false);
MMouseItem(1);
if WaitUptext(Lowercase(ItemToAlch), 1000) then
begin
Alchs := Alchs+1
MouseItem(1, true);
Wait(2000+random(1000));
end;
GameTab(tab_Inv);
end;
end;
function CheckAlchItem: Boolean;
begin
GameTab(tab_Inv);
MMouseItem(1);
Result := WaitUptext(ItemToAlch, 1000)
WriteLn('Alching: ' + ItemToAlch);
end;
procedure CheckMage;
begin
GameTab(tab_Stats);
MageLevel := GetSkillLevel('magic');
WriteLn('Magic Level: ' + IntToStr(MageLevel));
case MageLevel of
1, 20: Exit;
21,54: ToCast := 'low level alchemy';
55,99: ToCast := 'high level alchemy';
end;
GameTab(tab_Inv);
end;
procedure SetupScript;
begin
Steals1 := 0;
Steals2 := 0;
Alchs := 0;
//AntiRandoms;
Currently('Setting up the script...');
SetAngle(true);
if (Players[CurrentPlayer].Booleans[0]) then
begin
CheckAlchItem;
CheckMage;
end;
MarkTime(StartTime);
ProgressReport;
end;
procedure MainLoop;
begin
repeat
MouseSpeed := 16 + RandomRange(-1, +4);
while (not(FindChest)) do
begin
if (Players[CurrentPlayer].Booleans[0]) then
begin
Alch;
Wait(1000+random(500));
end;
Antiban;
Wait(500+random(500));
RandomSpins;
if FindChest then break;
end;
ProgressReport;
until(TimeFromMark(StartTime) > (TimeToRun * 60000));
end;
begin
ClearDebug;
Smart_Server := 10;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
SetupSpells;
DeclarePlayers;
ActivateClient;
if not LoggedIn then LoginPlayer;
SetupScript;
MainLoop;
end.Update Log
v 0.5
- Initial release
v 0.6
- Improved timing
- Better progress report
- Automatic high/low alch detection
- Better alching
- Better chest finding
- Added a few failsafes
v 0.8
- More human-like antiban
- Optimized chest searching and looting speed