Jump to content

soforyou

Active+ Member
  • Posts

    15
  • Joined

  • Last visited

  • Days Won

    3
  • Feedback

    100%

soforyou last won the day on March 14

soforyou had the most liked content!

About soforyou

  • Birthday 10/04/1998

Informations

  • Gender
    Male
  • Country
    Portugal
  • Nationality
    Portuguese

Development

Recent Profile Visitors

2449 profile views

soforyou's Achievements

Community Regular

Community Regular (8/16)

  • Very Popular Rare
  • Collaborator Rare
  • Conversation Starter
  • Dedicated
  • Reacting Well

Recent Badges

351

Reputation

  1. Him for 30 bucks [Hidden Content]
  2. Unfortunately I don't have the original clone otherwise I would put it up as my current git instance is for my private project, I might have an old version and if you wish I can add it, tho it'll probably break if I start hosting a copy again
  3. Download Center Metin2 Rest API Metin2 Rest API - Laravel Service Server Side API Secure your ports, the zip has basic middleware but you need to wire it up yourself as I'm using libenvpp for configuration instead of the default setup, I also use SPDLOG if you want you can wire your own logger in the API.cpp file. Why? Have you ever wanted to ditch the old API because you don't like TCP? Me too! Now you can do it with this Requirements CrowCpp/Crow Installing requirements (Using vcpkg and CMake) Run command. vcpkg install crow Example Output { "channels": { "13000": "NORM", "13001": "NORM", "13002": "NORM", "13003": "NORM", "13004": "NORM", "13005": "NORM", "13099": "NORM" }, "shop_count": 0, "user_count": 0 } Changes Download the zip and paste it on your db/src db/src/Main.cpp [Hidden Content] db/src/ClientManager.h [Hidden Content] To get proper status on startup you need to start your game cores AFTER the db NEVER BEFORE OR AT THE SAME TIME Below there's an example for people using the Metin2 on LINUX project In your docker-compose.yml or compose.yml Add ports (18080) to your db service as well as the healthcheck, example below: db: image: ${GAME_IMAGE} restart: always env_file: - .env expose: - ${DB_PORT} ports: - "18080:18080" command: db volumes: - ./storage/log/db/:/app/log/ depends_on: database: condition: service_healthy healthcheck: test: "curl --silent --fail [Hidden Content] > /dev/null || exit 1" interval: 10s timeout: 5s retries: 5 networks: - metin2 And all your cores should have db with service_healthy for your dependencies, example below ch1_first: image: ${GAME_IMAGE} restart: always environment: GAME_HOSTNAME: ch1_first GAME_CHANNEL: 1 GAME_MARK_SERVER: true GAME_PORT: 13000 GAME_P2P_PORT: 14000 GAME_MAP_ALLOW: 1 3 4 5 6 21 23 24 25 26 41 43 44 45 46 91 92 93 107 112 201 env_file: - .env expose: - 13000 - 14000 ports: - "13000:13000" command: game volumes: - ./storage/log/ch1/first/:/app/log/ - ./storage/mark/:/app/mark/ depends_on: db: condition: service_healthy networks: - metin2 Middleware Configuration THIS WILL ONLY PLUG AND PLAY IF YOU'RE USING libenvpp db/src/Config.cpp [Hidden Content] db/src/Main.cpp [Hidden Content] In your .env add [Hidden Content] Usage There's also a Laravel 12 compatible service in the downloads with the example usage below public function __invoke(Request $request) { $status = (new ServerApiService)->fetchStatus(); if (! $status) { return 'No data'; } return [ 'channels' => $status->getChannels(), 'userCount' => $status->getUserCount(), 'shopCount' => $status->getShopCount(), 'ch1' => $status->getChannel(13000)->value, ]; } Credits @ Gurgarath I basically stole his idea
      • 39
      • Metin2 Dev
      • Good
      • Love
      • muscle
  4. Using skilltable.txt Server Side Why? Because it's easier to tweak and you can share the code with the client! Requirements vincentlaucsb/csv-parser Installing requirements (Using vcpkg and CMake) Run command. vcpkg install vincentlaucsb-csv-parser Add to the CMakeLists.txt for db (src/db/CMakeLists.txt) # vincentlaucsb/csv-parser find_package(unofficial-vincentlaucsb-csv-parser CONFIG REQUIRED) target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::vincentlaucsb-csv-parser::csv) Changes skilltable.txt [Hidden Content] db/src/ClientManager.h [Hidden Content] db/src/ClientManager.cpp [Hidden Content] db/src/ProtoReader.cpp [Hidden Content] db/src/ProtoReader.h [Hidden Content] This is based on an old commit I have, if something is off do tell me and I'll have a look at it
      • 54
      • Metin2 Dev
      • Love
      • Good
  5. Download Metin2 Download Want to show your players what stats an ability uses? This is the perfect bit for you, it's ordered by highest coefficient to lowest About the python bit: [Hidden Content]
  6. Back then I just remember adding support for LF line endings, I think I found a previous PR on a different project: [Hidden Content]
  7. It's more likely then not git configuration related, I think my stuff is forced to LF and that can cause trouble
  8. I have previously found this issue due to LF and CRLF differences, I can't remember how I fixed it exactly, I just know it was line ending related.
  9. special_item_group.json Why? First things first, I truly dislike the weird tab sperated file format, second using a json schema you have good IDE integration, third I was bored and I also wanted the polymorph marble bit from chests bit Gurgarath posted, besides that you can set any socket you may wish. Requirements nlohmann/json Installing requirements (Using vcpkg and CMake) Run command. vcpkg install nlohmann-json Add to the CMakeLists.txt for game (src/game/CMakeLists.txt) # nlohmann/json find_package(nlohmann_json CONFIG REQUIRED) target_link_libraries(${PROJECT_NAME} PRIVATE nlohmann_json::nlohmann_json) Changes Please do not fully copy paste the values as your source will probably differ from my own code. I'm also using SPDLPG, you might want to change it's calls to the equivalent sys_ function. item_manager_read_tables.cpp Add at the top of the file after your includes #include <nlohmann/json.hpp> Function ReadSpecialDropItemFile Here you'll find most of the changes as it does all the file parsing. [Hidden Content] item_manager.h (CSpecialItemGroup) All the changes here are for supporting the sockets changes. char_item.cpp (GiveItemFromSpecialItemGroup) Here as well all changes are for supporting the sockets. Input_db.cpp Everything here is pretty simple, just look for wherever you call something like the below and make .txt into .json snprintf(szSpecialItemGroupFileName, sizeof(szSpecialItemGroupFileName), "%s/special_item_group.json", LocaleService_GetBasePath().c_str()); File Conversion As for the conversion part all you need to do is paste your `special_item_group.txt` into the textbox in the url below and click submit, that should give you a good JSON file to start with using the schema I provide in a different repo. M2 JSON - Special Item Group
      • 15
      • Good
      • Metin2 Dev
      • Love
      • muscle
  10. Proto Reading simplification Why? I've found that adding types, subtypes and all of that stuff is way too boring, cumbersome and honestly error prone. Therefore I decided rewriting it fully to try and make it simpler and nicer to use, as well as maybe more performant (not guaranteed). Requirements vincentlaucsb/csv-parser Installing requirements (Using vcpkg and CMake) Run command. vcpkg install vincentlaucsb-csv-parser Add to the CMakeLists.txt for db (src/db/CMakeLists.txt) # vincentlaucsb/csv-parser find_package(unofficial-vincentlaucsb-csv-parser CONFIG REQUIRED) target_link_libraries(${PROJECT_NAME} PRIVATE unofficial::vincentlaucsb-csv-parser::csv) Changes Please do not fully copy paste the values as your source will probably differ from my own code. I'm also using SPDLPG, you might want to change it's calls to the equivalent sys_ function. "Name" should be in utf-8 or compatible, otherwise MySQL can have issues updating it [Hidden Content] This code is easily adaptable to both the ProtoDump as well as the Client itself if you wish to reuse .txt files on the client.
  11. The protect is not incredibly active and honestly I wouldn’t use it in production but it works: [Hidden Content]
  12. As the old-metin2 git server is down as of some time, I'm hosting the code although it might deviate quite a bit from the original master and nightly branch that is managed by @ Exynox [Hidden Content]
  13. Yeah I'll recommend to go with FreeBSD, the only OSS Linux version literally has a heads up saying you shouldn't use it in prod
  14. Sounds like someone is stuck on PHP 5..
×
×
  • 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.