Jump to content

[Help]regen_in_map lua


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
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • 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.