yvw master
2008-10-13 04:01:49
Fills vials from the fountain by Varrock East Bank! Might still be a little buggy. Somewhat rarely it fails to find the empty vial DTM in the bank although i redid the DTM a good 4 times. If anyone else gets a similar bug and knows a solution please post it!
Also, DO NOT RUN SCRIPT WITHOUT WATCHING IT. As I said before it sometimes doesn't find the DTM and for some reason when it detects there are no empty vials left in the bank I can't get it to log out or exit, any help with this would also be greatly appreciated.
Shouldn't have to pick fountain color.
Start in the bank with full inventory of empty vials. I've only had the chance to watch it do a load of around 300 and it did so successfully.
.
Has AntiBan and AntiRandom(which I haven't seen in action yet)
My standards might be a little messed up too. Anyway, here it is.
(thank you to BlumbleBee, Andyz55, TheVoiceInYourHead, Cazax, and noidea for replying/helping in my 'script help' thread)
Also, DO NOT RUN SCRIPT WITHOUT WATCHING IT. As I said before it sometimes doesn't find the DTM and for some reason when it detects there are no empty vials left in the bank I can't get it to log out or exit, any help with this would also be greatly appreciated.
Shouldn't have to pick fountain color.
Start in the bank with full inventory of empty vials. I've only had the chance to watch it do a load of around 300 and it did so successfully.
.
Has AntiBan and AntiRandom(which I haven't seen in action yet)
My standards might be a little messed up too. Anyway, here it is.
(thank you to BlumbleBee, Andyz55, TheVoiceInYourHead, Cazax, and noidea for replying/helping in my 'script help' thread)
program VialFiller;
{.Include SRL\SRL\Misc\Smart.Scar}
{.Include SRL\SRL.Scar}
{.Include SRL\SRL\reflection\Reflection.Scar}
//////////////////////////
Procedure SetupSmart;
Begin
SmartSetup('world44', True, True, False);//////set world for smart
Wait(1000);
SetTargetDC(SmartGetDC);
end;
//////////////////////////
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'username';// Your UserName
Players[0].Pass := 'password';// Your PassWord
Players[0].Nick := 'nickname';// Your Nick (3-4 letters from your username)
Players[0].Active := True;// Use this player ??}
end;
//////////////////////////
Procedure AntiRandom;
begin
if not LoggedIn then Exit;
FindNormalRandoms;
if FindFight then
RunAway('N', True, 1, 5000);
end;
//////////////////////////
Procedure AntiBan;
begin
case random(70) of
0: RandomRClick;
1: BoredHuman;
2: BoredHuman;
3: PickUpMouse;
4: PickUpMouse;
5: PickUpMouse;
6: PickUpMouse;
7: PickUpMouse;
8: Wait(15000 + Random(15000));
9: Wait(30000+ Random(20000));
end;
end;
//////////////////////////
function LoadToPath: TPointArray;
begin
SetLength(Result, 2);
Result[0] := Point(3246, 3431);
Result[1] := Point(3239, 3435);
end;
//////////////////////////
Procedure WalkToFountain;
Var
I: Integer;
Path: TPointArray;
Begin
Path := LoadToPath;
for i := 0 to High(Path) do
Begin
WalkToTile(Path[i], 2, 0);
end;
Wait(2000 + Random(2000));
end;
//////////////////////////
function LoadFromPath: TPointArray;
begin
SetLength(Result, 2);
Result[0] := Point(3252, 3428);
Result[1] := Point(3252, 3419);
end;
//////////////////////////
Procedure WalkFromFountain;
Var
I: Integer;
Path: TPointArray;
Begin
Path := LoadFromPath;
for i := 0 to High(Path) do
Begin
WalkToTile(Path[i], 2, 0);
end;
Wait(900 + Random(300));
end;
//////////////////////////
//////////////////////////
Function FindFountain : boolean;
Var
Bx, By : Integer;
Full : Integer;
Empty : Integer;
WaitTime : Integer;
x1, y2 : Integer;
SearchCount : Integer;
label
Search;
Begin
Flag;
Flag;
SearchCount := 0;
Search: //////////////INSERT FOUNTAIN COLOR////////////////
if(FindColorTolerance(Bx,By,14066312,MSX1,MSY1,MSX2,MSY2,20)) then
Begin
Full := DTMFromString('78DA63DCCEC4C0B09F9101192C5B7998811F4' +
'88344FF0301E361A09A7DA86A20B2301248EF03AAD94A40CD4EA0' +
'9A5504D46C05AAD94940CD36A09A6304D4EC27AC060007921083');
Empty := DTMFromString('78DA637CC4C4C0B09791011994959533F0036' +
'990E87F20607C0354B307550D44164602E91740359B09A8790254' +
'B38A809A7B4035BB09A8B903547384809AA74035C7F1AB0100081' +
'410ED');
if(FindDTM(Empty, x1, y2, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x1, y2, 5, 5, true);
Mouse(Bx, By, 5, 5, true);
WaitTime := 0;
repeat
WaitTime := (WaitTime + 1);
if(WaitTime = 30) then
begin
WriteLn('Search got wrong coords or lost? Breaking Loop...')
break
end;
Wait(1000);
AntiBan;
AntiRandom;
until not(FindDTM(Empty, x1, y2, MIX1, MIY1, MIX2, MIY2))
end;
end else
begin
if(SearchCount = 3) then
begin
WriteLn('Lost, logging out...')
LogOut;
Exit;
end;
Result := False;
WriteLn('Couldnt Find Fountain')
Exit;
FreeDTM(Full);
FreeDTM(Empty);
end;
FreeDTM(Full);
FreeDTM(Empty);
end;
//////////////////////////
procedure Reload;
var
Full : integer;
Empty : integer;
x1, y1 : integer;
x2, y2 : integer;
begin
Flag;
Full := DTMFromString('78DA63DCCEC4C0B09F9101192C5B7998811F4' +
'88344FF0301E361A09A7DA86A20B2301248EF03AAD94A40CD4EA0' +
'9A5504D46C05AAD94940CD36A09A6304D4EC27AC060007921083');
Empty := DTMFromString('78DA63BCC1C0C060C1C8800CCACA2B18F8813' +
'448F43F10303E0032CC51D540646124907E0C241C08A8B948849A' +
'EB40C285809A2B40C214BF1A0026970C07');
OpenBankQuiet('veb');
Wait (300 + random(300));
if (PinScreen) then
InPin('yourpin');///////////////////////////////////////INSERT BANK PIN
if(FindDTM(Full, x1, y1, MIX1, MIY1, MIX2, MIY2))then
begin
wait(300+random(300));
Mouse(x1, y1, 4, 3, false);
ChooseOption('All');
end;
if(FindDTM(Empty, x2, y2, MSX1, MSY1, MSX2, MSY2))then
begin
wait(300+random(300));
Mouse(x2, y2, 3, 3, false);
ChooseOption('All');
MakeCompass('N');
end else
begin
WriteLn('Out of Vials? Logging out')
logout;
Exit;
end;
FreeDTM(Full);
FreeDTM(Empty);
end;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////MAIN LOOP////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
begin
SetupSRL;
SetupSmart;
DeclarePlayers;
LoginPlayer;
wait(1000+random(1000));
MakeCompass('N');
SetAngle(true);
repeat
if not(LoggedIn) then
exit;
WalkToFountain;
AntiRandom;
AntiBan;
FindFountain;
AntiRandom;
WalkFromFountain;
AntiRandom;
Reload;
AntiRandom;
until(false)
end.