iMer 184 Posted April 22, 2014 Share Posted April 22, 2014 M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) This is the hidden content, please Sign In or Sign Up ( 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. 23 1 1 1 1 11 44 Link to comment Share on other sites More sharing options...
lawry 2 Posted April 22, 2014 Share Posted April 22, 2014 good job Thx Link to comment Share on other sites More sharing options...
Mehti 76 Posted April 23, 2014 Share Posted April 23, 2014 Awesome my friend! I like your works and coding style. Link to comment Share on other sites More sharing options...
Premium Lufbert 20 Posted April 26, 2014 Premium Share Posted April 26, 2014 Very very nice. Good work. But how to compile it? Link to comment Share on other sites More sharing options...
Aveline™ 554 Posted April 26, 2014 Share Posted April 26, 2014 Very very nice. Good work. But how to compile it? First you need to make this after you understand Best Regards HaveBeen Plain logic saves lives. Link to comment Share on other sites More sharing options...
Invictus 24 Posted April 28, 2014 Share Posted April 28, 2014 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 More sharing options...
Premium Lufbert 20 Posted April 30, 2014 Premium Share Posted April 30, 2014 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 More sharing options...
Shichirojii 8 Posted May 21, 2014 Share Posted May 21, 2014 What function does this? SyncPos fix with automatic ban Link to comment Share on other sites More sharing options...
Sober 37 Posted May 21, 2014 Share Posted May 21, 2014 It isn't a quest function i think it automaticly does it Link to comment Share on other sites More sharing options...
Shichirojii 8 Posted May 21, 2014 Share Posted May 21, 2014 It isn't a quest function i think it automaticly does it I do not understand very well Link to comment Share on other sites More sharing options...
Sober 37 Posted May 21, 2014 Share Posted May 21, 2014 If someone tries to use kick hack on your server he will be automaticly banned this is what that function does actually. 1 Link to comment Share on other sites More sharing options...
Avalonking 0 Posted June 4, 2014 Share Posted June 4, 2014 /libexec/ld-elf.so.1: Cannot open "./libgame.so" Link to comment Share on other sites More sharing options...
CrazyBear 2 Posted June 13, 2014 Share Posted June 13, 2014 In my server i added this but when trying to change bonus , its saying it needs : 2468454656 seconds or whatever. How to fix that please? Link to comment Share on other sites More sharing options...
Invictus 24 Posted June 14, 2014 Share Posted June 14, 2014 In my server i added this but when trying to change bonus , its saying it needs : 2468454656 seconds or whatever. How to fix that please? if you placed a diff on your game file then this will cause the error. pick a clean game file and put only difs you need. Link to comment Share on other sites More sharing options...
Premium Lufbert 20 Posted June 20, 2014 Premium Share Posted June 20, 2014 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 More sharing options...
iMer 184 Posted June 21, 2014 Author Share Posted June 21, 2014 GCC 4.7+ 1 Link to comment Share on other sites More sharing options...
Premium Lufbert 20 Posted June 25, 2014 Premium Share Posted June 25, 2014 (edited) 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 August 30, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
.Xero 2 Posted July 3, 2014 Share Posted July 3, 2014 (edited) I have a problem with your SDK. I use Netbeans 8 and I have found on google some threads with post from you with the same problem. And I ask you "Do you have a Fixx or a hint for this?" Edited August 16, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
vilas69 0 Posted September 11, 2014 Share Posted September 11, 2014 Hello. This lib only works in slot 12 right? Correct me if I'm wrong. I am creating a new system and needed this lib running in slot 13 also If it were not asking too much could compile the lib? Thank you. Link to comment Share on other sites More sharing options...
aviragames 0 Posted September 21, 2014 Share Posted September 21, 2014 (edited) Hello, could someone help me? https://metin2.download/picture/mSJWY1fK21NOLB84FpFE6Yf8Tb6jWvcz/.png Edited August 30, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
lstylerl 0 Posted November 9, 2014 Share Posted November 9, 2014 Makefile:47: warning: overriding recipe for target `libserverkey' Makefile:13: warning: ignoring old recipe for target `libserverkey' touch: libthecore/src/Depend: No such file or directory gmake: *** [libthecore] Error 1 Link to comment Share on other sites More sharing options...
kabstyle 0 Posted February 6, 2015 Share Posted February 6, 2015 do u have a diff for stacked skillbooks? i mean if i have 200 and i read want to read one they all dssapear srry for the bad english Link to comment Share on other sites More sharing options...
Honorable Member Mali 41895 Posted November 29, 2020 Honorable Member Share Posted November 29, 2020 This is the hidden content, please Sign In or Sign Up 8 3 1 4 Link to comment Share on other sites More sharing options...
Recommended Posts