Jump to content

Takuma

Developer
  • Posts

    23
  • Joined

  • Last visited

  • Feedback

    0%

3 Followers

About Takuma

  • Birthday June 8

Informations

  • Gender
    Male
  • Country
    France
  • Nationality
    French

Social Networks

  • Discord
    nicolascdt

Recent Profile Visitors

928 profile views

Takuma's Achievements

Enthusiast

Enthusiast (6/16)

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

Recent Badges

178

Reputation

  1. 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...
  2. 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...
  3. 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;
  4. 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*
  5. 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.
  6. 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.
  7. 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
  8. 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.
  9. 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.
  10. 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!
  11. 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.
  12. It tries to look for ENABLE TRANSMUTE SYSTEM in app module. But it seems to doesn't exist. Check if you haven't ENABLE_TRANSMUTE_SYSTEM with an other name. Else, remove this : if app.ENABLE_TRANSMUTE_SYSTEM: data["look"] = int(d[c.inc("look")])
  13. Hi. I'm a little bit busy now. Could you maybe make a pull request on github ? I'll check this. Thanks you !
  14. For those who are in the same case, I made a pull request with a version that seems to support .txt
×
×
  • 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.