• 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!

[0.3.5pl1] selfGetPosition() - missing function?

Bazze90

New Member
Joined
Sep 14, 2009
Messages
28
Reaction score
0
Hello!

The NPC system is using a function called selfGetPosition(), but it doesn't seem to exist. Does the selfGetPosition() exist in this server version?

Code:
data/npc/lib/npc.lua:50: attempt to call global 'selfGetPosition' (a nil value)
 
lua_register(m_luaState, "selfFocus", NpcScriptInterface::luaActionFocus);
lua_register(m_luaState, "selfSay", NpcScriptInterface::luaActionSay);

lua_register(m_luaState, "selfTurn", NpcScriptInterface::luaActionTurn);
lua_register(m_luaState, "selfMove", NpcScriptInterface::luaActionMove);
lua_register(m_luaState, "selfMoveTo", NpcScriptInterface::luaActionMoveTo);
lua_register(m_luaState, "selfFollow", NpcScriptInterface::luaActionFollow);

lua_register(m_luaState, "getNpcId", NpcScriptInterface::luaGetNpcId);
lua_register(m_luaState, "getNpcDistanceTo", NpcScriptInterface::luaGetNpcDistanceTo);
lua_register(m_luaState, "getNpcParameter", NpcScriptInterface::luaGetNpcParameter);

lua_register(m_luaState, "getNpcState", NpcScriptInterface::luaGetNpcState);
lua_register(m_luaState, "setNpcState", NpcScriptInterface::luaSetNpcState);

lua_register(m_luaState, "openShopWindow", NpcScriptInterface::luaOpenShopWindow);
lua_register(m_luaState, "closeShopWindow", NpcScriptInterface::luaCloseShopWindow);
just those exist :)
 
THANKS! Why aren't those functions in the Lua functions list for the server!? Are there more unlisted functions!? Is there a corresponding function for doNpcSetCreatureFocus?
 
THANKS! Why aren't those functions in the Lua functions list for the server!? Are there more unlisted functions!? Is there a corresponding function for doNpcSetCreatureFocus?

Because these are NPC specific and they don't change. There was only one change to them in 0.3.5, as I've removed all unused and unecessary. For all changes backward compatibility was added to npc.lua file, so seems you didn't updated it.

selfFocus.
 
Back
Top