Raskolnikov
03-02-2008, 05:10 AM
I put together a function because I haven't been very active scripting. I noticed there was no function called bankbox anymore, it was called BankIndexToMSBox or something like that. Any ways, I decided to put this function together so you can get a TBox of a bank index and have the option whether or not to fix the bank. Nevertheless, here it is.
function BankBox(BankIndex: integer; FixTheBank: boolean): TBox;
begin
if FixTheBank then FixBank;
if BankIndex div 8 > 5 then Exit;
Result.x1 := 79 * (BankIndex div 5);
Result.y1 := 62 * (BankIndex div 8);
Result.x2 := 118 * (BankIndex div 5);
Result.y2 := 96 * (BankIndex div 8);
end;
Thanks,
~ Cut em2 it
function BankBox(BankIndex: integer; FixTheBank: boolean): TBox;
begin
if FixTheBank then FixBank;
if BankIndex div 8 > 5 then Exit;
Result.x1 := 79 * (BankIndex div 5);
Result.y1 := 62 * (BankIndex div 8);
Result.x2 := 118 * (BankIndex div 5);
Result.y2 := 96 * (BankIndex div 8);
end;
Thanks,
~ Cut em2 it