Jump to content

34k - iMers LibGame


iMer

Recommended Posts

M2 Download Center

This is the hidden content, please
( Internal )

This is the hidden content, please
( GitHub )

Since I have no use for this anymore whatsoever, I changed the repo to be public.

Porting it to the source code should be fairly easy as most of the functions and such are the same (yay for LibM2)

 

It includes:

  • SyncPos fix with automatic ban
  • /war fix
  • number_ex fix
  • HorseVnum and Bonus on Mount via Questflag (horse_summon.horse_vnum, horse_summon.apply_type, horse_summon.apply_value)
  • Damage bonuses (devil, undead) are each calculated seperately.
  • CHARACTER::DropGold just returns
  • GiveExp was rewritten to prevent xp boosts and glitches
  • 6th and 7th bonus cant be put on costumes anymore
  • More quest functions:
  •     item2.equip
  •     item2.get_attr
  •     item2.get_wearflag
  •     item2.is_wearflag
  •     item2.set_attr
  •     npc2.get_level
  •     npc2.get_pc_pid
  •     npc2.get_pc_vid
  •     npc2.select
  •     pc2.give_or_drop_item_and_select
  •     pc2.send_effect
  •     pc2.set_level
  • You may still donate XP to guilds when the guild is max. level
  • You'll always get status points
  • max. priv_empire is modifiable via config
  • change_attr time is in seconds and modifiable via config
  • you can add new/modify existing bonuses via config

 

 

And some other changes I cant think of right now, just snoop through the source.

 

 

iMer

PS: Check the license. If you use any of that source and publish it (even in binary form) you must credit me.

  • Metin2 Dev 22
  • Eyes 1
  • Not Good 1
  • Cry 1
  • Confused 1
  • Good 10
  • Love 44
Link to comment
Share on other sites

This is just for anyone that encounters any problems I suggest you go look at my thread when I had problems as i encountered virtually all that was possible.

 

http://metin2dev.org/board/topic/985-setting-level-via-quest-non-sql/?p=7518

 

 

Thanks for the lib Imer - helped alot with a new system i'm developing.

Link to comment
Share on other sites

  • Premium

Which version of yaml-cpp i must use?

 

I type  cd /usr/ports/devel/yaml-cpp and make install clean.

But i have error when i try to compile the lib:

 

