SRL Archive - SRL Archives

FGameTab


Naum

2008-10-30 12:00:23

Uses Hotkeys to change tabs. Only will change tabs if Ftabnumber is lower than 8. Otherwise it uses GameTab. Very usefull!

{*******************************************************************************
Function GameTabF(FTabNumber : Integer) : Boolean;
By: NaumanAkhlaQ
Description: If FTabNumber is less than 8 then it will use the F Key
to change tab. If FTabNumber > 8 Then it will use GameTab.
*******************************************************************************}

Function GameTabF(FTabNumber : Integer) : Boolean;
Begin
If (GetCurrentTab = FTabNumber) Then
Begin
Result := True;
Exit;
End Else
If ((FTabNumber < 1) or (FTabNumber > 15)) Then
Begin
srl_Warn('FGameTab', IntToStr(FTabNumber) + ' is no valid GameTab', warn_AllVersions);
Result := False;
Exit;
end;
If (FTabNumber > 8) Then
Begin
GameTab(FTabNumber);
Result := True;
End Else
Case FTabNumber Of
1: TypeByte(VK_F1); 2: TypeByte(VK_F2);
3: TypeByte(VK_F3); 4: TypeByte(VK_F4);
5: TypeByte(VK_F5); 6: TypeByte(VK_F6);
7: TypeByte(VK_F7); 8: TypeByte(VK_F8);
end;
Wait(Random(80));
Result := (GetCurrentTab = FTabNumber);
Wait(470 + Random(80));
end;

I like iz niice

The_Shermanator

2008-10-30 12:05:39

Hmm…this sounds familiar, because somebody just posted something like this the other day lol.
Anyways goodjob, it is much faster and *supposidly* less auto-like, but in my opinion GameTab() should have hotkeys and clicking combined. Like at random it would click the tab when called or another time when called it will do the hotkey because not everyone uses the hotkeys 24/7 and not everyone clicks 24/7.

-Shermanator

mastaraymond

2008-10-30 12:05:53

SMART doesn't work with F-Keys.

That is why it's not added into SRL, as far as I know..

Naum

2008-10-30 12:07:39

Meh, bad, But with SMART down atm. I personally think it should be used its much more faster.

BTW why won't smart work with F Keys?

mastaraymond

2008-10-30 14:01:08

From: NaumanAkhlaQ
Meh, bad, But with SMART down atm. I personally think it should be used its much more faster.

BTW why won't smart work with F Keys?

It works but it also types a letter, most likely able to be fixed.. I don't know about the latest version of SMART though..

Nava2

2008-10-30 14:04:18

You need to say key up :)

Your best bet would be to, in the case, declare a variable to be VK_F? then after the case do:

Keydown(ByteVar);
Wait(RandomRange(10, 40));
KeyUp(ByteVar);

Or just do TypeByte(VK_F?);

Either way, you need to call KeyUp.

By the way, you need to do a larger wait before result. As it takes time for RS to load… So, waiting < 75 is generally bad. :(

Naum

2008-10-30 14:45:13

Meh fixed :), changed keydown with typebyte :)

Sandstorm

2008-10-30 17:26:23

http://www.villavu.com/forum/showthread.php?t=37402

Lol ^.^. Well, yours is probably better, but I'll stick with mine :).

Narcle

2008-10-30 20:11:07

FTab alternative to GameTab - 09-13-2008
http://www.villavu.com/forum/showthread.php?t=35344

Also I stopped using this because of one reason… it randomly types letters in the RS chat but it just doesn't push enter (in SMART anyways). I haven't tested this with regular but yes… This has been made before. :p