SRL Archive - Research & Development Lounge

BankBox!


Raskolnikov

2008-03-02 00:10:15

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

Dumpin

2008-03-02 04:38:50

nice math :) this function might will be usefull

Raskolnikov

2008-03-04 01:12:29

Thanks Dumpin. I hope that this will be used in peoples' scripts :D.

Cut em2 it

Narcle

2008-03-04 01:26:51

Whats the size of the box(s)? Just curious :D

Raskolnikov

2008-03-04 10:05:48

Size? Like how many pixles? I'm not sure. The area? It's not a perfect box btw, if I remember right, it was one pixel off :|

Cut em2 it

GoF

2008-03-04 10:48:04

Did you base this on something you found from some old script or just made it yourself? :p

Well, still good job I suppose.. Simple and useful ;)

Raskolnikov

2008-03-04 21:35:05

I made it myself :D Thanks :D

Cut em2 it