Skip to content

Commit

Permalink
Update to FTab, more reliable now.
Browse files Browse the repository at this point in the history
  • Loading branch information
Narcle committed Jan 25, 2012
1 parent f980965 commit c382325
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions srl/core/gametab.simba
Expand Up @@ -252,24 +252,28 @@ Example:
*)
function FTab(Tab: integer): boolean;
var
T: integer;
T, F: integer;
begin
if (GetCurrentTab = Tab) then
begin
result := true;
Exit;
end;
Case Tab of
tab_Inv: t := 1;
tab_Equip: t := 2;
tab_Prayer: t := 3;
tab_Magic: t := 4;
tab_Combat: t := 5;
tab_Inv: F := 1;
tab_Equip: F := 2;
tab_Prayer: F := 3;
tab_Magic: F := 4;
tab_Combat: F := 5;
else
writeln('Tab '+inttostr(tab)+' isn''t a valid option.');
end;
TypeByte(111+T)
Result := GetCurrentTab = Tab;
T := GetSystemTime + 2000;
Repeat
TypeByte(111+F);
Wait(150+random(100));
Result := GetCurrentTab = Tab;
until Result or (GetSystemTime > T);
end;

(*
Expand Down

0 comments on commit c382325

Please sign in to comment.