Jump to content

VegaS™

Forum Moderator
  • Posts

    656
  • Joined

  • Last visited

  • Days Won

    187
  • Feedback

    100%

Everything posted by VegaS™

  1. C++ #include "PythonChat.h" #include "PythonPlayer.h" char buf[512 + 1]; _snprintf(buf, sizeof(buf), "Hello, %s!", CPythonPlayer::Instance().GetName()); CPythonChat::Instance().AppendChat(CHAT_TYPE_INFO, buf); Python: import chat import player chat.AppendChat(chat.CHAT_TYPE_INFO, "Hello, {}.".format(player.GetName())) Keep in mind that's a local message, will be visible just for your instance. If you want to send a message through the server that everyone can see it, you've to use this way: #include "PythonChat.h" #include "PythonPlayer.h" #include "PythonNetworkStream.h" char buf[512 + 1]; _snprintf(buf, sizeof(buf), "Hello, %s!", CPythonPlayer::Instance().GetName()); CPythonNetworkStream::Instance().SendChatPacket(buf, CHAT_TYPE_SHOUT);
  2. Update implementation of the TODO tasks (exec/apply/raise, [...]) added the pip environment added a library used for encoding detection of the python script files Thanks to @ServerCommandParser for contributions.
  3. @Syreldar @Braxy We could solve this problem in a private discussion with both of you much faster without any troubles, but here we are. After we analyzed the evidence, seems that Braxy used two functions in some quests 1/1 made by Syreldar. Those functions were public posted by Syreldar in the community, the only thing that making a real problem in this situation, is that Braxy didn't mention the author/link of those two functions, that's not called quality for the m2dev marketplace. So, the staff's decision is that @Braxy will be restricted in the Marketplace - Service section (arhived his thread) for an unknown date, until he fixes his mistakes and he proves that he changed. We can't call this a direct "reselling", but for sure, it's not healthy for the community to do things like this to other developers, that's why we decided to take this action. About the rest, everything was said.
  4. Hello, there're many topics like this, you should use the search button. [Hidden Content]
  5. You should have cared about what you're talking. In your case, you had no background in 7 years, no reputation, no posts, so we can't trust you. We won't change the rules just because 5 persons who were refused in the service section don't like them, when 50 persons voted for them. Just try to do some activity and we'll analyze it + depending on your content, you'll be able to do it. That's all, but if you don't like 'big efforts', then we can't promote your services here.
  6. That's right, it's totally not worth the effort. You're a member on m2dev for 7 years, you've not even one post in Releases or helping other people in Q&A, you just searched for help, resources, and 'up, push' to your service topic, nothing more. Metin2Dev is not a marketplace, as @ASIKOOsaid, has to be a win-win. Also, I wouldn't talk about your content of those services here, since it's another subject. I know it's easy to blame the rules and the person who implemented them instead of fulfilling them, since people just want fast incomes and no "effort'. That's why we're different than any other community, if we wanted to have over 500+ online, we could do it easily, we know the method of being "successful", but we won't apply it here, we prefer quality and 'high' rules. Not like the community where you're actively mostly, that you can have even 10 topics in services and no one would care, you can sell everything you want, no one will do any check to you even if your account was created a few seconds ago + [....]. Then it's ok, we prefer to be blamed instead of having a forum like this.
  7. Why would a customer choose us to secure the transaction? Your ideas, suggestions? That idea with a middleman in metin2 forums came from communities where everyone has access to sell something, even random members with accounts created minutes ago, where there're no filters. The customer should build a relationship with the seller for getting good support in the future. Doesn't have any relevance who will be scammed, the customer himself or the middleman, he'll be banned anyway if there's proof, which takes few seconds to do it, since we've already a special category that users won't be able to see it: Praises / Complaints - Metin2 Dev (You can write safely, only you and team members can see your topics.) And the same, money will be lost anyway, it's irrelevant who will make the transaction (customer/middleman), if the seller is a scammer, then he would scam even the middleman. These scammers changing their names every year like, so they don't care about a ban, even if you ban him in that forum, he'll get back with other names and so on, as an example you've ds_aim, who had over 10 names in the last years, but there weren't so many "public accusations", because customers were afraid to share conversations and others into a public topic. But now, that we have a special category for this, they just need a better "education" and encourage them to report those scammers/resellers. Also, related to the forum itself, there's no possibility for the moment to talk about a "scammer" from Service Section, already we implemented a system in June 2020 that won't allow resellers/scammers/untrusted people/new accounts to join on that category. The votes for implementing that rule were 75% but 90% in reality, there were some guys who voted for fun "No" and some of them from "enemy communities'. The single method to be scammed right now in metin2dev, is via discord or PM. You've to be careful when you buy from "random names" via those methods, but if something really happens, you've Praises / Complaints - Metin2 Dev. You've to know that we can't do anything to get your money back, just ban that seller/account and that's all. That's why I said, metin2 customers need education in marketing, not middleman's. I met a lot of customers who didn't want to make any report because they've no time or don't care for 100€. They've to make feedbacks, reports related to a bad experience with a seller. If they're true and there're some pieces of evidence, the seller will be banned in 12 hours for sure. Also, keep in mind the following things: There're sellers who don't give any .zip archive, in these times everyone has a different source with so many systems/features, there can't be done a full tutorial because of conflicts, so the seller has to implement it via his PC after the payment was done. A middleman in that situation is irrelevant (and to be honest, kinds of transactions like this are over 60% right now, excluded small features/systems). A seller won't give a 'big' product which costs over 1-2k to a 'middleman' + to a customer at the same time. That's a big disadvantage of a middleman, duplicated products. I won't trust any known member or part of the 'team' to give products like this. In the time the middleman will have products which are valuable to over 30.000€ +, I won't trust any virtual person. Yes, I assume that the customer can resell/public the product, but increasing the risks multiplied by two, I won't. Your ideas, suggestions? I'm PRO for it somehow, but self-education is the best, let's advertise and creating some tips/how-to avoid being scammed then, everything will be fine. There should be advertised well, recently I spoke with a user that bought some 'systems' from a scammer than he didn't answer after the payment, he came to me to ask about him, then I showed to him the pillory list, he didn't know about that category, he just blocked him and moved on. A middleman won't be there 24/7 for all metin2dev users. With my idea of making tips/how-to for avoiding + a PRIVATE category of complaining about scammers/resellers, it's much better than middleman's and m2dev will gain a lot of popularity just because of that. A customer should know how to do research, to find the best offer for him + [.....] a long list. There're many people who are selling the same product, he have to learn how to find the best one for his purposes. In the end, that's just my opinion, as a person who had over 300 real customers in the last 6 years.
  8. Duplicate case value, it's exactly what the error says. You've already defined other cases with the same values, for fixing it, edit the values from the enumeration declaration, you can find them in common/tables.h.
  9. Srcs/Server/common/length.h WHISPER_TYPE_GM = 5, [...] #ifdef BL_OFFLINE_MESSAGE WHISPER_TYPE_OFFLINE = 6, #endif Srcs/Server/input_db.cpp void CInputDB::ReadOfflineMessages(LPDESC desc, const char* pcData) { pack.bType = WHISPER_TYPE_NORMAL; [...] pack.bType = WHISPER_TYPE_OFFLINE; } Srcs/Client/UserInterface/PythonChat.h WHISPER_TYPE_GM = 5, [...] #ifdef BL_OFFLINE_MESSAGE WHISPER_TYPE_OFFLINE = 6, #endif Srcs/Client/UserInterface/PythonChat.cpp [Hidden Content] Srcs/Client/UserInterface/Locale_Inc.h #define BL_OFFLINE_MESSAGE Thanks for the release! @Mali61
  10. M2 Download Center Download Here ( Internal ) Download Here ( GitHub ) Python-Code-Translator-2-to-3 Is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code that works on all versions (py2.x - py3.x). The standard library contains a rich set of fixers that will handle almost all code. A flexible and generic library, so it is possible to write your own fixers based on your purposes. Warning: This tool purpose wasn't for doing the transition to python3, is just for the IDE purpose. INSTALLATION [Hidden Content] USING Add your .py scripts to the modules folder. Run main.bat Take the output files and move them into your application. FIXERS print Converts the print statement to the print() function. Matching multiple formats, comments, and more. Exception handling Convert except to except BaseException, since BaseException is the base class for all built-in exceptions. Converts except X, T to except X as T. xrange Renames xrange() to range() and wraps existing range() calls with list. has_key Changed dict.has_key(key) to dict..contains__(key) dict Fixes dictionary iteration methods. dict.iteritems() is converted to dict.items(), dict.iterkeys() to dict.keys(), and dict.itervalues() to dict.values(). Similarly, dict.viewitems(), dict.viewkeys() and dict.viewvalues() are converted respectively to dict.items(), dict.keys() and dict.values(). It also wraps existing usages of dict.items(), dict.keys(), and dict.values() in a call to list. exec - TODO Converts the exec statement to the exec() function. apply - TODO Removes usage of apply(). For example apply(function, *args, **kwargs) is converted to function(*args, **kwargs). raise - TODO Converts raise E, V to raise E(V), and raise E, V, T to raise E(V).with_traceback(T). If E is a tuple, the translation will be incorrect because substituting tuples for exceptions has been removed in 3.0. You can use it together with Skeleton of Python modules for IDE, from @Takuma. Download: [hide][Hidden Content]]
  11. That moment when you hate regex.. I'll add it tomorrow night on GitHub + other features.
  12. Sorry, you understood it wrong, maybe my bad. I talked about general stuff, tools, not crap metin2 or about porting it to py3, doesn't have any relevance with what I said. Was all about that in the last years I didn't saw any public tool coded in py3 well, just py2 and that's really sad when you look at py3 release date: 03-Dec-2008. There're no excuses for 'developers/programmers' that don't use the latest versions of python in other apps/tools just because metin2 doesn't have it, which means they didn't care about improving their skills in that language, simple. Those tools don't have anything related to metin2 code, that's why I told those things. It's like still using full C++98 after 20 years in your tools when you've no limits and C++2x is here. @TakumaA good feature would be a detailed documentation for functions, like this: [Hidden Content] If you need any help with the documentation or anything else, don't hesitate to contact me as well, I would like to contribute in my free time.
  13. At least there's someone in metin2 that using Python 3+ for tools (since already we've 3.9 and they're still using 2.7), great. The problem is that 99% of them will not understand the code from your tool, but it's fine, let's just run it and see the magic. Thanks for the release, it's really useful for 'developers'.
  14. I didn't said that you've to insert something, I mean that structure of your condition, it's non-sense, if (condition) retun false else return true; Because there're other checks which has to be checked, before you return that true, was enough just to return false if the condition was fulfilled, that's all. Difference means (x-y). Your code is bugged, please try to run it. [Hidden Content] I'm talking about the conditions and math itself, they're totally wrong. If you really want to check just if the player level is higher than monster then you've to do this: if ((ch->GetLevel() > victim->GetLevel()) && (ch->GetLevel() - victim->GetLevel()) > 15) So, in that way you're not comparing a negative number with a positive one, you'll be fine. But yeah.. who cares about math rules in metin2? Btw, if someone uses your code how it's right now, and there's a guy who knows some basics of reverse engineering, can modify the function IsInSafe in someone's client and make it return false all of the time, he can start a party... He can kill everybody from every place, even in the safe zone since you made a return true at the beginning of the function.
  15. Thanks for release, but there's something wrong. First, you've to put the condition after it's checking the safe zone and others, you made a return true without checking those as well. (things will going wrong) Second, you'll get a negative number if: int player = 50; int victim = 80; int diff = player - victim; cout << (diff > 15) << endl; // -30 > 15 ? = false You've to use std::abs for getting the absolute value. The code should look like: [Hidden Content] Basically you can't attack a mob if: playerLevel = 50 monsterLevel = 66 or: playerLevel = 66 monsterLevel = 50
  16. You can't define a class function inside another. You could do it just with lambdas, struct or other gnu extensions, but that's not relevant for your case. Solution: Move function GetMonsterMaxHP: DWORD CPythonNonPlayer::GetMonsterMaxHP(...) { [...] } Outside of GetMatchableMobList function, should look like this: [Hidden Content]
  17. Typical for romanians, they're so hungry for money.. @MadalinAlaska - Banned You should know that with those things what you did, you won't be happy in a long term. Have careful with karma, you'll have a server online in one day, those guys will revenge themselves somehow.
  18. Thanks for the release, that's a good idea but instead of using metin2 TextFileLoader, you could use rapidjson or similar, which would be much faster and organized. Also, I would add a check of rank: [Hidden Content] Since you use it as an index of a vector and you get that value from a parser, you should be careful with it, otherwise, they'll get a crash core.
  19. That's right, the default code is crap for this scenario with extended requirements. If you add a value to vnum4 and count4, the refining will not work anymore for that ID, the required items will be ignored, you can upgrade the item without any requirements. Basically what they did is to set the material count just when the next column of 'vnum' is empty. Let's take two examples: The refine proto id 430, will have material_count = 1, because the next column 'vnum1' is empty and the condition was fulfilled. The refine proto id 510, will have material_count = 0, because there's no column 'vnum' which is equal to 0. That means it doesn't satisfy that condition where it sets the material count. The solution is: [Hidden Content]
×
×
  • 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.