|
You last visited: Today at 01:08
Advertisement
[TUTORIAL] Gamecore r40250 Source Code Configuration
Discussion on [TUTORIAL] Gamecore r40250 Source Code Configuration within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.
01/03/2014, 06:49
|
#1
|
elite*gold: 0
Join Date: Aug 2010
Posts: 29
Received Thanks: 24
|
[TUTORIAL] Gamecore r40250 Source Code Configuration
Hello, community!
This tutorial was made for the C++ noobs (those people who don't know the difference between a bool and an int), so please don't rage at me . In this short how-to topic, I'll show you how to configurate the basic functions of the core from the source code, so you won't have to mess up with Hex editors, .diff files and so on, because there may be a high chance that the adresses (or offsets! - those 0x3678ABCD -like things) won't match up, because of the different compilers which are used etc...
So, the first thing you should do: choose your favorite branch (I'm using mainline  ), and follow this path:
Srcs / Server / game / src In the src folder, you should find a source file called config.cpp. Open it. (It's logic, yeaah!)
Starting with line 24, you should encounter the declaration values. Here you will do your work:
Warning! Some (shitty) compilers might give you some errors if you don't leave the tab spacing default. So, in order to prevent mistakes, I would advise you to enable the "Show all characters" function. In Notepad++, you only have to click this button:
Warning no. 2! You can't change, for example, a string with an integer value, or a bool with a char! For example, bool test = true; may only have the values true or false! Google for "C++ data types" in order to learn more!
Well, if you got the preps right, this is a bit of what you can do:
Change the connection values
Between lines 26 - 36, you can predefine the values which you would usually set in the "CONFIG" files.
Change the server type
Between lines 43 - 47, you can change the server type.
Note: these integers act like bools, 0 means false and 1 means true.
Note: the int auction_server will be considered only if __AUCTION__ is defined!
For example, if you change test_server from 0 to 1, you would make the server GM-Mode by default. It is useful for test servers with a few number of players.
Change the limits
Between lines 51 - 59, server limits can be changed.
What does each mean?
guild_mark_min_level - the minimum level of a guild in order to upload a guild image;
no_wander - ??
g_iUserLimit - the limit of users that can be connected at the same time at this core. By default, it is the maximum limit + 1 of an 16-bit signed integer (32768). I think it might be set to higher values, if it is changed from an int to a long, but it might create bugs.
g_szPublicIP[16] - the public IP of the server (maximum limit of 16 characters!) If left default, the server should find the IP by its own.
g_szInternalIP[16] - the internal IP of the server. It behaves as the previous. It might be useful if you have to set up multiple servers in a LAN network.
g_bSkillDisable - disables the use of the skills (Who on Earth would want to do this?  )
g_iFullUserCount - the number of online players that must be reached in order the client to display the "FULL" value (next to the channel, instead of "NORM" or "BUSY")
g_iBusyUserCount - the number of online players that must be reached in order the client to display the "BUSY" value (next to the channel, instead of "NORM" or "FULL")
Foreign-empire whisper and Client version checking
Here, you can modify these values:
g_bEmpireWhisper - Enable whispering to a player which is in a foreign empire (I'm not 100% sure about this one)
g_bCheckClientVersion - Enables the checking of the client version.
g_stClientVersion - Current client version.
You may want to check this topic, in order to do the client stuff:
At last, but not least, changing the ItemShop URL
This can be done by changing the line 108.
The g_strWebMallURL should NOT contain http:// and the ending backslash, because this is the way it works. The full URL (with the player ID, account ID and other stuff) is declared somewhere (I haven't searched yet) in the code, by this variable.
I hope this topic is useful for somebody, and I would like to have some feedback, as I haven't really tested these, because my Windows Server 2003 on my other computer is doing some updates at the moment...
Have a nice day!
|
|
|
01/03/2014, 07:15
|
#2
|
elite*gold: 81
Join Date: Nov 2012
Posts: 975
Received Thanks: 531
|
looks interesting - time to learn c++ ! 
Thanks for your Tutorial
|
|
|
01/03/2014, 07:35
|
#3
|
elite*gold: 0
Join Date: Aug 2010
Posts: 29
Received Thanks: 24
|
Quote:
Originally Posted by .Poᴌᴌuᶍ
looks interesting - time to learn c++ ! 
Thanks for your Tutorial
|
You're welcome  Good luck in C++
|
|
|
01/03/2014, 09:54
|
#4
|
elite*gold: 0
Join Date: May 2013
Posts: 1,266
Received Thanks: 627
|
Quote:
Originally Posted by redrpci2008
Hello, community!
This tutorial was made for the C++ noobs (those people who don't know the difference between a bool and an int), so please don't rage at me .
|
I think your an C++ noob too. An bool is an Byte which is 0 or 1. not an int.
(And for .RoThe, exactly its a Bit but the CPU cant adress anything smaler than a Byte.)
|
|
|
01/03/2014, 10:10
|
#5
|
elite*gold: 0
Join Date: Apr 2011
Posts: 182
Received Thanks: 94
|
Quote:
Originally Posted by [uLow]NTX?!
I think your an C++ noob too. An bool is an Byte which is 0 or 1. not an int.
|
No, a Boolean has only 1Bit length. It can have either the value 1 or 0, there is no more space needed. Just for the record ^^
|
|
|
01/03/2014, 10:12
|
#6
|
elite*gold: 50
Join Date: Mar 2013
Posts: 2,401
Received Thanks: 1,613
|
Quote:
Originally Posted by .RoThe
No, a Boolean has only 1Bit length. It can have either the value 1 or 0, there is no more space needed. Just for the record ^^
|
thats what he said^^
|
|
|
01/03/2014, 10:14
|
#7
|
elite*gold: 0
Join Date: Apr 2011
Posts: 182
Received Thanks: 94
|
Quote:
Originally Posted by .InyaProduction
thats what he said^^
|
1 Byte =/= 1 Bit
1 Byte = 8 Bit
|
|
|
01/03/2014, 10:22
|
#8
|
elite*gold: 0
Join Date: May 2013
Posts: 1,266
Received Thanks: 627
|
Quote:
Originally Posted by .RoThe
1 Byte =/= 1 Bit
1 Byte = 8 Bit
|
At the least its a Byte because the CPU cant address anything smaller
|
|
|
01/03/2014, 10:27
|
#9
|
elite*gold: 50
Join Date: Mar 2013
Posts: 2,401
Received Thanks: 1,613
|
Quote:
Originally Posted by .RoThe
1 Byte =/= 1 Bit
1 Byte = 8 Bit
|
Sry reading wrong is a big strengh of mine
|
|
|
01/03/2014, 10:29
|
#10
|
elite*gold: 0
Join Date: Apr 2008
Posts: 35
Received Thanks: 0
|
What is the difference of theese branches?
|
|
|
01/03/2014, 10:42
|
#11
|
elite*gold: 0
Join Date: Apr 2011
Posts: 182
Received Thanks: 94
|
Quote:
Originally Posted by [uLow]NTX?!
At the least its a Byte because the CPU cant address anything smaller
|
Alright thanks to your answer, I looked it up.
In fact it seems that the CPU indeed could adress bits, but it would be too slow.
(  )
Nevertheless I was wrong, thanks^^
|
|
|
01/03/2014, 11:11
|
#12
|
elite*gold: 0
Join Date: Aug 2010
Posts: 29
Received Thanks: 24
|
Quote:
Originally Posted by [uLow]NTX?!
I think your an C++ noob too. An bool is an Byte which is 0 or 1. not an int.
(And for .RoThe, exactly its a Bit but the CPU cant adress anything smaler than a Byte.)
|
Please tell me how the hell do you store the value 4571 in a bool  I know that you can convert a bool to an int, but not viceversa!
|
|
|
01/03/2014, 11:40
|
#13
|
elite*gold: 0
Join Date: May 2013
Posts: 1,266
Received Thanks: 627
|
Quote:
Originally Posted by redrpci2008
Please tell me how the hell do you store the value 4571 in a bool  I know that you can convert a bool to an int, but not viceversa!
|
That not an bool an bool can only be 0 or 1 ( false / true )
Quote:
|
Boolean type: The boolean type, known in C++ as bool, can only represent one of two states, true or false.
|
|
|
|
01/03/2014, 11:45
|
#14
|
elite*gold: 0
Join Date: May 2011
Posts: 1,781
Received Thanks: 618
|
Quote:
Originally Posted by [uLow]NTX?!
That not an bool an bool can only be 0 or 1 ( false / true )

|
You can save a char in bool (0 to 255) but a boolean is not always saved as a char, it could also be a long.
*(Unsigned char*)&a_bool = a_range_from255to0
|
|
|
01/03/2014, 12:08
|
#15
|
elite*gold: 0
Join Date: May 2013
Posts: 1,266
Received Thanks: 627
|
Quote:
Originally Posted by [uLow]Beni
You can save a char in bool (0 to 255) but a boolean is not always saved as a char, it could also be a long.
*(Unsigned char*)&a_bool = a_range_from255to0
|
I think your talking about Microsoft's "BOOL", iam talink about "bool / boolean".
Ive googled it and cant find anything wth an bool with a range of 0- 255.
Google says ALWAYS boo, = true / false (0/1)
|
|
|
 |
|
Similar Threads
|
[Tutorial] Gamecore CONFIG
07/10/2016 - Metin2 PServer Guides & Strategies - 114 Replies
Hallo Community,
Da ich schon öfter nach den Befehlen der Configs im Gamecore gefragt wurde habe ich mir gedacht sie hier einmal übersichtlich aufzulisten und zu erklären damit ihr alle sie nutzen und verstehen könnt.
Gamecore Config
HOSTNAME: channel1
Ist für die Unterteilung der Cores da .
|
Gamecore .Revo Edition - Source Code
10/28/2012 - Metin2 PServer Guides & Strategies - 13 Replies
Hello everybody, I come here to post the source of my gamecore.
Revision: 2089M
Generated by IDA (decompiller)
Source:
Download: http://depositfiles.com/files/bnowlhkt3
(file in C)
|
[Release & Tutorial] Source-Code to make your Car transparent
08/29/2012 - NFSW Hacks, Bots, Cheats & Exploits - 11 Replies
Hey Guys,
i release my ASM-Script that i have made with Cheat-Engine to make your Car transparent.
1. Open Cheat engine, select your NFSW-Process and Click on "Memory View" under the Scanlist.
2. Now a new Window appears, press CTRL+A on your Keyboard.
3. A third Window opened, and paste everything into the Text-Area:
aobscan(transparent,D7 00 85 FF 0F 84 B8 00)
|
C# Tutorial through source code!
08/06/2011 - CO2 Programming - 12 Replies
I hate always taking from the community and never giving... so I thought that maybe I could give a little now! ^.^
I don't know much about C# other than basic stuff like WHAT threading is, not how to do it. Or stuff like Console.WriteLine("") stuff like that, loops etc.
But what I do know how to do is how to explain it to you. I've posted some entries on PasteBin.com some source code for each topic along with comments explaining to you what they all mean and how that code works. I've...
|
C++ Source Code /Tutorial für Anfänger
08/24/2010 - Coding Tutorials - 5 Replies
Hallo Leute , ich hab hier mal ein kleines Tutorial parat wo ihr wortwörtlich spielend lernt ;):
Ladet euch einfach den Anhang runter ich habe diese Source Codes auf CPP.com gefunden
und für euch übersetzt , da ich dachte das sie ausgezeichnet für ein Anfänger Tutorial geeignet sind
nicht vergessen THX zu drücken :D
Hier die Datein mit meinen Kommentaren :
Euer Cooler7878 :mofo:
|
All times are GMT +1. The time now is 01:09.
|
|