PDA

View Full Version : BankBox!



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

Dumpin
03-02-2008, 09:38 AM
nice math :) this function might will be usefull

Raskolnikov
03-04-2008, 06:12 AM
Thanks Dumpin. I hope that this will be used in peoples' scripts :D.

Cut em2 it

Narcle
03-04-2008, 06:26 AM
Whats the size of the box(s)? Just curious :D

Raskolnikov
03-04-2008, 03:05 PM
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
03-04-2008, 03:48 PM
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
03-05-2008, 02:35 AM
I made it myself :D Thanks :D

Cut em2 it