Nava2
2008-09-27 13:07:02
Function OpenBankRefBooths(Bank : String): Boolean;
Var
p : TPoint;
Tiles : TPointArray;
Begin
Result := False;
Case LowerCase(Bank) of
'veb': Tiles := [Point(3251,3419), Point(3252,3419), Point(3253,3419),
Point(3254,3419), Point(3255,3419), Point(3256,3419)];
'vwb': Tiles := [Point(3190,3435), Point(3190,3437), Point(3190,3439),
Point(3190,3441), Point(3190,3443), Point(3181,3444), Point(3181,3442),
Point(3181,3440), Point(3181,3438), Point(3181,3436)];
'fwb': Tiles := [Point(2945,3367), Point(2946,3367), Point(2947,3367),
Point(2948,3367)];
'feb': Tiles := [Point(3010,3354), Point(3011,3354), Point(3012,3354),
Point(3013,3354), Point(3014,3354), Point(3015,3354)];
'lum', 'lb': Tiles := [Point(3208,3221)];
'dra', 'db': Tiles := [Point(3091,3419), Point(3091,3245), Point(3091,3244),
Point(3091,3243), Point(3091,3242)];
'alk', 'akb': Tiles := [Point(3268,3168), Point(3268,3167), Point(3268,3166),
Point(3268,3165), Point(3268,3164)];
'seb': Tiles := [Point(2729,3494), Point(2728,3494), Point(2727,3494),
Point(2724,3494), Point(2722,3494)];
'eb': Tiles:= [Point(3095,3489),Point(3095,3491),Point(3095,3493),
Point(3097,3495)];
end;
SortTPAFrom(Tiles, GetMyPos);
If (DistanceFrom(Tiles[0]) > 2) then
Begin
If not(TileOnMM(Tiles[0])) then
Begin
Writeln('Couldn''t find bank');
Result := False;
Exit;
end;
WalkToTile(Tiles[0], 0, 0);
Wait(10);
R_Flag;
Wait(RandomRange(100, 200));
end;
If not(TileOnMS(Tiles[0], 15)) then
Begin
SetAngle(True);
MakeCompass('n');
If not(TileOnMS(Tiles[0], 20)) then
Begin
Writeln('Couldnt'' find bank booth');
Result := False;
Exit;
end;
end;
repeat
p := TileToMS(Tiles[0], 20);
MMouse(p.x - 5, p.y - 5, 11, 11);
Wait(RandomRange(200, 300));
until IsUpText('ank');
GetMousePos(P.x, P.y);
Mouse(P.x, P.y, 2, 2, False);
Wait(RandomRange(80, 120));
P.x := 0;
if ChooseOption('e-q') then
repeat
Wait(RandomRange(50, 90));
if PinScreen then
InPin(Players[CurrentPlayer].pin);
Inc(P.x);
Result := BankScreen;
until Result or (P.x > 20);
end;
function OpenBankRefBankers : Boolean;
var
NPC : TNPC;
begin
Result := False;
if not FindNPC('Banker', NPC) then
begin
SRL_Warn('OpenBankRefBankers', 'Could not find Bankers', Warn_AllVersions);
Exit;
end;
if DistanceFrom(NPC.Tile) < 4 then
WalkToTile(NPC.Tile, 4, 0);
if not TileOnMS(NPC.Tile, NPC.Height * 5/9) then
begin
R_MakeCompass('n');
Wait(RandomRange(90, 140));
R_SetAngle(True);
if not TileOnMS(NPC.Tile, NPC.Height * 5/9) then
begin
SRL_Warn('OpenBankRefBankers', 'Could get MS Point of Bankers.', Warn_AllVersions);
Exit;
end;
end;
P := TileToMS(NPC.Tile, NPC.Height * 5/9);
MMouse(P.x - 2, P.y - 2, 5, 5);
Wait(RandomRange(80, 110));
if IsUpText('ank') then
begin
GetMousePos(P.x, P.y);
Mouse(P.x, P.y, 0, 0, false);
P.x := 0;
if ChooseOption('e-q') then
repeat
Wait(RandomRange(50, 90));
if PinScreen then
InPin(Players[CurrentPlayer].pin);
Inc(P.x);
Result := BankScreen;
until Result or (P.x > 20);
end;
end;
function OpenBankRef(Bank : String) : Boolean;
var
H, Tries : Integer;
P, TheTile : TPoint;
Tiles : TPointArray;
NPC : TNPC;
begin
Result := False;
case Random(5) of
0..3 :
begin
Case LowerCase(Bank) of
'veb': Tiles := [Point(3251,3419), Point(3252,3419), Point(3253,3419),
Point(3254,3419), Point(3255,3419), Point(3256,3419)];
'vwb': Tiles := [Point(3190,3435), Point(3190,3437), Point(3190,3439),
Point(3190,3441), Point(3190,3443), Point(3181,3444),
Point(3181,3442), Point(3181,3440), Point(3181,3438),
Point(3181,3436)];
'fwb': Tiles := [Point(2945,3367), Point(2946,3367), Point(2947,3367),
Point(2948,3367)];
'feb': Tiles := [Point(3010,3354), Point(3011,3354), Point(3012,3354),
Point(3013,3354), Point(3014,3354), Point(3015,3354)];
'lum', 'lb': Tiles := [Point(3208,3221)];
'dra', 'db': Tiles := [Point(3091,3419), Point(3091,3245), Point(3091,3244),
Point(3091,3243), Point(3091,3242)];
'alk', 'akb': Tiles := [Point(3268,3168), Point(3268,3167), Point(3268,3166),
Point(3268,3165), Point(3268,3164)];
'seb': Tiles := [Point(2729,3494), Point(2728,3494), Point(2727,3494),
Point(2724,3494), Point(2722,3494)];
'eb': Tiles:= [Point(3095,3489),Point(3095,3491),Point(3095,3493),
Point(3097,3495)];
end;
SortTPAFrom(Tiles, GetMyPos);
TheTile := Tiles[0];
H := 15;
end;
4 :
begin
if not FindNPC('Banker', NPC) then
begin
SRL_Warn('OpenBankRefBankers', 'Could not find Bankers', Warn_AllVersions);
Exit;
end;
TheTile := NPC.Tile;
H := NPC.Height * 5/9;
end;
end;
If (DistanceFrom(TheTile) > 2) then
Begin
If not(TileOnMM(TheTile)) then
Begin
SRL_Warn('OpenBankRef', 'Could not find Bank.', Warn_AllVersions);
Exit;
end;
WalkToTile(TheTile, 0, 0);
Wait(10);
R_Flag;
Wait(RandomRange(100, 200));
end;
If not(TileOnMS(TheTile, H)) then
Begin
SetAngle(True);
MakeCompass('n');
If not(TileOnMS(TheTile, H)) then
Begin
SRL_Warn('OpenBankRefBankers', 'Could get MS Point.', Warn_AllVersions);
Exit;
end;
end;
repeat
p := TileToMS(Tiles[0], 20);
MMouse(p.x - 5, p.y - 5, 11, 11);
Wait(RandomRange(200, 300));
if IsUpText('ank') then
begin
GetMousePos(P.x, P.y);
Mouse(P.x, P.y, 0, 0, false);
P.x := 0;
if ChooseOption('e-q') then
repeat
Wait(RandomRange(50, 90));
if PinScreen then
InPin(Players[CurrentPlayer].pin);
Inc(Tries);
Result := BankScreen;
until Result or (Tries > 20);
end;
until Result;
end;The OpenBankRefBooths is the current OpenBankReflection with a few fixes.
OpenBankRef combines the OpenBankRefBooths and OpenBankRefBankers. Adds a random case so that it uses the Booth 4/5 times and the Bankers the rest. :)
Rate/Hate? Comments/Critiques?