Jump to content

Takuma

Developer
  • Posts

    28
  • Joined

  • Last visited

  • Feedback

    0%

3 Followers

About Takuma

  • Birthday June 8

Informations

  • Gender
    Male
  • Country
    France
  • Nationality
    French

Recent Profile Visitors

4897 profile views

Takuma's Achievements

Collaborator

Collaborator (7/16)

  • Very Popular Rare
  • Collaborator Rare
  • Reacting Well
  • Dedicated
  • First Post

Recent Badges

270

Reputation

  1. Hi ! One thing to watch out for with Windows servers: if you compile your server on Windows, there’s a good chance you’ll lock yourself into that environment. And in production… running and maintaining a FreeBSD system is way nicer—and cheaper—than dealing with Windows. Seriously. And if you're using FreeBSD (for various reasons... Personally I prefer it), you can still use Samba.. It lets you easily access your VM files directly from Windows through Explorer. If it’s just for reading files, you can also look into shared folders with VirtualBox, which work quite well ([Hidden Content]) And one more thing: when it comes to IDEs—if you're using something like PyCharm, you can cofigure it to automatically sync your files over SFTP. So you can work on the files locally, and PyCharm will handle the synchronization each time you edit them. I assume other IDEs offer similar features too. It's another valid option.
  2. Sorry i'm late ; but just saw this post. And... No don't use it. I've got you're idea : but if you do it like this, you give players a way to generate items. I explain : for (int i = 0; i < ITEM_SOCKET_MAX_NUM; i++) { long socket = pkTarget->GetSocket(i); if (socket > 2 && socket != ITEM_BROKEN_METIN_VNUM) { bHasMetinStone = true; break; } } Actually, USE_PUT_INTO_ACCESSORY_SOCKET items also use socket (for the remaining time). So you will give items whose vnum corresponds to the remaining time of the refineries. I haven't touched Metin for a long time, I don't know if there is an easy way to differentiate items, but from my point of view the code should be fixed with somethings like this (DetachMetin): // Check if item can hold stone auto const pkItemProto = ITEM_MANAGER::instance().GetTable(pkTarget->GetVnum()); if (!pkItemProto || pkItemProto->bGainSocketPct == 0) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("There is no Stone available to take out.")); return false; } (On top of your function, just after checking pkItem and pkTarget) Update: I just went to look at the mainlines... They use a flag (which my old queues no longer use... To adapt according to your case) : else if (pkItem->GetSubType() == USE_DETACHMENT && IS_SET(pkTarget->GetFlag(), ITEM_FLAG_REFINEABLE)) { LogManager::instance().ItemLog(this, pkTarget, "USE_DETACHMENT", pkTarget->GetName()); bool bHasMetinStone = false; // ...
  3. Hi! In theory, nothing is impossible. PostgreSQL indeed offers much better performance than MariaDB or MySQL. But... On Metin2, I think you won't really notice a significat difference because the database synchronization is done asynchronously, and when you're playing, you're working with the server cache. At most, if you plan to run some data analysis on top of it... You'll see the difference. From my point of view, if you want to set it up, you'll have to replace the entire existing connector with one for PostgreSQL. The transition of the database itself shouldn't be a problem.I don't have a Windows machine or the metin2 sources on my computer, so I can't really tell you what needs to be changed. However, try taking a look at the DBManager in the database source; it should give you some hints. Good luck and know that if you do it, it's a topic that interests a lot of people... If you ever fell like share it!
  4. Oh my god, pinch me, is this a dream? He's so strong!!
  5. It's been years since I touched Metin2. You're using the pc.count_item function, right? If so, try to look in the questlua_pc (I don't remember the name exactly), and look at the count_item method. Try to see what it refer to.. It seems to me it's CountSpecifyItem. Did you modify the INVENTORY_MAX_NUM constant? Show us this function if it is used, we might be able to help you...
  6. ASIKOO gave you PHP code to generate a password like MySQL 5.2, and I gave you the code to generate it with MySQL as well. We can't do more...
  7. Maybe I'm going to ask a stupid question, but if the hash function hasn't been changed, why not directly use the MySQL PASSWORD() function? $sql = "INSERT INTO account (login, password, social_id, email) VALUES (?, PASSWORD(?), ?, ?)"; $stmt = $pdo1->prepare($sql); $stmt->execute([$login, $password, $social_id, $email]); PASSWORD('123456789') give you *CC67043C7BCFF5EEA5566BD9B1F3C74FD9A5CF5D. Edit : or this if you're on MySQL 8 (ty Gurgarath) CONCAT('*', UPPER(SHA1(UNHEX(SHA1(?))))); or -- not tested CREATE FUNCTION PASSWORD(input VARCHAR(255)) RETURNS CHAR(41) BEGIN DECLARE output CHAR(41); SET output = CONCAT('*', UPPER(SHA1(UNHEX(SHA1(input))))); RETURN output; END;
  8. All available bonuses need to be in item_attr table no? If you find another bonus it's a modded item. Unless specifically modified in the sources*
  9. Hi! Thanks for sharing. I have a couple of questions: Why use a JSON file when the bonuses are already stored in the database? Why pull all the data from PHP and then process it? I believe it would be more efficient (and maybe better for your learning ? if you're trying to) to try joining the item and item_attr tables to perform this processing entirely in the database. Then, you could simply retrieve the result to display it.
  10. Actually, what I was saying is that you can do all the queries with the player name at the source level and your DBMS will store IDs for it. You just have to adapt a little bit the queries in your player_block.cpp. Example to insert new line in the player_block_list table : INSERT INTO player_bloc_list (id1, id2) SELECT p1.id, p2.id FROM player p1 JOIN player p2 ON p1.name = 'Kio' AND p2.name = 'Takuma'; Same way for select etc.. By doing this, indeed, you add an additional join during insertion (though considering the capabilities of the DBMS compared to the current Metin2 servers, it may be negligible). However, on the other hand, storing IDs is easier, and it aligns a bit more with standards.
  11. Actually, I don't understand the problem. You can store the id very well, but still ask your DBMS to return the player name to you without creating new queries. This takes up less space, it ensures that you don't keep data that doesn't correspond to anything, etc. Gurgarath told me that friends management was a real disaster. And I think we don't have to start again on this bad basis. You can keep your internal operation with loading the nicknames into memory (for displaying the list), but store the IDs in the database. You just need to change your queries (not adding new queries) to support it
  12. Hey! Thanks for sharing. Why store in database player name and not foreign keys on player IDs? As these are direct queries it could made them lighter a little no? There may be a constraint that I don't understand. This can even be problematic for servers where you can change your player name.
  13. Just a few details... Because when addressing beginners (the target audience for this post), it's important to lay a solid foundation: No. It depends on the paradigm. It should be emphasized that the entirety of C is supported in C++. In fact, C++ is just an extensions of C with a vast number of libraries. Well, then I am a liar. Not learning C to understand what C++ does under the hood is like saying you know how a car works because when you turn the key, it starts. And in terms of courses (for English spearks), I also recommend [Hidden Content]. It's comprehensive and well-explained.
  14. My opinion is that I didn't even know about the ast module; I've never really had the opportunity to use it. I'll be back to work on Monday and will be less available. However, if you find that this improvement is beneficial and necessary, I invite you to make a pull request on GitHub so that you can be directly listed as a contributor. As soon as I have some time, I'll study the matter. Thank you!
  15. Hi devs ! I was getting bored during my vacation, so i had to keep myself occupied... At the request of @ Gurgarath :3, I created a small Python script that allows you to clean up unused lines from your locale_game.txt and locale_interface.txt. It is coded with Python 3.11, compatibility with earlier versions is not guaranteed. It also uses the chardet module, which is specified in the requirements.txt. For any additional information (such as the How To), please refer to the README.md. This script currently does not support imports like import LocaleInfo as li. It also does not support dynamically constructing variable names. It only detects raw constants like localeInfo.MY_CONSTANT. Downloads : Download Find this tool on my Github or M2DL Exemple of output : Takuma.
×
×
  • 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.