Jump to content

Vanilla

Developer
  • Posts

    471
  • Joined

  • Last visited

  • Days Won

    58
  • Feedback

    0%

Everything posted by Vanilla

  1. It's nice to see people contributing but the circumstances around this are rather sad ? Either way I just changed a bit on the code. In this case you'd use smart pointers. If you don't have the most recent std you might wanna swap unique_ptr with auto_ptr in my example. Also there's no sense in formatting a string with.. well, no format. You can just go ahead and directly use the already finished string. And there's one thing: You might wanna get into trouble when running in test server since literally everyone is a gm during this. It'll block you from trading etc... So I made a check for test_server. And lastly I highly recommend not using queries for this. We already have a gm privilege management. Why don't we use the different stages of GM and restrict those? Like e. g. lower GM rank may not be allowed to trade while higher staff can do. This would eliminate a lot of queries since.. yeah, you're going to put unnecessary load if you're running a query every time one of these functions trigger. Might as well either cache the result in the player instance and fetch it once it's already stored ooooor you can, like I said above, just go ahead and use the existing privilege management. Oh and one tiny thing: The query states utf8mb4 which is indeed quite nice... but it doesn't make sense to specify this and then create a table with latin1. I changed that, too. Open Service.h //add: #define ENABLE_GAMEMASTER_RESTRICTION open exchange.cpp // Search: if (victim->IsBlockMode(BLOCK_EXCHANGE)) // add: #ifdef ENABLE_GAMEMASTER_RESTRICTION if (!IsGM()) { if (!test_server && victim->GetGMLevel() != GM_PLAYER) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't trade with a Game Master")); return false; } } if (!test_server && IsGM()) { std::unique_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery("SELECT * FROM gamemaster_restriction")); SQLResult * pRes = pMsg->Get(); if (pRes->uiNumRows) { MYSQL_ROW row; while ((row = mysql_fetch_row(pRes->pSQLResult))) { DWORD datos = 0; str_to_number(datos, row[0]); if (GetPlayerID()==datos) { ChatPacket(CHAT_TYPE_INFO, "You don't have permission to do this"); return false; } } } } #endif open char_item.cpp //search: bool CHARACTER::DropItem(TItemPos Cell, BYTE bCount) //add: #ifdef ENABLE_GAMEMASTER_RESTRICTION if (!test_server && IsGM()) { std::unique_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery("SELECT * FROM gamemaster_restriction")); SQLResult * pRes = pMsg->Get(); if (pRes->uiNumRows) { MYSQL_ROW row; while ((row = mysql_fetch_row(pRes->pSQLResult))) { DWORD datos = 0; str_to_number(datos, row[0]); if (GetPlayerID()==datos) { ChatPacket(CHAT_TYPE_INFO, "You don't have permission to do this"); return false; } } } } #endif open cmd_general.cpp //Search: ACMD(do_click_safebox) // add: #ifdef ENABLE_GAMEMASTER_RESTRICTION if (!test_server && ch->IsGM()) { std::unique_ptr<SQLMsg> pMsg(DBManager::instance().DirectQuery("SELECT * FROM gamemaster_restriction")); SQLResult * pRes = pMsg->Get(); if (pRes->uiNumRows) { MYSQL_ROW row; while ((row = mysql_fetch_row(pRes->pSQLResult))) { DWORD datos = 0; str_to_number(datos, row[0]); if (ch->GetPlayerID()==datos) { ch->ChatPacket(CHAT_TYPE_INFO, "You don't have permission to do this"); return; } } } } #endif add player sql. SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for gamemaster_restriction -- ---------------------------- DROP TABLE IF EXISTS `gamemaster_restriction`; CREATE TABLE `gamemaster_restriction` ( `gamemaster` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '', PRIMARY KEY (`gamemaster`) USING BTREE ) ENGINE = MyISAM CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; SET FOREIGN_KEY_CHECKS = 1; [/CODE]
  2. Nooooooooooooooooooooooooooooooooo not my food! My only weakness! Welcome!
  3. there are a few options you can choose from: - Set a timer once taking/dealing pvp damage and block mount/unmount during this time (probably only mounting because people might annoy you and block you from unmounting) - Check if the player is using skills etc. while issuing the mount command (there are indeed functions present and you can check if the character is actually using a skill and block mounting if that's the case) - Set a short timer after mount/unmount on which you cannot use skills or deal dmg in pvp One thing I'd also suggest: Disable damage and knockback/fall when mounting for pvp. That's also a big change preventing people from annoying other players with their horses.
  4. beep beep beep boop boop beep bopp beep beep beep. boop. beep boop beep. (translates to: locale_find: LOCALE_ERROR: "beep beep beep boop boop beep bopp beep beep beep. boop. beep boop beep.") Let's stick to our newest addition to our collection. Neurooooooooooooooooooooo *dramatic music plays here*
  5. beep boop. beep beep boop. boop. (translates to: Welcome)
  6. 1st make sure you always use the correct libraries. Your dev system is freebsd 12.1 32 bit, your production enviroment is 12.1 64 bit. If you install cryptopp via pkg on your production system you'll also get the 64 bit libraries, NOT 32 bit. Your 32 bit application cannot use these libraries. 2nd I highly recommend you using rpath as a linker option to specify a directory where you load your libraries from (e. g. /usr/local32/metin2). 3rd After building your game db, run ldd for both of them. Doing so will reveal all the locations of your libraries on the dev system. You can just download and upload them on your production server in the correct direcoty (see rpath). 4th Your game won't start without the correct libs to load. Obviously you cannot login if the server doesn't even start 5th Your problem may have occured now due to the fact that your libs have changed after upgrading. Remember: always keep the libs you need in sync. Not to mention: DO NOT OVERWRITE LIBS. Make sure you have a special directory (see above rpath) and do not overwrite system libraries. And finally 6th: If you solved your issue, post a solution for other members. Don't be selfish.
  7. Interesting, but big project. I do agree with some stuff, but highly disagree with other points. In fact I do like the c++ part. I don't have any experience with rust but I do know that a mighty c++ version along with current standards is not a disadvantage at all. Things like memory management were an issue back then. Today with stuff like smart pointers you even have more tools to avoid memory corruption. Though yes, Rust is definitely not bad at all and a rust-port would be interesting to see. What I don't agree is the "rant" about BSD. It doesn't matter if there was no big choice back then. If you wanna rewrite the game then it's mandatory what matters today, not in the past. And nowadays FreeBSD is a very stable, fast and reliable system. Yet I even happened to catch more errors in linux than in BSD (like faulty pkg installations and stuff, but that doesn't matter much for this project). What matters is: Speed, security and reliability. So, why the heck should BSD be an issue there? Why even bother porting it to linux if BSD does the job quite well? I often see people not setting up their system correctly and then wonder about issues they wouldn't have if they read a bit about it. Heck, even now many people are still using BSD versions from years ago. Though yes, a complete rewrite that actually focuses on more stability and speed, utilizing the more recent tools we have (threading, etc.) would be very benenificient for this. But it's also a big task and don't be fooled - if you rewrite it from scratch, there WILL be bugs. A game project as big as a metin2 server will potentially cause bugs. Where there are humans, there's also error. That's a fact and yeah, you can obviously fix those. What I wanna say is: I'm reading this text like "hey, let's all get together and set up a project" but I think the project isn't thought through well enough. And to completely rely on the devs makes it sound like "I wanna create something huge, come all devs and help me do it". Don't get me wrong, it's not bad to somewhat unite the people who know about development. But it makes the project sound kinda fishy. I'd love to see such a project come to live. But to do so it takes more than a bright idea. Or, to quote a well-known meme: "One cannot simply rewrite a whole game". You'd think this through and if there's a plan, a concept and if you brainstormed well enough then the project has a chance of success. For now it more looks like an idea, something you had in mind and want to present. But it lacks the core thoughts about it. The first post is more about "ranting" about the stuff the old source has - supposedly - done wrong and how to fix it. And yes, some points do count. But there's high disagreement on other things and as much as it'd look cool to have e. g. a linux port.. It's basically pointless given what we already have. I hope you understand what I'm trying to say, no offense intended here.
  8. One thing I can absolutely recommend is stop using package system. It gave me enought trouble. I recommend you to stick with the ports tree and build your programs this way. Why do I say this? I've seen a lot of issues occuring with package system and building the source. If you build the programs via ports tree you make sure they are being built according to your system environment. Especially when encountering lib problems it might help you fix this issue. Next I'd like to know what exactly are in those lines? #7 0x00446040 in CClientManager::FlushItemCacheSet (this=0xffbfe910, pid=792) at ClientManager.cpp:1408 #8 0x0043c308 in CClientManager::UpdateLogoutPlayer (this=0xffbfe910) at ClientManagerPlayer.cpp:1335 And obviously Main.cpp:58 Can you post the whole functions and mark down the line that's mentioned there? And thanks for using it, though it's clearly outdated and would need a few fixes here and there ^^' I'm glad you like my work nevertheless and I hope you'll enjoy it in the future, too!
  9. Downgrading FreeBSD version only masks the problem. Are you running it on the same machine as you're building it? If no, what version does the target system and the building system have? Can you call ldd db? What compiler are you using?
  10. what settings do you have that you need to use a very old toolset? And why wouldn't that be possible with more recent toolsets?
  11. I recommend doing what the error tells you: Right click and Upgrade solution. This way you'll be using the more recent toolset. As I said, it'd work out of the box and compile just fine.
  12. You can often check if your distribution allows to use older toolsets. This is afaik the case with 2017 and 2019, but I'm not sure if that works on 2013, too. I wouldn't try it if I were you. Your best bet is to just upgrade to the newer toolset... It'd work out of the box without having to modify anything.
  13. If it's not working we need further information. What exactly doesn't work? The query? And why? What error do you get? Any new syserr/syslog entries?
  14. I cannot agree more. If there's need for a special encryption (and trust me, there is) you can just use a tool that's already included in source: Metin2PackMaker. Afaik it's bugged from start and needs a bit of a setup but it's not that much. As soon as you have it working you're simply having a program that can archive and extract pack files. After this you can think about changing compression or encryption algorithms. It's definitely worth it.
  15. But you do have logfiles, don't you? Without it debugging will be very difficult. We need to know if the client sends the appropiate packet and if the server receives it and what it does with it. Thus reading the syslog is very important even if there's no clear error happening.
  16. Best way to determine this is analyzing a .wav file that's currently in client. I did that for fishing_fail.wav from Sound/warrior/fishing and it tells me: 353 kbps with 22 KHz So make sure you convert your file with a bitrate of 353 kbps. I dunno if other values are possible but this one should be a safe one.
  17. afaik if you're going for WAV you need to be cautious about the bitrate of your file. If you do not set it to the supported range you'll encounter exactly this issue. It's not the converters fault, it's a setting you may be able to change in almost any converter.
  18. Well in that case you either have to fix the code or get it somewhere. I don't know what you downloaded and who did what on these script files but certainly they seem to be out of sync.
  19. Your faulty line is: self.toolTipAlignment.AutoAppendTextLine(localeInfo.TITLE_NAME_LIST[grade], gradeColor) How does TITLE_NAME_LIST look like? And what is your grade? Most likely your title (Pvp title) mismatches and therefore the 'grade' value is higher than your list of titles. This leads to your issue. Check if you made some changes there and if everything is correct like it should be.
  20. first you shouldn't use devel compiler, you'd rather take a stable one. Second there's no reason in using GCC anymore since clang is now part of FreeBSDs base system. Though if you wanna use GCC that's fine, but you shouldn't use devel versions. They can lead to unexpected outcome like you mentioned. Try to revert what you do and go for a stable version. If that doesn't work we need more information on what exactly happens (logfiles etc..)
  21. Oh yes, I was blind about that. Didn't even look at the caracter, my bad^^' Well, you have implemented the weapon in a wrong way. Did you check logfiles? Either you're missing the line in item_list.txt or your 3d model is missing/corrupt. Can you check this?
  22. This means that something is already bound to this address (ip and port). So in this case you either have another program running that listens to the ports of ch2 or ch2 is already running. Can you check with ps -aux if ch2 is already running? Also I saw a critical error from your Ch2 log: !!! FATAL ERROR !!! multiple MAP_ALLOW setting!! You may want to have a look at this. It may be the reason why your ch2 freezes.
  23. What exactly is the error here? You mean the sword being aligned on top? Does that happen for every weapon or only this one? And why is that an issue at all?
  24. You need to check your python files. Look at uicommon.py line 263, there you most likely using a key that's not defined (in this case 'special_bg'. So your script is faulty or missing something.
  25. Host equals your machine's name. Domain is for networking purpose. For example you can use "test" as your host and "local" for domain. The only thing thay may cause a bit of trouble is sendmail which requires FQDN for hostname. But you can also disable it, especially since you're only working locally on your machine.
×
×
  • 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.