I made a second version. This one handles banking and anti randoms. I haven't tested very thoroughly but it's worked so far. I'm currently watching it carefully but letting it save me lots of clicks.
I'm still using some constants for things I don't expect to change. (Positions in bank screen, position of spell, inventory positions, etc.) I may convert them to bitmaps and such later on.
PS Is there a builtin random version of Wait?
EDIT: I should include an explanation.
Wield earth staff.
First bank slots are nats, astrals, gp, and wood.
Be sure to set the bank name, number of loads, and cost per plank.
Waiting time could be tweaked for a bit more efficiency.
Code:
program PlankCaster;
{.include SRL\SRL.scar}
const
numLoads = 10;
whichBank = 'vwb';
plankingCost = 175;
waitingTime = 300;
var
thisLoad: Integer;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='fake';
Players[0].Pass :='fake';
Players[0].Nick :='fake';
Players[0].Loc :='Bank';
Players[0].Active:=True;
end;
procedure WaitRandom(t: Integer);
begin
Wait(t + Random(100));
end;
procedure GetMaterials();
begin
WriteLn('Withdrawing');
OpenBankFast(whichBank);
WaitRandom(waitingTime);
Withdraw(0, 0, 25);
WaitRandom(waitingTime);
Withdraw(1, 0, 50);
WaitRandom(waitingTime);
Withdraw(2, 0, 25 * plankingCost);
WaitRandom(waitingTime);
Withdraw(3, 0, 25);
WaitRandom(waitingTime);
CloseBank;
WaitRandom(waitingTime);
end;
procedure CastPlanks();
var invSpot: Integer;
begin
WriteLn('Casting');
for invSpot := 4 to 28 do
begin
GameTab(tab_Magic);
WaitRandom(waitingTime);
Mouse(714, 337, 5, 5, true);
WaitRandom(2 * waitingTime);
MouseItem(invSpot, true);
WaitRandom(3 * waitingTime);
end;
WaitRandom(waitingTime);
end;
procedure BankResults();
begin
WriteLn('Depositing');
OpenBankFast(whichBank);
WaitRandom(waitingTime);
DepositAll;
WaitRandom(waitingTime);
CloseBank();
WaitRandom(waitingTime);
end;
begin
SetupSRL;
DeclarePlayers;
for thisLoad := 1 to numLoads do
begin
WriteLn('Starting load ' + IntToStr(thisLoad));
GetMaterials;
FindNormalRandoms;
CastPlanks;
FindNormalRandoms;
BankResults;
FindNormalRandoms;
end;
end.