Simba Code:
Procedure CheckRuneSupplies;
begin
if (MeInBox(2943,3373,2949,3368)) then
begin
Players[CurrentPlayer].Loc := 'bank';
ReportStatus('Position looks fine, checking runes');
end else;
begin
Writeln('Player not in the bank.');
NextPlayer(False);
end;
If not R_ItemIDExists(LawRune,563) then
begin
ReportStatus('No laws in inventory, checking bank.');
Tries:=0;
Repeat
Case random(2) of
0: R_OpenBankBooth('fwb');
1: begin
if(FindNPC(6200,BankerNPC)) then
begin
ClickPoint := TileToMS(BankerNPC.Tile, random(5));
Writeln('Found the banker..');
MMouse(ClickPoint.x,ClickPoint.y,2,2);
If (IsUpText('anker')) then
begin
GetMousePos(ClickPoint.x,ClickPoint.y);
Mouse(ClickPoint.x,Clickpoint.y,0,0,false);
ChooseOption('ank');
end;
end else;
Writeln('No banker found..');
end;
end;
Until((BankScreen) or (Tries = 20));
If not (BankScreen) then
begin
ReportStatus('Tried to open the bank 20 times, stopping...');
NextPlayer(False);
end else;
begin
SearchBank('law');
repeat
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
if(Verify(x,y,'law')) then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,false);
Wait(200+random(100));
ChooseOption('All');
Wait(200+random(100));
CloseBank;
end else;
begin
Writeln('The item we thought we found was not a law rune.');
Inc(Tries);
end;
end;
until((Tries = 20) or (not(bankscreen)));
if (Tries = 20) then
begin
Writeln('Tried to find Law Runes 20 times, in vain.');
NextPlayer(False);
end;
end;
end else;
Writeln('Law Runes in inventory, checking air rune supply');
If not R_ItemIDExists(AirRune,556) then
begin
ReportStatus('No air runes in inventory, checking if staff is equipped.');
Gametab(26);
If not(IsEquippedID(1381)) then
begin
Reportstatus('No Staff equipped either, checking Bank.');
Tries:=0;
Repeat
Case random(2) of
0: R_OpenBankBooth('fwb');
1: begin
if(FindNPC(6200,BankerNPC)) then
begin
ClickPoint := TileToMS(BankerNPC.Tile, random(5));
Writeln('Found the banker..');
MMouse(ClickPoint.x,ClickPoint.y,2,2);
If (IsUpText('anker')) then
begin
GetMousePos(ClickPoint.x,ClickPoint.y);
Mouse(ClickPoint.x,Clickpoint.y,0,0,false);
Wait(100+random(100));
ChooseOption('ank');
end;
end else;
Writeln('No banker found..');
end;
end
Until((BankScreen) or (Tries = 20));
If not (BankScreen) then
begin
ReportStatus('Tried to open the bank 20 times, stopping...');
NextPlayer(False);
end else;
begin
SearchBank('air');
If findDTM(SoADTM,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
ReportStatus('Found Staff of Air');
Case random(2) of
0: begin
MMouse(x,y,2,2);
Wait(200+random(100));
If(IsUpTextMultiCustom([staff of air, air, taff of air, of air]) then
begin
Mouse(x,y,2,2,true);
Wait(200+random(100));
end;
end;
1: begin
MMouse(x,y,2,2);
Wait(200+random(100));
If(IsUpTextMultiCustom(['staff of air',
'air','taff of air',
'of air']) then
begin
GetMousePos(x,y);
Wait(100+random(50));
Mouse(x,y,0,0,false);
Wait(200+random(100));
ChooseOption('1');
Wait(200+random(100));
end;
Closebank;
FindDTM(SoADTM,x,y,MIX1,MIY1,MIX2,MIY2);
Mouse(x,y,1,1,true);
end;
end;
end else;
begin
Reportstatus('No staff, going for runes...');
Tries := 0;
repeat
If not (FindBitmapIn(bmp_Rune_Air,x,y,MSX1,MSY1,MSX2,MSY2)) then
begin
ReportStatus('No airs in inventory nor bank...');
Nextplayer(False);
end else;
begin
if(Verify(x,y,'air')) then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,false);
Wait(200+random(100));
ChooseOption('All');
Wait(200+random(100));
CloseBank;
end else;
begin
Writeln('The item we thought we found was not an air rune.');
Inc(Tries);
end;
end;
until((Tries = 20) or (not(bankscreen)));
if (Tries = 20) then
begin
Writeln('Tried to find Air Runes 20 times, in vain.');
NextPlayer(False);
end;
end;
ReportStatus('Runes found and withdrawed from the bank.');
end;
end else;
Writeln('You seem to have the staff of air equipped !');
end else;
Writeln('Runes in inventory found.');
begin
ReportStatus('It would seem you have both Air / Laws aviable.');
ReportStatus('Starting walking procedure.');
Makecompass('N');
end;
end;