Jump to content

SebyWalker

Member
  • Posts

    9
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by SebyWalker

  1. Hello. I want to fast-forward the process of "marriage" to "a single button click". I want to start and finish the whole wedding process by just talking to the old lady without the second part of going to the wedding map and talking with the second npc. Basically, I want to somehow merge the engage_to and set_to_marriage functions so it will correctly insert into db the marriage and then it will update it and also deliver the update to the client so a teleport won't be needed to receive the wedding affect. Any idea?

    Thank you in advance!

  2. On 11/1/2023 at 6:36 PM, Mali said:

    ui.Board class example:

    Hidden Content

     

    	def SetAlpha(self, alpha):
    		self.Base.SetAlpha(alpha)
    
    		for corner in self.Corners:
    			corner.SetAlpha(alpha)
    
    		for line in self.Lines:
    			line.SetAlpha(alpha)

     

     

     

    CWindow object example:

    Hidden Content

     

    	void CWindow::SetWindowAlpha(float alpha)
    	{
    		if (IsType(CExpandedImageBox::Type()))
    		{
    			dynamic_cast<CExpandedImageBox*>(this)->SetDiffuseColor(1.0f, 1.0f, 1.0f, alpha);
    		}
    		
    		for (CWindow* pWindow : m_pChildList)
    			if (pWindow)
    				pWindow->SetWindowAlpha(alpha);
    	}

     

     

     

    You can extend these logics

    Thank you so much ❤️

    • Metin2 Dev 1
  3. Hey.

    If you are reffering to this:

    Spoiler

    function check_event_flags()
        local event_table = {
            {"gold_drop_limit_time", 1},
            {"item_drop_limit_time", 1},
            {"box_use_limit_time", 1},
            {"buysell_limit_time", 1},
            {"no_drop_metin_stone", 0},
            {"no_mount_at_guild_war", 1},
            {"no_potions_on_pvp", 1},
        }

    It is set to 0 but nothing happens.

    • Metin2 Dev 1
  4. Hello! I have an issue with stones dropping from metinstones. As far as i know, stones should drop by default with these functions from char.cpp

    Spoiler

    void CHARACTER::DetermineDropMetinStone()
    {
    #ifdef ENABLE_NEWSTUFF
        if (g_NoDropMetinStone)
        {
            m_dwDropMetinStone = 0;
            return;
        }
    #endif

        static const DWORD c_adwMetin[] =
        {
    #if defined(ENABLE_WOLFMAN_CHARACTER) && defined(USE_WOLFMAN_STONES)
            28012,
    #endif
            28030,
            28031,
            28032,
            28033,
            28034,
            28035,
            28036,
            28037,
            28038,
            28039,
            28040,
            28041,
            28042,
            28043,
    #if defined(ENABLE_MAGIC_REDUCTION_SYSTEM) && defined(USE_MAGIC_REDUCTION_STONES)
            28044,
            28045,
    #endif
        };
        DWORD stone_num = GetRaceNum();
        int idx = std::lower_bound(aStoneDrop, aStoneDrop+STONE_INFO_MAX_NUM, stone_num) - aStoneDrop;
        if (idx >= STONE_INFO_MAX_NUM || aStoneDrop[idx].dwMobVnum != stone_num)
        {
            m_dwDropMetinStone = 0;
        }
        else
        {
            const SStoneDropInfo & info = aStoneDrop[idx];
            m_bDropMetinStonePct = info.iDropPct;
            {
                m_dwDropMetinStone = c_adwMetin[number(0, sizeof(c_adwMetin)/sizeof(DWORD) - 1)];
                int iGradePct = number(1, 100);
                for (int iStoneLevel = 0; iStoneLevel < STONE_LEVEL_MAX_NUM; iStoneLevel ++)
                {
                    int iLevelGradePortion = info.iLevelPct[iStoneLevel];
                    if (iGradePct <= iLevelGradePortion)
                    {
                        break;
                    }
                    else
                    {
                        iGradePct -= iLevelGradePortion;
                        m_dwDropMetinStone += 100; // 돌 +a -> +(a+1)이 될때마다 100씩 증가
                    }
                }
            }
        }
    }

    This is also set in void CHARACTER::SetProto(const CMob * pkMob): 

    Spoiler

        if (IsStone())
        {
            DetermineDropMetinStone();
        }

    And also, this is the constants.cpp:

    Spoiler

    const SStoneDropInfo aStoneDrop[STONE_INFO_MAX_NUM] =
    {
        //  mob        pct    {+0    +1    +2    +3    +4}
        {8005,    60,    {30,    30,    30,    9,    1}    },
        {8006,    60,    {28,    29,    31,    11,    1}    },
        {8007,    60,    {24,    29,    32,    13,    2}    },
        {8008,    60,    {22,    28,    33,    15,    2}    },
        {8009,    60,    {21,    27,    33,    17,    2}    },
        {8010,    60,    {18,    26,    34,    20,    2}    },
        {8011,    60,    {14,    26,    35,    22,    3}    },
        {8012,    60,    {10,    26,    37,    24,    3}    },
        {8013,    60,    {2,    26,    40,    29,    3}    },
        {8014,    60,    {0,    26,    41,    30,    3}    },
    };

    I tried to hardcode every stone vnum in 1 metinstone but it actually can drop multiple stones, like sometimes i would get 0 but sometimes even 5 at once. I don't like that, i want to drop only 1 stone per metinstone kill. Does anybody know the solution or what should i look for? Also, i compared these files with ones from another svfile and they actually look the same. On that server file there was never this problem.

    • Metin2 Dev 1
×
×
  • 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.