SRL Archive - Research & Development Lounge

Shorter + More Random gameTab


NiCbaZ

2008-08-02 00:36:27

function GameTab2(tabnumber: Integer): Boolean;
begin
if ((Tabnumber < 1) or (TabNumber > 15)) then
begin
srl_Warn('GameTab', IntToStr(tabnumber) + ' is no valid GameTab', warn_AllVersions);
Result := False;
Exit;
end;
while not(GetCurrentTab = tabnumber) do
if (tabnumber = 14) then
begin
Mouse(752, 12, 8, 8, True);
Result := (GetCurrentTab = tabnumber);
Exit;
end else
if (tabnumber <= 7) then
begin
MouseBox(537 + (tabnumber - 1) * 35, 175, 537 + (tabnumber - 1) * 35, 192, 1);
Result := (GetCurrentTab = tabnumber);
Exit;
end else
MouseBox(564 + (tabnumber - 8) * 35, 472, 564 + (tabnumber - 8 ) * 35, 490, 1);
Result := (GetCurrentTab = tabnumber);
end;

not a l33t and start but shorter im sure Get Current tab and Tab Exists can be shorted this way 2.

turbobk

2008-08-02 01:10:45

Look's very nice.. I'm glad you know math lol
But there's no difference other than it uses equation's for the gametabs.. Still nice though :)

NiCbaZ

2008-08-02 03:05:00

From: turbobk
Look's very nice.. I'm glad you know math lol
But there's no difference other than it uses equation's for the gametabs.. Still nice though :)


it did use equation's in game tab already, and i use mouse Box not cords at a point…

BobboHobbo

2008-08-02 03:44:01

Looks great. GJ, is it any faster :P?

NiCbaZ

2008-08-02 06:16:21

dunno its just co-ords prob slower cause its mousebox has 2 read 4 and mouse has 2 read 2, if it is slower it would only be like 1 mill sec lol no biggy.