Register for your free account! | Forgot your password?

You last visited: Today at 18:45

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

Advertisement



[SAMMELTHREAD] Game Source Changes

Discussion on [SAMMELTHREAD] Game Source Changes within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.

Closed Thread
 
Old 01/02/2014, 09:29   #91
 
RaiN..'s Avatar
 
elite*gold: 0
Join Date: Jan 2013
Posts: 10
Received Thanks: 2
im feeling like the fifth wheel right now but meh..go on
we got a bunch of crappy code lines and this doenst help..this wont.
why are you even trying?
you're ******** on each other like you're getting something back..isnt worth at all.
No one gonna post a serious mod..not even remotely.
So why are you complaining each other with some mixed languages

(it's so ******* bad, in order to do something that last..you gotta focus on a language since we aren't all german and we "can't" understand...well..
if you have the need to speak in nazist make your own topic ..
this was started and stated as english one)


just one moar thought:
why should you/we help others?
i mean...some people here can't even compile the source but they're still claiming help.
what gonna happen once they'll have 1 or more problems?
these guys are the one who open "garbage-servers" which most likely end up in a week or two, making metin2-private server dirty.
that's pretty much everything i guess... just got up so i could have missed something.
RaiN.. is offline  
Thanks
1 User
Old 01/02/2014, 10:03   #92
 
elite*gold: 0
Join Date: Jul 2010
Posts: 83
Received Thanks: 89
Quote:
Originally Posted by Zonni View Post
This little enhancement can be use to record every whisper in game (useful stuff for GameMasters).

Firstly include db.h in input_main.cpp.

Secondly find 502 line in input_main.cpp (shown under)
Code:
if (LC_IsEurope() != true)
{
	sys_log(0, "WHISPER: %s -> %s : %s", ch->GetName(), pinfo->szNameTo, buf);
}
And simply replace with this:
Code:
if (LC_IsEurope() == true) {
	char szQuery_WLog[1024+1];
	snprintf(szQuery_WLog, sizeof(szQuery_WLog), "INSERT INTO whispers (from_msg, to_msg, msg_text) VALUES ('%s', '%s', '%s');", ch->GetName(), pinfo->szNameTo, buf);
	std::auto_ptr<SQLMsg> pmsg(DBManager::instance().DirectQuery(szQuery_WLog));
}

Finally execute this query in player database:
Code:
CREATE TABLE `whispers` (
`id`  int(20) NOT NULL AUTO_INCREMENT ,
`from`  varchar(24) NOT NULL DEFAULT 'error' ,
`to`  varchar(24) NOT NULL DEFAULT 'error' ,
`msg`  varchar(250) NOT NULL DEFAULT 'empty_msg_error' ,
PRIMARY KEY (`id`)
);
CHANGE COLUMN `from` `from_msg`  varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'error' AFTER `id`,
CHANGE COLUMN `to` `to_msg`  varchar(24) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'error' AFTER `from_msg`,
CHANGE COLUMN `msg` `msg_text`  varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'empty_msg_error' AFTER `to_msg`;



