Tim0suprem0
07-19-2007, 10:28 PM
Hi all,
in the OpenBankGlass Function {************************************************* ******************************
function OpenBankGlass(WhichBank: String; ChangeCompass, ChangeAngle: Boolean): Boolean;
By: Wizzup? and modified by Ron
Description: Opens the bank.
Valid arguments are:
'feb' (Falador East Bank)
'fwb' (Falador West Bank)
'veb' (Varrock East Bank)
'vwb' (Varrock West Bank)
'db' (Draynor Bank)
'akb' (Al-Kharid Bank)
************************************************** *****************************}
function OpenBankGlass(WhichBank: string; ChangeCompass, ChangeAngle: Boolean): Boolean;
var
OBC: TPoint;
c: Integer;
begin
colortolerancespeed(2);
if ChangeAngle then HighestAngle;
if ChangeCompass then
begin
c := Random(2);
case WhichBank of
'feb', 'fwb', 'veb': if c = 0 then MakeCompass('N') else MakeCompass('S');
'akb', 'db', 'eb', 'vwb': if c = 0 then MakeCompass('E') else MakeCompass('W');
end;
end;
if FindColorTolerance(OBC.x, OBC.y, 10594993, MSX1, MSY1, MSX2, MSY2, 4) then
begin
MMouse(OBC.x, OBC.y, 4, 4);
if IsUpTextMulti('nk', 'bo', 'ot') then
begin
Mouse(OBC.x, OBC.y, 0, 0, False);
Wait(100);
ChooseOption(OBC.x, OBC.y, 'uickly');
FFlag(0);
Wait(2000 + Random(500));
if BankScreen then Result := True;
end;
end else
if FindObj(OBC.x, OBC.y, 'ank', 10594993, 19) then
begin
Mouse(OBC.x, OBC.y, 0, 0, False);
Wait(50);
ChooseOption(OBC.x, OBC.y, 'uickly');
FFlag(0);
Wait(2000 + Random(500));
if BankScreen then Result := True;
end;
colortolerancespeed(1);
end;
it has a case for which direction to turn the camera angle, and it has c:=random(2). Why is that in there? When I run openbankglass for Varrock West Bank ('vwb') and set Changecompass to True it always turns my camera West. When I went and changed the function in SRL to c:=0, then it turned it East everytime because there was no randomization. I'm confoozled, why's it c:=random(2)?? It's not a big problem, because there are several really simple solutions, but I was just curious because it was messing up my script. Thanks!
in the OpenBankGlass Function {************************************************* ******************************
function OpenBankGlass(WhichBank: String; ChangeCompass, ChangeAngle: Boolean): Boolean;
By: Wizzup? and modified by Ron
Description: Opens the bank.
Valid arguments are:
'feb' (Falador East Bank)
'fwb' (Falador West Bank)
'veb' (Varrock East Bank)
'vwb' (Varrock West Bank)
'db' (Draynor Bank)
'akb' (Al-Kharid Bank)
************************************************** *****************************}
function OpenBankGlass(WhichBank: string; ChangeCompass, ChangeAngle: Boolean): Boolean;
var
OBC: TPoint;
c: Integer;
begin
colortolerancespeed(2);
if ChangeAngle then HighestAngle;
if ChangeCompass then
begin
c := Random(2);
case WhichBank of
'feb', 'fwb', 'veb': if c = 0 then MakeCompass('N') else MakeCompass('S');
'akb', 'db', 'eb', 'vwb': if c = 0 then MakeCompass('E') else MakeCompass('W');
end;
end;
if FindColorTolerance(OBC.x, OBC.y, 10594993, MSX1, MSY1, MSX2, MSY2, 4) then
begin
MMouse(OBC.x, OBC.y, 4, 4);
if IsUpTextMulti('nk', 'bo', 'ot') then
begin
Mouse(OBC.x, OBC.y, 0, 0, False);
Wait(100);
ChooseOption(OBC.x, OBC.y, 'uickly');
FFlag(0);
Wait(2000 + Random(500));
if BankScreen then Result := True;
end;
end else
if FindObj(OBC.x, OBC.y, 'ank', 10594993, 19) then
begin
Mouse(OBC.x, OBC.y, 0, 0, False);
Wait(50);
ChooseOption(OBC.x, OBC.y, 'uickly');
FFlag(0);
Wait(2000 + Random(500));
if BankScreen then Result := True;
end;
colortolerancespeed(1);
end;
it has a case for which direction to turn the camera angle, and it has c:=random(2). Why is that in there? When I run openbankglass for Varrock West Bank ('vwb') and set Changecompass to True it always turns my camera West. When I went and changed the function in SRL to c:=0, then it turned it East everytime because there was no randomization. I'm confoozled, why's it c:=random(2)?? It's not a big problem, because there are several really simple solutions, but I was just curious because it was messing up my script. Thanks!