Evor 72 Posted March 24, 2014 Share Posted March 24, 2014 Hello community! I was wondering about things which i should repair according to the Vanilla topic. It would be nice to create a topic where everybody can post bugs which them knew, so devs can fix them imidietely. Best wishes, Evor 5 Link to comment Share on other sites More sharing options...
JachuPL 308 Posted March 24, 2014 Share Posted March 24, 2014 /war fix http://metin2dev.org/board/topic/75-source-discussions-questions-answers/?p=2392 License fix (should work): desc.cpp:202 if ((unsigned)get_global_time() == 0) { extern void ClearAdminPages(); ClearAdminPages(); extern g_bShutdown; g_bShutdown = true; } 1 Link to comment Share on other sites More sharing options...
Evor 72 Posted March 24, 2014 Author Share Posted March 24, 2014 Invisible bug. Hp/Mp bug overflow. Item.remove -> removing whole stack of items instead of one. Remove Metin2Server_Check|isInvalid functions. INTERNAL Ip fix. @up To remove licence you should search for "GLOBAL_TIME" and simply comment all of that code. Link to comment Share on other sites More sharing options...
Former Staff .InyaProduction 1123 Posted March 24, 2014 Former Staff Share Posted March 24, 2014 Invisible bug. Hp/Mp bug overflow. Item.remove -> removing whole stack of items instead of one. Remove Metin2Server_Check|isInvalid functions. INTERNAL Ip fix. @up To remove licence you should search for "GLOBAL_TIME" and simply comment all of that code. Item.remove is meant to remove the stack.. pc.remove_item(item.vnum, wished number) is made to remove only a number Link to comment Share on other sites More sharing options...
Evor 72 Posted March 24, 2014 Author Share Posted March 24, 2014 Yea but it doesn't remove special items like skillbook Wysłane z Sony XPERIA Z Link to comment Share on other sites More sharing options...
Premium Syreldar 1875 Posted March 26, 2014 Premium Share Posted March 26, 2014 /dice DISABLE /Á DISABLE "Nothing's free in this life. Ignorant people have an obligation to make up for their ignorance by paying those who help them. Either you got the brains or cash, if you lack both you're useless." Syreldar Link to comment Share on other sites More sharing options...
Former Staff .InyaProduction 1123 Posted March 26, 2014 Former Staff Share Posted March 26, 2014 Why would you disable it? You can fix it instead of disabling it^^ Link to comment Share on other sites More sharing options...
Evor 72 Posted March 26, 2014 Author Share Posted March 26, 2014 As far as i know number_ex func is already fixed. Correct me if i'm wrong. Wysłane z Sony XPERIA Z Link to comment Share on other sites More sharing options...
Evor 72 Posted March 26, 2014 Author Share Posted March 26, 2014 Characters getting stuck after teleporting to map with wrong index. Open char.cpp Search for CHARACTER::WarpEnd() replace if (!map_allow_find(index)) { // ŔĚ °÷Ŕ¸·Î żöÇÁÇŇ Ľö ľřŔ¸ąÇ·Î żöÇÁÇϱâ Ŕü ÁÂÇĄ·Î µÇµą¸®ŔÚ. sys_err("location %d %d not allowed to login this server", m_posWarp.x, m_posWarp.y); GetDesc()->SetPhase(PHASE_CLOSE); return; } with if (!map_allow_find(index)) GoHome(); 5 Link to comment Share on other sites More sharing options...
Evor 72 Posted March 26, 2014 Author Share Posted March 26, 2014 Fixed issue with wrong counting of immunes. Open char_resist.cpp Search for bool CHARACTER::IsImmune(DWORD dwImmuneFlag) replace bool CHARACTER::IsImmune(DWORD dwImmuneFlag) { if (IS_SET(m_pointsInstant.dwImmuneFlag, dwImmuneFlag)) int immune_pct = 100; int percent = number(1, 100); if (percent <= immune_pct) // 90% Immune { if (test_server && IsPC()) ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_SUCCESS> (%s)", GetName()); return true; } else { if (test_server && IsPC()) ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_FAIL> (%s)", GetName()); return false; } if (test_server && IsPC()) ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_FAIL> (%s) NO_IMMUNE_FLAG", GetName()); return false; } with bool CHARACTER::IsImmune(DWORD dwImmuneFlag) { if (IS_SET(m_pointsInstant.dwImmuneFlag, dwImmuneFlag)) /* Ustawienia 100% na WSZYSTKIE odporności */ return true; if (test_server && IsPC()) ChatPacket(CHAT_TYPE_PARTY, "<IMMUNE_FAIL> (%s) NO_IMMUNE_FLAG", GetName()); return false; } 2 Link to comment Share on other sites More sharing options...
Remix 45 Posted March 26, 2014 Share Posted March 26, 2014 Check the chat commands with integer/double parameters. With them you can make an integer overflow an the core crashes. Fix: if statements for a "max value" Link to comment Share on other sites More sharing options...
Premium Shogun 4587 Posted March 26, 2014 Premium Share Posted March 26, 2014 /dice DISABLE /Á DISABLE number_ex is fixed in 40k already Link to comment Share on other sites More sharing options...
Evor 72 Posted March 26, 2014 Author Share Posted March 26, 2014 Soo, i managed to fix it in that way. do_dice if(atoi(arg1) > 100 || atoi(arg1) < 0) start = 1; if(atoi(arg2) > 100 || atoi(arg2) < 0) end = 100; number_ex (don't add checking if number is bigger than 100, becouse sectree uses this func too) if(from < 0) from = 1; if(to < 0) to = 1; cmd.cpp (interpret_command) /* argument filtering */ char arg1[256], arg2[256]; two_arguments(argument, arg1, sizeof(arg1), arg2, sizeof(arg2)); if(atoi(arg1) < 0 || atoi(arg2) < 0) return; i don't know if it still allow players to use number overflow. Greets. 1 Link to comment Share on other sites More sharing options...
Evor 72 Posted March 26, 2014 Author Share Posted March 26, 2014 /dice DISABLE /Á DISABLE number_ex is fixed in 40k already i thought it was but in fact dice works with max integer. Maybe it was because i'm using mainline_sg dunno. Link to comment Share on other sites More sharing options...
Evor 72 Posted March 26, 2014 Author Share Posted March 26, 2014 Fix for Status point (no points after 91 level) Open char.cpp Search for void CHARACTER::PointChange(BYTE type, int amount, bool bAmount, bool bBroadcast) search and replace case POINT_LEVEL_STEP: if (amount > 0) { val = GetPoint(POINT_LEVEL_STEP) + amount; switch (val) { case 1: case 2: case 3: //if (GetLevel() < 100) PointChange(POINT_STAT, 1); if (GetLevel() < 91) PointChange(POINT_STAT, 1); break; case 4: { int iHP = number(JobInitialPoints[GetJob()].hp_per_lv_begin, JobInitialPoints[GetJob()].hp_per_lv_end); int iSP = number(JobInitialPoints[GetJob()].sp_per_lv_begin, JobInitialPoints[GetJob()].sp_per_lv_end); m_points.iRandomHP += iHP; m_points.iRandomSP += iSP; if (GetSkillGroup()) { if (GetLevel() >= 5) PointChange(POINT_SKILL, 1); if (GetLevel() >= 9) PointChange(POINT_SUB_SKILL, 1); } PointChange(POINT_MAX_HP, iHP); PointChange(POINT_MAX_SP, iSP); PointChange(POINT_LEVEL, 1, false, true); val = 0; } break; } if (GetLevel() <= 10) AutoGiveItem(27001, 2); else if (GetLevel() <= 30) AutoGiveItem(27002, 2); else { AutoGiveItem(27002, 2); // AutoGiveItem(27003, 2); } PointChange(POINT_HP, GetMaxHP() - GetHP()); PointChange(POINT_SP, GetMaxSP() - GetSP()); PointChange(POINT_STAMINA, GetMaxStamina() - GetStamina()); SetPoint(POINT_LEVEL_STEP, val); SetRealPoint(POINT_LEVEL_STEP, val); Save(); } else val = GetPoint(POINT_LEVEL_STEP); break; with case POINT_LEVEL_STEP: if (amount > 0) { val = GetPoint(POINT_LEVEL_STEP) + amount; switch (val) { case 1: case 2: case 3: //if (GetLevel() < 100) PointChange(POINT_STAT, 1); PointChange(POINT_STAT, 1); break; case 4: { int iHP = number(JobInitialPoints[GetJob()].hp_per_lv_begin, JobInitialPoints[GetJob()].hp_per_lv_end); int iSP = number(JobInitialPoints[GetJob()].sp_per_lv_begin, JobInitialPoints[GetJob()].sp_per_lv_end); m_points.iRandomHP += iHP; m_points.iRandomSP += iSP; if (GetSkillGroup()) { if (GetLevel() >= 5) PointChange(POINT_SKILL, 1); if (GetLevel() >= 9) PointChange(POINT_SUB_SKILL, 1); } PointChange(POINT_MAX_HP, iHP); PointChange(POINT_MAX_SP, iSP); PointChange(POINT_LEVEL, 1, false, true); val = 0; } break; } if (GetLevel() <= 10) AutoGiveItem(27001, 2); else if (GetLevel() <= 30) AutoGiveItem(27002, 2); else { AutoGiveItem(27002, 2); // AutoGiveItem(27003, 2); } PointChange(POINT_HP, GetMaxHP() - GetHP()); PointChange(POINT_SP, GetMaxSP() - GetSP()); PointChange(POINT_STAMINA, GetMaxStamina() - GetStamina()); SetPoint(POINT_LEVEL_STEP, val); SetRealPoint(POINT_LEVEL_STEP, val); Save(); } else val = GetPoint(POINT_LEVEL_STEP); break; You can also match it with your value (for example limit of status points etc.) I'd tomorrow show how to make a config where u can set a max status point and modify function up to give a number of status points which will perfectly fit to the max of cfg file. 6 Link to comment Share on other sites More sharing options...
Endymion 319 Posted March 26, 2014 Share Posted March 26, 2014 If You want use pc.change_name with european locale just comment that piece of code: (questlua_pc.cpp, 2073 ln) if ( LC_IsEurope() ) { lua_pushnumber(L, 5); return 1; } 1 Link to comment Share on other sites More sharing options...
iMer 184 Posted March 26, 2014 Share Posted March 26, 2014 The number_ex issue is just a division by 0 crash. (the "random()%div" part, div = 0 -> crash) 1 Link to comment Share on other sites More sharing options...
Rumor 2605 Posted March 27, 2014 Share Posted March 27, 2014 (edited) Edited August 15, 2022 by Metin2 Dev Core X - External 2 Internal 9 Link to comment Share on other sites More sharing options...
Premium Sanchez 2465 Posted June 26, 2014 Premium Share Posted June 26, 2014 /dice DISABLE /Á DISABLE Á DISABLE does not works, we should use the proper korean name instead of the glitched one: 주사위 DISABLE 1 Link to comment Share on other sites More sharing options...
leo2993 21 Posted October 10, 2015 Share Posted October 10, 2015 My 3 items of change bonus are coredowners... when i use that my core is down Please help in log say something like "Sequence_log" Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now