root@libtest:/usr/libImer # gmake
"gmake" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
gmake[1]: Entering directory `/usr/libImer'
"gmake"  -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Generic/libgame.so
gmake[2]: Entering directory `/usr/libImer'
mkdir -p build/Debug/GNU-Generic/src/hooks
rm -f "build/Debug/GNU-Generic/src/hooks/SyncPosition.o.d"
g++    -c -g -Wall -Isrc -std=c++11 -fPIC  -MMD -MP -MF "build/Debug/GNU-Generic/src/hooks/SyncPosition.o.d" -o build/Debug/GNU-Generic/src/hooks/SyncPosition.o src/hooks/SyncPosition.cpp
src/hooks/SyncPosition.cpp: In member function 'void Hooks::SyncPosition::configure(YAML::Node)':
src/hooks/SyncPosition.cpp:18:24: error: could not convert 'config.YAML::Node::operator[](((const char*)"limit"))' from 'const YAML::Node' to 'bool'
     if (config["limit"]){
                        ^
src/hooks/SyncPosition.cpp:19:37: error: 'const class YAML::Node' has no member named 'as'
         this->limit=config["limit"].as<float>();
                                     ^
src/hooks/SyncPosition.cpp:19:40: error: expected primary-expression before 'float'
         this->limit=config["limit"].as<float>();
                                        ^
src/hooks/SyncPosition.cpp:19:40: error: expected ';' before 'float'
src/hooks/SyncPosition.cpp:22:32: error: could not convert 'config.YAML::Node::operator[](((const char*)"playeraddonly"))' from 'const YAML::Node' to 'bool'
     if (config["playeraddonly"]){
                                ^
src/hooks/SyncPosition.cpp:23:50: error: 'const class YAML::Node' has no member named 'as'
         this->playeronly=config["playeraddonly"].as<bool>();
                                                  ^
src/hooks/SyncPosition.cpp:23:53: error: expected primary-expression before 'bool'
         this->playeronly=config["playeraddonly"].as<bool>();
                                                     ^
src/hooks/SyncPosition.cpp:23:53: error: expected ';' before 'bool'
src/hooks/SyncPosition.cpp:26:37: error: could not convert 'config.YAML::Node::operator[](((const char*)"scoreadd-threshold"))' from 'const YAML::Node' to 'bool'
     if (config["scoreadd-threshold"]){
                                     ^
src/hooks/SyncPosition.cpp:27:62: error: 'const class YAML::Node' has no member named 'as'
         this->scoreaddThreshold=config["scoreadd-threshold"].as<float>();
                                                              ^
src/hooks/SyncPosition.cpp:27:65: error: expected primary-expression before 'float'
         this->scoreaddThreshold=config["scoreadd-threshold"].as<float>();
                                                                 ^
src/hooks/SyncPosition.cpp:27:65: error: expected ';' before 'float'
src/hooks/SyncPosition.cpp:30:30: error: could not convert 'config.YAML::Node::operator[](((const char*)"killwarning"))' from 'const YAML::Node' to 'bool'
     if (config["killwarning"]){
                              ^
src/hooks/SyncPosition.cpp:31:49: error: 'const class YAML::Node' has no member named 'as'
         this->killwarning=config["killwarning"].as<unsigned int>();
                                                 ^
src/hooks/SyncPosition.cpp:31:52: error: expected primary-expression before 'unsigned'
         this->killwarning=config["killwarning"].as<unsigned int>();
                                                    ^
src/hooks/SyncPosition.cpp:31:52: error: expected ';' before 'unsigned'
src/hooks/SyncPosition.cpp:34:31: error: could not convert 'config.YAML::Node::operator[](((const char*)"autobanscore"))' from 'const YAML::Node' to 'bool'
     if (config["autobanscore"]){
                               ^
src/hooks/SyncPosition.cpp:35:51: error: 'const class YAML::Node' has no member named 'as'
         this->autobanscore=config["autobanscore"].as<unsigned int>();
                                                   ^
src/hooks/SyncPosition.cpp:35:54: error: expected primary-expression before 'unsigned'
         this->autobanscore=config["autobanscore"].as<unsigned int>();
                                                      ^
src/hooks/SyncPosition.cpp:35:54: error: expected ';' before 'unsigned'
src/hooks/SyncPosition.cpp:38:32: error: could not convert 'config.YAML::Node::operator[](((const char*)"autobanreason"))' from 'const YAML::Node' to 'bool'
     if (config["autobanreason"]){
                                ^
src/hooks/SyncPosition.cpp:39:53: error: 'const class YAML::Node' has no member named 'as'
         this->autobanreason=config["autobanreason"].as<std::string>();
                                                     ^
src/hooks/SyncPosition.cpp:39:67: error: expected primary-expression before '>' token
         this->autobanreason=config["autobanreason"].as<std::string>();
                                                                   ^
src/hooks/SyncPosition.cpp:39:69: error: expected primary-expression before ')' token
         this->autobanreason=config["autobanreason"].as<std::string>();
                                                                     ^
src/hooks/SyncPosition.cpp:42:30: error: could not convert 'config.YAML::Node::operator[](((const char*)"score-decay"))' from 'const YAML::Node' to 'bool'
     if (config["score-decay"]){
                              ^
src/hooks/SyncPosition.cpp:43:48: error: 'const class YAML::Node' has no member named 'as'
         this->scoreDecay=config["score-decay"].as<int>();
                                                ^
src/hooks/SyncPosition.cpp:43:51: error: expected primary-expression before 'int'
         this->scoreDecay=config["score-decay"].as<int>();
                                                   ^
src/hooks/SyncPosition.cpp:43:51: error: expected ';' before 'int'
gmake[2]: *** [build/Debug/GNU-Generic/src/hooks/SyncPosition.o] Error 1
gmake[2]: Leaving directory `/usr/libImer'
gmake[1]: *** [.build-conf] Error 2
gmake[1]: Leaving directory `/usr/libImer'
gmake: *** [.build-impl] Error 2 

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...
  • 2 weeks later...
  • Premium

How I can solv it?

 

 

cc1plus: error: unrecognized command line option "-std=c++11"
 
Full error:

 
"gmake" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
gmake[1]: Entering directory `/usr/home/imer/lib_src'
"gmake"  -f nbproject/Makefile-Debug.mk dist/Debug/GNU-Generic/libgame.so
gmake[2]: Entering directory `/usr/home/imer/lib_src'
mkdir -p build/Debug/GNU-Generic/src/commands
rm -f "build/Debug/GNU-Generic/src/commands/test.o.d"
g++    -c -g -Wall -Isrc -std=c++11 -fPIC  -MMD -MP -MF "build/Debug/GNU-Generic/src/commands/test.o.d" -o build/Debug/GNU-Generic/src/commands/test.o src/commands/test.cpp
cc1plus: error: unrecognized command line option "-std=c++11"
gmake[2]: *** [build/Debug/GNU-Generic/src/commands/test.o] Error 1
gmake[2]: Leaving directory `/usr/home/imer/lib_src'
gmake[1]: *** [.build-conf] Error 2
gmake[1]: Leaving directory `/usr/home/imer/lib_src'
gmake: *** [.build-impl] Error 2
 

 
I think it's error because i have the old version of gcc (4.2.1)
Which version i must install to compile that lib?
 
Sorry for bad english :/
Link to comment
Share on other sites

  • Premium

Imer which version of yaml-cpp you use?

https://metin2.download/picture/6RgCrAkbwH0ZgxO3KIRhmTAjQHJjcd7G/.png

 

Im using 0.3.0 and I have that error while try to compile your lib

 

error: 'LoadFile' is not a member of 'YAML'
YAML::Node config = YAML::LoadFile("config.yaml");

 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...
  • 1 month later...
  • 2 months later...
  • 5 years later...

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.