Jump to content

Mind Rapist

Active Member
  • Posts

    548
  • Joined

  • Last visited

  • Days Won

    6
  • Feedback

    0%

Everything posted by Mind Rapist

  1. Wow thanks for the information. Isn't there a more generic method to call the cancel event like a general packet handler or something?
  2. My source code files are encoded in UTF-8 (no BOM), so as my locale_string.txt. In the game tho, locale_string does not show special characters as it should, instead shows Korean and other nonsense. Is there a script or something that can convert all the files into Windows-1253 encoding without braking the strings with unknown characters, or any way to make it work in UTF-8? Anything will do, just help me fix this problem, thank you.
  3. Hey, does anyone have a guide or smth for the official logout method, where logout gets canceled if any packet is received or sent to the client (regarding the character) except walking? For example if the character attacks, mounts, opens shop, drops item, anything other than walking, countdown for logout stops.
  4. Hey, thanks for replying and saving me once again Seems like what you gave me actually helped. Once I checked what you describe in 2), I remembered that I changed those divisions in uiShop.py to / 1 so I changed them back to / 5. The result was that the wrong price was showing on the tooltip as well! So I did the obvious: I removed the division from the sources and python. And that's what fixed it Thank you so much guys Best regards
  5. Yes and yes. No sysett, works almost normally... With your version, I'm not getting a confirmation dialog on sell, thus, the price is the same.
  6. Hey, thanks for the response. Unfortunatelly, it didn't work ?
  7. If you are talking about the database records then yes many items came with the same values on those 2.
  8. Can someone upload libc.so.7 for FreeBSD 12 please? It's in directory /lib/libc.so.7
  9. Hey, welcome to the fourm. First of, you need to know the basics. Metin2 Server and Client source were released a few years back, when Dragonsoul system and Belts where a thing. Server The server source creates the 2 core files in your system. They are called game and db (most often - you may see them renamed at some serverfiles). The game is usually located at /game/share and db is usually located in the same directory or /game/db,Datenbank,etc.. (the database channel, where txt protos are). Client The client source compiles the launcher (metin2.exe, metin2launcher.exe, etc...). This topic will help you have an image of what compiling the server source (game & db) means: This video will help you have an image of what compiling the client source means: Next thing you need to know about sources is the Extern folder. It is nessecarry to all sources as it contains libs such as boost, cryptopp and others. Every source needs this folder, except the one and only case: Vanilla Core revision 71480, which highly depends on pre-built linux libs. Written in C++17 (c++1z) it's the only source out there that compiles with clang++-devel instead of g++. If you want the latest thing on software dependencies and builds and at the same time, you do not mind experimenting, this is your source. You can view the topic in the link below: Errors: You can view source errors, as well at server/client system errors at the txt files called syserr. The client syserr is in the main client directory. The source syserr(s) are located in each of the Serverfiles channels, auth/login channel, game/channel 99 and db, each one showing the errors affected the corresponding core. Note that if your channels use multiple cores, each core will have its own syserr. Core files: If your game/db core crashes, a game.core or db.core respectively will be created in the directories mentioned above, where syserr files are located. If you haven't stripped your game/dbfile, you can traceback errors by installing gdb and running it as follows #gdb /path/to/gamefile /path/to/game.core More information: Next thing you need to know about the serverfiles is that it uses txt as configuration and lua as the quest language. Everything you change in a quest takes effect once you recompile the quests using QC. In your /game/share/locale/country/quest directory, where all the quests live, there is usually a python file which must be run to compile all the quests. Once that happens, reload the quest by restarting the server, or running /reload q with a GM character in the game. Any new quests must exist in quest_list or any similar list located in the quest folder in order to be compiled. About the client now, besides the source there are the packs. In order to open/close them you will need a tool called Etermanager/Eter Nexus/Eter Tool, you get the idea. I'm not gonna get in a lot details but the important things are: locale_xx: Contains all the strings and messages (client-sided). Also contains protos (item_proto, mob_proto) which are compiled by item/mob_names.txt and item/mob_proto.txt, located in your server's db core directory (if using txts). The tool to compile them is called DumpProto and it's source code is available along with the rest of the sources, so you can add new types and definitions. root: All the functionality of the client lives here, everything you see in the client goes from the launcher (c++) to the root files (python). Your server's IP must be in serverinfo.py in order to connect to your server. uiscript: Here you can find python files about the windows you see in the game (shop, options menu, inventory, everything). Other packs contain only images and models and character configuration files (walking, running, skills). All character models and configuration files including NPCs and mobs must exist in your server's directory as well in /game/share/data. Opening the server: Once your FreeBSD system is ready, upload the Serverfiles. The SF include 2 compressed folders (usually game.tar.gz -> goes in /usr/ and mysql.tar.gz -> goes in /var/db/mysql). Once you move them in their respected directories, untar them and give them 0777 permissions. Give permissions to gamefile, dbfile, protos and everything in mysql. To run the server, locate the *.sh file in /game directory of your SF. You can also edit this file to do more than just open and close your channels (for example running the QC). I hope those information gave you a place to start. Best regards
  10. I have a little bug on selling items to vendors. Images below explain everything: The real price is in the second image. Does someone know what is going on?
  11. If you have MySQL Server prior to 5.7 via portsnap: pkg delete mysqlXX-server where XX = your version. If you have built it through ports: cd /usr/ports/databases/mysqlXX-server && make deinstall clean and then: cd /usr/ports/databases/mysql57-server && make install clean Hit [ENTER] as many times as it takes to accept default parameters and once prompts are over, wait for the build to finish. Voilla! MySQL Server 5.7 is installed. Don't forget, remove directory /var/db/mysql (create backup of course if you have needed data inside) and run ### Check this line in /etc/rc.conf and IF IT DOESN'T EXIST run the first line. Run second line anyway ### echo 'mysql_enable="YES"' >> /etc/rc.conf service mysql-server start Once you start the service, reboot. If you want a fresh start with your MySQL tables this is a simple guide to reset root password: [Hidden Content] after that, copy all tables in /var/db/mysql but do not overwrite mysql folder. If you want your old tables back, extract everything in /var/db/mysql INCLUDING mysql. This will recover your old root password and users. Hope you found this helpful. Best regards
  12. Strange thing, I wanted this happen, but my source was already setup like: bool CItem::IsOwnership(LPCHARACTER ch) { if (!m_pkOwnershipEvent) return true; return m_dwOwnershipPID == ch->GetPlayerID() ? true : false; } So I decided to make a little fix just for the pet, without changing the function to the rest of the calls. If it happens you want the same thing do this: // @item.h - Change this like: bool IsOwnership(LPCHARACTER ch, bool strict = false); // @item.cpp - Chnage the structure like this: bool CItem::IsOwnership(LPCHARACTER ch, bool strict) { if (!m_pkOwnershipEvent) return !strict; return m_dwOwnershipPID == ch->GetPlayerID() ? true : false; } Now, each time you call item->IsOwnership(ch/player/etc...) you will get the same result you know (item->IsOwnership(ch, false) works as well), but when you call item->IsOwnership(ch, true) the bool will return true only if the item has the character's name on it.
  13. Thanks I will try the 1st solution, seems legit. I want to do it because in greek ';' = '?' EDIT: So I changed it in questlua.cpp and parser.cpp but the font became black, no syserr, so I went with the Python solution and it pretty mych worked out. Thanks @Abel(Tiger), thanks to all of you who responded
  14. Ok guys so now I need help. I changed this: bool CHARACTER::PickupItemByPet(DWORD dwVID) { LPITEM item = ITEM_MANAGER::instance().FindByVID(dwVID); if (IsObserverMode()) return false; if (!item || !item->GetSectree()) return false; into this: bool CHARACTER::PickupItemByPet(DWORD dwVID) { LPITEM item = ITEM_MANAGER::instance().FindByVID(dwVID); int iEmptyCell; if (IsObserverMode()) return false; if (!item || !item->GetSectree() || (iEmptyCell = GetEmptyDragonSoulInventory(item)) == -1) return false; What I tried to do was to return false when the inventory is full. But then my server broke into pieces (Segmentation fault!) and now I'm stuck. Can someone help please? EDIT: Nevermind, I saw the function again and I can see that there is a check down below, just wanted to save the pet's time from walking to the item, since it won't pick it up anw... Great guide!
  15. Dude attack value/magic value are already set in other fields. The applytype/value0 are the fields for the attack speed and the rest are 0 in all the weapons by default. I believe you should use the applytype/value1 for critical hit (15) and applytype/value2 for DSS (72) since you only want a constant DSS value and not a random DSS/FKS.
  16. Replace the packs metin2_patch_pc3 and metin2_patch_pc3_m from the official client. If you are not sure about granny compatibility, extract them and use a converter for the .gr2 files. And lastly, replace this in your root. wolfman_m.msm
  17. int iDist = DISTANCE_APPROX(item->GetX() - player->GetX(), player->GetY() - player->GetY()); Change to: int iDist = DISTANCE_APPROX(item->GetX() - player->GetX(), item->GetY() - player->GetY()); Didn't this affect anyone?
  18. Assuming you are trying to make the so called "Weapons for Young Heroes" weapons, all you have to edit is your navicat records (or txts) as following: To add extra attributes as default, edit applytype/value0~2 where applytype = attribute ID and applyvalue = bonus value. WARNING: If those values are not 0, you will be overwrighting existing attributes. Assuming that applytype/value1 are available (0), set applytype1 = 15 (Critical hit) and applyvalue1 = 10. To give the weapon the ability to have DSS/FKS, just set addon_type (in navicat/txt) at -1. To prevent attribute adding, go to your source/char_item.cpp and search case USE_ADD_ATTRIBUTE : if (ITEM_COSTUME == item2->GetType()) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("속성을 변경할 수 없는 아이템입니다.")); return false; } and below this if-statement, add: if (item2->GetVnum() == 300) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You cannot add any bonuses to this item.")); return false; } assuming your item's vnum is 300 of course. I hope you found this helpful. Best regards
×
×
  • 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.