Jump to content

WeedHex

Premium
  • Posts

    1544
  • Joined

  • Last visited

  • Days Won

    33
  • Feedback

    0%

Community Answers

  1. WeedHex's post in Server - Handshake phase does not handle packet 3 (fd 19) was marked as the answer   
    I heard many people receiving handshake from Belize location >_< 
    However I don't think your core crash is related to that syserr.
    Analyze with #dbg your core crash first of all.
     
    About handshake you can decide to blacklist the intrusive ip.
    Activate a firewall leaving public only the needed ports, and put some limit or check.
  2. WeedHex's post in How to change item drops was marked as the answer   
    dragon_soul.quest  (or .lua)
    It's a LUA drop.  Check in /quest folder.
  3. WeedHex's post in [HELP] Game Build Error was marked as the answer   
    #include "questmanager.h"  
    (It's weird you don't have by default)
  4. WeedHex's post in Ninja camouflage bug was marked as the answer   
    void CInstanceBase::__SetAffect(uint32_t eAffect, bool isVisible) { switch (eAffect) { ...... case AFFECT_REVIVE_INVISIBILITY: __Assassin_SetEunhyeongAffect(isVisible); break; case AFFECT_EUNHYEONG: __Assassin_SetEunhyeongAffect(isVisible); break; ...... } Yfw
  5. WeedHex's post in Syseer Client was marked as the answer   
    Ok for pack, I mean here:
    RaceManager.cpp
    void GetRaceResourcePathes(...)
  6. WeedHex's post in Quest window center was marked as the answer   
    case EVENT_TYPE_WINDOW_SIZE:         {             int iWidth = atoi(GetArgument("width", ScriptCommand.argList));             int iHeight = atoi(GetArgument("height", ScriptCommand.argList));             PyCallClassMemberFunc(pEventSet->poEventHandler, "OnSize", Py_BuildValue("(ii)", iWidth, iHeight));             break;         }  
    uiquest.py
        def OnSize(self, width, height):         self.board.SetSize(width, height)         self.SetCenterPosition()  
    Passing 2 arguments by default. If you extended it, be careful everywhere!
  7. WeedHex's post in syserr was marked as the answer   
  8. WeedHex's post in passive (support) skills icon problem was marked as the answer   
    Try to replace this stack
    if localeInfo.IsYMIR(): SHOW_LIMIT_SUPPORT_SKILL_LIST = [122, 123, 121, 124, 0, 129, 164, 165, 166, 130, 131, 132,] if not localeInfo.IsCHEONMA(): HIDE_SUPPORT_SKILL_POINT = True #Last filling of list SHOW_LIMIT_SUPPORT_SKILL_LIST = [121, 122, 123, 124, 126, 127, 129, 128, 131, 132, 137, 138, 139, 140,141,142] elif localeInfo.IsJAPAN() or (localeInfo.IsEUROPE() and app.GetLocalePath() != "locale/ca") and (localeInfo.IsEUROPE() and app.GetLocalePath() != "locale/br"): HIDE_SUPPORT_SKILL_POINT = True SHOW_LIMIT_SUPPORT_SKILL_LIST = [121, 122, 123, 124, 126, 127, 129, 128, 131, 137, 138, 139, 140] else: HIDE_SUPPORT_SKILL_POINT = True With:
    SHOW_LIMIT_SUPPORT_SKILL_LIST = [122, 123, 121, 124, 0, 129, 164, 165, 166, 130, 131, 132,] HIDE_SUPPORT_SKILL_POINT = True  
    This statement
    "if not localeInfo.IsCHEONMA():"
    Was declaring another list.
  9. WeedHex's post in FIX KOREAN ERRORS #PART5 was marked as the answer   
    Hello Devs, has been a while since I didn't post anything, so I decided to try to remember some useful thing always in my theme "korean errors".
    Let's go:
    -1: An other common SQL error in mob_proto is
    SELECT * FROM mob_proto WHERE gold_min > gold_max OR damage_min > damage_max; Found anything? Good job!
     
    -2: I found in official python (an old version maybe) a silly import in an "OnUpdate Def".
    The file was: "uitarget.py" and the import "import event". Check if you have the same problem, I hope no for you.
     
    -3: Years ago I posted a fix about the accessory's bonus by slots. The official mt2 in 2018 was showing on tooltip only x2 bonus but was applying x3 (if the item has x3 basic applies) from c++.
    Nowadays my fix is wrong if you want to be updated like official, because they fixed the tooltip also for the third bonus. Now I show what I mean.
     
    item.cpp
    Find:
    if (0 != accessoryGrade && i < ITEM_APPLY_MAX_NUM - 1) If you have it like this, it's applying only x2 of 3 basic bonus by slot. So to be correct, change like this:
    if (0 != accessoryGrade) Now we can update the python part as official did.
     
    uitooltip.py, the function def __AppendAccessoryMetinSlotInfo(...)  should be like this:
    def __AppendAccessoryMetinSlotInfo(self, metinSlot, mtrlVnum): ACCESSORY_SOCKET_MAX_SIZE = 3 cur = min(metinSlot[0], ACCESSORY_SOCKET_MAX_SIZE) end = min(metinSlot[1], ACCESSORY_SOCKET_MAX_SIZE) affectType1, affectValue1 = item.GetAffect(0) affectList1 = [0, max(1, affectValue1 * 10 / 100), max(2, affectValue1 * 20 / 100), max(3, affectValue1 * 40 / 100)] affectType2, affectValue2 = item.GetAffect(1) affectList2 = [0, max(1, affectValue2 * 10 / 100), max(2, affectValue2 * 20 / 100), max(3, affectValue2 * 40 / 100)] affectType3, affectValue3 = item.GetAffect(2) affectList3 = [0, max(1, affectValue3 * 10 / 100), max(2, affectValue3 * 20 / 100), max(3, affectValue3 * 40 / 100)] mtrlPos = 0 mtrlList = [mtrlVnum] * cur + [player.METIN_SOCKET_TYPE_SILVER] * (end - cur) for mtrl in mtrlList: affectString1 = self.__GetAffectString(affectType1, affectList1[mtrlPos + 1] - affectList1[mtrlPos]) affectString2 = self.__GetAffectString(affectType2, affectList2[mtrlPos + 1] - affectList2[mtrlPos]) affectString3 = self.__GetAffectString(affectType3, affectList3[mtrlPos + 1] - affectList3[mtrlPos]) leftTime = 0 if cur == mtrlPos + 1: leftTime = metinSlot[2] self.__AppendMetinSlotInfo_AppendMetinSocketData(mtrlPos, mtrl, affectString1, affectString2, affectString3, leftTime) mtrlPos += 1 And now we have to update the function:  __AppendMetinSlotInfo_AppendMetinSocketData(...) like this:
    def __AppendMetinSlotInfo_AppendMetinSocketData(self, index, metinSlotData, custumAffectString = "", custumAffectString2 = "", custumAffectString3 = "", leftTime = 0): slotType = self.GetMetinSocketType(metinSlotData) itemIndex = self.GetMetinItemIndex(metinSlotData) if 0 == slotType: return self.AppendSpace(5) slotImage = ui.ImageBox() slotImage.SetParent(self) slotImage.Show() ## Name nameTextLine = ui.TextLine() nameTextLine.SetParent(self) nameTextLine.SetFontName(self.defFontName) nameTextLine.SetPackedFontColor(self.NORMAL_COLOR) nameTextLine.SetOutline() nameTextLine.SetFeather() nameTextLine.Show() self.childrenList.append(nameTextLine) if player.METIN_SOCKET_TYPE_SILVER == slotType: slotImage.LoadImage("d:/ymir work/ui/game/windows/metin_slot_silver.sub") elif player.METIN_SOCKET_TYPE_GOLD == slotType: slotImage.LoadImage("d:/ymir work/ui/game/windows/metin_slot_gold.sub") self.childrenList.append(slotImage) if localeInfo.IsARABIC(): slotImage.SetPosition(self.toolTipWidth - slotImage.GetWidth() - 9, self.toolTipHeight - 1) nameTextLine.SetPosition(self.toolTipWidth - 50, self.toolTipHeight + 2) else: slotImage.SetPosition(9, self.toolTipHeight - 1) nameTextLine.SetPosition(50, self.toolTipHeight + 2) metinImage = ui.ImageBox() metinImage.SetParent(self) metinImage.Show() self.childrenList.append(metinImage) if itemIndex: item.SelectItem(itemIndex) ## Image try: metinImage.LoadImage(item.GetIconImageFileName()) except: dbg.TraceError("ItemToolTip.__AppendMetinSocketData() - Failed to find image file %d:%s" % (itemIndex, item.GetIconImageFileName()) ) nameTextLine.SetText(item.GetItemName()) ## Affect affectTextLine = ui.TextLine() affectTextLine.SetParent(self) affectTextLine.SetFontName(self.defFontName) affectTextLine.SetPackedFontColor(self.POSITIVE_COLOR) affectTextLine.SetOutline() affectTextLine.SetFeather() affectTextLine.Show() if localeInfo.IsARABIC(): metinImage.SetPosition(self.toolTipWidth - metinImage.GetWidth() - 10, self.toolTipHeight) affectTextLine.SetPosition(self.toolTipWidth - 50, self.toolTipHeight + 16 + 2) else: metinImage.SetPosition(10, self.toolTipHeight) affectTextLine.SetPosition(50, self.toolTipHeight + 16 + 2) if custumAffectString: affectTextLine.SetText(custumAffectString) elif itemIndex != constInfo.ERROR_METIN_STONE: affectType, affectValue = item.GetAffect(0) affectString = self.__GetAffectString(affectType, affectValue) if affectString: affectTextLine.SetText(affectString) else: affectTextLine.SetText(localeInfo.TOOLTIP_APPLY_NOAFFECT) self.childrenList.append(affectTextLine) if custumAffectString2: affectTextLine = ui.TextLine() affectTextLine.SetParent(self) affectTextLine.SetFontName(self.defFontName) affectTextLine.SetPackedFontColor(self.POSITIVE_COLOR) if localeInfo.IsARABIC(): affectTextLine.SetPosition(self.toolTipWidth - 50, self.toolTipHeight + 16 + 2 + 16 + 2) else: affectTextLine.SetPosition(50, self.toolTipHeight + 16 + 2 + 16 + 2) affectTextLine.SetOutline() affectTextLine.SetFeather() affectTextLine.Show() affectTextLine.SetText(custumAffectString2) self.childrenList.append(affectTextLine) self.toolTipHeight += 16 + 2 if custumAffectString3: affectTextLine = ui.TextLine() affectTextLine.SetParent(self) affectTextLine.SetFontName(self.defFontName) affectTextLine.SetPackedFontColor(self.POSITIVE_COLOR) if localeInfo.IsARABIC(): affectTextLine.SetPosition(self.toolTipWidth - 50, self.toolTipHeight + 16 + 2 + 16 + 2) else: affectTextLine.SetPosition(50, self.toolTipHeight + 16 + 2 + 16 + 2) affectTextLine.SetOutline() affectTextLine.SetFeather() affectTextLine.Show() affectTextLine.SetText(custumAffectString3) self.childrenList.append(affectTextLine) self.toolTipHeight += 16 + 2 if 0 != leftTime: timeText = (localeInfo.LEFT_TIME + " : " + localeInfo.SecondToDHM(leftTime)) timeTextLine = ui.TextLine() timeTextLine.SetParent(self) timeTextLine.SetFontName(self.defFontName) timeTextLine.SetPackedFontColor(self.POSITIVE_COLOR) if localeInfo.IsARABIC(): timeTextLine.SetPosition(self.toolTipWidth - 50, self.toolTipHeight + 16 + 2 + 16 + 2) else: timeTextLine.SetPosition(50, self.toolTipHeight + 16 + 2 + 16 + 2) timeTextLine.SetOutline() timeTextLine.SetFeather() timeTextLine.Show() timeTextLine.SetText(timeText) self.childrenList.append(timeTextLine) self.toolTipHeight += 16 + 2 else: nameTextLine.SetText(localeInfo.TOOLTIP_SOCKET_EMPTY) self.toolTipHeight += 35 self.ResizeToolTip() -4: I think this is 100% my idea, and it will fix some problem in maps that you don't know.
    A simple refactor of the aggregate monster item function. A function very spammed in game and also badly done.
    I changed it like this:
     
    struct FuncAggregateMonster {     LPCHARACTER m_ch;     FuncAggregateMonster(LPCHARACTER ch) { m_ch = ch; }     void operator()(LPENTITY ent)     {         if (ent->IsType(ENTITY_CHARACTER))         {             const LPCHARACTER ch = (LPCHARACTER) ent;             if (!ch)                 return;             if (ch->IsPC())                 return;             if (!ch->IsMonster())                 return;             if (ch->GetVictim())                 return;             // 85% trigger optimized (do not use 100%)             if (number(0, 100) <= 85)             {                 auto aggRange = 5000; //Default range                 //Example of range reduction, in this case for Ochao Index. You can do it also for mazes or monkey maps.                 //Without this change you can call the boss without making the path, through the walls                 if (ch->GetMapIndex() == 353)                     aggRange = 2600;                 if (DISTANCE_APPROX(ch->GetX() - m_ch->GetX(), ch->GetY() - m_ch->GetY()) <= aggRange)                 {                     if (ch->CanBeginFight())                         ch->BeginFight(m_ch);                 }             }         }     } }; Because is always better to decrease the range in tight places.
     
    That's all for now, thanks for reading and hope that been useful.
    Check my last release about this themes:
     
  10. WeedHex's post in C++ NPC Shop 60 Slot was marked as the answer   
    Launcher source? 
  11. WeedHex's post in Pick up distance was marked as the answer   
    Korean shits...
     
     
    PythonPlayerInput.cpp
    DWORD CPythonPlayer::__GetPickableDistance() {     CInstanceBase * pkInstMain = NEW_GetMainActorPtr();     if (pkInstMain)         if (pkInstMain->IsMountingHorse())             return 500;     return 300; } + item.cpp could be enough
  12. WeedHex's post in The map looks good on  laptop, but not on PC was marked as the answer   
    Change the name of the folder eg. "ymir work-editor" and retry in game if still get the problem.
  13. WeedHex's post in VERSION_CONFLICT was marked as the answer   
    Go in your source directories and do the command. It's just a search to understand where is your problem. (you told don't know where is, I think it's not default thing).
     
    #  <-  means is a shell command.
  14. WeedHex's post in Client argument not working was marked as the answer   
    http://www.cplusplus.com/reference/cstring/strcmp/
  15. WeedHex's post in MeleyLiar Core Crash was marked as the answer   
    I think It doesn't fix the problem.
  16. WeedHex's post in FreeBSD12 error with game&db build was marked as the answer   
    warning: illegal character encoding in string literal
  17. WeedHex's post in Visual Studio Error WINDOWS_IGNORE_PACKING_MISMATCH was marked as the answer   
    This is a "W10 Software Development Kit block". You just have to define in the "windows headers".
    Please just check information from microsoft.
     
    Here is the fix as I made:
    https://metin2.download/picture/F35kZZR3B5ULx40RL5jmqbkaOi5dK1Cw/.png
  18. WeedHex's post in EXCHANGE PROBLEM was marked as the answer   
    self.TitleName.SetText(localeInfo.EXCHANGE_TITLE % str(exchange.GetNameFromTarget()))  
    it looked like a python riddle
  19. WeedHex's post in mysql error was marked as the answer   
    Table 'account.string'
    Need a table not a column
  20. WeedHex's post in Problem with alchemy was marked as the answer   
    class ExpandedTaskBar(ui.ScriptWindow):         BUTTON_DRAGON_SOUL = 0     def __init__(self):   BUTTON_DRAGON_SOUL  Must be in line with def. You used 1 tab for def and 2 tabs for variable, python is easy cuz there aren't ; etc.  but if you don't respect TAB rip.   Download notepad++ and use it to see codes.
  21. WeedHex's post in [C++] login prompt automatically change player name was marked as the answer   
    typedef struct command_player_select
    {
        BYTE    header;
        BYTE    index;
    } TPacketCGPlayerSelect;
     
    You fucked up something, index is 0, name is just 1 character.
    -Packet problem
    -Database problem
  22. WeedHex's post in HELP Cannot load image was marked as the answer   
    ETC\ymir work\ui\dragonsoul/dragon_soul_bg.tga
    Miss this image, put it from ETC folder
  23. WeedHex's post in [QUEST] Selection on login was marked as the answer   
    Better a delay with timer in this case.  
  24. WeedHex's post in Weapon effect binary Source was marked as the answer   
    Work on this remake, you was fucking the indentation.
  25. WeedHex's post in 【Help】GM Can't be invisible! was marked as the answer   
    Locale_inc.h 
    #define ENABLE_CANSEEHIDDENTHING_FOR_GM
    to
    //#define ENABLE_CANSEEHIDDENTHING_FOR_GM
    The definition to the preprocessor must be give only 1 time if the src is ordered.
×
×
  • 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.