Well done, you have Whisper log in your server (i'm not sure it right works, because i dont know what collation i must set in mysql so - MARKED AS UNTESTED but should work without any problem.)

Or change the line
Code:
std::auto_ptr<SQLMsg> pmsg(DBManager::instance().DirectQuery(szQuery_WLog));
with
Code:
std::auto_ptr<SQLMsg> pmsg(LogManager::instance().Query(szQuery_WLog));
To the table 'whispers' in log database?
Adasaurus is offline  
Old 01/02/2014, 14:17   #93
 
Zonni's Avatar
 
elite*gold: 100
Join Date: Feb 2008
Posts: 195
Received Thanks: 270
Quote:
Originally Posted by Adasaurus View Post
Or change the line
Code:
std::auto_ptr<SQLMsg> pmsg(DBManager::instance().DirectQuery(szQuery_WLog));
with
Code:
std::auto_ptr<SQLMsg> pmsg(LogManager::instance().Query(szQuery_WLog));
To the table 'whispers' in log database?
I'm not sure, try

BTW. If your mysql user which is set in config file have access to the log and player databases, simply change "INSERT INTO whispers" to "INSERT INTO log.whispers" and should work & save in log database
Zonni is offline  
Old 01/02/2014, 15:05   #94
 
elite*gold: 0
Join Date: Dec 2013
Posts: 48
Received Thanks: 152
Quote:
Originally Posted by Zonni View Post
I'm not sure, try

BTW. If your mysql user which is set in config file have access to the log and player databases, simply change "INSERT INTO whispers" to "INSERT INTO log.whispers" and should work & save in log database
I added a special function at log.cpp calling it, that way you can do the MySQL escape string, or else I could use SQL Injection or other stuff right with PM system.

After ShoutLog add this: (at log.cpp)

Code:
//NEWTHATGUYPT - Whisper Logging Function
void LogManager::WhisperLog(const char * from, const char * to, const char * message)
{
	m_sql.EscapeString(__escape_hint, sizeof(__escape_hint), message, strlen(message));

	Query("INSERT INTO whisper_log (from_msg, to_msg, msg_text) VALUES ('%s', '%s', '%s')", from, to, __escape_hint);
}
At log.h this virtual method:
Code:
//NEWTHATGUYPT - Whisper Logging Function
void		WhisperLog(const char * from, const char * to, const char * message);

And at input main replace:
Code:
if (LC_IsEurope() != true)
{
	sys_log(0, "WHISPER: %s -> %s : %s", ch->GetName(), pinfo->szNameTo, buf);
}
with:
Code:
//NEWTHATGUYPT - Adds Whispers to Log Database
LogManager::instance().WhisperLog(ch->GetName(), pinfo->szNameTo, buf)
;

Add this at the database "log":
Code:
DROP TABLE IF EXISTS `whisper_log`;
CREATE TABLE `whisper_log` (
  `id` int(20) NOT NULL AUTO_INCREMENT,
  `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `from_msg` varchar(24) NOT NULL DEFAULT 'error',
  `to_msg` varchar(24) NOT NULL DEFAULT 'error',
  `msg_text` varchar(250) NOT NULL DEFAULT 'empty_msg_error',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

This way the text will get past by the function that cleans eventual SQL Injection vulnerabilities and other vulnerabilities so you can not do things like:
UPDATE INTO PLAYERS WHERE NAME='MY NAME' GOLD=9999999999


Thanks to Zonni for the idea, this one is completly safe to use guys, enjoy.

Result:
RageAtMeBros is offline  
Thanks
3 Users
Old 01/02/2014, 15:39   #95

 
elite*gold: 0
Join Date: Jan 2013
Posts: 348
Received Thanks: 353
You should make sure to remove the calls to the ymir server, or they'll get your ip, or idk what from your computer

Quote:
Originally Posted by xCPx View Post
Das konnte man davor auch schon...
war sogar relativ einfach...

Nur die modelle hätte jemand neu machen müssen
hätte man nicht O.o
man hätte die nur exportieren müssen, würden aber trotzdem gleich aussehen xD
TheMarv :< is offline  
Old 01/02/2014, 16:04   #96
 
elite*gold: 0
Join Date: Dec 2013
Posts: 48
Received Thanks: 152
Quote:
Originally Posted by TheMarv :< View Post
You should make sure to remove the calls to the ymir server, or they'll get your ip, or idk what from your computer



hätte man nicht O.o
man hätte die nur exportieren müssen, würden aber trotzdem gleich aussehen xD
I already posted the bypass to this.

Well, just a quick update with a proof of concept of my brand new quest function named "pc.getlang".

Hope you enjoy and can figure out the infinite aplications of this whole new function:



For example, using this and setting the .when files of the quests of the server I could translate the whole NPCs into infinite languages, including the options which I think that is whole new (I have not been much deep into metin2 stuff tho).

I could also for the Missions concatenate the lang + name of the arrays from the gameforge translate.lua to translate the whole server.

Aditionally and recoding part of the client-server architecture I could easily let the NPC names, mob names and so long, aswell as the mob messages and npc messages (the ones who show on top of them), and item_proto messages (like "You recieved Sword+0") at the client side, having a complete multi-language server.
RageAtMeBros is offline  
Thanks
4 Users
Old 01/02/2014, 19:43   #97

 
elite*gold: 0
Join Date: Jan 2013
Posts: 348
Received Thanks: 353
Quote:
Originally Posted by RageAtMeBros View Post
I already posted the bypass to this.

Well, just a quick update with a proof of concept of my brand new quest function named "pc.getlang".

Hope you enjoy and can figure out the infinite aplications of this whole new function:



For example, using this and setting the .when files of the quests of the server I could translate the whole NPCs into infinite languages, including the options which I think that is whole new (I have not been much deep into metin2 stuff tho).

I could also for the Missions concatenate the lang + name of the arrays from the gameforge translate.lua to translate the whole server.

Aditionally and recoding part of the client-server architecture I could easily let the NPC names, mob names and so long, aswell as the mob messages and npc messages (the ones who show on top of them), and item_proto messages (like "You recieved Sword+0") at the client side, having a complete multi-language server.
just for the license server, not the rest
TheMarv :< is offline  
Old 01/02/2014, 19:52   #98
 
elite*gold: 0
Join Date: Jul 2011
Posts: 12
Received Thanks: 0
When compiling game, pop up errors ;/ :
czxx1234 is offline  
Old 01/02/2014, 20:16   #99
 
elite*gold: 0
Join Date: Dec 2013
Posts: 48
Received Thanks: 152
Quote:
Originally Posted by TheMarv :< View Post
just for the license server, not the rest
Tell me exactly where they are please.
RageAtMeBros is offline  
Thanks
1 User
Old 01/02/2014, 20:24   #100
 
elite*gold: 0
Join Date: Dec 2013
Posts: 27
Received Thanks: 8
Wie wäre es mal damit den Startpost zu updateb?
Läuft bei uns is offline  
Old 01/02/2014, 21:08   #101

 
elite*gold: 0
Join Date: Jan 2013
Posts: 348
Received Thanks: 353
Quote:
Originally Posted by RageAtMeBros View Post
Tell me exactly where they are please.
i dont know about the other places, somebody told me that there are more(and I think there are more)
TheMarv :< is offline  
Old 01/02/2014, 21:32   #102
 
elite*gold: 198
Join Date: Mar 2011
Posts: 835
Received Thanks: 263
The ip from ymir it connects to is "202.31.178.251" but its down (It's not just you! looks down from here. also no answer to ping.
ƬheGame is offline  
Old 01/02/2014, 21:34   #103
 
elite*gold: 121
Join Date: Feb 2008
Posts: 654
Received Thanks: 411
Notepad++ and RegEx are your friend.
Legend2007 is offline  
Old 01/02/2014, 21:34   #104
 
.Inya's Avatar
 
elite*gold: 50
Join Date: Mar 2013
Posts: 2,401
Received Thanks: 1,613
Quote:
Originally Posted by ƬheGame View Post
The ip from ymir it connects to is "202.31.178.251" but its down (It's not just you! looks down from here. also no answer to ping.
try the right port
.Inya is offline  
Thanks
1 User
Old 01/02/2014, 21:38   #105
 
lolor2's Avatar
 
elite*gold: 135
Join Date: Oct 2007
Posts: 1,088
Received Thanks: 210
Quote:
Originally Posted by ƬheGame View Post
The ip from ymir it connects to is "202.31.178.251" but its down (It's not just you! looks down from here. also no answer to ping.
it doesnt connect to ymir because
_SERVER_CHECK_
is not defined ....
so dont worry about that ip
lolor2 is offline  
Closed Thread


Similar Threads Similar Threads
[Collection Thread] Ich suche ein Game! / I'm searching for a game!
05/27/2025 - General Gaming Discussion - 3430 Replies
German: Wenn ihr ein Spiel sucht dann postet es bitte in diesem Thread sonst versinkt die General Gaming Section in solchen Threads. Wer irgendwas anderes postet als nen Gametipp oder ne Gamesuche bekommt ausnahmslos eine Warnung! Sofern du auf der Suche nach Browsergames bist, dann verwende dieses Thema. 75% English: Please post in this thread if you are searching for a game instead of creating a separate thread otherwise there will be mess in the General Gaming Section because too...



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


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