Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Rappelz > Rappelz Private Server
You last visited: Today at 09:21

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


[INFO] Types of .opt files

Old   #1
You're the one who died

elite*gold: 0
Join Date: May 2011
Posts: 4,843
Received Thanks: 3,222
[INFO] Types of .opt files


Since I'm currently working on a little project, I was able to figure something out.
As far as I know we never had a real explanation for this and there are still people out which were wondering about this, so:


Which would be, as example:
S log.ip:

Did you ever asked yourself what S, N or even T means?

Here's the answer to that question:
PrincessAurora needs those values to specify which type the data has (see header of the table).
In this case,, the IP-Address of the logserver, is a String.
The data of auth.version is a Number.

The rest of those data types:

S -> String, which obviously can hold words or sentences.
N -> Number, which is used for booleans (true or false, which is equal to 1 or 0) as well.
T -> Equal to N, except that its value is a short* instead of long*.
F -> It is used for reading float values, as example: 3.1415
V -> It is used to read vector values, as example: auth.some_vector:2.45;5.43;1.29 **.
Q -> It is used to read a quaternion, as example: auth.some_vector:2.45;5.43;1.29;2.65 **.

*The difference between a short and a long is just their capacity. Short (Int16) is able to hold a value between −32,768 and 32,767, whereas a long (Int32) can hold a value between −2,147,483,648 and 2,147,483,647.
**I'm not really sure for what vector and quaternion is used, but apparently you can use them in the .opt files.

For the people out there which do understand C++, here's the code which does get used for reading the .opt file:
bool XEnvStruct::LoadFromFile( const char * pszFileName, const char *pszMask )
	THREAD_SYNCRONIZE( &m_pImpl->csLock );
	bool bRtn = false;

	FILE *fp = fopen( pszFileName, "r" );

	if( !fp ) return false;

	char buf[1024];
	char *p;

	bRtn = true;

	while( !feof( fp ) )
		if( !fgets( buf, 1024, fp ) ) break;

		p = strchr( &buf[2], ':' );

		if( !p ) {
			bRtn = false;

		*p = '\0';

		if( *p )
			if( p[ strlen( p ) - 1 ] == '\n' ) p[ strlen( p ) - 1 ] = '\0';

		char type  = buf[0];
		char *key  = &buf[2];
		char *data = p;

		if( !XStringUtil::WildCardCmp( pszMask, key, true ) ) continue;

		Vector v;
		Quaternion q;

		v.x = v.y = v.z = 0.0f;
		q.x = q.y = q.z = q.w = 0.0f;
		switch( type )
		case 'S':	Set( key, data ); break;
		case 'F':	Set( key, (float)atof(data) ); break;
		case 'V':	sscanf( data, "%f;%f;%f", &v.x, &v.y, &v.z ); Set( key, v ); break;
		case 'Q':	sscanf( data, "%f;%f;%f;%f", &q.x, &q.y, &q.z, &q.w ); Set( key, q ); break;
		case 'N':	Set( key, atoi(data) ); break;
		case 'T':	Set( key, (short)atoi(data) ); break;

	fclose( fp );

	return bRtn;
I hope this helps you out somehow.


Xijezu is offline  
12 Users
Old   #2
elite*gold: 0
Join Date: Oct 2011
Posts: 84
Received Thanks: 11
thank u

i was asking my self this question long time ago but didn't get an answer for it

now i got the answer so thank u again

pprfds is offline  

« Previous Thread | Next Thread »

Similar Threads
X7 Files Info
Does anyone know the description of the X7 files? Like what each file is about and what does it do. Since I want to make it so I can buy a perm hair....
0 Replies - S4 League
[ HELP / Info ] GM shape files
I wonder if anyone have GM shape files ? This is the GM image :
0 Replies - Metin2 PServer - Discussions / Questions
SOME INFO about .KOm files
File Extension KOM ( .KOM ) - Information link File Extension KOM ( .KOM ) - Information may you can find files extension information here......
8 Replies - Grand Chase
[INFO] To all those who will upload some files
If you are going to upload/release anything, better upload it to since some of the users encounters problems on your download links....
8 Replies - Grand Chase Hacks, Bots, Cheats & Exploits

All times are GMT +1. The time now is 09:21.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.