Jump to content

semoka10

Member
  • Posts

    46
  • Joined

  • Last visited

  • Feedback

    0%

About semoka10

Informations

  • Gender
    Male

Recent Profile Visitors

561 profile views

semoka10's Achievements

Enthusiast

Enthusiast (6/16)

  • Reacting Well
  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done

Recent Badges

55

Reputation

  1. Indentation (spaces and tabs) have meaning in Python. The error tells you the indentation at line 3025 is not correct. Maybe you have missing/extra spaces or mixed tabs with spaces (as that also caused issues, I think)
  2. With the goal of creating metin2 systems, what key concepts should i understand? Any course on that would be appreciated. I have basic knowledge of C++ (arrays, loops, basics of classes) and less of Python, and I'm struggling to understand (big) parts of the source code. For example. the way packets are used, or how you use python and c++ together, or literally anything about the models in game
  3. If it helps anyone, the problem was caused by the guild image because of the update to Visual Studio 2019 tutorial I used. Since then it was fixed so you won't get the error.
  4. M2 Download Center Download Here ( Internal ) With this change, slow effect will also reduce attack speed, and will reduce movement speed more than before, making it a good bonus (and slow immunity relevant). Video: 1. Client Source/UserInterface/InstanceBase.h Search: AFFECT_NUM = 64, Add above: AFFECT_SLOW_AS = 45, Search: NEW_AFFECT_BOW_DISTANCE, Add below: NEW_AFFECT_SLOW_AS = 227, PythonCharacterModule.cpp: Search: PyModule_AddIntConstant(poModule, "AFFECT_SLOW", CInstanceBase::AFFECT_SLOW); Add below: PyModule_AddIntConstant(poModule, "AFFECT_SLOW_AS", CInstanceBase::AFFECT_SLOW_AS); 2. game/src/affect.h Cauta: AFFECT_DEF_GRADE, Add below: AFFECT_SLOW_AS = 227, Cauta: AFF_BITS_MAX Add above: AFF_SLOW_AS=45, battle.cpp: Search: AttackAffect(pkAttacker, pkVictim, POINT_SLOW_PCT, IMMUNE_SLOW, AFFECT_SLOW, POINT_MOV_SPEED, -30, AFF_SLOW, 20, "SLOW"); Replace with: if (pkAttacker->GetPoint(POINT_SLOW_PCT) && !pkVictim->IsAffectFlag(AFF_SLOW)) { if (number(1, 100) <= pkAttacker->GetPoint(POINT_SLOW_PCT) && !pkVictim->IsImmune(IMMUNE_SLOW)) { pkVictim->AddAffect(AFFECT_SLOW, POINT_MOV_SPEED, -50, AFF_SLOW, 10, 0, true); pkVictim->AddAffect(AFFECT_SLOW_AS, POINT_ATT_SPEED, -40, AFF_SLOW_AS, 10, 0, true); } } char_affect.cpp: Search: RemoveAffect(AFFECT_SLOW); Add below: RemoveAffect(AFFECT_SLOW_AS); char_skill.cpp: Search: else if (IS_SET(m_pkSk->dwFlag, SKILL_FLAG_SLOW)) Replace the content with: { if (iPct && !pkChrVictim->IsAffectFlag(AFF_SLOW)) { if (number(1, 1000) <= iPct && !pkChrVictim->IsImmune(IMMUNE_SLOW)) { pkChrVictim->AddAffect(AFFECT_SLOW, POINT_MOV_SPEED, -50, AFF_SLOW, 10, 0, true); pkChrVictim->AddAffect(AFFECT_SLOW_AS, POINT_ATT_SPEED, -40, AFF_SLOW_AS, 10, 0, true); } } } Note: to modify the values, change the values inside the AddAffect function call. Example: pkChrVictim->AddAffect(AFFECT_SLOW_AS, POINT_ATT_SPEED, -40, AFF_SLOW_AS, 10, 0, true); -40 is the value reduced, 10 is the duration of the debuff.
  5. Image: 1. Client Source/UserInterface/PythonNonPlayer.cpp search: DWORD CPythonNonPlayer::GetMonsterMaxHP(DWORD dwVnum) below this function, add: DWORD CPythonNonPlayer::GetMonsterRegenPercent(DWORD dwVnum) { const CPythonNonPlayer::TMobTable* c_pTable = GetTable(dwVnum); if (!c_pTable) { DWORD bRegenPercent = 0; return bRegenPercent; } return c_pTable->bRegenPercent; } DWORD CPythonNonPlayer::GetMonsterRegenRate(DWORD dwVnum) { const CPythonNonPlayer::TMobTable* c_pTable = GetTable(dwVnum); if (!c_pTable) { DWORD bRegenCycle = 0; return bRegenCycle; } return c_pTable->bRegenCycle; } PythonNonPlayer.h: search: DWORD GetMonsterMaxHP(DWORD dwVnum); below, add: DWORD GetMonsterRegenRate(DWORD dwVnum); DWORD GetMonsterRegenPercent(DWORD dwVnum); PythonNonPlayerModule.cpp: search: PyObject * nonplayerGetMonsterMaxHP(PyObject * poSelf, PyObject * poArgs) add below: PyObject * nonplayerGetMonsterRegenRate(PyObject * poSelf, PyObject * poArgs) { int race; if (!PyTuple_GetInteger(poArgs, 0, &race)) return Py_BuildException(); CPythonNonPlayer& rkNonPlayer=CPythonNonPlayer::Instance(); return Py_BuildValue("i", rkNonPlayer.GetMonsterRegenRate(race)); } PyObject * nonplayerGetMonsterRegenPercent(PyObject * poSelf, PyObject * poArgs) { int race; if (!PyTuple_GetInteger(poArgs, 0, &race)) return Py_BuildException(); CPythonNonPlayer& rkNonPlayer=CPythonNonPlayer::Instance(); return Py_BuildValue("i", rkNonPlayer.GetMonsterRegenPercent(race)); } search: { "GetMonsterMaxHP", nonplayerGetMonsterMaxHP, METH_VARARGS }, below, add: { "GetMonsterRegenRate", nonplayerGetMonsterRegenRate, METH_VARARGS }, { "GetMonsterRegenPercent", nonplayerGetMonsterRegenPercent, METH_VARARGS }, 2. client/pack/root/uitarget.py: search: self.AppendTextLine(localeInfo.TARGET_INFO_EXP % str(iExp)) add below: self.AppendTextLine(localeInfo.TARGET_INFO_REGEN % (str(nonplayer.GetMonsterRegenPercent(race)), str(nonplayer.GetMonsterRegenRate(race)))) 3. client/pack/locale/locale_game.txt search: TARGET_INFO_MAX_HP Max. HP : %s add: TARGET_INFO_REGEN HP Regen: %s%% every %s seconds Done! Bonus: If you don't want Target Info to show "Damage: 1-5" for Metin stones, in uitarget.py, replace: self.AppendTextLine(localeInfo.TARGET_INFO_DAMAGE % (str(iDamMin), str(iDamMax))) with if not(nonplayer.IsMonsterStone(race)): self.AppendTextLine(localeInfo.TARGET_INFO_DAMAGE % (str(iDamMin), str(iDamMax)))
  6. I implemented penger's system for red name on item drop etc but i have 1 problem, when I pick up skill books, the skill name is in korean. Anyone know where I can translate it? I found this line in item.cpp but I don;t know where to go next image of problem: Figured it out, it reads from database skill_proto
  7. I can't figure out how to change the text color of a specific line in the client, to be specific the "Succes rate" of upgrading an item. In uirefine.py i have I think i have to change the color before self.successPercentage.SetText(localeInfo.REFINE_SUCCESS_PROBALITY % (percentage)) but I couldn't find any function to do so. i'm really bad at Python, thanks for your help.
  8. 1. Description of the problem / Question : When I teleport/logout/change character the client crashes. The 3 systems I added to a clean serverfile are great's offline shop, target info and decimal hp, it might be because one of them 2. SysErr ( Client / Server ) / SysLog ( Server ) empty, both client and server 4. Screenshots ? if i debug the client with vs, it stops here: Thanks, Sincerly, [[ Username ]]
  9. When I throw an item, I get korean text instead of the normal one. In server syserr I get locale_find: LOCALE_ERROR: "떨어진 아이템은 1분 후 사라집니다."; I tried to add it to locale_string, but if I do that, all the other text in game is korean as well. (Note: If I add it first in locale_string, only that line I added works, if I add it last, none work at all) So any solution for this? Or otherwise, where can I remove the text entirely? Thanks
  10. Does anyone know how to add drop chance to the target info system(the one with damage/exp/item drops etc)? I tried to do it myself but couldn't figure it out, couldn't find an easy way like a function that returns drop chance for each item in part and I don't know how to obtain it(the drop chance). Any hint/idea is welcome
×
×
  • 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.