Jump to content

ds_aim

Banned
  • Posts

    442
  • Joined

  • Last visited

  • Days Won

    9
  • Feedback

    0%

Everything posted by ds_aim

  1. sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES Delete this line restart mysql server and try again.
  2. IDIOT [Hidden Content] In this tutorial it is all explained just have to use your brain.
  3. Dude you are really crazy ? In 6-7 months you don't found a windows serverfiles? Really ?
  4. Setting the SQL Mode The default SQL mode in MySQL 5.6.6 and later is NO_ENGINE_SUBSTITUTION; in MySQL 5.6.5 and earlier, it was empty (no modes set). To set the SQL mode at server startup, use the --sql-mode="modes" option on the command line, or sql-mode="modes" in an option file such as my.cnf(Unix operating systems) or my.ini (Windows). modes is a list of different modes separated by commas. To clear the SQL mode explicitly, set it to an empty string using --sql-mode="" on the command line, or sql-mode="" in an option file. [Hidden Content]
  5. [Hidden Content] Colum 1 = name Colum 2= vnum col = colum Better expain [Hidden Content] Now it should be easy for you.
  6. std::unique_ptr<SQLMsg> pMsg (AccountDB::instance().DirectQuery( "UPDATE account " "SET status= 'BLOCK' " "WHERE id = %d", ch->GetDesc()->GetAccountTable().id) );
  7. Upgrade to 40k What the hell are you guys still use 2089m? Things evolve, you remain in primitive 2089m. 2089m it's primitive, old, unsafe. the fuck
  8. And you want a precompiled dump_proto ? with those? lel People come here to ask for help .. nobody works for you. As I said, to make compatible do as I said. Modify the structure mob_proto for each ehchant and resist as in mob_proto client and dump_proto. I've helped you with the answer, but you have to do and a little effort and learn to compile alone dump_proto. If you do not try, you do not ever learn, and again you will come here for help. Belive me isn't so hard to compile dump_proto it take 10 seconds. Client side : Change mob_proto struct: [Hidden Content] Change dumo_proto struct: [Hidden Content] Server side : mob_proto struct :[Hidden Content] After MOB_ENCHANT_PENETRATE add: MOB_ENCHANT_BLEEDING etc... After MOB_RESIST_POISON add : MOB_RESIST_CLAW and MOB_RESIST_BLEEDING You need to look intro you mob_proto and add those in structs
  9. Client side : Change mob_proto struct: [Hidden Content] Change dumo_proto struct: [Hidden Content] Server side : mob_proto struct :[Hidden Content] It was hard?
  10. I can't download files. You need to change client mob_proto structure and also dump_proto structure. Also i can't download files.
  11. Char.h Find: boost::unordered_map<VID, size_t> TargetVIDMap; replace with boost::unordered_map<DWORD, size_t> TargetVIDMap; Char_skill.cpp auto iterTargetMap = rSkillUseInfo.TargetVIDMap.find(TargetVID);
  12. yeah, but auto is an c++11 feature. You need to add -std=c++11 flag intro makefile [Hidden Content]
  13. you can remove hackshield from server, isn't used. And compile cores with -mtune=native flag. Then should work.
  14. Intro skill_proto check skills order. And also clean mysql affects.
  15. enum PacketHeaders { HEADER_X, HEADER_Y, HEADER_Z, } The enum assign automaticaly a number intro data The real values is enum PacketHeaders { HEADER_X = 0, HEADER_Y = 1, HEADER_Z = 2, } You have 2 headers with same value, soo change header value or delete one of them Please read this too : [Hidden Content] The answer is easy now.
  16. #include "stdafx.h" #include "constants.h" #include "log.h" #include "locale_service.h" #include "item.h" #include "blend_item.h" struct BLEND_ITEM_INFO { DWORD item_vnum; int apply_type; int apply_value[MAX_BLEND_ITEM_VALUE]; int apply_duration[MAX_BLEND_ITEM_VALUE]; }; typedef std::vector<BLEND_ITEM_INFO*> T_BLEND_ITEM_INFO; T_BLEND_ITEM_INFO s_blend_info; bool Blend_Item_init() { char file_name[256]; snprintf (file_name, sizeof (file_name), "%s/blend.txt", LocaleService_GetBasePath().c_str()); sys_log (0, "Blend_Item_init %s ", file_name); for (const auto& blend_item_info : s_blend_info) { M2_DELETE (blend_item_info); } s_blend_info.clear(); if (false == Blend_Item_load (file_name)) { sys_err ("<Blend_Item_init> fail"); return false; } return true; } bool Blend_Item_load (char* file) { FILE* fp; char one_line[256]; const char* delim = " \t\r\n"; char* v; BLEND_ITEM_INFO* blend_item_info; if (0 == file || 0 == file[0]) { return false; } if ((fp = fopen (file, "r")) == 0) { return false; } while (fgets (one_line, 256, fp)) { if (one_line[0] == '#') { continue; } const char* token_string = strtok (one_line, delim); if (nullptr == token_string) { continue; } TOKEN ("section") { blend_item_info = M2_NEW BLEND_ITEM_INFO; memset (blend_item_info, 0x00, sizeof (BLEND_ITEM_INFO)); } else TOKEN ("item_vnum") { v = strtok (nullptr, delim); if (nullptr == v) { fclose (fp); return false; } str_to_number (blend_item_info->item_vnum, v); } else TOKEN ("apply_type") { v = strtok (nullptr, delim); if (nullptr == v) { fclose (fp); return false; } blend_item_info->apply_type = FN_get_apply_type (v); } else TOKEN ("apply_value") { for (int i = 0; i < MAX_BLEND_ITEM_VALUE; ++i) { v = strtok (nullptr, delim); if (nullptr == v) { fclose (fp); return false; } str_to_number (blend_item_info->apply_value[i], v); } } else TOKEN ("apply_duration") { for (int i = 0; i < MAX_BLEND_ITEM_VALUE; ++i) { v = strtok (nullptr, delim); if (nullptr == v) { fclose (fp); return false; } str_to_number (blend_item_info->apply_duration[i], v); } } else TOKEN ("end") { s_blend_info.push_back (blend_item_info); } } fclose (fp); return true; } static int FN_random_index() { int percent = number (1, 100); if (percent <= 10) { return 0; } else if (percent <= 30) { return 1; } else if (percent <= 70) { return 2; } else if (percent <= 90) { return 3; } else { return 4; } return 0; } static int FN_ECS_random_index() { int percent = number (1, 100); if (percent <= 5) { return 0; } else if (percent <= 15) { return 1; } else if (percent <= 60) { return 2; } else if (percent <= 85) { return 3; } else { return 4; } return 0; } bool Blend_Item_set_value (LPITEM item) { for (const auto& blend_info : s_blend_info) { if (blend_info->item_vnum == item->GetVnum()) { int apply_type; int apply_value; int apply_duration; if (item->GetVnum() == 51002) { apply_type = blend_info->apply_type; apply_value = blend_info->apply_value[FN_ECS_random_index()]; apply_duration = blend_info->apply_duration[FN_ECS_random_index()]; } else { apply_type = blend_info->apply_type; apply_value = blend_info->apply_value[FN_random_index()]; apply_duration = blend_info->apply_duration[FN_random_index()]; } sys_log (0, "blend_item : type : %d, value : %d, du : %d", apply_type, apply_value, apply_duration); item->SetSocket (0, apply_type); item->SetSocket (1, apply_value); item->SetSocket (2, apply_duration); return true; } } return false; } bool Blend_Item_find (DWORD item_vnum) { BLEND_ITEM_INFO* blend_info; for (const auto& blend_item_info : s_blend_info) { if (blend_info->item_vnum == item_vnum) { return true; } } return false; } [Hidden Content] Have fun. This fix all blend bugs and issues. Also fix the unsafe strtok(); And also const helping the compiler to optimize your code, and you prevent yourself from making unintentional bugs Removed macro. Also contain some features auto transform and nullptr transform. A new parameter, s1max, prevents strtok_s from storing outside of the string being tokenized. (The string being divided into tokens is both an input and output of the function since strtok_s stores null characters into the string.) A new parameter, ptr, eliminates the static internal state that prevents strtok from being re-entrant (Subclause 1.1.12). (The ISO/IEC 9899 function wcstok and the ISO/IEC 9945 (POSIX) function strtok_r fix this problem identically.) Regards ds_aim.
  17. Search i my topic , i posted a source for proto convertor... And you can take new structure posted by ken.
  18. Dude search and you will find a convertor posted by penger.
  19. Check https://metin2dev.org/board/index.php?/topic/3541-official-unpacked-updates-metin2de/&page=20#comment-66116
×
×
  • 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.