RuneScape Player Counter v2.5
So, I've screened through my old scripts one day and I saw this unfinished business flying arround (v2.0). Since I HATE unfinished work, I decided to "pep up" the script a little bit for its final release. This represents my finished work, and I won't edit it anymore (or fix bugs), DIY! Congratulations for anyone who finds a bug in this
. I originally made this script to check how many people are currently playing RS without opening the site, then made it into a plotter. Right now, it can do several more things, and it is one of the most advanced scripts I've made.
Release Notes (developers FULL version):
SCAR Code:
{======================[Description and Release Notes]=========================}
{ }
{ PlayerCounter V [2.5] }
{ }
{=============================[How to use this]================================}
{ }
{ What this script does is, that it connects to the runescape main page, }
{ gathering the entire page's content and then extracting the number of people }
{ playing the game from the top of the page. }
{ }
{ The script then dumps the information into the debug window, afterwards }
{ graphes it to the debug image in realtime. Using this tool, you can analyze }
{ what the statistics for RS are using an inbuilt plotter. }
{ }
{ Setup is simple. Set }
ClientName = 'Mozilla Firefox 1.5';
{ to the name of your http client. You should choose something ordinary so RS }
{ doesn't suspect anything. Note that this doesn't set the window's name, but }
{ the internal client name in memory. }
{ Set the time interval for data collection below in seconds: }
IntervalTime = 30;
{ I reccomend you keep it at over 30 seconds, else jagex might suspect your IP }
{ and do bannage. IP bannage alert! }
{ Set the below to how many times you want samples to be collected, if you }
{ want to count endlessly, make it negative! }
SampleSize = 720;
{ Next, set the resolution of the data. I keep it at 1000's, so every pixel on }
{ the graph represents 1000 players, but set it to your liking: }
Resolution = 1000;
{ World resolution. See above. I reccomend you set it arround 4 or 5 (4 is the }
{ minimum, any lower and if a world is full it will be off the graph): }
WorldResolution = 5;
{ Set 4 worlds you want to graph here. If you don't want to graph a world, }
{ make it 0 or a negative value. }
W0 = 1;
W1 = 29;
W2 = -1;
W3 = -1;
{ World colors. Sets the colors of the lines associated with their worlds. }
cW0 = 65535;
cW1 = 16711680;
cW2 = 8388863;
cW3 = clWhite;
{ Show details? If yes, it will display world # and status ON the line. Looks }
{ messy the first few times, but is helpful to know current status. }
Details = false;
{ }
{ Just press the play button and allow the firewall to access the runescape }
{ main page.
{ }
{=============================[Version History]================================}
{ }
{ 1.5 - Completely rewrote the way I graph stuff. Much more advanced and no }
{ more crashes! Removed file support - the array isn't THAT big. This }
{ major update finally graphes correct and makes the graph do }
{ EVERYTHING correct. No more huge graphs with pixely lines and no }
{ reference! }
{ }
{ 1.6 - Bug fixes, bug fixes and bug fixes... Made it work intervals out in }
{ seconds not minutes. }
{ }
{ 2.0 - Decided to make this a new major version because the plotter in no }
{ way resembles the original except for the general idea. Release! }
{ }
{ 2.1 - Added ability to collect data from multiple worlds. New array }
{ structure to collect data added. Ripped out file functions because I }
{ don't plan on adding them again - no point. Take a screenie if you }
{ want to record data. }
{ }
{ 2.2 - Improved abstraction layer. Graphing of lines is easier because of a }
{ procedural approach. FUCK SCAR because it can't transfer arguments to }
{ safe procedures, meaning I need a new global variable called aWorld. }
{ }
{ 2.3 - Better timing, though still less than perfect and CPU intensive. }
{ Using TTimers from forms would've been easier, but also very messy. }
{ Would be cool if TTimer objects could be initialized without binding }
{ them to a form. }
{ }
{ 2.4 - Added detail output. Made it optional using a constant called Details }
{ which should help keep it clean. }
{ }
{ 2.5 - Bug found: Negative world means array accesses negative value. A }
{ messy fix was to use a label to skip that part of the script, but its }
{ only temporary because it's contrary to structured programming. }
{ Also, release. }
{ }
{==============================================================================}
{ }
{ DO NOT DELETE BELOW THIS LINE }
{ (* A }
{ .--. . . }
{ | ) _|_ _|_ }
{ |--: .-. | .--.--. .-. .--.| .-. .--. }
{ | )( )| | | |( ) `--.| (.-' | }
{ '--' `-' `-'' ' `-`-'`-`--'`-'`--'' }
{ script production*) }
{ }
{ ADD LIST OF CONTRIBUTERS/EDITORS/MODIFIERS HERE: }
{------------------------------------------------------------------------------}
If you're too lazy to read through the above crap (like I am
), below is a list of features and can-do's of the script:
Features:
- Connects to RS server to get # total players
- Can get up to 4 world statuses simultaneously
- Graphs the results
- Has option to label the lines
- Has option to color the lines differently
- Can set custom clientname to avoid IP bannage
- Custom data recording intervals
- Custom resolution setup
- Nice, sleek output in debug window with gridlines to make it easier to analyze data
- Shows that SCAR is good not just for cheating

And no, there's no bugs this time. Tested for more than 48 hours and ran flawlessly on a quadcore borrowed from a friend
. It got a little slow at the end, because the arrays were so huge. Prove me otherwise and I will post a list of bugs!
So, here's a screenshot of what the output looks like (without detailed labeling enabled):

The developement version contains comments that normal users probably don't need. You should only get the developement version (RScounter_2.5_dev.scar) if you want to disect the script or you want to edit it. Feel free to do so, as long as you keep my ASCII + license notice in the script.
If you like it, post a progress report (screenshot)!
Happy logging!