Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/29/21 in all areas

  1. Welcome hopeless developers, in an attempt to reduce some random questions, and considering I haven't found anything about this there, I'll share this small method to fix the packet errors, which requires thinking. There's no copy/paste here as it requires you to think of what you modified. This tutorial is, of course, indented for new people not for the rest. If you are interested in how to make a new packet, head here: What is it and how metin2 implementes it? Keeping things simple and understandable, a packet is an information exchanged between the Client or the Server. For example, when you press the button Space (to attack), the client will send an information (which is a packet), which will tell the server that we attacking the player Shiba324. Read this if you are more interested: [Hidden Content] Each packet needs to be identified in an unique way between client and server otherwise the client or server won't understand which thing you are sending, that's why each packet of Metin2 starts with "BYTE bId". We see this numbers inside an enum block (like PACKET_CG_LOGIN2 which identifies the login packet), while it's content is defined inside a struct block (like TPacketGCLogin2). The files which this packets are defines are Packet.h inside UserInterface and game/src. There are two packet types, dynamic and static, the static ones have a fixed length (the structure size), the dynamic have an extra data called (length, usually WORD), which tells the game the size of it. All the packets have a nomenclature, which I'll explain here: CG -> Client to Game (sent by the client) GC -> Game to Client (sent by the server) GG -> Game to Game (used by P2P packets for communicating two cores with eachother) Before seeing how to fix the errors, there's another thing that I will explain called Sequence system. What is the sequence system? It's a system introduced in newer clients (like 34k). It's basically a check which the client will send an extra data after a packet, and the server will verify if it's correct, in case it's not it will kick the player out of the server. The verision system works by sending a different number each time a packet is sent or received to the server, the client can send up to 32768 unique numbers before resetting itself to 0 (it's stored in a big array). Error type 1: Unknown packet header: XXX, last: YYY ZZZ Number explanations: XXX is the packet that the game/client cannot handle YYY and ZZZ are the last two packets sent before this error (usefull for investigating what packet caused this error) This error can happen before of the following issues: You modified the source and you haven't added inside PythonNetworkPhaseGame.cpp or packet_map.cpp the packet You have a packet which size mismatches between client and server Error type 2: SEQUENCE XXXXXXX mismatch 0xYY != 0xZZ header KK This error could happen for some reasons: You specified a packet which uses the sequence in packet_info (last value true/false) and in the client you forgot to add "SendSequence()" or viceversa You have a packet which size mismatches between client and server (the server is thinking a packet data is a sequence data) Error type 3: We don't really have syserrs here but we can see the client fuzzying around or doing wacky things (even crash at some point!) or the server/client fails to process all the data sent. This error could happen for some reasons: You have a packet which size mismatches between client and serve You forgot to add a Send() or forgot to Recv() the data inside the client tl;dr: always check for the following things if you are unsure: Check if you have added SendSequence and modified the true/false in packet_info (if you use sequence system) ALWAYS CHECK if Packet.h has the same ID and structures Check what action causes the issue so you can track down the code Always check the last headers sent, most of the time is just a byte not sent at the end Always check your implementation of input_main (Server) and PythonNetworkPhaseGamexxxxxxx (Client) Pro hack tip: __PACKETDUMP__ and ENABLE_SEQUENCE_SYSTEM are cool bois. Good luck.
    5 points
  2. M2 Download Center Download Here ( Internal ) Download Here ( GitHub ) [Hidden Content] Reversed from 22.2.7.0 Official Binary
    2 points
  3. Hello, This tutorial is intended to help beginner who don’t know how to configure regeneration files for specific maps. It may seem obvious to some but some don’t know how it works completely. That is, choose the correct location of your Monsters, Metins, Bosses and NPC’s as well as their coordinates, direction and spawn time. Information. The tutorial presents the 4 files (regen.txt, boss.txt, stone.txt, npc.txt) at the same time because they work particular the same way. These files are located in your server files at “share/locale/country/map/name_of_your_map/” How to get started? First, you need access to your server file directory. We recommend using WinSCP as it open source as in globally used among everyone. The map folder which you will configure. I. How to configure spawns? II. Manage group.txt and group_group.txt Special thanks to @Owsap for his help ! A category Questions and Answers is available. If you have a problem or a question, feel free to post a request!
    1 point
  4. Hi guys, A guy reported to me a weird bug about shamans w/m which are skipping collision when they are too fast to attack. On default source files it is still an unresolved bug which appear when the shaman's attack speed is more than 145/150. here a video which show how it is not getting the damage text for each hit on the stone. here the FIX. ATTENTION: Since the problem is the InvisibleTime on Attack.msa which it is too high, we could think to reduce it without need to edit nothing in our source (and it may be more efficient), but honestly i preferred to make a function which calculating the "adjustment" of the invisible time using the speed attack to don't risk to get the reversed problem (2 damage on 1 hit when the attack speed is low) feel free to use one of the two options.
    1 point
  5. M2 Download Center Download Here ( Internal ) As the title says, here's how you can synchronize your skill_table from client with skill_proto from server. [1]. First of all we've to rewrite the enum part of tokens (which is used in CPythonSkill::RegisterSkillTable), that means we change the order of index-tab-line with a new order, because ymir didn't used all columns. In that way we keep the file much cleaner and just with necessary columns (9 columns instead of 27). Srcs/Client/UserInterface/PythonSkill.h Search for the next enum: Replace it with: Srcs/Client/UserInterface/Locale_Inc.h [2]. Compile the source client again. [3]. Open Navicat (preferably the latest versions) and do the following things: Open player table Export Wizard -> Mark skill_proto -> Export to ../location/skilltable.txt Export format -> *.txt Unmark All fields then Unselect All Select available fields: -> {'dwVnum', 'bMaxLevel', 'bLevelLimit', 'szPointPoly', 'szSPCostPoly', 'szDurationPoly', 'szDurationSPCostPoly', 'szCooldownPoly', 'dwTargetRange'} Unmark: Include column titles Text Qualifier: None Copy the skilltable.txt from Desktop to ../locale/en/ HOW-TO - VIDEO (The video is just an example, please follow the tutorial from step [3]) [Hidden Content] Thanks to @Syreldar for the idea.
    1 point
  6. Excellent guide, this problem is always tricky as it can come from many things (even the most mundane). I often follow the same pattern when it comes to fixing packets however. There is no magical guide for it and I think the structure itself of the packet system is what can cause us to have this issue when we do not really pay attention. It also can happen when you send, let's say, a DWORD from the server and forgot to tell the client to catch it or vice-versa (tell the client to expect a DWORD and send nothing from the server). Concerning the structure, it can be a little bit discombobulating to have a different packet naming between client / server, unused packet structs and packet related informations in GameType and Packet.h as well as in Common files and packet.h. Thank you for this guide! Definitely useful!
    1 point
  7. From now on, all messages in the Private Servers forum must be in English (pictures are not affected). If you want to post something in your own language always add an english translation.
    1 point
  8. Sexy shaman dance:
    1 point
  9. M2 Download Center Download Here ( Internal ) More than one of you has probably noticed crooked legs in a Suraman novice. This condition is not genetic and does not occur in other armours. I performed a small operation and the Suraman can enjoy straight legs. Download: [Hidden Content]
    1 point
  10. ( //cmd.cpp //Search struct command_info cmd_info[] = //Add Before ACMD(do_online); //Search { "\n", NULL, 0, POS_DEAD, GM_IMPLEMENTOR } //Add Before { "online", do_online, 0, POS_DEAD, GM_LOW_WIZARD }, ) ( //cmd_gm.cpp //Search ACMD(do_who) //Add After ACMD(do_online) { /// Phase 1 - Count Local Core const DESC_MANAGER::DESC_SET& c_set_desc = DESC_MANAGER::instance().GetClientSet(); DESC_MANAGER::DESC_SET::const_iterator it = c_set_desc.begin(); DWORD dwLoginCount = 0; while (it != c_set_desc.end()) { LPDESC d = *(it++); if (d->GetCharacter()) ++dwLoginCount; // count login count in core } /// Phase 2 - Count Peer PID Connections dwLoginCount = dwLoginCount + (int)P2P_MANAGER::instance().GetPIDCount(); ch->ChatPacket(CHAT_TYPE_INFO, "Total Online: [%d] ", dwLoginCount); } ) ( //p2p.h //Search int GetCount(); //Add after int GetPIDCount() { return m_map_pkCCI.size(); }; ) Better than to involve a packet request..
    1 point
  11. M2 Download Center Download Here ( Internal ) Download Here ( GitHub ) ---------------------------------
    1 point
  12. Hello I hope Vegas is not sad because I use the system I found it for free For this I used the system I need help I have a system error When I buy the potion Not buy I have money but don't buy it thanks for the help
    0 points
  13. shhhh I was translating and wrongly hit the keyboard shortcut to publish the topic, should be ok now
    0 points
  14. I do not mean to insult I just tell Vegas that I don't mean to use the provided system for free But I got it
    0 points
  15. He is crying still for the past 6 hours what have you done!!!!!!
    0 points
  16. The images have a humorous purpose, please do not take this seriously.
    0 points
  17. For those who need FN_compare_item_socket function and also with fixed 'memory leak' which already is public. Srcs/game/src/char_item.cpp 1.0) Add at the beginning of file: static bool FN_compare_item_socket(const LPITEM pkItemSrc, const LPITEM pkItemDest) { if (!pkItemSrc || !pkItemDest) return false; return memcmp(pkItemSrc->GetSockets(), pkItemDest->GetSockets(), sizeof(long) * ITEM_SOCKET_MAX_NUM) == 0; } 2.0) Search for: 2.1) Replace it with: [Hidden Content]
    0 points
  18. You don't need server source for this, you can do it directly via source client. For being in real time you'll need to do a boolean variable inside of CInstanceBase class which is updated from RecvAffectAddPacket, RecvAffectRemovePacket for each instance. So with that you could do a function like chrmgr.IsPoisoned(self.GetTargetVID()) which will result the status of poison for specific vid and check it in OnUpdate. Btw, the implementation is very bad, if i would want to do this, i don't touch the hpGauge, just add a new gauge bar over the hpGauge and hide/show it, that's all, could be done just with few lines, without the python. [Hidden Content]
    0 points
×
×
  • 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.