Jump to content

Recommended Posts

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Just create new function like this. The function regein_in_map spawn mobs once.

Spoiler

questlua_global.cpp

add below _regen_in_map function

int _regen_in_map_spawn(lua_State * L)
    {
        int iMapIndex = static_cast<int>(lua_tonumber(L, 1));
        std::string szFilename(lua_tostring(L, 2));

        LPSECTREE_MAP pkMap = SECTREE_MANAGER::instance().GetMap(iMapIndex);

        if (pkMap != NULL)
        {
            regen_load(szFilename.c_str(), iMapIndex, pkMap->m_setting.iBaseX, pkMap->m_setting.iBaseY);
        }

        return 0;
    }

add bellow {    "regen_in_map",                    _regen_in_map                    },

{    "regen_in_map_spawn",            _regen_in_map_spawn                },

 

Link to comment
https://metin2.dev/topic/9779-helpregen_in_map-lua/#findComment-58478
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.