Register for your free account! | Forgot your password?

You last visited: Today at 04:13

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

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.

Reply
 
Old 08/01/2013, 14:57   #61

 
IgorGlock's Avatar
 
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.
IgorGlock is offline  
Old 08/01/2013, 15:06   #62
 
Mi4uric3's Avatar
 
elite*gold: 405
Join Date: Dec 2007
Posts: 6,615
Received Thanks: 6,358
Quote:
Originally Posted by Computerfreek View Post
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 View Post
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..
Mi4uric3 is offline  
Old 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.
ionutxp is offline  
Old 08/03/2013, 15:58   #64

 
iMer's Avatar
 
elite*gold: 606
Join Date: Apr 2008
Posts: 3,180
Received Thanks: 5,376
Quote:
Originally Posted by ionutxp View Post
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
iMer is offline  
Old 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.
ionutxp is offline  
Old 08/08/2013, 07:27   #66

 
iMer's Avatar
 
elite*gold: 606
Join Date: Apr 2008
Posts: 3,180
Received Thanks: 5,376
Quote:
Originally Posted by ionutxp View Post
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.
iMer is offline  
Thanks
1 User
Old 08/08/2013, 10:08   #67
 
JachuPL's Avatar
 
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?
JachuPL is offline  
Old 08/08/2013, 11:11   #68
 
elite*gold: 0
Join Date: Jun 2010
Posts: 75
Received Thanks: 58
Quote:
Originally Posted by JachuPL View Post
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.
xDeStRuCtx is offline  
Old 08/08/2013, 14:14   #69
 
elite*gold: 198
Join Date: Mar 2011
Posts: 835
Received Thanks: 263
Quote:
Originally Posted by xDeStRuCtx View Post
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 ^^
ƬheGame is offline  
Old 08/08/2013, 17:19   #70

 
iMer's Avatar
 
elite*gold: 606
Join Date: Apr 2008
Posts: 3,180
Received Thanks: 5,376
Quote:
Originally Posted by ƬheGame View Post
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
iMer is offline  
Old 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 View Post
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.
Computerfreek is offline  
Old 08/08/2013, 19:35   #72

 
iMer's Avatar
 
elite*gold: 606
Join Date: Apr 2008
Posts: 3,180
Received Thanks: 5,376
Quote:
Originally Posted by Computerfreek View Post
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 chardatasize_t len) {
    
LibM2self=instance();
    
std::istringstream iss(std::string(data,len));
    
std::vector<std::stringarguments;
    
// 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
        
ICommandcmd self->m_map_command[arguments.front()];
        if (
cmd->usableFor(ch)) { // check if command is useable
            
cmd->use(charguments); // 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);

iMer is offline  
Old 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 View Post

PHP Code:
void LibM2::interpretCommand(LPCHARACTER ch,const chardatasize_t len) {
    
LibM2self=instance();
    
std::istringstream iss(std::string(data,len));
    
std::vector<std::stringarguments;
    
// 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
        
ICommandcmd self->m_map_command[arguments.front()];
        if (
cmd->usableFor(ch)) { // check if command is useable
            
cmd->use(charguments); // 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.
Computerfreek is offline  
Old 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
dhbfurrff_bugnot is offline  
Old 08/09/2013, 22:19   #75

 
iMer's Avatar
 
elite*gold: 606
Join Date: Apr 2008
Posts: 3,180
Received Thanks: 5,376
Quote:
Originally Posted by dhbfurrff_bugnot View Post
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
iMer is offline  
Reply

Tags
c++, code, lib, libgame, sdk




All times are GMT +1. The time now is 04:14.


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