Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Silkroad Online > SRO Coding Corner
You last visited: Today at 22:12

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[All Sro] Generic Server Stats

Discussion on [All Sro] Generic Server Stats within the SRO Coding Corner forum part of the Silkroad Online category.

Reply
 
Old   #1

 
elite*gold: 260
Join Date: Aug 2008
Posts: 560
Received Thanks: 3,779
[All Sro] Generic Server Stats



This program is a generic server stats program for all Silkroad versions. It uses a lot of the code I have already released as part of my edxSilkroadLoader project to be fully data driven. In addition, I have added in code that shows how to convert the server names from foreign languages into English by hand via code.

For SRO versions that block most IPs, like JSRO and TSRO, the names will need to be translated and the program recompiled if you want English names for those versions. I only used Google translator for the translations of the names, so for the servers that are wrong, you will need to recompile the program.

This is a programmers project and tool! It does not have a GUI but rather just displays information on a console. The program is setup to write out a text file to make processing the server stats information easy. The format of the file is as follows:
Quote:
# of servers
Server Id
Server Name
Current Players
Max Players
State (1 = open, 0 = check)
...
Server Id
Server Name
Current Players
Max Players
State (1 = open, 0 = check)
For example, RSRO would look like this:
Quote:
2
220
Zeus
354
2500
1
221
Venus
539
2500
1
So if you have a website, you can upload the file via FTP to your own directory and write a simple PHP script or ASP script to parse the file and display the results. Or, you can post the data via PHP via a web URL. Doing that is outside the scope of this thread, but that is just one idea of many I've had requested that lead to the creation of this tool.

All source code is provided and as a bonus I have included an updated Silkroad Security API. This API allows full emulation of the Silkroad security protocol so you can implement a true man in the middle attack without modifying the client at all if you setup your own proxy or want to add Silkroad security to your emulator project. It's not the simplest concepts to understand, but everything you need is there so you just have to take the time to figure it all out.

-- Result: 1/41 (2.44%)

If the program fails to run with an Application Configuration Error, you will need to install:



Please read the "readme.txt" file as well for additional information on how to run the program multiple times and for other details. I hope there are not any serious bugs, but I have done simple testing on all the SRO versions I have and had no problems.

The project and code is provided in the public domain with no license and comes with no warranty or support. You can use it and modify it however you need.

Enjoy!
Attached Files
File Type: zip SroServerStats.zip (86.3 KB, 1602 views)
pushedx is offline  
Thanks
36 Users
Old 12/23/2009, 04:57   #2
 
elite*gold: 20
Join Date: Oct 2007
Posts: 3,085
Received Thanks: 1,109
nice work as awalys. keep on.
_FoulSoul_ is offline  
Old 12/23/2009, 07:57   #3
 
elite*gold: 0
Join Date: Jan 2008
Posts: 397
Received Thanks: 84
You're awesome! How do you get all these ideas?
GibCo2ntra is offline  
Old 12/23/2009, 20:10   #4

 
elite*gold: 260
Join Date: Aug 2008
Posts: 560
Received Thanks: 3,779
Thanks for the comments guys.

I've made a bit of an update to make this project a lot easier to work with and more usable. All translation logic has been moved to Unicode data files now, so you can easily change the existing translations without having to recompile. In addition, server names that are not translated are logged to a file so you can easily copy and paste their names. I also fixed a few bugs that would result in a crash due to exception handling code being slightly off.

I hope this new version is much better now! Here is the new readme.txt
Code:
SroServerStats (1.1)
pushedx

