SCAR Code:
tab_Combat = 21;
tab_Stats = 22;
tab_Quest = 23;
tab_Diary = 24;
tab_Inv = 25;
tab_Equip = 26;
tab_Prayer = 27;
tab_Magic = 28;
tab_Objectives = 29;
tab_Friends = 30;
tab_Ignore = 31;
tab_Clan = 32;
tab_Options = 33;
tab_Emotes = 34;
tab_Music = 35;
tab_Notes = 36;
tab_LogOut = 37;
they don't use 1-17 anymore. They added 20 to each number that the tab went with, but just use the constants, it makes it easier and you don't have to change the numbers in your scripts if the SRL dev's change the numbers that go with each gametab, so when there are updates you won't have to worry about updating your script to work with the new gametabs.
EDIT: Just looked at how you were using it, just do:
GameTab(21 + Random(12));
or the better way of doing it so it won't break:
GameTab(Tab_Combat + Random(12));
You should use the second one I wrote.