WT-Fakawi
2006-02-28 06:34:12
Here is a little something I wrote, I would like to get some input from…
Function Bank(TheBank:string): Boolean;
It finds and opens any bank in the free world.
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)
I would appreciate if members would give it a go and see if it is accurate enough. It uses FindDTMRotated, so theoretically it should be able to find it @ any angle, but I would advice you to keep the MM "northish"…
How to run this script:
0. Fill in @ which Bank you are standing.
1. Set BankColor Manual…
2. be sure the BankSymbol is not in the minimap upon running the script.
3. Run the script.
4. Walk to the bank, stop clicking when the BankColor comes into MM-display.
5. Observe if it opens.
6. Provide feedback.
TIA!
Function Bank(TheBank:string): Boolean;
It finds and opens any bank in the free world.
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)
I would appreciate if members would give it a go and see if it is accurate enough. It uses FindDTMRotated, so theoretically it should be able to find it @ any angle, but I would advice you to keep the MM "northish"…
How to run this script:
0. Fill in @ which Bank you are standing.
1. Set BankColor Manual…
2. be sure the BankSymbol is not in the minimap upon running the script.
3. Run the script.
4. Walk to the bank, stop clicking when the BankColor comes into MM-display.
5. Observe if it opens.
6. Provide feedback.
TIA!
[FONT="Courier New"]program FindBanks;
{.include SRL/SRL.scar}
Procedure DeclarePlayers;
begin
NumberOfPlayers(1); // Sets the Players Array Length;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active := True;
end;
//*************************************************************************//
Procedure SetUp;
begin
SetupSRL;
DeclarePlayers;
LoginPlayer;
end;
{*******************************************************************************
Function Bank(TheBank:string): Boolean;
By: WT-Fakawi
Description: Finds and open any bank in the free world.
Valid arguments are:
'feb' (Falador East Bank)
'fwb' (Falador West Bank)
'veb' (Varrock East Bank)
'vwb' (Varrock West Bank)
'db' (Draynor Bank)
'ak' (Al-Kharid Bank)
*******************************************************************************}
Function Bank(TheBank:string): Boolean;
var DB,FEB,FWB,VEB,VWB,AKB:integer;
var dbx,dby,TheDTM:Integer;
var WhichAngle: Extended;
var WhichBank:string;
begin
DB := DTMFromString('78DA636C67626008644001FFFFFD63F80FA41' +
'9416C2060AC01AAF182C8B140D5FCF9C304A619A17CB09A204C35' +
'22E86AC2F09B0300F8811153');
FEB := DTMFromString('78DA63AC67626088634001FFFFFD63F80FA41' +
'9416C2060AC01AA4987C83141D5FCF9C3C4C0055503028CAD44A8' +
'E924AC0600131E11B5');
FWB := DTMFromString('78DA636C676260086540038C0CFFC12403C37' +
'F206004A98986C8304155FCF9C3C4C0055503D6D14C849A6EC26A' +
'009F5A0EA1');
VEB := DTMFromString('78DA63EC61626008624001FFFFFD63F80FA41' +
'9416C2060EC00AA8982C83141D5FCF9C3C4C0055503028C138850' +
'D343580D00122211A9');
VWB := DTMFromString('78DA636C636260F064400133D7CC63F80FA41' +
'981F83F1030F603D57843E498A06AFEFC6162E082AA0101B01A67' +
'22D404E35703007970105E');
AKB:= DTMFromString('78DA636C606260F06140019D9D710CFF81342' +
'310FF0702C652A01A37881C1354CD9F3F4C0C5C5035200056E345' +
'841A3FFC6A002A3B0F97');
WhichBank := Lowercase(TheBank);
if WhichBank = 'feb' then TheDTM := FEB;
if WhichBank = 'fwb' then TheDTM := FWB;
if WhichBank = 'db' then TheDTM := DB;
if WhichBank = 'veb' then TheDTM := VEB;
if WhichBank = 'vwb' then TheDTM := VEB;
if WhichBank = 'akb' then TheDTM := AKB;
if FindColor(dbx, dby, BankColor, MMX1, MMY1, MMX2, MMY2) then
begin
if FindSymbol(dbx, dby, 'Bank') then
begin
MouseFindFlag(dbx, dby, 1, 1);
FFlag(5);
if FindDtmRotated(TheDTM, dbx, dby, MMX1, MMY1, MMX2, MMY2, -(PI/2), PI/2, 1, WhichAngle)then
begin
Mouse(dbx, dby, 0, 0, True);
FFlag(5);
OpenBank3;
FixBank;
Result:=True;
TerminateScript;
end
else
If FindObj3(dbx, dby, 'booth', 2111560, 20) then // look for bank using different method, not finished yet...
begin
OpenBank3;
FixBank;
Result:=True;
TerminateScript;
end
else
PerfectNorth; // may be commented out.......
end
end
FreeDTM(DB);
FreeDTM(VEB);
FreeDTM(VWB);
FreeDTM(FEB);
FreeDTM(FWB);
FreeDTM(AKB);
end;
//*************************************************************************//
//
// Main EventLoop
//*************************************************************************//
begin
Setup;
// SET MANUAL BANK COLOR!!!!!, or use GetSymbolColor(x,y,'Bank') once !
//BankColor:=GetSymbolColor(x,y,'Bank');
BankColor := 4972259;
repeat
if Bank('FEB') then
writeln('Found ')
else
writeln('missed');
until(False);
end.[/FONT]