int32_t LuaScriptInterface::luaDoKickPlayerFromParty(lua_State* L)
{
uint32_t cid = popNumber(L);
ScriptEnviroment* env = getScriptEnv();
if(Player* player = env->getPlayerByUID(cid))
{
if(Party* party = player->getParty())
g_game.playerLeaveParty(player);
else
lua_pushnil(L);
}
else
{
reportErrorFunc(getErrorDesc(LUA_ERROR_PLAYER_NOT_FOUND));
lua_pushboolean(L, false);
}
return 1;
}