From: Rasta Magician
JAD, why not post your version so we can see if we can just simply speed it up, instead of writting it from scratch?
~RM
Hmm, I suppose.
@R0bot, like I said above, I have been doing this for a little over a year now, and it has actually become more profitable.
My unf maker + cleaner:
//Enter pin on line 56 if you have one
program JADPotionMaker;
{.include srl/srl.scar}
var
x,y, PotNum: Integer;
count: Integer;
const
WhatBank = 'lb';
MaxPots = 9980;
////////////////////////////////////////////////////////////////////////////////
procedure DeclarePlayers;
begin
CurrentPlayer := 0;
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
Players[0].Name := 'Sir Killler7';
Players[0].Pass := '';
Players[0].Nick := 'llle';
Players[0].Strings[0] := '';
Players[0].Active := True;
end;
procedure SoundAlarm;
begin
repeat
PlaySound('C:\WINDOWS\Media\tada.wav');
wait(5500);
until(False);
end;
function BankOpenCalls: Boolean;
begin
JADOption := true;
if(not(OpenBankGlass(lowercase(WhatBank),false,false)))then
begin
wait(1500+random(2500));
OpenBankQuiet(lowercase(WhatBank));
end;
result := bankScreen or pinScreen;
JADOption := false;
end;
procedure Bankopen;
var
Whatever: String;
c: Integer;
begin
if(not(LoggedIn))then
Exit;
FindNormalRandoms;
Whatever := ''; //Pin here
if(not(BankOpenCalls))then
begin
FindNormalRandoms;
wait(6000+random(10000));
if(not(BankOpenCalls))then
begin
Writeln('Unable to open bank... Terminating...');
SoundAlarm;
end;
end;
if(PinScreen)then
InPin(Whatever);
if(not(getColor(581,229) = 3424328))then
begin
MouseBox(386,300,406,312,1);
c := 0;
repeat //wait until inv empty
wait(80+random(100));
c := c + 100;
if(c > 1800 + random(1200))then
begin
DepositAll;
Break;
end;
until(getColor(581,229) = 3424328); //waits for first slot to be empty
end;
FixBank;
// if(FindColor(x,y,1612219,29,91,114,124))then
// begin
// Writeln('Gold is in first or second bank slot... Done!');
// TerminateScript;
// end;
MouseBox(48,102,60,110,2);
if(not(ChooseOption('14')))then
begin
wait(200+random(200));
ChooseOption('14');
end;
wait(40+random(120));
MouseBox(88,103,102,117,2);
if(not(ChooseOption('14')))then
begin
wait(150+random(200));
ChooseOption('14');
end;
CloseBank;
end;
procedure WaitWhileMaking;
var
TimeMarker: Integer;
randomNum: Integer;
begin
MarkTime(TimeMarker);
randomNum := random(3);
if(FindNormalRandoms)then
Exit;
while(ExistsItem(26))do
begin
if(randomNum > 0) and (TimeFromMark(TimeMarker) > 1+random(2000))then
begin
SleepAndMoveMouse(2500+random(3000));
RandomNum := 0;
end;
if(not(randomNum > 1))then
if(random(65) = 7)then
MouseBox(5,4,738,488,3);
wait(100+random(300));
if(random(6) = 3)then
if(FindNormalRandoms)then
Exit;
if(TimeFromMark(TimeMarker) > 15000 + random(3000))then
Exit;
end;
FindNormalRandoms;
wait(100+random(100));
PotNum := PotNum + 14;
end;
procedure StartPotionMaking;
var
i: Integer;
getOut: Boolean;
begin
if(not(LoggedIn) or (bankscreen))then
Exit;
i := 0;
if(not(ExistsItem(28)))then
begin
if(not(FindNormalRandoms))then
begin
for i := 1 to 16+random(6) do
begin
wait(100+random(100));
if(ExistsItem(27))then
break;
end;
end else
Exit;
end else
if(FindNormalRandoms)then
Exit;
if(not(InvFull))then
Exit;
MouseItem(14,true);
MarkTime(i);
if(not(FindColorTolerance(x,y,16777215,MIX1,MIY1,MIX2,MIY2,2)))then
begin
repeat
wait(100+random(250));
if(TimeFromMark(i) > 2000+random(2000) )then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,true);
break;
end;
until(FindColorTolerance(x,y,16777215,MIX1,MIY1,MIX2,MIY2,2));
end;
MouseItem(15,true);
wait(100+random(250));
MouseBox(226,403,282,430,3);
i := 0;
getOut := false;
repeat
wait(100+random(100));
i := i + 1;
if(i > 16+random(5))then
begin
MouseBox(532,215,561,455,1);
MouseItem(14,true);
MouseItem(15,true);
wait(500+random(800));
MouseBox(226,403,282,430,3);
i := 0;
getOut := true;
end;
until(IsUpText('Make') or getOut = true);
if(not(IsUpText('Make')))then
begin
Writeln('Problem');
count := count + 1;
if(count > 1)then
begin
Writeln('Big problem. Terminating...');
SoundAlarm;
TerminateScript;
end;
Exit;
end else
count := 0;
GetMousePos(x,y);
Mouse(x,y,0,0,false);
if(not(ChooseOption('ll')))then
begin
wait(50+random(200));
ChooseOption('ll');
end;
WaitWhileMaking;
end;
begin
DeclarePlayers;
SetupSRL;
ActivateClient;
ClearDebug;
wait(400+random(400));
if(invFull)then
begin
StartPotionMaking;
WaitWhileMaking;
end;
repeat
BankOpen;
StartPotionMaking;
until(PotNum > MaxPots);
Writeln('Done!');
end.
program JADHerbCleaner;
{.include srl/srl.scar}
var
x,y, HerbNum: integer;
timesNotHerb: Integer;
const
WhatBank = 'fwb';
MaxHerbs = 1620;
////////////////////////////////////////////////////////////////////////////////
procedure DeclarePlayers;
begin
CurrentPlayer := 0;
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
Players[0].Name := 'Sir Killler7';
Players[0].Pass := '';
Players[0].Nick := 'llle';
Players[0].Strings[0] := '';
Players[0].Active := True;
end;
procedure LoginCheck;
begin
if(LoggedIn)then Exit;
Writeln('Not Logged In... Terminating...');
TerminateScript;
end;
function BankOpenCalls: Boolean;
begin
JADOption := true;
if(not(OpenBankQuiet(lowercase(WhatBank))))then
begin
wait(1500+random(2500));
OpenBankFast(WhatBank);
end;
JADOption := false;
result := bankScreen or pinScreen;
end;
procedure Bankopen;
var c: Integer;
begin
LoginCheck;
FindNormalRandoms;
if(not(BankOpenCalls))then
begin
FindNormalRandoms;
wait(6000+random(11000));
if(not(BankOpenCalls))then
begin
Writeln('Unable to open bank... Terminating...');
TerminateScript;
end;
end;
//if(PinScreen)then
// InPin(Whatever);
if(not(getColor(581,229) = 3424328))then
begin
MouseBox(386,300,406,312,1);
c := 0;
repeat //wait until inv empty
wait(80+random(100));
c := c + 100;
if(c > 1800 + random(1200))then
begin
DepositAll;
Break;
end;
until(getColor(581,229) = 3424328); //waits for first slot to be empty
end;
FixBank;
if(FindColor(x,y,1612219,29,91,114,124))then
begin
Writeln('Gold is in first or second bank slot... Done!');
TerminateScript;
end;
MouseBox(48,102,60,110,2);
if(not(ChooseOption('All')))then
begin
wait(150+random(200));
ChooseOption('All');
end;
wait(300+random(400));
CloseBank;
end;
procedure CleanHerbs;
var i: Integer;
begin
LoginCheck;
if(not(ExistsItem(28)))then
begin
for i := 1 to 16+random(6) do
begin
wait(100+random(100));
if(ExistsItem(28))then
break;
end;
end;
FindNormalRandoms;
if(not(ExistsItem(1)) or not(ExistsItem(28)))then
begin
timesNotHerb := timesNotHerb + 1;
if(timesNotHerb > 1)then
begin
Writeln('Inv slot 1 isn''t a herb. Terminating...');
TerminateScript;
end;
Exit;
end else
timesNotHerb := 0;
MMouseItem(1);
if(not(IsUpText('lean')))then
begin
wait(100+random(200));
if(not(IsUpText('lean')))then
begin
wait(700+random(1500));
if(not(IsUpText('lean')))then
begin
FindNormalRandoms;
Writeln('Inv slot 1 isn''t a herb. Exiting...');
Exit;
end;
end;
end;
GetMousePos(x,y);
Mouse(x,y,0,0,true);
MouseItem(5,true);
MouseItem(9,true);
if(random(3) = 1)then
FindNormalRandoms;
MouseItem(13,true);
MouseItem(17,true);
if(random(8) = 1)then
FindNormalRandoms;
MouseItem(21,true);
MouseItem(25,true);
if(random(8) = 1)then
FindNormalRandoms;
MouseItem(26,true);
if(random(8) = 1)then
FindNormalRandoms;
MouseItem(22,true);
MouseItem(18,true);
MouseItem(14,true);
if(random(8) = 1)then
FindNormalRandoms;
MouseItem(10,true);
MouseItem(6,true);
MouseItem(2,true);
MouseItem(3,true);
if(random(8) = 1)then
FindNormalRandoms;
MouseItem(7,true);
MouseItem(11,true);
if(random(4) = 2)then
begin
MMouseItem(15);
if(not(IsUpText('lean')))then
begin
wait(700+random(1500));
if(not(IsUpText('lean')))then
begin
Writeln('Item 1 isn''t a herb. Terminating...');
TerminateScript;
end;
end;
GetMousePos(x,y);
Mouse(x,y,0,0,true);
end else
MouseItem(15,true);
MouseItem(19,true);
if(random(9) = 1)then
FindNormalRandoms;
MouseItem(23,true);
MouseItem(27,true);
if(random(8) = 1)then
FindNormalRandoms;
MouseItem(28,true);
MouseItem(24,true);
MouseItem(20,true);
if(random(9) = 1)then
FindNormalRandoms;
MouseItem(16,true);
MouseItem(12,true);
MouseItem(8,true);
if(random(9) = 1)then
FindNormalRandoms;
MouseItem(4,true);
HerbNum := HerbNum + 28;
end;
begin
DeclarePlayers;
SetupSRL;
ActivateClient;
ClearDebug;
wait(400+random(400));
if(invfull)then
CleanHerbs;
repeat
BankOpen;
CleanHerbs;
until(HerbNum > MaxHerbs);
Writeln('Done!');
end.
Since they were for me I didn't really make any DTM checks or anything. Just first 2 bank slots for unf, first for cleaner.
One thing that happens a lot is when it lags when it's at the bank screen, the mouse will choose the options to withdraw 14 of each, but since it was lagging, it didn't get the items. So then the script thinks it did, and closes the bank without the herbs/vials. That ends up wasting like 25 seconds of time.
Also, when I have it click the deposit all button, I have it wait until all the items are out of the inventory before going and withdrawing the first item. If it quickly right clicked the first item, moved to choose 14, and waited until the inventory emptied then that would be faster. Just noticed this.
JADOption is something I just put in SRL so that when banking I could have it right click the bank, move to use quickly, and wait until inventory was empty. This wasn't working out for some reason though (I don't remember why) so I stopped using it.