==] Setup [==

Locale to Language
	2 --> KSRO
	4 --> CSRO
	12 --> TSRO
	18 --> ISRO
	23 --> VSRO
	15 --> JSRO
	38 --> THSRO
	40 --> RSRO

translations.txt -- Contains the translations of the server names. The format is:

	Silkroad Locale
	Text to translate
	Desired translation

config.txt -- Contains the code page value for the specific Silkroad locale. The format is:

	Silkroad Locale<TAB>Code Page

You will not need to modify this file!

==] Usage [==
	SroServerStats <Interval (ms)> <Silkroad Path> <Division>

Examples:
	SroServerStats.exe 5000 "J:\sro\[isro][225]Silkroad" 1
	SroServerStats.exe 5000 "J:\sro\[csro]Silkroad" 2
	SroServerStats.exe 5000 "J:\sro\[thaisro]Silkroad" 1

==] Instructions [==

1. Edit "run.bat"
 - Modify the Interval if you need to (minimal is 500ms)
 - Modify the path to your Silkroad directory
 - Modify the Division if you need to

2. Save "run.bat" and then execute it.

3. Press any key in the console to exit the SroServerStats program.

4. Any server names not translated, will be added to the "Unknown.txt" file. 
*** Please do not delete this file ***
Simply open it up in note pad and delete the contents and save it again.

SroServerStats saves an INI file of the SRO version you are running in the format of:

# of servers
Server Id
Server Name 
Current Players
Max Players
State (1 = open, 0 = check)
...
Server Id
Server Name
Current Players
Max Players
State (1 = open, 0 = check)

For example, from RSRO_1.ini:

2
220
Zeus
354
2500
1
221
Venus
539
2500
1

You can easily process the data in this file to have access to the server stats information on demand.

If you wish to run the program multiple times for different versions, simply create a new .BAT file for
each version and modify the command line data.
2/40 (5%)

If anyone uses this a lot, please let me know how it goes. Or if you need some help using it, feel free to ask.
Attached Files
File Type: zip SroServerStats_1_1.zip (95.6 KB, 382 views)
pushedx is offline  
Thanks
13 Users
Old 12/23/2009, 23:45   #5
 
s2k's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 194
Received Thanks: 1,091
this is awesome bro, i love you for that you allow us to be leecher of your knowledge.

good luck for your future projects!
s2k is offline  
Old 12/24/2009, 03:27   #6
 
hadyz3's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 420
Received Thanks: 52
awesome project for isro and rusro in the next few weeks coz i expect a crowded servers there
for other versions of sro we will need it for fun ( NO crowded servers)

offtopic: autoselect got ****** up in ksro coz as u know they hate botters ( especially goldbots) do u have any idea how to fix it?
i know u dont have time for it just try to give us ideas
ty again
hadyz3 is offline  
Old 12/24/2009, 20:03   #7
 
elite*gold: 0
Join Date: Aug 2007
Posts: 337
Received Thanks: 146
Really nice project

Is it able to change the format of how it shows the server status?
And also is it able to just have one or some servers to be shown only?
djfisring is offline  
Old 12/25/2009, 20:17   #8
 
elite*gold: 0
Join Date: Dec 2008
Posts: 316
Received Thanks: 44
Nice dude more then the one from PH!
XchangliiX is offline  
Old 01/10/2010, 00:20   #9


 
Yo123's Avatar
 
elite*gold: 41
Join Date: Nov 2007
Posts: 3,385
Received Thanks: 2,700
once again drew, i want you to marry me
Yo123 is offline  
Old 01/10/2010, 14:46   #10
 
elite*gold: 0
Join Date: Aug 2007
Posts: 281
Received Thanks: 8
looks pritty and usefull
iW84u is offline  
Old 01/13/2010, 15:55   #11
 
elite*gold: 0
Join Date: Feb 2009
Posts: 88
Received Thanks: 5
I don't get it to work, could someone make something like a guide, I'm in rSRO btw.
Sakurii is offline  
Old 01/13/2010, 16:10   #12

 
elite*gold: 260
Join Date: Aug 2008
Posts: 560
Received Thanks: 3,779
Quote:
Originally Posted by Sakurii View Post
I don't get it to work, could someone make something like a guide, I'm in rSRO btw.
All you have to do is modify "run.bat" to have the path of your Silkroad directory and then run the batch file.

So if your rSRO path is: "C:\program files\[rsro]Silkroad" then your run.bat file would be:

SroServerStats.exe 1000 "C:\program files\[rsro]Silkroad" 1

And that's it! All you have to do is change the path to your Silkroad directory, the other options are for people who want to use the stats and upload them to the web.
pushedx is offline  
Thanks
1 User
Old 01/13/2010, 16:17   #13
 
elite*gold: 0
Join Date: Feb 2009
Posts: 88
Received Thanks: 5
I did that but then it does nothing... I'm gona try again but what should I do with the serverstats.exe (or something) and where should I see the stats?

I do have W7 64-bit, maybe that's it, and i'm runnin rSRO. I just says SroServerStats.exe blablabla press a button to continue and then it shuts down

Now it says can't load Media.pk2... I'm confused
Sakurii is offline  
Old 01/21/2010, 03:37   #14
 
elite*gold: 0
Join Date: Mar 2008
Posts: 556
Received Thanks: 545
Kinda a neat little tool.
Murgen is offline  
Old 01/28/2010, 10:30   #15
 
PhreaK™'s Avatar
 
elite*gold: 0
Join Date: Aug 2009
Posts: 226
Received Thanks: 78
Every time i try and use it i get a pk2 reader tool error...anybody know the solution to this?
PhreaK™ is offline  
Reply


Similar Threads Similar Threads
The generic 'what patch' question.
08/05/2010 - CO2 Private Server - 13 Replies
<revamped now that not on shitty cellphone keyboard> So due to boredom and extreme insanity I've decided I want to start working on pservers again some (my proxy is on hold mostly due to work, social life, lack of internet at home and the fact that I'm a lazy bastard who tends not to finish projects when there is no point in them). As part of this desire I need some help from the community to figure out what the best route would be. Yes, this gets asked all the time by so many people......
Trojan Horse generic.MJM ?
08/24/2008 - Conquer Online 2 - 9 Replies
I wanna know Is a Trojan Horse generic.MJM used in Speeds , Bots , Mods , Macro`s ECT , Because AVG says i got one in me Conquer Folder:confused:
Generic Anti X-Trap ?
05/21/2007 - General Coding - 0 Replies
Gibts ein universal Anti X-Trap ? Bwz wie kann man die DLLs anpassen für das jeweilige Game ? Gibts da Guides ?
Generic Directx Tools?
11/13/2006 - General Coding - 13 Replies
Gibt es eigentlich ein Tool womit man diverse funktionen für Dx8/9 Programme Einstellen kann? Damit meine ich Funktionen wie z.B das alle Texturen nichtmehr geladen werden etc. Am liebsten wäre mir dann, wenn das Tool automatisch die Prozesse hookt oder sich selbst im System Verzeichniss austauscht.



All times are GMT +1. The time now is 22:12.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.