SRL Archive - SRL Archives

Gametab.Scar


Baked0420

2009-08-23 23:46:58

I made this procedure so you won't get the annoying message saying GameTab(9); doesn't exist anymore. This is so you can randomly have a gametab be picked for antiban. Pretty basic and easy, but useful. (Doesn't include the logout button, can easily be added if you want it to be)


procedure RandomGameTab;
var
Z: Integer;
Q: TIntegerArray;
begin
Q:=[Tab_Combat, Tab_Stats, Tab_Quest, Tab_Diary, Tab_Inv,
Tab_Equip, Tab_Prayer, Tab_Magic, Tab_Friends, Tab_Ignore,
Tab_Clan, Tab_Options, Tab_Emotes, Tab_Music, Tab_Notes];

Z:= Random(15);
GameTab(Q[Z]);
end;

Naum

2009-08-24 00:10:11

GameTab(RandomRange(Tab_Combat, Tab_Notes));

:D

senrath

2009-08-24 01:07:22

From: NaumanAkhlaQ
GameTab(RandomRange(Tab_Combat, Tab_Notes));

:D


Nice try, but that can cause the warning that he made this function to avoid.

Baked0420

2009-08-24 03:50:58

I wasn't thinking about that Nauman, but yea, I made this to avoid any warnings. Thanks for the cover senrath :) haha

Would this be committed? I don't care if it's not, I'll still use it in my scripts, but I see Gametab(1+random(15)) in lots of scripts, so I think this would make them better. (and for some reason, they tabs get +20, not sure why lol, but this won't break)

marpis

2009-08-24 16:36:54

I like it.
Should be commited.