Rich
2009-05-09 20:12:27
These are two functions that I created whilst making my Steel Plate Alcher.
The first (NotesOn) checks whether or not something will be a note when you withdraw something from your bank.
Does anyone have any comments?
EDIT: Added the DTMs…Oops!
The first (NotesOn) checks whether or not something will be a note when you withdraw something from your bank.
//function NotesOn : Boolean;
//Made by R1ch
//Example: if NotesOn then
function NotesOn : Boolean;
var
X, Y, NoteOn : Integer;
begin
NoteOn := DTMFromString('78DA6314666060E06100032E08C510166207A' +
'61981F83F10308A0019CC0C6880118904D2A240829B801A212021' +
'44400DC82DC204D43013610E480D3B01359C408285801A01C27E0' +
'7005ED005E1');
Result:= False;
if BankScreen then
begin
if FindDTM(NoteOn, X, Y, MSX1, MSY1, MSX2, MSY2) then
Result:= True;
end;
FreeDTM(NoteOn);
end;The second (SwitchNote) switches whether or not the items are withdrawn as notes.//function SwitchNote(on_or_off : string) : Boolean;
//Made by R1ch
//Example: if SwitchNote('off') then
function SwitchNote(on_or_off : string) : Boolean;
var
X, Y : Integer;
begin
NoteOn := DTMFromString('78DA6314666060E06100032E08C510166207A' +
'61981F83F10308A0019CC0C6880118904D2A240829B801A212021' +
'44400DC82DC204D43013610E480D3B01359C408285801A01C27E0' +
'7005ED005E1');
Result:= False;
if BankScreen then
begin
if (on_or_off = 'on') then
begin
if FindDTM(NoteOn, X, Y, MSX1, MSY1, MSX2, MSY2) then
Result:= True;
end else
begin
if FindDTM(NoteOn, X, Y, MSX1, MSY1, MSX2, MSY2) then
begin
Mouse(X, Y, 5, 5, True);
Result:= True;
end;
end;
end;
FreeDTM(NoteOn);
end;Does anyone have any comments?
EDIT: Added the DTMs…Oops!