Sawyer
2013-01-25 00:03:13
This is my first attempt at a real script, so here it goes. I wasn't really getting enough testers at the "First Script" Section. It has been working well for me, but there is not currently any truly long tests. Start in the Varrock East Bank with empty vials viewable in your bank. No Pin support, sorry.
Use this map. Save it to Simba/Includes/sps/img/runescape_other and it should work :)
program EdgeVialFiller;
{$DEFINE SMART8}
{$I SRL/SRL.Simba}
{$i sps/sps.simba}
var
Status:String;
ToFountain:tpointarray;
ToBank:tpointarray;
procedure DeclarePlayers;
begin
Status := ('Logging in player.')
writeln('Logging in player.')
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; // Player username
Pass := ''; // Player password
Active := True;
end;
end;
procedure SetupSmartClient;
begin
SRL_SixHourFix := True;
SMART_FixSpeed := True;
ClearDebug;
SetupSRL;
ActivateClient;
DeclarePlayers;
LoginPlayer;
SymbolAccuracy := 0.4;
end;
Procedure SetupBot;
begin
ClickNorth(0);
SPS_WalkPath(ToBank);
end;
Procedure Antiban; // Credit to Solidone40
Begin
Status :=('Antiban')
writeln('Antiban.')
Case Random(100) Of
1: HoverSkill('magic', False); //replace 'magic' with 'skill'
2: HoverSkill('random', False);
3: Boredhuman;
4: Wait(2500 + random(4500));
5: HoverSkill('smithing', False); // replace 'smithing' with 'skill', or delete.
6: PickUpMouse;
7: RandomMovement;
8: RandomRClick;
end;
mouse(658, 188, 3, 3, true);
end;
Procedure FindVials;
var
X, Y:Integer;
begin
Status :=('Opening bank and retrieving empty vials.');
writeln('Opening bank and retrieving empty vials.');
if BankScreen then
begin
if InvFull then
begin
DepositAll;
end;
FindObjCustom(x, y, ['Vial', 'Via'], [6578271, 6775650, 6051928], 2);
Mouse(x, y, 2, 2, false);
ChooseOption('All')
wait(Randomrange(500, 1000));
end;
if not BankScreen then
begin
FindObjCustom(x, y, ['Ban', 'Bank', 'Banker'], [4796471, 2889756, 3809319, 4796471, 3285286], 15);
Mouse(x, y, 2, 2, false);
ChooseOption('Bank Banker');
wait(randomrange(1500, 2000));
if InvFull then
begin
DepositAll;
end;
if FindObjCustom(x, y, ['Vial', 'Vial'], [6578271, 6775650, 6051928], 5) then
Mouse(x, y, 2, 2, false);
ChooseOption('All')
end;
begin
wait(Randomrange(500, 1000));
CloseBank;
Sps_walkpath(ToFountain);
Antiban;
end;
end;
Procedure FillVials;
var
x, y, EmptyVial, FillScreen:Integer;
begin
Status :=('Filling Vials...')
Writeln('Filling Vials...')
EmptyVial := DTMFromString('mKgEAAHic42NgYHBkYmBwA2JPIPYBYlcgtgViCyC2BmI7KN8JiN2h6kB6pBkZGEQZIbQCEKsCsQqULQnEQkDMB8TsQMwLxMpQNQkJKUBbmUjGzECSHMxIJkYFACLaBrc=');
wait(randomrange(1000, 1500));
if FindDTM(EmptyVial, x, y, 551, 257, 724, 505) then
writeln('Found Vials in inventory.');
Mouse(x, y, 2, 2, false);
ChooseOption('Use');
if not FindDTM(EmptyVial, x, y, 551, 257, 724, 505) then
writeln('Did not find vials in inventory.');
if FindObjCustom(x, y, ['Vial', 'use', 'Use', 'Foun'], [16100232, 14786173, 13800052], 5) then
Mouse(x, y, 2, 2, false);
chooseoption('Use Vial');
wait(2000);
FillScreen := BitmapFromString(32, 13, 'meJylkT0KwlAQhJsk/jTewcZ7CD' +
'aCrU0qi1SpBAtFvYGdrYWNjV5F8BBexIV9DEN29ykIXzHs/PBI6ml' +
'Z/8ZoPBHy2rKaFUCTFrVez7egF1fzFGjmlYKkJbPJGlNMuyiVTotB' +
'QHW0jylmtywUTuLI6Fon+bV1rCuFkzi6bqRtSzg1PSXzfazrakwx5' +
'7av/P9/McVc1onM+63rakwx181A4SSOrhtp2xJu2wQncXTdSNuW8D' +
'gMFU7i6LqRti3hvk9wEkfXjbRtCR8mW9lU');
wait(1000);
FindBitmapToleranceIn(FillScreen, x, y, MSX1, MSY1, MSX2, MSY2, 5);
writeln('Found Fill Screen.');
wait(randomrange(500, 1000));
mouse(x, y, 5, 5, true);
wait(randomrange(16000, 20000));
FreeBitmap(FillScreen);
FreeDTM(EmptyVial);
SPS_WalkPath(ToBank);
Antiban;
end;
procedure Bank;
var
x, y, VialOfWater:Integer;
begin
VialOfWater := DTMFromString('mPwEAAHic42dgYHBkYmDwAGIfIHaCsr2A2A2I3Zkg8rZQbAXFdkBsAcTSjAwMEkCsAMSqQKwMxDJALAzEfEDMDqVFGSFqQfIqQCwHxJUNW4G2M5GFmYEkuZiRAowGAF32B6A=');
Status :=('Banking.')
writeln('Banking.')
wait(randomrange(2000, 3500));
if FindObjCustom(x, y, ['Ban', 'Bank', 'Banker'], [4796471, 2889756, 3809319, 4796471, 3285286], 15) then
begin
Mouse(x, y, 2, 2, false);
wait(500);
ChooseOption('Bank Banker');
wait(randomrange(1000, 1250));
if FindDTM(VialOfWater, x, y, 551, 257, 724, 502) then
begin
wait(randomrange(750, 1500));
mouse(x, y, 2, 2, false);
chooseOption('All');
end;
end;
if not FindDTM(VialOfWater, x, y, 551, 257, 724, 502) then
writeln('Could Not find vials to bank in your inventory.');
FreeDTM(VialOfWater);
end;
Procedure Paths;
begin
ToFountain := [Point(126, 134), Point(126, 121), Point(115, 113), Point(100, 112), Point(87, 113), Point(76, 110), Point(69, 97)]
ToBank := [Point(62, 98), Point(72, 110), Point(86, 114), Point(99, 113), Point(115, 112), Point(126, 116), Point(128, 126), Point(127, 139), Point(125, 151)]
end;
procedure testpath;
begin
if sps_walkpath(ToFountain) then
status := 'walking to the fountain'
else begin
status :='failed walking to the fountain';
writeln(status + ' + time running:' +timerunning);
end;
writeln(status + ' + time running:' +timerunning);
end;
begin
SetupSmartClient;
SPS_Setup(runescape_other,['Varrock_East_Bank']);
Paths;
SetupBot;
//testpath;
repeat
FindVials;
FillVials;
Bank;
Until(Allplayersinactive)
end. [ATTACH=CONFIG]18817[/ATTACH]Use this map. Save it to Simba/Includes/sps/img/runescape_other and it should work :)