• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

[C++] Add this function to luascript.cpp

Joe Rod

Discord: joerod1
Joined
Mar 16, 2011
Messages
499
Solutions
2
Reaction score
172
GitHub
joerod1
Hi all, could someone help me to add this function to luascript.cpp? this function it is located at game.cpp, here are the parameters:
[cpp]bool Game::getPathToEx(const Creature* creature, const Position& targetPos, std::list<Direction>& dirList,
uint32_t minTargetDist, uint32_t maxTargetDist, bool fullPathSearch/* = true*/,
bool clearSight/* = true*/, int32_t maxSearchDist/* = -1*/)
[/cpp]

Thanks in advance
Regards
 
luascript.cpp add this

Code:
lua_register(m_luaState, "getPathToEx", LuaScriptInterface::luaGetPathToEx);

luascript.h add
Code:
static int32_t luaGetPathToEx(lua_State* L);
it's very easy.
 
Back
Top