Raskolnikov
2007-11-12 02:13:34
This is for the tea stall in Varrock. I hope you like it! When you vote by the way, please tell me (if it didn't go well at all) why it didn't compile or run. Oh and this has been tested on Scar 3.12 and SRL 4. The new bank function is a beta. If you have a solution to any bugs in the bank beta, please post them here.
Edit: The next version is out!!! This has MMouse and Mouse instead of those others. It also has a part in the proggie where it says how many times it saved your life.
Please post your progress reports!
Thanks,
Cut em2 it
program StallThief; //Thanks HyperSecret and rogeruk
{.include SRL/SRL.scar}
var
x, y, HowManyDone, SaveLife, a, b, BankDTM, Time, tea,
TeaStole: Integer;
Angle: Extended;
const
HowManyTea = 308; //How many teas to steal and drop
Bank = true; //Would you like to bank the tea
procedure Progress;
begin
Writeln('Thieved and dropped ' + IntToStr(HowManyDone) + ' teas.');
Writeln('Saved your life ' + IntToStr(SaveLife) + ' times.');
end;
procedure Thief;
begin
HowManyDone := 0; //Don't bother with this!
Disguise('Mozilla Firefox');
ActivateClient;
Wait(1000);
repeat
if (FindObjCustom(x, y, ['steal-', 'from', 'steal',
'-from', 'steal-from'], [9151923, 7829377, 2244947], 4)) then
begin
if (InvFull) and (Bank = false) then
begin
DropAll;
end;
if (InvFull) and (Bank = true) then
begin
BankDTM := DTMFromString('78DA630C606260C86540018C8C8C101AC6F70' +
'0AAC94755F3E70F13AA9A5020BF0855CDDBB70CA86A7C806A0A09' +
'981303E41713501340D81C0085D70E66');
Tea := BitmapFromString(27, 20,
'beNqtlE1Pk0EURnHLb9CkECESa' +
'FOFkgahAQwNjRvWLmGHOyMCQRPTAHEhBURBkG9oCKZEExYswI2y4l' +
'd5wgNPJtOWFclp83Y6c+beO/ed/kxL08O2x4/E8652kcsm/WyyT1u' +
'henyot/NFTwr0s6aQOSBzTbmQRJOlHehOtrcmnnW0CG3kCTCcy0Ch' +
'PxMNvhzsAcZDNDP1pJmPdvRyTwg9tvEtoUe8JH8tjDLVX3puaHgAy' +
'/NzP0ql7S/LoBEv5xuzItEuEqpWGneOUsGbV43rC5+3lhahvP79aG' +
'NDWptDIaWrFyGemvw6PDjZ34OzSgXnHRG6UNqUBHdXViC0SaXw/py' +
'evh4bdQxCEeayaYiKjOpwbRVIEwmBQWV3ByS8vDjf//bVQi1Uwyjl' +
'cCPmH29uajk4TQbxX/37C0SolI0jpCHBJ5K/Fv4ulxUVnp/bW5wFE' +
'BInnk4kRNSQPpR7F0Ypo42EyhQ4KVpINhlcw3ptwyC2Tx/ez05PG4' +
'6G2IDnj+8mdChy+g11DX2HuGfU0sWpSYFkfmZG8BPh2/FxcGPXSzl' +
'sbIIpFYuWhHIYKRRAQtcwbOxIqPipmNKkITkIQSmIsOZtIyfC6pR1' +
'1gSgxsZJBfz+uvfC8EJhdDnY6WvKTQLaK+zk0Ma/1LA73VZdw+gyz' +
'N9eKZowMpyDm5l9KbdH4T/UCNnT');
if (InvFull) and (Bank = true) then
begin
Mouse(52, 94, 0, 0, true);
Wait(4000);
if (FindSymbol(a, b, 'bank')) then
begin
Mouse(a, b, 0, 0, true);
end;
begin
MarkTime(Time);
repeat
if not (Loggedin) then Break;
OpenBankQuiet('varrock east');
until (BankScreen or (TimeFromMark(Time) > 120000));
if (BankScreen) then
begin
Writeln('In the bank!!!');
TeaStole := CountItemBmpTol(tea, 28);
Deposit(1, 28, 2);
CloseBank;
Writeln('We have banked ' + IntToStr(TeaStole) + ' teas.');
RunBack;
end;
FreeBitMap(tea);
end;
end;
end;
FindTalk; //Anti-random here for you
FindNormalRandoms; //Another anti-random
if (FindFight) then
begin
RunAwayDirection('N');
Wait(10000 + Random(2000));
RunBack;
SaveLife := SaveLife + 1;
end;
MMouse(x, y, 0, 0);
Mouse(x, y, 0, 0, true);
HowManyDone := HowManyDone + 1;
Wait(10000);
end;
until (HowManyDone = HowManyTea);
Progress;
end;
begin
SetupSRL;
Thief;
end.
Edit: The next version is out!!! This has MMouse and Mouse instead of those others. It also has a part in the proggie where it says how many times it saved your life.
Please post your progress reports!
Thanks,
Cut em2 it