Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Rappelz > Rappelz Private Server
You last visited: Today at 18:47

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

Advertisement



[INFO] Types of .opt files

Discussion on [INFO] Types of .opt files within the Rappelz Private Server forum part of the Rappelz category.

Reply
 
Old   #1


 
Xijezu's Avatar
 
elite*gold: 0
Join Date: May 2011
Posts: 5,084
Received Thanks: 3,458
[INFO] Types of .opt files

'evening,

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:

TypeKeyData
Slog.ip127.0.0.1
Sdb.auth.port1433
Nauth.version200701120

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

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, 127.0.0.1, 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:
Code:
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;
			break;
		}

		*p = '\0';
		p++;

		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
Xijezu is offline  
Thanks
12 Users
Old 11/08/2013, 13:49   #2
 
elite*gold: 0
Join Date: Oct 2011
Posts: 84
Received Thanks: 12
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  
Reply


Similar Threads Similar Threads
X7 Files Info
03/16/2013 - S4 League - 0 Replies
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. Thank you.
[ HELP / Info ] GM shape files
02/21/2011 - Metin2 Private Server - 0 Replies
I wonder if anyone have GM shape files ? This is the GM image : http://img204.imageshack.us/img204/1012/gmhq.png
SOME INFO about .KOm files
01/30/2011 - Grand Chase - 8 Replies
File Extension KOM ( .KOM ) - Information link File Extension KOM ( .KOM ) - Information may you can find files extension information here... maybe some extension can help to open .kom files.. just look and try, im not forcing anyone to look this site but.. may it can help to solve som equestions about .kom files. tsk tsk.. What program uses .KOM file extension : File Extensions Database : eConsultant link: What program uses .KOM file extension : File Extensions Database : eConsultant ...
[INFO] To all those who will upload some files
12/22/2009 - Grand Chase Hacks, Bots, Cheats & Exploits - 8 Replies
If you are going to upload/release anything, better upload it to multiupload.com since some of the users encounters problems on your download links. They made me post this. They were complaining about dead links =/



All times are GMT +2. The time now is 18:47.


Powered by vBulletin®
Copyright ©2000 - 2024, 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 ©2024 elitepvpers All Rights Reserved.