Dervish
2010-05-25 15:12:31
Procedure WalkToChurch;
begin
if FindSymbol(x,y,'Bank') and
FindSymbol(x,y,'Bar') then
begin
Players[CurrentPlayer].Loc := 'bank';
ReportStatus('Everything looks fine, checking runes');
If not FindBitmapIn(bmp_Rune_Law,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
ReportStatus('No laws in inventory, checking bank.');
Tries:=0;
Repeat
OpenBankQuiet('fwb');
Inc(Tries);
Until((BankScreen) or (Tries = 20));
If not (BankScreen) then
begin
ReportStatus('Tried 20 times to find bank, stopping...');
NextPlayer(False);
end else;
begin
SearchBank('law');
If not (FindBitmapIn(bmp_Rune_Law,x,y,MSX1,MSY1,MSX2,MSY2)) then
begin
ReportStatus('No laws in inventory nor bank...');
Nextplayer(False);
end else;
begin
Mouse(x,y,2,2,false);
Wait(200+random(100));
ChooseOption('All');
Wait(200+random(100));
CloseBank;
end;
end;
If not Findbitmapin(bmp_Rune_Air,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
ReportStatus('No air runes in inventory, checking if staff is equipped.');
Gametab(26);
If not(FindDTM(SoADTM,x,y,MIX1,MIY1,MIX2,MIY2)) then
begin
Reportstatus('No Staff equipped either, checking Bank.');
Tries:=0;
repeat
OpenBankQuiet('fwb');
Inc(Tries);
Until((BankScreen) or (Tries = 20));
If not (BankScreen) then
begin
ReportStatus('Tried 20 times to find bank, stopping...');
NextPlayer(False);
end else;
begin
SearchBank('air');
If findDTM(SoADTM,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
ReportStatus('Found Staff of Air');
Mouse(x,y,2,2,false);
Wait(200+random(100));
ChooseOption('1');
Wait(200+random(100));
Closebank;
FindDTM(SoADTM,x,y,MIX1,MIY1,MIX2,MIY2);
Mouse(x,y,1,1,true);
end else;
begin
Reportstatus('No staff, going for runes...');
If Findbitmapin(bmp_Rune_Air,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
Mouse(x,y,2,2,false);
Wait(200+random(100));
ChooseOption('ll');
Wait(200+random(100));
ReportStatus('Runes found.');
CloseBank;
end;
end;
end;
end else;
ReportStatus('Staff equipped.');
end;
ReportStatus('It would seem you have both Air / Laws aviable.');
ReportStatus('Starting walking procedure.');
Makecompass('N');
{walking here...}
end;
end;
end;Hmm I try it and it does not work, yet I can't find the error.
Help please :(