|
You last visited: Today at 04:13
Advertisement
LibM2 - A LibGame SDK
Discussion on LibM2 - A LibGame SDK within the Metin2 PServer Guides & Strategies forum part of the Metin2 Private Server category.
08/01/2013, 14:57
|
#61
|
elite*gold: 1862
Join Date: Jan 2009
Posts: 3,725
Received Thanks: 7,671
|
Man hat einfach "mehr" an Platz überschrieben... das ging aber bei einer bestimmten Game ... 2019 oder so.
|
|
|
08/01/2013, 15:06
|
#62
|
elite*gold: 405
Join Date: Dec 2007
Posts: 6,615
Received Thanks: 6,358
|
Quote:
Originally Posted by Computerfreek
Sicher, dass er das nicht tut? Ich würde sagen er ändert von singed auf unsigned, also vorzeichenbehaftet auf vorzeichenunbehaftet.
|
Hmh darüber habe ich nicht nachgedacht. Was dann (evtl) angepasst wären müsste wären die Conditional Jumps.
Quote:
Originally Posted by Computerfreek
Hatte xCPx nicht mal ein Video gemacht, wo er gezeigt hat dass auch mehr geht (beim Level)?
|
Möglich, hab ich dann aber nicht gesehen, da ich mich eigentlich gar nicht mit Privatservern beschäftige..
|
|
|
08/03/2013, 11:33
|
#63
|
elite*gold: 0
Join Date: Mar 2009
Posts: 28
Received Thanks: 13
|
Instaling boost other version than 1.52 (default that came with FREEBSD 8.2) is a pain in the ***. I tried to downgrade the version with no results. Can you give me an advice?
PS: More examples (especially with packets) will be nice.
|
|
|
08/03/2013, 15:58
|
#64
|
elite*gold: 606
Join Date: Apr 2008
Posts: 3,180
Received Thanks: 5,376
|
Quote:
Originally Posted by ionutxp
Instaling boost other version than 1.52 (default that came with FREEBSD 8.2) is a pain in the ***. I tried to downgrade the version with no results. Can you give me an advice?
PS: More examples (especially with packets) will be nice.
|
(deinstall boost first)
Grab the version you want off of here:
In there is a "boost"-Folder containing all kinds of headers and such
Just drop that one into /usr/local/include and you should be set
iMer
|
|
|
08/07/2013, 11:41
|
#65
|
elite*gold: 0
Join Date: Mar 2009
Posts: 28
Received Thanks: 13
|
UP !
It would be nice if add some samples for adding quest functions (item table, pc table..) and even for new packets in the documentation.
|
|
|
08/08/2013, 07:27
|
#66
|
elite*gold: 606
Join Date: Apr 2008
Posts: 3,180
Received Thanks: 5,376
|
Quote:
Originally Posted by ionutxp
UP !
It would be nice if add some samples for adding quest functions (item table, pc table..) and even for new packets in the documentation.
|
You can only add new quest function tables.
So you'll have to use item2, pc2 and the sorts
I'll add examples after my vacation (~sunday next week)
As for packets:
You'd have to hook CInput<PHASE>::Analyze
where <PHASE> is the phase you want to add new packets in.
e.g. Main for the "ingame"-Phase
Check if the header matches one of yours and execute that one, if not execute the original function.
Pretty much like the command function I have already in place.
|
|
|
08/08/2013, 10:08
|
#67
|
elite*gold: 0
Join Date: May 2012
Posts: 50
Received Thanks: 83
|
is it possible to replace some functions in game using this tool? I mean i want to rewrite in ex. UseItemEx. Can I do such thing using Your tool?
|
|
|
08/08/2013, 11:11
|
#68
|
elite*gold: 0
Join Date: Jun 2010
Posts: 75
Received Thanks: 58
|
Quote:
Originally Posted by JachuPL
is it possible to replace some functions in game using this tool? I mean i want to rewrite in ex. UseItemEx. Can I do such thing using Your tool? 
|
Yep, but it`s... hard and boring to rewrite one of the biggest funcs in gamefile.
|
|
|
08/08/2013, 14:14
|
#69
|
elite*gold: 198
Join Date: Mar 2011
Posts: 835
Received Thanks: 263
|
Quote:
Originally Posted by xDeStRuCtx
Yep, but it`s... hard and boring to rewrite one of the biggest funcs in gamefile.
|
It's nearly impossible the function UseItemEx has over 900 variables and 7500 lines of code ^^
|
|
|
08/08/2013, 17:19
|
#70
|
elite*gold: 606
Join Date: Apr 2008
Posts: 3,180
Received Thanks: 5,376
|
Quote:
Originally Posted by ƬheGame
It's nearly impossible the function UseItemEx has over 900 variables and 7500 lines of code ^^
|
Again: You could hook it - check if it's an item you want to modify
If it is - execute yours otherwise just run the original function.
No need to rewrite it
I might even add an interface for that at some point (adding custom items)
iMer
|
|
|
08/08/2013, 19:22
|
#71
|
elite*gold: 0
Join Date: Feb 2008
Posts: 2,754
Received Thanks: 1,748
|
Quote:
Originally Posted by iMer
Again: You could hook it - check if it's an item you want to modify
If it is - execute yours otherwise just run the original function.
No need to rewrite it
I might even add an interface for that at some point (adding custom items)
iMer
|
Yip, but if you want to overwrite an existing function you have to rewrite it. Or to hook the original function which is called hope it's nowher other used and let it do nothing.
|
|
|
08/08/2013, 19:35
|
#72
|
elite*gold: 606
Join Date: Apr 2008
Posts: 3,180
Received Thanks: 5,376
|
Quote:
Originally Posted by Computerfreek
Yip, but if you want to overwrite an existing function you have to rewrite it. Or to hook the original function which is called hope it's nowher other used and let it do nothing.
|
PHP Code:
void LibM2::interpretCommand(LPCHARACTER ch,const char* data, size_t len) { LibM2* self=instance(); std::istringstream iss(std::string(data,len)); std::vector<std::string> arguments; // split command string into arguments (whitespaces) copy(std::istream_iterator<std::string>(iss),std::istream_iterator<std::string>(),std::back_inserter<std::vector<std::string> >(arguments));
if (self->m_map_command.find(arguments.front())!=self->m_map_command.end()) { // Check if custom command exists ICommand* cmd = self->m_map_command[arguments.front()]; if (cmd->usableFor(ch)) { // check if command is useable cmd->use(ch, arguments); // if useable, use it return; } else if(cmd->isReplaced()) { // if not usable, but replaced - send "command not found"-chatpacket ch->ChatPacket(1,locale_find("그런 명령어는 없습니다")); return; } } // if no custom command, just let the original function handle the rest self->detour_interpretCommand->GetOriginalFunction()(ch,data,len); }
|
|
|
08/08/2013, 22:47
|
#73
|
elite*gold: 0
Join Date: Feb 2008
Posts: 2,754
Received Thanks: 1,748
|
Quote:
Originally Posted by iMer
PHP Code:
void LibM2::interpretCommand(LPCHARACTER ch,const char* data, size_t len) {
LibM2* self=instance();
std::istringstream iss(std::string(data,len));
std::vector<std::string> arguments;
// split command string into arguments (whitespaces)
copy(std::istream_iterator<std::string>(iss),std::istream_iterator<std::string>(),std::back_inserter<std::vector<std::string> >(arguments));
if (self->m_map_command.find(arguments.front())!=self->m_map_command.end()) { // Check if custom command exists
ICommand* cmd = self->m_map_command[arguments.front()];
if (cmd->usableFor(ch)) { // check if command is useable
cmd->use(ch, arguments); // if useable, use it
return;
} else if(cmd->isReplaced()) { // if not usable, but replaced - send "command not found"-chatpacket
ch->ChatPacket(1,locale_find("그런 명령어는 없습니다"));
return;
}
}
// if no custom command, just let the original function handle the rest
self->detour_interpretCommand->GetOriginalFunction()(ch,data,len);
}
|
Ah, okay. Sorry, logic fail.
|
|
|
08/09/2013, 22:11
|
#74
|
elite*gold: 0
Join Date: Sep 2010
Posts: 9
Received Thanks: 0
|
Hi, How I compile this library? thanks
|
|
|
08/09/2013, 22:19
|
#75
|
elite*gold: 606
Join Date: Apr 2008
Posts: 3,180
Received Thanks: 5,376
|
Quote:
Originally Posted by dhbfurrff_bugnot
Hi, How I compile this library? thanks
|
I am using Codeblocks with uniwin to do the compiling for me
Other than that you'll need gcc48 (or higher) and a FreeBSD (32bit) system to compile on.
I myself use a vm for that.
What you'll have to do is install gcc48 and move the old gcc/g++ commands to gcc_old or something and then rename the new gcc48 to gcc (same with g++)
iMer
|
|
|
All times are GMT +1. The time now is 04:14.
|
|